gnu: Add python-plumbum.
[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 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 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 kerberos)
155 #:use-module (gnu packages libevent)
156 #:use-module (gnu packages libffi)
157 #:use-module (gnu packages libidn)
158 #:use-module (gnu packages linux)
159 #:use-module (gnu packages llvm)
160 #:use-module (gnu packages man)
161 #:use-module (gnu packages markup)
162 #:use-module (gnu packages maths)
163 #:use-module (gnu packages monitoring)
164 #:use-module (gnu packages multiprecision)
165 #:use-module (gnu packages networking)
166 #:use-module (gnu packages ncurses)
167 #:use-module (gnu packages openstack)
168 #:use-module (gnu packages pcre)
169 #:use-module (gnu packages pdf)
170 #:use-module (gnu packages perl)
171 #:use-module (gnu packages photo)
172 #:use-module (gnu packages pkg-config)
173 #:use-module (gnu packages python)
174 #:use-module (gnu packages python-build)
175 #:use-module (gnu packages python-check)
176 #:use-module (gnu packages python-compression)
177 #:use-module (gnu packages python-crypto)
178 #:use-module (gnu packages python-science)
179 #:use-module (gnu packages python-web)
180 #:use-module (gnu packages qt)
181 #:use-module (gnu packages rdf)
182 #:use-module (gnu packages readline)
183 #:use-module (gnu packages sdl)
184 #:use-module (gnu packages search)
185 #:use-module (gnu packages scanner)
186 #:use-module (gnu packages shells)
187 #:use-module (gnu packages sphinx)
188 #:use-module (gnu packages ssh)
189 #:use-module (gnu packages swig)
190 #:use-module (gnu packages terminals)
191 #:use-module (gnu packages tex)
192 #:use-module (gnu packages texinfo)
193 #:use-module (gnu packages textutils)
194 #:use-module (gnu packages time)
195 #:use-module (gnu packages tls)
196 #:use-module (gnu packages version-control)
197 #:use-module (gnu packages video)
198 #:use-module (gnu packages web)
199 #:use-module (gnu packages wxwidgets)
200 #:use-module (gnu packages base)
201 #:use-module (gnu packages xml)
202 #:use-module (gnu packages xorg)
203 #:use-module (gnu packages xdisorg)
204 #:use-module (gnu packages tcl)
205 #:use-module (gnu packages bdw-gc)
206 #:use-module (gnu packages serialization)
207 #:use-module (guix packages)
208 #:use-module (guix download)
209 #:use-module (guix git-download)
210 #:use-module (guix hg-download)
211 #:use-module (guix utils)
212 #:use-module (guix build-system gnu)
213 #:use-module (guix build-system cmake)
214 #:use-module (guix build-system python)
215 #:use-module (guix build-system trivial)
216 #:use-module (srfi srfi-1)
217 #:use-module (srfi srfi-26))
218
219 (define-public python-slixmpp
220 (package
221 (name "python-slixmpp")
222 (version "1.5.2")
223 (source
224 (origin
225 (method git-fetch)
226 (uri
227 (git-reference
228 (url "https://lab.louiz.org/poezio/slixmpp.git")
229 (commit
230 (string-append "slix-" version))))
231 (file-name
232 (git-file-name name version))
233 (sha256
234 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
235 (build-system python-build-system)
236 (arguments
237 `(#:phases
238 (modify-phases %standard-phases
239 (add-after 'unpack 'patch
240 (lambda _
241 (substitute* "setup.py"
242 (("'CC', 'cc'")
243 "'CC', 'gcc'"))
244 #t)))))
245 (native-inputs
246 `(("cython" ,python-cython)
247 ("gnupg" ,gnupg)
248 ("pkg-config" ,pkg-config)))
249 (propagated-inputs
250 `(("python-aiodns" ,python-aiodns)
251 ("python-aiohttp" ,python-aiohttp)
252 ("python-pyasn1" ,python-pyasn1)
253 ("python-pyasn1-modules" ,python-pyasn1-modules)))
254 (inputs
255 `(("libidn" ,libidn)
256 ("python" ,python))) ; We are building a Python extension.
257 (synopsis "XMPP library without threads")
258 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
259 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
260 socket handling, the timers, the events dispatching) in order to remove all
261 threads.")
262 (home-page "https://lab.louiz.org/poezio/slixmpp")
263 (license license:expat)))
264
265 (define-public python-tenacity
266 (package
267 (name "python-tenacity")
268 (version "6.1.0")
269 (source (origin
270 (method url-fetch)
271 (uri (pypi-uri "tenacity" version))
272 (sha256
273 (base32
274 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
275 (build-system python-build-system)
276 (native-inputs
277 `(("python-setuptools-scm" ,python-setuptools-scm)
278 ("python-sphinx" ,python-sphinx)
279 ("python-tornado" ,python-tornado)
280 ("python-pytest" ,python-pytest)))
281 (propagated-inputs
282 `(("python-six" ,python-six)))
283 (arguments
284 `(#:phases (modify-phases %standard-phases
285 (replace 'check
286 (lambda _
287 (invoke "pytest")
288 #t)))))
289 (home-page "https://github.com/jd/tenacity")
290 (synopsis "Retrying library for python")
291 (description "Tenacity is a general-purpose python library to simplify the
292 task of adding retry behavior to just about anything.")
293 (license license:asl2.0)))
294
295 (define-public python-pytelegrambotapi
296 (package
297 (name "python-pytelegrambotapi")
298 (version "3.7.4")
299 (source
300 (origin
301 (method git-fetch)
302 (uri (git-reference
303 (url "https://github.com/eternnoir/pyTelegramBotAPI")
304 (commit version)))
305 (file-name (git-file-name name version))
306 (sha256
307 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
308 (build-system python-build-system)
309 (arguments
310 `(#:phases
311 (modify-phases %standard-phases
312 (replace 'check
313 (lambda* (#:key tests? #:allow-other-keys)
314 (when tests?
315 (with-directory-excursion "tests"
316 (invoke "py.test")))
317 #t)))))
318 (propagated-inputs
319 `(("python-requests" ,python-requests)))
320 (native-inputs
321 `(("python-pytest" ,python-pytest)))
322 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
323 (synopsis "Python Telegram bot api")
324 (description "This package provides a simple, but extensible Python
325 implementation for the Telegram Bot API.")
326 (license license:gpl2)))
327
328 (define-public python-colorlog
329 (package
330 (name "python-colorlog")
331 (version "4.1.0")
332 (source (origin
333 (method url-fetch)
334 (uri (pypi-uri "colorlog" version))
335 (sha256
336 (base32
337 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
338 (build-system python-build-system)
339 (native-inputs
340 `(("python-pytest" ,python-pytest)))
341 (arguments
342 `(#:phases (modify-phases %standard-phases
343 (replace 'check
344 (lambda _
345 ;; Extend PYTHONPATH so the built package will be found.
346 (setenv "PYTHONPATH"
347 (string-append (getcwd) "/build/lib:"
348 (getenv "PYTHONPATH")))
349 (invoke "pytest" "-p" "no:logging")
350 #t)))))
351 (home-page "https://github.com/borntyping/python-colorlog")
352 (synopsis "Log formatting with colors for python")
353 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
354 with Python's logging module that outputs records using terminal colors.")
355 (license license:expat)))
356
357 (define-public python-pyprind
358 (package
359 (name "python-pyprind")
360 (version "2.11.2")
361 (source (origin
362 (method url-fetch)
363 (uri (pypi-uri "PyPrind" version))
364 (sha256
365 (base32
366 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
367 (build-system python-build-system)
368 (propagated-inputs
369 `(("python-psutil" ,python-psutil)))
370 (home-page "https://github.com/rasbt/pyprind")
371 (synopsis "Python Progress Bar and Percent Indicator Utility")
372 (description "The PyPrind (Python Progress Indicator) module provides a
373 progress bar and a percentage indicator object that let you track the progress
374 of a loop structure or other iterative computation.")
375 (license license:bsd-3)))
376
377 (define-public python-gphoto2
378 (package
379 (name "python-gphoto2")
380 (version "2.2.1")
381 (source (origin
382 (method url-fetch)
383 (uri (pypi-uri "gphoto2" version))
384 (sha256
385 (base32
386 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
387 (build-system python-build-system)
388 (native-inputs
389 `(("pkg-config" ,pkg-config)))
390 (inputs
391 `(("libgphoto2" ,libgphoto2)))
392 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
393 (synopsis "Python interface to libgphoto2")
394 (description "@code{python-gphoto2} is a comprehensive Python interface
395 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
396 automatically generate the interface code.")
397 (license license:gpl3+)))
398
399 (define-public python-colour
400 (package
401 (name "python-colour")
402 (version "0.1.5")
403 (source (origin
404 (method url-fetch)
405 (uri (pypi-uri "colour" version))
406 (sha256
407 (base32
408 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
409 (build-system python-build-system)
410 (native-inputs
411 `(("python-d2to1" ,python-d2to1)))
412 (home-page "https://github.com/vaab/colour")
413 (synopsis "Convert and manipulate various color representations")
414 (description "Pythonic way to manipulate color representations (HSL, RVB,
415 web, X11, ...).")
416 (license license:expat)))
417
418 (define-public python-d2to1
419 (package
420 (name "python-d2to1")
421 (version "0.2.12.post1")
422 (source (origin
423 (method url-fetch)
424 (uri (pypi-uri "d2to1" version))
425 (sha256
426 (base32
427 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
428 (build-system python-build-system)
429 (native-inputs
430 `(("python-nose" ,python-nose)))
431 (home-page "https://github.com/embray/d2to1")
432 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
433 in python")
434 (description "The python package d2to1 (the d is for distutils) allows
435 using distutils2-like setup.cfg files for a package's metadata with a
436 distribute/setuptools setup.py script.")
437 (license license:bsd-2)))
438
439 (define-public python-rawkit
440 (package
441 (name "python-rawkit")
442 (version "0.6.0")
443 (source (origin
444 (method url-fetch)
445 (uri (pypi-uri "rawkit" version))
446 (sha256
447 (base32
448 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
449 (build-system python-build-system)
450 (native-inputs
451 `(("python-pytest" ,python-pytest)
452 ("python-mock" ,python-mock)))
453 (inputs
454 `(("libraw" ,libraw)))
455 (home-page "https://rawkit.readthedocs.io")
456 (synopsis "Ctypes-based LibRaw binding for Python")
457 (description "The rawkit package provides two modules: rawkit and libraw.
458 The rawkit module provides a high-level Pythonic interface for developing raw
459 photos, while the libraw module provides a CTypes based interface for
460 interacting with the low-level LibRaw C APIs.")
461 (license license:expat)))
462
463 (define-public python-easygui
464 (package
465 (name "python-easygui")
466 (version "0.98.1")
467 (source (origin
468 (method url-fetch)
469 (uri (pypi-uri "easygui" version))
470 (sha256
471 (base32
472 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
473 (build-system python-build-system)
474 (propagated-inputs
475 `(("python-tkinter" ,python "tk")))
476 (home-page "https://github.com/robertlugg/easygui")
477 (synopsis "GUI programming module for Python")
478 (description "EasyGUI is a module for very simple, very easy GUI
479 programming in Python. EasyGUI is different from other GUI generators in that
480 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
481 simple function calls.")
482 (license license:bsd-3)))
483
484 (define-public python-pymd4c
485 (package
486 (name "python-pymd4c")
487 (version "0.4.6.0b1")
488 (source
489 (origin
490 (method url-fetch)
491 (uri (pypi-uri "pymd4c" version))
492 (sha256
493 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
494 (build-system python-build-system)
495 (inputs
496 `(("md4c" ,md4c)))
497 (native-inputs
498 `(("python-flake8" ,python-flake8)
499 ("python-pkgconfig" ,python-pkgconfig)
500 ("pkg-config" ,pkg-config)))
501 (home-page "https://github.com/dominickpastore/pymd4c")
502 (synopsis "Python bindings for MD4C")
503 (description
504 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
505 to CommonMark.")
506 (license license:expat)))
507
508 (define-public python-pymediainfo
509 (package
510 (name "python-pymediainfo")
511 (version "4.1")
512 (source
513 (origin
514 (method url-fetch)
515 (uri (pypi-uri "pymediainfo" version))
516 (sha256
517 (base32
518 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
519 (build-system python-build-system)
520 (native-inputs
521 `(("python-setuptools-scm" ,python-setuptools-scm)
522 ("python-pytest" ,python-pytest)))
523 (inputs
524 `(("libmediainfo" ,libmediainfo)))
525 (arguments
526 `(#:phases
527 (modify-phases %standard-phases
528 (add-after 'unpack 'patch-libmediainfo
529 (lambda _
530 (substitute* "pymediainfo/__init__.py"
531 (("libmediainfo.so.0")
532 (string-append (assoc-ref %build-inputs "libmediainfo")
533 "/lib/libmediainfo.so.0")))
534 #t))
535 (replace 'check
536 (lambda _
537 ;; Extend PYTHONPATH so the built package will be found.
538 (setenv "PYTHONPATH"
539 (string-append (getcwd) "/build/lib:"
540 (getenv "PYTHONPATH")))
541 ;; Skip the only failing test "test_parse_url"
542 (invoke "pytest" "-vv" "-k" "not test_parse_url")
543 #t)))))
544 (home-page
545 "https://github.com/sbraz/pymediainfo")
546 (synopsis
547 "Python wrapper for the mediainfo library")
548 (description
549 "Python wrapper for the mediainfo library to access the technical and tag
550 data for video and audio files.")
551 (license license:expat)))
552
553 (define-public python-psutil
554 (package
555 (name "python-psutil")
556 (version "5.8.0")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "psutil" version))
561 (sha256
562 (base32 "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c"))))
563 (build-system python-build-system)
564 (arguments
565 ;; FIXME: some tests do not return and time out. Some tests fail because
566 ;; some processes survive kill().
567 '(#:tests? #f))
568 (home-page "https://github.com/giampaolo/psutil")
569 (synopsis "Library for retrieving information on running processes")
570 (description
571 "@code{psutil} (Python system and process utilities) is a library for
572 retrieving information on running processes and system utilization (CPU,
573 memory, disks, network) in Python. It is useful mainly for system monitoring,
574 profiling and limiting process resources and management of running processes.
575 It implements many functionalities offered by command line tools such as: ps,
576 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
577 iotop, uptime, pidof, tty, taskset, pmap.")
578 (properties `((python2-variant . ,(delay python2-psutil))))
579 (license license:bsd-3)))
580
581 (define-public python2-psutil
582 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
583 (package/inherit base
584 (propagated-inputs
585 `(("python2-enum34" ,python2-enum34) ;optional
586 ,@(package-propagated-inputs base))))))
587
588 (define-public python-shapely
589 (package
590 (name "python-shapely")
591 (version "1.7.1")
592 (source
593 (origin
594 (method url-fetch)
595 (uri (pypi-uri "Shapely" version))
596 (sha256
597 (base32
598 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
599 (modules '((guix build utils)))
600 (snippet
601 '(begin
602 (delete-file "shapely/speedups/_speedups.c")
603 (delete-file "shapely/vectorized/_vectorized.c")
604 #t))))
605 (build-system python-build-system)
606 (native-inputs
607 `(("python-cython" ,python-cython)
608 ("python-matplotlib" ,python-matplotlib)
609 ("python-pytest" ,python-pytest)
610 ("python-pytest-cov" ,python-pytest-cov)))
611 (inputs
612 `(("geos" ,geos)))
613 (propagated-inputs
614 `(("python-numpy" ,python-numpy)))
615 (arguments
616 `(#:phases
617 (modify-phases %standard-phases
618 (add-after 'unpack 'patch-geos-path
619 (lambda* (#:key inputs #:allow-other-keys)
620 (let ((geos (assoc-ref inputs "geos"))
621 (glibc (assoc-ref inputs ,(if (%current-target-system)
622 "cross-libc" "libc"))))
623 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
624 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
625 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
626 geos "/lib/libgeos_c.so'])"))
627 (("free = load_dll\\('c'\\)\\.free")
628 (string-append "free = load_dll('c', fallbacks=['"
629 glibc "/lib/libc.so.6']).free"))
630 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
631 (string-append "free = load_dll('c', fallbacks=['"
632 glibc "/lib/libc.so.6']).free"))))
633 #t)))))
634 (home-page "https://github.com/Toblerity/Shapely")
635 (synopsis "Library for the manipulation and analysis of geometric objects")
636 (description "Shapely is a Python package for manipulation and analysis of
637 planar geometric objects. It is based on the @code{GEOS} library.")
638 (license license:bsd-3)))
639
640 (define-public python-shortuuid
641 (package
642 (name "python-shortuuid")
643 (version "0.5.0")
644 (source
645 (origin
646 (method url-fetch)
647 (uri (pypi-uri "shortuuid" version))
648 (sha256
649 (base32
650 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
651 (build-system python-build-system)
652 (native-inputs
653 `(("python-pep8" ,python-pep8)))
654 (home-page "https://github.com/skorokithakis/shortuuid")
655 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
656 (description
657 "@code{shortuuid} is a Python library for generating concise, unambiguous
658 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
659 module and then similar looking characters are removed.")
660 (license license:bsd-3)))
661
662 (define-public python-logwrap
663 (package
664 (name "python-logwrap")
665 (version "8.2.0.post0")
666 (source
667 (origin
668 (method url-fetch)
669 (uri (pypi-uri "logwrap" version))
670 (sha256
671 (base32
672 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
673 (build-system python-build-system)
674 (arguments
675 `(#:tests? #f ; Tests not included in pypi release.
676 #:phases
677 (modify-phases %standard-phases
678 (replace 'check
679 (lambda* (#:key tests? #:allow-other-keys)
680 (when tests?
681 (invoke "pytest"))
682 #t)))))
683 (native-inputs
684 `(("python-cython" ,python-cython)
685 ("python-pytest" ,python-pytest)
686 ("python-setuptools-scm" ,python-setuptools-scm)
687 ("python-toml" ,python-toml)
688 ("python-wheel" ,python-wheel)))
689 (home-page "https://github.com/python-useful-helpers/logwrap")
690 (synopsis "Decorator for logging function arguments")
691 (description "This package provides a decorator to log function arguments
692 and function call return values in a human-readable way.")
693 (license license:asl2.0)))
694
695 (define-public python2-shapely
696 (package-with-python2 python-shapely))
697
698 (define-public python-clyent
699 (package
700 (name "python-clyent")
701 (version "1.2.1")
702 (source
703 (origin
704 (method url-fetch)
705 (uri (pypi-uri "clyent" version))
706 (sha256
707 (base32
708 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
709 (build-system python-build-system)
710 (native-inputs
711 `(("python-mock" ,python-mock)))
712 (home-page "https://github.com/Anaconda-Platform/clyent")
713 (synopsis "Command line client library")
714 (description "Clyent is a Python command line utility library. It is used
715 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
716 (license license:bsd-3)))
717
718 (define-public python2-clyent
719 (package-with-python2 python-clyent))
720
721 (define-public python-babel
722 (package
723 (name "python-babel")
724 (version "2.9.0")
725 (source
726 (origin
727 (method url-fetch)
728 (uri (pypi-uri "Babel" version))
729 (sha256
730 (base32
731 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
732 (build-system python-build-system)
733 (native-inputs
734 `(("python-freezegun" ,python-freezegun)
735 ("python-pytest" ,python-pytest)))
736 (propagated-inputs
737 `(("python-pytz" ,python-pytz)))
738 (arguments
739 `(#:phases (modify-phases %standard-phases
740 (replace 'check
741 (lambda _
742 (invoke "pytest" "-vv"))))))
743 (home-page "http://babel.pocoo.org/")
744 (synopsis
745 "Tools for internationalizing Python applications")
746 (description
747 "Babel is composed of two major parts:
748 - tools to build and work with gettext message catalogs
749 - a Python interface to the CLDR (Common Locale Data Repository), providing
750 access to various locale display names, localized number and date formatting,
751 etc. ")
752 (license license:bsd-3)))
753
754 (define-public python2-babel
755 (package-with-python2 python-babel))
756
757 (define-public python2-backport-ssl-match-hostname
758 (package
759 (name "python2-backport-ssl-match-hostname")
760 (version "3.5.0.1")
761 (source
762 (origin
763 (method url-fetch)
764 (uri (pypi-uri "backports.ssl_match_hostname" version))
765 (sha256
766 (base32
767 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
768 (build-system python-build-system)
769 (arguments
770 `(#:python ,python-2
771 #:tests? #f)) ; no test target
772 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
773 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
774 (description
775 "This backport brings the ssl.match_hostname() function to users of
776 earlier versions of Python. The function checks the hostname in the
777 certificate returned by the server to which a connection has been established,
778 and verifies that it matches the intended target hostname.")
779 (license license:psfl)))
780
781 (define-public python-bidict
782 (package
783 (name "python-bidict")
784 (version "0.21.2")
785 (source
786 (origin
787 (method url-fetch)
788 (uri (pypi-uri "bidict" version))
789 (sha256
790 (base32
791 "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
792 (build-system python-build-system)
793 (native-inputs
794 `(("python-coverage" ,python-coverage)
795 ("python-hypothesis" ,python-hypothesis-5.23) ; use_true_random=... from >=5.19.0
796 ("python-pre-commit" ,python-pre-commit)
797 ("python-py" ,python-py)
798 ("python-pytest" ,python-pytest)
799 ("python-pytest-benchmark" ,python-pytest-benchmark)
800 ("python-pytest-cov" ,python-pytest-cov)
801 ("python-setuptools-scm" ,python-setuptools-scm)
802 ("python-sortedcollections" ,python-sortedcollections)
803 ("python-sortedcontainers" ,python-sortedcontainers)
804 ("python-sphinx" ,python-sphinx)
805 ("python-sphinx-autodoc-typehints" ,python-sphinx-autodoc-typehints)
806 ("python-tox" ,python-tox)))
807 (arguments
808 `(#:phases (modify-phases %standard-phases
809 (add-after 'unpack 'relax-reqs
810 (lambda _
811 (substitute* "setup.py"
812 (("sortedcollections < 2") "sortedcollections"))
813 #t))
814 (replace 'check
815 (lambda _ (invoke "./run_tests.py"))))))
816 (home-page "https://bidict.readthedocs.io")
817 (synopsis "Bidirectional mapping library")
818 (description "The @code{bidict} library provides several data structures
819 for working with bidirectional mappings in Python.")
820 (license license:mpl2.0)))
821
822 (define-public python-bitarray
823 (package
824 (name "python-bitarray")
825 (version "1.4.0")
826 (source (origin
827 (method url-fetch)
828 (uri (pypi-uri "bitarray" version))
829 (sha256
830 (base32
831 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
832 (build-system python-build-system)
833 (home-page "https://github.com/ilanschnell/bitarray")
834 (synopsis "Efficient arrays of booleans")
835 (description "This package provides an object type which efficiently
836 represents an array of booleans. Bitarrays are sequence types and behave very
837 much like usual lists. Eight bits are represented by one byte in a contiguous
838 block of memory. The user can select between two representations:
839 little-endian and big-endian. All of the functionality is implemented in C.
840 Methods for accessing the machine representation are provided. This can be
841 useful when bit level access to binary files is required, such as portable
842 bitmap image files. Also, when dealing with compressed data which uses
843 variable bit length encoding, you may find this module useful.")
844 (license license:psfl)))
845
846 (define-public python-boolean.py
847 (package
848 (name "python-boolean.py")
849 (version "3.6")
850 (source
851 (origin
852 ;; There's no source tarball on PyPI.
853 (method git-fetch)
854 (uri (git-reference
855 (url "https://github.com/bastikr/boolean.py")
856 (commit (string-append "v" version))))
857 (file-name (git-file-name name version))
858 (sha256
859 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
860 (build-system python-build-system)
861 (home-page "https://github.com/bastikr/boolean.py")
862 (synopsis "Boolean algebra in one Python module")
863 (description
864 "This is a small Python library that implements boolean algebra.
865 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
866 @code{Symbol} class that can take on one of these two values. Calculations
867 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
868 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
869 Expressions are constructed from parsed strings or directly in Python.")
870 (license license:bsd-2)))
871
872 (define-public python-hdf4
873 (package
874 (name "python-hdf4")
875 (version "0.9")
876 (source
877 (origin
878 (method url-fetch)
879 (uri (pypi-uri name version))
880 (sha256
881 (base32
882 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
883 (build-system python-build-system)
884 (native-inputs `(("nose" ,python-nose)))
885 (propagated-inputs `(("numpy" ,python-numpy)))
886 (inputs
887 `(("hdf4" ,hdf4)
888 ("libjpeg" ,libjpeg-turbo)
889 ("zlib" ,zlib)))
890 (arguments
891 `(#:phases
892 (modify-phases %standard-phases
893 (replace 'check
894 (lambda _
895 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
896 ;; on to import numpy. Somehow this works on their CI system.
897 ;; Let's just manage PYTHONPATH here instead.
898 (substitute* "runexamples.sh"
899 (("export PYTHONPATH=.*") ""))
900 (setenv "PYTHONPATH"
901 (string-append (getcwd) ":"
902 (getenv "PYTHONPATH")))
903 (invoke "./runexamples.sh")
904 (invoke "nosetests" "-v"))))))
905 (home-page "https://github.com/fhs/python-hdf4")
906 (synopsis "Python interface to the NCSA HDF4 library")
907 (description
908 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
909 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
910 NetCDF files can also be read and modified. Python-HDF4 is a fork of
911 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
912 (license license:expat)))
913
914 (define-public python2-hdf4
915 (package-with-python2 python-hdf4))
916
917 (define-public python-h5py
918 (package
919 (name "python-h5py")
920 (version "2.10.0")
921 (source
922 (origin
923 (method url-fetch)
924 (uri (pypi-uri "h5py" version))
925 (sha256
926 (base32
927 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
928 (build-system python-build-system)
929 (arguments
930 `(#:tests? #f ; no test target
931 #:phases
932 (modify-phases %standard-phases
933 (add-after 'unpack 'fix-hdf5-paths
934 (lambda* (#:key inputs #:allow-other-keys)
935 (let ((prefix (assoc-ref inputs "hdf5")))
936 (substitute* "setup_build.py"
937 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
938 (string-append "['" prefix "/lib" "']"))
939 (("'/opt/local/include', '/usr/local/include'")
940 (string-append "'" prefix "/include" "'")))
941 (substitute* "setup_configure.py"
942 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
943 (string-append "['" prefix "/lib" "']")))
944 #t))))))
945 (propagated-inputs
946 `(("python-six" ,python-six)
947 ("python-numpy" ,python-numpy)))
948 (inputs
949 `(("hdf5" ,hdf5-1.10)))
950 (native-inputs
951 `(("python-cython" ,python-cython)
952 ("python-pkgconfig" ,python-pkgconfig)
953 ("pkg-config" ,pkg-config)))
954 (home-page "https://www.h5py.org/")
955 (synopsis "Read and write HDF5 files from Python")
956 (description
957 "The h5py package provides both a high- and low-level interface to the
958 HDF5 library from Python. The low-level interface is intended to be a
959 complete wrapping of the HDF5 API, while the high-level component supports
960 access to HDF5 files, datasets and groups using established Python and NumPy
961 concepts.")
962 (license license:bsd-3)))
963
964 (define-public python2-h5py
965 (package-with-python2 python-h5py))
966
967 (define-public python-sh
968 (package
969 (name "python-sh")
970 (version "1.12.14")
971 (source
972 (origin
973 (method url-fetch)
974 (uri (pypi-uri "sh" version))
975 (sha256
976 (base32
977 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
978 (build-system python-build-system)
979 (arguments
980 '(#:phases
981 (modify-phases %standard-phases
982 (replace 'check
983 (lambda _
984 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
985 (setenv "HOME" "/tmp")
986 (invoke "python" "sh.py" "test"))))))
987 (native-inputs
988 `(("python-coverage" ,python-coverage)))
989 (home-page "https://github.com/amoffat/sh")
990 (synopsis "Python subprocess replacement")
991 (description "This package provides a replacement for Python's
992 @code{subprocess} feature.")
993 (license license:expat)))
994
995 (define-public python-cftime
996 (package
997 (name "python-cftime")
998 (version "1.0.4.2")
999 (source
1000 (origin
1001 (method url-fetch)
1002 (uri (pypi-uri "cftime" version))
1003 (sha256
1004 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
1005 (build-system python-build-system)
1006 (propagated-inputs
1007 `(("python-numpy" ,python-numpy)))
1008 (native-inputs
1009 `(("python-coveralls" ,python-coveralls)
1010 ("python-cython" ,python-cython)
1011 ("python-pytest-cov" ,python-pytest-cov)))
1012 (home-page "https://github.com/Unidata/cftime")
1013 (synopsis "Library for time handling")
1014 (description
1015 "This package provides time-handling functionality that used to be part
1016 of the netcdf4 package before.")
1017 ;; This package claims to include code under the GPLv3 but is released
1018 ;; under ISC.
1019 (license (list license:isc license:gpl3+))))
1020
1021 (define-public python-netcdf4
1022 (package
1023 (name "python-netcdf4")
1024 (version "1.5.3")
1025 (source
1026 (origin
1027 (method url-fetch)
1028 (uri (pypi-uri "netCDF4" version))
1029 (sha256
1030 (base32
1031 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1032 (build-system python-build-system)
1033 (arguments
1034 '(#:phases
1035 (modify-phases %standard-phases
1036 (add-after 'unpack 'configure-locations
1037 (lambda* (#:key inputs #:allow-other-keys)
1038 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1039 #t)))))
1040 (native-inputs
1041 `(("python-cython" ,python-cython)))
1042 (propagated-inputs
1043 `(("python-numpy" ,python-numpy)
1044 ("python-cftime" ,python-cftime)))
1045 (inputs
1046 `(("netcdf" ,netcdf)
1047 ("hdf4" ,hdf4)
1048 ("hdf5" ,hdf5)))
1049 (home-page "https://github.com/Unidata/netcdf4-python")
1050 (synopsis "Python/numpy interface to the netCDF library")
1051 (description "Netcdf4-python is a Python interface to the netCDF C
1052 library. netCDF version 4 has many features not found in earlier
1053 versions of the library and is implemented on top of HDF5. This module
1054 can read and write files in both the new netCDF 4 and the old netCDF 3
1055 format, and can create files that are readable by HDF5 clients. The
1056 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1057 to users of that module.")
1058 ;; The software is mainly ISC, but includes some files covered
1059 ;; by the Expat license.
1060 (license (list license:isc license:expat))))
1061
1062 (define-public python-license-expression
1063 (package
1064 (name "python-license-expression")
1065 (version "1.2")
1066 (source
1067 (origin
1068 (method url-fetch)
1069 (uri (pypi-uri "license-expression" version))
1070 (sha256
1071 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1072 (build-system python-build-system)
1073 (propagated-inputs
1074 `(("python-boolean.py" ,python-boolean.py)))
1075 (home-page "https://github.com/nexB/license-expression")
1076 (synopsis "Apply boolean logic to license expressions")
1077 (description
1078 "This Python module defines a tiny language to evaluate and compare
1079 license expressions using boolean logic. Logical combinations of licenses can
1080 be tested for equality, containment, and equivalence. They can be normalised
1081 and simplified. It supports SPDX license expressions as well as other naming
1082 conventions and aliases in the same expression.")
1083 (license license:gpl2+)))
1084
1085 (define-public python-lockfile
1086 (package
1087 (name "python-lockfile")
1088 (version "0.12.2")
1089 (source
1090 (origin
1091 (method url-fetch)
1092 (uri (pypi-uri "lockfile" version))
1093 (sha256
1094 (base32
1095 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1096 (build-system python-build-system)
1097 (arguments '(#:test-target "check"))
1098 (native-inputs
1099 `(("python-pbr" ,python-pbr)))
1100 (home-page "https://launchpad.net/pylockfile")
1101 (synopsis "Platform-independent file locking module")
1102 (description
1103 "The lockfile package exports a LockFile class which provides a simple
1104 API for locking files.")
1105 (license license:expat)))
1106
1107 (define-public python-filelock
1108 (package
1109 (name "python-filelock")
1110 (version "3.0.12")
1111 (source
1112 (origin
1113 (method url-fetch)
1114 (uri (pypi-uri "filelock" version))
1115 (sha256
1116 (base32
1117 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1118 (build-system python-build-system)
1119 (home-page
1120 "https://github.com/benediktschmitt/py-filelock")
1121 (synopsis "Platform independent file lock")
1122 (description "@code{filelock} contains a single module implementing
1123 a platform independent file lock in Python, which provides a simple way of
1124 inter-process communication.")
1125 (license license:unlicense)))
1126
1127 (define-public python-semantic-version
1128 (package
1129 (name "python-semantic-version")
1130 (version "2.8.5")
1131 (source
1132 (origin
1133 (method url-fetch)
1134 (uri (pypi-uri "semantic_version" version))
1135 (sha256
1136 (base32
1137 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1138 (build-system python-build-system)
1139 (home-page "https://github.com/rbarrois/python-semanticversion")
1140 (synopsis "Semantic versioning module for Python")
1141 (description
1142 "The @code{semantic_version} class is a small library for handling
1143 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1144
1145 It can compare versions, generate a new version that represents a bump in one of
1146 the version levels, and check whether any given string is a proper semantic
1147 version identifier.")
1148 (license license:bsd-3)))
1149
1150 (define-public python2-semantic-version
1151 (package-with-python2 python-semantic-version))
1152
1153 (define-public python-serpent
1154 (package
1155 (name "python-serpent")
1156 (version "1.28")
1157 (source
1158 (origin
1159 (method url-fetch)
1160 (uri (pypi-uri "serpent" version))
1161 (sha256
1162 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1163 (build-system python-build-system)
1164 (native-inputs
1165 `(("python-attrs" ,python-attrs)
1166 ("python-pytz" ,python-pytz)))
1167 (home-page "https://github.com/irmen/Serpent")
1168 (synopsis "Serializer for literal Python expressions")
1169 (description
1170 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1171 serialization. It serializes an object tree into bytes (an utf-8 encoded
1172 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1173 to rebuild the original object tree.
1174
1175 Because only safe literals are encoded, it is safe to send serpent data to
1176 other machines, such as over the network.")
1177 (properties `((python2-variant . ,(delay python2-serpent))))
1178 (license license:expat)))
1179
1180 (define-public python2-serpent
1181 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1182 (package/inherit base
1183 (propagated-inputs
1184 `(("python-enum34" ,python2-enum34)
1185 ,@(package-propagated-inputs base))))))
1186
1187 (define-public python-setuptools
1188 (package
1189 (name "python-setuptools")
1190 (version "52.0.0")
1191 (source
1192 (origin
1193 (method url-fetch)
1194 (uri (pypi-uri "setuptools" version))
1195 (sha256
1196 (base32
1197 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1198 (modules '((guix build utils)))
1199 (snippet
1200 '(begin
1201 ;; Remove included binaries which are used to build self-extracting
1202 ;; installers for Windows.
1203 ;; TODO: Find some way to build them ourself so we can include them.
1204 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1205 #t))))
1206 (build-system python-build-system)
1207 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1208 ;; One could bootstrap with an internal untested setuptools.
1209 (arguments
1210 `(#:tests? #f))
1211 (home-page "https://pypi.org/project/setuptools/")
1212 (synopsis
1213 "Library designed to facilitate packaging Python projects")
1214 (description
1215 "Setuptools is a fully-featured, stable library designed to facilitate
1216 packaging Python projects, where packaging includes:
1217 Python package and module definitions,
1218 distribution package metadata,
1219 test hooks,
1220 project installation,
1221 platform-specific details,
1222 Python 3 support.")
1223 ;; TODO: setuptools now bundles the following libraries:
1224 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1225 (license (list license:psfl ; setuptools itself
1226 license:expat ; six, appdirs, pyparsing
1227 license:asl2.0 ; packaging is dual ASL2/BSD-2
1228 license:bsd-2))
1229 (properties `((python2-variant . ,(delay python2-setuptools))))))
1230
1231 ;; Newer versions of setuptools no longer support Python 2.
1232 (define-public python2-setuptools
1233 (package
1234 (name "python2-setuptools")
1235 (version "41.0.1")
1236 (source
1237 (origin
1238 (method url-fetch)
1239 (uri (pypi-uri "setuptools" version ".zip"))
1240 (sha256
1241 (base32
1242 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1243 (modules '((guix build utils)))
1244 (snippet
1245 '(begin
1246 ;; Remove included binaries which are used to build self-extracting
1247 ;; installers for Windows.
1248 ;; TODO: Find some way to build them ourself so we can include them.
1249 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1250 #t))))
1251 (build-system python-build-system)
1252 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1253 ;; One could bootstrap with an internal untested setuptools.
1254 (arguments
1255 `(#:tests? #f))
1256 (native-inputs
1257 `(("unzip" ,unzip)))
1258 (home-page "https://pypi.org/project/setuptools/")
1259 (synopsis
1260 "Library designed to facilitate packaging Python projects")
1261 (description
1262 "Setuptools is a fully-featured, stable library designed to facilitate
1263 packaging Python projects, where packaging includes:
1264 Python package and module definitions,
1265 distribution package metadata,
1266 test hooks,
1267 project installation,
1268 platform-specific details,
1269 Python 3 support.")
1270 ;; TODO: setuptools now bundles the following libraries:
1271 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1272 (license (list license:psfl ; setuptools itself
1273 license:expat ; six, appdirs, pyparsing
1274 license:asl2.0 ; packaging is dual ASL2/BSD-2
1275 license:bsd-2))))
1276
1277 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1278 (define-public python-setuptools-for-tensorflow
1279 (hidden-package
1280 (package
1281 (inherit python-setuptools)
1282 (version "39.1.0")
1283 (source (origin
1284 (inherit (package-source python-setuptools))
1285 (uri (pypi-uri "setuptools" version ".zip"))
1286 (sha256
1287 (base32
1288 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1289
1290 (define-public python-uniseg
1291 (package
1292 (name "python-uniseg")
1293 (version "0.7.1")
1294 (source
1295 (origin
1296 (method url-fetch)
1297 (uri (pypi-uri "uniseg" version ".zip"))
1298 (sha256
1299 (base32
1300 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1301 (build-system python-build-system)
1302 (arguments
1303 '(#:tests? #f)) ; The test suite requires network access.
1304 (native-inputs
1305 `(("unzip" ,unzip)))
1306 (home-page
1307 "https://bitbucket.org/emptypage/uniseg-python")
1308 (synopsis
1309 "Python library to determine Unicode text segmentations")
1310 (description
1311 "Uniseg is a Python package used to determine Unicode text segmentations.
1312 Supported segmentations include:
1313 @enumerate
1314 @item @dfn{Code point} (any value in the Unicode codespace)
1315 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1316 multiple Unicode code points, e.g. \"G\" + acute-accent)
1317 @item Word break
1318 @item Sentence break
1319 @item Line break
1320 @end enumerate")
1321 (license license:expat)))
1322
1323 (define-public python2-uniseg
1324 (package-with-python2 python-uniseg))
1325
1326 (define-public python-humanfriendly
1327 (package
1328 (name "python-humanfriendly")
1329 (version "8.2")
1330 (source
1331 (origin
1332 (method url-fetch)
1333 (uri (pypi-uri "humanfriendly" version))
1334 (sha256
1335 (base32
1336 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1337 (build-system python-build-system)
1338 (arguments
1339 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1340 #:tests? #f))
1341 (home-page "https://humanfriendly.readthedocs.io")
1342 (synopsis "Human-friendly input and output in Python")
1343 (description
1344 "The functions and classes in @code{humanfriendly} can be used to make
1345 text interfaces more user-friendly. It includes tools to parse and format
1346 numbers, file sizes, and timespans, timers for long-running operations, menus
1347 to allow the user to choose from a list of options, and terminal interaction
1348 helpers.")
1349 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1350 (license license:expat)))
1351
1352 (define-public python2-humanfriendly
1353 (let ((base (package-with-python2
1354 (strip-python2-variant python-humanfriendly))))
1355 (package/inherit base
1356 (propagated-inputs
1357 `(("python2-monotonic" ,python2-monotonic)
1358 ,@(package-propagated-inputs base))))))
1359
1360 (define-public python-textparser
1361 (package
1362 (name "python-textparser")
1363 (version "0.23.0")
1364 (source
1365 (origin
1366 (method url-fetch)
1367 (uri (pypi-uri "textparser" version))
1368 (sha256
1369 (base32
1370 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1371 (build-system python-build-system)
1372 (home-page "https://github.com/eerimoq/textparser")
1373 (synopsis "Fast text parser for Python")
1374 (description "This library provides a text parser written in the Python
1375 language. It aims to be fast.")
1376 (license license:expat)))
1377
1378 (define-public python-aenum
1379 (package
1380 (name "python-aenum")
1381 (version "2.2.4")
1382 (source
1383 (origin
1384 (method url-fetch)
1385 (uri (pypi-uri "aenum" version))
1386 (sha256
1387 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1388 (build-system python-build-system)
1389 (arguments
1390 `(#:phases (modify-phases %standard-phases
1391 (replace 'check
1392 (lambda _
1393 (format #t "current working dir ~s~%" (getcwd))
1394 (setenv "PYTHONPATH"
1395 (string-append ".:" (getenv "PYTHONPATH")))
1396 ;; We must run the test suite module directly, as it
1397 ;; fails to define the 'tempdir' variable in scope for
1398 ;; the tests otherwise
1399 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1400 ;; issues/32/running-tests-with-python-setuppy-test).
1401 (invoke "python3" "aenum/test.py")
1402 ;; This one fails with "NameError: name
1403 ;; 'test_pickle_dump_load' is not defined" (see:
1404 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1405 ;; /error-running-the-test_v3py-test-suite).
1406 ;; (invoke "python3" "aenum/test_v3.py")
1407 #t)))))
1408 (home-page "https://bitbucket.org/stoneleaf/aenum")
1409 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1410 (description "The aenum library includes an @code{Enum} base class, a
1411 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1412 class.")
1413 (license license:bsd-3)))
1414
1415 (define-public python-can
1416 (package
1417 (name "python-can")
1418 (version "3.3.3")
1419 (source
1420 (origin
1421 (method url-fetch)
1422 (uri (pypi-uri "python-can" version))
1423 (sha256
1424 (base32
1425 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1426 (build-system python-build-system)
1427 (arguments
1428 `(#:phases (modify-phases %standard-phases
1429 (add-after 'unpack 'relax-version-requirements
1430 (lambda _
1431 (substitute* "setup.py"
1432 (("mock~=2\\.0") "mock")
1433 (("coverage<5") "coverage")
1434 (("pytest~=4\\.3") "pytest")
1435 (("hypothesis~=4\\.56") "hypothesis"))
1436 #t))
1437 (add-after 'unpack 'fix-broken-tests
1438 ;; The tests try to run two scripts it expects should be
1439 ;; in PATH, but they aren't at this time (see:
1440 ;; https://github.com/hardbyte/python-can/issues/805).
1441 (lambda _
1442 (substitute* "test/test_scripts.py"
1443 (("\"can_logger\\.py --help\"") "")
1444 (("\"can_player\\.py --help\"") ""))
1445 #t)))))
1446 (propagated-inputs
1447 `(("python-aenum" ,python-aenum)
1448 ("python-wrapt" ,python-wrapt)))
1449 (native-inputs
1450 `(("python-codecov" ,python-codecov)
1451 ("python-coverage" ,python-coverage)
1452 ("python-future" ,python-future)
1453 ("python-hypothesis" ,python-hypothesis)
1454 ("python-mock" ,python-mock)
1455 ("python-pyserial" ,python-pyserial)
1456 ("python-pytest" ,python-pytest)
1457 ("python-pytest-cov" ,python-pytest-cov)
1458 ("python-pytest-runner" ,python-pytest-runner)
1459 ("python-pytest-timeout" ,python-pytest-timeout)))
1460 (home-page "https://github.com/hardbyte/python-can")
1461 (synopsis "Controller Area Network (CAN) interface module for Python")
1462 (description "This package defines the @code{can} module, which provides
1463 controller area network (CAN) support for Python developers; providing common
1464 abstractions to different hardware devices, and a suite of utilities for
1465 sending and receiving messages on a CAN bus.")
1466 (license license:lgpl3+)))
1467
1468 (define-public python-caniusepython3
1469 (package
1470 (name "python-caniusepython3")
1471 (version "7.2.0")
1472 (source
1473 (origin
1474 (method url-fetch)
1475 (uri (pypi-uri "caniusepython3" version))
1476 (sha256
1477 (base32
1478 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1479 (build-system python-build-system)
1480 (arguments
1481 `(#:phases (modify-phases %standard-phases
1482 (add-after 'unpack 'relax-requirements
1483 (lambda _
1484 (substitute* "setup.py"
1485 ;; These are for compatibility with Python 2.
1486 ((".*'argparse', 'backports.functools_lru_cache',.*")
1487 ""))
1488 (substitute* "dev_requirements.txt"
1489 ((".*pylint.*") "")) ;not actually required
1490 #t))
1491 (replace 'check
1492 (lambda _
1493 (invoke "py.test" "-k" "not NetworkTests"))))))
1494 (propagated-inputs
1495 `(("python-distlib" ,python-distlib)
1496 ("python-packaging" ,python-packaging)
1497 ("python-requests" ,python-requests)))
1498 (native-inputs
1499 `(("python-mock" ,python-mock)
1500 ("python-pytest" ,python-pytest)))
1501 (home-page "https://github.com/brettcannon/caniusepython3")
1502 (synopsis "Check for Python 3-incompatible Python libraries")
1503 (description "The @command{caniusepython3} command scans your project and
1504 reports the Python 3-incompatible libraries it found. It can also be used as
1505 a library.")
1506 (license license:asl2.0)))
1507
1508 (define-public python-diskcache
1509 (package
1510 (name "python-diskcache")
1511 (version "4.1.0")
1512 (source
1513 (origin
1514 (method url-fetch)
1515 (uri (pypi-uri "diskcache" version))
1516 (sha256
1517 (base32
1518 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1519 (build-system python-build-system)
1520 (arguments
1521 `(#:tests? #f)) ;test suite not included in the release
1522 (home-page "http://www.grantjenks.com/docs/diskcache/")
1523 (synopsis "Disk and file backed cache library")
1524 (description "DiskCache is a disk and file backed persistent cache.")
1525 (license license:asl2.0)))
1526
1527 (define-public python-bitstruct
1528 (package
1529 (name "python-bitstruct")
1530 (version "8.9.0")
1531 (source
1532 (origin
1533 (method url-fetch)
1534 (uri (pypi-uri "bitstruct" version))
1535 (sha256
1536 (base32
1537 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1538 (build-system python-build-system)
1539 (home-page "https://github.com/eerimoq/bitstruct")
1540 (synopsis "Python values to and C bit field structs converter")
1541 (description "This module performs conversions between Python values and C
1542 bit field structs represented as Python byte strings. It is intended to have
1543 a similar interface as the @code{struct} module from Python, but working on
1544 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1545 (license license:expat)))
1546
1547 (define-public python-cantools
1548 (package
1549 (name "python-cantools")
1550 (version "33.1.1")
1551 (source
1552 (origin
1553 ;; We take the sources from the Git repository as the documentation is
1554 ;; not included with the PyPI archive.
1555 (method git-fetch)
1556 (uri (git-reference
1557 (url "https://github.com/eerimoq/cantools")
1558 (commit version)))
1559 (file-name (git-file-name name version))
1560 (sha256
1561 (base32
1562 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1563 (build-system python-build-system)
1564 (arguments
1565 `(#:phases
1566 (modify-phases %standard-phases
1567 (add-after 'build 'build-doc
1568 (lambda _
1569 ;; See: https://github.com/eerimoq/cantools/issues/190.
1570 (substitute* "README.rst"
1571 (("https://github.com/eerimoq/cantools/raw/master\
1572 /docs/monitor.png")
1573 "monitor.png"))
1574 (with-directory-excursion "docs"
1575 (invoke "make" "man" "info"))))
1576 (add-after 'install 'install-doc
1577 (lambda* (#:key outputs #:allow-other-keys)
1578 (let* ((out (assoc-ref outputs "out"))
1579 (info (string-append out "/share/info"))
1580 (man1 (string-append out "/share/man/man1")))
1581 (format #t "CWD: ~s~%" (getcwd))
1582 (install-file "docs/_build/texinfo/cantools.info" info)
1583 (install-file "docs/_build/man/cantools.1" man1)
1584 #t))))))
1585 (native-inputs
1586 `(("sphinx" ,python-sphinx)
1587 ("texinfo" ,texinfo)))
1588 (propagated-inputs
1589 `(("python-bitstruct" ,python-bitstruct)
1590 ("python-can" ,python-can)
1591 ("python-diskcache" ,python-diskcache)
1592 ("python-textparser" ,python-textparser)))
1593 (home-page "https://github.com/eerimoq/cantools")
1594 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1595 (description "This package includes Controller Area Network (CAN) related
1596 tools that can be used to:
1597 @itemize
1598 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1599 @item encode and decode CAN messages
1600 @item multiplex simple and extended signals
1601 @item diagnose DID encoding and decoding
1602 @item dump the CAN decoder output
1603 @item test CAN nodes
1604 @item generate C source code
1605 @item monitor the CAN bus
1606 @end itemize")
1607 (license license:expat)))
1608
1609 (define-public python-capturer
1610 (package
1611 (name "python-capturer")
1612 (version "2.4")
1613 (source
1614 (origin
1615 (method url-fetch)
1616 (uri (pypi-uri "capturer" version))
1617 (sha256
1618 (base32
1619 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1620 (build-system python-build-system)
1621 (arguments
1622 `(#:tests? #f))
1623 (propagated-inputs
1624 `(("python-humanfriendly" ,python-humanfriendly)))
1625 (home-page "https://capturer.readthedocs.io")
1626 (synopsis "Capture stdout and stderr streams of the current process")
1627 (description
1628 "The capturer package makes it easy to capture the stdout and stderr
1629 streams of the current process and subprocesses. Output can be relayed
1630 to the terminal in real time but is also available to the Python program
1631 for additional processing.")
1632 (license license:expat)))
1633
1634 (define-public python2-capturer
1635 (package-with-python2 python-capturer))
1636
1637 (define-public python-case
1638 (package
1639 (name "python-case")
1640 (version "1.5.3")
1641 (source
1642 (origin
1643 (method url-fetch)
1644 (uri (pypi-uri "case" version))
1645 (sha256
1646 (base32
1647 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1648 (build-system python-build-system)
1649 (propagated-inputs
1650 `(("python-mock" ,python-mock)
1651 ("python-nose" ,python-nose)
1652 ("python-six" ,python-six)
1653 ("python-unittest2" ,python-unittest2)))
1654 (native-inputs
1655 `(("python-coverage" ,python-coverage)))
1656 (home-page "https://github.com/celery/case")
1657 (synopsis "Unittest utilities and convenience methods")
1658 (description
1659 "The @code{case} package provides utilities on top of unittest, including
1660 some helpful Python 2 compatibility convenience methods.")
1661 (license license:bsd-3)))
1662
1663 (define-public python-verboselogs
1664 (package
1665 (name "python-verboselogs")
1666 (version "1.7")
1667 (source
1668 (origin
1669 (method url-fetch)
1670 (uri (pypi-uri "verboselogs" version))
1671 (sha256
1672 (base32
1673 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1674 (build-system python-build-system)
1675 (arguments
1676 `(#:phases
1677 (modify-phases %standard-phases
1678 (replace 'check
1679 (lambda _
1680 ;; Do not run pylint plugin test, as astroid is an old
1681 ;; unsupported version.
1682 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1683 "verboselogs/tests.py"))))))
1684 (native-inputs
1685 `(("python-mock" ,python-mock)
1686 ("python-pytest" ,python-pytest)))
1687 (home-page "https://verboselogs.readthedocs.io")
1688 (synopsis "Verbose logging level for Python's logging module")
1689 (description
1690 "The @code{verboselogs} package extends Python's @code{logging} module to
1691 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1692 (license license:expat)))
1693
1694 (define-public python2-verboselogs
1695 (package-with-python2 python-verboselogs))
1696
1697 (define-public python-coloredlogs
1698 (package
1699 (name "python-coloredlogs")
1700 (version "10.0")
1701 (source
1702 (origin
1703 (method url-fetch)
1704 (uri (pypi-uri "coloredlogs" version))
1705 (sha256
1706 (base32
1707 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1708 (build-system python-build-system)
1709 (arguments
1710 `(;Tests require some updated modules
1711 #:tests? #f))
1712 (propagated-inputs
1713 `(("python-capturer" ,python-capturer)))
1714 (home-page "https://coloredlogs.readthedocs.io")
1715 (synopsis "Colored stream handler for Python's logging module")
1716 (description
1717 "The @code{coloredlogs} package enables colored terminal output for
1718 Python's logging module. The @code{ColoredFormatter} class inherits from
1719 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1720 messages in color.")
1721 (license license:expat)))
1722
1723 (define-public python2-coloredlogs
1724 (package-with-python2 python-coloredlogs))
1725
1726 (define-public python-editorconfig
1727 (package
1728 (name "python-editorconfig")
1729 (version "0.12.2")
1730 (source
1731 (origin
1732 (method url-fetch)
1733 (uri (pypi-uri "EditorConfig" version))
1734 (sha256
1735 (base32
1736 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1737 (build-system python-build-system)
1738 (home-page "https://editorconfig.org/")
1739 (synopsis "EditorConfig bindings for python")
1740 (description "The EditorConfig project consists of a file format for
1741 defining coding styles and a collection of text editor plugins that enable
1742 editors to read the file format and adhere to defined styles. EditorConfig
1743 files are easily readable and they work nicely with version control systems.")
1744 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1745 (license (list license:bsd-2 license:psfl))))
1746
1747 (define-public dosage
1748 (package
1749 (name "dosage")
1750 (version "2.17")
1751 (source
1752 (origin
1753 (method url-fetch)
1754 (uri (pypi-uri "dosage" version))
1755 (sha256
1756 (base32
1757 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1758 (build-system python-build-system)
1759 (propagated-inputs
1760 `(("python2-backports-functools-lru-cache"
1761 ,python2-backports-functools-lru-cache)
1762 ("python2-backports-shutil-get-terminal-size"
1763 ,python2-backports-shutil-get-terminal-size)
1764 ("python-cached-property" ,python-cached-property)
1765 ("python-colorama" ,python-colorama)
1766 ("python-imagesize" ,python-imagesize)
1767 ("python-importlib-metadata" ,python-importlib-metadata)
1768 ("python-lxml" ,python-lxml)
1769 ("python-requests" ,python-requests)
1770 ("python-six" ,python-six)))
1771 (native-inputs
1772 `(("python-pytest-cov" ,python-pytest-cov)
1773 ("python-pytest-xdist" ,python-pytest-xdist)
1774 ("python-responses" ,python-responses)
1775 ("python-setuptools-scm" ,python-setuptools-scm)))
1776 (home-page "https://github.com/webcomics/dosage")
1777 (synopsis "Comic strip downloader and archiver")
1778 (description "Dosage is designed to keep a local copy of specific webcomics and other
1779 picture-based content such as Picture of the Day sites. With the @command{dosage}
1780 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1781 downloaded, or download a strip for a particular date or index, if possible.")
1782 (license license:expat)))
1783
1784 (define-public python-et-xmlfile
1785 (package
1786 (name "python-et-xmlfile")
1787 (version "1.0.1")
1788 (source
1789 (origin
1790 (method url-fetch)
1791 (uri (pypi-uri "et_xmlfile" version))
1792 (sha256
1793 (base32
1794 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1795 (build-system python-build-system)
1796 (arguments
1797 `(#:phases (modify-phases %standard-phases
1798 (replace 'check
1799 (lambda _
1800 (invoke "pytest"))))))
1801 (native-inputs
1802 `(("python-pytest" ,python-pytest)
1803 ("python-lxml" ,python-lxml))) ;used for the tests
1804 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1805 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1806 (description "This Python library is based upon the @code{xmlfile} module
1807 from @code{lxml}. It aims to provide a low memory, compatible implementation
1808 of @code{xmlfile}.")
1809 (license license:expat)))
1810
1811 (define-public python2-et-xmlfile
1812 (package-with-python2 python-et-xmlfile))
1813
1814 (define-public python-openpyxl
1815 (package
1816 (name "python-openpyxl")
1817 (version "3.0.5")
1818 (source
1819 (origin
1820 ;; We use the upstream repository, as the tests are not included in the
1821 ;; PyPI releases.
1822 (method hg-fetch)
1823 (uri (hg-reference
1824 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1825 (changeset version)))
1826 (file-name (string-append name "-" version "-checkout"))
1827 (sha256
1828 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1829 (build-system python-build-system)
1830 (arguments
1831 `(#:phases (modify-phases %standard-phases
1832 (replace 'check
1833 (lambda _
1834 (invoke "pytest"))))))
1835 (native-inputs
1836 ;; For the test suite.
1837 `(("python-lxml" ,python-lxml)
1838 ("python-pillow" ,python-pillow)
1839 ("python-pytest" ,python-pytest)))
1840 (propagated-inputs
1841 `(("python-et-xmlfile" ,python-et-xmlfile)
1842 ("python-jdcal" ,python-jdcal)))
1843 (home-page "https://openpyxl.readthedocs.io")
1844 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1845 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1846 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1847 standard.")
1848 (properties `((python2-variant . ,(delay python2-openpyxl))))
1849 (license license:expat)))
1850
1851 (define-public python2-openpyxl
1852 (let ((base (package-with-python2
1853 (strip-python2-variant python-openpyxl))))
1854 (package
1855 (inherit base)
1856 ;; This is the latest version that has python2 support
1857 (version "2.6.4")
1858 (source
1859 (origin
1860 (method url-fetch)
1861 (uri (pypi-uri "openpyxl" version))
1862 (sha256
1863 (base32
1864 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1865 (arguments '(#:tests? #f))))) ; No test suite.
1866
1867 (define-public python-eventlet
1868 (package
1869 (name "python-eventlet")
1870 (version "0.25.1")
1871 (source
1872 (origin
1873 (method url-fetch)
1874 (uri (pypi-uri "eventlet" version))
1875 (sha256
1876 (base32
1877 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1878 (build-system python-build-system)
1879 (propagated-inputs
1880 `(("python-dnspython" ,python-dnspython)
1881 ("python-greenlet" ,python-greenlet)
1882 ("python-monotonic" ,python-monotonic)))
1883 (arguments
1884 ;; TODO: Requires unpackaged 'enum-compat'.
1885 '(#:tests? #f))
1886 (home-page "https://eventlet.net")
1887 (synopsis "Concurrent networking library for Python")
1888 (description
1889 "Eventlet is a concurrent networking library for Python that
1890 allows you to change how you run your code, not how you write it.
1891 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1892 Coroutines ensure that the developer uses a blocking style of programming
1893 that is similar to threading, but provide the benefits of non-blocking I/O.
1894 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1895 from the Python interpreter, or as a small part of a larger application.")
1896 (license license:expat)))
1897
1898 (define-public python-six
1899 (package
1900 (name "python-six")
1901 (version "1.14.0")
1902 (source
1903 (origin
1904 (method url-fetch)
1905 (uri (pypi-uri "six" version))
1906 (sha256
1907 (base32
1908 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1909 (build-system python-build-system)
1910 (arguments
1911 `(#:phases
1912 (modify-phases %standard-phases
1913 (replace 'check
1914 (lambda _
1915 (invoke "py.test" "-v"))))))
1916 (native-inputs
1917 `(("python-pytest" ,python-pytest-bootstrap)))
1918 (home-page "https://pypi.org/project/six/")
1919 (synopsis "Python 2 and 3 compatibility utilities")
1920 (description
1921 "Six is a Python 2 and 3 compatibility library. It provides utility
1922 functions for smoothing over the differences between the Python versions with
1923 the goal of writing Python code that is compatible on both Python versions.
1924 Six supports every Python version since 2.5. It is contained in only one
1925 Python file, so it can be easily copied into your project.")
1926 (license license:x11)))
1927
1928 (define-public python2-six
1929 (package-with-python2 python-six))
1930
1931 (define-public python-six-bootstrap
1932 (package
1933 (inherit python-six)
1934 (name "python-six-bootstrap")
1935 (native-inputs `())
1936 (arguments `(#:tests? #f))))
1937
1938 (define-public python2-six-bootstrap
1939 (package-with-python2 python-six-bootstrap))
1940
1941 (define-public python-schedule
1942 (package
1943 (name "python-schedule")
1944 (version "0.4.3")
1945 (source
1946 (origin
1947 (method url-fetch)
1948 (uri (pypi-uri "schedule" version))
1949 (sha256
1950 (base32
1951 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1952 (build-system python-build-system)
1953 (native-inputs
1954 `(("python-pytest" ,python-pytest)
1955 ("python-mock" ,python-mock)))
1956 (home-page "https://github.com/dbader/schedule")
1957 (synopsis "Schedule periodic function calls in Python")
1958 (description
1959 "Schedule is an in-process scheduler for periodic jobs that uses the
1960 builder pattern for configuration. Schedule lets you run Python functions (or
1961 any other callable) periodically at pre-determined intervals using a simple,
1962 human-friendly syntax.")
1963 (license license:expat)))
1964
1965 (define-public python2-schedule
1966 (package-with-python2 python-schedule))
1967
1968 (define-public python-scour
1969 (package
1970 (name "python-scour")
1971 (version "038.1")
1972 (source
1973 (origin
1974 (method git-fetch)
1975 (uri
1976 (git-reference
1977 (url "https://github.com/scour-project/scour")
1978 (commit
1979 (string-append "v" version))))
1980 (file-name (git-file-name name version))
1981 (sha256
1982 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1983 (propagated-inputs
1984 `(("python-six" ,python-six)))
1985 (build-system python-build-system)
1986 (home-page "https://github.com/scour-project/scour")
1987 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1988 (description "The goal of Scour is to output a file that renders
1989 identically at a fraction of the size by removing a lot of redundant
1990 information created by most SVG editors. Optimization options are typically
1991 lossless but can be tweaked for more aggressive cleaning.")
1992 (license license:asl2.0)))
1993
1994 (define-public python-mechanize
1995 (package
1996 (name "python-mechanize")
1997 (version "0.4.5")
1998 (source
1999 (origin
2000 (method url-fetch)
2001 (uri (pypi-uri "mechanize" version))
2002 (sha256
2003 (base32
2004 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2005 (build-system python-build-system)
2006 (propagated-inputs
2007 `(("python-html5lib" ,python-html5lib)))
2008 (home-page "https://github.com/python-mechanize/mechanize")
2009 (synopsis
2010 "Stateful programmatic web browsing in Python")
2011 (description
2012 "Mechanize implements stateful programmatic web browsing in Python,
2013 after Andy Lester’s Perl module WWW::Mechanize.")
2014 (license license:bsd-3)))
2015
2016 (define-public python2-mechanize
2017 (package-with-python2 python-mechanize))
2018
2019 (define-public python-simpleaudio
2020 (package
2021 (name "python-simpleaudio")
2022 (version "1.0.4")
2023 (source
2024 (origin
2025 (method url-fetch)
2026 (uri (pypi-uri "simpleaudio" version))
2027 (sha256
2028 (base32
2029 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2030 (build-system python-build-system)
2031 (arguments
2032 `(#:tests? #f))
2033 (inputs
2034 `(("alsa-lib" ,alsa-lib)))
2035 (home-page
2036 "https://github.com/hamiltron/py-simple-audio")
2037 (synopsis "Simple, asynchronous audio playback for Python 3")
2038 (description
2039 "The @code{simplaudio} package provides cross-platform, dependency-free
2040 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2041 (license license:expat))) ; MIT license
2042
2043 (define-public python-simplejson
2044 (package
2045 (name "python-simplejson")
2046 (version "3.17.0")
2047 (source
2048 (origin
2049 (method url-fetch)
2050 (uri (pypi-uri "simplejson" version))
2051 (sha256
2052 (base32
2053 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
2054 (build-system python-build-system)
2055 (home-page "http://simplejson.readthedocs.org/en/latest/")
2056 (synopsis
2057 "Json library for Python")
2058 (description
2059 "JSON (JavaScript Object Notation) is a subset of JavaScript
2060 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2061 format.
2062
2063 Simplejson exposes an API familiar to users of the standard library marshal
2064 and pickle modules. It is the externally maintained version of the json
2065 library contained in Python 2.6, but maintains compatibility with Python 2.5
2066 and (currently) has significant performance advantages, even without using
2067 the optional C extension for speedups. Simplejson is also supported on
2068 Python 3.3+.")
2069 (license license:x11)))
2070
2071 (define-public python2-simplejson
2072 (package-with-python2 python-simplejson))
2073
2074
2075 (define-public python-pyicu
2076 (package
2077 (name "python-pyicu")
2078 (version "2.4.3")
2079 (source
2080 (origin
2081 (method url-fetch)
2082 (uri (pypi-uri "PyICU" version))
2083 (sha256
2084 (base32
2085 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
2086 (build-system python-build-system)
2087 (inputs
2088 `(("icu4c" ,icu4c)))
2089 (native-inputs
2090 `(("python-pytest" ,python-pytest)
2091 ("python-six" ,python-six)))
2092 (home-page "https://github.com/ovalhub/pyicu")
2093 (synopsis "Python extension wrapping the ICU C++ API")
2094 (description
2095 "PyICU is a python extension wrapping the ICU C++ API.")
2096 (license license:x11)))
2097
2098 (define-public python2-pyicu
2099 (package-with-python2 python-pyicu))
2100
2101 (define-public python-dogtail
2102 (package
2103 (name "python-dogtail")
2104 (version "0.9.11")
2105 (source (origin
2106 (method url-fetch)
2107 (uri
2108 (string-append
2109 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2110 "dogtail-" version ".tar.gz"))
2111 (sha256
2112 (base32
2113 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2114 (build-system python-build-system)
2115 (arguments
2116 `(#:tests? #f ; TODO Launching dbus for the tests
2117 ; fails
2118 #:phases
2119 (modify-phases %standard-phases
2120 (replace 'check
2121 (lambda* (#:key tests? #:allow-other-keys)
2122 (when tests?
2123 (system "Xvfb :1 &")
2124 (setenv "DISPLAY" ":1")
2125 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2126 #t)))))
2127 (propagated-inputs
2128 `(("python-pygobject" ,python-pygobject)
2129 ("python-pycairo" ,python-pycairo)
2130 ("python-pyatspi" ,python-pyatspi)))
2131 (native-inputs
2132 `(("python-nose" ,python-nose)
2133 ("gtk+" ,gtk+)
2134 ("xvfb" ,xorg-server)
2135 ("dbus" ,dbus)
2136 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2137 ("gobject-introspection" ,gobject-introspection)))
2138 (home-page "https://gitlab.com/dogtail/dogtail/")
2139 (synopsis "GUI test tool and automation framework written in Python")
2140 (description
2141 "Dogtail is a GUI test tool and automation framework written in Python.
2142 It uses Accessibility (a11y) technologies to communicate with desktop
2143 applications. dogtail scripts are written in Python and executed like any
2144 other Python program.")
2145 (license license:gpl2+)))
2146
2147 (define-public python2-dogtail
2148 (package-with-python2 python-dogtail))
2149
2150 (define-public python-empy
2151 (package
2152 (name "python-empy")
2153 (version "3.3.3")
2154 (source (origin
2155 (method url-fetch)
2156 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2157 version ".tar.gz"))
2158 (sha256
2159 (base32
2160 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2161 (build-system python-build-system)
2162 (arguments
2163 `(#:tests? #f)) ; python2 only
2164 (home-page "http://www.alcyone.com/software/empy/")
2165 (synopsis "Templating system for Python")
2166 (description
2167 "EmPy is a system for embedding Python expressions and statements in
2168 template text; it takes an EmPy source file, processes it, and produces
2169 output. This is accomplished via expansions, which are special signals to the
2170 EmPy system and are set off by a special prefix (by default the at sign, @@).
2171 EmPy can expand arbitrary Python expressions and statements in this way, as
2172 well as a variety of special forms. Textual data not explicitly delimited in
2173 this way is sent unaffected to the output, allowing Python to be used in
2174 effect as a markup language. Also supported are callbacks via hooks,
2175 recording and playback via diversions, and dynamic, chainable filters. The
2176 system is highly configurable via command line options and embedded
2177 commands.")
2178 (license license:lgpl2.1+)))
2179
2180 (define-public python2-empy
2181 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2182 (package/inherit base
2183 (arguments `(,@(package-arguments base)
2184 #:tests? #t)))))
2185
2186 (define-public python2-element-tree
2187 (package
2188 (name "python2-element-tree")
2189 (version "1.2.6")
2190 (source (origin
2191 (method url-fetch)
2192 (uri (string-append
2193 "http://effbot.org/media/downloads/elementtree-"
2194 version "-20050316.tar.gz"))
2195 (sha256
2196 (base32
2197 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2198 (build-system python-build-system)
2199 (arguments
2200 `(#:python ,python-2 ; seems to be part of Python 3
2201 #:tests? #f)) ; no 'test' sub-command
2202 (synopsis "Toolkit for XML processing in Python")
2203 (description
2204 "ElementTree is a Python library supporting lightweight XML processing.")
2205 (home-page "https://effbot.org/zone/element-index.htm")
2206 (license (license:x11-style
2207 "http://docs.python.org/2/license.html"
2208 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2209
2210 (define-public python2-pybugz
2211 (package
2212 (name "python2-pybugz")
2213 (version "0.6.11")
2214 (source (origin
2215 (method url-fetch)
2216 (uri (string-append
2217 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2218 version ".tar.gz"))
2219 (sha256
2220 (base32
2221 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2222 (patches (search-patches "pybugz-stty.patch"
2223 "pybugz-encode-error.patch"))))
2224 (build-system python-build-system)
2225 (arguments
2226 `(#:python ,python-2 ; SyntaxError with Python 3
2227 #:tests? #f)) ; no 'test' sub-command
2228 (propagated-inputs
2229 `(("element-tree" ,python2-element-tree)))
2230 (synopsis "Python and command-line interface to Bugzilla")
2231 (description
2232 "PyBugz is a Python library and command-line tool to query the Bugzilla
2233 bug tracking system. It is meant as an aid to speed up interaction with the
2234 bug tracker.")
2235 (home-page "http://www.liquidx.net/pybugz/")
2236 (license license:gpl2)))
2237
2238 (define-public python2-enum
2239 (package
2240 (name "python2-enum")
2241 (version "0.4.6")
2242 (source (origin
2243 (method url-fetch)
2244 (uri (pypi-uri "enum" version))
2245 (sha256
2246 (base32
2247 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2248 (build-system python-build-system)
2249 (arguments
2250 `(#:python ,python-2))
2251 (home-page "https://pypi.org/project/enum/")
2252 (synopsis "Robust enumerated type support in Python")
2253 (description
2254 "This provides a module for robust enumerations in Python. It has
2255 been superseded by the Python standard library and is provided only for
2256 compatibility.")
2257 ;; Choice of either license.
2258 (license (list license:gpl3+ license:psfl))))
2259
2260 (define-public python-enum34
2261 (package
2262 (name "python-enum34")
2263 (version "1.1.6")
2264 (source
2265 (origin
2266 (method url-fetch)
2267 (uri (pypi-uri "enum34" version))
2268 (sha256
2269 (base32
2270 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2271 (build-system python-build-system)
2272 (home-page "https://pypi.org/project/enum34/")
2273 (synopsis "Backported Python 3.4 Enum")
2274 (description
2275 "Enum34 is the new Python stdlib enum module available in Python 3.4
2276 backported for previous versions of Python from 2.4 to 3.3.")
2277 (license license:bsd-3)))
2278
2279 (define-public python2-enum34
2280 (package-with-python2 python-enum34))
2281
2282 (define-public python-parse-type
2283 (package
2284 (name "python-parse-type")
2285 (version "0.4.2")
2286 (source
2287 (origin
2288 (method url-fetch)
2289 (uri (pypi-uri "parse_type" version))
2290 (sha256
2291 (base32
2292 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2293 (build-system python-build-system)
2294 (propagated-inputs
2295 `(("python-six" ,python-six)
2296 ("python-parse" ,python-parse)))
2297 (native-inputs
2298 `(("python-pytest" ,python-pytest)
2299 ("python-pytest-runner" ,python-pytest-runner)))
2300 (home-page "https://github.com/jenisys/parse_type")
2301 (synopsis "Extended parse module")
2302 (description
2303 "Parse_type extends the python parse module.")
2304 (properties
2305 `((python2-variant . ,(delay python2-parse-type))))
2306 (license license:bsd-3)))
2307
2308 (define-public python2-parse-type
2309 (let ((base (package-with-python2
2310 (strip-python2-variant python-parse-type))))
2311 (package/inherit base
2312 (propagated-inputs
2313 `(("python2-enum34" ,python2-enum34)
2314 ,@(package-propagated-inputs base))))))
2315
2316 (define-public python-parse
2317 (package
2318 (name "python-parse")
2319 (version "1.18.0")
2320 (source
2321 (origin
2322 (method url-fetch)
2323 (uri (pypi-uri "parse" version))
2324 (sha256
2325 (base32
2326 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2327 (build-system python-build-system)
2328 (arguments
2329 `(#:phases
2330 (modify-phases %standard-phases
2331 (replace 'check
2332 (lambda _ (invoke "python" "test_parse.py"))))))
2333 (home-page "https://github.com/r1chardj0n3s/parse")
2334 (synopsis "Parse strings")
2335 (description
2336 "Parse strings using a specification based on the Python @code{format()}
2337 syntax.")
2338 (license license:x11)))
2339
2340 (define-public python-polib
2341 (package
2342 (name "python-polib")
2343 (version "1.1.0")
2344 (source (origin
2345 (method url-fetch)
2346 (uri (pypi-uri "polib" version))
2347 (sha256
2348 (base32
2349 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2350 (build-system python-build-system)
2351 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2352 (synopsis "Manipulate, create and modify gettext files")
2353 (description "Polib can manipulate any gettext format (po, pot and mo)
2354 files. It can be used to create po files from scratch or to modify
2355 existing ones.")
2356 (license license:expat)))
2357
2358 (define-public python2-polib
2359 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2360 (package/inherit base
2361 (arguments `(,@(package-arguments base)
2362 ;; Tests don't work with python2.
2363 #:tests? #f)))))
2364
2365 (define-public python-poyo
2366 (package
2367 (name "python-poyo")
2368 (version "0.5.0")
2369 (source
2370 (origin
2371 (method url-fetch)
2372 (uri (pypi-uri "poyo" version))
2373 (sha256
2374 (base32
2375 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2376 (build-system python-build-system)
2377 (home-page "https://github.com/hackebrot/poyo")
2378 (synopsis "Lightweight YAML Parser for Python")
2379 (description
2380 "This package provides a lightweight YAML Parser for Python. It supports
2381 only a chosen subset of the YAML format that is required to parse cookiecutter
2382 user configuration files. It does not have support for serializing into YAML
2383 and is not compatible with JSON.")
2384 (license license:expat)))
2385
2386 (define-public scons
2387 (package
2388 (name "scons")
2389 (version "3.0.4")
2390 (source (origin
2391 (method git-fetch)
2392 (uri (git-reference
2393 (url "https://github.com/SCons/scons")
2394 (commit version)))
2395 (file-name (git-file-name name version))
2396 (sha256
2397 (base32
2398 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2399 (build-system python-build-system)
2400 (arguments
2401 `(#:use-setuptools? #f ; still relies on distutils
2402 #:tests? #f ; no 'python setup.py test' command
2403 #:phases
2404 (modify-phases %standard-phases
2405 (add-before 'build 'bootstrap
2406 (lambda _
2407 (substitute* "src/engine/SCons/compat/__init__.py"
2408 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2409 "sys.modules[new] = __import__(old)"))
2410 (substitute* "src/engine/SCons/Platform/__init__.py"
2411 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2412 "mod = __import__(full_name)"))
2413 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2414 (chdir "build/scons")
2415 #t)))))
2416 (home-page "https://scons.org/")
2417 (synopsis "Software construction tool written in Python")
2418 (description
2419 "SCons is a software construction tool. Think of SCons as an improved,
2420 cross-platform substitute for the classic Make utility with integrated
2421 functionality similar to autoconf/automake and compiler caches such as ccache.
2422 In short, SCons is an easier, more reliable and faster way to build
2423 software.")
2424 (license license:x11)))
2425
2426 (define-public scons-python2
2427 (package
2428 (inherit (package-with-python2 scons))
2429 (name "scons-python2")))
2430
2431 (define-public python-extension-helpers
2432 (package
2433 (name "python-extension-helpers")
2434 (version "0.1")
2435 (source
2436 (origin
2437 (method url-fetch)
2438 (uri (pypi-uri "extension-helpers" version))
2439 (sha256
2440 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2441 (build-system python-build-system)
2442 (native-inputs
2443 `(("coverage" ,python-coverage)
2444 ("pytest" ,python-pytest-astropy)
2445 ("pytest-cov" ,python-pytest-cov)
2446 ("setuptools-scm" ,python-setuptools-scm)))
2447 (home-page "https://github.com/astropy/astropy-helpers")
2448 (synopsis
2449 "Utilities for building and installing packages in the Astropy ecosystem")
2450 (description
2451 "The extension-helpers package includes many build, installation, and
2452 documentation-related tools used by the Astropy project.")
2453 (license license:bsd-3)))
2454
2455 (define-public python-extras
2456 (package
2457 (name "python-extras")
2458 (version "1.0.0")
2459 (source
2460 (origin
2461 (method url-fetch)
2462 (uri (pypi-uri "extras" version))
2463 (sha256
2464 (base32
2465 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2466 (build-system python-build-system)
2467 (arguments
2468 ;; FIXME: Circular dependency on testtools.
2469 '(#:tests? #f))
2470 (home-page "https://github.com/testing-cabal/extras")
2471 (synopsis "Useful extensions to the Python standard library")
2472 (description
2473 "Extras is a set of extensions to the Python standard library.")
2474 (license license:expat)))
2475
2476 (define-public python2-extras
2477 (package-with-python2 python-extras))
2478
2479 (define-public python-mimeparse
2480 (package
2481 (name "python-mimeparse")
2482 (version "1.6.0")
2483 (source
2484 (origin
2485 (method url-fetch)
2486 (uri (pypi-uri "python-mimeparse" version))
2487 (sha256
2488 (base32
2489 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2490 (build-system python-build-system)
2491 (arguments
2492 '(#:phases
2493 (modify-phases %standard-phases
2494 (replace 'check
2495 (lambda _
2496 (invoke "./mimeparse_test.py"))))))
2497 (home-page
2498 "https://github.com/dbtsai/python-mimeparse")
2499 (synopsis "Python library for parsing MIME types")
2500 (description
2501 "Mimeparse provides basic functions for parsing MIME type names and
2502 matching them against a list of media-ranges.")
2503 (license license:expat)))
2504
2505 (define-public python2-mimeparse
2506 (package-with-python2 python-mimeparse))
2507
2508 (define-public python-miniboa
2509 (package
2510 (name "python-miniboa")
2511 (version "1.0.7")
2512 (source
2513 (origin
2514 (method url-fetch)
2515 (uri (pypi-uri "miniboa" version))
2516 (sha256
2517 (base32
2518 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2519 (build-system python-build-system)
2520 (home-page "https://github.com/shmup/miniboa")
2521 (synopsis "Simple, single-threaded Telnet server")
2522 (description
2523 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2524 server.")
2525 (license license:asl2.0)))
2526
2527 (define-public python2-miniboa
2528 (package-with-python2 python-miniboa))
2529
2530 (define-public python-pafy
2531 (package
2532 (name "python-pafy")
2533 (version "0.5.3.1")
2534 (source
2535 (origin
2536 (method url-fetch)
2537 (uri (pypi-uri "pafy" version))
2538 (sha256
2539 (base32
2540 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2541 (build-system python-build-system)
2542 (arguments
2543 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2544 (propagated-inputs
2545 ;; Youtube-dl is a python package which is imported in the file
2546 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2547 `(("youtube-dl" ,youtube-dl)))
2548 (home-page "https://np1.github.io/pafy/")
2549 (synopsis "Retrieve YouTube content and metadata")
2550 (description
2551 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2552 (license license:lgpl3+)))
2553
2554 (define-public python2-funcsigs
2555 (package
2556 (name "python2-funcsigs")
2557 (version "1.0.2")
2558 (source (origin
2559 (method url-fetch)
2560 (uri (pypi-uri "funcsigs" version))
2561 (sha256
2562 (base32
2563 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2564 (build-system python-build-system)
2565 (arguments
2566 `(#:python ,python-2))
2567 (native-inputs
2568 `(("python2-unittest2" ,python2-unittest2)))
2569 (home-page "http://funcsigs.readthedocs.org")
2570 (synopsis "Python function signatures from PEP362")
2571 (description
2572 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2573 (license license:asl2.0)))
2574
2575 (define-public python2-funcsigs-bootstrap
2576 (package
2577 (inherit python2-funcsigs)
2578 (name "python2-funcsigs-bootstrap")
2579 (native-inputs `())
2580 (arguments
2581 `(#:tests? #f
2582 ,@(package-arguments python2-funcsigs)))))
2583
2584 (define-public python-py
2585 (package
2586 (name "python-py")
2587 (version "1.8.1")
2588 (source
2589 (origin
2590 (method url-fetch)
2591 (uri (pypi-uri "py" version))
2592 (sha256
2593 (base32
2594 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2595 (build-system python-build-system)
2596 (arguments
2597 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2598 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2599 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2600 ;; Is this module globally installed?"
2601 '(#:tests? #f))
2602 (native-inputs
2603 `(("python-setuptools-scm" ,python-setuptools-scm)))
2604 (home-page "https://github.com/pytest-dev/py")
2605 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2606 (description
2607 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2608 code introspection, and logging.")
2609 (license license:expat)))
2610
2611 (define-public python-py-next
2612 (package
2613 (inherit python-py)
2614 (version "1.9.0")
2615 (source
2616 (origin
2617 (method url-fetch)
2618 (uri (pypi-uri "py" version))
2619 (sha256
2620 (base32
2621 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
2622
2623 (define-public python2-py
2624 (package-with-python2 python-py))
2625
2626 ;; Recent versions of python-fixtures and python-testrepository need
2627 ;; python-pbr for packaging, which itself needs these two packages for
2628 ;; testing.
2629 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2630 ;; same source, just without any test dependencies and with tests disabled.
2631 ;; python-pbr-minmal is then used to package python-fixtures and
2632 ;; python-testrepository.
2633 ;; Strictly speaking we currently could remove the test-requirements from the
2634 ;; normal python-pbr package (and save this package) since test are disabled
2635 ;; there anyway. But this may change in future.
2636 (define-public python-pbr-minimal
2637 (package
2638 (name "python-pbr-minimal")
2639 (version "3.0.1")
2640 (source
2641 (origin
2642 (method url-fetch)
2643 (uri (pypi-uri "pbr" version))
2644 (sha256
2645 (base32
2646 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2647 (build-system python-build-system)
2648 (arguments
2649 `(#:tests? #f))
2650 (home-page "https://docs.openstack.org/pbr/latest/")
2651 (synopsis "Minimal build of python-pbr used for bootstrapping")
2652 (description
2653 "Used only for bootstrapping python2-pbr, you should not need this.")
2654 (license license:asl2.0)))
2655
2656 (define-public python-pbr
2657 (package
2658 (inherit python-pbr-minimal)
2659 (name "python-pbr")
2660 (arguments
2661 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2662 (propagated-inputs
2663 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2664 (native-inputs
2665 `(("python-fixtures" ,python-fixtures-bootstrap)
2666 ;; discover, coverage, hacking, subunit
2667 ("python-mock" ,python-mock)
2668 ("python-six" ,python-six)
2669 ("python-sphinx" ,python-sphinx)
2670 ("python-testrepository" ,python-testrepository-bootstrap)
2671 ("python-testresources" ,python-testresources-bootstrap)
2672 ("python-testscenarios" ,python-testscenarios-bootstrap)
2673 ("python-testtools" ,python-testtools-bootstrap)
2674 ("python-virtualenv" ,python-virtualenv)))
2675 (synopsis "Enhance the default behavior of Python’s setuptools")
2676 (description
2677 "Python Build Reasonableness (PBR) is a library that injects some useful
2678 and sensible default behaviors into your setuptools run. It will set
2679 versions, process requirements files and generate AUTHORS and ChangeLog file
2680 from git information.
2681 ")))
2682
2683 (define-public python-pyrsistent
2684 (package
2685 (name "python-pyrsistent")
2686 (version "0.16.0")
2687 (home-page "https://github.com/tobgu/pyrsistent")
2688 (source (origin
2689 (method url-fetch)
2690 (uri (pypi-uri "pyrsistent" version))
2691 (sha256
2692 (base32
2693 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2694 (build-system python-build-system)
2695 (arguments
2696 '(#:phases (modify-phases %standard-phases
2697 ;; The package works fine with newer Pytest and Hypothesis, but
2698 ;; has pinned older versions to stay compatible with Python 2.
2699 (add-before 'check 'loosen-pytest-requirement
2700 (lambda _
2701 (substitute* "setup.py"
2702 (("pytest<5") "pytest")
2703 (("hypothesis<5") "hypothesis"))
2704 #t)))))
2705 (native-inputs
2706 `(("python-hypothesis" ,python-hypothesis)
2707 ("python-pytest" ,python-pytest)
2708 ("python-pytest-runner" ,python-pytest-runner)))
2709 (propagated-inputs
2710 `(("python-six" ,python-six)))
2711 (synopsis "Persistent data structures for Python")
2712 (description
2713 "Pyrsistent is a number of persistent collections (by some referred to as
2714 functional data structures). Persistent in the sense that they are immutable.
2715
2716 All methods on a data structure that would normally mutate it instead return a
2717 new copy of the structure containing the requested updates. The original
2718 structure is left untouched.")
2719 (license license:expat)))
2720
2721 (define-public python2-pyrsistent
2722 (package-with-python2 python-pyrsistent))
2723
2724 (define-public python-exif-read
2725 (package
2726 (name "python-exif-read")
2727 (version "2.1.2")
2728 (source (origin
2729 (method url-fetch)
2730 (uri (pypi-uri "ExifRead" version))
2731 (sha256
2732 (base32
2733 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2734 (build-system python-build-system)
2735 (arguments `(#:tests? #f)) ; no tests
2736 (home-page "https://github.com/ianare/exif-py")
2737 (synopsis "Python library to extract EXIF data from image files")
2738 (description
2739 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2740 files.")
2741 (license license:bsd-3)))
2742
2743 (define-public python2-exif-read
2744 (package-with-python2 python-exif-read))
2745
2746 (define-public python-pyld
2747 (package
2748 (name "python-pyld")
2749 (version "1.0.5")
2750 (source (origin
2751 (method url-fetch)
2752 (uri (pypi-uri "PyLD" version))
2753 (sha256
2754 (base32
2755 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2756 (build-system python-build-system)
2757 (home-page "https://github.com/digitalbazaar/pyld")
2758 (synopsis "Python implementation of the JSON-LD specification")
2759 (description
2760 "PyLD is an implementation of the JSON-LD specification.")
2761 (license license:bsd-3)))
2762
2763 (define-public python2-pyld
2764 (package-with-python2 python-pyld))
2765
2766 (define-public python-cli-helpers
2767 (package
2768 (name "python-cli-helpers")
2769 (version "2.0.1")
2770 (source
2771 (origin
2772 ;; There's no source tarball on PyPI.
2773 (method git-fetch)
2774 (uri (git-reference
2775 (url "https://github.com/dbcli/cli_helpers")
2776 (commit (string-append "v" version))))
2777 (file-name (git-file-name name version))
2778 (sha256
2779 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2780 (build-system python-build-system)
2781 (native-inputs
2782 `(("python-pytest" ,python-pytest)))
2783 (propagated-inputs
2784 `(("python-wcwidth" ,python-wcwidth)
2785 ("python-configobj" ,python-configobj)
2786 ("python-tabulate" ,python-tabulate)
2787 ("python-terminaltables" ,python-terminaltables)))
2788 (home-page "https://github.com/dbcli/cli_helpers")
2789 (synopsis "Helpers for building command-line apps")
2790 (description
2791 "CLI Helpers is a Python package that makes it easy to perform common
2792 tasks when building command-line apps. It's a helper library for command-line
2793 interfaces.")
2794 (license license:bsd-3)))
2795
2796 (define-public python-click
2797 (package
2798 (name "python-click")
2799 (version "7.1.2")
2800 (source
2801 (origin
2802 (method url-fetch)
2803 (uri (pypi-uri "click" version))
2804 (sha256
2805 (base32
2806 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2807 (build-system python-build-system)
2808 (arguments
2809 `(#:phases
2810 (modify-phases %standard-phases
2811 (add-after 'unpack 'fix-paths
2812 (lambda* (#:key inputs #:allow-other-keys)
2813 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2814 "cross-libc" "libc"))))
2815 (substitute* "src/click/_unicodefun.py"
2816 (("'locale'")
2817 (string-append "'" glibc "/bin/locale'"))))
2818 #t))
2819 (replace 'check
2820 (lambda _
2821 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2822 (invoke "python" "-m" "pytest"))))))
2823 (native-inputs
2824 `(("python-pytest" ,python-pytest)))
2825 (home-page "https://palletsprojects.com/p/click/")
2826 (synopsis "Command line library for Python")
2827 (description
2828 "Click is a Python package for creating command line interfaces in a
2829 composable way with as little code as necessary. Its name stands for
2830 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2831 with sensible defaults out of the box.")
2832 (license license:bsd-3)))
2833
2834 (define-public python2-click
2835 (package-with-python2 python-click))
2836
2837 (define-public python-click-5
2838 (package (inherit python-click)
2839 (name "python-click")
2840 (version "5.1")
2841 (source
2842 (origin
2843 (method url-fetch)
2844 (uri (pypi-uri "click" version))
2845 (sha256
2846 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2847 (arguments `())))
2848
2849 (define-public python-vcversioner
2850 (package
2851 (name "python-vcversioner")
2852 (version "2.16.0.0")
2853 (source
2854 (origin
2855 (method url-fetch)
2856 (uri (pypi-uri "vcversioner" version))
2857 (sha256
2858 (base32
2859 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2860 (build-system python-build-system)
2861 (synopsis "Python library for version number discovery")
2862 (description "Vcversioner is a Python library that inspects tagging
2863 information in a variety of version control systems in order to discover
2864 version numbers.")
2865 (home-page "https://github.com/habnabit/vcversioner")
2866 (license license:isc)))
2867
2868 (define-public python2-vcversioner
2869 (package-with-python2 python-vcversioner))
2870
2871 (define-public python-jdcal
2872 (package
2873 (name "python-jdcal")
2874 (version "1.4")
2875 (source
2876 (origin
2877 (method url-fetch)
2878 (uri (pypi-uri "jdcal" version))
2879 (sha256
2880 (base32
2881 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2882 (build-system python-build-system)
2883 (arguments
2884 `(#:phases (modify-phases %standard-phases
2885 (replace 'check
2886 (lambda _
2887 (invoke "pytest"))))))
2888 (native-inputs
2889 `(("python-pytest" ,python-pytest)))
2890 (home-page "https://github.com/phn/jdcal")
2891 (synopsis "Functions to convert between Julian dates Gregorian dates")
2892 (description "This Python library provides functions for converting
2893 between Julian dates and Gregorian dates.")
2894 (license license:bsd-2)))
2895
2896 (define-public python2-jdcal
2897 (package-with-python2 python-jdcal))
2898
2899 (define-public python-jsondiff
2900 (package
2901 (name "python-jsondiff")
2902 (version "1.2.0")
2903 (source
2904 (origin
2905 (method url-fetch)
2906 (uri (pypi-uri "jsondiff" version))
2907 (sha256
2908 (base32
2909 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2910 (build-system python-build-system)
2911 (native-inputs
2912 `(("python-nose" ,python-nose)
2913 ("python-nose-random" ,python-nose-random)))
2914 (home-page
2915 "https://github.com/fzumstein/jsondiff")
2916 (synopsis "Compare JSON and JSON-like structures in Python")
2917 (description "@code{jsondiff} is a Python library which lets you
2918 compare, diff, and patch JSON and JSON-like structures in Python.")
2919 (license license:expat)))
2920
2921 (define-public python-jsonschema
2922 (package
2923 (name "python-jsonschema")
2924 (version "3.2.0")
2925 (source (origin
2926 (method url-fetch)
2927 (uri (pypi-uri "jsonschema" version))
2928 (sha256
2929 (base32
2930 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2931 (build-system python-build-system)
2932 (arguments
2933 '(#:phases
2934 (modify-phases %standard-phases
2935 (replace 'check
2936 (lambda* (#:key inputs outputs #:allow-other-keys)
2937 (add-installed-pythonpath inputs outputs)
2938 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2939 (invoke "trial" "jsonschema"))))))
2940 (native-inputs
2941 `(("python-setuptools_scm" ,python-setuptools-scm)
2942 ("python-twisted" ,python-twisted)))
2943 (propagated-inputs
2944 `(("python-attrs" ,python-attrs)
2945 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2946 ("python-pyrsistent" ,python-pyrsistent)
2947 ("python-six" ,python-six)))
2948 (home-page "https://github.com/Julian/jsonschema")
2949 (synopsis "Implementation of JSON Schema for Python")
2950 (description
2951 "Jsonschema is an implementation of JSON Schema for Python.")
2952 (license license:expat)
2953 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2954
2955 (define-public python2-jsonschema
2956 (let ((jsonschema (package-with-python2
2957 (strip-python2-variant python-jsonschema))))
2958 (package/inherit jsonschema
2959 (propagated-inputs
2960 `(("python2-functools32" ,python2-functools32)
2961 ,@(package-propagated-inputs jsonschema))))))
2962
2963 (define-public python-schema
2964 (package
2965 (name "python-schema")
2966 (version "0.6.6")
2967 (source
2968 (origin
2969 (method url-fetch)
2970 (uri (pypi-uri "schema" version))
2971 (sha256
2972 (base32
2973 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2974 (build-system python-build-system)
2975 (native-inputs
2976 `(("python-pytest" ,python-pytest)))
2977 (home-page "https://github.com/keleshev/schema")
2978 (synopsis "Simple data validation library")
2979 (description
2980 "@code{python-schema} is a library for validating Python data
2981 structures, such as those obtained from config-files, forms, external
2982 services or command-line parsing, converted from JSON/YAML (or
2983 something else) to Python data-types.")
2984 (license license:psfl)))
2985
2986 (define-public python2-schema
2987 (package-with-python2 python-schema))
2988
2989 (define-public python-schema-0.5
2990 (package (inherit python-schema)
2991 (version "0.5.0")
2992 (source
2993 (origin
2994 (method url-fetch)
2995 (uri (pypi-uri "schema" version))
2996 (sha256
2997 (base32
2998 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2999
3000 (define-public python2-schema-0.5
3001 (package-with-python2 python-schema-0.5))
3002
3003 (define-public python-kitchen
3004 (package
3005 (name "python-kitchen")
3006 (version "1.2.5")
3007 (source
3008 (origin
3009 (method url-fetch)
3010 (uri (pypi-uri "kitchen" version))
3011 (sha256
3012 (base32
3013 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3014 (build-system python-build-system)
3015 (propagated-inputs
3016 `(("python-chardet" ,python-chardet)))
3017 (home-page "https://github.com/fedora-infra/kitchen")
3018 (synopsis "Python API for snippets")
3019 (description "@code{kitchen} module provides a python API for all sorts of
3020 little useful snippets of code that everybody ends up writing for their projects
3021 but never seem big enough to build an independent release. Use kitchen and stop
3022 cutting and pasting that code over and over.")
3023 (license (list license:lgpl2.1+
3024 ;; subprocess.py, test_subprocess.py,
3025 ;; kitchen/pycompat25/defaultdict.py:
3026 license:psfl))))
3027
3028 (define-public python2-kitchen
3029 (package-with-python2 python-kitchen))
3030
3031 (define-public python-unidecode
3032 (package
3033 (name "python-unidecode")
3034 (version "1.1.1")
3035 (source (origin
3036 (method url-fetch)
3037 (uri (pypi-uri "Unidecode" version))
3038 (sha256
3039 (base32
3040 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3041 (build-system python-build-system)
3042 (home-page "https://pypi.org/project/Unidecode/")
3043 (synopsis "ASCII transliterations of Unicode text")
3044 (description
3045 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3046 useful when integrating with legacy code that doesn't support Unicode, or for
3047 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3048 machine identifiers from human-readable Unicode strings that should still be
3049 somewhat intelligible.")
3050 (license license:gpl2+)))
3051
3052 (define-public python2-unidecode
3053 (package-with-python2 python-unidecode))
3054
3055 (define-public python-text-unidecode
3056 (package
3057 (name "python-text-unidecode")
3058 (version "1.3")
3059 (source (origin
3060 (method url-fetch)
3061 (uri (pypi-uri "text-unidecode" version))
3062 (sha256
3063 (base32
3064 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3065 (build-system python-build-system)
3066 (arguments
3067 '(#:phases (modify-phases %standard-phases
3068 (replace 'check
3069 (lambda _
3070 (setenv "PYTHONPATH"
3071 (string-append "./build/lib:"
3072 (getenv "PYTHONPATH")))
3073 (invoke "pytest" "-vv"))))))
3074 (native-inputs
3075 `(("python-pytest" ,python-pytest)))
3076 (home-page "https://github.com/kmike/text-unidecode/")
3077 (synopsis "Decode Unicode data")
3078 (description
3079 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3080 Perl library. It can create ASCII representations of Unicode data. In general
3081 users should prefer the @code{python-unidecode} package which offers better
3082 memory usage and transliteration quality.")
3083 ;; The user can choose either license.
3084 (license (list license:clarified-artistic license:gpl2+))))
3085
3086 (define-public python2-text-unidecode
3087 (package-with-python2 python-text-unidecode))
3088
3089 (define-public python-pyjwt
3090 (package
3091 (name "python-pyjwt")
3092 (version "1.7.1")
3093 (source
3094 (origin
3095 (method url-fetch)
3096 (uri (pypi-uri "PyJWT" version))
3097 (sha256
3098 (base32
3099 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3100 (modules '((guix build utils)))
3101 (snippet
3102 '(begin
3103 (for-each delete-file-recursively
3104 (find-files "." "\\.pyc$"))
3105 #t))))
3106 (build-system python-build-system)
3107 (arguments
3108 '(#:phases (modify-phases %standard-phases
3109 (replace 'check
3110 (lambda _
3111 ;; Mimic upstream commit 3a20892442b34c7 to get
3112 ;; rid of dependency on pytest-runner < 5.0.
3113 ;; Remove substitution for PyJWT > 1.7.1.
3114 (substitute* "setup.py"
3115 ((".*pytest-runner.*")
3116 ""))
3117 (invoke "pytest" "-vv"))))))
3118 (native-inputs
3119 `(("python-pytest" ,python-pytest)
3120 ("python-pytest-cov" ,python-pytest-cov)))
3121 (home-page "https://github.com/progrium/pyjwt")
3122 (synopsis "JSON Web Token implementation in Python")
3123 (description
3124 "PyJWT is a JSON Web Token implementation written in Python.")
3125 (license license:expat)))
3126
3127 (define-public python2-pyjwt
3128 (package-with-python2 python-pyjwt))
3129
3130 (define-public python-pykka
3131 (package
3132 (name "python-pykka")
3133 (version "1.2.1")
3134 (source
3135 (origin
3136 (method url-fetch)
3137 (uri (pypi-uri "Pykka" version))
3138 (sha256
3139 (base32
3140 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
3141 (build-system python-build-system)
3142 (native-inputs
3143 `(("python-mock" ,python-mock)
3144 ("python-nose" ,python-nose)
3145 ("python-gevent" ,python-gevent)
3146 ("python-eventlet" ,python-eventlet)))
3147 (home-page "https://www.pykka.org/")
3148 (synopsis "Pykka is a Python implementation of the actor model")
3149 (description
3150 "Pykka is a Python implementation of the actor model.
3151 The actor model introduces some simple rules to control the sharing
3152 of state and cooperation between execution units, which makes it
3153 easier to build concurrent applications.")
3154 (license license:asl2.0)))
3155
3156 (define-public python-pymsgbox
3157 (package
3158 (name "python-pymsgbox")
3159 (version "1.0.6")
3160 (source
3161 (origin
3162 (method git-fetch)
3163 (uri (git-reference
3164 ;; LICENSE.txt is not present on pypi
3165 (url "https://github.com/asweigart/PyMsgBox")
3166 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3167 (file-name (git-file-name name version))
3168 (sha256
3169 (base32
3170 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3171 (arguments
3172 ;; Circular dependency to run tests:
3173 ;; Tests need pyautogui, which depends on pymsgbox.
3174 '(#:tests? #f))
3175 (build-system python-build-system)
3176 (home-page "https://github.com/asweigart/PyMsgBox")
3177 (synopsis "Python module for JavaScript-like message boxes")
3178 (description
3179 "PyMsgBox is a simple, cross-platform, pure Python module for
3180 JavaScript-like message boxes. Types of dialog boxes include:
3181 @enumerate
3182 @item alert
3183 @item confirm
3184 @item prompt
3185 @item password
3186 @end enumerate
3187 ")
3188 (license license:bsd-3)))
3189
3190 (define-public python-pympler
3191 (package
3192 (name "python-pympler")
3193 (home-page "https://pythonhosted.org/Pympler/")
3194 (version "0.8")
3195 (source (origin
3196 (method url-fetch)
3197 (uri (pypi-uri "Pympler" version))
3198 (sha256
3199 (base32
3200 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3201 (build-system python-build-system)
3202 (arguments
3203 `(#:phases (modify-phases %standard-phases
3204 (delete 'check)
3205 (add-after 'install 'check
3206 (lambda* (#:key inputs outputs #:allow-other-keys)
3207 (add-installed-pythonpath inputs outputs)
3208 (invoke "python" "setup.py" "test"))))))
3209 (synopsis "Measure, monitor and analyze memory behavior")
3210 (description
3211 "Pympler is a development tool to measure, monitor and analyze
3212 the memory behavior of Python objects in a running Python application.
3213
3214 By pympling a Python application, detailed insight in the size and the
3215 lifetime of Python objects can be obtained. Undesirable or unexpected
3216 runtime behavior like memory bloat and other @samp{pymples} can easily
3217 be identified.
3218
3219 A web profiling frontend exposes process statistics, garbage
3220 visualisation and class tracker statistics.")
3221 (license license:asl2.0)))
3222
3223 (define-public python2-pympler
3224 (package-with-python2 python-pympler))
3225
3226 (define-public python-itsdangerous
3227 (package
3228 (name "python-itsdangerous")
3229 (version "1.1.0")
3230 (source
3231 (origin
3232 (method url-fetch)
3233 (uri (pypi-uri "itsdangerous" version))
3234 (sha256
3235 (base32
3236 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3237 (build-system python-build-system)
3238 (home-page "https://palletsprojects.com/p/itsdangerous/")
3239 (synopsis "Python library for passing data to/from untrusted environments")
3240 (description
3241 "Itsdangerous provides various helpers to pass trusted data to untrusted
3242 environments and back.")
3243 (license license:bsd-3)))
3244
3245 (define-public python2-itsdangerous
3246 (package-with-python2 python-itsdangerous))
3247
3248 (define-public python-pyyaml
3249 (package
3250 (name "python-pyyaml")
3251 (version "5.3.1")
3252 (source
3253 (origin
3254 (method url-fetch)
3255 (uri (pypi-uri "PyYAML" version))
3256 (sha256
3257 (base32
3258 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3259 (build-system python-build-system)
3260 (inputs
3261 `(("libyaml" ,libyaml)))
3262 (home-page "https://pyyaml.org")
3263 (synopsis "YAML parser and emitter for Python")
3264 (description
3265 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3266 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3267 API, and sensible error messages. PyYAML supports standard YAML tags and
3268 provides Python-specific tags that represent an arbitrary Python object.")
3269 (license license:expat)))
3270
3271 (define-public python2-pyyaml
3272 (package-with-python2 python-pyyaml))
3273
3274 (define-public python-vine
3275 (package
3276 (name "python-vine")
3277 (version "1.1.4")
3278 (source
3279 (origin
3280 (method url-fetch)
3281 (uri (pypi-uri "vine" version))
3282 (sha256
3283 (base32
3284 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3285 (build-system python-build-system)
3286 (native-inputs
3287 `(("python-pytest" ,python-pytest)
3288 ("python-case" ,python-case)))
3289 (home-page "https://github.com/celery/vine")
3290 (synopsis "Promises for Python")
3291 (description
3292 "@code{vine} provides a special implementation of promises in that it can
3293 be used both for \"promise of a value\" and lazy evaluation. The biggest
3294 upside for this is that everything in a promise can also be a promise,
3295 e.g. filters, callbacks and errbacks can all be promises.")
3296 (license license:bsd-3)))
3297
3298 (define-public python-virtualenv
3299 (package
3300 (name "python-virtualenv")
3301 (version "20.2.1")
3302 (source
3303 (origin
3304 (method url-fetch)
3305 (uri (pypi-uri "virtualenv" version))
3306 (sha256
3307 (base32
3308 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3309 (build-system python-build-system)
3310 (native-inputs
3311 `(("python-mock" ,python-mock)
3312 ("python-pytest" ,python-pytest)
3313 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3314 ;; be an input at all". However, removing the input makes the build error:
3315 ;; File "setup.py", line 4, in <module>
3316 ;; raise RuntimeError("setuptools >= 41 required to build")
3317 ("python-setuptools" ,python-setuptools)
3318 ("python-setuptools-scm" ,python-setuptools-scm)))
3319 (propagated-inputs
3320 `(("python-appdirs" ,python-appdirs)
3321 ("python-distlib" ,python-distlib/next)
3322 ("python-filelock" ,python-filelock)
3323 ("python-six" ,python-six)
3324 ("python-importlib-metadata" ,python-importlib-metadata)))
3325 (home-page "https://virtualenv.pypa.io/")
3326 (synopsis "Virtual Python environment builder")
3327 (description
3328 "Virtualenv is a tool to create isolated Python environments.")
3329 (license license:expat)))
3330
3331 (define-public python-markupsafe
3332 (package
3333 (name "python-markupsafe")
3334 (version "1.1.1")
3335 (source
3336 (origin
3337 (method url-fetch)
3338 (uri (pypi-uri "MarkupSafe" version))
3339 (sha256
3340 (base32
3341 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3342 (build-system python-build-system)
3343 (arguments
3344 `(#:modules ((ice-9 ftw)
3345 (srfi srfi-1)
3346 (srfi srfi-26)
3347 (guix build utils)
3348 (guix build python-build-system))
3349 #:phases (modify-phases %standard-phases
3350 (replace 'check
3351 (lambda _
3352 (let ((cwd (getcwd))
3353 (libdir (find (cut string-prefix? "lib." <>)
3354 (scandir "build"))))
3355 (setenv "PYTHONPATH"
3356 (string-append cwd "/build/" libdir ":"
3357 (getenv "PYTHONPATH")))
3358 (invoke "pytest" "-vv")))))))
3359 (native-inputs
3360 `(("python-pytest" ,python-pytest)))
3361 (home-page "https://github.com/mitsuhiko/markupsafe")
3362 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3363 (description
3364 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3365 for Python.")
3366 (license license:bsd-3)))
3367
3368 (define-public python2-markupsafe
3369 (package-with-python2 python-markupsafe))
3370
3371 (define-public python-jinja2
3372 (package
3373 (name "python-jinja2")
3374 (version "2.11.2")
3375 (source
3376 (origin
3377 (method url-fetch)
3378 (uri (pypi-uri "Jinja2" version))
3379 (sha256
3380 (base32
3381 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3382 (build-system python-build-system)
3383 (arguments
3384 '(#:phases (modify-phases %standard-phases
3385 (replace 'check
3386 (lambda* (#:key tests? #:allow-other-keys)
3387 (if tests?
3388 (begin
3389 (setenv "PYTHONPATH"
3390 (string-append "./build/lib:"
3391 (getenv "PYTHONPATH")))
3392 (invoke "pytest" "-vv"))
3393 (format #t "test suite not run~%"))
3394 #t)))))
3395 (native-inputs
3396 `(("python-pytest" ,python-pytest)))
3397 (propagated-inputs
3398 `(("python-markupsafe" ,python-markupsafe)))
3399 (home-page "http://jinja.pocoo.org/")
3400 (synopsis "Python template engine")
3401 (description
3402 "Jinja2 is a small but fast and easy to use stand-alone template engine
3403 written in pure Python.")
3404 (license license:bsd-3)))
3405
3406 (define-public python2-jinja2
3407 (package-with-python2 python-jinja2))
3408
3409 (define-public python-jinja2-time
3410 (package
3411 (name "python-jinja2-time")
3412 (version "0.2.0")
3413 (source
3414 (origin
3415 (method url-fetch)
3416 (uri (pypi-uri "jinja2-time" version))
3417 (sha256
3418 (base32
3419 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3420 (build-system python-build-system)
3421 (propagated-inputs
3422 `(("python-arrow" ,python-arrow)
3423 ("python-jinja2" ,python-jinja2)))
3424 (home-page
3425 "https://github.com/hackebrot/jinja2-time")
3426 (synopsis "Jinja2 Extension for Dates and Times")
3427 (description
3428 "This package provides an extension for the template engine Jinja2. It
3429 adds a 'now' tag providing a convenient access to the arrow.now() API from
3430 templates. A format string can be provided to control the output.")
3431 (license license:expat)))
3432
3433 (define-public python-pystache
3434 (package
3435 (name "python-pystache")
3436 (version "0.5.4")
3437 (source (origin
3438 (method url-fetch)
3439 (uri (pypi-uri "pystache" version))
3440 (sha256
3441 (base32
3442 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3443 (build-system python-build-system)
3444 (arguments
3445 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3446 (home-page "http://defunkt.io/pystache/")
3447 (synopsis "Python logic-less template engine")
3448 (description
3449 "Pystache is a Python implementation of the framework agnostic,
3450 logic-free templating system Mustache.")
3451 (license license:expat)
3452 (properties `((python2-variant . ,(delay python2-pystache))))))
3453
3454 (define-public python2-pystache
3455 (let ((base (package-with-python2
3456 (strip-python2-variant python-pystache))))
3457 (package/inherit base
3458 (arguments
3459 `(#:python ,python-2
3460 #:phases
3461 (modify-phases %standard-phases
3462 (replace 'check
3463 (lambda _
3464 (invoke "python" "test_pystache.py")))))))))
3465
3466 (define-public python-joblib
3467 (package
3468 (name "python-joblib")
3469 (version "0.14.1")
3470 (source (origin
3471 (method url-fetch)
3472 (uri (pypi-uri "joblib" version))
3473 (sha256
3474 (base32
3475 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3476 (build-system python-build-system)
3477 (arguments
3478 `(#:phases
3479 (modify-phases %standard-phases
3480 (replace 'check
3481 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3482 (native-inputs
3483 `(("python-pytest" ,python-pytest)))
3484 (home-page "https://joblib.readthedocs.io/")
3485 (synopsis "Using Python functions as pipeline jobs")
3486 (description
3487 "Joblib is a set of tools to provide lightweight pipelining in Python.
3488 In particular, joblib offers: transparent disk-caching of the output values
3489 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3490 logging and tracing of the execution.")
3491 (license license:bsd-3)))
3492
3493 (define-public python2-joblib
3494 (package-with-python2 python-joblib))
3495
3496 (define-public python-daemon
3497 (package
3498 (name "python-daemon")
3499 (version "2.2.3")
3500 (source
3501 (origin
3502 (method url-fetch)
3503 (uri (pypi-uri "python-daemon" version))
3504 (sha256
3505 (base32
3506 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3507 (build-system python-build-system)
3508 (arguments
3509 `(#:phases
3510 (modify-phases %standard-phases
3511 (add-before 'check 'disable-tests
3512 (lambda _
3513 ;; FIXME: Determine why test fails
3514 (substitute* "test/test_daemon.py"
3515 (("test_detaches_process_context")
3516 "skip_test_detaches_process_context"))
3517 #t)))))
3518 (propagated-inputs
3519 `(("python-lockfile" ,python-lockfile)))
3520 (native-inputs
3521 `(("python-unittest2" ,python-unittest2)
3522 ("python-testtools" ,python-testtools)
3523 ("python-testscenarios" ,python-testscenarios)
3524 ("python-mock" ,python-mock)
3525 ("python-docutils" ,python-docutils)))
3526 (home-page "https://pagure.io/python-daemon/")
3527 (synopsis "Python library for making a Unix daemon process")
3528 (description "Python-daemon is a library that assists a Python program to
3529 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3530
3531 This library provides a @code{DaemonContext} class that manages the following
3532 important tasks for becoming a daemon process:
3533 @enumerate
3534 @item Detach the process into its own process group.
3535 @item Set process environment appropriate for running inside a chroot.
3536 @item Renounce suid and sgid privileges.
3537 @item Close all open file descriptors.
3538 @item Change the working directory, uid, gid, and umask.
3539 @item Set appropriate signal handlers.
3540 @item Open new file descriptors for stdin, stdout, and stderr.
3541 @item Manage a specified PID lock file.
3542 @item Register cleanup functions for at-exit processing.
3543 @end enumerate")
3544 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3545 (license (list license:asl2.0 license:gpl3+))))
3546
3547 (define-public python-anytree
3548 (package
3549 (name "python-anytree")
3550 (version "2.8.0")
3551 (source (origin
3552 (method url-fetch)
3553 (uri (pypi-uri "anytree" version))
3554 (sha256
3555 (base32
3556 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3557 (build-system python-build-system)
3558 (propagated-inputs
3559 `(("python-six" ,python-six)))
3560 (native-inputs
3561 `(;; For tests.
3562 ("graphviz" ,graphviz) ;for 'dot'
3563 ("python-nose" ,python-nose)))
3564 (home-page "https://github.com/c0fec0de/anytree")
3565 (synopsis "Lightweight tree data library")
3566 (description
3567 "@code{anytree} is a simple, lightweight, and extensible tree data
3568 structure for Python.")
3569 (license license:asl2.0)))
3570
3571 (define-public python-docutils
3572 (package
3573 (name "python-docutils")
3574 (version "0.16")
3575 (source
3576 (origin
3577 (method url-fetch)
3578 (uri (pypi-uri "docutils" version))
3579 (sha256
3580 (base32
3581 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3582 (build-system python-build-system)
3583 (arguments
3584 '(#:phases (modify-phases %standard-phases
3585 (replace 'check
3586 (lambda* (#:key tests? #:allow-other-keys)
3587 (if tests?
3588 (invoke "python" "test/alltests.py")
3589 (format #t "test suite not run~%"))
3590 #t)))))
3591 (home-page "http://docutils.sourceforge.net/")
3592 (synopsis "Python Documentation Utilities")
3593 (description
3594 "Docutils is a modular system for processing documentation into useful
3595 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3596 easy to use markup language, for input.
3597
3598 This package provides tools for converting @file{.rst} files to other formats
3599 via commands such as @command{rst2man}, as well as supporting Python code.")
3600 ;; Most of the source code is public domain, but some source files are
3601 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3602 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3603
3604 (define-public python2-docutils
3605 (package-with-python2 python-docutils))
3606
3607 ;; python2-sphinx fails its test suite with newer versions.
3608 (define-public python2-docutils-0.14
3609 (package
3610 (inherit python2-docutils)
3611 (version "0.14")
3612 (source (origin
3613 (method url-fetch)
3614 (uri (pypi-uri "docutils" version))
3615 (sha256
3616 (base32
3617 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3618
3619 (define-public python-restructuredtext-lint
3620 (package
3621 (name "python-restructuredtext-lint")
3622 (version "1.3.0")
3623 (source
3624 (origin
3625 (method url-fetch)
3626 (uri (pypi-uri "restructuredtext-lint" version))
3627 (sha256
3628 (base32
3629 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3630 (build-system python-build-system)
3631 (arguments
3632 `(#:phases
3633 (modify-phases %standard-phases
3634 (delete 'check)
3635 (add-after 'install 'check
3636 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3637 (when tests?
3638 (add-installed-pythonpath inputs outputs)
3639 (invoke "nosetests" "-v"))
3640 #t)))))
3641 (propagated-inputs
3642 `(("python-docutils" ,python-docutils)))
3643 (native-inputs
3644 `(("python-nose" ,python-nose)))
3645 (home-page "https://github.com/twolfson/restructuredtext-lint")
3646 (synopsis "reStructuredText linter")
3647 (description "This package provides a linter for the reStructuredText
3648 format.")
3649 (license license:unlicense)))
3650
3651 (define-public python-doc8
3652 (package
3653 (name "python-doc8")
3654 (version "0.8.0")
3655 (source
3656 (origin
3657 (method url-fetch)
3658 (uri (pypi-uri "doc8" version))
3659 (sha256
3660 (base32
3661 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3662 (build-system python-build-system)
3663 (arguments
3664 `(#:phases
3665 (modify-phases %standard-phases
3666 (delete 'check)
3667 (add-after 'install 'check
3668 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3669 (when tests?
3670 (add-installed-pythonpath inputs outputs)
3671 (invoke "pytest" "-v"))
3672 #t)))))
3673 (propagated-inputs
3674 `(("python-chardet" ,python-chardet)
3675 ("python-docutils" ,python-docutils)
3676 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3677 ("python-six" ,python-six)
3678 ("python-stevedore" ,python-stevedore)))
3679 (native-inputs
3680 `(("python-testtools" ,python-testtools)
3681 ("python-pytest" ,python-pytest)))
3682 (home-page "https://launchpad.net/doc8")
3683 (synopsis
3684 "Style checker for Sphinx (or other) RST documentation")
3685 (description
3686 "Doc8 is an opinionated style checker for reStructured Text and plain
3687 text styles of documentation.")
3688 (license license:asl2.0)))
3689
3690 (define-public python-pygments
3691 (package
3692 (name "python-pygments")
3693 (version "2.7.3")
3694 (source
3695 (origin
3696 (method url-fetch)
3697 (uri (pypi-uri "Pygments" version))
3698 (sha256
3699 (base32
3700 "05mps9r966r3dpqw6zrs1nlwjdf5y4960hl9m7abwb3qyfnarwyc"))))
3701 (replacement python-pygments/fixed)
3702 (build-system python-build-system)
3703 (arguments
3704 ;; FIXME: Tests require sphinx, which depends on this.
3705 '(#:tests? #f))
3706 (home-page "https://pygments.org/")
3707 (synopsis "Syntax highlighting")
3708 (description
3709 "Pygments is a syntax highlighting package written in Python.")
3710 (license license:bsd-2)
3711 (properties `((python2-variant . ,(delay python2-pygments))))))
3712
3713 (define python-pygments/fixed
3714 (package/inherit python-pygments
3715 (version "2.7.4")
3716 (source
3717 (origin
3718 (method url-fetch)
3719 (uri (pypi-uri "Pygments" version))
3720 (sha256
3721 (base32
3722 "0dy35ry5qa8dpklk4fkj9kfpw2qb4mh5ha9866kw30wf96dx0jfz"))))))
3723
3724 ;; Pygments 2.6 and later does not support Python 2.
3725 (define-public python2-pygments
3726 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3727 (package
3728 (inherit base)
3729 (version "2.5.2")
3730 (source (origin
3731 (method url-fetch)
3732 (uri (pypi-uri "Pygments" version))
3733 (sha256
3734 (base32
3735 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3736
3737 (define-public python-bump2version
3738 (package
3739 (name "python-bump2version")
3740 (version "1.0.1")
3741 (source
3742 (origin
3743 (method url-fetch)
3744 (uri (pypi-uri "bump2version" version))
3745 (sha256
3746 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
3747 (build-system python-build-system)
3748 (arguments
3749 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
3750 ;; required: --new-version".
3751 `(#:tests? #false))
3752 (home-page "https://github.com/c4urself/bump2version")
3753 (synopsis "Version-bump your software with a single command!")
3754 (description
3755 "This package provides a small command line tool to simplify releasing
3756 software by updating all version strings in your source code by the correct
3757 increment. It also creates commits and tags.")
3758 (license license:expat)))
3759
3760 (define-public python-bumpversion
3761 (package
3762 (name "python-bumpversion")
3763 (version "0.5.3")
3764 (source
3765 (origin
3766 (method url-fetch)
3767 (uri (pypi-uri "bumpversion" version))
3768 (sha256
3769 (base32
3770 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3771 (build-system python-build-system)
3772 (home-page "https://github.com/peritus/bumpversion")
3773 (synopsis "Tool to bump software version")
3774 (description "This tool provides a command-line interface (CLI) to bump a
3775 software version simply.")
3776 (license license:expat)))
3777
3778 (define-public python-deprecated
3779 (package
3780 (name "python-deprecated")
3781 (version "1.2.5")
3782 (source
3783 (origin
3784 (method git-fetch)
3785 (uri (git-reference
3786 (url "https://github.com/tantale/deprecated")
3787 (commit (string-append "v" version))))
3788 (file-name (git-file-name name version))
3789 (sha256
3790 (base32
3791 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3792 (build-system python-build-system)
3793 (arguments
3794 `(#:phases (modify-phases %standard-phases
3795 (replace 'check
3796 (lambda _
3797 (invoke "pytest"))))))
3798 (propagated-inputs
3799 `(("python-wrapt" ,python-wrapt)))
3800 (native-inputs
3801 `(("python-bumpversion" ,python-bumpversion)
3802 ("python-pytest" ,python-pytest)
3803 ("python-pytest-cov" ,python-pytest-cov)
3804 ("python-sphinx" ,python-sphinx)
3805 ("python-tox" ,python-tox)))
3806 (home-page "https://github.com/tantale/deprecated")
3807 (synopsis "Python decorator to deprecate classes, functions or methods")
3808 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3809 to deprecate classes, functions or methods.")
3810 (license license:expat)))
3811
3812 (define-public python-pygithub
3813 (package
3814 (name "python-pygithub")
3815 (version "1.54.1")
3816 (source
3817 ;; We fetch from the Git repo because there are no tests in the PyPI
3818 ;; archive.
3819 (origin
3820 (method git-fetch)
3821 (uri (git-reference
3822 (url "https://github.com/PyGithub/PyGithub")
3823 (commit (string-append "v" version))))
3824 (file-name (git-file-name name version))
3825 (sha256
3826 (base32 "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"))))
3827 (build-system python-build-system)
3828 (arguments
3829 `(#:phases
3830 (modify-phases %standard-phases
3831 (replace 'check
3832 (lambda* (#:key tests? #:allow-other-keys)
3833 (when tests?
3834 (invoke "pytest"))
3835 #t)))))
3836 (propagated-inputs
3837 `(("python-cryptography" ,python-cryptography)
3838 ("python-deprecated" ,python-deprecated)
3839 ("python-pyjwt" ,python-pyjwt)
3840 ("python-requests" ,python-requests)))
3841 (native-inputs
3842 `(("python-httpretty" ,python-httpretty)
3843 ("python-pytest" ,python-pytest)))
3844 (home-page "https://pygithub.readthedocs.io/en/latest/")
3845 (synopsis "Python library for the GitHub API")
3846 (description "This library allows managing GitHub resources such as
3847 repositories, user profiles, and organizations in your Python applications,
3848 using version 3 of the GitHub application programming interface (API).")
3849 (license license:lgpl3+)))
3850
3851 (define-public python-rellu
3852 (package
3853 (name "python-rellu")
3854 (version "0.7")
3855 (source
3856 (origin
3857 (method url-fetch)
3858 (uri (pypi-uri "rellu" version))
3859 (sha256
3860 (base32
3861 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3862 (build-system python-build-system)
3863 (propagated-inputs
3864 `(("python-invoke" ,python-invoke)
3865 ("python-pygithub" ,python-pygithub)))
3866 (home-page "https://github.com/robotframework/rellu")
3867 (synopsis "Utilities to create PyPI releases")
3868 (description "This collection of utilities contains tooling and templates
3869 to assist in creating releases on GitHub and publishing them on PyPI. It is
3870 designed to be used by Robot Framework and tools and libraries in its
3871 ecosystem, but can naturally be used also by other projects.")
3872 (license license:asl2.0)))
3873
3874 (define-public python-robotframework
3875 (package
3876 (name "python-robotframework")
3877 (version "3.2.2")
3878 ;; There are no tests in the PyPI archive.
3879 (source
3880 (origin
3881 (method git-fetch)
3882 (uri (git-reference
3883 (url "https://github.com/robotframework/robotframework")
3884 (commit (string-append "v" version))))
3885 (file-name (git-file-name name version))
3886 (sha256
3887 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3888 (patches (search-patches
3889 "python-robotframework-source-date-epoch.patch"))))
3890 (build-system python-build-system)
3891 (arguments
3892 `(#:phases (modify-phases %standard-phases
3893 (add-before 'build 'build-and-install-doc
3894 (lambda* (#:key outputs #:allow-other-keys)
3895 (let* ((doc-output (assoc-ref outputs "doc"))
3896 (doc (string-append doc-output "/share/"
3897 ,name "-" ,version "/")))
3898 (invoke "invoke" "library-docs" "all")
3899 (mkdir-p doc)
3900 (copy-recursively "doc/libraries"
3901 (string-append doc "/libraries"))
3902 #t)))
3903 (replace 'check
3904 (lambda* (#:key inputs #:allow-other-keys)
3905 ;; Some tests require timezone data. Otherwise, they
3906 ;; look up /etc/localtime, which doesn't exist, and fail
3907 ;; with:
3908 ;;
3909 ;; OverflowError: mktime argument out of range
3910 (setenv "TZDIR"
3911 (string-append (assoc-ref inputs "tzdata")
3912 "/share/zoneinfo"))
3913 (setenv "TZ" "Europe/Paris")
3914
3915 (invoke "python" "utest/run.py"))))))
3916 (native-inputs
3917 `(("python-invoke" ,python-invoke)
3918 ("python-rellu" ,python-rellu)
3919 ("python:tk" ,python "tk") ;used when building the HTML doc
3920 ("tzdata" ,tzdata-for-tests)))
3921 (outputs '("out" "doc"))
3922 (home-page "https://robotframework.org")
3923 (synopsis "Generic automation framework")
3924 (description "Robot Framework is a generic automation framework for
3925 acceptance testing, acceptance test driven development (ATDD), and robotic
3926 process automation (RPA).")
3927 (license license:asl2.0)))
3928
3929 (define-public python-robotframework-lint
3930 ;; There is no properly tagged release; the commit below seems to correspond
3931 ;; to the 0.9 stable release available from PyPI. The tests are not
3932 ;; included in the PyPI archive, so we fetch the sources from the upstream
3933 ;; Git repo.
3934 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3935 (revision "0"))
3936 (package
3937 (name "python-robotframework-lint")
3938 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3939 revision commit))
3940 (source
3941 (origin
3942 (method git-fetch)
3943 (uri (git-reference
3944 (url "https://github.com/boakley/robotframework-lint")
3945 (commit commit)))
3946 (file-name (git-file-name name version))
3947 (sha256
3948 (base32
3949 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3950 (build-system python-build-system)
3951 (arguments
3952 `(#:phases
3953 (modify-phases %standard-phases
3954 (replace 'check
3955 (lambda _
3956 (invoke "python" "-m" "robot" "-A"
3957 "tests/conf/default.args" "tests"))))))
3958 (propagated-inputs
3959 `(("python-robotframework" ,python-robotframework)))
3960 (home-page "https://github.com/boakley/robotframework-lint/")
3961 (synopsis "Static analysis tool (linter) for Robot Framework")
3962 (description "This package provides the @code{rflint} command-line
3963 utility, a static analysis tool (linter) for Robot Framework source files.")
3964 (license license:asl2.0))))
3965
3966 (define-public python-robotframework-sshlibrary
3967 (package
3968 (name "python-robotframework-sshlibrary")
3969 (version "3.3.0")
3970 ;; There are no tests in the PyPI archive.
3971 (source
3972 (origin
3973 (method git-fetch)
3974 (uri (git-reference
3975 (url "https://github.com/robotframework/SSHLibrary")
3976 (commit (string-append "v" version))))
3977 (file-name (git-file-name name version))
3978 (sha256
3979 (base32
3980 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3981 (build-system python-build-system)
3982 (arguments
3983 `(#:phases
3984 (modify-phases %standard-phases
3985 (add-before 'build 'build-and-install-doc
3986 (lambda* (#:key outputs #:allow-other-keys)
3987 (let* ((doc-output (assoc-ref outputs "doc"))
3988 (doc (string-append doc-output "/share/"
3989 ,name "-" ,version "/")))
3990 (invoke "chmod" "-R" "+w" "docs")
3991 (invoke "invoke" "kw-docs" "project-docs")
3992 (mkdir-p doc)
3993 (for-each delete-file (find-files "docs" "\\.rst"))
3994 (copy-recursively "docs" doc)
3995 #t)))
3996 (replace 'check
3997 (lambda _
3998 ;; Some tests require an SSH server; we remove them.
3999 (delete-file "utest/test_client_api.py")
4000 (delete-file "utest/test_scp.py")
4001 (invoke "python" "utest/run.py"))))))
4002 (propagated-inputs
4003 `(("python-robotframework" ,python-robotframework)
4004 ("python-paramiko" ,python-paramiko)
4005 ("python-scp" ,python-scp)))
4006 (native-inputs
4007 `(("openssh" ,openssh)
4008 ("which" ,which)
4009 ;; To generate the documentation
4010 ("python-docutils" ,python-docutils)
4011 ("python-invoke" ,python-invoke)
4012 ("python-pygments" ,python-pygments)
4013 ("python-rellu" ,python-rellu)))
4014 (outputs '("out" "doc"))
4015 (home-page "https://github.com/robotframework/SSHLibrary")
4016 (synopsis "Robot Framework library for SSH and SFTP")
4017 (description "SSHLibrary is a Robot Framework library providing support
4018 for SSH and SFTP. It has the following main usages:
4019 @itemize @bullet
4020 @item Executing commands on the remote machine, either blocking or non-blocking.
4021 @item Writing and reading in an interactive shell.
4022 @item Transferring files and directories over SFTP.
4023 @item Ensuring that files and directories exist on the remote machine.
4024 @end itemize")
4025 (license license:asl2.0)))
4026
4027 (define-public python-rstr
4028 (package
4029 (name "python-rstr")
4030 (version "2.2.6")
4031 (source
4032 (origin
4033 (method url-fetch)
4034 (uri (pypi-uri "rstr" version))
4035 (sha256
4036 (base32
4037 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
4038 (build-system python-build-system)
4039 (home-page "https://github.com/leapfrogonline/rstr")
4040 (synopsis "Generate random strings in Python")
4041 (description "This package provides a python module for generating
4042 random strings of various types. It could be useful for fuzz testing,
4043 generating dummy data, or other applications. It has no dependencies
4044 outside the standard library.")
4045 (license license:bsd-3)))
4046
4047 (define-public python-scp
4048 (package
4049 (name "python-scp")
4050 (version "0.13.3")
4051 (source
4052 (origin
4053 (method url-fetch)
4054 (uri (pypi-uri "scp" version))
4055 (sha256
4056 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4057 (build-system python-build-system)
4058 (arguments
4059 '(#:tests? #f)) ;tests require an SSH server
4060 (propagated-inputs
4061 `(("python-paramiko" ,python-paramiko)))
4062 (home-page "https://github.com/jbardin/scp.py")
4063 (synopsis "SCP protocol module for Python and Paramiko")
4064 (description "The scp module extends the Paramiko library to send and
4065 receive files via the SCP1 protocol, as implemented by the OpenSSH
4066 @command{scp} program.")
4067 (license license:gpl2+)))
4068
4069 (define-public python-rst.linker
4070 (package
4071 (name "python-rst.linker")
4072 (version "1.11")
4073 (source
4074 (origin
4075 (method url-fetch)
4076 (uri (pypi-uri "rst.linker" version))
4077 (sha256
4078 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4079 (build-system python-build-system)
4080 (propagated-inputs
4081 `(("python-dateutil" ,python-dateutil)
4082 ("python-six" ,python-six)))
4083 (native-inputs
4084 `(("python-setuptools-scm" ,python-setuptools-scm)))
4085 ;; Test would require path.py, which would introduce a cyclic dependence.
4086 (arguments `(#:tests? #f))
4087 ;; Note: As of version 1.7 the documentation is not worth building.
4088 (home-page "https://github.com/jaraco/rst.linker")
4089 (synopsis "Sphinx plugin to add links and timestamps")
4090 (description "rst.linker automatically replaces text by a
4091 reStructuredText external reference or timestamps. It's primary purpose is to
4092 augment the changelog, but it can be used for other documents, too.")
4093 (license license:expat)))
4094
4095 (define-public python2-rst.linker
4096 (package-with-python2 python-rst.linker))
4097
4098 (define-public python-sshpubkeys
4099 (package
4100 (name "python-sshpubkeys")
4101 (version "3.1.0")
4102 (home-page "https://github.com/ojarva/python-sshpubkeys")
4103 (source (origin
4104 (method git-fetch)
4105 (uri (git-reference
4106 (url home-page)
4107 (commit (string-append "v" version))))
4108 (file-name (git-file-name name version))
4109 (sha256
4110 (base32
4111 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4112 (build-system python-build-system)
4113 (propagated-inputs
4114 `(("python-cryptography" ,python-cryptography)
4115 ("python-ecdsa" ,python-ecdsa)))
4116 (synopsis "OpenSSH public key parser")
4117 (description
4118 "This package provides a library for parsing and validating OpenSSH
4119 public key files.")
4120 (license license:bsd-3)))
4121
4122 (define-public python-feedgenerator
4123 (package
4124 (name "python-feedgenerator")
4125 (version "1.9")
4126 (source
4127 (origin
4128 (method url-fetch)
4129 (uri (pypi-uri "feedgenerator" version))
4130 (sha256
4131 (base32
4132 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4133 (modules '((guix build utils)))
4134 (snippet
4135 '(begin
4136 ;; Remove pre-compiled .pyc files from source.
4137 (for-each delete-file-recursively
4138 (find-files "." "__pycache__" #:directories? #t))
4139 (for-each delete-file (find-files "." "\\.pyc$"))
4140 #t))))
4141 (build-system python-build-system)
4142 (propagated-inputs
4143 `(("python-pytz" ,python-pytz)
4144 ("python-six" ,python-six)))
4145 (home-page "https://github.com/getpelican/feedgenerator")
4146 (synopsis
4147 "Standalone version of Django's Atom/RSS feed generator")
4148 (description
4149 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4150 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4151 (license license:bsd-3)))
4152
4153 (define-public python2-feedgenerator
4154 (package-with-python2 python-feedgenerator))
4155
4156 (define-public python-jsonrpc-server
4157 (package
4158 (name "python-jsonrpc-server")
4159 (version "0.4.0")
4160 (source
4161 (origin
4162 (method url-fetch)
4163 (uri (pypi-uri "python-jsonrpc-server" version))
4164 (sha256
4165 (base32
4166 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4167 (build-system python-build-system)
4168 (propagated-inputs
4169 `(("python-mock" ,python-mock)
4170 ("python-pytest" ,python-pytest)
4171 ("python-ujson" ,python-ujson)))
4172 (home-page
4173 "https://github.com/palantir/python-jsonrpc-server")
4174 (synopsis "JSON RPC 2.0 server library")
4175 (description
4176 "This package provides a JSON RPC 2.0 server library for Python.")
4177 (license license:expat)))
4178
4179 (define-public python-pydantic
4180 (package
4181 (name "python-pydantic")
4182 (version "1.6.1")
4183 (source
4184 (origin
4185 (method git-fetch)
4186 (uri (git-reference
4187 (url "https://github.com/samuelcolvin/pydantic")
4188 (commit (string-append "v" version))))
4189 (file-name (git-file-name name version))
4190 (sha256
4191 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4192 (build-system python-build-system)
4193 (arguments
4194 '(#:phases
4195 (modify-phases %standard-phases
4196 ;; Reported upstream:
4197 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4198 ;; Disable the faulty test as the fix is unclear.
4199 (add-before 'check 'disable-test
4200 (lambda _
4201 (substitute* "tests/test_validators.py"
4202 (("test_assert_raises_validation_error")
4203 "_test_assert_raises_validation_error"))
4204 #t))
4205 (replace 'check
4206 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4207 (native-inputs
4208 `(("python-pytest" ,python-pytest)))
4209 (home-page "https://github.com/samuelcolvin/pydantic")
4210 (synopsis "Python data validation and settings management")
4211 (description
4212 "Pydantic enforces type hints at runtime, and provides user friendly
4213 errors when data is invalid.")
4214 (license license:expat)))
4215
4216 (define-public python-pydocstyle
4217 (package
4218 (name "python-pydocstyle")
4219 (version "3.0.0")
4220 (source
4221 (origin
4222 (method url-fetch)
4223 (uri (pypi-uri "pydocstyle" version))
4224 (sha256
4225 (base32
4226 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4227 (build-system python-build-system)
4228 (propagated-inputs
4229 `(("python-six" ,python-six)
4230 ("python-snowballstemmer" ,python-snowballstemmer)))
4231 (home-page
4232 "https://github.com/PyCQA/pydocstyle/")
4233 (synopsis "Python docstring style checker")
4234 (description
4235 "This package provides a style checker for the Python Language
4236 Server (PLS).")
4237 (license license:expat)))
4238
4239 (define-public python-language-server
4240 (package
4241 (name "python-language-server")
4242 (version "0.36.2")
4243 (source
4244 (origin
4245 (method url-fetch)
4246 (uri (pypi-uri "python-language-server" version))
4247 (sha256
4248 (base32
4249 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4250 (build-system python-build-system)
4251 (propagated-inputs
4252 `(("python-autopep8" ,python-autopep8)
4253 ("python-configparser" ,python-configparser)
4254 ("python-pydocstyle" ,python-pydocstyle)
4255 ("python-future" ,python-future)
4256 ("python-jedi" ,python-jedi)
4257 ("python-jsonrpc-server" ,python-jsonrpc-server)
4258 ("python-pluggy" ,python-pluggy)
4259 ("python-pycodestyle" ,python-pycodestyle)
4260 ("python-pyflakes" ,python-pyflakes)
4261 ("python-rope" ,python-rope)
4262 ("python-ujson" ,python-ujson)
4263 ("python-yapf" ,python-yapf)))
4264 (native-inputs
4265 `(("python-coverage" ,python-coverage)
4266 ("python-flaky" ,python-flaky)
4267 ("python-matplotlib" ,python-matplotlib)
4268 ("python-mock" ,python-mock)
4269 ("python-numpy" ,python-numpy)
4270 ("python-pandas" ,python-pandas)
4271 ("python-pylint" ,python-pylint)
4272 ("python-pytest" ,python-pytest)
4273 ("python-pytest-cov" ,python-pytest-cov)
4274 ("python-versioneer" ,python-versioneer)))
4275 (home-page "https://github.com/palantir/python-language-server")
4276 (synopsis "Python implementation of the Language Server Protocol")
4277 (description
4278 "The Python Language Server (pyls) is an implementation of the Python 3
4279 language specification for the Language Server Protocol (LSP). This tool is
4280 used in text editing environments to provide a complete and integrated
4281 feature-set for programming Python effectively.")
4282 (license license:expat)))
4283
4284 (define-public python-pathspec
4285 (package
4286 (name "python-pathspec")
4287 (version "0.7.0")
4288 (source
4289 (origin
4290 (method url-fetch)
4291 (uri (pypi-uri "pathspec" version))
4292 (sha256
4293 (base32
4294 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4295 (build-system python-build-system)
4296 (home-page "https://github.com/cpburnz/python-path-specification")
4297 (synopsis "Utility library for gitignore style pattern matching of file paths")
4298 (description
4299 "This package provides a utility library for gitignore style pattern
4300 matching of file paths.")
4301 (license license:mpl2.0)))
4302
4303 (define-public python-black
4304 (package
4305 (name "python-black")
4306 (version "20.8b1")
4307 (source
4308 (origin
4309 (method url-fetch)
4310 (uri (pypi-uri "black" version))
4311 (sha256
4312 (base32
4313 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4314 (build-system python-build-system)
4315 (arguments
4316 `(#:phases
4317 (modify-phases %standard-phases
4318 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4319 (lambda _
4320 (let ((python3 (which "python3")))
4321 (substitute* '("tests/data/fmtonoff.py"
4322 "tests/data/string_prefixes.py"
4323 "tests/data/function.py"
4324 "tests/data/python37.py")
4325 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4326 (string-append "#!" python3 (if (string? minor-version)
4327 minor-version
4328 "")))))
4329 #t))
4330 (add-after 'unpack 'disable-broken-tests
4331 (lambda* (#:key outputs inputs #:allow-other-keys)
4332 ;; Make installed package available for running the tests
4333 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4334 ":" (getenv "PATH")))
4335
4336 ;; These tests are supposed to be skipped when the blackd
4337 ;; dependencies are missing, but this doesn't quite work.
4338 (substitute* "tests/test_black.py"
4339 (("( *)class BlackDTestCase.*" match indent)
4340 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4341 indent "class BlackDTestCase(unittest.TestCase):\n"))
4342 (("web.Application") "False")
4343 (("@unittest_run_loop") ""))
4344
4345 ;; Patching the above file breaks the self test
4346 (substitute* "tests/test_black.py"
4347 (("( *)def test_self" match indent)
4348 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4349
4350 (substitute* "tests/test_black.py"
4351 (("( *)def test_python38" match indent)
4352 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4353 #t)))))
4354 (propagated-inputs
4355 `(("python-click" ,python-click)
4356 ("python-attrs" ,python-attrs)
4357 ("python-appdirs" ,python-appdirs)
4358 ("python-pathspec" ,python-pathspec)
4359 ("python-mypy-extensions" ,python-mypy-extensions)
4360 ("python-regex" ,python-regex)
4361 ("python-toml" ,python-toml)
4362 ("python-typed-ast" ,python-typed-ast)
4363 ("python-typing-extensions" ,python-typing-extensions)))
4364 (native-inputs
4365 `(("python-setuptools-scm" ,python-setuptools-scm)))
4366 (home-page "https://github.com/ambv/black")
4367 (synopsis "The uncompromising code formatter")
4368 (description "Black is the uncompromising Python code formatter.")
4369 (license license:expat)))
4370
4371 (define-public python-black-macchiato
4372 (package
4373 (name "python-black-macchiato")
4374 (version "1.3.0")
4375 (source
4376 (origin
4377 (method url-fetch)
4378 (uri (pypi-uri "black-macchiato" version))
4379 (sha256
4380 (base32
4381 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4382 (build-system python-build-system)
4383 (propagated-inputs
4384 `(("python-black" ,python-black)))
4385 (home-page "https://github.com/wbolster/black-macchiato")
4386 (synopsis "Partial @code{python-black} formatting")
4387 (description
4388 "This package is built on top the @{python-black} code formatter to
4389 enable formatting of partial files.")
4390 (license license:bsd-3)))
4391
4392 (define-public python-blinker
4393 (package
4394 (name "python-blinker")
4395 (version "1.4")
4396 (source
4397 (origin
4398 (method url-fetch)
4399 (uri (pypi-uri "blinker" version))
4400 (sha256
4401 (base32
4402 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4403 (build-system python-build-system)
4404 (home-page "https://pythonhosted.org/blinker/")
4405 (synopsis "Fast, simple object-to-object and broadcast signaling")
4406 (description
4407 "Blinker provides a fast dispatching system that allows any number of
4408 interested parties to subscribe to events, or \"signals\".")
4409 (license license:expat)))
4410
4411 (define-public python2-blinker
4412 (package-with-python2 python-blinker))
4413
4414 (define-public pelican
4415 (package
4416 (name "pelican")
4417 (version "4.2.0")
4418 (source
4419 (origin
4420 (method url-fetch)
4421 (uri (pypi-uri "pelican" version))
4422 (sha256
4423 (base32
4424 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4425 (build-system python-build-system)
4426 (propagated-inputs
4427 `(("python-blinker" ,python-blinker)
4428 ("python-dateutil" ,python-dateutil)
4429 ("python-docutils" ,python-docutils)
4430 ("python-feedgenerator" ,python-feedgenerator)
4431 ("python-jinja2" ,python-jinja2)
4432 ("python-markdown" ,python-markdown)
4433 ("python-pygments" ,python-pygments)
4434 ("python-pytz" ,python-pytz)
4435 ("python-six" ,python-six)
4436 ("python-unidecode" ,python-unidecode)))
4437 (home-page "https://getpelican.com/")
4438 (arguments
4439 `(;; XXX Requires a lot more packages to do unit tests :P
4440 #:tests? #f))
4441 (synopsis "Python-based static site publishing system")
4442 (description
4443 "Pelican is a tool to generate a static blog from reStructuredText,
4444 Markdown input files, and more. Pelican uses Jinja2 for templating
4445 and is very extensible.")
4446 (license license:agpl3+)))
4447
4448 (define-public mallard-ducktype
4449 (package
4450 (name "mallard-ducktype")
4451 (version "1.0.2")
4452 (source
4453 (origin
4454 (method git-fetch)
4455 ;; git-reference because tests are not included in pypi source tarball
4456 ;; https://issues.guix.gnu.org/issue/36755#2
4457 (uri (git-reference
4458 (url "https://github.com/projectmallard/mallard-ducktype")
4459 (commit version)))
4460 (file-name (git-file-name name version))
4461 (sha256
4462 (base32
4463 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4464 (build-system python-build-system)
4465 (arguments
4466 '(#:phases
4467 (modify-phases %standard-phases
4468 (replace 'check
4469 (lambda _
4470 (with-directory-excursion "tests"
4471 (invoke "sh" "runtests")))))))
4472 (home-page "http://projectmallard.org")
4473 (synopsis "Convert Ducktype to Mallard documentation markup")
4474 (description
4475 "Ducktype is a lightweight syntax that can represent all the semantics
4476 of the Mallard XML documentation system. Ducktype files can be converted to
4477 Mallard using the @command{ducktype} tool. The yelp-tools package
4478 provides additional functionality on the produced Mallard documents.")
4479 (license license:expat)))
4480
4481 (define-public python-cython
4482 (package
4483 (name "python-cython")
4484 (version "0.29.21")
4485 (source
4486 (origin
4487 (method url-fetch)
4488 (uri (pypi-uri "Cython" version))
4489 (sha256
4490 (base32
4491 "1bcwpra7c6k30yvic3sw2v3rq2dr40ypc4zqif6kr52mpn4wnyp5"))))
4492 (build-system python-build-system)
4493 ;; we need the full python package and not just the python-wrapper
4494 ;; because we need libpython3.3m.so
4495 (inputs
4496 `(("python" ,python)))
4497 (arguments
4498 `(#:phases
4499 (modify-phases %standard-phases
4500 (add-before 'check 'set-HOME
4501 ;; some tests require access to "$HOME/.cython"
4502 (lambda _ (setenv "HOME" "/tmp") #t))
4503 (replace 'check
4504 (lambda _
4505 ;; Disable compiler optimizations to greatly reduce the running
4506 ;; time of the test suite.
4507 (setenv "CFLAGS" "-O0")
4508
4509 (invoke "python" "runtests.py" "-vv"
4510 "-j" (number->string (parallel-job-count))
4511 ;; XXX: On 32-bit architectures, running the parallel tests
4512 ;; fails on many-core systems, see
4513 ;; <https://github.com/cython/cython/issues/2807>.
4514 ,@(if (not (target-64bit?))
4515 '("-x" "run.parallel")
4516 '())))))))
4517 (home-page "https://cython.org/")
4518 (synopsis "C extensions for Python")
4519 (description "Cython is an optimising static compiler for both the Python
4520 programming language and the extended Cython programming language. It makes
4521 writing C extensions for Python as easy as Python itself.")
4522 (license license:asl2.0)
4523 (properties `((python2-variant . ,(delay python2-cython))))))
4524
4525 (define-public python2-cython
4526 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4527 (package/inherit base
4528 (name "python2-cython")
4529 (inputs
4530 `(("python-2" ,python-2))) ;this is not automatically changed
4531 (arguments
4532 (substitute-keyword-arguments (package-arguments base)
4533 ((#:phases phases)
4534 `(modify-phases ,phases
4535 (add-before 'check 'adjust-test_embed
4536 (lambda _
4537 (substitute* "runtests.py"
4538 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4539 ;; so it can give the right -L flag to GCC when embedding static
4540 ;; builds of Python. It is unaware that the Python "config"
4541 ;; directory (where the static library lives) was renamed in
4542 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4543 ;; which works fine, because that is where the shared library is.
4544 ;;
4545 ;; It also appears to be unaware that the Makefile in Demos/embed
4546 ;; already unconditionally pass the static library location to GCC,
4547 ;; after checking sysconfig.get_config_var('LIBPL).
4548 ;;
4549 ;; The effect is that the linker is unable to resolve libexpat
4550 ;; symbols when building for Python 2, because neither the Python 2
4551 ;; shared library nor Expat is available. To fix it, we can either
4552 ;; add Expat as an input and make it visible to the linker, or just
4553 ;; prevent it from overriding the Python shared library location.
4554 ;; The end result is identical, so we take the easy route.
4555 ((" or libname not in os\\.listdir\\(libdir\\)")
4556 ""))
4557 #t)))))))))
4558
4559 ;; The RPython toolchain currently does not support Python 3.
4560 (define-public python2-rpython
4561 (package
4562 (name "python2-rpython")
4563 (version "0.2.1")
4564 (source
4565 (origin
4566 (method url-fetch)
4567 (uri (pypi-uri "rpython" version))
4568 (sha256
4569 (base32
4570 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4571 (build-system python-build-system)
4572 (arguments `(#:python ,python-2))
4573 (native-inputs
4574 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4575 (home-page "https://rpython.readthedocs.org")
4576 (synopsis "Framework for implementing interpreters and virtual machines")
4577 (description "RPython is a translation and support framework for
4578 producing implementations of dynamic languages, emphasizing a clean separation
4579 between language specification and implementation aspects.")
4580 (license license:expat)))
4581
4582 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4583 ;; python-scipy still build, as these three packages are often used together.
4584 (define-public python-numpy
4585 (package
4586 (name "python-numpy")
4587 (version "1.17.3")
4588 (source
4589 (origin
4590 (method url-fetch)
4591 (uri (string-append
4592 "https://github.com/numpy/numpy/releases/download/v"
4593 version "/numpy-" version ".tar.gz"))
4594 (sha256
4595 (base32
4596 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4597 (build-system python-build-system)
4598 (inputs
4599 `(("openblas" ,openblas)
4600 ("lapack" ,lapack)))
4601 (native-inputs
4602 `(("python-cython" ,python-cython)
4603 ("python-pytest" ,python-pytest)
4604 ("gfortran" ,gfortran)))
4605 (arguments
4606 `(#:phases
4607 (modify-phases %standard-phases
4608 (add-before 'build 'configure-blas-lapack
4609 (lambda* (#:key inputs #:allow-other-keys)
4610 (call-with-output-file "site.cfg"
4611 (lambda (port)
4612 (format port
4613 "[openblas]
4614 libraries = openblas
4615 library_dirs = ~a/lib
4616 include_dirs = ~a/include
4617
4618 # backslash-n to make emacs happy
4619 \n[lapack]
4620 lapack_libs = lapack
4621 library_dirs = ~a/lib
4622 include_dirs = ~a/include
4623 "
4624 (assoc-ref inputs "openblas")
4625 (assoc-ref inputs "openblas")
4626 (assoc-ref inputs "lapack")
4627 (assoc-ref inputs "lapack"))))
4628 #t))
4629 (add-before 'build 'fix-executable-paths
4630 (lambda* (#:key inputs #:allow-other-keys)
4631 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4632 ;; instead of /bin/sh.
4633 (substitute* "numpy/distutils/exec_command.py"
4634 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4635 (string-append match-start (assoc-ref inputs "bash") match-end)))
4636 ;; Use "gcc" executable, not "cc".
4637 (substitute* "numpy/distutils/system_info.py"
4638 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4639 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4640 #t))
4641 ;; Tests can only be run after the library has been installed and not
4642 ;; within the source directory.
4643 (delete 'check)
4644 (add-after 'install 'check
4645 (lambda* (#:key outputs inputs #:allow-other-keys)
4646 ;; Make installed package available for running the tests
4647 (add-installed-pythonpath inputs outputs)
4648 ;; Make sure "f2py" etc is found.
4649 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4650 ":" (getenv "PATH")))
4651 (with-directory-excursion "/tmp"
4652 (invoke "python" "-c"
4653 "import numpy; numpy.test(verbose=2)")))))))
4654 (home-page "https://numpy.org")
4655 (synopsis "Fundamental package for scientific computing with Python")
4656 (description "NumPy is the fundamental package for scientific computing
4657 with Python. It contains among other things: a powerful N-dimensional array
4658 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4659 and Fortran code, useful linear algebra, Fourier transform, and random number
4660 capabilities.")
4661 (properties `((python2-variant . ,(delay python2-numpy))))
4662 (license license:bsd-3)))
4663
4664 ;; Numpy 1.16.x are the last versions that support Python 2.
4665 (define-public python2-numpy
4666 (let ((numpy (package-with-python2
4667 (strip-python2-variant python-numpy))))
4668 (package/inherit
4669 numpy
4670 (version "1.16.5")
4671 (source (origin
4672 (method url-fetch)
4673 (uri (string-append
4674 "https://github.com/numpy/numpy/releases/download/v"
4675 version "/numpy-" version ".tar.gz"))
4676 (sha256
4677 (base32
4678 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4679
4680 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4681 ;; interest only for legacy code going back to NumPy's predecessor
4682 ;; Numeric.
4683 (define-public python2-numpy-1.8
4684 (package (inherit python2-numpy)
4685 (version "1.8.2")
4686 (source
4687 (origin
4688 (method git-fetch)
4689 (uri (git-reference
4690 (url "https://github.com/numpy/numpy")
4691 (commit (string-append "v" version))))
4692 (file-name (git-file-name "numpy" version))
4693 (sha256
4694 (base32
4695 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4696 (arguments
4697 (substitute-keyword-arguments (package-arguments python2-numpy)
4698 ((#:phases phases)
4699 `(modify-phases ,phases
4700 (replace 'configure-blas-lapack
4701 (lambda* (#:key inputs #:allow-other-keys)
4702 (call-with-output-file "site.cfg"
4703 (lambda (port)
4704 (format port
4705 "[openblas]
4706 libraries = openblas,lapack
4707 library_dirs = ~a/lib:~a/lib
4708 include_dirs = ~a/include:~a/include
4709 "
4710 (assoc-ref inputs "openblas")
4711 (assoc-ref inputs "lapack")
4712 (assoc-ref inputs "openblas")
4713 (assoc-ref inputs "lapack"))))
4714 #t))))))
4715 (native-inputs
4716 `(("python2-nose" ,python2-nose)))
4717 (description "NumPy is the fundamental package for scientific computing
4718 with Python. It contains among other things: a powerful N-dimensional array
4719 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4720 and Fortran code, useful linear algebra, Fourier transform, and random number
4721 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4722 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4723 Numeric.")
4724 (license license:bsd-3)))
4725
4726 (define-public python-munch
4727 (package
4728 (name "python-munch")
4729 (version "2.0.4")
4730 (source
4731 (origin
4732 (method url-fetch)
4733 (uri (pypi-uri "munch" version))
4734 (sha256
4735 (base32
4736 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4737 (build-system python-build-system)
4738 (home-page "https://github.com/Infinidat/munch")
4739 (synopsis "Dot-accessible dictionary")
4740 (description "Munch is a dot-accessible dictionary similar to JavaScript
4741 objects.")
4742 (license license:expat)))
4743
4744 (define-public python2-munch
4745 (package-with-python2 python-munch))
4746
4747 (define-public python-colormath
4748 (package
4749 (name "python-colormath")
4750 (version "3.0.0")
4751 (source
4752 (origin
4753 (method url-fetch)
4754 (uri (pypi-uri "colormath" version))
4755 (sha256
4756 (base32
4757 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4758 (build-system python-build-system)
4759 (propagated-inputs
4760 `(("python-networkx" ,python-networkx)
4761 ("python-numpy" ,python-numpy)))
4762 (home-page "https://github.com/gtaylor/python-colormath")
4763 (synopsis "Color math and conversion library")
4764 (description
4765 "This is a Python library for color math and conversions.")
4766 (license license:bsd-3)))
4767
4768 (define-public python2-colormath
4769 (package-with-python2 python-colormath))
4770
4771 (define-public python-spectra
4772 (package
4773 (name "python-spectra")
4774 (version "0.0.11")
4775 (source
4776 (origin
4777 (method url-fetch)
4778 (uri (pypi-uri "spectra" version))
4779 (sha256
4780 (base32
4781 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4782 (build-system python-build-system)
4783 (arguments
4784 `(#:phases
4785 (modify-phases %standard-phases
4786 (replace 'check
4787 (lambda _ (invoke "nosetests" "-v"))))))
4788 (propagated-inputs
4789 `(("python-colormath" ,python-colormath)))
4790 (native-inputs
4791 `(("python-nose" ,python-nose)))
4792 (home-page "https://github.com/jsvine/spectra")
4793 (synopsis "Color scales and color conversion")
4794 (description
4795 "This package provides a Python library intended to make color math,
4796 color scales, and color space conversion easy. It has support for:
4797
4798 @enumerate
4799 @item Color scales
4800 @item Color ranges
4801 @item Color blending
4802 @item Brightening/darkening colors
4803 @item Saturating/desaturating colors
4804 @item Conversion to/from multiple color spaces.
4805 @end enumerate\n")
4806 (license license:expat)))
4807
4808 (define-public python2-spectra
4809 (package-with-python2 python-spectra))
4810
4811 (define-public python-numpy-documentation
4812 (package
4813 (name "python-numpy-documentation")
4814 (version (package-version python-numpy))
4815 (source (package-source python-numpy))
4816 (build-system python-build-system)
4817 (native-inputs
4818 `(("python-matplotlib" ,python-matplotlib)
4819 ("python-numpy" ,python-numpy)
4820 ("pkg-config" ,pkg-config)
4821 ("python-sphinx" ,python-sphinx)
4822 ("python-numpydoc" ,python-numpydoc)
4823 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4824 texlive-fonts-ec
4825 texlive-generic-ifxetex
4826 texlive-generic-pdftex
4827 texlive-amsfonts
4828 texlive-latex-capt-of
4829 texlive-latex-cmap
4830 texlive-latex-environ
4831 texlive-latex-eqparbox
4832 texlive-latex-etoolbox
4833 texlive-latex-expdlist
4834 texlive-latex-fancyhdr
4835 texlive-latex-fancyvrb
4836 texlive-latex-fncychap
4837 texlive-latex-float
4838 texlive-latex-framed
4839 texlive-latex-geometry
4840 texlive-latex-graphics
4841 texlive-latex-hyperref
4842 texlive-latex-mdwtools
4843 texlive-latex-multirow
4844 texlive-latex-needspace
4845 texlive-latex-oberdiek
4846 texlive-latex-parskip
4847 texlive-latex-preview
4848 texlive-latex-tabulary
4849 texlive-latex-threeparttable
4850 texlive-latex-titlesec
4851 texlive-latex-trimspaces
4852 texlive-latex-ucs
4853 texlive-latex-upquote
4854 texlive-latex-url
4855 texlive-latex-varwidth
4856 texlive-latex-wrapfig)))
4857 ("texinfo" ,texinfo)
4858 ("perl" ,perl)
4859 ("scipy-sphinx-theme"
4860 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
4861 (origin ;the build script expects scipy-sphinx-theme as a git submodule
4862 (method git-fetch)
4863 (uri (git-reference
4864 (url "https://github.com/scipy/scipy-sphinx-theme")
4865 (commit commit)))
4866 (file-name (git-file-name "python-scipy-sphinx-theme"
4867 (string-take commit 7)))
4868 (sha256
4869 (base32
4870 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
4871 ,@(package-native-inputs python-numpy)))
4872 (arguments
4873 `(#:tests? #f ; we're only generating the documentation
4874 #:phases
4875 (modify-phases %standard-phases
4876 (delete 'build)
4877 (replace 'install
4878 (lambda* (#:key inputs outputs #:allow-other-keys)
4879 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4880 (doc (string-append
4881 data "/doc/" ,name "-"
4882 ,(package-version python-numpy)))
4883 (info-reader (string-append data "/info"))
4884 (html (string-append doc "/html"))
4885 (scipy-sphinx-theme "scipy-sphinx-theme")
4886 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4887 (pyver ,(string-append "PYVER=")))
4888
4889 ;; FIXME: this is needed to for texlive-union to generate
4890 ;; fonts, which are not found.
4891 (setenv "HOME" "/tmp")
4892
4893 (with-directory-excursion "doc"
4894 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4895 (mkdir-p html)
4896 (invoke "make" "html" pyver)
4897 (invoke "make" "latex" "PAPER=a4" pyver)
4898 (invoke "make" "-C" "build/latex"
4899 "all-pdf" "PAPER=a4" pyver)
4900 ;; FIXME: Generation of the info file fails.
4901 ;; (invoke "make" "info" pyver)
4902 ;; (mkdir-p info)
4903 ;; (copy-file "build/texinfo/numpy.info"
4904 ;; (string-append info "/numpy.info"))
4905 (for-each (lambda (file)
4906 (copy-file (string-append "build/latex" file)
4907 (string-append doc file)))
4908 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4909 (with-directory-excursion "build/html"
4910 (for-each (lambda (file)
4911 (let* ((dir (dirname file))
4912 (tgt-dir (string-append html "/" dir)))
4913 (unless (equal? "." dir)
4914 (mkdir-p tgt-dir))
4915 (install-file file html)))
4916 (find-files "." ".*")))))
4917 #t)))))
4918 (home-page (package-home-page python-numpy))
4919 (synopsis "Documentation for the python-numpy package")
4920 (description (package-description python-numpy))
4921 (license (package-license python-numpy))))
4922
4923 (define-public python2-numpy-documentation
4924 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4925 (package
4926 (inherit numpy-documentation)
4927 (native-inputs `(("python2-functools32" ,python2-functools32)
4928 ,@(package-native-inputs numpy-documentation))))))
4929
4930 (define-public python-pygit2
4931 (package
4932 (name "python-pygit2")
4933 (version "1.4.0")
4934 (source
4935 (origin
4936 (method url-fetch)
4937 (uri (pypi-uri "pygit2" version))
4938 (sha256
4939 (base32 "1j71iskvirkm8jzfmwdm79v69878m9iix8a8cn4xidgr3nmkisyb"))))
4940 (build-system python-build-system)
4941 (arguments
4942 '(#:tests? #f)) ; tests don't run correctly in our environment
4943 (propagated-inputs
4944 `(("python-cached-property" ,python-cached-property)
4945 ("python-cffi" ,python-cffi)
4946 ("libgit2" ,libgit2)))
4947 (native-inputs
4948 `(("python-pytest" ,python-pytest)))
4949 (home-page "https://github.com/libgit2/pygit2")
4950 (synopsis "Python bindings for libgit2")
4951 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4952 library, libgit2 implements Git plumbing.")
4953 ;; GPL2.0 only, with linking exception.
4954 (license license:gpl2)))
4955
4956 (define-public python-patiencediff
4957 (package
4958 (name "python-patiencediff")
4959 (version "0.2.0")
4960 (source
4961 (origin
4962 (method url-fetch)
4963 (uri (pypi-uri "patiencediff" version))
4964 (sha256
4965 (base32
4966 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4967 (build-system python-build-system)
4968 (home-page "https://www.breezy-vcs.org/")
4969 (synopsis "Python implementation of the patiencediff algorithm")
4970 (description
4971 "This package contains a Python implementation of the @code{patiencediff}
4972 algorithm. Patiencediff provides a good balance of performance, nice output for
4973 humans, and implementation simplicity.")
4974 (license license:gpl2)))
4975
4976 (define-public python-pdftotext
4977 (package
4978 (name "python-pdftotext")
4979 (version "2.1.5")
4980 (source
4981 (origin
4982 (method url-fetch)
4983 (uri (pypi-uri "pdftotext" version))
4984 (sha256
4985 (base32
4986 "19la1cw1hmkcr8big04gm2dd5fw0y0z97g930aiy29s1gaqbiblq"))))
4987 (build-system python-build-system)
4988 (inputs
4989 `(("poppler" ,poppler)))
4990 (home-page "https://github.com/jalan/pdftotext")
4991 (synopsis "Simple PDF text extraction")
4992 (description "Pdftotext is a Python library of PDF text extraction.")
4993 (license license:expat)))
4994
4995 (define-public python-pyparsing
4996 (package
4997 (name "python-pyparsing")
4998 (version "2.4.6")
4999 (source
5000 (origin
5001 (method url-fetch)
5002 (uri (pypi-uri "pyparsing" version))
5003 (sha256
5004 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
5005 (build-system python-build-system)
5006 (outputs '("out" "doc"))
5007 (arguments
5008 `(#:tests? #f ; no test target
5009 #:phases
5010 (modify-phases %standard-phases
5011 (add-after 'install 'install-doc
5012 (lambda* (#:key outputs #:allow-other-keys)
5013 (let* ((doc (string-append (assoc-ref outputs "doc")
5014 "/share/doc/" ,name "-" ,version))
5015 (html-doc (string-append doc "/html"))
5016 (examples (string-append doc "/examples")))
5017 (mkdir-p html-doc)
5018 (mkdir-p examples)
5019 (for-each
5020 (lambda (dir tgt)
5021 (map (lambda (file)
5022 (install-file file tgt))
5023 (find-files dir ".*")))
5024 (list "docs" "htmldoc" "examples")
5025 (list doc html-doc examples))
5026 #t))))))
5027 (home-page "https://github.com/pyparsing/pyparsing")
5028 (synopsis "Python parsing class library")
5029 (description
5030 "The pyparsing module is an alternative approach to creating and
5031 executing simple grammars, vs. the traditional lex/yacc approach, or the use
5032 of regular expressions. The pyparsing module provides a library of classes
5033 that client code uses to construct the grammar directly in Python code.")
5034 (license license:expat)))
5035
5036 (define-public python2-pyparsing
5037 (package-with-python2 python-pyparsing))
5038
5039 (define-public python-pyparsing-2.4.7
5040 (package
5041 (inherit python-pyparsing)
5042 (version "2.4.7")
5043 (source
5044 (origin
5045 (method url-fetch)
5046 (uri (pypi-uri "pyparsing" version))
5047 (sha256
5048 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5049
5050 (define-public python-numpydoc
5051 (package
5052 (name "python-numpydoc")
5053 (version "0.8.0")
5054 (source
5055 (origin
5056 (method url-fetch)
5057 (uri (pypi-uri "numpydoc" version))
5058 (sha256
5059 (base32
5060 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5061 (build-system python-build-system)
5062 (propagated-inputs
5063 `(("python-sphinx" ,python-sphinx)))
5064 (native-inputs
5065 `(("python-nose" ,python-nose)))
5066 (home-page "https://pypi.org/project/numpydoc/")
5067 (synopsis
5068 "Numpy's Sphinx extensions")
5069 (description
5070 "Sphinx extension to support docstrings in Numpy format.")
5071 (license license:bsd-2)
5072 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5073
5074 (define-public python2-numpydoc
5075 (let ((base (package-with-python2
5076 (strip-python2-variant python-numpydoc))))
5077 (package/inherit base
5078 (propagated-inputs
5079 `(("python2-jinja2" ,python2-jinja2)
5080 ,@(package-propagated-inputs base))))))
5081
5082 (define-public python-numexpr
5083 (package
5084 (name "python-numexpr")
5085 (version "2.6.5")
5086 (source
5087 (origin
5088 (method url-fetch)
5089 (uri (pypi-uri "numexpr" version))
5090 (sha256
5091 (base32
5092 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
5093 (build-system python-build-system)
5094 (arguments `(#:tests? #f)) ; no tests included
5095 (propagated-inputs
5096 `(("python-numpy" ,python-numpy)))
5097 (home-page "https://github.com/pydata/numexpr")
5098 (synopsis "Fast numerical expression evaluator for NumPy")
5099 (description
5100 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5101 expressions that operate on arrays are accelerated and use less memory than
5102 doing the same calculation in Python. In addition, its multi-threaded
5103 capabilities can make use of all your cores, which may accelerate
5104 computations, most specially if they are not memory-bounded (e.g. those using
5105 transcendental functions).")
5106 (license license:expat)))
5107
5108 (define-public python2-numexpr
5109 (package-with-python2 python-numexpr))
5110
5111 (define-public python-cycler
5112 (package
5113 (name "python-cycler")
5114 (version "0.10.0")
5115 (source (origin
5116 (method url-fetch)
5117 (uri (pypi-uri "cycler" version))
5118 (sha256
5119 (base32
5120 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5121 (build-system python-build-system)
5122 (arguments
5123 ;; XXX: The current version requires 'coveralls' which we don't have.
5124 ;; Enable this for the next release which uses 'python-pytest'.
5125 '(#:tests? #f))
5126 (propagated-inputs
5127 `(("python-six" ,python-six)))
5128 (home-page "https://matplotlib.org/cycler/")
5129 (synopsis "Composable keyword argument iterator")
5130 (description
5131 "When using @code{matplotlib} and plotting more than one line, it is
5132 common to want to be able to want to be able to cycle over one or more artist
5133 styles; but the plotting logic can quickly become involved.
5134 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5135 @code{Cycler} class was developed.")
5136 (license license:bsd-3)))
5137
5138 (define-public python2-cycler
5139 (package-with-python2 python-cycler))
5140
5141 (define-public python-colorspacious
5142 (package
5143 (name "python-colorspacious")
5144 (version "1.1.2")
5145 (source
5146 (origin
5147 (method git-fetch)
5148 (uri (git-reference
5149 (url "https://github.com/njsmith/colorspacious")
5150 (commit (string-append "v" version))))
5151 (file-name (git-file-name name version))
5152 (sha256
5153 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5154 (build-system python-build-system)
5155 (propagated-inputs
5156 `(("python-numpy" ,python-numpy)))
5157 (native-inputs
5158 `(("python-nose" ,python-nose)))
5159 (arguments
5160 `(#:phases
5161 (modify-phases %standard-phases
5162 (replace 'check
5163 (lambda _
5164 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5165 (home-page "https://github.com/njsmith/colorspacious")
5166 (synopsis "Python library for colorspace conversions")
5167 (description "@code{colorspacious} is a Python library that lets you
5168 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5169 (license license:expat)))
5170
5171 (define-public python2-colorspacious
5172 (package-with-python2 python-colorspacious))
5173
5174 (define-public python-matplotlib
5175 (package
5176 (name "python-matplotlib")
5177 (version "3.1.2")
5178 (source
5179 (origin
5180 (method url-fetch)
5181 (uri (pypi-uri "matplotlib" version))
5182 (sha256
5183 (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
5184 (patches
5185 (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
5186 (build-system python-build-system)
5187 (propagated-inputs ; the following packages are all needed at run time
5188 `(("python-cycler" ,python-cycler)
5189 ("python-kiwisolver" ,python-kiwisolver)
5190 ("python-pyparsing" ,python-pyparsing)
5191 ("python-pygobject" ,python-pygobject)
5192 ("gobject-introspection" ,gobject-introspection)
5193 ("python-tkinter" ,python "tk")
5194 ("python-dateutil" ,python-dateutil)
5195 ("python-numpy" ,python-numpy)
5196 ("python-pillow" ,python-pillow)
5197 ("python-pytz" ,python-pytz)
5198 ("python-six" ,python-six)
5199 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5200 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5201 ;; object. For this reason we need to import both libraries.
5202 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5203 ("python-pycairo" ,python-pycairo)
5204 ("python-cairocffi" ,python-cairocffi)))
5205 (inputs
5206 `(("libpng" ,libpng)
5207 ("freetype" ,freetype)
5208 ("cairo" ,cairo)
5209 ("glib" ,glib)
5210 ;; FIXME: Add backends when available.
5211 ;("python-wxpython" ,python-wxpython)
5212 ("tcl" ,tcl)
5213 ("tk" ,tk)))
5214 (native-inputs
5215 `(("pkg-config" ,pkg-config)
5216 ("python-pytest" ,python-pytest)
5217 ("python-mock" ,python-mock)
5218 ("unzip" ,unzip)
5219 ("jquery-ui"
5220 ,(origin
5221 (method url-fetch)
5222 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5223 (sha256
5224 (base32
5225 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5226 (arguments
5227 `(#:phases
5228 (modify-phases %standard-phases
5229 ;; XXX We disable all image comparison tests because we're using a
5230 ;; newer version of FreeType than matplotlib expects. This leads to
5231 ;; minor differences throughout the tests.
5232 (add-after 'unpack 'fix-and-disable-failing-tests
5233 (lambda _
5234 (substitute* (append (find-files "lib/matplotlib/tests/"
5235 "test_.*\\.py$")
5236 (find-files "lib/mpl_toolkits/tests"
5237 "test_.*\\.py$"))
5238 (("^from matplotlib" match)
5239 (string-append "import pytest\n" match))
5240 (("( *)@image_comparison" match indent)
5241 (string-append indent
5242 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5243 match)))
5244 (substitute* "lib/matplotlib/tests/test_animation.py"
5245 (("/bin/sh") (which "sh")))
5246 (for-each delete-file
5247 ;; test_normal_axes, test_get_tightbbox_polar
5248 '("lib/matplotlib/tests/test_axes.py"
5249 ;; We don't use the webagg backend and this test forces it.
5250 "lib/matplotlib/tests/test_backend_webagg.py"
5251 ;; test_outward_ticks
5252 "lib/matplotlib/tests/test_tightlayout.py"
5253 ;; test_hidden_axes fails with minor extent
5254 ;; differences, possibly due to the use of a
5255 ;; different version of FreeType.
5256 "lib/matplotlib/tests/test_constrainedlayout.py"
5257 ;; Fontconfig returns no fonts.
5258 "lib/matplotlib/tests/test_font_manager.py"))
5259 #t))
5260 (add-before 'install 'install-jquery-ui
5261 (lambda* (#:key outputs inputs #:allow-other-keys)
5262 (let ((dir (string-append (assoc-ref outputs "out")
5263 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5264 (mkdir-p dir)
5265 (invoke "unzip"
5266 (assoc-ref inputs "jquery-ui")
5267 "-d" dir))
5268 #t))
5269 (replace 'check
5270 (lambda* (#:key outputs inputs #:allow-other-keys)
5271 (add-installed-pythonpath inputs outputs)
5272 (invoke "python" "tests.py" "-v"
5273 "-m" "not network and not webagg")))
5274 (add-before 'build 'configure-environment
5275 (lambda* (#:key outputs inputs #:allow-other-keys)
5276 (let ((cairo (assoc-ref inputs "cairo")))
5277 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5278 ;; has not effect.
5279 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5280 (setenv "HOME" (getcwd))
5281 ;; Fix rounding errors when using the x87 FPU.
5282 (when (string-prefix? "i686" ,(%current-system))
5283 (setenv "CFLAGS" "-ffloat-store"))
5284 (call-with-output-file "setup.cfg"
5285 (lambda (port)
5286 (format port "[directories]~%
5287 basedirlist = ~a,~a~%
5288 [packages]~%
5289 tests = True~%"
5290 (assoc-ref inputs "tcl")
5291 (assoc-ref inputs "tk")))))
5292 #t)))))
5293 (home-page "https://matplotlib.org/")
5294 (synopsis "2D plotting library for Python")
5295 (description
5296 "Matplotlib is a Python 2D plotting library which produces publication
5297 quality figures in a variety of hardcopy formats and interactive environments
5298 across platforms. Matplotlib can be used in Python scripts, the python and
5299 ipython shell, web application servers, and six graphical user interface
5300 toolkits.")
5301 (license license:psfl)
5302 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5303
5304 (define-public python2-matplotlib
5305 (let ((matplotlib (package-with-python2
5306 (strip-python2-variant python-matplotlib))))
5307 (package (inherit matplotlib)
5308 (version "2.2.4")
5309 (source
5310 (origin
5311 (method url-fetch)
5312 (uri (pypi-uri "matplotlib" version))
5313 (sha256
5314 (base32
5315 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5316 (arguments
5317 (substitute-keyword-arguments (package-arguments matplotlib)
5318 ((#:phases phases)
5319 `(modify-phases ,phases
5320 (replace 'install-jquery-ui
5321 (lambda* (#:key outputs inputs #:allow-other-keys)
5322 (let ((dir (string-append (assoc-ref outputs "out")
5323 "/lib/python2.7/site-packages/"
5324 "matplotlib/backends/web_backend/")))
5325 (mkdir-p dir)
5326 (invoke "unzip"
5327 (assoc-ref inputs "jquery-ui")
5328 "-d" dir))
5329 #t))
5330 (delete 'fix-and-disable-failing-tests)
5331 (delete 'check))))) ; These tests weren't run the the past.
5332 ;; Make sure to use special packages for Python 2 instead
5333 ;; of those automatically rewritten by package-with-python2.
5334 (propagated-inputs
5335 `(("python2-pycairo" ,python2-pycairo)
5336 ("python2-backports-functools-lru-cache"
5337 ,python2-backports-functools-lru-cache)
5338 ("python2-functools32" ,python2-functools32)
5339 ("python2-pygobject-2" ,python2-pygobject-2)
5340 ("python2-subprocess32" ,python2-subprocess32)
5341 ("python2-tkinter" ,python-2 "tk")
5342 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5343 '("python-cairocffi"
5344 "python-pycairo"
5345 "python-pygobject"
5346 "python-tkinter")))))))
5347
5348 (define-public python-matplotlib-documentation
5349 (package
5350 (name "python-matplotlib-documentation")
5351 (version (package-version python-matplotlib))
5352 (source (package-source python-matplotlib))
5353 (build-system python-build-system)
5354 (native-inputs
5355 `(("python-matplotlib" ,python-matplotlib)
5356 ("python-colorspacious" ,python-colorspacious)
5357 ("python-sphinx" ,python-sphinx)
5358 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5359 ("python-sphinx-gallery" ,python-sphinx-gallery)
5360 ("python-numpydoc" ,python-numpydoc)
5361 ("python-ipython" ,python-ipython)
5362 ("python-ipykernel" ,python-ipykernel)
5363 ("python-mock" ,python-mock)
5364 ("graphviz" ,graphviz)
5365 ("texlive" ,(texlive-union (list texlive-amsfonts
5366 texlive-latex-amsmath
5367 texlive-latex-enumitem
5368 texlive-latex-expdlist
5369 texlive-latex-geometry
5370 texlive-latex-preview
5371 texlive-latex-type1cm
5372 texlive-latex-ucs
5373
5374 texlive-generic-pdftex
5375
5376 texlive-fonts-ec
5377 texlive-fonts-adobe-times
5378 texlive-fonts-txfonts)))
5379 ("texinfo" ,texinfo)
5380 ,@(package-native-inputs python-matplotlib)))
5381 (arguments
5382 `(#:tests? #f ; we're only generating documentation
5383 #:phases
5384 (modify-phases %standard-phases
5385 ;; The tests in python-matplotlib are run after the install phase, so
5386 ;; we need to delete the extra phase here.
5387 (delete 'check)
5388 (replace 'build
5389 (lambda _
5390 (chdir "doc")
5391 (setenv "PYTHONPATH"
5392 (string-append (getenv "PYTHONPATH")
5393 ":" (getcwd) "/../examples/units"))
5394 (substitute* "conf.py"
5395 ;; Don't use git.
5396 (("^SHA = check_output.*")
5397 (string-append "SHA = \"" ,version "\"\n"))
5398 ;; Don't fetch intersphinx files from the Internet
5399 (("^explicit_order_folders" m)
5400 (string-append "intersphinx_mapping = {}\n" m))
5401 (("'sphinx.ext.intersphinx',") "")
5402 ;; Disable URL embedding which requires internet access.
5403 (("'https://docs.scipy.org/doc/numpy'") "None")
5404 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5405 (invoke "make"
5406 "SPHINXBUILD=sphinx-build"
5407 "SPHINXOPTS=" ; don't abort on warnings
5408 "html" "texinfo")))
5409 (replace 'install
5410 (lambda* (#:key inputs outputs #:allow-other-keys)
5411 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5412 (doc (string-append data "/doc/python-matplotlib-" ,version))
5413 (info (string-append data "/info"))
5414 (html (string-append doc "/html")))
5415 (mkdir-p html)
5416 (mkdir-p info)
5417 (copy-recursively "build/html" html)
5418 (symlink (string-append html "/_images")
5419 (string-append info "/matplotlib-figures"))
5420 (with-directory-excursion "build/texinfo"
5421 (substitute* "matplotlib.texi"
5422 (("@image\\{([^,]*)" all file)
5423 (string-append "@image{matplotlib-figures/" file)))
5424 (symlink (string-append html "/_images")
5425 "./matplotlib-figures")
5426 (invoke "makeinfo" "--no-split"
5427 "-o" "matplotlib.info" "matplotlib.texi"))
5428 (install-file "build/texinfo/matplotlib.info" info))
5429 #t)))))
5430 (home-page (package-home-page python-matplotlib))
5431 (synopsis "Documentation for the python-matplotlib package")
5432 (description (package-description python-matplotlib))
5433 (license (package-license python-matplotlib))))
5434
5435 (define-public python2-matplotlib-documentation
5436 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5437 (package
5438 (inherit parent)
5439 (native-inputs
5440 (alist-delete "python-sphinx-copybutton"
5441 (package-native-inputs parent))))))
5442
5443 (define-public python-matplotlib-venn
5444 (package
5445 (name "python-matplotlib-venn")
5446 (version "0.11.5")
5447 (source
5448 (origin
5449 (method url-fetch)
5450 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5451 (sha256
5452 (base32
5453 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5454 (build-system python-build-system)
5455 (arguments '(#:tests? #f)) ; tests are not included
5456 (propagated-inputs
5457 `(("python-matplotlib" ,python-matplotlib)
5458 ("python-numpy" ,python-numpy)
5459 ("python-scipy" ,python-scipy)))
5460 (native-inputs
5461 `(("unzip" ,unzip)))
5462 (home-page "https://github.com/konstantint/matplotlib-venn")
5463 (synopsis "Plot area-proportional Venn diagrams")
5464 (description
5465 "This package provides tools for plotting area-proportional two- and
5466 three-way Venn diagrams in @code{matplotlib}.")
5467 (license license:expat)))
5468
5469 (define-public python-pysnptools
5470 (package
5471 (name "python-pysnptools")
5472 (version "0.4.11")
5473 (source
5474 (origin
5475 (method url-fetch)
5476 (uri (pypi-uri "pysnptools" version))
5477 (sha256
5478 (base32
5479 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5480 (build-system python-build-system)
5481 (arguments
5482 `(#:tests? #f ; no test data are included
5483 #:phases
5484 (modify-phases %standard-phases
5485 (replace 'check
5486 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5487 (if tests?
5488 (begin
5489 (add-installed-pythonpath inputs outputs)
5490 (invoke "python3" "pysnptools/test.py"))
5491 #t))))))
5492 (propagated-inputs
5493 `(("python-dill" ,python-dill)
5494 ("python-h5py" ,python-h5py)
5495 ("python-numpy" ,python-numpy)
5496 ("python-pandas" ,python-pandas)
5497 ("python-psutil" ,python-psutil)
5498 ("python-scipy" ,python-scipy)))
5499 (native-inputs
5500 `(("python-cython" ,python-cython)))
5501 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5502 (synopsis "Library for reading and manipulating genetic data")
5503 (description
5504 "PySnpTools is a library for reading and manipulating genetic data. It
5505 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5506 those files. It can also efficiently manipulate ranges of integers using set
5507 operators such as union, intersection, and difference.")
5508 (license license:asl2.0)))
5509
5510 (define-public python2-pysnptools
5511 (package-with-python2 python-pysnptools))
5512
5513 (define-public python-wurlitzer
5514 (package
5515 (name "python-wurlitzer")
5516 (version "2.0.1")
5517 (source
5518 (origin
5519 (method url-fetch)
5520 (uri (pypi-uri "wurlitzer" version))
5521 (sha256
5522 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5523 (build-system python-build-system)
5524 (arguments
5525 '(#:phases
5526 (modify-phases %standard-phases
5527 (replace 'check
5528 (lambda _
5529 (invoke "pytest" "-vv" "test.py"))))))
5530 (native-inputs
5531 `(("python-mock" ,python-mock)
5532 ("python-pytest" ,python-pytest)))
5533 (home-page "https://github.com/minrk/wurlitzer")
5534 (synopsis "Capture C-level output in context managers")
5535 (description
5536 "This library helps to redirect @code{sys.stdout} to a stream or a file
5537 while executing some piece of code, including C code running within a Python
5538 process.")
5539 (license license:expat)))
5540
5541 (define-public python-socksipy-branch
5542 (package
5543 (name "python-socksipy-branch")
5544 (version "1.01")
5545 (source
5546 (origin
5547 (method url-fetch)
5548 (uri (pypi-uri "SocksiPy-branch" version))
5549 (sha256
5550 (base32
5551 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5552 (build-system python-build-system)
5553 (arguments
5554 `(#:tests? #f)) ; There are no tests
5555 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5556 (synopsis "Python SOCKS module")
5557 (description
5558 "SocksiPy - A Python SOCKS client module. It provides a
5559 socket-like interface that supports connections to any TCP
5560 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5561 The original version was developed by Dan Haim, this is a
5562 branch created by Mario Vilas to address some open issues,
5563 as the original project seems to have been abandoned circa 2007.")
5564 (license license:bsd-3)))
5565
5566 (define-public python2-socksipy-branch
5567 (package-with-python2 python-socksipy-branch))
5568
5569 (define-public python-socksipychain
5570 (package
5571 (name "python-socksipychain")
5572 (version "2.1.2")
5573 (source
5574 (origin
5575 (method git-fetch)
5576 (uri (git-reference
5577 (url "https://github.com/pagekite/PySocksipyChain")
5578 (commit (string-append "v" version))))
5579 (file-name (git-file-name name version))
5580 (sha256
5581 (base32
5582 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5583 (build-system python-build-system)
5584 (arguments
5585 `(#:tests? #f)) ; Tests try to access the network.
5586 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5587 (synopsis "Python SOCKS module with chained proxies support")
5588 (description
5589 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5590 adds support for arbitrary chaining of proxy servers and various modes of
5591 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5592 a simple netcat replacement with chaining support.")
5593 (license license:bsd-3)))
5594
5595 (define-public python-pycodestyle
5596 (package
5597 (name "python-pycodestyle")
5598 (version "2.7.0")
5599 (source
5600 (origin
5601 (method url-fetch)
5602 (uri (pypi-uri "pycodestyle" version))
5603 (sha256
5604 (base32
5605 "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
5606 (build-system python-build-system)
5607 (arguments
5608 `(#:phases
5609 (modify-phases %standard-phases
5610 (replace 'check
5611 (lambda _
5612 (invoke "pytest" "-vv"))))))
5613 (native-inputs
5614 `(("python-pytest" ,python-pytest)))
5615 (home-page "https://pycodestyle.readthedocs.io/")
5616 (synopsis "Python style guide checker")
5617 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5618 Python code against some of the style conventions in
5619 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5620 (license license:expat)))
5621
5622 (define-public python2-pycodestyle
5623 (package-with-python2 python-pycodestyle))
5624
5625 (define-public python-multidict
5626 (package
5627 (name "python-multidict")
5628 (version "4.7.5")
5629 (source
5630 (origin
5631 (method url-fetch)
5632 (uri (pypi-uri "multidict" version))
5633 (sha256
5634 (base32
5635 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5636 (build-system python-build-system)
5637 (arguments
5638 '(#:modules ((ice-9 ftw)
5639 (srfi srfi-1)
5640 (srfi srfi-26)
5641 (guix build utils)
5642 (guix build python-build-system))
5643 #:phases (modify-phases %standard-phases
5644 (replace 'check
5645 (lambda* (#:key tests? #:allow-other-keys)
5646 (if tests?
5647 (begin
5648 (let ((libdir (find (cut string-prefix? "lib." <>)
5649 (scandir "build"))))
5650 (setenv "PYTHONPATH"
5651 (string-append "./build/" libdir ":"
5652 (getenv "PYTHONPATH")))
5653 (invoke "pytest" "-vv")))
5654 (format #t "test suite not run~%"))
5655 #t)))))
5656 (native-inputs
5657 `(("python-pytest" ,python-pytest)
5658 ("python-pytest-cov" ,python-pytest-cov)))
5659 (home-page "https://github.com/aio-libs/multidict/")
5660 (synopsis "Multidict implementation")
5661 (description "Multidict is dict-like collection of key-value pairs
5662 where key might be occurred more than once in the container.")
5663 (license license:asl2.0)))
5664
5665 (define-public python-orderedmultidict
5666 (package
5667 (name "python-orderedmultidict")
5668 (version "1.0")
5669 (source
5670 (origin
5671 (method url-fetch)
5672 (uri (pypi-uri "orderedmultidict" version))
5673 (sha256
5674 (base32
5675 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5676 (build-system python-build-system)
5677 (arguments
5678 `(#:phases
5679 (modify-phases %standard-phases
5680 (add-after 'unpack 'fix-tests
5681 (lambda _
5682 ;; The package uses nosetest for running the tests.
5683 ;; Adding this initfile allows to run the test suite
5684 ;; without requiring nosetest.
5685 (with-output-to-file "tests/__init__.py" newline)
5686 #t)))))
5687 (propagated-inputs
5688 `(("python-six" ,python-six)))
5689 (native-inputs
5690 `(("python-pycodestyle" ,python-pycodestyle)))
5691 (home-page "https://github.com/gruns/orderedmultidict")
5692 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5693 (description "This package contains a library for ordered multivalue
5694 dictionaries. A multivalue dictionary is a dictionary that can store
5695 multiple values for the same key. An ordered multivalue dictionary is a
5696 multivalue dictionary that retains the order of insertions and deletions.")
5697 (license license:unlicense)))
5698
5699 (define-public python2-orderedmultidict
5700 (package-with-python2 python-orderedmultidict))
5701
5702 (define-public python-autopep8
5703 (package
5704 (name "python-autopep8")
5705 (version "1.5.3")
5706 (source
5707 (origin
5708 (method url-fetch)
5709 (uri (pypi-uri "autopep8" version))
5710 (sha256
5711 (base32
5712 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5713 (build-system python-build-system)
5714 (propagated-inputs
5715 `(("python-pycodestyle" ,python-pycodestyle)
5716 ("python-toml" ,python-toml)))
5717 (home-page "https://github.com/hhatto/autopep8")
5718 (synopsis "Format Python code according to the PEP 8 style guide")
5719 (description
5720 "@code{autopep8} automatically formats Python code to conform to
5721 the PEP 8 style guide. It uses the pycodestyle utility to determine
5722 what parts of the code needs to be formatted. @code{autopep8} is
5723 capable of fixing most of the formatting issues that can be reported
5724 by pycodestyle.")
5725 (license (license:non-copyleft
5726 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5727
5728 (define-public python2-autopep8
5729 (package-with-python2 python-autopep8))
5730
5731 (define-public python-distlib
5732 (package
5733 (name "python-distlib")
5734 (version "0.3.0")
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (pypi-uri "distlib" version ".zip"))
5739 (sha256
5740 (base32
5741 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5742 (build-system python-build-system)
5743 (arguments
5744 `(#:phases
5745 (modify-phases %standard-phases
5746 (add-before 'build 'no-/bin/sh
5747 (lambda _
5748 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5749 (("/bin/sh") (which "sh")))
5750 #t))
5751 (add-before 'check 'prepare-test-env
5752 (lambda _
5753 (setenv "HOME" "/tmp")
5754 ;; NOTE: Any value works, the variable just has to be present.
5755 (setenv "SKIP_ONLINE" "1")
5756 #t)))))
5757 (native-inputs `(("unzip" ,unzip)))
5758 (home-page "https://bitbucket.org/pypa/distlib")
5759 (synopsis "Distribution utilities")
5760 (description "Distlib is a library which implements low-level functions that
5761 relate to packaging and distribution of Python software. It is intended to be
5762 used as the basis for third-party packaging tools.")
5763 (license license:psfl)))
5764
5765 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
5766 (define-public python-distlib/next
5767 (package
5768 (inherit python-distlib)
5769 (version "0.3.1")
5770 (source
5771 (origin
5772 (method url-fetch)
5773 (uri (pypi-uri "distlib" version ".zip"))
5774 (sha256
5775 (base32
5776 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
5777
5778 (define-public python-distutils-extra
5779 (package
5780 (name "python-distutils-extra")
5781 (version "2.38")
5782 (source
5783 (origin
5784 (method url-fetch)
5785 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5786 version "/+download/python-distutils-extra-"
5787 version ".tar.gz"))
5788 (sha256
5789 (base32
5790 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5791 (build-system python-build-system)
5792 (home-page "https://launchpad.net/python-distutils-extra/")
5793 (synopsis "Enhancements to Python's distutils")
5794 (description
5795 "The python-distutils-extra module enables you to easily integrate
5796 gettext support, themed icons, and scrollkeeper-based documentation into
5797 Python's distutils.")
5798 (license license:gpl2)))
5799
5800 (define-public python2-distutils-extra
5801 (package-with-python2 python-distutils-extra))
5802
5803 (define-public python2-elib.intl
5804 (package
5805 (name "python2-elib.intl")
5806 (version "0.0.3")
5807 (source
5808 (origin
5809 ;; This project doesn't tag releases or publish tarballs, so we take
5810 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5811 (method git-fetch)
5812 (uri (git-reference
5813 (url "https://github.com/dieterv/elib.intl")
5814 (commit "d09997cfef")))
5815 (file-name (string-append name "-" version "-checkout"))
5816 (sha256
5817 (base32
5818 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5819 (build-system python-build-system)
5820 (arguments
5821 ;; incompatible with Python 3 (exception syntax)
5822 `(#:python ,python-2
5823 #:tests? #f))
5824 (home-page "https://github.com/dieterv/elib.intl")
5825 (synopsis "Enhanced internationalization for Python")
5826 (description
5827 "The elib.intl module provides enhanced internationalization (I18N)
5828 services for your Python modules and applications.")
5829 (license license:lgpl3+)))
5830
5831 (define-public python-olefile
5832 (package
5833 (name "python-olefile")
5834 (version "0.46")
5835 (source
5836 (origin
5837 (method url-fetch)
5838 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5839 "download/v" version "/olefile-" version ".tar.gz"))
5840 (file-name (string-append name "-" version ".tar.gz"))
5841 (sha256
5842 (base32
5843 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5844 (build-system python-build-system)
5845 (home-page "https://www.decalage.info/python/olefileio")
5846 (synopsis "Read and write Microsoft OLE2 files.")
5847 (description
5848 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5849 Storage or Compound Document, Microsoft Office). It is an improved version of
5850 the OleFileIO module from PIL, the Python Image Library.")
5851 (license license:bsd-3)))
5852
5853 (define-public python2-olefile
5854 (package-with-python2 python-olefile))
5855
5856 (define-public python-pikepdf
5857 (package
5858 (name "python-pikepdf")
5859 (version "2.10.0")
5860 (source
5861 (origin
5862 (method url-fetch)
5863 (uri (pypi-uri "pikepdf" version))
5864 (sha256
5865 (base32 "09wfj1hjvj3r9gv7ywrqd7h3d0bz64bvils8sm3ghj90jhalb03s"))))
5866 (build-system python-build-system)
5867 (arguments
5868 `(#:tests? #false)) ;require python-xmp-toolkit
5869 (native-inputs
5870 `(("pybind11" ,pybind11)
5871 ("python-setuptools" ,python-setuptools)
5872 ("python-setuptools-scm" ,python-setuptools-scm/next)
5873 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
5874 ("python-toml" ,python-toml)
5875 ("python-wheel" ,python-wheel)))
5876 (inputs
5877 `(("qpdf" ,qpdf)))
5878 (propagated-inputs
5879 `(("python-lxml" ,python-lxml)
5880 ("python-pillow" ,python-pillow)))
5881 (home-page "https://github.com/pikepdf/pikepdf")
5882 (synopsis "Read and write PDFs with Python")
5883 (description
5884 "pikepdf is a Python library for reading and writing PDF files.")
5885 (license license:mpl2.0)))
5886
5887 (define-public python-pillow
5888 (package
5889 (name "python-pillow")
5890 (version "8.1.1")
5891 (source
5892 (origin
5893 (method url-fetch)
5894 (uri (pypi-uri "Pillow" version))
5895 (sha256
5896 (base32
5897 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
5898 (build-system python-build-system)
5899 (native-inputs
5900 `(("python-pytest" ,python-pytest)))
5901 (inputs
5902 `(("freetype" ,freetype)
5903 ("lcms" ,lcms)
5904 ("libjpeg" ,libjpeg-turbo)
5905 ("libtiff" ,libtiff)
5906 ("libwebp" ,libwebp)
5907 ("openjpeg" ,openjpeg)
5908 ("zlib" ,zlib)))
5909 (propagated-inputs
5910 `(("python-olefile" ,python-olefile)))
5911 (arguments
5912 `(#:phases
5913 (modify-phases %standard-phases
5914 (add-after 'unpack 'patch-ldconfig
5915 (lambda _
5916 (substitute* "setup.py"
5917 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5918 (replace 'check
5919 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5920 (if tests?
5921 (begin
5922 (setenv "HOME" (getcwd))
5923 ;; Make installed package available for running the tests.
5924 (add-installed-pythonpath inputs outputs)
5925 (invoke "python" "selftest.py" "--installed")
5926 (invoke "python" "-m" "pytest" "-vv"))
5927 #t))))))
5928 (home-page "https://python-pillow.org")
5929 (synopsis "Fork of the Python Imaging Library")
5930 (description
5931 "The Python Imaging Library adds image processing capabilities to your
5932 Python interpreter. This library provides extensive file format support, an
5933 efficient internal representation, and fairly powerful image processing
5934 capabilities. The core image library is designed for fast access to data
5935 stored in a few basic pixel formats. It should provide a solid foundation for
5936 a general image processing tool.")
5937 (properties `((python2-variant . ,(delay python2-pillow))))
5938 (license (license:x11-style
5939 "http://www.pythonware.com/products/pil/license.htm"
5940 "The PIL Software License"))))
5941
5942 (define-public python2-pillow
5943 (package-with-python2
5944 (package
5945 (inherit (strip-python2-variant python-pillow))
5946 ;; Version 6 is the last series with Python 2 support.
5947 (version "6.2.2")
5948 (source
5949 (origin
5950 (method url-fetch)
5951 (uri (pypi-uri "Pillow" version))
5952 (sha256
5953 (base32
5954 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
5955
5956 (define-public python-pillow-2.9
5957 (package
5958 (inherit python-pillow)
5959 (version "2.9.0")
5960 (source
5961 (origin
5962 (method url-fetch)
5963 (uri (pypi-uri "Pillow" version))
5964 (sha256
5965 (base32
5966 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5967 (arguments
5968 (substitute-keyword-arguments (package-arguments python-pillow)
5969 ((#:tests? _ #f) #f)))
5970 (properties '((hidden? #t)))))
5971
5972 (define-public python-pillow-simd
5973 (package
5974 (inherit python-pillow)
5975 (name "python-pillow-simd")
5976 (version "7.1.2")
5977 ;; The PyPI tarball does not include test files.
5978 (source
5979 (origin
5980 (method git-fetch)
5981 (uri (git-reference
5982 (url "https://github.com/uploadcare/pillow-simd")
5983 (commit version)))
5984 (file-name (git-file-name name version))
5985 (sha256
5986 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
5987 (arguments
5988 (substitute-keyword-arguments
5989 (package-arguments python-pillow)
5990 ((#:phases phases)
5991 `(modify-phases ,phases
5992 (add-after 'unpack 'make-tests-writable
5993 (lambda _
5994 (for-each make-file-writable (find-files "Tests"))
5995 #t))))))
5996 (inputs
5997 `(("libraqm" ,libraqm)
5998 ("libimagequant" ,libimagequant)
5999 ,@(package-inputs python-pillow)))
6000 (home-page "https://github.com/uploadcare/pillow-simd")
6001 (synopsis "Fork of the Python Imaging Library (Pillow)")
6002 (description "This package is a fork of Pillow which adds support for SIMD
6003 parallelism.")))
6004
6005 (define-public python-roifile
6006 (package
6007 (name "python-roifile")
6008 (version "2020.5.28")
6009 (source
6010 (origin
6011 (method url-fetch)
6012 (uri (pypi-uri "roifile" version))
6013 (sha256
6014 (base32
6015 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
6016 (build-system python-build-system)
6017 (arguments `(#:tests? #f)) ; there are none
6018 (propagated-inputs
6019 `(("python-numpy" ,python-numpy)))
6020 (home-page "https://www.lfd.uci.edu/~gohlke/")
6021 (synopsis "Read and write ImageJ ROI format")
6022 (description "Roifile is a Python library to read, write, create, and plot
6023 ImageJ ROIs, an undocumented and ImageJ application specific format to store
6024 regions of interest, geometric shapes, paths, text, etc for image overlays.")
6025 (license license:bsd-3)))
6026
6027 (define-public python-tifffile
6028 (package
6029 (name "python-tifffile")
6030 (version "2020.6.3")
6031 (source
6032 (origin
6033 (method url-fetch)
6034 (uri (pypi-uri "tifffile" version))
6035 (sha256
6036 (base32
6037 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
6038 (build-system python-build-system)
6039 ;; Tests require lfdfiles, which depends on tifffile
6040 (arguments `(#:tests? #f))
6041 (propagated-inputs
6042 `(("python-numpy" ,python-numpy)
6043 ;;("python-lfdfiles" ,python-lfdfiles)
6044 ("python-roifile" ,python-roifile)))
6045 (home-page "https://www.lfd.uci.edu/~gohlke/")
6046 (synopsis "Read and write TIFF(r) files")
6047 (description "This package lets you read image and metadata from many
6048 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6049 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6050 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6051 (license license:bsd-3)))
6052
6053 (define-public python-lfdfiles
6054 (package
6055 (name "python-lfdfiles")
6056 (version "2020.1.1")
6057 (source
6058 (origin
6059 (method url-fetch)
6060 (uri (pypi-uri "lfdfiles" version))
6061 (sha256
6062 (base32
6063 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
6064 (build-system python-build-system)
6065 (propagated-inputs
6066 `(("python-click" ,python-click)
6067 ("python-numpy" ,python-numpy)
6068 ("python-tifffile" ,python-tifffile)))
6069 (home-page "https://www.lfd.uci.edu/~gohlke/")
6070 (synopsis "Work with LFD data files")
6071 (description
6072 "Lfdfiles is a Python library and console script for reading, writing,
6073 converting, and viewing many of the proprietary file formats used to store
6074 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6075 (license license:bsd-3)))
6076
6077 (define-public python-imageio
6078 (package
6079 (name "python-imageio")
6080 (version "2.8.0")
6081 (source
6082 (origin
6083 (method url-fetch)
6084 (uri (pypi-uri "imageio" version))
6085 (sha256
6086 (base32
6087 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6088 (build-system python-build-system)
6089 (arguments
6090 `(#:tests? #f ; many tests require online data
6091 #:phases
6092 (modify-phases %standard-phases
6093 (replace 'check
6094 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6095 (if tests?
6096 (begin
6097 ;; Make installed package available for running the tests.
6098 (add-installed-pythonpath inputs outputs)
6099 (invoke "pytest" "-vv"))
6100 #t))))))
6101 (propagated-inputs
6102 `(("python-numpy" ,python-numpy)
6103 ("python-pillow" ,python-pillow)
6104 ("python-psutil" ,python-psutil)))
6105 (native-inputs
6106 `(("python-pytest" ,python-pytest)))
6107 (home-page "https://imageio.github.io/")
6108 (synopsis "Library for reading and writing a wide range of image data")
6109 (description
6110 "Imageio is a Python library that provides an easy interface to read and
6111 write a wide range of image data, including animated images, video, volumetric
6112 data, and scientific formats.")
6113 (license license:bsd-2)))
6114
6115 (define-public python-pycparser
6116 (package
6117 (name "python-pycparser")
6118 (version "2.20")
6119 (source
6120 (origin
6121 (method url-fetch)
6122 (uri (pypi-uri "pycparser" version))
6123 (sha256
6124 (base32
6125 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6126 (outputs '("out" "doc"))
6127 (build-system python-build-system)
6128 (native-inputs
6129 `(("pkg-config" ,pkg-config)))
6130 (arguments
6131 `(#:phases
6132 (modify-phases %standard-phases
6133 (replace 'check
6134 (lambda _
6135 (with-directory-excursion "tests"
6136 (invoke "python" "all_tests.py"))
6137 #t))
6138 (add-after 'install 'install-doc
6139 (lambda* (#:key outputs #:allow-other-keys)
6140 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6141 (doc (string-append data "/doc/" ,name "-" ,version))
6142 (examples (string-append doc "/examples")))
6143 (mkdir-p examples)
6144 (for-each (lambda (file)
6145 (copy-file (string-append "." file)
6146 (string-append doc file)))
6147 '("/README.rst" "/CHANGES" "/LICENSE"))
6148 (copy-recursively "examples" examples)
6149 #t))))))
6150 (home-page "https://github.com/eliben/pycparser")
6151 (synopsis "C parser in Python")
6152 (description
6153 "Pycparser is a complete parser of the C language, written in pure Python
6154 using the PLY parsing library. It parses C code into an AST and can serve as
6155 a front-end for C compilers or analysis tools.")
6156 (license license:bsd-3)))
6157
6158 (define-public python2-pycparser
6159 (package-with-python2 python-pycparser))
6160
6161 (define-public python-xlsxwriter
6162 (package
6163 (name "python-xlsxwriter")
6164 (version "1.3.7")
6165 (source
6166 (origin
6167 ;; There are no tests in the PyPI tarball.
6168 (method git-fetch)
6169 (uri (git-reference
6170 (url "https://github.com/jmcnamara/XlsxWriter")
6171 (commit (string-append "RELEASE_" version))))
6172 (file-name (git-file-name name version))
6173 (sha256
6174 (base32 "1qg40r2mwrqfmhaxnary1cfgi0dwwazp5qga7c9p2cdji2v0x5rm"))))
6175 (build-system python-build-system)
6176 (home-page "https://github.com/jmcnamara/XlsxWriter")
6177 (synopsis "Python module for creating Excel XLSX files")
6178 (description
6179 "XlsxWriter is a Python module that can be used to write text, numbers,
6180 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
6181 (license license:bsd-2)))
6182
6183 (define-public python-pywavelets
6184 (package
6185 (name "python-pywavelets")
6186 (version "1.1.1")
6187 (home-page "https://github.com/PyWavelets/pywt")
6188 (source (origin
6189 (method url-fetch)
6190 (uri (pypi-uri "PyWavelets" version))
6191 (sha256
6192 (base32
6193 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6194 (build-system python-build-system)
6195 (arguments
6196 '(#:modules ((ice-9 ftw)
6197 (srfi srfi-1)
6198 (srfi srfi-26)
6199 (guix build utils)
6200 (guix build python-build-system))
6201 #:phases
6202 (modify-phases %standard-phases
6203 (replace 'check
6204 (lambda _
6205 (let ((cwd (getcwd))
6206 (libdir (find (cut string-prefix? "lib." <>)
6207 (scandir "build"))))
6208 (with-directory-excursion (string-append cwd "/build/" libdir)
6209 (invoke "pytest" "-vv"))))))))
6210 (native-inputs
6211 `(("python-matplotlib" ,python-matplotlib) ;for tests
6212 ("python-pytest" ,python-pytest)))
6213 (propagated-inputs
6214 `(("python-numpy" ,python-numpy)))
6215 (synopsis "Wavelet transforms in Python")
6216 (description
6217 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6218 mathematical basis functions that are localized in both time and frequency.
6219 Wavelet transforms are time-frequency transforms employing wavelets. They are
6220 similar to Fourier transforms, the difference being that Fourier transforms are
6221 localized only in frequency instead of in time and frequency.")
6222 (license license:expat)))
6223
6224 (define-public python-pywal
6225 (package
6226 (name "python-pywal")
6227 (version "3.3.0")
6228 (source
6229 (origin
6230 (method git-fetch)
6231 (uri (git-reference
6232 (url "https://github.com/dylanaraps/pywal")
6233 (commit version)))
6234 (file-name (git-file-name name version))
6235 (sha256
6236 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
6237 (build-system python-build-system)
6238 (arguments
6239 `(#:phases
6240 (modify-phases %standard-phases
6241 (add-before 'check 'fix-home-directory
6242 (lambda _
6243 ;; Tests fail with "Permission denied: '/homeless-shelter'".
6244 (setenv "HOME" "/tmp")
6245 #t)))))
6246 (inputs
6247 `(("imagemagick" ,imagemagick)))
6248 (home-page "https://github.com/dylanaraps/pywal")
6249 (synopsis "Color palette generator and applicator")
6250 (description
6251 "Pywal is a tool that generates a color palette from the dominant colors
6252 in an image. It then applies the colors system-wide and on-the-fly in all of
6253 your favourite programs.")
6254 (license license:expat)))
6255
6256 (define-public python-pywinrm
6257 (package
6258 (name "python-pywinrm")
6259 (version "0.4.1")
6260 (source
6261 (origin
6262 (method url-fetch)
6263 (uri (pypi-uri "pywinrm" version))
6264 (sha256
6265 (base32
6266 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6267 (build-system python-build-system)
6268 (propagated-inputs
6269 `(("python-six" ,python-six)
6270 ("python-requests_ntlm" ,python-requests_ntlm)
6271 ("python-xmltodict" ,python-xmltodict)
6272 ("python-kerberos" ,python-kerberos)))
6273 (native-inputs
6274 `(("python-mock" ,python-mock)
6275 ("python-pytest" ,python-pytest)))
6276 (home-page "https://github.com/diyan/pywinrm/")
6277 (synopsis
6278 "Python library for Windows Remote Management (WinRM)")
6279 (description
6280 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6281 service. It allows you to invoke commands on target Windows machines from
6282 any machine that can run Python.")
6283 (license license:expat)))
6284
6285 (define-public python-xcffib
6286 (package
6287 (name "python-xcffib")
6288 (version "0.6.0")
6289 (source
6290 (origin
6291 (method url-fetch)
6292 (uri (pypi-uri "xcffib" version))
6293 (sha256
6294 (base32
6295 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6296 (build-system python-build-system)
6297 (inputs
6298 `(("libxcb" ,libxcb)))
6299 (propagated-inputs
6300 `(("python-cffi" ,python-cffi) ; used at run time
6301 ("python-six" ,python-six)))
6302 (arguments
6303 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6304 #:tests? #f
6305 #:phases
6306 (modify-phases %standard-phases
6307 (add-after 'unpack 'fix-libxcb-path
6308 (lambda* (#:key inputs #:allow-other-keys)
6309 (let ((libxcb (assoc-ref inputs "libxcb")))
6310 (substitute* '("xcffib/__init__.py")
6311 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6312 #t)))
6313 (add-after 'install 'install-doc
6314 (lambda* (#:key outputs #:allow-other-keys)
6315 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6316 "/doc/" ,name "-" ,version)))
6317 (mkdir-p doc)
6318 (copy-file "README.md"
6319 (string-append doc "/README.md"))
6320 #t))))))
6321 (home-page "https://github.com/tych0/xcffib")
6322 (synopsis "XCB Python bindings")
6323 (description
6324 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6325 support for Python 3 and PyPy. It is based on cffi.")
6326 (license license:expat)))
6327
6328 (define-public python2-xcffib
6329 (package-with-python2 python-xcffib))
6330
6331 (define-public python-cairocffi
6332 (package
6333 (name "python-cairocffi")
6334 (version "1.2.0")
6335 (source
6336 (origin
6337 ;; The PyPI archive does not include the documentation, so use Git.
6338 (method git-fetch)
6339 (uri (git-reference
6340 (url "https://github.com/Kozea/cairocffi")
6341 (commit (string-append "v" version))))
6342 (file-name (git-file-name name version))
6343 (sha256
6344 (base32
6345 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6346 (build-system python-build-system)
6347 (outputs '("out" "doc"))
6348 (inputs
6349 `(("glib" ,glib)
6350 ("gtk+" ,gtk+)
6351 ("gdk-pixbuf" ,gdk-pixbuf)
6352 ("cairo" ,cairo)))
6353 (native-inputs
6354 `(("python-numpy" ,python-numpy)
6355 ("python-pytest" ,python-pytest)
6356 ("python-pytest-cov" ,python-pytest-cov)
6357 ("python-pytest-runner" ,python-pytest-runner)
6358 ("python-sphinx" ,python-sphinx)
6359 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6360 (propagated-inputs
6361 `(("python-xcffib" ,python-xcffib))) ; used at run time
6362 (arguments
6363 `(#:phases
6364 (modify-phases %standard-phases
6365 (add-after 'unpack 'patch-paths
6366 (lambda* (#:key inputs #:allow-other-keys)
6367 (substitute* "cairocffi/__init__.py"
6368 ;; Hack the dynamic library loading mechanism.
6369 (("find_library\\(library_name\\)")
6370 "\"found\"")
6371 (("filenames = \\(library_filename,\\) \\+ filenames")
6372 "pass")
6373 (("libcairo.so.2")
6374 (string-append (assoc-ref inputs "cairo")
6375 "/lib/libcairo.so.2")))
6376 (substitute* "cairocffi/pixbuf.py"
6377 (("libgdk_pixbuf-2.0.so.0")
6378 (string-append (assoc-ref inputs "gdk-pixbuf")
6379 "/lib/libgdk_pixbuf-2.0.so.0"))
6380 (("libgobject-2.0.so.0")
6381 (string-append (assoc-ref inputs "glib")
6382 "/lib/libgobject-2.0.so.0"))
6383 (("libglib-2.0.so.0")
6384 (string-append (assoc-ref inputs "glib")
6385 "/lib/libglib-2.0.so.0"))
6386 (("libgdk-3.so.0")
6387 (string-append (assoc-ref inputs "gtk+")
6388 "/lib/libgdk-3.so.0")))
6389 #t))
6390 (add-after 'unpack 'disable-linters
6391 ;; Their check fails; none of our business.
6392 (lambda _
6393 (substitute* "setup.cfg"
6394 ((".*pytest-flake8.*") "")
6395 ((".*pytest-isort.*") "")
6396 (("--flake8") "")
6397 (("--isort") ""))
6398 #t))
6399 (add-after 'install 'install-doc
6400 (lambda* (#:key inputs outputs #:allow-other-keys)
6401 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6402 (doc (string-append data "/doc/" ,name "-" ,version))
6403 (html (string-append doc "/html")))
6404 (setenv "LD_LIBRARY_PATH"
6405 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6406 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6407 (setenv "LANG" "en_US.UTF-8")
6408 (mkdir-p html)
6409 (for-each (lambda (file)
6410 (copy-file (string-append "." file)
6411 (string-append doc file)))
6412 '("/README.rst" "/NEWS.rst"))
6413 (system* "python" "setup.py" "build_sphinx")
6414 (copy-recursively "docs/_build/html" html)
6415 #t))))))
6416 (home-page "https://github.com/Kozea/cairocffi")
6417 (synopsis "Python bindings and object-oriented API for Cairo")
6418 (description
6419 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6420 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6421 graphics library with support for multiple backends including image buffers,
6422 PNG, PostScript, PDF, and SVG file output.")
6423 (license license:bsd-3)))
6424
6425 (define-public python-decorator
6426 (package
6427 (name "python-decorator")
6428 (version "4.3.0")
6429 (source
6430 (origin
6431 (method url-fetch)
6432 (uri (pypi-uri "decorator" version))
6433 (sha256
6434 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6435 (build-system python-build-system)
6436 (home-page "https://pypi.org/project/decorator/")
6437 (synopsis "Python module to simplify usage of decorators")
6438 (description
6439 "The aim of the decorator module is to simplify the usage of decorators
6440 for the average programmer, and to popularize decorators usage giving examples
6441 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6442 etc. The core of this module is a decorator factory.")
6443 (license license:expat)))
6444
6445 (define-public python2-decorator
6446 (package-with-python2 python-decorator))
6447
6448 (define-public python-drmaa
6449 (package
6450 (name "python-drmaa")
6451 (version "0.7.7")
6452 (source
6453 (origin
6454 (method url-fetch)
6455 (uri (pypi-uri "drmaa" version))
6456 (sha256
6457 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6458 (build-system python-build-system)
6459 ;; The test suite requires libdrmaa which is provided by the cluster
6460 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6461 ;; should be set to the path of the libdrmaa library.
6462 (arguments '(#:tests? #f))
6463 (native-inputs
6464 `(("python-nose" ,python-nose)))
6465 (home-page "https://pypi.org/project/drmaa/")
6466 (synopsis "Python bindings for the DRMAA library")
6467 (description
6468 "A Python package for Distributed Resource Management (DRM) job
6469 submission and control. This package is an implementation of the DRMAA 1.0
6470 Python language binding specification.")
6471 (license license:bsd-3)))
6472
6473 (define-public python2-drmaa
6474 (package-with-python2 python-drmaa))
6475
6476 (define-public python-grako
6477 (package
6478 (name "python-grako")
6479 (version "3.99.9")
6480 (source
6481 (origin
6482 (method url-fetch)
6483 (uri
6484 (pypi-uri "grako" version ".zip"))
6485 (sha256
6486 (base32
6487 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6488 (build-system python-build-system)
6489 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6490 (native-inputs
6491 `(("unzip" ,unzip)
6492 ("python-pytest" ,python-pytest)
6493 ("python-pytest-runner" ,python-pytest-runner)))
6494 (home-page "https://bitbucket.org/neogeny/grako")
6495 (synopsis "EBNF parser generator")
6496 (description
6497 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6498 memoizing PEG/Packrat parser in Python.")
6499 (license license:bsd-3)))
6500
6501 (define-public python2-grako
6502 (package-with-python2 python-grako))
6503
6504 (define-public python-grandalf
6505 (package
6506 (name "python-grandalf")
6507 (version "0.7")
6508 (source
6509 (origin
6510 ;; There's no source tarball on PyPI.
6511 (method git-fetch)
6512 (uri (git-reference
6513 (url "https://github.com/bdcht/grandalf")
6514 (commit (string-append "v" version))))
6515 (file-name (git-file-name name version))
6516 (sha256
6517 (base32
6518 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6519 (build-system python-build-system)
6520 (arguments
6521 '(#:phases
6522 (modify-phases %standard-phases
6523 (replace 'check
6524 (lambda _
6525 (invoke "python" "setup.py" "pytest"))))))
6526 (native-inputs
6527 `(("python-pytest" ,python-pytest)
6528 ("python-pytest-runner" ,python-pytest-runner)))
6529 (propagated-inputs
6530 `(("python-numpy" ,python-numpy)
6531 ("python-ply" ,python-ply)))
6532 (home-page "https://github.com/bdcht/grandalf")
6533 (synopsis "Graph and drawing algorithms framework")
6534 (description
6535 "Grandalf is a Python package made for experimentations with graphs
6536 drawing algorithms. It is written in pure Python, and currently implements
6537 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6538 minimization approach. While not as fast or featured as graphviz or other
6539 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6540 than thousands of nodes, while keeping the source code simple enough to tweak
6541 and hack any part of it for experimental purpose. With a total of about 1500
6542 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6543 in less than 600 lines. The energy minimization approach is comprised of only
6544 250 lines!
6545
6546 Grandalf does only 2 not-so-simple things:
6547 @itemize
6548 @item computing the nodes (x,y) coordinates (based on provided nodes
6549 dimensions, and a chosen layout)
6550 @item routing the edges with lines or nurbs
6551 @end itemize
6552
6553 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6554 will help you find where to draw things like nodes and edges, but it’s up to
6555 you to actually draw things with your favorite toolkit.")
6556 ;; The user can choose either license.
6557 (license (list license:gpl2 license:epl1.0))))
6558
6559 (define-public python-gridmap
6560 (package
6561 (name "python-gridmap")
6562 (version "0.14.0")
6563 (source
6564 (origin
6565 (method git-fetch)
6566 (uri (git-reference
6567 (url "https://github.com/pygridtools/gridmap")
6568 (commit (string-append "v" version))))
6569 (file-name (git-file-name name version))
6570 (sha256
6571 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6572 (build-system python-build-system)
6573 (arguments
6574 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6575 (propagated-inputs
6576 `(("python-psutil" ,python-psutil)
6577 ("python-drmaa" ,python-drmaa)
6578 ("python-pyzmq" ,python-pyzmq)))
6579 (home-page "https://github.com/pygridtools/gridmap")
6580 (synopsis "Create jobs on a cluster directly from Python")
6581 (description
6582 "Gridmap is a Python package to allow you to easily create jobs on the
6583 cluster directly from Python. You can directly map Python functions onto the
6584 cluster without needing to write any wrapper code yourself.")
6585 (license license:gpl3+)))
6586
6587 (define-public python2-gridmap
6588 (package-with-python2 python-gridmap))
6589
6590 (define-public python-honcho
6591 (package
6592 (name "python-honcho")
6593 (version "1.0.1")
6594 (source
6595 (origin
6596 (method git-fetch)
6597 (uri (git-reference
6598 (url "https://github.com/nickstenning/honcho")
6599 (commit (string-append "v" version))))
6600 (file-name (git-file-name name version))
6601 (sha256
6602 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6603 (build-system python-build-system)
6604 (native-inputs
6605 `(("python-pytest" ,python-pytest)
6606 ("python-mock" ,python-mock)
6607 ("python-tox" ,python-tox)
6608 ("which" ,which))) ;for tests
6609 (propagated-inputs
6610 `(("python-jinja2" ,python-jinja2)))
6611 (arguments
6612 `(#:phases
6613 (modify-phases %standard-phases
6614 (delete 'check)
6615 (add-after 'install 'check
6616 (lambda* (#:key outputs inputs #:allow-other-keys)
6617 ;; fix honcho path in testsuite
6618 (substitute* "tests/conftest.py"
6619 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6620 "/bin/honcho" "'")))
6621 ;; It's easier to run tests after install.
6622 ;; Make installed package available for running the tests
6623 (add-installed-pythonpath inputs outputs)
6624 (invoke "py.test" "-v"))))))
6625 (home-page "https://github.com/nickstenning/honcho")
6626 (synopsis "Manage Procfile-based applications")
6627 (description
6628 "A Procfile is a file which describes how to run an application
6629 consisting of several processes. honcho starts all listed processes.
6630 The output of all running processes is collected by honcho and
6631 displayed.")
6632 (license license:expat)))
6633
6634 (define-public python-pexpect
6635 (package
6636 (name "python-pexpect")
6637 (version "4.8.0")
6638 (source
6639 (origin
6640 (method url-fetch)
6641 (uri (pypi-uri "pexpect" version))
6642 (sha256
6643 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6644 (build-system python-build-system)
6645 (arguments
6646 `(#:phases
6647 (modify-phases %standard-phases
6648 (add-before 'check 'prepare-tests
6649 (lambda _
6650 (substitute* (find-files "tests")
6651 (("/bin/ls") (which "ls"))
6652 (("/bin/echo") (which "echo"))
6653 (("/bin/which") (which "which"))
6654 ;; Many tests try to use the /bin directory which
6655 ;; is not present in the build environment.
6656 ;; Use one that's non-empty and unlikely to change.
6657 (("/bin'") "/dev'")
6658 ;; Disable failing test. See upstream bug report
6659 ;; https://github.com/pexpect/pexpect/issues/568
6660 (("def test_bash") "def _test_bash"))
6661 ;; XXX: Socket connection test gets "Connection reset by peer".
6662 ;; Why does it not work? Delete for now.
6663 (delete-file "tests/test_socket.py")
6664 #t))
6665 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6666 (native-inputs
6667 `(("python-nose" ,python-nose)
6668 ("python-pytest" ,python-pytest)
6669 ("man-db" ,man-db)
6670 ("which" ,which)
6671 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6672 (propagated-inputs
6673 `(("python-ptyprocess" ,python-ptyprocess)))
6674 (home-page "http://pexpect.readthedocs.org/")
6675 (synopsis "Controlling interactive console applications")
6676 (description
6677 "Pexpect is a pure Python module for spawning child applications;
6678 controlling them; and responding to expected patterns in their output.
6679 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6680 child application and control it as if a human were typing commands.")
6681 (license license:isc)))
6682
6683 (define-public python2-pexpect
6684 (package-with-python2 python-pexpect))
6685
6686 (define-public python-setuptools-scm
6687 (package
6688 (name "python-setuptools-scm")
6689 (version "3.4.3")
6690 (source (origin
6691 (method url-fetch)
6692 (uri (pypi-uri "setuptools_scm" version))
6693 (sha256
6694 (base32
6695 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6696 (build-system python-build-system)
6697 (home-page "https://github.com/pypa/setuptools_scm/")
6698 (synopsis "Manage Python package versions in SCM metadata")
6699 (description
6700 "Setuptools_scm handles managing your Python package versions in
6701 @dfn{software configuration management} (SCM) metadata instead of declaring
6702 them as the version argument or in a SCM managed file.")
6703 (license license:expat)))
6704
6705 ;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
6706 (define-public python-setuptools-scm/next
6707 (package
6708 (inherit python-setuptools-scm)
6709 (version "5.0.1")
6710 (source
6711 (origin
6712 (method url-fetch)
6713 (uri (pypi-uri "setuptools_scm" version))
6714 (sha256
6715 (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
6716
6717 (define-public python2-setuptools-scm
6718 (package-with-python2 python-setuptools-scm))
6719
6720 (define-public python-sexpdata
6721 (package
6722 (name "python-sexpdata")
6723 (version "0.0.3")
6724 (source
6725 (origin
6726 (method url-fetch)
6727 (uri (pypi-uri "sexpdata" version))
6728 (sha256
6729 (base32
6730 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6731 (build-system python-build-system)
6732 (home-page "https://github.com/jd-boyd/sexpdata")
6733 (synopsis "S-expression parser for Python")
6734 (description
6735 "Sexpdata is an S-expression parser/serializer. It has load and dump
6736 functions like pickle, json or PyYAML module.")
6737 (license license:bsd-3)))
6738
6739 (define-public python-pathlib2
6740 (package
6741 (name "python-pathlib2")
6742 (version "2.3.3")
6743 (source
6744 (origin
6745 (method url-fetch)
6746 (uri (pypi-uri "pathlib2" version))
6747 (sha256
6748 (base32
6749 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6750 (build-system python-build-system)
6751 (propagated-inputs
6752 `(("python-scandir" ,python-scandir)
6753 ("python-six" ,python-six)))
6754 (home-page "https://pypi.org/project/pathlib2/")
6755 (synopsis "Object-oriented file system paths")
6756 (description "The goal of pathlib2 is to provide a backport of the
6757 standard @code{pathlib} module which tracks the standard library module, so
6758 all the newest features of the standard @code{pathlib} can be used also on
6759 older Python versions.")
6760 (license license:expat)))
6761
6762 (define-public python-importlib-resources
6763 (package
6764 (name "python-importlib-resources")
6765 (version "3.0.0")
6766 (source
6767 (origin
6768 (method url-fetch)
6769 (uri (pypi-uri "importlib_resources" version))
6770 (sha256
6771 (base32
6772 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6773 (build-system python-build-system)
6774 (native-inputs
6775 `(("python-setuptools-scm" ,python-setuptools-scm)
6776 ("python-toml" ,python-toml)))
6777 (home-page "http://importlib-resources.readthedocs.io/")
6778 (synopsis "Read resources from Python packages")
6779 (description
6780 "@code{importlib_resources} is a backport of Python 3's standard library
6781 @code{importlib.resources} module for Python 2.7, and Python 3.")
6782 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6783 (license license:asl2.0)))
6784
6785 (define-public python2-importlib-resources
6786 (package
6787 (name "python2-importlib-resources")
6788 (version "1.0.2")
6789 (source (origin
6790 (method url-fetch)
6791 (uri (pypi-uri "importlib_resources" version))
6792 (sha256
6793 (base32
6794 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6795 (build-system python-build-system)
6796 (arguments
6797 `(#:python ,python-2
6798 #:phases (modify-phases %standard-phases
6799 ;; The build system tests for python-wheel, but it is
6800 ;; not required for Guix nor the test suite. Just drop
6801 ;; it to make bootstrapping pytest easier.
6802 (add-after 'unpack 'drop-wheel-dependency
6803 (lambda _
6804 (substitute* "setup.cfg"
6805 (("^[[:blank:]]+wheel")
6806 ""))
6807 #t)))))
6808 (propagated-inputs
6809 `(("python-pathlib2" ,python2-pathlib2)
6810 ("python-typing" ,python2-typing)))
6811 (home-page "https://gitlab.com/python-devs/importlib_resources")
6812 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6813 (description
6814 "This package provides an implementation of @code{importlib.resources}
6815 for older versions of Python.")
6816 (license license:asl2.0)))
6817
6818 ;; For importlib-metadata-bootstrap below.
6819 (define-public python2-importlib-resources-bootstrap
6820 (hidden-package
6821 (package/inherit
6822 python2-importlib-resources
6823 (name "python2-importlib-resources-bootstrap")
6824 (propagated-inputs
6825 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6826 ("python-typing" ,python2-typing))))))
6827
6828 (define-public python-importlib-metadata
6829 (package
6830 (name "python-importlib-metadata")
6831 (version "1.5.0")
6832 (source
6833 (origin
6834 (method url-fetch)
6835 (uri (pypi-uri "importlib_metadata" version))
6836 (sha256
6837 (base32
6838 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6839 (build-system python-build-system)
6840 (propagated-inputs
6841 `(("python-zipp" ,python-zipp)))
6842 (native-inputs
6843 `(("python-setuptools-scm" ,python-setuptools-scm)
6844 ("python-pyfakefs" ,python-pyfakefs)
6845 ("python-packaging" ,python-packaging)))
6846 (home-page "https://importlib-metadata.readthedocs.io/")
6847 (synopsis "Read metadata from Python packages")
6848 (description
6849 "@code{importlib_metadata} is a library which provides an API for
6850 accessing an installed Python package's metadata, such as its entry points or
6851 its top-level name. This functionality intends to replace most uses of
6852 @code{pkg_resources} entry point API and metadata API. Along with
6853 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6854 need to use the older and less efficient @code{pkg_resources} package.")
6855 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6856 (license license:asl2.0)))
6857
6858 (define-public python2-importlib-metadata
6859 (let ((base (package-with-python2 (strip-python2-variant
6860 python-importlib-metadata))))
6861 (package/inherit
6862 base
6863 (name "python2-importlib-metadata")
6864 (native-inputs
6865 `(("python-setuptools-scm" ,python2-setuptools-scm)
6866 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6867 ("python-packaging" ,python2-packaging-bootstrap)))
6868 (propagated-inputs
6869 `(("python-configparser" ,python2-configparser)
6870 ("python-contextlib2" ,python2-contextlib2)
6871 ("python-importlib-resources" ,python2-importlib-resources)
6872 ("python-pathlib2" ,python2-pathlib2)
6873 ,@(package-propagated-inputs base))))))
6874
6875 ;; This package is used by python2-pytest, and thus must not depend on it.
6876 (define-public python2-importlib-metadata-bootstrap
6877 (hidden-package
6878 (package/inherit
6879 python2-importlib-metadata
6880 (name "python2-importlib-metadata-bootstrap")
6881 (arguments
6882 `(#:tests? #f
6883 ,@(package-arguments python2-importlib-metadata)))
6884 (propagated-inputs
6885 `(("python-zipp" ,python2-zipp-bootstrap)
6886 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6887 ("python-configparser" ,python2-configparser)
6888 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6889 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6890
6891 (define-public python-importmagic
6892 (package
6893 (name "python-importmagic")
6894 (version "0.1.7")
6895 (source
6896 (origin
6897 (method url-fetch)
6898 (uri (pypi-uri "importmagic" version))
6899 (sha256
6900 (base32
6901 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6902 (build-system python-build-system)
6903 (home-page "https://github.com/alecthomas/importmagic")
6904 (synopsis "Library for adding, removing and managing Python imports")
6905 (description
6906 "Importmagic is a Python library for automatically managing imports by
6907 finding unresolved symbols in Python code and their corresponding imports.")
6908 (license license:bsd-3)))
6909
6910 (define-public python-inotify-simple
6911 (package
6912 (name "python-inotify-simple")
6913 (version "1.3.5")
6914 (source
6915 (origin
6916 (method git-fetch)
6917 (uri (git-reference
6918 (url "https://github.com/chrisjbillington/inotify_simple")
6919 (commit version)))
6920 (file-name (git-file-name name version))
6921 (sha256
6922 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
6923 (build-system python-build-system)
6924 (home-page
6925 "https://github.com/chrisjbillington/inotify_simple")
6926 (synopsis "Simple wrapper around inotify library")
6927 (description
6928 "@code{inotify-simple} is a simple wrapper around inotify library.")
6929 (license license:bsd-3)))
6930
6931 (define-public python-jaraco-packaging
6932 (package
6933 (name "python-jaraco-packaging")
6934 (version "6.1")
6935 (source
6936 (origin
6937 (method url-fetch)
6938 (uri (pypi-uri "jaraco.packaging" version))
6939 (sha256
6940 (base32
6941 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6942 (build-system python-build-system)
6943 (propagated-inputs
6944 `(("python-pytest" ,python-pytest)
6945 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6946 ("python-pytest-flake8" ,python-pytest-flake8)
6947 ("python-rst.linker" ,python-rst.linker)
6948 ("python-setuptools" ,python-setuptools)
6949 ("python-setuptools-scm" ,python-setuptools-scm)
6950 ("python-six" ,python-six)
6951 ("python-sphinx" ,python-sphinx)))
6952 (home-page "https://github.com/jaraco/jaraco.packaging")
6953 (synopsis "Tools to supplement packaging Python releases")
6954 (description
6955 "This package provides various tools to supplement packaging Python
6956 releases.")
6957 (license license:expat)))
6958
6959 (define-public python-pathpy
6960 (package
6961 (name "python-pathpy")
6962 (version "11.5.1")
6963 (source
6964 (origin
6965 (method url-fetch)
6966 (uri (pypi-uri "path.py" version))
6967 (sha256
6968 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6969 (outputs '("out" "doc"))
6970 (build-system python-build-system)
6971 (propagated-inputs
6972 `(("python-appdirs" ,python-appdirs)
6973 ("python-importlib-metadata" ,python-importlib-metadata)))
6974 (native-inputs
6975 `(("python-setuptools-scm" ,python-setuptools-scm)
6976 ("python-sphinx" ,python-sphinx)
6977 ("python-rst.linker" ,python-rst.linker)
6978 ("python-pytest" ,python-pytest)
6979 ("python-pytest-runner" ,python-pytest-runner)
6980 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6981 (arguments
6982 `(#:phases
6983 (modify-phases %standard-phases
6984 (add-after 'build 'build-doc
6985 (lambda _
6986 (setenv "LANG" "en_US.UTF-8")
6987 (invoke "python" "setup.py" "build_sphinx")))
6988 (add-after 'install 'install-doc
6989 (lambda* (#:key outputs #:allow-other-keys)
6990 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6991 (doc (string-append data "/doc/" ,name "-" ,version))
6992 (html (string-append doc "/html")))
6993 (mkdir-p html)
6994 (for-each (lambda (file)
6995 (copy-file file (string-append doc "/" file)))
6996 '("README.rst" "CHANGES.rst"))
6997 (copy-recursively "build/sphinx/html" html)
6998 #t)))
6999 (replace 'check
7000 (lambda _
7001 ;; The import time test aborts if an import takes longer than
7002 ;; 100ms. It may very well take a little longer than that.
7003 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
7004 (home-page "https://github.com/jaraco/path.py")
7005 (synopsis "Python module wrapper for built-in os.path")
7006 (description
7007 "@code{path.py} implements path objects as first-class entities, allowing
7008 common operations on files to be invoked on those path objects directly.")
7009 (license license:expat)))
7010
7011 (define-public python-simplegeneric
7012 (package
7013 (name "python-simplegeneric")
7014 (version "0.8.1")
7015 (source
7016 (origin
7017 (method url-fetch)
7018 (uri (pypi-uri "simplegeneric" version ".zip"))
7019 (sha256
7020 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
7021 (build-system python-build-system)
7022 (native-inputs
7023 `(("unzip" ,unzip)))
7024 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
7025 (synopsis "Python module for simple generic functions")
7026 (description
7027 "The simplegeneric module lets you define simple single-dispatch generic
7028 functions, akin to Python’s built-in generic functions like @code{len()},
7029 @code{iter()} and so on. However, instead of using specially-named methods,
7030 these generic functions use simple lookup tables, akin to those used by
7031 e.g. @code{pickle.dump()} and other generic functions found in the Python
7032 standard library.")
7033 (license license:zpl2.1)))
7034
7035 (define-public python2-simplegeneric
7036 (package-with-python2 python-simplegeneric))
7037
7038 (define-public python-ipython-genutils
7039 ;; TODO: This package is retired, check if can be removed, see description.
7040 (package
7041 (name "python-ipython-genutils")
7042 (version "0.1.0")
7043 (source
7044 (origin
7045 (method url-fetch)
7046 (uri (pypi-uri "ipython_genutils" version))
7047 (sha256
7048 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7049 (build-system python-build-system)
7050 (arguments `(#:tests? #f)) ; no tests
7051 (home-page "https://ipython.org")
7052 (synopsis "Vestigial utilities from IPython")
7053 (description
7054 "This package provides retired utilities from IPython. No packages
7055 outside IPython/Jupyter should depend on it.
7056
7057 This package shouldn't exist. It contains some common utilities shared by
7058 Jupyter and IPython projects during The Big Split. As soon as possible, those
7059 packages will remove their dependency on this, and this package will go
7060 away.")
7061 (license license:bsd-3)))
7062
7063 (define-public python2-ipython-genutils
7064 (package-with-python2 python-ipython-genutils))
7065
7066 (define-public python-ipyparallel
7067 (package
7068 (name "python-ipyparallel")
7069 (version "6.2.4")
7070 (source
7071 (origin
7072 (method url-fetch)
7073 (uri (pypi-uri "ipyparallel" version))
7074 (sha256
7075 (base32
7076 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7077 (build-system python-build-system)
7078 (arguments
7079 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7080 #:phases
7081 (modify-phases %standard-phases
7082 (add-before 'check 'prepare-for-tests
7083 (lambda _
7084 (setenv "HOME" (getcwd))
7085 #t)))))
7086 (propagated-inputs
7087 `(("python-dateutil" ,python-dateutil)
7088 ("python-decorator" ,python-decorator)
7089 ("python-ipykernel" ,python-ipykernel)
7090 ("python-ipython" ,python-ipython)
7091 ("python-ipython-genutils" ,python-ipython-genutils)
7092 ("python-jupyter-client" ,python-jupyter-client)
7093 ("python-pyzmq" ,python-pyzmq)
7094 ("python-tornado" ,python-tornado)
7095 ("python-traitlets" ,python-traitlets)))
7096 (native-inputs
7097 `(("python-ipython" ,python-ipython)
7098 ("python-mock" ,python-mock)
7099 ("python-nose" ,python-nose)
7100 ("python-pytest" ,python-pytest)
7101 ("python-pytest-cov" ,python-pytest-cov)
7102 ("python-testpath" ,python-testpath)))
7103 (home-page "https://ipython.org/")
7104 (synopsis "Interactive Parallel Computing with IPython")
7105 (description
7106 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7107 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7108 CLI scripts:
7109 @enumerate
7110 @item ipcluster - start/stop a cluster
7111 @item ipcontroller - start a scheduler
7112 @item ipengine - start an engine
7113 @end enumerate")
7114 (license license:bsd-3)))
7115
7116 (define-public python2-ipyparallel
7117 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
7118 (package/inherit ipyparallel
7119 (propagated-inputs
7120 `(("python2-futures" ,python2-futures)
7121 ,@(package-propagated-inputs ipyparallel))))))
7122
7123 (define-public python-ipython-cluster-helper
7124 (package
7125 (name "python-ipython-cluster-helper")
7126 (version "0.6.4")
7127 (source
7128 (origin
7129 (method url-fetch)
7130 (uri (pypi-uri "ipython-cluster-helper" version))
7131 (sha256
7132 (base32
7133 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
7134 (modules '((guix build utils)))
7135 (snippet
7136 '(begin (substitute* "requirements.txt"
7137 (("ipython.*") "ipython\n"))
7138 #t))))
7139 (build-system python-build-system)
7140 (arguments
7141 `(#:tests? #f ; Test suite can't find IPython.
7142 #:phases
7143 (modify-phases %standard-phases
7144 (replace 'check
7145 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7146 (if tests?
7147 (begin
7148 (setenv "HOME" (getcwd))
7149 (add-installed-pythonpath inputs outputs)
7150 (invoke "python" "example/example.py" "--local"))
7151 #t))))))
7152 (propagated-inputs
7153 `(("python-ipyparallel" ,python-ipyparallel)
7154 ("python-ipython" ,python-ipython)
7155 ("python-netifaces" ,python-netifaces)
7156 ("python-pyzmq" ,python-pyzmq)
7157 ("python-setuptools" ,python-setuptools)
7158 ("python-six" ,python-six)))
7159 (home-page "https://github.com/roryk/ipython-cluster-helper")
7160 (synopsis
7161 "Simplify IPython cluster start up and use for multiple schedulers")
7162 (description
7163 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
7164 profile, launches a cluster and returns a view. On program exit it shuts the
7165 cluster down and deletes the throwaway profile.")
7166 (license license:expat)))
7167
7168 (define-public python2-ipython-cluster-helper
7169 (package-with-python2 python-ipython-cluster-helper))
7170
7171 (define-public python-traitlets
7172 (package
7173 (name "python-traitlets")
7174 (version "4.3.3")
7175 (source
7176 (origin
7177 (method url-fetch)
7178 (uri (pypi-uri "traitlets" version))
7179 (sha256
7180 (base32
7181 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
7182 (build-system python-build-system)
7183 (arguments
7184 `(#:phases
7185 (modify-phases %standard-phases
7186 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
7187 (propagated-inputs
7188 `(("python-ipython-genutils" ,python-ipython-genutils)
7189 ("python-decorator" ,python-decorator)))
7190 (native-inputs
7191 `(("python-pytest" ,python-pytest)))
7192 (properties `((python2-variant . ,(delay python2-traitlets))))
7193 (home-page "https://ipython.org")
7194 (synopsis "Configuration system for Python applications")
7195 (description
7196 "Traitlets is a framework that lets Python classes have attributes with
7197 type checking, dynamically calculated default values, and ‘on change’
7198 callbacks. The package also includes a mechanism to use traitlets for
7199 configuration, loading values from files or from command line arguments. This
7200 is a distinct layer on top of traitlets, so you can use traitlets in your code
7201 without using the configuration machinery.")
7202 (license license:bsd-3)))
7203
7204 (define-public python2-traitlets
7205 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
7206 (package/inherit traitlets
7207 (propagated-inputs
7208 `(("python2-enum34" ,python2-enum34)
7209 ,@(package-propagated-inputs traitlets))))))
7210
7211 (define-public python-jupyter-core
7212 (package
7213 (name "python-jupyter-core")
7214 (version "4.4.0")
7215 (source
7216 (origin
7217 (method url-fetch)
7218 (uri (string-append (pypi-uri "jupyter_core" version)))
7219 (sha256
7220 (base32
7221 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
7222 (build-system python-build-system)
7223 ;; FIXME: not sure how to run the tests
7224 (arguments `(#:tests? #f))
7225 (propagated-inputs
7226 `(("python-traitlets" ,python-traitlets)))
7227 (home-page "https://jupyter.org/")
7228 (synopsis "Jupyter base package")
7229 (description
7230 "Jupyter core is the base package on which Jupyter projects rely.")
7231 (license license:bsd-3)))
7232
7233 (define-public python2-jupyter-core
7234 (package-with-python2 python-jupyter-core))
7235
7236 (define-public python-jupyter-client
7237 (package
7238 (name "python-jupyter-client")
7239 (version "5.2.4")
7240 (source
7241 (origin
7242 (method url-fetch)
7243 (uri (pypi-uri "jupyter_client" version))
7244 (sha256
7245 (base32
7246 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
7247 (build-system python-build-system)
7248 ;; Tests fail because of missing native python kernel which I assume is
7249 ;; provided by the ipython package, which we cannot use because it would
7250 ;; cause a dependency cycle.
7251 (arguments
7252 `(#:tests? #f
7253
7254 #:phases (modify-phases %standard-phases
7255 (add-after 'unpack 'set-tool-file-names
7256 (lambda* (#:key inputs #:allow-other-keys)
7257 (let ((iproute (assoc-ref inputs "iproute")))
7258 (substitute* "jupyter_client/localinterfaces.py"
7259 (("'ip'")
7260 (string-append "'" iproute "/sbin/ip'")))
7261 #t))))))
7262 (inputs
7263 `(("iproute" ,iproute)))
7264 (propagated-inputs
7265 `(("python-pyzmq" ,python-pyzmq)
7266 ("python-traitlets" ,python-traitlets)
7267 ("python-jupyter-core" ,python-jupyter-core)))
7268 (home-page "https://jupyter.org/")
7269 (synopsis "Jupyter protocol implementation and client libraries")
7270 (description
7271 "The @code{jupyter_client} package contains the reference implementation
7272 of the Jupyter protocol. It also provides client and kernel management APIs
7273 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7274 installing @code{kernelspec}s for use with Jupyter frontends.")
7275 (license license:bsd-3)))
7276
7277 (define-public python2-jupyter-client
7278 (package-with-python2 python-jupyter-client))
7279
7280 (define-public python-ipykernel
7281 (package
7282 (name "python-ipykernel")
7283 (version "5.1.3")
7284 (source
7285 (origin
7286 (method url-fetch)
7287 (uri (pypi-uri "ipykernel" version))
7288 (sha256
7289 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
7290 (build-system python-build-system)
7291 (arguments
7292 `(#:phases
7293 (modify-phases %standard-phases
7294 (replace 'check
7295 (lambda _
7296 (setenv "HOME" "/tmp")
7297 (invoke "pytest" "-v")
7298 #t))
7299 (add-after 'install 'set-python-file-name
7300 (lambda* (#:key outputs #:allow-other-keys)
7301 ;; Record the absolute file name of the 'python' executable in
7302 ;; 'kernel.json'.
7303 (let ((out (assoc-ref outputs "out")))
7304 (substitute* (string-append out "/share/jupyter"
7305 "/kernels/python3/kernel.json")
7306 (("\"python\"")
7307 (string-append "\"" (which "python") "\"")))
7308 #t))))))
7309 (propagated-inputs
7310 `(("python-ipython" ,python-ipython)
7311 ;; imported at runtime during connect
7312 ("python-jupyter-client" ,python-jupyter-client)))
7313 (native-inputs
7314 `(("python-flaky" ,python-flaky)
7315 ("python-nose" ,python-nose)
7316 ("python-pytest" ,python-pytest)))
7317 (home-page "https://ipython.org")
7318 (synopsis "IPython Kernel for Jupyter")
7319 (description
7320 "This package provides the IPython kernel for Jupyter.")
7321 (properties `((python2-variant . ,(delay python2-ipykernel))))
7322 (license license:bsd-3)))
7323
7324 ;; Version 5.x and above no longer support Python 2.
7325 (define-public python2-ipykernel
7326 (package
7327 (name "python2-ipykernel")
7328 (version "4.10.1")
7329 (source
7330 (origin
7331 (method url-fetch)
7332 (uri (pypi-uri "ipykernel" version))
7333 (sha256
7334 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
7335 (build-system python-build-system)
7336 (arguments
7337 `(#:python ,python-2))
7338 (propagated-inputs
7339 `(("python2-ipython" ,python2-ipython)
7340 ;; imported at runtime during connect
7341 ("python2-jupyter-client" ,python2-jupyter-client)
7342 ("python2-tornado" ,python2-tornado)
7343 ("python2-traitlets" ,python2-traitlets)))
7344 (native-inputs
7345 `(("python2-mock" ,python2-mock)
7346 ("python2-nose" ,python2-nose)
7347 ("python2-pytest" ,python2-pytest)
7348 ("python2-pytest-cov" ,python2-pytest-cov)))
7349 (home-page "https://ipython.org")
7350 (synopsis "IPython Kernel for Jupyter")
7351 (description
7352 "This package provides the IPython kernel for Jupyter.")
7353 (license license:bsd-3)))
7354
7355 (define-public python-pari-jupyter
7356 (package
7357 (name "python-pari-jupyter")
7358 (version "1.3.2")
7359 (source
7360 (origin
7361 (method url-fetch)
7362 (uri (pypi-uri "pari_jupyter" version))
7363 (sha256
7364 (base32
7365 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7366 (build-system python-build-system)
7367 (propagated-inputs
7368 `(("python-ipykernel" ,python-ipykernel)))
7369 (inputs
7370 `(("pari-gp" ,pari-gp)
7371 ("readline" ,readline)))
7372 (arguments
7373 `(#:tests? #f)) ; no test suite
7374 (home-page
7375 "https://github.com/jdemeyer/pari_jupyter")
7376 (synopsis "A Jupyter kernel for PARI/GP")
7377 (description "The package provides a PARI/GP kernel for Jupyter.")
7378 (license license:gpl3+)))
7379
7380 (define-public python-backcall
7381 (package
7382 (name "python-backcall")
7383 (version "0.2.0")
7384 (source
7385 (origin
7386 (method url-fetch)
7387 (uri (pypi-uri "backcall" version))
7388 (sha256
7389 (base32
7390 "07jy4562lvnhkk6kfr3cphmizy88anlhmbwb8kdzlz2ypqkvzgaw"))))
7391 (build-system python-build-system)
7392 (home-page "https://github.com/takluyver/backcall/")
7393 (synopsis "Specifications for callback functions passed in to an API")
7394 (description
7395 "If your code lets other people supply callback functions, it's important
7396 to specify the function signature you expect, and check that functions support
7397 that. Adding extra parameters later would break other peoples code unless
7398 you're careful. The @code{backcall} package provides a way of specifying the
7399 callback signature using a prototype function.")
7400 (license license:bsd-3)))
7401
7402 (define-public python-ipython
7403 (package
7404 (name "python-ipython")
7405 (version "7.9.0")
7406 (source
7407 (origin
7408 (method url-fetch)
7409 (uri (pypi-uri "ipython" version ".tar.gz"))
7410 (sha256
7411 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7412 (build-system python-build-system)
7413 (propagated-inputs
7414 `(("python-backcall" ,python-backcall)
7415 ("python-pyzmq" ,python-pyzmq)
7416 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7417 ("python-terminado" ,python-terminado)
7418 ("python-matplotlib" ,python-matplotlib)
7419 ("python-numpy" ,python-numpy)
7420 ("python-numpydoc" ,python-numpydoc)
7421 ("python-jedi" ,python-jedi)
7422 ("python-jinja2" ,python-jinja2)
7423 ("python-mistune" ,python-mistune)
7424 ("python-pexpect" ,python-pexpect)
7425 ("python-pickleshare" ,python-pickleshare)
7426 ("python-simplegeneric" ,python-simplegeneric)
7427 ("python-jsonschema" ,python-jsonschema)
7428 ("python-traitlets" ,python-traitlets)
7429 ("python-nbformat" ,python-nbformat)
7430 ("python-pygments" ,python-pygments)))
7431 (inputs
7432 `(("readline" ,readline)
7433 ("which" ,which)))
7434 (native-inputs
7435 `(("graphviz" ,graphviz)
7436 ("pkg-config" ,pkg-config)
7437 ("python-requests" ,python-requests) ;; for tests
7438 ("python-testpath" ,python-testpath)
7439 ("python-nose" ,python-nose)))
7440 (arguments
7441 `(#:phases
7442 (modify-phases %standard-phases
7443 (add-after 'unpack 'make-docs-reproducible
7444 (lambda _
7445 (substitute* "IPython/sphinxext/ipython_directive.py"
7446 ((".*import datetime") "")
7447 ((".*datetime.datetime.now\\(\\)") "")
7448 (("%timeit") "# %timeit"))
7449 #t))
7450 ;; Tests can only be run after the library has been installed and not
7451 ;; within the source directory.
7452 (delete 'check)
7453 (add-after 'install 'check
7454 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7455 (if tests?
7456 (begin
7457 ;; Make installed package available for running the tests
7458 (add-installed-pythonpath inputs outputs)
7459 (setenv "HOME" "/tmp/") ;; required by a test
7460 ;; We only test the core because one of the other tests
7461 ;; tries to import ipykernel.
7462 (invoke "python" "IPython/testing/iptest.py"
7463 "-v" "IPython/core/tests"))
7464 #t)))
7465 (add-before 'check 'fix-tests
7466 (lambda* (#:key inputs #:allow-other-keys)
7467 (substitute* "./IPython/utils/_process_posix.py"
7468 (("/usr/bin/env', 'which") (which "which")))
7469 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7470 (("#!/usr/bin/env python")
7471 (string-append "#!" (which "python"))))
7472 ;; This test introduces a circular dependency on ipykernel
7473 ;; (which depends on ipython).
7474 (delete-file "IPython/core/tests/test_display.py")
7475 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7476 (delete-file "IPython/core/tests/test_interactiveshell.py")
7477 #t)))))
7478 (home-page "https://ipython.org")
7479 (synopsis "IPython is a tool for interactive computing in Python")
7480 (description
7481 "IPython provides a rich architecture for interactive computing with:
7482 Powerful interactive shells, a browser-based notebook, support for interactive
7483 data visualization, embeddable interpreters and tools for parallel
7484 computing.")
7485 (properties `((python2-variant . ,(delay python2-ipython))))
7486 (license license:bsd-3)))
7487
7488 ;; This is the latest release of the LTS version of ipython with support for
7489 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7490 ;; dropped support for Python 2.7.
7491 (define-public python2-ipython
7492 (package
7493 (name "python2-ipython")
7494 (version "5.8.0")
7495 (source
7496 (origin
7497 (method url-fetch)
7498 (uri (pypi-uri "ipython" version ".tar.gz"))
7499 (sha256
7500 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7501 (build-system python-build-system)
7502 (propagated-inputs
7503 `(("python2-backports-shutil-get-terminal-size"
7504 ,python2-backports-shutil-get-terminal-size)
7505 ("python2-pathlib2" ,python2-pathlib2)
7506 ("python2-pyzmq" ,python2-pyzmq)
7507 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7508 ("python2-terminado" ,python2-terminado)
7509 ("python2-matplotlib" ,python2-matplotlib)
7510 ("python2-numpy" ,python2-numpy)
7511 ("python2-numpydoc" ,python2-numpydoc)
7512 ("python2-jinja2" ,python2-jinja2)
7513 ("python2-mistune" ,python2-mistune)
7514 ("python2-pexpect" ,python2-pexpect)
7515 ("python2-pickleshare" ,python2-pickleshare)
7516 ("python2-simplegeneric" ,python2-simplegeneric)
7517 ("python2-jsonschema" ,python2-jsonschema)
7518 ("python2-traitlets" ,python2-traitlets)
7519 ("python2-nbformat" ,python2-nbformat)
7520 ("python2-pygments" ,python2-pygments)))
7521 (inputs
7522 `(("readline" ,readline)
7523 ("which" ,which)))
7524 (native-inputs
7525 `(("graphviz" ,graphviz)
7526 ("pkg-config" ,pkg-config)
7527 ("python2-requests" ,python2-requests) ;; for tests
7528 ("python2-testpath" ,python2-testpath)
7529 ("python2-mock" ,python2-mock)
7530 ("python2-nose" ,python2-nose)))
7531 (arguments
7532 `(#:python ,python-2
7533 #:phases
7534 (modify-phases %standard-phases
7535 (add-before 'check 'delete-broken-tests
7536 (lambda* (#:key inputs #:allow-other-keys)
7537 ;; These tests throw errors for unknown reasons.
7538 (delete-file "IPython/core/tests/test_displayhook.py")
7539 (delete-file "IPython/core/tests/test_magic_terminal.py")
7540 (delete-file "IPython/core/tests/test_profile.py")
7541 #t)))))
7542 (home-page "https://ipython.org")
7543 (synopsis "IPython is a tool for interactive computing in Python")
7544 (description
7545 "IPython provides a rich architecture for interactive computing with:
7546 Powerful interactive shells, a browser-based notebook, support for interactive
7547 data visualization, embeddable interpreters and tools for parallel
7548 computing.")
7549 (license license:bsd-3)))
7550
7551 (define-public python-ipython-documentation
7552 (package
7553 (inherit python-ipython)
7554 (name "python-ipython-documentation")
7555 (version (package-version python-ipython))
7556 (arguments
7557 `(#:phases
7558 (modify-phases %standard-phases
7559 (delete 'build)
7560 (delete 'check)
7561 (replace 'install
7562 (lambda* (#:key outputs #:allow-other-keys)
7563 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7564 (doc (string-append data "/doc/" ,name "-" ,version))
7565 (html (string-append doc "/html"))
7566 (man1 (string-append data "/man/man1"))
7567 (info (string-append data "/info"))
7568 (examples (string-append doc "/examples"))
7569 (python-arg (string-append "PYTHON=" (which "python"))))
7570 (setenv "LANG" "en_US.utf8")
7571 (with-directory-excursion "docs"
7572 ;; FIXME: pdf fails to build
7573 ;;(system* "make" "pdf" "PAPER=a4")
7574 (system* "make" python-arg "html")
7575 ;; FIXME: the generated texi file contains ^@^@, which trips
7576 ;; up the parser.
7577 ;; (system* "make" python-arg "info")
7578 )
7579 (copy-recursively "docs/man" man1)
7580 (copy-recursively "examples" examples)
7581 (copy-recursively "docs/build/html" html)
7582 ;; (copy-file "docs/build/latex/ipython.pdf"
7583 ;; (string-append doc "/ipython.pdf"))
7584 (mkdir-p info)
7585 ;; (copy-file "docs/build/texinfo/ipython.info"
7586 ;; (string-append info "/ipython.info"))
7587 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7588 #t)))))
7589 (inputs
7590 `(("python-ipython" ,python-ipython)
7591 ("python-ipykernel" ,python-ipykernel)))
7592 (native-inputs
7593 `(("python-sphinx" ,python-sphinx)
7594 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7595 ;; FIXME: It's possible that a smaller union would work just as well.
7596 ("texlive" ,(texlive-union (list texlive-amsfonts
7597 texlive-fonts-ec
7598 texlive-generic-ifxetex
7599 texlive-generic-pdftex
7600 texlive-latex-capt-of
7601 texlive-latex-cmap
7602 texlive-latex-environ
7603 texlive-latex-eqparbox
7604 texlive-latex-etoolbox
7605 texlive-latex-expdlist
7606 texlive-latex-fancyhdr
7607 texlive-latex-fancyvrb
7608 texlive-latex-fncychap
7609 texlive-latex-float
7610 texlive-latex-framed
7611 texlive-latex-geometry
7612 texlive-latex-graphics
7613 texlive-latex-hyperref
7614 texlive-latex-mdwtools
7615 texlive-latex-multirow
7616 texlive-latex-needspace
7617 texlive-latex-oberdiek
7618 texlive-latex-parskip
7619 texlive-latex-preview
7620 texlive-latex-tabulary
7621 texlive-latex-threeparttable
7622 texlive-latex-titlesec
7623 texlive-latex-trimspaces
7624 texlive-latex-ucs
7625 texlive-latex-upquote
7626 texlive-latex-url
7627 texlive-latex-varwidth
7628 texlive-latex-wrapfig)))
7629 ("texinfo" ,texinfo)))))
7630
7631 (define-public python-urwid
7632 (package
7633 (name "python-urwid")
7634 (version "2.1.2")
7635 (source
7636 (origin
7637 (method url-fetch)
7638 (uri (pypi-uri "urwid" version))
7639 (sha256
7640 (base32
7641 "1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq"))))
7642 (build-system python-build-system)
7643 (home-page "http://urwid.org")
7644 (synopsis "Console user interface library for Python")
7645 (description
7646 "Urwid is a curses-based UI/widget library for Python. It includes many
7647 features useful for text console applications.")
7648 (properties `((python2-variant . ,(delay python2-urwid))))
7649 (license license:lgpl2.1+)))
7650
7651 (define-public python2-urwid
7652 (let ((base (package-with-python2
7653 (strip-python2-variant python-urwid))))
7654 (package/inherit base
7655 (version "2.1.0")
7656 (source
7657 (origin
7658 (method url-fetch)
7659 (uri (pypi-uri "urwid" version))
7660 (sha256
7661 (base32
7662 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8")))))))
7663
7664 (define-public python-urwid-readline
7665 (package
7666 (name "python-urwid-readline")
7667 (version "0.12")
7668 (source
7669 (origin
7670 (method git-fetch)
7671 (uri (git-reference
7672 (url "https://github.com/rr-/urwid_readline")
7673 (commit version)))
7674 (file-name (git-file-name name version))
7675 (sha256
7676 (base32
7677 "0sq5qgxj7gcfww3ww7idr87isnmp0hi36n241b3q395x1zafdv22"))))
7678 (build-system python-build-system)
7679 (arguments
7680 `(#:phases
7681 (modify-phases %standard-phases
7682 (replace 'check
7683 (lambda* (#:key tests? #:allow-other-keys)
7684 (when tests?
7685 (invoke "python" "-m" "pytest"))
7686 #t)))))
7687 (propagated-inputs
7688 `(("python-urwid" ,python-urwid)))
7689 (native-inputs
7690 `(("python-pytest" ,python-pytest)))
7691 (home-page "https://github.com/rr-/urwid_readline")
7692 (synopsis "Text input widget for urwid that supports readline shortcuts")
7693 (description
7694 "This package provides a textbox edit widget for @code{python-urwid} that
7695 supports @code{readline} shortcuts.")
7696 (license license:expat)))
7697
7698 (define-public python-urwidtrees
7699 (package
7700 (name "python-urwidtrees")
7701 (version "1.0.2")
7702 (source
7703 (origin
7704 (method git-fetch)
7705 ;; package author intends on distributing via github rather than pypi:
7706 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7707 (uri (git-reference
7708 (url "https://github.com/pazz/urwidtrees")
7709 (commit version)))
7710 (file-name (git-file-name name version))
7711 (sha256
7712 (base32
7713 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7714 (build-system python-build-system)
7715 (arguments
7716 '(#:use-setuptools? #f
7717 #:tests? #f)) ; no tests
7718 (propagated-inputs `(("python-urwid" ,python-urwid)))
7719 (home-page "https://github.com/pazz/urwidtrees")
7720 (synopsis "Tree widgets for urwid")
7721 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7722 toolkit. Use it to build trees of widgets.")
7723 (license license:gpl3+)))
7724
7725 (define-public python2-urwidtrees
7726 (package-with-python2 python-urwidtrees))
7727
7728 (define-public python-ua-parser
7729 (package
7730 (name "python-ua-parser")
7731 (version "0.8.0")
7732 (source
7733 (origin
7734 (method url-fetch)
7735 (uri (pypi-uri "ua-parser" version))
7736 (sha256
7737 (base32
7738 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7739 (build-system python-build-system)
7740 (arguments
7741 `(#:tests? #f)) ;no test suite in release
7742 (native-inputs
7743 `(("python-pyyaml" ,python-pyyaml)))
7744 (home-page "https://github.com/ua-parser/uap-python")
7745 (synopsis "User agent parser")
7746 (description
7747 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7748 (license license:asl2.0)))
7749
7750 (define-public python2-ua-parser
7751 (package-with-python2 python-ua-parser))
7752
7753 (define-public python-user-agents
7754 (package
7755 (name "python-user-agents")
7756 (version "1.1.0")
7757 (source
7758 (origin
7759 (method url-fetch)
7760 (uri (pypi-uri "user-agents" version))
7761 (sha256
7762 (base32
7763 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7764 (build-system python-build-system)
7765 (arguments
7766 `(#:tests? #f)) ;missing devices.json test file in release
7767 (propagated-inputs
7768 `(("python-ua-parser" ,python-ua-parser)))
7769 (home-page "https://github.com/selwin/python-user-agents")
7770 (synopsis "User Agent strings parsing library")
7771 (description
7772 "A library to identify devices (phones, tablets) and their capabilities by
7773 parsing (browser/HTTP) user agent strings.")
7774 (license license:expat)))
7775
7776 (define-public python2-user-agents
7777 (package-with-python2 python-user-agents))
7778
7779 (define-public python-dbus
7780 (package
7781 (name "python-dbus")
7782 (version "1.2.16")
7783 (source
7784 (origin
7785 (method url-fetch)
7786 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7787 "dbus-python-" version ".tar.gz"))
7788 (sha256
7789 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7790 (build-system gnu-build-system)
7791 (native-inputs
7792 `(("pkg-config" ,pkg-config)))
7793 (inputs
7794 `(("python" ,python-wrapper)
7795 ("dbus-glib" ,dbus-glib)))
7796 (synopsis "Python bindings for D-bus")
7797 (description "python-dbus provides bindings for libdbus, the reference
7798 implementation of D-Bus.")
7799 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7800 (license license:expat)))
7801
7802 (define-public python2-dbus
7803 (package/inherit python-dbus
7804 (name "python2-dbus")
7805 (inputs `(("python" ,python-2)
7806 ,@(alist-delete "python"
7807 (package-inputs python-dbus)
7808 equal?)))))
7809
7810 (define-public python-notify2
7811 (package
7812 (name "python-notify2")
7813 (version "0.3.1")
7814 (source
7815 (origin
7816 (method url-fetch)
7817 (uri (pypi-uri "notify2" version))
7818 (sha256
7819 (base32
7820 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7821 (build-system python-build-system)
7822 (arguments `(#:tests? #f)) ; tests depend on system state
7823 (native-inputs
7824 `(("python-dbus" ,python-dbus)))
7825 (home-page "https://bitbucket.org/takluyver/pynotify2")
7826 (synopsis "Python interface to D-Bus notifications")
7827 (description
7828 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7829 It is a reimplementation of pynotify in pure Python, and an alternative to
7830 the GObject Introspection bindings to libnotify for non-GTK applications.")
7831 (license (list license:bsd-2
7832 license:lgpl2.1+))))
7833
7834 (define-public python2-notify2
7835 (package-with-python2 python-notify2))
7836
7837 ;; beautifulsoup4 has a totally different namespace than 3.x,
7838 ;; and pypi seems to put it under its own name, so I guess we should too
7839 (define-public python-beautifulsoup4
7840 (package
7841 (name "python-beautifulsoup4")
7842 (version "4.9.3")
7843 (source
7844 (origin
7845 (method url-fetch)
7846 (uri (pypi-uri "beautifulsoup4" version))
7847 (sha256
7848 (base32
7849 "09gbd49mwz86k572r1231x2rdp82p42zlnw0bz9b9mfi58r9wwl4"))))
7850 (build-system python-build-system)
7851 (arguments
7852 `(#:phases
7853 (modify-phases %standard-phases
7854 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7855 ;; must use this conversion script when building with Python 3. The
7856 ;; conversion script also runs the tests.
7857 ;; For more information, see the file 'convert-py3k' in the source
7858 ;; distribution.
7859 (replace 'check
7860 (lambda _ (invoke "./convert-py3k"))))))
7861 (propagated-inputs
7862 `(("python-soupsieve" ,python-soupsieve)))
7863 (home-page
7864 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7865 (synopsis
7866 "Python screen-scraping library")
7867 (description
7868 "Beautiful Soup is a Python library designed for rapidly setting up
7869 screen-scraping projects. It offers Pythonic idioms for navigating,
7870 searching, and modifying a parse tree, providing a toolkit for
7871 dissecting a document and extracting what you need. It automatically
7872 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7873 (license license:expat)
7874 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7875
7876 (define-public python2-beautifulsoup4
7877 (let ((base (package-with-python2
7878 (strip-python2-variant python-beautifulsoup4))))
7879 (package/inherit base
7880 (arguments `(#:python ,python-2)))))
7881
7882 (define-public python-soupsieve
7883 (package
7884 (name "python-soupsieve")
7885 (version "2.2.1")
7886 (source
7887 (origin
7888 (method url-fetch)
7889 (uri (pypi-uri "soupsieve" version))
7890 (sha256
7891 (base32
7892 "1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
7893 (build-system python-build-system)
7894 (arguments `(#:tests? #f))
7895 ;;XXX: 2 tests fail currently despite claming they were to be
7896 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7897 ;;don't want to create a circular dependency.
7898 (home-page "https://github.com/facelessuser/soupsieve")
7899 (synopsis "CSS selector library")
7900 (description
7901 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7902 Soup 4. It aims to provide selecting, matching, and filtering using modern
7903 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7904 specifications up through the latest CSS level 4 drafts and beyond (though
7905 some are not yet implemented).")
7906 (properties `((python2-variant . ,(delay python2-soupsieve))))
7907 (license license:expat)))
7908
7909 ;; This is the last version that supports python-2
7910 (define-public python2-soupsieve
7911 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7912 (package
7913 (inherit base)
7914 (version "1.9.6")
7915 (source
7916 (origin
7917 (method url-fetch)
7918 (uri (pypi-uri "soupsieve" version))
7919 (sha256
7920 (base32
7921 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7922 (propagated-inputs
7923 `(("python2-backports-functools-lru-cache"
7924 ,python2-backports-functools-lru-cache)
7925 ,@(package-propagated-inputs base))))))
7926
7927 (define-public python-netifaces
7928 (package
7929 (name "python-netifaces")
7930 (version "0.10.9")
7931 (source
7932 (origin
7933 (method url-fetch)
7934 (uri (pypi-uri "netifaces" version))
7935 (sha256
7936 (base32
7937 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7938 (build-system python-build-system)
7939 (home-page "https://github.com/al45tair/netifaces")
7940 (synopsis
7941 "Python module for portable network interface information")
7942 (description
7943 "Netifaces is a Python module providing information on network
7944 interfaces in an easy and portable manner.")
7945 (license license:expat)))
7946
7947 (define-public python2-netifaces
7948 (package-with-python2 python-netifaces))
7949
7950 (define-public python-networkx
7951 (package
7952 (name "python-networkx")
7953 (version "2.5")
7954 (source
7955 (origin
7956 (method url-fetch)
7957 (uri (pypi-uri "networkx" version))
7958 (sha256
7959 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7960 (build-system python-build-system)
7961 (arguments
7962 '(#:phases (modify-phases %standard-phases
7963 (replace 'check
7964 (lambda* (#:key tests? #:allow-other-keys)
7965 (if tests?
7966 (invoke "pytest" "-vv" "--pyargs" "networkx")
7967 (format #t "test suite not run~%"))
7968 #t)))))
7969 ;; python-decorator is needed at runtime.
7970 (propagated-inputs
7971 `(("python-decorator" ,python-decorator)))
7972 (native-inputs
7973 `(("python-pytest" ,python-pytest)))
7974 (home-page "https://networkx.github.io/")
7975 (synopsis "Python module for creating and manipulating graphs and networks")
7976 (description
7977 "NetworkX is a Python package for the creation, manipulation, and study
7978 of the structure, dynamics, and functions of complex networks.")
7979 (properties `((python2-variant . ,(delay python2-networkx))))
7980 (license license:bsd-3)))
7981
7982 ;; NetworkX 2.2 is the last version with support for Python 2.
7983 (define-public python2-networkx
7984 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7985 (package
7986 (inherit base)
7987 (version "2.2")
7988 (source (origin
7989 (method url-fetch)
7990 (uri (pypi-uri "networkx" version ".zip"))
7991 (sha256
7992 (base32
7993 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7994 (arguments
7995 `(#:python ,python-2))
7996 (native-inputs
7997 `(("python-nose" ,python2-nose)
7998 ("unzip" ,unzip))))))
7999
8000 (define-public python-datrie
8001 (package
8002 (name "python-datrie")
8003 (version "0.8.2")
8004 (source
8005 (origin
8006 (method url-fetch)
8007 (uri (pypi-uri "datrie" version))
8008 (sha256
8009 (base32
8010 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
8011 (build-system python-build-system)
8012 (native-inputs
8013 `(("python-cython" ,python-cython)
8014 ("python-hypothesis" ,python-hypothesis)
8015 ("python-pytest" ,python-pytest)
8016 ("python-pytest-runner" ,python-pytest-runner)))
8017 (home-page "https://github.com/kmike/datrie")
8018 (synopsis "Fast, efficiently stored trie for Python")
8019 (description
8020 "This package provides a fast, efficiently stored trie implementation for
8021 Python.")
8022 (license license:lgpl2.1+)))
8023
8024 (define-public python-amply
8025 (package
8026 (name "python-amply")
8027 (version "0.1.4")
8028 (source
8029 (origin
8030 (method url-fetch)
8031 (uri (pypi-uri "amply" version))
8032 (sha256
8033 (base32
8034 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
8035 (build-system python-build-system)
8036 (propagated-inputs
8037 `(("python-docutils" ,python-docutils)
8038 ("python-pyparsing" ,python-pyparsing)))
8039 (native-inputs
8040 `(("python-setuptools-scm" ,python-setuptools-scm)))
8041 (home-page "https://github.com/willu47/amply")
8042 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
8043 (description
8044 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
8045 structures.")
8046 (license license:epl1.0)))
8047
8048 (define-public python-pulp
8049 (package
8050 (name "python-pulp")
8051 (version "2.4")
8052 (source
8053 (origin
8054 (method url-fetch)
8055 (uri (pypi-uri "PuLP" version))
8056 (sha256
8057 (base32
8058 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
8059 (build-system python-build-system)
8060 (propagated-inputs
8061 `(("python-amply" ,python-amply)))
8062 (home-page "https://github.com/coin-or/pulp")
8063 (synopsis "Linear Programming modeler")
8064 (description
8065 "PuLP is a Linear Programming modeler written in Python. PuLP can
8066 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
8067 solve linear problems.")
8068 (license license:expat)))
8069
8070 (define-public python-toposort
8071 (package
8072 (name "python-toposort")
8073 (version "1.6")
8074 (source
8075 (origin
8076 (method url-fetch)
8077 (uri (pypi-uri "toposort" version))
8078 (sha256
8079 (base32
8080 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
8081 (build-system python-build-system)
8082 (home-page "https://gitlab.com/ericvsmith/toposort")
8083 (synopsis "Topological sort algorithm")
8084 (description
8085 "This package provides an implementation of a topological sort
8086 algorithm.")
8087 (license license:asl2.0)))
8088
8089 (define-public snakemake
8090 (package
8091 (name "snakemake")
8092 (version "5.32.2")
8093 (source
8094 (origin
8095 (method url-fetch)
8096 (uri (pypi-uri "snakemake" version))
8097 (sha256
8098 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
8099 (build-system python-build-system)
8100 (arguments
8101 ;; TODO: Package missing test dependencies.
8102 '(#:tests? #f
8103 #:phases
8104 (modify-phases %standard-phases
8105 ;; For cluster execution Snakemake will call Python. Since there is
8106 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
8107 ;; this by calling the snakemake wrapper instead.
8108 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
8109 (lambda* (#:key outputs #:allow-other-keys)
8110 (substitute* "snakemake/executors/__init__.py"
8111 (("\\{sys.executable\\} -m snakemake")
8112 (string-append (assoc-ref outputs "out")
8113 "/bin/snakemake")))
8114 #t)))))
8115 (propagated-inputs
8116 `(("python-appdirs" ,python-appdirs)
8117 ("python-configargparse" ,python-configargparse)
8118 ("python-datrie" ,python-datrie)
8119 ("python-docutils" ,python-docutils)
8120 ("python-gitpython" ,python-gitpython)
8121 ("python-jinja2" ,python-jinja2)
8122 ("python-jsonschema" ,python-jsonschema)
8123 ("python-nbformat" ,python-nbformat)
8124 ("python-networkx" ,python-networkx)
8125 ("python-psutil" ,python-psutil)
8126 ("python-pulp" ,python-pulp)
8127 ("python-pyyaml" ,python-pyyaml)
8128 ("python-ratelimiter" ,python-ratelimiter)
8129 ("python-requests" ,python-requests)
8130 ("python-toposort" ,python-toposort)
8131 ("python-wrapt" ,python-wrapt)))
8132 (home-page "https://snakemake.readthedocs.io")
8133 (synopsis "Python-based execution environment for make-like workflows")
8134 (description
8135 "Snakemake aims to reduce the complexity of creating workflows by
8136 providing a clean and modern domain specific specification language (DSL) in
8137 Python style, together with a fast and comfortable execution environment.")
8138 (license license:expat)))
8139
8140 (define-public python-pyqrcode
8141 (package
8142 (name "python-pyqrcode")
8143 (version "1.2.1")
8144 (source
8145 (origin
8146 (method url-fetch)
8147 (uri (pypi-uri "PyQRCode" version))
8148 (sha256
8149 (base32
8150 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8151 (build-system python-build-system)
8152 (home-page
8153 "https://github.com/mnooner256/pyqrcode")
8154 (synopsis "QR code generator")
8155 (description
8156 "Pyqrcode is a QR code generator written purely in Python with
8157 SVG, EPS, PNG and terminal output.")
8158 (license license:bsd-3)))
8159
8160 (define-public python-seaborn
8161 (package
8162 (name "python-seaborn")
8163 (version "0.10.0")
8164 (source
8165 (origin
8166 (method url-fetch)
8167 (uri (pypi-uri "seaborn" version))
8168 (sha256
8169 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
8170 (build-system python-build-system)
8171 (arguments
8172 `(#:phases
8173 (modify-phases %standard-phases
8174 (add-before 'check 'start-xserver
8175 (lambda* (#:key inputs #:allow-other-keys)
8176 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8177 ;; There must be a running X server and make check doesn't
8178 ;; start one. Therefore we must do it.
8179 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8180 (setenv "DISPLAY" ":1")
8181 #t)))
8182 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
8183 (propagated-inputs
8184 `(("python-pandas" ,python-pandas)
8185 ("python-matplotlib" ,python-matplotlib)
8186 ("python-numpy" ,python-numpy)
8187 ("python-scipy" ,python-scipy)))
8188 (native-inputs
8189 `(("python-pytest" ,python-pytest)
8190 ("xorg-server" ,xorg-server-for-tests)))
8191 (home-page "https://seaborn.pydata.org/")
8192 (synopsis "Statistical data visualization")
8193 (description
8194 "Seaborn is a library for making attractive and informative statistical
8195 graphics in Python. It is built on top of matplotlib and tightly integrated
8196 with the PyData stack, including support for numpy and pandas data structures
8197 and statistical routines from scipy and statsmodels.")
8198 (properties `((python2-variant . ,(delay python2-seaborn))))
8199 (license license:bsd-3)))
8200
8201 ;; 0.9.1 is the last release with support for Python 2.
8202 (define-public python2-seaborn
8203 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8204 (package
8205 (inherit base)
8206 (version "0.9.1")
8207 (source (origin
8208 (method url-fetch)
8209 (uri (pypi-uri "seaborn" version))
8210 (sha256
8211 (base32
8212 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8213
8214 (define-public python-mpmath
8215 (package
8216 (name "python-mpmath")
8217 (version "1.1.0")
8218 (source (origin
8219 (method url-fetch)
8220 (uri (pypi-uri "mpmath" version))
8221 (file-name (git-file-name name version))
8222 (sha256
8223 (base32
8224 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8225 (build-system python-build-system)
8226 (native-inputs
8227 `(("python-pytest" ,python-pytest)))
8228 (arguments
8229 '(#:phases
8230 (modify-phases %standard-phases
8231 (replace 'check
8232 (lambda _
8233 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8234 (home-page "https://mpmath.org")
8235 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8236 (description
8237 "@code{mpmath} can be used as an arbitrary-precision substitute for
8238 Python's float/complex types and math/cmath modules, but also does much
8239 more advanced mathematics.")
8240 (license license:bsd-3)))
8241
8242 (define-public python2-mpmath
8243 (package-with-python2 python-mpmath))
8244
8245 (define-public python-bigfloat
8246 (package
8247 (name "python-bigfloat")
8248 (version "0.3.0")
8249 (source
8250 (origin
8251 (method url-fetch)
8252 (uri (pypi-uri "bigfloat" version))
8253 (sha256
8254 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8255 (build-system python-build-system)
8256 (inputs
8257 `(("mpfr" ,mpfr)))
8258 (home-page "https://github.com/mdickinson/bigfloat")
8259 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8260 (description
8261 "This package provides a Python interface to the MPFR library for
8262 multiprecision arithmetic.")
8263 (license license:lgpl3+)))
8264
8265 (define-public python2-bigfloat
8266 (package-with-python2 python-bigfloat))
8267
8268 (define-public python-sympy
8269 (package
8270 (name "python-sympy")
8271 (version "1.7.1")
8272 (source
8273 (origin
8274 (method url-fetch)
8275 (uri (pypi-uri "sympy" version))
8276 (sha256
8277 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8278 (build-system python-build-system)
8279 (arguments
8280 `(#:phases
8281 (modify-phases %standard-phases
8282 (replace 'check
8283 (lambda* (#:key outputs #:allow-other-keys)
8284 (invoke
8285 (or (which "python3") (which "python"))
8286 "-c" "import sympy; sympy.test(\"/core\")"))))))
8287 (propagated-inputs
8288 `(("python-mpmath" ,python-mpmath)))
8289 (home-page "https://www.sympy.org/")
8290 (synopsis "Python library for symbolic mathematics")
8291 (description
8292 "SymPy is a Python library for symbolic mathematics. It aims to become a
8293 full-featured computer algebra system (CAS) while keeping the code as simple
8294 as possible in order to be comprehensible and easily extensible.")
8295 (license license:bsd-3)))
8296
8297 (define-public python2-sympy
8298 (package
8299 (inherit (package-with-python2 python-sympy))
8300 (version "1.5.1") ; last release for python2
8301 (source
8302 (origin
8303 (method url-fetch)
8304 (uri (pypi-uri "sympy" version))
8305 (sha256
8306 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8307
8308 (define-public python-q
8309 (package
8310 (name "python-q")
8311 (version "2.6")
8312 (source
8313 (origin
8314 (method url-fetch)
8315 (uri (pypi-uri "q" version))
8316 (sha256
8317 (base32
8318 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
8319 (build-system python-build-system)
8320 (home-page "https://github.com/zestyping/q")
8321 (synopsis "Quick-and-dirty debugging output for tired programmers")
8322 (description
8323 "q is a Python module for \"print\" style of debugging Python code. It
8324 provides convenient short API for print out of values, tracebacks, and
8325 falling into the Python interpreter.")
8326 (license license:asl2.0)))
8327
8328 (define-public python2-q
8329 (package-with-python2 python-q))
8330
8331 (define-public python-xlib
8332 (package
8333 (name "python-xlib")
8334 (version "0.29")
8335 (source
8336 (origin
8337 (method git-fetch)
8338 (uri (git-reference
8339 (url "https://github.com/python-xlib/python-xlib")
8340 (commit version)))
8341 (file-name (git-file-name name version))
8342 (sha256
8343 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
8344 (build-system python-build-system)
8345 (arguments
8346 `(#:phases
8347 (modify-phases %standard-phases
8348 (add-before 'check 'start-xserver
8349 (lambda* (#:key inputs #:allow-other-keys)
8350 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8351 ;; There must be a running X server and make check doesn't
8352 ;; start one. Therefore we must do it.
8353 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8354 (setenv "DISPLAY" ":1")
8355 #t))))))
8356 (native-inputs
8357 `(("python-mock" ,python-mock)
8358 ("python-setuptools-scm" ,python-setuptools-scm)
8359 ("xorg-server" ,xorg-server)))
8360 (propagated-inputs
8361 `(("python-six" ,python-six)))
8362 (home-page "https://github.com/python-xlib/python-xlib")
8363 (synopsis "Python X11 client library")
8364 (description
8365 "The Python X Library is intended to be a fully functional
8366 X client library for Python programs. It is useful to implement
8367 low-level X clients. It is written entirely in Python.")
8368 (license license:gpl2+)))
8369
8370 (define-public python2-xlib
8371 (package-with-python2 python-xlib))
8372
8373 (define-public python-singledispatch
8374 (package
8375 (name "python-singledispatch")
8376 (version "3.4.0.3")
8377 (source
8378 (origin
8379 (method url-fetch)
8380 (uri (pypi-uri "singledispatch" version))
8381 (sha256
8382 (base32
8383 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8384 (build-system python-build-system)
8385 (native-inputs
8386 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8387 (home-page
8388 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8389 (synopsis "Backport of singledispatch feature from Python 3.4")
8390 (description
8391 "This library brings functools.singledispatch from Python 3.4 to Python
8392 2.6-3.3.")
8393 (license license:expat)))
8394
8395 (define-public python2-singledispatch
8396 (package-with-python2 python-singledispatch))
8397
8398 ;; the python- version can be removed with python-3.5
8399 (define-public python-backports-abc
8400 (package
8401 (name "python-backports-abc")
8402 (version "0.5")
8403 (source
8404 (origin
8405 (method url-fetch)
8406 (uri (pypi-uri "backports_abc" version))
8407 (sha256
8408 (base32
8409 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
8410 (build-system python-build-system)
8411 (home-page "https://github.com/cython/backports_abc")
8412 (synopsis "Backport of additions to the 'collections.abc' module")
8413 (description
8414 "Python-backports-abc provides a backport of additions to the
8415 @code{collections.abc} module in Python-3.5.")
8416 (license license:psfl)))
8417
8418 (define-public python2-backports-abc
8419 (package-with-python2 python-backports-abc))
8420
8421 (define-public python-backports-csv
8422 (package
8423 (name "python-backports-csv")
8424 (version "1.0.7")
8425 (source
8426 (origin
8427 (method url-fetch)
8428 (uri (pypi-uri "backports.csv" version))
8429 (sha256
8430 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8431 (build-system python-build-system)
8432 (home-page "https://github.com/ryanhiebert/backports.csv")
8433 (synopsis "Backport of Python 3's csv module for Python 2")
8434 (description
8435 "Provides a backport of Python 3's @code{csv} module for parsing
8436 comma separated values. The API of the @code{csv} module in Python 2
8437 is drastically different from the @code{csv} module in Python 3.
8438 This is due, for the most part, to the difference between str in
8439 Python 2 and Python 3.")
8440 (license license:psfl)))
8441
8442 (define-public python2-backports-csv
8443 (package-with-python2 python-backports-csv))
8444
8445 (define-public python2-backports-shutil-get-terminal-size
8446 (package
8447 (name "python2-backports-shutil-get-terminal-size")
8448 (version "1.0.0")
8449 (source
8450 (origin
8451 (method url-fetch)
8452 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8453 (sha256
8454 (base32
8455 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8456 (build-system python-build-system)
8457 (arguments
8458 `(#:python ,python-2
8459 #:phases
8460 (modify-phases %standard-phases
8461 (replace 'check
8462 (lambda _
8463 (setenv "PYTHONPATH" (string-append "./build/lib:"
8464 (getenv "PYTHONPATH")))
8465 (invoke "py.test" "-v"))))))
8466 (native-inputs
8467 `(("python2-pytest" ,python2-pytest)))
8468 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8469 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8470 (description
8471 "This package provides a backport of the @code{get_terminal_size
8472 function} from Python 3.3's @code{shutil}.
8473 Unlike the original version it is written in pure Python rather than C,
8474 so it might be a tiny bit slower.")
8475 (license license:expat)))
8476
8477 (define-public python-waf
8478 (package
8479 (name "python-waf")
8480 (version "2.0.19")
8481 (source (origin
8482 (method url-fetch)
8483 (uri (string-append "https://waf.io/"
8484 "waf-" version ".tar.bz2"))
8485 (sha256
8486 (base32
8487 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8488 (build-system python-build-system)
8489 (arguments
8490 '(#:phases
8491 (modify-phases %standard-phases
8492 (replace 'build
8493 (lambda _
8494 ;; XXX: Find a way to add all extra tools.
8495 (let ((tools '("gccdeps"
8496 "clang_compilation_database")))
8497 (invoke "python" "waf-light" "configure" "build"
8498 (string-append "--tools="
8499 (string-join tools ","))))))
8500 (replace 'check
8501 (lambda _
8502 (invoke "python" "waf" "--version")))
8503 (replace 'install
8504 (lambda* (#:key outputs #:allow-other-keys)
8505 (let ((out (assoc-ref outputs "out")))
8506 (install-file "waf" (string-append out "/bin")))
8507 #t))
8508 ;; waf breaks when it is wrapped.
8509 (delete 'wrap))))
8510 (home-page "https://waf.io/")
8511 (synopsis "Python-based build system")
8512 (description
8513 "Waf is a Python-based framework for configuring, compiling and installing
8514 applications.")
8515 (license license:bsd-3)))
8516
8517 (define-public python2-waf
8518 (package-with-python2 python-waf))
8519
8520 (define-public python-pyzmq
8521 (package
8522 (name "python-pyzmq")
8523 (version "22.0.3")
8524 (source
8525 (origin
8526 (method url-fetch)
8527 (uri (pypi-uri "pyzmq" version))
8528 (sha256
8529 (base32 "0bgrn65cxfz1c1sjrgyq5dy1mkhppxxbizd5wvrl03cq4zhkrxpp"))))
8530 (build-system python-build-system)
8531 (arguments
8532 `(#:configure-flags
8533 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8534 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8535 ;; --inplace' for 'python setup.py test' to work.
8536 #:tests? #f))
8537 (inputs
8538 `(("zeromq" ,zeromq)))
8539 (native-inputs
8540 `(("pkg-config" ,pkg-config)
8541 ("python-nose" ,python-nose)))
8542 (home-page "https://github.com/zeromq/pyzmq")
8543 (synopsis "Python bindings for 0MQ")
8544 (description
8545 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8546 (license license:bsd-4)))
8547
8548 (define-public python2-pyzmq
8549 (package-with-python2 python-pyzmq))
8550
8551 (define-public python-pep8
8552 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8553 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8554 ;; some dependents' test suites, and nothing more.
8555 (package
8556 (name "python-pep8")
8557 (version "1.7.0")
8558 (source
8559 (origin
8560 (method url-fetch)
8561 (uri (pypi-uri "pep8" version))
8562 (sha256
8563 (base32
8564 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8565 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8566 (build-system python-build-system)
8567 (home-page "https://pep8.readthedocs.org/")
8568 (synopsis "Python style guide checker")
8569 (description
8570 "This tools checks Python code against some of the style conventions in
8571 PEP 8.")
8572 (license license:expat)))
8573
8574 (define-public python2-pep8
8575 (package-with-python2 python-pep8))
8576
8577 (define-public python-pep517
8578 (package
8579 (inherit python-pep517-bootstrap)
8580 (name "python-pep517")
8581 (arguments
8582 '(#:phases
8583 (modify-phases %standard-phases
8584 (replace 'check
8585 (lambda* (#:key tests? #:allow-other-keys)
8586 (delete-file "pytest.ini")
8587 ;; This test tries to connect to the internet
8588 (delete-file "tests/test_meta.py")
8589 (if tests?
8590 (invoke "pytest")
8591 #t))))))
8592 (native-inputs
8593 `(("python-mock" ,python-mock)
8594 ("python-pytest" ,python-pytest)
8595 ("python-testpath" ,python-testpath)))
8596 (properties `((python2-variant . ,(delay python2-pep517))))))
8597
8598 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8599 (define-public python2-pep517
8600 (let ((base (package-with-python2
8601 (strip-python2-variant python-pep517))))
8602 (package/inherit base
8603 (name "python2-pep517")
8604 (arguments
8605 `(#:tests? #f
8606 ,@(package-arguments base)))
8607 (native-inputs `()))))
8608
8609 (define-public python-pyflakes
8610 (package
8611 (name "python-pyflakes")
8612 (version "2.3.1")
8613 (source
8614 (origin
8615 (method url-fetch)
8616 (uri (pypi-uri "pyflakes" version))
8617 (sha256
8618 (base32
8619 "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
8620 (build-system python-build-system)
8621 (home-page
8622 "https://github.com/pyflakes/pyflakes")
8623 (synopsis "Passive checker of Python programs")
8624 (description
8625 "Pyflakes statically checks Python source code for common errors.")
8626 (license license:expat)))
8627
8628 (define-public python2-pyflakes
8629 (package-with-python2 python-pyflakes))
8630
8631 (define-public python-mccabe
8632 (package
8633 (name "python-mccabe")
8634 (version "0.6.1")
8635 (source
8636 (origin
8637 (method url-fetch)
8638 (uri (pypi-uri "mccabe" version))
8639 (sha256
8640 (base32
8641 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8642 (build-system python-build-system)
8643 (native-inputs
8644 `(("python-pytest" ,python-pytest-bootstrap)
8645 ("python-pytest-runner" ,python-pytest-runner)))
8646 (home-page "https://github.com/flintwork/mccabe")
8647 (synopsis "McCabe checker, plugin for flake8")
8648 (description
8649 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8650 complexity of Python source code.")
8651 (license license:expat)))
8652
8653 (define-public python2-mccabe
8654 (package-with-python2 python-mccabe))
8655
8656 (define-public python-flake8
8657 (package
8658 (name "python-flake8")
8659 (version "3.9.0")
8660 (source (origin
8661 (method url-fetch)
8662 (uri (pypi-uri "flake8" version))
8663 (sha256
8664 (base32
8665 "1w65iyjnrwipv4dbcqxh725ri7mdx01d6pjyggd97c0j5cvkx1vq"))))
8666 (build-system python-build-system)
8667 (arguments
8668 `(#:phases
8669 (modify-phases %standard-phases
8670 (delete 'check)
8671 (add-after 'install 'check
8672 (lambda* (#:key inputs outputs #:allow-other-keys)
8673 (add-installed-pythonpath inputs outputs)
8674 (invoke "pytest" "-v")
8675 #t)))))
8676 (propagated-inputs
8677 `(("python-pycodestyle" ,python-pycodestyle)
8678 ("python-entrypoints" ,python-entrypoints)
8679 ("python-pyflakes" ,python-pyflakes)
8680 ("python-mccabe" ,python-mccabe)))
8681 (native-inputs
8682 `(("python-mock" ,python-mock)
8683 ("python-pytest" ,python-pytest-bootstrap)))
8684 (home-page "https://gitlab.com/pycqa/flake8")
8685 (synopsis
8686 "The modular source code checker: pep8, pyflakes and co")
8687 (description
8688 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8689 (properties `((python2-variant . ,(delay python2-flake8))))
8690 (license license:expat)))
8691
8692 (define-public python2-flake8
8693 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8694 (package/inherit base
8695 (propagated-inputs
8696 `(("python2-configparser" ,python2-configparser)
8697 ("python2-enum34" ,python2-enum34)
8698 ("python2-functools32" ,python2-functools32)
8699 ("python2-typing" ,python2-typing)
8700 ,@(package-propagated-inputs base))))))
8701
8702 (define-public python-flake8-bugbear
8703 (package
8704 (name "python-flake8-bugbear")
8705 (version "20.1.4")
8706 (source
8707 (origin
8708 (method url-fetch)
8709 (uri (pypi-uri "flake8-bugbear" version))
8710 (sha256
8711 (base32
8712 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8713 (build-system python-build-system)
8714 (arguments
8715 '(#:phases
8716 (modify-phases %standard-phases
8717 (add-before 'check 'disable-test
8718 (lambda _
8719 ;; This test fails on slow computers.
8720 (substitute* "tests/test_bugbear.py"
8721 (("def test_does_not_crash_on_any_valid_code")
8722 "def _test_does_not_crash_on_any_valid_code")))))))
8723 (native-inputs
8724 `(("python-hypothesis" ,python-hypothesis)
8725 ("python-hypothesmith" ,python-hypothesmith)))
8726 (propagated-inputs
8727 `(("python-attrs" ,python-attrs)
8728 ("python-flake8" ,python-flake8)))
8729 (home-page "https://github.com/PyCQA/flake8-bugbear")
8730 (synopsis
8731 "Flake8 plugin for finding likely bugs and design problems in your program")
8732 (description
8733 "This package contains a plugin for Flake8 finding likely bugs and
8734 design problems in your program. It contains warnings that don't belong
8735 in pyflakes and pycodestyle.")
8736 (license license:expat)))
8737
8738 (define-public python-flake8-continuation
8739 (package
8740 (name "python-flake8-continuation")
8741 (version "1.0.5")
8742 (source
8743 (origin
8744 (method url-fetch)
8745 (uri (pypi-uri "flake8-continuation" version))
8746 (sha256
8747 (base32
8748 "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y"))))
8749 (build-system python-build-system)
8750 (propagated-inputs
8751 `(("python-flake8" ,python-flake8)
8752 ("python-pycodestyle" ,python-pycodestyle)
8753 ("python-six" ,python-six)))
8754 (home-page "https://github.com/planetlabs/flake8-continuation")
8755 (synopsis "Flake8 Line Continuation Plugin")
8756 (description "A Flake8 plugin that checks for the line continuation
8757 style to be in the preferred method according to PEP-8, specifically:
8758 @quotation
8759 The preferred way of wrapping long lines is by using Python's implied
8760 line continuation inside parentheses, brackets and braces. Long lines
8761 can be broken over multiple lines by wrapping expressions in parentheses.
8762 These should be used in preference to using a backslash for line continuation.
8763 @end quotation")
8764 (license license:asl2.0)))
8765
8766 (define-public python-flake8-implicit-str-concat
8767 (package
8768 (name "python-flake8-implicit-str-concat")
8769 (version "0.2.0")
8770 (source
8771 (origin
8772 (method url-fetch)
8773 (uri (pypi-uri "flake8_implicit_str_concat" version))
8774 (sha256
8775 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
8776 (build-system python-build-system)
8777 (propagated-inputs
8778 `(("python-attrs" ,python-attrs)
8779 ("python-more-itertools" ,python-more-itertools)))
8780 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
8781 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
8782 (description
8783 "This is a plugin for the Python code checking tool Flake8 to encourage
8784 correct string literal concatenation.
8785
8786 It looks for style problems like implicitly concatenated string literals on
8787 the same line (which can be introduced by the code formating tool Black), or
8788 unnecessary plus operators for explicit string literal concatenation.")
8789 (license license:expat)))
8790
8791 (define-public python-flake8-polyfill
8792 (package
8793 (name "python-flake8-polyfill")
8794 (version "1.0.2")
8795 (source
8796 (origin
8797 (method url-fetch)
8798 (uri (pypi-uri "flake8-polyfill" version))
8799 (sha256
8800 (base32
8801 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8802 (build-system python-build-system)
8803 (arguments
8804 '(#:phases
8805 (modify-phases %standard-phases
8806 (replace 'check
8807 (lambda _
8808 ;; Be compatible with Pytest 4:
8809 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8810 (substitute* "setup.cfg"
8811 (("\\[pytest\\]")
8812 "[tool:pytest]"))
8813
8814 (setenv "PYTHONPATH"
8815 (string-append (getcwd) "/build/lib:"
8816 (getenv "PYTHONPATH")))
8817 (invoke "py.test" "-v"))))))
8818 (native-inputs
8819 `(("python-flake8" ,python-flake8)
8820 ("python-mock" ,python-mock)
8821 ("python-pep8" ,python-pep8)
8822 ("python-pycodestyle" ,python-pycodestyle)
8823 ("python-pytest" ,python-pytest)))
8824 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8825 (synopsis "Polyfill package for Flake8 plugins")
8826 (description
8827 "This package that provides some compatibility helpers for Flake8
8828 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8829 (license license:expat)))
8830
8831 (define-public python2-flake8-polyfill
8832 (package-with-python2 python-flake8-polyfill))
8833
8834 (define-public python-flake8-print
8835 (package
8836 (name "python-flake8-print")
8837 (version "4.0.0")
8838 (source
8839 (origin
8840 (method url-fetch)
8841 (uri (pypi-uri "flake8-print" version))
8842 (sha256
8843 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
8844 (build-system python-build-system)
8845 (propagated-inputs
8846 `(("python-flake8" ,python-flake8)
8847 ("python-pycodestyle" ,python-pycodestyle)
8848 ("python-six" ,python-six)))
8849 (home-page "https://github.com/jbkahn/flake8-print")
8850 (synopsis "Print statement checker plugin for Flake8")
8851 (description
8852 "This plugin for Flake8 checks for @code{print} statements in Python
8853 files.")
8854 (license license:expat)))
8855
8856 (define-public python-flake8-pyi
8857 (package
8858 (name "python-flake8-pyi")
8859 (version "20.5.0")
8860 (source
8861 (origin
8862 (method url-fetch)
8863 (uri (pypi-uri "flake8-pyi" version))
8864 (sha256
8865 (base32
8866 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8867 (build-system python-build-system)
8868 (propagated-inputs
8869 `(("python-attrs" ,python-attrs)
8870 ("python-flake8" ,python-flake8)
8871 ("python-pyflakes" ,python-pyflakes)))
8872 (home-page "https://github.com/ambv/flake8-pyi")
8873 (synopsis
8874 "Flake8 plugin that provides specializations for type hinting stub files")
8875 (description
8876 "This package contains a plugin that provides specializations for
8877 type hinting stub files, especially interesting for linting typeshed. It
8878 adds the @file{.pyi} extension to the default value of the @code{--filename}
8879 command-line argument to Flake8. This means stubs are linted by default with
8880 this plugin enabled, without needing to explicitly list every file. It
8881 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8882 expressions after the entire file has been read. This enables support for
8883 first-class forward references that stub files use.")
8884 (license license:expat)))
8885
8886 (define-public python-flake8-pie
8887 (package
8888 (name "python-flake8-pie")
8889 (version "0.5.0")
8890 (source
8891 (origin
8892 (method url-fetch)
8893 (uri (pypi-uri "flake8-pie" version))
8894 (sha256
8895 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8896 (build-system python-build-system)
8897 (home-page "https://github.com/sbdchd/flake8-pie")
8898 (synopsis "Flake8 extension that implements lints")
8899 (description
8900 "This package provides a flake8 extension that implements miscellaneous
8901 lints.")
8902 (license license:bsd-2)))
8903
8904 (define-public python-flake8-quotes
8905 (package
8906 (name "python-flake8-quotes")
8907 (version "3.2.0")
8908 (source
8909 (origin
8910 (method url-fetch)
8911 (uri (pypi-uri "flake8-quotes" version))
8912 (sha256
8913 (base32
8914 "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z"))))
8915 (build-system python-build-system)
8916 (propagated-inputs
8917 `(("python-flake8" ,python-flake8)))
8918 (home-page "https://github.com/zheller/flake8-quotes/")
8919 (synopsis "Flake8 lint for quotes")
8920 (description "This package provides a Flake8 lint for quotes.")
8921 (license license:expat)))
8922
8923 (define-public python-autoflake
8924 (package
8925 (name "python-autoflake")
8926 (version "1.3.1")
8927 (source
8928 (origin
8929 (method url-fetch)
8930 (uri (pypi-uri "autoflake" version))
8931 (sha256
8932 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8933 (build-system python-build-system)
8934 (propagated-inputs
8935 `(("python-pyflakes" ,python-pyflakes)))
8936 (home-page "https://github.com/myint/autoflake")
8937 (synopsis "Removes unused imports and unused variables")
8938 (description
8939 "@code{autoflake} removes unused imports and unused variables from Python
8940 code as reported by @code{pyflakes}.
8941
8942 By default, it only removes unused imports for modules that are part of the
8943 standard library. Removal of unused variables is also disabled by default.
8944 It also removes useless @code{pass} statements.")
8945 (license license:expat)))
8946
8947 (define-public python-mistune
8948 (package
8949 (name "python-mistune")
8950 (version "0.8.4")
8951 (source
8952 (origin
8953 (method url-fetch)
8954 (uri (pypi-uri "mistune" version))
8955 (sha256
8956 (base32
8957 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8958 (build-system python-build-system)
8959 (native-inputs
8960 `(("python-nose" ,python-nose)
8961 ("python-cython" ,python-cython)))
8962 (home-page "https://github.com/lepture/mistune")
8963 (synopsis "Markdown parser in pure Python")
8964 (description "This package provides a fast markdown parser in pure
8965 Python.")
8966 (license license:bsd-3)))
8967
8968 (define-public python2-mistune
8969 (package-with-python2 python-mistune))
8970
8971 (define-public python-markdown
8972 (package
8973 (name "python-markdown")
8974 (version "3.3.4")
8975 (source
8976 (origin
8977 (method url-fetch)
8978 (uri (pypi-uri "Markdown" version))
8979 (sha256
8980 (base32
8981 "0jbs73nincha8fkfxx267sfxac6pl0ckszjbqbb8gk4dhs8v9d9i"))))
8982 (build-system python-build-system)
8983 (native-inputs
8984 `(("python-nose" ,python-nose)
8985 ("python-pyyaml" ,python-pyyaml)))
8986 (home-page "https://python-markdown.github.io/")
8987 (synopsis "Python implementation of Markdown")
8988 (description
8989 "This package provides a Python implementation of John Gruber's
8990 Markdown. The library features international input, various Markdown
8991 extensions, and several HTML output formats. A command line wrapper
8992 markdown_py is also provided to convert Markdown files to HTML.")
8993 (properties `((python2-variant . ,(delay python2-markdown))))
8994 (license license:bsd-3)))
8995
8996 ;; Markdown 3.2 dropped support for Python 2.
8997 (define-public python2-markdown
8998 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8999 (package/inherit
9000 base
9001 (version "3.1.1")
9002 (source (origin
9003 (method url-fetch)
9004 (uri (pypi-uri "Markdown" version))
9005 (sha256
9006 (base32
9007 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
9008
9009 (define-public python-ptyprocess
9010 (package
9011 (name "python-ptyprocess")
9012 (version "0.5.2")
9013 (source
9014 (origin
9015 (method url-fetch)
9016 (uri (pypi-uri "ptyprocess" version))
9017 (sha256
9018 (base32
9019 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
9020 (build-system python-build-system)
9021 (native-inputs
9022 `(("python-nose" ,python-nose)))
9023 (arguments
9024 `(#:phases
9025 (modify-phases %standard-phases
9026 (replace 'check
9027 (lambda _ (invoke "nosetests"))))))
9028 (home-page "https://github.com/pexpect/ptyprocess")
9029 (synopsis "Run a subprocess in a pseudo terminal")
9030 (description
9031 "This package provides a Python library used to launch a subprocess in a
9032 pseudo terminal (pty), and interact with both the process and its pty.")
9033 (license license:isc)))
9034
9035 (define-public python2-ptyprocess
9036 (package-with-python2 python-ptyprocess))
9037
9038 (define-public python-cram
9039 (package
9040 (name "python-cram")
9041 (version "0.7")
9042 (home-page "https://bitheap.org/cram/")
9043 (source (origin
9044 (method url-fetch)
9045 (uri (list (string-append home-page "cram-"
9046 version ".tar.gz")
9047 (pypi-uri "cram" version)))
9048 (sha256
9049 (base32
9050 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
9051 (arguments
9052 '(#:phases
9053 (modify-phases %standard-phases
9054 (add-after 'unpack 'patch-source
9055 (lambda _
9056 (substitute* (find-files "cram" ".*\\.py$")
9057 ;; Replace default shell path.
9058 (("/bin/sh") (which "sh")))
9059 (substitute* (find-files "tests" ".*\\.t$")
9060 (("md5") "md5sum")
9061 (("/bin/bash") (which "bash"))
9062 (("/bin/sh") (which "sh")))
9063 (substitute* "cram/_test.py"
9064 ;; This hack works around a bug triggered by substituting
9065 ;; the /bin/sh paths. "tests/usage.t" compares the output of
9066 ;; "cram -h", which breaks the output at 80 characters. This
9067 ;; causes the line showing the default shell to break into two
9068 ;; lines, but the test expects a single line...
9069 (("env\\['COLUMNS'\\] = '80'")
9070 "env['COLUMNS'] = '160'"))
9071
9072 (substitute* "Makefile"
9073 ;; Recent versions of python-coverage have caused the test
9074 ;; coverage to decrease (as of version 0.7). Allow that.
9075 (("--fail-under=100")
9076 "--fail-under=90"))
9077
9078 #t))
9079 (replace 'check
9080 ;; The test phase uses the built library and executable.
9081 (lambda* (#:key inputs outputs #:allow-other-keys)
9082 (add-installed-pythonpath inputs outputs)
9083 (setenv "PATH" (string-append (getenv "PATH") ":"
9084 (assoc-ref outputs "out") "/bin"))
9085 (invoke "make" "test"))))))
9086 (build-system python-build-system)
9087 (native-inputs
9088 `(("python-coverage" ,python-coverage)
9089 ("which" ,which)))
9090 (synopsis "Simple testing framework for command line applications")
9091 (description
9092 "Cram is a functional testing framework for command line applications.
9093 Cram tests look like snippets of interactive shell sessions. Cram runs each
9094 command and compares the command output in the test with the command’s actual
9095 output.")
9096 (license license:gpl2+)))
9097
9098 (define-public python2-cram
9099 (package-with-python2 python-cram))
9100
9101 (define-public python-crashtest
9102 (package
9103 (name "python-crashtest")
9104 (version "0.3.1")
9105 (source
9106 (origin
9107 (method url-fetch)
9108 (uri (pypi-uri "crashtest" version))
9109 (sha256
9110 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
9111 (build-system python-build-system)
9112 (home-page "https://github.com/sdispater/crashtest")
9113 (synopsis "Manage Python errors with ease")
9114 (description
9115 "Python library that makes exceptions handling and inspection easier.")
9116 (license license:expat)))
9117
9118 (define-public python-straight-plugin
9119 (package
9120 (name "python-straight-plugin")
9121 (version "1.4.1")
9122 (source
9123 (origin
9124 (method url-fetch)
9125 (uri (pypi-uri "straight.plugin" version))
9126 (sha256
9127 (base32
9128 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
9129 (build-system python-build-system)
9130 (home-page "https://github.com/ironfroggy/straight.plugin")
9131 (synopsis "Simple namespaced plugin facility")
9132 (description "Straight Plugin provides a type of plugin you can create from
9133 almost any existing Python modules, and an easy way for outside developers to
9134 add functionality and customization to your projects with their own plugins.")
9135 (license license:expat)))
9136
9137 (define-public python2-straight-plugin
9138 (package-with-python2 python-straight-plugin))
9139
9140 (define-public python-fonttools
9141 (package
9142 (name "python-fonttools")
9143 (version "4.6.0")
9144 (source (origin
9145 (method url-fetch)
9146 (uri (pypi-uri "fonttools" version ".zip"))
9147 (sha256
9148 (base32
9149 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
9150 (build-system python-build-system)
9151 (native-inputs
9152 `(("unzip" ,unzip)
9153 ("python-pytest" ,python-pytest)
9154 ("python-pytest-runner" ,python-pytest-runner)))
9155 (home-page "https://github.com/fonttools/fonttools")
9156 (synopsis "Tools to manipulate font files")
9157 (description
9158 "FontTools/TTX is a library to manipulate font files from Python. It
9159 supports reading and writing of TrueType/OpenType fonts, reading and writing
9160 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
9161 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
9162 from an XML-based format.")
9163 (license license:expat)))
9164
9165 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
9166 (define-public python2-fonttools
9167 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
9168 (package/inherit
9169 base
9170 (version "3.44.0")
9171 (source (origin
9172 (method url-fetch)
9173 (uri (pypi-uri "fonttools" version ".zip"))
9174 (sha256
9175 (base32
9176 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
9177
9178 (define-public python-ly
9179 (package
9180 (name "python-ly")
9181 (version "0.9.5")
9182 (source
9183 (origin
9184 (method url-fetch)
9185 (uri (pypi-uri name version))
9186 (sha256
9187 (base32
9188 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
9189 (build-system python-build-system)
9190 (arguments
9191 ;; FIXME: Some tests need network access.
9192 '(#:tests? #f))
9193 (synopsis "Tool and library for manipulating LilyPond files")
9194 (description "This package provides a Python library to parse, manipulate
9195 or create documents in LilyPond format. A command line program ly is also
9196 provided that can be used to do various manipulations with LilyPond files.")
9197 (home-page "https://pypi.org/project/python-ly/")
9198 (license license:gpl2+)))
9199
9200 (define-public python-appdirs
9201 (package
9202 (name "python-appdirs")
9203 (version "1.4.3")
9204 (source
9205 (origin
9206 (method url-fetch)
9207 (uri (pypi-uri "appdirs" version))
9208 (sha256
9209 (base32
9210 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9211 (build-system python-build-system)
9212 (home-page "https://github.com/ActiveState/appdirs")
9213 (synopsis
9214 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9215 (description
9216 "This module provides a portable way of finding out where user data
9217 should be stored on various operating systems.")
9218 (license license:expat)))
9219
9220 (define-public python2-appdirs
9221 (package-with-python2 python-appdirs))
9222
9223 (define-public python-gorilla
9224 (package
9225 (name "python-gorilla")
9226 (version "0.3.0")
9227 (source (origin
9228 (method url-fetch)
9229 (uri (pypi-uri "gorilla" version))
9230 (sha256
9231 (base32
9232 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9233 (build-system python-build-system)
9234 (home-page "https://github.com/christophercrouzet/gorilla")
9235 (synopsis "Convenient monkey patching with Python")
9236 (description
9237 "Gorilla is a Python library that provides a convenient approach to
9238 monkey patching. Monkey patching is the process of modifying module and
9239 class attributes at runtime with the purpose of replacing or extending
9240 third-party code.")
9241 (license license:expat)))
9242
9243 (define-public python-llfuse
9244 (package
9245 (name "python-llfuse")
9246 (version "1.3.8")
9247 (source (origin
9248 (method url-fetch)
9249 (uri (pypi-uri "llfuse" version))
9250 (sha256
9251 (base32
9252 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9253 (build-system python-build-system)
9254 (inputs
9255 `(("fuse" ,fuse)
9256 ("attr" ,attr)))
9257 (native-inputs
9258 `(("pkg-config" ,pkg-config)))
9259 (synopsis "Python bindings for FUSE")
9260 (description
9261 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9262 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9263 (license license:lgpl2.0+)
9264 (properties `((python2-variant . ,(delay python2-llfuse))))))
9265
9266 (define-public python2-llfuse
9267 (let ((base (package-with-python2
9268 (strip-python2-variant python-llfuse))))
9269 (package/inherit base
9270 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
9271
9272 (define-public python-msgpack
9273 (package
9274 (name "python-msgpack")
9275 (version "1.0.0")
9276 (source (origin
9277 (method url-fetch)
9278 (uri (pypi-uri "msgpack" version))
9279 (sha256
9280 (base32
9281 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
9282 (build-system python-build-system)
9283 (arguments
9284 `(#:modules ((guix build utils)
9285 (guix build python-build-system)
9286 (ice-9 ftw)
9287 (srfi srfi-1)
9288 (srfi srfi-26))
9289 #:phases
9290 (modify-phases %standard-phases
9291 (replace 'check
9292 (lambda _
9293 (let ((cwd (getcwd)))
9294 (setenv "PYTHONPATH"
9295 (string-append cwd "/build/"
9296 (find (cut string-prefix? "lib" <>)
9297 (scandir (string-append cwd "/build")))
9298 ":"
9299 (getenv "PYTHONPATH")))
9300 (invoke "pytest" "-v" "test")))))))
9301 (native-inputs
9302 `(("python-pytest" ,python-pytest)))
9303 (synopsis "MessagePack (de)serializer")
9304 (description "MessagePack is a fast, compact binary serialization format,
9305 suitable for similar data to JSON. This package provides CPython bindings for
9306 reading and writing MessagePack data.")
9307 (home-page "https://pypi.org/project/msgpack/")
9308 (license license:asl2.0)))
9309
9310 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
9311 ;; release 0.5. Some packages like borg still call it by the old name for now.
9312 ;; <https://bugs.gnu.org/30662>
9313 (define-public python-msgpack-transitional
9314 (package
9315 (inherit python-msgpack)
9316 (name "python-msgpack-transitional")
9317 (version "0.5.6")
9318 (source (origin
9319 (method url-fetch)
9320 (uri (pypi-uri "msgpack" version))
9321 (sha256
9322 (base32
9323 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
9324 (arguments
9325 (substitute-keyword-arguments (package-arguments python-msgpack)
9326 ((#:phases phases)
9327 `(modify-phases ,phases
9328 (add-after 'unpack 'configure-transitional
9329 (lambda _
9330 ;; Keep using the old name.
9331 (substitute* "setup.py"
9332 (("TRANSITIONAL = False")
9333 "TRANSITIONAL = 1"))
9334 #t))))))))
9335
9336 (define-public python2-msgpack
9337 (package-with-python2 python-msgpack))
9338
9339 (define-public python-netaddr
9340 (package
9341 (name "python-netaddr")
9342 (version "0.7.19")
9343 (source
9344 (origin
9345 (method url-fetch)
9346 (uri (pypi-uri "netaddr" version))
9347 (sha256
9348 (base32
9349 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
9350 (build-system python-build-system)
9351 (arguments `(#:tests? #f)) ;; No tests.
9352 (home-page "https://github.com/drkjam/netaddr/")
9353 (synopsis "Pythonic manipulation of network addresses")
9354 (description
9355 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
9356 and MAC network addresses.")
9357 (license license:bsd-3)))
9358
9359 (define-public python2-netaddr
9360 (package-with-python2 python-netaddr))
9361
9362 (define-public python2-pyroute2
9363 (package
9364 (name "python2-pyroute2")
9365 (version "0.5.6")
9366 (source
9367 (origin
9368 (method url-fetch)
9369 (uri (pypi-uri "pyroute2" version))
9370 (sha256
9371 (base32
9372 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
9373 (build-system python-build-system)
9374 (arguments
9375 `(#:python ,python-2)) ;Python 3.x is not supported
9376 (home-page "https://github.com/svinota/pyroute2")
9377 (synopsis "Python netlink library")
9378 (description
9379 "Pyroute2 is a pure Python netlink library with minimal dependencies.
9380 Supported netlink families and protocols include:
9381 @itemize
9382 @item rtnl, network settings - addresses, routes, traffic controls
9383 @item nfnetlink - netfilter API: ipset, nftables, ...
9384 @item ipq - simplest userspace packet filtering, iptables QUEUE target
9385 @item devlink - manage and monitor devlink-enabled hardware
9386 @item generic - generic netlink families
9387 @itemize
9388 @item nl80211 - wireless functions API (basic support)
9389 @item taskstats - extended process statistics
9390 @item acpi_events - ACPI events monitoring
9391 @item thermal_events - thermal events monitoring
9392 @item VFS_DQUOT - disk quota events monitoring
9393 @end itemize
9394 @end itemize")
9395 (license license:gpl2+)))
9396
9397 (define-public python-wrapt
9398 (package
9399 (name "python-wrapt")
9400 (version "1.11.2")
9401 (source
9402 (origin
9403 (method url-fetch)
9404 (uri (pypi-uri "wrapt" version))
9405 (sha256
9406 (base32
9407 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
9408 (build-system python-build-system)
9409 (arguments
9410 ;; Tests are not included in the tarball, they are only available in the
9411 ;; git repository.
9412 `(#:tests? #f))
9413 (home-page "https://github.com/GrahamDumpleton/wrapt")
9414 (synopsis "Module for decorators, wrappers and monkey patching")
9415 (description
9416 "The aim of the wrapt module is to provide a transparent object proxy for
9417 Python, which can be used as the basis for the construction of function
9418 wrappers and decorator functions.")
9419 (license license:bsd-2)))
9420
9421 (define-public python2-wrapt
9422 (package-with-python2 python-wrapt))
9423
9424 (define-public python-commonmark
9425 (package
9426 (name "python-commonmark")
9427 (version "0.9.1")
9428 (source
9429 (origin
9430 (method url-fetch)
9431 (uri (pypi-uri "commonmark" version))
9432 (sha256
9433 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
9434 (build-system python-build-system)
9435 (arguments
9436 `(#:phases
9437 (modify-phases %standard-phases
9438 (replace 'check
9439 (lambda* (#:key inputs outputs #:allow-other-keys)
9440 (add-installed-pythonpath inputs outputs)
9441 (invoke "python" "setup.py" "test"))))))
9442 (home-page "https://github.com/readthedocs/commonmark.py")
9443 (synopsis "Python parser for the CommonMark Markdown spec")
9444 (description
9445 "This module is a pure Python port of jgm's @code{commonmark.js}, a
9446 Markdown parser and renderer for the CommonMark specification, using only
9447 native modules.")
9448 (license license:bsd-3)))
9449
9450 (define-public python-xlrd
9451 (package
9452 (name "python-xlrd")
9453 (version "1.2.0")
9454 (source (origin
9455 (method url-fetch)
9456 (uri (pypi-uri "xlrd" version))
9457 (sha256
9458 (base32
9459 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
9460 (build-system python-build-system)
9461 (arguments
9462 `(#:phases
9463 (modify-phases %standard-phases
9464 ;; Some tests depend on writing a temporary file to the user's home
9465 ;; directory.
9466 (add-after 'unpack 'fix-tests
9467 (lambda _
9468 (delete-file "tests/test_open_workbook.py")
9469 #t)))))
9470 (home-page "http://www.python-excel.org/")
9471 (synopsis "Library for extracting data from Excel files")
9472 (description "This package provides a library to extract data from
9473 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
9474 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
9475 Unicode-aware. It is not intended as an end-user tool.")
9476 (license license:bsd-3)))
9477
9478 (define-public python2-xlrd
9479 (package-with-python2 python-xlrd))
9480
9481 (define-public python-immutables
9482 (package
9483 (name "python-immutables")
9484 (version "0.14")
9485 (source
9486 (origin
9487 (method url-fetch)
9488 (uri (pypi-uri "immutables" version))
9489 (sha256
9490 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9491 (build-system python-build-system)
9492 (home-page "https://github.com/MagicStack/immutables")
9493 (synopsis "High-performance immutable mapping type for Python")
9494 (description
9495 "An immutable mapping type for Python. The underlying datastructure is a
9496 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9497 functional languages.")
9498 (license license:asl2.0)))
9499
9500 (define-public python-prettytable
9501 (package
9502 (name "python-prettytable")
9503 (version "0.7.2")
9504 (source
9505 (origin
9506 (method url-fetch)
9507 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9508 (sha256
9509 (base32
9510 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9511 (build-system python-build-system)
9512 (home-page "https://code.google.com/archive/p/prettytable/")
9513 (synopsis "Display tabular data in an ASCII table format")
9514 (description
9515 "A library designed to represent tabular data in visually appealing ASCII
9516 tables. PrettyTable allows for selection of which columns are to be printed,
9517 independent alignment of columns (left or right justified or centred) and
9518 printing of sub-tables by specifying a row range.")
9519 (license license:bsd-3)))
9520
9521 (define-public python2-prettytable
9522 (package-with-python2 python-prettytable))
9523
9524 (define-public python-curio
9525 (package
9526 (name "python-curio")
9527 (version "1.2")
9528 (source
9529 (origin
9530 (method url-fetch)
9531 (uri (pypi-uri "curio" version))
9532 (sha256
9533 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9534 (build-system python-build-system)
9535 (arguments
9536 `(#:phases
9537 (modify-phases %standard-phases
9538 (replace 'check
9539 (lambda* (#:key inputs outputs #:allow-other-keys)
9540 (add-installed-pythonpath inputs outputs)
9541 (invoke "pytest" "-vv" "-k"
9542 ;; Tries to open an outgoing connection.
9543 "not test_ssl_outgoing"))))))
9544 (native-inputs
9545 `(("python-pytest" ,python-pytest)))
9546 (home-page "https://github.com/dabeaz/curio")
9547 (synopsis "Coroutine-based library for concurrent Python")
9548 (description
9549 "Curio is a coroutine-based library for concurrent Python systems
9550 programming. It provides standard programming abstractions such as as
9551 tasks, sockets, files, locks, and queues.")
9552 (license license:bsd-3)))
9553
9554 (define-public python-tables
9555 (package
9556 (name "python-tables")
9557 (version "3.6.1")
9558 (source
9559 (origin
9560 (method url-fetch)
9561 (uri (pypi-uri "tables" version))
9562 (sha256
9563 (base32
9564 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9565 (modules '((guix build utils)))
9566 (snippet
9567 '(begin
9568 ;; Remove pre-compiled .pyc files from source.
9569 (for-each delete-file-recursively
9570 (find-files "." "__pycache__" #:directories? #t))
9571 (for-each delete-file (find-files "." "\\.pyc$"))
9572 #t))))
9573 (build-system python-build-system)
9574 (arguments
9575 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9576 ;; or "check", so we must override the build and check phases.
9577 #:phases
9578 (modify-phases %standard-phases
9579 (add-after 'unpack 'use-gcc
9580 (lambda _
9581 (substitute* "setup.py"
9582 (("^( +)compiler = new_compiler\\(\\)" line indent)
9583 (string-append line
9584 "\n"
9585 indent
9586 "compiler.set_executables(compiler='gcc',"
9587 "compiler_so='gcc',"
9588 "linker_exe='gcc',"
9589 "linker_so='gcc -shared')")))
9590 #t))
9591 (add-after 'unpack 'disable-tuning
9592 (lambda _
9593 (substitute* "setup.py"
9594 (("cpu_flags = .*")
9595 "cpu_flags = ['sse2']\n"))
9596 #t))
9597 (replace 'build
9598 (lambda* (#:key inputs #:allow-other-keys)
9599 (invoke "python" "setup.py" "build"
9600 (string-append "--hdf5="
9601 (assoc-ref inputs "hdf5")))))
9602 (replace 'check
9603 (lambda* (#:key inputs #:allow-other-keys)
9604 (invoke "python" "setup.py" "check"
9605 (string-append "--hdf5="
9606 (assoc-ref inputs "hdf5"))))))))
9607 (propagated-inputs
9608 `(("python-numexpr" ,python-numexpr)
9609 ("python-numpy" ,python-numpy)))
9610 (native-inputs
9611 `(("python-cython" ,python-cython)
9612 ("pkg-config" ,pkg-config)))
9613 (inputs
9614 `(("hdf5" ,hdf5-1.10)
9615 ("bzip2" ,bzip2)
9616 ("zlib" ,zlib)))
9617 (home-page "https://www.pytables.org/")
9618 (synopsis "Hierarchical datasets for Python")
9619 (description "PyTables is a package for managing hierarchical datasets and
9620 designed to efficiently cope with extremely large amounts of data.")
9621 (license license:bsd-3)))
9622
9623 (define-public python-sniffio
9624 (package
9625 (name "python-sniffio")
9626 (version "1.1.0")
9627 (source
9628 (origin
9629 (method url-fetch)
9630 (uri (pypi-uri "sniffio" version))
9631 (sha256
9632 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9633 (build-system python-build-system)
9634 (arguments
9635 `(#:phases
9636 (modify-phases %standard-phases
9637 (replace 'check
9638 (lambda _
9639 (invoke "pytest" "-vv"))))))
9640 (native-inputs
9641 `(("python-curio" ,python-curio)
9642 ("python-pytest" ,python-pytest)
9643 ("python-pytest-cov" ,python-pytest-cov)))
9644 (home-page "https://github.com/python-trio/sniffio")
9645 (synopsis "Detect which async library a program is running under")
9646 (description "This package detects which async library a program is
9647 running under. It supports multiple async I/O packages, like Trio, and
9648 asyncio.")
9649 ;; Either license applies.
9650 (license (list license:expat license:asl2.0))))
9651
9652 (define-public python-pytest-black
9653 (package
9654 (name "python-pytest-black")
9655 (version "0.3.8")
9656 (source
9657 (origin
9658 (method url-fetch)
9659 (uri (pypi-uri "pytest-black" version))
9660 (sha256
9661 (base32
9662 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9663 (build-system python-build-system)
9664 (propagated-inputs
9665 `(("python-pytest" ,python-pytest)
9666 ("python-black" ,python-black)
9667 ("python-toml" ,python-toml)))
9668 (native-inputs
9669 `(("python-setuptools-scm" ,python-setuptools-scm)))
9670 (home-page "https://github.com/shopkeep/pytest-black")
9671 (synopsis "Pytest plugin to enable format checking with black")
9672 (description
9673 "This package provides a pytest plugin to enable format checking with the
9674 Python code formatter \"black\".")
9675 (license license:expat)))
9676
9677 (define-public python-get-version
9678 (package
9679 (name "python-get-version")
9680 (version "2.1")
9681 (source
9682 (origin
9683 (method url-fetch)
9684 (uri (pypi-uri "get_version" version))
9685 (sha256
9686 (base32
9687 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9688 (build-system python-build-system)
9689 (propagated-inputs
9690 `(("python-pygments" ,python-pygments)
9691 ("python-pytest" ,python-pytest)
9692 ("python-pytest-black" ,python-pytest-black)
9693 ("python-pytest-cov" ,python-pytest-cov)
9694 ("python-setuptools" ,python-setuptools)
9695 ("python-testpath" ,python-testpath)))
9696 (home-page "https://github.com/flying-sheep/get_version")
9697 (synopsis "Version helper in the spirit of versioneer")
9698 (description
9699 "This package provides a version helper that lets you automatically use
9700 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9701 also supports getting the version from Python source distributions or, once
9702 your package is installed, via @code{pkg_resources} (part of
9703 @code{setuptools}).")
9704 (license license:gpl3+)))
9705
9706 (define-public python-legacy-api-wrap
9707 (package
9708 (name "python-legacy-api-wrap")
9709 (version "1.2")
9710 (source
9711 (origin
9712 (method url-fetch)
9713 (uri (pypi-uri "legacy-api-wrap" version))
9714 (sha256
9715 (base32
9716 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9717 (build-system python-build-system)
9718 (propagated-inputs
9719 `(("python-get-version" ,python-get-version)
9720 ("python-pytest" ,python-pytest)
9721 ("python-pytest-black" ,python-pytest-black)
9722 ("python-pytest-cov" ,python-pytest-cov)
9723 ("python-setuptools" ,python-setuptools)))
9724 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9725 (synopsis "Legacy API wrapper")
9726 (description "This module defines a decorator to wrap legacy APIs. The
9727 primary use case is APIs defined before keyword-only parameters existed.")
9728 (license license:gpl3+)))
9729
9730 (define-public python-pyasn1
9731 (package
9732 (name "python-pyasn1")
9733 (version "0.4.8")
9734 (source
9735 (origin
9736 (method url-fetch)
9737 (uri (pypi-uri "pyasn1" version))
9738 (sha256
9739 (base32
9740 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9741 (build-system python-build-system)
9742 (home-page "http://pyasn1.sourceforge.net/")
9743 (synopsis "ASN.1 types and codecs")
9744 (description
9745 "This is an implementation of ASN.1 types and codecs in Python. It is
9746 suitable for a wide range of protocols based on the ASN.1 specification.")
9747 (license license:bsd-2)))
9748
9749 (define-public python2-pyasn1
9750 (package-with-python2 python-pyasn1))
9751
9752 (define-public python-pyasn1-modules
9753 (package
9754 (name "python-pyasn1-modules")
9755 (version "0.2.2")
9756 (source
9757 (origin
9758 (method url-fetch)
9759 (uri (pypi-uri "pyasn1-modules" version))
9760 (sha256
9761 (base32
9762 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9763 (build-system python-build-system)
9764 (propagated-inputs
9765 `(("python-pyasn1" ,python-pyasn1)))
9766 (home-page "https://sourceforge.net/projects/pyasn1/")
9767 (synopsis "ASN.1 codec implementations")
9768 (description
9769 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9770 implementations of ASN.1-based codecs and protocols.")
9771 (license license:bsd-3)))
9772
9773 (define-public python2-pyasn1-modules
9774 (package-with-python2 python-pyasn1-modules))
9775
9776 (define-public python-ipaddress
9777 (package
9778 (name "python-ipaddress")
9779 (version "1.0.23")
9780 (source (origin
9781 (method url-fetch)
9782 (uri (pypi-uri "ipaddress" version))
9783 (sha256
9784 (base32
9785 "1qp743h30s04m3cg3yk3fycad930jv17q7dsslj4mfw0jlvf1y5p"))))
9786 (build-system python-build-system)
9787 (home-page "https://github.com/phihag/ipaddress")
9788 (synopsis "IP address manipulation library")
9789 (description
9790 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9791 in Python. This library is used to create, poke at, and manipulate IPv4 and
9792 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9793 module to older versions of Python.")
9794 (license license:psfl)))
9795
9796 (define-public python2-ipaddress
9797 (package-with-python2 python-ipaddress))
9798
9799 (define-public python2-ipaddr
9800 (package
9801 (name "python2-ipaddr")
9802 (version "2.1.11")
9803 (source
9804 (origin
9805 (method url-fetch)
9806 (uri (pypi-uri "ipaddr" version))
9807 (sha256
9808 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9809 (build-system python-build-system)
9810 (arguments
9811 `(#:python ,python-2 ;version 2 only
9812 #:phases
9813 (modify-phases %standard-phases
9814 (replace 'check
9815 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9816 (home-page "https://github.com/google/ipaddr-py")
9817 (synopsis "IP address manipulation library")
9818 (description
9819 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9820 IPv6 addresses and networks.
9821
9822 For new implementations you may prefer to use the standard module
9823 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9824 versions of Python.")
9825 (license license:asl2.0)))
9826
9827 (define-public python-idna
9828 (package
9829 (name "python-idna")
9830 (version "2.10")
9831 (source
9832 (origin
9833 (method url-fetch)
9834 (uri (pypi-uri "idna" version))
9835 (sha256
9836 (base32
9837 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9838 (build-system python-build-system)
9839 (home-page "https://github.com/kjd/idna")
9840 (synopsis "Internationalized domain names in applications")
9841 (description
9842 "This is a library to support the Internationalised Domain Names in
9843 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9844 protocol is often referred to as “IDNA2008” and can produce different results
9845 from the earlier standard from 2003. The library is also intended to act as a
9846 suitable drop-in replacement for the “encodings.idna” module that comes with
9847 the Python standard library but currently only supports the older 2003
9848 specification.")
9849 (license license:bsd-4)))
9850
9851 (define-public python-idna-2.7
9852 (package (inherit python-idna)
9853 (version "2.7")
9854 (source (origin
9855 (method url-fetch)
9856 (uri (pypi-uri "idna" version))
9857 (sha256
9858 (base32
9859 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9860
9861
9862 (define-public python2-idna
9863 (package-with-python2 python-idna))
9864
9865 (define-public python-libsass
9866 (package
9867 (name "python-libsass")
9868 (version "0.20.1")
9869 (source
9870 (origin
9871 ;; PyPI tarball is missing some test files.
9872 (method git-fetch)
9873 (uri (git-reference
9874 (url "https://github.com/sass/libsass-python")
9875 (commit version)))
9876 (file-name (git-file-name name version))
9877 (sha256
9878 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9879 (build-system python-build-system)
9880 (arguments
9881 `(#:phases
9882 (modify-phases %standard-phases
9883 ;; Use Guix package of libsass instead of compiling from a checkout.
9884 (add-before 'build 'set-libsass
9885 (lambda _
9886 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9887 #t))
9888 (replace 'check
9889 (lambda* (#:key inputs outputs #:allow-other-keys)
9890 (add-installed-pythonpath inputs outputs)
9891 (invoke "pytest" "sasstests.py"))))))
9892 (native-inputs
9893 `(("python-pytest" ,python-pytest)
9894 ("python-werkzeug" ,python-werkzeug)))
9895 (inputs
9896 `(("libsass" ,libsass)))
9897 (propagated-inputs
9898 `(("python-six" ,python-six)))
9899 (home-page "https://sass.github.io/libsass-python/")
9900 (synopsis "Straightforward binding of libsass for Python")
9901 (description
9902 "This package provides a simple Python extension module @code{sass} which
9903 is binding LibSass.")
9904 (license license:expat)))
9905
9906 (define-public python-idna-ssl
9907 (package
9908 (name "python-idna-ssl")
9909 (version "1.0.1")
9910 (source
9911 (origin
9912 (method url-fetch)
9913 (uri (pypi-uri "idna-ssl" version))
9914 (sha256
9915 (base32
9916 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9917 (build-system python-build-system)
9918 (arguments
9919 `(#:tests? #f)) ;circular dependency with python-aiohttp
9920 (home-page "https://github.com/aio-libs/idna-ssl")
9921 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9922 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9923 domains support.")
9924 (license license:expat)))
9925
9926 (define-public python-pretend
9927 (package
9928 (name "python-pretend")
9929 (version "1.0.9")
9930 (source
9931 (origin
9932 (method url-fetch)
9933 (uri (pypi-uri "pretend" version))
9934 (sha256
9935 (base32
9936 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9937 (build-system python-build-system)
9938 (home-page "https://github.com/alex/pretend")
9939 (synopsis "Library for stubbing in Python")
9940 (description
9941 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9942 technique for writing tests. You may hear the term mixed up with mocks,
9943 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9944 responses, rather than doing any computation.")
9945 (license license:bsd-3)))
9946
9947 (define-public python2-pretend
9948 (package-with-python2 python-pretend))
9949
9950 (define-public python-pip
9951 (package
9952 (name "python-pip")
9953 (version "20.2.4")
9954 (source
9955 (origin
9956 (method url-fetch)
9957 (uri (pypi-uri "pip" version))
9958 (sha256
9959 (base32
9960 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
9961 (build-system python-build-system)
9962 (arguments
9963 '(#:tests? #f)) ; there are no tests in the pypi archive.
9964 (home-page "https://pip.pypa.io/")
9965 (synopsis "Package manager for Python software")
9966 (description
9967 "Pip is a package manager for Python software, that finds packages on the
9968 Python Package Index (PyPI).")
9969 (license license:expat)))
9970
9971 (define-public python2-pip
9972 (package-with-python2 python-pip))
9973
9974 (define-public python-tlsh
9975 (package
9976 (name "python-tlsh")
9977 (version "3.4.5")
9978 (home-page "https://github.com/trendmicro/tlsh")
9979 (source
9980 (origin
9981 (method git-fetch)
9982 (uri (git-reference
9983 (url "https://github.com/trendmicro/tlsh")
9984 (commit (string-append "v" version))))
9985 (file-name (git-file-name name version))
9986 (sha256
9987 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9988 (build-system cmake-build-system)
9989 (arguments
9990 '(#:out-of-source? #f
9991 #:phases (modify-phases %standard-phases
9992 (replace
9993 'install
9994 (lambda* (#:key outputs #:allow-other-keys)
9995 ;; Build and install the Python bindings. The underlying
9996 ;; C++ library is apparently not meant to be installed.
9997 (let ((out (assoc-ref outputs "out")))
9998 (with-directory-excursion "py_ext"
9999 (and (system* "python" "setup.py" "build")
10000 (system* "python" "setup.py" "install"
10001 (string-append "--prefix=" out))))))))))
10002 (inputs `(("python" ,python-wrapper))) ;for the bindings
10003 (synopsis "Fuzzy matching library for Python")
10004 (description
10005 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
10006 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
10007 value which can be used for similarity comparisons. Similar objects have
10008 similar hash values, which allows for the detection of similar objects by
10009 comparing their hash values. The byte stream should have a sufficient amount
10010 of complexity; for example, a byte stream of identical bytes will not generate
10011 a hash value.")
10012 (license license:asl2.0)))
10013
10014 (define-public python2-tlsh
10015 (package/inherit python-tlsh
10016 (name "python2-tlsh")
10017 (inputs `(("python" ,python-2)))))
10018
10019 (define-public python-termcolor
10020 (package
10021 (name "python-termcolor")
10022 (version "1.1.0")
10023 (source
10024 (origin
10025 (method url-fetch)
10026 (uri (pypi-uri "termcolor" version))
10027 (sha256
10028 (base32
10029 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
10030 (build-system python-build-system)
10031 (arguments
10032 ;; There are no tests.
10033 `(#:tests? #f))
10034 (home-page "https://pypi.org/project/termcolor/")
10035 (synopsis "ANSII Color formatting for terminal output")
10036 (description
10037 "This package provides ANSII Color formatting for output in terminals.")
10038 (license license:expat)))
10039
10040 (define-public python2-termcolor
10041 (package-with-python2 python-termcolor))
10042
10043 (define-public python-terminaltables
10044 (package
10045 (name "python-terminaltables")
10046 (version "3.1.0")
10047 (source
10048 (origin
10049 (method url-fetch)
10050 (uri (pypi-uri "terminaltables" version))
10051 (sha256
10052 (base32
10053 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
10054 (build-system python-build-system)
10055 (home-page "https://github.com/Robpol86/terminaltables")
10056 (synopsis
10057 "Generate simple tables in terminals from a nested list of strings")
10058 (description
10059 "This package makes it easy to draw tables in terminal/console
10060 applications from a list of lists of strings. It supports multi-line rows.")
10061 (license license:expat)))
10062
10063 (define-public python-libarchive-c
10064 (package
10065 (name "python-libarchive-c")
10066 (version "2.9")
10067 (source (origin
10068 (method url-fetch)
10069 (uri (pypi-uri "libarchive-c" version))
10070 (sha256
10071 (base32
10072 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
10073 (build-system python-build-system)
10074 (arguments
10075 '(#:phases (modify-phases %standard-phases
10076 (add-before
10077 'build 'reference-libarchive
10078 (lambda* (#:key inputs #:allow-other-keys)
10079 ;; Retain the absolute file name of libarchive.so.
10080 (let ((libarchive (assoc-ref inputs "libarchive")))
10081 (substitute* "libarchive/ffi.py"
10082 (("find_library\\('archive'\\)")
10083 (string-append "'" libarchive
10084 "/lib/libarchive.so'"))))))
10085 (replace 'check
10086 (lambda _ (invoke "pytest" "-vv"))))))
10087 (native-inputs
10088 `(("python-mock" ,python-mock)
10089 ("python-pytest" ,python-pytest)))
10090 (inputs
10091 `(("libarchive" ,libarchive)))
10092 (home-page "https://github.com/Changaco/python-libarchive-c")
10093 (synopsis "Python interface to libarchive")
10094 (description
10095 "This package provides Python bindings to libarchive, a C library to
10096 access possibly compressed archives in many different formats. It uses
10097 Python's @code{ctypes} foreign function interface (FFI).")
10098 (license license:lgpl2.0+)))
10099
10100 (define-public python2-libarchive-c
10101 (package-with-python2 python-libarchive-c))
10102
10103 (define-public python-file
10104 (package/inherit file
10105 (name "python-file")
10106 (build-system python-build-system)
10107 (arguments
10108 '(#:tests? #f ;no tests
10109 #:configure-flags '("--single-version-externally-managed" "--root=/")
10110 #:phases (modify-phases %standard-phases
10111 (add-before 'build 'change-directory
10112 (lambda _
10113 (chdir "python")
10114 #t))
10115 (add-before 'build 'set-library-file-name
10116 (lambda* (#:key inputs #:allow-other-keys)
10117 (let ((file (assoc-ref inputs "file")))
10118 (substitute* "magic.py"
10119 (("find_library\\('magic'\\)")
10120 (string-append "'" file "/lib/libmagic.so'")))
10121 #t))))))
10122 (inputs `(("file" ,file)))
10123 (native-inputs (if (%current-target-system)
10124 `(("self" ,this-package))
10125 '()))
10126 (synopsis "Python bindings to the libmagic file type guesser")
10127 (description "This package provides Python bindings to the libmagic file
10128 type guesser.
10129
10130 Note that this module and the @code{python-magic} module both provide a
10131 @file{magic.py} file; these two modules, which are different and were
10132 developed separately, both serve the same purpose: provide Python bindings for
10133 libmagic.")))
10134
10135 (define-public python2-file
10136 (package-with-python2 python-file))
10137
10138 (define-public python-debian
10139 (package
10140 (name "python-debian")
10141 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
10142 (version "0.1.36")
10143 (source
10144 (origin
10145 ;; Use git-fetch, as pypi doesn't include test suite.
10146 (method git-fetch)
10147 (uri (git-reference
10148 (url home-page)
10149 (commit version)))
10150 (file-name (git-file-name name version))
10151 (sha256
10152 (base32
10153 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
10154 (build-system python-build-system)
10155 (arguments
10156 `(#:phases (modify-phases %standard-phases
10157 (add-after 'unpack 'remove-debian-specific-tests
10158 ;; python-apt, apt and dpkg are not yet available in guix,
10159 ;; and these tests heavily depend on them.
10160 (lambda _
10161 (delete-file "lib/debian/tests/test_deb822.py")
10162 (delete-file "lib/debian/tests/test_debfile.py")
10163 #t)))))
10164 (propagated-inputs
10165 `(("python-six" ,python-six)
10166 ("python-chardet" ,python-chardet)))
10167 (synopsis "Debian package related modules")
10168 (description
10169 ;; XXX: Use @enumerate instead of @itemize to work around
10170 ;; <http://bugs.gnu.org/21772>.
10171 "This package provides Python modules that abstract many formats of
10172 Debian-related files, such as:
10173
10174 @enumerate
10175 @item Debtags information;
10176 @item @file{debian/changelog} files;
10177 @item packages files, pdiffs;
10178 @item control files of single or multiple RFC822-style paragraphs---e.g.
10179 @file{debian/control}, @file{.changes}, @file{.dsc};
10180 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
10181 contained files and meta-information.
10182 @end enumerate\n")
10183
10184 ;; Modules are either GPLv2+ or GPLv3+.
10185 (license license:gpl3+)))
10186
10187 (define-public python-nbformat
10188 (package
10189 (name "python-nbformat")
10190 (version "4.4.0")
10191 (source
10192 (origin
10193 (method url-fetch)
10194 (uri (pypi-uri "nbformat" version))
10195 (sha256
10196 (base32
10197 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
10198 (build-system python-build-system)
10199 (arguments `(#:tests? #f)) ; no test target
10200 (propagated-inputs
10201 `(("python-ipython-genutils" ,python-ipython-genutils)
10202 ("python-jsonschema" ,python-jsonschema)
10203 ("python-jupyter-core" ,python-jupyter-core)
10204 ("python-traitlets" ,python-traitlets)))
10205 (home-page "https://jupyter.org")
10206 (synopsis "Jupyter Notebook format")
10207 (description "This package provides the reference implementation of the
10208 Jupyter Notebook format and Python APIs for working with notebooks.")
10209 (license license:bsd-3)))
10210
10211 (define-public python2-nbformat
10212 (package-with-python2 python-nbformat))
10213
10214 (define-public python-bleach
10215 (package
10216 (name "python-bleach")
10217 (version "3.1.5")
10218 (source
10219 (origin
10220 (method url-fetch)
10221 (uri (pypi-uri "bleach" version))
10222 (sha256
10223 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
10224 (build-system python-build-system)
10225 (propagated-inputs
10226 `(("python-webencodings" ,python-webencodings)
10227 ("python-six" ,python-six)))
10228 (native-inputs
10229 `(("python-datrie" ,python-datrie)
10230 ("python-genshi" ,python-genshi)
10231 ("python-lxml" ,python-lxml)
10232 ("python-pytest" ,python-pytest)))
10233 (home-page "https://github.com/mozilla/bleach")
10234 (synopsis "Whitelist-based HTML-sanitizing tool")
10235 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
10236 (license license:asl2.0)))
10237
10238 (define-public python2-bleach
10239 (package-with-python2 python-bleach))
10240
10241 (define-public python-entrypoints
10242 (package
10243 (name "python-entrypoints")
10244 (version "0.3")
10245 (source
10246 (origin
10247 (method url-fetch)
10248 (uri (pypi-uri "entrypoints" version))
10249 (sha256
10250 (base32
10251 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
10252 (build-system python-build-system)
10253 ;; The package does not come with a setup.py file, so we have to generate
10254 ;; one ourselves.
10255 (arguments
10256 `(#:tests? #f
10257 #:phases
10258 (modify-phases %standard-phases
10259 (add-after 'unpack 'create-setup.py
10260 (lambda _
10261 (call-with-output-file "setup.py"
10262 (lambda (port)
10263 (format port "\
10264 from setuptools import setup
10265 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
10266 " ,version))))))))
10267 (home-page "https://github.com/takluyver/entrypoints")
10268 (synopsis "Discover and load entry points from installed Python packages")
10269 (description "Entry points are a way for Python packages to advertise
10270 objects with some common interface. The most common examples are
10271 @code{console_scripts} entry points, which define shell commands by
10272 identifying a Python function to run. The @code{entrypoints} module contains
10273 functions to find and load entry points.")
10274 (license license:expat)))
10275
10276 (define-public python2-entrypoints
10277 (package-with-python2 python-entrypoints))
10278
10279 (define-public python-epc
10280 (package
10281 (name "python-epc")
10282 (version "0.0.5")
10283 (source
10284 (origin
10285 (method url-fetch)
10286 (uri (pypi-uri "epc" version))
10287 (sha256
10288 (base32
10289 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
10290 (build-system python-build-system)
10291 (propagated-inputs
10292 `(("python-sexpdata" ,python-sexpdata)))
10293 (native-inputs
10294 `(("python-nose" ,python-nose)))
10295 (home-page "https://github.com/tkf/python-epc")
10296 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
10297 (description
10298 "Python-EPC can call elisp functions from Python and Python functions
10299 from elisp.")
10300 (license license:gpl3)))
10301
10302 (define-public python-forex-python
10303 (package
10304 (name "python-forex-python")
10305 (version "1.5")
10306 (source
10307 (origin
10308 (method url-fetch)
10309 (uri (pypi-uri "forex-python" version))
10310 (sha256
10311 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
10312 (build-system python-build-system)
10313 (arguments
10314 ;; Tests are not included in the PyPI tarball. Also, the tests in the
10315 ;; repository require online data.
10316 `(#:tests? #f))
10317 (propagated-inputs
10318 `(("python-requests" ,python-requests)
10319 ("python-simplejson" ,python-simplejson)))
10320 (home-page "https://github.com/MicroPyramid/forex-python")
10321 (synopsis "Foreign exchange rates and currency conversion")
10322 (description
10323 "@code{python-forex-python} can be used to manipulate foreign
10324 exchange rates and to operate currency conversions.
10325
10326 Features:
10327 @itemize
10328 @item List all currency rates.
10329 @item BitCoin price for all currencies.
10330 @item Converting amount to BitCoins.
10331 @item Get historical rates for any day since 1999.
10332 @item Conversion rate for one currency(ex; USD to INR).
10333 @item Convert amount from one currency to other.('USD 10$' to INR).
10334 @item Currency symbols.
10335 @item Currency names.
10336 @end itemize")
10337 (license license:expat)))
10338
10339 (define-public python-simpleeval
10340 (package
10341 (name "python-simpleeval")
10342 (version "0.9.10")
10343 (source
10344 (origin
10345 (method url-fetch)
10346 (uri (pypi-uri "simpleeval" version))
10347 (sha256
10348 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
10349 (build-system python-build-system)
10350 (home-page "https://github.com/danthedeckie/simpleeval")
10351 (synopsis "Simple, safe single expression evaluator library")
10352 (description
10353 "This package provides a quick single file library for easily adding
10354 evaluatable expressions into python projects. Say you want to allow a user
10355 to set an alarm volume, which could depend on the time of day, alarm level,
10356 how many previous alarms had gone off, and if there is music playing at the
10357 time.")
10358 (license license:expat)))
10359
10360 (define-public python-nbconvert
10361 (package
10362 (name "python-nbconvert")
10363 (version "5.0.0b1")
10364 (source
10365 (origin
10366 (method url-fetch)
10367 (uri (pypi-uri "nbconvert" version))
10368 (sha256
10369 (base32
10370 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
10371 (build-system python-build-system)
10372 (arguments
10373 `(;; The "bdist_egg" target is disabled by default, causing the installation
10374 ;; to fail.
10375 #:configure-flags (list "bdist_egg")
10376 ;; FIXME: 5 failures, 40 errors.
10377 #:tests? #f))
10378 ;; #:phases
10379 ;; (modify-phases %standard-phases
10380 ;; (replace 'check
10381 ;; (lambda _
10382 ;; (zero? (system* "py.test" "-v")))))
10383 (native-inputs
10384 `(("python-pytest" ,python-pytest)))
10385 (propagated-inputs
10386 `(("python-bleach" ,python-bleach)
10387 ("python-entrypoints" ,python-entrypoints)
10388 ("python-jinja2" ,python-jinja2)
10389 ("python-jupyter-core" ,python-jupyter-core)
10390 ("python-mistune" ,python-mistune)
10391 ("python-nbformat" ,python-nbformat)
10392 ("python-pygments" ,python-pygments)
10393 ("python-traitlets" ,python-traitlets)))
10394 (home-page "https://jupyter.org")
10395 (synopsis "Converting Jupyter Notebooks")
10396 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
10397 notebooks to various other formats via Jinja templates. It allows you to
10398 convert an @code{.ipynb} notebook file into various static formats including:
10399
10400 @enumerate
10401 @item HTML
10402 @item LaTeX
10403 @item PDF
10404 @item Reveal JS
10405 @item Markdown (md)
10406 @item ReStructured Text (rst)
10407 @item executable script
10408 @end enumerate\n")
10409 (license license:bsd-3)))
10410
10411 (define-public python2-nbconvert
10412 (package-with-python2 python-nbconvert))
10413
10414 (define-public python-notebook
10415 (package
10416 (name "python-notebook")
10417 (version "5.7.4")
10418 (source (origin
10419 (method url-fetch)
10420 (uri (pypi-uri "notebook" version))
10421 (sha256
10422 (base32
10423 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
10424 (build-system python-build-system)
10425 (arguments
10426 `(#:phases
10427 (modify-phases %standard-phases
10428 (replace 'check
10429 (lambda _
10430 ;; These tests require a browser
10431 (delete-file-recursively "notebook/tests/selenium")
10432 ;; Some tests need HOME
10433 (setenv "HOME" "/tmp")
10434 ;; This file contains "warningfilters", which are not supported
10435 ;; by this version of nose.
10436 (delete-file "setup.cfg")
10437 (with-directory-excursion "/tmp"
10438 (invoke "nosetests" "-v"))
10439 #t)))))
10440 (propagated-inputs
10441 `(("python-jupyter-core" ,python-jupyter-core)
10442 ("python-nbformat" ,python-nbformat)
10443 ("python-nbconvert" ,python-nbconvert)
10444 ("python-prometheus-client" ,python-prometheus-client)
10445 ("python-send2trash" ,python-send2trash)
10446 ("python-terminado" ,python-terminado)))
10447 (native-inputs
10448 `(("python-nose" ,python-nose)
10449 ("python-sphinx" ,python-sphinx)
10450 ("python-requests" ,python-requests)))
10451 (home-page "https://jupyter.org/")
10452 (synopsis "Web-based notebook environment for interactive computing")
10453 (description
10454 "The Jupyter HTML notebook is a web-based notebook environment for
10455 interactive computing.")
10456 (properties `((python2-variant . ,(delay python2-notebook))))
10457 (license license:bsd-3)))
10458
10459 (define-public python2-notebook
10460 (let ((base (package-with-python2
10461 (strip-python2-variant python-notebook))))
10462 (package/inherit base
10463 (native-inputs
10464 `(("python2-mock" ,python2-mock)
10465 ,@(package-native-inputs base)))
10466 (arguments
10467 (substitute-keyword-arguments (package-arguments base)
10468 ((#:phases phases)
10469 `(modify-phases ,phases
10470 (add-before 'check 'disable-test-case
10471 ;; The test requires network access to localhost. Curiously it
10472 ;; fails with Python 2 only. Simply make the test-case return
10473 ;; immediately.
10474 (lambda _
10475 (substitute*
10476 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
10477 (("formats = self.nbconvert_api") "return #")))))))))))
10478
10479 (define-public python-widgetsnbextension
10480 (package
10481 (name "python-widgetsnbextension")
10482 (version "3.5.1")
10483 (source
10484 (origin
10485 (method url-fetch)
10486 (uri (pypi-uri "widgetsnbextension" version))
10487 (sha256
10488 (base32
10489 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10490 (build-system python-build-system)
10491 (propagated-inputs
10492 `(("python-ipykernel" ,python-ipykernel)
10493 ("python-notebook" ,python-notebook)))
10494 (native-inputs
10495 `(("python-certifi" ,python-certifi)
10496 ("python-nose" ,python-nose)))
10497 (home-page "https://ipython.org")
10498 (synopsis "IPython HTML widgets for Jupyter")
10499 (description "This package provides interactive HTML widgets for Jupyter
10500 notebooks.")
10501 (license license:bsd-3)))
10502
10503 (define-public python-ipywidgets
10504 (package
10505 (name "python-ipywidgets")
10506 (version "7.5.1")
10507 (source
10508 (origin
10509 (method url-fetch)
10510 (uri (pypi-uri "ipywidgets" version))
10511 (sha256
10512 (base32
10513 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10514 (build-system python-build-system)
10515 (propagated-inputs
10516 `(("python-ipython" ,python-ipython)
10517 ("python-traitlets" ,python-traitlets)
10518 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10519 (native-inputs
10520 `(("python-nose" ,python-nose)
10521 ("python-pytest" ,python-pytest)))
10522 (home-page "https://ipython.org")
10523 (synopsis "IPython HTML widgets for Jupyter")
10524 (description "Ipywidgets are interactive HTML widgets for Jupyter
10525 notebooks and the IPython kernel. Notebooks come alive when interactive
10526 widgets are used. Users gain control of their data and can visualize changes
10527 in the data.")
10528 (license license:bsd-3)))
10529
10530 (define-public python-jupyter-console
10531 (package
10532 (name "python-jupyter-console")
10533 (version "6.1.0")
10534 (source
10535 (origin
10536 (method url-fetch)
10537 (uri (pypi-uri "jupyter_console" version))
10538 (sha256
10539 (base32
10540 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10541 (build-system python-build-system)
10542 (propagated-inputs
10543 `(("python-ipykernel" ,python-ipykernel)
10544 ("python-jupyter-client" ,python-jupyter-client)
10545 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10546 ("python-pygments" ,python-pygments)))
10547 (native-inputs
10548 `(("python-nose" ,python-nose)))
10549 (home-page "https://jupyter.org")
10550 (synopsis "Jupyter terminal console")
10551 (description "This package provides a terminal-based console frontend for
10552 Jupyter kernels. It also allows for console-based interaction with non-Python
10553 Jupyter kernels such as IJulia and IRKernel.")
10554 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10555 (license license:bsd-3)))
10556
10557 (define-public python2-jupyter-console
10558 (package
10559 (name "python2-jupyter-console")
10560 (version "5.2.0")
10561 (source
10562 (origin
10563 (method url-fetch)
10564 (uri (pypi-uri "jupyter_console" version))
10565 (sha256
10566 (base32
10567 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10568 (build-system python-build-system)
10569 (arguments
10570 `(#:python ,python-2
10571 #:tests? #f)) ; Tests only run in a TTY.
10572 (propagated-inputs
10573 `(("python2-ipykernel" ,python2-ipykernel)
10574 ("python2-jupyter-client" ,python2-jupyter-client)
10575 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10576 ("python2-pygments" ,python2-pygments)))
10577 (native-inputs
10578 `(("python2-nose" ,python2-nose)))
10579 (home-page "https://jupyter.org")
10580 (synopsis "Jupyter terminal console")
10581 (description "This package provides a terminal-based console frontend for
10582 Jupyter kernels. It also allows for console-based interaction with non-Python
10583 Jupyter kernels such as IJulia and IRKernel.")
10584 (license license:bsd-3)))
10585
10586 ;; The python-ipython and python-jupyter-console require each other. To get
10587 ;; the functionality in both packages working, strip down the
10588 ;; python-jupyter-console package when using it as an input to python-ipython.
10589 (define python-jupyter-console-minimal
10590 (package/inherit python-jupyter-console
10591 (name "python-jupyter-console-minimal")
10592 (arguments
10593 (substitute-keyword-arguments
10594 (package-arguments python-jupyter-console)
10595 ((#:phases phases)
10596 `(modify-phases ,phases
10597 (add-after 'install 'delete-bin
10598 (lambda* (#:key outputs #:allow-other-keys)
10599 ;; Delete the bin files, to avoid conflicts in profiles
10600 ;; where python-ipython and python-jupyter-console are
10601 ;; both present.
10602 (delete-file-recursively
10603 (string-append
10604 (assoc-ref outputs "out") "/bin"))))))))
10605 ;; Remove the python-ipython propagated input, to avoid the cycle
10606 (propagated-inputs
10607 (alist-delete
10608 "python-ipython"
10609 (package-propagated-inputs python-jupyter-console)))))
10610
10611 (define-public python-qtconsole
10612 (package
10613 (name "python-qtconsole")
10614 (version "4.4.3")
10615 (source
10616 (origin
10617 (method url-fetch)
10618 (uri (pypi-uri "qtconsole" version))
10619 (sha256
10620 (base32
10621 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10622 (build-system python-build-system)
10623 (arguments
10624 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10625 ;; but we only have the LTS version 5.x. This means that there might be
10626 ;; runtime errors, but since this is a dependency of the Jupyter package,
10627 ;; and Jupyter can be used without the qtconsole we can overlook this for
10628 ;; now.
10629 `(#:tests? #f
10630 #:phases
10631 (modify-phases %standard-phases
10632 (add-before 'check 'pre-check
10633 (lambda _
10634 (setenv "QT_QPA_PLATFORM" "offscreen")
10635 #t)))))
10636 (propagated-inputs
10637 `(("python-ipykernel" ,python-ipykernel)
10638 ("python-ipython" ,python-ipython)))
10639 (native-inputs
10640 `(("python-pytest" ,python-pytest)))
10641 (home-page "https://jupyter.org")
10642 (synopsis "Jupyter Qt console")
10643 (description "This package provides a Qt-based console for Jupyter with
10644 support for rich media output.")
10645 (license license:bsd-3)))
10646
10647 (define-public python-jsbeautifier
10648 (package
10649 (name "python-jsbeautifier")
10650 (version "1.10.2")
10651 (home-page "https://github.com/beautify-web/js-beautify")
10652 (source (origin
10653 (method git-fetch)
10654 (uri (git-reference
10655 (url home-page)
10656 (commit (string-append "v" version))))
10657 (file-name (git-file-name name version))
10658 (sha256
10659 (base32
10660 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10661 (build-system python-build-system)
10662 (arguments
10663 `(#:phases (modify-phases %standard-phases
10664 (add-after 'unpack 'chdir
10665 (lambda _
10666 ;; The upstream Git repository contains all the code,
10667 ;; but this package only builds the python code.
10668 (chdir "python")
10669 #t))
10670 (add-after 'unpack 'patch-python-six-requirements
10671 (lambda _
10672 (substitute* "python/setup.py"
10673 (("six>=1.12.0")
10674 "six>=1.11.0"))
10675 #t)))))
10676 (propagated-inputs
10677 `(("python-editorconfig" ,python-editorconfig)
10678 ("python-six" ,python-six)))
10679 (native-inputs
10680 `(("python-pytest" ,python-pytest)))
10681 (synopsis "JavaScript unobfuscator and beautifier")
10682 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10683 popular online obfuscators.")
10684 (license license:expat)))
10685
10686 (define-public jupyter
10687 (package
10688 (name "jupyter")
10689 (version "1.0.0")
10690 (source
10691 (origin
10692 (method url-fetch)
10693 (uri (pypi-uri "jupyter" version))
10694 (sha256
10695 (base32
10696 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10697 (build-system python-build-system)
10698 (arguments '(#:tests? #f)) ; there are none.
10699 (propagated-inputs
10700 `(("python-ipykernel" ,python-ipykernel)
10701 ("python-ipywidgets" ,python-ipywidgets)
10702 ("python-jupyter-console" ,python-jupyter-console)
10703 ("python-nbconvert" ,python-nbconvert)
10704 ("python-notebook" ,python-notebook)
10705 ("python-qtconsole" ,python-qtconsole)))
10706 (native-search-paths
10707 (list (search-path-specification
10708 (variable "JUPYTER_PATH")
10709 (files '("share/jupyter")))))
10710 (home-page "https://jupyter.org")
10711 (synopsis "Web application for interactive documents")
10712 (description
10713 "The Jupyter Notebook is a web application that allows you to create and
10714 share documents that contain live code, equations, visualizations and
10715 explanatory text. Uses include: data cleaning and transformation, numerical
10716 simulation, statistical modeling, machine learning and much more.")
10717 (license license:bsd-3)))
10718
10719 (define-public python-chardet
10720 (package
10721 (name "python-chardet")
10722 (version "3.0.4")
10723 (source
10724 (origin
10725 (method url-fetch)
10726 (uri (pypi-uri "chardet" version))
10727 (sha256
10728 (base32
10729 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10730 (native-inputs
10731 `(("python-hypothesis" ,python-hypothesis)
10732 ("python-pytest" ,python-pytest)
10733 ("python-pytest-runner" ,python-pytest-runner)))
10734 (build-system python-build-system)
10735 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10736 (arguments `(#:tests? #f))
10737 (home-page "https://github.com/chardet/chardet")
10738 (synopsis "Universal encoding detector for Python 2 and 3")
10739 (description
10740 "This package provides @code{chardet}, a Python module that can
10741 automatically detect a wide range of file encodings.")
10742 (license license:lgpl2.1+)))
10743
10744 (define-public python2-chardet
10745 (package-with-python2 python-chardet))
10746
10747 (define-public python-docopt
10748 (package
10749 (name "python-docopt")
10750 (version "0.6.2")
10751 (source
10752 (origin
10753 (method git-fetch)
10754 ;; The release on PyPI does not include tests.
10755 (uri (git-reference
10756 (url "https://github.com/docopt/docopt")
10757 (commit version)))
10758 (file-name (git-file-name name version))
10759 (sha256
10760 (base32
10761 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10762 (build-system python-build-system)
10763 (native-inputs
10764 `(("python-pytest" ,python-pytest)))
10765 (arguments
10766 `(#:phases
10767 (modify-phases %standard-phases
10768 (replace 'check
10769 (lambda _ (invoke "py.test"))))))
10770 (home-page "http://docopt.org")
10771 (synopsis "Command-line interface description language for Python")
10772 (description "This library allows the user to define a command-line
10773 interface from a program's help message rather than specifying it
10774 programmatically with command-line parsers like @code{getopt} and
10775 @code{argparse}.")
10776 (license license:expat)))
10777
10778 (define-public python2-docopt
10779 (package-with-python2 python-docopt))
10780
10781 (define-public python-pythondialog
10782 (package
10783 (name "python-pythondialog")
10784 (version "3.4.0")
10785 (source
10786 (origin
10787 (method url-fetch)
10788 (uri (pypi-uri "pythondialog" version))
10789 (sha256
10790 (base32
10791 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10792 (build-system python-build-system)
10793 (arguments
10794 `(#:phases
10795 (modify-phases %standard-phases
10796 (add-after 'unpack 'patch-path
10797 (lambda* (#:key inputs #:allow-other-keys)
10798 (let* ((dialog (assoc-ref inputs "dialog")))
10799 ;; Since this library really wants to grovel the search path, we
10800 ;; must hardcode dialog's store path into it.
10801 (substitute* "dialog.py"
10802 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10803 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10804 #t))))
10805 #:tests? #f)) ; no test suite
10806 (propagated-inputs
10807 `(("dialog" ,dialog)))
10808 (home-page "http://pythondialog.sourceforge.net/")
10809 (synopsis "Python interface to the UNIX dialog utility")
10810 (description "A Python wrapper for the dialog utility. Its purpose is to
10811 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10812 This allows one to make simple text-mode user interfaces on Unix-like systems")
10813 (license license:lgpl2.1)
10814 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10815
10816 (define-public python2-pythondialog
10817 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10818 (package
10819 (inherit base)
10820 (version (package-version python-pythondialog))
10821 (source (origin
10822 (method url-fetch)
10823 (uri (pypi-uri "python2-pythondialog" version))
10824 (sha256
10825 (base32
10826 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10827
10828 (define-public python-configobj
10829 (package
10830 (name "python-configobj")
10831 (version "5.0.6")
10832 (source (origin
10833 (method url-fetch)
10834 (uri (pypi-uri "configobj" version))
10835 (sha256
10836 (base32
10837 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10838 ;; Patch setup.py so it looks for python-setuptools, which is
10839 ;; required to parse the keyword 'install_requires' in setup.py.
10840 (patches (search-patches "python-configobj-setuptools.patch"))))
10841 (build-system python-build-system)
10842 (propagated-inputs
10843 `(("python-six" ,python-six)))
10844 (synopsis "Config file reading, writing and validation")
10845 (description "ConfigObj is a simple but powerful config file reader and
10846 writer: an ini file round tripper. Its main feature is that it is very easy to
10847 use, with a straightforward programmer’s interface and a simple syntax for
10848 config files.")
10849 (home-page "https://github.com/DiffSK/configobj")
10850 (license license:bsd-3)))
10851
10852 (define-public python2-configobj
10853 (package-with-python2 python-configobj))
10854
10855 (define-public python-configargparse
10856 (package
10857 (name "python-configargparse")
10858 (version "1.2.3")
10859 (source (origin
10860 (method url-fetch)
10861 (uri (pypi-uri "ConfigArgParse" version))
10862 (sha256
10863 (base32
10864 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
10865 (build-system python-build-system)
10866 (native-inputs
10867 `(("python-pyyaml" ,python-pyyaml)))
10868 (arguments
10869 `(#:phases
10870 (modify-phases %standard-phases
10871 (replace 'check
10872 (lambda _
10873 ;; Bypass setuptools-shim because one test relies on "setup.py"
10874 ;; being the first argument passed to the python call.
10875 ;;
10876 ;; NOTE: Many tests do not run because they rely on Python's
10877 ;; built-in test.test_argparse, but we remove the unit tests from
10878 ;; our Python installation.
10879 (invoke "python" "setup.py" "test"))))))
10880 (synopsis "Replacement for argparse")
10881 (description "A drop-in replacement for argparse that allows options to also
10882 be set via config files and/or environment variables.")
10883 (home-page "https://github.com/bw2/ConfigArgParse")
10884 (license license:expat)))
10885
10886 (define-public python-argparse-manpage
10887 (package
10888 (name "python-argparse-manpage")
10889 (version "1.1")
10890 (source
10891 (origin
10892 (method url-fetch)
10893 (uri (pypi-uri "argparse-manpage" version))
10894 (sha256
10895 (base32
10896 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10897 (build-system python-build-system)
10898 (home-page "https://github.com/praiskup/argparse-manpage")
10899 (synopsis "Build manual page from Python's ArgumentParser object")
10900 (description
10901 "This package provides tools to build manual pages from Python's
10902 @code{ArgumentParser} object.")
10903 (license license:asl2.0)))
10904
10905 (define-public python-contextlib2
10906 (package
10907 (name "python-contextlib2")
10908 (version "0.6.0.post1")
10909 (source
10910 (origin
10911 (method url-fetch)
10912 (uri (pypi-uri "contextlib2" version))
10913 (sha256
10914 (base32
10915 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10916 (build-system python-build-system)
10917 (home-page "https://contextlib2.readthedocs.org/")
10918 (synopsis "Tools for decorators and context managers")
10919 (description "This module is primarily a backport of the Python
10920 3.2 contextlib to earlier Python versions. Like contextlib, it
10921 provides utilities for common tasks involving decorators and context
10922 managers. It also contains additional features that are not part of
10923 the standard library.")
10924 (properties `((python2-variant . ,(delay python2-contextlib2))))
10925 (license license:psfl)))
10926
10927 (define-public python2-contextlib2
10928 (let ((base (package-with-python2
10929 (strip-python2-variant python-contextlib2))))
10930 (package/inherit base
10931 (arguments
10932 (substitute-keyword-arguments (package-arguments base)
10933 ((#:phases phases)
10934 `(modify-phases ,phases
10935 (replace 'check
10936 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10937 (native-inputs
10938 `(("python2-unittest2" ,python2-unittest2))))))
10939
10940 ;; This package is used by python2-pytest via python2-importlib-metadata,
10941 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10942 (define-public python2-contextlib2-bootstrap
10943 (hidden-package
10944 (package/inherit
10945 python2-contextlib2
10946 (name "python2-contextlib2-bootstrap")
10947 (arguments
10948 `(#:tests? #f
10949 ,@(package-arguments python2-contextlib2)))
10950 (native-inputs '()))))
10951
10952 (define-public python-texttable
10953 (package
10954 (name "python-texttable")
10955 (version "1.6.2")
10956 (source
10957 (origin
10958 (method url-fetch)
10959 (uri (pypi-uri "texttable" version))
10960 (sha256
10961 (base32
10962 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10963 (build-system python-build-system)
10964 (arguments
10965 `(#:phases
10966 (modify-phases %standard-phases
10967 (replace 'check
10968 (lambda _ (invoke "pytest" "tests.py"))))))
10969 (native-inputs
10970 `(("python-pytest" ,python-pytest)))
10971 (home-page "https://github.com/foutaise/texttable/")
10972 (synopsis "Python module for creating simple ASCII tables")
10973 (description "Texttable is a Python module for creating simple ASCII
10974 tables.")
10975 (license license:expat)))
10976
10977 (define-public python2-texttable
10978 (package-with-python2 python-texttable))
10979
10980 (define-public python-atomicwrites
10981 (package
10982 (name "python-atomicwrites")
10983 (version "1.3.0")
10984 (source (origin
10985 (method url-fetch)
10986 (uri (pypi-uri "atomicwrites" version))
10987 (sha256
10988 (base32
10989 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10990 (build-system python-build-system)
10991 (synopsis "Atomic file writes in Python")
10992 (description "Library for atomic file writes using platform dependent tools
10993 for atomic file system operations.")
10994 (home-page "https://github.com/untitaker/python-atomicwrites")
10995 (license license:expat)))
10996
10997 (define-public python2-atomicwrites
10998 (package-with-python2 python-atomicwrites))
10999
11000 (define-public python-click-threading
11001 (package
11002 (name "python-click-threading")
11003 (version "0.4.4")
11004 (source (origin
11005 (method url-fetch)
11006 (uri (pypi-uri "click-threading" version))
11007 (sha256
11008 (base32
11009 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
11010 (build-system python-build-system)
11011 (propagated-inputs
11012 `(("python-click" ,python-click)))
11013 (synopsis "Utilities for multithreading in Click")
11014 (description "This package provides utilities for multithreading in Click
11015 applications.")
11016 (home-page "https://github.com/click-contrib/click-threading")
11017 (license license:expat)))
11018
11019 (define-public python-click-log
11020 (package
11021 (name "python-click-log")
11022 (version "0.3.2")
11023 (source (origin
11024 (method url-fetch)
11025 (uri (pypi-uri "click-log" version))
11026 (sha256
11027 (base32
11028 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
11029 (build-system python-build-system)
11030 (propagated-inputs
11031 `(("python-click" ,python-click)))
11032 (synopsis "Logging for click applications")
11033 (description "This package provides a Python library for logging Click
11034 applications.")
11035 (home-page "https://github.com/click-contrib/click-log")
11036 (license license:expat)))
11037
11038 (define-public python-click-default-group
11039 (package
11040 (name "python-click-default-group")
11041 (version "1.2.2")
11042 (source (origin
11043 (method url-fetch)
11044 (uri (pypi-uri "click-default-group" version))
11045 (sha256
11046 (base32
11047 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
11048 (build-system python-build-system)
11049 (arguments
11050 `(#:tests? #f)) ; no target
11051 (propagated-inputs
11052 `(("python-click" ,python-click)))
11053 (synopsis "Extends click.Group")
11054 (description "This package extends click.Group to invoke a command without
11055 explicit subcommand name.")
11056 (home-page "https://github.com/click-contrib/click-default-group")
11057 (license license:bsd-3)))
11058
11059 (define-public python-structlog
11060 (package
11061 (name "python-structlog")
11062 (version "20.2.0")
11063 (source
11064 (origin
11065 (method url-fetch)
11066 (uri (pypi-uri "structlog" version))
11067 (sha256
11068 (base32
11069 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
11070 (build-system python-build-system)
11071 (arguments
11072 `(#:phases
11073 (modify-phases %standard-phases
11074 (replace 'check
11075 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11076 (when tests?
11077 (add-installed-pythonpath inputs outputs)
11078 (invoke "pytest"))
11079 #t)))))
11080 (native-inputs
11081 `(("python-coverage" ,python-coverage)
11082 ("python-freezegun" ,python-freezegun)
11083 ("python-pretend" ,python-pretend)
11084 ("python-pytest" ,python-pytest)
11085 ("python-pytest-asyncio" ,python-pytest-asyncio)
11086 ("python-simplejson" ,python-simplejson)
11087 ("python-twisted" ,python-twisted)))
11088 (home-page "https://www.structlog.org/")
11089 (synopsis "Structured Logging for Python")
11090 (description "@code{structlog} changes logging in Python by adding structure
11091 to your log entries.")
11092 (license (list license:asl2.0 license:expat))))
11093
11094 (define-public python-apipkg
11095 (package
11096 (name "python-apipkg")
11097 (version "1.5")
11098 (source (origin
11099 (method url-fetch)
11100 (uri (pypi-uri "apipkg" version))
11101 (sha256
11102 (base32
11103 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
11104 (build-system python-build-system)
11105 (native-inputs
11106 `(("python-pytest" ,python-pytest)
11107 ("python-setuptools-scm" ,python-setuptools-scm)))
11108 (synopsis "Namespace control and lazy-import mechanism")
11109 (description "With apipkg you can control the exported namespace of a Python
11110 package and greatly reduce the number of imports for your users. It is a small
11111 pure Python module that works on virtually all Python versions.")
11112 (home-page "https://github.com/pytest-dev/apipkg")
11113 (license license:expat)))
11114
11115 (define-public python-execnet
11116 (package
11117 (name "python-execnet")
11118 (version "1.4.1")
11119 (source (origin
11120 (method url-fetch)
11121 (uri (pypi-uri "execnet" version))
11122 (sha256
11123 (base32
11124 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
11125 (build-system python-build-system)
11126 (arguments
11127 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
11128 ;; The two test failures are caused by the lack of an `ssh` executable.
11129 ;; The test suite can be run with pytest after the 'install' phase.
11130 #:tests? #f))
11131 (native-inputs
11132 `(("python-pytest" ,python-pytest)
11133 ("python-setuptools-scm" ,python-setuptools-scm)))
11134 (propagated-inputs
11135 `(("python-apipkg" ,python-apipkg)))
11136 (synopsis "Rapid multi-Python deployment")
11137 (description "Execnet provides a share-nothing model with
11138 channel-send/receive communication for distributing execution across many
11139 Python interpreters across version, platform and network barriers. It has a
11140 minimal and fast API targeting the following uses:
11141 @enumerate
11142 @item distribute tasks to (many) local or remote CPUs
11143 @item write and deploy hybrid multi-process applications
11144 @item write scripts to administer multiple environments
11145 @end enumerate")
11146 (home-page "https://codespeak.net/execnet/")
11147 (license license:expat)))
11148
11149 (define-public python2-execnet
11150 (package-with-python2 python-execnet))
11151
11152 (define-public python-icalendar
11153 (package
11154 (name "python-icalendar")
11155 (version "4.0.7")
11156 (source (origin
11157 (method url-fetch)
11158 (uri (pypi-uri "icalendar" version))
11159 (sha256
11160 (base32
11161 "19574j3jwssm2dkqykih4568xqfgjsa3hcd79yl5s2vfys3qvh8g"))))
11162 (build-system python-build-system)
11163 (propagated-inputs
11164 `(("python-dateutil" ,python-dateutil)
11165 ("python-pytz" ,python-pytz)))
11166 (synopsis "Python library for parsing iCalendar files")
11167 (description "The icalendar package is a parser/generator of iCalendar
11168 files for use with Python.")
11169 (home-page "https://github.com/collective/icalendar")
11170 (license license:bsd-2)))
11171
11172 (define-public python-args
11173 (package
11174 (name "python-args")
11175 (version "0.1.0")
11176 (source (origin
11177 (method url-fetch)
11178 (uri (pypi-uri "args" version))
11179 (sha256
11180 (base32
11181 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
11182 (build-system python-build-system)
11183 (home-page "https://github.com/kennethreitz/args")
11184 (synopsis "Command-line argument parser")
11185 (description
11186 "This library provides a Python module to parse command-line arguments.")
11187 (license license:bsd-3)))
11188
11189 (define-public python2-args
11190 (package-with-python2 python-args))
11191
11192 (define-public python-clint
11193 (package
11194 (name "python-clint")
11195 (version "0.5.1")
11196 (source (origin
11197 (method url-fetch)
11198 (uri (pypi-uri "clint" version))
11199 (sha256
11200 (base32
11201 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
11202 (build-system python-build-system)
11203 (arguments
11204 '(#:phases
11205 (modify-phases %standard-phases
11206 (replace 'check
11207 (lambda _ (invoke "py.test" "-v"))))))
11208 (native-inputs
11209 `(("python-pytest" ,python-pytest)))
11210 (propagated-inputs
11211 `(("python-args" ,python-args)))
11212 (home-page "https://github.com/kennethreitz/clint")
11213 (synopsis "Command-line interface tools")
11214 (description
11215 "Clint is a Python module filled with a set of tools for developing
11216 command-line applications, including tools for colored and indented
11217 output, progress bar display, and pipes.")
11218 (license license:isc)))
11219
11220 (define-public python2-clint
11221 (package-with-python2 python-clint))
11222
11223 (define-public python-rply
11224 (package
11225 (name "python-rply")
11226 (version "0.7.5")
11227 (source (origin
11228 (method url-fetch)
11229 (uri (pypi-uri "rply" version))
11230 (sha256
11231 (base32
11232 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
11233 (build-system python-build-system)
11234 (propagated-inputs
11235 `(("python-appdirs" ,python-appdirs)))
11236 (home-page "https://github.com/alex/rply")
11237 (synopsis "Parser generator for Python")
11238 (description
11239 "This package provides a pure Python based parser generator, that also
11240 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
11241 with a new public API, and RPython support.")
11242 (license license:bsd-3)))
11243
11244 (define-public python2-rply
11245 (package-with-python2 python-rply))
11246
11247 (define-public python-hy
11248 (package
11249 (name "python-hy")
11250 (version "0.18.0")
11251 (source (origin
11252 (method url-fetch)
11253 (uri (pypi-uri "hy" version))
11254 (sha256
11255 (base32
11256 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
11257 (build-system python-build-system)
11258 (arguments
11259 '(#:phases
11260 (modify-phases %standard-phases
11261 (add-before 'install 'set-HOME
11262 (lambda _
11263 (setenv "HOME" "/tmp") #t))
11264 (replace 'check
11265 (lambda _
11266 ;; Tests require write access to HOME.
11267 (setenv "HOME" "/tmp")
11268 (invoke "nosetests"))))))
11269 (native-inputs
11270 `(("python-coverage" ,python-coverage)
11271 ("python-nose" ,python-nose)))
11272 (propagated-inputs
11273 `(("python-astor" ,python-astor)
11274 ("python-colorama" ,python-colorama)
11275 ("python-rply" ,python-rply)
11276 ("python-funcparserlib"
11277 ,python-funcparserlib)))
11278 (home-page "http://hylang.org/")
11279 (synopsis "Lisp frontend to Python")
11280 (description
11281 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
11282 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
11283 Python at your fingertips, in Lisp form.")
11284 (license license:expat)))
11285
11286 (define-public python2-functools32
11287 (package
11288 (name "python2-functools32")
11289 (version "3.2.3-2")
11290 (source
11291 (origin
11292 (method url-fetch)
11293 (uri (pypi-uri "functools32" version))
11294 (sha256
11295 (base32
11296 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
11297 (build-system python-build-system)
11298 (arguments
11299 `(#:python ,python-2
11300 #:tests? #f)) ; no test target
11301 (home-page "https://github.com/MiCHiLU/python-functools32")
11302 (synopsis
11303 "Backport of the functools module from Python 3.2.3")
11304 (description
11305 "This package is a backport of the @code{functools} module from Python
11306 3.2.3 for use with older versions of Python and PyPy.")
11307 (license license:expat)))
11308
11309 (define-public python2-subprocess32
11310 (package
11311 (name "python2-subprocess32")
11312 (version "3.2.7")
11313 (source (origin
11314 (method url-fetch)
11315 (uri (pypi-uri "subprocess32" version))
11316 (sha256
11317 (base32
11318 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
11319 (patches
11320 (search-patches "python2-subprocess32-disable-input-test.patch"))))
11321 (build-system python-build-system)
11322 (arguments
11323 `(#:python ,python-2
11324 ;; The test suite fails with Python > 2.7.13:
11325 ;; import test.support
11326 ;; ImportError: No module named support
11327 #:tests? #f
11328 #:phases
11329 (modify-phases %standard-phases
11330 (add-after 'unpack 'patch-/bin/sh
11331 (lambda _
11332 (substitute* '("subprocess32.py"
11333 "test_subprocess32.py")
11334 (("/bin/sh") (which "sh")))
11335 #t)))))
11336 (home-page "https://github.com/google/python-subprocess32")
11337 (synopsis "Backport of the subprocess module from Python 3.2")
11338 (description
11339 "This is a backport of the @code{subprocess} standard library module
11340 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
11341 new features. On POSIX systems it is guaranteed to be reliable when used
11342 in threaded applications. It includes timeout support from Python 3.3 but
11343 otherwise matches 3.2’s API.")
11344 (license license:psfl)))
11345
11346 (define-public python2-futures
11347 (package
11348 (name "python2-futures")
11349 (version "3.2.0")
11350 (source
11351 (origin
11352 (method url-fetch)
11353 (uri (pypi-uri "futures" version))
11354 (sha256
11355 (base32
11356 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
11357 (build-system python-build-system)
11358 (arguments
11359 `(#:python ,python-2
11360 #:phases
11361 (modify-phases %standard-phases
11362 (replace 'check
11363 (lambda _
11364 (invoke "python" "test_futures.py")
11365 #t)))))
11366 (home-page "https://github.com/agronholm/pythonfutures")
11367 (synopsis
11368 "Backport of the concurrent.futures package from Python 3.2")
11369 (description
11370 "The concurrent.futures module provides a high-level interface for
11371 asynchronously executing callables. This package backports the
11372 concurrent.futures package from Python 3.2")
11373 (license license:bsd-3)))
11374
11375 (define-public python-promise
11376 (package
11377 (name "python-promise")
11378 (version "0.4.2")
11379 (source
11380 (origin
11381 (method url-fetch)
11382 (uri (pypi-uri "promise" version))
11383 (sha256
11384 (base32
11385 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
11386 (build-system python-build-system)
11387 ;; Tests wants python-futures, which is a python2 only program, and
11388 ;; can't be found by python-promise at test time.
11389 (arguments `(#:tests? #f))
11390 (home-page "https://github.com/syrusakbary/promise")
11391 (synopsis "Promises/A+ implementation for Python")
11392 (description
11393 "Promises/A+ implementation for Python")
11394 (properties `((python2-variant . ,(delay python2-promise))))
11395 (license license:expat)))
11396
11397 (define-public python2-promise
11398 (let ((promise (package-with-python2
11399 (strip-python2-variant python-promise))))
11400 (package/inherit promise
11401 (arguments (substitute-keyword-arguments (package-arguments promise)
11402 ((#:tests? _) #t)))
11403 (native-inputs
11404 `(("python2-futures" ,python2-futures)
11405 ("python2-pytest" ,python2-pytest)
11406 ,@(package-native-inputs promise))))))
11407
11408 (define-public python-progressbar2
11409 (package
11410 (name "python-progressbar2")
11411 (version "3.51.3")
11412 (source
11413 (origin
11414 (method url-fetch)
11415 (uri (pypi-uri "progressbar2" version))
11416 (sha256
11417 (base32
11418 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
11419 (build-system python-build-system)
11420 (propagated-inputs
11421 `(("python-six" ,python-six)
11422 ("python-utils" ,python-utils)))
11423 (native-inputs
11424 `(("python-flake8" ,python-flake8)
11425 ("python-freezegun" ,python-freezegun)
11426 ("python-pycodestyle" ,python-pycodestyle)
11427 ("python-pytest" ,python-pytest)
11428 ("python-pytest-cache" ,python-pytest-cache)
11429 ("python-pytest-cov" ,python-pytest-cov)
11430 ("python-pytest-flakes" ,python-pytest-flakes)
11431 ("python-pytest-pep8" ,python-pytest-pep8)
11432 ("python-sphinx" ,python-sphinx)))
11433 (home-page "https://github.com/WoLpH/python-progressbar")
11434 (synopsis "Text progress bar library for Python")
11435 (description
11436 "This package provides a Python progressbar library to provide
11437 visual (yet text based) progress to long running operations.")
11438 (license license:bsd-3)))
11439
11440 (define-public python-progressbar33
11441 (package
11442 (name "python-progressbar33")
11443 (version "2.4")
11444 (source
11445 (origin
11446 (method url-fetch)
11447 (uri (pypi-uri "progressbar33" version))
11448 (sha256
11449 (base32
11450 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
11451 (build-system python-build-system)
11452 (home-page "https://github.com/germangh/python-progressbar")
11453 (synopsis "Text progress bar library for Python")
11454 (description
11455 "This package provides a text progress bar library for Python. This
11456 version only differs from the original @code{progressbar} package in that it
11457 uses relative package imports instead of absolute imports, which is necessary
11458 for the module to work under Python 3.3.")
11459 ;; Either or both of these licenses may be selected.
11460 (license (list license:lgpl2.1+ license:bsd-3))))
11461
11462 (define-public python-colorama
11463 (package
11464 (name "python-colorama")
11465 (version "0.4.4")
11466 (source
11467 (origin
11468 (method url-fetch)
11469 (uri (pypi-uri "colorama" version))
11470 (sha256
11471 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
11472 (build-system python-build-system)
11473 (synopsis "Colored terminal text rendering for Python")
11474 (description "Colorama is a Python library for rendering colored terminal
11475 text.")
11476 (home-page "https://pypi.org/project/colorama/")
11477 (license license:bsd-3)))
11478
11479 (define-public python2-colorama
11480 (package-with-python2 python-colorama))
11481
11482 (define-public python-moto
11483 (package
11484 (name "python-moto")
11485 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
11486 (version "1.3.16.dev134")
11487 (source (origin
11488 (method url-fetch)
11489 (uri (pypi-uri "moto" version))
11490 (sha256
11491 (base32
11492 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
11493 (build-system python-build-system)
11494 (arguments
11495 `(#:phases (modify-phases %standard-phases
11496 (add-after 'unpack 'patch-hardcoded-executable-names
11497 (lambda _
11498 (substitute* "moto/batch/models.py"
11499 (("/bin/sh")
11500 (which "sh")))
11501 (substitute* (find-files "tests" "\\.py$")
11502 (("#!/bin/bash")
11503 (string-append "#!" (which "bash"))))
11504 #t))
11505 (replace 'check
11506 (lambda _
11507 (setenv "PYTHONPATH" (string-append "./build/lib:"
11508 (getenv "PYTHONPATH")))
11509 (invoke "pytest" "-vv" "-m" "not network"
11510 ;; These tests require Docker.
11511 "-k" "not test_terminate_job \
11512 and not test_invoke_function_from_sqs_exception"))))))
11513 (native-inputs
11514 `(("python-flask" ,python-flask)
11515 ("python-flask-cors" ,python-flask-cors)
11516 ("python-freezegun" ,python-freezegun)
11517 ("python-parameterized" ,python-parameterized)
11518 ("python-pytest" ,python-pytest)
11519 ("python-sure" ,python-sure)))
11520 (propagated-inputs
11521 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
11522 ("python-boto" ,python-boto)
11523 ("python-boto3" ,python-boto3)
11524 ("python-botocore" ,python-botocore)
11525 ("python-cfn-lint" ,python-cfn-lint)
11526 ("python-cryptography" ,python-cryptography)
11527 ("python-dateutil" ,python-dateutil)
11528 ("python-docker" ,python-docker)
11529 ("python-idna" ,python-idna)
11530 ("python-jinja2" ,python-jinja2)
11531 ("python-jose" ,python-jose)
11532 ("python-jsondiff" ,python-jsondiff)
11533 ("python-mock" ,python-mock)
11534 ("python-pytz" ,python-pytz)
11535 ("python-pyyaml" ,python-pyyaml)
11536 ("python-requests" ,python-requests)
11537 ("python-responses" ,python-responses)
11538 ("python-six" ,python-six)
11539 ("python-sshpubkeys" ,python-sshpubkeys)
11540 ("python-werkzeug" ,python-werkzeug)
11541 ("python-xmltodict" ,python-xmltodict)))
11542 (home-page "https://github.com/spulec/moto")
11543 (synopsis "Mock out the boto library")
11544 (description
11545 "@code{moto} is a library designed to easily mock out the
11546 @code{boto} library.")
11547 (license license:asl2.0)))
11548
11549 (define-public python-rsa
11550 (package
11551 (name "python-rsa")
11552 (version "3.4.2")
11553 (source
11554 (origin
11555 (method url-fetch)
11556 (uri (pypi-uri "rsa" version))
11557 (sha256
11558 (base32
11559 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11560 (build-system python-build-system)
11561 (propagated-inputs
11562 `(("python-pyasn1" ,python-pyasn1)))
11563 (synopsis "Pure-Python RSA implementation")
11564 (description "Python-RSA is a pure-Python RSA implementation. It supports
11565 encryption and decryption, signing and verifying signatures, and key
11566 generation according to PKCS#1 version 1.5. It can be used as a Python
11567 library as well as on the command line.")
11568 (home-page "https://stuvel.eu/rsa")
11569 (license license:asl2.0)))
11570
11571 (define-public python2-rsa
11572 (package-with-python2 python-rsa))
11573
11574 (define-public python-pluggy
11575 (package
11576 (name "python-pluggy")
11577 (version "0.13.1")
11578 (source
11579 (origin
11580 (method url-fetch)
11581 (uri (pypi-uri "pluggy" version))
11582 (sha256
11583 (base32
11584 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11585 (build-system python-build-system)
11586 (native-inputs
11587 `(("python-setuptools-scm" ,python-setuptools-scm)))
11588 (synopsis "Plugin and hook calling mechanism for Python")
11589 (description "Pluggy is an extraction of the plugin manager as used by
11590 Pytest but stripped of Pytest specific details.")
11591 (home-page "https://pypi.org/project/pluggy/")
11592 (properties `((python2-variant . ,(delay python2-pluggy))))
11593 (license license:expat)))
11594
11595 (define-public python2-pluggy
11596 (let ((base (package-with-python2 (strip-python2-variant
11597 python-pluggy))))
11598 (package/inherit
11599 base
11600 (propagated-inputs
11601 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11602
11603 ;; This package requires python2-importlib-metadata, but that package
11604 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11605 ;; variant to solve the circular dependency.
11606 (define-public python2-pluggy-bootstrap
11607 (hidden-package
11608 (package/inherit
11609 python2-pluggy
11610 (name "python2-pluggy-bootstrap")
11611 (arguments
11612 `(#:tests? #f
11613 ,@(package-arguments python2-pluggy)))
11614 (propagated-inputs
11615 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11616
11617 (define-public python-plumbum
11618 (package
11619 (name "python-plumbum")
11620 (version "1.7.0")
11621 (source
11622 (origin
11623 (method url-fetch)
11624 (uri (pypi-uri "plumbum" version))
11625 (sha256
11626 (base32 "1kidj821k79dw064rlxh84xamb9h79ychg3pgj81jlvm5hs48xri"))))
11627 (build-system python-build-system)
11628 (arguments
11629 `(#:tests? #f)) ;no tests
11630 (native-inputs
11631 ;; XXX: Not actually used since there are no tests but required for
11632 ;; build.
11633 `(("python-pytest" ,python-pytest)))
11634 (home-page "https://plumbum.readthedocs.io")
11635 (synopsis "Python shell combinators library")
11636 (description
11637 "Plumbum is a library of tools for replacing shell scripts with Python
11638 code.")
11639 (license license:expat)))
11640
11641 (define-public python-tox
11642 (package
11643 (name "python-tox")
11644 (version "3.20.0")
11645 (source
11646 (origin
11647 (method url-fetch)
11648 (uri (pypi-uri "tox" version))
11649 (sha256
11650 (base32
11651 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11652 (build-system python-build-system)
11653 (arguments
11654 ;; FIXME: Tests require pytest-timeout, which itself requires
11655 ;; pytest>=2.8.0 for installation.
11656 '(#:tests? #f))
11657 (propagated-inputs
11658 `(("python-filelock" ,python-filelock)
11659 ("python-packaging" ,python-packaging)
11660 ("python-pluggy" ,python-pluggy)
11661 ("python-py" ,python-py)
11662 ("python-six" ,python-six)
11663 ("python-toml" ,python-toml)
11664 ("python-virtualenv" ,python-virtualenv)))
11665 (native-inputs
11666 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11667 ("python-pytest" ,python-pytest) ; >= 2.3.5
11668 ("python-setuptools-scm" ,python-setuptools-scm)))
11669 (home-page "https://tox.readthedocs.io")
11670 (synopsis "Virtualenv-based automation of test activities")
11671 (description "Tox is a generic virtualenv management and test command line
11672 tool. It can be used to check that a package installs correctly with
11673 different Python versions and interpreters, or run tests in each type of
11674 supported environment, or act as a frontend to continuous integration
11675 servers.")
11676 (license license:expat)))
11677
11678 (define-public python-jmespath
11679 (package
11680 (name "python-jmespath")
11681 (version "0.9.4")
11682 (source
11683 (origin
11684 (method url-fetch)
11685 (uri (pypi-uri "jmespath" version))
11686 (sha256
11687 (base32
11688 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11689 (build-system python-build-system)
11690 (native-inputs
11691 `(("python-nose" ,python-nose)))
11692 (synopsis "JSON Matching Expressions")
11693 (description "JMESPath (pronounced “james path”) is a Python library that
11694 allows one to declaratively specify how to extract elements from a JSON
11695 document.")
11696 (home-page "https://github.com/jmespath/jmespath.py")
11697 (license license:expat)))
11698
11699 (define-public python2-jmespath
11700 (package-with-python2 python-jmespath))
11701
11702 (define-public python-symengine
11703 (package
11704 (name "python-symengine")
11705 (version "0.6.1")
11706 (source
11707 (origin
11708 (method url-fetch)
11709 (uri (pypi-uri "symengine" version))
11710 (sha256
11711 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11712 (build-system python-build-system)
11713 (native-inputs
11714 `(("cmake" ,cmake)
11715 ("python-cython" ,python-cython)))
11716 (inputs
11717 `(("symengine" ,symengine)))
11718 (home-page "https://github.com/symengine/symengine.py")
11719 (synopsis "Python library providing wrappers to SymEngine")
11720 (description
11721 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11722 manipulation library.")
11723 (license license:expat)))
11724
11725 (define-public python-uncertainties
11726 (package
11727 (name "python-uncertainties")
11728 (version "3.1.5")
11729 (source
11730 (origin
11731 (method url-fetch)
11732 (uri (pypi-uri "uncertainties" version))
11733 (sha256
11734 (base32
11735 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
11736 (build-system python-build-system)
11737 ;; While there are test files, there is no "tests" directory, so the tests
11738 ;; fail.
11739 (arguments '(#:tests? #false))
11740 (propagated-inputs
11741 `(("python-future" ,python-future)))
11742 (native-inputs
11743 `(("python-nose" ,python-nose)
11744 ("python-numpy" ,python-numpy)))
11745 (home-page "https://uncertainties-python-package.readthedocs.io/")
11746 (synopsis "Calculations with uncertainties")
11747 (description
11748 "The uncertainties package transparently handles calculations with
11749 numbers with uncertainties. It can also yield the derivatives of any
11750 expression.")
11751 (license license:bsd-3)))
11752
11753 (define-public python-asteval
11754 (package
11755 (name "python-asteval")
11756 (version "0.9.23")
11757 (source
11758 (origin
11759 (method url-fetch)
11760 (uri (pypi-uri "asteval" version))
11761 (sha256
11762 (base32
11763 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
11764 (build-system python-build-system)
11765 (native-inputs
11766 `(("python-pytest" ,python-pytest)))
11767 (home-page "https://github.com/newville/asteval")
11768 (synopsis "Minimalistic evaluator of Python expressions")
11769 (description
11770 "This package provides a minimalistic evaluator of Python expression
11771 using the @code{ast} module")
11772 (license license:expat)))
11773
11774 (define-public python-lmfit
11775 (package
11776 (name "python-lmfit")
11777 (version "1.0.2")
11778 (source
11779 (origin
11780 (method url-fetch)
11781 (uri (pypi-uri "lmfit" version))
11782 (sha256
11783 (base32
11784 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
11785 (build-system python-build-system)
11786 (propagated-inputs
11787 `(("python-asteval" ,python-asteval)
11788 ("python-numpy" ,python-numpy)
11789 ("python-scipy" ,python-scipy)
11790 ("python-uncertainties" ,python-uncertainties)))
11791 (native-inputs
11792 `(("python-pytest" ,python-pytest)))
11793 (home-page "https://lmfit.github.io/lmfit-py/")
11794 (synopsis "Least-Squares minimization with bounds and constraints")
11795 (description
11796 "Lmfit provides a high-level interface to non-linear optimization and
11797 curve fitting problems for Python. It builds on and extends many of the
11798 optimization methods of @code{scipy.optimize}. Initially inspired by (and
11799 named for) extending the Levenberg-Marquardt method from
11800 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
11801 enhancements to optimization and data fitting problems.")
11802 (license license:bsd-3)))
11803
11804 (define-public python-boto
11805 (package
11806 (name "python-boto")
11807 (version "2.49.0")
11808 (source (origin
11809 (method url-fetch)
11810 (uri (pypi-uri "boto" version))
11811 (sha256
11812 (base32
11813 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
11814 (build-system python-build-system)
11815 (arguments
11816 ;; XXX: This package is unmaintained and has problems with newer versions
11817 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
11818 ;; subset of this library, so keep it around for now, but disable tests.
11819 '(#:tests? #f))
11820 (propagated-inputs
11821 `(("python-paramiko" ,python-paramiko)
11822 ("python-requests" ,python-requests)))
11823 (home-page "https://github.com/boto/boto")
11824 (synopsis "Python interfaces for Amazon Web Services")
11825 (description
11826 "This package provides various facilities for interacting with Amazon
11827 Web Services through Python.
11828
11829 This software is unmaintained, and new projects should use @code{boto3} instead.")
11830 (license license:expat)))
11831
11832 (define-public python-botocore
11833 ;; Note: When updating botocore, also make sure that boto3 and awscli
11834 ;; are compatible.
11835 (package
11836 (name "python-botocore")
11837 (version "1.19.22")
11838 (source
11839 (origin
11840 (method url-fetch)
11841 (uri (pypi-uri "botocore" version))
11842 (sha256
11843 (base32
11844 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
11845 (build-system python-build-system)
11846 (arguments
11847 ;; FIXME: Many tests are failing.
11848 '(#:tests? #f))
11849 (propagated-inputs
11850 `(("python-dateutil" ,python-dateutil)
11851 ("python-jmespath" ,python-jmespath)
11852 ("python-urllib3" ,python-urllib3)))
11853 (home-page "https://github.com/boto/botocore")
11854 (synopsis "Low-level interface to AWS")
11855 (description "Botocore is a Python library that provides a low-level
11856 interface to the Amazon Web Services (AWS) API.")
11857 (license license:asl2.0)))
11858
11859 (define-public python2-botocore
11860 (package-with-python2 python-botocore))
11861
11862 (define-public python-boto3
11863 (package
11864 (name "python-boto3")
11865 (version "1.16.22")
11866 (home-page "https://github.com/boto/boto3")
11867 (source (origin
11868 (method git-fetch)
11869 (uri (git-reference (url home-page) (commit version)))
11870 (file-name (git-file-name name version))
11871 (sha256
11872 (base32
11873 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
11874 (arguments
11875 `(#:phases
11876 (modify-phases %standard-phases
11877 (add-after 'unpack 'delete-network-tests
11878 ;; Deleting integration tests because they are trying to connect to AWS.
11879 (lambda _
11880 (delete-file-recursively "tests/integration")
11881 #t)))))
11882 (build-system python-build-system)
11883 (native-inputs
11884 `(("python-nose" ,python-nose)
11885 ("python-mock" ,python-mock)))
11886 (propagated-inputs
11887 `(("python-botocore" ,python-botocore)
11888 ("python-jmespath" ,python-jmespath)
11889 ("python-s3transfer" ,python-s3transfer)))
11890 (synopsis "AWS SDK for Python")
11891 (description
11892 "Boto3 is a Python library for writing programs that interact with
11893 @acronym{AWS,Amazon Web Services}.")
11894 (license license:asl2.0)))
11895
11896 (define-public python-pyfiglet
11897 (package
11898 (name "python-pyfiglet")
11899 (version "0.8.post1")
11900 (source
11901 (origin
11902 (method url-fetch)
11903 (uri (pypi-uri "pyfiglet" version))
11904 (sha256
11905 (base32
11906 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11907 (build-system python-build-system)
11908 (home-page "https://github.com/pwaller/pyfiglet")
11909 (synopsis "Draw ASCII art big letters in Python")
11910 (description "This module lets you draw large letter from ordinary characters
11911 in pure Python.")
11912 (license license:expat)))
11913
11914 (define-public python-xdo
11915 (package
11916 (name "python-xdo")
11917 (version "0.3")
11918 (source (origin
11919 (method url-fetch)
11920 (uri (string-append
11921 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11922 "python-xdo_" version ".orig.tar.gz"))
11923 (sha256
11924 (base32
11925 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11926 (build-system python-build-system)
11927 (arguments
11928 '(#:phases
11929 (modify-phases %standard-phases
11930 (add-before 'install 'patch-libxdo-path
11931 ;; Hardcode the path of dynamically loaded libxdo library.
11932 (lambda* (#:key inputs #:allow-other-keys)
11933 (let ((libxdo (string-append
11934 (assoc-ref inputs "xdotool")
11935 "/lib/libxdo.so")))
11936 (substitute* "xdo/_xdo.py"
11937 (("find_library\\(\"xdo\"\\)")
11938 (simple-format #f "\"~a\"" libxdo)))
11939 #t))))
11940 #:tests? #f)) ; no tests provided
11941 (propagated-inputs
11942 `(("python-six" ,python-six)))
11943 (inputs
11944 `(("xdotool" ,xdotool)
11945 ("libX11" ,libx11)))
11946 (home-page "https://tracker.debian.org/pkg/python-xdo")
11947 (synopsis "Python library for simulating X11 keyboard/mouse input")
11948 (description "Provides bindings to libxdo for manipulating X11 via simulated
11949 input. (Note that this is mostly a legacy library; you may wish to look at
11950 python-xdo for newer bindings.)")
11951 (license license:bsd-3)))
11952
11953 (define-public python2-xdo
11954 (package-with-python2 python-xdo))
11955
11956 (define-public python-mako
11957 (package
11958 (name "python-mako")
11959 (version "1.1.3")
11960 (source
11961 (origin
11962 (method url-fetch)
11963 (uri (pypi-uri "Mako" version))
11964 (sha256
11965 (base32
11966 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11967 (build-system python-build-system)
11968 (arguments
11969 `(#:phases (modify-phases %standard-phases
11970 (replace 'check
11971 (lambda* (#:key tests? #:allow-other-keys)
11972 (if tests?
11973 (invoke "nosetests" "-v")
11974 (format #t "test suite not run~%"))
11975 #t)))))
11976 (propagated-inputs
11977 `(("python-markupsafe" ,python-markupsafe)))
11978 (native-inputs
11979 `(("python-mock" ,python-mock)
11980 ("python-nose" ,python-nose)))
11981 (home-page "https://www.makotemplates.org/")
11982 (synopsis "Templating language for Python")
11983 (description "Mako is a templating language for Python that compiles
11984 templates into Python modules.")
11985 (license license:expat)))
11986
11987 (define-public python2-mako
11988 (package-with-python2 python-mako))
11989
11990 (define-public python-waitress
11991 (package
11992 (name "python-waitress")
11993 (version "1.1.0")
11994 (source
11995 (origin
11996 (method url-fetch)
11997 (uri (pypi-uri "waitress" version))
11998 (patches (search-patches "python-waitress-fix-tests.patch"))
11999 (sha256
12000 (base32
12001 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
12002 (build-system python-build-system)
12003 (home-page "https://github.com/Pylons/waitress")
12004 (synopsis "Waitress WSGI server")
12005 (description "Waitress is meant to be a production-quality pure-Python WSGI
12006 server with very acceptable performance.")
12007 (license license:zpl2.1)))
12008
12009 (define-public python2-waitress
12010 (package-with-python2 python-waitress))
12011
12012 (define-public python-whichcraft
12013 (package
12014 (name "python-whichcraft")
12015 (version "0.6.1")
12016 (source
12017 (origin
12018 (method url-fetch)
12019 (uri (pypi-uri "whichcraft" version))
12020 (sha256
12021 (base32
12022 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
12023 (build-system python-build-system)
12024 (native-inputs
12025 `(("python-pytest" ,python-pytest)))
12026 (home-page "https://github.com/pydanny/whichcraft")
12027 (synopsis "Cross-platform cross-python shutil.which functionality")
12028 (description
12029 "This package provides a shim of the shutil.which function that's
12030 designed to work across multiple versions of Python.")
12031 (license license:bsd-3)))
12032
12033 (define-public python-cookiecutter
12034 (package
12035 (name "python-cookiecutter")
12036 (version "1.7.2")
12037 (source
12038 (origin
12039 (method url-fetch)
12040 (uri (pypi-uri "cookiecutter" version))
12041 (sha256
12042 (base32
12043 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
12044 (build-system python-build-system)
12045 (native-inputs
12046 `(("python-freezegun" ,python-freezegun)
12047 ("python-pytest" ,python-pytest)
12048 ("python-pytest-catchlog" ,python-pytest-catchlog)
12049 ("python-pytest-cov" ,python-pytest-cov)
12050 ("python-pytest-mock" ,python-pytest-mock)))
12051 (propagated-inputs
12052 `(("python-binaryornot" ,python-binaryornot)
12053 ("python-click" ,python-click)
12054 ("python-future" ,python-future)
12055 ("python-jinja2" ,python-jinja2)
12056 ("python-jinja2-time" ,python-jinja2-time)
12057 ("python-poyo" ,python-poyo)
12058 ("python-requests" ,python-requests)
12059 ("python-slugify" ,python-slugify)
12060 ("python-text-unidecode" ,python-text-unidecode)
12061 ("python-whichcraft" ,python-whichcraft)))
12062 (home-page "https://github.com/cookiecutter/cookiecutter")
12063 (synopsis
12064 "Command-line utility that creates projects from project templates")
12065 (description
12066 "This package provides a command-line utility that creates projects from
12067 project templates, e.g. creating a Python package project from a Python package
12068 project template.")
12069 (license license:bsd-3)))
12070
12071 (define-public python-pyquery
12072 (package
12073 (name "python-pyquery")
12074 (version "1.2.17")
12075 (source
12076 (origin
12077 (method url-fetch)
12078 (uri (pypi-uri "pyquery" version))
12079 (sha256
12080 (base32
12081 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
12082 (build-system python-build-system)
12083 (native-inputs
12084 `(("python-webob" ,python-webob)
12085 ("python-webtest" ,python-webtest)))
12086 (propagated-inputs
12087 `(("python-lxml" ,python-lxml)
12088 ("python-cssselect" ,python-cssselect)))
12089 (home-page "https://github.com/gawel/pyquery")
12090 (synopsis "Make jQuery-like queries on xml documents")
12091 (description "pyquery allows you to make jQuery queries on xml documents.
12092 The API is as much as possible the similar to jQuery. pyquery uses lxml for
12093 fast xml and html manipulation.")
12094 (license license:bsd-3)))
12095
12096 (define-public python-anyjson
12097 (package
12098 (name "python-anyjson")
12099 (version "0.3.3")
12100 (source
12101 (origin
12102 (method url-fetch)
12103 (uri (pypi-uri "anyjson" version))
12104 (sha256
12105 (base32
12106 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
12107 (build-system python-build-system)
12108 (arguments
12109 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
12110 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
12111 ;; whatever) so this transformation needs to be done before the tests
12112 ;; can be run. Maybe we could add a build step to transform beforehand
12113 ;; but it could be annoying/difficult.
12114 ;; We can enable tests for the Python 2 version, though, and do below.
12115 #:tests? #f))
12116 (home-page "https://bitbucket.org/runeh/anyjson/")
12117 (synopsis
12118 "Wraps best available JSON implementation in a common interface")
12119 (description
12120 "Anyjson loads whichever is the fastest JSON module installed
12121 and provides a uniform API regardless of which JSON implementation is used.")
12122 (license license:bsd-3)
12123 (properties `((python2-variant . ,(delay python2-anyjson))))))
12124
12125 (define-public python2-anyjson
12126 (let ((anyjson (package-with-python2
12127 (strip-python2-variant python-anyjson))))
12128 (package/inherit anyjson
12129 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
12130 #:tests? #t
12131 ,@(package-arguments anyjson)))
12132 (native-inputs `(("python2-nose" ,python2-nose))))))
12133
12134 (define-public python-amqp
12135 (package
12136 (name "python-amqp")
12137 (version "2.3.2")
12138 (source
12139 (origin
12140 (method url-fetch)
12141 (uri (pypi-uri "amqp" version))
12142 (sha256
12143 (base32
12144 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
12145 (build-system python-build-system)
12146 (native-inputs
12147 `(("python-case" ,python-case)
12148 ("python-pytest-sugar" ,python-pytest-sugar)
12149 ("python-mock" ,python-mock)))
12150 (propagated-inputs
12151 `(("python-vine" ,python-vine)))
12152 (home-page "https://github.com/celery/py-amqp")
12153 (synopsis
12154 "Low-level AMQP client for Python (fork of amqplib)")
12155 (description
12156 "This is a fork of amqplib which was originally written by Barry Pederson.
12157 It is maintained by the Celery project, and used by kombu as a pure python
12158 alternative when librabbitmq is not available.")
12159 (license license:lgpl2.1+)
12160 (properties `((python2-variant . ,(delay python2-amqp))))))
12161
12162 (define-public python2-amqp
12163 (let ((amqp (package-with-python2
12164 (strip-python2-variant python-amqp))))
12165 (package/inherit amqp
12166 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
12167 ;; unmaintained. Weirdly, does not do this on the python 3
12168 ;; version?
12169 #:tests? #f
12170 ,@(package-arguments amqp))))))
12171
12172 (define-public python-txamqp
12173 (package
12174 (name "python-txamqp")
12175 (version "0.8.2")
12176 (source
12177 (origin
12178 (method url-fetch)
12179 (uri (pypi-uri "txAMQP" version))
12180 (sha256
12181 (base32
12182 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
12183 (build-system python-build-system)
12184 (propagated-inputs
12185 `(("python-six" ,python-six)
12186 ("python-twisted" ,python-twisted)))
12187 (home-page "https://github.com/txamqp/txamqp")
12188 (synopsis "Communicate with AMQP peers and brokers using Twisted")
12189 (description
12190 "This package provides a Python library for communicating with AMQP peers
12191 and brokers using the asynchronous networking framework Twisted. It contains
12192 all the necessary code to connect, send and receive messages to/from an
12193 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
12194 also includes support for using Thrift RPC over AMQP in Twisted
12195 applications.")
12196 (license license:asl2.0)))
12197
12198 (define-public python2-txamqp
12199 (package-with-python2 python-txamqp))
12200
12201 (define-public python-kombu
12202 (package
12203 (name "python-kombu")
12204 (version "4.2.2")
12205 (source
12206 (origin
12207 (method url-fetch)
12208 (uri (pypi-uri "kombu" version))
12209 (sha256
12210 (base32
12211 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
12212 (build-system python-build-system)
12213 (native-inputs
12214 `(("python-mock" ,python-mock)
12215 ("python-case" ,python-case)
12216 ("python-pyro4" ,python-pyro4)
12217 ("python-pytest-sugar" ,python-pytest-sugar)
12218 ("python-pytz" ,python-pytz)))
12219 (propagated-inputs
12220 `(("python-anyjson" ,python-anyjson)
12221 ("python-amqp" ,python-amqp)
12222 ("python-redis" ,python-redis)))
12223 (home-page "https://kombu.readthedocs.io")
12224 (synopsis "Message passing library for Python")
12225 (description "The aim of Kombu is to make messaging in Python as easy as
12226 possible by providing an idiomatic high-level interface for the AMQ protocol,
12227 and also provide proven and tested solutions to common messaging problems.
12228 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
12229 message orientation, queuing, routing, reliability and security, for which the
12230 RabbitMQ messaging server is the most popular implementation.")
12231 (license license:bsd-3)
12232 (properties `((python2-variant . ,(delay python2-kombu))))))
12233
12234 (define-public python2-kombu
12235 (let ((kombu (package-with-python2
12236 (strip-python2-variant python-kombu))))
12237 (package/inherit kombu
12238 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
12239 ;; It works fine on the python3 variant.
12240 #:tests? #f
12241 ,@(package-arguments kombu)))
12242 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12243 ,@(package-native-inputs kombu))))))
12244
12245 (define-public python-billiard
12246 (package
12247 (name "python-billiard")
12248 (version "3.5.0.5")
12249 (source
12250 (origin
12251 (method url-fetch)
12252 (uri (pypi-uri "billiard" version))
12253 (sha256
12254 (base32
12255 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
12256 (build-system python-build-system)
12257 (native-inputs
12258 `(("python-case" ,python-case)
12259 ("python-pytest" ,python-pytest)))
12260 (home-page "https://github.com/celery/billiard")
12261 (synopsis
12262 "Python multiprocessing fork with improvements and bugfixes")
12263 (description
12264 "Billiard is a fork of the Python 2.7 multiprocessing package. The
12265 multiprocessing package itself is a renamed and updated version of R Oudkerk's
12266 pyprocessing package. This standalone variant is intended to be compatible with
12267 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
12268 (license license:bsd-3)
12269 (properties `((python2-variant . ,(delay python2-billiard))))))
12270
12271 (define-public python2-billiard
12272 (let ((billiard (package-with-python2
12273 (strip-python2-variant python-billiard))))
12274 (package/inherit billiard
12275 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12276 ("python2-mock" ,python2-mock)
12277 ,@(package-native-inputs billiard))))))
12278
12279 (define-public python-celery
12280 (package
12281 (name "python-celery")
12282 (version "4.2.1")
12283 (source
12284 (origin
12285 (method url-fetch)
12286 (uri (pypi-uri "celery" version))
12287 (sha256
12288 (base32
12289 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
12290 (build-system python-build-system)
12291 (arguments
12292 '(;; TODO The tests fail with Python 3.7
12293 ;; https://github.com/celery/celery/issues/4849
12294 #:tests? #f
12295 #:phases
12296 (modify-phases %standard-phases
12297 (add-after 'unpack 'patch-requirements
12298 (lambda _
12299 (substitute* "requirements/test.txt"
12300 (("pytest>=3\\.0,<3\\.3")
12301 "pytest>=3.0"))
12302 #t)))))
12303 (native-inputs
12304 `(("python-case" ,python-case)
12305 ("python-pytest" ,python-pytest)))
12306 (propagated-inputs
12307 `(("python-pytz" ,python-pytz)
12308 ("python-billiard" ,python-billiard)
12309 ("python-kombu" ,python-kombu)))
12310 (home-page "https://celeryproject.org")
12311 (synopsis "Distributed Task Queue")
12312 (description "Celery is an asynchronous task queue/job queue based on
12313 distributed message passing. It is focused on real-time operation, but
12314 supports scheduling as well. The execution units, called tasks, are executed
12315 concurrently on a single or more worker servers using multiprocessing,
12316 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
12317 synchronously (wait until ready).")
12318 (license license:bsd-3)
12319 (properties `((python2-variant . ,(delay python2-celery))))))
12320
12321 (define-public python2-celery
12322 (let ((celery (package-with-python2
12323 (strip-python2-variant python-celery))))
12324 (package/inherit celery
12325 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12326 ("python2-mock" ,python2-mock)
12327 ,@(package-native-inputs celery))))))
12328
12329 (define-public python-translitcodec
12330 (package
12331 (name "python-translitcodec")
12332 (version "0.4.0")
12333 (source
12334 (origin
12335 (method url-fetch)
12336 (uri (pypi-uri "translitcodec" version))
12337 (sha256
12338 (base32
12339 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
12340 (build-system python-build-system)
12341 (arguments
12342 `(#:tests? #f)) ; no tests provided
12343 (home-page
12344 "https://github.com/claudep/translitcodec")
12345 (synopsis
12346 "Unicode to 8-bit charset transliteration codec")
12347 (description
12348 "This package contains codecs for transliterating ISO 10646 texts into
12349 best-effort representations using smaller coded character sets (ASCII,
12350 ISO 8859, etc.).")
12351 (license license:expat)))
12352
12353 (define-public python2-translitcodec
12354 (package-with-python2 python-translitcodec))
12355
12356 (define-public python-editor
12357 (package
12358 (name "python-editor")
12359 (version "1.0.4")
12360 (source
12361 (origin
12362 (method url-fetch)
12363 (uri (pypi-uri "python-editor" version))
12364 (sha256
12365 (base32
12366 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
12367 (build-system python-build-system)
12368 (arguments
12369 '(#:tests? #f)) ;XXX: needs a TTY and an editor
12370 (home-page "https://github.com/fmoo/python-editor")
12371 (synopsis "Programmatically open an editor, capture the result")
12372 (description
12373 "python-editor is a library that provides the editor module for
12374 programmatically interfacing with your system's $EDITOR.")
12375 (license license:asl2.0)))
12376
12377 (define-public python2-editor
12378 (package-with-python2 python-editor))
12379
12380 (define-public python-multiprocessing-logging
12381 (package
12382 (name "python-multiprocessing-logging")
12383 (version "0.3.1")
12384 (home-page "https://github.com/jruere/multiprocessing-logging")
12385 (source (origin
12386 (method git-fetch)
12387 (uri (git-reference
12388 (url home-page)
12389 (commit (string-append "v" version))))
12390 (file-name (git-file-name name version))
12391 (sha256
12392 (base32
12393 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
12394 (build-system python-build-system)
12395 (synopsis "Manage logs from multiple processes")
12396 (description
12397 "This Python module implements a multiprocessing-aware @code{Handler}
12398 that, when set on the root @code{Logger}, will tunnel log records to the
12399 main process so that they are handled correctly.")
12400 (license license:lgpl3+)))
12401
12402 (define-public python-vobject
12403 (package
12404 (name "python-vobject")
12405 (version "0.9.6.1")
12406 (source (origin
12407 (method url-fetch)
12408 (uri (pypi-uri "vobject" version))
12409 (sha256
12410 (base32
12411 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
12412 (build-system python-build-system)
12413 (arguments
12414 '(;; The test suite relies on some non-portable Windows interfaces.
12415 #:tests? #f))
12416 (propagated-inputs
12417 `(("python-dateutil" ,python-dateutil)
12418 ("python-pyicu" ,python-pyicu)))
12419 (synopsis "Parse and generate vCard and vCalendar files")
12420 (description "Vobject is intended to be a full featured Python package for
12421 parsing and generating vCard and vCalendar files. Currently, iCalendar files
12422 are supported and well tested. vCard 3.0 files are supported, and all data
12423 should be imported, but only a few components are understood in a sophisticated
12424 way.")
12425 (home-page "https://eventable.github.io/vobject/")
12426 (license license:asl2.0)))
12427
12428 (define-public python2-vobject
12429 (package-with-python2 python-vobject))
12430
12431 (define-public python-munkres
12432 (package
12433 (name "python-munkres")
12434 (version "1.0.8")
12435 (source (origin
12436 (method url-fetch)
12437 (uri (pypi-uri "munkres" version))
12438 (sha256
12439 (base32
12440 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
12441 (build-system python-build-system)
12442 (arguments
12443 '(#:tests? #f)) ; no test suite
12444 (home-page "https://software.clapper.org/munkres/")
12445 (synopsis "Implementation of the Munkres algorithm")
12446 (description "The Munkres module provides an implementation of the Munkres
12447 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
12448 useful for solving the Assignment Problem.")
12449 (license license:bsd-3)))
12450
12451 (define-public python2-munkres
12452 (package-with-python2 python-munkres))
12453
12454 (define-public python-whoosh
12455 (package
12456 (name "python-whoosh")
12457 (version "2.7.4")
12458 (source
12459 (origin
12460 (method url-fetch)
12461 (uri (pypi-uri "Whoosh" version))
12462 (sha256
12463 (base32
12464 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
12465 (build-system python-build-system)
12466 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
12467 (native-inputs
12468 `(("python-pytest" ,python-pytest)))
12469 (home-page "https://bitbucket.org/mchaput/whoosh")
12470 (synopsis "Full text indexing, search, and spell checking library")
12471 (description
12472 "Whoosh is a fast, pure-Python full text indexing, search, and spell
12473 checking library.")
12474 (license license:bsd-2)))
12475
12476 (define-public python2-whoosh
12477 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
12478 (package/inherit whoosh
12479 (propagated-inputs
12480 `(("python2-backport-ssl-match-hostname"
12481 ,python2-backport-ssl-match-hostname)
12482 ,@(package-propagated-inputs whoosh))))))
12483
12484 (define-public python-pathlib
12485 (package
12486 (name "python-pathlib")
12487 (version "1.0.1")
12488 (source (origin
12489 (method url-fetch)
12490 (uri (pypi-uri "pathlib" version))
12491 (sha256
12492 (base32
12493 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
12494 (build-system python-build-system)
12495 ;; The tests depend on the internal "test" module, which does not provide
12496 ;; a stable interface.
12497 (arguments `(#:tests? #f))
12498 (home-page "https://pathlib.readthedocs.org/")
12499 (synopsis "Object-oriented file system paths")
12500 (description "Pathlib offers a set of classes to handle file system paths.
12501 It offers the following advantages over using string objects:
12502
12503 @enumerate
12504 @item No more cumbersome use of os and os.path functions. Everything can
12505 be done easily through operators, attribute accesses, and method calls.
12506 @item Embodies the semantics of different path types. For example,
12507 comparing Windows paths ignores casing.
12508 @item Well-defined semantics, eliminating any inconsistencies or
12509 ambiguities (forward vs. backward slashes, etc.).
12510 @end enumerate
12511
12512 Note: In Python 3.4, pathlib is now part of the standard library. For other
12513 Python versions please consider python-pathlib2 instead, which tracks the
12514 standard library module. This module (python-pathlib) isn't maintained
12515 anymore.")
12516 (license license:expat)))
12517
12518 (define-public python2-pathlib
12519 (package-with-python2 python-pathlib))
12520
12521 (define-public python2-pathlib2
12522 (package
12523 (name "python2-pathlib2")
12524 (version "2.3.5")
12525 (source (origin
12526 (method url-fetch)
12527 (uri (pypi-uri "pathlib2" version))
12528 (sha256
12529 (base32
12530 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
12531 (build-system python-build-system)
12532 ;; We only need the the Python 2 variant, since for Python 3 our minimum
12533 ;; version is 3.4 which already includes this package as part of the
12534 ;; standard library.
12535 (arguments
12536 `(#:python ,python-2))
12537 (propagated-inputs
12538 `(("python2-scandir" ,python2-scandir)
12539 ("python2-six" ,python2-six)))
12540 (home-page "https://pypi.org/project/pathlib2/")
12541 (synopsis "Object-oriented file system paths - backport of standard
12542 pathlib module")
12543 (description "The goal of pathlib2 is to provide a backport of standard
12544 pathlib module which tracks the standard library module, so all the newest
12545 features of the standard pathlib can be used also on older Python versions.
12546
12547 Pathlib offers a set of classes to handle file system paths. It offers the
12548 following advantages over using string objects:
12549
12550 @enumerate
12551 @item No more cumbersome use of os and os.path functions. Everything can
12552 be done easily through operators, attribute accesses, and method calls.
12553 @item Embodies the semantics of different path types. For example,
12554 comparing Windows paths ignores casing.
12555 @item Well-defined semantics, eliminating any inconsistencies or
12556 ambiguities (forward vs. backward slashes, etc.).
12557 @end enumerate")
12558 (license license:expat)))
12559
12560 (define-public python2-pathlib2-bootstrap
12561 (hidden-package
12562 (package
12563 (inherit python2-pathlib2)
12564 (name "python2-pathlib2-bootstrap")
12565 (propagated-inputs
12566 `(("python2-scandir" ,python2-scandir)
12567 ("python2-six" ,python2-six-bootstrap))))))
12568
12569 (define-public python-jellyfish
12570 (package
12571 (name "python-jellyfish")
12572 (version "0.5.6")
12573 (source (origin
12574 (method url-fetch)
12575 (uri (pypi-uri "jellyfish" version))
12576 (sha256
12577 (base32
12578 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
12579 (build-system python-build-system)
12580 (native-inputs
12581 `(("python-pytest" ,python-pytest)))
12582 (home-page "https://github.com/jamesturk/jellyfish")
12583 (synopsis "Approximate and phonetic matching of strings")
12584 (description "Jellyfish uses a variety of string comparison and phonetic
12585 encoding algorithms to do fuzzy string matching.")
12586 (license license:bsd-2)
12587 (properties `((python2-variant . ,(delay python2-jellyfish))))))
12588
12589 (define-public python2-jellyfish
12590 (let ((jellyfish (package-with-python2
12591 (strip-python2-variant python-jellyfish))))
12592 (package/inherit jellyfish
12593 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
12594 ,@(package-native-inputs jellyfish))))))
12595
12596 (define-public python2-unicodecsv
12597 (package
12598 (name "python2-unicodecsv")
12599 (version "0.14.1")
12600 (source (origin
12601 (method git-fetch)
12602 ;; The test suite is not included in the PyPi release.
12603 ;; https://github.com/jdunck/python-unicodecsv/issues/19
12604 (uri (git-reference
12605 (url "https://github.com/jdunck/python-unicodecsv")
12606 (commit version)))
12607 (file-name (git-file-name name version))
12608 (sha256
12609 (base32
12610 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
12611 (build-system python-build-system)
12612 (arguments
12613 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
12614 #:python ,python-2))
12615 (native-inputs
12616 `(("python2-unittest2" ,python2-unittest2)))
12617 (home-page "https://github.com/jdunck/python-unicodecsv")
12618 (synopsis "Unicode CSV module for Python 2")
12619 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
12620 module, adding support for Unicode strings.")
12621 (license license:bsd-2)))
12622
12623 (define-public python-pdfminer-six
12624 (package
12625 (name "python-pdfminer-six")
12626 (version "20201018")
12627 ;; There are no tests in the PyPI tarball.
12628 (source
12629 (origin
12630 (method git-fetch)
12631 (uri (git-reference
12632 (url "https://github.com/pdfminer/pdfminer.six")
12633 (commit version)))
12634 (file-name (git-file-name name version))
12635 (sha256
12636 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
12637 (build-system python-build-system)
12638 (arguments
12639 `(#:phases
12640 (modify-phases %standard-phases
12641 ;; Tests write to the source tree.
12642 (add-after 'unpack 'make-git-checkout-writable
12643 (lambda _
12644 (for-each make-file-writable (find-files "."))
12645 #t))
12646 (replace 'check
12647 (lambda _
12648 (invoke "make" "test")))
12649 (add-before 'reset-gzip-timestamps 'make-files-writable
12650 (lambda* (#:key outputs #:allow-other-keys)
12651 (let ((out (assoc-ref outputs "out")))
12652 (for-each make-file-writable
12653 (find-files out "\\.gz$"))
12654 #t))))))
12655 (propagated-inputs
12656 `(("python-chardet" ,python-chardet)
12657 ("python-cryptography" ,python-cryptography)
12658 ("python-sortedcontainers" ,python-sortedcontainers)))
12659 (native-inputs
12660 `(("python-nose" ,python-nose)
12661 ("python-tox" ,python-tox)))
12662 (home-page "https://github.com/pdfminer/pdfminer.six")
12663 (synopsis "PDF parser and analyzer")
12664 (description "@code{pdfminer.six} is a community maintained fork of
12665 the original PDFMiner. It is a tool for extracting information from PDF
12666 documents. It focuses on getting and analyzing text data. Pdfminer.six
12667 extracts the text from a page directly from the sourcecode of the PDF. It
12668 can also be used to get the exact location, font or color of the text.")
12669 (license license:expat)))
12670
12671 (define-public python-rarfile
12672 (package
12673 (name "python-rarfile")
12674 (version "2.8")
12675 (source (origin
12676 (method url-fetch)
12677 (uri (pypi-uri "rarfile" version))
12678 (sha256
12679 (base32
12680 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
12681 (build-system python-build-system)
12682 (arguments
12683 '(#:phases
12684 (modify-phases %standard-phases
12685 (replace 'check
12686 ;; Many tests fail, but the installation proceeds.
12687 (lambda _ (invoke "make" "-C" "test" "test"))))))
12688 (native-inputs
12689 `(("which" ,which))) ; required for tests
12690 (propagated-inputs
12691 `(("libarchive" ,libarchive)))
12692 (home-page "https://github.com/markokr/rarfile")
12693 (synopsis "RAR archive reader for Python")
12694 (description "This is Python module for RAR archive reading. The interface
12695 is made as zipfile like as possible.")
12696 (license license:isc)))
12697
12698 (define-public python2-rarfile
12699 (package-with-python2 python-rarfile))
12700
12701 (define-public python-magic
12702 (package
12703 (name "python-magic")
12704 (version "0.4.15")
12705 (source
12706 (origin
12707 (method url-fetch)
12708 (uri (pypi-uri "python-magic" version))
12709 (sha256
12710 (base32
12711 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
12712 (file-name (string-append name "-" version "-checkout"))))
12713 (build-system python-build-system)
12714 (arguments
12715 ;; The tests are unreliable, so don't run them. The tests fail
12716 ;; under Python3 because they were written for Python2 and
12717 ;; contain import statements that do not work in Python3. One of
12718 ;; the tests fails under Python2 because its assertions are
12719 ;; overly stringent; it relies on comparing output strings which
12720 ;; are brittle and can change depending on the version of
12721 ;; libmagic being used and the system on which the test is
12722 ;; running. In my case, under GuixSD 0.10.0, only one test
12723 ;; failed, and it seems to have failed only because the version
12724 ;; of libmagic that is packaged in Guix outputs a slightly
12725 ;; different (but not wrong) string than the one that the test
12726 ;; expected.
12727 '(#:tests? #f
12728 #:phases (modify-phases %standard-phases
12729 ;; Replace a specific method call with a hard-coded
12730 ;; path to the necessary libmagic.so file in the
12731 ;; store. If we don't do this, then the method call
12732 ;; will fail to find the libmagic.so file, which in
12733 ;; turn will cause any application using
12734 ;; python-magic to fail.
12735 (add-before 'build 'hard-code-path-to-libmagic
12736 (lambda* (#:key inputs #:allow-other-keys)
12737 (let ((file (assoc-ref inputs "file")))
12738 (substitute* "magic.py"
12739 (("ctypes.util.find_library\\('magic'\\)")
12740 (string-append "'" file "/lib/libmagic.so'")))
12741 #t)))
12742 (add-before 'install 'disable-egg-compression
12743 (lambda _
12744 (let ((port (open-file "setup.cfg" "a")))
12745 (display "\n[easy_install]\nzip_ok = 0\n"
12746 port)
12747 (close-port port)
12748 #t))))))
12749 (inputs
12750 ;; python-magic needs to be able to find libmagic.so.
12751 `(("file" ,file)))
12752 (home-page
12753 "https://github.com/ahupp/python-magic")
12754 (synopsis
12755 "File type identification using libmagic")
12756 (description
12757 "This module uses ctypes to access the libmagic file type
12758 identification library. It makes use of the local magic database and
12759 supports both textual and MIME-type output. Note that this module and
12760 the python-file module both provide a \"magic.py\" file; these two
12761 modules, which are different and were developed separately, both serve
12762 the same purpose: to provide Python bindings for libmagic.")
12763 (license license:expat)))
12764
12765 (define-public python2-magic
12766 (package-with-python2 python-magic))
12767
12768 (define-public python2-s3cmd
12769 (package
12770 (name "python2-s3cmd")
12771 (version "1.6.1")
12772 (source
12773 (origin
12774 (method url-fetch)
12775 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12776 "s3cmd-" version ".tar.gz"))
12777 (sha256
12778 (base32
12779 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12780 (build-system python-build-system)
12781 (arguments
12782 ;; s3cmd is written for python2 only and contains no tests.
12783 `(#:python ,python-2
12784 #:tests? #f))
12785 (propagated-inputs
12786 `(("python2-dateutil" ,python2-dateutil)
12787 ;; The python-file package also provides a magic.py module.
12788 ;; This is an unfortunate state of affairs; however, s3cmd
12789 ;; fails to install if it cannot find specifically the
12790 ;; python-magic package. Thus we include it, instead of using
12791 ;; python-file. Ironically, s3cmd sometimes works better
12792 ;; without libmagic bindings at all:
12793 ;; https://github.com/s3tools/s3cmd/issues/198
12794 ("python2-magic" ,python2-magic)))
12795 (home-page "https://s3tools.org/s3cmd")
12796 (synopsis "Command line tool for S3-compatible storage services")
12797 (description
12798 "S3cmd is a command line tool for uploading, retrieving and managing data
12799 in storage services that are compatible with the Amazon Simple Storage
12800 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12801 GnuPG encryption, and more. It also supports management of Amazon's
12802 CloudFront content delivery network.")
12803 (license license:gpl2+)))
12804
12805 (define-public python-pkgconfig
12806 (package
12807 (name "python-pkgconfig")
12808 (version "1.3.1")
12809 (source
12810 (origin
12811 (method url-fetch)
12812 (uri (pypi-uri "pkgconfig" version))
12813 (sha256
12814 (base32
12815 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
12816 (build-system python-build-system)
12817 (native-inputs
12818 `(("python-nose" ,python-nose)))
12819 (inputs
12820 `(("pkg-config" ,pkg-config)))
12821 (arguments
12822 `(#:phases
12823 (modify-phases %standard-phases
12824 (add-before 'build 'patch
12825 ;; Hard-code the path to pkg-config.
12826 (lambda _
12827 (substitute* "pkgconfig/pkgconfig.py"
12828 (("cmd = 'pkg-config")
12829 (string-append "cmd = '" (which "pkg-config"))))
12830 #t))
12831 (replace 'check
12832 (lambda _
12833 (invoke "nosetests" "test.py"))))))
12834 (home-page "https://github.com/matze/pkgconfig")
12835 (synopsis "Python interface for pkg-config")
12836 (description "This module provides a Python interface to pkg-config. It
12837 can be used to find all pkg-config packages, check if a package exists,
12838 check if a package meets certain version requirements, query CFLAGS and
12839 LDFLAGS and parse the output to build extensions with setup.py.")
12840 (license license:expat)))
12841
12842 (define-public python2-pkgconfig
12843 (package-with-python2 python-pkgconfig))
12844
12845 (define-public python-bz2file
12846 (package
12847 (name "python-bz2file")
12848 (version "0.98")
12849 (source
12850 (origin
12851 (method url-fetch)
12852 (uri (pypi-uri "bz2file" version))
12853 (sha256
12854 (base32
12855 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12856 (build-system python-build-system)
12857 (arguments
12858 `(#:tests? #f)) ; Tests use deprecated python modules.
12859 (home-page "https://github.com/nvawda/bz2file")
12860 (synopsis "Read and write bzip2-compressed files")
12861 (description
12862 "Bz2file is a Python library for reading and writing bzip2-compressed
12863 files. It contains a drop-in replacement for the I/O interface in the
12864 standard library's @code{bz2} module, including features from the latest
12865 development version of CPython that are not available in older releases.")
12866 (license license:asl2.0)))
12867
12868 (define-public python2-bz2file
12869 (package-with-python2 python-bz2file))
12870
12871 (define-public python-future
12872 (package
12873 (name "python-future")
12874 (version "0.17.1")
12875 (source
12876 (origin
12877 (method url-fetch)
12878 (uri (pypi-uri "future" version))
12879 (sha256
12880 (base32
12881 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12882 (build-system python-build-system)
12883 ;; Many tests connect to the network or are otherwise flawed.
12884 ;; https://github.com/PythonCharmers/python-future/issues/210
12885 (arguments
12886 `(#:tests? #f))
12887 (home-page "https://python-future.org")
12888 (synopsis "Single-source support for Python 3 and 2")
12889 (description
12890 "@code{python-future} is the missing compatibility layer between Python 2 and
12891 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12892 to support both Python 2 and Python 3 with minimal overhead.")
12893 (license license:expat)))
12894
12895 (define-public python2-future
12896 (package-with-python2 python-future))
12897
12898 (define-public python-cysignals
12899 (package
12900 (name "python-cysignals")
12901 (version "1.9.0")
12902 (source
12903 (origin
12904 (method url-fetch)
12905 (uri (pypi-uri "cysignals" version))
12906 (sha256
12907 (base32
12908 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12909 (build-system python-build-system)
12910 (native-inputs
12911 `(("python-cython" ,python-cython)
12912 ("python-sphinx" ,python-sphinx)))
12913 (inputs
12914 `(("pari-gp" ,pari-gp)))
12915 (arguments
12916 `(#:modules ((guix build python-build-system)
12917 ((guix build gnu-build-system) #:prefix gnu:)
12918 (guix build utils))
12919 ;; FIXME: Tests are executed after installation and currently fail
12920 ;; when not installing into standard locations; the author is working
12921 ;; on a fix.
12922 #:tests? #f
12923 #:phases
12924 (modify-phases %standard-phases
12925 (add-before
12926 'build 'configure
12927 (assoc-ref gnu:%standard-phases 'configure)))))
12928 (home-page
12929 "https://github.com/sagemath/cysignals")
12930 (synopsis
12931 "Handling of interrupts and signals for Cython")
12932 (description
12933 "The cysignals package provides mechanisms to handle interrupts (and
12934 other signals and errors) in Cython code, using two related approaches,
12935 for mixed Cython/Python code or external C libraries and pure Cython code,
12936 respectively.")
12937 (license license:lgpl3+)))
12938
12939 (define-public python2-cysignals
12940 (package-with-python2 python-cysignals))
12941
12942 (define-public python2-shedskin
12943 (package
12944 (name "python2-shedskin")
12945 (version "0.9.4")
12946 (source
12947 (origin
12948 (method url-fetch)
12949 (uri (string-append "https://github.com/shedskin/shedskin/"
12950 "releases/download/v" version
12951 "/shedskin-" version ".tgz"))
12952 (sha256
12953 (base32
12954 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12955 (build-system python-build-system)
12956 (arguments
12957 `(#:python ,python-2
12958 #:phases (modify-phases %standard-phases
12959 (add-after 'unpack 'fix-resulting-include-libs
12960 (lambda* (#:key inputs #:allow-other-keys)
12961 (let ((libgc (assoc-ref inputs "libgc"))
12962 (pcre (assoc-ref inputs "pcre")))
12963 (substitute* "shedskin/makefile.py"
12964 (("variable == 'CCFLAGS':[ ]*")
12965 (string-append "variable == 'CCFLAGS':\n"
12966 " line += ' -I " pcre "/include"
12967 " -I " libgc "/include'"))
12968 (("variable == 'LFLAGS':[ ]*")
12969 (string-append "variable == 'LFLAGS':\n"
12970 " line += ' -L" pcre "/lib"
12971 " -L " libgc "/lib'")))
12972 #t))))))
12973 (inputs `(("pcre" ,pcre)
12974 ("libgc" ,libgc)))
12975 (home-page "https://shedskin.github.io/")
12976 (synopsis "Experimental Python-2 to C++ Compiler")
12977 (description (string-append "This is an experimental compiler for a subset of
12978 Python. It generates C++ code and a Makefile."))
12979 (license (list license:gpl3 license:bsd-3 license:expat))))
12980
12981 (define-public python2-rope
12982 (package
12983 (name "python2-rope")
12984 (version "0.11.0")
12985 (source
12986 (origin
12987 (method url-fetch)
12988 (uri (pypi-uri "rope" version))
12989 (sha256
12990 (base32
12991 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12992 (arguments
12993 ;; Rope has only partial python3 support, see `python-rope'
12994 `(#:python ,python-2))
12995 (build-system python-build-system)
12996 (native-inputs
12997 `(("python2-unittest2" ,python2-unittest2)))
12998 (home-page "https://github.com/python-rope/rope")
12999 (synopsis "Refactoring library for Python")
13000 (description "Rope is a refactoring library for Python. It facilitates
13001 the renaming, moving and extracting of attributes, functions, modules, fields
13002 and parameters in Python 2 source code. These refactorings can also be applied
13003 to occurrences in strings and comments.")
13004 (license license:gpl2)))
13005
13006 (define-public python-rope
13007 (package/inherit python2-rope
13008 (name "python-rope")
13009 (arguments `(#:python ,python-wrapper
13010 ;; XXX: Only partial python3 support, results in some failing
13011 ;; tests: <https://github.com/python-rope/rope/issues/247>.
13012 #:tests? #f))
13013 (properties `((python2-variant . ,(delay python2-rope))))))
13014
13015 (define-public python-py3status
13016 (package
13017 (name "python-py3status")
13018 (version "3.21")
13019 (source
13020 (origin
13021 (method url-fetch)
13022 (uri (pypi-uri "py3status" version))
13023 (sha256
13024 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
13025 (build-system python-build-system)
13026 (inputs
13027 `(("file" ,file)))
13028 (arguments
13029 '(#:phases
13030 (modify-phases %standard-phases
13031 ;; 'file' is used for detection of configuration file encoding
13032 ;; let's make link the dependency to particular input
13033 (add-before 'build 'patch-file-path
13034 (lambda* (#:key inputs #:allow-other-keys)
13035 (let ((file-path (assoc-ref inputs "file")))
13036 (substitute* "py3status/parse_config.py"
13037 (("\\[\"file\", \"-b\"")
13038 (string-append "['" file-path "/bin/file', '-b'")))
13039 #t))))
13040 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
13041 (home-page "https://github.com/ultrabug/py3status")
13042 (synopsis "Extensible i3status wrapper written in Python")
13043 (description "py3status is an i3status wrapper which extends i3status
13044 functionality in a modular way, allowing you to extend your panel with your
13045 own code, responding to click events and updating clock every second.")
13046 (license license:bsd-3)))
13047
13048 (define-public python2-selectors2
13049 (package
13050 (name "python2-selectors2")
13051 (version "2.0.1")
13052 (source (origin
13053 (method url-fetch)
13054 (uri (pypi-uri "selectors2" version))
13055 (sha256
13056 (base32
13057 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
13058 (build-system python-build-system)
13059 (arguments
13060 `(#:python ,python-2))
13061 (native-inputs
13062 `(("python2-mock" ,python2-mock)
13063 ("python2-psutil" ,python2-psutil)))
13064 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
13065 (synopsis "Backport of the selectors module from Python 3.5+")
13066 (description
13067 "This package provides a drop-in replacement for the @code{selectors}
13068 module in Python 3.5 and later.")
13069 (license license:expat)))
13070
13071 (define-public python-tblib
13072 (package
13073 (name "python-tblib")
13074 (version "1.6.0")
13075 (source (origin
13076 (method url-fetch)
13077 (uri (pypi-uri "tblib" version))
13078 (sha256
13079 (base32
13080 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
13081 (build-system python-build-system)
13082 (arguments
13083 `(#:phases
13084 (modify-phases %standard-phases
13085 (replace 'check
13086 (lambda _
13087 ;; Upstream runs tests after installation and the package itself
13088 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
13089 ;; found.
13090 (setenv "PYTHONPATH"
13091 (string-append (getcwd) "/build/lib:"
13092 (getenv "PYTHONPATH")))
13093 (invoke "py.test" "-vv" "tests" "README.rst"))))))
13094 (native-inputs
13095 `(("python-pytest" ,python-pytest)
13096 ("python-six" ,python-six)))
13097 (home-page "https://github.com/ionelmc/python-tblib")
13098 (synopsis "Traceback serialization library")
13099 (description
13100 "Traceback serialization allows you to:
13101
13102 @enumerate
13103 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
13104 different processes. This allows better error handling when running code over
13105 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
13106
13107 @item Parse traceback strings and raise with the parsed tracebacks.
13108 @end enumerate\n")
13109 (license license:bsd-3)))
13110
13111 (define-public python2-tblib
13112 (package-with-python2 python-tblib))
13113
13114 (define-public python-greenlet
13115 (package
13116 (name "python-greenlet")
13117 (version "1.0.0")
13118 (source (origin
13119 (method url-fetch)
13120 (uri (pypi-uri "greenlet" version))
13121 (sha256
13122 (base32
13123 "1y6wbg9yhm9dw6m768n4yslp56h85pnxkk3drz6icn15g6f1d7ki"))))
13124 (build-system python-build-system)
13125 (home-page "https://greenlet.readthedocs.io/")
13126 (synopsis "Lightweight in-process concurrent programming")
13127 (description
13128 "Greenlet package is a spin-off of Stackless, a version of CPython
13129 that supports micro-threads called \"tasklets\". Tasklets run
13130 pseudo-concurrently (typically in a single or a few OS-level threads) and
13131 are synchronized with data exchanges on \"channels\".")
13132 (license (list license:psfl license:expat))))
13133
13134 (define-public python-objgraph
13135 (package
13136 (name "python-objgraph")
13137 (version "3.4.1")
13138 (source
13139 (origin
13140 (method url-fetch)
13141 (uri (pypi-uri "objgraph" version))
13142 (sha256
13143 (base32
13144 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
13145 (build-system python-build-system)
13146 (propagated-inputs
13147 `(("python-graphviz" ,python-graphviz)))
13148 (native-inputs
13149 `(("python-mock" ,python-mock)
13150 ("graphviz" ,graphviz)))
13151 (home-page "https://mg.pov.lt/objgraph/")
13152 (synopsis "Draw Python object reference graphs with graphviz")
13153 (description
13154 "This package provides tools to draw Python object reference graphs with
13155 graphviz.")
13156 (license license:expat)))
13157
13158 (define-public python2-objgraph
13159 (package-with-python2 python-objgraph))
13160
13161 (define-public python-gevent
13162 (package
13163 (name "python-gevent")
13164 (version "21.1.2")
13165 (source (origin
13166 (method url-fetch)
13167 (uri (pypi-uri "gevent" version))
13168 (sha256
13169 (base32
13170 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
13171 (modules '((guix build utils)))
13172 (snippet
13173 '(begin
13174 ;; unbunding libev and c-ares
13175 (delete-file-recursively "deps")))))
13176 (build-system python-build-system)
13177 (arguments
13178 `(#:modules ((ice-9 ftw)
13179 (ice-9 match)
13180 (srfi srfi-26)
13181 (guix build utils)
13182 (guix build python-build-system))
13183 #:phases (modify-phases %standard-phases
13184 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
13185 (lambda _
13186 (substitute* "src/gevent/subprocess.py"
13187 (("/bin/sh") (which "sh")))
13188 (for-each (lambda (file)
13189 (substitute* file
13190 (("/bin/sh") (which "sh"))
13191 (("/bin/true") (which "true"))))
13192 (find-files "src/greentest" "\\.py$"))))
13193 (add-before 'build 'do-not-use-bundled-sources
13194 (lambda _
13195 (setenv "GEVENTSETUP_EMBED" "0")
13196
13197 ;; Prevent building bundled libev.
13198 (substitute* "setup.py"
13199 (("run_make=_BUILDING")
13200 "run_make=False"))))
13201 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
13202 (lambda* (#:key inputs #:allow-other-keys)
13203 (let ((greenlet (string-append
13204 (assoc-ref inputs "python-greenlet")
13205 "/include")))
13206 (match (scandir greenlet
13207 (lambda (item)
13208 (string-prefix? "python" item)))
13209 ((python)
13210 (setenv "C_INCLUDE_PATH"
13211 (string-append greenlet "/" python ":"
13212 (or (getenv "C_INCLUDE_PATH")
13213 ""))))))))
13214 (add-before 'check 'pretend-to-be-CI
13215 (lambda _
13216 ;; A few tests are skipped due to network constraints or
13217 ;; get longer timeouts when running in a CI environment.
13218 ;; Piggy-back on that, as we need the same adjustments.
13219 (setenv "TRAVIS" "1")
13220 (setenv "APPVEYOR" "1")))
13221 (add-before 'check 'adjust-tests
13222 (lambda _
13223 (let ((disabled-tests
13224 '(;; These tests relies on networking which is
13225 ;; not available in the build container.
13226 "test__getaddrinfo_import.py"
13227 "test__server_pywsgi.py"
13228 ;; XXX: These tests borrow functionality from the
13229 ;; Python builtin 'test' module, but it is not
13230 ;; installed with the Guix Python distribution.
13231 "test_smtpd.py"
13232 "test_wsgiref.py"
13233 "test_urllib2.py"
13234 "test_thread.py"
13235 "test_threading.py"
13236 "test__threading_2.py"
13237 ;; These tests rely on KeyboardInterrupts which do not
13238 ;; work inside the build container for some reason
13239 ;; (lack of controlling terminal?).
13240 "test_subprocess.py"
13241 "test__issues461_471.py"
13242 ;; TODO: Patch out the tests that use getprotobyname, etc
13243 ;; instead of disabling all the tests from these files.
13244 "test__resolver_dnspython.py"
13245 "test__doctests.py"
13246 "test__all__.py"
13247 "test___config.py"
13248 "test__execmodules.py")))
13249 (call-with-output-file "skipped_tests.txt"
13250 (lambda (port)
13251 (format port "~a~%"
13252 (string-join disabled-tests "\n")))))))
13253 (replace 'check
13254 (lambda _
13255 ;; Make sure the build directory is on PYTHONPATH.
13256 (setenv "PYTHONPATH"
13257 (string-append
13258 (getenv "PYTHONPATH") ":"
13259 (getcwd) "/build/"
13260 (car (scandir "build" (cut string-prefix? "lib." <>)))))
13261
13262 ;; Use the build daemons configured number of workers.
13263 (setenv "NWORKERS" (number->string (parallel-job-count)))
13264
13265 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
13266 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
13267 (propagated-inputs
13268 `(("python-greenlet" ,python-greenlet)
13269 ("python-objgraph" ,python-objgraph)
13270 ("python-zope.event" ,python-zope-event)
13271 ("python-zope.interface" ,python-zope-interface)))
13272 (native-inputs
13273 `(("python-six" ,python-six)
13274
13275 ;; For tests.
13276 ("python-dnspython" ,python-dnspython)
13277 ("python-psutil" ,python-psutil)))
13278 (inputs
13279 `(("c-ares" ,c-ares)
13280 ("libev" ,libev)))
13281 (home-page "https://www.gevent.org/")
13282 (synopsis "Coroutine-based network library")
13283 (description
13284 "@code{gevent} is a coroutine-based Python networking library that uses
13285 @code{greenlet} to provide a high-level synchronous API on top of the
13286 @code{libev} event loop.")
13287 (license license:expat)))
13288
13289 (define-public python-fastimport
13290 (package
13291 (name "python-fastimport")
13292 (version "0.9.8")
13293 (source
13294 (origin
13295 (method url-fetch)
13296 (uri (pypi-uri "fastimport" version))
13297 (sha256
13298 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
13299 (build-system python-build-system)
13300 (home-page "https://github.com/jelmer/python-fastimport")
13301 (synopsis "VCS fastimport parser and generator in Python")
13302 (description "This package provides a parser for and generator of the Git
13303 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
13304 format.")
13305 (license license:gpl2+)))
13306
13307 (define-public python2-fastimport
13308 (package-with-python2 python-fastimport))
13309
13310 (define-public python-twisted
13311 (package
13312 (name "python-twisted")
13313 (version "19.7.0")
13314 (source (origin
13315 (method url-fetch)
13316 (uri (pypi-uri "Twisted" version ".tar.bz2"))
13317 (sha256
13318 (base32
13319 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
13320 (build-system python-build-system)
13321 (arguments
13322 '(#:tests? #f)) ; FIXME: some tests fail
13323 (propagated-inputs
13324 `(("python-zope-interface" ,python-zope-interface)
13325 ("python-pyhamcrest" ,python-pyhamcrest)
13326 ("python-incremental" ,python-incremental)
13327 ("python-hyperlink" ,python-hyperlink)
13328 ("python-constantly" ,python-constantly)
13329 ("python-automat" ,python-automat)))
13330 (home-page "https://twistedmatrix.com/")
13331 (synopsis "Asynchronous networking framework written in Python")
13332 (description
13333 "Twisted is an extensible framework for Python programming, with special
13334 focus on event-based network programming and multiprotocol integration.")
13335 (license license:expat)))
13336
13337 (define-public python2-twisted
13338 (package-with-python2 python-twisted))
13339
13340 (define-public python-pika
13341 (package
13342 (name "python-pika")
13343 (version "0.12.0")
13344 (source
13345 (origin
13346 (method url-fetch)
13347 (uri (pypi-uri "pika" version))
13348 (sha256
13349 (base32
13350 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
13351 (build-system python-build-system)
13352 (native-inputs
13353 `(("python-pyev" ,python-pyev)
13354 ("python-tornado" ,python-tornado)
13355 ("python-twisted" ,python-twisted)))
13356 (home-page "https://pika.readthedocs.org")
13357 (synopsis "Pure Python AMQP Client Library")
13358 (description
13359 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
13360 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
13361 network support library.")
13362 (license license:bsd-3)))
13363
13364 (define-public python2-pika
13365 (package-with-python2 python-pika))
13366
13367 (define-public python-ply
13368 (package
13369 (name "python-ply")
13370 (version "3.11")
13371 (source
13372 (origin
13373 (method url-fetch)
13374 (uri (pypi-uri "ply" version))
13375 (sha256
13376 (base32
13377 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
13378 (build-system python-build-system)
13379 (home-page "http://www.dabeaz.com/ply/")
13380 (synopsis "Python Lex & Yacc")
13381 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
13382 It uses LR parsing and does extensive error checking.")
13383 (license license:bsd-3)))
13384
13385 (define-public python-tabulate
13386 (package
13387 (name "python-tabulate")
13388 (version "0.8.9")
13389 (source (origin
13390 (method url-fetch)
13391 (uri (pypi-uri "tabulate" version))
13392 (sha256
13393 (base32
13394 "19qkdz8xwk5jxa5xn53mnk76qnh4ysm81vzj664jw1b0azr167gb"))))
13395 (build-system python-build-system)
13396 (arguments
13397 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
13398 ;; and the latest release is not tagged in the upstream repository.
13399 '(#:tests? #f))
13400 (home-page "https://bitbucket.org/astanin/python-tabulate")
13401 (synopsis "Pretty-print tabular data")
13402 (description
13403 "Tabulate is a library and command-line utility to pretty-print tabular
13404 data in Python.")
13405 (license license:expat)))
13406
13407 (define-public python2-tabulate
13408 (package-with-python2 python-tabulate))
13409
13410 (define-public python-kazoo
13411 (package
13412 (name "python-kazoo")
13413 (version "2.4.0")
13414 (source
13415 (origin
13416 (method url-fetch)
13417 (uri (pypi-uri "kazoo" version))
13418 (sha256
13419 (base32
13420 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
13421 (build-system python-build-system)
13422 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
13423 (propagated-inputs
13424 `(("python-six" ,python-six)))
13425 (home-page "https://kazoo.readthedocs.org")
13426 (synopsis "High-level Zookeeper client library")
13427 (description
13428 "Kazoo is a Python client library for the Apache Zookeeper distributed
13429 application service. It is designed to be easy to use and to avoid common
13430 programming errors.")
13431 (license license:asl2.0)))
13432
13433 (define-public python2-kazoo
13434 (package-with-python2 python-kazoo))
13435
13436 (define-public python-pykafka
13437 (package
13438 (name "python-pykafka")
13439 (version "2.4.0")
13440 (source (origin
13441 (method url-fetch)
13442 (uri (pypi-uri "pykafka" version))
13443 (sha256
13444 (base32
13445 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
13446 (build-system python-build-system)
13447 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
13448 (propagated-inputs
13449 `(("python-gevent" ,python-gevent)
13450 ("python-kazoo" ,python-kazoo)
13451 ("python-tabulate" ,python-tabulate)))
13452 (inputs
13453 `(("librdkafka" ,librdkafka)))
13454 (home-page "https://pykafka.readthedocs.io/")
13455 (synopsis "Apache Kafka client for Python")
13456 (description
13457 "PyKafka is a client for the Apache Kafka distributed messaging system.
13458 It includes Python implementations of Kafka producers and consumers, which
13459 are optionally backed by a C extension built on librdkafka.")
13460 (license license:asl2.0)))
13461
13462 (define-public python-wcwidth
13463 (package
13464 (name "python-wcwidth")
13465 (version "0.1.8")
13466 (source (origin
13467 (method url-fetch)
13468 (uri (pypi-uri "wcwidth" version))
13469 (sha256
13470 (base32
13471 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
13472 (build-system python-build-system)
13473 (home-page "https://github.com/jquast/wcwidth")
13474 (synopsis "Measure number of terminal column cells of wide-character codes")
13475 (description "Wcwidth measures the number of terminal column cells of
13476 wide-character codes. It is useful for those implementing a terminal emulator,
13477 or programs that carefully produce output to be interpreted by one. It is a
13478 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
13479 specified in POSIX.1-2001 and POSIX.1-2008.")
13480 (license license:expat)))
13481
13482 (define-public python2-wcwidth
13483 (package-with-python2 python-wcwidth))
13484
13485 (define-public python2-jsonrpclib
13486 (package
13487 (name "python2-jsonrpclib")
13488 (version "0.1.7")
13489 (source (origin
13490 (method url-fetch)
13491 (uri (pypi-uri "jsonrpclib" version))
13492 (sha256
13493 (base32
13494 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
13495 (build-system python-build-system)
13496 (arguments
13497 `(#:tests? #f
13498 #:python ,python-2))
13499 (home-page "https://github.com/joshmarshall/jsonrpclib/")
13500 (synopsis "Implementation of JSON-RPC specification for Python")
13501 (description
13502 "This library is an implementation of the JSON-RPC specification.
13503 It supports both the original 1.0 specification, as well as the
13504 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
13505 etc.")
13506 (license license:asl2.0)))
13507
13508 (define-public python-chai
13509 (package
13510 (name "python-chai")
13511 (version "1.1.2")
13512 (source (origin
13513 (method url-fetch)
13514 (uri (pypi-uri "chai" version))
13515 (sha256
13516 (base32
13517 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
13518 (build-system python-build-system)
13519 (home-page "https://github.com/agoragames/chai")
13520 (synopsis "Mocking framework for Python")
13521 (description
13522 "Chai provides an api for mocking, stubbing and spying your python
13523 objects, patterned after the Mocha library for Ruby.")
13524 (license license:bsd-3)))
13525
13526 (define-public python2-chai
13527 (package-with-python2 python-chai))
13528
13529 (define-public python-inflection
13530 (package
13531 (name "python-inflection")
13532 (version "0.3.1")
13533 (source
13534 (origin (method url-fetch)
13535 (uri (pypi-uri "inflection" version))
13536 (sha256
13537 (base32
13538 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
13539 (build-system python-build-system)
13540 (native-inputs
13541 `(("python-pytest" ,python-pytest)))
13542 (home-page "https://github.com/jpvanhal/inflection")
13543 (synopsis "Python string transformation library")
13544 (description
13545 "Inflection is a string transformation library. It singularizes
13546 and pluralizes English words, and transforms strings from CamelCase to
13547 underscored string.")
13548 (license license:expat)))
13549
13550 (define-public python2-inflection
13551 (package-with-python2 python-inflection))
13552
13553 (define-public python-pylev
13554 (package
13555 (name "python-pylev")
13556 (version "1.3.0")
13557 (source (origin
13558 (method url-fetch)
13559 (uri (pypi-uri "pylev" version))
13560 (sha256
13561 (base32
13562 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
13563 (build-system python-build-system)
13564 (home-page "https://github.com/toastdriven/pylev")
13565 (synopsis "Levenshtein distance implementation in Python")
13566 (description "Pure Python Levenshtein implementation, based off the
13567 Wikipedia code samples at
13568 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
13569 (license license:bsd-3)))
13570
13571 (define-public python2-pylev
13572 (package-with-python2 python-pylev))
13573
13574 (define-public python-cleo
13575 (package
13576 (name "python-cleo")
13577 (version "0.8.1")
13578 (source (origin
13579 (method url-fetch)
13580 (uri (pypi-uri "cleo" version))
13581 (sha256
13582 (base32
13583 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
13584 (build-system python-build-system)
13585 (native-inputs
13586 `( ;; For testing
13587 ("python-mock" ,python-mock)
13588 ("python-pytest-mock" ,python-pytest-mock)
13589 ("python-pytest" ,python-pytest)))
13590 (propagated-inputs
13591 `(("python-backpack" ,python-backpack)
13592 ("python-clikit" ,python-clikit)
13593 ("python-pastel" ,python-pastel)
13594 ("python-pylev" ,python-pylev)))
13595 (home-page "https://github.com/sdispater/cleo")
13596 (synopsis "Command-line arguments library for Python")
13597 (description
13598 "Cleo allows you to create command-line commands with signature in
13599 docstring and colored output.")
13600 (license license:expat)))
13601
13602 (define-public python2-cleo
13603 (package-with-python2 python-cleo))
13604
13605 (define-public python-tomlkit
13606 (package
13607 (name "python-tomlkit")
13608 (version "0.7.0")
13609 (source
13610 (origin
13611 (method url-fetch)
13612 (uri (pypi-uri "tomlkit" version))
13613 (sha256
13614 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
13615 (build-system python-build-system)
13616 (native-inputs
13617 `(("python-pytest" ,python-pytest)
13618 ("python-pyyaml" ,python-pyyaml)))
13619 (home-page "https://github.com/sdispater/tomlkit")
13620 (synopsis "Style-preserving TOML library")
13621 (description
13622 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
13623 preserves all comments, indentations, whitespace and internal element ordering,
13624 and makes them accessible and editable via an intuitive API. It can also
13625 create new TOML documents from scratch using the provided helpers. Part of the
13626 implementation has been adapted, improved, and fixed from Molten.")
13627 (license license:expat)))
13628
13629 (define-public python-shellingham
13630 (package
13631 (name "python-shellingham")
13632 (version "1.3.2")
13633 (source
13634 (origin
13635 (method url-fetch)
13636 (uri (pypi-uri "shellingham" version))
13637 (sha256
13638 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
13639 (build-system python-build-system)
13640 (arguments
13641 `(#:phases
13642 (modify-phases %standard-phases
13643 (add-after 'unpack 'restore-setup.py
13644 ;; setup.py will return in the next release.
13645 ;; <https://github.com/sarugaku/shellingham/issues/33>
13646 (lambda _
13647 (with-output-to-file "setup.py"
13648 (lambda _
13649 (display "from setuptools import setup\nsetup()\n")))
13650 #t)))))
13651 (home-page "https://github.com/sarugaku/shellingham")
13652 (synopsis "Tool to detect surrounding shell")
13653 (description
13654 "Shellingham detects what shell the current Python executable is
13655 running in.")
13656 (license license:isc)))
13657
13658 (define-public python-memcached
13659 (package
13660 (name "python-memcached")
13661 (version "1.59")
13662 (source
13663 (origin
13664 (method url-fetch)
13665 (uri (pypi-uri "python-memcached" version))
13666 (sha256
13667 (base32
13668 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13669 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13670 (build-system python-build-system)
13671 (propagated-inputs `(("python-six" ,python-six)))
13672 (home-page
13673 "https://github.com/linsomniac/python-memcached")
13674 (synopsis "Pure python memcached client")
13675 (description
13676 "This software is a pure Python interface to the memcached memory cache
13677 daemon. It is the client side software which allows storing values in one or
13678 more, possibly remote, memcached servers.")
13679 (license license:psfl)))
13680
13681 (define-public python-clikit
13682 (package
13683 (name "python-clikit")
13684 (version "0.6.2")
13685 (source
13686 (origin
13687 (method url-fetch)
13688 (uri (pypi-uri "clikit" version))
13689 (sha256
13690 (base32
13691 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13692 (build-system python-build-system)
13693 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13694 (propagated-inputs
13695 `(("python-crashtest" ,python-crashtest)
13696 ("python-pastel" ,python-pastel)
13697 ("python-pylev" ,python-pylev)))
13698 (home-page "https://github.com/sdispater/clikit")
13699 (synopsis "Group of utilities to build command line interfaces")
13700 (description
13701 "CliKit is a group of utilities to build testable command line
13702 interfaces.")
13703 (properties `((python2-variant . ,(delay python2-clikit))))
13704 (license license:expat)))
13705
13706 (define-public python2-clikit
13707 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13708 (package/inherit
13709 base
13710 (propagated-inputs
13711 `(("python-enum34" ,python2-enum34)
13712 ("python-typing" ,python2-typing)
13713 ,@(package-propagated-inputs base))))))
13714
13715 (define-public python-msgpack-python
13716 (package
13717 (name "python-msgpack-python")
13718 (version "0.5.6")
13719 (source
13720 (origin
13721 (method url-fetch)
13722 (uri (pypi-uri "msgpack-python" version))
13723 (sha256
13724 (base32
13725 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13726 (build-system python-build-system)
13727 (home-page "https://msgpack.org/")
13728 (synopsis "Package to deserialize messages in MessagePack binary format")
13729 (description
13730 "MessagePack is an efficient binary serialization format. It lets you
13731 exchange data among multiple languages like JSON. But it's faster and
13732 smaller. Small integers are encoded into a single byte, and typical short
13733 strings require only one extra byte in addition to the strings themselves.")
13734 (license license:asl2.0)))
13735
13736 (define-public python-cachy
13737 (package
13738 (name "python-cachy")
13739 (version "0.3.0")
13740 (source
13741 (origin
13742 (method url-fetch)
13743 (uri (pypi-uri "cachy" version))
13744 (sha256
13745 (base32
13746 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13747 (build-system python-build-system)
13748 (arguments
13749 '(#:phases
13750 (modify-phases %standard-phases
13751 (replace 'check
13752 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13753 "pytest"))))))
13754 (native-inputs
13755 `(("memcached" ,memcached)
13756 ("python-fakeredis" ,python-fakeredis)
13757 ("python-flexmock" ,python-flexmock)
13758 ("python-pifpaf" ,python-pifpaf)
13759 ("python-pytest" ,python-pytest)))
13760 (propagated-inputs
13761 `(("python-memcached" ,python-memcached)
13762 ("python-msgpack-python" ,python-msgpack-python)
13763 ("python-redis" ,python-redis)))
13764 (home-page "https://github.com/sdispater/cachy")
13765 (synopsis "Simple yet effective caching library")
13766 (description
13767 "Cachy provides a simple yet effective caching library. A simple but
13768 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13769 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13770 (license license:expat)))
13771
13772 (define-public poetry
13773 (package
13774 (name "poetry")
13775 (version "1.1.5")
13776 ;; Poetry can only be built from source with Poetry.
13777 (source
13778 (origin
13779 (method url-fetch)
13780 (uri (pypi-uri "poetry" version))
13781 (sha256
13782 (base32
13783 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
13784 (build-system python-build-system)
13785 (arguments
13786 `(#:tests? #f ;; Pypi does not have tests.
13787 #:phases
13788 (modify-phases %standard-phases
13789 (add-before 'build 'patch-setup-py
13790 (lambda _
13791 (substitute* "setup.py"
13792 ;; Allow newer versions of python-keyring.
13793 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
13794 ;; TODO: remove after the next release cycle,
13795 ;; when packaging has been updated.
13796 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
13797 #t)))))
13798 (propagated-inputs
13799 `(("python-cachecontrol" ,python-cachecontrol)
13800 ("python-cachy" ,python-cachy)
13801 ("python-cleo" ,python-cleo)
13802 ("python-clikit" ,python-clikit)
13803 ("python-html5lib" ,python-html5lib)
13804 ("python-keyring" ,python-keyring)
13805 ("python-msgpack-transitional" ,python-msgpack-transitional)
13806 ("python-packaging" ,python-packaging)
13807 ("python-pexpect" ,python-pexpect)
13808 ("python-pip" ,python-pip)
13809 ("python-pkginfo" ,python-pkginfo)
13810 ("python-poetry-core" ,python-poetry-core)
13811 ("python-requests" ,python-requests)
13812 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
13813 ("python-shellingham" ,python-shellingham)
13814 ("python-tomlkit" ,python-tomlkit)
13815 ("python-virtualenv" ,python-virtualenv)))
13816 (home-page "https://python-poetry.org")
13817 (synopsis "Python dependency management and packaging made easy")
13818 (description "Poetry is a tool for dependency management and packaging
13819 in Python. It allows you to declare the libraries your project depends on and
13820 it will manage (install/update) them for you.")
13821 (license license:expat)))
13822
13823 (define-public python-lark-parser
13824 (package
13825 (name "python-lark-parser")
13826 (version "0.9.0")
13827 (source (origin
13828 (method url-fetch)
13829 (uri (pypi-uri "lark-parser" version))
13830 (sha256
13831 (base32
13832 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13833 (build-system python-build-system)
13834 (home-page "https://github.com/lark-parser/lark")
13835 (synopsis "Multi-language parser for Python")
13836 (description
13837 "Lark is a parser built with a focus on ergonomics, performance and
13838 resilience. Lark can parse all context-free languages. That means it is
13839 capable of parsing almost any programming language out there, and to
13840 some degree most natural languages too.")
13841 (license license:expat)))
13842
13843 (define-public python-libcst
13844 (package
13845 (name "python-libcst")
13846 (version "0.3.8")
13847 (source (origin
13848 (method url-fetch)
13849 (uri (pypi-uri "libcst" version))
13850 (sha256
13851 (base32
13852 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13853 (build-system python-build-system)
13854 (arguments
13855 `(#:phases
13856 (modify-phases %standard-phases
13857 (add-after 'unpack 'remove-failing-tests
13858 (lambda _
13859 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13860 (delete-file "libcst/tests/test_fuzz.py")
13861 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13862 (delete-file "libcst/tests/test_pyre_integration.py")
13863 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13864 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13865 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13866 #t))
13867 (add-before 'check 'generate-test-data
13868 (lambda _
13869 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13870 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13871 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13872 (replace 'check
13873 (lambda _
13874 (invoke "python" "-m" "unittest")
13875 #t)))))
13876 (native-inputs
13877 `(("python-black" ,python-black)
13878 ("python-isort" ,python-isort)))
13879 (propagated-inputs
13880 `(("python-typing-extensions" ,python-typing-extensions)
13881 ("python-typing-inspect" ,python-typing-inspect)
13882 ("python-pyyaml" ,python-pyyaml)))
13883 (home-page "https://github.com/Instagram/LibCST")
13884 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13885 (description
13886 "LibCST parses Python source code as a CST tree that keeps all
13887 formatting details (comments, whitespaces, parentheses, etc). It's useful
13888 for building automated refactoring (codemod) applications and linters.
13889 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13890 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13891 naming node types and fields, LibCST creates a lossless CST that looks and
13892 feels like an AST.")
13893 (license (list license:expat
13894 ;; Some files unde libcst/_parser/ are under Python Software
13895 ;; Foundation license (see LICENSE file for details)
13896 license:psfl
13897 ;; libcst/_add_slots.py
13898 license:asl2.0))))
13899
13900 (define-public python-typing-inspect
13901 (package
13902 (name "python-typing-inspect")
13903 (version "0.6.0")
13904 (source (origin
13905 (method url-fetch)
13906 (uri (pypi-uri "typing_inspect" version))
13907 (sha256
13908 (base32
13909 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13910 (build-system python-build-system)
13911 (propagated-inputs
13912 `(("python-mypy-extensions" ,python-mypy-extensions)
13913 ("python-typing-extensions" ,python-typing-extensions)))
13914 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13915 (synopsis "API for inspection of types in the Python @code{typing} module")
13916 (description
13917 "The @code{typing_inspect} module defines experimental API for runtime
13918 inspection of types defined in the Python standard typing module.")
13919 (license license:expat)))
13920
13921 (define-public python-lazy-object-proxy
13922 (package
13923 (name "python-lazy-object-proxy")
13924 (version "1.5.1")
13925 (source (origin
13926 (method url-fetch)
13927 (uri (pypi-uri "lazy-object-proxy" version))
13928 (sha256
13929 (base32
13930 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13931 (native-inputs
13932 `(("python-setuptools-scm" ,python-setuptools-scm)))
13933 (build-system python-build-system)
13934 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13935 (synopsis "Lazy object proxy for python")
13936 (description
13937 "Lazy object proxy is an object that wraps a callable but defers the call
13938 until the object is actually required, and caches the result of said call.")
13939 (license license:bsd-2)))
13940
13941 (define-public python2-lazy-object-proxy
13942 (package-with-python2 python-lazy-object-proxy))
13943
13944 (define-public python-dnspython
13945 (package
13946 (name "python-dnspython")
13947 (version "2.0.0")
13948 (source (origin
13949 (method url-fetch)
13950 (uri (pypi-uri "dnspython" version ".zip"))
13951 (sha256
13952 (base32
13953 "1dyip5ygqqhrgcaiy7qzjpndl9xciip186paxqwkm726fj9z0jh4"))))
13954 (build-system python-build-system)
13955 (native-inputs `(("unzip" ,unzip)))
13956 (arguments '(#:tests? #f)) ; XXX: requires internet access
13957 (home-page "https://www.dnspython.org")
13958 (synopsis "DNS toolkit for Python")
13959 (description
13960 "dnspython is a DNS toolkit for Python. It supports almost all record
13961 types. It can be used for queries, zone transfers, and dynamic updates.
13962 It supports TSIG authenticated messages and EDNS0.")
13963 (license license:expat)))
13964
13965 (define-public python-dnspython-1.16
13966 (package
13967 (inherit python-dnspython)
13968 (version "1.16.0")
13969 (source (origin
13970 (method url-fetch)
13971 (uri (string-append "http://www.dnspython.org/kits/"
13972 version "/dnspython-" version ".tar.gz"))
13973 (sha256
13974 (base32
13975 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13976 (native-inputs '())))
13977
13978 (define-public python2-dnspython-1.16
13979 (package-with-python2 python-dnspython-1.16))
13980
13981 (define-public python-py3dns
13982 (package
13983 (name "python-py3dns")
13984 (version "3.2.1")
13985 (source
13986 (origin
13987 (method url-fetch)
13988 (uri (pypi-uri "py3dns" version))
13989 (sha256
13990 (base32
13991 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13992 (build-system python-build-system)
13993 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13994 ;; removing functionality so we copy from Nix and "just don't build it".
13995 (arguments
13996 `(#:phases
13997 (modify-phases %standard-phases
13998 (add-after 'unpack 'patch-source
13999 (lambda _
14000 (substitute* "setup.py"
14001 (("import DNS") "")
14002 (("DNS.__version__") (string-append "\"" ,version "\"")))
14003 #t)))
14004 #:tests? #f)) ; Also skip the tests.
14005 (home-page "https://launchpad.net/py3dns")
14006 (synopsis "Python 3 DNS library")
14007 (description "This Python 3 module provides a DNS API for looking up DNS
14008 entries from within Python 3 modules and applications. This module is a
14009 simple, lightweight implementation.")
14010 (license license:psfl)))
14011
14012 (define-public python-email-validator
14013 (package
14014 (name "python-email-validator")
14015 (version "1.0.2")
14016 (source
14017 (origin (method url-fetch)
14018 (uri (pypi-uri "email_validator" version))
14019 (sha256
14020 (base32
14021 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
14022 (build-system python-build-system)
14023 (arguments
14024 '(#:phases
14025 (modify-phases %standard-phases
14026 (add-before 'build 'use-dnspython
14027 (lambda _
14028 (substitute* "setup.py"
14029 (("dnspython3") "dnspython"))
14030 #t)))))
14031 (propagated-inputs
14032 `(("python-dnspython" ,python-dnspython)
14033 ("python-idna" ,python-idna)))
14034 (home-page "https://github.com/JoshData/python-email-validator")
14035 (synopsis "Email address validation library for Python")
14036 (description
14037 "This library validates email address syntax and deliverability.")
14038 (license license:cc0)))
14039
14040 (define-public python2-email-validator
14041 (package-with-python2 python-email-validator))
14042
14043 (define-public python-ukpostcodeparser
14044 (package
14045 (name "python-ukpostcodeparser")
14046 (version "1.0.3")
14047 (source (origin
14048 (method url-fetch)
14049 (uri (pypi-uri "UkPostcodeParser" version))
14050 (sha256
14051 (base32
14052 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
14053 (build-system python-build-system)
14054 (home-page "https://github.com/hamstah/ukpostcodeparser")
14055 (synopsis "UK Postcode parser for Python")
14056 (description
14057 "This library provides the @code{parse_uk_postcode} function for
14058 parsing UK postcodes.")
14059 (license license:expat)))
14060
14061 (define-public python2-ukpostcodeparser
14062 (package-with-python2 python-ukpostcodeparser))
14063
14064 (define-public python-faker
14065 (package
14066 (name "python-faker")
14067 (version "4.0.2")
14068 (source (origin
14069 (method url-fetch)
14070 (uri (pypi-uri "Faker" version))
14071 (sha256
14072 (base32
14073 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
14074 (build-system python-build-system)
14075 (arguments
14076 '(#:phases
14077 (modify-phases %standard-phases
14078 (replace 'check
14079 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
14080 (native-inputs
14081 `(;; For testing
14082 ("python-freezegun" ,python-freezegun)
14083 ("python-pytest" ,python-pytest)
14084 ("python-random2" ,python-random2)
14085 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
14086 ("python-validators" ,python-validators)))
14087 (propagated-inputs
14088 `(("python-dateutil" ,python-dateutil)
14089 ("python-text-unidecode" ,python-text-unidecode)))
14090 (home-page "https://github.com/joke2k/faker")
14091 (synopsis "Python package that generates fake data")
14092 (description
14093 "Faker is a Python package that generates fake data such as names,
14094 addresses, and phone numbers.")
14095 (license license:expat)
14096 (properties `((python2-variant . ,(delay python2-faker))))))
14097
14098 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
14099 (define-public python2-faker
14100 (let ((base (package-with-python2 (strip-python2-variant
14101 python-faker))))
14102 (package
14103 (inherit base)
14104 (version "3.0.1")
14105 (source (origin
14106 (method url-fetch)
14107 (uri (pypi-uri "Faker" version))
14108 (sha256
14109 (base32
14110 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
14111 (native-inputs
14112 `(("python-mock" ,python2-mock)
14113 ,@(package-native-inputs base)))
14114 (propagated-inputs
14115 `(("python2-ipaddress" ,python2-ipaddress)
14116 ("python2-six" ,python2-six)
14117 ,@(package-propagated-inputs base))))))
14118
14119 (define-public python-pyaml
14120 (package
14121 (name "python-pyaml")
14122 (version "18.11.0")
14123 (source (origin
14124 (method url-fetch)
14125 (uri (pypi-uri "pyaml" version))
14126 (sha256
14127 (base32
14128 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
14129 (build-system python-build-system)
14130 (native-inputs
14131 `(("python-unidecode" ,python-unidecode)))
14132 (propagated-inputs
14133 `(("python-pyyaml" ,python-pyyaml)))
14134 (home-page "https://github.com/mk-fg/pretty-yaml")
14135 (synopsis "YAML pretty-print library for Python")
14136 (description
14137 "pyaml is a PyYAML based python module to produce pretty and readable
14138 YAML-serialized data.")
14139 (license license:wtfpl2)))
14140
14141 (define-public python2-pyaml
14142 (package-with-python2 python-pyaml))
14143
14144 (define-public python-backpack
14145 (package
14146 (name "python-backpack")
14147 (version "0.1")
14148 (source
14149 (origin
14150 (method url-fetch)
14151 (uri (pypi-uri "backpack" version))
14152 (sha256
14153 (base32
14154 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
14155 (build-system python-build-system)
14156 (native-inputs
14157 `(("python-pytest" ,python-pytest)
14158 ("python-nose" ,python-nose)))
14159 (propagated-inputs
14160 `(("python-simplejson" ,python-simplejson)))
14161 (home-page "https://github.com/sdispater/backpack")
14162 (synopsis "Utilities for working with Python collections")
14163 (description "Backpack provides some useful utilities for working with
14164 collections of data.")
14165 (license license:expat)))
14166
14167 (define-public python2-backpack
14168 (package-with-python2 python-backpack))
14169
14170 (define-public python-prompt-toolkit
14171 (package
14172 (name "python-prompt-toolkit")
14173 (version "3.0.9")
14174 (source
14175 (origin
14176 (method url-fetch)
14177 (uri (pypi-uri "prompt_toolkit" version))
14178 (sha256
14179 (base32 "0bvjp62cs6aj9lrh7njzxdjgg8pjfw3qgmr551243d9ivmcapvn5"))))
14180 (build-system python-build-system)
14181 (arguments
14182 `(#:phases
14183 (modify-phases %standard-phases
14184 (delete 'check)
14185 (add-after 'install 'post-install-check
14186 (lambda* (#:key inputs outputs #:allow-other-keys)
14187 ;; HOME is needed for the test
14188 ;; "test_pathcompleter_can_expanduser".
14189 (setenv "HOME" "/tmp")
14190 (add-installed-pythonpath inputs outputs)
14191 (invoke "py.test"))))))
14192 (propagated-inputs
14193 `(("python-wcwidth" ,python-wcwidth)))
14194 (native-inputs
14195 `(("python-pytest" ,python-pytest)))
14196 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
14197 (synopsis "Library for building command line interfaces in Python")
14198 (description
14199 "Prompt-Toolkit is a library for building interactive command line
14200 interfaces in Python. It's like GNU Readline but it also features syntax
14201 highlighting while typing, out-of-the-box multi-line input editing, advanced
14202 code completion, incremental search, support for Chinese double-width
14203 characters, mouse support, and auto suggestions.")
14204 (license license:bsd-3)
14205 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
14206
14207 (define-public python-prompt-toolkit-2
14208 (package (inherit python-prompt-toolkit)
14209 (name "python-prompt-toolkit")
14210 (version "2.0.7")
14211 (source
14212 (origin
14213 (method url-fetch)
14214 (uri (pypi-uri "prompt_toolkit" version))
14215 (sha256
14216 (base32
14217 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
14218 (propagated-inputs
14219 `(("python-wcwidth" ,python-wcwidth)
14220 ("python-six" ,python-six)
14221 ("python-pygments" ,python-pygments)))
14222 (properties '())))
14223
14224 (define-public python2-prompt-toolkit
14225 (package-with-python2 python-prompt-toolkit-2))
14226
14227 (define-public python-prompt-toolkit-1
14228 (package (inherit python-prompt-toolkit-2)
14229 (version "1.0.15")
14230 (source
14231 (origin
14232 (method url-fetch)
14233 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
14234 (sha256
14235 (base32
14236 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
14237
14238 (define-public python2-prompt-toolkit-1
14239 (package-with-python2 python-prompt-toolkit-1))
14240
14241 (define-public python-jedi
14242 (package
14243 (name "python-jedi")
14244 (version "0.17.2")
14245 (source
14246 (origin
14247 (method url-fetch)
14248 (uri (pypi-uri "jedi" version))
14249 (sha256
14250 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
14251 (build-system python-build-system)
14252 (arguments
14253 `(#:phases
14254 (modify-phases %standard-phases
14255 (replace 'check
14256 (lambda* (#:key tests? #:allow-other-keys)
14257 (when tests?
14258 (setenv "HOME" "/tmp")
14259 (invoke "python" "-m" "pytest" "-vv"))
14260 #t)))))
14261 (native-inputs
14262 `(("python-pytest" ,python-pytest)
14263 ("python-docopt" ,python-docopt)))
14264 (propagated-inputs
14265 `(("python-parso" ,python-parso)))
14266 (home-page "https://github.com/davidhalter/jedi")
14267 (synopsis "Autocompletion and static analysis library for Python")
14268 (description
14269 "Jedi is a static analysis tool for Python that can be used in Integrated
14270 Development Environments (@dfn{IDE}s) and text editors. It understands Python
14271 on a deeper level than many other static analysis frameworks for Python.
14272
14273 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
14274 well.")
14275 (license license:expat)))
14276
14277 (define-public python2-jedi
14278 (package-with-python2 python-jedi))
14279
14280 (define-public ptpython
14281 (package
14282 (name "ptpython")
14283 (version "3.0.5")
14284 (source (origin
14285 (method url-fetch)
14286 (uri (pypi-uri "ptpython" version))
14287 (sha256
14288 (base32
14289 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
14290 (build-system python-build-system)
14291 (arguments
14292 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
14293 (propagated-inputs
14294 `(("python-appdirs" ,python-appdirs)
14295 ("python-jedi" ,python-jedi)
14296 ("python-prompt-toolkit" ,python-prompt-toolkit)
14297 ("python-pygments" ,python-pygments)))
14298 (home-page "https://github.com/jonathanslenders/ptpython")
14299 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
14300 (description
14301 "ptpython is a Python read-eval-print loop with IDE-like features.
14302 It supports syntax highlighting, multiline editing, autocompletion, mouse,
14303 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
14304 etc.")
14305 (license license:bsd-3)
14306 (properties `((python2-variant . ,(delay ptpython-2))))))
14307
14308 (define-public ptpython-2
14309 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
14310 (package/inherit base
14311 (name "ptpython2"))))
14312
14313 (define-public python-stem
14314 (package
14315 (name "python-stem")
14316 (version "1.8.0")
14317 (source
14318 (origin
14319 (method url-fetch)
14320 (uri (pypi-uri "stem" version))
14321 (sha256
14322 (base32
14323 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
14324 (build-system python-build-system)
14325 (arguments
14326 `(#:phases
14327 (modify-phases %standard-phases
14328 (replace 'check
14329 (lambda _
14330 (invoke "./run_tests.py" "--unit")
14331 #t)))))
14332 (native-inputs
14333 `(("python-mock" ,python-mock)
14334 ("python-pycodestyle" ,python-pycodestyle)
14335 ("python-pyflakes" ,python-pyflakes)))
14336 (home-page "https://stem.torproject.org/")
14337 (synopsis
14338 "Python controller library that allows applications to interact with Tor")
14339 (description
14340 "Stem is a Python controller library for Tor. With it you can use Tor's
14341 control protocol to script against the Tor process and read descriptor data
14342 relays publish about themselves.")
14343 (license license:lgpl3)))
14344
14345 (define-public python-pyserial
14346 (package
14347 (name "python-pyserial")
14348 (version "3.5")
14349 (source
14350 (origin
14351 (method url-fetch)
14352 (uri (pypi-uri "pyserial" version))
14353 (sha256
14354 (base32
14355 "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw"))))
14356 (build-system python-build-system)
14357 (arguments
14358 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
14359 ;; #:phases
14360 ;; (modify-phases %standard-phases
14361 ;; (replace 'check
14362 ;; (lambda _
14363 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
14364 (home-page
14365 "https://github.com/pyserial/pyserial")
14366 (synopsis "Python Serial Port Bindings")
14367 (description "@code{pyserial} provide serial port bindings for Python. It
14368 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
14369 and/or Xon/Xoff. The port is accessed in RAW mode.")
14370 (license license:bsd-3)))
14371
14372 (define-public python2-pyserial
14373 (package-with-python2 python-pyserial))
14374
14375 (define-public python-kivy
14376 (package
14377 (name "python-kivy")
14378 (version "1.10.1")
14379 (source
14380 (origin
14381 (method url-fetch)
14382 (uri (pypi-uri "Kivy" version))
14383 (file-name (string-append name "-" version ".tar.gz"))
14384 (sha256
14385 (base32
14386 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
14387 (build-system python-build-system)
14388 (arguments
14389 `(#:tests? #f ; Tests require many optional packages
14390 #:phases
14391 (modify-phases %standard-phases
14392 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
14393 (lambda* (#:key inputs #:allow-other-keys)
14394 (setenv "KIVY_SDL2_PATH"
14395 (string-append (assoc-ref inputs "sdl-union")
14396 "/include/SDL2"))
14397 #t)))))
14398 (native-inputs
14399 `(("pkg-config" ,pkg-config)
14400 ("python-cython" ,python-cython)))
14401 (inputs
14402 `(("gstreamer" ,gstreamer)
14403 ("mesa" ,mesa)
14404 ("sdl-union"
14405 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
14406 (home-page "https://kivy.org")
14407 (synopsis
14408 "Multitouch application framework")
14409 (description
14410 "A software library for rapid development of
14411 hardware-accelerated multitouch applications.")
14412 (license license:expat)))
14413
14414 (define-public python2-kivy
14415 (package-with-python2 python-kivy))
14416
14417 (define-public python-binaryornot
14418 (package
14419 (name "python-binaryornot")
14420 (version "0.4.4")
14421 (source (origin
14422 (method url-fetch)
14423 (uri (pypi-uri "binaryornot" version))
14424 (sha256
14425 (base32
14426 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
14427 (build-system python-build-system)
14428 (arguments
14429 `(#:phases
14430 (modify-phases %standard-phases
14431 (add-after 'unpack 'patch-tests
14432 (lambda _
14433 ;; TypeError: binary() got an unexpected keyword argument
14434 ;; 'average_size'.
14435 (substitute* "tests/test_check.py"
14436 (("average_size=512") ""))
14437 #t)))))
14438 (propagated-inputs
14439 `(("python-chardet" ,python-chardet)
14440 ("python-hypothesis" ,python-hypothesis)))
14441 (home-page "https://github.com/audreyr/binaryornot")
14442 (synopsis "Package to check if a file is binary or text")
14443 (description "Ultra-lightweight pure Python package to check if a file is
14444 binary or text.")
14445 (license license:bsd-3)
14446 (properties `((python2-variant . ,(delay python2-binaryornot))))))
14447
14448 (define-public python2-binaryornot
14449 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
14450 (package/inherit base
14451 (propagated-inputs
14452 `(("python2-enum34" ,python2-enum34)
14453 ,@(package-propagated-inputs base))))))
14454
14455 (define-public python-binwalk
14456 (package
14457 (name "python-binwalk")
14458 (version "2.2.0")
14459 (source
14460 (origin
14461 (method git-fetch)
14462 (uri (git-reference
14463 (url "https://github.com/ReFirmLabs/binwalk")
14464 (commit (string-append "v" version))))
14465 (file-name (git-file-name name version))
14466 (sha256
14467 (base32
14468 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
14469 (build-system python-build-system)
14470 (arguments
14471 `(#:phases
14472 (modify-phases %standard-phases
14473 (add-before 'check 'set-pythonpath
14474 (lambda _
14475 (setenv "PYTHONPATH"
14476 (string-append
14477 (getcwd) "/src/"
14478 ":" (getenv "PYTHONPATH")))
14479 (setenv "HOME" "")
14480 #t)))))
14481 (native-inputs
14482 `(("python-coverage" ,python-coverage)
14483 ("python-nose" ,python-nose)))
14484 (home-page "https://github.com/ReFirmLabs/binwalk")
14485 (synopsis "Firmware analysis tool")
14486 (description "Binwalk is a tool for analyzing, reverse engineering, and
14487 extracting firmware images")
14488 (license license:expat)))
14489
14490 (define-public python-nltk
14491 (package
14492 (name "python-nltk")
14493 (version "3.2.1")
14494 (source (origin
14495 (method url-fetch)
14496 (uri (pypi-uri "nltk" version))
14497 (sha256
14498 (base32
14499 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
14500 (build-system python-build-system)
14501 (arguments
14502 '(;; The tests require some extra resources to be downloaded.
14503 ;; TODO Try packaging these resources.
14504 #:tests? #f))
14505 (home-page "http://nltk.org/")
14506 (synopsis "Natural Language Toolkit")
14507 (description "It provides interfaces to over 50 corpora and lexical
14508 resources such as WordNet, along with a suite of text processing libraries
14509 for classification, tokenization, stemming, tagging, parsing, and semantic
14510 reasoning, wrappers for natural language processing libraries.")
14511 (license license:asl2.0)))
14512
14513 (define-public python2-nltk
14514 (package-with-python2 python-nltk))
14515
14516 (define-public python-pymongo
14517 (package
14518 (name "python-pymongo")
14519 (version "3.7.2")
14520 (source (origin
14521 (method url-fetch)
14522 (uri (pypi-uri "pymongo" version))
14523 (sha256
14524 (base32
14525 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
14526 (build-system python-build-system)
14527 (propagated-inputs
14528 `(("python-certifi" ,python-certifi)))
14529 (home-page "https://github.com/mongodb/mongo-python-driver")
14530 (synopsis "Python driver for MongoDB")
14531 (description "Python driver for MongoDB.")
14532 (license license:asl2.0)))
14533
14534 (define-public python2-pymongo
14535 (package-with-python2 python-pymongo))
14536
14537 (define-public python-consul
14538 (package
14539 (name "python-consul")
14540 (version "0.6.1")
14541 (source
14542 (origin
14543 (method url-fetch)
14544 (uri (pypi-uri "python-consul" version))
14545 (sha256
14546 (base32
14547 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
14548 (build-system python-build-system)
14549 (arguments
14550 '(#:tests? #f)) ; The tests are not distributed
14551 (propagated-inputs
14552 `(("python-requests" ,python-requests)
14553 ("python-six" ,python-six)))
14554 (home-page "https://github.com/cablehead/python-consul")
14555 (synopsis "Python client for Consul")
14556 (description
14557 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
14558 discovery, monitoring and configuration.")
14559 (license license:expat)))
14560
14561 (define-public python2-consul
14562 (package-with-python2 python-consul))
14563
14564 (define-public python-schematics
14565 (package
14566 (name "python-schematics")
14567 (version "1.1.1")
14568 (source
14569 (origin
14570 (method git-fetch)
14571 (uri (git-reference
14572 (url "https://github.com/schematics/schematics")
14573 (commit (string-append "v" version))))
14574 (file-name (git-file-name name version))
14575 (sha256
14576 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
14577 (build-system python-build-system)
14578 (propagated-inputs
14579 `(("python-six" ,python-six)))
14580 (arguments
14581 ;; The tests require a bunch of not very nice packages with fixed
14582 ;; version requirements (e.g. python-coveralls).
14583 `(#:tests? #f))
14584 (home-page "https://github.com/schematics/schematics")
14585 (synopsis "Python Data Structures for Humans")
14586 (description "Python Data Structures for Humans.")
14587 (license license:bsd-3)))
14588
14589 (define-public python2-schematics
14590 (package-with-python2 python-schematics))
14591
14592 (define-public python-odfpy
14593 (package
14594 (name "python-odfpy")
14595 (version "1.4.1")
14596 (source (origin
14597 (method url-fetch)
14598 (uri (pypi-uri "odfpy" version))
14599 (sha256
14600 (base32
14601 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
14602 (arguments
14603 `(#:phases
14604 (modify-phases %standard-phases
14605 (replace 'check
14606 (lambda _
14607 (setenv "PYTHONPATH" (string-append "./build/lib:"
14608 (getenv "PYTHONPATH")))
14609 (invoke "pytest" "-vv"))))))
14610 (build-system python-build-system)
14611 (native-inputs
14612 `(("python-pytest" ,python-pytest)))
14613 (propagated-inputs
14614 `(("python-defusedxml" ,python-defusedxml)))
14615 (home-page "https://github.com/eea/odfpy")
14616 (synopsis "Python API and tools to manipulate OpenDocument files")
14617 (description "Collection of libraries and utility programs written in
14618 Python to manipulate OpenDocument 1.2 files.")
14619 (license
14620 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
14621 ;; number of files with other licenses.
14622 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
14623
14624 (define-public python2-odfpy
14625 (package-with-python2 python-odfpy))
14626
14627 (define-public python-natsort
14628 (package
14629 (name "python-natsort")
14630 (version "7.0.1")
14631 (source (origin
14632 (method url-fetch)
14633 (uri (pypi-uri "natsort" version))
14634 (sha256
14635 (base32
14636 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14637 (build-system python-build-system)
14638 (arguments
14639 `(#:modules ((guix build utils)
14640 (guix build python-build-system)
14641 (srfi srfi-1)
14642 (srfi srfi-26)
14643 (ice-9 ftw))
14644 #:phases
14645 (modify-phases %standard-phases
14646 (add-before 'check 'set-cachedir
14647 ;; Tests require write access to $HOME by default
14648 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14649 (replace 'check
14650 (lambda _
14651 (let ((cwd (getcwd)))
14652 (setenv "PYTHONPATH"
14653 (string-append
14654 cwd "/build/"
14655 (find (cut string-prefix? "lib" <>)
14656 (scandir (string-append cwd "/build")))
14657 ":"
14658 (getenv "PYTHONPATH")))
14659 (invoke "pytest" "-v")))))))
14660 (native-inputs
14661 `(("python-hypothesis" ,python-hypothesis)
14662 ("python-pytest-cov" ,python-pytest-cov)
14663 ("python-pytest-mock" ,python-pytest-mock)
14664 ("python-pytest" ,python-pytest)))
14665 (propagated-inputs ; TODO: Add python-fastnumbers.
14666 `(("python-pyicu" ,python-pyicu)))
14667 (home-page "https://github.com/SethMMorton/natsort")
14668 (synopsis "Natural sorting for python and shell")
14669 (description
14670 "Natsort lets you apply natural sorting on lists instead of
14671 lexicographical. If you use the built-in @code{sorted} method in python
14672 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14673 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14674 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14675 identifies numbers and sorts them separately from strings. It can also sort
14676 version numbers, real numbers, mixed types and more, and comes with a shell
14677 command @command{natsort} that exposes this functionality in the command line.")
14678 (license license:expat)
14679 (properties `((python2-variant . ,(delay python2-natsort))))))
14680
14681 ;; Natsort 6.x are the last versions with support for Python 2.
14682 (define-public python2-natsort
14683 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14684 (package (inherit base)
14685 (version "6.2.1")
14686 (source (origin
14687 (method url-fetch)
14688 (uri (pypi-uri "natsort" version))
14689 (sha256
14690 (base32
14691 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14692 (native-inputs
14693 `(("python2-pathlib" ,python2-pathlib)
14694 ,@(package-native-inputs base))))))
14695
14696 (define-public glances
14697 (package
14698 (name "glances")
14699 (version "3.1.6")
14700 (source
14701 (origin
14702 (method url-fetch)
14703 (uri (pypi-uri "Glances" version))
14704 (sha256
14705 (base32 "11xbm8jgcxha191ly7q76nab1ilabiz14mqf6i3y6aw5xvgg017c"))
14706 (modules '((guix build utils)))
14707 (snippet
14708 '(begin
14709 ;; Glances phones PyPI for weekly update checks by default.
14710 ;; Disable these. The user can re-enable them if desired.
14711 (substitute* "glances/outdated.py"
14712 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14713 (string-append indentation
14714 "self.args.disable_check_update = True\n"
14715 line)))
14716 #t))))
14717 (build-system python-build-system)
14718 (propagated-inputs
14719 `(("python-future" ,python-future)
14720 ("python-psutil" ,python-psutil)))
14721 (home-page "https://github.com/nicolargo/glances")
14722 (synopsis "Cross-platform curses-based monitoring tool")
14723 (description
14724 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14725 Glances uses the PsUtil library to get information from your system. It
14726 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14727 (license license:lgpl3+)))
14728
14729 (define-public python-glances
14730 (deprecated-package "python-glances" glances))
14731
14732 (define-public python-graphql-core
14733 (package
14734 (name "python-graphql-core")
14735 (version "3.1.2")
14736 (source
14737 (origin
14738 (method url-fetch)
14739 (uri (pypi-uri "graphql-core" version))
14740 (sha256
14741 (base32
14742 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
14743 (build-system python-build-system)
14744 (arguments
14745 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14746 #:phases
14747 (modify-phases %standard-phases
14748 (add-after 'unpack 'patch-hardcoded-version
14749 (lambda _ (substitute*
14750 "setup.py"
14751 (("'gevent==1.1rc1'") "'gevent'"))
14752 #t)))))
14753 (native-inputs
14754 `(("python-gevent" ,python-gevent)
14755 ("python-mock" ,python-mock)
14756 ("python-pytest-mock" ,python-pytest-mock)))
14757 (propagated-inputs
14758 `(("python-promise" ,python-promise)
14759 ("python-six" ,python-six)))
14760 (home-page "https://github.com/graphql-python/graphql-core")
14761 (synopsis "GraphQL implementation for Python")
14762 (description
14763 "GraphQL implementation for Python. GraphQL is a data query language and
14764 runtime designed and used to request and deliver data to mobile and web apps.
14765 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14766 to Python.")
14767 (license license:expat)))
14768
14769 (define-public python-graphql-relay
14770 (package
14771 (name "python-graphql-relay")
14772 (version "0.4.5")
14773 (source
14774 (origin
14775 (method url-fetch)
14776 (uri (pypi-uri "graphql-relay" version))
14777 (sha256
14778 (base32
14779 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14780 (build-system python-build-system)
14781 (arguments
14782 '(#:tests? #f)) ; The tests are not distributed
14783 (propagated-inputs
14784 `(("python-graphql-core" ,python-graphql-core)
14785 ("python-promise" ,python-promise)
14786 ("python-six" ,python-six)))
14787 (home-page "https://github.com/graphql-python/graphql-relay-py")
14788 (synopsis "Relay implementation for Python")
14789 (description
14790 "This is a library to allow the easy creation of Relay-compliant servers
14791 using the GraphQL Python reference implementation of a GraphQL server. It
14792 should be noted that the code is a exact port of the original
14793 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14794 from Facebook.")
14795 (license license:expat)))
14796
14797 (define-public python-graphene
14798 (package
14799 (name "python-graphene")
14800 (version "0.10.2")
14801 (source
14802 (origin
14803 (method url-fetch)
14804 (uri (pypi-uri "graphene" version))
14805 (sha256
14806 (base32
14807 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14808 (build-system python-build-system)
14809 (propagated-inputs
14810 `(("python-graphql-core" ,python-graphql-core)
14811 ("python-graphql-relay" ,python-graphql-relay)
14812 ("python-iso8601" ,python-iso8601)
14813 ("python-promise" ,python-promise)
14814 ("python-six" ,python-six)))
14815 (arguments
14816 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14817 (home-page "https://graphene-python.org/")
14818 (synopsis "GraphQL Framework for Python")
14819 (description
14820 "Graphene is a Python library for building GraphQL schemas/types.
14821 A GraphQL schema describes your data model, and provides a GraphQL server
14822 with an associated set of resolve methods that know how to fetch data.")
14823 (license license:expat)))
14824
14825 (define-public python-nautilus
14826 (package
14827 (name "python-nautilus")
14828 (version "0.4.9")
14829 (source
14830 (origin
14831 (method url-fetch)
14832 (uri (pypi-uri "nautilus" version))
14833 (sha256
14834 (base32
14835 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14836 (build-system python-build-system)
14837 (arguments `(#:tests? #f)) ; fails to import test modules
14838 (propagated-inputs
14839 `(("python-bcrypt" ,python-bcrypt)
14840 ("python-click" ,python-click)
14841 ("python-consul" ,python-consul)
14842 ("python-graphene" ,python-graphene)
14843 ("python-jinja2" ,python-jinja2)
14844 ("python-peewee" ,python-peewee)
14845 ("python-pika" ,python-pika)
14846 ("python-tornado" ,python-tornado)
14847 ("python-wtforms" ,python-wtforms)))
14848 (native-inputs
14849 `(("python-nose2" ,python-nose2)))
14850 (home-page "https://github.com/AlecAivazis/nautilus")
14851 (synopsis "Library for creating microservice applications")
14852 (description
14853 "Nautilus is a framework for flux based microservices that looks to
14854 provide extendible implementations of common aspects of a cloud so that you can
14855 focus on building massively scalable web applications.")
14856 (license license:expat)))
14857
14858 (define-public python-random2
14859 (package
14860 (name "python-random2")
14861 (version "1.0.1")
14862 (source (origin
14863 (method url-fetch)
14864 (uri (pypi-uri "random2" version ".zip"))
14865 (sha256
14866 (base32
14867 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14868 (build-system python-build-system)
14869 (native-inputs `(("unzip" ,unzip)))
14870 (home-page "http://pypi.python.org/pypi/random2")
14871 (synopsis "Python 3 version of the Python 2 @code{random} module")
14872 (description
14873 "This package provides a Python 3 ported version of Python 2.7’s
14874 @code{random} module. It has also been back-ported to work in Python 2.6.
14875
14876 In Python 3, the implementation of @code{randrange()} was changed, so that
14877 even with the same seed you get different sequences in Python 2 and 3.
14878
14879 This package closes that gap, allowing stable random number generation
14880 between the different Python versions.")
14881 (license license:psfl)))
14882
14883 (define-public python2-random2
14884 (package-with-python2 python-random2))
14885
14886 (define-public python-snowballstemmer
14887 (package
14888 (name "python-snowballstemmer")
14889 (version "2.0.0")
14890 (source (origin
14891 (method url-fetch)
14892 (uri (pypi-uri "snowballstemmer" version))
14893 (sha256
14894 (base32
14895 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14896 (build-system python-build-system)
14897 (arguments
14898 `(;; No tests exist
14899 #:tests? #f))
14900 (home-page "https://github.com/shibukawa/snowball_py")
14901 (synopsis "Snowball stemming library collection for Python")
14902 (description "This package provides 16 word stemmer algorithms generated
14903 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14904 English stemmer.")
14905 (license license:bsd-3)))
14906
14907 (define-public python2-snowballstemmer
14908 (package-with-python2 python-snowballstemmer))
14909
14910 (define-public python-setproctitle
14911 (package
14912 (name "python-setproctitle")
14913 (version "1.1.10")
14914 (source
14915 (origin
14916 (method url-fetch)
14917 (uri (pypi-uri "setproctitle" version))
14918 (sha256
14919 (base32
14920 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14921 (build-system python-build-system)
14922 (arguments
14923 '(#:phases
14924 (modify-phases %standard-phases
14925 (add-before 'check 'patch-Makefile
14926 ;; Stricly this is only required for the python2 variant.
14927 ;; But adding a phase in an inherited package seems to be
14928 ;; cumbersum. So we patch even for python3.
14929 (lambda _
14930 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14931 (when nose
14932 (substitute* "Makefile"
14933 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14934 (string-append nose "/bin/nosetests "))))
14935 #t)))
14936 (replace 'check
14937 (lambda _
14938 (setenv "PYTHON" (or (which "python3") (which "python")))
14939 (setenv "PYCONFIG" (if (which "python3-config")
14940 "python3-config --embed"
14941 "python-config"))
14942 (setenv "CC" "gcc")
14943 ;; No need to extend PYTHONPATH to find the built package, since
14944 ;; the Makefile will build anyway
14945 (invoke "make" "check"))))))
14946 (native-inputs
14947 `(("procps" ,procps))) ; required for tests
14948 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14949 (synopsis
14950 "Setproctitle implementation for Python to customize the process title")
14951 (description "The library allows a process to change its title (as displayed
14952 by system tools such as ps and top).
14953
14954 Changing the title is mostly useful in multi-process systems, for
14955 example when a master process is forked: changing the children's title
14956 allows identifying the task each process is busy with. The technique
14957 is used by PostgreSQL and the OpenSSH Server for example.")
14958 (license license:bsd-3)
14959 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14960
14961 (define-public python2-setproctitle
14962 (let ((base (package-with-python2
14963 (strip-python2-variant python-setproctitle))))
14964 (package/inherit base
14965 (native-inputs `(("python2-nose" ,python2-nose)
14966 ,@(package-native-inputs base))))))
14967
14968 (define-public python-validictory
14969 (package
14970 (name "python-validictory")
14971 (version "1.0.1")
14972 (source
14973 (origin
14974 (method url-fetch)
14975 (uri (pypi-uri "validictory" version))
14976 (sha256
14977 (base32
14978 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14979 (build-system python-build-system)
14980 (arguments
14981 '(#:phases
14982 (modify-phases %standard-phases
14983 (add-after 'unpack 'bootstrap
14984 ;; Move the tests out of the package directory to avoid
14985 ;; packaging them.
14986 (lambda* _
14987 (rename-file "validictory/tests" "tests")
14988 (delete-file "tests/__init__.py")))
14989 (replace 'check
14990 (lambda _
14991 ;; Extend PYTHONPATH so the built package will be found.
14992 (setenv "PYTHONPATH"
14993 (string-append (getcwd) "/build/lib:"
14994 (getenv "PYTHONPATH")))
14995 (invoke "py.test" "-vv" ))))))
14996 (native-inputs
14997 `(("python-pytest" ,python-pytest)))
14998 (home-page
14999 "https://github.com/jamesturk/validictory")
15000 (synopsis "General purpose Python data validator")
15001 (description "It allows validation of arbitrary Python data structures.
15002
15003 The schema format is based on the JSON Schema
15004 proposal (http://json-schema.org), so combined with json the library is also
15005 useful as a validator for JSON data.")
15006 (license license:expat)))
15007
15008 (define-public python2-validictory
15009 (package-with-python2 python-validictory))
15010
15011 (define-public python-pyelftools
15012 (package
15013 (name "python-pyelftools")
15014 (version "0.25")
15015 (source
15016 (origin
15017 (method url-fetch)
15018 (uri (pypi-uri "pyelftools" version))
15019 (sha256
15020 (base32
15021 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
15022 (build-system python-build-system)
15023 (arguments
15024 `(#:phases
15025 (modify-phases %standard-phases
15026 (add-before 'check 'set-pythonpath
15027 (lambda _
15028 (setenv "PYTHONPATH"
15029 (string-append
15030 (getcwd) "/test/"
15031 ":" (getenv "PYTHONPATH")))
15032 #t)))))
15033 (home-page
15034 "https://github.com/eliben/pyelftools")
15035 (synopsis
15036 "Analyze binary and library file information")
15037 (description "This Python library provides interfaces for parsing and
15038 analyzing two binary and library file formats; the Executable and Linking
15039 Format (ELF), and debugging information in the Debugging With Attributed
15040 Record Format (DWARF).")
15041 (license license:public-domain)))
15042
15043 (define-public python-pyev
15044 (package
15045 (name "python-pyev")
15046 (version "0.9.0")
15047 (source
15048 (origin
15049 (method url-fetch)
15050 (uri (pypi-uri "pyev" version))
15051 (sha256
15052 (base32
15053 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
15054 (build-system python-build-system)
15055 (arguments
15056 `(#:tests? #f ; no test suite
15057 #:phases
15058 (modify-phases %standard-phases
15059 (add-after 'unpack 'patch
15060 (lambda* (#:key inputs #:allow-other-keys)
15061 (let ((libev (string-append (assoc-ref inputs "libev")
15062 "/lib/libev.so.4")))
15063 (substitute* "setup.py"
15064 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
15065 (string-append "libev_dll_name = \"" libev "\"")))))))))
15066 (inputs
15067 `(("libev" ,libev)))
15068 (home-page "https://github.com/gabrielfalcao/pyev")
15069 (synopsis "Python libev interface")
15070 (description "Pyev provides a Python interface to libev.")
15071 (license license:gpl3)))
15072
15073 (define-public python2-pyev
15074 (package-with-python2 python-pyev))
15075
15076 (define-public python-imagesize
15077 (package
15078 (name "python-imagesize")
15079 (version "1.2.0")
15080 (source
15081 (origin
15082 (method url-fetch)
15083 (uri (pypi-uri "imagesize" version))
15084 (sha256
15085 (base32
15086 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
15087 (build-system python-build-system)
15088 (home-page "https://github.com/shibukawa/imagesize_py")
15089 (synopsis "Gets image size of files in various formats in Python")
15090 (description
15091 "This package allows determination of image size from
15092 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
15093 (license license:expat)))
15094
15095 (define-public python2-imagesize
15096 (package-with-python2 python-imagesize))
15097
15098 (define-public python-termstyle
15099 (package
15100 (name "python-termstyle")
15101 (version "0.1.11")
15102 (source
15103 (origin
15104 (method url-fetch)
15105 (uri (pypi-uri "termstyle" version))
15106 (sha256
15107 (base32
15108 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
15109 (build-system python-build-system)
15110 (arguments
15111 '(#:phases
15112 (modify-phases %standard-phases
15113 (replace 'check
15114 (lambda _
15115 (invoke "python" "test3.py"))))))
15116 (home-page "https://github.com/gfxmonk/termstyle")
15117 (synopsis "Console text coloring for Python")
15118 (description "This package provides console text coloring for Python.")
15119 (license license:bsd-3)))
15120
15121 (define-public python-argcomplete
15122 (package
15123 (name "python-argcomplete")
15124 (version "1.11.1")
15125 (source
15126 (origin
15127 (method url-fetch)
15128 (uri (pypi-uri "argcomplete" version))
15129 (sha256
15130 (base32
15131 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
15132 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
15133 (build-system python-build-system)
15134 (native-inputs
15135 `(("python-coverage" ,python-coverage)
15136 ("python-flake8" ,python-flake8)
15137 ("python-pexpect" ,python-pexpect)
15138 ("python-wheel" ,python-wheel)
15139 ("tcsh" ,tcsh)
15140 ("fish" ,fish)
15141 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
15142 (home-page "https://github.com/kislyuk/argcomplete")
15143 (synopsis "Shell tab completion for Python argparse")
15144 (description "argcomplete provides extensible command line tab completion
15145 of arguments and options for Python scripts using @code{argparse}. It's
15146 particularly useful for programs with many options or sub-parsers that can
15147 dynamically suggest completions; for example, when browsing resources over the
15148 network.")
15149 (license license:asl2.0)
15150 (properties `((python2-variant . ,(delay python2-argcomplete))))))
15151
15152 (define-public python2-argcomplete
15153 (let ((variant (package-with-python2
15154 (strip-python2-variant python-argcomplete))))
15155 (package/inherit variant
15156 (arguments
15157 (substitute-keyword-arguments (package-arguments variant)
15158 ((#:phases phases '%standard-phases)
15159 `(modify-phases ,phases
15160 (add-after 'unpack 'set-my-HOME
15161 (lambda _ (setenv "HOME" "/tmp")))))))
15162 (native-inputs
15163 `(("python2-importlib-metadata" ,python2-importlib-metadata)
15164 ,@(package-native-inputs variant))))))
15165
15166 (define-public python-csscompressor
15167 (package
15168 (name "python-csscompressor")
15169 (version "0.9.5")
15170 (source
15171 (origin
15172 (method url-fetch)
15173 (uri (pypi-uri "csscompressor" version))
15174 (sha256
15175 (base32
15176 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
15177 (build-system python-build-system)
15178 (arguments
15179 '(#:phases
15180 (modify-phases %standard-phases
15181 (replace 'check
15182 (lambda _
15183 (invoke "py.test"))))))
15184 (native-inputs
15185 `(("python-pytest" ,python-pytest)))
15186 (home-page "https://github.com/sprymix/csscompressor")
15187 (synopsis "Python port of YUI CSS Compressor")
15188 (description
15189 "This package provides a python port of YUI CSS Compressor.")
15190 (license license:bsd-3)))
15191
15192 (define-public python-rcssmin
15193 (package
15194 (name "python-rcssmin")
15195 (version "1.0.6")
15196 (source
15197 (origin
15198 (method url-fetch)
15199 (uri (pypi-uri "rcssmin" version))
15200 (sha256
15201 (base32
15202 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
15203 (build-system python-build-system)
15204 (arguments
15205 '(#:phases
15206 (modify-phases %standard-phases
15207 (replace 'check
15208 (lambda _
15209 (invoke "python" "run_tests.py" "tests"))))))
15210 (home-page "http://opensource.perlig.de/rcssmin/")
15211 (synopsis "CSS Minifier")
15212 (description "The minifier is based on the semantics of the YUI compressor,
15213 which itself is based on the rule list by Isaac Schlueter.")
15214 (license license:asl2.0)))
15215
15216 (define-public python-rjsmin
15217 (package
15218 (name "python-rjsmin")
15219 (version "1.1.0")
15220 (source
15221 (origin
15222 (method url-fetch)
15223 (uri (pypi-uri "rjsmin" version))
15224 (sha256
15225 (base32
15226 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
15227 (modules '((guix build utils)))
15228 (snippet
15229 '(begin
15230 (for-each delete-file (find-files "bench" "\\.js$"))
15231 #t))))
15232 (build-system python-build-system)
15233 (arguments
15234 '(#:tests? #f ; Not all test files included.
15235 #:phases
15236 (modify-phases %standard-phases
15237 (replace 'check
15238 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
15239 (add-installed-pythonpath inputs outputs)
15240 (if tests?
15241 (invoke "py.test" "-vv" "tests")
15242 #t))))))
15243 (native-inputs
15244 `(("python-pytest" ,python-pytest)))
15245 (home-page "http://opensource.perlig.de/rjsmin/")
15246 (synopsis "Javascript Minifier")
15247 (description "@code{rJSmin} is a javascript minifier written in Python. The
15248 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
15249 is a re-implementation aiming for speed, so it can be used at runtime (rather
15250 than during a preprocessing step).")
15251 (license license:asl2.0)))
15252
15253 (define-public python-xopen
15254 (package
15255 (name "python-xopen")
15256 (version "0.5.0")
15257 (source
15258 (origin
15259 (method url-fetch)
15260 (uri (pypi-uri "xopen" version))
15261 (sha256
15262 (base32
15263 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
15264 (build-system python-build-system)
15265 (propagated-inputs
15266 `(("python-setuptools-scm" ,python-setuptools-scm)))
15267 (home-page "https://github.com/marcelm/xopen/")
15268 (synopsis "Open compressed files transparently")
15269 (description "This module provides an @code{xopen} function that works like
15270 Python's built-in @code{open} function, but can also deal with compressed files.
15271 Supported compression formats are gzip, bzip2 and, xz, and are automatically
15272 recognized by their file extensions. The focus is on being as efficient as
15273 possible on all supported Python versions.")
15274 (license license:expat)))
15275
15276 (define-public python2-xopen
15277 (let ((base (package-with-python2
15278 (strip-python2-variant python-xopen))))
15279 (package/inherit base
15280 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
15281 ,@(package-propagated-inputs base))))))
15282
15283 (define-public python-cheetah
15284 (package
15285 (name "python-cheetah")
15286 (version "3.2.4")
15287 (source
15288 (origin
15289 (method url-fetch)
15290 (uri (pypi-uri "Cheetah3" version))
15291 (sha256
15292 (base32
15293 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
15294 (build-system python-build-system)
15295 (arguments
15296 `(#:modules ((guix build utils)
15297 (guix build python-build-system)
15298 (ice-9 ftw)
15299 (srfi srfi-1)
15300 (srfi srfi-26))
15301 #:phases (modify-phases %standard-phases
15302 (add-after 'unpack 'use-absolute-python
15303 (lambda _
15304 (substitute* "Cheetah/CheetahWrapper.py"
15305 (("#!/usr/bin/env python")
15306 (string-append "#!" (which "python"))))
15307 #t))
15308 (add-after 'unpack 'fix-tests
15309 (lambda _
15310 (substitute* "Cheetah/Tests/ImportHooks.py"
15311 (("os.path.dirname\\(__file__\\)")
15312 (string-append "'" (getcwd) "/Cheetah/Tests'")))
15313 #t))
15314 (replace 'check
15315 (lambda _
15316 (let ((cwd (getcwd)))
15317 (setenv "PYTHONPATH"
15318 (string-append
15319 cwd "/build/"
15320 (find (cut string-prefix? "lib" <>)
15321 (scandir (string-append cwd "/build")))
15322 ":" (getenv "PYTHONPATH")))
15323 (setenv "PATH"
15324 (string-append (getenv "PATH")
15325 ":" cwd "/bin"))
15326 (setenv "TMPDIR" "/tmp")
15327
15328 (substitute* "Cheetah/Tests/Test.py"
15329 (("unittest.TextTestRunner\\(\\)")
15330 "unittest.TextTestRunner(verbosity=2)"))
15331
15332 (invoke "python" "Cheetah/Tests/Test.py")))))))
15333 (propagated-inputs
15334 `(("python-markdown" ,python-markdown))) ;optional
15335 (home-page "https://cheetahtemplate.org/")
15336 (synopsis "Template engine")
15337 (description "Cheetah is a text-based template engine and Python code
15338 generator.
15339
15340 Cheetah can be used as a standalone templating utility or referenced as
15341 a library from other Python applications. It has many potential uses,
15342 but web developers looking for a viable alternative to ASP, JSP, PHP and
15343 PSP are expected to be its principle user group.
15344
15345 Features:
15346 @enumerate
15347 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
15348 text-based format.
15349 @item Cleanly separates content, graphic design, and program code.
15350 @item Blends the power and flexibility of Python with a simple template language
15351 that non-programmers can understand.
15352 @item Gives template writers full access to any Python data structure, module,
15353 function, object, or method in their templates.
15354 @item Makes code reuse easy by providing an object-orientated interface to
15355 templates that is accessible from Python code or other Cheetah templates.
15356 One template can subclass another and selectively reimplement sections of it.
15357 @item Provides a simple, yet powerful, caching mechanism that can dramatically
15358 improve the performance of a dynamic website.
15359 @item Compiles templates into optimized, yet readable, Python code.
15360 @end enumerate")
15361 (license (license:x11-style "file://LICENSE"))))
15362
15363 (define-public python2-cheetah
15364 (package-with-python2 python-cheetah))
15365
15366 (define-public python-dulwich
15367 (package
15368 (name "python-dulwich")
15369 (version "0.19.16")
15370 (source
15371 (origin
15372 (method url-fetch)
15373 (uri (list (string-append "https://www.dulwich.io/releases/"
15374 "dulwich-" version ".tar.gz")
15375 (pypi-uri "dulwich" version)))
15376 (sha256
15377 (base32
15378 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
15379 (build-system python-build-system)
15380 (arguments
15381 `(#:phases
15382 (modify-phases %standard-phases
15383 (add-before 'check 'fix-tests
15384 (lambda* (#:key inputs #:allow-other-keys)
15385 ;; The tests use Popen with a custom environment which doesn't
15386 ;; include PATH.
15387 (substitute* "dulwich/tests/compat/utils.py"
15388 (("'git'") (string-append "'"
15389 (which "git")
15390 "'")))
15391 (substitute* '("dulwich/tests/test_repository.py"
15392 "dulwich/tests/test_hooks.py")
15393 (("#!/bin/sh") (string-append "#!" (which "sh"))))
15394 (setenv "TEST_RUNNER" "unittest")
15395 (setenv "PYTHONHASHSEED" "random")
15396 #t)))))
15397 (propagated-inputs
15398 `(("python-fastimport" ,python-fastimport)
15399 ("python-urllib3" ,python-urllib3)))
15400 (native-inputs
15401 `(("python-mock" ,python-mock)
15402 ("python-geventhttpclient" ,python-geventhttpclient)
15403 ("git" ,git)))
15404 (home-page "https://www.dulwich.io/")
15405 (synopsis "Git implementation in Python")
15406 (description "Dulwich is an implementation of the Git file formats and
15407 protocols written in pure Python.")
15408 ;; Can be used with either license.
15409 (license (list license:asl2.0 license:gpl2+))))
15410
15411 (define-public python-pbkdf2
15412 (package
15413 (name "python-pbkdf2")
15414 (version "1.3")
15415 (source
15416 (origin
15417 (method url-fetch)
15418 (uri (pypi-uri "pbkdf2" version))
15419 (sha256
15420 (base32
15421 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
15422 (build-system python-build-system)
15423 (arguments
15424 '(#:phases
15425 (modify-phases %standard-phases
15426 (replace 'check
15427 (lambda _
15428 (setenv "PYTHONPATH"
15429 (string-append (getcwd) "/build/lib:"
15430 (getenv "PYTHONPATH")))
15431 (invoke "python" "test/test_pbkdf2.py"))))))
15432 (propagated-inputs
15433 `(("python-pycrypto" ,python-pycrypto))) ; optional
15434 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
15435 (synopsis "Password-based key derivation")
15436 (description "This module implements the password-based key derivation
15437 function, PBKDF2, specified in RSA PKCS#5 v2.0.
15438
15439 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
15440 is part of the RSA Public Key Cryptography Standards series. The provided
15441 implementation takes a password or a passphrase and a salt value (and
15442 optionally a iteration count, a digest module, and a MAC module) and provides
15443 a file-like object from which an arbitrarily-sized key can be read.")
15444 (license license:expat)))
15445
15446 (define-public python2-pbkdf2
15447 (package-with-python2 python-pbkdf2))
15448
15449 (define-public python-qrcode
15450 (package
15451 (name "python-qrcode")
15452 (version "6.1")
15453 (source
15454 (origin
15455 (method url-fetch)
15456 (uri (pypi-uri "qrcode" version))
15457 (sha256
15458 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
15459 (build-system python-build-system)
15460 (arguments
15461 ;; FIXME: Tests require packaging 'pymaging'.
15462 '(#:tests? #f))
15463 (propagated-inputs
15464 `(("python-lxml" ,python-lxml) ; for SVG output
15465 ("python-pillow" ,python-pillow) ; for PNG output
15466 ("python-six" ,python-six)))
15467 (home-page "https://github.com/lincolnloop/python-qrcode")
15468 (synopsis "QR Code image generator")
15469 (description "This package provides a pure Python QR Code generator
15470 module. It uses the Python Imaging Library (PIL) to allow for the generation
15471 of QR Codes.
15472
15473 In addition this package provides a command line tool to generate QR codes and
15474 either write these QR codes to a file or do the output as ascii art at the
15475 console.")
15476 (license license:bsd-3)))
15477
15478 (define-public python2-qrcode
15479 (package-with-python2 python-qrcode))
15480
15481 (define-public python-rst2ansi
15482 (package
15483 (name "python-rst2ansi")
15484 (version "0.1.5")
15485 (source
15486 (origin
15487 (method url-fetch)
15488 (uri (pypi-uri "rst2ansi" version))
15489 (sha256
15490 (base32
15491 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
15492 (build-system python-build-system)
15493 (propagated-inputs
15494 `(("python-docutils" ,python-docutils)))
15495 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
15496 (synopsis "Convert RST to ANSI-decorated console output")
15497 (description
15498 "Python module dedicated to rendering RST (reStructuredText) documents
15499 to ansi-escaped strings suitable for display in a terminal.")
15500 (license license:expat)))
15501
15502 (define-public python-ansi2html
15503 (package
15504 (name "python-ansi2html")
15505 (version "1.2.0")
15506 (source
15507 (origin
15508 (method url-fetch)
15509 (uri (pypi-uri "ansi2html" version))
15510 (sha256
15511 (base32
15512 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
15513 (build-system python-build-system)
15514 (native-inputs
15515 `(("python-mock" ,python-mock)
15516 ("python-nose" ,python-nose)))
15517 (propagated-inputs
15518 `(("python-six" ,python-six)))
15519 (home-page "https://github.com/ralphbean/ansi2html")
15520 (synopsis "Convert ANSI-decorated console output to HTML")
15521 (description
15522 "@command{ansi2html} is a Python library and command line utility for
15523 converting text with ANSI color codes to HTML or LaTeX.")
15524 (license license:gpl3+)))
15525
15526 (define-public python2-ansi2html
15527 (package-with-python2 python-ansi2html))
15528
15529 (define-public python-ddt
15530 (package
15531 (name "python-ddt")
15532 (version "1.4.1")
15533 (source
15534 (origin
15535 (method url-fetch)
15536 (uri (pypi-uri "ddt" version))
15537 (sha256
15538 (base32
15539 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
15540 (build-system python-build-system)
15541 (native-inputs
15542 `(("python-pytest" ,python-pytest)))
15543 (propagated-inputs
15544 `(("python-pyyaml" ,python-pyyaml)))
15545 (home-page "https://github.com/datadriventests/ddt")
15546 (synopsis "Data-Driven Tests")
15547 (description
15548 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
15549 running it with different test data, and make it appear as multiple test
15550 cases.")
15551 (license license:expat)))
15552
15553 (define-public python-pycountry
15554 (package
15555 (name "python-pycountry")
15556 (version "18.5.26")
15557 (source
15558 (origin
15559 (method url-fetch)
15560 (uri (pypi-uri "pycountry" version))
15561 (sha256
15562 (base32
15563 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
15564 (build-system python-build-system)
15565 (home-page "https://bitbucket.org/flyingcircus/pycountry")
15566 (synopsis "ISO databases for languages, countries, currencies, etc.")
15567 (description
15568 "@code{pycountry} provides the ISO databases for the standards:
15569 @enumerate
15570 @item 639-3 (Languages)
15571 @item 3166 (Countries)
15572 @item 3166-3 (Deleted Countries)
15573 @item 3166-2 (Subdivisions of countries)
15574 @item 4217 (Currencies)
15575 @item 15924 (Scripts)
15576 @end enumerate
15577 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
15578 through a Python API.")
15579 (license license:lgpl2.1+)))
15580
15581 (define-public python2-pycountry
15582 (package-with-python2 python-pycountry))
15583
15584 (define-public python-pycosat
15585 (package
15586 (name "python-pycosat")
15587 (version "0.6.3")
15588 (source
15589 (origin
15590 (method url-fetch)
15591 (uri (pypi-uri "pycosat" version ".zip"))
15592 (sha256
15593 (base32
15594 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
15595 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
15596 (build-system python-build-system)
15597 (native-inputs
15598 `(("unzip" ,unzip)))
15599 (home-page "https://github.com/ContinuumIO/pycosat")
15600 (synopsis "Bindings to picosat (a SAT solver)")
15601 (description
15602 "This package provides efficient Python bindings to @code{picosat} on
15603 the C level. When importing pycosat, the @code{picosat} solver becomes part
15604 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
15605 Problem} (SAT) solver.")
15606 (license license:expat)))
15607
15608 (define-public python2-pycosat
15609 (package-with-python2 python-pycosat))
15610
15611 (define-public python2-ruamel.ordereddict
15612 (package
15613 (name "python2-ruamel.ordereddict")
15614 (version "0.4.9")
15615 (source
15616 (origin
15617 (method url-fetch)
15618 (uri (pypi-uri "ruamel.ordereddict" version))
15619 (sha256
15620 (base32
15621 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
15622 (build-system python-build-system)
15623 (arguments
15624 `(#:python ,python-2
15625 #:phases
15626 (modify-phases %standard-phases
15627 (delete 'check)
15628 (add-after 'install 'check
15629 (lambda* (#:key inputs outputs #:allow-other-keys)
15630 (add-installed-pythonpath inputs outputs)
15631 (invoke "python" "test/testordereddict.py"))))))
15632 (home-page "https://bitbucket.org/ruamel/ordereddict")
15633 (synopsis "Version of dict that keeps keys in insertion order")
15634 (description
15635 "This is an implementation of an ordered dictionary with @dfn{Key
15636 Insertion Order} (KIO: updates of values do not affect the position of the
15637 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15638 removed and put at the back). The standard library module @code{OrderedDict},
15639 implemented later, implements a subset of @code{ordereddict} functionality.
15640 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15641 Order} (KSO, no sorting function can be specified, but a transform can be
15642 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15643 (license license:expat)))
15644
15645 (define-public python-pypeg2
15646 (package
15647 (name "python-pypeg2")
15648 (version "2.15.2")
15649 (source
15650 (origin
15651 (method url-fetch)
15652 (uri (pypi-uri "pyPEG2" version))
15653 (sha256
15654 (base32
15655 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15656 (build-system python-build-system)
15657 (propagated-inputs `(("python-lxml" ,python-lxml)))
15658 (arguments
15659 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15660 '(#:tests? #f))
15661 (home-page "https://fdik.org/pyPEG/")
15662 (synopsis "Parsing Expression Grammars in Python")
15663 (description "PyPEG is an intrinsic parser interpreter framework for
15664 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15665 parse many formal languages.")
15666 (license license:gpl2)))
15667
15668 (define-public python-incremental
15669 (package
15670 (name "python-incremental")
15671 (version "17.5.0")
15672 (source
15673 (origin
15674 (method url-fetch)
15675 (uri (pypi-uri "incremental" version))
15676 (sha256
15677 (base32
15678 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15679 (build-system python-build-system)
15680 (home-page "https://github.com/hawkowl/incremental")
15681 (synopsis "Library for versioning Python projects")
15682 (description "Incremental is a small library that versions your Python
15683 projects.")
15684 (license license:expat)))
15685
15686 (define-public python2-incremental
15687 (package-with-python2 python-incremental))
15688
15689 (define-public python-invoke
15690 (package
15691 (name "python-invoke")
15692 (home-page "https://www.pyinvoke.org/")
15693 (version "1.5.0")
15694 (source (origin
15695 (method url-fetch)
15696 (uri (pypi-uri "invoke" version))
15697 (sha256
15698 (base32
15699 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
15700 (build-system python-build-system)
15701 (arguments
15702 ;; XXX: Requires many dependencies that are not yet in Guix.
15703 `(#:tests? #f
15704 #:phases
15705 (modify-phases %standard-phases
15706 (add-after 'unpack 'fix-bash-path
15707 (lambda* (#:key inputs #:allow-other-keys)
15708 (let ((bash (assoc-ref inputs "bash")))
15709 (substitute* "invoke/config.py"
15710 (("shell = \"/bin/bash\"")
15711 (string-append "shell = \"" bash "/bin/bash\""))
15712 )
15713 #t))))))
15714 (inputs
15715 `(("bash" ,bash-minimal)))
15716 (synopsis "Pythonic task execution")
15717 (description
15718 "Invoke is a Python task execution tool and library, drawing inspiration
15719 from various sources to arrive at a powerful and clean feature set. It is
15720 evolved from the Fabric project, but focuses on local and abstract concerns
15721 instead of servers and network commands.")
15722 (license license:bsd-3)))
15723
15724 (define-public python2-invoke
15725 (package-with-python2 python-invoke))
15726
15727 (define-public python-automat
15728 (package
15729 (name "python-automat")
15730 (version "20.2.0")
15731 (source (origin
15732 (method url-fetch)
15733 (uri (pypi-uri "Automat" version))
15734 (sha256
15735 (base32
15736 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15737 (build-system python-build-system)
15738 ;; We disable the tests because they require python-twisted, while
15739 ;; python-twisted depends on python-automat. Twisted is optional, but the
15740 ;; tests fail if it is not available. Also see
15741 ;; <https://github.com/glyph/automat/issues/71>.
15742 (arguments '(#:tests? #f))
15743 (native-inputs
15744 `(("python-m2r" ,python-m2r)
15745 ("python-setuptools-scm" ,python-setuptools-scm)
15746 ("python-graphviz" ,python-graphviz)))
15747 (propagated-inputs
15748 `(("python-six" ,python-six)
15749 ("python-attrs" ,python-attrs)))
15750 (home-page "https://github.com/glyph/Automat")
15751 (synopsis "Self-service finite-state machines")
15752 (description "Automat is a library for concise, idiomatic Python
15753 expression of finite-state automata (particularly deterministic finite-state
15754 transducers).")
15755 (license license:expat)))
15756
15757 (define-public python2-automat
15758 (package-with-python2 python-automat))
15759
15760 (define-public python-m2r
15761 (package
15762 (name "python-m2r")
15763 (version "0.2.1")
15764 (source (origin
15765 (method url-fetch)
15766 (uri (pypi-uri "m2r" version))
15767 (sha256
15768 (base32
15769 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15770 (build-system python-build-system)
15771 (propagated-inputs
15772 `(("python-docutils" ,python-docutils)
15773 ("python-mistune" ,python-mistune)))
15774 (native-inputs
15775 `(("python-pygments" ,python-pygments)
15776 ("python-mock" ,python-mock)))
15777 (home-page "https://github.com/miyakogi/m2r")
15778 (synopsis "Markdown to reStructuredText converter")
15779 (description "M2R converts a markdown file including reST markups to valid
15780 reST format.")
15781 (license license:expat)))
15782
15783 (define-public python2-m2r
15784 (package-with-python2 python-m2r))
15785
15786 (define-public python-constantly
15787 (package
15788 (name "python-constantly")
15789 (version "15.1.0")
15790 (source (origin
15791 (method url-fetch)
15792 (uri (pypi-uri "constantly" version))
15793 (sha256
15794 (base32
15795 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15796 (build-system python-build-system)
15797 (home-page "https://github.com/twisted/constantly")
15798 (synopsis "Symbolic constants in Python")
15799 (description "Constantly is a Python library that provides symbolic
15800 constant support. It includes collections and constants with text, numeric,
15801 and bit flag values.")
15802 (license license:expat)))
15803
15804 (define-public python2-constantly
15805 (package-with-python2 python-constantly))
15806
15807 (define-public python-attrs
15808 (package
15809 (name "python-attrs")
15810 (version "19.3.0")
15811 (source (origin
15812 (method url-fetch)
15813 (uri (pypi-uri "attrs" version))
15814 (sha256
15815 (base32
15816 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15817 (build-system python-build-system)
15818 (arguments
15819 `(#:modules ((guix build utils)
15820 (guix build python-build-system)
15821 (ice-9 ftw)
15822 (srfi srfi-1)
15823 (srfi srfi-26))
15824 #:phases (modify-phases %standard-phases
15825 (replace 'check
15826 (lambda _
15827 (let ((cwd (getcwd)))
15828 (setenv "PYTHONPATH"
15829 (string-append
15830 cwd "/build/"
15831 (find (cut string-prefix? "lib" <>)
15832 (scandir (string-append cwd "/build")))
15833 ":"
15834 (getenv "PYTHONPATH")))
15835 (invoke "python" "-m" "pytest")))))))
15836 (native-inputs
15837 `(("python-coverage" ,python-coverage)
15838 ("python-hypothesis" ,python-hypothesis)
15839 ("python-pympler" ,python-pympler)
15840 ("python-pytest" ,python-pytest)
15841 ("python-six" ,python-six)
15842 ("python-sphinx" ,python-sphinx)
15843 ("python-zope-interface" ,python-zope-interface)))
15844 (home-page "https://github.com/python-attrs/attrs/")
15845 (synopsis "Attributes without boilerplate")
15846 (description "@code{attrs} is a Python package with class decorators that
15847 ease the chores of implementing the most common attribute-related object
15848 protocols.")
15849 (license license:expat)))
15850
15851 (define-public python2-attrs
15852 (package-with-python2 python-attrs))
15853
15854 (define-public python-attrs-bootstrap
15855 (package
15856 (inherit python-attrs)
15857 (name "python-attrs-bootstrap")
15858 (native-inputs `())
15859 (arguments `(#:tests? #f))))
15860
15861 (define-public python2-attrs-bootstrap
15862 (package-with-python2 python-attrs-bootstrap))
15863
15864 (define-public python2-cliapp
15865 (package
15866 (name "python2-cliapp")
15867 (version "1.20180812.1")
15868 (source
15869 (origin
15870 (method url-fetch)
15871 (uri (string-append
15872 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15873 version ".tar.gz"))
15874 (sha256
15875 (base32
15876 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15877 (build-system python-build-system)
15878 (arguments
15879 `(#:python ,python-2
15880 #:phases
15881 (modify-phases %standard-phases
15882 ;; check phase needs to be run before the build phase. If not,
15883 ;; coverage-test-runner looks for tests for the built source files,
15884 ;; and fails.
15885 (delete 'check)
15886 (add-before 'build 'check
15887 (lambda _
15888 ;; Disable python3 tests
15889 (substitute* "check"
15890 (("python3") "# python3"))
15891 (invoke "./check"))))))
15892 (native-inputs
15893 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15894 ("python2-pep8" ,python2-pep8)))
15895 (propagated-inputs
15896 `(("python2-pyaml" ,python2-pyaml)))
15897 (home-page "https://liw.fi/cliapp/")
15898 (synopsis "Python framework for command line programs")
15899 (description "@code{python2-cliapp} is a python framework for
15900 command line programs. It contains the typical stuff such programs
15901 need to do, such as parsing the command line for options, and
15902 iterating over input files.")
15903 (license license:gpl2+)))
15904
15905 (define-public python2-ttystatus
15906 (package
15907 (name "python2-ttystatus")
15908 (version "0.38")
15909 (source
15910 (origin
15911 (method git-fetch)
15912 (uri (git-reference
15913 (url "http://git.liw.fi/ttystatus")
15914 ;; There are no tags after ttystatus-0.36.
15915 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15916 (sha256
15917 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15918 (file-name (git-file-name name version))))
15919 (build-system python-build-system)
15920 (native-inputs
15921 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15922 ("python2-pep8" ,python2-pep8)))
15923 (arguments
15924 `(#:python ,python-2
15925 #:phases
15926 (modify-phases %standard-phases
15927 ;; check phase needs to be run before the build phase. If not,
15928 ;; coverage-test-runner looks for tests for the built source files,
15929 ;; and fails.
15930 (delete 'check)
15931 (add-before 'build 'check
15932 (lambda _ (invoke "make" "check"))))))
15933 (home-page "https://liw.fi/ttystatus/")
15934 (synopsis "Python library for showing progress reporting and
15935 status updates on terminals")
15936 (description "@code{python2-ttystatus} is a python library for
15937 showing progress reporting and status updates on terminals, for
15938 command line programs. Output is automatically adapted to the width
15939 of the terminal: truncated if it does not fit, and resized if the
15940 terminal size changes.")
15941 (license license:gpl3+)))
15942
15943 (define-public python2-tracing
15944 (package
15945 (name "python2-tracing")
15946 (version "0.10")
15947 (source
15948 (origin
15949 (method url-fetch)
15950 (uri (string-append
15951 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15952 version ".tar.gz"))
15953 (sha256
15954 (base32
15955 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15956 (build-system python-build-system)
15957 (arguments
15958 `(#:python ,python-2))
15959 (home-page "https://liw.fi/tracing/")
15960 (synopsis "Python debug logging helper")
15961 (description "@code{python2-tracing} is a python library for
15962 logging debug messages. It provides a way to turn debugging messages
15963 on and off, based on the filename they occur in. It is much faster
15964 than using @code{logging.Filter} to accomplish the same thing, which
15965 matters when code is run in production mode. The actual logging still
15966 happens using the @code{logging} library.")
15967 (license license:gpl3+)))
15968
15969 (define-public python2-larch
15970 (package
15971 (name "python2-larch")
15972 (version "1.20151025")
15973 (source
15974 (origin
15975 (method url-fetch)
15976 (uri (string-append
15977 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15978 version ".tar.gz"))
15979 (patches (search-patches
15980 "python2-larch-coverage-4.0a6-compatibility.patch"))
15981 (sha256
15982 (base32
15983 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15984 (build-system python-build-system)
15985 (arguments
15986 `(#:python ,python-2
15987 #:phases
15988 (modify-phases %standard-phases
15989 ;; check phase needs to be run before the build phase. If not,
15990 ;; coverage-test-runner looks for tests for the built source files,
15991 ;; and fails.
15992 (delete 'check)
15993 (add-before 'build 'check
15994 (lambda _ (invoke "make" "check"))))))
15995 (native-inputs
15996 `(("cmdtest" ,cmdtest)
15997 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15998 (propagated-inputs
15999 `(("python2-tracing" ,python2-tracing)))
16000 (home-page "https://liw.fi/larch/")
16001 (synopsis "Python copy-on-write B-tree library")
16002 (description "@code{python2-larch} is an implementation of
16003 particular kind of B-tree, based on research by Ohad Rodeh. See
16004 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
16005 on the data structure.
16006
16007 The distinctive feature of this B-tree is that a node is never
16008 (conceptually) modified. Instead, all updates are done by
16009 copy-on-write. This makes it easy to clone a tree, and modify only the
16010 clone, while other processes access the original tree.")
16011 (license license:gpl3+)))
16012
16013 (define-public python-astroid
16014 (package
16015 (name "python-astroid")
16016 (version "2.4.2")
16017 (source
16018 (origin
16019 (method url-fetch)
16020 (uri (pypi-uri "astroid" version))
16021 (sha256
16022 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
16023 (modules '((guix build utils)))
16024 (snippet
16025 '(begin
16026 ;; Check to see if the version pinning has been removed.
16027 (substitute* "astroid/__pkginfo__.py"
16028 (("==1\\.4\\.\\*") ">=1.4.0"))
16029 #t))))
16030 (build-system python-build-system)
16031 (propagated-inputs
16032 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
16033 ("python-six" ,python-six)
16034 ("python-wrapt" ,python-wrapt)))
16035 (native-inputs
16036 `(("python-dateutil" ,python-dateutil)
16037 ("python-pytest" ,python-pytest)
16038 ("python-pytest-runner" ,python-pytest-runner)))
16039 (home-page "https://github.com/PyCQA/astroid")
16040 (synopsis "Common base representation of python source code for pylint and
16041 other projects")
16042 (description "@code{python-astroid} provides a common base representation
16043 of python source code for projects such as pychecker, pyreverse, pylint, etc.
16044
16045 It provides a compatible representation which comes from the _ast module. It
16046 rebuilds the tree generated by the builtin _ast module by recursively walking
16047 down the AST and building an extended ast. The new node classes have
16048 additional methods and attributes for different usages. They include some
16049 support for static inference and local name scopes. Furthermore, astroid
16050 builds partial trees by inspecting living objects.")
16051 (license license:lgpl2.1+)
16052 (properties `((python2-variant . ,(delay python2-astroid))))))
16053
16054 (define-public python2-astroid
16055 (let ((base (package-with-python2
16056 (strip-python2-variant python-astroid))))
16057 (package (inherit base)
16058 ;; Version 2.x removes python2 support.
16059 (version "1.6.5")
16060 (source
16061 (origin
16062 (method url-fetch)
16063 (uri (pypi-uri "astroid" version))
16064 (sha256
16065 (base32
16066 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
16067 (arguments
16068 (substitute-keyword-arguments (package-arguments base)
16069 ((#:phases phases)
16070 `(modify-phases ,phases
16071 (add-after 'unpack 'remove-spurious-test
16072 (lambda _
16073 ;; https://github.com/PyCQA/astroid/issues/276
16074 (delete-file "astroid/tests/unittest_brain.py")
16075 #t))
16076 (replace 'check
16077 (lambda _
16078 (invoke"python" "-m" "unittest" "discover"
16079 "-p" "unittest*.py")))))))
16080 (native-inputs `())
16081 (propagated-inputs
16082 `(("python2-backports-functools-lru-cache"
16083 ,python2-backports-functools-lru-cache)
16084 ("python2-enum34" ,python2-enum34)
16085 ("python2-singledispatch" ,python2-singledispatch)
16086 ,@(alist-delete "python-typed-ast"
16087 (package-propagated-inputs base)))))))
16088
16089 (define-public python-isbnlib
16090 (package
16091 (name "python-isbnlib")
16092 (version "3.10.4")
16093 (source
16094 (origin
16095 (method url-fetch)
16096 (uri (pypi-uri "isbnlib" version))
16097 (sha256
16098 (base32
16099 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
16100 (build-system python-build-system)
16101 (arguments '(#:tests? #f)) ; No test
16102 (home-page "https://github.com/xlcnd/isbnlib")
16103 (synopsis "Python library to work with ISBN strings")
16104 (description "@code{python-isbnlib} is a (pure) python library that provides
16105 several useful methods and functions to validate, clean, transform, hyphenate and
16106 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
16107 version, is suitable to be include as a dependency in other projects.")
16108 (license license:lgpl3+)))
16109
16110 (define-public python-isort
16111 (package
16112 (name "python-isort")
16113 (version "4.3.4")
16114 (source
16115 (origin
16116 (method git-fetch)
16117 (uri (git-reference
16118 ;; Tests pass only from the Github sources
16119 (url "https://github.com/timothycrosley/isort")
16120 (commit version)))
16121 (file-name (git-file-name name version))
16122 (sha256
16123 (base32
16124 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
16125 (build-system python-build-system)
16126 (native-inputs
16127 `(("python-mock" ,python-mock)
16128 ("python-pytest" ,python-pytest)))
16129 (home-page "https://github.com/timothycrosley/isort")
16130 (synopsis "Python utility/library to sort python imports")
16131 (description "@code{python-isort} is a python utility/library to sort
16132 imports alphabetically, and automatically separated into sections. It
16133 provides a command line utility, a python library and plugins for various
16134 editors.")
16135 (license license:expat)
16136 (properties `((python2-variant . ,(delay python2-isort))))))
16137
16138 (define-public python2-isort
16139 (let ((base (package-with-python2
16140 (strip-python2-variant python-isort))))
16141 (package/inherit base
16142 (native-inputs
16143 `(("python2-futures" ,python2-futures)
16144 ,@(package-native-inputs base))))))
16145
16146 (define-public python2-backports-functools-lru-cache
16147 (package
16148 (name "python2-backports-functools-lru-cache")
16149 (version "1.6.1")
16150 (source
16151 (origin
16152 (method url-fetch)
16153 ;; only the pypi tarballs contain the necessary metadata
16154 (uri (pypi-uri "backports.functools_lru_cache" version))
16155 (sha256
16156 (base32
16157 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
16158 (build-system python-build-system)
16159 (native-inputs
16160 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
16161 (arguments
16162 `(#:python ,python-2))
16163 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
16164 (synopsis "Backport of functools.lru_cache from Python 3.3")
16165 (description "@code{python2-backports-functools-lru-cache} is a backport
16166 of @code{functools.lru_cache} from python 3.3.")
16167 (license license:expat)))
16168
16169 (define-public python-configparser
16170 (package
16171 (name "python-configparser")
16172 (version "4.0.2")
16173 (source
16174 (origin
16175 (method url-fetch)
16176 (uri (pypi-uri "configparser" version))
16177 (sha256
16178 (base32
16179 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
16180 (native-inputs
16181 `(("python-setuptools_scm" ,python-setuptools-scm)))
16182 (build-system python-build-system)
16183 (home-page "https://github.com/jaraco/configparser/")
16184 (synopsis "Backport of configparser from python 3.5")
16185 (description "@code{python-configparser} is a backport of
16186 @code{configparser} from Python 3.5 so that it can be used directly
16187 in other versions.")
16188 (license license:expat)))
16189
16190 (define-public python2-configparser
16191 (package-with-python2 python-configparser))
16192
16193 (define-public python-iniconfig
16194 (package
16195 (name "python-iniconfig")
16196 (version "1.1.1")
16197 (source
16198 (origin
16199 (method url-fetch)
16200 (uri (pypi-uri "iniconfig" version))
16201 (sha256
16202 (base32
16203 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
16204 (build-system python-build-system)
16205 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
16206 (synopsis "Simple INI-file parser")
16207 (description "The @code{iniconfig} package provides a small and simple
16208 INI-file parser module having a unique set of features; @code{iniconfig}
16209 @itemize
16210 @item maintains the order of sections and entries;
16211 @item supports multi-line values with or without line-continuations;
16212 @item supports \"#\" comments everywhere;
16213 @item raises errors with proper line-numbers;
16214 @item raises an error when two sections have the same name.
16215 @end itemize")
16216 (license license:expat)))
16217
16218 (define-public python-mamba
16219 (package
16220 (name "python-mamba")
16221 (version "0.11.2")
16222 (source (origin
16223 (method url-fetch)
16224 (uri (pypi-uri "mamba" version))
16225 (sha256
16226 (base32
16227 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
16228 (build-system python-build-system)
16229 (arguments `(#:tests? #f)) ; No test
16230 (propagated-inputs
16231 `(("python-clint" ,python-clint)
16232 ("python-coverage" ,python-coverage)))
16233 (home-page "https://nestorsalceda.com/mamba/")
16234 (synopsis "Test runner for Python")
16235 (description
16236 "Mamba is a Behaviour-Driven Development tool for Python developers.
16237 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
16238 (license license:expat)))
16239
16240 (define-public python-mando
16241 (package
16242 (name "python-mando")
16243 (version "0.6.4")
16244 (source (origin
16245 (method url-fetch)
16246 (uri (pypi-uri "mando" version))
16247 (sha256
16248 (base32
16249 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
16250 (build-system python-build-system)
16251 (propagated-inputs
16252 `(("python-rst2ansi" ,python-rst2ansi)
16253 ("python-six" ,python-six)))
16254 (native-inputs
16255 `(("python-pytest" ,python-pytest)))
16256 (home-page "https://mando.readthedocs.org/")
16257 (synopsis
16258 "Wrapper around argparse, allowing creation of complete CLI applications")
16259 (description
16260 "This package is a wrapper around argparse, allowing you to write complete CLI
16261 applications in seconds while maintaining all the flexibility.")
16262 (license license:expat)))
16263
16264 (define-public python2-mando
16265 (package-with-python2 python-mando))
16266
16267 (define-public python2-argparse
16268 (package
16269 (name "python2-argparse")
16270 (version "1.4.0")
16271 (source
16272 (origin
16273 (method url-fetch)
16274 (uri (pypi-uri "argparse" version))
16275 (sha256
16276 (base32
16277 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
16278 (build-system python-build-system)
16279 (arguments
16280 `(#:python ,python-2))
16281 (home-page "https://github.com/ThomasWaldmann/argparse/")
16282 (synopsis "Python command-line parsing library")
16283 (description
16284 "This package is mostly for people who want to have @code{argparse} on
16285 older Pythons because it was not part of the standard library back then.")
16286 (license license:psfl)))
16287
16288 (define-public python-fudge
16289 (package
16290 (name "python-fudge")
16291 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
16292 ;; package, which is currently the only use of this package.
16293 (version "0.9.6")
16294 (source
16295 (origin
16296 (method url-fetch)
16297 (uri (pypi-uri "fudge" version))
16298 (sha256
16299 (base32
16300 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
16301 (build-system python-build-system)
16302 (arguments
16303 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
16304 (home-page "https://github.com/fudge-py/fudge")
16305 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
16306 (description
16307 "Fudge is a Python module for using fake objects (mocks and stubs) to
16308 test real ones.
16309
16310 In readable Python code, you declare the methods available on your fake object
16311 and how they should be called. Then you inject that into your application and
16312 start testing. This declarative approach means you don’t have to record and
16313 playback actions and you don’t have to inspect your fakes after running code.
16314 If the fake object was used incorrectly then you’ll see an informative
16315 exception message with a traceback that points to the culprit.")
16316 (license license:expat)))
16317
16318 (define-public python2-fudge
16319 (package-with-python2 python-fudge))
16320
16321 (define-public python-mwclient
16322 (package
16323 (name "python-mwclient")
16324 (version "0.10.1")
16325 (source
16326 (origin
16327 (method git-fetch)
16328 ;; The PyPI version wouldn't contain tests.
16329 (uri (git-reference
16330 (url "https://github.com/mwclient/mwclient")
16331 (commit (string-append "v" version))))
16332 (file-name (git-file-name name version))
16333 (sha256
16334 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
16335 (build-system python-build-system)
16336 (propagated-inputs
16337 `(("python-requests-oauthlib" ,python-requests-oauthlib)
16338 ("python-six" ,python-six)))
16339 (native-inputs
16340 `(("python-mock" ,python-mock)
16341 ("python-pytest" ,python-pytest)
16342 ("python-pytest-cov" ,python-pytest-cov)
16343 ("python-pytest-runner" ,python-pytest-runner)
16344 ("python-responses" ,python-responses)))
16345 (home-page "https://github.com/btongminh/mwclient")
16346 (synopsis "MediaWiki API client")
16347 (description "This package provides a MediaWiki API client.")
16348 (license license:expat)))
16349
16350 (define-public python-utils
16351 (package
16352 (name "python-utils")
16353 (version "2.4.0")
16354 (source (origin
16355 (method url-fetch)
16356 (uri (pypi-uri "python-utils" version))
16357 (sha256
16358 (base32
16359 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
16360 (build-system python-build-system)
16361 (arguments
16362 `(#:phases
16363 (modify-phases %standard-phases
16364 (replace 'check
16365 (lambda* (#:key inputs outputs #:allow-other-keys)
16366 (add-installed-pythonpath inputs outputs)
16367 (delete-file "pytest.ini")
16368 (invoke "pytest" "-vv"))))))
16369 (native-inputs
16370 `(("pytest-runner" ,python-pytest-runner)
16371 ("pytest" ,python-pytest)
16372 ("six" ,python-six)))
16373 (home-page "https://github.com/WoLpH/python-utils")
16374 (synopsis "Convenient utilities not included with the standard Python install")
16375 (description
16376 "Python Utils is a collection of small Python functions and classes which
16377 make common patterns shorter and easier.")
16378 (license license:bsd-2)))
16379
16380 (define-public python-diff-match-patch
16381 (package
16382 (name "python-diff-match-patch")
16383 (version "20121119")
16384 (source
16385 (origin
16386 (method url-fetch)
16387 (uri (pypi-uri "diff-match-patch" version))
16388 (sha256
16389 (base32
16390 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
16391 (build-system python-build-system)
16392 (home-page "https://code.google.com/p/google-diff-match-patch")
16393 (synopsis "Synchronize plain text")
16394 (description "Diff Match and Patch libraries offer robust algorithms to
16395 perform the operations required for synchronizing plain text.")
16396 (license license:asl2.0)))
16397
16398 (define-public python2-diff-match-patch
16399 (package-with-python2 python-diff-match-patch))
16400
16401 (define-public python-dirsync
16402 (package
16403 (name "python-dirsync")
16404 (version "2.2.5")
16405 (source
16406 (origin
16407 (method url-fetch)
16408 (uri (pypi-uri "dirsync" version))
16409 (sha256
16410 (base32
16411 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
16412 (build-system python-build-system)
16413 (propagated-inputs
16414 `(("six" ,python-six)))
16415 (home-page "https://github.com/tkhyn/dirsync")
16416 (synopsis "Advanced directory tree synchronisation tool")
16417 (description "Advanced directory tree synchronisation tool.")
16418 (license license:expat)))
16419
16420 (define-public python2-dirsync
16421 (package-with-python2 python-dirsync))
16422
16423 (define-public python-levenshtein
16424 (package
16425 (name "python-levenshtein")
16426 (version "0.12.0")
16427 (source
16428 (origin
16429 (method url-fetch)
16430 (uri (pypi-uri "python-Levenshtein" version))
16431 (sha256
16432 (base32
16433 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
16434 (build-system python-build-system)
16435 (home-page "https://github.com/ztane/python-Levenshtein")
16436 (synopsis "Fast computation of Levenshtein distance and string similarity")
16437 (description
16438 "The Levenshtein Python C extension module contains functions for fast computation of
16439 @enumerate
16440 @item Levenshtein (edit) distance, and edit operations
16441 @item string similarity
16442 @item approximate median strings, and generally string averaging
16443 @item string sequence and set similarity
16444 @end enumerate
16445 It supports both normal and Unicode strings.")
16446 (license license:gpl2+)))
16447
16448 (define-public python2-levenshtein
16449 (package-with-python2 python-levenshtein))
16450
16451 (define-public python-scandir
16452 (package
16453 (name "python-scandir")
16454 (version "1.10.0")
16455 (source
16456 (origin
16457 (method url-fetch)
16458 (uri (pypi-uri "scandir" version))
16459 (sha256
16460 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
16461 (build-system python-build-system)
16462 (arguments
16463 `(#:phases (modify-phases %standard-phases
16464 (replace 'check
16465 (lambda _
16466 (invoke "python" "test/run_tests.py"))))))
16467 (home-page "https://github.com/benhoyt/scandir")
16468 (synopsis "Directory iteration function")
16469 (description
16470 "Directory iteration function like os.listdir(), except that instead of
16471 returning a list of bare filenames, it yields DirEntry objects that include
16472 file type and stat information along with the name. Using scandir() increases
16473 the speed of os.walk() by 2-20 times (depending on the platform and file
16474 system) by avoiding unnecessary calls to os.stat() in most cases.
16475
16476 This package is part of the Python standard library since version 3.5.")
16477 (license license:bsd-3)))
16478
16479 (define-public python2-scandir
16480 (package-with-python2 python-scandir))
16481
16482 (define-public python2-stemming
16483 (package
16484 (name "python2-stemming")
16485 (version "1.0.1")
16486 (source
16487 (origin
16488 (method url-fetch)
16489 (uri (pypi-uri "stemming" version))
16490 (sha256
16491 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
16492 (build-system python-build-system)
16493 (arguments
16494 `(#:python ,python-2))
16495 (home-page "https://bitbucket.org/mchaput/stemming/overview")
16496 (synopsis "Python implementations of various stemming algorithms")
16497 (description
16498 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
16499 stemming algorithms for English. These implementations are straightforward and
16500 efficient, unlike some Python versions of the same algorithms available on the
16501 Web. This package is an extraction of the stemming code included in the Whoosh
16502 search engine.")
16503 (license license:public-domain)))
16504
16505 (define-public python-factory-boy
16506 (package
16507 (name "python-factory-boy")
16508 (version "2.8.1")
16509 (source
16510 (origin
16511 (method url-fetch)
16512 (uri (pypi-uri "factory_boy" version))
16513 (sha256
16514 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
16515 (build-system python-build-system)
16516 (arguments
16517 ;; Tests are not included in the tarball.
16518 `(#:tests? #f))
16519 (propagated-inputs
16520 `(("faker" ,python-faker)))
16521 (home-page "https://github.com/benhoyt/scandir")
16522 (synopsis "Versatile test fixtures replacement")
16523 (description
16524 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
16525
16526 As a fixtures replacement tool, it aims to replace static, hard to maintain
16527 fixtures with easy-to-use factories for complex object.
16528
16529 Instead of building an exhaustive test setup with every possible combination
16530 of corner cases, factory_boy allows you to use objects customized for the
16531 current test, while only declaring the test-specific fields")
16532 (license license:expat)))
16533
16534 (define-public python2-factory-boy
16535 (package-with-python2 python-factory-boy))
16536
16537 (define-public python-translate-toolkit
16538 (package
16539 (name "python-translate-toolkit")
16540 (version "2.1.0")
16541 (source
16542 (origin
16543 (method url-fetch)
16544 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
16545 (sha256
16546 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
16547 (build-system python-build-system)
16548 (native-inputs
16549 `(("python-pytest" ,python-pytest)
16550 ("python-sphinx" ,python-sphinx)))
16551 (propagated-inputs
16552 `(("python-babel" ,python-babel)
16553 ("python-beautifulsoup4" ,python-beautifulsoup4)
16554 ("python-chardet" ,python-chardet)
16555 ("python-diff-match-patch" ,python-diff-match-patch)
16556 ("python-levenshtein" ,python-levenshtein)
16557 ("python-lxml" ,python-lxml)
16558 ("python-six" ,python-six)
16559 ("python-vobject" ,python-vobject)
16560 ("python-pyyaml" ,python-pyyaml)))
16561 (arguments
16562 ;; TODO: tests are not run, because they end with
16563 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
16564 ;; 'parse_funcs'
16565 ;; during test setup.
16566 `(#:tests? #f))
16567 (home-page "https://toolkit.translatehouse.org")
16568 (synopsis "Tools and API for translation and localization engineering")
16569 (description
16570 "Tools and API for translation and localization engineering. It contains
16571 several utilities, as well as an API for building localization tools.")
16572 (license license:gpl2+)))
16573
16574 (define-public python2-translate-toolkit
16575 (package-with-python2 python-translate-toolkit))
16576
16577 (define-public python-packaging
16578 (package
16579 (name "python-packaging")
16580 (version "20.0")
16581 (source
16582 (origin
16583 (method url-fetch)
16584 (uri (pypi-uri "packaging" version))
16585 ;; XXX: The URL in the patch file is wrong, it should be
16586 ;; <https://github.com/pypa/packaging/pull/256>.
16587 (patches (search-patches "python-packaging-test-arch.patch"))
16588 (sha256
16589 (base32
16590 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
16591 (build-system python-build-system)
16592 (arguments
16593 `(#:phases (modify-phases %standard-phases
16594 (replace 'check
16595 (lambda* (#:key tests? #:allow-other-keys)
16596 (if tests?
16597 (invoke "py.test" "-vv")
16598 (format #t "test suite not run~%"))
16599 #t)))))
16600 (native-inputs
16601 `(("python-pretend" ,python-pretend)
16602 ("python-pytest" ,python-pytest)))
16603 (propagated-inputs
16604 `(("python-pyparsing" ,python-pyparsing)
16605 ("python-six" ,python-six)))
16606 (home-page "https://github.com/pypa/packaging")
16607 (synopsis "Core utilities for Python packages")
16608 (description "Packaging is a Python module for dealing with Python packages.
16609 It offers an interface for working with package versions, names, and dependency
16610 information.")
16611 ;; From 'LICENSE': This software is made available under the terms of
16612 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
16613 ;; Contributions to this software is made under the terms of *both* these
16614 ;; licenses.
16615 (license (list license:asl2.0 license:bsd-2))))
16616
16617 (define-public python2-packaging
16618 (package-with-python2 python-packaging))
16619
16620 ;; Variants with minimal dependencies, for bootstrapping Pytest.
16621 (define-public python-packaging-bootstrap
16622 (hidden-package
16623 (package/inherit
16624 python-packaging
16625 (name "python-packaging-bootstrap")
16626 (native-inputs '())
16627 (propagated-inputs
16628 `(("python-pyparsing" ,python-pyparsing)))
16629 (arguments '(#:tests? #f)))))
16630
16631 (define-public python2-packaging-bootstrap
16632 (hidden-package
16633 (package/inherit
16634 python2-packaging
16635 (name "python2-packaging-bootstrap")
16636 (native-inputs '())
16637 (propagated-inputs
16638 `(("python-pyparsing" ,python2-pyparsing)))
16639 (arguments
16640 `(#:tests? #f
16641 ,@(package-arguments python2-packaging))))))
16642
16643 (define-public python-relatorio
16644 (package
16645 (name "python-relatorio")
16646 (version "0.8.0")
16647 (source
16648 (origin
16649 (method url-fetch)
16650 (uri (pypi-uri "relatorio" version))
16651 (sha256
16652 (base32
16653 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16654 (build-system python-build-system)
16655 (propagated-inputs
16656 `(("python-lxml" ,python-lxml)
16657 ("python-genshi" ,python-genshi)))
16658 (native-inputs
16659 `(("python-magic" ,python-magic)))
16660 (home-page "https://relatorio.tryton.org/")
16661 (synopsis "Templating library able to output ODT and PDF files")
16662 (description "Relatorio is a templating library which provides a way to
16663 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16664 for more filetypes can be easily added by creating plugins for them.")
16665 (license license:gpl3+)))
16666
16667 (define-public python2-relatorio
16668 (package-with-python2 python-relatorio))
16669
16670 (define-public python-radon
16671 (package
16672 (name "python-radon")
16673 (version "4.1.0")
16674 (source
16675 (origin
16676 (method url-fetch)
16677 (uri (pypi-uri "radon" version))
16678 (sha256
16679 (base32
16680 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
16681 (build-system python-build-system)
16682 (arguments
16683 `(#:phases (modify-phases %standard-phases
16684 (replace 'check
16685 (lambda _
16686 (invoke "python" "radon/tests/run.py"))))))
16687 (propagated-inputs
16688 `(("python-colorama" ,python-colorama)
16689 ("python-flake8-polyfill" ,python-flake8-polyfill)
16690 ("python-mando" ,python-mando)))
16691 (native-inputs
16692 `(("python-pytest" ,python-pytest)
16693 ("python-pytest-mock" ,python-pytest-mock)))
16694 (home-page "https://radon.readthedocs.org/")
16695 (synopsis "Code Metrics in Python")
16696 (description "Radon is a Python tool which computes various code metrics.
16697 Supported metrics are:
16698 @itemize @bullet
16699 @item raw metrics: SLOC, comment lines, blank lines, &c.
16700 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16701 @item Halstead metrics (all of them)
16702 @item the Maintainability Index (a Visual Studio metric)
16703 @end itemize")
16704 (properties `((python2-variant . ,(delay python2-radon))))
16705 (license license:expat)))
16706
16707 (define-public python2-radon
16708 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16709 (package/inherit base
16710 (propagated-inputs
16711 `(("python-configparser" ,python2-configparser)
16712 ("python-future" ,python2-future)
16713 ,@(package-propagated-inputs base))))))
16714
16715 (define-public python-sure
16716 (package
16717 (name "python-sure")
16718 (version "1.4.11")
16719 (source
16720 (origin
16721 (method url-fetch)
16722 (uri (pypi-uri "sure" version))
16723 (sha256
16724 (base32
16725 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16726 (build-system python-build-system)
16727 (propagated-inputs
16728 `(("python-mock" ,python-mock)
16729 ("python-six" ,python-six)))
16730 (native-inputs
16731 `(("python-nose" ,python-nose)))
16732 (home-page "https://github.com/gabrielfalcao/sure")
16733 (synopsis "Automated testing library in python for python")
16734 (description
16735 "Sure is a python library that leverages a DSL for writing assertions.
16736 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16737 (license license:gpl3+)))
16738
16739 (define-public python2-sure
16740 (package-with-python2 python-sure))
16741
16742 (define-public python2-couleur
16743 ;; This package does not seem to support python3 at all, hence,
16744 ;; only the python2 variant definition is provided.
16745 (package
16746 (name "python2-couleur")
16747 (version "0.6.2")
16748 (source
16749 (origin
16750 (method url-fetch)
16751 (uri (pypi-uri "couleur" version))
16752 (sha256
16753 (base32
16754 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16755 (build-system python-build-system)
16756 (arguments
16757 `(#:python ,python-2))
16758 (home-page "https://github.com/gabrielfalcao/couleur")
16759 (synopsis
16760 "ANSI terminal tool for python, colored shell and other handy fancy features")
16761 (description
16762 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16763 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16764 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16765 ;; https://github.com/gabrielfalcao/couleur/issues/11
16766 (license license:lgpl3+)))
16767
16768 (define-public python-misaka
16769 (package
16770 (name "python-misaka")
16771 (version "2.1.1")
16772 (source
16773 (origin
16774 (method url-fetch)
16775 (uri (pypi-uri "misaka" version))
16776 (sha256
16777 (base32
16778 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16779 (build-system python-build-system)
16780 (arguments
16781 `(;; Line 37 of setup.py calls self.run_command('develop')
16782 ;; in the 'check' phase. This command seems to be trying
16783 ;; to write to
16784 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16785 ;; for which it does not have the permission to write.
16786 #:tests? #f))
16787 (propagated-inputs
16788 `(("python-cffi" ,python-cffi)))
16789 (home-page "https://github.com/FSX/misaka")
16790 (synopsis "Python binding for Hoedown")
16791 (description
16792 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16793 library written in C. It features a fast HTML renderer and functionality to make custom
16794 renderers (e.g. man pages or LaTeX).")
16795 (license license:expat)))
16796
16797 (define-public python2-misaka
16798 (package-with-python2 python-misaka))
16799
16800 (define-public python2-steadymark
16801 ;; This is forced into being a python2 only variant
16802 ;; due to its dependence on couleur that has no support
16803 ;; for python3
16804 (package
16805 (name "python2-steadymark")
16806 (version "0.7.3")
16807 (source
16808 (origin
16809 (method url-fetch)
16810 (uri (pypi-uri "steadymark" version))
16811 (sha256
16812 (base32
16813 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16814 (build-system python-build-system)
16815 (native-inputs
16816 `(("python-couleur" ,python2-couleur)
16817 ("python-sure" ,python2-sure)
16818 ("python-misaka" ,python2-misaka)))
16819 (arguments
16820 `(#:python ,python-2
16821 #:phases
16822 (modify-phases %standard-phases
16823 (add-before 'build 'patch-setup-py
16824 (lambda _
16825 ;; Update requirements from dependency==version
16826 ;; to dependency>=version
16827 (substitute* "setup.py"
16828 (("==") ">="))
16829 #t)))))
16830 (home-page "https://github.com/gabrielfalcao/steadymark")
16831 (synopsis "Markdown-based test runner for python")
16832 (description
16833 "@code{Steadymark} allows documentation to be written in github-flavoured
16834 markdown. The documentation may contain snippets of code surrounded by python
16835 code blocks and @code{Steadymark} will find these snippets and run them, making
16836 sure that there are no old malfunctional examples in the documentation examples.")
16837 (license license:expat)))
16838
16839 (define-public python-jsonpointer
16840 (package
16841 (name "python-jsonpointer")
16842 (version "1.10")
16843 (source
16844 (origin
16845 (method url-fetch)
16846 (uri (pypi-uri "jsonpointer" version))
16847 (sha256
16848 (base32
16849 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16850 (build-system python-build-system)
16851 (home-page "https://github.com/stefankoegl/python-json-pointer")
16852 (synopsis "Identify specific nodes in a JSON document")
16853 (description "@code{jsonpointer} allows you to access specific nodes
16854 by path in a JSON document (see RFC 6901).")
16855 (license license:bsd-3)))
16856
16857 (define-public python2-jsonpointer
16858 (package-with-python2 python-jsonpointer))
16859
16860 (define-public python-jsonpatch
16861 (package
16862 (name "python-jsonpatch")
16863 (version "1.16")
16864 (source
16865 (origin
16866 (method git-fetch)
16867 ;; pypi version lacks tests.js
16868 (uri (git-reference
16869 (url "https://github.com/stefankoegl/python-json-patch")
16870 (commit (string-append "v" version))))
16871 (file-name (git-file-name name version))
16872 (sha256
16873 (base32
16874 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16875 (build-system python-build-system)
16876 (propagated-inputs
16877 `(("python-jsonpointer" ,python-jsonpointer)))
16878 (home-page "https://github.com/stefankoegl/python-json-patch")
16879 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16880 (description "@code{jsonpatch} is a library and program that allows
16881 applying JSON Patches according to RFC 6902.")
16882 (license license:bsd-3)))
16883
16884 (define-public python2-jsonpatch
16885 (package-with-python2 python-jsonpatch))
16886
16887 (define-public python-jsonpatch-0.4
16888 (package (inherit python-jsonpatch)
16889 (name "python-jsonpatch")
16890 (version "0.4")
16891 (source
16892 (origin
16893 (method git-fetch)
16894 (uri (git-reference
16895 (url "https://github.com/stefankoegl/python-json-patch")
16896 (commit (string-append "v" version))))
16897 (file-name (git-file-name name version))
16898 (sha256
16899 (base32
16900 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16901
16902 (define-public python2-jsonpatch-0.4
16903 (package-with-python2 python-jsonpatch-0.4))
16904
16905 (define-public python-rfc3986
16906 (package
16907 (name "python-rfc3986")
16908 (version "1.4.0")
16909 (source (origin
16910 (method url-fetch)
16911 (uri (pypi-uri "rfc3986" version))
16912 (sha256
16913 (base32
16914 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16915 (build-system python-build-system)
16916 (arguments
16917 `(#:modules ((guix build utils)
16918 (guix build python-build-system)
16919 (ice-9 ftw)
16920 (srfi srfi-1)
16921 (srfi srfi-26))
16922 #:phases
16923 (modify-phases %standard-phases
16924 (replace 'check
16925 (lambda _
16926 (let ((cwd (getcwd)))
16927 (setenv "PYTHONPATH"
16928 (string-append cwd "/build/"
16929 (find (cut string-prefix? "lib" <>)
16930 (scandir (string-append cwd "/build")))
16931 ":"
16932 (getenv "PYTHONPATH")))
16933 (invoke "pytest" "-v")))))))
16934 (native-inputs
16935 `(("python-pytest" ,python-pytest)))
16936 (home-page "https://rfc3986.readthedocs.io/")
16937 (synopsis "Parse and validate URI references")
16938 (description
16939 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16940 validation and authority parsing. This module also supports RFC@tie{}6874
16941 which adds support for zone identifiers to IPv6 addresses.")
16942 (license license:asl2.0)))
16943
16944 (define-public python2-rfc3986
16945 (package-with-python2 python-rfc3986))
16946
16947 (define-public python-rfc3987
16948 (package
16949 (name "python-rfc3987")
16950 (version "1.3.7")
16951 (source
16952 (origin
16953 (method url-fetch)
16954 (uri (pypi-uri "rfc3987" version))
16955 (sha256
16956 (base32
16957 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16958 (build-system python-build-system)
16959 (home-page "https://pypi.org/project/rfc3987/")
16960 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16961 (description "@code{rfc3987} provides routines for parsing and
16962 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16963 (license license:gpl3+)))
16964
16965 (define-public python2-rfc3987
16966 (package-with-python2 python-rfc3987))
16967
16968 ;; The latest commit contains fixes for building with both python3 and python2.
16969 (define-public python-rfc6555
16970 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16971 (revision "1"))
16972 (package
16973 (name "python-rfc6555")
16974 (version (git-version "0.0.0" revision commit))
16975 (source (origin
16976 (method git-fetch)
16977 (uri (git-reference
16978 (url "https://github.com/sethmlarson/rfc6555")
16979 (commit commit)))
16980 (file-name (git-file-name name version))
16981 (sha256
16982 (base32
16983 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16984 (build-system python-build-system)
16985 (arguments
16986 '(#:phases
16987 (modify-phases %standard-phases
16988 (replace 'check
16989 (lambda* (#:key tests? #:allow-other-keys)
16990 (if tests?
16991 ;; Other tests require network access.
16992 (invoke "pytest" "tests/test_ipv6.py")
16993 #t))))))
16994 (native-inputs
16995 `(("python-pytest" ,python-pytest)))
16996 (home-page "https://pypi.org/project/rfc6555/")
16997 (synopsis "Python implementation of RFC 6555")
16998 (description
16999 "Python implementation of the Happy Eyeballs Algorithm described in RFC
17000 6555. Provided with a single file and dead-simple API to allow easy vendoring
17001 and integration into other projects.")
17002 (properties `((python2-variant . ,(delay python2-rfc6555))))
17003 (license license:asl2.0))))
17004
17005 (define-public python2-rfc6555
17006 (let ((base (package-with-python2
17007 (strip-python2-variant python-rfc6555))))
17008 (package/inherit base
17009 (propagated-inputs
17010 `(("python2-selectors2" ,python2-selectors2))))))
17011
17012 (define-public python-bagit
17013 (package
17014 (name "python-bagit")
17015 (version "1.7.0")
17016 (source
17017 (origin
17018 (method url-fetch)
17019 (uri (pypi-uri "bagit" version))
17020 (sha256
17021 (base32
17022 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
17023 (build-system python-build-system)
17024 (native-inputs
17025 `(("python-setuptools-scm" ,python-setuptools-scm)
17026 ("python-coverage" ,python-coverage)
17027 ("python-mock" ,python-mock)))
17028 (home-page "https://libraryofcongress.github.io/bagit-python/")
17029 (synopsis "Create and validate BagIt packages")
17030 (description "Bagit is a Python library and command line utility for working
17031 with BagIt style packages. BagIt is a minimalist packaging format for digital
17032 preservation.")
17033 (license license:cc0)))
17034
17035 (define-public python-prov
17036 (package
17037 (name "python-prov")
17038 (version "2.0.0")
17039 (source
17040 (origin
17041 (method url-fetch)
17042 (uri (pypi-uri "prov" version))
17043 (sha256
17044 (base32
17045 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
17046 (build-system python-build-system)
17047 (propagated-inputs
17048 `(("python-dateutil" ,python-dateutil)
17049 ("python-lxml" ,python-lxml)
17050 ("python-networkx" ,python-networkx)
17051 ("python-rdflib" ,python-rdflib)))
17052 (native-inputs
17053 `(("graphviz" ,graphviz)
17054 ("python-pydot" ,python-pydot)))
17055 (home-page "https://github.com/trungdong/prov")
17056 (synopsis
17057 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
17058 (description
17059 "This package provides a library for W3C Provenance Data Model supporting
17060 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
17061 (license license:expat)))
17062
17063 (define-public python-arcp
17064 (package
17065 (name "python-arcp")
17066 (version "0.2.1")
17067 (source
17068 (origin
17069 (method url-fetch)
17070 (uri (pypi-uri "arcp" version))
17071 (sha256
17072 (base32
17073 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
17074 (build-system python-build-system)
17075 (native-inputs
17076 `(("python-pytest" ,python-pytest)))
17077 (home-page "http://arcp.readthedocs.io/")
17078 (synopsis
17079 "Archive and Package URI parser and generator")
17080 (description
17081 "@acronym{arcp, Archive and Package} provides functions for creating
17082 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
17083 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
17084 consume or reference hypermedia resources bundled inside a file archive or an
17085 application package, as well as to resolve URIs for archive resources within a
17086 programmatic framework. This URI scheme provides mechanisms to generate a
17087 unique base URI to represent the root of the archive, so that relative URI
17088 references in a bundled resource can be resolved within the archive without
17089 having to extract the archive content on the local file system. An arcp URI can
17090 be used for purposes of isolation (e.g. when consuming multiple archives),
17091 security constraints (avoiding \"climb out\" from the archive), or for
17092 externally identiyfing sub-resources referenced by hypermedia formats.")
17093 (license license:asl2.0)))
17094
17095 (define-public python-shellescape
17096 (package
17097 (name "python-shellescape")
17098 (version "3.8.1")
17099 (source
17100 (origin
17101 (method git-fetch)
17102 (uri (git-reference
17103 (url "https://github.com/chrissimpkins/shellescape")
17104 (commit (string-append "v" version))))
17105 (file-name (git-file-name name version))
17106 (sha256
17107 (base32
17108 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
17109 (build-system python-build-system)
17110 (arguments
17111 '(#:phases
17112 (modify-phases %standard-phases
17113 (replace 'check
17114 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
17115 (when tests?
17116 (add-installed-pythonpath inputs outputs)
17117 (invoke "python" "tests/test_shellescape.py"))
17118 #t)))))
17119 (native-inputs
17120 `(("python-pytest" ,python-pytest)))
17121 (home-page "https://github.com/chrissimpkins/shellescape")
17122 (synopsis
17123 "Shell escape a string to safely use it as a token in a shell command")
17124 (description
17125 "The shellescape Python module defines the @code{shellescape.quote()}
17126 function that returns a shell-escaped version of a Python string. This is a
17127 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
17128 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
17129 (license license:expat)))
17130
17131 (define-public python-validators
17132 (package
17133 (name "python-validators")
17134 (version "0.14.2")
17135 (source (origin
17136 (method url-fetch)
17137 (uri (pypi-uri "validators" version))
17138 (sha256
17139 (base32
17140 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
17141 (build-system python-build-system)
17142 (arguments
17143 '(#:phases (modify-phases %standard-phases
17144 (replace 'check
17145 (lambda _
17146 (invoke "pytest" "-vv"))))))
17147 (propagated-inputs
17148 `(("python-decorator" ,python-decorator)
17149 ("python-six" ,python-six)))
17150 (native-inputs
17151 `(("python-flake8" ,python-flake8)
17152 ("python-isort" ,python-isort)
17153 ("python-pytest" ,python-pytest)))
17154 (home-page "https://github.com/kvesteri/validators")
17155 (synopsis "Data validation library")
17156 (description
17157 "This package contains validators for different things such as email
17158 addresses, IP addresses, URLs, hashes and more. It has been designed to
17159 be easy to use and not require defining a schema or form just to validate
17160 some input.")
17161 (license license:expat)))
17162
17163 (define-public python2-validators
17164 (package-with-python2 python-validators))
17165
17166 (define-public python-validate-email
17167 (package
17168 (name "python-validate-email")
17169 (version "1.3")
17170 (source
17171 (origin
17172 (method url-fetch)
17173 (uri (pypi-uri "validate_email" version))
17174 (sha256
17175 (base32
17176 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
17177 (build-system python-build-system)
17178 (home-page "https://github.com/syrusakbary/validate_email")
17179 (synopsis "Verifies if an email address is valid and really exists")
17180 (description "@code{validate_email} can be used to verify if an email
17181 address is valid and really exists.")
17182 (license license:lgpl3+)))
17183
17184 (define-public python2-validate-email
17185 (package-with-python2 python-validate-email))
17186
17187 (define-public python-flex
17188 (package
17189 (name "python-flex")
17190 (version "6.10.0")
17191 (source
17192 (origin
17193 (method url-fetch)
17194 (uri (pypi-uri "flex" version))
17195 (sha256
17196 (base32
17197 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
17198 (build-system python-build-system)
17199 (propagated-inputs
17200 `(("python-click" ,python-click)
17201 ("python-iso8601" ,python-iso8601)
17202 ("python-jsonpointer" ,python-jsonpointer)
17203 ("python-pyyaml" ,python-pyyaml)
17204 ("python-requests" ,python-requests)
17205 ("python-rfc3987" ,python-rfc3987)
17206 ("python-six" ,python-six)
17207 ("python-validate-email" ,python-validate-email)))
17208 (home-page "https://github.com/pipermerriam/flex")
17209 (synopsis "Validates Swagger schemata")
17210 (description "@code{flex} can be used to validate Swagger schemata.")
17211 (license license:bsd-3)))
17212
17213 (define-public python2-flex
17214 (package-with-python2 python-flex))
17215
17216 (define-public python-marshmallow
17217 (package
17218 (name "python-marshmallow")
17219 (version "3.9.1")
17220 (source
17221 (origin
17222 (method url-fetch)
17223 (uri (pypi-uri "marshmallow" version))
17224 (sha256
17225 (base32
17226 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
17227 (build-system python-build-system)
17228 (propagated-inputs
17229 `(("python-dateutil" ,python-dateutil)
17230 ("python-simplejson" ,python-simplejson)))
17231 (native-inputs
17232 `(("python-pytest" ,python-pytest)
17233 ("python-pytz" ,python-pytz)))
17234 (home-page "https://github.com/marshmallow-code/marshmallow")
17235 (synopsis "Convert complex datatypes to and from native
17236 Python datatypes.")
17237 (description "@code{marshmallow} provides a library for converting
17238 complex datatypes to and from native Python datatypes.")
17239 (license license:expat)))
17240
17241 (define-public python-apispec
17242 (package
17243 (name "python-apispec")
17244 (version "4.0.0")
17245 (source
17246 (origin
17247 (method url-fetch)
17248 (uri (pypi-uri "apispec" version))
17249 (sha256
17250 (base32
17251 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
17252 (build-system python-build-system)
17253 (arguments
17254 '(#:phases (modify-phases %standard-phases
17255 (add-after 'unpack 'disable-prance-tests
17256 (lambda _
17257 ;; Disable validation tests since they require the
17258 ;; optional 'prance' library which is not yet in Guix.
17259 (substitute* "tests/test_ext_marshmallow_openapi.py"
17260 (("def test_openapi_tools_validate.*" all)
17261 (string-append "@pytest.mark.xfail\n" all)))))
17262 (replace 'check
17263 (lambda _
17264 (setenv "PYTHONPATH"
17265 (string-append "./build/lib:"
17266 (getenv "PYTHONPATH")))
17267 (invoke "pytest" "-vv"))))))
17268 (propagated-inputs
17269 `(("python-pyyaml" ,python-pyyaml)))
17270 (native-inputs
17271 `(("python-pytest" ,python-pytest)
17272 ("python-marshmallow" ,python-marshmallow)))
17273 (home-page "https://github.com/marshmallow-code/apispec")
17274 (synopsis "Swagger/OpenAPI specification generator")
17275 (description "@code{python-apispec} is a pluggable API specification
17276 generator. It currently supports the OpenAPI specification, formerly known
17277 as Swagger.")
17278 (license license:expat)))
17279
17280 (define-public python-flasgger
17281 (package
17282 (name "python-flasgger")
17283 (version "0.6.3")
17284 (source
17285 (origin
17286 (method git-fetch)
17287 (uri (git-reference
17288 (url "https://github.com/rochacbruno/flasgger")
17289 (commit version)))
17290 (file-name (git-file-name name version))
17291 (sha256
17292 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
17293 (build-system python-build-system)
17294 (arguments
17295 `(#:phases
17296 (modify-phases %standard-phases
17297 (replace 'check
17298 (lambda* (#:key inputs outputs #:allow-other-keys)
17299 (substitute* "Makefile"
17300 (("flake8 flasgger --ignore=F403")
17301 "flake8 flasgger --ignore=E731,F403"))
17302 (setenv "PYTHONPATH" (string-append (getcwd)
17303 ":"
17304 (getenv "PYTHONPATH")))
17305 (invoke "py.test"))))))
17306 (propagated-inputs
17307 `(("python-flask" ,python-flask)
17308 ("python-pyyaml" ,python-pyyaml)
17309 ("python-jsonschema" ,python-jsonschema)
17310 ("python-mistune" ,python-mistune)
17311 ("python-six" ,python-six)))
17312 (native-inputs
17313 `(("python-decorator" ,python-decorator)
17314 ("python-flake8" ,python-flake8)
17315 ("python-flask-restful" ,python-flask-restful)
17316 ("python-flex" ,python-flex)
17317 ("python-pytest" ,python-pytest)
17318 ("python-pytest-cov" ,python-pytest-cov)
17319 ("python-marshmallow" ,python-marshmallow)
17320 ("python-apispec" ,python-apispec)))
17321 (home-page "https://github.com/rochacbruno/flasgger/")
17322 (synopsis "Extract Swagger specs from your Flask project")
17323 (description "@code{python-flasgger} allows extracting Swagger specs
17324 from your Flask project. It is a fork of Flask-Swagger.")
17325 (license license:expat)))
17326
17327 (define-public python-swagger-spec-validator
17328 (package
17329 (name "python-swagger-spec-validator")
17330 (version "2.4.3")
17331 (source
17332 (origin
17333 (method url-fetch)
17334 (uri (pypi-uri "swagger-spec-validator" version))
17335 (sha256
17336 (base32
17337 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
17338 (build-system python-build-system)
17339 (propagated-inputs
17340 `(("python-jsonschema" ,python-jsonschema)
17341 ("python-pyyaml" ,python-pyyaml)
17342 ("python-six" ,python-six)))
17343 (home-page
17344 "https://github.com/Yelp/swagger_spec_validator")
17345 (synopsis "Validation of Swagger specifications")
17346 (description "@code{swagger_spec_validator} provides a library for
17347 validating Swagger API specifications.")
17348 (license license:asl2.0)))
17349
17350 (define-public python2-swagger-spec-validator
17351 (package-with-python2 python-swagger-spec-validator))
17352
17353 (define-public python-apache-libcloud
17354 (package
17355 (name "python-apache-libcloud")
17356 (version "3.1.0")
17357 (source
17358 (origin
17359 (method url-fetch)
17360 (uri (pypi-uri "apache-libcloud" version))
17361 (sha256
17362 (base32
17363 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
17364 (build-system python-build-system)
17365 (arguments
17366 `(#:phases
17367 (modify-phases %standard-phases
17368 (add-after 'unpack 'patch-ssh
17369 (lambda* (#:key inputs #:allow-other-keys)
17370 (substitute* "libcloud/compute/ssh.py"
17371 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
17372 "/bin/ssh" "'")))
17373 #t))
17374 (add-after 'unpack 'patch-tests
17375 (lambda _
17376 (substitute* "libcloud/test/compute/test_ssh_client.py"
17377 (("class ShellOutSSHClientTests")
17378 "@unittest.skip(\"Guix container doesn't have ssh service\")
17379 class ShellOutSSHClientTests"))
17380 #t))
17381 (add-before 'check 'copy-secret
17382 (lambda _
17383 (copy-file "libcloud/test/secrets.py-dist"
17384 "libcloud/test/secrets.py")
17385 #t)))))
17386 (inputs
17387 `(("openssh" ,openssh)))
17388 (propagated-inputs
17389 `(("python-paramiko" ,python-paramiko)
17390 ("python-requests" ,python-requests)))
17391 (native-inputs
17392 `(("python-lockfile" ,python-lockfile)
17393 ("python-mock" ,python-mock)
17394 ("python-pytest" ,python-pytest)
17395 ("python-pytest-runner" ,python-pytest-runner)
17396 ("python-requests-mock" ,python-requests-mock)))
17397 (home-page "https://libcloud.apache.org/")
17398 (synopsis "Unified Cloud API")
17399 (description "@code{libcloud} is a Python library for interacting with
17400 many of the popular cloud service providers using a unified API.")
17401 (license license:asl2.0)))
17402
17403 (define-public python-smmap
17404 (package
17405 (name "python-smmap")
17406 (version "3.0.1")
17407 (source
17408 (origin
17409 (method url-fetch)
17410 (uri (pypi-uri "smmap" version))
17411 (sha256
17412 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
17413 (build-system python-build-system)
17414 (native-inputs
17415 `(("python-nosexcover" ,python-nosexcover)))
17416 (home-page "https://github.com/Byron/smmap")
17417 (synopsis "Python sliding window memory map manager")
17418 (description "@code{smmap} is a pure Python implementation of a sliding
17419 window memory map manager.")
17420 (license license:bsd-3)))
17421
17422 (define-public python-smmap2
17423 (deprecated-package "python-smmap2" python-smmap))
17424
17425 (define-public python2-smmap
17426 (package-with-python2 python-smmap))
17427
17428 (define-public python2-smmap2
17429 (deprecated-package "python2-smmap2" python2-smmap))
17430
17431 (define-public python-regex
17432 (package
17433 (name "python-regex")
17434 (version "2020.6.8")
17435 (source (origin
17436 (method url-fetch)
17437 (uri (pypi-uri "regex" version))
17438 (sha256
17439 (base32
17440 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
17441 (build-system python-build-system)
17442 (arguments
17443 '(#:phases
17444 (modify-phases %standard-phases
17445 (replace 'check
17446 (lambda* (#:key inputs outputs #:allow-other-keys)
17447 (add-installed-pythonpath inputs outputs)
17448 (invoke "python" "-c"
17449 "from regex.test_regex import test_main; test_main()"))))))
17450 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
17451 (synopsis "Alternative regular expression module")
17452 (description "This regular expression implementation is backwards-
17453 compatible with the standard @code{re} module, but offers additional
17454 functionality like full case-folding for case-insensitive matches in Unicode.")
17455 (license license:psfl)))
17456
17457 (define-public python2-regex
17458 (package-with-python2 python-regex))
17459
17460 (define-public python-pyopengl
17461 (package
17462 (name "python-pyopengl")
17463 (version "3.1.5")
17464 (source
17465 (origin
17466 (method url-fetch)
17467 (uri (pypi-uri "PyOpenGL" version))
17468 (sha256
17469 (base32
17470 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
17471 (build-system python-build-system)
17472 (inputs
17473 `(("mesa" ,mesa)
17474 ("freeglut" ,freeglut)
17475 ("glu" ,glu)))
17476 (arguments
17477 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
17478 ;attribute 'OSMesa'
17479 #:phases
17480 (modify-phases %standard-phases
17481 (add-before 'build 'fix-paths
17482 (lambda* (#:key inputs outputs #:allow-other-keys)
17483 (substitute* '("OpenGL/platform/ctypesloader.py")
17484 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
17485 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
17486 (("'GL'")
17487 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
17488 (("'GLU'")
17489 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
17490 (("'glut',")
17491 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
17492 (("'GLESv1_CM'")
17493 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
17494 (("'GLESv2'")
17495 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
17496 ;; Not providing libgle. It seems to be very old.
17497 #t)))))
17498 (home-page "http://pyopengl.sourceforge.net")
17499 (synopsis "Standard OpenGL bindings for Python")
17500 (description
17501 "PyOpenGL is the most common cross platform Python binding to OpenGL and
17502 related APIs. The binding is created using the standard @code{ctypes}
17503 library.")
17504 (license license:bsd-3)))
17505
17506 (define-public python-pyopengl-accelerate
17507 (package
17508 (inherit python-pyopengl)
17509 (name "python-pyopengl-accelerate")
17510 (version "3.1.5")
17511 (source
17512 (origin
17513 (method url-fetch)
17514 (uri (pypi-uri "PyOpenGL-accelerate" version))
17515 (sha256
17516 (base32
17517 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
17518 (inputs
17519 `(("mesa" ,mesa)
17520 ("python-numpy" ,python-numpy))) ; for cython module
17521 ; numpy_formathandler, thus not propagated
17522 (arguments
17523 `(#:tests? #f
17524 #:phases
17525 (modify-phases %standard-phases
17526 (delete 'fix-paths))))
17527 (synopsis "Acceleration code for PyOpenGL")
17528 (description
17529 "This is the Cython-coded accelerator module for PyOpenGL.")))
17530
17531 (define-public python-rencode
17532 (package
17533 (name "python-rencode")
17534 (version "1.0.5")
17535 (source
17536 (origin
17537 (method url-fetch)
17538 (uri (pypi-uri "rencode" version))
17539 (sha256
17540 (base32
17541 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
17542 (build-system python-build-system)
17543 (arguments
17544 `(#:phases
17545 (modify-phases %standard-phases
17546 (add-before 'check 'delete-bogus-test
17547 ;; This test requires /home/aresch/Downloads, which is not provided by
17548 ;; the build environment.
17549 (lambda _
17550 (delete-file "rencode/t.py")
17551 #t)))))
17552 (native-inputs `(("pkg-config" ,pkg-config)
17553 ("python-cython" ,python-cython)))
17554 (home-page "https://github.com/aresch/rencode")
17555 (synopsis "Serialization of heterogeneous data structures")
17556 (description
17557 "The @code{rencode} module is a data structure serialization library,
17558 similar to @code{bencode} from the BitTorrent project. For complex,
17559 heterogeneous data structures with many small elements, r-encoding stake up
17560 significantly less space than b-encodings. This version of rencode is a
17561 complete rewrite in Cython to attempt to increase the performance over the
17562 pure Python module.")
17563 (license license:bsd-3)))
17564
17565 (define-public python2-rencode
17566 (package-with-python2 python-rencode))
17567
17568 (define-public python-xenon
17569 (package
17570 (name "python-xenon")
17571 (version "0.7.0")
17572 (source
17573 (origin
17574 (method url-fetch)
17575 (uri (pypi-uri "xenon" version))
17576 (sha256
17577 (base32
17578 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
17579 (build-system python-build-system)
17580 (native-inputs
17581 `(("python-pyyaml" ,python-pyyaml)
17582 ("python-radon" ,python-radon)
17583 ("python-requests" ,python-requests)
17584 ("python-flake8" ,python-flake8)
17585 ("python-tox" ,python-tox)))
17586 (arguments
17587 `(#:tests? #f ;test suite not shipped with the PyPI archive
17588 #:phases
17589 (modify-phases %standard-phases
17590 (add-before 'build 'patch-test-requirements
17591 (lambda _
17592 ;; Remove httpretty dependency for tests.
17593 (substitute* "setup.py"
17594 (("httpretty") ""))
17595 #t)))))
17596 (home-page "https://xenon.readthedocs.org/")
17597 (synopsis "Monitor code metrics for Python on your CI server")
17598 (description
17599 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
17600 Ideally, @code{xenon} is run every time code is committed. Through command
17601 line options, various thresholds can be set for the complexity of code. It
17602 will fail (i.e. it will exit with a non-zero exit code) when any of these
17603 requirements is not met.")
17604 (license license:expat)))
17605
17606 (define-public python-pysocks
17607 (package
17608 (name "python-pysocks")
17609 (version "1.7.1")
17610 (source
17611 (origin
17612 (method url-fetch)
17613 (uri (pypi-uri "PySocks" version))
17614 (sha256
17615 (base32
17616 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
17617 (build-system python-build-system)
17618 (arguments `(#:tests? #f))
17619 (home-page "https://github.com/Anorov/PySocks")
17620 (synopsis "SOCKS client module")
17621 (description "@code{pysocks} is an updated and semi-actively maintained
17622 version of @code{SocksiPy} with bug fixes and extra features.")
17623 (license license:bsd-3)))
17624
17625 (define-public python2-pysocks
17626 (package-with-python2 python-pysocks))
17627
17628 (define-public python-pydiff
17629 (package
17630 (name "python-pydiff")
17631 (version "0.2")
17632 (source
17633 (origin
17634 (method url-fetch)
17635 (uri (pypi-uri "pydiff" version))
17636 (sha256
17637 (base32
17638 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17639 (build-system python-build-system)
17640 (home-page "https://github.com/myint/pydiff")
17641 (synopsis "Library to diff two Python files at the bytecode level")
17642 (description
17643 "@code{pydiff} makes it easy to look for actual code changes while
17644 ignoring formatting changes.")
17645 (license license:expat)))
17646
17647 (define-public python2-pydiff
17648 (package-with-python2 python-pydiff))
17649
17650 (define-public python-pydub
17651 (package
17652 (name "python-pydub")
17653 (version "0.24.1")
17654 (source
17655 (origin
17656 (method url-fetch)
17657 (uri (pypi-uri "pydub" version))
17658 (sha256
17659 (base32
17660 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17661 (build-system python-build-system)
17662 (arguments
17663 `(#:phases
17664 (modify-phases %standard-phases
17665 (add-after 'unpack 'fix-ffmpeg-path
17666 (lambda* (#:key inputs #:allow-other-keys)
17667 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17668 (substitute* '("pydub/utils.py")
17669 (("return \"ffmpeg\"")
17670 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17671 (("return \"ffplay\"")
17672 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17673 (("return \"ffprobe\"")
17674 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17675 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17676 #t))))))
17677 (home-page "https://pydub.com")
17678 (inputs
17679 `(("ffmpeg" ,ffmpeg)))
17680 (propagated-inputs
17681 `(("python-scipy" ,python-scipy)))
17682 (synopsis "Manipulate audio with a high level interface in Python")
17683 (description
17684 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17685 @code{ffmpeg} to open various audio formats.")
17686 (license license:expat))) ; MIT license
17687
17688 (define-public python-tqdm
17689 (package
17690 (name "python-tqdm")
17691 (version "4.43.0")
17692 (source
17693 (origin
17694 (method url-fetch)
17695 (uri (pypi-uri "tqdm" version))
17696 (sha256
17697 (base32
17698 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17699 (build-system python-build-system)
17700 (arguments
17701 '(#:phases (modify-phases %standard-phases
17702 (replace 'check
17703 (lambda* (#:key inputs outputs #:allow-other-keys)
17704 (add-installed-pythonpath inputs outputs)
17705 ;; This invokation is taken from tox.ini.
17706 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17707 "-d" "-v" "tqdm/"))))))
17708 (native-inputs
17709 `(("python-nose" ,python-nose)))
17710 (home-page "https://github.com/tqdm/tqdm")
17711 (synopsis "Fast, extensible progress meter")
17712 (description
17713 "Make loops show a progress bar on the console by just wrapping any
17714 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17715 design and layout.")
17716 (license (list license:mpl2.0 license:expat))))
17717
17718 (define-public python2-tqdm
17719 (package-with-python2 python-tqdm))
17720
17721 (define-public python-pkginfo
17722 (package
17723 (name "python-pkginfo")
17724 (version "1.7.0")
17725 (source
17726 (origin
17727 (method url-fetch)
17728 (uri (pypi-uri "pkginfo" version))
17729 (sha256
17730 (base32
17731 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
17732 (build-system python-build-system)
17733 (arguments
17734 `(#:phases
17735 (modify-phases %standard-phases
17736 (add-before 'check 'patch-tests
17737 (lambda _
17738 (substitute* "pkginfo/tests/test_installed.py"
17739 (("test_ctor_w_package_no_PKG_INFO")
17740 "_test_ctor_w_package_no_PKG_INFO"))
17741 #t)))))
17742 (home-page
17743 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17744 (synopsis
17745 "Query metadatdata from sdists, bdists, and installed packages")
17746 (description
17747 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17748 source distriubtion (an sdist) or a binary distribution (e.g., created by
17749 running bdist_egg). It can also query the EGG-INFO directory of an installed
17750 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17751 created by running @code{python setup.py develop}).")
17752 (license license:expat)))
17753
17754 (define-public python2-pkginfo
17755 (package-with-python2 python-pkginfo))
17756
17757 (define-public python-twine
17758 (package
17759 (name "python-twine")
17760 (version "1.15.0")
17761 (source
17762 (origin
17763 (method url-fetch)
17764 (uri (pypi-uri "twine" version))
17765 (sha256
17766 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17767 (build-system python-build-system)
17768 (propagated-inputs
17769 `(("python-tqdm" ,python-tqdm)
17770 ("python-packaging" ,python-packaging)
17771 ("python-pkginfo" ,python-pkginfo)
17772 ("python-readme-renderer" ,python-readme-renderer)
17773 ("python-requests" ,python-requests)
17774 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17775 (home-page "https://github.com/pypa/twine")
17776 (synopsis "Collection of utilities for interacting with PyPI")
17777 (description
17778 "@code{twine} currently supports registering projects and uploading
17779 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17780 their files and supports any packaging format (including wheels).")
17781 (license license:asl2.0)))
17782
17783 (define-public python2-twine
17784 (package-with-python2 python-twine))
17785
17786 (define-public python-linecache2
17787 (package
17788 (name "python-linecache2")
17789 (version "1.0.0")
17790 (source
17791 (origin
17792 (method url-fetch)
17793 (uri (pypi-uri "linecache2" version))
17794 (sha256
17795 (base32
17796 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17797 (build-system python-build-system)
17798 (arguments
17799 `(;; The tests depend on unittest2, and our version is a bit too old.
17800 #:tests? #f))
17801 (native-inputs
17802 `(("python-pbr" ,python-pbr-minimal)))
17803 (home-page
17804 "https://github.com/testing-cabal/linecache2")
17805 (synopsis "Backports of the linecache module")
17806 (description
17807 "The linecache module allows one to get any line from any file, while
17808 attempting to optimize internally, using a cache, the common case where many
17809 lines are read from a single file.")
17810 (license license:psfl)))
17811
17812 (define-public python2-linecache2
17813 (package-with-python2 python-linecache2))
17814
17815 (define-public python-traceback2
17816 (package
17817 (name "python-traceback2")
17818 (version "1.4.0")
17819 (source
17820 (origin
17821 (method url-fetch)
17822 (uri (pypi-uri "traceback2" version))
17823 (sha256
17824 (base32
17825 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17826 (build-system python-build-system)
17827 (arguments
17828 `(;; python-traceback2 and python-unittest2 depend on one another.
17829 #:tests? #f))
17830 (native-inputs
17831 `(("python-pbr" ,python-pbr-minimal)))
17832 (propagated-inputs
17833 `(("python-linecache2" ,python-linecache2)))
17834 (home-page
17835 "https://github.com/testing-cabal/traceback2")
17836 (synopsis "Backports of the traceback module")
17837 (description
17838 "This module provides a standard interface to extract, format and print
17839 stack traces of Python programs. It exactly mimics the behavior of the Python
17840 interpreter when it prints a stack trace.")
17841 (license license:psfl)))
17842
17843 (define-public python2-traceback2
17844 (package-with-python2 python-traceback2))
17845
17846 (define-public python-ratelimiter
17847 (package
17848 (name "python-ratelimiter")
17849 (version "1.2.0")
17850 (source
17851 (origin
17852 (method url-fetch)
17853 (uri (pypi-uri "ratelimiter" version))
17854 (sha256
17855 (base32
17856 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17857 (build-system python-build-system)
17858 (arguments
17859 '(#:tests? #f)) ; There are no tests in the pypi archive.
17860 (home-page "https://github.com/RazerM/ratelimiter")
17861 (synopsis "Simple rate limiting object")
17862 (description
17863 "The @code{ratelimiter} module ensures that an operation will not be
17864 executed more than a given number of times during a given period.")
17865 (license license:asl2.0)))
17866
17867 (define-public python2-ratelimiter
17868 (package-with-python2 python-ratelimiter))
17869
17870 (define-public python-dukpy
17871 (package
17872 (name "python-dukpy")
17873 (version "0.3")
17874 (source
17875 (origin
17876 (method git-fetch)
17877 (uri (git-reference
17878 (url "https://github.com/kovidgoyal/dukpy")
17879 (commit (string-append "v" version))))
17880 (file-name (git-file-name name version))
17881 (sha256
17882 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17883 (build-system python-build-system)
17884 (home-page "https://github.com/kovidgoyal/dukpy")
17885 (synopsis "Run JavaScript in python")
17886 (description
17887 "dukpy is a JavaScript runtime environment for Python using the duktape
17888 embeddable JavaScript engine.")
17889 ;; Dukpy is licensed under MIT like the embedded duktape library,
17890 ;; with 'errors.c' as GPL3.
17891 (license (list license:expat license:gpl3))))
17892
17893 (define-public python2-dukpy
17894 (package-with-python2 python-dukpy))
17895
17896 (define-public python-jsonrpclib-pelix
17897 (package
17898 (name "python-jsonrpclib-pelix")
17899 (version "0.3.2")
17900 (source
17901 (origin
17902 (method url-fetch)
17903 (uri (pypi-uri "jsonrpclib-pelix" version))
17904 (sha256
17905 (base32
17906 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17907 (build-system python-build-system)
17908 (arguments
17909 `(#:tests? #f)) ; no tests in PyPI tarball
17910 (home-page "https://github.com/tcalmant/jsonrpclib/")
17911 (synopsis "JSON-RPC 2.0 client library for Python")
17912 (description
17913 "This library implements the JSON-RPC v2.0
17914 specification (backwards-compatible) as a client library for Python. This
17915 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17916 services.")
17917 (license license:asl2.0)))
17918
17919 (define-public python2-jsonrpclib-pelix
17920 (package-with-python2 python-jsonrpclib-pelix))
17921
17922 (define-public python-setuptools-scm-git-archive
17923 (package
17924 (name "python-setuptools-scm-git-archive")
17925 (version "1.0")
17926 (source
17927 (origin
17928 (method url-fetch)
17929 (uri (pypi-uri "setuptools_scm_git_archive" version))
17930 (sha256
17931 (base32
17932 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17933 (build-system python-build-system)
17934 (native-inputs
17935 `(("python-pytest" ,python-pytest)))
17936 (propagated-inputs
17937 `(("python-setuptools-scm" ,python-setuptools-scm)))
17938 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17939 (synopsis "Setuptools_scm plugin for git archives")
17940 (description
17941 "The setuptools_scm_git_archive package is a plugin to
17942 setuptools_scm, which supports obtaining versions from git archives that
17943 belong to tagged versions.")
17944 (license license:expat)))
17945
17946 (define-public python2-setuptools-scm-git-archive
17947 (package-with-python2 python-setuptools-scm-git-archive))
17948
17949 (define-public python-setuptools-git
17950 (package
17951 (name "python-setuptools-git")
17952 (version "1.2")
17953 (source
17954 (origin
17955 (method url-fetch)
17956 (uri (pypi-uri "setuptools-git" version))
17957 (sha256
17958 (base32
17959 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17960 (build-system python-build-system)
17961 (arguments
17962 `(#:phases
17963 (modify-phases %standard-phases
17964 ;; This is needed for tests.
17965 (add-after 'unpack 'configure-git
17966 (lambda _
17967 (setenv "HOME" "/tmp")
17968 (invoke "git" "config" "--global" "user.email" "guix")
17969 (invoke "git" "config" "--global" "user.name" "guix")
17970 #t)))))
17971 (native-inputs
17972 `(("git" ,git-minimal)))
17973 (home-page "https://github.com/msabramo/setuptools-git")
17974 (synopsis "Setuptools revision control system plugin for Git")
17975 (description
17976 "This package provides a plugin for Setuptools for revision control with
17977 Git.")
17978 (license license:bsd-3)))
17979
17980 (define-public python-pyclipper
17981 (package
17982 (name "python-pyclipper")
17983 (version "1.1.0.post3")
17984 (source
17985 (origin
17986 (method url-fetch)
17987 (uri (pypi-uri "pyclipper" version ".zip"))
17988 (sha256
17989 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17990 (modules '((guix build utils)))
17991 (snippet
17992 '(begin
17993 ;; This file is generated by Cython.
17994 (delete-file "pyclipper/pyclipper.cpp") #t))))
17995 (build-system python-build-system)
17996 (arguments
17997 `(#:phases
17998 (modify-phases %standard-phases
17999 (add-before 'build 'cythonize-sources
18000 (lambda _
18001 (with-directory-excursion "pyclipper"
18002 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
18003 (propagated-inputs
18004 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
18005 (native-inputs
18006 `(("python-cython" ,python-cython)
18007 ("python-pytest" ,python-pytest)
18008 ("python-pytest-runner" ,python-pytest-runner)
18009 ("python-unittest2" ,python-unittest2)
18010 ("unzip" ,unzip)))
18011 (home-page "https://github.com/greginvm/pyclipper")
18012 (synopsis "Wrapper for Angus Johnson's Clipper library")
18013 (description
18014 "Pyclipper is a Cython wrapper for the C++ translation of the
18015 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
18016 (license license:expat)))
18017
18018 (define-public python2-pyclipper
18019 (package-with-python2 python-pyclipper))
18020
18021 (define-public python2-booleanoperations
18022 (package
18023 (name "python2-booleanoperations")
18024 (version "0.7.1")
18025 (source
18026 (origin
18027 (method url-fetch)
18028 (uri (pypi-uri "booleanOperations" version ".zip"))
18029 (sha256
18030 (base32
18031 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
18032 (build-system python-build-system)
18033 (arguments
18034 `(#:python ,python-2))
18035 (native-inputs
18036 `(("unzip" ,unzip)
18037 ("python2-pytest" ,python2-pytest)
18038 ("python2-pytest-runner" ,python2-pytest-runner)))
18039 (propagated-inputs
18040 `(("python-fonttools" ,python2-fonttools)
18041 ("python-pyclipper" ,python2-pyclipper)
18042 ("python-ufolib" ,python2-ufolib)))
18043 (home-page "https://github.com/typemytype/booleanOperations")
18044 (synopsis "Boolean operations on paths")
18045 (description
18046 "BooleanOperations provides a Python library that enables
18047 boolean operations on paths.")
18048 (license license:expat)))
18049
18050 (define-public python-tempdir
18051 (package
18052 (name "python-tempdir")
18053 (version "0.7.1")
18054 (source
18055 (origin
18056 (method url-fetch)
18057 (uri (pypi-uri "tempdir" version))
18058 (sha256
18059 (base32
18060 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
18061 (build-system python-build-system)
18062 (home-page "https://pypi.org/project/tempdir/")
18063 (arguments
18064 ;; the package has no tests
18065 '(#:tests? #f))
18066 (synopsis "Python library for managing temporary directories")
18067 (description
18068 "This library manages temporary directories that are automatically
18069 deleted with all their contents when they are no longer needed. It is
18070 particularly convenient for use in tests.")
18071 (license license:expat)))
18072
18073 (define-public python2-tempdir
18074 (package-with-python2 python-tempdir))
18075
18076 (define-public python-activepapers
18077 (package
18078 (name "python-activepapers")
18079 (version "0.2.2")
18080 (source
18081 (origin
18082 (method url-fetch)
18083 (uri (pypi-uri "ActivePapers.Py" version))
18084 (sha256
18085 (base32
18086 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
18087 (build-system python-build-system)
18088 (arguments
18089 `(#:modules ((ice-9 ftw)
18090 (srfi srfi-1)
18091 (guix build utils)
18092 (guix build python-build-system))
18093
18094 #:phases
18095 (modify-phases %standard-phases
18096 (add-after 'unpack 'delete-python2-code
18097 (lambda _
18098 (for-each delete-file
18099 '("lib/activepapers/builtins2.py"
18100 "lib/activepapers/standardlib2.py"
18101 "lib/activepapers/utility2.py"))))
18102 (replace 'check
18103 (lambda _
18104 ;; Deactivate the test cases that download files
18105 (setenv "NO_NETWORK_ACCESS" "1")
18106 ;; For some strange reason, some tests fail if nosetests runs all
18107 ;; test modules in a single execution. They pass if each test
18108 ;; module is run individually.
18109 (for-each (lambda (filename)
18110 (invoke "nosetests"
18111 (string-append "tests/" filename)))
18112 (scandir "tests"
18113 (lambda (filename)
18114 (string-suffix? ".py" filename)))))))))
18115 (native-inputs
18116 `(("python-tempdir" ,python-tempdir)
18117 ("python-nose" ,python-nose)))
18118 (propagated-inputs
18119 `(("python-h5py" ,python-h5py)))
18120 (home-page "https://www.activepapers.org/")
18121 (synopsis "Executable papers for scientific computing")
18122 (description
18123 "ActivePapers is a tool for working with executable papers, which
18124 combine data, code, and documentation in single-file packages,
18125 suitable for publication as supplementary material or on repositories
18126 such as figshare or Zenodo.")
18127 (properties `((python2-variant . ,(delay python2-activepapers))))
18128 (license license:bsd-3)))
18129
18130 (define-public python2-activepapers
18131 (let ((base (package-with-python2
18132 (strip-python2-variant python-activepapers))))
18133 (package/inherit base
18134 (arguments
18135 (substitute-keyword-arguments (package-arguments base)
18136 ((#:phases phases)
18137 `(modify-phases ,phases
18138 (delete 'delete-python2-code)
18139 (add-after 'unpack 'delete-python3-code
18140 (lambda _
18141 (for-each delete-file
18142 '("lib/activepapers/builtins3.py"
18143 "lib/activepapers/standardlib3.py"
18144 "lib/activepapers/utility3.py")))))))))))
18145
18146 (define-public python-semver
18147 (package
18148 (name "python-semver")
18149 (version "2.9.0")
18150 (source
18151 (origin
18152 (method url-fetch)
18153 (uri (pypi-uri "semver" version))
18154 (sha256
18155 (base32
18156 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
18157 (build-system python-build-system)
18158 (arguments
18159 `(#:phases (modify-phases %standard-phases
18160 (replace 'check
18161 (lambda _
18162 (delete-file "setup.cfg")
18163 (invoke "py.test"))))))
18164 (native-inputs
18165 `(("python-pytest" ,python-pytest)))
18166 (home-page "https://github.com/k-bx/python-semver")
18167 (synopsis "Python helper for Semantic Versioning")
18168 (description "This package provides a Python library for
18169 @url{Semantic Versioning, http://semver.org/}.")
18170 (license license:bsd-3)))
18171
18172 (define-public python2-semver
18173 (package-with-python2 python-semver))
18174
18175 (define-public python-pyro4
18176 (package
18177 (name "python-pyro4")
18178 (version "4.77")
18179 (source
18180 (origin
18181 (method url-fetch)
18182 (uri (pypi-uri "Pyro4" version))
18183 (sha256
18184 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
18185 (build-system python-build-system)
18186 (arguments
18187 '(#:tests? #f)) ;FIXME: Some tests require network access.
18188 (native-inputs
18189 `(("python-cloudpickle" ,python-cloudpickle)
18190 ("python-dill" ,python-dill)
18191 ("python-msgpack" ,python-msgpack)))
18192 (propagated-inputs
18193 `(("python-serpent" ,python-serpent)))
18194 (home-page "https://pyro4.readthedocs.io")
18195 (synopsis "Distributed object middleware for Python")
18196 (description
18197 "Pyro enables you to build applications in which objects can talk to each
18198 other over the network. You can just use normal Python method calls to call
18199 objects on other machines, also known as remote procedure calls (RPC).")
18200 (license license:expat)))
18201
18202 (define-public python2-pyro
18203 (package
18204 (name "python2-pyro")
18205 (version "3.16")
18206 (source
18207 (origin
18208 (method url-fetch)
18209 (uri (pypi-uri "Pyro" version))
18210 (file-name (string-append "Pyro-" version ".tar.gz"))
18211 (sha256
18212 (base32
18213 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
18214 (build-system python-build-system)
18215 (arguments
18216 ;; Pyro is not compatible with Python 3
18217 `(#:python ,python-2
18218 ;; Pyro has no test cases for automatic execution
18219 #:tests? #f))
18220 (home-page "https://pythonhosted.org/Pyro/")
18221 (synopsis "Distributed object manager for Python")
18222 (description "Pyro is a Distributed Object Technology system
18223 written in Python that is designed to be easy to use. It resembles
18224 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
18225 which is a system and language independent Distributed Object Technology
18226 and has much more to offer than Pyro or RMI. Pyro 3.x is no
18227 longer maintained. New projects should use Pyro4 instead, which
18228 is the new Pyro version that is actively developed.")
18229 (license license:expat)))
18230
18231 (define-public python2-scientific
18232 (package
18233 (name "python2-scientific")
18234 (version "2.9.4")
18235 (source
18236 (origin
18237 (method git-fetch)
18238 (uri (git-reference
18239 (url "https://github.com/khinsen/ScientificPython")
18240 (commit (string-append "rel" version))))
18241 (file-name (git-file-name name version))
18242 (sha256
18243 (base32
18244 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
18245 (build-system python-build-system)
18246 (inputs
18247 `(("netcdf" ,netcdf)))
18248 (propagated-inputs
18249 `(("python-numpy" ,python2-numpy-1.8)
18250 ("python-pyro" ,python2-pyro)))
18251 (arguments
18252 ;; ScientificPython is not compatible with Python 3
18253 `(#:python ,python-2
18254 #:tests? #f ; No test suite
18255 #:phases
18256 (modify-phases %standard-phases
18257 (replace 'build
18258 (lambda* (#:key inputs #:allow-other-keys)
18259 (invoke "python" "setup.py" "build"
18260 (string-append "--netcdf_prefix="
18261 (assoc-ref inputs "netcdf"))))))))
18262 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
18263 (synopsis "Python modules for scientific computing")
18264 (description "ScientificPython is a collection of Python modules that are
18265 useful for scientific computing. Most modules are rather general (Geometry,
18266 physical units, automatic derivatives, ...) whereas others are more
18267 domain-specific (e.g. netCDF and PDB support). The library is currently
18268 not actively maintained and works only with Python 2 and NumPy < 1.9.")
18269 (license license:cecill-c)))
18270
18271 (define-public python2-mmtk
18272 (package
18273 (name "python2-mmtk")
18274 (version "2.7.12")
18275 (source
18276 (origin
18277 (method git-fetch)
18278 (uri (git-reference
18279 (url "https://github.com/khinsen/MMTK")
18280 (commit (string-append "rel" version))))
18281 (file-name (git-file-name name version))
18282 (sha256
18283 (base32
18284 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
18285 (build-system python-build-system)
18286 (native-inputs
18287 `(("netcdf" ,netcdf)))
18288 (propagated-inputs
18289 `(("python-scientific" ,python2-scientific)
18290 ("python-tkinter" ,python-2 "tk")))
18291 (arguments
18292 `(#:python ,python-2
18293 #:tests? #f
18294 #:phases
18295 (modify-phases %standard-phases
18296 (add-before 'build 'includes-from-scientific
18297 (lambda* (#:key inputs #:allow-other-keys)
18298 (mkdir-p "Include/Scientific")
18299 (copy-recursively
18300 (string-append
18301 (assoc-ref inputs "python-scientific")
18302 "/include/python2.7/Scientific")
18303 "Include/Scientific"))))))
18304 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
18305 (synopsis "Python library for molecular simulation")
18306 (description "MMTK is a library for molecular simulations with an emphasis
18307 on biomolecules. It provides widely used methods such as Molecular Dynamics
18308 and normal mode analysis, but also basic routines for implementing new methods
18309 for simulation and analysis. The library is currently not actively maintained
18310 and works only with Python 2 and NumPy < 1.9.")
18311 (license license:cecill-c)))
18312
18313 (define-public python-phonenumbers
18314 (package
18315 (name "python-phonenumbers")
18316 (version "8.9.1")
18317 (source
18318 (origin
18319 (method url-fetch)
18320 (uri (pypi-uri "phonenumbers" version))
18321 (sha256
18322 (base32
18323 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
18324 (build-system python-build-system)
18325 (home-page
18326 "https://github.com/daviddrysdale/python-phonenumbers")
18327 (synopsis
18328 "Python library for dealing with international phone numbers")
18329 (description
18330 "This package provides a Python port of Google's libphonenumber library.")
18331 (license license:asl2.0)))
18332
18333 (define-public python2-phonenumbers
18334 (package-with-python2 python-phonenumbers))
18335
18336 (define-public python-send2trash
18337 (package
18338 (name "python-send2trash")
18339 (version "1.5.0")
18340 (source
18341 (origin (method git-fetch)
18342 ;; Source tarball on PyPI doesn't include tests.
18343 (uri (git-reference
18344 (url "https://github.com/hsoft/send2trash")
18345 (commit version)))
18346 (file-name (git-file-name name version))
18347 (sha256
18348 (base32
18349 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
18350 (build-system python-build-system)
18351 (arguments
18352 '(#:phases
18353 (modify-phases %standard-phases
18354 (add-before 'check 'pre-check
18355 (lambda _
18356 (mkdir-p "/tmp/foo")
18357 (setenv "HOME" "/tmp/foo")
18358 #t)))))
18359 (home-page "https://github.com/hsoft/send2trash")
18360 (synopsis "Send files to the user's @file{~/Trash} directory")
18361 (description "This package provides a Python library to send files to the
18362 user's @file{~/Trash} directory.")
18363 (properties `((python2-variant . ,(delay python2-send2trash))))
18364 (license license:bsd-3)))
18365
18366 (define-public python2-send2trash
18367 (let ((base (package-with-python2
18368 (strip-python2-variant python-send2trash))))
18369 (package/inherit base
18370 (arguments
18371 (substitute-keyword-arguments (package-arguments python-send2trash)
18372 ((#:phases phases)
18373 `(modify-phases ,phases
18374 (add-before 'check 'setenv
18375 (lambda _
18376 (setenv "PYTHONPATH"
18377 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18378 #t)))))))))
18379
18380 (define-public python-pyfavicon
18381 (package
18382 (name "python-pyfavicon")
18383 (version "0.1.1")
18384 (source
18385 (origin
18386 (method url-fetch)
18387 (uri (pypi-uri "pyfavicon" version))
18388 (sha256
18389 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
18390 (build-system python-build-system)
18391 (arguments
18392 ;; There are no tests in the PyPI tarball and the tests from the
18393 ;; repository require online data.
18394 '(#:tests? #f))
18395 (propagated-inputs
18396 `(("python-aiohttp" ,python-aiohttp)
18397 ("python-beautifulsoup4" ,python-beautifulsoup4)
18398 ("python-pillow" ,python-pillow)))
18399 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
18400 (synopsis "Async favicon fetcher")
18401 (description
18402 "@code{pyfavicon} is an async favicon fetcher.")
18403 (license license:expat)))
18404
18405 (define-public python-yamllint
18406 (package
18407 (name "python-yamllint")
18408 (version "1.26.1")
18409 (source
18410 (origin
18411 (method url-fetch)
18412 (uri (pypi-uri "yamllint" version))
18413 (sha256
18414 (base32 "090krlxj7az0d9yl8i20vjrqi66dfxx7y5xakjhxzsfp7qmldnc7"))))
18415 (build-system python-build-system)
18416 (propagated-inputs
18417 `(("python-pathspec" ,python-pathspec)
18418 ("python-pyyaml" ,python-pyyaml)
18419 ("python-setuptools" ,python-setuptools)))
18420 (home-page "https://github.com/adrienverge/yamllint")
18421 (synopsis "Linter for YAML files")
18422 (description
18423 "Yamllint is a linter for YAML files. yamllint does not only check for
18424 syntax validity, but for weirdnesses like key repetition and cosmetic problems
18425 such as lines length, trailing spaces, indentation, etc.")
18426 (license license:gpl3+)))
18427
18428 (define-public python-yapf
18429 (package
18430 (name "python-yapf")
18431 (version "0.29.0")
18432 (source
18433 (origin
18434 (method url-fetch)
18435 (uri (pypi-uri "yapf" version))
18436 (sha256
18437 (base32
18438 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
18439 (build-system python-build-system)
18440 (home-page "https://github.com/google/yapf")
18441 (synopsis "Formatter for Python code")
18442 (description "YAPF is a formatter for Python code. It's based off of
18443 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
18444 takes the code and reformats it to the best formatting that conforms to the
18445 style guide, even if the original code didn't violate the style guide.")
18446 (license license:asl2.0)))
18447
18448 (define-public python2-yapf
18449 (package-with-python2 python-yapf))
18450
18451 (define-public python-yq
18452 (package
18453 (name "python-yq")
18454 (version "2.11.1")
18455 (source
18456 (origin
18457 (method url-fetch)
18458 (uri (pypi-uri "yq" version))
18459 (sha256
18460 (base32
18461 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
18462 (build-system python-build-system)
18463 (arguments
18464 '(#:phases
18465 (modify-phases %standard-phases
18466 (add-after 'unpack 'patch
18467 (lambda* (#:key inputs #:allow-other-keys)
18468 (substitute* "yq/__init__.py"
18469 (("Popen\\(\\[\"jq")
18470 (string-append
18471 "Popen([\""
18472 (assoc-ref inputs "jq")
18473 "/bin/jq")))
18474 #t)))))
18475 (inputs
18476 `(("python-argcomplete" ,python-argcomplete)
18477 ("python-pyyaml" ,python-pyyaml)
18478 ("python-xmltodict" ,python-xmltodict)
18479 ("jq" ,jq)))
18480 (native-inputs
18481 `(("python-coverage" ,python-coverage)
18482 ("python-flake8" ,python-flake8)
18483 ("python-wheel" ,python-wheel)))
18484 (home-page "https://github.com/kislyuk/yq")
18485 (synopsis "Command-line YAML/XML processor")
18486 (description
18487 "This package provides @command{yq} and @command{xq} for processing YAML
18488 and XML respectively. The processing is done through @command{jq}, @command{jq}
18489 filters can be used to process the data as it passes through.")
18490 (license license:asl2.0)))
18491
18492 (define-public python-gyp
18493 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
18494 (revision "0"))
18495 (package
18496 (name "python-gyp")
18497 ;; Google does not release versions,
18498 ;; based on second most recent commit date.
18499 (version (git-version "0.0.0" revision commit))
18500 (source
18501 (origin
18502 ;; Google does not release tarballs,
18503 ;; git checkout is needed.
18504 (method git-fetch)
18505 (uri (git-reference
18506 (url "https://chromium.googlesource.com/external/gyp")
18507 (commit commit)))
18508 (file-name (git-file-name name version))
18509 (sha256
18510 (base32
18511 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
18512 (build-system python-build-system)
18513 (home-page "https://gyp.gsrc.io/")
18514 (synopsis "GYP is a Meta-Build system")
18515 (description
18516 "GYP builds build systems for large, cross platform applications.
18517 It can be used to generate XCode projects, Visual Studio projects, Ninja build
18518 files, and Makefiles.")
18519 (license license:bsd-3))))
18520
18521 (define-public python2-gyp
18522 (package-with-python2 python-gyp))
18523
18524 (define-public python-whatever
18525 (package
18526 (name "python-whatever")
18527 (version "0.6")
18528 (source
18529 (origin
18530 (method git-fetch)
18531 (uri (git-reference
18532 (url "https://github.com/Suor/whatever")
18533 (commit version)))
18534 (file-name (git-file-name name version))
18535 (sha256
18536 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
18537 (build-system python-build-system)
18538 (arguments
18539 `(#:phases
18540 (modify-phases %standard-phases
18541 (replace 'check
18542 (lambda _
18543 (invoke "py.test"))))))
18544 (native-inputs
18545 `(("python-pytest" ,python-pytest)))
18546 (home-page "https://github.com/Suor/whatever")
18547 (synopsis "Make anonymous functions by partial application of operators")
18548 (description "@code{whatever} provides an easy way to make anonymous
18549 functions by partial application of operators.")
18550 (license license:bsd-3)))
18551
18552 (define-public python2-whatever
18553 (package-with-python2 python-whatever))
18554
18555 (define-public python-funcy
18556 (package
18557 (name "python-funcy")
18558 (version "1.11")
18559 (source
18560 (origin
18561 (method git-fetch)
18562 (uri (git-reference
18563 (url "https://github.com/Suor/funcy")
18564 (commit version)))
18565 (sha256
18566 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
18567 (file-name (git-file-name name version))))
18568 (build-system python-build-system)
18569 (arguments
18570 `(#:phases
18571 (modify-phases %standard-phases
18572 (replace 'check
18573 (lambda _
18574 (invoke "py.test"))))))
18575 (native-inputs
18576 `(("python-pytest" ,python-pytest)
18577 ("python-whatever" ,python-whatever)))
18578 (home-page "https://github.com/Suor/funcy")
18579 (synopsis "Functional tools")
18580 (description "@code{funcy} is a library that provides functional tools.
18581 Examples are:
18582 @enumerate
18583 @item merge - Merges collections of the same type
18584 @item walk - Type-preserving map
18585 @item select - Selects a part of a collection
18586 @item take - Takes the first n items of a collection
18587 @item first - Takes the first item of a collection
18588 @item remove - Predicated-removes items of a collection
18589 @item concat - Concatenates two collections
18590 @item flatten - Flattens a collection with subcollections
18591 @item distinct - Returns only distinct items
18592 @item split - Predicated-splits a collection
18593 @item split_at - Splits a collection at a given item
18594 @item group_by - Groups items by group
18595 @item pairwise - Pairs off adjacent items
18596 @item partial - Partially-applies a function
18597 @item curry - Curries a function
18598 @item compose - Composes functions
18599 @item complement - Complements a predicate
18600 @item all_fn - \"all\" with predicate
18601 @end enumerate")
18602 (license license:bsd-3)))
18603
18604 (define-public python2-funcy
18605 (package-with-python2 python-funcy))
18606
18607 (define-public python-isoweek
18608 (package
18609 (name "python-isoweek")
18610 (version "1.3.3")
18611 (source
18612 (origin
18613 (method url-fetch)
18614 (uri (pypi-uri "isoweek" version))
18615 (sha256
18616 (base32
18617 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
18618 (build-system python-build-system)
18619 (home-page "https://github.com/gisle/isoweek")
18620 (synopsis "Objects representing a week")
18621 (description "The @code{isoweek} module provide the class Week that
18622 implements the week definition of ISO 8601. This standard also defines
18623 a notation for identifying weeks; yyyyWww (where the W is a literal).
18624 Week instances stringify to this form.")
18625 (license license:bsd-3)))
18626
18627 (define-public python2-isoweek
18628 (package-with-python2 python-isoweek))
18629
18630 (define-public python-pyzbar
18631 (package
18632 (name "python-pyzbar")
18633 (version "0.1.8")
18634 (source
18635 (origin
18636 ;; There's no source tarball on PyPI.
18637 (method git-fetch)
18638 (uri (git-reference
18639 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
18640 (commit (string-append "v" version))))
18641 (file-name (git-file-name name version))
18642 (sha256
18643 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
18644 (build-system python-build-system)
18645 (arguments
18646 `(#:phases
18647 (modify-phases %standard-phases
18648 (add-after 'unpack 'remove-failing-test
18649 (lambda _
18650 ;; This tests if find_library was called once, but we remove
18651 ;; the call in the stage below to make the library find libzbar.
18652 (delete-file "pyzbar/tests/test_zbar_library.py")
18653 #t))
18654 (add-before 'build 'set-library-file-name
18655 (lambda* (#:key inputs #:allow-other-keys)
18656 (let ((libzbar (assoc-ref inputs "zbar")))
18657 (substitute* "pyzbar/zbar_library.py"
18658 (("find_library\\('zbar'\\)")
18659 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18660 #t))))))
18661 (native-inputs
18662 `(("pkg-config" ,pkg-config)
18663 ("python-numpy" ,python-numpy)
18664 ("python-pillow" ,python-pillow)))
18665 (inputs
18666 `(("zbar" ,zbar)))
18667 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18668 (synopsis "Read one-dimensional barcodes and QR codes")
18669 (description
18670 "Read one-dimensional barcodes and QR codes using the zbar library.
18671
18672 Features:
18673
18674 @itemize
18675 @item Pure python
18676 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18677 @item Decodes locations of barcodes
18678 @item No dependencies, other than the zbar library itself
18679 @end itemize")
18680 (license license:expat)))
18681
18682 (define-public python-tokenize-rt
18683 (package
18684 (name "python-tokenize-rt")
18685 (version "2.0.1")
18686 (source
18687 (origin
18688 (method url-fetch)
18689 (uri (pypi-uri "tokenize-rt" version))
18690 (sha256
18691 (base32
18692 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
18693 (build-system python-build-system)
18694 (home-page "https://github.com/asottile/tokenize-rt")
18695 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
18696 (description
18697 "This Python library is a wrapper around @code{tokenize} from the Python
18698 standard library. It provides two additional tokens @code{ESCAPED_NL} and
18699 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
18700 and @code{tokens_to_src} to roundtrip.")
18701 (license license:expat)))
18702
18703 (define-public python-future-fstrings
18704 (package
18705 (name "python-future-fstrings")
18706 (version "0.4.1")
18707 (source
18708 (origin
18709 (method url-fetch)
18710 (uri (pypi-uri "future_fstrings" version))
18711 (sha256
18712 (base32
18713 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18714 (build-system python-build-system)
18715 (propagated-inputs
18716 `(("python-tokenize-rt" ,python-tokenize-rt)))
18717 (home-page "https://github.com/asottile/future-fstrings")
18718 (synopsis "Backport of fstrings to Python < 3.6")
18719 (description
18720 "This package provides a UTF-8 compatible encoding
18721 @code{future_fstrings}, which performs source manipulation. It decodes the
18722 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18723 @code{f} strings.")
18724 (license license:expat)))
18725
18726 (define-public python-typed-ast
18727 (package
18728 (name "python-typed-ast")
18729 (version "1.4.0")
18730 (source
18731 (origin
18732 (method git-fetch)
18733 (uri (git-reference
18734 (url "https://github.com/python/typed_ast")
18735 (commit version)))
18736 (sha256
18737 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18738 (file-name (git-file-name name version))))
18739 (build-system python-build-system)
18740 (arguments
18741 `(#:modules ((guix build utils)
18742 (guix build python-build-system)
18743 (ice-9 ftw)
18744 (srfi srfi-1)
18745 (srfi srfi-26))
18746 #:phases
18747 (modify-phases %standard-phases
18748 (replace 'check
18749 (lambda _
18750 (let ((cwd (getcwd)))
18751 (setenv "PYTHONPATH"
18752 (string-append cwd "/build/"
18753 (find (cut string-prefix? "lib" <>)
18754 (scandir (string-append cwd "/build")))
18755 ":"
18756 (getenv "PYTHONPATH"))))
18757 (invoke "pytest")
18758 #t)))))
18759 (native-inputs `(("python-pytest" ,python-pytest)))
18760 (home-page "https://github.com/python/typed_ast")
18761 (synopsis "Fork of Python @code{ast} modules with type comment support")
18762 (description "This package provides a parser similar to the standard
18763 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18764 include PEP 484 type comments and are independent of the version of Python
18765 under which they are run. The @code{typed_ast} parsers produce the standard
18766 Python AST (plus type comments), and are both fast and correct, as they are
18767 based on the CPython 2.7 and 3.7 parsers.")
18768 ;; See the file "LICENSE" for the details.
18769 (license (list license:psfl
18770 license:asl2.0
18771 license:expat)))) ;ast27/Parser/spark.py
18772
18773 (define-public python-typer
18774 (package
18775 (name "python-typer")
18776 (version "0.3.2")
18777 (source
18778 (origin
18779 ;; Building `python-typer` from the git repository requires the `flit-core`
18780 ;; Python package that is not installed by `python-flit`.
18781 (method url-fetch)
18782 (uri (pypi-uri "typer" version))
18783 (sha256
18784 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
18785 (build-system python-build-system)
18786 (arguments
18787 `(#:phases
18788 (modify-phases %standard-phases
18789 (add-before 'check 'disable-failing-tests
18790 (lambda _
18791 (substitute* "tests/test_completion/test_completion.py"
18792 (("def test_show_completion")
18793 "def _test_show_completion")
18794 (("def test_install_completion")
18795 "def _test_install_completion"))
18796 (substitute* "tests/test_completion/test_completion_install.py"
18797 (("def test_completion_install_bash")
18798 "def _test_completion_install_bash")
18799 (("def test_completion_install_zsh")
18800 "def _test_completion_install_zsh")
18801 (("def test_completion_install_fish")
18802 "def _test_completion_install_fish")
18803 (("def test_completion_install_powershell")
18804 "def _test_completion_install_powershell"))
18805 #t))
18806 (replace 'check
18807 (lambda _
18808 (setenv "PYTHONPATH"
18809 (string-append (getcwd) ":"
18810 (getenv "PYTHONPATH")))
18811 (invoke "python" "-m" "pytest" "tests/")
18812 #t)))))
18813 (propagated-inputs
18814 `(("python-click" ,python-click)))
18815 (native-inputs
18816 `(("python-coverage" ,python-coverage)
18817 ("python-pytest" ,python-pytest)
18818 ("python-shellingham" ,python-shellingham)))
18819 (home-page "https://github.com/tiangolo/typer")
18820 (synopsis
18821 "Typer builds CLI based on Python type hints")
18822 (description
18823 "Typer is a library for building CLI applications. It's based on
18824 Python 3.6+ type hints.")
18825 ;; MIT license
18826 (license license:expat)))
18827
18828 (define-public python-typing
18829 (package
18830 (name "python-typing")
18831 (version "3.7.4.3")
18832 (source
18833 (origin
18834 (method url-fetch)
18835 (uri (pypi-uri "typing" version))
18836 (sha256
18837 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18838 (build-system python-build-system)
18839 (home-page "https://docs.python.org/3/library/typing.html")
18840 (synopsis "Type hints for Python")
18841 (description "This is a backport of the standard library @code{typing}
18842 module to Python versions older than 3.5. Typing defines a standard notation
18843 for Python function and variable type annotations. The notation can be used
18844 for documenting code in a concise, standard format, and it has been designed
18845 to also be used by static and runtime type checkers, static analyzers, IDEs
18846 and other tools.")
18847 (license license:psfl)))
18848
18849 (define-public python2-typing
18850 (package-with-python2 python-typing))
18851
18852 (define-public python-typing-extensions
18853 (package
18854 (name "python-typing-extensions")
18855 (version "3.7.4.3")
18856 (source
18857 (origin
18858 (method url-fetch)
18859 (uri (pypi-uri "typing_extensions" version))
18860 (sha256
18861 (base32
18862 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
18863 (build-system python-build-system)
18864 (home-page
18865 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18866 (synopsis "Experimental type hints for Python")
18867 (description
18868 "The typing_extensions module contains additional @code{typing} hints not
18869 yet present in the of the @code{typing} standard library.
18870 Included are implementations of:
18871 @enumerate
18872 @item ClassVar
18873 @item ContextManager
18874 @item Counter
18875 @item DefaultDict
18876 @item Deque
18877 @item NewType
18878 @item NoReturn
18879 @item overload
18880 @item Protocol
18881 @item runtime
18882 @item Text
18883 @item Type
18884 @item TYPE_CHECKING
18885 @item AsyncGenerator
18886 @end enumerate\n")
18887 (license license:psfl)))
18888
18889 (define-public bpython
18890 (package
18891 (name "bpython")
18892 (version "0.20.1")
18893 (source
18894 (origin
18895 (method url-fetch)
18896 (uri (pypi-uri "bpython" version))
18897 (sha256
18898 (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
18899 (build-system python-build-system)
18900 (arguments
18901 `(#:phases
18902 (modify-phases %standard-phases
18903 (add-after 'unpack 'remove-failing-test
18904 (lambda _
18905 ;; Remove failing test. FIXME: make it pass
18906 (delete-file "bpython/test/test_args.py")
18907 #t))
18908 (add-after 'wrap 'add-aliases
18909 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18910 (lambda* (#:key outputs #:allow-other-keys)
18911 (let ((out (assoc-ref outputs "out")))
18912 (for-each
18913 (lambda (old new)
18914 (symlink old (string-append out "/bin/" new)))
18915 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18916 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18917 #t)))))
18918 (propagated-inputs
18919 `(("python-pygments" ,python-pygments)
18920 ("python-requests" ,python-requests)
18921 ("python-curtsies" ,python-curtsies)
18922 ("python-greenlet" ,python-greenlet)
18923 ("python-six" ,python-six)
18924 ("python-wcwidth" ,python-wcwidth)
18925 ;; optional dependencies
18926 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18927 ("python-watchdog" ,python-watchdog)
18928 ("python-jedi" ,python-jedi)))
18929 (native-inputs
18930 `(("python-sphinx" ,python-sphinx)
18931 ("python-mock" ,python-mock)))
18932 (home-page "https://bpython-interpreter.org/")
18933 (synopsis "Fancy interface to the Python interpreter")
18934 (description "Bpython is a fancy interface to the Python
18935 interpreter. bpython's main features are
18936
18937 @enumerate
18938 @item in-line syntax highlighting,
18939 @item readline-like autocomplete with suggestions displayed as you type,
18940 @item expected parameter list for any Python function,
18941 @item \"rewind\" function to pop the last line of code from memory and
18942 re-evaluate,
18943 @item send the code you've entered off to a pastebin,
18944 @item save the code you've entered to a file, and
18945 @item auto-indentation.
18946 @end enumerate")
18947 (license license:expat)))
18948
18949 (define-public python-pyinotify
18950 (package
18951 (name "python-pyinotify")
18952 (version "0.9.6")
18953 (source (origin
18954 (method url-fetch)
18955 (uri (pypi-uri "pyinotify" version))
18956 (sha256
18957 (base32
18958 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18959 (build-system python-build-system)
18960 (arguments `(#:tests? #f)) ;no tests
18961 (home-page "https://github.com/seb-m/pyinotify")
18962 (synopsis "Python library for monitoring inotify events")
18963 (description
18964 "@code{pyinotify} provides a Python interface for monitoring
18965 file system events on Linux.")
18966 (license license:expat)))
18967
18968 (define-public python2-pyinotify
18969 (package-with-python2 python-pyinotify))
18970
18971 ;; Ada parser uses this version.
18972 (define-public python2-quex-0.67.3
18973 (package
18974 (name "python2-quex")
18975 (version "0.67.3")
18976 (source
18977 (origin
18978 (method url-fetch)
18979 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18980 (version-major+minor version)
18981 "/quex-" version ".zip"))
18982 (sha256
18983 (base32
18984 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18985 (build-system python-build-system)
18986 (native-inputs
18987 `(("unzip" ,unzip)))
18988 (arguments
18989 `(#:python ,python-2
18990 #:tests? #f
18991 #:phases
18992 (modify-phases %standard-phases
18993 (delete 'configure)
18994 (delete 'build)
18995 (replace 'install
18996 (lambda* (#:key outputs #:allow-other-keys)
18997 (let* ((out (assoc-ref outputs "out"))
18998 (share/quex (string-append out "/share/quex"))
18999 (bin (string-append out "/bin")))
19000 (copy-recursively "." share/quex)
19001 (mkdir-p bin)
19002 (symlink (string-append share/quex "/quex-exe.py")
19003 (string-append bin "/quex"))
19004 #t))))))
19005 (native-search-paths
19006 (list (search-path-specification
19007 (variable "QUEX_PATH")
19008 (files '("share/quex")))))
19009 (home-page "http://quex.sourceforge.net/")
19010 (synopsis "Lexical analyzer generator in Python")
19011 (description "@code{quex} is a lexical analyzer generator in Python.")
19012 (license license:lgpl2.1+))) ; Non-military
19013
19014 (define-public python2-quex
19015 (package (inherit python2-quex-0.67.3)
19016 (name "python2-quex")
19017 (version "0.68.1")
19018 (source
19019 (origin
19020 (method url-fetch)
19021 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
19022 (sha256
19023 (base32
19024 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
19025 (file-name (string-append name "-" version ".tar.gz"))))))
19026
19027 (define-public python-more-itertools
19028 (package
19029 (name "python-more-itertools")
19030 (version "8.2.0")
19031 (source
19032 (origin
19033 (method url-fetch)
19034 (uri (pypi-uri "more-itertools" version))
19035 (sha256
19036 (base32
19037 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
19038 (build-system python-build-system)
19039 (home-page "https://github.com/erikrose/more-itertools")
19040 (synopsis "More routines for operating on iterables, beyond itertools")
19041 (description "Python's built-in @code{itertools} module implements a
19042 number of iterator building blocks inspired by constructs from APL, Haskell,
19043 and SML. @code{more-itertools} includes additional building blocks for
19044 working with iterables.")
19045 (properties `((python2-variant . ,(delay python2-more-itertools))))
19046 (license license:expat)))
19047
19048 ;; The 5.x series are the last versions supporting Python 2.7.
19049 (define-public python2-more-itertools
19050 (package
19051 (inherit python-more-itertools)
19052 (name "python2-more-itertools")
19053 (version "5.0.0")
19054 (source (origin
19055 (method url-fetch)
19056 (uri (pypi-uri "more-itertools" version))
19057 (sha256
19058 (base32
19059 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
19060 (arguments
19061 `(#:python ,python-2))
19062 (propagated-inputs
19063 `(("python2-six" ,python2-six-bootstrap)))))
19064
19065 (define-public python-latexcodec
19066 (package
19067 (name "python-latexcodec")
19068 (version "1.0.7")
19069 (source
19070 (origin
19071 (method url-fetch)
19072 (uri (pypi-uri "latexcodec" version))
19073 (sha256
19074 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
19075 (build-system python-build-system)
19076 (inputs
19077 `(("python-six" ,python-six)))
19078 (home-page "https://readthedocs.org/projects/latexcodec/")
19079 (synopsis "Work with LaTeX code in Python")
19080 (description "Lexer and codec to work with LaTeX code in Python.")
19081 (license license:expat)))
19082
19083 (define-public python-pybtex
19084 (package
19085 (name "python-pybtex")
19086 (version "0.22.2")
19087 (source
19088 (origin
19089 (method url-fetch)
19090 (uri (pypi-uri "pybtex" version))
19091 (sha256
19092 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
19093 (build-system python-build-system)
19094 (native-inputs
19095 `(("python-nose" ,python-nose)))
19096 (inputs
19097 `(("python-latexcodec" ,python-latexcodec)
19098 ("python-pyyaml" ,python-pyyaml)
19099 ("python-six" ,python-six)))
19100 (arguments
19101 `(#:test-target "nosetests"))
19102 (home-page "https://pybtex.org/")
19103 (synopsis "BibTeX-compatible bibliography processor")
19104 (description "Pybtex is a BibTeX-compatible bibliography processor written
19105 in Python. You can simply type pybtex instead of bibtex.")
19106 (license license:expat)))
19107
19108 (define-public python-onetimepass
19109 (package
19110 (name "python-onetimepass")
19111 (version "1.0.1")
19112 (source
19113 (origin
19114 (method url-fetch)
19115 (uri (pypi-uri "onetimepass" version))
19116 (sha256
19117 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
19118 (build-system python-build-system)
19119 (propagated-inputs `(("python-six" ,python-six)))
19120 (home-page "https://github.com/tadeck/onetimepass/")
19121 (synopsis "One-time password library")
19122 (description "Python one-time password library for HMAC-based (HOTP) and
19123 time-based (TOTP) passwords.")
19124 (license license:expat)))
19125
19126 (define-public python-parso
19127 (package
19128 (name "python-parso")
19129 (version "0.7.1")
19130 (source
19131 (origin
19132 (method url-fetch)
19133 (uri (pypi-uri "parso" version))
19134 (sha256
19135 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
19136 (native-inputs
19137 `(("python-pytest" ,python-pytest)))
19138 (build-system python-build-system)
19139 (arguments
19140 `(#:phases (modify-phases %standard-phases
19141 (replace 'check
19142 (lambda _ (invoke "pytest" "-vv"))))))
19143 (home-page "https://github.com/davidhalter/parso")
19144 (synopsis "Python Parser")
19145 (description "Parso is a Python parser that supports error recovery and
19146 round-trip parsing for different Python versions (in multiple Python versions).
19147 Parso is also able to list multiple syntax errors in your Python file.")
19148 (license license:expat)))
19149
19150 (define-public python2-parso
19151 (package-with-python2 python-parso))
19152
19153 (define-public python-async-generator
19154 (package
19155 (name "python-async-generator")
19156 (version "1.10")
19157 (source
19158 (origin
19159 (method url-fetch)
19160 (uri (pypi-uri "async_generator" version))
19161 (sha256
19162 (base32
19163 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
19164 (build-system python-build-system)
19165 (native-inputs
19166 `(("python-pytest" ,python-pytest)))
19167 (home-page "https://github.com/python-trio/async_generator")
19168 (synopsis "Async generators and context managers for Python 3.5+")
19169 (description "@code{async_generator} back-ports Python 3.6's native async
19170 generators and Python 3.7's context managers into Python 3.5.")
19171 ;; Dual licensed.
19172 (license (list license:expat license:asl2.0))))
19173
19174 (define-public python-async-timeout
19175 (package
19176 (name "python-async-timeout")
19177 (version "3.0.1")
19178 (source
19179 (origin
19180 (method url-fetch)
19181 (uri (pypi-uri "async-timeout" version))
19182 (sha256
19183 (base32
19184 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
19185 (build-system python-build-system)
19186 (home-page "https://github.com/aio-libs/async_timeout/")
19187 (synopsis "Timeout context manager for asyncio programs")
19188 (description "@code{async-timeout} provides a timeout timeout context
19189 manager compatible with @code{asyncio}.")
19190 (license license:asl2.0)))
19191
19192 (define-public python-glob2
19193 (package
19194 (name "python-glob2")
19195 (version "0.7")
19196 (source
19197 (origin
19198 (method git-fetch)
19199 (uri (git-reference
19200 (url "https://github.com/miracle2k/python-glob2")
19201 (commit (string-append "v" version))))
19202 (file-name (git-file-name name version))
19203 (sha256
19204 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
19205 (build-system python-build-system)
19206 (home-page "https://github.com/miracle2k/python-glob2/")
19207 (synopsis "Extended Version of the python buildin glob module")
19208 (description "This is an extended version of the Python
19209 @url{http://docs.python.org/library/glob.html, built-in glob module} which
19210 adds:
19211
19212 @itemize
19213 @item The ability to capture the text matched by glob patterns, and return
19214 those matches alongside the file names.
19215 @item A recursive @code{**} globbing syntax, akin for example to the
19216 @code{globstar} option of Bash.
19217 @item The ability to replace the file system functions used, in order to glob
19218 on virtual file systems.
19219 @item Compatible with Python 2 and Python 3 (tested with 3.3).
19220 @end itemize
19221
19222 Glob2 currently based on the glob code from Python 3.3.1.")
19223 (license license:bsd-2)))
19224
19225 (define-public python2-glob2
19226 (package-with-python2 python-glob2))
19227
19228 (define-public python-gipc
19229 (package
19230 (name "python-gipc")
19231 (version "0.6.0")
19232 (source
19233 (origin
19234 (method url-fetch)
19235 (uri (pypi-uri "gipc" version ".zip"))
19236 (sha256
19237 (base32
19238 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
19239 (build-system python-build-system)
19240 (native-inputs
19241 `(("unzip" ,unzip)))
19242 (propagated-inputs
19243 `(("python-gevent" ,python-gevent)))
19244 (home-page "https://gehrcke.de/gipc/")
19245 (synopsis "Child process management in the context of gevent")
19246 (description "Usage of Python's multiprocessing package in a
19247 gevent-powered application may raise problems. With @code{gipc},
19248 process-based child processes can safely be created anywhere within a
19249 gevent-powered application.")
19250 (license license:expat)))
19251
19252 (define-public python-beautifultable
19253 (package
19254 (name "python-beautifultable")
19255 (version "1.0.0")
19256 (source
19257 (origin
19258 (method url-fetch)
19259 (uri (pypi-uri "beautifultable" version))
19260 (sha256
19261 (base32
19262 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
19263 (build-system python-build-system)
19264 (propagated-inputs
19265 `(("python-wcwidth" ,python-wcwidth)))
19266 (arguments
19267 `(#:phases
19268 (modify-phases %standard-phases
19269 (add-after 'unpack 'patch-setup.py
19270 (lambda _
19271 (substitute* "setup.py"
19272 (("setup\\(")
19273 "setup(\n test_suite=\"test\",")))))))
19274 (home-page "https://github.com/pri22296/beautifultable")
19275 (synopsis "Print ASCII tables for terminals")
19276 (description "@code{python-beautifultable} provides a class for easily
19277 printing tabular data in a visually appealing ASCII format to a terminal.
19278
19279 Features include, but are not limited to:
19280 @itemize
19281 @item Full customization of the look and feel of the table
19282 @item Row and column accessors.
19283 @item Full support for colors using ANSI sequences or any library.
19284 @item Plenty of predefined styles and option to create custom ones.
19285 @item Support for Unicode characters.
19286 @item Supports streaming table when data is slow to retrieve.
19287 @end itemize")
19288 (license license:expat)))
19289
19290 (define-public python-globber
19291 (package
19292 (name "python-globber")
19293 (version "0.2.1")
19294 (source
19295 (origin
19296 (method git-fetch)
19297 (uri (git-reference
19298 (url "https://github.com/asharov/globber")
19299 (commit version)))
19300 (file-name (git-file-name name version))
19301 (sha256
19302 (base32
19303 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
19304 (build-system python-build-system)
19305 (home-page "https://github.com/asharov/globber")
19306 (synopsis "Library for string matching with glob patterns")
19307 (description
19308 "Globber is a Python library for matching file names against glob patterns.
19309 In contrast to other glob-matching libraries, it matches arbitrary strings and
19310 doesn't require the matched names to be existing files. In addition, it
19311 supports the globstar @code{**} operator to match an arbitrary number of
19312 path components.")
19313 (license license:asl2.0)))
19314
19315 (define-public python-git-hammer
19316 (package
19317 (name "python-git-hammer")
19318 (version "0.3.1")
19319 (source
19320 (origin
19321 (method git-fetch)
19322 (uri (git-reference
19323 (url "https://github.com/asharov/git-hammer")
19324 (commit version)))
19325 (file-name (git-file-name name version))
19326 (sha256
19327 (base32
19328 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
19329 (build-system python-build-system)
19330 (arguments
19331 `(#:phases
19332 (modify-phases %standard-phases
19333 (add-after 'unpack 'patch-setup.py
19334 (lambda _
19335 (substitute* "setup.py"
19336 (("setup\\(")
19337 "setup(\n test_suite=\"test\",")))))))
19338 (propagated-inputs
19339 `(("python-beautifultable" ,python-beautifultable)
19340 ("python-dateutil" ,python-dateutil)
19341 ("python-gitpython" ,python-gitpython)
19342 ("python-globber" ,python-globber)
19343 ("python-matplotlib" ,python-matplotlib)
19344 ("python-sqlalchemy" ,python-sqlalchemy)
19345 ("python-sqlalchemy-utils"
19346 ,python-sqlalchemy-utils)))
19347 (home-page "https://github.com/asharov/git-hammer")
19348 (synopsis "Provide statistics for git repositories")
19349 (description
19350 "Git Hammer is a statistics tool for projects in git repositories.
19351 Its major feature is tracking the number of lines authored by each person for every
19352 commit, but it also includes some other useful statistics.")
19353 (license license:asl2.0)))
19354
19355 (define-public python-fusepy
19356 (package
19357 (name "python-fusepy")
19358 (version "2.0.4")
19359 (source
19360 (origin
19361 (method url-fetch)
19362 (uri (pypi-uri "fusepy" version))
19363 (sha256
19364 (base32
19365 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
19366 (build-system python-build-system)
19367 (arguments
19368 `(#:phases
19369 (modify-phases %standard-phases
19370 (add-before 'build 'set-library-file-name
19371 (lambda* (#:key inputs #:allow-other-keys)
19372 (let ((fuse (assoc-ref inputs "fuse")))
19373 (substitute* "fuse.py"
19374 (("find_library\\('fuse'\\)")
19375 (string-append "'" fuse "/lib/libfuse.so'")))
19376 #t))))))
19377 (propagated-inputs
19378 `(("fuse" ,fuse)))
19379 (home-page "https://github.com/fusepy/fusepy")
19380 (synopsis "Simple ctypes bindings for FUSE")
19381 (description "Python module that provides a simple interface to FUSE and
19382 MacFUSE. The binding is created using the standard @code{ctypes} library.")
19383 (license license:isc)))
19384
19385 (define-public python2-fusepy
19386 (package-with-python2 python-fusepy))
19387
19388 (define-public python-fusepyng
19389 (package
19390 (name "python-fusepyng")
19391 (version "1.0.7")
19392 (source
19393 (origin
19394 (method url-fetch)
19395 (uri (pypi-uri "fusepyng" version))
19396 (sha256
19397 (base32
19398 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
19399 (build-system python-build-system)
19400 (arguments
19401 '(#:phases
19402 (modify-phases %standard-phases
19403 (add-after 'unpack 'set-libfuse-path
19404 (lambda* (#:key inputs #:allow-other-keys)
19405 (let ((fuse (assoc-ref inputs "fuse")))
19406 (substitute* "fusepyng.py"
19407 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
19408 (string-append "\"" fuse "/lib/libfuse.so\""))))
19409 #t)))))
19410 (inputs
19411 `(("fuse" ,fuse)))
19412 (propagated-inputs
19413 `(("python-paramiko" ,python-paramiko)))
19414 (home-page "https://github.com/rianhunter/fusepyng")
19415 (synopsis "Simple ctypes bindings for FUSE")
19416 (description "@code{fusepyng} is a Python module that provides a simple
19417 interface to FUSE on various operating systems. It's just one file and is
19418 implemented using @code{ctypes}.")
19419 (license license:isc)))
19420
19421 (define-public python-userspacefs
19422 (package
19423 (name "python-userspacefs")
19424 (version "2.0.3")
19425 (source
19426 (origin
19427 (method url-fetch)
19428 (uri (pypi-uri "userspacefs" version))
19429 (sha256
19430 (base32
19431 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
19432 (build-system python-build-system)
19433 (propagated-inputs
19434 `(("python-fusepyng" ,python-fusepyng)))
19435 (home-page "https://github.com/rianhunter/userspacefs")
19436 (synopsis "User-space file systems for Python")
19437 (description
19438 "@code{userspacefs} is a library that allows you to easily write
19439 user-space file systems in Python.")
19440 (license license:gpl3+)))
19441
19442 (define-public python-stone
19443 (package
19444 (name "python-stone")
19445 (version "3.2.1")
19446 (source
19447 (origin
19448 (method url-fetch)
19449 (uri (pypi-uri "stone" version))
19450 (sha256
19451 (base32
19452 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
19453 (build-system python-build-system)
19454 (arguments
19455 `(#:phases
19456 (modify-phases %standard-phases
19457 (add-after 'unpack 'change-version-requirements
19458 (lambda _
19459 ;; Match the requirement in test/requirements.txt
19460 (substitute* "setup.py"
19461 (("pytest < 5") "pytest < 7"))
19462 ;; We don't care about a coverage report.
19463 (substitute* "test/requirements.txt"
19464 (("coverage.*") "coverage\n"))
19465 #t))
19466 (replace 'check
19467 (lambda* (#:key tests? #:allow-other-keys)
19468 (when tests?
19469 ;; These tests don't import currectly.
19470 (delete-file "test/test_js_client.py")
19471 (delete-file "test/test_tsd_types.py")
19472 (delete-file "test/test_python_gen.py")
19473 (setenv "PYTHONPATH"
19474 (string-append (getcwd) ":"
19475 (getenv "PYTHONPATH")))
19476 (invoke "pytest"))
19477 #t)))))
19478 (propagated-inputs
19479 `(("python-ply" ,python-ply)
19480 ("python-six" ,python-six)))
19481 (native-inputs
19482 `(("python-coverage" ,python-coverage)
19483 ("python-mock" ,python-mock)
19484 ("python-pytest" ,python-pytest)
19485 ("python-pytest-runner" ,python-pytest-runner)))
19486 (home-page "https://github.com/dropbox/stone")
19487 (synopsis "Official Api Spec Language for Dropbox")
19488 (description
19489 "Stone is an interface description language (IDL) for APIs.")
19490 (license license:expat)))
19491
19492 (define-public pybind11
19493 (package
19494 (name "pybind11")
19495 (version "2.6.1")
19496 (source (origin
19497 (method git-fetch)
19498 (uri (git-reference
19499 (url "https://github.com/pybind/pybind11")
19500 (commit (string-append "v" version))))
19501 (sha256
19502 (base32
19503 "1wh5b1xnywzxwxkyac2wvyqwzmy1qxs341jjk820r7b825wn6yad"))
19504 (file-name (git-file-name name version))))
19505 (build-system cmake-build-system)
19506 (native-inputs
19507 `(("python" ,python-wrapper)
19508
19509 ;; The following dependencies are used for tests.
19510 ("python-pytest" ,python-pytest)
19511 ("catch" ,catch-framework2-1)
19512 ("eigen" ,eigen)))
19513 (arguments
19514 `(#:configure-flags
19515 (list (string-append "-DCATCH_INCLUDE_DIR="
19516 (assoc-ref %build-inputs "catch")
19517 "/include/catch"))
19518
19519 #:phases (modify-phases %standard-phases
19520 (add-after 'install 'install-python
19521 (lambda* (#:key outputs #:allow-other-keys)
19522 (let ((out (assoc-ref outputs "out")))
19523 (with-directory-excursion "../source"
19524 (setenv "PYBIND11_USE_CMAKE" "yes")
19525 (invoke "python" "setup.py" "install"
19526 "--single-version-externally-managed"
19527 "--root=/"
19528 (string-append "--prefix=" out)))))))
19529
19530 #:test-target "check"))
19531 (home-page "https://github.com/pybind/pybind11/")
19532 (synopsis "Seamless operability between C++11 and Python")
19533 (description
19534 "@code{pybind11} is a lightweight header-only library that exposes C++
19535 types in Python and vice versa, mainly to create Python bindings of existing
19536 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
19537 library: to minimize boilerplate code in traditional extension modules by
19538 inferring type information using compile-time introspection.")
19539 (license license:bsd-3)))
19540
19541 (define-public python-pooch
19542 (package
19543 (name "python-pooch")
19544 (version "1.3.0")
19545 (source
19546 (origin
19547 (method url-fetch)
19548 (uri (pypi-uri "pooch" version))
19549 (sha256
19550 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
19551 (build-system python-build-system)
19552 (arguments
19553 `(#:tests? #f)) ;requires online data
19554 (propagated-inputs
19555 `(("python-appdirs" ,python-appdirs)
19556 ("python-packaging" ,python-packaging)
19557 ("python-requests" ,python-requests)))
19558 (home-page "https://github.com/fatiando/pooch")
19559 (synopsis "Manage your Python library's sample data files")
19560 (description
19561 "Pooch manages your Python library's sample data files: it automatically
19562 downloads and stores them in a local directory, with support for versioning
19563 and corruption checks.")
19564 (license license:bsd-3)))
19565
19566 (define-public python-fasteners
19567 (package
19568 (name "python-fasteners")
19569 (version "0.15")
19570 (source
19571 (origin
19572 (method url-fetch)
19573 (uri (pypi-uri "fasteners" version))
19574 (sha256
19575 (base32
19576 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
19577 (build-system python-build-system)
19578 (propagated-inputs
19579 `(("python-monotonic" ,python-monotonic)
19580 ("python-six" ,python-six)))
19581 (native-inputs
19582 `(("python-testtools" ,python-testtools)))
19583 (home-page "https://github.com/harlowja/fasteners")
19584 (synopsis "Python package that provides useful locks")
19585 (description
19586 "This package provides a Python program that provides following locks:
19587
19588 @itemize
19589 @item Locking decorator
19590 @item Reader-writer locks
19591 @item Inter-process locks
19592 @item Generic helpers
19593 @end itemize\n")
19594 (license license:asl2.0)))
19595
19596 (define-public python-requests-file
19597 (package
19598 (name "python-requests-file")
19599 (version "1.4.3")
19600 (source
19601 (origin
19602 (method url-fetch)
19603 (uri (pypi-uri "requests-file" version))
19604 (sha256
19605 (base32
19606 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
19607 (build-system python-build-system)
19608 (propagated-inputs
19609 `(("python-requests" ,python-requests)
19610 ("python-six" ,python-six)))
19611 (home-page
19612 "https://github.com/dashea/requests-file")
19613 (synopsis "File transport adapter for Requests")
19614 (description
19615 "Requests-File is a transport adapter for use with the Requests Python
19616 library to allow local file system access via @code{file://} URLs.")
19617 (license license:asl2.0)))
19618
19619 (define-public python2-requests-file
19620 (package-with-python2 python-requests-file))
19621
19622 (define-public python-identify
19623 (package
19624 (name "python-identify")
19625 (version "1.4.25")
19626 (source
19627 (origin
19628 ;; There are no tests in the PyPI tarball.
19629 (method git-fetch)
19630 (uri (git-reference
19631 (url "https://github.com/chriskuehl/identify")
19632 (commit (string-append "v" version))))
19633 (file-name (git-file-name name version))
19634 (sha256
19635 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
19636 (build-system python-build-system)
19637 (arguments
19638 `(#:phases
19639 (modify-phases %standard-phases
19640 (replace 'check
19641 (lambda _
19642 (invoke "pytest" "-vv"))))))
19643 (native-inputs
19644 `(("python-coverage" ,python-coverage)
19645 ("python-pytest" ,python-pytest)))
19646 (propagated-inputs
19647 `(("python-editdistance" ,python-editdistance)))
19648 (home-page "https://github.com/chriskuehl/identify")
19649 (synopsis "File identification library for Python")
19650 (description
19651 "@code{identify} is a file identification library for Python. Given
19652 a file (or some information about a file), return a set of standardized tags
19653 identifying what the file is.")
19654 (license license:expat)))
19655
19656 (define-public python-tldextract
19657 (package
19658 (name "python-tldextract")
19659 (version "2.2.0")
19660 (source
19661 (origin
19662 (method url-fetch)
19663 (uri (pypi-uri "tldextract" version))
19664 (sha256
19665 (base32
19666 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
19667 (build-system python-build-system)
19668 (native-inputs
19669 `(("python-pytest" ,python-pytest)
19670 ("python-responses" ,python-responses)))
19671 (propagated-inputs
19672 `(("python-idna" ,python-idna)
19673 ("python-requests" ,python-requests)
19674 ("python-requests-file" ,python-requests-file)))
19675 (home-page
19676 "https://github.com/john-kurkowski/tldextract")
19677 (synopsis
19678 "Separate the TLD from the registered domain and subdomains of a URL")
19679 (description
19680 "TLDExtract accurately separates the TLD from the registered domain and
19681 subdomains of a URL, using the Public Suffix List. By default, this includes
19682 the public ICANN TLDs and their exceptions. It can optionally support the
19683 Public Suffix List's private domains as well.")
19684 (license license:bsd-3)))
19685
19686 (define-public python2-tldextract
19687 (package-with-python2 python-tldextract))
19688
19689 (define-public python-nodeenv
19690 (package
19691 (name "python-nodeenv")
19692 (version "1.4.0")
19693 (source
19694 (origin
19695 ;; There's no tarball in PyPI.
19696 (method git-fetch)
19697 (uri (git-reference
19698 (url "https://github.com/ekalinin/nodeenv")
19699 (commit version)))
19700 (file-name (git-file-name name version))
19701 (sha256
19702 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
19703 (build-system python-build-system)
19704 (arguments
19705 `(#:phases
19706 (modify-phases %standard-phases
19707 (replace 'check
19708 (lambda _
19709 ;; This test fails. It tries to open a network socket.
19710 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
19711 (native-inputs
19712 `(("python-coverage" ,python-coverage)
19713 ("python-mock" ,python-mock)
19714 ("python-pytest" ,python-pytest)))
19715 (home-page "https://ekalinin.github.io/nodeenv/")
19716 (synopsis "Create isolated node.js environments")
19717 (description
19718 "Nodeenv (node.js virtual environment) is a tool to create isolated
19719 node.js environments. It creates an environment that has its own installation
19720 directories, that doesn't share libraries with other node.js virtual
19721 environments.")
19722 (license license:bsd-3)))
19723
19724 (define-public python-pynamecheap
19725 (package
19726 (name "python-pynamecheap")
19727 (version "0.0.3")
19728 (source
19729 (origin
19730 (method url-fetch)
19731 (uri (pypi-uri "PyNamecheap" version))
19732 (sha256
19733 (base32
19734 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
19735 (build-system python-build-system)
19736 (propagated-inputs
19737 `(("python-requests" ,python-requests)))
19738 (home-page
19739 "https://github.com/Bemmu/PyNamecheap")
19740 (synopsis
19741 "Namecheap API client in Python")
19742 (description
19743 "PyNamecheap is a Namecheap API client in Python.")
19744 (license license:expat)))
19745
19746 (define-public python2-pynamecheap
19747 (package-with-python2 python-pynamecheap))
19748
19749 (define-public python-dns-lexicon
19750 (package
19751 (name "python-dns-lexicon")
19752 (version "2.4.0")
19753 (source
19754 (origin
19755 (method url-fetch)
19756 (uri (pypi-uri "dns-lexicon" version))
19757 (sha256
19758 (base32
19759 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
19760 (build-system python-build-system)
19761 (arguments
19762 `(#:tests? #f)) ;requires internet access
19763 (propagated-inputs
19764 `(("python-future" ,python-future)
19765 ("python-pynamecheap" ,python-pynamecheap)
19766 ("python-requests" ,python-requests)
19767 ("python-tldextract" ,python-tldextract)
19768 ("python-urllib3" ,python-urllib3)))
19769 (home-page "https://github.com/AnalogJ/lexicon")
19770 (synopsis
19771 "Manipulate DNS records on various DNS providers")
19772 (description
19773 "Lexicon provides a way to manipulate DNS records on multiple DNS
19774 providers in a standardized way. It has a CLI but it can also be used as a
19775 Python library. It was designed to be used in automation, specifically with
19776 Let's Encrypt.")
19777 (license license:expat)))
19778
19779 (define-public python2-dns-lexicon
19780 (package-with-python2 python-dns-lexicon))
19781
19782 (define-public python-cfgv
19783 (package
19784 (name "python-cfgv")
19785 (version "3.1.0")
19786 (source
19787 (origin
19788 ;; There are no tests in the PyPI tarball.
19789 (method git-fetch)
19790 (uri (git-reference
19791 (url "https://github.com/asottile/cfgv")
19792 (commit (string-append "v" version))))
19793 (file-name (git-file-name name version))
19794 (sha256
19795 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19796 (build-system python-build-system)
19797 (arguments
19798 `(#:phases
19799 (modify-phases %standard-phases
19800 (replace 'check
19801 (lambda _
19802 (invoke "pytest" "-vv"))))))
19803 (native-inputs
19804 `(("python-covdefaults" ,python-covdefaults)
19805 ("python-coverage" ,python-coverage)
19806 ("python-pytest" ,python-pytest)))
19807 (home-page "https://github.com/asottile/cfgv")
19808 (synopsis "Configuration validation library")
19809 (description
19810 "This library helps to validate configuration files and produce human
19811 readable error messages.")
19812 (license license:expat)))
19813
19814 (define-public python-commandlines
19815 (package
19816 (name "python-commandlines")
19817 (version "0.4.1")
19818 (source
19819 (origin
19820 (method url-fetch)
19821 (uri (pypi-uri "commandlines" version))
19822 (sha256
19823 (base32
19824 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
19825 (build-system python-build-system)
19826 (home-page "https://github.com/chrissimpkins/commandlines")
19827 (synopsis "Command line argument to object parsing library")
19828 (description
19829 "@code{Commandlines} is a Python library for command line application
19830 development that supports command line argument parsing, command string
19831 validation testing and application logic.")
19832 (license license:expat)))
19833
19834 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19835 ;; python-numba. They have a very unflexible relationship.
19836 (define-public python-numba
19837 (package
19838 (name "python-numba")
19839 (version "0.51.2")
19840 (source
19841 (origin
19842 (method url-fetch)
19843 (uri (pypi-uri "numba" version))
19844 (sha256
19845 (base32
19846 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19847 (build-system python-build-system)
19848 (arguments
19849 `(#:phases
19850 (modify-phases %standard-phases
19851 (add-after 'unpack 'disable-proprietary-features
19852 (lambda _
19853 (setenv "NUMBA_DISABLE_HSA" "1")
19854 (setenv "NUMBA_DISABLE_CUDA" "1")
19855 #t))
19856 (replace 'check
19857 (lambda* (#:key inputs outputs #:allow-other-keys)
19858 (add-installed-pythonpath inputs outputs)
19859 ;; Something is wrong with the PYTHONPATH when running the
19860 ;; tests from the build directory, as it complains about not being
19861 ;; able to import certain modules.
19862 (with-directory-excursion "/tmp"
19863 (setenv "HOME" (getcwd))
19864 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19865 (propagated-inputs
19866 `(("python-llvmlite" ,python-llvmlite)
19867 ("python-numpy" ,python-numpy)
19868 ("python-singledispatch" ,python-singledispatch)))
19869 (native-inputs ;for tests
19870 `(("python-jinja2" ,python-jinja2)
19871 ("python-pygments" ,python-pygments)))
19872 (home-page "https://numba.pydata.org")
19873 (synopsis "Compile Python code using LLVM")
19874 (description "Numba gives you the power to speed up your applications with
19875 high performance functions written directly in Python. With a few
19876 annotations, array-oriented and math-heavy Python code can be just-in-time
19877 compiled to native machine instructions, similar in performance to C, C++ and
19878 Fortran, without having to switch languages or Python interpreters.
19879
19880 Numba works by generating optimized machine code using the LLVM compiler
19881 infrastructure at import time, runtime, or statically (using the included pycc
19882 tool).")
19883 (license license:bsd-3)))
19884
19885 (define-public python-numcodecs
19886 (package
19887 (name "python-numcodecs")
19888 (version "0.6.4")
19889 (source
19890 (origin
19891 (method url-fetch)
19892 (uri (pypi-uri "numcodecs" version))
19893 (sha256
19894 (base32
19895 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19896 (build-system python-build-system)
19897 (propagated-inputs
19898 `(("python-numpy" ,python-numpy)
19899 ("python-msgpack" ,python-msgpack)))
19900 (native-inputs
19901 `(("python-pytest" ,python-pytest)
19902 ("python-setuptools-scm" ,python-setuptools-scm)))
19903 (home-page "https://github.com/zarr-developers/numcodecs")
19904 (synopsis "Buffer compression and transformation codecs")
19905 (description
19906 "This Python package provides buffer compression and transformation
19907 codecs for use in data storage and communication applications.")
19908 (license license:expat)))
19909
19910 (define-public python-asciitree
19911 (package
19912 (name "python-asciitree")
19913 (version "0.3.3")
19914 (source
19915 (origin
19916 (method url-fetch)
19917 (uri (pypi-uri "asciitree" version))
19918 (sha256
19919 (base32
19920 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19921 (build-system python-build-system)
19922 (home-page "https://github.com/mbr/asciitree")
19923 (synopsis "Draws ASCII trees")
19924 (description "This package draws tree structures using characters.")
19925 (license license:expat)))
19926
19927 (define-public python-zarr
19928 (package
19929 (name "python-zarr")
19930 (version "2.4.0")
19931 (source
19932 (origin
19933 (method url-fetch)
19934 (uri (pypi-uri "zarr" version))
19935 (sha256
19936 (base32
19937 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19938 (build-system python-build-system)
19939 (arguments
19940 `(#:phases
19941 (modify-phases %standard-phases
19942 (add-after 'unpack 'disable-service-tests
19943 (lambda _
19944 (setenv "ZARR_TEST_ABS" "0")
19945 (setenv "ZARR_TEST_MONGO" "0")
19946 (setenv "ZARR_TEST_REDIS" "0")
19947 #t))
19948 (replace 'check
19949 (lambda _
19950 (invoke "pytest" "-vv" "-k" "not lmdb")
19951 #t)))))
19952 (propagated-inputs
19953 `(("python-asciitree" ,python-asciitree)
19954 ("python-fasteners" ,python-fasteners)
19955 ("python-numcodecs" ,python-numcodecs)
19956 ("python-numpy" ,python-numpy)))
19957 (native-inputs
19958 `(("python-pytest" ,python-pytest)
19959 ("python-setuptools-scm" ,python-setuptools-scm)))
19960 (home-page "https://github.com/zarr-developers/zarr-python")
19961 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19962 (description
19963 "This package provides an implementation of chunked, compressed,
19964 N-dimensional arrays for Python.")
19965 (license license:expat)))
19966
19967 (define-public python-anndata
19968 (package
19969 (name "python-anndata")
19970 (version "0.7.1")
19971 (source
19972 (origin
19973 (method url-fetch)
19974 (uri (pypi-uri "anndata" version))
19975 (sha256
19976 (base32
19977 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19978 (build-system python-build-system)
19979 (arguments
19980 `(#:phases
19981 (modify-phases %standard-phases
19982 (add-after 'unpack 'delete-inconvenient-tests
19983 (lambda _
19984 ;; This test depends on python-scikit-learn.
19985 (delete-file "anndata/tests/test_inplace_subset.py")
19986 #t))
19987 (delete 'check)
19988 (add-after 'install 'check
19989 (lambda* (#:key inputs outputs #:allow-other-keys)
19990 (add-installed-pythonpath inputs outputs)
19991 (invoke "pytest" "-vv"))))))
19992 (propagated-inputs
19993 `(("python-h5py" ,python-h5py)
19994 ("python-importlib-metadata" ,python-importlib-metadata)
19995 ("python-natsort" ,python-natsort)
19996 ("python-numcodecs" ,python-numcodecs)
19997 ("python-packaging" ,python-packaging)
19998 ("python-pandas" ,python-pandas)
19999 ("python-scipy" ,python-scipy)
20000 ("python-zarr" ,python-zarr)))
20001 (native-inputs
20002 `(("python-joblib" ,python-joblib)
20003 ("python-pytest" ,python-pytest)
20004 ("python-setuptools-scm" ,python-setuptools-scm)))
20005 (home-page "https://github.com/theislab/anndata")
20006 (synopsis "Annotated data for data analysis pipelines")
20007 (description "Anndata is a package for simple (functional) high-level APIs
20008 for data analysis pipelines. In this context, it provides an efficient,
20009 scalable way of keeping track of data together with learned annotations and
20010 reduces the code overhead typically encountered when using a mostly
20011 object-oriented library such as @code{scikit-learn}.")
20012 (license license:bsd-3)))
20013
20014 (define-public python-dill
20015 (package
20016 (name "python-dill")
20017 (version "0.3.1.1")
20018 (source
20019 (origin
20020 (method url-fetch)
20021 (uri (pypi-uri "dill" version))
20022 (sha256
20023 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
20024 (build-system python-build-system)
20025 (arguments
20026 `(#:phases
20027 (modify-phases %standard-phases
20028 (replace 'check
20029 (lambda _
20030 (with-directory-excursion "/tmp"
20031 (invoke "nosetests" "-v"))
20032 #t)))))
20033 (native-inputs
20034 `(("python-nose" ,python-nose)))
20035 (home-page "https://pypi.org/project/dill/")
20036 (synopsis "Serialize all of Python")
20037 (description "Dill extends Python's @code{pickle} module for serializing
20038 and de-serializing Python objects to the majority of the built-in Python
20039 types. Dill provides the user the same interface as the @code{pickle} module,
20040 and also includes some additional features. In addition to pickling Python
20041 objects, @code{dill} provides the ability to save the state of an interpreter
20042 session in a single command. Hence, it would be feasible to save a
20043 interpreter session, close the interpreter, ship the pickled file to another
20044 computer, open a new interpreter, unpickle the session and thus continue from
20045 the saved state of the original interpreter session.")
20046 (license license:bsd-3)))
20047
20048 (define-public python-multiprocess
20049 (package
20050 (name "python-multiprocess")
20051 (version "0.70.9")
20052 (source
20053 (origin
20054 (method url-fetch)
20055 (uri (pypi-uri "multiprocess" version))
20056 (sha256
20057 (base32
20058 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
20059 (build-system python-build-system)
20060 (arguments
20061 `(#:phases
20062 (modify-phases %standard-phases
20063 (add-after 'unpack 'disable-broken-tests
20064 (lambda _
20065 ;; This test is broken as there is no keyboard interrupt.
20066 (substitute* "py3.7/multiprocess/tests/__init__.py"
20067 (("^(.*)def test_wait_result"
20068 line indent)
20069 (string-append indent
20070 "@unittest.skip(\"Disabled by Guix\")\n"
20071 line)))
20072 #t))
20073 ;; Tests must be run after installation.
20074 (delete 'check)
20075 (add-after 'install 'check
20076 (lambda* (#:key inputs outputs #:allow-other-keys)
20077 (add-installed-pythonpath inputs outputs)
20078 (invoke "python" "-m" "multiprocess.tests")
20079 #t)))))
20080 (propagated-inputs
20081 `(("python-dill" ,python-dill)))
20082 (home-page "https://pypi.org/project/multiprocess/")
20083 (synopsis "Multiprocessing and multithreading in Python")
20084 (description
20085 "This package is a fork of the multiprocessing Python package, a package
20086 which supports the spawning of processes using the API of the standard
20087 library's @code{threading} module.")
20088 (license license:bsd-3)))
20089
20090 (define-public python-toolz
20091 (package
20092 (name "python-toolz")
20093 (version "0.9.0")
20094 (source
20095 (origin
20096 (method url-fetch)
20097 (uri (pypi-uri "toolz" version))
20098 (sha256
20099 (base32
20100 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
20101 (build-system python-build-system)
20102 ;; FIXME: tests cannot be computed: "Can't perform this operation for
20103 ;; unregistered loader type"
20104 (arguments '(#:tests? #f))
20105 (home-page "https://github.com/pytoolz/toolz/")
20106 (synopsis "List processing tools and functional utilities")
20107 (description
20108 "This package provides a set of utility functions for iterators,
20109 functions, and dictionaries.")
20110 (license license:bsd-3)))
20111
20112 (define-public python2-toolz
20113 (package-with-python2 python-toolz))
20114
20115 (define-public python-cytoolz
20116 (package
20117 (name "python-cytoolz")
20118 (version "0.9.0.1")
20119 (source
20120 (origin
20121 (method url-fetch)
20122 (uri (pypi-uri "cytoolz" version))
20123 (sha256
20124 (base32
20125 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
20126 (build-system python-build-system)
20127 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
20128 ;; 'exceptions'"
20129 (arguments '(#:tests? #f))
20130 (propagated-inputs
20131 `(("python-toolz" ,python-toolz)))
20132 (native-inputs
20133 `(("python-cython" ,python-cython)))
20134 (home-page "https://github.com/pytoolz/cytoolz")
20135 (synopsis "High performance functional utilities")
20136 (description
20137 "The cytoolz package implements the same API as provided by toolz. The
20138 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
20139 that is accessible to other projects developed in Cython.")
20140 (license license:bsd-3)))
20141
20142 (define-public python-sortedcollections
20143 (package
20144 (name "python-sortedcollections")
20145 (version "2.1.0")
20146 (source
20147 (origin
20148 (method url-fetch)
20149 (uri (pypi-uri "sortedcollections" version))
20150 (sha256
20151 (base32
20152 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
20153 (build-system python-build-system)
20154 (propagated-inputs
20155 `(("python-sortedcontainers" ,python-sortedcontainers)))
20156 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
20157 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
20158 (synopsis "Python Sorted Collections")
20159 (description "Sorted Collections is a Python sorted collections library.")
20160 (license license:asl2.0)))
20161
20162 (define-public python-sortedcontainers
20163 (package
20164 (name "python-sortedcontainers")
20165 (version "2.1.0")
20166 (source
20167 (origin
20168 (method url-fetch)
20169 (uri (pypi-uri "sortedcontainers" version))
20170 (sha256
20171 (base32
20172 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
20173 (build-system python-build-system)
20174 (arguments
20175 ;; FIXME: Tests require many extra dependencies, and would introduce
20176 ;; a circular dependency on hypothesis, which uses this package.
20177 '(#:tests? #f))
20178 (propagated-inputs
20179 `(("python-appdirs" ,python-appdirs)
20180 ("python-distlib" ,python-distlib)
20181 ("python-filelock" ,python-filelock)
20182 ("python-six" ,python-six-bootstrap)))
20183 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
20184 (synopsis "Sorted List, Sorted Dict, Sorted Set")
20185 (description
20186 "This package provides a sorted collections library, written in
20187 pure-Python.")
20188 (license license:asl2.0)))
20189
20190 (define-public python2-sortedcontainers
20191 (package-with-python2 python-sortedcontainers))
20192
20193 (define-public python-cloudpickle
20194 (package
20195 (name "python-cloudpickle")
20196 (version "1.3.0")
20197 (source
20198 (origin
20199 (method url-fetch)
20200 (uri (pypi-uri "cloudpickle" version))
20201 (sha256
20202 (base32
20203 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
20204 (build-system python-build-system)
20205 (arguments
20206 '(#:phases (modify-phases %standard-phases
20207 (add-before 'check 'do-not-override-PYTHONPATH
20208 (lambda _
20209 ;; Append to PYTHONPATH instead of overriding it so
20210 ;; that dependencies from Guix can be found.
20211 (substitute* "tests/testutils.py"
20212 (("env\\['PYTHONPATH'\\] = pythonpath")
20213 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
20214 #t))
20215 (replace 'check
20216 (lambda* (#:key tests? #:allow-other-keys)
20217 (if tests?
20218 (invoke "pytest" "-s" "-vv")
20219 (format #t "test suite not run~%"))
20220 #t)))))
20221 (native-inputs
20222 `(;; For tests.
20223 ("python-psutil" ,python-psutil)
20224 ("python-pytest" ,python-pytest)
20225 ("python-tornado" ,python-tornado)))
20226 (home-page "https://github.com/cloudpipe/cloudpickle")
20227 (synopsis "Extended pickling support for Python objects")
20228 (description
20229 "Cloudpickle makes it possible to serialize Python constructs not
20230 supported by the default pickle module from the Python standard library. It
20231 is especially useful for cluster computing where Python expressions are
20232 shipped over the network to execute on remote hosts, possibly close to the
20233 data.")
20234 (properties `((python2-variant . ,(delay python2-cloudpickle))))
20235 (license license:bsd-3)))
20236
20237 (define-public python2-cloudpickle
20238 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
20239 (package/inherit base
20240 (native-inputs
20241 `(("python-mock" ,python2-mock)
20242 ,@(package-native-inputs base)))
20243 (propagated-inputs
20244 `(("python-futures" ,python2-futures)
20245 ,@(package-propagated-inputs base))))))
20246
20247 (define-public python-locket
20248 (package
20249 (name "python-locket")
20250 (version "0.2.0")
20251 (source
20252 (origin
20253 (method url-fetch)
20254 (uri (pypi-uri "locket" version))
20255 (sha256
20256 (base32
20257 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
20258 (build-system python-build-system)
20259 (home-page "https://github.com/mwilliamson/locket.py")
20260 (synopsis "File-based locks for Python")
20261 (description
20262 "Locket implements a lock that can be used by multiple processes provided
20263 they use the same path.")
20264 (license license:bsd-2)))
20265
20266 (define-public python2-locket
20267 (package-with-python2 python-locket))
20268
20269 (define-public python-blosc
20270 (package
20271 (name "python-blosc")
20272 (version "1.5.1")
20273 (source
20274 (origin
20275 (method url-fetch)
20276 (uri (pypi-uri "blosc" version))
20277 (sha256
20278 (base32
20279 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
20280 (build-system python-build-system)
20281 ;; FIXME: all tests pass, but then this error is printed:
20282 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
20283 (arguments '(#:tests? #f))
20284 (propagated-inputs
20285 `(("python-numpy" ,python-numpy)))
20286 (home-page "https://github.com/blosc/python-blosc")
20287 (synopsis "Python wrapper for the Blosc data compressor library")
20288 (description "Blosc is a high performance compressor optimized for binary
20289 data. It has been designed to transmit data to the processor cache faster
20290 than the traditional, non-compressed, direct memory fetch approach via a
20291 @code{memcpy()} system call.
20292
20293 Blosc works well for compressing numerical arrays that contains data with
20294 relatively low entropy, like sparse data, time series, grids with
20295 regular-spaced values, etc.
20296
20297 This Python package wraps the Blosc library.")
20298 (license license:bsd-3)))
20299
20300 (define-public python2-blosc
20301 (package-with-python2 python-blosc))
20302
20303 (define-public python-partd
20304 (package
20305 (name "python-partd")
20306 (version "0.3.9")
20307 (source
20308 (origin
20309 (method url-fetch)
20310 (uri (pypi-uri "partd" version))
20311 (sha256
20312 (base32
20313 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
20314 (build-system python-build-system)
20315 (propagated-inputs
20316 `(("python-blosc" ,python-blosc)
20317 ("python-locket" ,python-locket)
20318 ("python-numpy" ,python-numpy)
20319 ("python-pandas" ,python-pandas)
20320 ("python-pyzmq" ,python-pyzmq)
20321 ("python-toolz" ,python-toolz)))
20322 (home-page "https://github.com/dask/partd/")
20323 (synopsis "Appendable key-value storage")
20324 (description "Partd stores key-value pairs. Values are raw bytes. We
20325 append on old values. Partd excels at shuffling operations.")
20326 (license license:bsd-3)))
20327
20328 (define-public python2-partd
20329 (package-with-python2 python-partd))
20330
20331 (define-public python-fsspec
20332 (package
20333 (name "python-fsspec")
20334 (version "0.6.1")
20335 (source
20336 (origin
20337 (method url-fetch)
20338 (uri (pypi-uri "fsspec" version))
20339 (sha256
20340 (base32
20341 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
20342 (build-system python-build-system)
20343 (arguments '(#:tests? #f)) ; there are none
20344 (home-page "https://github.com/intake/filesystem_spec")
20345 (synopsis "File-system specification")
20346 (description "The purpose of this package is to produce a template or
20347 specification for a file-system interface, that specific implementations
20348 should follow, so that applications making use of them can rely on a common
20349 behavior and not have to worry about the specific internal implementation
20350 decisions with any given backend.")
20351 (license license:bsd-3)))
20352
20353 (define-public python-dask
20354 (package
20355 (name "python-dask")
20356 (version "2.14.0")
20357 (source
20358 (origin
20359 (method url-fetch)
20360 (uri (pypi-uri "dask" version))
20361 (sha256
20362 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
20363 (build-system python-build-system)
20364 (arguments
20365 `(#:phases
20366 (modify-phases %standard-phases
20367 (add-after 'unpack 'disable-broken-tests
20368 (lambda _
20369 ;; This test is marked as xfail when pytest-xdist is used.
20370 (substitute* "dask/tests/test_threaded.py"
20371 (("def test_interrupt\\(\\)" m)
20372 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20373 m)))
20374 ;; This one fails with a type error:
20375 ;; TypeError: Already tz-aware, use tz_convert to convert.
20376 (substitute* "dask/dataframe/tests/test_shuffle.py"
20377 (("def test_set_index_timestamp\\(\\)" m)
20378 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20379 m)))
20380 #t))
20381 (replace 'check
20382 (lambda _ (invoke "pytest" "-vv"))))))
20383 (propagated-inputs
20384 `(("python-cloudpickle" ,python-cloudpickle)
20385 ("python-fsspec" ,python-fsspec)
20386 ("python-numpy" ,python-numpy)
20387 ("python-packaging" ,python-packaging)
20388 ("python-pandas" ,python-pandas)
20389 ("python-partd" ,python-partd)
20390 ("python-toolz" ,python-toolz)
20391 ("python-pyyaml" ,python-pyyaml)))
20392 (native-inputs
20393 `(("python-pytest" ,python-pytest)
20394 ("python-pytest-runner" ,python-pytest-runner)))
20395 (home-page "https://github.com/dask/dask/")
20396 (synopsis "Parallel computing with task scheduling")
20397 (description
20398 "Dask is a flexible parallel computing library for analytics. It
20399 consists of two components: dynamic task scheduling optimized for computation,
20400 and large data collections like parallel arrays, dataframes, and lists that
20401 extend common interfaces like NumPy, Pandas, or Python iterators to
20402 larger-than-memory or distributed environments. These parallel collections
20403 run on top of the dynamic task schedulers. ")
20404 (license license:bsd-3)))
20405
20406 (define-public python-ilinkedlist
20407 (package
20408 (name "python-ilinkedlist")
20409 (version "0.4.0")
20410 (source
20411 (origin
20412 (method url-fetch)
20413 (uri (pypi-uri "ilinkedlist" version))
20414 (sha256
20415 (base32
20416 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
20417 (build-system python-build-system)
20418 (native-inputs `(("python-pytest" ,python-pytest)))
20419 (inputs `(("python" ,python)))
20420 (home-page "https://github.com/luther9/ilinkedlist-py")
20421 (synopsis "Immutable linked list library")
20422 (description
20423 "This is a implementation of immutable linked lists for Python. It
20424 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
20425 Since a linked list is treated as immutable, it is hashable, and its length
20426 can be retrieved in constant time. Some of the terminology is inspired by
20427 LISP. It is possible to create an improper list by creating a @code{Pair}
20428 with a non-list @code{cdr}.")
20429 (license license:gpl3+)))
20430
20431 (define-public python-readlike
20432 (package
20433 (name "python-readlike")
20434 (version "0.1.3")
20435 (source
20436 (origin
20437 (method url-fetch)
20438 (uri (pypi-uri "readlike" version))
20439 (sha256
20440 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
20441 (build-system python-build-system)
20442 (home-page "https://github.com/jangler/readlike")
20443 (synopsis "GNU Readline-like line editing module")
20444 (description
20445 "This Python module provides line editing functions similar to the default
20446 Emacs-style ones of GNU Readline. Unlike the Python standard library's
20447 @code{readline} package, this one allows access to those capabilities in settings
20448 outside of a standard command-line interface. It is especially well-suited to
20449 interfacing with Urwid, due to a shared syntax for describing key inputs.
20450
20451 Currently, all stateless Readline commands are implemented. Yanking and history
20452 are not supported.")
20453 (license license:expat)))
20454
20455 (define-public python2-readlike
20456 (package-with-python2 python-readlike))
20457
20458 (define-public python-reparser
20459 (package
20460 (name "python-reparser")
20461 (version "1.4.3")
20462 (source
20463 (origin
20464 (method url-fetch)
20465 (uri (pypi-uri "ReParser" version))
20466 (sha256
20467 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
20468 (build-system python-build-system)
20469 (home-page "https://github.com/xmikos/reparser")
20470 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
20471 (description
20472 "This Python library provides a simple lexer/parser for inline markup based
20473 on regular expressions.")
20474 (license license:expat)))
20475
20476 (define-public python2-reparser
20477 (let ((reparser (package-with-python2
20478 (strip-python2-variant python-reparser))))
20479 (package/inherit reparser
20480 (propagated-inputs
20481 `(("python2-enum34" ,python2-enum34)
20482 ,@(package-propagated-inputs reparser))))))
20483
20484 (define-public python-retrying
20485 (package
20486 (name "python-retrying")
20487 (version "1.3.3")
20488 (source
20489 (origin
20490 (method git-fetch)
20491 (uri (git-reference
20492 (url "https://github.com/rholder/retrying")
20493 (commit (string-append "v" version))))
20494 (file-name (git-file-name name version))
20495 (sha256
20496 (base32
20497 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
20498 (build-system python-build-system)
20499 (propagated-inputs
20500 `(("python-six" ,python-six)))
20501 (home-page "https://github.com/rholder/retrying")
20502 (synopsis "Library for adding retry behavior")
20503 (description "Retrying is a general-purpose retrying library to simplify
20504 the task of adding retry behavior to just about anything.
20505
20506 Features:
20507
20508 @itemize
20509 @item Generic Decorator API.
20510 @item Specify stop condition (i.e. limit by number of attempts).
20511 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
20512 @item Customize retrying on Exceptions.
20513 @item Customize retrying on expected returned result.
20514 @end itemize")
20515 (license license:asl2.0)))
20516
20517 (define-public python-pre-commit
20518 (package
20519 (name "python-pre-commit")
20520 (version "2.10.0")
20521 (source
20522 (origin
20523 (method url-fetch)
20524 (uri (pypi-uri "pre_commit" version))
20525 (sha256
20526 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
20527 (build-system python-build-system)
20528 (arguments
20529 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
20530 ;; attribute 'empty_template_setup'".
20531 `(#:tests? #false))
20532 (propagated-inputs
20533 `(("python-cfgv" ,python-cfgv)
20534 ("python-identify" ,python-identify)
20535 ("python-importlib-metadata" ,python-importlib-metadata)
20536 ("python-importlib-resources" ,python-importlib-resources)
20537 ("python-nodeenv" ,python-nodeenv)
20538 ("python-pyyaml" ,python-pyyaml)
20539 ("python-toml" ,python-toml)
20540 ("python-virtualenv" ,python-virtualenv)))
20541 (home-page "https://github.com/pre-commit/pre-commit")
20542 (synopsis "Framework for managing multi-language pre-commit hooks")
20543 (description
20544 "This package provides a framework for managing and maintaining
20545 multi-language pre-commit hooks.")
20546 (license license:expat)))
20547
20548 (define-public python-precis-i18n
20549 (package
20550 (name "python-precis-i18n")
20551 (version "1.0.0")
20552 (source
20553 (origin
20554 (method url-fetch)
20555 (uri (pypi-uri "precis_i18n" version))
20556 (sha256
20557 (base32
20558 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
20559 (build-system python-build-system)
20560 (home-page "https://github.com/byllyfish/precis_i18n")
20561 (synopsis "Implementation of the PRECIS framework")
20562 (description
20563 "This module implements the PRECIS Framework as described in RFC 8264,
20564 RFC 8265 and RFC 8266.")
20565 (license license:expat)))
20566
20567 (define-public python-absl-py
20568 (package
20569 (name "python-absl-py")
20570 (version "0.6.1")
20571 (source
20572 (origin
20573 (method url-fetch)
20574 (uri (pypi-uri "absl-py" version))
20575 (sha256
20576 (base32
20577 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
20578 (build-system python-build-system)
20579 (propagated-inputs
20580 `(("python-six" ,python-six)))
20581 (home-page "https://github.com/abseil/abseil-py")
20582 (synopsis "Abseil Python common libraries")
20583 (description
20584 "This package provides the Abseil Python Common Libraries, a collection
20585 of Python libraries for building Python applications.")
20586 (license license:asl2.0)))
20587
20588 (define-public python-astor
20589 (package
20590 (name "python-astor")
20591 (version "0.8.1")
20592 (source
20593 (origin
20594 (method url-fetch)
20595 (uri (pypi-uri "astor" version))
20596 (sha256
20597 (base32
20598 "0ppscdzzvxpznclkmhhj53iz314x3pfv4yc7c6gwxqgljgdgyvka"))))
20599 (build-system python-build-system)
20600 ;; FIXME: There are two errors and two test failures.
20601 (arguments `(#:tests? #f))
20602 (home-page "https://github.com/berkerpeksag/astor")
20603 (synopsis "Read and write Python ASTs")
20604 (description "Astor is designed to allow easy manipulation of Python
20605 source via the Abstract Syntax Tree.")
20606 (license license:bsd-3)))
20607
20608 (define-public python2-astor
20609 (package-with-python2 python-astor))
20610
20611 (define-public python-astunparse
20612 (package
20613 (name "python-astunparse")
20614 (version "1.6.2")
20615 (source
20616 (origin
20617 (method url-fetch)
20618 (uri (pypi-uri "astunparse" version))
20619 (sha256
20620 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
20621 (build-system python-build-system)
20622 (arguments '(#:tests? #f)) ; there are none
20623 (propagated-inputs
20624 `(("python-six" ,python-six)
20625 ("python-wheel" ,python-wheel)))
20626 (home-page "https://github.com/simonpercivall/astunparse")
20627 (synopsis "AST unparser for Python")
20628 (description "This package provides an AST unparser for Python. It is a
20629 factored out version of @code{unparse} found in the Python source
20630 distribution.")
20631 (license license:bsd-3)))
20632
20633 (define-public python-gast
20634 (package
20635 (name "python-gast")
20636 (version "0.3.3")
20637 (source
20638 (origin
20639 (method url-fetch)
20640 (uri (pypi-uri "gast" version))
20641 (sha256
20642 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
20643 (build-system python-build-system)
20644 (propagated-inputs
20645 `(("python-astunparse" ,python-astunparse)))
20646 (home-page "https://pypi.org/project/gast/")
20647 (synopsis "Generic Python AST that abstracts the underlying Python version")
20648 (description
20649 "GAST provides a compatibility layer between the AST of various Python
20650 versions, as produced by @code{ast.parse} from the standard @code{ast}
20651 module.")
20652 (license license:bsd-3)))
20653
20654 (define-public python-wikidata
20655 (package
20656 (name "python-wikidata")
20657 (version "0.6.1")
20658 (source
20659 (origin
20660 (method url-fetch)
20661 (uri (pypi-uri "Wikidata" version))
20662 (sha256
20663 (base32
20664 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
20665 (build-system python-build-system)
20666 (propagated-inputs
20667 `(("python-babel" ,python-babel)))
20668 (home-page "https://github.com/dahlia/wikidata")
20669 (synopsis "Wikidata client library")
20670 (description
20671 "This package provides a Python interface to
20672 @url{https://www.wikidata.org/, Wikidata}.")
20673 (properties '((upstream-name . "Wikidata")))
20674 (license license:gpl3+)))
20675
20676 (define-public python-doctest-ignore-unicode
20677 (package
20678 (name "python-doctest-ignore-unicode")
20679 (version "0.1.2")
20680 (source
20681 (origin
20682 (method url-fetch)
20683 (uri (pypi-uri "doctest-ignore-unicode" version))
20684 (sha256
20685 (base32
20686 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
20687 (build-system python-build-system)
20688 (native-inputs
20689 `(("python-nose" ,python-nose)))
20690 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
20691 (synopsis "Ignore Unicode literal prefixes in doctests")
20692 (description
20693 "This package adds support for a flag to ignore Unicode literal prefixes
20694 in doctests.")
20695 (license license:asl2.0)))
20696
20697 (define-public python-attr
20698 (package
20699 (name "python-attr")
20700 (version "0.3.1")
20701 (source
20702 (origin
20703 (method url-fetch)
20704 (uri (pypi-uri "attr" version))
20705 (sha256
20706 (base32
20707 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
20708 (build-system python-build-system)
20709 (home-page "https://github.com/denis-ryzhkov/attr")
20710 (synopsis "Decorator for attributes of target function or class")
20711 (description "Simple decorator to set attributes of target function or
20712 class in a @acronym{DRY, Don't Repeat Yourself} way.")
20713 (license license:expat)))
20714
20715 (define-public python-construct
20716 (package
20717 (name "python-construct")
20718 (version "2.10.56")
20719 (source
20720 (origin
20721 (method url-fetch)
20722 (uri (pypi-uri "construct" version))
20723 (sha256
20724 (base32
20725 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
20726 (build-system python-build-system)
20727 (arguments
20728 `(#:tests? #f)) ; No tests exist.
20729 (propagated-inputs
20730 `(("python-extras" ,python-extras)
20731 ("python-arrow" ,python-arrow)
20732 ("python-numpy" ,python-numpy)
20733 ("python-ruamel.yaml" ,python-ruamel.yaml)))
20734 (home-page "https://construct.readthedocs.io")
20735 (synopsis "Declarative and symmetrical parser and builder for binary data")
20736 (description
20737 "This package provides both simple, atomic constructs (such as
20738 integers of various sizes), as well as composite ones which allow you
20739 form hierarchical and sequential structures of increasing complexity.
20740 It features bit and byte granularity, easy debugging and testing, an
20741 easy-to-extend subclass system, and lots of primitive constructs to
20742 make your work easier.")
20743 (license license:expat)))
20744
20745 (define-public python-outcome
20746 (package
20747 (name "python-outcome")
20748 (version "1.0.1")
20749 (source
20750 (origin
20751 (method url-fetch)
20752 (uri (pypi-uri "outcome" version))
20753 (sha256
20754 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
20755 (build-system python-build-system)
20756 (arguments
20757 `(#:phases
20758 (modify-phases %standard-phases
20759 (replace 'check
20760 (lambda* (#:key inputs outputs #:allow-other-keys)
20761 (add-installed-pythonpath inputs outputs)
20762 (invoke "pytest" "-vv"))))))
20763 (native-inputs
20764 `(("python-pytest" ,python-pytest)
20765 ("python-pytest-cov" ,python-pytest-cov)
20766 ("python-pytest-asyncio" ,python-pytest-asyncio)))
20767 (propagated-inputs
20768 `(("python-async-generator" ,python-async-generator)
20769 ("python-attrs" ,python-attrs)))
20770 (home-page "https://github.com/python-trio/outcome")
20771 (synopsis "Capture the outcome of Python function calls")
20772 (description
20773 "Capture the outcome of Python function calls. Extracted from the Trio
20774 project.")
20775 ;; Either license applies.
20776 (license (list license:expat license:asl2.0))))
20777
20778 (define-public python-trio
20779 (package
20780 (name "python-trio")
20781 (version "0.17.0")
20782 (source
20783 (origin
20784 (method url-fetch)
20785 (uri (pypi-uri "trio" version))
20786 (sha256
20787 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
20788 (build-system python-build-system)
20789 (arguments
20790 `(#:phases
20791 (modify-phases %standard-phases
20792 (add-before 'check 'change-home
20793 (lambda _
20794 ;; Tests require a writable home.
20795 (setenv "HOME" "/tmp")
20796 #t))
20797 (replace 'check
20798 (lambda _
20799 (invoke "pytest" "-vv" "-k"
20800 (string-append
20801 ;; This test times out.
20802 "not test_ki_protection_works"
20803 ;; Assertion errors.
20804 " and not test_guest_mode_ki"
20805 " and not test_run_in_trio_thread_ki"
20806 ;; These try to raise KeyboardInterrupt which does not work
20807 ;; in the build environment.
20808 " and not test_ki_self"
20809 " and not test_ki_wakes_us_up"
20810 ;; Failure in name resolution.
20811 " and not test_getnameinfo"
20812 " and not test_SocketType_resolve"
20813 ;; OSError: protocol not found.
20814 " and not test_getprotobyname")))))))
20815 (native-inputs
20816 `(("python-astor" ,python-astor)
20817 ("python-ipython" ,python-ipython)
20818 ("python-jedi" ,python-jedi)
20819 ("python-pylint" ,python-pylint)
20820 ("python-pyopenssl" ,python-pyopenssl)
20821 ("python-pytest" ,python-pytest)
20822 ("python-pytest-cov" ,python-pytest-cov)
20823 ("python-trustme" ,python-trustme)))
20824 (propagated-inputs
20825 `(("python-attrs" ,python-attrs)
20826 ("python-idna" ,python-idna)
20827 ("python-outcome" ,python-outcome)
20828 ("python-sniffio" ,python-sniffio)
20829 ("python-sortedcontainers"
20830 ,python-sortedcontainers)))
20831 (home-page "https://github.com/python-trio/trio")
20832 (synopsis "Friendly Python library for async concurrency and I/O")
20833 (description
20834 "Trio strives to be a production-quality, async/await-native I/O library
20835 for Python. Like all async libraries, its main purpose is to help you write
20836 programs that do multiple things at the same time with parallelized I/O.")
20837 ;; Either license applies.
20838 (license (list license:expat license:asl2.0))))
20839
20840 (define-public python-trio-typing
20841 (package
20842 (name "python-trio-typing")
20843 (version "0.5.0")
20844 (source
20845 (origin
20846 (method url-fetch)
20847 (uri (pypi-uri "trio-typing" version))
20848 (sha256
20849 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
20850 (build-system python-build-system)
20851 (arguments
20852 `(#:phases
20853 (modify-phases %standard-phases
20854 (replace 'check
20855 (lambda _
20856 (invoke "pytest" "-vv"))))))
20857 (native-inputs
20858 `(("python-attrs" ,python-attrs)
20859 ("python-pytest" ,python-pytest)))
20860 (propagated-inputs
20861 `(("python-mypy" ,python-mypy)
20862 ("python-mypy-extensions"
20863 ,python-mypy-extensions)
20864 ("python-trio" ,python-trio)
20865 ("python-typing-extensions"
20866 ,python-typing-extensions)))
20867 (home-page "https://github.com/python-trio/trio-typing")
20868 (synopsis "Static type checking support for Trio and related projects")
20869 (description
20870 "This package provides:
20871
20872 @itemize
20873 @item PEP 561 typing stubs packages for the Trio project packages:
20874
20875 @itemize
20876 @item trio (@code{trio-stubs})
20877 @item outcome (@code{outcome-stubs})
20878 @item async_generator (@code{async_generator-stubs})
20879 @end itemize
20880
20881 @item A package @code{trio_typing} containing types that Trio programs often
20882 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20883 a mypy plugin that smooths over some limitations in the basic type hints.
20884 @end itemize")
20885 ;; Either license applies.
20886 (license (list license:expat license:asl2.0))))
20887
20888 (define-public python-humanize
20889 (package
20890 (name "python-humanize")
20891 (version "0.5.1")
20892 (source
20893 (origin
20894 (method url-fetch)
20895 (uri (pypi-uri "humanize" version))
20896 (sha256
20897 (base32
20898 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20899 (arguments
20900 '(#:tests? #f)) ; tests not in pypi archive
20901 (build-system python-build-system)
20902 (home-page "https://github.com/jmoiron/humanize")
20903 (synopsis "Print numerical information in a human-readable form")
20904 (description "This package provides a Python module that displays numbers
20905 and dates in \"human readable\" forms. For example, it would display
20906 \"12345591313\" as \"12.3 billion\".")
20907 (license license:expat)))
20908
20909 (define-public python-txaio
20910 (package
20911 (name "python-txaio")
20912 (version "18.8.1")
20913 (source
20914 (origin
20915 (method url-fetch)
20916 (uri (pypi-uri "txaio" version))
20917 (sha256
20918 (base32
20919 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20920 (build-system python-build-system)
20921 (propagated-inputs
20922 `(("python-twisted" ,python-twisted)
20923 ("python-six" ,python-six)))
20924 (home-page "https://github.com/crossbario/txaio")
20925 (synopsis "Compatibility layer between Python asyncio and Twisted")
20926 (description "Txaio provides a compatibility layer between the Python
20927 @code{asyncio} module and @code{Twisted}.")
20928 (license license:expat)))
20929
20930 (define-public python-toolshed
20931 (package
20932 (name "python-toolshed")
20933 (version "0.4.6")
20934 (source
20935 (origin
20936 (method url-fetch)
20937 (uri (pypi-uri "toolshed" version))
20938 (sha256
20939 (base32
20940 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20941 (build-system python-build-system)
20942 (native-inputs
20943 `(("python-nose" ,python-nose)))
20944 (home-page "https://github.com/brentp/toolshed/")
20945 (synopsis "Collection of modules and functions for working with data")
20946 (description "This is a collection of well-tested, simple modules and
20947 functions that aim to reduce boilerplate when working with data.")
20948 (license license:bsd-2)))
20949
20950 (define-public python-annoy
20951 (package
20952 (name "python-annoy")
20953 (version "1.15.1")
20954 (source
20955 (origin
20956 (method url-fetch)
20957 (uri (pypi-uri "annoy" version))
20958 (sha256
20959 (base32
20960 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20961 (build-system python-build-system)
20962 (native-inputs
20963 `(("python-nose" ,python-nose)))
20964 (home-page "https://github.com/spotify/annoy/")
20965 (synopsis "Approximate nearest neighbors library")
20966 (description
20967 "Annoy is a C++ library with Python bindings to search for points in
20968 space that are close to a given query point. It also creates large read-only
20969 file-based data structures that are @code{mmap}ped into memory so that many
20970 processes may share the same data.")
20971 (license license:asl2.0)))
20972
20973 (define-public python-croniter
20974 (package
20975 (name "python-croniter")
20976 (version "0.3.34")
20977 (source (origin
20978 (method url-fetch)
20979 (uri (pypi-uri "croniter" version))
20980 (sha256
20981 (base32
20982 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20983 (build-system python-build-system)
20984 (propagated-inputs
20985 `(("python-dateutil" ,python-dateutil)
20986 ("python-natsort" ,python-natsort)))
20987 (home-page "https://github.com/kiorky/croniter")
20988 (synopsis "Iterate datetime objects with cron-like syntax")
20989 (description
20990 "@code{croniter} provides iteration for datetime object with cron-like
20991 format.")
20992 (license license:expat)))
20993
20994 (define-public python-pylzma
20995 (package
20996 (name "python-pylzma")
20997 (version "0.5.0")
20998 (source
20999 (origin
21000 (method url-fetch)
21001 (uri (pypi-uri "pylzma" version))
21002 (sha256
21003 (base32
21004 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
21005 (build-system python-build-system)
21006 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
21007 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
21008 (description "This package provides Python bindings for the LZMA library
21009 by Igor Pavlov.")
21010 (license license:lgpl2.1+)))
21011
21012 (define-public python2-pylzma
21013 (package-with-python2 python-pylzma))
21014
21015 (define-public python-ifaddr
21016 (package
21017 (name "python-ifaddr")
21018 (version "0.1.7")
21019 (source
21020 (origin
21021 (method url-fetch)
21022 (uri (pypi-uri "ifaddr" version))
21023 (sha256
21024 (base32
21025 "150sxdlicwrphmhnv03ykxplyd2jdrxz0mikgnivavgilrn8m7hz"))))
21026 (build-system python-build-system)
21027 (arguments
21028 `(#:phases
21029 (modify-phases %standard-phases
21030 (replace 'check
21031 (lambda _ (invoke "nosetests"))))))
21032 (native-inputs
21033 `(("python-nose" ,python-nose)))
21034 (home-page "https://github.com/pydron/ifaddr")
21035 (synopsis "Network interface and IP address enumeration library")
21036 (description "This package provides a network interface and IP address
21037 enumeration library in Python.")
21038 (license license:expat)))
21039
21040 (define-public python-zeroconf
21041 (package
21042 (name "python-zeroconf")
21043 (version "0.28.8")
21044 (source
21045 (origin
21046 (method url-fetch)
21047 (uri (pypi-uri "zeroconf" version))
21048 (sha256
21049 (base32
21050 "0narq8haa3b375vfblbyil77n8bw0wxqnanl91pl0wwwm884mqjb"))))
21051 (build-system python-build-system)
21052 (native-inputs
21053 `(("python-nose" ,python-nose)))
21054 (propagated-inputs
21055 `(("python-ifaddr" ,python-ifaddr)))
21056 (arguments
21057 `(#:phases
21058 (modify-phases %standard-phases
21059 (replace 'check
21060 (lambda _ ;; Networking isn't available for these tests.
21061 (invoke "nosetests" "-v"
21062 "--exclude" "test_integration_with_listener_ipv6"
21063 "--exclude" "test_launch_and_close_v6_only"
21064 "--exclude" "test_launch_and_close_v4_v6"
21065 "--exclude" "test_launch_and_close"))))))
21066 (home-page "https://github.com/jstasiak/python-zeroconf")
21067 (synopsis "Pure Python mDNS service discovery")
21068 (description
21069 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
21070 compatible).")
21071 (license license:lgpl2.1+)))
21072
21073 (define-public python2-zeroconf
21074 (package
21075 (name "python2-zeroconf")
21076
21077 ;; This is the last version that supports Python 2.x.
21078 (version "0.19.1")
21079 (source
21080 (origin
21081 (method url-fetch)
21082 (uri (pypi-uri "zeroconf" version))
21083 (sha256
21084 (base32
21085 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
21086 (build-system python-build-system)
21087 (arguments
21088 `(#:python ,python-2
21089 #:phases
21090 (modify-phases %standard-phases
21091 (add-after 'unpack 'patch-requires
21092 (lambda* (#:key inputs #:allow-other-keys)
21093 (substitute* "setup.py"
21094 (("enum-compat")
21095 "enum34"))
21096 #t)))))
21097 (native-inputs
21098 `(("python2-six" ,python2-six)
21099 ("python2-enum32" ,python2-enum34)
21100 ("python2-netifaces" ,python2-netifaces)
21101 ("python2-typing" ,python2-typing)))
21102 (home-page "https://github.com/jstasiak/python-zeroconf")
21103 (synopsis "Pure Python mDNS service discovery")
21104 (description
21105 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
21106 compatible).")
21107 (license license:lgpl2.1+)))
21108
21109 (define-public python-bsddb3
21110 (package
21111 (name "python-bsddb3")
21112 (version "6.2.6")
21113 (source
21114 (origin
21115 (method url-fetch)
21116 (uri (pypi-uri "bsddb3" version))
21117 (sha256
21118 (base32
21119 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
21120 (build-system python-build-system)
21121 (inputs
21122 `(("bdb" ,bdb)))
21123 (arguments
21124 '(#:phases
21125 (modify-phases %standard-phases
21126 (add-after 'unpack 'configure-locations
21127 (lambda* (#:key inputs #:allow-other-keys)
21128 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
21129 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
21130 #t))
21131 (replace 'check
21132 (lambda _
21133 (invoke "python3" "test3.py" "-v"))))))
21134 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
21135 (synopsis "Python bindings for Oracle Berkeley DB")
21136 (description
21137 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
21138 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
21139 Transaction objects, and each of these is exposed as a Python type in the
21140 bsddb3.db module. The database objects can use various access methods: btree,
21141 hash, recno, and queue. Complete support of Berkeley DB distributed
21142 transactions. Complete support for Berkeley DB Replication Manager.
21143 Complete support for Berkeley DB Base Replication. Support for RPC.")
21144 (license license:bsd-3)))
21145
21146 (define-public python-dbfread
21147 (package
21148 (name "python-dbfread")
21149 (version "2.0.7")
21150 (source (origin
21151 (method url-fetch)
21152 (uri (pypi-uri "dbfread" version))
21153 (sha256
21154 (base32
21155 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
21156 (build-system python-build-system)
21157 (native-inputs
21158 `(("python-pytest" ,python-pytest)))
21159 (home-page "https://dbfread.readthedocs.io")
21160 (synopsis "Read DBF Files with Python")
21161 (description
21162 "This library reads DBF files and returns the data as native Python data
21163 types for further processing. It is primarily intended for batch jobs and
21164 one-off scripts.")
21165 (license license:expat)))
21166
21167 (define-public python-cached-property
21168 (package
21169 (name "python-cached-property")
21170 (version "1.5.1")
21171 (source
21172 (origin
21173 (method url-fetch)
21174 (uri (pypi-uri "cached-property" version))
21175 (sha256
21176 (base32
21177 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
21178 (build-system python-build-system)
21179 (arguments
21180 `(#:phases
21181 (modify-phases %standard-phases
21182 ;; https://github.com/pydanny/cached-property/issues/131
21183 ;; recent versions of freezegun break one test
21184 (add-after 'unpack 'disable-broken-test
21185 (lambda _
21186 (substitute* "tests/test_cached_property.py"
21187 (("def test_threads_ttl_expiry\\(self\\)" m)
21188 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
21189 " " m)))
21190 #t)))))
21191 (native-inputs
21192 `(("python-freezegun" ,python-freezegun)))
21193 (home-page
21194 "https://github.com/pydanny/cached-property")
21195 (synopsis
21196 "Decorator for caching properties in classes")
21197 (description
21198 "This package provides a decorator which makes caching
21199 time-or-computationally-expensive properties quick and easy and works in Python
21200 2 or 3.")
21201 (license license:bsd-3)))
21202
21203 (define-public python-folium
21204 (package
21205 (name "python-folium")
21206 (version "0.12.1")
21207 (source
21208 (origin
21209 ;; PyPI has a ".whl" file but not a proper source release.
21210 ;; Thus, fetch code from Git.
21211 (method git-fetch)
21212 (uri (git-reference
21213 (url "https://github.com/python-visualization/folium")
21214 (commit (string-append "v" version))))
21215 (file-name (git-file-name name version))
21216 (sha256
21217 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
21218 (build-system python-build-system)
21219 (propagated-inputs
21220 `(("python-branca" ,python-branca)
21221 ("python-jinja2" ,python-jinja2)
21222 ("python-numpy" ,python-numpy)
21223 ("python-requests" ,python-requests)))
21224 (native-inputs
21225 `(("python-pytest" ,python-pytest)))
21226 (home-page "https://github.com/python-visualization/folium")
21227 (synopsis "Make beautiful maps with Leaflet.js & Python")
21228 (description "@code{folium} makes it easy to visualize data that’s been
21229 manipulated in Python on an interactive leaflet map. It enables both the
21230 binding of data to a map for @code{choropleth} visualizations as well as
21231 passing rich vector/raster/HTML visualizations as markers on the map.
21232
21233 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
21234 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
21235 supports Image, Video, GeoJSON and TopoJSON overlays.")
21236 (license license:expat)))
21237
21238 (define-public jube
21239 (package
21240 ;; This is a command-line tool, so no "python-" prefix.
21241 (name "jube")
21242 (version "2.2.2")
21243 (source (origin
21244 (method url-fetch)
21245 (uri (string-append
21246 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
21247 version))
21248 (sha256
21249 (base32
21250 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
21251 (file-name (string-append "jube-" version ".tar.gz"))))
21252 (build-system python-build-system)
21253 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
21254 (synopsis "Benchmarking environment")
21255 (description
21256 "JUBE helps perform and analyze benchmarks in a systematic way. For each
21257 benchmarked application, benchmark data is stored in a format that allows JUBE
21258 to deduct the desired information. This data can be parsed by automatic pre-
21259 and post-processing scripts that draw information and store it more densely
21260 for manual interpretation.")
21261 (license license:gpl3+)))
21262
21263 (define-public python-pyroutelib3
21264 (package
21265 (name "python-pyroutelib3")
21266 (version "1.3.post1")
21267 (source
21268 (origin
21269 (method url-fetch)
21270 (uri (pypi-uri "pyroutelib3" version))
21271 (sha256
21272 (base32
21273 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
21274 (build-system python-build-system)
21275 (propagated-inputs
21276 `(("python-dateutil" ,python-dateutil)))
21277 (home-page "https://github.com/MKuranowski/pyroutelib3")
21278 (synopsis "Library for simple routing on OSM data")
21279 (description "Library for simple routing on OSM data")
21280 (license license:gpl3+)))
21281
21282 (define-public python-bibtexparser
21283 (package
21284 (name "python-bibtexparser")
21285 (version "1.1.0")
21286 (source
21287 (origin
21288 (method url-fetch)
21289 (uri (pypi-uri "bibtexparser" version))
21290 (sha256
21291 (base32
21292 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
21293 (build-system python-build-system)
21294 (propagated-inputs
21295 `(("python-pyparsing" ,python-pyparsing)))
21296 (native-inputs
21297 `(("python-future" ,python-future)))
21298 (home-page "https://github.com/sciunto-org/python-bibtexparser")
21299 (synopsis "Python library to parse BibTeX files")
21300 (description "BibtexParser is a Python library to parse BibTeX files.")
21301 (license (list license:bsd-3 license:lgpl3))))
21302
21303 (define-public python-distro
21304 (package
21305 (name "python-distro")
21306 (version "1.4.0")
21307 (source
21308 (origin
21309 (method url-fetch)
21310 (uri (pypi-uri "distro" version))
21311 (sha256
21312 (base32
21313 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
21314 (build-system python-build-system)
21315 (native-inputs
21316 `(("python-pytest" ,python-pytest)))
21317 (home-page "https://github.com/nir0s/distro")
21318 (synopsis
21319 "OS platform information API")
21320 (description
21321 "@code{distro} provides information about the OS distribution it runs on,
21322 such as a reliable machine-readable ID, or version information.
21323
21324 It is the recommended replacement for Python's original
21325 `platform.linux_distribution` function (which will be removed in Python 3.8).
21326 @code{distro} also provides a command-line interface to output the platform
21327 information in various formats.")
21328 (license license:asl2.0)))
21329
21330 (define-public python-cairosvg
21331 (package
21332 (name "python-cairosvg")
21333 (version "2.5.0")
21334 (source
21335 (origin
21336 (method url-fetch)
21337 (uri (pypi-uri "CairoSVG" version))
21338 (sha256
21339 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
21340 (build-system python-build-system)
21341 (arguments
21342 `(#:phases
21343 (modify-phases %standard-phases
21344 (replace 'check
21345 (lambda _ (invoke "pytest"))))))
21346 (propagated-inputs
21347 `(("python-cairocffi" ,python-cairocffi)
21348 ("python-cssselect2" ,python-cssselect2)
21349 ("python-defusedxml" ,python-defusedxml)
21350 ("python-pillow" ,python-pillow)
21351 ("python-tinycss2" ,python-tinycss2)))
21352 (native-inputs
21353 `(("python-pytest-flake8" ,python-pytest-flake8)
21354 ("python-pytest-isort" ,python-pytest-isort)
21355 ("python-pytest-runner" ,python-pytest-runner)))
21356 (home-page "https://cairosvg.org/")
21357 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
21358 (description "CairoSVG is a SVG converter based on Cairo. It can export
21359 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
21360 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
21361 parsed, the result is drawn to a Cairo surface that can be exported to
21362 qvarious formats: PDF, PostScript, PNG and even SVG.")
21363 (license license:lgpl3+)))
21364
21365 (define-public python-pyphen
21366 (package
21367 (name "python-pyphen")
21368 (version "0.10.0")
21369 (source
21370 (origin
21371 (method url-fetch)
21372 (uri (pypi-uri "Pyphen" version))
21373 (sha256
21374 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
21375 (build-system python-build-system)
21376 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
21377 ;; embedded set provided by upstream - like Debian does.
21378 (home-page "https://github.com/Kozea/Pyphen")
21379 (synopsis "Pure Python module to hyphenate text")
21380 (description "Pyphen is a pure Python module to hyphenate text using
21381 existing Hunspell hyphenation dictionaries.")
21382 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
21383
21384 (define-public python-intelhex
21385 (package
21386 (name "python-intelhex")
21387 (version "2.2.1")
21388 (source
21389 (origin
21390 (method url-fetch)
21391 (uri (pypi-uri "intelhex" version))
21392 (sha256
21393 (base32
21394 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
21395 (build-system python-build-system)
21396 (arguments '(#:tests? #f)) ;issue with version
21397 (home-page "https://pypi.org/project/IntelHex/")
21398 (synopsis "Python library for Intel HEX files manipulations")
21399 (description "The Intel HEX file format is widely used in microprocessors
21400 and microcontrollers area (embedded systems etc.) as the de facto standard for
21401 representation of code to be programmed into microelectronic devices. This
21402 package provides an intelhex Python library to read, write, create from
21403 scratch and manipulate data from Intel HEX file format. It also includes
21404 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
21405 converters and more, those based on the library itself.")
21406 (license license:bsd-3)))
21407
21408 (define-public python-pykwalify
21409 (package
21410 (name "python-pykwalify")
21411 (version "1.7.0")
21412 (source
21413 (origin
21414 (method url-fetch)
21415 (uri (pypi-uri "pykwalify" version))
21416 (sha256
21417 (base32
21418 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
21419 (build-system python-build-system)
21420 (arguments '(#:tests? #f)) ;missing dependencies
21421 (propagated-inputs
21422 `(("python-dateutil" ,python-dateutil)
21423 ("python-docopt" ,python-docopt)
21424 ("python-pyyaml" ,python-pyyaml)))
21425 (home-page "https://github.com/grokzen/pykwalify")
21426 (synopsis
21427 "Python lib/cli for JSON/YAML schema validation")
21428 (description
21429 "This package provides a parser, schema validator, and data binding tool
21430 for YAML and JSON.")
21431 (license license:expat)))
21432
21433 (define-public python-dbusmock
21434 (package
21435 (name "python-dbusmock")
21436 (version "0.18.3")
21437 (source
21438 (origin
21439 (method url-fetch)
21440 (uri (pypi-uri "python-dbusmock" version))
21441 (sha256
21442 (base32
21443 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
21444 (build-system python-build-system)
21445 (arguments
21446 '(#:phases
21447 (modify-phases %standard-phases
21448 (add-after 'unpack 'patch-shell-path
21449 (lambda _
21450 (substitute* "tests/test_code.py"
21451 (("/bin/bash") (which "bash")))
21452 #t)))))
21453 (native-inputs
21454 `(;; For tests.
21455 ("dbus" ,dbus) ; for dbus-daemon
21456 ("python-nose" ,python-nose)
21457 ("which" ,which)))
21458 (propagated-inputs
21459 `(("python-dbus" ,python-dbus)
21460 ("python-pygobject" ,python-pygobject)))
21461 (home-page "https://github.com/martinpitt/python-dbusmock")
21462 (synopsis "Python library for mock D-Bus objects")
21463 (description "python-dbusmock allows for the easy creation of mock objects on
21464 D-Bus. This is useful for writing tests for software which talks to D-Bus
21465 services such as upower, systemd, logind, gnome-session or others, and it is
21466 hard (or impossible without root privileges) to set the state of the real
21467 services to what you expect in your tests.")
21468 (license license:lgpl3+)))
21469
21470 (define-public python-jsonplus
21471 (package
21472 (name "python-jsonplus")
21473 (version "0.8.0")
21474 (home-page "https://github.com/randomir/jsonplus")
21475 (source (origin
21476 (method url-fetch)
21477 (uri (pypi-uri "jsonplus" version))
21478 (sha256
21479 (base32
21480 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
21481 (build-system python-build-system)
21482 ;; XXX: No tests on PyPI, and the repository has no tags.
21483 (arguments '(#:tests? #f))
21484 (propagated-inputs
21485 `(("python-dateutil" ,python-dateutil)
21486 ("python-simplejson" ,python-simplejson)
21487 ("python-sortedcontainers" ,python-sortedcontainers)))
21488 (synopsis "Serialize Python types to/from JSON")
21489 (description
21490 "This package provides functionality to serialize arbitrary data types
21491 to and from JSON. Common data types are implemented and it is easy to
21492 register custom encoders and decoders.")
21493 (license license:expat)))
21494
21495 (define-public python-ujson
21496 (package
21497 (name "python-ujson")
21498 (version "4.0.2")
21499 (source
21500 (origin
21501 (method url-fetch)
21502 (uri (pypi-uri "ujson" version))
21503 (sha256
21504 (base32
21505 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
21506 (modules '((guix build utils)))
21507 (snippet
21508 '(begin (delete-file-recursively "deps") #t))))
21509 (build-system python-build-system)
21510 (arguments
21511 `(#:phases
21512 (modify-phases %standard-phases
21513 (add-after 'unpack 'link-to-system-double-conversion
21514 (lambda* (#:key inputs #:allow-other-keys)
21515 (let ((d-c (assoc-ref inputs "double-conversion")))
21516 (substitute* "setup.py"
21517 (("./deps/double-conversion/double-conversion\"")
21518 (string-append d-c "/include/double-conversion\""))
21519 (("-lstdc++" stdc)
21520 (string-append "-L" d-c "/lib\","
21521 " \"-ldouble-conversion\","
21522 " \"" stdc)))
21523 #t)))
21524 (replace 'check
21525 (lambda* (#:key inputs outputs #:allow-other-keys)
21526 (add-installed-pythonpath inputs outputs)
21527 (invoke "pytest"))))))
21528 (native-inputs
21529 `(("double-conversion" ,double-conversion)
21530 ("python-setuptools-scm" ,python-setuptools-scm)
21531 ("python-pytest" ,python-pytest)))
21532 (home-page "https://github.com/ultrajson/ultrajson")
21533 (synopsis "Ultra fast JSON encoder and decoder for Python")
21534 (description
21535 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
21536 bindings for Python 3.")
21537 (license license:bsd-3)))
21538
21539 (define-public python-iocapture
21540 ;; The latest release is more than a year older than this commit.
21541 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
21542 (revision "1"))
21543 (package
21544 (name "python-iocapture")
21545 (version "0.1.2")
21546 (source
21547 (origin
21548 (method git-fetch)
21549 (uri (git-reference
21550 (url "https://github.com/oinume/iocapture")
21551 (commit commit)))
21552 (file-name (git-file-name name version))
21553 (sha256
21554 (base32
21555 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
21556 (build-system python-build-system)
21557 (arguments
21558 `(#:phases
21559 (modify-phases %standard-phases
21560 (delete 'check)
21561 (add-after 'install 'check
21562 (lambda* (#:key inputs outputs #:allow-other-keys)
21563 (add-installed-pythonpath inputs outputs)
21564 (invoke "py.test" "-v" "tests")
21565 #t)))))
21566 (propagated-inputs
21567 `(("python-flexmock" ,python-flexmock)
21568 ("python-pytest" ,python-pytest)
21569 ("python-pytest-cov" ,python-pytest-cov)
21570 ("python-six" ,python-six)))
21571 (home-page "https://github.com/oinume/iocapture")
21572 (synopsis "Python capturing tool for stdout and stderr")
21573 (description
21574 "This package helps you to capture the standard out (stdout) and the
21575 standard error channel (stderr) in your program.")
21576 (license license:expat))))
21577
21578 (define-public python-argh
21579 ;; There are 21 commits since the latest release containing important
21580 ;; improvements.
21581 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
21582 (revision "1"))
21583 (package
21584 (name "python-argh")
21585 (version (git-version "0.26.2" revision commit))
21586 (source
21587 (origin
21588 (method git-fetch)
21589 (uri (git-reference
21590 (url "https://github.com/neithere/argh")
21591 (commit commit)))
21592 (file-name (git-file-name name version))
21593 (sha256
21594 (base32
21595 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
21596 (build-system python-build-system)
21597 (propagated-inputs
21598 `(("python-iocapture" ,python-iocapture)
21599 ("python-mock" ,python-mock)
21600 ("python-pytest" ,python-pytest)
21601 ("python-pytest-cov" ,python-pytest-cov)
21602 ("python-pytest-xdist" ,python-pytest-xdist)
21603 ("python-tox" ,python-tox)))
21604 (home-page "https://github.com/neithere/argh/")
21605 (synopsis "Argparse wrapper with natural syntax")
21606 (description
21607 "python-argh is a small library that provides several layers of
21608 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
21609 always possible to declare a command with the highest possible (and least
21610 flexible) layer and then tune the behaviour with any of the lower layers
21611 including the native API of @code{python-argparse}.")
21612 (license license:lgpl3+))))
21613
21614 (define-public python-ppft
21615 (package
21616 (name "python-ppft")
21617 (version "1.6.6.1")
21618 (source
21619 (origin
21620 (method url-fetch)
21621 (uri (pypi-uri "ppft" version))
21622 (sha256
21623 (base32
21624 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
21625 (build-system python-build-system)
21626 (arguments '(#:tests? #f)) ; there are none
21627 (propagated-inputs
21628 `(("python-six" ,python-six)))
21629 (home-page "https://pypi.org/project/ppft/")
21630 (synopsis "Fork of Parallel Python")
21631 (description
21632 "This package is a fork of Parallel Python. The Parallel Python
21633 module (@code{pp}) provides an easy and efficient way to create
21634 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
21635 computers and clusters. It features cross-platform portability and dynamic
21636 load balancing.")
21637 (license license:bsd-3)))
21638
21639 (define-public python-pox
21640 (package
21641 (name "python-pox")
21642 (version "0.2.7")
21643 (source
21644 (origin
21645 (method url-fetch)
21646 (uri (pypi-uri "pox" version))
21647 (sha256
21648 (base32
21649 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
21650 (build-system python-build-system)
21651 (arguments
21652 `(#:phases
21653 (modify-phases %standard-phases
21654 (replace 'check
21655 (lambda _
21656 (mkdir-p "/tmp/guix")
21657 (setenv "SHELL" "bash")
21658 (setenv "USERNAME" "guix")
21659 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
21660 (invoke "py.test" "-vv")
21661 #t)))))
21662 (native-inputs
21663 `(("python-pytest" ,python-pytest)
21664 ("which" ,which)))
21665 (home-page "https://pypi.org/project/pox/")
21666 (synopsis "Python utilities for file system exploration and automated builds")
21667 (description
21668 "Pox provides a collection of utilities for navigating and manipulating
21669 file systems. This module is designed to facilitate some of the low-level
21670 operating system interactions that are useful when exploring a file system on a
21671 remote host. Pox provides Python equivalents of several shell commands such
21672 as @command{which} and @command{find}. These commands allow automated
21673 discovery of what has been installed on an operating system, and where the
21674 essential tools are located.")
21675 (license license:bsd-3)))
21676
21677 (define-public python-pathos
21678 (package
21679 (name "python-pathos")
21680 (version "0.2.5")
21681 (source
21682 (origin
21683 (method url-fetch)
21684 (uri (pypi-uri "pathos" version))
21685 (sha256
21686 (base32
21687 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
21688 (build-system python-build-system)
21689 (arguments
21690 '(#:phases
21691 (modify-phases %standard-phases
21692 (replace 'check
21693 (lambda _
21694 (setenv "PYTHONPATH"
21695 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
21696 (invoke "python" "./tests/__main__.py"))))))
21697 (propagated-inputs
21698 `(("python-dill" ,python-dill)
21699 ("python-multiprocess" ,python-multiprocess)
21700 ("python-pox" ,python-pox)
21701 ("python-ppft" ,python-ppft)))
21702 (native-inputs
21703 `(("python-pytest" ,python-pytest)))
21704 (home-page "https://pypi.org/project/pathos/")
21705 (synopsis
21706 "Parallel graph management and execution in heterogeneous computing")
21707 (description
21708 "Python-pathos is a framework for heterogeneous computing. It provides a
21709 consistent high-level interface for configuring and launching parallel
21710 computations across heterogeneous resources. Python-pathos provides configurable
21711 launchers for parallel and distributed computing, where each launcher contains
21712 the syntactic logic to configure and launch jobs in an execution environment.")
21713 (license license:bsd-3)))
21714
21715 (define-public python-flit
21716 (package
21717 (name "python-flit")
21718 (version "3.0.0")
21719 (source
21720 (origin
21721 (method url-fetch)
21722 (uri (pypi-uri "flit" version))
21723 (sha256
21724 (base32
21725 "14q8qa48bli2mniznc8b54qkwvhbik4kw99y01fi5gzzl620zzml"))))
21726 (build-system python-build-system)
21727 (arguments
21728 `(#:tests? #f)) ; XXX: Check requires network access.
21729 (home-page "https://flit.readthedocs.io/")
21730 (synopsis
21731 "Simple packaging tool for simple packages")
21732 (description
21733 "Flit is a simple way to put Python packages and modules on PyPI. Flit
21734 packages a single importable module or package at a time, using the import
21735 name as the name on PyPI. All subpackages and data files within a package
21736 are included automatically.")
21737 (license license:bsd-3)))
21738
21739 (define-public python-pathtools
21740 (package
21741 (name "python-pathtools")
21742 (version "0.1.2")
21743 (source
21744 (origin
21745 (method url-fetch)
21746 (uri (pypi-uri "pathtools" version))
21747 (sha256
21748 (base32
21749 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
21750 (build-system python-build-system)
21751 (home-page
21752 "https://github.com/gorakhargosh/pathtools")
21753 (synopsis "Path utilities for Python")
21754 (description "Pattern matching and various utilities for file systems
21755 paths.")
21756 (license license:expat)))
21757
21758 (define-public python-fastentrypoints
21759 (package
21760 (name "python-fastentrypoints")
21761 (version "0.12")
21762 (source
21763 (origin
21764 (method url-fetch)
21765 (uri (pypi-uri "fastentrypoints" version))
21766 (sha256
21767 (base32
21768 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
21769 (build-system python-build-system)
21770 (home-page
21771 "https://github.com/ninjaaron/fast-entry_points")
21772 (synopsis
21773 "Makes entry_points specified in setup.py load more quickly")
21774 (description
21775 "Using entry_points in your setup.py makes scripts that start really
21776 slowly because it imports pkg_resources. This package allows such setup
21777 scripts to load entry points more quickly.")
21778 (license license:bsd-3)))
21779
21780 (define-public python-funcparserlib
21781 (package
21782 (name "python-funcparserlib")
21783 (version "0.3.6")
21784 (source
21785 (origin
21786 (method url-fetch)
21787 (uri (pypi-uri "funcparserlib" version))
21788 (sha256
21789 (base32
21790 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
21791 (native-inputs
21792 `(("python-tox" ,python-tox)))
21793 (arguments
21794 `(#:phases
21795 (modify-phases %standard-phases
21796 (replace 'check
21797 (lambda _
21798 (invoke "tox"))))))
21799 (build-system python-build-system)
21800 (home-page
21801 "https://github.com/vlasovskikh/funcparserlib")
21802 (synopsis
21803 "Recursive descent parsing library based on functional combinators")
21804 (description
21805 "This package is a recursive descent parsing library for Python based on
21806 functional combinators. Parser combinators are just higher-order functions
21807 that take parsers as their arguments and return them as result values.")
21808 (license license:expat)))
21809
21810 (define-public python-speg
21811 (package
21812 (name "python-speg")
21813 (version "0.3")
21814 (source
21815 (origin
21816 (method url-fetch)
21817 (uri (pypi-uri "speg" version ".zip"))
21818 (sha256
21819 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
21820 (arguments
21821 `(#:tests? #f)) ;FIXME: tests fail, not sure why
21822 (native-inputs
21823 `(("unzip" ,unzip)))
21824 (build-system python-build-system)
21825 (home-page "https://github.com/avakar/speg")
21826 (synopsis "PEG-based parser interpreter with memoization")
21827 (description "This package is a PEG-based parser and interpreter with
21828 memoization.")
21829 (license license:expat)))
21830
21831 (define-public python-cson
21832 (package
21833 (name "python-cson")
21834 (version "0.8")
21835 (source
21836 (origin
21837 (method url-fetch)
21838 (uri (pypi-uri "cson" version))
21839 (sha256
21840 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
21841 (build-system python-build-system)
21842 (propagated-inputs
21843 `(("python-speg" ,python-speg)))
21844 (home-page "https://github.com/avakar/pycson")
21845 (synopsis "Parser for Coffeescript Object Notation (CSON)")
21846 (description "This package is a parser for Coffeescript Object
21847 Notation (CSON).")
21848 (license license:expat)))
21849
21850 (define-public python-asynctest
21851 (package
21852 (name "python-asynctest")
21853 (version "0.13.0")
21854 (source
21855 (origin
21856 (method url-fetch)
21857 (uri (pypi-uri "asynctest" version))
21858 (sha256
21859 (base32
21860 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
21861 (build-system python-build-system)
21862 (arguments
21863 '(#:phases
21864 (modify-phases %standard-phases
21865 (replace 'check
21866 (lambda _
21867 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
21868 (add-after 'unpack 'disable-tests
21869 (lambda* _
21870 ;; XXX: 7 tests fail out of 220. Disable them for now.
21871 (substitute* (list "test/test_selector.py"
21872 "test/test_mock.py")
21873 (("def test_events_watched_outside_test_are_ignored")
21874 "@unittest.skip('disabled by guix')
21875 def test_events_watched_outside_test_are_ignored")
21876 (("def test_awaited_from_autospec_mock.*" line)
21877 (string-append line " return True\n"))
21878 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
21879 (string-append line " return True\n"))
21880 (("def test_patch_coroutine_with_multiple_scopes.*" line)
21881 (string-append line " return True\n"))
21882 (("def test_multiple_patches_on_coroutine.*" line)
21883 (string-append line " return True\n"))
21884 (("def test_patch_coroutine_only_when_running.*" line)
21885 (string-append line " return True\n")))
21886 #t)))))
21887 (home-page "https://github.com/Martiusweb/asynctest")
21888 (synopsis "Extension of unittest for testing asyncio libraries")
21889 (description
21890 "The package asynctest is built on top of the standard unittest module
21891 and cuts down boilerplate code when testing libraries for asyncio.")
21892 (license license:asl2.0)))
21893
21894 (define-public python-aionotify
21895 (package
21896 (name "python-aionotify")
21897 (version "0.2.0")
21898 (source
21899 (origin
21900 ;; Source tarball on PyPi lacks tests
21901 (method git-fetch)
21902 (uri (git-reference
21903 (url "https://github.com/rbarrois/aionotify")
21904 (commit (string-append "v" version))))
21905 (file-name (git-file-name name version))
21906 (sha256
21907 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
21908 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
21909 (build-system python-build-system)
21910 (home-page "https://github.com/rbarrois/aionotify")
21911 (synopsis "Asyncio-powered inotify library")
21912 (description
21913 "@code{aionotify} is a simple, asyncio-based inotify library.")
21914 (license license:bsd-3)))
21915
21916 (define-public python-forbiddenfruit
21917 (package
21918 (name "python-forbiddenfruit")
21919 (version "0.1.3")
21920 (source
21921 (origin
21922 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21923 (method git-fetch)
21924 (uri (git-reference
21925 (url "https://github.com/clarete/forbiddenfruit")
21926 (commit version)))
21927 (file-name (git-file-name name version))
21928 (sha256
21929 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21930 (build-system python-build-system)
21931 (arguments
21932 '(#:phases
21933 (modify-phases %standard-phases
21934 (replace 'check
21935 (lambda _
21936 (invoke "make" "SKIP_DEPS=1"))))))
21937 (native-inputs
21938 `(("python-nose" ,python-nose)
21939 ("python-coverage" ,python-coverage)))
21940 (home-page "https://github.com/clarete/forbiddenfruit")
21941 (synopsis "Patch python built-in objects")
21942 (description "This project allows Python code to extend built-in types.")
21943 (license (list license:gpl3+ license:expat))))
21944
21945 (define-public python-k5test
21946 (package
21947 (name "python-k5test")
21948 (version "0.9.2")
21949 (source
21950 (origin
21951 (method url-fetch)
21952 (uri (pypi-uri "k5test" version))
21953 (sha256
21954 (base32
21955 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21956 (build-system python-build-system)
21957 (propagated-inputs
21958 `(("python-six" ,python-six)
21959 ;; `which`, `kadmin.local` binaries called inside library
21960 ("which" ,which)
21961 ("mit-krb5" ,mit-krb5)))
21962 (native-inputs `(("mit-krb5" ,mit-krb5)))
21963 (arguments
21964 '(#:phases
21965 (modify-phases %standard-phases
21966 (add-after 'unpack 'patch-paths
21967 (lambda* _
21968 (substitute* "k5test/realm.py"
21969 (("'kadmin_local'") "'kadmin.local'")))))))
21970 (home-page "https://github.com/pythongssapi/k5test")
21971 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21972 (description
21973 "@code{k5test} is a library for setting up self-contained Kerberos 5
21974 environments, and running Python unit tests inside those environments. It is
21975 based on the file of the same name found alongside the MIT Kerberos 5 unit
21976 tests.")
21977 (license license:isc)))
21978
21979 (define-public python-gssapi
21980 (package
21981 (name "python-gssapi")
21982 (version "1.6.12")
21983 (source
21984 (origin
21985 (method url-fetch)
21986 (uri (pypi-uri "gssapi" version))
21987 (sha256
21988 (base32
21989 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
21990 (build-system python-build-system)
21991 (propagated-inputs
21992 `(("python-decorator" ,python-decorator)
21993 ("python-six" ,python-six)))
21994 (inputs
21995 `(("mit-krb5" ,mit-krb5)))
21996 ;; for tests
21997 (native-inputs
21998 `(("python-parameterized" ,python-parameterized)
21999 ("python-k5test" ,python-k5test)
22000 ("python-nose" ,python-nose)))
22001 (home-page "https://github.com/pythongssapi/python-gssapi")
22002 (synopsis "Python GSSAPI Wrapper")
22003 (description
22004 "Python-GSSAPI provides both low-level and high level wrappers around the
22005 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
22006 also be usable with other GSSAPI mechanisms.")
22007 (license license:isc)))
22008
22009 (define-public python-check-manifest
22010 (package
22011 (name "python-check-manifest")
22012 (version "0.37")
22013 (source
22014 (origin
22015 (method url-fetch)
22016 (uri (pypi-uri "check-manifest" version))
22017 (sha256
22018 (base32
22019 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
22020 (build-system python-build-system)
22021 (native-inputs
22022 `(("python-mock" ,python-mock)
22023 ("git" ,git)))
22024 (home-page "https://github.com/mgedmin/check-manifest")
22025 (synopsis "Check MANIFEST.in in a Python source package for completeness")
22026 (description "Python package can include a MANIFEST.in file to help with
22027 sending package files to the Python Package Index. This package checks that
22028 file to ensure it completely and accurately describes your project.")
22029 (license license:expat)))
22030
22031 (define-public python-android-stringslib
22032 (package
22033 (name "python-android-stringslib")
22034 (version "0.1.2")
22035 (source
22036 (origin
22037 (method git-fetch)
22038 (uri (git-reference
22039 (url "https://framagit.org/tyreunom/python-android-strings-lib")
22040 (commit (string-append "v" version))))
22041 (file-name (git-file-name name version))
22042 (sha256
22043 (base32
22044 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
22045 (build-system python-build-system)
22046 (arguments
22047 `(#:tests? #f))
22048 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
22049 (synopsis "Android strings.xml support")
22050 (description "Android Strings Lib provides support for android's strings.xml
22051 files. These files are used to translate strings in android apps.")
22052 (license license:expat)))
22053
22054 (define-public python-watchdog
22055 (package
22056 (name "python-watchdog")
22057 (version "0.9.0")
22058 (source
22059 (origin
22060 (method url-fetch)
22061 (uri (pypi-uri "watchdog" version))
22062 (sha256
22063 (base32
22064 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
22065 (build-system python-build-system)
22066 (arguments
22067 `(#:phases
22068 (modify-phases %standard-phases
22069 (add-before 'check 'remove-failing
22070 (lambda _
22071 (delete-file "tests/test_inotify_buffer.py")
22072 (delete-file "tests/test_snapshot_diff.py")
22073 #t)))))
22074 (propagated-inputs
22075 `(("python-argh" ,python-argh)
22076 ("python-pathtools" ,python-pathtools)
22077 ("python-pyyaml" ,python-pyyaml)))
22078 (native-inputs
22079 `(("python-pytest-cov" ,python-pytest-cov)
22080 ("python-pytest-timeout" ,python-pytest-timeout)))
22081 (home-page "https://github.com/gorakhargosh/watchdog")
22082 (synopsis "File system events monitoring")
22083 (description "This package provides a way to monitor file system events
22084 such as a file modification and trigger an action. This is similar to inotify,
22085 but portable.")
22086 (license license:asl2.0)))
22087
22088 (define-public python-watchgod
22089 (package
22090 (name "python-watchgod")
22091 (version "0.6")
22092 (source
22093 (origin
22094 ;; There are no tests in the PyPI tarball.
22095 (method git-fetch)
22096 (uri (git-reference
22097 (url "https://github.com/samuelcolvin/watchgod")
22098 (commit (string-append "v" version))))
22099 (file-name (git-file-name name version))
22100 (sha256
22101 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
22102 (build-system python-build-system)
22103 (arguments
22104 `(#:phases
22105 (modify-phases %standard-phases
22106 (replace 'check
22107 (lambda _
22108 (invoke "pytest" "-vv"))))))
22109 (native-inputs
22110 `(("python-coverage" ,python-coverage)
22111 ("python-docutils" ,python-docutils)
22112 ("python-flake8" ,python-flake8)
22113 ("python-isort" ,python-isort)
22114 ("python-pycodestyle" ,python-pycodestyle)
22115 ("python-pyflakes" ,python-pyflakes)
22116 ("python-pygments" ,python-pygments)
22117 ("python-pytest" ,python-pytest)
22118 ("python-pytest-cov" ,python-pytest-cov)
22119 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
22120 ("python-pytest-mock" ,python-pytest-mock)
22121 ("python-pytest-sugar" ,python-pytest-sugar)
22122 ("python-pytest-toolbox" ,python-pytest-toolbox)))
22123 (home-page "https://github.com/samuelcolvin/watchgod")
22124 (synopsis "Simple, modern file watching and code reload in Python")
22125 (description
22126 "Simple, modern file watching and code reload in Python inspired by
22127 @code{watchdog}. Among the differences are a unified approach for each
22128 operating systems and an elegant approach to concurrency using threading.")
22129 (license license:expat)))
22130
22131 (define-public python-wget
22132 (package
22133 (name "python-wget")
22134 (version "3.2")
22135 (source
22136 (origin
22137 (method url-fetch)
22138 (uri (pypi-uri "wget" version ".zip"))
22139 (sha256
22140 (base32
22141 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
22142 (build-system python-build-system)
22143 (native-inputs `(("unzip" ,unzip)))
22144 (home-page "https://bitbucket.org/techtonik/python-wget/")
22145 (synopsis "Pure Python download utility")
22146 (description "The python-wget library provides an API to download files
22147 with features similar to the @command{wget} utility.")
22148 (license license:unlicense)))
22149
22150 (define-public offlate
22151 (package
22152 (name "offlate")
22153 (version "0.5")
22154 (source
22155 (origin
22156 (method git-fetch)
22157 (uri (git-reference
22158 (url "https://framagit.org/tyreunom/offlate")
22159 (commit version)))
22160 (file-name (git-file-name name version))
22161 (sha256
22162 (base32
22163 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
22164 (build-system python-build-system)
22165 (arguments
22166 ;; No tests
22167 `(#:tests? #f))
22168 (propagated-inputs
22169 `(("python-android-stringslib" ,python-android-stringslib)
22170 ("python-dateutil" ,python-dateutil)
22171 ("python-gitlab" ,python-gitlab)
22172 ("python-lxml" ,python-lxml)
22173 ("python-polib" ,python-polib)
22174 ("python-pyenchant" ,python-pyenchant)
22175 ("python-pygit2" ,python-pygit2)
22176 ("python-pygithub" ,python-pygithub)
22177 ("python-pyqt" ,python-pyqt)
22178 ("python-requests" ,python-requests)
22179 ("python-ruamel.yaml" ,python-ruamel.yaml)
22180 ("python-translation-finder" ,python-translation-finder)
22181 ("python-watchdog" ,python-watchdog)))
22182 (native-inputs
22183 `(("qttools" ,qttools)))
22184 (home-page "https://framagit.org/tyreunom/offlate")
22185 (synopsis "Offline translation interface for online translation tools")
22186 (description "Offlate offers a unified interface for different translation
22187 file formats, as well as many different online translation platforms. You can
22188 use it to get work from online platforms, specialized such as the Translation
22189 Project, or not such a gitlab instance when your upstream doesn't use any
22190 dedicated platform. The tool proposes a unified interface for any format and
22191 an upload option to send your work back to the platform.")
22192 (license license:gpl3+)))
22193
22194 (define-public python-titlecase
22195 (package
22196 (name "python-titlecase")
22197 (version "0.12.0")
22198 (source
22199 (origin
22200 (method url-fetch)
22201 (uri (pypi-uri "titlecase" version))
22202 (sha256
22203 (base32
22204 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
22205 (build-system python-build-system)
22206 (native-inputs
22207 `(("python-nose" ,python-nose)))
22208 (home-page "https://github.com/ppannuto/python-titlecase")
22209 (synopsis "Capitalize strings similar to book titles")
22210 (description
22211 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
22212 It capitalizes (predominantly English) strings in a way that is similar to
22213 book titles, using the New York Times Manual of Style to leave certain words
22214 lowercase.")
22215 (license license:expat)))
22216
22217 (define-public python-pypng
22218 (package
22219 (name "python-pypng")
22220 (version "0.0.20")
22221 (source
22222 (origin
22223 (method url-fetch)
22224 (uri (pypi-uri "pypng" version))
22225 (sha256
22226 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
22227 (build-system python-build-system)
22228 (home-page "https://github.com/drj11/pypng")
22229 (synopsis "Pure Python PNG image encoder/decoder")
22230 (description
22231 "The PyPNG module implements support for PNG images. It reads and writes
22232 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
22233 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
22234 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
22235 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
22236 A number of optional chunks can be specified (when writing) and
22237 understood (when reading): tRNS, bKGD, gAMA.
22238
22239 PyPNG is not a high level toolkit for image processing (like PIL) and does not
22240 aim at being a replacement or competitor. Its strength lies in fine-grained
22241 extensive support of PNG features. It can also read and write Netpbm PAM
22242 files, with a focus on its use as an intermediate format for implementing
22243 custom PNG processing.")
22244 (license license:expat)))
22245
22246 (define-public python-fuzzywuzzy
22247 (package
22248 (name "python-fuzzywuzzy")
22249 (version "0.18.0")
22250 (source
22251 (origin
22252 (method url-fetch)
22253 (uri (pypi-uri "fuzzywuzzy" version))
22254 (sha256
22255 (base32
22256 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
22257 (build-system python-build-system)
22258 (native-inputs
22259 `(("python-hypothesis" ,python-hypothesis)
22260 ("python-pycodestyle" ,python-pycodestyle)
22261 ("python-pytest" ,python-pytest)))
22262 (propagated-inputs
22263 `(("python-levenshtein" ,python-levenshtein)))
22264 (home-page "https://github.com/seatgeek/fuzzywuzzy")
22265 (synopsis "Fuzzy string matching in Python")
22266 (description "Approximate string matching using
22267 @emph{Levenshtein Distance} to calculate the differences between
22268 sequences.")
22269 (license license:gpl2)))
22270
22271 (define-public python2-fuzzywuzzy
22272 (package-with-python2 python-fuzzywuzzy))
22273
22274 (define-public python-block-tracing
22275 (package
22276 (name "python-block-tracing")
22277 (version "1.0.1")
22278 (source
22279 (origin
22280 (method url-fetch)
22281 (uri (pypi-uri "block_tracing" version))
22282 (sha256
22283 (base32
22284 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
22285 (build-system python-build-system)
22286 (arguments '(#:tests? #f)) ; no tests
22287 (home-page "https://github.com/rianhunter/block_tracing")
22288 (synopsis "Protect process memory")
22289 (description
22290 "@code{block_tracing} is a tiny Python library that can be used to
22291 prevent debuggers and other applications from inspecting the memory within
22292 your process.")
22293 (license license:expat)))
22294
22295 (define-public python-gcovr
22296 (package
22297 (name "python-gcovr")
22298 (version "4.2")
22299 (source
22300 (origin
22301 (method url-fetch)
22302 (uri (pypi-uri "gcovr" version))
22303 (sha256
22304 (base32
22305 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
22306 (build-system python-build-system)
22307 (propagated-inputs
22308 `(("python-lxml" ,python-lxml)
22309 ("python-jinja2" ,python-jinja2)))
22310 (home-page "https://gcovr.com/")
22311 (synopsis "Utility for generating code coverage results")
22312 (description
22313 "Gcovr provides a utility for managing the use of the GNU gcov
22314 utility and generating summarized code coverage results. It is inspired
22315 by the Python coverage.py package, which provides a similar utility for
22316 Python.")
22317 (license license:bsd-3)))
22318
22319 (define-public python-owslib
22320 (package
22321 (name "python-owslib")
22322 (version "0.19.2")
22323 (source
22324 (origin
22325 (method url-fetch)
22326 (uri (pypi-uri "OWSLib" version))
22327 (sha256
22328 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
22329 (build-system python-build-system)
22330 (arguments
22331 '(#:tests? #f)) ; TODO: package dependencies required for tests.
22332 (synopsis "Interface for Open Geospatial Consortium web service")
22333 (description
22334 "OWSLib is a Python package for client programming with Open Geospatial
22335 Consortium (OGC) web service (hence OWS) interface standards, and their related
22336 content models.")
22337 (home-page "https://geopython.github.io/OWSLib/")
22338 (license license:bsd-3)))
22339
22340 (define-public python-docusign-esign
22341 (package
22342 (name "python-docusign-esign")
22343 (version "3.1.0")
22344 (source (origin
22345 (method url-fetch)
22346 (uri (pypi-uri "docusign_esign" version))
22347 (sha256
22348 (base32
22349 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
22350 (build-system python-build-system)
22351 ;; Testing requires undocumented setup changes, and so testing is disabled here.
22352 (arguments `(#:tests? #f))
22353 (propagated-inputs
22354 `(("python-certifi" ,python-certifi)
22355 ("python-six" ,python-six)
22356 ("python-dateutil" ,python-dateutil)
22357 ("python-urllib3" ,python-urllib3)
22358 ("python-pyjwt" ,python-pyjwt)
22359 ("python-cryptography" ,python-cryptography)
22360 ("python-nose" ,python-nose)))
22361 (synopsis "DocuSign Python Client")
22362 (description "The Official DocuSign Python Client Library used to interact
22363 with the eSign REST API. Send, sign, and approve documents using this client.")
22364 (home-page "https://www.docusign.com/devcenter")
22365 (license license:expat)))
22366
22367 (define-public python-xattr
22368 (package
22369 (name "python-xattr")
22370 (version "0.9.7")
22371 (source
22372 (origin
22373 (method url-fetch)
22374 (uri (pypi-uri "xattr" version))
22375 (sha256
22376 (base32
22377 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
22378 (build-system python-build-system)
22379 (propagated-inputs
22380 `(("python-cffi" ,python-cffi)))
22381 (home-page "https://github.com/xattr/xattr")
22382 (synopsis
22383 "Python wrapper for extended file system attributes")
22384 (description "This package provides a Python wrapper for using extended
22385 file system attributes. Extended attributes extend the basic attributes of files
22386 and directories in the file system. They are stored as name:data pairs
22387 associated with file system objects (files, directories, symlinks, etc).")
22388 (license license:expat)))
22389
22390 (define-public python-json-logger
22391 (package
22392 (name "python-json-logger")
22393 (version "0.1.11")
22394 (source
22395 (origin
22396 (method url-fetch)
22397 (uri (pypi-uri "python-json-logger" version))
22398 (sha256
22399 (base32
22400 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
22401 (build-system python-build-system)
22402 (home-page
22403 "https://github.com/madzak/python-json-logger")
22404 (synopsis "JSON log formatter in Python")
22405 (description "This library allows standard Python logging to output log data
22406 as JSON objects. With JSON we can make our logs more readable by machines and
22407 we can stop writing custom parsers for syslog-type records.")
22408 (license license:bsd-3)))
22409
22410 (define-public python-daiquiri
22411 (package
22412 (name "python-daiquiri")
22413 (version "2.1.1")
22414 (source
22415 (origin
22416 (method url-fetch)
22417 (uri (pypi-uri "daiquiri" version))
22418 (sha256
22419 (base32
22420 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
22421 (build-system python-build-system)
22422 (propagated-inputs
22423 `(("python-json-logger" ,python-json-logger)))
22424 (native-inputs
22425 `(("python-mock" ,python-mock)
22426 ("python-pytest" ,python-pytest)
22427 ("python-setuptools-scm" ,python-setuptools-scm)
22428 ("python-six" ,python-six)))
22429 (home-page "https://github.com/jd/daiquiri")
22430 (synopsis
22431 "Library to configure Python logging easily")
22432 (description "The daiquiri library provides an easy way to configure
22433 logging in Python. It also provides some custom formatters and handlers.")
22434 (license license:asl2.0)))
22435
22436 (define-public python-pifpaf
22437 (package
22438 (name "python-pifpaf")
22439 (version "2.5.0")
22440 (source
22441 (origin
22442 (method url-fetch)
22443 (uri (pypi-uri "pifpaf" version))
22444 (sha256
22445 (base32
22446 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
22447 (build-system python-build-system)
22448 (arguments
22449 '(#:phases
22450 (modify-phases %standard-phases
22451 (replace 'check
22452 (lambda _
22453 (invoke "python" "setup.py" "testr" "--slowest"
22454 "--testr-args=until-failure"))))))
22455 (propagated-inputs
22456 `(("python-click" ,python-click)
22457 ("python-daiquiri" ,python-daiquiri)
22458 ("python-fixtures" ,python-fixtures)
22459 ("python-jinja2" ,python-jinja2)
22460 ("python-pbr" ,python-pbr)
22461 ("python-psutil" ,python-psutil)
22462 ("python-six" ,python-six)
22463 ("python-xattr" ,python-xattr)))
22464 (native-inputs
22465 `(("python-mock" ,python-mock)
22466 ("python-os-testr" ,python-os-testr)
22467 ("python-requests" ,python-requests)
22468 ("python-testrepository" ,python-testrepository)
22469 ("python-testtools" ,python-testtools)))
22470 (home-page "https://github.com/jd/pifpaf")
22471 (synopsis "Tools and fixtures to manage daemons for testing in Python")
22472 (description "Pifpaf is a suite of fixtures and a command-line tool that
22473 starts and stops daemons for a quick throw-away usage. This is typically
22474 useful when needing these daemons to run integration testing. It originally
22475 evolved from its precursor @code{overtest}.")
22476 (license license:asl2.0)))
22477
22478 (define-public python-pytest-check-links
22479 (package
22480 (name "python-pytest-check-links")
22481 (version "0.3.0")
22482 (source
22483 (origin
22484 (method url-fetch)
22485 ;; URI uses underscores
22486 (uri (pypi-uri "pytest_check_links" version))
22487 (sha256
22488 (base32
22489 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
22490 (build-system python-build-system)
22491 (propagated-inputs
22492 `(("python-docutils" ,python-docutils)
22493 ("python-html5lib" ,python-html5lib)
22494 ("python-nbconvert" ,python-nbconvert)
22495 ("python-nbformat" ,python-nbformat)
22496 ("python-pytest" ,python-pytest)
22497 ("python-six" ,python-six)))
22498 (native-inputs
22499 `(("python-pbr-minimal" ,python-pbr-minimal)))
22500 (home-page "https://github.com/minrk/pytest-check-links")
22501 (synopsis "Check links in files")
22502 (description "This package provides a pytest plugin that checks URLs for
22503 HTML-containing files.")
22504 (license license:bsd-3)))
22505
22506 (define-public python-json5
22507 (package
22508 (name "python-json5")
22509 (version "0.8.5")
22510 (source
22511 (origin
22512 ;; sample.json5 is missing from PyPi source tarball
22513 (method git-fetch)
22514 (uri (git-reference
22515 (url "https://github.com/dpranke/pyjson5")
22516 (commit (string-append "v" version))))
22517 (file-name (git-file-name name version))
22518 (sha256
22519 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
22520 (build-system python-build-system)
22521 (home-page "https://github.com/dpranke/pyjson5")
22522 (synopsis
22523 "Python implementation of the JSON5 data format")
22524 (description
22525 "JSON5 extends the JSON data interchange format to make it slightly more
22526 usable as a configuration language. This Python package implements parsing and
22527 dumping of JSON5 data structures.")
22528 (license license:asl2.0)))
22529
22530 (define-public python-frozendict
22531 (package
22532 (name "python-frozendict")
22533 (version "1.2")
22534 (source
22535 (origin
22536 (method url-fetch)
22537 (uri (pypi-uri "frozendict" version))
22538 (sha256
22539 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
22540 (build-system python-build-system)
22541 (home-page "https://github.com/slezica/python-frozendict")
22542 (synopsis "Simple immutable mapping for Python")
22543 (description
22544 "@dfn{frozendict} is an immutable wrapper around dictionaries that
22545 implements the complete mapping interface. It can be used as a drop-in
22546 replacement for dictionaries where immutability is desired.")
22547 (license license:expat)))
22548
22549 (define-public python-unpaddedbase64
22550 (package
22551 (name "python-unpaddedbase64")
22552 (version "1.1.0")
22553 (source
22554 (origin
22555 (method git-fetch)
22556 (uri (git-reference
22557 (url "https://github.com/matrix-org/python-unpaddedbase64")
22558 (commit (string-append "v" version))))
22559 (file-name (git-file-name name version))
22560 (sha256
22561 (base32
22562 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
22563 (build-system python-build-system)
22564 (home-page "https://pypi.org/project/unpaddedbase64/")
22565 (synopsis "Encode and decode Base64 without “=” padding")
22566 (description
22567 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
22568 using “=” characters. However this conveys no benefit so many protocols
22569 choose to use Base64 without the “=” padding.")
22570 (license license:asl2.0)))
22571
22572 (define-public python-py-cpuinfo
22573 (package
22574 (name "python-py-cpuinfo")
22575 (version "5.0.0")
22576 (source
22577 (origin
22578 (method url-fetch)
22579 (uri (pypi-uri "py-cpuinfo" version))
22580 (sha256
22581 (base32
22582 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
22583 (build-system python-build-system)
22584 (home-page "https://github.com/workhorsy/py-cpuinfo")
22585 (synopsis "Get CPU info with Python")
22586 (description
22587 "This Python module returns the CPU info by using the best sources of
22588 information for your operating system.")
22589 (license license:expat)))
22590
22591 (define-public python-canonicaljson
22592 (package
22593 (name "python-canonicaljson")
22594 (version "1.4.0")
22595 (source
22596 (origin
22597 (method url-fetch)
22598 (uri (pypi-uri "canonicaljson" version))
22599 (sha256
22600 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
22601 (build-system python-build-system)
22602 (propagated-inputs
22603 `(("python-six" ,python-six)
22604 ("python-frozendict" ,python-frozendict)
22605 ("python-simplejson" ,python-simplejson)))
22606 (home-page "https://github.com/matrix-org/python-canonicaljson")
22607 (synopsis "Canonical JSON")
22608 (description
22609 "Deterministically encode JSON.
22610
22611 @itemize
22612 @item Encodes objects and arrays as RFC 7159 JSON.
22613 @item Sorts object keys so that you get the same result each time.
22614 @item Has no insignificant whitespace to make the output as small as possible.
22615 @item Escapes only the characters that must be escaped, U+0000 to
22616 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
22617 @item Uses the shortest escape sequence for each escaped character.
22618 @item Encodes the JSON as UTF-8.
22619 @item Can encode frozendict immutable dictionaries.
22620 @end itemize")
22621 (license license:asl2.0)))
22622
22623 (define-public python-signedjson
22624 (package
22625 (name "python-signedjson")
22626 (version "1.1.1")
22627 (source
22628 (origin
22629 (method url-fetch)
22630 (uri (pypi-uri "signedjson" version))
22631 (sha256
22632 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
22633 (build-system python-build-system)
22634 (propagated-inputs
22635 `(("python-canonicaljson" ,python-canonicaljson)
22636 ("python-importlib-metadata" ,python-importlib-metadata)
22637 ("python-pynacl" ,python-pynacl)
22638 ("python-typing-extensions" ,python-typing-extensions)
22639 ("python-unpaddedbase64" ,python-unpaddedbase64)))
22640 (native-inputs
22641 `(("python-setuptools-scm" ,python-setuptools-scm)))
22642 (home-page "https://github.com/matrix-org/python-signedjson")
22643 (synopsis "Sign JSON objects with ED25519 signatures")
22644 (description
22645 "Sign JSON objects with ED25519 signatures.
22646
22647 @itemize
22648 @item More than one entity can sign the same object.
22649 @item Each entity can sign the object with more than one key making it easier to
22650 rotate keys
22651 @item ED25519 can be replaced with a different algorithm.
22652 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
22653 key.
22654 @end itemize")
22655 (license license:asl2.0)))
22656
22657 (define-public python-daemonize
22658 (package
22659 (name "python-daemonize")
22660 (version "2.5.0")
22661 (source
22662 (origin
22663 (method url-fetch)
22664 (uri (pypi-uri "daemonize" version))
22665 (sha256
22666 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
22667 (build-system python-build-system)
22668 (home-page "https://github.com/thesharp/daemonize")
22669 (synopsis "Library for writing system daemons in Python")
22670 (description "Daemonize is a library for writing system daemons in Python.")
22671 (license license:expat)))
22672
22673 (define-public python-pymacaroons
22674 (package
22675 (name "python-pymacaroons")
22676 (version "0.13.0")
22677 (source
22678 (origin
22679 (method url-fetch)
22680 (uri (pypi-uri "pymacaroons" version))
22681 (sha256
22682 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
22683 (build-system python-build-system)
22684 (propagated-inputs
22685 `(("python-six" ,python-six)
22686 ("python-pynacl" ,python-pynacl)))
22687 (home-page "https://github.com/ecordell/pymacaroons")
22688 (synopsis "Python Macaroon Library")
22689 (description
22690 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
22691 tokens, macaroons embed caveats that define specific authorization
22692 requirements for the target service, the service that issued the root macaroon
22693 and which is capable of verifying the integrity of macaroons it receives.
22694
22695 Macaroons allow for delegation and attenuation of authorization. They are
22696 simple and fast to verify, and decouple authorization policy from the
22697 enforcement of that policy.")
22698 (license license:expat)))
22699
22700 (define-public python-ldap3
22701 (package
22702 (name "python-ldap3")
22703 (version "2.7")
22704 (home-page "https://github.com/cannatag/ldap3")
22705 (source
22706 (origin
22707 (method git-fetch)
22708 (uri (git-reference (url home-page)
22709 (commit (string-append "v" version))))
22710 (file-name (git-file-name name version))
22711 (sha256
22712 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
22713 (build-system python-build-system)
22714 (arguments
22715 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
22716 #:phases (modify-phases %standard-phases
22717 (replace 'check
22718 (lambda* (#:key tests? #:allow-other-keys)
22719 (when tests?
22720 (invoke "nosetests" "-s" "test"))
22721 #t)))))
22722 (native-inputs
22723 `(("python-nose" ,python-nose)))
22724 (propagated-inputs
22725 `(("python-gssapi" ,python-gssapi)
22726 ("python-pyasn1" ,python-pyasn1)))
22727 (synopsis "Python LDAP client")
22728 (description
22729 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
22730 library.")
22731 (license license:lgpl3+)))
22732
22733 (define-public python-boltons
22734 (package
22735 (name "python-boltons")
22736 (version "20.0.0")
22737 (source
22738 (origin
22739 (method url-fetch)
22740 (uri (pypi-uri "boltons" version))
22741 (sha256
22742 (base32
22743 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
22744 (build-system python-build-system)
22745 (home-page "https://github.com/mahmoud/boltons")
22746 (synopsis "Extensions to the Python standard library")
22747 (description
22748 "Boltons is a set of over 230 pure-Python utilities in the same spirit
22749 as — and yet conspicuously missing from — the standard library, including:
22750
22751 @itemize
22752 @item Atomic file saving, bolted on with fileutils
22753 @item A highly-optimized OrderedMultiDict, in dictutils
22754 @item Two types of PriorityQueue, in queueutils
22755 @item Chunked and windowed iteration, in iterutils
22756 @item Recursive data structure iteration and merging, with iterutils.remap
22757 @item Exponential backoff functionality, including jitter, through
22758 iterutils.backoff
22759 @item A full-featured TracebackInfo type, for representing stack traces, in
22760 tbutils
22761 @end itemize")
22762 (license license:bsd-3)))
22763
22764 (define-public python-eliot
22765 (package
22766 (name "python-eliot")
22767 (version "1.12.0")
22768 (source
22769 (origin
22770 (method url-fetch)
22771 (uri (pypi-uri "eliot" version))
22772 (sha256
22773 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
22774 (build-system python-build-system)
22775 (arguments
22776 `(#:phases
22777 (modify-phases %standard-phases
22778 (add-after 'unpack 'remove-journald-support
22779 (lambda _
22780 (for-each delete-file
22781 '("eliot/tests/test_journald.py"
22782 "eliot/journald.py"))
22783 #t))
22784 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
22785 ;; remove command-line tool's tests. TODO eliot-prettyprint should
22786 ;; be installed and these tests should pass.
22787 (lambda _
22788 (delete-file "eliot/tests/test_prettyprint.py")
22789 #t)))))
22790 (propagated-inputs
22791 `(("python-boltons" ,python-boltons)
22792 ("python-pyrsistent" ,python-pyrsistent)
22793 ("python-six" ,python-six)
22794 ("python-zope-interface" ,python-zope-interface)))
22795 (native-inputs
22796 `(("python-black" ,python-black)
22797 ("python-coverage" ,python-coverage)
22798 ("python-dask" ,python-dask)
22799 ("python-flake8" ,python-flake8)
22800 ("python-hypothesis" ,python-hypothesis)
22801 ("python-pytest" ,python-pytest)
22802 ("python-setuptools" ,python-setuptools)
22803 ("python-sphinx" ,python-sphinx)
22804 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22805 ("python-testtools" ,python-testtools)
22806 ("python-twine" ,python-twine)
22807 ("python-twisted" ,python-twisted)))
22808 (home-page "https://github.com/itamarst/eliot/")
22809 (synopsis "Eliot: the logging system that tells you why it happened")
22810 (description
22811 "@dfn{eliot} is a Python logging system that outputs causal chains of
22812 actions: actions can spawn other actions, and eventually they either succeed
22813 or fail. The resulting logs tell you the story of what your software did: what
22814 happened, and what caused it.")
22815 (license license:asl2.0)))
22816
22817 (define-public python-pem
22818 (package
22819 (name "python-pem")
22820 (version "20.1.0")
22821 (source
22822 (origin
22823 (method url-fetch)
22824 (uri (pypi-uri "pem" version))
22825 (sha256
22826 (base32
22827 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
22828 (build-system python-build-system)
22829 (native-inputs
22830 `(("python-certifi" ,python-certifi)
22831 ("python-coverage" ,python-coverage)
22832 ("python-pretend" ,python-pretend)
22833 ("python-pyopenssl" ,python-pyopenssl)
22834 ("python-pytest" ,python-pytest)
22835 ("python-sphinx" ,python-sphinx)
22836 ("python-twisted" ,python-twisted)))
22837 (home-page "https://pem.readthedocs.io/")
22838 (synopsis "Easy PEM file parsing in Python")
22839 (description
22840 "This package provides a Python module for parsing and splitting PEM files.")
22841 (license license:expat)))
22842
22843 (define-public python-txsni
22844 ;; We need a few commits on top of 0.1.9 for compatibility with newer
22845 ;; Python and OpenSSL.
22846 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
22847 (revision "0"))
22848 (package
22849 (name "python-txsni")
22850 (version (git-version "0.1.9" revision commit))
22851 (home-page "https://github.com/glyph/txsni")
22852 (source
22853 (origin
22854 (method git-fetch)
22855 (uri (git-reference (url home-page) (commit commit)))
22856 (file-name (git-file-name name version))
22857 (sha256
22858 (base32
22859 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
22860 (build-system python-build-system)
22861 (propagated-inputs
22862 `(("python-pyopenssl" ,python-pyopenssl)
22863 ("python-service-identity" ,python-service-identity)
22864 ("python-twisted" ,python-twisted)))
22865 (synopsis "Run TLS servers with Twisted")
22866 (description
22867 "This package provides an easy-to-use SNI endpoint for use
22868 with the Twisted web framework.")
22869 (license license:expat))))
22870
22871 (define-public python-txacme
22872 (package
22873 (name "python-txacme")
22874 (version "0.9.2")
22875 (source
22876 (origin
22877 (method url-fetch)
22878 (uri (pypi-uri "txacme" version))
22879 (sha256
22880 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22881 (build-system python-build-system)
22882 (propagated-inputs
22883 `(("python-acme" ,python-acme)
22884 ("python-attrs" ,python-attrs)
22885 ("python-eliot" ,python-eliot)
22886 ("python-josepy" ,python-josepy)
22887 ("python-pem" ,python-pem)
22888 ("python-treq" ,python-treq)
22889 ("python-twisted" ,python-twisted)
22890 ("python-txsni" ,python-txsni)))
22891 (native-inputs
22892 `(("python-fixtures" ,python-fixtures)
22893 ("python-hypothesis" ,python-hypothesis)
22894 ("python-mock" ,python-mock)
22895 ("python-service-identity"
22896 ,python-service-identity)
22897 ("python-testrepository" ,python-testrepository)
22898 ("python-testscenarios" ,python-testscenarios)
22899 ("python-testtools" ,python-testtools)))
22900 (home-page "https://github.com/twisted/txacme")
22901 (synopsis "Twisted implexmentation of the ACME protocol")
22902 (description
22903 "ACME is Automatic Certificate Management Environment, a protocol that
22904 allows clients and certificate authorities to automate verification and
22905 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22906 Certificate Authority.
22907
22908 txacme is an implementation of the protocol for Twisted, the event-driven
22909 networking engine for Python.")
22910 (license license:expat)))
22911
22912 (define-public python-pysaml2
22913 (package
22914 (name "python-pysaml2")
22915 (version "6.5.1")
22916 (source
22917 (origin
22918 (method url-fetch)
22919 (uri (pypi-uri "pysaml2" version))
22920 (sha256
22921 (base32
22922 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
22923 (build-system python-build-system)
22924 (propagated-inputs
22925 `(("python-cryptography" ,python-cryptography)
22926 ("python-dateutil" ,python-dateutil)
22927 ("python-defusedxml" ,python-defusedxml)
22928 ("python-importlib-resources"
22929 ,python-importlib-resources)
22930 ("python-pyopenssl" ,python-pyopenssl)
22931 ("python-pytz" ,python-pytz)
22932 ("python-requests" ,python-requests)
22933 ("python-six" ,python-six)
22934 ("python-xmlschema" ,python-xmlschema)))
22935 (home-page "https://idpy.org")
22936 (synopsis "Python implementation of SAML Version 2 Standard")
22937 (description
22938 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22939 It contains all necessary pieces for building a SAML2 service provider or
22940 an identity provider. The distribution contains examples of both.
22941
22942 This package was originally written to work in a WSGI environment, but
22943 there are extensions that allow you to use it with other frameworks.")
22944 (license license:asl2.0)))
22945
22946 (define-public python-click-plugins
22947 (package
22948 (name "python-click-plugins")
22949 (version "1.1.1")
22950 (source
22951 (origin
22952 (method url-fetch)
22953 (uri (pypi-uri "click-plugins" version))
22954 (sha256
22955 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22956 (build-system python-build-system)
22957 (native-inputs
22958 `(("python-pytest" ,python-pytest)))
22959 (propagated-inputs
22960 `(("python-click" ,python-click)))
22961 (synopsis "Extension for Click to register external CLI commands")
22962 (description "This package provides n extension module for Click to
22963 register external CLI commands via setuptools entry-points.")
22964 (home-page "https://github.com/click-contrib/click-plugins")
22965 (license license:bsd-3)))
22966
22967 (define-public python-diceware
22968 (package
22969 (name "python-diceware")
22970 (version "0.9.6")
22971 (source
22972 (origin
22973 (method url-fetch)
22974 (uri (pypi-uri "diceware" version))
22975 (sha256
22976 (base32
22977 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22978 (build-system python-build-system)
22979 (native-inputs
22980 `(("python-coverage" ,python-coverage)
22981 ("python-pytest" ,python-pytest)
22982 ("python-pytest-runner" ,python-pytest-runner)))
22983 (home-page "https://github.com/ulif/diceware/")
22984 (synopsis "Generates memorable passphrases")
22985 (description "This package generates passphrases by concatenating words
22986 randomly picked from wordlists. It supports several sources of
22987 randomness (including real life dice) and different wordlists (including
22988 cryptographically signed ones).")
22989 (license license:gpl3+)))
22990
22991 (define-public python-dictdiffer
22992 (package
22993 (name "python-dictdiffer")
22994 (version "0.8.1")
22995 (source (origin
22996 (method url-fetch)
22997 (uri (pypi-uri "dictdiffer" version))
22998 (sha256
22999 (base32
23000 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
23001 (build-system python-build-system)
23002 (native-inputs
23003 `(("python-check-manifest" ,python-check-manifest)
23004 ("python-coverage" ,python-coverage)
23005 ("python-isort" ,python-isort)
23006 ("python-mock" ,python-mock)
23007 ("python-pydoctstyle" ,python-pydocstyle)
23008 ("python-pytest-cache" ,python-pytest-cache)
23009 ("python-pytest-cov" ,python-pytest-cov)
23010 ("python-pytest-pep8" ,python-pytest-pep8)
23011 ("python-pytest-runner" ,python-pytest-runner)
23012 ("python-pytest" ,python-pytest)
23013 ("python-setuptools-scm" ,python-setuptools-scm)
23014 ("python-tox" ,python-tox)))
23015 (home-page "https://github.com/inveniosoftware/dictdiffer")
23016 (synopsis "Diff and patch Python dictionary objects")
23017 (description
23018 "Dictdiffer is a Python module that helps you to diff and patch
23019 dictionaries.")
23020 (license license:expat)))
23021
23022 (define-public pyzo
23023 (package
23024 (name "pyzo")
23025 (version "4.11.2")
23026 (source
23027 (origin
23028 (method url-fetch)
23029 (uri (pypi-uri "pyzo" version))
23030 (sha256
23031 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
23032 (build-system python-build-system)
23033 (arguments
23034 `(#:phases
23035 (modify-phases %standard-phases
23036 (add-before 'check 'fix-home-directory
23037 (lambda _
23038 ;; Tests fail with "Permission denied: '/homeless-shelter'".
23039 (setenv "HOME" "/tmp")
23040 #t)))
23041 ;; Tests fail with "Uncaught Python exception: python: undefined
23042 ;; symbol: objc_getClass".
23043 #:tests? #f))
23044 (propagated-inputs
23045 `(("python-pyqt" ,python-pyqt)))
23046 (home-page "https://pyzo.org")
23047 (synopsis
23048 "Python IDE for scientific computing")
23049 (description
23050 "Pyzo is a Python IDE focused on interactivity and introspection,
23051 which makes it very suitable for scientific computing. Its practical
23052 design is aimed at simplicity and efficiency.
23053
23054 It consists of two main components, the editor and the shell, and uses
23055 a set of pluggable tools to help the programmer in various ways. Some
23056 example tools are source structure, project manager, interactive help,
23057 workspace...")
23058 (license license:bsd-2)))
23059
23060 (define-public python-osc
23061 (package
23062 (name "python-osc")
23063 (version "1.7.4")
23064 (source
23065 (origin
23066 (method url-fetch)
23067 (uri (pypi-uri "python-osc" version))
23068 (sha256
23069 (base32
23070 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
23071 (build-system python-build-system)
23072 (home-page "https://github.com/attwad/python-osc")
23073 (synopsis "Open Sound Control server and client implementations")
23074 (description
23075 "@code{python-osc} is a pure Python library with no external
23076 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
23077 Open Sound Control 1.0} specification.")
23078 (license license:unlicense)))
23079
23080 (define-public python-voluptuous
23081 (package
23082 (name "python-voluptuous")
23083 (version "0.11.7")
23084 (source
23085 (origin
23086 (method url-fetch)
23087 (uri (pypi-uri "voluptuous" version))
23088 (sha256
23089 (base32
23090 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
23091 (build-system python-build-system)
23092 (native-inputs
23093 `(("python-nose" ,python-nose)))
23094 (home-page "https://github.com/alecthomas/voluptuous")
23095 (synopsis "Python data validation library")
23096 (description
23097 "Voluptuous is a Python data validation library. It is primarily
23098 intended for validating data coming into Python as JSON, YAML, etc.")
23099 (license license:bsd-3)))
23100
23101 (define-public python-cmd2
23102 (package
23103 (name "python-cmd2")
23104 (version "1.0.2")
23105 (source
23106 (origin
23107 (method url-fetch)
23108 (uri (pypi-uri "cmd2" version))
23109 (sha256
23110 (base32
23111 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
23112 (build-system python-build-system)
23113 (propagated-inputs
23114 `(("python-attrs" ,python-attrs)
23115 ("python-colorama" ,python-colorama)
23116 ("python-pyperclip" ,python-pyperclip)
23117 ("python-wcwidth" ,python-wcwidth)))
23118 (native-inputs
23119 `(("python-codecov" ,python-codecov)
23120 ("python-coverage" ,python-coverage)
23121 ("python-doc8" ,python-doc8)
23122 ("python-flake8" ,python-flake8)
23123 ("python-invoke" ,python-invoke)
23124 ("python-mock" ,python-mock)
23125 ("python-pytest" ,python-pytest)
23126 ("python-pytest-cov" ,python-pytest-cov)
23127 ("python-pytest-mock" ,python-pytest-mock)
23128 ("python-setuptools-scm" ,python-setuptools-scm)
23129 ("python-sphinx" ,python-sphinx)
23130 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
23131 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
23132 ("python-tox" ,python-tox)
23133 ("python-twine" ,python-twine)
23134 ("which" ,which)))
23135 (home-page "https://github.com/python-cmd2/cmd2")
23136 (synopsis "Tool for building interactive command line applications")
23137 (description
23138 "Cmd2 is a tool for building interactive command line applications in
23139 Python. Its goal is to make it quick and easy for developers to build
23140 feature-rich and user-friendly interactive command line applications. It
23141 provides a simple API which is an extension of Python's built-in @code{cmd}
23142 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
23143 make your life easier and eliminates much of the boilerplate code which would
23144 be necessary when using @code{cmd}.")
23145 (license license:expat)))
23146
23147 (define-public python-pytidylib
23148 (package
23149 (name "python-pytidylib")
23150 (version "0.3.2")
23151 (source (origin
23152 (method url-fetch)
23153 (uri (pypi-uri "pytidylib" version))
23154 (sha256
23155 (base32
23156 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
23157 (build-system python-build-system)
23158 (arguments
23159 '(#:phases
23160 (modify-phases %standard-phases
23161 (add-before 'build 'qualify-libtidy
23162 (lambda* (#:key inputs #:allow-other-keys)
23163 (let ((libtidy (string-append (assoc-ref inputs "tidy")
23164 "/lib/libtidy.so")))
23165 (substitute* "tidylib/tidy.py"
23166 (("ctypes\\.util\\.find_library\\('tidy'\\)")
23167 (format #f "'~a'" libtidy)))
23168 #t))))))
23169 (inputs `(("tidy" ,tidy)))
23170 (home-page "https://github.com/countergram/pytidylib")
23171 (synopsis "Python wrapper for HTML Tidy library")
23172 (description
23173 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
23174 allows you, from Python code, to “fix” invalid (X)HTML markup.")
23175 (license license:expat)))
23176
23177 (define-public python2-pytidylib
23178 (package-with-python2 python-pytidylib))
23179
23180 (define-public python-mujson
23181 (package
23182 (name "python-mujson")
23183 (version "1.4")
23184 (source
23185 (origin
23186 (method url-fetch)
23187 (uri (pypi-uri "mujson" version))
23188 (sha256
23189 (base32
23190 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
23191 (build-system python-build-system)
23192 (home-page "https://github.com/mattgiles/mujson")
23193 (synopsis "Use the fastest JSON functions available at import time")
23194 (description "This package selects the fastest JSON functions available
23195 at import time.")
23196 (license license:expat)))
23197
23198 (define-public python-bashlex
23199 (package
23200 (name "python-bashlex")
23201 (version "0.14")
23202 (source
23203 (origin
23204 (method url-fetch)
23205 (uri (pypi-uri "bashlex" version))
23206 (sha256
23207 (base32
23208 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
23209 (build-system python-build-system)
23210 (arguments
23211 `(#:phases
23212 (modify-phases %standard-phases
23213 (add-before 'build 'pregenerate-yacc-tables
23214 (lambda _
23215 ;; parser.py caches tables, which attempts to write to site lib
23216 ;; see https://github.com/idank/bashlex/issues/51
23217 (invoke "python" "-c" "import bashlex"))))))
23218 (home-page
23219 "https://github.com/idank/bashlex")
23220 (synopsis "Python parser for bash")
23221 (description "@code{bashlex} is a Python port of the parser used
23222 internally by GNU bash.
23223
23224 For the most part it's transliterated from C, the major differences are:
23225
23226 @itemize
23227 @item it does not execute anything
23228 @item it is reentrant
23229 @item it generates a complete AST
23230 @end itemize
23231 ")
23232 (license license:gpl3+)))
23233
23234 (define-public python-jinxed
23235 (package
23236 (name "python-jinxed")
23237 (version "1.0.0")
23238 (source
23239 (origin
23240 (method url-fetch)
23241 (uri (pypi-uri "jinxed" version))
23242 (sha256
23243 (base32
23244 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
23245 (build-system python-build-system)
23246 (arguments
23247 '(#:phases
23248 (modify-phases %standard-phases
23249 (add-before 'check 'set-environment-variables
23250 (lambda* (#:key inputs #:allow-other-keys)
23251 (let ((ncurses (assoc-ref inputs "ncurses")))
23252 (setenv "TERM" "LINUX")
23253 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
23254 #t))))
23255 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
23256 (native-inputs
23257 `(("ncurses" ,ncurses)))
23258 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
23259 (synopsis "Jinxed Terminal Library")
23260 (description
23261 "Jinxed is an implementation of a subset of the Python curses library.")
23262 (license license:mpl2.0)))
23263
23264 (define-public python-blessed
23265 (package
23266 (name "python-blessed")
23267 (version "1.17.8")
23268 (source
23269 (origin
23270 (method url-fetch)
23271 (uri (pypi-uri "blessed" version))
23272 (sha256
23273 (base32
23274 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
23275 (modules '((guix build utils)))
23276 (snippet
23277 '(begin
23278 ;; Don't get hung up on Windows test failures.
23279 (delete-file "blessed/win_terminal.py") #t))))
23280 (build-system python-build-system)
23281 (propagated-inputs
23282 `(("python-jinxed" ,python-jinxed)
23283 ("python-six" ,python-six)
23284 ("python-wcwidth" ,python-wcwidth)))
23285 (native-inputs
23286 `(("python-mock" ,python-mock)
23287 ("python-pytest" ,python-pytest)))
23288 (home-page "https://github.com/jquast/blessed")
23289 (synopsis "Wrapper around terminal capabilities")
23290 (description
23291 "Blessed is a thin, practical wrapper around terminal styling, screen
23292 positioning, and keyboard input.")
23293 (license license:expat)))
23294
23295 (define-public python-readme-renderer
23296 (package
23297 (name "python-readme-renderer")
23298 (version "26.0")
23299 (source
23300 (origin
23301 (method url-fetch)
23302 (uri (pypi-uri "readme_renderer" version))
23303 (sha256
23304 (base32
23305 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
23306 (build-system python-build-system)
23307 (propagated-inputs
23308 `(("python-bleach" ,python-bleach)
23309 ("python-docutils" ,python-docutils)
23310 ("python-pygments" ,python-pygments)
23311 ("python-six" ,python-six)))
23312 (native-inputs
23313 `(("python-mock" ,python-mock)
23314 ("python-pytest" ,python-pytest)))
23315 (home-page "https://github.com/pypa/readme_renderer")
23316 (synopsis "Render README files in Warehouse")
23317 (description
23318 "Readme Renderer is a library that will safely render arbitrary README
23319 files into HTML. It is designed to be used in Warehouse to render the
23320 @code{long_description} for packages. It can handle Markdown, reStructuredText,
23321 and plain text.")
23322 (license license:asl2.0)))
23323
23324 (define-public python-lazr-delegates
23325 (package
23326 (name "python-lazr-delegates")
23327 (version "2.0.4")
23328 (source
23329 (origin
23330 (method url-fetch)
23331 (uri (pypi-uri "lazr.delegates" version))
23332 (sha256
23333 (base32
23334 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
23335 (build-system python-build-system)
23336 (arguments
23337 '(#:phases
23338 (modify-phases %standard-phases
23339 (replace 'check
23340 (lambda _
23341 (invoke "python" "setup.py" "nosetests"))))))
23342 (native-inputs
23343 `(("python-nose" ,python-nose)))
23344 (propagated-inputs
23345 `(("python-zope-interface" ,python-zope-interface)))
23346 (home-page "https://launchpad.net/lazr.delegates")
23347 (synopsis "Easily write objects that delegate behavior")
23348 (description
23349 "The @code{lazr.delegates} package makes it easy to write objects that
23350 delegate behavior to another object. The new object adds some property or
23351 behavior on to the other object, while still providing the underlying interface,
23352 and delegating behavior.")
23353 (license license:lgpl3)))
23354
23355 (define-public python-lazr-config
23356 (package
23357 (name "python-lazr-config")
23358 (version "2.2.2")
23359 (source
23360 (origin
23361 (method url-fetch)
23362 (uri (pypi-uri "lazr.config" version))
23363 (sha256
23364 (base32
23365 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
23366 (build-system python-build-system)
23367 (arguments
23368 '(#:phases
23369 (modify-phases %standard-phases
23370 (replace 'check
23371 (lambda _
23372 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
23373 (native-inputs
23374 `(("python-nose" ,python-nose)))
23375 (propagated-inputs
23376 `(("python-lazr-delegates" ,python-lazr-delegates)
23377 ("python-zope-interface" ,python-zope-interface)))
23378 (home-page "https://launchpad.net/lazr.config")
23379 (synopsis "Create configuration schemas and process and validate configurations")
23380 (description
23381 "The LAZR config system is typically used to manage process configuration.
23382 Process configuration is for saying how things change when we run systems on
23383 different machines, or under different circumstances. This system uses ini-like
23384 file format of section, keys, and values. The config file supports inheritance
23385 to minimize duplication of information across files. The format supports schema
23386 validation.")
23387 (license license:lgpl3)))
23388
23389 (define-public python-flufl-bounce
23390 (package
23391 (name "python-flufl-bounce")
23392 (version "3.0.1")
23393 (source
23394 (origin
23395 (method url-fetch)
23396 (uri (pypi-uri "flufl.bounce" version))
23397 (sha256
23398 (base32
23399 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
23400 (build-system python-build-system)
23401 (propagated-inputs
23402 `(("python-atpublic" ,python-atpublic)
23403 ("python-zope-interface" ,python-zope-interface)))
23404 (native-inputs
23405 `(("python-nose2" ,python-nose2)))
23406 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
23407 (synopsis "Email bounce detectors")
23408 (description "The @code{flufl.bounce} library provides a set of heuristics
23409 and an API for detecting the original bouncing email addresses from a bounce
23410 message. Many formats found in the wild are supported, as are VERP and
23411 RFC 3464.")
23412 (license (list license:asl2.0
23413 license:lgpl3)))) ; only for setup_headers.py
23414
23415 (define-public python-flufl-i18n
23416 (package
23417 (name "python-flufl-i18n")
23418 (version "3.0")
23419 (source
23420 (origin
23421 (method url-fetch)
23422 (uri (pypi-uri "flufl.i18n" version))
23423 (sha256
23424 (base32
23425 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
23426 (build-system python-build-system)
23427 (propagated-inputs
23428 `(("python-atpublic" ,python-atpublic)))
23429 (home-page "https://flufli18n.readthedocs.io")
23430 (synopsis "API for Python internationalization")
23431 (description
23432 "This package provides a high-level, convenient API for managing
23433 internationalization/translation contexts in Python applications. There is a
23434 simple API for single-context applications, such as command line scripts which
23435 only need to translate into one language during the entire course of their
23436 execution. There is a more flexible, but still convenient API for multi-context
23437 applications, such as servers, which may need to switch language contexts for
23438 different tasks.")
23439 (license license:asl2.0)))
23440
23441 (define-public python-flufl-lock
23442 (package
23443 (name "python-flufl-lock")
23444 (version "4.0")
23445 (source
23446 (origin
23447 (method url-fetch)
23448 (uri (pypi-uri "flufl.lock" version))
23449 (sha256
23450 (base32
23451 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
23452 (build-system python-build-system)
23453 (propagated-inputs
23454 `(("python-atpublic" ,python-atpublic)
23455 ("python-psutil" ,python-psutil)))
23456 (home-page "https://flufllock.readthedocs.io")
23457 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
23458 (description
23459 "The @dfn{flufl.lock} package provides NFS-safe file locking with
23460 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
23461 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
23462 and have a maximum lifetime built-in.")
23463 (license (list license:asl2.0
23464 license:lgpl3)))) ; only for setup_helpers.py
23465
23466 (define-public python-flufl-testing
23467 (package
23468 (name "python-flufl-testing")
23469 (version "0.8")
23470 (source
23471 (origin
23472 (method url-fetch)
23473 (uri (pypi-uri "flufl.testing" version))
23474 (sha256
23475 (base32
23476 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
23477 (build-system python-build-system)
23478 (native-inputs
23479 `(("python-nose2" ,python-nose2)))
23480 (home-page "https://gitlab.com/warsaw/flufl.testing")
23481 (synopsis "Collection of test tool plugins")
23482 (description
23483 "This package contains a small collection of test tool plugins for
23484 @code{nose2} and @code{flake8}.")
23485 (license license:asl2.0)))
23486
23487 (define-public python-devtools
23488 (package
23489 (name "python-devtools")
23490 (version "0.6")
23491 (source
23492 (origin
23493 (method git-fetch)
23494 (uri (git-reference
23495 (url "https://github.com/samuelcolvin/python-devtools")
23496 (commit (string-append "v" version))))
23497 (file-name (git-file-name name version))
23498 (sha256
23499 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
23500 (build-system python-build-system)
23501 (native-inputs
23502 `(("python-pytest" ,python-pytest)
23503 ("python-pytest-mock" ,python-pytest-mock)))
23504 (propagated-inputs
23505 `(("python-pygments" ,python-pygments)))
23506 (arguments
23507 `(#:phases (modify-phases %standard-phases
23508 (replace 'check
23509 (lambda _
23510 (invoke "pytest")
23511 #t)))))
23512 (home-page "https://github.com/samuelcolvin/python-devtools")
23513 (synopsis "Debug command and development tools")
23514 (description
23515 "This package provides a debug print command and other development tools.
23516 It adds a simple and readable way to print stuff during development.")
23517 (license license:expat)))
23518
23519 (define-public python-dateparser
23520 (package
23521 (name "python-dateparser")
23522 (version "0.7.6")
23523 (source
23524 (origin
23525 (method url-fetch)
23526 (uri (pypi-uri "dateparser" version))
23527 (sha256
23528 (base32
23529 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
23530 (build-system python-build-system)
23531 (propagated-inputs
23532 `(("python-dateutil" ,python-dateutil)
23533 ("python-pytz" ,python-pytz)
23534 ("python-regex" ,python-regex)
23535 ("python-ruamel.yaml" ,python-ruamel.yaml)
23536 ("python-tzlocal" ,python-tzlocal)))
23537 (native-inputs
23538 `(("python-mock" ,python-mock)
23539 ("python-parameterized" ,python-parameterized)
23540 ("tzdata" ,tzdata-for-tests)))
23541 (arguments
23542 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
23543 #:tests? #f
23544 #:phases
23545 (modify-phases %standard-phases
23546 (add-before 'check 'set-check-environment
23547 (lambda* (#:key inputs #:allow-other-keys)
23548 (setenv "TZ" "UTC")
23549 (setenv "TZDIR"
23550 (string-append (assoc-ref inputs "tzdata")
23551 "/share/zoneinfo"))
23552 #t)))))
23553 (home-page "https://github.com/scrapinghub/dateparser")
23554 (synopsis
23555 "Date parsing library designed to parse dates from HTML pages")
23556 (description
23557 "@code{python-dateparser} provides modules to easily parse localized
23558 dates in almost any string formats commonly found on web pages.")
23559 (license license:bsd-3)))
23560
23561 (define-public python-dparse
23562 (package
23563 (name "python-dparse")
23564 (version "0.5.1")
23565 (source
23566 (origin
23567 (method url-fetch)
23568 (uri (pypi-uri "dparse" version))
23569 (sha256
23570 (base32
23571 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
23572 (build-system python-build-system)
23573 (native-inputs
23574 `(("python-pytest" ,python-pytest)))
23575 (propagated-inputs
23576 `(("python-packaging" ,python-packaging)
23577 ("python-pyyaml" ,python-pyyaml)
23578 ("python-toml" ,python-toml)))
23579 (home-page "https://github.com/pyupio/dparse")
23580 (synopsis "Parser for Python dependency files")
23581 (description "This package provides a parser for Python dependency files.")
23582 (license license:expat)))
23583
23584 (define-public python-dpath
23585 (package
23586 (name "python-dpath")
23587 (version "2.0.1")
23588 (source
23589 (origin
23590 (method url-fetch)
23591 (uri (pypi-uri "dpath" version))
23592 (sha256
23593 (base32
23594 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
23595 (build-system python-build-system)
23596 (native-inputs
23597 `(("python-hypothesis" ,python-hypothesis)
23598 ("python-mock" ,python-mock)
23599 ("python-nose" ,python-nose)))
23600 (arguments
23601 '(#:phases
23602 (modify-phases %standard-phases
23603 (replace 'check
23604 (lambda* (#:key inputs outputs #:allow-other-keys)
23605 (add-installed-pythonpath inputs outputs)
23606 ;; This invokation is taken from tox.ini.
23607 (invoke "nosetests" "-d" "-v" "tests/"))))))
23608 (home-page "https://github.com/akesterson/dpath-python")
23609 (synopsis "File-system-like pathing and searching for dictionaries")
23610 (description
23611 "@code{python-dpath} is a library for accessing and searching
23612 dictionaries via /slashed/paths ala xpath.
23613
23614 Basically it lets you glob over a dictionary as if it were a file system. It
23615 allows you to specify globs (ala the bash eglob syntax, through some advanced
23616 fnmatch.fnmatch magic) to access dictionary elements, and provides some
23617 facility for filtering those results.")
23618 (license license:expat)))
23619
23620 (define-public python-safety
23621 (package
23622 (name "python-safety")
23623 (version "1.9.0")
23624 (source
23625 (origin
23626 (method url-fetch)
23627 (uri (pypi-uri "safety" version))
23628 (sha256
23629 (base32
23630 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
23631 (build-system python-build-system)
23632 (arguments
23633 `(#:phases
23634 (modify-phases %standard-phases
23635 (add-after 'unpack 'disable-tests
23636 (lambda _
23637 (substitute* "tests/test_safety.py"
23638 ;; requires network
23639 (("def test_check_live") "def _test_check_live"))
23640 #t)))))
23641 (propagated-inputs
23642 `(("python-click" ,python-click)
23643 ("python-dparse" ,python-dparse)
23644 ("python-packaging" ,python-packaging)
23645 ("python-requests" ,python-requests)))
23646 (home-page "https://github.com/pyupio/safety")
23647 (synopsis "Check installed dependencies for known vulnerabilities")
23648 (description "Safety checks installed dependencies for known vulnerabilities.
23649 By default it uses the open Python vulnerability database Safety DB.")
23650 (license license:expat)))
23651
23652 (define-public python-pypandoc
23653 (package
23654 (name "python-pypandoc")
23655 (version "1.5")
23656 (source
23657 (origin
23658 (method url-fetch)
23659 (uri (pypi-uri "pypandoc" version))
23660 (sha256
23661 (base32
23662 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
23663 (build-system python-build-system)
23664 (inputs
23665 `(("pandoc" ,pandoc)
23666 ("pandoc-citeproc" ,pandoc-citeproc)))
23667 (propagated-inputs
23668 `(("wheel" ,python-wheel)))
23669 (native-inputs
23670 `(("texlive" ,(texlive-union (list texlive-amsfonts
23671 texlive-fonts-ec
23672 texlive-latex-hyperref
23673 texlive-latex-oberdiek
23674 texlive-lm
23675 texlive-xcolor)))))
23676 (arguments
23677 `(#:phases
23678 (modify-phases %standard-phases
23679 (add-before 'check 'disable-tests
23680 (lambda _
23681 ;; Disable test requiring network access
23682 (substitute* "tests.py"
23683 (("test_basic_conversion_from_http_url")
23684 "skip_test_basic_conversion_from_http_url"))
23685 ;; Needed by texlive-union to generate fonts
23686 (setenv "HOME" "/tmp")
23687 #t)))))
23688 (home-page "https://github.com/bebraw/pypandoc")
23689 (synopsis "Python wrapper for pandoc")
23690 (description "pypandoc is a thin Python wrapper around pandoc
23691 and pandoc-citeproc.")
23692 (license license:expat)))
23693
23694 (define-public python-rnc2rng
23695 (package
23696 (name "python-rnc2rng")
23697 (version "2.6.4")
23698 (source
23699 (origin
23700 (method url-fetch)
23701 (uri (pypi-uri "rnc2rng" version))
23702 (sha256
23703 (base32
23704 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
23705 (build-system python-build-system)
23706 (propagated-inputs
23707 `(("python-rply" ,python-rply)))
23708 (arguments
23709 `(#:phases (modify-phases %standard-phases
23710 (replace 'check
23711 (lambda _
23712 (invoke "python" "test.py"))))))
23713 (home-page "https://github.com/djc/rnc2rng")
23714 (synopsis "Convert RELAX NG Compact to regular syntax")
23715 (description
23716 "This package provides the @command{rnc2rng} command-line tool as well as
23717 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
23718 equivalent schemata in the XML-based default RELAX NG syntax.")
23719 (license license:expat)))
23720
23721 (define-public python-telethon
23722 (package
23723 (name "python-telethon")
23724 (version "1.17.5")
23725 (source
23726 (origin
23727 (method git-fetch)
23728 (uri (git-reference
23729 (url "https://github.com/LonamiWebs/Telethon")
23730 (commit (string-append "v" version))))
23731 (file-name (git-file-name name version))
23732 (sha256
23733 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
23734 (build-system python-build-system)
23735 (arguments
23736 '(#:phases
23737 (modify-phases %standard-phases
23738 (replace 'check
23739 (lambda* (#:key tests? #:allow-other-keys)
23740 (when tests?
23741 (invoke "py.test" "-v"))
23742 #t)))))
23743 (propagated-inputs
23744 `(("python-rsa" ,python-rsa)
23745 ("python-pyaes" ,python-pyaes)))
23746 (native-inputs
23747 `(("python-pytest" ,python-pytest)
23748 ("python-pytest-asyncio" ,python-pytest-asyncio)
23749 ("python-pytest-trio" ,python-pytest-trio)))
23750 (home-page "https://docs.telethon.dev")
23751 (synopsis "Full-featured Telegram client library for Python 3")
23752 (description "This library is designed to make it easy to write Python
23753 programs that can interact with Telegram.")
23754 (license license:expat)))
23755
23756 (define-public python-citeproc-py
23757 (package
23758 (name "python-citeproc-py")
23759 (version "0.5.1")
23760 (source
23761 (origin
23762 (method url-fetch)
23763 (uri (pypi-uri "citeproc-py" version))
23764 (sha256
23765 (base32
23766 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
23767 (build-system python-build-system)
23768 (propagated-inputs
23769 `(("python-lxml" ,python-lxml)
23770 ("python-rnc2rng" ,python-rnc2rng)))
23771 (home-page
23772 "https://github.com/brechtm/citeproc-py")
23773 (synopsis "Citations and bibliography formatter")
23774 (description
23775 "Citeproc-py is a CSL processor for Python. It aims to implement the
23776 CSL 1.0.1 specification. citeproc-py can output styled citations and
23777 bibliographies in a number of different output formats. Currently supported
23778 are plain text, reStructuredText and HTML.")
23779 (license license:bsd-2)))
23780
23781 (define-public python-inform
23782 (package
23783 (name "python-inform")
23784 (version "1.23.0")
23785 (source
23786 (origin
23787 (method url-fetch)
23788 (uri (pypi-uri "inform" version))
23789 (sha256
23790 (base32
23791 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
23792 (build-system python-build-system)
23793 (arguments
23794 `(#:tests? #f)) ; PyPI tarball lacks tests
23795 (native-inputs
23796 `(("python-hypothesis" ,python-hypothesis)
23797 ("python-pytest-cov" ,python-pytest-cov)
23798 ("python-pytest-runner" ,python-pytest-runner)))
23799 (propagated-inputs
23800 `(("python-arrow" ,python-arrow)
23801 ("python-six" ,python-six)))
23802 (home-page "https://inform.readthedocs.io")
23803 (synopsis "Print & logging utilities for communicating with user")
23804 (description
23805 "Inform is designed to display messages from programs that are typically run from
23806 a console. It provides a collection of ‘print’ functions that allow you to simply and
23807 cleanly print different types of messages.")
23808 (license license:gpl3+)))
23809
23810 (define-public python-nestedtext
23811 (package
23812 (name "python-nestedtext")
23813 (version "1.0.0")
23814 (source
23815 (origin
23816 (method url-fetch)
23817 (uri (pypi-uri "nestedtext" version))
23818 (sha256
23819 (base32
23820 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
23821 (build-system python-build-system)
23822 (arguments
23823 `(#:tests? #f)) ; PyPI tarball lacks tests
23824 (propagated-inputs
23825 `(("python-inform" ,python-inform)))
23826 (home-page "https://nestedtext.org")
23827 (synopsis "Human readable and writable data interchange format")
23828 (description
23829 "NestedText is a file format for holding data that is to be entered, edited, or
23830 viewed by people. It allows data to be organized into a nested collection of
23831 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
23832 without the complexity and risk of YAML and without the syntactic clutter of JSON.
23833 NestedText is both simple and natural. Only a small number of concepts and rules must
23834 be kept in mind when creating it. It is easily created, modified, or viewed with
23835 a text editor and easily understood and used by both programmers and non-programmers.")
23836 (license license:expat))) ; MIT license
23837
23838 (define-public python-parallel
23839 (package
23840 (name "python-parallel")
23841 (version "1.6.4.4")
23842 (source
23843 (origin
23844 (method url-fetch)
23845 (uri (string-append
23846 "https://www.parallelpython.com/downloads/pp/pp-"
23847 version ".zip"))
23848 (sha256
23849 (base32
23850 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
23851 (native-inputs
23852 `(("unzip" ,unzip)))
23853 (build-system python-build-system)
23854 (arguments '(#:tests? #f)) ; No test suite.
23855 (home-page "https://www.parallelpython.com")
23856 (synopsis "Parallel and distributed programming for Python")
23857 (description "Parallel Python module (PP) provides an easy and efficient
23858 way to create parallel-enabled applications for SMP computers and clusters.
23859 PP module features cross-platform portability and dynamic load balancing.
23860 Thus applications written with PP will parallelize efficiently even on
23861 heterogeneous and multi-platform clusters (including clusters running other
23862 applications with variable CPU loads).")
23863 (license license:bsd-3)))
23864
23865 (define-public python2-parallel
23866 (package-with-python2 python-parallel))
23867
23868 (define-public python-djvulibre
23869 (package
23870 (name "python-djvulibre")
23871 (version "0.8.5")
23872 (source
23873 (origin
23874 (method url-fetch)
23875 (uri (pypi-uri "python-djvulibre" version))
23876 (sha256
23877 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
23878 (build-system python-build-system)
23879 (native-inputs
23880 `(("ghostscript" ,ghostscript)
23881 ("pkg-config" ,pkg-config)
23882 ("python-nose" ,python-nose)))
23883 (inputs
23884 `(("djvulibre" ,djvulibre)
23885 ("python-cython" ,python-cython)))
23886 (arguments
23887 `(#:phases
23888 (modify-phases %standard-phases
23889 (add-after 'unpack 'fix-tests
23890 (lambda _
23891 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23892 ;; doesn't make sense on GNU/Linux.
23893 (delete-file "djvu/dllpath.py")
23894 #t)))))
23895 (synopsis "Python bindings for DjVuLibre")
23896 (description "This is a set of Python bindings for the DjVuLibre library.")
23897 (home-page "https://jwilk.net/software/python-djvulibre")
23898 (license license:gpl2)))
23899
23900 (define-public python2-djvulibre
23901 (package-with-python2 python-djvulibre))
23902
23903 (define-public python-versioneer
23904 (package
23905 (name "python-versioneer")
23906 (version "0.19")
23907 (source
23908 (origin
23909 (method url-fetch)
23910 (uri (pypi-uri "versioneer" version))
23911 (sha256
23912 (base32
23913 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
23914 (build-system python-build-system)
23915 (home-page
23916 "https://github.com/python-versioneer/python-versioneer")
23917 (synopsis
23918 "Version-string management for VCS-controlled trees")
23919 (description
23920 "@code{versioneer} is a tool for managing a recorded version number in
23921 distutils-based python projects. The goal is to remove the tedious and
23922 error-prone \"update the embedded version string\" step from your release
23923 process.")
23924 (license license:public-domain)))
23925
23926 (define-public python2-gamera
23927 (package
23928 (name "python2-gamera")
23929 (version "3.4.4")
23930 (source
23931 (origin
23932 (method url-fetch)
23933 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
23934 "gamera-" version ".tar.gz"))
23935 (sha256
23936 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
23937 (modules '((guix build utils)))
23938 (snippet
23939 '(begin
23940 ;; Remove bundled libraries.
23941 (for-each delete-file-recursively
23942 '("src/libpng-1.2.5"
23943 "src/libtiff"
23944 "src/zlib-1.2.8"))))))
23945 (build-system python-build-system)
23946 (inputs
23947 `(("libpng" ,libpng)
23948 ("libtiff" ,libtiff)
23949 ("python2-wxpython" ,python2-wxpython)
23950 ("zlib" ,zlib)))
23951 (arguments
23952 `(#:python ,python-2))
23953 (synopsis "Framework for building document analysis applications")
23954 (description
23955 "Gamera is a toolkit for building document image recognition systems.")
23956 (home-page "https://gamera.informatik.hsnr.de/")
23957 (license license:gpl2+)))
23958
23959 (define-public python-contextvars
23960 (package
23961 (name "python-contextvars")
23962 (version "2.4")
23963 (source
23964 (origin
23965 (method url-fetch)
23966 (uri (pypi-uri "contextvars" version))
23967 (sha256
23968 (base32
23969 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
23970 (build-system python-build-system)
23971 (propagated-inputs
23972 `(("python-immutables" ,python-immutables)))
23973 (home-page
23974 "https://github.com/MagicStack/contextvars")
23975 (synopsis "PEP 567 Backport")
23976 (description "This package implements a backport of Python 3.7
23977 @code{contextvars} module (see PEP 567) for Python 3.6.")
23978 (license license:asl2.0)))
23979
23980 (define-public python-aiofiles
23981 (package
23982 (name "python-aiofiles")
23983 (version "0.6.0")
23984 (source
23985 (origin
23986 (method url-fetch)
23987 (uri (pypi-uri "aiofiles" version))
23988 (sha256
23989 (base32
23990 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
23991 (build-system python-build-system)
23992 (home-page "https://github.com/Tinche/aiofiles")
23993 (synopsis "File support for @code{asyncio}")
23994 (description "@code{python-aiofiles} is a library for handling local
23995 disk files in asyncio applications.")
23996 (license license:asl2.0)))
23997
23998 (define-public python-pyre-extensions
23999 (package
24000 (name "python-pyre-extensions")
24001 (version "0.0.18")
24002 (source
24003 (origin
24004 (method url-fetch)
24005 (uri (pypi-uri "pyre-extensions" version))
24006 (sha256
24007 (base32
24008 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
24009 (build-system python-build-system)
24010 (propagated-inputs
24011 `(("python-typing-extensions"
24012 ,python-typing-extensions)
24013 ("python-typing-inspect" ,python-typing-inspect)))
24014 (home-page "https://pyre-check.org")
24015 (synopsis
24016 "Type system extensions for use with @code{python-pyre}")
24017 (description
24018 "@code{python-pyre-extensions} defines extensions to the standard
24019 @code{typing} module that are supported by the Pyre typechecker.")
24020 (license license:expat)))
24021
24022 (define-public python-dataclasses
24023 (package
24024 (name "python-dataclasses")
24025 (version "0.7")
24026 (source
24027 (origin
24028 (method url-fetch)
24029 (uri (pypi-uri "dataclasses" version))
24030 (sha256
24031 (base32
24032 "1rh8111fbws2vxyf2qy2zw3x6p6cq1jfz8pf904gig5qwg56sjj9"))))
24033 (build-system python-build-system)
24034 (home-page
24035 "https://github.com/ericvsmith/dataclasses")
24036 (synopsis
24037 "Backport of the @code{dataclasses} module for Python 3.6")
24038 (description
24039 "This is an implementation of PEP 557, Data Classes. It is a
24040 backport of the @code{dataclasses} module for Python 3.6.")
24041 (license license:asl2.0)))
24042
24043 (define-public python-pywatchman
24044 (package
24045 (name "python-pywatchman")
24046 (version "1.4.1")
24047 (source
24048 (origin
24049 (method url-fetch)
24050 (uri (pypi-uri "pywatchman" version))
24051 (sha256
24052 (base32
24053 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
24054 (build-system python-build-system)
24055 (arguments
24056 `(#:tests? #f)) ;there are none
24057 (home-page
24058 "https://facebook.github.io/watchman/")
24059 (synopsis "Watchman client for python")
24060 (description "@code{python-pywatchman} is a library to connect and
24061 query Watchman to discover file changes.")
24062 (license license:bsd-3)))
24063
24064 (define-public python-helpdev
24065 (package
24066 (name "python-helpdev")
24067 (version "0.7.1")
24068 (source
24069 (origin
24070 (method url-fetch)
24071 (uri (pypi-uri "helpdev" version))
24072 (sha256
24073 (base32
24074 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
24075 (build-system python-build-system)
24076 (arguments
24077 `(#:phases
24078 (modify-phases %standard-phases
24079 (replace 'check
24080 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
24081 (when tests?
24082 (add-installed-pythonpath inputs outputs)
24083 (invoke "pytest" "tests"))
24084 #t)))))
24085 (propagated-inputs
24086 `(("python-importlib-metadata" ,python-importlib-metadata)))
24087 (native-inputs
24088 `(("python-pytest" ,python-pytest)))
24089 (home-page "https://gitlab.com/dpizetta/helpdev")
24090 (synopsis
24091 "Extract information about the Python environment easily")
24092 (description
24093 "Helpdev is a library to easily extract information about the Python
24094 environment.")
24095 (license license:expat)))
24096
24097 (define-public python-qdarkstyle
24098 (package
24099 (name "python-qdarkstyle")
24100 (version "2.8.1")
24101 (source
24102 (origin
24103 (method url-fetch)
24104 (uri (pypi-uri "QDarkStyle" version))
24105 (sha256
24106 (base32
24107 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
24108 (build-system python-build-system)
24109 (arguments
24110 `(;; Fails unable to detect valid Qt bindings even when
24111 ;; added as native-inputs.
24112 #:tests? #f))
24113 (propagated-inputs
24114 `(("python-helpdev" ,python-helpdev)
24115 ("python-qtpy" ,python-qtpy)))
24116 (home-page
24117 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
24118 (synopsis
24119 "Complete dark stylesheet for Python and Qt applications")
24120 (description "QDarkStyle is the most complete dark stylesheet for Python and
24121 Qt applications.")
24122 (license license:expat)))
24123
24124 (define-public python-bitstring
24125 (package
24126 (name "python-bitstring")
24127 (version "3.1.7")
24128 (source
24129 (origin
24130 (method url-fetch)
24131 (uri (pypi-uri "bitstring" version))
24132 (sha256
24133 (base32
24134 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
24135 (build-system python-build-system)
24136 (arguments
24137 `(#:phases
24138 (modify-phases %standard-phases
24139 (replace 'check
24140 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
24141 (when tests?
24142 (add-installed-pythonpath inputs outputs)
24143 (with-directory-excursion "test"
24144 (invoke "pytest")))
24145 #t)))))
24146 (native-inputs
24147 `(("python-pytest" ,python-pytest)))
24148 (home-page "https://github.com/scott-griffiths/bitstring")
24149 (synopsis
24150 "Simple construction, analysis and modification of binary data")
24151 (description
24152 "Bitstring is a library for simple construction, analysis and modification
24153 of binary data.")
24154 (license license:expat)))
24155
24156 (define-public python-confuse
24157 (package
24158 (name "python-confuse")
24159 (version "1.4.0")
24160 (source
24161 (origin
24162 (method url-fetch)
24163 (uri (pypi-uri "confuse" version))
24164 (sha256
24165 (base32
24166 "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j"))))
24167 (build-system python-build-system)
24168 (propagated-inputs
24169 `(("python-pathlib" ,python-pathlib)
24170 ("python-pyyaml" ,python-pyyaml)))
24171 (home-page "https://github.com/beetbox/confuse")
24172 (synopsis "Painless YAML configuration.")
24173 (description "Confuse is a configuration library for Python that uses
24174 YAML. It takes care of defaults, overrides, type checking, command-line
24175 integration, human-readable errors, and standard OS-specific locations.")
24176 (license license:expat)))
24177
24178 (define-public python-reflink
24179 (package
24180 (name "python-reflink")
24181 (version "0.2.1")
24182 (source
24183 (origin
24184 (method url-fetch)
24185 (uri (pypi-uri "reflink" version))
24186 (sha256
24187 (base32
24188 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
24189 (build-system python-build-system)
24190 (arguments
24191 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
24192 (propagated-inputs
24193 `(("python-cffi" ,python-cffi)))
24194 (native-inputs
24195 `(("python-pytest" ,python-pytest)
24196 ("python-pytest-runner" ,python-pytest-runner)))
24197 (home-page "https://gitlab.com/rubdos/pyreflink")
24198 (synopsis "Python wrapper around reflink system call")
24199 (description
24200 "Python reflink wraps around platform specific @code{reflink}
24201 implementations.")
24202 (license license:expat)))
24203
24204 (define-public python-pivy
24205 (package
24206 (name "python-pivy")
24207 (version "0.6.5")
24208 (source
24209 (origin
24210 (method git-fetch)
24211 (uri (git-reference
24212 (url "https://github.com/coin3d/pivy")
24213 (commit version)))
24214 (file-name (git-file-name name version))
24215 (sha256
24216 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
24217 (build-system python-build-system)
24218 (arguments
24219 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
24220 #:tests? #f
24221 #:phases
24222 (modify-phases %standard-phases
24223 (add-after 'unpack 'patch-cmake-include-dirs
24224 (lambda _
24225 ;; Patch buildsystem to respect Coin3D include directory
24226 (substitute* "CMakeLists.txt"
24227 (("\\$\\{SoQt_INCLUDE_DIRS}")
24228 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
24229 #t)))))
24230 (native-inputs
24231 `(("cmake" ,cmake)
24232 ("swig" ,swig)))
24233 (inputs
24234 `(("python-wrapper" ,python-wrapper)
24235 ("qtbase" ,qtbase)
24236 ("libxi" ,libxi)
24237 ("libice" ,libice)
24238 ("soqt" ,soqt)
24239 ("glew" ,glew)
24240 ("coin3D" ,coin3D-4)))
24241 (home-page "https://github.com/coin3d/pivy")
24242 (synopsis "Python bindings to Coin3D")
24243 (description
24244 "Pivy provides python bindings for Coin, a 3D graphics library with an
24245 Application Programming Interface based on the Open Inventor 2.1 API.")
24246 (license license:isc)))
24247
24248 (define-public python-crayons
24249 (package
24250 (name "python-crayons")
24251 (version "0.4.0")
24252 (source
24253 (origin
24254 (method url-fetch)
24255 (uri (pypi-uri "crayons" version))
24256 (sha256
24257 (base32
24258 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
24259 (build-system python-build-system)
24260 (propagated-inputs
24261 `(("python-colorama" ,python-colorama)))
24262 (home-page "https://github.com/MasterOdin/crayons")
24263 (synopsis "TextUI colors for Python")
24264 (description "This package gives you colored strings for the terminal.
24265 Crayons automatically wraps a given string in the foreground color and
24266 restores the original state after the string is printed.")
24267 (license license:expat)))
24268
24269 (define-public python-sane
24270 (package
24271 (name "python-sane")
24272 (version "2.9.1")
24273 (source
24274 (origin
24275 (method url-fetch)
24276 (uri (pypi-uri name version))
24277 (sha256
24278 (base32
24279 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
24280 (build-system python-build-system)
24281 (native-inputs
24282 `(("python-pytest" ,python-pytest)))
24283 (inputs
24284 `(("sane-backends" ,sane-backends)))
24285 (home-page "https://github.com/python-pillow/Sane")
24286 (synopsis "Python interface to the SANE scanner")
24287 (description "This package provides Python interface to the SANE scanner
24288 and frame grabber interface.")
24289 (license (license:non-copyleft
24290 ;; Yet another variant of the X/MIT license.
24291 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
24292
24293 (define-public python-screenkey
24294 (package
24295 (name "python-screenkey")
24296 (version "1.4")
24297 (source
24298 (origin
24299 (method git-fetch)
24300 (uri (git-reference
24301 (url "https://gitlab.com/screenkey/screenkey")
24302 (commit (string-append "v" version))))
24303 (file-name (git-file-name name version))
24304 (sha256
24305 (base32
24306 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
24307 (build-system python-build-system)
24308 (arguments
24309 `(#:phases
24310 (modify-phases %standard-phases
24311 (add-after 'unpack 'fix-dlopen-paths
24312 (lambda* (#:key inputs outputs #:allow-other-keys)
24313 (let* ((x11 (assoc-ref inputs "libx11"))
24314 (xtst (assoc-ref inputs "libxtst")))
24315 (substitute* "Screenkey/xlib.py"
24316 (("libX11.so.6")
24317 (string-append x11 "/lib/libX11.so.6")))
24318 (substitute* "Screenkey/xlib.py"
24319 (("libXtst.so.6")
24320 (string-append xtst "/lib/libXtst.so.6")))
24321 #t)))
24322 (add-after 'install 'wrap-screenkey
24323 (lambda* (#:key outputs #:allow-other-keys)
24324 (wrap-program
24325 (string-append (assoc-ref outputs "out") "/bin/screenkey")
24326 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
24327 `("GI_TYPELIB_PATH"
24328 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
24329 #t)))))
24330 (inputs
24331 `(("python-distutils-extra" ,python-distutils-extra)
24332 ("python-tokenize-rt" ,python-tokenize-rt)
24333 ("libx11" ,libx11)
24334 ("libxtst" ,libxtst)
24335 ("gtk+" ,gtk+)
24336 ("python-pygobject" ,python-pygobject)
24337 ("python-pycairo" ,python-pycairo)
24338 ("python-setuptools-git" ,python-setuptools-git)
24339 ("python-babel" ,python-babel)))
24340 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
24341 (synopsis
24342 "Screencast tool to display pressed keys")
24343 (description
24344 "A screencast tool to display your keys inspired by Screenflick.")
24345 (license license:gpl3+)))
24346
24347 (define-public python-jinja2-cli
24348 (package
24349 (name "python-jinja2-cli")
24350 (version "0.7.0")
24351 (source
24352 (origin
24353 (method url-fetch)
24354 (uri (pypi-uri "jinja2-cli" version))
24355 (sha256
24356 (base32
24357 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
24358 (build-system python-build-system)
24359 (propagated-inputs
24360 `(("python-jinja2" ,python-jinja2)))
24361 (native-inputs
24362 `(("python-flake8" ,python-flake8)
24363 ("python-jinja2" ,python-jinja2)
24364 ("python-pytest" ,python-pytest)))
24365 (home-page "https://github.com/mattrobenolt/jinja2-cli")
24366 (synopsis "Command-line interface to Jinja2")
24367 (description
24368 "This package provides a command-line interface (CLI) to the Jinja2
24369 template engine.")
24370 (license license:bsd-3)))
24371
24372 (define-public python-readability
24373 (package
24374 (name "python-readability")
24375 (version "0.3.1")
24376 (source
24377 (origin
24378 (method url-fetch)
24379 (uri (pypi-uri "readability" version))
24380 (sha256
24381 (base32
24382 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
24383 (build-system python-build-system)
24384 (home-page
24385 "https://github.com/andreasvc/readability/")
24386 (synopsis
24387 "Measure the readability of a given text using surface
24388 characteristics")
24389 (description
24390 "This package provides a Python library that is an implementation of
24391 traditional readability measures based on simple surface
24392 characteristics. These measures are basically linear regressions based on the
24393 number of words, syllables, and sentences.")
24394 (license license:asl2.0)))
24395
24396 (define-public python-listparser
24397 (package
24398 (name "python-listparser")
24399 (version "0.18")
24400 (source
24401 (origin
24402 (method url-fetch)
24403 (uri (pypi-uri "listparser" version))
24404 (sha256
24405 (base32
24406 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
24407 (build-system python-build-system)
24408 (home-page
24409 "https://github.com/kurtmckee/listparser")
24410 (synopsis
24411 "Parse subscription lists in Python")
24412 (description
24413 "This package provides a Python library that can parse OPML, FOAF, and
24414 iGoogle subscription lists.")
24415 (license license:expat)))
24416
24417 (define-public python-smartypants
24418 (package
24419 (name "python-smartypants")
24420 (version "2.0.1")
24421 (source
24422 (origin
24423 ;; There's no source tarball for 2.0.1 on PyPI.
24424 (method git-fetch)
24425 (uri (git-reference
24426 (url "https://github.com/leohemsted/smartypants.py")
24427 (commit (string-append "v" version))))
24428 (file-name (git-file-name name version))
24429 (sha256
24430 (base32 "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"))))
24431 (build-system python-build-system)
24432 (arguments
24433 '(#:phases
24434 (modify-phases %standard-phases
24435 (replace 'check
24436 ;; Its `setup.py test` doesn't report failure with exit status, so
24437 ;; we use `nose` instead.
24438 (lambda _
24439 (invoke "nosetests" "-v" "--exclude=^load_tests$"))))))
24440 (native-inputs
24441 ;; For tests.
24442 `(("python-docutils" ,python-docutils)
24443 ("python-nose" ,python-nose)
24444 ("python-pygments" ,python-pygments)))
24445 (home-page "https://github.com/leohemsted/smartypants.py")
24446 (synopsis "Translate punctuation characters into smart quotes")
24447 (description
24448 "@command{smartpants} can perform the following transformations:
24449 @enumerate
24450 @item Straight quotes ( \" and ' ) into \"curly\" quote HTML entities
24451 @item Backticks-style quotes (``like this'') into \"curly\" quote HTML
24452 entities
24453 @item Dashes (-- and ---) into en- and em-dash entities
24454 @item Three consecutive dots (... or . . .) into an ellipsis entity
24455 @end enumerate")
24456 (license license:bsd-3)))
24457
24458 (define-public python-typogrify
24459 (package
24460 (name "python-typogrify")
24461 (version "2.0.7")
24462 (source (origin
24463 (method url-fetch)
24464 (uri (pypi-uri "typogrify" version))
24465 (sha256
24466 (base32
24467 "0f6b2gnnxjbx1fbmkcscc6qjr4hi78kwm1wx4b766ha3va66dr4b"))))
24468 (build-system python-build-system)
24469 (arguments
24470 '(#:phases
24471 (modify-phases %standard-phases
24472 (replace 'check
24473 (lambda _
24474 (invoke "nosetests" "-v"))))))
24475 (propagated-inputs
24476 `(("python-smartypants" ,python-smartypants)))
24477 (native-inputs
24478 ;; For tests.
24479 `(("python-nose" ,python-nose)))
24480 (home-page "https://github.com/mintchaos/typogrify")
24481 (synopsis "Filters to transform text into typographically-improved HTML")
24482 (description
24483 "@code{typogrify} provides a set of custom filters that automatically
24484 apply various transformations to plain text in order to yield
24485 typographically-improved HTML. While often used in conjunction with Jinja and
24486 Django template systems, the filters can be used in any environment.")
24487 (license license:bsd-3)))