gnu: python-notebook: Update to 6.3.0.
[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, 2021 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
72 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
73 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
74 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
75 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
76 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
77 ;;; Copyright © 2020, 2021 Alexandros Theodotou <alex@zrythm.org>
78 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
79 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
80 ;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
81 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
82 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
83 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
84 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
85 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
86 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
87 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
88 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
89 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
90 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
91 ;;; Copyright © 2020 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.com>
92 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
93 ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
94 ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
95 ;;; Copyright © 2019 Kristian Trandem <kristian@devup.no>
96 ;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com>
97 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
98 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
99 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
100 ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
101 ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
102 ;;;
103 ;;; This file is part of GNU Guix.
104 ;;;
105 ;;; GNU Guix is free software; you can redistribute it and/or modify it
106 ;;; under the terms of the GNU General Public License as published by
107 ;;; the Free Software Foundation; either version 3 of the License, or (at
108 ;;; your option) any later version.
109 ;;;
110 ;;; GNU Guix is distributed in the hope that it will be useful, but
111 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
112 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
113 ;;; GNU General Public License for more details.
114 ;;;
115 ;;; You should have received a copy of the GNU General Public License
116 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
117
118 (define-module (gnu packages python-xyz)
119 #:use-module ((guix licenses) #:prefix license:)
120 #:use-module (gnu packages)
121 #:use-module (gnu packages algebra)
122 #:use-module (gnu packages adns)
123 #:use-module (gnu packages aidc)
124 #:use-module (gnu packages attr)
125 #:use-module (gnu packages backup)
126 #:use-module (gnu packages bash)
127 #:use-module (gnu packages check)
128 #:use-module (gnu packages cmake)
129 #:use-module (gnu packages compression)
130 #:use-module (gnu packages crypto)
131 #:use-module (gnu packages databases)
132 #:use-module (gnu packages dbm)
133 #:use-module (gnu packages djvu)
134 #:use-module (gnu packages docker)
135 #:use-module (gnu packages enchant)
136 #:use-module (gnu packages file)
137 #:use-module (gnu packages fontutils)
138 #:use-module (gnu packages gcc)
139 #:use-module (gnu packages geo)
140 #:use-module (gnu packages ghostscript)
141 #:use-module (gnu packages gl)
142 #:use-module (gnu packages glib)
143 #:use-module (gnu packages gnome)
144 #:use-module (gnu packages gnupg)
145 #:use-module (gnu packages graphviz)
146 #:use-module (gnu packages graphics)
147 #:use-module (gnu packages gsasl)
148 #:use-module (gnu packages gstreamer)
149 #:use-module (gnu packages gtk)
150 #:use-module (gnu packages haskell-xyz)
151 #:use-module (gnu packages icu4c)
152 #:use-module (gnu packages image)
153 #:use-module (gnu packages imagemagick)
154 #:use-module (gnu packages 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.22")
4485 (source
4486 (origin
4487 (method url-fetch)
4488 (uri (pypi-uri "Cython" version))
4489 (sha256
4490 (base32 "01jl3544qwsi8lp6anbl55566xqkjd53x452i7m6gnfilv3q6syz"))))
4491 (build-system python-build-system)
4492 ;; we need the full python package and not just the python-wrapper
4493 ;; because we need libpython3.3m.so
4494 (inputs
4495 `(("python" ,python)))
4496 (arguments
4497 `(#:phases
4498 (modify-phases %standard-phases
4499 (add-before 'check 'set-HOME
4500 ;; some tests require access to "$HOME/.cython"
4501 (lambda _ (setenv "HOME" "/tmp") #t))
4502 (replace 'check
4503 (lambda _
4504 ;; Disable compiler optimizations to greatly reduce the running
4505 ;; time of the test suite.
4506 (setenv "CFLAGS" "-O0")
4507
4508 (invoke "python" "runtests.py" "-vv"
4509 "-j" (number->string (parallel-job-count))
4510 ;; XXX: On 32-bit architectures, running the parallel tests
4511 ;; fails on many-core systems, see
4512 ;; <https://github.com/cython/cython/issues/2807>.
4513 ,@(if (not (target-64bit?))
4514 '("-x" "run.parallel")
4515 '())))))))
4516 (home-page "https://cython.org/")
4517 (synopsis "C extensions for Python")
4518 (description "Cython is an optimising static compiler for both the Python
4519 programming language and the extended Cython programming language. It makes
4520 writing C extensions for Python as easy as Python itself.")
4521 (license license:asl2.0)
4522 (properties `((python2-variant . ,(delay python2-cython))))))
4523
4524 (define-public python2-cython
4525 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4526 (package/inherit base
4527 (name "python2-cython")
4528 (inputs
4529 `(("python-2" ,python-2))) ;this is not automatically changed
4530 (arguments
4531 (substitute-keyword-arguments (package-arguments base)
4532 ((#:phases phases)
4533 `(modify-phases ,phases
4534 (add-before 'check 'adjust-test_embed
4535 (lambda _
4536 (substitute* "runtests.py"
4537 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4538 ;; so it can give the right -L flag to GCC when embedding static
4539 ;; builds of Python. It is unaware that the Python "config"
4540 ;; directory (where the static library lives) was renamed in
4541 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4542 ;; which works fine, because that is where the shared library is.
4543 ;;
4544 ;; It also appears to be unaware that the Makefile in Demos/embed
4545 ;; already unconditionally pass the static library location to GCC,
4546 ;; after checking sysconfig.get_config_var('LIBPL).
4547 ;;
4548 ;; The effect is that the linker is unable to resolve libexpat
4549 ;; symbols when building for Python 2, because neither the Python 2
4550 ;; shared library nor Expat is available. To fix it, we can either
4551 ;; add Expat as an input and make it visible to the linker, or just
4552 ;; prevent it from overriding the Python shared library location.
4553 ;; The end result is identical, so we take the easy route.
4554 ((" or libname not in os\\.listdir\\(libdir\\)")
4555 ""))
4556 #t)))))))))
4557
4558 ;; The RPython toolchain currently does not support Python 3.
4559 (define-public python2-rpython
4560 (package
4561 (name "python2-rpython")
4562 (version "0.2.1")
4563 (source
4564 (origin
4565 (method url-fetch)
4566 (uri (pypi-uri "rpython" version))
4567 (sha256
4568 (base32
4569 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4570 (build-system python-build-system)
4571 (arguments `(#:python ,python-2))
4572 (native-inputs
4573 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4574 (home-page "https://rpython.readthedocs.org")
4575 (synopsis "Framework for implementing interpreters and virtual machines")
4576 (description "RPython is a translation and support framework for
4577 producing implementations of dynamic languages, emphasizing a clean separation
4578 between language specification and implementation aspects.")
4579 (license license:expat)))
4580
4581 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4582 ;; python-scipy still build, as these three packages are often used together.
4583 (define-public python-numpy
4584 (package
4585 (name "python-numpy")
4586 (version "1.17.3")
4587 (source
4588 (origin
4589 (method url-fetch)
4590 (uri (string-append
4591 "https://github.com/numpy/numpy/releases/download/v"
4592 version "/numpy-" version ".tar.gz"))
4593 (sha256
4594 (base32
4595 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4596 (build-system python-build-system)
4597 (inputs
4598 `(("openblas" ,openblas)
4599 ("lapack" ,lapack)))
4600 (native-inputs
4601 `(("python-cython" ,python-cython)
4602 ("python-pytest" ,python-pytest)
4603 ("gfortran" ,gfortran)))
4604 (arguments
4605 `(#:phases
4606 (modify-phases %standard-phases
4607 (add-before 'build 'configure-blas-lapack
4608 (lambda* (#:key inputs #:allow-other-keys)
4609 (call-with-output-file "site.cfg"
4610 (lambda (port)
4611 (format port
4612 "[openblas]
4613 libraries = openblas
4614 library_dirs = ~a/lib
4615 include_dirs = ~a/include
4616
4617 # backslash-n to make emacs happy
4618 \n[lapack]
4619 lapack_libs = lapack
4620 library_dirs = ~a/lib
4621 include_dirs = ~a/include
4622 "
4623 (assoc-ref inputs "openblas")
4624 (assoc-ref inputs "openblas")
4625 (assoc-ref inputs "lapack")
4626 (assoc-ref inputs "lapack"))))
4627 #t))
4628 (add-before 'build 'fix-executable-paths
4629 (lambda* (#:key inputs #:allow-other-keys)
4630 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4631 ;; instead of /bin/sh.
4632 (substitute* "numpy/distutils/exec_command.py"
4633 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4634 (string-append match-start (assoc-ref inputs "bash") match-end)))
4635 ;; Use "gcc" executable, not "cc".
4636 (substitute* "numpy/distutils/system_info.py"
4637 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4638 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4639 #t))
4640 ;; Tests can only be run after the library has been installed and not
4641 ;; within the source directory.
4642 (delete 'check)
4643 (add-after 'install 'check
4644 (lambda* (#:key outputs inputs #:allow-other-keys)
4645 ;; Make installed package available for running the tests
4646 (add-installed-pythonpath inputs outputs)
4647 ;; Make sure "f2py" etc is found.
4648 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4649 ":" (getenv "PATH")))
4650 (with-directory-excursion "/tmp"
4651 (invoke "python" "-c"
4652 "import numpy; numpy.test(verbose=2)")))))))
4653 (home-page "https://numpy.org")
4654 (synopsis "Fundamental package for scientific computing with Python")
4655 (description "NumPy is the fundamental package for scientific computing
4656 with Python. It contains among other things: a powerful N-dimensional array
4657 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4658 and Fortran code, useful linear algebra, Fourier transform, and random number
4659 capabilities.")
4660 (properties `((python2-variant . ,(delay python2-numpy))))
4661 (license license:bsd-3)))
4662
4663 ;; Numpy 1.16.x are the last versions that support Python 2.
4664 (define-public python2-numpy
4665 (let ((numpy (package-with-python2
4666 (strip-python2-variant python-numpy))))
4667 (package/inherit
4668 numpy
4669 (version "1.16.5")
4670 (source (origin
4671 (method url-fetch)
4672 (uri (string-append
4673 "https://github.com/numpy/numpy/releases/download/v"
4674 version "/numpy-" version ".tar.gz"))
4675 (sha256
4676 (base32
4677 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4678
4679 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4680 ;; interest only for legacy code going back to NumPy's predecessor
4681 ;; Numeric.
4682 (define-public python2-numpy-1.8
4683 (package (inherit python2-numpy)
4684 (version "1.8.2")
4685 (source
4686 (origin
4687 (method git-fetch)
4688 (uri (git-reference
4689 (url "https://github.com/numpy/numpy")
4690 (commit (string-append "v" version))))
4691 (file-name (git-file-name "numpy" version))
4692 (sha256
4693 (base32
4694 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4695 (arguments
4696 (substitute-keyword-arguments (package-arguments python2-numpy)
4697 ((#:phases phases)
4698 `(modify-phases ,phases
4699 (replace 'configure-blas-lapack
4700 (lambda* (#:key inputs #:allow-other-keys)
4701 (call-with-output-file "site.cfg"
4702 (lambda (port)
4703 (format port
4704 "[openblas]
4705 libraries = openblas,lapack
4706 library_dirs = ~a/lib:~a/lib
4707 include_dirs = ~a/include:~a/include
4708 "
4709 (assoc-ref inputs "openblas")
4710 (assoc-ref inputs "lapack")
4711 (assoc-ref inputs "openblas")
4712 (assoc-ref inputs "lapack"))))
4713 #t))))))
4714 (native-inputs
4715 `(("python2-nose" ,python2-nose)))
4716 (description "NumPy is the fundamental package for scientific computing
4717 with Python. It contains among other things: a powerful N-dimensional array
4718 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4719 and Fortran code, useful linear algebra, Fourier transform, and random number
4720 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4721 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4722 Numeric.")
4723 (license license:bsd-3)))
4724
4725 (define-public python-munch
4726 (package
4727 (name "python-munch")
4728 (version "2.0.4")
4729 (source
4730 (origin
4731 (method url-fetch)
4732 (uri (pypi-uri "munch" version))
4733 (sha256
4734 (base32
4735 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4736 (build-system python-build-system)
4737 (home-page "https://github.com/Infinidat/munch")
4738 (synopsis "Dot-accessible dictionary")
4739 (description "Munch is a dot-accessible dictionary similar to JavaScript
4740 objects.")
4741 (license license:expat)))
4742
4743 (define-public python2-munch
4744 (package-with-python2 python-munch))
4745
4746 (define-public python-colormath
4747 (package
4748 (name "python-colormath")
4749 (version "3.0.0")
4750 (source
4751 (origin
4752 (method url-fetch)
4753 (uri (pypi-uri "colormath" version))
4754 (sha256
4755 (base32
4756 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4757 (build-system python-build-system)
4758 (propagated-inputs
4759 `(("python-networkx" ,python-networkx)
4760 ("python-numpy" ,python-numpy)))
4761 (home-page "https://github.com/gtaylor/python-colormath")
4762 (synopsis "Color math and conversion library")
4763 (description
4764 "This is a Python library for color math and conversions.")
4765 (license license:bsd-3)))
4766
4767 (define-public python2-colormath
4768 (package-with-python2 python-colormath))
4769
4770 (define-public python-spectra
4771 (package
4772 (name "python-spectra")
4773 (version "0.0.11")
4774 (source
4775 (origin
4776 (method url-fetch)
4777 (uri (pypi-uri "spectra" version))
4778 (sha256
4779 (base32
4780 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4781 (build-system python-build-system)
4782 (arguments
4783 `(#:phases
4784 (modify-phases %standard-phases
4785 (replace 'check
4786 (lambda _ (invoke "nosetests" "-v"))))))
4787 (propagated-inputs
4788 `(("python-colormath" ,python-colormath)))
4789 (native-inputs
4790 `(("python-nose" ,python-nose)))
4791 (home-page "https://github.com/jsvine/spectra")
4792 (synopsis "Color scales and color conversion")
4793 (description
4794 "This package provides a Python library intended to make color math,
4795 color scales, and color space conversion easy. It has support for:
4796
4797 @enumerate
4798 @item Color scales
4799 @item Color ranges
4800 @item Color blending
4801 @item Brightening/darkening colors
4802 @item Saturating/desaturating colors
4803 @item Conversion to/from multiple color spaces.
4804 @end enumerate\n")
4805 (license license:expat)))
4806
4807 (define-public python2-spectra
4808 (package-with-python2 python-spectra))
4809
4810 (define-public python-numpy-documentation
4811 (package
4812 (name "python-numpy-documentation")
4813 (version (package-version python-numpy))
4814 (source (package-source python-numpy))
4815 (build-system python-build-system)
4816 (native-inputs
4817 `(("python-matplotlib" ,python-matplotlib)
4818 ("python-numpy" ,python-numpy)
4819 ("pkg-config" ,pkg-config)
4820 ("python-sphinx" ,python-sphinx)
4821 ("python-numpydoc" ,python-numpydoc)
4822 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4823 texlive-fonts-ec
4824 texlive-generic-ifxetex
4825 texlive-generic-pdftex
4826 texlive-amsfonts
4827 texlive-latex-capt-of
4828 texlive-latex-cmap
4829 texlive-latex-environ
4830 texlive-latex-eqparbox
4831 texlive-latex-etoolbox
4832 texlive-latex-expdlist
4833 texlive-latex-fancyhdr
4834 texlive-latex-fancyvrb
4835 texlive-latex-fncychap
4836 texlive-latex-float
4837 texlive-latex-framed
4838 texlive-latex-geometry
4839 texlive-latex-graphics
4840 texlive-latex-hyperref
4841 texlive-latex-mdwtools
4842 texlive-latex-multirow
4843 texlive-latex-needspace
4844 texlive-latex-oberdiek
4845 texlive-latex-parskip
4846 texlive-latex-preview
4847 texlive-latex-tabulary
4848 texlive-latex-threeparttable
4849 texlive-latex-titlesec
4850 texlive-latex-trimspaces
4851 texlive-latex-ucs
4852 texlive-latex-upquote
4853 texlive-latex-url
4854 texlive-latex-varwidth
4855 texlive-latex-wrapfig)))
4856 ("texinfo" ,texinfo)
4857 ("perl" ,perl)
4858 ("scipy-sphinx-theme"
4859 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
4860 (origin ;the build script expects scipy-sphinx-theme as a git submodule
4861 (method git-fetch)
4862 (uri (git-reference
4863 (url "https://github.com/scipy/scipy-sphinx-theme")
4864 (commit commit)))
4865 (file-name (git-file-name "python-scipy-sphinx-theme"
4866 (string-take commit 7)))
4867 (sha256
4868 (base32
4869 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
4870 ,@(package-native-inputs python-numpy)))
4871 (arguments
4872 `(#:tests? #f ; we're only generating the documentation
4873 #:phases
4874 (modify-phases %standard-phases
4875 (delete 'build)
4876 (replace 'install
4877 (lambda* (#:key inputs outputs #:allow-other-keys)
4878 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4879 (doc (string-append
4880 data "/doc/" ,name "-"
4881 ,(package-version python-numpy)))
4882 (info-reader (string-append data "/info"))
4883 (html (string-append doc "/html"))
4884 (scipy-sphinx-theme "scipy-sphinx-theme")
4885 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4886 (pyver ,(string-append "PYVER=")))
4887
4888 ;; FIXME: this is needed to for texlive-union to generate
4889 ;; fonts, which are not found.
4890 (setenv "HOME" "/tmp")
4891
4892 (with-directory-excursion "doc"
4893 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4894 (mkdir-p html)
4895 (invoke "make" "html" pyver)
4896 (invoke "make" "latex" "PAPER=a4" pyver)
4897 (invoke "make" "-C" "build/latex"
4898 "all-pdf" "PAPER=a4" pyver)
4899 ;; FIXME: Generation of the info file fails.
4900 ;; (invoke "make" "info" pyver)
4901 ;; (mkdir-p info)
4902 ;; (copy-file "build/texinfo/numpy.info"
4903 ;; (string-append info "/numpy.info"))
4904 (for-each (lambda (file)
4905 (copy-file (string-append "build/latex" file)
4906 (string-append doc file)))
4907 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4908 (with-directory-excursion "build/html"
4909 (for-each (lambda (file)
4910 (let* ((dir (dirname file))
4911 (tgt-dir (string-append html "/" dir)))
4912 (unless (equal? "." dir)
4913 (mkdir-p tgt-dir))
4914 (install-file file html)))
4915 (find-files "." ".*")))))
4916 #t)))))
4917 (home-page (package-home-page python-numpy))
4918 (synopsis "Documentation for the python-numpy package")
4919 (description (package-description python-numpy))
4920 (license (package-license python-numpy))))
4921
4922 (define-public python2-numpy-documentation
4923 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4924 (package
4925 (inherit numpy-documentation)
4926 (native-inputs `(("python2-functools32" ,python2-functools32)
4927 ,@(package-native-inputs numpy-documentation))))))
4928
4929 (define-public python-pygit2
4930 (package
4931 (name "python-pygit2")
4932 (version "1.4.0")
4933 (source
4934 (origin
4935 (method url-fetch)
4936 (uri (pypi-uri "pygit2" version))
4937 (sha256
4938 (base32 "1j71iskvirkm8jzfmwdm79v69878m9iix8a8cn4xidgr3nmkisyb"))))
4939 (build-system python-build-system)
4940 (arguments
4941 '(#:tests? #f)) ; tests don't run correctly in our environment
4942 (propagated-inputs
4943 `(("python-cached-property" ,python-cached-property)
4944 ("python-cffi" ,python-cffi)
4945 ("libgit2" ,libgit2)))
4946 (native-inputs
4947 `(("python-pytest" ,python-pytest)))
4948 (home-page "https://github.com/libgit2/pygit2")
4949 (synopsis "Python bindings for libgit2")
4950 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4951 library, libgit2 implements Git plumbing.")
4952 ;; GPL2.0 only, with linking exception.
4953 (license license:gpl2)))
4954
4955 (define-public python-patiencediff
4956 (package
4957 (name "python-patiencediff")
4958 (version "0.2.0")
4959 (source
4960 (origin
4961 (method url-fetch)
4962 (uri (pypi-uri "patiencediff" version))
4963 (sha256
4964 (base32
4965 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4966 (build-system python-build-system)
4967 (home-page "https://www.breezy-vcs.org/")
4968 (synopsis "Python implementation of the patiencediff algorithm")
4969 (description
4970 "This package contains a Python implementation of the @code{patiencediff}
4971 algorithm. Patiencediff provides a good balance of performance, nice output for
4972 humans, and implementation simplicity.")
4973 (license license:gpl2)))
4974
4975 (define-public python-pdftotext
4976 (package
4977 (name "python-pdftotext")
4978 (version "2.1.5")
4979 (source
4980 (origin
4981 (method url-fetch)
4982 (uri (pypi-uri "pdftotext" version))
4983 (sha256
4984 (base32
4985 "19la1cw1hmkcr8big04gm2dd5fw0y0z97g930aiy29s1gaqbiblq"))))
4986 (build-system python-build-system)
4987 (inputs
4988 `(("poppler" ,poppler)))
4989 (home-page "https://github.com/jalan/pdftotext")
4990 (synopsis "Simple PDF text extraction")
4991 (description "Pdftotext is a Python library of PDF text extraction.")
4992 (license license:expat)))
4993
4994 (define-public python-pyparsing
4995 (package
4996 (name "python-pyparsing")
4997 (version "2.4.6")
4998 (source
4999 (origin
5000 (method url-fetch)
5001 (uri (pypi-uri "pyparsing" version))
5002 (sha256
5003 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
5004 (build-system python-build-system)
5005 (outputs '("out" "doc"))
5006 (arguments
5007 `(#:tests? #f ; no test target
5008 #:phases
5009 (modify-phases %standard-phases
5010 (add-after 'install 'install-doc
5011 (lambda* (#:key outputs #:allow-other-keys)
5012 (let* ((doc (string-append (assoc-ref outputs "doc")
5013 "/share/doc/" ,name "-" ,version))
5014 (html-doc (string-append doc "/html"))
5015 (examples (string-append doc "/examples")))
5016 (mkdir-p html-doc)
5017 (mkdir-p examples)
5018 (for-each
5019 (lambda (dir tgt)
5020 (map (lambda (file)
5021 (install-file file tgt))
5022 (find-files dir ".*")))
5023 (list "docs" "htmldoc" "examples")
5024 (list doc html-doc examples))
5025 #t))))))
5026 (home-page "https://github.com/pyparsing/pyparsing")
5027 (synopsis "Python parsing class library")
5028 (description
5029 "The pyparsing module is an alternative approach to creating and
5030 executing simple grammars, vs. the traditional lex/yacc approach, or the use
5031 of regular expressions. The pyparsing module provides a library of classes
5032 that client code uses to construct the grammar directly in Python code.")
5033 (license license:expat)))
5034
5035 (define-public python2-pyparsing
5036 (package-with-python2 python-pyparsing))
5037
5038 (define-public python-pyparsing-2.4.7
5039 (package
5040 (inherit python-pyparsing)
5041 (version "2.4.7")
5042 (source
5043 (origin
5044 (method url-fetch)
5045 (uri (pypi-uri "pyparsing" version))
5046 (sha256
5047 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5048
5049 (define-public python-numpydoc
5050 (package
5051 (name "python-numpydoc")
5052 (version "0.8.0")
5053 (source
5054 (origin
5055 (method url-fetch)
5056 (uri (pypi-uri "numpydoc" version))
5057 (sha256
5058 (base32
5059 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5060 (build-system python-build-system)
5061 (propagated-inputs
5062 `(("python-sphinx" ,python-sphinx)))
5063 (native-inputs
5064 `(("python-nose" ,python-nose)))
5065 (home-page "https://pypi.org/project/numpydoc/")
5066 (synopsis
5067 "Numpy's Sphinx extensions")
5068 (description
5069 "Sphinx extension to support docstrings in Numpy format.")
5070 (license license:bsd-2)
5071 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5072
5073 (define-public python2-numpydoc
5074 (let ((base (package-with-python2
5075 (strip-python2-variant python-numpydoc))))
5076 (package/inherit base
5077 (propagated-inputs
5078 `(("python2-jinja2" ,python2-jinja2)
5079 ,@(package-propagated-inputs base))))))
5080
5081 (define-public python-numexpr
5082 (package
5083 (name "python-numexpr")
5084 (version "2.6.5")
5085 (source
5086 (origin
5087 (method url-fetch)
5088 (uri (pypi-uri "numexpr" version))
5089 (sha256
5090 (base32
5091 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
5092 (build-system python-build-system)
5093 (arguments `(#:tests? #f)) ; no tests included
5094 (propagated-inputs
5095 `(("python-numpy" ,python-numpy)))
5096 (home-page "https://github.com/pydata/numexpr")
5097 (synopsis "Fast numerical expression evaluator for NumPy")
5098 (description
5099 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5100 expressions that operate on arrays are accelerated and use less memory than
5101 doing the same calculation in Python. In addition, its multi-threaded
5102 capabilities can make use of all your cores, which may accelerate
5103 computations, most specially if they are not memory-bounded (e.g. those using
5104 transcendental functions).")
5105 (license license:expat)))
5106
5107 (define-public python2-numexpr
5108 (package-with-python2 python-numexpr))
5109
5110 (define-public python-cycler
5111 (package
5112 (name "python-cycler")
5113 (version "0.10.0")
5114 (source (origin
5115 (method url-fetch)
5116 (uri (pypi-uri "cycler" version))
5117 (sha256
5118 (base32
5119 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5120 (build-system python-build-system)
5121 (arguments
5122 ;; XXX: The current version requires 'coveralls' which we don't have.
5123 ;; Enable this for the next release which uses 'python-pytest'.
5124 '(#:tests? #f))
5125 (propagated-inputs
5126 `(("python-six" ,python-six)))
5127 (home-page "https://matplotlib.org/cycler/")
5128 (synopsis "Composable keyword argument iterator")
5129 (description
5130 "When using @code{matplotlib} and plotting more than one line, it is
5131 common to want to be able to want to be able to cycle over one or more artist
5132 styles; but the plotting logic can quickly become involved.
5133 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5134 @code{Cycler} class was developed.")
5135 (license license:bsd-3)))
5136
5137 (define-public python2-cycler
5138 (package-with-python2 python-cycler))
5139
5140 (define-public python-colorspacious
5141 (package
5142 (name "python-colorspacious")
5143 (version "1.1.2")
5144 (source
5145 (origin
5146 (method git-fetch)
5147 (uri (git-reference
5148 (url "https://github.com/njsmith/colorspacious")
5149 (commit (string-append "v" version))))
5150 (file-name (git-file-name name version))
5151 (sha256
5152 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5153 (build-system python-build-system)
5154 (propagated-inputs
5155 `(("python-numpy" ,python-numpy)))
5156 (native-inputs
5157 `(("python-nose" ,python-nose)))
5158 (arguments
5159 `(#:phases
5160 (modify-phases %standard-phases
5161 (replace 'check
5162 (lambda _
5163 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5164 (home-page "https://github.com/njsmith/colorspacious")
5165 (synopsis "Python library for colorspace conversions")
5166 (description "@code{colorspacious} is a Python library that lets you
5167 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5168 (license license:expat)))
5169
5170 (define-public python2-colorspacious
5171 (package-with-python2 python-colorspacious))
5172
5173 (define-public python-matplotlib
5174 (package
5175 (name "python-matplotlib")
5176 (version "3.1.2")
5177 (source
5178 (origin
5179 (method url-fetch)
5180 (uri (pypi-uri "matplotlib" version))
5181 (sha256
5182 (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
5183 (patches
5184 (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
5185 (build-system python-build-system)
5186 (propagated-inputs ; the following packages are all needed at run time
5187 `(("python-cycler" ,python-cycler)
5188 ("python-kiwisolver" ,python-kiwisolver)
5189 ("python-pyparsing" ,python-pyparsing)
5190 ("python-pygobject" ,python-pygobject)
5191 ("gobject-introspection" ,gobject-introspection)
5192 ("python-tkinter" ,python "tk")
5193 ("python-dateutil" ,python-dateutil)
5194 ("python-numpy" ,python-numpy)
5195 ("python-pillow" ,python-pillow)
5196 ("python-pytz" ,python-pytz)
5197 ("python-six" ,python-six)
5198 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5199 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5200 ;; object. For this reason we need to import both libraries.
5201 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5202 ("python-pycairo" ,python-pycairo)
5203 ("python-cairocffi" ,python-cairocffi)))
5204 (inputs
5205 `(("libpng" ,libpng)
5206 ("freetype" ,freetype)
5207 ("cairo" ,cairo)
5208 ("glib" ,glib)
5209 ;; FIXME: Add backends when available.
5210 ;("python-wxpython" ,python-wxpython)
5211 ("tcl" ,tcl)
5212 ("tk" ,tk)))
5213 (native-inputs
5214 `(("pkg-config" ,pkg-config)
5215 ("python-pytest" ,python-pytest)
5216 ("python-mock" ,python-mock)
5217 ("unzip" ,unzip)
5218 ("jquery-ui"
5219 ,(origin
5220 (method url-fetch)
5221 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5222 (sha256
5223 (base32
5224 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5225 (arguments
5226 `(#:phases
5227 (modify-phases %standard-phases
5228 ;; XXX We disable all image comparison tests because we're using a
5229 ;; newer version of FreeType than matplotlib expects. This leads to
5230 ;; minor differences throughout the tests.
5231 (add-after 'unpack 'fix-and-disable-failing-tests
5232 (lambda _
5233 (substitute* (append (find-files "lib/matplotlib/tests/"
5234 "test_.*\\.py$")
5235 (find-files "lib/mpl_toolkits/tests"
5236 "test_.*\\.py$"))
5237 (("^from matplotlib" match)
5238 (string-append "import pytest\n" match))
5239 (("( *)@image_comparison" match indent)
5240 (string-append indent
5241 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5242 match)))
5243 (substitute* "lib/matplotlib/tests/test_animation.py"
5244 (("/bin/sh") (which "sh")))
5245 (for-each delete-file
5246 ;; test_normal_axes, test_get_tightbbox_polar
5247 '("lib/matplotlib/tests/test_axes.py"
5248 ;; We don't use the webagg backend and this test forces it.
5249 "lib/matplotlib/tests/test_backend_webagg.py"
5250 ;; test_outward_ticks
5251 "lib/matplotlib/tests/test_tightlayout.py"
5252 ;; test_hidden_axes fails with minor extent
5253 ;; differences, possibly due to the use of a
5254 ;; different version of FreeType.
5255 "lib/matplotlib/tests/test_constrainedlayout.py"
5256 ;; Fontconfig returns no fonts.
5257 "lib/matplotlib/tests/test_font_manager.py"))
5258 #t))
5259 (add-before 'install 'install-jquery-ui
5260 (lambda* (#:key outputs inputs #:allow-other-keys)
5261 (let ((dir (string-append (assoc-ref outputs "out")
5262 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5263 (mkdir-p dir)
5264 (invoke "unzip"
5265 (assoc-ref inputs "jquery-ui")
5266 "-d" dir))
5267 #t))
5268 (replace 'check
5269 (lambda* (#:key outputs inputs #:allow-other-keys)
5270 (add-installed-pythonpath inputs outputs)
5271 (invoke "python" "tests.py" "-v"
5272 "-m" "not network and not webagg")))
5273 (add-before 'build 'configure-environment
5274 (lambda* (#:key outputs inputs #:allow-other-keys)
5275 (let ((cairo (assoc-ref inputs "cairo")))
5276 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5277 ;; has not effect.
5278 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5279 (setenv "HOME" (getcwd))
5280 ;; Fix rounding errors when using the x87 FPU.
5281 (when (string-prefix? "i686" ,(%current-system))
5282 (setenv "CFLAGS" "-ffloat-store"))
5283 (call-with-output-file "setup.cfg"
5284 (lambda (port)
5285 (format port "[directories]~%
5286 basedirlist = ~a,~a~%
5287 [packages]~%
5288 tests = True~%"
5289 (assoc-ref inputs "tcl")
5290 (assoc-ref inputs "tk")))))
5291 #t)))))
5292 (home-page "https://matplotlib.org/")
5293 (synopsis "2D plotting library for Python")
5294 (description
5295 "Matplotlib is a Python 2D plotting library which produces publication
5296 quality figures in a variety of hardcopy formats and interactive environments
5297 across platforms. Matplotlib can be used in Python scripts, the python and
5298 ipython shell, web application servers, and six graphical user interface
5299 toolkits.")
5300 (license license:psfl)
5301 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5302
5303 (define-public python2-matplotlib
5304 (let ((matplotlib (package-with-python2
5305 (strip-python2-variant python-matplotlib))))
5306 (package (inherit matplotlib)
5307 (version "2.2.4")
5308 (source
5309 (origin
5310 (method url-fetch)
5311 (uri (pypi-uri "matplotlib" version))
5312 (sha256
5313 (base32
5314 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5315 (arguments
5316 (substitute-keyword-arguments (package-arguments matplotlib)
5317 ((#:phases phases)
5318 `(modify-phases ,phases
5319 (replace 'install-jquery-ui
5320 (lambda* (#:key outputs inputs #:allow-other-keys)
5321 (let ((dir (string-append (assoc-ref outputs "out")
5322 "/lib/python2.7/site-packages/"
5323 "matplotlib/backends/web_backend/")))
5324 (mkdir-p dir)
5325 (invoke "unzip"
5326 (assoc-ref inputs "jquery-ui")
5327 "-d" dir))
5328 #t))
5329 (delete 'fix-and-disable-failing-tests)
5330 (delete 'check))))) ; These tests weren't run the the past.
5331 ;; Make sure to use special packages for Python 2 instead
5332 ;; of those automatically rewritten by package-with-python2.
5333 (propagated-inputs
5334 `(("python2-pycairo" ,python2-pycairo)
5335 ("python2-backports-functools-lru-cache"
5336 ,python2-backports-functools-lru-cache)
5337 ("python2-functools32" ,python2-functools32)
5338 ("python2-pygobject-2" ,python2-pygobject-2)
5339 ("python2-subprocess32" ,python2-subprocess32)
5340 ("python2-tkinter" ,python-2 "tk")
5341 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5342 '("python-cairocffi"
5343 "python-pycairo"
5344 "python-pygobject"
5345 "python-tkinter")))))))
5346
5347 (define-public python-matplotlib-documentation
5348 (package
5349 (name "python-matplotlib-documentation")
5350 (version (package-version python-matplotlib))
5351 (source (package-source python-matplotlib))
5352 (build-system python-build-system)
5353 (native-inputs
5354 `(("python-matplotlib" ,python-matplotlib)
5355 ("python-colorspacious" ,python-colorspacious)
5356 ("python-sphinx" ,python-sphinx)
5357 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5358 ("python-sphinx-gallery" ,python-sphinx-gallery)
5359 ("python-numpydoc" ,python-numpydoc)
5360 ("python-ipython" ,python-ipython)
5361 ("python-ipykernel" ,python-ipykernel)
5362 ("python-mock" ,python-mock)
5363 ("graphviz" ,graphviz)
5364 ("texlive" ,(texlive-union (list texlive-amsfonts
5365 texlive-latex-amsmath
5366 texlive-latex-enumitem
5367 texlive-latex-expdlist
5368 texlive-latex-geometry
5369 texlive-latex-preview
5370 texlive-latex-type1cm
5371 texlive-latex-ucs
5372
5373 texlive-generic-pdftex
5374
5375 texlive-fonts-ec
5376 texlive-fonts-adobe-times
5377 texlive-fonts-txfonts)))
5378 ("texinfo" ,texinfo)
5379 ,@(package-native-inputs python-matplotlib)))
5380 (arguments
5381 `(#:tests? #f ; we're only generating documentation
5382 #:phases
5383 (modify-phases %standard-phases
5384 ;; The tests in python-matplotlib are run after the install phase, so
5385 ;; we need to delete the extra phase here.
5386 (delete 'check)
5387 (replace 'build
5388 (lambda _
5389 (chdir "doc")
5390 (setenv "PYTHONPATH"
5391 (string-append (getenv "PYTHONPATH")
5392 ":" (getcwd) "/../examples/units"))
5393 (substitute* "conf.py"
5394 ;; Don't use git.
5395 (("^SHA = check_output.*")
5396 (string-append "SHA = \"" ,version "\"\n"))
5397 ;; Don't fetch intersphinx files from the Internet
5398 (("^explicit_order_folders" m)
5399 (string-append "intersphinx_mapping = {}\n" m))
5400 (("'sphinx.ext.intersphinx',") "")
5401 ;; Disable URL embedding which requires internet access.
5402 (("'https://docs.scipy.org/doc/numpy'") "None")
5403 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5404 (invoke "make"
5405 "SPHINXBUILD=sphinx-build"
5406 "SPHINXOPTS=" ; don't abort on warnings
5407 "html" "texinfo")))
5408 (replace 'install
5409 (lambda* (#:key inputs outputs #:allow-other-keys)
5410 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5411 (doc (string-append data "/doc/python-matplotlib-" ,version))
5412 (info (string-append data "/info"))
5413 (html (string-append doc "/html")))
5414 (mkdir-p html)
5415 (mkdir-p info)
5416 (copy-recursively "build/html" html)
5417 (symlink (string-append html "/_images")
5418 (string-append info "/matplotlib-figures"))
5419 (with-directory-excursion "build/texinfo"
5420 (substitute* "matplotlib.texi"
5421 (("@image\\{([^,]*)" all file)
5422 (string-append "@image{matplotlib-figures/" file)))
5423 (symlink (string-append html "/_images")
5424 "./matplotlib-figures")
5425 (invoke "makeinfo" "--no-split"
5426 "-o" "matplotlib.info" "matplotlib.texi"))
5427 (install-file "build/texinfo/matplotlib.info" info))
5428 #t)))))
5429 (home-page (package-home-page python-matplotlib))
5430 (synopsis "Documentation for the python-matplotlib package")
5431 (description (package-description python-matplotlib))
5432 (license (package-license python-matplotlib))))
5433
5434 (define-public python2-matplotlib-documentation
5435 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5436 (package
5437 (inherit parent)
5438 (native-inputs
5439 (alist-delete "python-sphinx-copybutton"
5440 (package-native-inputs parent))))))
5441
5442 (define-public python-matplotlib-venn
5443 (package
5444 (name "python-matplotlib-venn")
5445 (version "0.11.5")
5446 (source
5447 (origin
5448 (method url-fetch)
5449 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5450 (sha256
5451 (base32
5452 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5453 (build-system python-build-system)
5454 (arguments '(#:tests? #f)) ; tests are not included
5455 (propagated-inputs
5456 `(("python-matplotlib" ,python-matplotlib)
5457 ("python-numpy" ,python-numpy)
5458 ("python-scipy" ,python-scipy)))
5459 (native-inputs
5460 `(("unzip" ,unzip)))
5461 (home-page "https://github.com/konstantint/matplotlib-venn")
5462 (synopsis "Plot area-proportional Venn diagrams")
5463 (description
5464 "This package provides tools for plotting area-proportional two- and
5465 three-way Venn diagrams in @code{matplotlib}.")
5466 (license license:expat)))
5467
5468 (define-public python-pysnptools
5469 (package
5470 (name "python-pysnptools")
5471 (version "0.4.11")
5472 (source
5473 (origin
5474 (method url-fetch)
5475 (uri (pypi-uri "pysnptools" version))
5476 (sha256
5477 (base32
5478 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5479 (build-system python-build-system)
5480 (arguments
5481 `(#:tests? #f ; no test data are included
5482 #:phases
5483 (modify-phases %standard-phases
5484 (replace 'check
5485 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5486 (if tests?
5487 (begin
5488 (add-installed-pythonpath inputs outputs)
5489 (invoke "python3" "pysnptools/test.py"))
5490 #t))))))
5491 (propagated-inputs
5492 `(("python-dill" ,python-dill)
5493 ("python-h5py" ,python-h5py)
5494 ("python-numpy" ,python-numpy)
5495 ("python-pandas" ,python-pandas)
5496 ("python-psutil" ,python-psutil)
5497 ("python-scipy" ,python-scipy)))
5498 (native-inputs
5499 `(("python-cython" ,python-cython)))
5500 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5501 (synopsis "Library for reading and manipulating genetic data")
5502 (description
5503 "PySnpTools is a library for reading and manipulating genetic data. It
5504 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5505 those files. It can also efficiently manipulate ranges of integers using set
5506 operators such as union, intersection, and difference.")
5507 (license license:asl2.0)))
5508
5509 (define-public python2-pysnptools
5510 (package-with-python2 python-pysnptools))
5511
5512 (define-public python-wurlitzer
5513 (package
5514 (name "python-wurlitzer")
5515 (version "2.0.1")
5516 (source
5517 (origin
5518 (method url-fetch)
5519 (uri (pypi-uri "wurlitzer" version))
5520 (sha256
5521 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5522 (build-system python-build-system)
5523 (arguments
5524 '(#:phases
5525 (modify-phases %standard-phases
5526 (replace 'check
5527 (lambda _
5528 (invoke "pytest" "-vv" "test.py"))))))
5529 (native-inputs
5530 `(("python-mock" ,python-mock)
5531 ("python-pytest" ,python-pytest)))
5532 (home-page "https://github.com/minrk/wurlitzer")
5533 (synopsis "Capture C-level output in context managers")
5534 (description
5535 "This library helps to redirect @code{sys.stdout} to a stream or a file
5536 while executing some piece of code, including C code running within a Python
5537 process.")
5538 (license license:expat)))
5539
5540 (define-public python-socksipy-branch
5541 (package
5542 (name "python-socksipy-branch")
5543 (version "1.01")
5544 (source
5545 (origin
5546 (method url-fetch)
5547 (uri (pypi-uri "SocksiPy-branch" version))
5548 (sha256
5549 (base32
5550 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5551 (build-system python-build-system)
5552 (arguments
5553 `(#:tests? #f)) ; There are no tests
5554 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5555 (synopsis "Python SOCKS module")
5556 (description
5557 "SocksiPy - A Python SOCKS client module. It provides a
5558 socket-like interface that supports connections to any TCP
5559 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5560 The original version was developed by Dan Haim, this is a
5561 branch created by Mario Vilas to address some open issues,
5562 as the original project seems to have been abandoned circa 2007.")
5563 (license license:bsd-3)))
5564
5565 (define-public python2-socksipy-branch
5566 (package-with-python2 python-socksipy-branch))
5567
5568 (define-public python-socksipychain
5569 (package
5570 (name "python-socksipychain")
5571 (version "2.1.2")
5572 (source
5573 (origin
5574 (method git-fetch)
5575 (uri (git-reference
5576 (url "https://github.com/pagekite/PySocksipyChain")
5577 (commit (string-append "v" version))))
5578 (file-name (git-file-name name version))
5579 (sha256
5580 (base32
5581 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5582 (build-system python-build-system)
5583 (arguments
5584 `(#:tests? #f)) ; Tests try to access the network.
5585 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5586 (synopsis "Python SOCKS module with chained proxies support")
5587 (description
5588 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5589 adds support for arbitrary chaining of proxy servers and various modes of
5590 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5591 a simple netcat replacement with chaining support.")
5592 (license license:bsd-3)))
5593
5594 (define-public python-pycodestyle
5595 (package
5596 (name "python-pycodestyle")
5597 (version "2.7.0")
5598 (source
5599 (origin
5600 (method url-fetch)
5601 (uri (pypi-uri "pycodestyle" version))
5602 (sha256
5603 (base32
5604 "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
5605 (build-system python-build-system)
5606 (arguments
5607 `(#:phases
5608 (modify-phases %standard-phases
5609 (replace 'check
5610 (lambda _
5611 (invoke "pytest" "-vv"))))))
5612 (native-inputs
5613 `(("python-pytest" ,python-pytest)))
5614 (home-page "https://pycodestyle.readthedocs.io/")
5615 (synopsis "Python style guide checker")
5616 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5617 Python code against some of the style conventions in
5618 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5619 (license license:expat)))
5620
5621 (define-public python2-pycodestyle
5622 (package-with-python2 python-pycodestyle))
5623
5624 (define-public python-multidict
5625 (package
5626 (name "python-multidict")
5627 (version "4.7.5")
5628 (source
5629 (origin
5630 (method url-fetch)
5631 (uri (pypi-uri "multidict" version))
5632 (sha256
5633 (base32
5634 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5635 (build-system python-build-system)
5636 (arguments
5637 '(#:modules ((ice-9 ftw)
5638 (srfi srfi-1)
5639 (srfi srfi-26)
5640 (guix build utils)
5641 (guix build python-build-system))
5642 #:phases (modify-phases %standard-phases
5643 (replace 'check
5644 (lambda* (#:key tests? #:allow-other-keys)
5645 (if tests?
5646 (begin
5647 (let ((libdir (find (cut string-prefix? "lib." <>)
5648 (scandir "build"))))
5649 (setenv "PYTHONPATH"
5650 (string-append "./build/" libdir ":"
5651 (getenv "PYTHONPATH")))
5652 (invoke "pytest" "-vv")))
5653 (format #t "test suite not run~%"))
5654 #t)))))
5655 (native-inputs
5656 `(("python-pytest" ,python-pytest)
5657 ("python-pytest-cov" ,python-pytest-cov)))
5658 (home-page "https://github.com/aio-libs/multidict/")
5659 (synopsis "Multidict implementation")
5660 (description "Multidict is dict-like collection of key-value pairs
5661 where key might be occurred more than once in the container.")
5662 (license license:asl2.0)))
5663
5664 (define-public python-orderedmultidict
5665 (package
5666 (name "python-orderedmultidict")
5667 (version "1.0")
5668 (source
5669 (origin
5670 (method url-fetch)
5671 (uri (pypi-uri "orderedmultidict" version))
5672 (sha256
5673 (base32
5674 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5675 (build-system python-build-system)
5676 (arguments
5677 `(#:phases
5678 (modify-phases %standard-phases
5679 (add-after 'unpack 'fix-tests
5680 (lambda _
5681 ;; The package uses nosetest for running the tests.
5682 ;; Adding this initfile allows to run the test suite
5683 ;; without requiring nosetest.
5684 (with-output-to-file "tests/__init__.py" newline)
5685 #t)))))
5686 (propagated-inputs
5687 `(("python-six" ,python-six)))
5688 (native-inputs
5689 `(("python-pycodestyle" ,python-pycodestyle)))
5690 (home-page "https://github.com/gruns/orderedmultidict")
5691 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5692 (description "This package contains a library for ordered multivalue
5693 dictionaries. A multivalue dictionary is a dictionary that can store
5694 multiple values for the same key. An ordered multivalue dictionary is a
5695 multivalue dictionary that retains the order of insertions and deletions.")
5696 (license license:unlicense)))
5697
5698 (define-public python2-orderedmultidict
5699 (package-with-python2 python-orderedmultidict))
5700
5701 (define-public python-autopep8
5702 (package
5703 (name "python-autopep8")
5704 (version "1.5.3")
5705 (source
5706 (origin
5707 (method url-fetch)
5708 (uri (pypi-uri "autopep8" version))
5709 (sha256
5710 (base32
5711 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5712 (build-system python-build-system)
5713 (propagated-inputs
5714 `(("python-pycodestyle" ,python-pycodestyle)
5715 ("python-toml" ,python-toml)))
5716 (home-page "https://github.com/hhatto/autopep8")
5717 (synopsis "Format Python code according to the PEP 8 style guide")
5718 (description
5719 "@code{autopep8} automatically formats Python code to conform to
5720 the PEP 8 style guide. It uses the pycodestyle utility to determine
5721 what parts of the code needs to be formatted. @code{autopep8} is
5722 capable of fixing most of the formatting issues that can be reported
5723 by pycodestyle.")
5724 (license (license:non-copyleft
5725 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5726
5727 (define-public python2-autopep8
5728 (package-with-python2 python-autopep8))
5729
5730 (define-public python-distlib
5731 (package
5732 (name "python-distlib")
5733 (version "0.3.0")
5734 (source
5735 (origin
5736 (method url-fetch)
5737 (uri (pypi-uri "distlib" version ".zip"))
5738 (sha256
5739 (base32
5740 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5741 (build-system python-build-system)
5742 (arguments
5743 `(#:phases
5744 (modify-phases %standard-phases
5745 (add-before 'build 'no-/bin/sh
5746 (lambda _
5747 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5748 (("/bin/sh") (which "sh")))
5749 #t))
5750 (add-before 'check 'prepare-test-env
5751 (lambda _
5752 (setenv "HOME" "/tmp")
5753 ;; NOTE: Any value works, the variable just has to be present.
5754 (setenv "SKIP_ONLINE" "1")
5755 #t)))))
5756 (native-inputs `(("unzip" ,unzip)))
5757 (home-page "https://bitbucket.org/pypa/distlib")
5758 (synopsis "Distribution utilities")
5759 (description "Distlib is a library which implements low-level functions that
5760 relate to packaging and distribution of Python software. It is intended to be
5761 used as the basis for third-party packaging tools.")
5762 (license license:psfl)))
5763
5764 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
5765 (define-public python-distlib/next
5766 (package
5767 (inherit python-distlib)
5768 (version "0.3.1")
5769 (source
5770 (origin
5771 (method url-fetch)
5772 (uri (pypi-uri "distlib" version ".zip"))
5773 (sha256
5774 (base32
5775 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
5776
5777 (define-public python-distutils-extra
5778 (package
5779 (name "python-distutils-extra")
5780 (version "2.38")
5781 (source
5782 (origin
5783 (method url-fetch)
5784 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5785 version "/+download/python-distutils-extra-"
5786 version ".tar.gz"))
5787 (sha256
5788 (base32
5789 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5790 (build-system python-build-system)
5791 (home-page "https://launchpad.net/python-distutils-extra/")
5792 (synopsis "Enhancements to Python's distutils")
5793 (description
5794 "The python-distutils-extra module enables you to easily integrate
5795 gettext support, themed icons, and scrollkeeper-based documentation into
5796 Python's distutils.")
5797 (license license:gpl2)))
5798
5799 (define-public python2-distutils-extra
5800 (package-with-python2 python-distutils-extra))
5801
5802 (define-public python2-elib.intl
5803 (package
5804 (name "python2-elib.intl")
5805 (version "0.0.3")
5806 (source
5807 (origin
5808 ;; This project doesn't tag releases or publish tarballs, so we take
5809 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5810 (method git-fetch)
5811 (uri (git-reference
5812 (url "https://github.com/dieterv/elib.intl")
5813 (commit "d09997cfef")))
5814 (file-name (string-append name "-" version "-checkout"))
5815 (sha256
5816 (base32
5817 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5818 (build-system python-build-system)
5819 (arguments
5820 ;; incompatible with Python 3 (exception syntax)
5821 `(#:python ,python-2
5822 #:tests? #f))
5823 (home-page "https://github.com/dieterv/elib.intl")
5824 (synopsis "Enhanced internationalization for Python")
5825 (description
5826 "The elib.intl module provides enhanced internationalization (I18N)
5827 services for your Python modules and applications.")
5828 (license license:lgpl3+)))
5829
5830 (define-public python-olefile
5831 (package
5832 (name "python-olefile")
5833 (version "0.46")
5834 (source
5835 (origin
5836 (method url-fetch)
5837 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5838 "download/v" version "/olefile-" version ".tar.gz"))
5839 (file-name (string-append name "-" version ".tar.gz"))
5840 (sha256
5841 (base32
5842 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5843 (build-system python-build-system)
5844 (home-page "https://www.decalage.info/python/olefileio")
5845 (synopsis "Read and write Microsoft OLE2 files.")
5846 (description
5847 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5848 Storage or Compound Document, Microsoft Office). It is an improved version of
5849 the OleFileIO module from PIL, the Python Image Library.")
5850 (license license:bsd-3)))
5851
5852 (define-public python2-olefile
5853 (package-with-python2 python-olefile))
5854
5855 (define-public python-pikepdf
5856 (package
5857 (name "python-pikepdf")
5858 (version "2.10.0")
5859 (source
5860 (origin
5861 (method url-fetch)
5862 (uri (pypi-uri "pikepdf" version))
5863 (sha256
5864 (base32 "09wfj1hjvj3r9gv7ywrqd7h3d0bz64bvils8sm3ghj90jhalb03s"))))
5865 (build-system python-build-system)
5866 (arguments
5867 `(#:tests? #false)) ;require python-xmp-toolkit
5868 (native-inputs
5869 `(("pybind11" ,pybind11)
5870 ("python-setuptools" ,python-setuptools)
5871 ("python-setuptools-scm" ,python-setuptools-scm/next)
5872 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
5873 ("python-toml" ,python-toml)
5874 ("python-wheel" ,python-wheel)))
5875 (inputs
5876 `(("qpdf" ,qpdf)))
5877 (propagated-inputs
5878 `(("python-lxml" ,python-lxml)
5879 ("python-pillow" ,python-pillow)))
5880 (home-page "https://github.com/pikepdf/pikepdf")
5881 (synopsis "Read and write PDFs with Python")
5882 (description
5883 "pikepdf is a Python library for reading and writing PDF files.")
5884 (license license:mpl2.0)))
5885
5886 (define-public python-pillow
5887 (package
5888 (name "python-pillow")
5889 (version "8.1.1")
5890 (source
5891 (origin
5892 (method url-fetch)
5893 (uri (pypi-uri "Pillow" version))
5894 (sha256
5895 (base32
5896 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
5897 (build-system python-build-system)
5898 (native-inputs
5899 `(("python-pytest" ,python-pytest)))
5900 (inputs
5901 `(("freetype" ,freetype)
5902 ("lcms" ,lcms)
5903 ("libjpeg" ,libjpeg-turbo)
5904 ("libtiff" ,libtiff)
5905 ("libwebp" ,libwebp)
5906 ("openjpeg" ,openjpeg)
5907 ("zlib" ,zlib)))
5908 (propagated-inputs
5909 `(("python-olefile" ,python-olefile)))
5910 (arguments
5911 `(#:phases
5912 (modify-phases %standard-phases
5913 (add-after 'unpack 'patch-ldconfig
5914 (lambda _
5915 (substitute* "setup.py"
5916 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5917 (replace 'check
5918 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5919 (if tests?
5920 (begin
5921 (setenv "HOME" (getcwd))
5922 ;; Make installed package available for running the tests.
5923 (add-installed-pythonpath inputs outputs)
5924 (invoke "python" "selftest.py" "--installed")
5925 (invoke "python" "-m" "pytest" "-vv"))
5926 #t))))))
5927 (home-page "https://python-pillow.org")
5928 (synopsis "Fork of the Python Imaging Library")
5929 (description
5930 "The Python Imaging Library adds image processing capabilities to your
5931 Python interpreter. This library provides extensive file format support, an
5932 efficient internal representation, and fairly powerful image processing
5933 capabilities. The core image library is designed for fast access to data
5934 stored in a few basic pixel formats. It should provide a solid foundation for
5935 a general image processing tool.")
5936 (properties `((python2-variant . ,(delay python2-pillow))))
5937 (license (license:x11-style
5938 "http://www.pythonware.com/products/pil/license.htm"
5939 "The PIL Software License"))))
5940
5941 (define-public python2-pillow
5942 (package-with-python2
5943 (package
5944 (inherit (strip-python2-variant python-pillow))
5945 ;; Version 6 is the last series with Python 2 support.
5946 (version "6.2.2")
5947 (source
5948 (origin
5949 (method url-fetch)
5950 (uri (pypi-uri "Pillow" version))
5951 (sha256
5952 (base32
5953 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
5954
5955 (define-public python-pillow-2.9
5956 (package
5957 (inherit python-pillow)
5958 (version "2.9.0")
5959 (source
5960 (origin
5961 (method url-fetch)
5962 (uri (pypi-uri "Pillow" version))
5963 (sha256
5964 (base32
5965 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5966 (arguments
5967 (substitute-keyword-arguments (package-arguments python-pillow)
5968 ((#:tests? _ #f) #f)))
5969 (properties '((hidden? #t)))))
5970
5971 (define-public python-pillow-simd
5972 (package
5973 (inherit python-pillow)
5974 (name "python-pillow-simd")
5975 (version "7.1.2")
5976 ;; The PyPI tarball does not include test files.
5977 (source
5978 (origin
5979 (method git-fetch)
5980 (uri (git-reference
5981 (url "https://github.com/uploadcare/pillow-simd")
5982 (commit version)))
5983 (file-name (git-file-name name version))
5984 (sha256
5985 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
5986 (arguments
5987 (substitute-keyword-arguments
5988 (package-arguments python-pillow)
5989 ((#:phases phases)
5990 `(modify-phases ,phases
5991 (add-after 'unpack 'make-tests-writable
5992 (lambda _
5993 (for-each make-file-writable (find-files "Tests"))
5994 #t))))))
5995 (inputs
5996 `(("libraqm" ,libraqm)
5997 ("libimagequant" ,libimagequant)
5998 ,@(package-inputs python-pillow)))
5999 (home-page "https://github.com/uploadcare/pillow-simd")
6000 (synopsis "Fork of the Python Imaging Library (Pillow)")
6001 (description "This package is a fork of Pillow which adds support for SIMD
6002 parallelism.")))
6003
6004 (define-public python-roifile
6005 (package
6006 (name "python-roifile")
6007 (version "2020.5.28")
6008 (source
6009 (origin
6010 (method url-fetch)
6011 (uri (pypi-uri "roifile" version))
6012 (sha256
6013 (base32
6014 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
6015 (build-system python-build-system)
6016 (arguments `(#:tests? #f)) ; there are none
6017 (propagated-inputs
6018 `(("python-numpy" ,python-numpy)))
6019 (home-page "https://www.lfd.uci.edu/~gohlke/")
6020 (synopsis "Read and write ImageJ ROI format")
6021 (description "Roifile is a Python library to read, write, create, and plot
6022 ImageJ ROIs, an undocumented and ImageJ application specific format to store
6023 regions of interest, geometric shapes, paths, text, etc for image overlays.")
6024 (license license:bsd-3)))
6025
6026 (define-public python-tifffile
6027 (package
6028 (name "python-tifffile")
6029 (version "2020.6.3")
6030 (source
6031 (origin
6032 (method url-fetch)
6033 (uri (pypi-uri "tifffile" version))
6034 (sha256
6035 (base32
6036 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
6037 (build-system python-build-system)
6038 ;; Tests require lfdfiles, which depends on tifffile
6039 (arguments `(#:tests? #f))
6040 (propagated-inputs
6041 `(("python-numpy" ,python-numpy)
6042 ;;("python-lfdfiles" ,python-lfdfiles)
6043 ("python-roifile" ,python-roifile)))
6044 (home-page "https://www.lfd.uci.edu/~gohlke/")
6045 (synopsis "Read and write TIFF(r) files")
6046 (description "This package lets you read image and metadata from many
6047 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6048 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6049 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6050 (license license:bsd-3)))
6051
6052 (define-public python-lfdfiles
6053 (package
6054 (name "python-lfdfiles")
6055 (version "2020.1.1")
6056 (source
6057 (origin
6058 (method url-fetch)
6059 (uri (pypi-uri "lfdfiles" version))
6060 (sha256
6061 (base32
6062 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
6063 (build-system python-build-system)
6064 (propagated-inputs
6065 `(("python-click" ,python-click)
6066 ("python-numpy" ,python-numpy)
6067 ("python-tifffile" ,python-tifffile)))
6068 (home-page "https://www.lfd.uci.edu/~gohlke/")
6069 (synopsis "Work with LFD data files")
6070 (description
6071 "Lfdfiles is a Python library and console script for reading, writing,
6072 converting, and viewing many of the proprietary file formats used to store
6073 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6074 (license license:bsd-3)))
6075
6076 (define-public python-imageio
6077 (package
6078 (name "python-imageio")
6079 (version "2.8.0")
6080 (source
6081 (origin
6082 (method url-fetch)
6083 (uri (pypi-uri "imageio" version))
6084 (sha256
6085 (base32
6086 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6087 (build-system python-build-system)
6088 (arguments
6089 `(#:tests? #f ; many tests require online data
6090 #:phases
6091 (modify-phases %standard-phases
6092 (replace 'check
6093 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6094 (if tests?
6095 (begin
6096 ;; Make installed package available for running the tests.
6097 (add-installed-pythonpath inputs outputs)
6098 (invoke "pytest" "-vv"))
6099 #t))))))
6100 (propagated-inputs
6101 `(("python-numpy" ,python-numpy)
6102 ("python-pillow" ,python-pillow)
6103 ("python-psutil" ,python-psutil)))
6104 (native-inputs
6105 `(("python-pytest" ,python-pytest)))
6106 (home-page "https://imageio.github.io/")
6107 (synopsis "Library for reading and writing a wide range of image data")
6108 (description
6109 "Imageio is a Python library that provides an easy interface to read and
6110 write a wide range of image data, including animated images, video, volumetric
6111 data, and scientific formats.")
6112 (license license:bsd-2)))
6113
6114 (define-public python-pycparser
6115 (package
6116 (name "python-pycparser")
6117 (version "2.20")
6118 (source
6119 (origin
6120 (method url-fetch)
6121 (uri (pypi-uri "pycparser" version))
6122 (sha256
6123 (base32
6124 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6125 (outputs '("out" "doc"))
6126 (build-system python-build-system)
6127 (native-inputs
6128 `(("pkg-config" ,pkg-config)))
6129 (arguments
6130 `(#:phases
6131 (modify-phases %standard-phases
6132 (replace 'check
6133 (lambda _
6134 (with-directory-excursion "tests"
6135 (invoke "python" "all_tests.py"))
6136 #t))
6137 (add-after 'install 'install-doc
6138 (lambda* (#:key outputs #:allow-other-keys)
6139 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6140 (doc (string-append data "/doc/" ,name "-" ,version))
6141 (examples (string-append doc "/examples")))
6142 (mkdir-p examples)
6143 (for-each (lambda (file)
6144 (copy-file (string-append "." file)
6145 (string-append doc file)))
6146 '("/README.rst" "/CHANGES" "/LICENSE"))
6147 (copy-recursively "examples" examples)
6148 #t))))))
6149 (home-page "https://github.com/eliben/pycparser")
6150 (synopsis "C parser in Python")
6151 (description
6152 "Pycparser is a complete parser of the C language, written in pure Python
6153 using the PLY parsing library. It parses C code into an AST and can serve as
6154 a front-end for C compilers or analysis tools.")
6155 (license license:bsd-3)))
6156
6157 (define-public python2-pycparser
6158 (package-with-python2 python-pycparser))
6159
6160 (define-public python-xlsxwriter
6161 (package
6162 (name "python-xlsxwriter")
6163 (version "1.3.7")
6164 (source
6165 (origin
6166 ;; There are no tests in the PyPI tarball.
6167 (method git-fetch)
6168 (uri (git-reference
6169 (url "https://github.com/jmcnamara/XlsxWriter")
6170 (commit (string-append "RELEASE_" version))))
6171 (file-name (git-file-name name version))
6172 (sha256
6173 (base32 "1qg40r2mwrqfmhaxnary1cfgi0dwwazp5qga7c9p2cdji2v0x5rm"))))
6174 (build-system python-build-system)
6175 (home-page "https://github.com/jmcnamara/XlsxWriter")
6176 (synopsis "Python module for creating Excel XLSX files")
6177 (description
6178 "XlsxWriter is a Python module that can be used to write text, numbers,
6179 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
6180 (license license:bsd-2)))
6181
6182 (define-public python-pywavelets
6183 (package
6184 (name "python-pywavelets")
6185 (version "1.1.1")
6186 (home-page "https://github.com/PyWavelets/pywt")
6187 (source (origin
6188 (method url-fetch)
6189 (uri (pypi-uri "PyWavelets" version))
6190 (sha256
6191 (base32
6192 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6193 (build-system python-build-system)
6194 (arguments
6195 '(#:modules ((ice-9 ftw)
6196 (srfi srfi-1)
6197 (srfi srfi-26)
6198 (guix build utils)
6199 (guix build python-build-system))
6200 #:phases
6201 (modify-phases %standard-phases
6202 (replace 'check
6203 (lambda _
6204 (let ((cwd (getcwd))
6205 (libdir (find (cut string-prefix? "lib." <>)
6206 (scandir "build"))))
6207 (with-directory-excursion (string-append cwd "/build/" libdir)
6208 (invoke "pytest" "-vv"))))))))
6209 (native-inputs
6210 `(("python-matplotlib" ,python-matplotlib) ;for tests
6211 ("python-pytest" ,python-pytest)))
6212 (propagated-inputs
6213 `(("python-numpy" ,python-numpy)))
6214 (synopsis "Wavelet transforms in Python")
6215 (description
6216 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6217 mathematical basis functions that are localized in both time and frequency.
6218 Wavelet transforms are time-frequency transforms employing wavelets. They are
6219 similar to Fourier transforms, the difference being that Fourier transforms are
6220 localized only in frequency instead of in time and frequency.")
6221 (license license:expat)))
6222
6223 (define-public python-pywal
6224 (package
6225 (name "python-pywal")
6226 (version "3.3.0")
6227 (source
6228 (origin
6229 (method git-fetch)
6230 (uri (git-reference
6231 (url "https://github.com/dylanaraps/pywal")
6232 (commit version)))
6233 (file-name (git-file-name name version))
6234 (sha256
6235 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
6236 (build-system python-build-system)
6237 (arguments
6238 `(#:phases
6239 (modify-phases %standard-phases
6240 (add-before 'check 'fix-home-directory
6241 (lambda _
6242 ;; Tests fail with "Permission denied: '/homeless-shelter'".
6243 (setenv "HOME" "/tmp")
6244 #t)))))
6245 (inputs
6246 `(("imagemagick" ,imagemagick)))
6247 (home-page "https://github.com/dylanaraps/pywal")
6248 (synopsis "Color palette generator and applicator")
6249 (description
6250 "Pywal is a tool that generates a color palette from the dominant colors
6251 in an image. It then applies the colors system-wide and on-the-fly in all of
6252 your favourite programs.")
6253 (license license:expat)))
6254
6255 (define-public python-pywinrm
6256 (package
6257 (name "python-pywinrm")
6258 (version "0.4.1")
6259 (source
6260 (origin
6261 (method url-fetch)
6262 (uri (pypi-uri "pywinrm" version))
6263 (sha256
6264 (base32
6265 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6266 (build-system python-build-system)
6267 (propagated-inputs
6268 `(("python-six" ,python-six)
6269 ("python-requests_ntlm" ,python-requests_ntlm)
6270 ("python-xmltodict" ,python-xmltodict)
6271 ("python-kerberos" ,python-kerberos)))
6272 (native-inputs
6273 `(("python-mock" ,python-mock)
6274 ("python-pytest" ,python-pytest)))
6275 (home-page "https://github.com/diyan/pywinrm/")
6276 (synopsis
6277 "Python library for Windows Remote Management (WinRM)")
6278 (description
6279 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6280 service. It allows you to invoke commands on target Windows machines from
6281 any machine that can run Python.")
6282 (license license:expat)))
6283
6284 (define-public python-xcffib
6285 (package
6286 (name "python-xcffib")
6287 (version "0.6.0")
6288 (source
6289 (origin
6290 (method url-fetch)
6291 (uri (pypi-uri "xcffib" version))
6292 (sha256
6293 (base32
6294 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6295 (build-system python-build-system)
6296 (inputs
6297 `(("libxcb" ,libxcb)))
6298 (propagated-inputs
6299 `(("python-cffi" ,python-cffi) ; used at run time
6300 ("python-six" ,python-six)))
6301 (arguments
6302 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6303 #:tests? #f
6304 #:phases
6305 (modify-phases %standard-phases
6306 (add-after 'unpack 'fix-libxcb-path
6307 (lambda* (#:key inputs #:allow-other-keys)
6308 (let ((libxcb (assoc-ref inputs "libxcb")))
6309 (substitute* '("xcffib/__init__.py")
6310 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6311 #t)))
6312 (add-after 'install 'install-doc
6313 (lambda* (#:key outputs #:allow-other-keys)
6314 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6315 "/doc/" ,name "-" ,version)))
6316 (mkdir-p doc)
6317 (copy-file "README.md"
6318 (string-append doc "/README.md"))
6319 #t))))))
6320 (home-page "https://github.com/tych0/xcffib")
6321 (synopsis "XCB Python bindings")
6322 (description
6323 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6324 support for Python 3 and PyPy. It is based on cffi.")
6325 (license license:expat)))
6326
6327 (define-public python2-xcffib
6328 (package-with-python2 python-xcffib))
6329
6330 (define-public python-cairocffi
6331 (package
6332 (name "python-cairocffi")
6333 (version "1.2.0")
6334 (source
6335 (origin
6336 ;; The PyPI archive does not include the documentation, so use Git.
6337 (method git-fetch)
6338 (uri (git-reference
6339 (url "https://github.com/Kozea/cairocffi")
6340 (commit (string-append "v" version))))
6341 (file-name (git-file-name name version))
6342 (sha256
6343 (base32
6344 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6345 (build-system python-build-system)
6346 (outputs '("out" "doc"))
6347 (inputs
6348 `(("glib" ,glib)
6349 ("gtk+" ,gtk+)
6350 ("gdk-pixbuf" ,gdk-pixbuf)
6351 ("cairo" ,cairo)))
6352 (native-inputs
6353 `(("python-numpy" ,python-numpy)
6354 ("python-pytest" ,python-pytest)
6355 ("python-pytest-cov" ,python-pytest-cov)
6356 ("python-pytest-runner" ,python-pytest-runner)
6357 ("python-sphinx" ,python-sphinx)
6358 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6359 (propagated-inputs
6360 `(("python-xcffib" ,python-xcffib))) ; used at run time
6361 (arguments
6362 `(#:phases
6363 (modify-phases %standard-phases
6364 (add-after 'unpack 'patch-paths
6365 (lambda* (#:key inputs #:allow-other-keys)
6366 (substitute* "cairocffi/__init__.py"
6367 ;; Hack the dynamic library loading mechanism.
6368 (("find_library\\(library_name\\)")
6369 "\"found\"")
6370 (("filenames = \\(library_filename,\\) \\+ filenames")
6371 "pass")
6372 (("libcairo.so.2")
6373 (string-append (assoc-ref inputs "cairo")
6374 "/lib/libcairo.so.2")))
6375 (substitute* "cairocffi/pixbuf.py"
6376 (("libgdk_pixbuf-2.0.so.0")
6377 (string-append (assoc-ref inputs "gdk-pixbuf")
6378 "/lib/libgdk_pixbuf-2.0.so.0"))
6379 (("libgobject-2.0.so.0")
6380 (string-append (assoc-ref inputs "glib")
6381 "/lib/libgobject-2.0.so.0"))
6382 (("libglib-2.0.so.0")
6383 (string-append (assoc-ref inputs "glib")
6384 "/lib/libglib-2.0.so.0"))
6385 (("libgdk-3.so.0")
6386 (string-append (assoc-ref inputs "gtk+")
6387 "/lib/libgdk-3.so.0")))
6388 #t))
6389 (add-after 'unpack 'disable-linters
6390 ;; Their check fails; none of our business.
6391 (lambda _
6392 (substitute* "setup.cfg"
6393 ((".*pytest-flake8.*") "")
6394 ((".*pytest-isort.*") "")
6395 (("--flake8") "")
6396 (("--isort") ""))
6397 #t))
6398 (add-after 'install 'install-doc
6399 (lambda* (#:key inputs outputs #:allow-other-keys)
6400 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6401 (doc (string-append data "/doc/" ,name "-" ,version))
6402 (html (string-append doc "/html")))
6403 (setenv "LD_LIBRARY_PATH"
6404 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6405 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6406 (setenv "LANG" "en_US.UTF-8")
6407 (mkdir-p html)
6408 (for-each (lambda (file)
6409 (copy-file (string-append "." file)
6410 (string-append doc file)))
6411 '("/README.rst" "/NEWS.rst"))
6412 (system* "python" "setup.py" "build_sphinx")
6413 (copy-recursively "docs/_build/html" html)
6414 #t))))))
6415 (home-page "https://github.com/Kozea/cairocffi")
6416 (synopsis "Python bindings and object-oriented API for Cairo")
6417 (description
6418 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6419 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6420 graphics library with support for multiple backends including image buffers,
6421 PNG, PostScript, PDF, and SVG file output.")
6422 (license license:bsd-3)))
6423
6424 (define-public python-decorator
6425 (package
6426 (name "python-decorator")
6427 (version "4.3.0")
6428 (source
6429 (origin
6430 (method url-fetch)
6431 (uri (pypi-uri "decorator" version))
6432 (sha256
6433 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6434 (build-system python-build-system)
6435 (home-page "https://pypi.org/project/decorator/")
6436 (synopsis "Python module to simplify usage of decorators")
6437 (description
6438 "The aim of the decorator module is to simplify the usage of decorators
6439 for the average programmer, and to popularize decorators usage giving examples
6440 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6441 etc. The core of this module is a decorator factory.")
6442 (license license:expat)))
6443
6444 (define-public python2-decorator
6445 (package-with-python2 python-decorator))
6446
6447 (define-public python-drmaa
6448 (package
6449 (name "python-drmaa")
6450 (version "0.7.7")
6451 (source
6452 (origin
6453 (method url-fetch)
6454 (uri (pypi-uri "drmaa" version))
6455 (sha256
6456 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6457 (build-system python-build-system)
6458 ;; The test suite requires libdrmaa which is provided by the cluster
6459 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6460 ;; should be set to the path of the libdrmaa library.
6461 (arguments '(#:tests? #f))
6462 (native-inputs
6463 `(("python-nose" ,python-nose)))
6464 (home-page "https://pypi.org/project/drmaa/")
6465 (synopsis "Python bindings for the DRMAA library")
6466 (description
6467 "A Python package for Distributed Resource Management (DRM) job
6468 submission and control. This package is an implementation of the DRMAA 1.0
6469 Python language binding specification.")
6470 (license license:bsd-3)))
6471
6472 (define-public python2-drmaa
6473 (package-with-python2 python-drmaa))
6474
6475 (define-public python-grako
6476 (package
6477 (name "python-grako")
6478 (version "3.99.9")
6479 (source
6480 (origin
6481 (method url-fetch)
6482 (uri
6483 (pypi-uri "grako" version ".zip"))
6484 (sha256
6485 (base32
6486 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6487 (build-system python-build-system)
6488 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6489 (native-inputs
6490 `(("unzip" ,unzip)
6491 ("python-pytest" ,python-pytest)
6492 ("python-pytest-runner" ,python-pytest-runner)))
6493 (home-page "https://bitbucket.org/neogeny/grako")
6494 (synopsis "EBNF parser generator")
6495 (description
6496 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6497 memoizing PEG/Packrat parser in Python.")
6498 (license license:bsd-3)))
6499
6500 (define-public python2-grako
6501 (package-with-python2 python-grako))
6502
6503 (define-public python-grandalf
6504 (package
6505 (name "python-grandalf")
6506 (version "0.7")
6507 (source
6508 (origin
6509 ;; There's no source tarball on PyPI.
6510 (method git-fetch)
6511 (uri (git-reference
6512 (url "https://github.com/bdcht/grandalf")
6513 (commit (string-append "v" version))))
6514 (file-name (git-file-name name version))
6515 (sha256
6516 (base32
6517 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6518 (build-system python-build-system)
6519 (arguments
6520 '(#:phases
6521 (modify-phases %standard-phases
6522 (replace 'check
6523 (lambda _
6524 (invoke "python" "setup.py" "pytest"))))))
6525 (native-inputs
6526 `(("python-pytest" ,python-pytest)
6527 ("python-pytest-runner" ,python-pytest-runner)))
6528 (propagated-inputs
6529 `(("python-numpy" ,python-numpy)
6530 ("python-ply" ,python-ply)))
6531 (home-page "https://github.com/bdcht/grandalf")
6532 (synopsis "Graph and drawing algorithms framework")
6533 (description
6534 "Grandalf is a Python package made for experimentations with graphs
6535 drawing algorithms. It is written in pure Python, and currently implements
6536 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6537 minimization approach. While not as fast or featured as graphviz or other
6538 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6539 than thousands of nodes, while keeping the source code simple enough to tweak
6540 and hack any part of it for experimental purpose. With a total of about 1500
6541 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6542 in less than 600 lines. The energy minimization approach is comprised of only
6543 250 lines!
6544
6545 Grandalf does only 2 not-so-simple things:
6546 @itemize
6547 @item computing the nodes (x,y) coordinates (based on provided nodes
6548 dimensions, and a chosen layout)
6549 @item routing the edges with lines or nurbs
6550 @end itemize
6551
6552 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6553 will help you find where to draw things like nodes and edges, but it’s up to
6554 you to actually draw things with your favorite toolkit.")
6555 ;; The user can choose either license.
6556 (license (list license:gpl2 license:epl1.0))))
6557
6558 (define-public python-gridmap
6559 (package
6560 (name "python-gridmap")
6561 (version "0.14.0")
6562 (source
6563 (origin
6564 (method git-fetch)
6565 (uri (git-reference
6566 (url "https://github.com/pygridtools/gridmap")
6567 (commit (string-append "v" version))))
6568 (file-name (git-file-name name version))
6569 (sha256
6570 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6571 (build-system python-build-system)
6572 (arguments
6573 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6574 (propagated-inputs
6575 `(("python-psutil" ,python-psutil)
6576 ("python-drmaa" ,python-drmaa)
6577 ("python-pyzmq" ,python-pyzmq)))
6578 (home-page "https://github.com/pygridtools/gridmap")
6579 (synopsis "Create jobs on a cluster directly from Python")
6580 (description
6581 "Gridmap is a Python package to allow you to easily create jobs on the
6582 cluster directly from Python. You can directly map Python functions onto the
6583 cluster without needing to write any wrapper code yourself.")
6584 (license license:gpl3+)))
6585
6586 (define-public python2-gridmap
6587 (package-with-python2 python-gridmap))
6588
6589 (define-public python-honcho
6590 (package
6591 (name "python-honcho")
6592 (version "1.0.1")
6593 (source
6594 (origin
6595 (method git-fetch)
6596 (uri (git-reference
6597 (url "https://github.com/nickstenning/honcho")
6598 (commit (string-append "v" version))))
6599 (file-name (git-file-name name version))
6600 (sha256
6601 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6602 (build-system python-build-system)
6603 (native-inputs
6604 `(("python-pytest" ,python-pytest)
6605 ("python-mock" ,python-mock)
6606 ("python-tox" ,python-tox)
6607 ("which" ,which))) ;for tests
6608 (propagated-inputs
6609 `(("python-jinja2" ,python-jinja2)))
6610 (arguments
6611 `(#:phases
6612 (modify-phases %standard-phases
6613 (delete 'check)
6614 (add-after 'install 'check
6615 (lambda* (#:key outputs inputs #:allow-other-keys)
6616 ;; fix honcho path in testsuite
6617 (substitute* "tests/conftest.py"
6618 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6619 "/bin/honcho" "'")))
6620 ;; It's easier to run tests after install.
6621 ;; Make installed package available for running the tests
6622 (add-installed-pythonpath inputs outputs)
6623 (invoke "py.test" "-v"))))))
6624 (home-page "https://github.com/nickstenning/honcho")
6625 (synopsis "Manage Procfile-based applications")
6626 (description
6627 "A Procfile is a file which describes how to run an application
6628 consisting of several processes. honcho starts all listed processes.
6629 The output of all running processes is collected by honcho and
6630 displayed.")
6631 (license license:expat)))
6632
6633 (define-public python-pexpect
6634 (package
6635 (name "python-pexpect")
6636 (version "4.8.0")
6637 (source
6638 (origin
6639 (method url-fetch)
6640 (uri (pypi-uri "pexpect" version))
6641 (sha256
6642 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6643 (build-system python-build-system)
6644 (arguments
6645 `(#:phases
6646 (modify-phases %standard-phases
6647 (add-before 'check 'prepare-tests
6648 (lambda _
6649 (substitute* (find-files "tests")
6650 (("/bin/ls") (which "ls"))
6651 (("/bin/echo") (which "echo"))
6652 (("/bin/which") (which "which"))
6653 ;; Many tests try to use the /bin directory which
6654 ;; is not present in the build environment.
6655 ;; Use one that's non-empty and unlikely to change.
6656 (("/bin'") "/dev'")
6657 ;; Disable failing test. See upstream bug report
6658 ;; https://github.com/pexpect/pexpect/issues/568
6659 (("def test_bash") "def _test_bash"))
6660 ;; XXX: Socket connection test gets "Connection reset by peer".
6661 ;; Why does it not work? Delete for now.
6662 (delete-file "tests/test_socket.py")
6663 #t))
6664 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6665 (native-inputs
6666 `(("python-nose" ,python-nose)
6667 ("python-pytest" ,python-pytest)
6668 ("man-db" ,man-db)
6669 ("which" ,which)
6670 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6671 (propagated-inputs
6672 `(("python-ptyprocess" ,python-ptyprocess)))
6673 (home-page "http://pexpect.readthedocs.org/")
6674 (synopsis "Controlling interactive console applications")
6675 (description
6676 "Pexpect is a pure Python module for spawning child applications;
6677 controlling them; and responding to expected patterns in their output.
6678 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6679 child application and control it as if a human were typing commands.")
6680 (license license:isc)))
6681
6682 (define-public python2-pexpect
6683 (package-with-python2 python-pexpect))
6684
6685 (define-public python-setuptools-scm
6686 (package
6687 (name "python-setuptools-scm")
6688 (version "3.4.3")
6689 (source (origin
6690 (method url-fetch)
6691 (uri (pypi-uri "setuptools_scm" version))
6692 (sha256
6693 (base32
6694 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6695 (build-system python-build-system)
6696 (home-page "https://github.com/pypa/setuptools_scm/")
6697 (synopsis "Manage Python package versions in SCM metadata")
6698 (description
6699 "Setuptools_scm handles managing your Python package versions in
6700 @dfn{software configuration management} (SCM) metadata instead of declaring
6701 them as the version argument or in a SCM managed file.")
6702 (license license:expat)))
6703
6704 ;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
6705 (define-public python-setuptools-scm/next
6706 (package
6707 (inherit python-setuptools-scm)
6708 (version "5.0.1")
6709 (source
6710 (origin
6711 (method url-fetch)
6712 (uri (pypi-uri "setuptools_scm" version))
6713 (sha256
6714 (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
6715
6716 (define-public python2-setuptools-scm
6717 (package-with-python2 python-setuptools-scm))
6718
6719 (define-public python-sexpdata
6720 (package
6721 (name "python-sexpdata")
6722 (version "0.0.3")
6723 (source
6724 (origin
6725 (method url-fetch)
6726 (uri (pypi-uri "sexpdata" version))
6727 (sha256
6728 (base32
6729 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6730 (build-system python-build-system)
6731 (home-page "https://github.com/jd-boyd/sexpdata")
6732 (synopsis "S-expression parser for Python")
6733 (description
6734 "Sexpdata is an S-expression parser/serializer. It has load and dump
6735 functions like pickle, json or PyYAML module.")
6736 (license license:bsd-3)))
6737
6738 (define-public python-pathlib2
6739 (package
6740 (name "python-pathlib2")
6741 (version "2.3.3")
6742 (source
6743 (origin
6744 (method url-fetch)
6745 (uri (pypi-uri "pathlib2" version))
6746 (sha256
6747 (base32
6748 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6749 (build-system python-build-system)
6750 (propagated-inputs
6751 `(("python-scandir" ,python-scandir)
6752 ("python-six" ,python-six)))
6753 (home-page "https://pypi.org/project/pathlib2/")
6754 (synopsis "Object-oriented file system paths")
6755 (description "The goal of pathlib2 is to provide a backport of the
6756 standard @code{pathlib} module which tracks the standard library module, so
6757 all the newest features of the standard @code{pathlib} can be used also on
6758 older Python versions.")
6759 (license license:expat)))
6760
6761 (define-public python-importlib-resources
6762 (package
6763 (name "python-importlib-resources")
6764 (version "3.0.0")
6765 (source
6766 (origin
6767 (method url-fetch)
6768 (uri (pypi-uri "importlib_resources" version))
6769 (sha256
6770 (base32
6771 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6772 (build-system python-build-system)
6773 (native-inputs
6774 `(("python-setuptools-scm" ,python-setuptools-scm)
6775 ("python-toml" ,python-toml)))
6776 (home-page "http://importlib-resources.readthedocs.io/")
6777 (synopsis "Read resources from Python packages")
6778 (description
6779 "@code{importlib_resources} is a backport of Python 3's standard library
6780 @code{importlib.resources} module for Python 2.7, and Python 3.")
6781 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6782 (license license:asl2.0)))
6783
6784 (define-public python2-importlib-resources
6785 (package
6786 (name "python2-importlib-resources")
6787 (version "1.0.2")
6788 (source (origin
6789 (method url-fetch)
6790 (uri (pypi-uri "importlib_resources" version))
6791 (sha256
6792 (base32
6793 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6794 (build-system python-build-system)
6795 (arguments
6796 `(#:python ,python-2
6797 #:phases (modify-phases %standard-phases
6798 ;; The build system tests for python-wheel, but it is
6799 ;; not required for Guix nor the test suite. Just drop
6800 ;; it to make bootstrapping pytest easier.
6801 (add-after 'unpack 'drop-wheel-dependency
6802 (lambda _
6803 (substitute* "setup.cfg"
6804 (("^[[:blank:]]+wheel")
6805 ""))
6806 #t)))))
6807 (propagated-inputs
6808 `(("python-pathlib2" ,python2-pathlib2)
6809 ("python-typing" ,python2-typing)))
6810 (home-page "https://gitlab.com/python-devs/importlib_resources")
6811 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6812 (description
6813 "This package provides an implementation of @code{importlib.resources}
6814 for older versions of Python.")
6815 (license license:asl2.0)))
6816
6817 ;; For importlib-metadata-bootstrap below.
6818 (define-public python2-importlib-resources-bootstrap
6819 (hidden-package
6820 (package/inherit
6821 python2-importlib-resources
6822 (name "python2-importlib-resources-bootstrap")
6823 (propagated-inputs
6824 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6825 ("python-typing" ,python2-typing))))))
6826
6827 (define-public python-importlib-metadata
6828 (package
6829 (name "python-importlib-metadata")
6830 (version "1.5.0")
6831 (source
6832 (origin
6833 (method url-fetch)
6834 (uri (pypi-uri "importlib_metadata" version))
6835 (sha256
6836 (base32
6837 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6838 (build-system python-build-system)
6839 (propagated-inputs
6840 `(("python-zipp" ,python-zipp)))
6841 (native-inputs
6842 `(("python-setuptools-scm" ,python-setuptools-scm)
6843 ("python-pyfakefs" ,python-pyfakefs)
6844 ("python-packaging" ,python-packaging)))
6845 (home-page "https://importlib-metadata.readthedocs.io/")
6846 (synopsis "Read metadata from Python packages")
6847 (description
6848 "@code{importlib_metadata} is a library which provides an API for
6849 accessing an installed Python package's metadata, such as its entry points or
6850 its top-level name. This functionality intends to replace most uses of
6851 @code{pkg_resources} entry point API and metadata API. Along with
6852 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6853 need to use the older and less efficient @code{pkg_resources} package.")
6854 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6855 (license license:asl2.0)))
6856
6857 (define-public python2-importlib-metadata
6858 (let ((base (package-with-python2 (strip-python2-variant
6859 python-importlib-metadata))))
6860 (package/inherit
6861 base
6862 (name "python2-importlib-metadata")
6863 (native-inputs
6864 `(("python-setuptools-scm" ,python2-setuptools-scm)
6865 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6866 ("python-packaging" ,python2-packaging-bootstrap)))
6867 (propagated-inputs
6868 `(("python-configparser" ,python2-configparser)
6869 ("python-contextlib2" ,python2-contextlib2)
6870 ("python-importlib-resources" ,python2-importlib-resources)
6871 ("python-pathlib2" ,python2-pathlib2)
6872 ,@(package-propagated-inputs base))))))
6873
6874 ;; This package is used by python2-pytest, and thus must not depend on it.
6875 (define-public python2-importlib-metadata-bootstrap
6876 (hidden-package
6877 (package/inherit
6878 python2-importlib-metadata
6879 (name "python2-importlib-metadata-bootstrap")
6880 (arguments
6881 `(#:tests? #f
6882 ,@(package-arguments python2-importlib-metadata)))
6883 (propagated-inputs
6884 `(("python-zipp" ,python2-zipp-bootstrap)
6885 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6886 ("python-configparser" ,python2-configparser)
6887 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6888 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6889
6890 (define-public python-importmagic
6891 (package
6892 (name "python-importmagic")
6893 (version "0.1.7")
6894 (source
6895 (origin
6896 (method url-fetch)
6897 (uri (pypi-uri "importmagic" version))
6898 (sha256
6899 (base32
6900 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6901 (build-system python-build-system)
6902 (home-page "https://github.com/alecthomas/importmagic")
6903 (synopsis "Library for adding, removing and managing Python imports")
6904 (description
6905 "Importmagic is a Python library for automatically managing imports by
6906 finding unresolved symbols in Python code and their corresponding imports.")
6907 (license license:bsd-3)))
6908
6909 (define-public python-inotify-simple
6910 (package
6911 (name "python-inotify-simple")
6912 (version "1.3.5")
6913 (source
6914 (origin
6915 (method git-fetch)
6916 (uri (git-reference
6917 (url "https://github.com/chrisjbillington/inotify_simple")
6918 (commit version)))
6919 (file-name (git-file-name name version))
6920 (sha256
6921 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
6922 (build-system python-build-system)
6923 (home-page
6924 "https://github.com/chrisjbillington/inotify_simple")
6925 (synopsis "Simple wrapper around inotify library")
6926 (description
6927 "@code{inotify-simple} is a simple wrapper around inotify library.")
6928 (license license:bsd-3)))
6929
6930 (define-public python-jaraco-packaging
6931 (package
6932 (name "python-jaraco-packaging")
6933 (version "6.1")
6934 (source
6935 (origin
6936 (method url-fetch)
6937 (uri (pypi-uri "jaraco.packaging" version))
6938 (sha256
6939 (base32
6940 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6941 (build-system python-build-system)
6942 (propagated-inputs
6943 `(("python-pytest" ,python-pytest)
6944 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6945 ("python-pytest-flake8" ,python-pytest-flake8)
6946 ("python-rst.linker" ,python-rst.linker)
6947 ("python-setuptools" ,python-setuptools)
6948 ("python-setuptools-scm" ,python-setuptools-scm)
6949 ("python-six" ,python-six)
6950 ("python-sphinx" ,python-sphinx)))
6951 (home-page "https://github.com/jaraco/jaraco.packaging")
6952 (synopsis "Tools to supplement packaging Python releases")
6953 (description
6954 "This package provides various tools to supplement packaging Python
6955 releases.")
6956 (license license:expat)))
6957
6958 (define-public python-pathpy
6959 (package
6960 (name "python-pathpy")
6961 (version "11.5.1")
6962 (source
6963 (origin
6964 (method url-fetch)
6965 (uri (pypi-uri "path.py" version))
6966 (sha256
6967 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6968 (outputs '("out" "doc"))
6969 (build-system python-build-system)
6970 (propagated-inputs
6971 `(("python-appdirs" ,python-appdirs)
6972 ("python-importlib-metadata" ,python-importlib-metadata)))
6973 (native-inputs
6974 `(("python-setuptools-scm" ,python-setuptools-scm)
6975 ("python-sphinx" ,python-sphinx)
6976 ("python-rst.linker" ,python-rst.linker)
6977 ("python-pytest" ,python-pytest)
6978 ("python-pytest-runner" ,python-pytest-runner)
6979 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6980 (arguments
6981 `(#:phases
6982 (modify-phases %standard-phases
6983 (add-after 'build 'build-doc
6984 (lambda _
6985 (setenv "LANG" "en_US.UTF-8")
6986 (invoke "python" "setup.py" "build_sphinx")))
6987 (add-after 'install 'install-doc
6988 (lambda* (#:key outputs #:allow-other-keys)
6989 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6990 (doc (string-append data "/doc/" ,name "-" ,version))
6991 (html (string-append doc "/html")))
6992 (mkdir-p html)
6993 (for-each (lambda (file)
6994 (copy-file file (string-append doc "/" file)))
6995 '("README.rst" "CHANGES.rst"))
6996 (copy-recursively "build/sphinx/html" html)
6997 #t)))
6998 (replace 'check
6999 (lambda _
7000 ;; The import time test aborts if an import takes longer than
7001 ;; 100ms. It may very well take a little longer than that.
7002 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
7003 (home-page "https://github.com/jaraco/path.py")
7004 (synopsis "Python module wrapper for built-in os.path")
7005 (description
7006 "@code{path.py} implements path objects as first-class entities, allowing
7007 common operations on files to be invoked on those path objects directly.")
7008 (license license:expat)))
7009
7010 (define-public python-simplegeneric
7011 (package
7012 (name "python-simplegeneric")
7013 (version "0.8.1")
7014 (source
7015 (origin
7016 (method url-fetch)
7017 (uri (pypi-uri "simplegeneric" version ".zip"))
7018 (sha256
7019 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
7020 (build-system python-build-system)
7021 (native-inputs
7022 `(("unzip" ,unzip)))
7023 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
7024 (synopsis "Python module for simple generic functions")
7025 (description
7026 "The simplegeneric module lets you define simple single-dispatch generic
7027 functions, akin to Python’s built-in generic functions like @code{len()},
7028 @code{iter()} and so on. However, instead of using specially-named methods,
7029 these generic functions use simple lookup tables, akin to those used by
7030 e.g. @code{pickle.dump()} and other generic functions found in the Python
7031 standard library.")
7032 (license license:zpl2.1)))
7033
7034 (define-public python2-simplegeneric
7035 (package-with-python2 python-simplegeneric))
7036
7037 (define-public python-ipython-genutils
7038 ;; TODO: This package is retired, check if can be removed, see description.
7039 (package
7040 (name "python-ipython-genutils")
7041 (version "0.1.0")
7042 (source
7043 (origin
7044 (method url-fetch)
7045 (uri (pypi-uri "ipython_genutils" version))
7046 (sha256
7047 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7048 (build-system python-build-system)
7049 (arguments `(#:tests? #f)) ; no tests
7050 (home-page "https://ipython.org")
7051 (synopsis "Vestigial utilities from IPython")
7052 (description
7053 "This package provides retired utilities from IPython. No packages
7054 outside IPython/Jupyter should depend on it.
7055
7056 This package shouldn't exist. It contains some common utilities shared by
7057 Jupyter and IPython projects during The Big Split. As soon as possible, those
7058 packages will remove their dependency on this, and this package will go
7059 away.")
7060 (license license:bsd-3)))
7061
7062 (define-public python2-ipython-genutils
7063 (package-with-python2 python-ipython-genutils))
7064
7065 (define-public python-ipyparallel
7066 (package
7067 (name "python-ipyparallel")
7068 (version "6.2.4")
7069 (source
7070 (origin
7071 (method url-fetch)
7072 (uri (pypi-uri "ipyparallel" version))
7073 (sha256
7074 (base32
7075 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7076 (build-system python-build-system)
7077 (arguments
7078 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7079 #:phases
7080 (modify-phases %standard-phases
7081 (add-before 'check 'prepare-for-tests
7082 (lambda _
7083 (setenv "HOME" (getcwd))
7084 #t)))))
7085 (propagated-inputs
7086 `(("python-dateutil" ,python-dateutil)
7087 ("python-decorator" ,python-decorator)
7088 ("python-ipykernel" ,python-ipykernel)
7089 ("python-ipython" ,python-ipython)
7090 ("python-ipython-genutils" ,python-ipython-genutils)
7091 ("python-jupyter-client" ,python-jupyter-client)
7092 ("python-pyzmq" ,python-pyzmq)
7093 ("python-tornado" ,python-tornado)
7094 ("python-traitlets" ,python-traitlets)))
7095 (native-inputs
7096 `(("python-ipython" ,python-ipython)
7097 ("python-mock" ,python-mock)
7098 ("python-nose" ,python-nose)
7099 ("python-pytest" ,python-pytest)
7100 ("python-pytest-cov" ,python-pytest-cov)
7101 ("python-testpath" ,python-testpath)))
7102 (home-page "https://ipython.org/")
7103 (synopsis "Interactive Parallel Computing with IPython")
7104 (description
7105 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7106 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7107 CLI scripts:
7108 @enumerate
7109 @item ipcluster - start/stop a cluster
7110 @item ipcontroller - start a scheduler
7111 @item ipengine - start an engine
7112 @end enumerate")
7113 (license license:bsd-3)))
7114
7115 (define-public python2-ipyparallel
7116 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
7117 (package/inherit ipyparallel
7118 (propagated-inputs
7119 `(("python2-futures" ,python2-futures)
7120 ,@(package-propagated-inputs ipyparallel))))))
7121
7122 (define-public python-ipython-cluster-helper
7123 (package
7124 (name "python-ipython-cluster-helper")
7125 (version "0.6.4")
7126 (source
7127 (origin
7128 (method url-fetch)
7129 (uri (pypi-uri "ipython-cluster-helper" version))
7130 (sha256
7131 (base32
7132 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
7133 (modules '((guix build utils)))
7134 (snippet
7135 '(begin (substitute* "requirements.txt"
7136 (("ipython.*") "ipython\n"))
7137 #t))))
7138 (build-system python-build-system)
7139 (arguments
7140 `(#:tests? #f ; Test suite can't find IPython.
7141 #:phases
7142 (modify-phases %standard-phases
7143 (replace 'check
7144 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7145 (if tests?
7146 (begin
7147 (setenv "HOME" (getcwd))
7148 (add-installed-pythonpath inputs outputs)
7149 (invoke "python" "example/example.py" "--local"))
7150 #t))))))
7151 (propagated-inputs
7152 `(("python-ipyparallel" ,python-ipyparallel)
7153 ("python-ipython" ,python-ipython)
7154 ("python-netifaces" ,python-netifaces)
7155 ("python-pyzmq" ,python-pyzmq)
7156 ("python-setuptools" ,python-setuptools)
7157 ("python-six" ,python-six)))
7158 (home-page "https://github.com/roryk/ipython-cluster-helper")
7159 (synopsis
7160 "Simplify IPython cluster start up and use for multiple schedulers")
7161 (description
7162 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
7163 profile, launches a cluster and returns a view. On program exit it shuts the
7164 cluster down and deletes the throwaway profile.")
7165 (license license:expat)))
7166
7167 (define-public python2-ipython-cluster-helper
7168 (package-with-python2 python-ipython-cluster-helper))
7169
7170 (define-public python-traitlets
7171 (package
7172 (name "python-traitlets")
7173 (version "4.3.3")
7174 (source
7175 (origin
7176 (method url-fetch)
7177 (uri (pypi-uri "traitlets" version))
7178 (sha256
7179 (base32
7180 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
7181 (build-system python-build-system)
7182 (arguments
7183 `(#:phases
7184 (modify-phases %standard-phases
7185 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
7186 (propagated-inputs
7187 `(("python-ipython-genutils" ,python-ipython-genutils)
7188 ("python-decorator" ,python-decorator)))
7189 (native-inputs
7190 `(("python-pytest" ,python-pytest)))
7191 (properties `((python2-variant . ,(delay python2-traitlets))))
7192 (home-page "https://ipython.org")
7193 (synopsis "Configuration system for Python applications")
7194 (description
7195 "Traitlets is a framework that lets Python classes have attributes with
7196 type checking, dynamically calculated default values, and ‘on change’
7197 callbacks. The package also includes a mechanism to use traitlets for
7198 configuration, loading values from files or from command line arguments. This
7199 is a distinct layer on top of traitlets, so you can use traitlets in your code
7200 without using the configuration machinery.")
7201 (license license:bsd-3)))
7202
7203 (define-public python2-traitlets
7204 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
7205 (package/inherit traitlets
7206 (propagated-inputs
7207 `(("python2-enum34" ,python2-enum34)
7208 ,@(package-propagated-inputs traitlets))))))
7209
7210 (define-public python-jupyter-core
7211 (package
7212 (name "python-jupyter-core")
7213 (version "4.7.1")
7214 (source
7215 (origin
7216 (method url-fetch)
7217 (uri (string-append (pypi-uri "jupyter_core" version)))
7218 (sha256
7219 (base32
7220 "1d12j5hkff0xiax87pnhmzbsph3jqqzhz16h8xld7z2y4armq0kr"))))
7221 (build-system python-build-system)
7222 ;; FIXME: not sure how to run the tests
7223 (arguments `(#:tests? #f))
7224 (propagated-inputs
7225 `(("python-traitlets" ,python-traitlets)))
7226 (home-page "https://jupyter.org/")
7227 (synopsis "Jupyter base package")
7228 (description
7229 "Jupyter core is the base package on which Jupyter projects rely.")
7230 (license license:bsd-3)))
7231
7232 (define-public python2-jupyter-core
7233 (package-with-python2 python-jupyter-core))
7234
7235 (define-public python-jupyter-client
7236 (package
7237 (name "python-jupyter-client")
7238 (version "6.1.12")
7239 (source
7240 (origin
7241 (method url-fetch)
7242 (uri (pypi-uri "jupyter_client" version))
7243 (sha256
7244 (base32
7245 "10p7fcgvv9hvz9zical9wk68ks5ssak2ykbzx65wm1k1hk8a3g64"))))
7246 (build-system python-build-system)
7247 ;; Tests fail because of missing native python kernel which I assume is
7248 ;; provided by the ipython package, which we cannot use because it would
7249 ;; cause a dependency cycle.
7250 (arguments
7251 `(#:tests? #f
7252 #:phases (modify-phases %standard-phases
7253 (add-after 'unpack 'set-tool-file-names
7254 (lambda* (#:key inputs #:allow-other-keys)
7255 (let ((iproute (assoc-ref inputs "iproute")))
7256 (substitute* "jupyter_client/localinterfaces.py"
7257 (("'ip'")
7258 (string-append "'" iproute "/sbin/ip'")))
7259 #t))))))
7260 (inputs
7261 `(("iproute" ,iproute)))
7262 (propagated-inputs
7263 `(("python-dateutil" ,python-dateutil)
7264 ("python-jupyter-core" ,python-jupyter-core)
7265 ("python-pyzmq" ,python-pyzmq)
7266 ("python-tornado" ,python-tornado-6)
7267 ("python-traitlets" ,python-traitlets)))
7268 (native-inputs
7269 `(("python-pytest" ,python-pytest)))
7270 (home-page "https://jupyter.org/")
7271 (synopsis "Jupyter protocol implementation and client libraries")
7272 (description
7273 "The @code{jupyter_client} package contains the reference implementation
7274 of the Jupyter protocol. It also provides client and kernel management APIs
7275 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7276 installing @code{kernelspec}s for use with Jupyter frontends.")
7277 (license license:bsd-3)))
7278
7279 (define-public python2-jupyter-client
7280 (package-with-python2 python-jupyter-client))
7281
7282 (define-public python-ipykernel
7283 (package
7284 (name "python-ipykernel")
7285 (version "5.5.3")
7286 (source
7287 (origin
7288 (method url-fetch)
7289 (uri (pypi-uri "ipykernel" version))
7290 (sha256
7291 (base32 "02f55cjkp5q64x7ikjxznbxwjpkdmfy237b9kg7dk1pxmzvy90m6"))))
7292 (build-system python-build-system)
7293 (arguments
7294 `(#:phases
7295 (modify-phases %standard-phases
7296 (replace 'check
7297 (lambda _
7298 (setenv "HOME" "/tmp")
7299 (invoke "pytest" "-v")
7300 #t))
7301 (add-after 'install 'set-python-file-name
7302 (lambda* (#:key outputs #:allow-other-keys)
7303 ;; Record the absolute file name of the 'python' executable in
7304 ;; 'kernel.json'.
7305 (let ((out (assoc-ref outputs "out")))
7306 (substitute* (string-append out "/share/jupyter"
7307 "/kernels/python3/kernel.json")
7308 (("\"python\"")
7309 (string-append "\"" (which "python") "\"")))
7310 #t))))))
7311 (propagated-inputs
7312 `(("python-ipython" ,python-ipython)
7313 ;; imported at runtime during connect
7314 ("python-jupyter-client" ,python-jupyter-client)))
7315 (native-inputs
7316 `(("python-flaky" ,python-flaky)
7317 ("python-nose" ,python-nose)
7318 ("python-pytest" ,python-pytest)))
7319 (home-page "https://ipython.org")
7320 (synopsis "IPython Kernel for Jupyter")
7321 (description
7322 "This package provides the IPython kernel for Jupyter.")
7323 (properties `((python2-variant . ,(delay python2-ipykernel))))
7324 (license license:bsd-3)))
7325
7326 ;; Version 5.x and above no longer support Python 2.
7327 (define-public python2-ipykernel
7328 (package
7329 (name "python2-ipykernel")
7330 (version "4.10.1")
7331 (source
7332 (origin
7333 (method url-fetch)
7334 (uri (pypi-uri "ipykernel" version))
7335 (sha256
7336 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
7337 (build-system python-build-system)
7338 (arguments
7339 `(#:python ,python-2))
7340 (propagated-inputs
7341 `(("python2-ipython" ,python2-ipython)
7342 ;; imported at runtime during connect
7343 ("python2-jupyter-client" ,python2-jupyter-client)
7344 ("python2-tornado" ,python2-tornado)
7345 ("python2-traitlets" ,python2-traitlets)))
7346 (native-inputs
7347 `(("python2-mock" ,python2-mock)
7348 ("python2-nose" ,python2-nose)
7349 ("python2-pytest" ,python2-pytest)
7350 ("python2-pytest-cov" ,python2-pytest-cov)))
7351 (home-page "https://ipython.org")
7352 (synopsis "IPython Kernel for Jupyter")
7353 (description
7354 "This package provides the IPython kernel for Jupyter.")
7355 (license license:bsd-3)))
7356
7357 (define-public python-pari-jupyter
7358 (package
7359 (name "python-pari-jupyter")
7360 (version "1.3.2")
7361 (source
7362 (origin
7363 (method url-fetch)
7364 (uri (pypi-uri "pari_jupyter" version))
7365 (sha256
7366 (base32
7367 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7368 (build-system python-build-system)
7369 (propagated-inputs
7370 `(("python-ipykernel" ,python-ipykernel)))
7371 (inputs
7372 `(("pari-gp" ,pari-gp)
7373 ("readline" ,readline)))
7374 (arguments
7375 `(#:tests? #f)) ; no test suite
7376 (home-page
7377 "https://github.com/jdemeyer/pari_jupyter")
7378 (synopsis "A Jupyter kernel for PARI/GP")
7379 (description "The package provides a PARI/GP kernel for Jupyter.")
7380 (license license:gpl3+)))
7381
7382 (define-public python-backcall
7383 (package
7384 (name "python-backcall")
7385 (version "0.2.0")
7386 (source
7387 (origin
7388 (method url-fetch)
7389 (uri (pypi-uri "backcall" version))
7390 (sha256
7391 (base32
7392 "07jy4562lvnhkk6kfr3cphmizy88anlhmbwb8kdzlz2ypqkvzgaw"))))
7393 (build-system python-build-system)
7394 (home-page "https://github.com/takluyver/backcall/")
7395 (synopsis "Specifications for callback functions passed in to an API")
7396 (description
7397 "If your code lets other people supply callback functions, it's important
7398 to specify the function signature you expect, and check that functions support
7399 that. Adding extra parameters later would break other peoples code unless
7400 you're careful. The @code{backcall} package provides a way of specifying the
7401 callback signature using a prototype function.")
7402 (license license:bsd-3)))
7403
7404 (define-public python-ipython
7405 (package
7406 (name "python-ipython")
7407 (version "7.9.0")
7408 (source
7409 (origin
7410 (method url-fetch)
7411 (uri (pypi-uri "ipython" version ".tar.gz"))
7412 (sha256
7413 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7414 (build-system python-build-system)
7415 (propagated-inputs
7416 `(("python-backcall" ,python-backcall)
7417 ("python-pyzmq" ,python-pyzmq)
7418 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7419 ("python-terminado" ,python-terminado)
7420 ("python-matplotlib" ,python-matplotlib)
7421 ("python-numpy" ,python-numpy)
7422 ("python-numpydoc" ,python-numpydoc)
7423 ("python-jedi" ,python-jedi)
7424 ("python-jinja2" ,python-jinja2)
7425 ("python-mistune" ,python-mistune)
7426 ("python-pexpect" ,python-pexpect)
7427 ("python-pickleshare" ,python-pickleshare)
7428 ("python-simplegeneric" ,python-simplegeneric)
7429 ("python-jsonschema" ,python-jsonschema)
7430 ("python-traitlets" ,python-traitlets)
7431 ("python-nbformat" ,python-nbformat)
7432 ("python-pygments" ,python-pygments)))
7433 (inputs
7434 `(("readline" ,readline)
7435 ("which" ,which)))
7436 (native-inputs
7437 `(("graphviz" ,graphviz)
7438 ("pkg-config" ,pkg-config)
7439 ("python-requests" ,python-requests) ;; for tests
7440 ("python-testpath" ,python-testpath)
7441 ("python-nose" ,python-nose)))
7442 (arguments
7443 `(#:phases
7444 (modify-phases %standard-phases
7445 (add-after 'unpack 'make-docs-reproducible
7446 (lambda _
7447 (substitute* "IPython/sphinxext/ipython_directive.py"
7448 ((".*import datetime") "")
7449 ((".*datetime.datetime.now\\(\\)") "")
7450 (("%timeit") "# %timeit"))
7451 #t))
7452 ;; Tests can only be run after the library has been installed and not
7453 ;; within the source directory.
7454 (delete 'check)
7455 (add-after 'install 'check
7456 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7457 (if tests?
7458 (begin
7459 ;; Make installed package available for running the tests
7460 (add-installed-pythonpath inputs outputs)
7461 (setenv "HOME" "/tmp/") ;; required by a test
7462 ;; We only test the core because one of the other tests
7463 ;; tries to import ipykernel.
7464 (invoke "python" "IPython/testing/iptest.py"
7465 "-v" "IPython/core/tests"))
7466 #t)))
7467 (add-before 'check 'fix-tests
7468 (lambda* (#:key inputs #:allow-other-keys)
7469 (substitute* "./IPython/utils/_process_posix.py"
7470 (("/usr/bin/env', 'which") (which "which")))
7471 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7472 (("#!/usr/bin/env python")
7473 (string-append "#!" (which "python"))))
7474 ;; This test introduces a circular dependency on ipykernel
7475 ;; (which depends on ipython).
7476 (delete-file "IPython/core/tests/test_display.py")
7477 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7478 (delete-file "IPython/core/tests/test_interactiveshell.py")
7479 #t)))))
7480 (home-page "https://ipython.org")
7481 (synopsis "IPython is a tool for interactive computing in Python")
7482 (description
7483 "IPython provides a rich architecture for interactive computing with:
7484 Powerful interactive shells, a browser-based notebook, support for interactive
7485 data visualization, embeddable interpreters and tools for parallel
7486 computing.")
7487 (properties `((python2-variant . ,(delay python2-ipython))))
7488 (license license:bsd-3)))
7489
7490 ;; This is the latest release of the LTS version of ipython with support for
7491 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7492 ;; dropped support for Python 2.7.
7493 (define-public python2-ipython
7494 (package
7495 (name "python2-ipython")
7496 (version "5.8.0")
7497 (source
7498 (origin
7499 (method url-fetch)
7500 (uri (pypi-uri "ipython" version ".tar.gz"))
7501 (sha256
7502 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7503 (build-system python-build-system)
7504 (propagated-inputs
7505 `(("python2-backports-shutil-get-terminal-size"
7506 ,python2-backports-shutil-get-terminal-size)
7507 ("python2-pathlib2" ,python2-pathlib2)
7508 ("python2-pyzmq" ,python2-pyzmq)
7509 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7510 ("python2-terminado" ,python2-terminado)
7511 ("python2-matplotlib" ,python2-matplotlib)
7512 ("python2-numpy" ,python2-numpy)
7513 ("python2-numpydoc" ,python2-numpydoc)
7514 ("python2-jinja2" ,python2-jinja2)
7515 ("python2-mistune" ,python2-mistune)
7516 ("python2-pexpect" ,python2-pexpect)
7517 ("python2-pickleshare" ,python2-pickleshare)
7518 ("python2-simplegeneric" ,python2-simplegeneric)
7519 ("python2-jsonschema" ,python2-jsonschema)
7520 ("python2-traitlets" ,python2-traitlets)
7521 ("python2-nbformat" ,python2-nbformat)
7522 ("python2-pygments" ,python2-pygments)))
7523 (inputs
7524 `(("readline" ,readline)
7525 ("which" ,which)))
7526 (native-inputs
7527 `(("graphviz" ,graphviz)
7528 ("pkg-config" ,pkg-config)
7529 ("python2-requests" ,python2-requests) ;; for tests
7530 ("python2-testpath" ,python2-testpath)
7531 ("python2-mock" ,python2-mock)
7532 ("python2-nose" ,python2-nose)))
7533 (arguments
7534 `(#:python ,python-2
7535 #:phases
7536 (modify-phases %standard-phases
7537 (add-before 'check 'delete-broken-tests
7538 (lambda* (#:key inputs #:allow-other-keys)
7539 ;; These tests throw errors for unknown reasons.
7540 (delete-file "IPython/core/tests/test_displayhook.py")
7541 (delete-file "IPython/core/tests/test_magic_terminal.py")
7542 (delete-file "IPython/core/tests/test_profile.py")
7543 #t)))))
7544 (home-page "https://ipython.org")
7545 (synopsis "IPython is a tool for interactive computing in Python")
7546 (description
7547 "IPython provides a rich architecture for interactive computing with:
7548 Powerful interactive shells, a browser-based notebook, support for interactive
7549 data visualization, embeddable interpreters and tools for parallel
7550 computing.")
7551 (license license:bsd-3)))
7552
7553 (define-public python-ipython-documentation
7554 (package
7555 (inherit python-ipython)
7556 (name "python-ipython-documentation")
7557 (version (package-version python-ipython))
7558 (arguments
7559 `(#:phases
7560 (modify-phases %standard-phases
7561 (delete 'build)
7562 (delete 'check)
7563 (replace 'install
7564 (lambda* (#:key outputs #:allow-other-keys)
7565 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7566 (doc (string-append data "/doc/" ,name "-" ,version))
7567 (html (string-append doc "/html"))
7568 (man1 (string-append data "/man/man1"))
7569 (info (string-append data "/info"))
7570 (examples (string-append doc "/examples"))
7571 (python-arg (string-append "PYTHON=" (which "python"))))
7572 (setenv "LANG" "en_US.utf8")
7573 (with-directory-excursion "docs"
7574 ;; FIXME: pdf fails to build
7575 ;;(system* "make" "pdf" "PAPER=a4")
7576 (system* "make" python-arg "html")
7577 ;; FIXME: the generated texi file contains ^@^@, which trips
7578 ;; up the parser.
7579 ;; (system* "make" python-arg "info")
7580 )
7581 (copy-recursively "docs/man" man1)
7582 (copy-recursively "examples" examples)
7583 (copy-recursively "docs/build/html" html)
7584 ;; (copy-file "docs/build/latex/ipython.pdf"
7585 ;; (string-append doc "/ipython.pdf"))
7586 (mkdir-p info)
7587 ;; (copy-file "docs/build/texinfo/ipython.info"
7588 ;; (string-append info "/ipython.info"))
7589 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7590 #t)))))
7591 (inputs
7592 `(("python-ipython" ,python-ipython)
7593 ("python-ipykernel" ,python-ipykernel)))
7594 (native-inputs
7595 `(("python-sphinx" ,python-sphinx)
7596 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7597 ;; FIXME: It's possible that a smaller union would work just as well.
7598 ("texlive" ,(texlive-union (list texlive-amsfonts
7599 texlive-fonts-ec
7600 texlive-generic-ifxetex
7601 texlive-generic-pdftex
7602 texlive-latex-capt-of
7603 texlive-latex-cmap
7604 texlive-latex-environ
7605 texlive-latex-eqparbox
7606 texlive-latex-etoolbox
7607 texlive-latex-expdlist
7608 texlive-latex-fancyhdr
7609 texlive-latex-fancyvrb
7610 texlive-latex-fncychap
7611 texlive-latex-float
7612 texlive-latex-framed
7613 texlive-latex-geometry
7614 texlive-latex-graphics
7615 texlive-latex-hyperref
7616 texlive-latex-mdwtools
7617 texlive-latex-multirow
7618 texlive-latex-needspace
7619 texlive-latex-oberdiek
7620 texlive-latex-parskip
7621 texlive-latex-preview
7622 texlive-latex-tabulary
7623 texlive-latex-threeparttable
7624 texlive-latex-titlesec
7625 texlive-latex-trimspaces
7626 texlive-latex-ucs
7627 texlive-latex-upquote
7628 texlive-latex-url
7629 texlive-latex-varwidth
7630 texlive-latex-wrapfig)))
7631 ("texinfo" ,texinfo)))))
7632
7633 (define-public python-urwid
7634 (package
7635 (name "python-urwid")
7636 (version "2.1.2")
7637 (source
7638 (origin
7639 (method url-fetch)
7640 (uri (pypi-uri "urwid" version))
7641 (sha256
7642 (base32
7643 "1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq"))))
7644 (build-system python-build-system)
7645 (home-page "http://urwid.org")
7646 (synopsis "Console user interface library for Python")
7647 (description
7648 "Urwid is a curses-based UI/widget library for Python. It includes many
7649 features useful for text console applications.")
7650 (properties `((python2-variant . ,(delay python2-urwid))))
7651 (license license:lgpl2.1+)))
7652
7653 (define-public python2-urwid
7654 (let ((base (package-with-python2
7655 (strip-python2-variant python-urwid))))
7656 (package/inherit base
7657 (version "2.1.0")
7658 (source
7659 (origin
7660 (method url-fetch)
7661 (uri (pypi-uri "urwid" version))
7662 (sha256
7663 (base32
7664 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8")))))))
7665
7666 (define-public python-urwid-readline
7667 (package
7668 (name "python-urwid-readline")
7669 (version "0.12")
7670 (source
7671 (origin
7672 (method git-fetch)
7673 (uri (git-reference
7674 (url "https://github.com/rr-/urwid_readline")
7675 (commit version)))
7676 (file-name (git-file-name name version))
7677 (sha256
7678 (base32
7679 "0sq5qgxj7gcfww3ww7idr87isnmp0hi36n241b3q395x1zafdv22"))))
7680 (build-system python-build-system)
7681 (arguments
7682 `(#:phases
7683 (modify-phases %standard-phases
7684 (replace 'check
7685 (lambda* (#:key tests? #:allow-other-keys)
7686 (when tests?
7687 (invoke "python" "-m" "pytest"))
7688 #t)))))
7689 (propagated-inputs
7690 `(("python-urwid" ,python-urwid)))
7691 (native-inputs
7692 `(("python-pytest" ,python-pytest)))
7693 (home-page "https://github.com/rr-/urwid_readline")
7694 (synopsis "Text input widget for urwid that supports readline shortcuts")
7695 (description
7696 "This package provides a textbox edit widget for @code{python-urwid} that
7697 supports @code{readline} shortcuts.")
7698 (license license:expat)))
7699
7700 (define-public python-urwidtrees
7701 (package
7702 (name "python-urwidtrees")
7703 (version "1.0.2")
7704 (source
7705 (origin
7706 (method git-fetch)
7707 ;; package author intends on distributing via github rather than pypi:
7708 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7709 (uri (git-reference
7710 (url "https://github.com/pazz/urwidtrees")
7711 (commit version)))
7712 (file-name (git-file-name name version))
7713 (sha256
7714 (base32
7715 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7716 (build-system python-build-system)
7717 (arguments
7718 '(#:use-setuptools? #f
7719 #:tests? #f)) ; no tests
7720 (propagated-inputs `(("python-urwid" ,python-urwid)))
7721 (home-page "https://github.com/pazz/urwidtrees")
7722 (synopsis "Tree widgets for urwid")
7723 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7724 toolkit. Use it to build trees of widgets.")
7725 (license license:gpl3+)))
7726
7727 (define-public python2-urwidtrees
7728 (package-with-python2 python-urwidtrees))
7729
7730 (define-public python-ua-parser
7731 (package
7732 (name "python-ua-parser")
7733 (version "0.8.0")
7734 (source
7735 (origin
7736 (method url-fetch)
7737 (uri (pypi-uri "ua-parser" version))
7738 (sha256
7739 (base32
7740 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7741 (build-system python-build-system)
7742 (arguments
7743 `(#:tests? #f)) ;no test suite in release
7744 (native-inputs
7745 `(("python-pyyaml" ,python-pyyaml)))
7746 (home-page "https://github.com/ua-parser/uap-python")
7747 (synopsis "User agent parser")
7748 (description
7749 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7750 (license license:asl2.0)))
7751
7752 (define-public python2-ua-parser
7753 (package-with-python2 python-ua-parser))
7754
7755 (define-public python-user-agents
7756 (package
7757 (name "python-user-agents")
7758 (version "1.1.0")
7759 (source
7760 (origin
7761 (method url-fetch)
7762 (uri (pypi-uri "user-agents" version))
7763 (sha256
7764 (base32
7765 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7766 (build-system python-build-system)
7767 (arguments
7768 `(#:tests? #f)) ;missing devices.json test file in release
7769 (propagated-inputs
7770 `(("python-ua-parser" ,python-ua-parser)))
7771 (home-page "https://github.com/selwin/python-user-agents")
7772 (synopsis "User Agent strings parsing library")
7773 (description
7774 "A library to identify devices (phones, tablets) and their capabilities by
7775 parsing (browser/HTTP) user agent strings.")
7776 (license license:expat)))
7777
7778 (define-public python2-user-agents
7779 (package-with-python2 python-user-agents))
7780
7781 (define-public python-dbus
7782 (package
7783 (name "python-dbus")
7784 (version "1.2.16")
7785 (source
7786 (origin
7787 (method url-fetch)
7788 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7789 "dbus-python-" version ".tar.gz"))
7790 (sha256
7791 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7792 (build-system gnu-build-system)
7793 (native-inputs
7794 `(("pkg-config" ,pkg-config)))
7795 (inputs
7796 `(("python" ,python-wrapper)
7797 ("dbus-glib" ,dbus-glib)))
7798 (synopsis "Python bindings for D-bus")
7799 (description "python-dbus provides bindings for libdbus, the reference
7800 implementation of D-Bus.")
7801 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7802 (license license:expat)))
7803
7804 (define-public python2-dbus
7805 (package/inherit python-dbus
7806 (name "python2-dbus")
7807 (inputs `(("python" ,python-2)
7808 ,@(alist-delete "python"
7809 (package-inputs python-dbus)
7810 equal?)))))
7811
7812 (define-public python-notify2
7813 (package
7814 (name "python-notify2")
7815 (version "0.3.1")
7816 (source
7817 (origin
7818 (method url-fetch)
7819 (uri (pypi-uri "notify2" version))
7820 (sha256
7821 (base32
7822 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7823 (build-system python-build-system)
7824 (arguments `(#:tests? #f)) ; tests depend on system state
7825 (native-inputs
7826 `(("python-dbus" ,python-dbus)))
7827 (home-page "https://bitbucket.org/takluyver/pynotify2")
7828 (synopsis "Python interface to D-Bus notifications")
7829 (description
7830 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7831 It is a reimplementation of pynotify in pure Python, and an alternative to
7832 the GObject Introspection bindings to libnotify for non-GTK applications.")
7833 (license (list license:bsd-2
7834 license:lgpl2.1+))))
7835
7836 (define-public python2-notify2
7837 (package-with-python2 python-notify2))
7838
7839 ;; beautifulsoup4 has a totally different namespace than 3.x,
7840 ;; and pypi seems to put it under its own name, so I guess we should too
7841 (define-public python-beautifulsoup4
7842 (package
7843 (name "python-beautifulsoup4")
7844 (version "4.9.3")
7845 (source
7846 (origin
7847 (method url-fetch)
7848 (uri (pypi-uri "beautifulsoup4" version))
7849 (sha256
7850 (base32
7851 "09gbd49mwz86k572r1231x2rdp82p42zlnw0bz9b9mfi58r9wwl4"))))
7852 (build-system python-build-system)
7853 (arguments
7854 `(#:phases
7855 (modify-phases %standard-phases
7856 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7857 ;; must use this conversion script when building with Python 3. The
7858 ;; conversion script also runs the tests.
7859 ;; For more information, see the file 'convert-py3k' in the source
7860 ;; distribution.
7861 (replace 'check
7862 (lambda _ (invoke "./convert-py3k"))))))
7863 (propagated-inputs
7864 `(("python-soupsieve" ,python-soupsieve)))
7865 (home-page
7866 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7867 (synopsis
7868 "Python screen-scraping library")
7869 (description
7870 "Beautiful Soup is a Python library designed for rapidly setting up
7871 screen-scraping projects. It offers Pythonic idioms for navigating,
7872 searching, and modifying a parse tree, providing a toolkit for
7873 dissecting a document and extracting what you need. It automatically
7874 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7875 (license license:expat)
7876 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7877
7878 (define-public python2-beautifulsoup4
7879 (let ((base (package-with-python2
7880 (strip-python2-variant python-beautifulsoup4))))
7881 (package/inherit base
7882 (arguments `(#:python ,python-2)))))
7883
7884 (define-public python-soupsieve
7885 (package
7886 (name "python-soupsieve")
7887 (version "2.2.1")
7888 (source
7889 (origin
7890 (method url-fetch)
7891 (uri (pypi-uri "soupsieve" version))
7892 (sha256
7893 (base32
7894 "1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
7895 (build-system python-build-system)
7896 (arguments `(#:tests? #f))
7897 ;;XXX: 2 tests fail currently despite claming they were to be
7898 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7899 ;;don't want to create a circular dependency.
7900 (home-page "https://github.com/facelessuser/soupsieve")
7901 (synopsis "CSS selector library")
7902 (description
7903 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7904 Soup 4. It aims to provide selecting, matching, and filtering using modern
7905 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7906 specifications up through the latest CSS level 4 drafts and beyond (though
7907 some are not yet implemented).")
7908 (properties `((python2-variant . ,(delay python2-soupsieve))))
7909 (license license:expat)))
7910
7911 ;; This is the last version that supports python-2
7912 (define-public python2-soupsieve
7913 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7914 (package
7915 (inherit base)
7916 (version "1.9.6")
7917 (source
7918 (origin
7919 (method url-fetch)
7920 (uri (pypi-uri "soupsieve" version))
7921 (sha256
7922 (base32
7923 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7924 (propagated-inputs
7925 `(("python2-backports-functools-lru-cache"
7926 ,python2-backports-functools-lru-cache)
7927 ,@(package-propagated-inputs base))))))
7928
7929 (define-public python-netifaces
7930 (package
7931 (name "python-netifaces")
7932 (version "0.10.9")
7933 (source
7934 (origin
7935 (method url-fetch)
7936 (uri (pypi-uri "netifaces" version))
7937 (sha256
7938 (base32
7939 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7940 (build-system python-build-system)
7941 (home-page "https://github.com/al45tair/netifaces")
7942 (synopsis
7943 "Python module for portable network interface information")
7944 (description
7945 "Netifaces is a Python module providing information on network
7946 interfaces in an easy and portable manner.")
7947 (license license:expat)))
7948
7949 (define-public python2-netifaces
7950 (package-with-python2 python-netifaces))
7951
7952 (define-public python-networkx
7953 (package
7954 (name "python-networkx")
7955 (version "2.5")
7956 (source
7957 (origin
7958 (method url-fetch)
7959 (uri (pypi-uri "networkx" version))
7960 (sha256
7961 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7962 (build-system python-build-system)
7963 (arguments
7964 '(#:phases (modify-phases %standard-phases
7965 (replace 'check
7966 (lambda* (#:key tests? #:allow-other-keys)
7967 (if tests?
7968 (invoke "pytest" "-vv" "--pyargs" "networkx")
7969 (format #t "test suite not run~%"))
7970 #t)))))
7971 ;; python-decorator is needed at runtime.
7972 (propagated-inputs
7973 `(("python-decorator" ,python-decorator)))
7974 (native-inputs
7975 `(("python-pytest" ,python-pytest)))
7976 (home-page "https://networkx.github.io/")
7977 (synopsis "Python module for creating and manipulating graphs and networks")
7978 (description
7979 "NetworkX is a Python package for the creation, manipulation, and study
7980 of the structure, dynamics, and functions of complex networks.")
7981 (properties `((python2-variant . ,(delay python2-networkx))))
7982 (license license:bsd-3)))
7983
7984 ;; NetworkX 2.2 is the last version with support for Python 2.
7985 (define-public python2-networkx
7986 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7987 (package
7988 (inherit base)
7989 (version "2.2")
7990 (source (origin
7991 (method url-fetch)
7992 (uri (pypi-uri "networkx" version ".zip"))
7993 (sha256
7994 (base32
7995 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7996 (arguments
7997 `(#:python ,python-2))
7998 (native-inputs
7999 `(("python-nose" ,python2-nose)
8000 ("unzip" ,unzip))))))
8001
8002 (define-public python-datrie
8003 (package
8004 (name "python-datrie")
8005 (version "0.8.2")
8006 (source
8007 (origin
8008 (method url-fetch)
8009 (uri (pypi-uri "datrie" version))
8010 (sha256
8011 (base32
8012 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
8013 (build-system python-build-system)
8014 (native-inputs
8015 `(("python-cython" ,python-cython)
8016 ("python-hypothesis" ,python-hypothesis)
8017 ("python-pytest" ,python-pytest)
8018 ("python-pytest-runner" ,python-pytest-runner)))
8019 (home-page "https://github.com/kmike/datrie")
8020 (synopsis "Fast, efficiently stored trie for Python")
8021 (description
8022 "This package provides a fast, efficiently stored trie implementation for
8023 Python.")
8024 (license license:lgpl2.1+)))
8025
8026 (define-public python-amply
8027 (package
8028 (name "python-amply")
8029 (version "0.1.4")
8030 (source
8031 (origin
8032 (method url-fetch)
8033 (uri (pypi-uri "amply" version))
8034 (sha256
8035 (base32
8036 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
8037 (build-system python-build-system)
8038 (propagated-inputs
8039 `(("python-docutils" ,python-docutils)
8040 ("python-pyparsing" ,python-pyparsing)))
8041 (native-inputs
8042 `(("python-setuptools-scm" ,python-setuptools-scm)))
8043 (home-page "https://github.com/willu47/amply")
8044 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
8045 (description
8046 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
8047 structures.")
8048 (license license:epl1.0)))
8049
8050 (define-public python-pulp
8051 (package
8052 (name "python-pulp")
8053 (version "2.4")
8054 (source
8055 (origin
8056 (method url-fetch)
8057 (uri (pypi-uri "PuLP" version))
8058 (sha256
8059 (base32
8060 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
8061 (build-system python-build-system)
8062 (propagated-inputs
8063 `(("python-amply" ,python-amply)))
8064 (home-page "https://github.com/coin-or/pulp")
8065 (synopsis "Linear Programming modeler")
8066 (description
8067 "PuLP is a Linear Programming modeler written in Python. PuLP can
8068 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
8069 solve linear problems.")
8070 (license license:expat)))
8071
8072 (define-public python-toposort
8073 (package
8074 (name "python-toposort")
8075 (version "1.6")
8076 (source
8077 (origin
8078 (method url-fetch)
8079 (uri (pypi-uri "toposort" version))
8080 (sha256
8081 (base32
8082 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
8083 (build-system python-build-system)
8084 (home-page "https://gitlab.com/ericvsmith/toposort")
8085 (synopsis "Topological sort algorithm")
8086 (description
8087 "This package provides an implementation of a topological sort
8088 algorithm.")
8089 (license license:asl2.0)))
8090
8091 (define-public snakemake
8092 (package
8093 (name "snakemake")
8094 (version "5.32.2")
8095 (source
8096 (origin
8097 (method url-fetch)
8098 (uri (pypi-uri "snakemake" version))
8099 (sha256
8100 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
8101 (build-system python-build-system)
8102 (arguments
8103 ;; TODO: Package missing test dependencies.
8104 '(#:tests? #f
8105 #:phases
8106 (modify-phases %standard-phases
8107 ;; For cluster execution Snakemake will call Python. Since there is
8108 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
8109 ;; this by calling the snakemake wrapper instead.
8110 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
8111 (lambda* (#:key outputs #:allow-other-keys)
8112 (substitute* "snakemake/executors/__init__.py"
8113 (("\\{sys.executable\\} -m snakemake")
8114 (string-append (assoc-ref outputs "out")
8115 "/bin/snakemake")))
8116 #t)))))
8117 (propagated-inputs
8118 `(("python-appdirs" ,python-appdirs)
8119 ("python-configargparse" ,python-configargparse)
8120 ("python-datrie" ,python-datrie)
8121 ("python-docutils" ,python-docutils)
8122 ("python-gitpython" ,python-gitpython)
8123 ("python-jinja2" ,python-jinja2)
8124 ("python-jsonschema" ,python-jsonschema)
8125 ("python-nbformat" ,python-nbformat)
8126 ("python-networkx" ,python-networkx)
8127 ("python-psutil" ,python-psutil)
8128 ("python-pulp" ,python-pulp)
8129 ("python-pyyaml" ,python-pyyaml)
8130 ("python-ratelimiter" ,python-ratelimiter)
8131 ("python-requests" ,python-requests)
8132 ("python-toposort" ,python-toposort)
8133 ("python-wrapt" ,python-wrapt)))
8134 (home-page "https://snakemake.readthedocs.io")
8135 (synopsis "Python-based execution environment for make-like workflows")
8136 (description
8137 "Snakemake aims to reduce the complexity of creating workflows by
8138 providing a clean and modern domain specific specification language (DSL) in
8139 Python style, together with a fast and comfortable execution environment.")
8140 (license license:expat)))
8141
8142 (define-public python-pyqrcode
8143 (package
8144 (name "python-pyqrcode")
8145 (version "1.2.1")
8146 (source
8147 (origin
8148 (method url-fetch)
8149 (uri (pypi-uri "PyQRCode" version))
8150 (sha256
8151 (base32
8152 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8153 (build-system python-build-system)
8154 (home-page
8155 "https://github.com/mnooner256/pyqrcode")
8156 (synopsis "QR code generator")
8157 (description
8158 "Pyqrcode is a QR code generator written purely in Python with
8159 SVG, EPS, PNG and terminal output.")
8160 (license license:bsd-3)))
8161
8162 (define-public python-seaborn
8163 (package
8164 (name "python-seaborn")
8165 (version "0.10.0")
8166 (source
8167 (origin
8168 (method url-fetch)
8169 (uri (pypi-uri "seaborn" version))
8170 (sha256
8171 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
8172 (build-system python-build-system)
8173 (arguments
8174 `(#:phases
8175 (modify-phases %standard-phases
8176 (add-before 'check 'start-xserver
8177 (lambda* (#:key inputs #:allow-other-keys)
8178 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8179 ;; There must be a running X server and make check doesn't
8180 ;; start one. Therefore we must do it.
8181 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8182 (setenv "DISPLAY" ":1")
8183 #t)))
8184 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
8185 (propagated-inputs
8186 `(("python-pandas" ,python-pandas)
8187 ("python-matplotlib" ,python-matplotlib)
8188 ("python-numpy" ,python-numpy)
8189 ("python-scipy" ,python-scipy)))
8190 (native-inputs
8191 `(("python-pytest" ,python-pytest)
8192 ("xorg-server" ,xorg-server-for-tests)))
8193 (home-page "https://seaborn.pydata.org/")
8194 (synopsis "Statistical data visualization")
8195 (description
8196 "Seaborn is a library for making attractive and informative statistical
8197 graphics in Python. It is built on top of matplotlib and tightly integrated
8198 with the PyData stack, including support for numpy and pandas data structures
8199 and statistical routines from scipy and statsmodels.")
8200 (properties `((python2-variant . ,(delay python2-seaborn))))
8201 (license license:bsd-3)))
8202
8203 ;; 0.9.1 is the last release with support for Python 2.
8204 (define-public python2-seaborn
8205 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8206 (package
8207 (inherit base)
8208 (version "0.9.1")
8209 (source (origin
8210 (method url-fetch)
8211 (uri (pypi-uri "seaborn" version))
8212 (sha256
8213 (base32
8214 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8215
8216 (define-public python-mpmath
8217 (package
8218 (name "python-mpmath")
8219 (version "1.1.0")
8220 (source (origin
8221 (method url-fetch)
8222 (uri (pypi-uri "mpmath" version))
8223 (file-name (git-file-name name version))
8224 (sha256
8225 (base32
8226 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8227 (build-system python-build-system)
8228 (native-inputs
8229 `(("python-pytest" ,python-pytest)))
8230 (arguments
8231 '(#:phases
8232 (modify-phases %standard-phases
8233 (replace 'check
8234 (lambda _
8235 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8236 (home-page "https://mpmath.org")
8237 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8238 (description
8239 "@code{mpmath} can be used as an arbitrary-precision substitute for
8240 Python's float/complex types and math/cmath modules, but also does much
8241 more advanced mathematics.")
8242 (license license:bsd-3)))
8243
8244 (define-public python2-mpmath
8245 (package-with-python2 python-mpmath))
8246
8247 (define-public python-bigfloat
8248 (package
8249 (name "python-bigfloat")
8250 (version "0.3.0")
8251 (source
8252 (origin
8253 (method url-fetch)
8254 (uri (pypi-uri "bigfloat" version))
8255 (sha256
8256 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8257 (build-system python-build-system)
8258 (inputs
8259 `(("mpfr" ,mpfr)))
8260 (home-page "https://github.com/mdickinson/bigfloat")
8261 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8262 (description
8263 "This package provides a Python interface to the MPFR library for
8264 multiprecision arithmetic.")
8265 (license license:lgpl3+)))
8266
8267 (define-public python2-bigfloat
8268 (package-with-python2 python-bigfloat))
8269
8270 (define-public python-sympy
8271 (package
8272 (name "python-sympy")
8273 (version "1.7.1")
8274 (source
8275 (origin
8276 (method url-fetch)
8277 (uri (pypi-uri "sympy" version))
8278 (sha256
8279 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8280 (build-system python-build-system)
8281 (arguments
8282 `(#:phases
8283 (modify-phases %standard-phases
8284 (replace 'check
8285 (lambda* (#:key outputs #:allow-other-keys)
8286 (invoke
8287 (or (which "python3") (which "python"))
8288 "-c" "import sympy; sympy.test(\"/core\")"))))))
8289 (propagated-inputs
8290 `(("python-mpmath" ,python-mpmath)))
8291 (home-page "https://www.sympy.org/")
8292 (synopsis "Python library for symbolic mathematics")
8293 (description
8294 "SymPy is a Python library for symbolic mathematics. It aims to become a
8295 full-featured computer algebra system (CAS) while keeping the code as simple
8296 as possible in order to be comprehensible and easily extensible.")
8297 (license license:bsd-3)))
8298
8299 (define-public python2-sympy
8300 (package
8301 (inherit (package-with-python2 python-sympy))
8302 (version "1.5.1") ; last release for python2
8303 (source
8304 (origin
8305 (method url-fetch)
8306 (uri (pypi-uri "sympy" version))
8307 (sha256
8308 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8309
8310 (define-public python-q
8311 (package
8312 (name "python-q")
8313 (version "2.6")
8314 (source
8315 (origin
8316 (method url-fetch)
8317 (uri (pypi-uri "q" version))
8318 (sha256
8319 (base32
8320 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
8321 (build-system python-build-system)
8322 (home-page "https://github.com/zestyping/q")
8323 (synopsis "Quick-and-dirty debugging output for tired programmers")
8324 (description
8325 "q is a Python module for \"print\" style of debugging Python code. It
8326 provides convenient short API for print out of values, tracebacks, and
8327 falling into the Python interpreter.")
8328 (license license:asl2.0)))
8329
8330 (define-public python2-q
8331 (package-with-python2 python-q))
8332
8333 (define-public python-xlib
8334 (package
8335 (name "python-xlib")
8336 (version "0.29")
8337 (source
8338 (origin
8339 (method git-fetch)
8340 (uri (git-reference
8341 (url "https://github.com/python-xlib/python-xlib")
8342 (commit version)))
8343 (file-name (git-file-name name version))
8344 (sha256
8345 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
8346 (build-system python-build-system)
8347 (arguments
8348 `(#:phases
8349 (modify-phases %standard-phases
8350 (add-before 'check 'start-xserver
8351 (lambda* (#:key inputs #:allow-other-keys)
8352 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8353 ;; There must be a running X server and make check doesn't
8354 ;; start one. Therefore we must do it.
8355 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8356 (setenv "DISPLAY" ":1")
8357 #t))))))
8358 (native-inputs
8359 `(("python-mock" ,python-mock)
8360 ("python-setuptools-scm" ,python-setuptools-scm)
8361 ("xorg-server" ,xorg-server)))
8362 (propagated-inputs
8363 `(("python-six" ,python-six)))
8364 (home-page "https://github.com/python-xlib/python-xlib")
8365 (synopsis "Python X11 client library")
8366 (description
8367 "The Python X Library is intended to be a fully functional
8368 X client library for Python programs. It is useful to implement
8369 low-level X clients. It is written entirely in Python.")
8370 (license license:gpl2+)))
8371
8372 (define-public python2-xlib
8373 (package-with-python2 python-xlib))
8374
8375 (define-public python-singledispatch
8376 (package
8377 (name "python-singledispatch")
8378 (version "3.4.0.3")
8379 (source
8380 (origin
8381 (method url-fetch)
8382 (uri (pypi-uri "singledispatch" version))
8383 (sha256
8384 (base32
8385 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8386 (build-system python-build-system)
8387 (native-inputs
8388 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8389 (home-page
8390 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8391 (synopsis "Backport of singledispatch feature from Python 3.4")
8392 (description
8393 "This library brings functools.singledispatch from Python 3.4 to Python
8394 2.6-3.3.")
8395 (license license:expat)))
8396
8397 (define-public python2-singledispatch
8398 (package-with-python2 python-singledispatch))
8399
8400 ;; the python- version can be removed with python-3.5
8401 (define-public python-backports-abc
8402 (package
8403 (name "python-backports-abc")
8404 (version "0.5")
8405 (source
8406 (origin
8407 (method url-fetch)
8408 (uri (pypi-uri "backports_abc" version))
8409 (sha256
8410 (base32
8411 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
8412 (build-system python-build-system)
8413 (home-page "https://github.com/cython/backports_abc")
8414 (synopsis "Backport of additions to the 'collections.abc' module")
8415 (description
8416 "Python-backports-abc provides a backport of additions to the
8417 @code{collections.abc} module in Python-3.5.")
8418 (license license:psfl)))
8419
8420 (define-public python2-backports-abc
8421 (package-with-python2 python-backports-abc))
8422
8423 (define-public python-backports-csv
8424 (package
8425 (name "python-backports-csv")
8426 (version "1.0.7")
8427 (source
8428 (origin
8429 (method url-fetch)
8430 (uri (pypi-uri "backports.csv" version))
8431 (sha256
8432 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8433 (build-system python-build-system)
8434 (home-page "https://github.com/ryanhiebert/backports.csv")
8435 (synopsis "Backport of Python 3's csv module for Python 2")
8436 (description
8437 "Provides a backport of Python 3's @code{csv} module for parsing
8438 comma separated values. The API of the @code{csv} module in Python 2
8439 is drastically different from the @code{csv} module in Python 3.
8440 This is due, for the most part, to the difference between str in
8441 Python 2 and Python 3.")
8442 (license license:psfl)))
8443
8444 (define-public python2-backports-csv
8445 (package-with-python2 python-backports-csv))
8446
8447 (define-public python2-backports-shutil-get-terminal-size
8448 (package
8449 (name "python2-backports-shutil-get-terminal-size")
8450 (version "1.0.0")
8451 (source
8452 (origin
8453 (method url-fetch)
8454 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8455 (sha256
8456 (base32
8457 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8458 (build-system python-build-system)
8459 (arguments
8460 `(#:python ,python-2
8461 #:phases
8462 (modify-phases %standard-phases
8463 (replace 'check
8464 (lambda _
8465 (setenv "PYTHONPATH" (string-append "./build/lib:"
8466 (getenv "PYTHONPATH")))
8467 (invoke "py.test" "-v"))))))
8468 (native-inputs
8469 `(("python2-pytest" ,python2-pytest)))
8470 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8471 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8472 (description
8473 "This package provides a backport of the @code{get_terminal_size
8474 function} from Python 3.3's @code{shutil}.
8475 Unlike the original version it is written in pure Python rather than C,
8476 so it might be a tiny bit slower.")
8477 (license license:expat)))
8478
8479 (define-public python-waf
8480 (package
8481 (name "python-waf")
8482 (version "2.0.19")
8483 (source (origin
8484 (method url-fetch)
8485 (uri (string-append "https://waf.io/"
8486 "waf-" version ".tar.bz2"))
8487 (sha256
8488 (base32
8489 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8490 (build-system python-build-system)
8491 (arguments
8492 '(#:phases
8493 (modify-phases %standard-phases
8494 (replace 'build
8495 (lambda _
8496 ;; XXX: Find a way to add all extra tools.
8497 (let ((tools '("gccdeps"
8498 "clang_compilation_database")))
8499 (invoke "python" "waf-light" "configure" "build"
8500 (string-append "--tools="
8501 (string-join tools ","))))))
8502 (replace 'check
8503 (lambda _
8504 (invoke "python" "waf" "--version")))
8505 (replace 'install
8506 (lambda* (#:key outputs #:allow-other-keys)
8507 (let ((out (assoc-ref outputs "out")))
8508 (install-file "waf" (string-append out "/bin")))
8509 #t))
8510 ;; waf breaks when it is wrapped.
8511 (delete 'wrap))))
8512 (home-page "https://waf.io/")
8513 (synopsis "Python-based build system")
8514 (description
8515 "Waf is a Python-based framework for configuring, compiling and installing
8516 applications.")
8517 (license license:bsd-3)))
8518
8519 (define-public python2-waf
8520 (package-with-python2 python-waf))
8521
8522 (define-public python-pyzmq
8523 (package
8524 (name "python-pyzmq")
8525 (version "22.0.3")
8526 (source
8527 (origin
8528 (method url-fetch)
8529 (uri (pypi-uri "pyzmq" version))
8530 (sha256
8531 (base32 "0bgrn65cxfz1c1sjrgyq5dy1mkhppxxbizd5wvrl03cq4zhkrxpp"))))
8532 (build-system python-build-system)
8533 (arguments
8534 `(#:configure-flags
8535 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8536 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8537 ;; --inplace' for 'python setup.py test' to work.
8538 #:tests? #f))
8539 (inputs
8540 `(("zeromq" ,zeromq)))
8541 (native-inputs
8542 `(("pkg-config" ,pkg-config)
8543 ("python-nose" ,python-nose)))
8544 (home-page "https://github.com/zeromq/pyzmq")
8545 (synopsis "Python bindings for 0MQ")
8546 (description
8547 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8548 (license license:bsd-4)))
8549
8550 (define-public python2-pyzmq
8551 (package-with-python2 python-pyzmq))
8552
8553 (define-public python-pep8
8554 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8555 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8556 ;; some dependents' test suites, and nothing more.
8557 (package
8558 (name "python-pep8")
8559 (version "1.7.0")
8560 (source
8561 (origin
8562 (method url-fetch)
8563 (uri (pypi-uri "pep8" version))
8564 (sha256
8565 (base32
8566 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8567 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8568 (build-system python-build-system)
8569 (home-page "https://pep8.readthedocs.org/")
8570 (synopsis "Python style guide checker")
8571 (description
8572 "This tools checks Python code against some of the style conventions in
8573 PEP 8.")
8574 (license license:expat)))
8575
8576 (define-public python2-pep8
8577 (package-with-python2 python-pep8))
8578
8579 (define-public python-pep517
8580 (package
8581 (inherit python-pep517-bootstrap)
8582 (name "python-pep517")
8583 (arguments
8584 '(#:phases
8585 (modify-phases %standard-phases
8586 (replace 'check
8587 (lambda* (#:key tests? #:allow-other-keys)
8588 (delete-file "pytest.ini")
8589 ;; This test tries to connect to the internet
8590 (delete-file "tests/test_meta.py")
8591 (if tests?
8592 (invoke "pytest")
8593 #t))))))
8594 (native-inputs
8595 `(("python-mock" ,python-mock)
8596 ("python-pytest" ,python-pytest)
8597 ("python-testpath" ,python-testpath)))
8598 (properties `((python2-variant . ,(delay python2-pep517))))))
8599
8600 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8601 (define-public python2-pep517
8602 (let ((base (package-with-python2
8603 (strip-python2-variant python-pep517))))
8604 (package/inherit base
8605 (name "python2-pep517")
8606 (arguments
8607 `(#:tests? #f
8608 ,@(package-arguments base)))
8609 (native-inputs `()))))
8610
8611 (define-public python-pyflakes
8612 (package
8613 (name "python-pyflakes")
8614 (version "2.3.1")
8615 (source
8616 (origin
8617 (method url-fetch)
8618 (uri (pypi-uri "pyflakes" version))
8619 (sha256
8620 (base32
8621 "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
8622 (build-system python-build-system)
8623 (home-page
8624 "https://github.com/pyflakes/pyflakes")
8625 (synopsis "Passive checker of Python programs")
8626 (description
8627 "Pyflakes statically checks Python source code for common errors.")
8628 (license license:expat)))
8629
8630 (define-public python2-pyflakes
8631 (package-with-python2 python-pyflakes))
8632
8633 (define-public python-mccabe
8634 (package
8635 (name "python-mccabe")
8636 (version "0.6.1")
8637 (source
8638 (origin
8639 (method url-fetch)
8640 (uri (pypi-uri "mccabe" version))
8641 (sha256
8642 (base32
8643 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8644 (build-system python-build-system)
8645 (native-inputs
8646 `(("python-pytest" ,python-pytest-bootstrap)
8647 ("python-pytest-runner" ,python-pytest-runner)))
8648 (home-page "https://github.com/flintwork/mccabe")
8649 (synopsis "McCabe checker, plugin for flake8")
8650 (description
8651 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8652 complexity of Python source code.")
8653 (license license:expat)))
8654
8655 (define-public python2-mccabe
8656 (package-with-python2 python-mccabe))
8657
8658 (define-public python-flake8
8659 (package
8660 (name "python-flake8")
8661 (version "3.9.0")
8662 (source (origin
8663 (method url-fetch)
8664 (uri (pypi-uri "flake8" version))
8665 (sha256
8666 (base32
8667 "1w65iyjnrwipv4dbcqxh725ri7mdx01d6pjyggd97c0j5cvkx1vq"))))
8668 (build-system python-build-system)
8669 (arguments
8670 `(#:phases
8671 (modify-phases %standard-phases
8672 (delete 'check)
8673 (add-after 'install 'check
8674 (lambda* (#:key inputs outputs #:allow-other-keys)
8675 (add-installed-pythonpath inputs outputs)
8676 (invoke "pytest" "-v")
8677 #t)))))
8678 (propagated-inputs
8679 `(("python-pycodestyle" ,python-pycodestyle)
8680 ("python-entrypoints" ,python-entrypoints)
8681 ("python-pyflakes" ,python-pyflakes)
8682 ("python-mccabe" ,python-mccabe)))
8683 (native-inputs
8684 `(("python-mock" ,python-mock)
8685 ("python-pytest" ,python-pytest-bootstrap)))
8686 (home-page "https://gitlab.com/pycqa/flake8")
8687 (synopsis
8688 "The modular source code checker: pep8, pyflakes and co")
8689 (description
8690 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8691 (properties `((python2-variant . ,(delay python2-flake8))))
8692 (license license:expat)))
8693
8694 (define-public python2-flake8
8695 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8696 (package/inherit base
8697 (propagated-inputs
8698 `(("python2-configparser" ,python2-configparser)
8699 ("python2-enum34" ,python2-enum34)
8700 ("python2-functools32" ,python2-functools32)
8701 ("python2-typing" ,python2-typing)
8702 ,@(package-propagated-inputs base))))))
8703
8704 (define-public python-flake8-bugbear
8705 (package
8706 (name "python-flake8-bugbear")
8707 (version "20.1.4")
8708 (source
8709 (origin
8710 (method url-fetch)
8711 (uri (pypi-uri "flake8-bugbear" version))
8712 (sha256
8713 (base32
8714 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8715 (build-system python-build-system)
8716 (arguments
8717 '(#:phases
8718 (modify-phases %standard-phases
8719 (add-before 'check 'disable-test
8720 (lambda _
8721 ;; This test fails on slow computers.
8722 (substitute* "tests/test_bugbear.py"
8723 (("def test_does_not_crash_on_any_valid_code")
8724 "def _test_does_not_crash_on_any_valid_code")))))))
8725 (native-inputs
8726 `(("python-hypothesis" ,python-hypothesis)
8727 ("python-hypothesmith" ,python-hypothesmith)))
8728 (propagated-inputs
8729 `(("python-attrs" ,python-attrs)
8730 ("python-flake8" ,python-flake8)))
8731 (home-page "https://github.com/PyCQA/flake8-bugbear")
8732 (synopsis
8733 "Flake8 plugin for finding likely bugs and design problems in your program")
8734 (description
8735 "This package contains a plugin for Flake8 finding likely bugs and
8736 design problems in your program. It contains warnings that don't belong
8737 in pyflakes and pycodestyle.")
8738 (license license:expat)))
8739
8740 (define-public python-flake8-continuation
8741 (package
8742 (name "python-flake8-continuation")
8743 (version "1.0.5")
8744 (source
8745 (origin
8746 (method url-fetch)
8747 (uri (pypi-uri "flake8-continuation" version))
8748 (sha256
8749 (base32
8750 "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y"))))
8751 (build-system python-build-system)
8752 (propagated-inputs
8753 `(("python-flake8" ,python-flake8)
8754 ("python-pycodestyle" ,python-pycodestyle)
8755 ("python-six" ,python-six)))
8756 (home-page "https://github.com/planetlabs/flake8-continuation")
8757 (synopsis "Flake8 Line Continuation Plugin")
8758 (description "A Flake8 plugin that checks for the line continuation
8759 style to be in the preferred method according to PEP-8, specifically:
8760 @quotation
8761 The preferred way of wrapping long lines is by using Python's implied
8762 line continuation inside parentheses, brackets and braces. Long lines
8763 can be broken over multiple lines by wrapping expressions in parentheses.
8764 These should be used in preference to using a backslash for line continuation.
8765 @end quotation")
8766 (license license:asl2.0)))
8767
8768 (define-public python-flake8-implicit-str-concat
8769 (package
8770 (name "python-flake8-implicit-str-concat")
8771 (version "0.2.0")
8772 (source
8773 (origin
8774 (method url-fetch)
8775 (uri (pypi-uri "flake8_implicit_str_concat" version))
8776 (sha256
8777 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
8778 (build-system python-build-system)
8779 (propagated-inputs
8780 `(("python-attrs" ,python-attrs)
8781 ("python-more-itertools" ,python-more-itertools)))
8782 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
8783 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
8784 (description
8785 "This is a plugin for the Python code checking tool Flake8 to encourage
8786 correct string literal concatenation.
8787
8788 It looks for style problems like implicitly concatenated string literals on
8789 the same line (which can be introduced by the code formating tool Black), or
8790 unnecessary plus operators for explicit string literal concatenation.")
8791 (license license:expat)))
8792
8793 (define-public python-flake8-polyfill
8794 (package
8795 (name "python-flake8-polyfill")
8796 (version "1.0.2")
8797 (source
8798 (origin
8799 (method url-fetch)
8800 (uri (pypi-uri "flake8-polyfill" version))
8801 (sha256
8802 (base32
8803 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8804 (build-system python-build-system)
8805 (arguments
8806 '(#:phases
8807 (modify-phases %standard-phases
8808 (replace 'check
8809 (lambda _
8810 ;; Be compatible with Pytest 4:
8811 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8812 (substitute* "setup.cfg"
8813 (("\\[pytest\\]")
8814 "[tool:pytest]"))
8815
8816 (setenv "PYTHONPATH"
8817 (string-append (getcwd) "/build/lib:"
8818 (getenv "PYTHONPATH")))
8819 (invoke "py.test" "-v"))))))
8820 (native-inputs
8821 `(("python-flake8" ,python-flake8)
8822 ("python-mock" ,python-mock)
8823 ("python-pep8" ,python-pep8)
8824 ("python-pycodestyle" ,python-pycodestyle)
8825 ("python-pytest" ,python-pytest)))
8826 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8827 (synopsis "Polyfill package for Flake8 plugins")
8828 (description
8829 "This package that provides some compatibility helpers for Flake8
8830 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8831 (license license:expat)))
8832
8833 (define-public python2-flake8-polyfill
8834 (package-with-python2 python-flake8-polyfill))
8835
8836 (define-public python-flake8-print
8837 (package
8838 (name "python-flake8-print")
8839 (version "4.0.0")
8840 (source
8841 (origin
8842 (method url-fetch)
8843 (uri (pypi-uri "flake8-print" version))
8844 (sha256
8845 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
8846 (build-system python-build-system)
8847 (propagated-inputs
8848 `(("python-flake8" ,python-flake8)
8849 ("python-pycodestyle" ,python-pycodestyle)
8850 ("python-six" ,python-six)))
8851 (home-page "https://github.com/jbkahn/flake8-print")
8852 (synopsis "Print statement checker plugin for Flake8")
8853 (description
8854 "This plugin for Flake8 checks for @code{print} statements in Python
8855 files.")
8856 (license license:expat)))
8857
8858 (define-public python-flake8-pyi
8859 (package
8860 (name "python-flake8-pyi")
8861 (version "20.5.0")
8862 (source
8863 (origin
8864 (method url-fetch)
8865 (uri (pypi-uri "flake8-pyi" version))
8866 (sha256
8867 (base32
8868 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8869 (build-system python-build-system)
8870 (propagated-inputs
8871 `(("python-attrs" ,python-attrs)
8872 ("python-flake8" ,python-flake8)
8873 ("python-pyflakes" ,python-pyflakes)))
8874 (home-page "https://github.com/ambv/flake8-pyi")
8875 (synopsis
8876 "Flake8 plugin that provides specializations for type hinting stub files")
8877 (description
8878 "This package contains a plugin that provides specializations for
8879 type hinting stub files, especially interesting for linting typeshed. It
8880 adds the @file{.pyi} extension to the default value of the @code{--filename}
8881 command-line argument to Flake8. This means stubs are linted by default with
8882 this plugin enabled, without needing to explicitly list every file. It
8883 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8884 expressions after the entire file has been read. This enables support for
8885 first-class forward references that stub files use.")
8886 (license license:expat)))
8887
8888 (define-public python-flake8-pie
8889 (package
8890 (name "python-flake8-pie")
8891 (version "0.5.0")
8892 (source
8893 (origin
8894 (method url-fetch)
8895 (uri (pypi-uri "flake8-pie" version))
8896 (sha256
8897 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8898 (build-system python-build-system)
8899 (home-page "https://github.com/sbdchd/flake8-pie")
8900 (synopsis "Flake8 extension that implements lints")
8901 (description
8902 "This package provides a flake8 extension that implements miscellaneous
8903 lints.")
8904 (license license:bsd-2)))
8905
8906 (define-public python-flake8-quotes
8907 (package
8908 (name "python-flake8-quotes")
8909 (version "3.2.0")
8910 (source
8911 (origin
8912 (method url-fetch)
8913 (uri (pypi-uri "flake8-quotes" version))
8914 (sha256
8915 (base32
8916 "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z"))))
8917 (build-system python-build-system)
8918 (propagated-inputs
8919 `(("python-flake8" ,python-flake8)))
8920 (home-page "https://github.com/zheller/flake8-quotes/")
8921 (synopsis "Flake8 lint for quotes")
8922 (description "This package provides a Flake8 lint for quotes.")
8923 (license license:expat)))
8924
8925 (define-public python-autoflake
8926 (package
8927 (name "python-autoflake")
8928 (version "1.3.1")
8929 (source
8930 (origin
8931 (method url-fetch)
8932 (uri (pypi-uri "autoflake" version))
8933 (sha256
8934 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8935 (build-system python-build-system)
8936 (propagated-inputs
8937 `(("python-pyflakes" ,python-pyflakes)))
8938 (home-page "https://github.com/myint/autoflake")
8939 (synopsis "Removes unused imports and unused variables")
8940 (description
8941 "@code{autoflake} removes unused imports and unused variables from Python
8942 code as reported by @code{pyflakes}.
8943
8944 By default, it only removes unused imports for modules that are part of the
8945 standard library. Removal of unused variables is also disabled by default.
8946 It also removes useless @code{pass} statements.")
8947 (license license:expat)))
8948
8949 (define-public python-mistune
8950 (package
8951 (name "python-mistune")
8952 (version "0.8.4")
8953 (source
8954 (origin
8955 (method url-fetch)
8956 (uri (pypi-uri "mistune" version))
8957 (sha256
8958 (base32
8959 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8960 (build-system python-build-system)
8961 (native-inputs
8962 `(("python-nose" ,python-nose)
8963 ("python-cython" ,python-cython)))
8964 (home-page "https://github.com/lepture/mistune")
8965 (synopsis "Markdown parser in pure Python")
8966 (description "This package provides a fast markdown parser in pure
8967 Python.")
8968 (license license:bsd-3)))
8969
8970 (define-public python2-mistune
8971 (package-with-python2 python-mistune))
8972
8973 (define-public python-markdown
8974 (package
8975 (name "python-markdown")
8976 (version "3.3.4")
8977 (source
8978 (origin
8979 (method url-fetch)
8980 (uri (pypi-uri "Markdown" version))
8981 (sha256
8982 (base32
8983 "0jbs73nincha8fkfxx267sfxac6pl0ckszjbqbb8gk4dhs8v9d9i"))))
8984 (build-system python-build-system)
8985 (native-inputs
8986 `(("python-nose" ,python-nose)
8987 ("python-pyyaml" ,python-pyyaml)))
8988 (home-page "https://python-markdown.github.io/")
8989 (synopsis "Python implementation of Markdown")
8990 (description
8991 "This package provides a Python implementation of John Gruber's
8992 Markdown. The library features international input, various Markdown
8993 extensions, and several HTML output formats. A command line wrapper
8994 markdown_py is also provided to convert Markdown files to HTML.")
8995 (properties `((python2-variant . ,(delay python2-markdown))))
8996 (license license:bsd-3)))
8997
8998 ;; Markdown 3.2 dropped support for Python 2.
8999 (define-public python2-markdown
9000 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
9001 (package/inherit
9002 base
9003 (version "3.1.1")
9004 (source (origin
9005 (method url-fetch)
9006 (uri (pypi-uri "Markdown" version))
9007 (sha256
9008 (base32
9009 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
9010
9011 (define-public python-ptyprocess
9012 (package
9013 (name "python-ptyprocess")
9014 (version "0.5.2")
9015 (source
9016 (origin
9017 (method url-fetch)
9018 (uri (pypi-uri "ptyprocess" version))
9019 (sha256
9020 (base32
9021 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
9022 (build-system python-build-system)
9023 (native-inputs
9024 `(("python-nose" ,python-nose)))
9025 (arguments
9026 `(#:phases
9027 (modify-phases %standard-phases
9028 (replace 'check
9029 (lambda _ (invoke "nosetests"))))))
9030 (home-page "https://github.com/pexpect/ptyprocess")
9031 (synopsis "Run a subprocess in a pseudo terminal")
9032 (description
9033 "This package provides a Python library used to launch a subprocess in a
9034 pseudo terminal (pty), and interact with both the process and its pty.")
9035 (license license:isc)))
9036
9037 (define-public python2-ptyprocess
9038 (package-with-python2 python-ptyprocess))
9039
9040 (define-public python-cram
9041 (package
9042 (name "python-cram")
9043 (version "0.7")
9044 (home-page "https://bitheap.org/cram/")
9045 (source (origin
9046 (method url-fetch)
9047 (uri (list (string-append home-page "cram-"
9048 version ".tar.gz")
9049 (pypi-uri "cram" version)))
9050 (sha256
9051 (base32
9052 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
9053 (arguments
9054 '(#:phases
9055 (modify-phases %standard-phases
9056 (add-after 'unpack 'patch-source
9057 (lambda _
9058 (substitute* (find-files "cram" ".*\\.py$")
9059 ;; Replace default shell path.
9060 (("/bin/sh") (which "sh")))
9061 (substitute* (find-files "tests" ".*\\.t$")
9062 (("md5") "md5sum")
9063 (("/bin/bash") (which "bash"))
9064 (("/bin/sh") (which "sh")))
9065 (substitute* "cram/_test.py"
9066 ;; This hack works around a bug triggered by substituting
9067 ;; the /bin/sh paths. "tests/usage.t" compares the output of
9068 ;; "cram -h", which breaks the output at 80 characters. This
9069 ;; causes the line showing the default shell to break into two
9070 ;; lines, but the test expects a single line...
9071 (("env\\['COLUMNS'\\] = '80'")
9072 "env['COLUMNS'] = '160'"))
9073
9074 (substitute* "Makefile"
9075 ;; Recent versions of python-coverage have caused the test
9076 ;; coverage to decrease (as of version 0.7). Allow that.
9077 (("--fail-under=100")
9078 "--fail-under=90"))
9079
9080 #t))
9081 (replace 'check
9082 ;; The test phase uses the built library and executable.
9083 (lambda* (#:key inputs outputs #:allow-other-keys)
9084 (add-installed-pythonpath inputs outputs)
9085 (setenv "PATH" (string-append (getenv "PATH") ":"
9086 (assoc-ref outputs "out") "/bin"))
9087 (invoke "make" "test"))))))
9088 (build-system python-build-system)
9089 (native-inputs
9090 `(("python-coverage" ,python-coverage)
9091 ("which" ,which)))
9092 (synopsis "Simple testing framework for command line applications")
9093 (description
9094 "Cram is a functional testing framework for command line applications.
9095 Cram tests look like snippets of interactive shell sessions. Cram runs each
9096 command and compares the command output in the test with the command’s actual
9097 output.")
9098 (license license:gpl2+)))
9099
9100 (define-public python2-cram
9101 (package-with-python2 python-cram))
9102
9103 (define-public python-crashtest
9104 (package
9105 (name "python-crashtest")
9106 (version "0.3.1")
9107 (source
9108 (origin
9109 (method url-fetch)
9110 (uri (pypi-uri "crashtest" version))
9111 (sha256
9112 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
9113 (build-system python-build-system)
9114 (home-page "https://github.com/sdispater/crashtest")
9115 (synopsis "Manage Python errors with ease")
9116 (description
9117 "Python library that makes exceptions handling and inspection easier.")
9118 (license license:expat)))
9119
9120 (define-public python-straight-plugin
9121 (package
9122 (name "python-straight-plugin")
9123 (version "1.4.1")
9124 (source
9125 (origin
9126 (method url-fetch)
9127 (uri (pypi-uri "straight.plugin" version))
9128 (sha256
9129 (base32
9130 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
9131 (build-system python-build-system)
9132 (home-page "https://github.com/ironfroggy/straight.plugin")
9133 (synopsis "Simple namespaced plugin facility")
9134 (description "Straight Plugin provides a type of plugin you can create from
9135 almost any existing Python modules, and an easy way for outside developers to
9136 add functionality and customization to your projects with their own plugins.")
9137 (license license:expat)))
9138
9139 (define-public python2-straight-plugin
9140 (package-with-python2 python-straight-plugin))
9141
9142 (define-public python-fonttools
9143 (package
9144 (name "python-fonttools")
9145 (version "4.6.0")
9146 (source (origin
9147 (method url-fetch)
9148 (uri (pypi-uri "fonttools" version ".zip"))
9149 (sha256
9150 (base32
9151 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
9152 (build-system python-build-system)
9153 (native-inputs
9154 `(("unzip" ,unzip)
9155 ("python-pytest" ,python-pytest)
9156 ("python-pytest-runner" ,python-pytest-runner)))
9157 (home-page "https://github.com/fonttools/fonttools")
9158 (synopsis "Tools to manipulate font files")
9159 (description
9160 "FontTools/TTX is a library to manipulate font files from Python. It
9161 supports reading and writing of TrueType/OpenType fonts, reading and writing
9162 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
9163 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
9164 from an XML-based format.")
9165 (license license:expat)))
9166
9167 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
9168 (define-public python2-fonttools
9169 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
9170 (package/inherit
9171 base
9172 (version "3.44.0")
9173 (source (origin
9174 (method url-fetch)
9175 (uri (pypi-uri "fonttools" version ".zip"))
9176 (sha256
9177 (base32
9178 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
9179
9180 (define-public python-ly
9181 (package
9182 (name "python-ly")
9183 (version "0.9.5")
9184 (source
9185 (origin
9186 (method url-fetch)
9187 (uri (pypi-uri name version))
9188 (sha256
9189 (base32
9190 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
9191 (build-system python-build-system)
9192 (arguments
9193 ;; FIXME: Some tests need network access.
9194 '(#:tests? #f))
9195 (synopsis "Tool and library for manipulating LilyPond files")
9196 (description "This package provides a Python library to parse, manipulate
9197 or create documents in LilyPond format. A command line program ly is also
9198 provided that can be used to do various manipulations with LilyPond files.")
9199 (home-page "https://pypi.org/project/python-ly/")
9200 (license license:gpl2+)))
9201
9202 (define-public python-appdirs
9203 (package
9204 (name "python-appdirs")
9205 (version "1.4.3")
9206 (source
9207 (origin
9208 (method url-fetch)
9209 (uri (pypi-uri "appdirs" version))
9210 (sha256
9211 (base32
9212 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9213 (build-system python-build-system)
9214 (home-page "https://github.com/ActiveState/appdirs")
9215 (synopsis
9216 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9217 (description
9218 "This module provides a portable way of finding out where user data
9219 should be stored on various operating systems.")
9220 (license license:expat)))
9221
9222 (define-public python2-appdirs
9223 (package-with-python2 python-appdirs))
9224
9225 (define-public python-gorilla
9226 (package
9227 (name "python-gorilla")
9228 (version "0.3.0")
9229 (source (origin
9230 (method url-fetch)
9231 (uri (pypi-uri "gorilla" version))
9232 (sha256
9233 (base32
9234 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9235 (build-system python-build-system)
9236 (home-page "https://github.com/christophercrouzet/gorilla")
9237 (synopsis "Convenient monkey patching with Python")
9238 (description
9239 "Gorilla is a Python library that provides a convenient approach to
9240 monkey patching. Monkey patching is the process of modifying module and
9241 class attributes at runtime with the purpose of replacing or extending
9242 third-party code.")
9243 (license license:expat)))
9244
9245 (define-public python-llfuse
9246 (package
9247 (name "python-llfuse")
9248 (version "1.3.8")
9249 (source (origin
9250 (method url-fetch)
9251 (uri (pypi-uri "llfuse" version))
9252 (sha256
9253 (base32
9254 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9255 (build-system python-build-system)
9256 (inputs
9257 `(("fuse" ,fuse)
9258 ("attr" ,attr)))
9259 (native-inputs
9260 `(("pkg-config" ,pkg-config)))
9261 (synopsis "Python bindings for FUSE")
9262 (description
9263 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9264 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9265 (license license:lgpl2.0+)
9266 (properties `((python2-variant . ,(delay python2-llfuse))))))
9267
9268 (define-public python2-llfuse
9269 (let ((base (package-with-python2
9270 (strip-python2-variant python-llfuse))))
9271 (package/inherit base
9272 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
9273
9274 (define-public python-msgpack
9275 (package
9276 (name "python-msgpack")
9277 (version "1.0.0")
9278 (source (origin
9279 (method url-fetch)
9280 (uri (pypi-uri "msgpack" version))
9281 (sha256
9282 (base32
9283 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
9284 (build-system python-build-system)
9285 (arguments
9286 `(#:modules ((guix build utils)
9287 (guix build python-build-system)
9288 (ice-9 ftw)
9289 (srfi srfi-1)
9290 (srfi srfi-26))
9291 #:phases
9292 (modify-phases %standard-phases
9293 (replace 'check
9294 (lambda _
9295 (let ((cwd (getcwd)))
9296 (setenv "PYTHONPATH"
9297 (string-append cwd "/build/"
9298 (find (cut string-prefix? "lib" <>)
9299 (scandir (string-append cwd "/build")))
9300 ":"
9301 (getenv "PYTHONPATH")))
9302 (invoke "pytest" "-v" "test")))))))
9303 (native-inputs
9304 `(("python-pytest" ,python-pytest)))
9305 (synopsis "MessagePack (de)serializer")
9306 (description "MessagePack is a fast, compact binary serialization format,
9307 suitable for similar data to JSON. This package provides CPython bindings for
9308 reading and writing MessagePack data.")
9309 (home-page "https://pypi.org/project/msgpack/")
9310 (license license:asl2.0)))
9311
9312 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
9313 ;; release 0.5. Some packages like borg still call it by the old name for now.
9314 ;; <https://bugs.gnu.org/30662>
9315 (define-public python-msgpack-transitional
9316 (package
9317 (inherit python-msgpack)
9318 (name "python-msgpack-transitional")
9319 (version "0.5.6")
9320 (source (origin
9321 (method url-fetch)
9322 (uri (pypi-uri "msgpack" version))
9323 (sha256
9324 (base32
9325 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
9326 (arguments
9327 (substitute-keyword-arguments (package-arguments python-msgpack)
9328 ((#:phases phases)
9329 `(modify-phases ,phases
9330 (add-after 'unpack 'configure-transitional
9331 (lambda _
9332 ;; Keep using the old name.
9333 (substitute* "setup.py"
9334 (("TRANSITIONAL = False")
9335 "TRANSITIONAL = 1"))
9336 #t))))))))
9337
9338 (define-public python2-msgpack
9339 (package-with-python2 python-msgpack))
9340
9341 (define-public python-netaddr
9342 (package
9343 (name "python-netaddr")
9344 (version "0.7.19")
9345 (source
9346 (origin
9347 (method url-fetch)
9348 (uri (pypi-uri "netaddr" version))
9349 (sha256
9350 (base32
9351 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
9352 (build-system python-build-system)
9353 (arguments `(#:tests? #f)) ;; No tests.
9354 (home-page "https://github.com/drkjam/netaddr/")
9355 (synopsis "Pythonic manipulation of network addresses")
9356 (description
9357 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
9358 and MAC network addresses.")
9359 (license license:bsd-3)))
9360
9361 (define-public python2-netaddr
9362 (package-with-python2 python-netaddr))
9363
9364 (define-public python2-pyroute2
9365 (package
9366 (name "python2-pyroute2")
9367 (version "0.5.6")
9368 (source
9369 (origin
9370 (method url-fetch)
9371 (uri (pypi-uri "pyroute2" version))
9372 (sha256
9373 (base32
9374 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
9375 (build-system python-build-system)
9376 (arguments
9377 `(#:python ,python-2)) ;Python 3.x is not supported
9378 (home-page "https://github.com/svinota/pyroute2")
9379 (synopsis "Python netlink library")
9380 (description
9381 "Pyroute2 is a pure Python netlink library with minimal dependencies.
9382 Supported netlink families and protocols include:
9383 @itemize
9384 @item rtnl, network settings - addresses, routes, traffic controls
9385 @item nfnetlink - netfilter API: ipset, nftables, ...
9386 @item ipq - simplest userspace packet filtering, iptables QUEUE target
9387 @item devlink - manage and monitor devlink-enabled hardware
9388 @item generic - generic netlink families
9389 @itemize
9390 @item nl80211 - wireless functions API (basic support)
9391 @item taskstats - extended process statistics
9392 @item acpi_events - ACPI events monitoring
9393 @item thermal_events - thermal events monitoring
9394 @item VFS_DQUOT - disk quota events monitoring
9395 @end itemize
9396 @end itemize")
9397 (license license:gpl2+)))
9398
9399 (define-public python-wrapt
9400 (package
9401 (name "python-wrapt")
9402 (version "1.11.2")
9403 (source
9404 (origin
9405 (method url-fetch)
9406 (uri (pypi-uri "wrapt" version))
9407 (sha256
9408 (base32
9409 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
9410 (build-system python-build-system)
9411 (arguments
9412 ;; Tests are not included in the tarball, they are only available in the
9413 ;; git repository.
9414 `(#:tests? #f))
9415 (home-page "https://github.com/GrahamDumpleton/wrapt")
9416 (synopsis "Module for decorators, wrappers and monkey patching")
9417 (description
9418 "The aim of the wrapt module is to provide a transparent object proxy for
9419 Python, which can be used as the basis for the construction of function
9420 wrappers and decorator functions.")
9421 (license license:bsd-2)))
9422
9423 (define-public python2-wrapt
9424 (package-with-python2 python-wrapt))
9425
9426 (define-public python-commonmark
9427 (package
9428 (name "python-commonmark")
9429 (version "0.9.1")
9430 (source
9431 (origin
9432 (method url-fetch)
9433 (uri (pypi-uri "commonmark" version))
9434 (sha256
9435 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
9436 (build-system python-build-system)
9437 (arguments
9438 `(#:phases
9439 (modify-phases %standard-phases
9440 (replace 'check
9441 (lambda* (#:key inputs outputs #:allow-other-keys)
9442 (add-installed-pythonpath inputs outputs)
9443 (invoke "python" "setup.py" "test"))))))
9444 (home-page "https://github.com/readthedocs/commonmark.py")
9445 (synopsis "Python parser for the CommonMark Markdown spec")
9446 (description
9447 "This module is a pure Python port of jgm's @code{commonmark.js}, a
9448 Markdown parser and renderer for the CommonMark specification, using only
9449 native modules.")
9450 (license license:bsd-3)))
9451
9452 (define-public python-xlrd
9453 (package
9454 (name "python-xlrd")
9455 (version "1.2.0")
9456 (source (origin
9457 (method url-fetch)
9458 (uri (pypi-uri "xlrd" version))
9459 (sha256
9460 (base32
9461 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
9462 (build-system python-build-system)
9463 (arguments
9464 `(#:phases
9465 (modify-phases %standard-phases
9466 ;; Some tests depend on writing a temporary file to the user's home
9467 ;; directory.
9468 (add-after 'unpack 'fix-tests
9469 (lambda _
9470 (delete-file "tests/test_open_workbook.py")
9471 #t)))))
9472 (home-page "http://www.python-excel.org/")
9473 (synopsis "Library for extracting data from Excel files")
9474 (description "This package provides a library to extract data from
9475 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
9476 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
9477 Unicode-aware. It is not intended as an end-user tool.")
9478 (license license:bsd-3)))
9479
9480 (define-public python2-xlrd
9481 (package-with-python2 python-xlrd))
9482
9483 (define-public python-immutables
9484 (package
9485 (name "python-immutables")
9486 (version "0.14")
9487 (source
9488 (origin
9489 (method url-fetch)
9490 (uri (pypi-uri "immutables" version))
9491 (sha256
9492 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9493 (build-system python-build-system)
9494 (home-page "https://github.com/MagicStack/immutables")
9495 (synopsis "High-performance immutable mapping type for Python")
9496 (description
9497 "An immutable mapping type for Python. The underlying datastructure is a
9498 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9499 functional languages.")
9500 (license license:asl2.0)))
9501
9502 (define-public python-prettytable
9503 (package
9504 (name "python-prettytable")
9505 (version "0.7.2")
9506 (source
9507 (origin
9508 (method url-fetch)
9509 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9510 (sha256
9511 (base32
9512 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9513 (build-system python-build-system)
9514 (home-page "https://code.google.com/archive/p/prettytable/")
9515 (synopsis "Display tabular data in an ASCII table format")
9516 (description
9517 "A library designed to represent tabular data in visually appealing ASCII
9518 tables. PrettyTable allows for selection of which columns are to be printed,
9519 independent alignment of columns (left or right justified or centred) and
9520 printing of sub-tables by specifying a row range.")
9521 (license license:bsd-3)))
9522
9523 (define-public python2-prettytable
9524 (package-with-python2 python-prettytable))
9525
9526 (define-public python-curio
9527 (package
9528 (name "python-curio")
9529 (version "1.2")
9530 (source
9531 (origin
9532 (method url-fetch)
9533 (uri (pypi-uri "curio" version))
9534 (sha256
9535 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9536 (build-system python-build-system)
9537 (arguments
9538 `(#:phases
9539 (modify-phases %standard-phases
9540 (replace 'check
9541 (lambda* (#:key inputs outputs #:allow-other-keys)
9542 (add-installed-pythonpath inputs outputs)
9543 (invoke "pytest" "-vv" "-k"
9544 ;; Tries to open an outgoing connection.
9545 "not test_ssl_outgoing"))))))
9546 (native-inputs
9547 `(("python-pytest" ,python-pytest)))
9548 (home-page "https://github.com/dabeaz/curio")
9549 (synopsis "Coroutine-based library for concurrent Python")
9550 (description
9551 "Curio is a coroutine-based library for concurrent Python systems
9552 programming. It provides standard programming abstractions such as as
9553 tasks, sockets, files, locks, and queues.")
9554 (license license:bsd-3)))
9555
9556 (define-public python-tables
9557 (package
9558 (name "python-tables")
9559 (version "3.6.1")
9560 (source
9561 (origin
9562 (method url-fetch)
9563 (uri (pypi-uri "tables" version))
9564 (sha256
9565 (base32
9566 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9567 (modules '((guix build utils)))
9568 (snippet
9569 '(begin
9570 ;; Remove pre-compiled .pyc files from source.
9571 (for-each delete-file-recursively
9572 (find-files "." "__pycache__" #:directories? #t))
9573 (for-each delete-file (find-files "." "\\.pyc$"))
9574 #t))))
9575 (build-system python-build-system)
9576 (arguments
9577 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9578 ;; or "check", so we must override the build and check phases.
9579 #:phases
9580 (modify-phases %standard-phases
9581 (add-after 'unpack 'use-gcc
9582 (lambda _
9583 (substitute* "setup.py"
9584 (("^( +)compiler = new_compiler\\(\\)" line indent)
9585 (string-append line
9586 "\n"
9587 indent
9588 "compiler.set_executables(compiler='gcc',"
9589 "compiler_so='gcc',"
9590 "linker_exe='gcc',"
9591 "linker_so='gcc -shared')")))
9592 #t))
9593 (add-after 'unpack 'disable-tuning
9594 (lambda _
9595 (substitute* "setup.py"
9596 (("cpu_flags = .*")
9597 "cpu_flags = ['sse2']\n"))
9598 #t))
9599 (replace 'build
9600 (lambda* (#:key inputs #:allow-other-keys)
9601 (invoke "python" "setup.py" "build"
9602 (string-append "--hdf5="
9603 (assoc-ref inputs "hdf5")))))
9604 (replace 'check
9605 (lambda* (#:key inputs #:allow-other-keys)
9606 (invoke "python" "setup.py" "check"
9607 (string-append "--hdf5="
9608 (assoc-ref inputs "hdf5"))))))))
9609 (propagated-inputs
9610 `(("python-numexpr" ,python-numexpr)
9611 ("python-numpy" ,python-numpy)))
9612 (native-inputs
9613 `(("python-cython" ,python-cython)
9614 ("pkg-config" ,pkg-config)))
9615 (inputs
9616 `(("hdf5" ,hdf5-1.10)
9617 ("bzip2" ,bzip2)
9618 ("zlib" ,zlib)))
9619 (home-page "https://www.pytables.org/")
9620 (synopsis "Hierarchical datasets for Python")
9621 (description "PyTables is a package for managing hierarchical datasets and
9622 designed to efficiently cope with extremely large amounts of data.")
9623 (license license:bsd-3)))
9624
9625 (define-public python-sniffio
9626 (package
9627 (name "python-sniffio")
9628 (version "1.1.0")
9629 (source
9630 (origin
9631 (method url-fetch)
9632 (uri (pypi-uri "sniffio" version))
9633 (sha256
9634 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9635 (build-system python-build-system)
9636 (arguments
9637 `(#:phases
9638 (modify-phases %standard-phases
9639 (replace 'check
9640 (lambda _
9641 (invoke "pytest" "-vv"))))))
9642 (native-inputs
9643 `(("python-curio" ,python-curio)
9644 ("python-pytest" ,python-pytest)
9645 ("python-pytest-cov" ,python-pytest-cov)))
9646 (home-page "https://github.com/python-trio/sniffio")
9647 (synopsis "Detect which async library a program is running under")
9648 (description "This package detects which async library a program is
9649 running under. It supports multiple async I/O packages, like Trio, and
9650 asyncio.")
9651 ;; Either license applies.
9652 (license (list license:expat license:asl2.0))))
9653
9654 (define-public python-pytest-black
9655 (package
9656 (name "python-pytest-black")
9657 (version "0.3.8")
9658 (source
9659 (origin
9660 (method url-fetch)
9661 (uri (pypi-uri "pytest-black" version))
9662 (sha256
9663 (base32
9664 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9665 (build-system python-build-system)
9666 (propagated-inputs
9667 `(("python-pytest" ,python-pytest)
9668 ("python-black" ,python-black)
9669 ("python-toml" ,python-toml)))
9670 (native-inputs
9671 `(("python-setuptools-scm" ,python-setuptools-scm)))
9672 (home-page "https://github.com/shopkeep/pytest-black")
9673 (synopsis "Pytest plugin to enable format checking with black")
9674 (description
9675 "This package provides a pytest plugin to enable format checking with the
9676 Python code formatter \"black\".")
9677 (license license:expat)))
9678
9679 (define-public python-get-version
9680 (package
9681 (name "python-get-version")
9682 (version "2.1")
9683 (source
9684 (origin
9685 (method url-fetch)
9686 (uri (pypi-uri "get_version" version))
9687 (sha256
9688 (base32
9689 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9690 (build-system python-build-system)
9691 (propagated-inputs
9692 `(("python-pygments" ,python-pygments)
9693 ("python-pytest" ,python-pytest)
9694 ("python-pytest-black" ,python-pytest-black)
9695 ("python-pytest-cov" ,python-pytest-cov)
9696 ("python-setuptools" ,python-setuptools)
9697 ("python-testpath" ,python-testpath)))
9698 (home-page "https://github.com/flying-sheep/get_version")
9699 (synopsis "Version helper in the spirit of versioneer")
9700 (description
9701 "This package provides a version helper that lets you automatically use
9702 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9703 also supports getting the version from Python source distributions or, once
9704 your package is installed, via @code{pkg_resources} (part of
9705 @code{setuptools}).")
9706 (license license:gpl3+)))
9707
9708 (define-public python-legacy-api-wrap
9709 (package
9710 (name "python-legacy-api-wrap")
9711 (version "1.2")
9712 (source
9713 (origin
9714 (method url-fetch)
9715 (uri (pypi-uri "legacy-api-wrap" version))
9716 (sha256
9717 (base32
9718 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9719 (build-system python-build-system)
9720 (propagated-inputs
9721 `(("python-get-version" ,python-get-version)
9722 ("python-pytest" ,python-pytest)
9723 ("python-pytest-black" ,python-pytest-black)
9724 ("python-pytest-cov" ,python-pytest-cov)
9725 ("python-setuptools" ,python-setuptools)))
9726 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9727 (synopsis "Legacy API wrapper")
9728 (description "This module defines a decorator to wrap legacy APIs. The
9729 primary use case is APIs defined before keyword-only parameters existed.")
9730 (license license:gpl3+)))
9731
9732 (define-public python-pyasn1
9733 (package
9734 (name "python-pyasn1")
9735 (version "0.4.8")
9736 (source
9737 (origin
9738 (method url-fetch)
9739 (uri (pypi-uri "pyasn1" version))
9740 (sha256
9741 (base32
9742 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9743 (build-system python-build-system)
9744 (home-page "http://pyasn1.sourceforge.net/")
9745 (synopsis "ASN.1 types and codecs")
9746 (description
9747 "This is an implementation of ASN.1 types and codecs in Python. It is
9748 suitable for a wide range of protocols based on the ASN.1 specification.")
9749 (license license:bsd-2)))
9750
9751 (define-public python2-pyasn1
9752 (package-with-python2 python-pyasn1))
9753
9754 (define-public python-pyasn1-modules
9755 (package
9756 (name "python-pyasn1-modules")
9757 (version "0.2.2")
9758 (source
9759 (origin
9760 (method url-fetch)
9761 (uri (pypi-uri "pyasn1-modules" version))
9762 (sha256
9763 (base32
9764 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9765 (build-system python-build-system)
9766 (propagated-inputs
9767 `(("python-pyasn1" ,python-pyasn1)))
9768 (home-page "https://sourceforge.net/projects/pyasn1/")
9769 (synopsis "ASN.1 codec implementations")
9770 (description
9771 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9772 implementations of ASN.1-based codecs and protocols.")
9773 (license license:bsd-3)))
9774
9775 (define-public python2-pyasn1-modules
9776 (package-with-python2 python-pyasn1-modules))
9777
9778 (define-public python-ipaddress
9779 (package
9780 (name "python-ipaddress")
9781 (version "1.0.23")
9782 (source (origin
9783 (method url-fetch)
9784 (uri (pypi-uri "ipaddress" version))
9785 (sha256
9786 (base32
9787 "1qp743h30s04m3cg3yk3fycad930jv17q7dsslj4mfw0jlvf1y5p"))))
9788 (build-system python-build-system)
9789 (home-page "https://github.com/phihag/ipaddress")
9790 (synopsis "IP address manipulation library")
9791 (description
9792 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9793 in Python. This library is used to create, poke at, and manipulate IPv4 and
9794 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9795 module to older versions of Python.")
9796 (license license:psfl)))
9797
9798 (define-public python2-ipaddress
9799 (package-with-python2 python-ipaddress))
9800
9801 (define-public python2-ipaddr
9802 (package
9803 (name "python2-ipaddr")
9804 (version "2.1.11")
9805 (source
9806 (origin
9807 (method url-fetch)
9808 (uri (pypi-uri "ipaddr" version))
9809 (sha256
9810 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9811 (build-system python-build-system)
9812 (arguments
9813 `(#:python ,python-2 ;version 2 only
9814 #:phases
9815 (modify-phases %standard-phases
9816 (replace 'check
9817 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9818 (home-page "https://github.com/google/ipaddr-py")
9819 (synopsis "IP address manipulation library")
9820 (description
9821 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9822 IPv6 addresses and networks.
9823
9824 For new implementations you may prefer to use the standard module
9825 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9826 versions of Python.")
9827 (license license:asl2.0)))
9828
9829 (define-public python-idna
9830 (package
9831 (name "python-idna")
9832 (version "2.10")
9833 (source
9834 (origin
9835 (method url-fetch)
9836 (uri (pypi-uri "idna" version))
9837 (sha256
9838 (base32
9839 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9840 (build-system python-build-system)
9841 (home-page "https://github.com/kjd/idna")
9842 (synopsis "Internationalized domain names in applications")
9843 (description
9844 "This is a library to support the Internationalised Domain Names in
9845 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9846 protocol is often referred to as “IDNA2008” and can produce different results
9847 from the earlier standard from 2003. The library is also intended to act as a
9848 suitable drop-in replacement for the “encodings.idna” module that comes with
9849 the Python standard library but currently only supports the older 2003
9850 specification.")
9851 (license license:bsd-4)))
9852
9853 (define-public python-idna-2.7
9854 (package (inherit python-idna)
9855 (version "2.7")
9856 (source (origin
9857 (method url-fetch)
9858 (uri (pypi-uri "idna" version))
9859 (sha256
9860 (base32
9861 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9862
9863
9864 (define-public python2-idna
9865 (package-with-python2 python-idna))
9866
9867 (define-public python-libsass
9868 (package
9869 (name "python-libsass")
9870 (version "0.20.1")
9871 (source
9872 (origin
9873 ;; PyPI tarball is missing some test files.
9874 (method git-fetch)
9875 (uri (git-reference
9876 (url "https://github.com/sass/libsass-python")
9877 (commit version)))
9878 (file-name (git-file-name name version))
9879 (sha256
9880 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9881 (build-system python-build-system)
9882 (arguments
9883 `(#:phases
9884 (modify-phases %standard-phases
9885 ;; Use Guix package of libsass instead of compiling from a checkout.
9886 (add-before 'build 'set-libsass
9887 (lambda _
9888 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9889 #t))
9890 (replace 'check
9891 (lambda* (#:key inputs outputs #:allow-other-keys)
9892 (add-installed-pythonpath inputs outputs)
9893 (invoke "pytest" "sasstests.py"))))))
9894 (native-inputs
9895 `(("python-pytest" ,python-pytest)
9896 ("python-werkzeug" ,python-werkzeug)))
9897 (inputs
9898 `(("libsass" ,libsass)))
9899 (propagated-inputs
9900 `(("python-six" ,python-six)))
9901 (home-page "https://sass.github.io/libsass-python/")
9902 (synopsis "Straightforward binding of libsass for Python")
9903 (description
9904 "This package provides a simple Python extension module @code{sass} which
9905 is binding LibSass.")
9906 (license license:expat)))
9907
9908 (define-public python-idna-ssl
9909 (package
9910 (name "python-idna-ssl")
9911 (version "1.0.1")
9912 (source
9913 (origin
9914 (method url-fetch)
9915 (uri (pypi-uri "idna-ssl" version))
9916 (sha256
9917 (base32
9918 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9919 (build-system python-build-system)
9920 (arguments
9921 `(#:tests? #f)) ;circular dependency with python-aiohttp
9922 (home-page "https://github.com/aio-libs/idna-ssl")
9923 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9924 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9925 domains support.")
9926 (license license:expat)))
9927
9928 (define-public python-pretend
9929 (package
9930 (name "python-pretend")
9931 (version "1.0.9")
9932 (source
9933 (origin
9934 (method url-fetch)
9935 (uri (pypi-uri "pretend" version))
9936 (sha256
9937 (base32
9938 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9939 (build-system python-build-system)
9940 (home-page "https://github.com/alex/pretend")
9941 (synopsis "Library for stubbing in Python")
9942 (description
9943 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9944 technique for writing tests. You may hear the term mixed up with mocks,
9945 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9946 responses, rather than doing any computation.")
9947 (license license:bsd-3)))
9948
9949 (define-public python2-pretend
9950 (package-with-python2 python-pretend))
9951
9952 (define-public python-pip
9953 (package
9954 (name "python-pip")
9955 (version "20.2.4")
9956 (source
9957 (origin
9958 (method url-fetch)
9959 (uri (pypi-uri "pip" version))
9960 (sha256
9961 (base32
9962 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
9963 (build-system python-build-system)
9964 (arguments
9965 '(#:tests? #f)) ; there are no tests in the pypi archive.
9966 (home-page "https://pip.pypa.io/")
9967 (synopsis "Package manager for Python software")
9968 (description
9969 "Pip is a package manager for Python software, that finds packages on the
9970 Python Package Index (PyPI).")
9971 (license license:expat)))
9972
9973 (define-public python2-pip
9974 (package-with-python2 python-pip))
9975
9976 (define-public python-tlsh
9977 (package
9978 (name "python-tlsh")
9979 (version "3.4.5")
9980 (home-page "https://github.com/trendmicro/tlsh")
9981 (source
9982 (origin
9983 (method git-fetch)
9984 (uri (git-reference
9985 (url "https://github.com/trendmicro/tlsh")
9986 (commit (string-append "v" version))))
9987 (file-name (git-file-name name version))
9988 (sha256
9989 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9990 (build-system cmake-build-system)
9991 (arguments
9992 '(#:out-of-source? #f
9993 #:phases (modify-phases %standard-phases
9994 (replace
9995 'install
9996 (lambda* (#:key outputs #:allow-other-keys)
9997 ;; Build and install the Python bindings. The underlying
9998 ;; C++ library is apparently not meant to be installed.
9999 (let ((out (assoc-ref outputs "out")))
10000 (with-directory-excursion "py_ext"
10001 (and (system* "python" "setup.py" "build")
10002 (system* "python" "setup.py" "install"
10003 (string-append "--prefix=" out))))))))))
10004 (inputs `(("python" ,python-wrapper))) ;for the bindings
10005 (synopsis "Fuzzy matching library for Python")
10006 (description
10007 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
10008 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
10009 value which can be used for similarity comparisons. Similar objects have
10010 similar hash values, which allows for the detection of similar objects by
10011 comparing their hash values. The byte stream should have a sufficient amount
10012 of complexity; for example, a byte stream of identical bytes will not generate
10013 a hash value.")
10014 (license license:asl2.0)))
10015
10016 (define-public python2-tlsh
10017 (package/inherit python-tlsh
10018 (name "python2-tlsh")
10019 (inputs `(("python" ,python-2)))))
10020
10021 (define-public python-termcolor
10022 (package
10023 (name "python-termcolor")
10024 (version "1.1.0")
10025 (source
10026 (origin
10027 (method url-fetch)
10028 (uri (pypi-uri "termcolor" version))
10029 (sha256
10030 (base32
10031 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
10032 (build-system python-build-system)
10033 (arguments
10034 ;; There are no tests.
10035 `(#:tests? #f))
10036 (home-page "https://pypi.org/project/termcolor/")
10037 (synopsis "ANSII Color formatting for terminal output")
10038 (description
10039 "This package provides ANSII Color formatting for output in terminals.")
10040 (license license:expat)))
10041
10042 (define-public python2-termcolor
10043 (package-with-python2 python-termcolor))
10044
10045 (define-public python-terminaltables
10046 (package
10047 (name "python-terminaltables")
10048 (version "3.1.0")
10049 (source
10050 (origin
10051 (method url-fetch)
10052 (uri (pypi-uri "terminaltables" version))
10053 (sha256
10054 (base32
10055 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
10056 (build-system python-build-system)
10057 (home-page "https://github.com/Robpol86/terminaltables")
10058 (synopsis
10059 "Generate simple tables in terminals from a nested list of strings")
10060 (description
10061 "This package makes it easy to draw tables in terminal/console
10062 applications from a list of lists of strings. It supports multi-line rows.")
10063 (license license:expat)))
10064
10065 (define-public python-libarchive-c
10066 (package
10067 (name "python-libarchive-c")
10068 (version "2.9")
10069 (source (origin
10070 (method url-fetch)
10071 (uri (pypi-uri "libarchive-c" version))
10072 (sha256
10073 (base32
10074 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
10075 (build-system python-build-system)
10076 (arguments
10077 '(#:phases (modify-phases %standard-phases
10078 (add-before
10079 'build 'reference-libarchive
10080 (lambda* (#:key inputs #:allow-other-keys)
10081 ;; Retain the absolute file name of libarchive.so.
10082 (let ((libarchive (assoc-ref inputs "libarchive")))
10083 (substitute* "libarchive/ffi.py"
10084 (("find_library\\('archive'\\)")
10085 (string-append "'" libarchive
10086 "/lib/libarchive.so'"))))))
10087 (replace 'check
10088 (lambda _ (invoke "pytest" "-vv"))))))
10089 (native-inputs
10090 `(("python-mock" ,python-mock)
10091 ("python-pytest" ,python-pytest)))
10092 (inputs
10093 `(("libarchive" ,libarchive)))
10094 (home-page "https://github.com/Changaco/python-libarchive-c")
10095 (synopsis "Python interface to libarchive")
10096 (description
10097 "This package provides Python bindings to libarchive, a C library to
10098 access possibly compressed archives in many different formats. It uses
10099 Python's @code{ctypes} foreign function interface (FFI).")
10100 (license license:lgpl2.0+)))
10101
10102 (define-public python2-libarchive-c
10103 (package-with-python2 python-libarchive-c))
10104
10105 (define-public python-file
10106 (package/inherit file
10107 (name "python-file")
10108 (build-system python-build-system)
10109 (arguments
10110 '(#:tests? #f ;no tests
10111 #:configure-flags '("--single-version-externally-managed" "--root=/")
10112 #:phases (modify-phases %standard-phases
10113 (add-before 'build 'change-directory
10114 (lambda _
10115 (chdir "python")
10116 #t))
10117 (add-before 'build 'set-library-file-name
10118 (lambda* (#:key inputs #:allow-other-keys)
10119 (let ((file (assoc-ref inputs "file")))
10120 (substitute* "magic.py"
10121 (("find_library\\('magic'\\)")
10122 (string-append "'" file "/lib/libmagic.so'")))
10123 #t))))))
10124 (inputs `(("file" ,file)))
10125 (native-inputs (if (%current-target-system)
10126 `(("self" ,this-package))
10127 '()))
10128 (synopsis "Python bindings to the libmagic file type guesser")
10129 (description "This package provides Python bindings to the libmagic file
10130 type guesser.
10131
10132 Note that this module and the @code{python-magic} module both provide a
10133 @file{magic.py} file; these two modules, which are different and were
10134 developed separately, both serve the same purpose: provide Python bindings for
10135 libmagic.")))
10136
10137 (define-public python2-file
10138 (package-with-python2 python-file))
10139
10140 (define-public python-debian
10141 (package
10142 (name "python-debian")
10143 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
10144 (version "0.1.36")
10145 (source
10146 (origin
10147 ;; Use git-fetch, as pypi doesn't include test suite.
10148 (method git-fetch)
10149 (uri (git-reference
10150 (url home-page)
10151 (commit version)))
10152 (file-name (git-file-name name version))
10153 (sha256
10154 (base32
10155 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
10156 (build-system python-build-system)
10157 (arguments
10158 `(#:phases (modify-phases %standard-phases
10159 (add-after 'unpack 'remove-debian-specific-tests
10160 ;; python-apt, apt and dpkg are not yet available in guix,
10161 ;; and these tests heavily depend on them.
10162 (lambda _
10163 (delete-file "lib/debian/tests/test_deb822.py")
10164 (delete-file "lib/debian/tests/test_debfile.py")
10165 #t)))))
10166 (propagated-inputs
10167 `(("python-six" ,python-six)
10168 ("python-chardet" ,python-chardet)))
10169 (synopsis "Debian package related modules")
10170 (description
10171 ;; XXX: Use @enumerate instead of @itemize to work around
10172 ;; <http://bugs.gnu.org/21772>.
10173 "This package provides Python modules that abstract many formats of
10174 Debian-related files, such as:
10175
10176 @enumerate
10177 @item Debtags information;
10178 @item @file{debian/changelog} files;
10179 @item packages files, pdiffs;
10180 @item control files of single or multiple RFC822-style paragraphs---e.g.
10181 @file{debian/control}, @file{.changes}, @file{.dsc};
10182 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
10183 contained files and meta-information.
10184 @end enumerate\n")
10185
10186 ;; Modules are either GPLv2+ or GPLv3+.
10187 (license license:gpl3+)))
10188
10189 (define-public python-nbformat
10190 (package
10191 (name "python-nbformat")
10192 (version "4.4.0")
10193 (source
10194 (origin
10195 (method url-fetch)
10196 (uri (pypi-uri "nbformat" version))
10197 (sha256
10198 (base32
10199 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
10200 (build-system python-build-system)
10201 (arguments `(#:tests? #f)) ; no test target
10202 (propagated-inputs
10203 `(("python-ipython-genutils" ,python-ipython-genutils)
10204 ("python-jsonschema" ,python-jsonschema)
10205 ("python-jupyter-core" ,python-jupyter-core)
10206 ("python-traitlets" ,python-traitlets)))
10207 (home-page "https://jupyter.org")
10208 (synopsis "Jupyter Notebook format")
10209 (description "This package provides the reference implementation of the
10210 Jupyter Notebook format and Python APIs for working with notebooks.")
10211 (license license:bsd-3)))
10212
10213 (define-public python2-nbformat
10214 (package-with-python2 python-nbformat))
10215
10216 (define-public python-bleach
10217 (package
10218 (name "python-bleach")
10219 (version "3.1.5")
10220 (source
10221 (origin
10222 (method url-fetch)
10223 (uri (pypi-uri "bleach" version))
10224 (sha256
10225 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
10226 (build-system python-build-system)
10227 (propagated-inputs
10228 `(("python-webencodings" ,python-webencodings)
10229 ("python-six" ,python-six)))
10230 (native-inputs
10231 `(("python-datrie" ,python-datrie)
10232 ("python-genshi" ,python-genshi)
10233 ("python-lxml" ,python-lxml)
10234 ("python-pytest" ,python-pytest)))
10235 (home-page "https://github.com/mozilla/bleach")
10236 (synopsis "Whitelist-based HTML-sanitizing tool")
10237 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
10238 (license license:asl2.0)))
10239
10240 (define-public python2-bleach
10241 (package-with-python2 python-bleach))
10242
10243 (define-public python-entrypoints
10244 (package
10245 (name "python-entrypoints")
10246 (version "0.3")
10247 (source
10248 (origin
10249 (method url-fetch)
10250 (uri (pypi-uri "entrypoints" version))
10251 (sha256
10252 (base32
10253 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
10254 (build-system python-build-system)
10255 ;; The package does not come with a setup.py file, so we have to generate
10256 ;; one ourselves.
10257 (arguments
10258 `(#:tests? #f
10259 #:phases
10260 (modify-phases %standard-phases
10261 (add-after 'unpack 'create-setup.py
10262 (lambda _
10263 (call-with-output-file "setup.py"
10264 (lambda (port)
10265 (format port "\
10266 from setuptools import setup
10267 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
10268 " ,version))))))))
10269 (home-page "https://github.com/takluyver/entrypoints")
10270 (synopsis "Discover and load entry points from installed Python packages")
10271 (description "Entry points are a way for Python packages to advertise
10272 objects with some common interface. The most common examples are
10273 @code{console_scripts} entry points, which define shell commands by
10274 identifying a Python function to run. The @code{entrypoints} module contains
10275 functions to find and load entry points.")
10276 (license license:expat)))
10277
10278 (define-public python2-entrypoints
10279 (package-with-python2 python-entrypoints))
10280
10281 (define-public python-epc
10282 (package
10283 (name "python-epc")
10284 (version "0.0.5")
10285 (source
10286 (origin
10287 (method url-fetch)
10288 (uri (pypi-uri "epc" version))
10289 (sha256
10290 (base32
10291 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
10292 (build-system python-build-system)
10293 (propagated-inputs
10294 `(("python-sexpdata" ,python-sexpdata)))
10295 (native-inputs
10296 `(("python-nose" ,python-nose)))
10297 (home-page "https://github.com/tkf/python-epc")
10298 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
10299 (description
10300 "Python-EPC can call elisp functions from Python and Python functions
10301 from elisp.")
10302 (license license:gpl3)))
10303
10304 (define-public python-forex-python
10305 (package
10306 (name "python-forex-python")
10307 (version "1.5")
10308 (source
10309 (origin
10310 (method url-fetch)
10311 (uri (pypi-uri "forex-python" version))
10312 (sha256
10313 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
10314 (build-system python-build-system)
10315 (arguments
10316 ;; Tests are not included in the PyPI tarball. Also, the tests in the
10317 ;; repository require online data.
10318 `(#:tests? #f))
10319 (propagated-inputs
10320 `(("python-requests" ,python-requests)
10321 ("python-simplejson" ,python-simplejson)))
10322 (home-page "https://github.com/MicroPyramid/forex-python")
10323 (synopsis "Foreign exchange rates and currency conversion")
10324 (description
10325 "@code{python-forex-python} can be used to manipulate foreign
10326 exchange rates and to operate currency conversions.
10327
10328 Features:
10329 @itemize
10330 @item List all currency rates.
10331 @item BitCoin price for all currencies.
10332 @item Converting amount to BitCoins.
10333 @item Get historical rates for any day since 1999.
10334 @item Conversion rate for one currency(ex; USD to INR).
10335 @item Convert amount from one currency to other.('USD 10$' to INR).
10336 @item Currency symbols.
10337 @item Currency names.
10338 @end itemize")
10339 (license license:expat)))
10340
10341 (define-public python-simpleeval
10342 (package
10343 (name "python-simpleeval")
10344 (version "0.9.10")
10345 (source
10346 (origin
10347 (method url-fetch)
10348 (uri (pypi-uri "simpleeval" version))
10349 (sha256
10350 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
10351 (build-system python-build-system)
10352 (home-page "https://github.com/danthedeckie/simpleeval")
10353 (synopsis "Simple, safe single expression evaluator library")
10354 (description
10355 "This package provides a quick single file library for easily adding
10356 evaluatable expressions into python projects. Say you want to allow a user
10357 to set an alarm volume, which could depend on the time of day, alarm level,
10358 how many previous alarms had gone off, and if there is music playing at the
10359 time.")
10360 (license license:expat)))
10361
10362 (define-public python-nbconvert
10363 (package
10364 (name "python-nbconvert")
10365 (version "5.0.0b1")
10366 (source
10367 (origin
10368 (method url-fetch)
10369 (uri (pypi-uri "nbconvert" version))
10370 (sha256
10371 (base32
10372 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
10373 (build-system python-build-system)
10374 (arguments
10375 `(;; The "bdist_egg" target is disabled by default, causing the installation
10376 ;; to fail.
10377 #:configure-flags (list "bdist_egg")
10378 ;; FIXME: 5 failures, 40 errors.
10379 #:tests? #f))
10380 ;; #:phases
10381 ;; (modify-phases %standard-phases
10382 ;; (replace 'check
10383 ;; (lambda _
10384 ;; (zero? (system* "py.test" "-v")))))
10385 (native-inputs
10386 `(("python-pytest" ,python-pytest)))
10387 (propagated-inputs
10388 `(("python-bleach" ,python-bleach)
10389 ("python-entrypoints" ,python-entrypoints)
10390 ("python-jinja2" ,python-jinja2)
10391 ("python-jupyter-core" ,python-jupyter-core)
10392 ("python-mistune" ,python-mistune)
10393 ("python-nbformat" ,python-nbformat)
10394 ("python-pygments" ,python-pygments)
10395 ("python-traitlets" ,python-traitlets)))
10396 (home-page "https://jupyter.org")
10397 (synopsis "Converting Jupyter Notebooks")
10398 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
10399 notebooks to various other formats via Jinja templates. It allows you to
10400 convert an @code{.ipynb} notebook file into various static formats including:
10401
10402 @enumerate
10403 @item HTML
10404 @item LaTeX
10405 @item PDF
10406 @item Reveal JS
10407 @item Markdown (md)
10408 @item ReStructured Text (rst)
10409 @item executable script
10410 @end enumerate\n")
10411 (license license:bsd-3)))
10412
10413 (define-public python2-nbconvert
10414 (package-with-python2 python-nbconvert))
10415
10416 (define-public python-notebook
10417 (package
10418 (name "python-notebook")
10419 (version "6.3.0")
10420 (source (origin
10421 (method url-fetch)
10422 (uri (pypi-uri "notebook" version))
10423 (sha256
10424 (base32
10425 "0zfwr87ndjzmdp9adpc9lby1hdqdkjp2q7c9vff3wiw1dj6kkjfb"))))
10426 (build-system python-build-system)
10427 (arguments
10428 `(#:phases
10429 (modify-phases %standard-phases
10430 (replace 'check
10431 (lambda _
10432 ;; These tests require a browser
10433 (delete-file-recursively "notebook/tests/selenium")
10434 ;; Some tests need HOME
10435 (setenv "HOME" "/tmp")
10436 ;; This file contains "warningfilters", which are not supported
10437 ;; by this version of nose.
10438 (delete-file "setup.cfg")
10439 (with-directory-excursion "/tmp"
10440 (invoke "nosetests" "-v"))
10441 #t)))))
10442 (propagated-inputs
10443 `(("python-jupyter-core" ,python-jupyter-core)
10444 ("python-nbformat" ,python-nbformat)
10445 ("python-nbconvert" ,python-nbconvert)
10446 ("python-prometheus-client" ,python-prometheus-client)
10447 ("python-send2trash" ,python-send2trash)
10448 ("python-terminado" ,python-terminado)))
10449 (native-inputs
10450 `(("python-nose" ,python-nose)
10451 ("python-sphinx" ,python-sphinx)
10452 ("python-requests" ,python-requests)))
10453 (home-page "https://jupyter.org/")
10454 (synopsis "Web-based notebook environment for interactive computing")
10455 (description
10456 "The Jupyter HTML notebook is a web-based notebook environment for
10457 interactive computing.")
10458 (properties `((python2-variant . ,(delay python2-notebook))))
10459 (license license:bsd-3)))
10460
10461 (define-public python2-notebook
10462 (let ((base (package-with-python2
10463 (strip-python2-variant python-notebook))))
10464 (package/inherit base
10465 (native-inputs
10466 `(("python2-mock" ,python2-mock)
10467 ,@(package-native-inputs base)))
10468 (arguments
10469 (substitute-keyword-arguments (package-arguments base)
10470 ((#:phases phases)
10471 `(modify-phases ,phases
10472 (add-before 'check 'disable-test-case
10473 ;; The test requires network access to localhost. Curiously it
10474 ;; fails with Python 2 only. Simply make the test-case return
10475 ;; immediately.
10476 (lambda _
10477 (substitute*
10478 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
10479 (("formats = self.nbconvert_api") "return #")))))))))))
10480
10481 (define-public python-widgetsnbextension
10482 (package
10483 (name "python-widgetsnbextension")
10484 (version "3.5.1")
10485 (source
10486 (origin
10487 (method url-fetch)
10488 (uri (pypi-uri "widgetsnbextension" version))
10489 (sha256
10490 (base32
10491 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10492 (build-system python-build-system)
10493 (propagated-inputs
10494 `(("python-argon2-cffi" ,python-argon2-cffi)
10495 ("python-ipykernel" ,python-ipykernel)
10496 ("python-notebook" ,python-notebook)
10497 ("python-terminado" ,python-terminado)))
10498 (native-inputs
10499 `(("python-certifi" ,python-certifi)
10500 ("python-nose" ,python-nose)))
10501 (home-page "https://ipython.org")
10502 (synopsis "IPython HTML widgets for Jupyter")
10503 (description "This package provides interactive HTML widgets for Jupyter
10504 notebooks.")
10505 (license license:bsd-3)))
10506
10507 (define-public python-ipywidgets
10508 (package
10509 (name "python-ipywidgets")
10510 (version "7.5.1")
10511 (source
10512 (origin
10513 (method url-fetch)
10514 (uri (pypi-uri "ipywidgets" version))
10515 (sha256
10516 (base32
10517 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10518 (build-system python-build-system)
10519 (propagated-inputs
10520 `(("python-ipython" ,python-ipython)
10521 ("python-traitlets" ,python-traitlets)
10522 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10523 (native-inputs
10524 `(("python-nose" ,python-nose)
10525 ("python-pytest" ,python-pytest)))
10526 (home-page "https://ipython.org")
10527 (synopsis "IPython HTML widgets for Jupyter")
10528 (description "Ipywidgets are interactive HTML widgets for Jupyter
10529 notebooks and the IPython kernel. Notebooks come alive when interactive
10530 widgets are used. Users gain control of their data and can visualize changes
10531 in the data.")
10532 (license license:bsd-3)))
10533
10534 (define-public python-jupyter-console
10535 (package
10536 (name "python-jupyter-console")
10537 (version "6.1.0")
10538 (source
10539 (origin
10540 (method url-fetch)
10541 (uri (pypi-uri "jupyter_console" version))
10542 (sha256
10543 (base32
10544 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10545 (build-system python-build-system)
10546 (propagated-inputs
10547 `(("python-ipykernel" ,python-ipykernel)
10548 ("python-jupyter-client" ,python-jupyter-client)
10549 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10550 ("python-pygments" ,python-pygments)))
10551 (native-inputs
10552 `(("python-nose" ,python-nose)))
10553 (home-page "https://jupyter.org")
10554 (synopsis "Jupyter terminal console")
10555 (description "This package provides a terminal-based console frontend for
10556 Jupyter kernels. It also allows for console-based interaction with non-Python
10557 Jupyter kernels such as IJulia and IRKernel.")
10558 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10559 (license license:bsd-3)))
10560
10561 (define-public python2-jupyter-console
10562 (package
10563 (name "python2-jupyter-console")
10564 (version "5.2.0")
10565 (source
10566 (origin
10567 (method url-fetch)
10568 (uri (pypi-uri "jupyter_console" version))
10569 (sha256
10570 (base32
10571 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10572 (build-system python-build-system)
10573 (arguments
10574 `(#:python ,python-2
10575 #:tests? #f)) ; Tests only run in a TTY.
10576 (propagated-inputs
10577 `(("python2-ipykernel" ,python2-ipykernel)
10578 ("python2-jupyter-client" ,python2-jupyter-client)
10579 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10580 ("python2-pygments" ,python2-pygments)))
10581 (native-inputs
10582 `(("python2-nose" ,python2-nose)))
10583 (home-page "https://jupyter.org")
10584 (synopsis "Jupyter terminal console")
10585 (description "This package provides a terminal-based console frontend for
10586 Jupyter kernels. It also allows for console-based interaction with non-Python
10587 Jupyter kernels such as IJulia and IRKernel.")
10588 (license license:bsd-3)))
10589
10590 ;; The python-ipython and python-jupyter-console require each other. To get
10591 ;; the functionality in both packages working, strip down the
10592 ;; python-jupyter-console package when using it as an input to python-ipython.
10593 (define python-jupyter-console-minimal
10594 (package/inherit python-jupyter-console
10595 (name "python-jupyter-console-minimal")
10596 (arguments
10597 (substitute-keyword-arguments
10598 (package-arguments python-jupyter-console)
10599 ((#:phases phases)
10600 `(modify-phases ,phases
10601 (add-after 'install 'delete-bin
10602 (lambda* (#:key outputs #:allow-other-keys)
10603 ;; Delete the bin files, to avoid conflicts in profiles
10604 ;; where python-ipython and python-jupyter-console are
10605 ;; both present.
10606 (delete-file-recursively
10607 (string-append
10608 (assoc-ref outputs "out") "/bin"))))))))
10609 ;; Remove the python-ipython propagated input, to avoid the cycle
10610 (propagated-inputs
10611 (alist-delete
10612 "python-ipython"
10613 (package-propagated-inputs python-jupyter-console)))))
10614
10615 (define-public python-qtconsole
10616 (package
10617 (name "python-qtconsole")
10618 (version "4.4.3")
10619 (source
10620 (origin
10621 (method url-fetch)
10622 (uri (pypi-uri "qtconsole" version))
10623 (sha256
10624 (base32
10625 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10626 (build-system python-build-system)
10627 (arguments
10628 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10629 ;; but we only have the LTS version 5.x. This means that there might be
10630 ;; runtime errors, but since this is a dependency of the Jupyter package,
10631 ;; and Jupyter can be used without the qtconsole we can overlook this for
10632 ;; now.
10633 `(#:tests? #f
10634 #:phases
10635 (modify-phases %standard-phases
10636 (add-before 'check 'pre-check
10637 (lambda _
10638 (setenv "QT_QPA_PLATFORM" "offscreen")
10639 #t)))))
10640 (propagated-inputs
10641 `(("python-ipykernel" ,python-ipykernel)
10642 ("python-ipython" ,python-ipython)))
10643 (native-inputs
10644 `(("python-pytest" ,python-pytest)))
10645 (home-page "https://jupyter.org")
10646 (synopsis "Jupyter Qt console")
10647 (description "This package provides a Qt-based console for Jupyter with
10648 support for rich media output.")
10649 (license license:bsd-3)))
10650
10651 (define-public python-jsbeautifier
10652 (package
10653 (name "python-jsbeautifier")
10654 (version "1.10.2")
10655 (home-page "https://github.com/beautify-web/js-beautify")
10656 (source (origin
10657 (method git-fetch)
10658 (uri (git-reference
10659 (url home-page)
10660 (commit (string-append "v" version))))
10661 (file-name (git-file-name name version))
10662 (sha256
10663 (base32
10664 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10665 (build-system python-build-system)
10666 (arguments
10667 `(#:phases (modify-phases %standard-phases
10668 (add-after 'unpack 'chdir
10669 (lambda _
10670 ;; The upstream Git repository contains all the code,
10671 ;; but this package only builds the python code.
10672 (chdir "python")
10673 #t))
10674 (add-after 'unpack 'patch-python-six-requirements
10675 (lambda _
10676 (substitute* "python/setup.py"
10677 (("six>=1.12.0")
10678 "six>=1.11.0"))
10679 #t)))))
10680 (propagated-inputs
10681 `(("python-editorconfig" ,python-editorconfig)
10682 ("python-six" ,python-six)))
10683 (native-inputs
10684 `(("python-pytest" ,python-pytest)))
10685 (synopsis "JavaScript unobfuscator and beautifier")
10686 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10687 popular online obfuscators.")
10688 (license license:expat)))
10689
10690 (define-public jupyter
10691 (package
10692 (name "jupyter")
10693 (version "1.0.0")
10694 (source
10695 (origin
10696 (method url-fetch)
10697 (uri (pypi-uri "jupyter" version))
10698 (sha256
10699 (base32
10700 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10701 (build-system python-build-system)
10702 (arguments '(#:tests? #f)) ; there are none.
10703 (propagated-inputs
10704 `(("python-ipykernel" ,python-ipykernel)
10705 ("python-ipywidgets" ,python-ipywidgets)
10706 ("python-jupyter-console" ,python-jupyter-console)
10707 ("python-nbconvert" ,python-nbconvert)
10708 ("python-notebook" ,python-notebook)
10709 ("python-qtconsole" ,python-qtconsole)))
10710 (native-search-paths
10711 (list (search-path-specification
10712 (variable "JUPYTER_PATH")
10713 (files '("share/jupyter")))))
10714 (home-page "https://jupyter.org")
10715 (synopsis "Web application for interactive documents")
10716 (description
10717 "The Jupyter Notebook is a web application that allows you to create and
10718 share documents that contain live code, equations, visualizations and
10719 explanatory text. Uses include: data cleaning and transformation, numerical
10720 simulation, statistical modeling, machine learning and much more.")
10721 (license license:bsd-3)))
10722
10723 (define-public python-chardet
10724 (package
10725 (name "python-chardet")
10726 (version "3.0.4")
10727 (source
10728 (origin
10729 (method url-fetch)
10730 (uri (pypi-uri "chardet" version))
10731 (sha256
10732 (base32
10733 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10734 (native-inputs
10735 `(("python-hypothesis" ,python-hypothesis)
10736 ("python-pytest" ,python-pytest)
10737 ("python-pytest-runner" ,python-pytest-runner)))
10738 (build-system python-build-system)
10739 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10740 (arguments `(#:tests? #f))
10741 (home-page "https://github.com/chardet/chardet")
10742 (synopsis "Universal encoding detector for Python 2 and 3")
10743 (description
10744 "This package provides @code{chardet}, a Python module that can
10745 automatically detect a wide range of file encodings.")
10746 (license license:lgpl2.1+)))
10747
10748 (define-public python2-chardet
10749 (package-with-python2 python-chardet))
10750
10751 (define-public python-docopt
10752 (package
10753 (name "python-docopt")
10754 (version "0.6.2")
10755 (source
10756 (origin
10757 (method git-fetch)
10758 ;; The release on PyPI does not include tests.
10759 (uri (git-reference
10760 (url "https://github.com/docopt/docopt")
10761 (commit version)))
10762 (file-name (git-file-name name version))
10763 (sha256
10764 (base32
10765 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10766 (build-system python-build-system)
10767 (native-inputs
10768 `(("python-pytest" ,python-pytest)))
10769 (arguments
10770 `(#:phases
10771 (modify-phases %standard-phases
10772 (replace 'check
10773 (lambda _ (invoke "py.test"))))))
10774 (home-page "http://docopt.org")
10775 (synopsis "Command-line interface description language for Python")
10776 (description "This library allows the user to define a command-line
10777 interface from a program's help message rather than specifying it
10778 programmatically with command-line parsers like @code{getopt} and
10779 @code{argparse}.")
10780 (license license:expat)))
10781
10782 (define-public python2-docopt
10783 (package-with-python2 python-docopt))
10784
10785 (define-public python-pythondialog
10786 (package
10787 (name "python-pythondialog")
10788 (version "3.4.0")
10789 (source
10790 (origin
10791 (method url-fetch)
10792 (uri (pypi-uri "pythondialog" version))
10793 (sha256
10794 (base32
10795 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10796 (build-system python-build-system)
10797 (arguments
10798 `(#:phases
10799 (modify-phases %standard-phases
10800 (add-after 'unpack 'patch-path
10801 (lambda* (#:key inputs #:allow-other-keys)
10802 (let* ((dialog (assoc-ref inputs "dialog")))
10803 ;; Since this library really wants to grovel the search path, we
10804 ;; must hardcode dialog's store path into it.
10805 (substitute* "dialog.py"
10806 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10807 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10808 #t))))
10809 #:tests? #f)) ; no test suite
10810 (propagated-inputs
10811 `(("dialog" ,dialog)))
10812 (home-page "http://pythondialog.sourceforge.net/")
10813 (synopsis "Python interface to the UNIX dialog utility")
10814 (description "A Python wrapper for the dialog utility. Its purpose is to
10815 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10816 This allows one to make simple text-mode user interfaces on Unix-like systems")
10817 (license license:lgpl2.1)
10818 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10819
10820 (define-public python2-pythondialog
10821 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10822 (package
10823 (inherit base)
10824 (version (package-version python-pythondialog))
10825 (source (origin
10826 (method url-fetch)
10827 (uri (pypi-uri "python2-pythondialog" version))
10828 (sha256
10829 (base32
10830 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10831
10832 (define-public python-configobj
10833 (package
10834 (name "python-configobj")
10835 (version "5.0.6")
10836 (source (origin
10837 (method url-fetch)
10838 (uri (pypi-uri "configobj" version))
10839 (sha256
10840 (base32
10841 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10842 ;; Patch setup.py so it looks for python-setuptools, which is
10843 ;; required to parse the keyword 'install_requires' in setup.py.
10844 (patches (search-patches "python-configobj-setuptools.patch"))))
10845 (build-system python-build-system)
10846 (propagated-inputs
10847 `(("python-six" ,python-six)))
10848 (synopsis "Config file reading, writing and validation")
10849 (description "ConfigObj is a simple but powerful config file reader and
10850 writer: an ini file round tripper. Its main feature is that it is very easy to
10851 use, with a straightforward programmer’s interface and a simple syntax for
10852 config files.")
10853 (home-page "https://github.com/DiffSK/configobj")
10854 (license license:bsd-3)))
10855
10856 (define-public python2-configobj
10857 (package-with-python2 python-configobj))
10858
10859 (define-public python-configargparse
10860 (package
10861 (name "python-configargparse")
10862 (version "1.2.3")
10863 (source (origin
10864 (method url-fetch)
10865 (uri (pypi-uri "ConfigArgParse" version))
10866 (sha256
10867 (base32
10868 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
10869 (build-system python-build-system)
10870 (native-inputs
10871 `(("python-pyyaml" ,python-pyyaml)))
10872 (arguments
10873 `(#:phases
10874 (modify-phases %standard-phases
10875 (replace 'check
10876 (lambda _
10877 ;; Bypass setuptools-shim because one test relies on "setup.py"
10878 ;; being the first argument passed to the python call.
10879 ;;
10880 ;; NOTE: Many tests do not run because they rely on Python's
10881 ;; built-in test.test_argparse, but we remove the unit tests from
10882 ;; our Python installation.
10883 (invoke "python" "setup.py" "test"))))))
10884 (synopsis "Replacement for argparse")
10885 (description "A drop-in replacement for argparse that allows options to also
10886 be set via config files and/or environment variables.")
10887 (home-page "https://github.com/bw2/ConfigArgParse")
10888 (license license:expat)))
10889
10890 (define-public python-argparse-manpage
10891 (package
10892 (name "python-argparse-manpage")
10893 (version "1.1")
10894 (source
10895 (origin
10896 (method url-fetch)
10897 (uri (pypi-uri "argparse-manpage" version))
10898 (sha256
10899 (base32
10900 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10901 (build-system python-build-system)
10902 (home-page "https://github.com/praiskup/argparse-manpage")
10903 (synopsis "Build manual page from Python's ArgumentParser object")
10904 (description
10905 "This package provides tools to build manual pages from Python's
10906 @code{ArgumentParser} object.")
10907 (license license:asl2.0)))
10908
10909 (define-public python-contextlib2
10910 (package
10911 (name "python-contextlib2")
10912 (version "0.6.0.post1")
10913 (source
10914 (origin
10915 (method url-fetch)
10916 (uri (pypi-uri "contextlib2" version))
10917 (sha256
10918 (base32
10919 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10920 (build-system python-build-system)
10921 (home-page "https://contextlib2.readthedocs.org/")
10922 (synopsis "Tools for decorators and context managers")
10923 (description "This module is primarily a backport of the Python
10924 3.2 contextlib to earlier Python versions. Like contextlib, it
10925 provides utilities for common tasks involving decorators and context
10926 managers. It also contains additional features that are not part of
10927 the standard library.")
10928 (properties `((python2-variant . ,(delay python2-contextlib2))))
10929 (license license:psfl)))
10930
10931 (define-public python2-contextlib2
10932 (let ((base (package-with-python2
10933 (strip-python2-variant python-contextlib2))))
10934 (package/inherit base
10935 (arguments
10936 (substitute-keyword-arguments (package-arguments base)
10937 ((#:phases phases)
10938 `(modify-phases ,phases
10939 (replace 'check
10940 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10941 (native-inputs
10942 `(("python2-unittest2" ,python2-unittest2))))))
10943
10944 ;; This package is used by python2-pytest via python2-importlib-metadata,
10945 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10946 (define-public python2-contextlib2-bootstrap
10947 (hidden-package
10948 (package/inherit
10949 python2-contextlib2
10950 (name "python2-contextlib2-bootstrap")
10951 (arguments
10952 `(#:tests? #f
10953 ,@(package-arguments python2-contextlib2)))
10954 (native-inputs '()))))
10955
10956 (define-public python-texttable
10957 (package
10958 (name "python-texttable")
10959 (version "1.6.2")
10960 (source
10961 (origin
10962 (method url-fetch)
10963 (uri (pypi-uri "texttable" version))
10964 (sha256
10965 (base32
10966 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10967 (build-system python-build-system)
10968 (arguments
10969 `(#:phases
10970 (modify-phases %standard-phases
10971 (replace 'check
10972 (lambda _ (invoke "pytest" "tests.py"))))))
10973 (native-inputs
10974 `(("python-pytest" ,python-pytest)))
10975 (home-page "https://github.com/foutaise/texttable/")
10976 (synopsis "Python module for creating simple ASCII tables")
10977 (description "Texttable is a Python module for creating simple ASCII
10978 tables.")
10979 (license license:expat)))
10980
10981 (define-public python2-texttable
10982 (package-with-python2 python-texttable))
10983
10984 (define-public python-atomicwrites
10985 (package
10986 (name "python-atomicwrites")
10987 (version "1.3.0")
10988 (source (origin
10989 (method url-fetch)
10990 (uri (pypi-uri "atomicwrites" version))
10991 (sha256
10992 (base32
10993 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10994 (build-system python-build-system)
10995 (synopsis "Atomic file writes in Python")
10996 (description "Library for atomic file writes using platform dependent tools
10997 for atomic file system operations.")
10998 (home-page "https://github.com/untitaker/python-atomicwrites")
10999 (license license:expat)))
11000
11001 (define-public python2-atomicwrites
11002 (package-with-python2 python-atomicwrites))
11003
11004 (define-public python-click-threading
11005 (package
11006 (name "python-click-threading")
11007 (version "0.4.4")
11008 (source (origin
11009 (method url-fetch)
11010 (uri (pypi-uri "click-threading" version))
11011 (sha256
11012 (base32
11013 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
11014 (build-system python-build-system)
11015 (propagated-inputs
11016 `(("python-click" ,python-click)))
11017 (synopsis "Utilities for multithreading in Click")
11018 (description "This package provides utilities for multithreading in Click
11019 applications.")
11020 (home-page "https://github.com/click-contrib/click-threading")
11021 (license license:expat)))
11022
11023 (define-public python-click-log
11024 (package
11025 (name "python-click-log")
11026 (version "0.3.2")
11027 (source (origin
11028 (method url-fetch)
11029 (uri (pypi-uri "click-log" version))
11030 (sha256
11031 (base32
11032 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
11033 (build-system python-build-system)
11034 (propagated-inputs
11035 `(("python-click" ,python-click)))
11036 (synopsis "Logging for click applications")
11037 (description "This package provides a Python library for logging Click
11038 applications.")
11039 (home-page "https://github.com/click-contrib/click-log")
11040 (license license:expat)))
11041
11042 (define-public python-click-default-group
11043 (package
11044 (name "python-click-default-group")
11045 (version "1.2.2")
11046 (source (origin
11047 (method url-fetch)
11048 (uri (pypi-uri "click-default-group" version))
11049 (sha256
11050 (base32
11051 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
11052 (build-system python-build-system)
11053 (arguments
11054 `(#:tests? #f)) ; no target
11055 (propagated-inputs
11056 `(("python-click" ,python-click)))
11057 (synopsis "Extends click.Group")
11058 (description "This package extends click.Group to invoke a command without
11059 explicit subcommand name.")
11060 (home-page "https://github.com/click-contrib/click-default-group")
11061 (license license:bsd-3)))
11062
11063 (define-public python-structlog
11064 (package
11065 (name "python-structlog")
11066 (version "20.2.0")
11067 (source
11068 (origin
11069 (method url-fetch)
11070 (uri (pypi-uri "structlog" version))
11071 (sha256
11072 (base32
11073 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
11074 (build-system python-build-system)
11075 (arguments
11076 `(#:phases
11077 (modify-phases %standard-phases
11078 (replace 'check
11079 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11080 (when tests?
11081 (add-installed-pythonpath inputs outputs)
11082 (invoke "pytest"))
11083 #t)))))
11084 (native-inputs
11085 `(("python-coverage" ,python-coverage)
11086 ("python-freezegun" ,python-freezegun)
11087 ("python-pretend" ,python-pretend)
11088 ("python-pytest" ,python-pytest)
11089 ("python-pytest-asyncio" ,python-pytest-asyncio)
11090 ("python-simplejson" ,python-simplejson)
11091 ("python-twisted" ,python-twisted)))
11092 (home-page "https://www.structlog.org/")
11093 (synopsis "Structured Logging for Python")
11094 (description "@code{structlog} changes logging in Python by adding structure
11095 to your log entries.")
11096 (license (list license:asl2.0 license:expat))))
11097
11098 (define-public python-apipkg
11099 (package
11100 (name "python-apipkg")
11101 (version "1.5")
11102 (source (origin
11103 (method url-fetch)
11104 (uri (pypi-uri "apipkg" version))
11105 (sha256
11106 (base32
11107 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
11108 (build-system python-build-system)
11109 (native-inputs
11110 `(("python-pytest" ,python-pytest)
11111 ("python-setuptools-scm" ,python-setuptools-scm)))
11112 (synopsis "Namespace control and lazy-import mechanism")
11113 (description "With apipkg you can control the exported namespace of a Python
11114 package and greatly reduce the number of imports for your users. It is a small
11115 pure Python module that works on virtually all Python versions.")
11116 (home-page "https://github.com/pytest-dev/apipkg")
11117 (license license:expat)))
11118
11119 (define-public python-execnet
11120 (package
11121 (name "python-execnet")
11122 (version "1.4.1")
11123 (source (origin
11124 (method url-fetch)
11125 (uri (pypi-uri "execnet" version))
11126 (sha256
11127 (base32
11128 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
11129 (build-system python-build-system)
11130 (arguments
11131 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
11132 ;; The two test failures are caused by the lack of an `ssh` executable.
11133 ;; The test suite can be run with pytest after the 'install' phase.
11134 #:tests? #f))
11135 (native-inputs
11136 `(("python-pytest" ,python-pytest)
11137 ("python-setuptools-scm" ,python-setuptools-scm)))
11138 (propagated-inputs
11139 `(("python-apipkg" ,python-apipkg)))
11140 (synopsis "Rapid multi-Python deployment")
11141 (description "Execnet provides a share-nothing model with
11142 channel-send/receive communication for distributing execution across many
11143 Python interpreters across version, platform and network barriers. It has a
11144 minimal and fast API targeting the following uses:
11145 @enumerate
11146 @item distribute tasks to (many) local or remote CPUs
11147 @item write and deploy hybrid multi-process applications
11148 @item write scripts to administer multiple environments
11149 @end enumerate")
11150 (home-page "https://codespeak.net/execnet/")
11151 (license license:expat)))
11152
11153 (define-public python2-execnet
11154 (package-with-python2 python-execnet))
11155
11156 (define-public python-icalendar
11157 (package
11158 (name "python-icalendar")
11159 (version "4.0.7")
11160 (source (origin
11161 (method url-fetch)
11162 (uri (pypi-uri "icalendar" version))
11163 (sha256
11164 (base32
11165 "19574j3jwssm2dkqykih4568xqfgjsa3hcd79yl5s2vfys3qvh8g"))))
11166 (build-system python-build-system)
11167 (propagated-inputs
11168 `(("python-dateutil" ,python-dateutil)
11169 ("python-pytz" ,python-pytz)))
11170 (synopsis "Python library for parsing iCalendar files")
11171 (description "The icalendar package is a parser/generator of iCalendar
11172 files for use with Python.")
11173 (home-page "https://github.com/collective/icalendar")
11174 (license license:bsd-2)))
11175
11176 (define-public python-args
11177 (package
11178 (name "python-args")
11179 (version "0.1.0")
11180 (source (origin
11181 (method url-fetch)
11182 (uri (pypi-uri "args" version))
11183 (sha256
11184 (base32
11185 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
11186 (build-system python-build-system)
11187 (home-page "https://github.com/kennethreitz/args")
11188 (synopsis "Command-line argument parser")
11189 (description
11190 "This library provides a Python module to parse command-line arguments.")
11191 (license license:bsd-3)))
11192
11193 (define-public python2-args
11194 (package-with-python2 python-args))
11195
11196 (define-public python-clint
11197 (package
11198 (name "python-clint")
11199 (version "0.5.1")
11200 (source (origin
11201 (method url-fetch)
11202 (uri (pypi-uri "clint" version))
11203 (sha256
11204 (base32
11205 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
11206 (build-system python-build-system)
11207 (arguments
11208 '(#:phases
11209 (modify-phases %standard-phases
11210 (replace 'check
11211 (lambda _ (invoke "py.test" "-v"))))))
11212 (native-inputs
11213 `(("python-pytest" ,python-pytest)))
11214 (propagated-inputs
11215 `(("python-args" ,python-args)))
11216 (home-page "https://github.com/kennethreitz/clint")
11217 (synopsis "Command-line interface tools")
11218 (description
11219 "Clint is a Python module filled with a set of tools for developing
11220 command-line applications, including tools for colored and indented
11221 output, progress bar display, and pipes.")
11222 (license license:isc)))
11223
11224 (define-public python2-clint
11225 (package-with-python2 python-clint))
11226
11227 (define-public python-rply
11228 (package
11229 (name "python-rply")
11230 (version "0.7.5")
11231 (source (origin
11232 (method url-fetch)
11233 (uri (pypi-uri "rply" version))
11234 (sha256
11235 (base32
11236 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
11237 (build-system python-build-system)
11238 (propagated-inputs
11239 `(("python-appdirs" ,python-appdirs)))
11240 (home-page "https://github.com/alex/rply")
11241 (synopsis "Parser generator for Python")
11242 (description
11243 "This package provides a pure Python based parser generator, that also
11244 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
11245 with a new public API, and RPython support.")
11246 (license license:bsd-3)))
11247
11248 (define-public python2-rply
11249 (package-with-python2 python-rply))
11250
11251 (define-public python-hy
11252 (package
11253 (name "python-hy")
11254 (version "0.18.0")
11255 (source (origin
11256 (method url-fetch)
11257 (uri (pypi-uri "hy" version))
11258 (sha256
11259 (base32
11260 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
11261 (build-system python-build-system)
11262 (arguments
11263 '(#:phases
11264 (modify-phases %standard-phases
11265 (add-before 'install 'set-HOME
11266 (lambda _
11267 (setenv "HOME" "/tmp") #t))
11268 (replace 'check
11269 (lambda _
11270 ;; Tests require write access to HOME.
11271 (setenv "HOME" "/tmp")
11272 (invoke "nosetests"))))))
11273 (native-inputs
11274 `(("python-coverage" ,python-coverage)
11275 ("python-nose" ,python-nose)))
11276 (propagated-inputs
11277 `(("python-astor" ,python-astor)
11278 ("python-colorama" ,python-colorama)
11279 ("python-rply" ,python-rply)
11280 ("python-funcparserlib"
11281 ,python-funcparserlib)))
11282 (home-page "http://hylang.org/")
11283 (synopsis "Lisp frontend to Python")
11284 (description
11285 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
11286 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
11287 Python at your fingertips, in Lisp form.")
11288 (license license:expat)))
11289
11290 (define-public python2-functools32
11291 (package
11292 (name "python2-functools32")
11293 (version "3.2.3-2")
11294 (source
11295 (origin
11296 (method url-fetch)
11297 (uri (pypi-uri "functools32" version))
11298 (sha256
11299 (base32
11300 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
11301 (build-system python-build-system)
11302 (arguments
11303 `(#:python ,python-2
11304 #:tests? #f)) ; no test target
11305 (home-page "https://github.com/MiCHiLU/python-functools32")
11306 (synopsis
11307 "Backport of the functools module from Python 3.2.3")
11308 (description
11309 "This package is a backport of the @code{functools} module from Python
11310 3.2.3 for use with older versions of Python and PyPy.")
11311 (license license:expat)))
11312
11313 (define-public python2-subprocess32
11314 (package
11315 (name "python2-subprocess32")
11316 (version "3.2.7")
11317 (source (origin
11318 (method url-fetch)
11319 (uri (pypi-uri "subprocess32" version))
11320 (sha256
11321 (base32
11322 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
11323 (patches
11324 (search-patches "python2-subprocess32-disable-input-test.patch"))))
11325 (build-system python-build-system)
11326 (arguments
11327 `(#:python ,python-2
11328 ;; The test suite fails with Python > 2.7.13:
11329 ;; import test.support
11330 ;; ImportError: No module named support
11331 #:tests? #f
11332 #:phases
11333 (modify-phases %standard-phases
11334 (add-after 'unpack 'patch-/bin/sh
11335 (lambda _
11336 (substitute* '("subprocess32.py"
11337 "test_subprocess32.py")
11338 (("/bin/sh") (which "sh")))
11339 #t)))))
11340 (home-page "https://github.com/google/python-subprocess32")
11341 (synopsis "Backport of the subprocess module from Python 3.2")
11342 (description
11343 "This is a backport of the @code{subprocess} standard library module
11344 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
11345 new features. On POSIX systems it is guaranteed to be reliable when used
11346 in threaded applications. It includes timeout support from Python 3.3 but
11347 otherwise matches 3.2’s API.")
11348 (license license:psfl)))
11349
11350 (define-public python2-futures
11351 (package
11352 (name "python2-futures")
11353 (version "3.2.0")
11354 (source
11355 (origin
11356 (method url-fetch)
11357 (uri (pypi-uri "futures" version))
11358 (sha256
11359 (base32
11360 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
11361 (build-system python-build-system)
11362 (arguments
11363 `(#:python ,python-2
11364 #:phases
11365 (modify-phases %standard-phases
11366 (replace 'check
11367 (lambda _
11368 (invoke "python" "test_futures.py")
11369 #t)))))
11370 (home-page "https://github.com/agronholm/pythonfutures")
11371 (synopsis
11372 "Backport of the concurrent.futures package from Python 3.2")
11373 (description
11374 "The concurrent.futures module provides a high-level interface for
11375 asynchronously executing callables. This package backports the
11376 concurrent.futures package from Python 3.2")
11377 (license license:bsd-3)))
11378
11379 (define-public python-promise
11380 (package
11381 (name "python-promise")
11382 (version "0.4.2")
11383 (source
11384 (origin
11385 (method url-fetch)
11386 (uri (pypi-uri "promise" version))
11387 (sha256
11388 (base32
11389 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
11390 (build-system python-build-system)
11391 ;; Tests wants python-futures, which is a python2 only program, and
11392 ;; can't be found by python-promise at test time.
11393 (arguments `(#:tests? #f))
11394 (home-page "https://github.com/syrusakbary/promise")
11395 (synopsis "Promises/A+ implementation for Python")
11396 (description
11397 "Promises/A+ implementation for Python")
11398 (properties `((python2-variant . ,(delay python2-promise))))
11399 (license license:expat)))
11400
11401 (define-public python2-promise
11402 (let ((promise (package-with-python2
11403 (strip-python2-variant python-promise))))
11404 (package/inherit promise
11405 (arguments (substitute-keyword-arguments (package-arguments promise)
11406 ((#:tests? _) #t)))
11407 (native-inputs
11408 `(("python2-futures" ,python2-futures)
11409 ("python2-pytest" ,python2-pytest)
11410 ,@(package-native-inputs promise))))))
11411
11412 (define-public python-progressbar2
11413 (package
11414 (name "python-progressbar2")
11415 (version "3.51.3")
11416 (source
11417 (origin
11418 (method url-fetch)
11419 (uri (pypi-uri "progressbar2" version))
11420 (sha256
11421 (base32
11422 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
11423 (build-system python-build-system)
11424 (propagated-inputs
11425 `(("python-six" ,python-six)
11426 ("python-utils" ,python-utils)))
11427 (native-inputs
11428 `(("python-flake8" ,python-flake8)
11429 ("python-freezegun" ,python-freezegun)
11430 ("python-pycodestyle" ,python-pycodestyle)
11431 ("python-pytest" ,python-pytest)
11432 ("python-pytest-cache" ,python-pytest-cache)
11433 ("python-pytest-cov" ,python-pytest-cov)
11434 ("python-pytest-flakes" ,python-pytest-flakes)
11435 ("python-pytest-pep8" ,python-pytest-pep8)
11436 ("python-sphinx" ,python-sphinx)))
11437 (home-page "https://github.com/WoLpH/python-progressbar")
11438 (synopsis "Text progress bar library for Python")
11439 (description
11440 "This package provides a Python progressbar library to provide
11441 visual (yet text based) progress to long running operations.")
11442 (license license:bsd-3)))
11443
11444 (define-public python-progressbar33
11445 (package
11446 (name "python-progressbar33")
11447 (version "2.4")
11448 (source
11449 (origin
11450 (method url-fetch)
11451 (uri (pypi-uri "progressbar33" version))
11452 (sha256
11453 (base32
11454 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
11455 (build-system python-build-system)
11456 (home-page "https://github.com/germangh/python-progressbar")
11457 (synopsis "Text progress bar library for Python")
11458 (description
11459 "This package provides a text progress bar library for Python. This
11460 version only differs from the original @code{progressbar} package in that it
11461 uses relative package imports instead of absolute imports, which is necessary
11462 for the module to work under Python 3.3.")
11463 ;; Either or both of these licenses may be selected.
11464 (license (list license:lgpl2.1+ license:bsd-3))))
11465
11466 (define-public python-colorama
11467 (package
11468 (name "python-colorama")
11469 (version "0.4.4")
11470 (source
11471 (origin
11472 (method url-fetch)
11473 (uri (pypi-uri "colorama" version))
11474 (sha256
11475 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
11476 (build-system python-build-system)
11477 (synopsis "Colored terminal text rendering for Python")
11478 (description "Colorama is a Python library for rendering colored terminal
11479 text.")
11480 (home-page "https://pypi.org/project/colorama/")
11481 (license license:bsd-3)))
11482
11483 (define-public python2-colorama
11484 (package-with-python2 python-colorama))
11485
11486 (define-public python-moto
11487 (package
11488 (name "python-moto")
11489 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
11490 (version "1.3.16.dev134")
11491 (source (origin
11492 (method url-fetch)
11493 (uri (pypi-uri "moto" version))
11494 (sha256
11495 (base32
11496 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
11497 (build-system python-build-system)
11498 (arguments
11499 `(#:phases (modify-phases %standard-phases
11500 (add-after 'unpack 'patch-hardcoded-executable-names
11501 (lambda _
11502 (substitute* "moto/batch/models.py"
11503 (("/bin/sh")
11504 (which "sh")))
11505 (substitute* (find-files "tests" "\\.py$")
11506 (("#!/bin/bash")
11507 (string-append "#!" (which "bash"))))
11508 #t))
11509 (replace 'check
11510 (lambda _
11511 (setenv "PYTHONPATH" (string-append "./build/lib:"
11512 (getenv "PYTHONPATH")))
11513 (invoke "pytest" "-vv" "-m" "not network"
11514 ;; These tests require Docker.
11515 "-k" "not test_terminate_job \
11516 and not test_invoke_function_from_sqs_exception"))))))
11517 (native-inputs
11518 `(("python-flask" ,python-flask)
11519 ("python-flask-cors" ,python-flask-cors)
11520 ("python-freezegun" ,python-freezegun)
11521 ("python-parameterized" ,python-parameterized)
11522 ("python-pytest" ,python-pytest)
11523 ("python-sure" ,python-sure)))
11524 (propagated-inputs
11525 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
11526 ("python-boto" ,python-boto)
11527 ("python-boto3" ,python-boto3)
11528 ("python-botocore" ,python-botocore)
11529 ("python-cfn-lint" ,python-cfn-lint)
11530 ("python-cryptography" ,python-cryptography)
11531 ("python-dateutil" ,python-dateutil)
11532 ("python-docker" ,python-docker)
11533 ("python-idna" ,python-idna)
11534 ("python-jinja2" ,python-jinja2)
11535 ("python-jose" ,python-jose)
11536 ("python-jsondiff" ,python-jsondiff)
11537 ("python-mock" ,python-mock)
11538 ("python-pytz" ,python-pytz)
11539 ("python-pyyaml" ,python-pyyaml)
11540 ("python-requests" ,python-requests)
11541 ("python-responses" ,python-responses)
11542 ("python-six" ,python-six)
11543 ("python-sshpubkeys" ,python-sshpubkeys)
11544 ("python-werkzeug" ,python-werkzeug)
11545 ("python-xmltodict" ,python-xmltodict)))
11546 (home-page "https://github.com/spulec/moto")
11547 (synopsis "Mock out the boto library")
11548 (description
11549 "@code{moto} is a library designed to easily mock out the
11550 @code{boto} library.")
11551 (license license:asl2.0)))
11552
11553 (define-public python-rsa
11554 (package
11555 (name "python-rsa")
11556 (version "3.4.2")
11557 (source
11558 (origin
11559 (method url-fetch)
11560 (uri (pypi-uri "rsa" version))
11561 (sha256
11562 (base32
11563 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11564 (build-system python-build-system)
11565 (propagated-inputs
11566 `(("python-pyasn1" ,python-pyasn1)))
11567 (synopsis "Pure-Python RSA implementation")
11568 (description "Python-RSA is a pure-Python RSA implementation. It supports
11569 encryption and decryption, signing and verifying signatures, and key
11570 generation according to PKCS#1 version 1.5. It can be used as a Python
11571 library as well as on the command line.")
11572 (home-page "https://stuvel.eu/rsa")
11573 (license license:asl2.0)))
11574
11575 (define-public python2-rsa
11576 (package-with-python2 python-rsa))
11577
11578 (define-public python-pluggy
11579 (package
11580 (name "python-pluggy")
11581 (version "0.13.1")
11582 (source
11583 (origin
11584 (method url-fetch)
11585 (uri (pypi-uri "pluggy" version))
11586 (sha256
11587 (base32
11588 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11589 (build-system python-build-system)
11590 (native-inputs
11591 `(("python-setuptools-scm" ,python-setuptools-scm)))
11592 (synopsis "Plugin and hook calling mechanism for Python")
11593 (description "Pluggy is an extraction of the plugin manager as used by
11594 Pytest but stripped of Pytest specific details.")
11595 (home-page "https://pypi.org/project/pluggy/")
11596 (properties `((python2-variant . ,(delay python2-pluggy))))
11597 (license license:expat)))
11598
11599 (define-public python2-pluggy
11600 (let ((base (package-with-python2 (strip-python2-variant
11601 python-pluggy))))
11602 (package/inherit
11603 base
11604 (propagated-inputs
11605 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11606
11607 ;; This package requires python2-importlib-metadata, but that package
11608 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11609 ;; variant to solve the circular dependency.
11610 (define-public python2-pluggy-bootstrap
11611 (hidden-package
11612 (package/inherit
11613 python2-pluggy
11614 (name "python2-pluggy-bootstrap")
11615 (arguments
11616 `(#:tests? #f
11617 ,@(package-arguments python2-pluggy)))
11618 (propagated-inputs
11619 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11620
11621 (define-public python-plumbum
11622 (package
11623 (name "python-plumbum")
11624 (version "1.7.0")
11625 (source
11626 (origin
11627 (method url-fetch)
11628 (uri (pypi-uri "plumbum" version))
11629 (sha256
11630 (base32 "1kidj821k79dw064rlxh84xamb9h79ychg3pgj81jlvm5hs48xri"))))
11631 (build-system python-build-system)
11632 (arguments
11633 `(#:tests? #f)) ;no tests
11634 (native-inputs
11635 ;; XXX: Not actually used since there are no tests but required for
11636 ;; build.
11637 `(("python-pytest" ,python-pytest)))
11638 (home-page "https://plumbum.readthedocs.io")
11639 (synopsis "Python shell combinators library")
11640 (description
11641 "Plumbum is a library of tools for replacing shell scripts with Python
11642 code.")
11643 (license license:expat)))
11644
11645 (define-public python-tox
11646 (package
11647 (name "python-tox")
11648 (version "3.20.0")
11649 (source
11650 (origin
11651 (method url-fetch)
11652 (uri (pypi-uri "tox" version))
11653 (sha256
11654 (base32
11655 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11656 (build-system python-build-system)
11657 (arguments
11658 ;; FIXME: Tests require pytest-timeout, which itself requires
11659 ;; pytest>=2.8.0 for installation.
11660 '(#:tests? #f))
11661 (propagated-inputs
11662 `(("python-filelock" ,python-filelock)
11663 ("python-packaging" ,python-packaging)
11664 ("python-pluggy" ,python-pluggy)
11665 ("python-py" ,python-py)
11666 ("python-six" ,python-six)
11667 ("python-toml" ,python-toml)
11668 ("python-virtualenv" ,python-virtualenv)))
11669 (native-inputs
11670 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11671 ("python-pytest" ,python-pytest) ; >= 2.3.5
11672 ("python-setuptools-scm" ,python-setuptools-scm)))
11673 (home-page "https://tox.readthedocs.io")
11674 (synopsis "Virtualenv-based automation of test activities")
11675 (description "Tox is a generic virtualenv management and test command line
11676 tool. It can be used to check that a package installs correctly with
11677 different Python versions and interpreters, or run tests in each type of
11678 supported environment, or act as a frontend to continuous integration
11679 servers.")
11680 (license license:expat)))
11681
11682 (define-public python-jmespath
11683 (package
11684 (name "python-jmespath")
11685 (version "0.9.4")
11686 (source
11687 (origin
11688 (method url-fetch)
11689 (uri (pypi-uri "jmespath" version))
11690 (sha256
11691 (base32
11692 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11693 (build-system python-build-system)
11694 (native-inputs
11695 `(("python-nose" ,python-nose)))
11696 (synopsis "JSON Matching Expressions")
11697 (description "JMESPath (pronounced “james path”) is a Python library that
11698 allows one to declaratively specify how to extract elements from a JSON
11699 document.")
11700 (home-page "https://github.com/jmespath/jmespath.py")
11701 (license license:expat)))
11702
11703 (define-public python2-jmespath
11704 (package-with-python2 python-jmespath))
11705
11706 (define-public python-symengine
11707 (package
11708 (name "python-symengine")
11709 (version "0.6.1")
11710 (source
11711 (origin
11712 (method url-fetch)
11713 (uri (pypi-uri "symengine" version))
11714 (sha256
11715 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11716 (build-system python-build-system)
11717 (native-inputs
11718 `(("cmake" ,cmake)
11719 ("python-cython" ,python-cython)))
11720 (inputs
11721 `(("symengine" ,symengine)))
11722 (home-page "https://github.com/symengine/symengine.py")
11723 (synopsis "Python library providing wrappers to SymEngine")
11724 (description
11725 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11726 manipulation library.")
11727 (license license:expat)))
11728
11729 (define-public python-uncertainties
11730 (package
11731 (name "python-uncertainties")
11732 (version "3.1.5")
11733 (source
11734 (origin
11735 (method url-fetch)
11736 (uri (pypi-uri "uncertainties" version))
11737 (sha256
11738 (base32
11739 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
11740 (build-system python-build-system)
11741 ;; While there are test files, there is no "tests" directory, so the tests
11742 ;; fail.
11743 (arguments '(#:tests? #false))
11744 (propagated-inputs
11745 `(("python-future" ,python-future)))
11746 (native-inputs
11747 `(("python-nose" ,python-nose)
11748 ("python-numpy" ,python-numpy)))
11749 (home-page "https://uncertainties-python-package.readthedocs.io/")
11750 (synopsis "Calculations with uncertainties")
11751 (description
11752 "The uncertainties package transparently handles calculations with
11753 numbers with uncertainties. It can also yield the derivatives of any
11754 expression.")
11755 (license license:bsd-3)))
11756
11757 (define-public python-asteval
11758 (package
11759 (name "python-asteval")
11760 (version "0.9.23")
11761 (source
11762 (origin
11763 (method url-fetch)
11764 (uri (pypi-uri "asteval" version))
11765 (sha256
11766 (base32
11767 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
11768 (build-system python-build-system)
11769 (native-inputs
11770 `(("python-pytest" ,python-pytest)))
11771 (home-page "https://github.com/newville/asteval")
11772 (synopsis "Minimalistic evaluator of Python expressions")
11773 (description
11774 "This package provides a minimalistic evaluator of Python expression
11775 using the @code{ast} module")
11776 (license license:expat)))
11777
11778 (define-public python-lmfit
11779 (package
11780 (name "python-lmfit")
11781 (version "1.0.2")
11782 (source
11783 (origin
11784 (method url-fetch)
11785 (uri (pypi-uri "lmfit" version))
11786 (sha256
11787 (base32
11788 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
11789 (build-system python-build-system)
11790 (propagated-inputs
11791 `(("python-asteval" ,python-asteval)
11792 ("python-numpy" ,python-numpy)
11793 ("python-scipy" ,python-scipy)
11794 ("python-uncertainties" ,python-uncertainties)))
11795 (native-inputs
11796 `(("python-pytest" ,python-pytest)))
11797 (home-page "https://lmfit.github.io/lmfit-py/")
11798 (synopsis "Least-Squares minimization with bounds and constraints")
11799 (description
11800 "Lmfit provides a high-level interface to non-linear optimization and
11801 curve fitting problems for Python. It builds on and extends many of the
11802 optimization methods of @code{scipy.optimize}. Initially inspired by (and
11803 named for) extending the Levenberg-Marquardt method from
11804 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
11805 enhancements to optimization and data fitting problems.")
11806 (license license:bsd-3)))
11807
11808 (define-public python-boto
11809 (package
11810 (name "python-boto")
11811 (version "2.49.0")
11812 (source (origin
11813 (method url-fetch)
11814 (uri (pypi-uri "boto" version))
11815 (sha256
11816 (base32
11817 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
11818 (build-system python-build-system)
11819 (arguments
11820 ;; XXX: This package is unmaintained and has problems with newer versions
11821 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
11822 ;; subset of this library, so keep it around for now, but disable tests.
11823 '(#:tests? #f))
11824 (propagated-inputs
11825 `(("python-paramiko" ,python-paramiko)
11826 ("python-requests" ,python-requests)))
11827 (home-page "https://github.com/boto/boto")
11828 (synopsis "Python interfaces for Amazon Web Services")
11829 (description
11830 "This package provides various facilities for interacting with Amazon
11831 Web Services through Python.
11832
11833 This software is unmaintained, and new projects should use @code{boto3} instead.")
11834 (license license:expat)))
11835
11836 (define-public python-botocore
11837 ;; Note: When updating botocore, also make sure that boto3 and awscli
11838 ;; are compatible.
11839 (package
11840 (name "python-botocore")
11841 (version "1.19.22")
11842 (source
11843 (origin
11844 (method url-fetch)
11845 (uri (pypi-uri "botocore" version))
11846 (sha256
11847 (base32
11848 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
11849 (build-system python-build-system)
11850 (arguments
11851 ;; FIXME: Many tests are failing.
11852 '(#:tests? #f))
11853 (propagated-inputs
11854 `(("python-dateutil" ,python-dateutil)
11855 ("python-jmespath" ,python-jmespath)
11856 ("python-urllib3" ,python-urllib3)))
11857 (home-page "https://github.com/boto/botocore")
11858 (synopsis "Low-level interface to AWS")
11859 (description "Botocore is a Python library that provides a low-level
11860 interface to the Amazon Web Services (AWS) API.")
11861 (license license:asl2.0)))
11862
11863 (define-public python2-botocore
11864 (package-with-python2 python-botocore))
11865
11866 (define-public python-boto3
11867 (package
11868 (name "python-boto3")
11869 (version "1.16.22")
11870 (home-page "https://github.com/boto/boto3")
11871 (source (origin
11872 (method git-fetch)
11873 (uri (git-reference (url home-page) (commit version)))
11874 (file-name (git-file-name name version))
11875 (sha256
11876 (base32
11877 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
11878 (arguments
11879 `(#:phases
11880 (modify-phases %standard-phases
11881 (add-after 'unpack 'delete-network-tests
11882 ;; Deleting integration tests because they are trying to connect to AWS.
11883 (lambda _
11884 (delete-file-recursively "tests/integration")
11885 #t)))))
11886 (build-system python-build-system)
11887 (native-inputs
11888 `(("python-nose" ,python-nose)
11889 ("python-mock" ,python-mock)))
11890 (propagated-inputs
11891 `(("python-botocore" ,python-botocore)
11892 ("python-jmespath" ,python-jmespath)
11893 ("python-s3transfer" ,python-s3transfer)))
11894 (synopsis "AWS SDK for Python")
11895 (description
11896 "Boto3 is a Python library for writing programs that interact with
11897 @acronym{AWS,Amazon Web Services}.")
11898 (license license:asl2.0)))
11899
11900 (define-public python-pyfiglet
11901 (package
11902 (name "python-pyfiglet")
11903 (version "0.8.post1")
11904 (source
11905 (origin
11906 (method url-fetch)
11907 (uri (pypi-uri "pyfiglet" version))
11908 (sha256
11909 (base32
11910 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11911 (build-system python-build-system)
11912 (home-page "https://github.com/pwaller/pyfiglet")
11913 (synopsis "Draw ASCII art big letters in Python")
11914 (description "This module lets you draw large letter from ordinary characters
11915 in pure Python.")
11916 (license license:expat)))
11917
11918 (define-public python-xdo
11919 (package
11920 (name "python-xdo")
11921 (version "0.3")
11922 (source (origin
11923 (method url-fetch)
11924 (uri (string-append
11925 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11926 "python-xdo_" version ".orig.tar.gz"))
11927 (sha256
11928 (base32
11929 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11930 (build-system python-build-system)
11931 (arguments
11932 '(#:phases
11933 (modify-phases %standard-phases
11934 (add-before 'install 'patch-libxdo-path
11935 ;; Hardcode the path of dynamically loaded libxdo library.
11936 (lambda* (#:key inputs #:allow-other-keys)
11937 (let ((libxdo (string-append
11938 (assoc-ref inputs "xdotool")
11939 "/lib/libxdo.so")))
11940 (substitute* "xdo/_xdo.py"
11941 (("find_library\\(\"xdo\"\\)")
11942 (simple-format #f "\"~a\"" libxdo)))
11943 #t))))
11944 #:tests? #f)) ; no tests provided
11945 (propagated-inputs
11946 `(("python-six" ,python-six)))
11947 (inputs
11948 `(("xdotool" ,xdotool)
11949 ("libX11" ,libx11)))
11950 (home-page "https://tracker.debian.org/pkg/python-xdo")
11951 (synopsis "Python library for simulating X11 keyboard/mouse input")
11952 (description "Provides bindings to libxdo for manipulating X11 via simulated
11953 input. (Note that this is mostly a legacy library; you may wish to look at
11954 python-xdo for newer bindings.)")
11955 (license license:bsd-3)))
11956
11957 (define-public python2-xdo
11958 (package-with-python2 python-xdo))
11959
11960 (define-public python-mako
11961 (package
11962 (name "python-mako")
11963 (version "1.1.3")
11964 (source
11965 (origin
11966 (method url-fetch)
11967 (uri (pypi-uri "Mako" version))
11968 (sha256
11969 (base32
11970 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11971 (build-system python-build-system)
11972 (arguments
11973 `(#:phases (modify-phases %standard-phases
11974 (replace 'check
11975 (lambda* (#:key tests? #:allow-other-keys)
11976 (if tests?
11977 (invoke "nosetests" "-v")
11978 (format #t "test suite not run~%"))
11979 #t)))))
11980 (propagated-inputs
11981 `(("python-markupsafe" ,python-markupsafe)))
11982 (native-inputs
11983 `(("python-mock" ,python-mock)
11984 ("python-nose" ,python-nose)))
11985 (home-page "https://www.makotemplates.org/")
11986 (synopsis "Templating language for Python")
11987 (description "Mako is a templating language for Python that compiles
11988 templates into Python modules.")
11989 (license license:expat)))
11990
11991 (define-public python2-mako
11992 (package-with-python2 python-mako))
11993
11994 (define-public python-waitress
11995 (package
11996 (name "python-waitress")
11997 (version "1.1.0")
11998 (source
11999 (origin
12000 (method url-fetch)
12001 (uri (pypi-uri "waitress" version))
12002 (patches (search-patches "python-waitress-fix-tests.patch"))
12003 (sha256
12004 (base32
12005 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
12006 (build-system python-build-system)
12007 (home-page "https://github.com/Pylons/waitress")
12008 (synopsis "Waitress WSGI server")
12009 (description "Waitress is meant to be a production-quality pure-Python WSGI
12010 server with very acceptable performance.")
12011 (license license:zpl2.1)))
12012
12013 (define-public python2-waitress
12014 (package-with-python2 python-waitress))
12015
12016 (define-public python-whichcraft
12017 (package
12018 (name "python-whichcraft")
12019 (version "0.6.1")
12020 (source
12021 (origin
12022 (method url-fetch)
12023 (uri (pypi-uri "whichcraft" version))
12024 (sha256
12025 (base32
12026 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
12027 (build-system python-build-system)
12028 (native-inputs
12029 `(("python-pytest" ,python-pytest)))
12030 (home-page "https://github.com/pydanny/whichcraft")
12031 (synopsis "Cross-platform cross-python shutil.which functionality")
12032 (description
12033 "This package provides a shim of the shutil.which function that's
12034 designed to work across multiple versions of Python.")
12035 (license license:bsd-3)))
12036
12037 (define-public python-cookiecutter
12038 (package
12039 (name "python-cookiecutter")
12040 (version "1.7.2")
12041 (source
12042 (origin
12043 (method url-fetch)
12044 (uri (pypi-uri "cookiecutter" version))
12045 (sha256
12046 (base32
12047 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
12048 (build-system python-build-system)
12049 (native-inputs
12050 `(("python-freezegun" ,python-freezegun)
12051 ("python-pytest" ,python-pytest)
12052 ("python-pytest-catchlog" ,python-pytest-catchlog)
12053 ("python-pytest-cov" ,python-pytest-cov)
12054 ("python-pytest-mock" ,python-pytest-mock)))
12055 (propagated-inputs
12056 `(("python-binaryornot" ,python-binaryornot)
12057 ("python-click" ,python-click)
12058 ("python-future" ,python-future)
12059 ("python-jinja2" ,python-jinja2)
12060 ("python-jinja2-time" ,python-jinja2-time)
12061 ("python-poyo" ,python-poyo)
12062 ("python-requests" ,python-requests)
12063 ("python-slugify" ,python-slugify)
12064 ("python-text-unidecode" ,python-text-unidecode)
12065 ("python-whichcraft" ,python-whichcraft)))
12066 (home-page "https://github.com/cookiecutter/cookiecutter")
12067 (synopsis
12068 "Command-line utility that creates projects from project templates")
12069 (description
12070 "This package provides a command-line utility that creates projects from
12071 project templates, e.g. creating a Python package project from a Python package
12072 project template.")
12073 (license license:bsd-3)))
12074
12075 (define-public python-pyquery
12076 (package
12077 (name "python-pyquery")
12078 (version "1.2.17")
12079 (source
12080 (origin
12081 (method url-fetch)
12082 (uri (pypi-uri "pyquery" version))
12083 (sha256
12084 (base32
12085 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
12086 (build-system python-build-system)
12087 (native-inputs
12088 `(("python-webob" ,python-webob)
12089 ("python-webtest" ,python-webtest)))
12090 (propagated-inputs
12091 `(("python-lxml" ,python-lxml)
12092 ("python-cssselect" ,python-cssselect)))
12093 (home-page "https://github.com/gawel/pyquery")
12094 (synopsis "Make jQuery-like queries on xml documents")
12095 (description "pyquery allows you to make jQuery queries on xml documents.
12096 The API is as much as possible the similar to jQuery. pyquery uses lxml for
12097 fast xml and html manipulation.")
12098 (license license:bsd-3)))
12099
12100 (define-public python-anyjson
12101 (package
12102 (name "python-anyjson")
12103 (version "0.3.3")
12104 (source
12105 (origin
12106 (method url-fetch)
12107 (uri (pypi-uri "anyjson" version))
12108 (sha256
12109 (base32
12110 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
12111 (build-system python-build-system)
12112 (arguments
12113 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
12114 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
12115 ;; whatever) so this transformation needs to be done before the tests
12116 ;; can be run. Maybe we could add a build step to transform beforehand
12117 ;; but it could be annoying/difficult.
12118 ;; We can enable tests for the Python 2 version, though, and do below.
12119 #:tests? #f))
12120 (home-page "https://bitbucket.org/runeh/anyjson/")
12121 (synopsis
12122 "Wraps best available JSON implementation in a common interface")
12123 (description
12124 "Anyjson loads whichever is the fastest JSON module installed
12125 and provides a uniform API regardless of which JSON implementation is used.")
12126 (license license:bsd-3)
12127 (properties `((python2-variant . ,(delay python2-anyjson))))))
12128
12129 (define-public python2-anyjson
12130 (let ((anyjson (package-with-python2
12131 (strip-python2-variant python-anyjson))))
12132 (package/inherit anyjson
12133 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
12134 #:tests? #t
12135 ,@(package-arguments anyjson)))
12136 (native-inputs `(("python2-nose" ,python2-nose))))))
12137
12138 (define-public python-amqp
12139 (package
12140 (name "python-amqp")
12141 (version "2.3.2")
12142 (source
12143 (origin
12144 (method url-fetch)
12145 (uri (pypi-uri "amqp" version))
12146 (sha256
12147 (base32
12148 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
12149 (build-system python-build-system)
12150 (native-inputs
12151 `(("python-case" ,python-case)
12152 ("python-pytest-sugar" ,python-pytest-sugar)
12153 ("python-mock" ,python-mock)))
12154 (propagated-inputs
12155 `(("python-vine" ,python-vine)))
12156 (home-page "https://github.com/celery/py-amqp")
12157 (synopsis
12158 "Low-level AMQP client for Python (fork of amqplib)")
12159 (description
12160 "This is a fork of amqplib which was originally written by Barry Pederson.
12161 It is maintained by the Celery project, and used by kombu as a pure python
12162 alternative when librabbitmq is not available.")
12163 (license license:lgpl2.1+)
12164 (properties `((python2-variant . ,(delay python2-amqp))))))
12165
12166 (define-public python2-amqp
12167 (let ((amqp (package-with-python2
12168 (strip-python2-variant python-amqp))))
12169 (package/inherit amqp
12170 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
12171 ;; unmaintained. Weirdly, does not do this on the python 3
12172 ;; version?
12173 #:tests? #f
12174 ,@(package-arguments amqp))))))
12175
12176 (define-public python-txamqp
12177 (package
12178 (name "python-txamqp")
12179 (version "0.8.2")
12180 (source
12181 (origin
12182 (method url-fetch)
12183 (uri (pypi-uri "txAMQP" version))
12184 (sha256
12185 (base32
12186 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
12187 (build-system python-build-system)
12188 (propagated-inputs
12189 `(("python-six" ,python-six)
12190 ("python-twisted" ,python-twisted)))
12191 (home-page "https://github.com/txamqp/txamqp")
12192 (synopsis "Communicate with AMQP peers and brokers using Twisted")
12193 (description
12194 "This package provides a Python library for communicating with AMQP peers
12195 and brokers using the asynchronous networking framework Twisted. It contains
12196 all the necessary code to connect, send and receive messages to/from an
12197 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
12198 also includes support for using Thrift RPC over AMQP in Twisted
12199 applications.")
12200 (license license:asl2.0)))
12201
12202 (define-public python2-txamqp
12203 (package-with-python2 python-txamqp))
12204
12205 (define-public python-kombu
12206 (package
12207 (name "python-kombu")
12208 (version "4.2.2")
12209 (source
12210 (origin
12211 (method url-fetch)
12212 (uri (pypi-uri "kombu" version))
12213 (sha256
12214 (base32
12215 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
12216 (build-system python-build-system)
12217 (native-inputs
12218 `(("python-mock" ,python-mock)
12219 ("python-case" ,python-case)
12220 ("python-pyro4" ,python-pyro4)
12221 ("python-pytest-sugar" ,python-pytest-sugar)
12222 ("python-pytz" ,python-pytz)))
12223 (propagated-inputs
12224 `(("python-anyjson" ,python-anyjson)
12225 ("python-amqp" ,python-amqp)
12226 ("python-redis" ,python-redis)))
12227 (home-page "https://kombu.readthedocs.io")
12228 (synopsis "Message passing library for Python")
12229 (description "The aim of Kombu is to make messaging in Python as easy as
12230 possible by providing an idiomatic high-level interface for the AMQ protocol,
12231 and also provide proven and tested solutions to common messaging problems.
12232 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
12233 message orientation, queuing, routing, reliability and security, for which the
12234 RabbitMQ messaging server is the most popular implementation.")
12235 (license license:bsd-3)
12236 (properties `((python2-variant . ,(delay python2-kombu))))))
12237
12238 (define-public python2-kombu
12239 (let ((kombu (package-with-python2
12240 (strip-python2-variant python-kombu))))
12241 (package/inherit kombu
12242 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
12243 ;; It works fine on the python3 variant.
12244 #:tests? #f
12245 ,@(package-arguments kombu)))
12246 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12247 ,@(package-native-inputs kombu))))))
12248
12249 (define-public python-billiard
12250 (package
12251 (name "python-billiard")
12252 (version "3.5.0.5")
12253 (source
12254 (origin
12255 (method url-fetch)
12256 (uri (pypi-uri "billiard" version))
12257 (sha256
12258 (base32
12259 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
12260 (build-system python-build-system)
12261 (native-inputs
12262 `(("python-case" ,python-case)
12263 ("python-pytest" ,python-pytest)))
12264 (home-page "https://github.com/celery/billiard")
12265 (synopsis
12266 "Python multiprocessing fork with improvements and bugfixes")
12267 (description
12268 "Billiard is a fork of the Python 2.7 multiprocessing package. The
12269 multiprocessing package itself is a renamed and updated version of R Oudkerk's
12270 pyprocessing package. This standalone variant is intended to be compatible with
12271 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
12272 (license license:bsd-3)
12273 (properties `((python2-variant . ,(delay python2-billiard))))))
12274
12275 (define-public python2-billiard
12276 (let ((billiard (package-with-python2
12277 (strip-python2-variant python-billiard))))
12278 (package/inherit billiard
12279 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12280 ("python2-mock" ,python2-mock)
12281 ,@(package-native-inputs billiard))))))
12282
12283 (define-public python-celery
12284 (package
12285 (name "python-celery")
12286 (version "4.2.1")
12287 (source
12288 (origin
12289 (method url-fetch)
12290 (uri (pypi-uri "celery" version))
12291 (sha256
12292 (base32
12293 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
12294 (build-system python-build-system)
12295 (arguments
12296 '(;; TODO The tests fail with Python 3.7
12297 ;; https://github.com/celery/celery/issues/4849
12298 #:tests? #f
12299 #:phases
12300 (modify-phases %standard-phases
12301 (add-after 'unpack 'patch-requirements
12302 (lambda _
12303 (substitute* "requirements/test.txt"
12304 (("pytest>=3\\.0,<3\\.3")
12305 "pytest>=3.0"))
12306 #t)))))
12307 (native-inputs
12308 `(("python-case" ,python-case)
12309 ("python-pytest" ,python-pytest)))
12310 (propagated-inputs
12311 `(("python-pytz" ,python-pytz)
12312 ("python-billiard" ,python-billiard)
12313 ("python-kombu" ,python-kombu)))
12314 (home-page "https://celeryproject.org")
12315 (synopsis "Distributed Task Queue")
12316 (description "Celery is an asynchronous task queue/job queue based on
12317 distributed message passing. It is focused on real-time operation, but
12318 supports scheduling as well. The execution units, called tasks, are executed
12319 concurrently on a single or more worker servers using multiprocessing,
12320 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
12321 synchronously (wait until ready).")
12322 (license license:bsd-3)
12323 (properties `((python2-variant . ,(delay python2-celery))))))
12324
12325 (define-public python2-celery
12326 (let ((celery (package-with-python2
12327 (strip-python2-variant python-celery))))
12328 (package/inherit celery
12329 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12330 ("python2-mock" ,python2-mock)
12331 ,@(package-native-inputs celery))))))
12332
12333 (define-public python-translitcodec
12334 (package
12335 (name "python-translitcodec")
12336 (version "0.4.0")
12337 (source
12338 (origin
12339 (method url-fetch)
12340 (uri (pypi-uri "translitcodec" version))
12341 (sha256
12342 (base32
12343 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
12344 (build-system python-build-system)
12345 (arguments
12346 `(#:tests? #f)) ; no tests provided
12347 (home-page
12348 "https://github.com/claudep/translitcodec")
12349 (synopsis
12350 "Unicode to 8-bit charset transliteration codec")
12351 (description
12352 "This package contains codecs for transliterating ISO 10646 texts into
12353 best-effort representations using smaller coded character sets (ASCII,
12354 ISO 8859, etc.).")
12355 (license license:expat)))
12356
12357 (define-public python2-translitcodec
12358 (package-with-python2 python-translitcodec))
12359
12360 (define-public python-editor
12361 (package
12362 (name "python-editor")
12363 (version "1.0.4")
12364 (source
12365 (origin
12366 (method url-fetch)
12367 (uri (pypi-uri "python-editor" version))
12368 (sha256
12369 (base32
12370 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
12371 (build-system python-build-system)
12372 (arguments
12373 '(#:tests? #f)) ;XXX: needs a TTY and an editor
12374 (home-page "https://github.com/fmoo/python-editor")
12375 (synopsis "Programmatically open an editor, capture the result")
12376 (description
12377 "python-editor is a library that provides the editor module for
12378 programmatically interfacing with your system's $EDITOR.")
12379 (license license:asl2.0)))
12380
12381 (define-public python2-editor
12382 (package-with-python2 python-editor))
12383
12384 (define-public python-multiprocessing-logging
12385 (package
12386 (name "python-multiprocessing-logging")
12387 (version "0.3.1")
12388 (home-page "https://github.com/jruere/multiprocessing-logging")
12389 (source (origin
12390 (method git-fetch)
12391 (uri (git-reference
12392 (url home-page)
12393 (commit (string-append "v" version))))
12394 (file-name (git-file-name name version))
12395 (sha256
12396 (base32
12397 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
12398 (build-system python-build-system)
12399 (synopsis "Manage logs from multiple processes")
12400 (description
12401 "This Python module implements a multiprocessing-aware @code{Handler}
12402 that, when set on the root @code{Logger}, will tunnel log records to the
12403 main process so that they are handled correctly.")
12404 (license license:lgpl3+)))
12405
12406 (define-public python-vobject
12407 (package
12408 (name "python-vobject")
12409 (version "0.9.6.1")
12410 (source (origin
12411 (method url-fetch)
12412 (uri (pypi-uri "vobject" version))
12413 (sha256
12414 (base32
12415 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
12416 (build-system python-build-system)
12417 (arguments
12418 '(;; The test suite relies on some non-portable Windows interfaces.
12419 #:tests? #f))
12420 (propagated-inputs
12421 `(("python-dateutil" ,python-dateutil)
12422 ("python-pyicu" ,python-pyicu)))
12423 (synopsis "Parse and generate vCard and vCalendar files")
12424 (description "Vobject is intended to be a full featured Python package for
12425 parsing and generating vCard and vCalendar files. Currently, iCalendar files
12426 are supported and well tested. vCard 3.0 files are supported, and all data
12427 should be imported, but only a few components are understood in a sophisticated
12428 way.")
12429 (home-page "https://eventable.github.io/vobject/")
12430 (license license:asl2.0)))
12431
12432 (define-public python2-vobject
12433 (package-with-python2 python-vobject))
12434
12435 (define-public python-munkres
12436 (package
12437 (name "python-munkres")
12438 (version "1.0.8")
12439 (source (origin
12440 (method url-fetch)
12441 (uri (pypi-uri "munkres" version))
12442 (sha256
12443 (base32
12444 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
12445 (build-system python-build-system)
12446 (arguments
12447 '(#:tests? #f)) ; no test suite
12448 (home-page "https://software.clapper.org/munkres/")
12449 (synopsis "Implementation of the Munkres algorithm")
12450 (description "The Munkres module provides an implementation of the Munkres
12451 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
12452 useful for solving the Assignment Problem.")
12453 (license license:bsd-3)))
12454
12455 (define-public python2-munkres
12456 (package-with-python2 python-munkres))
12457
12458 (define-public python-whoosh
12459 (package
12460 (name "python-whoosh")
12461 (version "2.7.4")
12462 (source
12463 (origin
12464 (method url-fetch)
12465 (uri (pypi-uri "Whoosh" version))
12466 (sha256
12467 (base32
12468 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
12469 (build-system python-build-system)
12470 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
12471 (native-inputs
12472 `(("python-pytest" ,python-pytest)))
12473 (home-page "https://bitbucket.org/mchaput/whoosh")
12474 (synopsis "Full text indexing, search, and spell checking library")
12475 (description
12476 "Whoosh is a fast, pure-Python full text indexing, search, and spell
12477 checking library.")
12478 (license license:bsd-2)))
12479
12480 (define-public python2-whoosh
12481 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
12482 (package/inherit whoosh
12483 (propagated-inputs
12484 `(("python2-backport-ssl-match-hostname"
12485 ,python2-backport-ssl-match-hostname)
12486 ,@(package-propagated-inputs whoosh))))))
12487
12488 (define-public python-pathlib
12489 (package
12490 (name "python-pathlib")
12491 (version "1.0.1")
12492 (source (origin
12493 (method url-fetch)
12494 (uri (pypi-uri "pathlib" version))
12495 (sha256
12496 (base32
12497 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
12498 (build-system python-build-system)
12499 ;; The tests depend on the internal "test" module, which does not provide
12500 ;; a stable interface.
12501 (arguments `(#:tests? #f))
12502 (home-page "https://pathlib.readthedocs.org/")
12503 (synopsis "Object-oriented file system paths")
12504 (description "Pathlib offers a set of classes to handle file system paths.
12505 It offers the following advantages over using string objects:
12506
12507 @enumerate
12508 @item No more cumbersome use of os and os.path functions. Everything can
12509 be done easily through operators, attribute accesses, and method calls.
12510 @item Embodies the semantics of different path types. For example,
12511 comparing Windows paths ignores casing.
12512 @item Well-defined semantics, eliminating any inconsistencies or
12513 ambiguities (forward vs. backward slashes, etc.).
12514 @end enumerate
12515
12516 Note: In Python 3.4, pathlib is now part of the standard library. For other
12517 Python versions please consider python-pathlib2 instead, which tracks the
12518 standard library module. This module (python-pathlib) isn't maintained
12519 anymore.")
12520 (license license:expat)))
12521
12522 (define-public python2-pathlib
12523 (package-with-python2 python-pathlib))
12524
12525 (define-public python2-pathlib2
12526 (package
12527 (name "python2-pathlib2")
12528 (version "2.3.5")
12529 (source (origin
12530 (method url-fetch)
12531 (uri (pypi-uri "pathlib2" version))
12532 (sha256
12533 (base32
12534 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
12535 (build-system python-build-system)
12536 ;; We only need the the Python 2 variant, since for Python 3 our minimum
12537 ;; version is 3.4 which already includes this package as part of the
12538 ;; standard library.
12539 (arguments
12540 `(#:python ,python-2))
12541 (propagated-inputs
12542 `(("python2-scandir" ,python2-scandir)
12543 ("python2-six" ,python2-six)))
12544 (home-page "https://pypi.org/project/pathlib2/")
12545 (synopsis "Object-oriented file system paths - backport of standard
12546 pathlib module")
12547 (description "The goal of pathlib2 is to provide a backport of standard
12548 pathlib module which tracks the standard library module, so all the newest
12549 features of the standard pathlib can be used also on older Python versions.
12550
12551 Pathlib offers a set of classes to handle file system paths. It offers the
12552 following advantages over using string objects:
12553
12554 @enumerate
12555 @item No more cumbersome use of os and os.path functions. Everything can
12556 be done easily through operators, attribute accesses, and method calls.
12557 @item Embodies the semantics of different path types. For example,
12558 comparing Windows paths ignores casing.
12559 @item Well-defined semantics, eliminating any inconsistencies or
12560 ambiguities (forward vs. backward slashes, etc.).
12561 @end enumerate")
12562 (license license:expat)))
12563
12564 (define-public python2-pathlib2-bootstrap
12565 (hidden-package
12566 (package
12567 (inherit python2-pathlib2)
12568 (name "python2-pathlib2-bootstrap")
12569 (propagated-inputs
12570 `(("python2-scandir" ,python2-scandir)
12571 ("python2-six" ,python2-six-bootstrap))))))
12572
12573 (define-public python-jellyfish
12574 (package
12575 (name "python-jellyfish")
12576 (version "0.5.6")
12577 (source (origin
12578 (method url-fetch)
12579 (uri (pypi-uri "jellyfish" version))
12580 (sha256
12581 (base32
12582 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
12583 (build-system python-build-system)
12584 (native-inputs
12585 `(("python-pytest" ,python-pytest)))
12586 (home-page "https://github.com/jamesturk/jellyfish")
12587 (synopsis "Approximate and phonetic matching of strings")
12588 (description "Jellyfish uses a variety of string comparison and phonetic
12589 encoding algorithms to do fuzzy string matching.")
12590 (license license:bsd-2)
12591 (properties `((python2-variant . ,(delay python2-jellyfish))))))
12592
12593 (define-public python2-jellyfish
12594 (let ((jellyfish (package-with-python2
12595 (strip-python2-variant python-jellyfish))))
12596 (package/inherit jellyfish
12597 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
12598 ,@(package-native-inputs jellyfish))))))
12599
12600 (define-public python2-unicodecsv
12601 (package
12602 (name "python2-unicodecsv")
12603 (version "0.14.1")
12604 (source (origin
12605 (method git-fetch)
12606 ;; The test suite is not included in the PyPi release.
12607 ;; https://github.com/jdunck/python-unicodecsv/issues/19
12608 (uri (git-reference
12609 (url "https://github.com/jdunck/python-unicodecsv")
12610 (commit version)))
12611 (file-name (git-file-name name version))
12612 (sha256
12613 (base32
12614 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
12615 (build-system python-build-system)
12616 (arguments
12617 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
12618 #:python ,python-2))
12619 (native-inputs
12620 `(("python2-unittest2" ,python2-unittest2)))
12621 (home-page "https://github.com/jdunck/python-unicodecsv")
12622 (synopsis "Unicode CSV module for Python 2")
12623 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
12624 module, adding support for Unicode strings.")
12625 (license license:bsd-2)))
12626
12627 (define-public python-pdfminer-six
12628 (package
12629 (name "python-pdfminer-six")
12630 (version "20201018")
12631 ;; There are no tests in the PyPI tarball.
12632 (source
12633 (origin
12634 (method git-fetch)
12635 (uri (git-reference
12636 (url "https://github.com/pdfminer/pdfminer.six")
12637 (commit version)))
12638 (file-name (git-file-name name version))
12639 (sha256
12640 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
12641 (build-system python-build-system)
12642 (arguments
12643 `(#:phases
12644 (modify-phases %standard-phases
12645 ;; Tests write to the source tree.
12646 (add-after 'unpack 'make-git-checkout-writable
12647 (lambda _
12648 (for-each make-file-writable (find-files "."))
12649 #t))
12650 (replace 'check
12651 (lambda _
12652 (invoke "make" "test")))
12653 (add-before 'reset-gzip-timestamps 'make-files-writable
12654 (lambda* (#:key outputs #:allow-other-keys)
12655 (let ((out (assoc-ref outputs "out")))
12656 (for-each make-file-writable
12657 (find-files out "\\.gz$"))
12658 #t))))))
12659 (propagated-inputs
12660 `(("python-chardet" ,python-chardet)
12661 ("python-cryptography" ,python-cryptography)
12662 ("python-sortedcontainers" ,python-sortedcontainers)))
12663 (native-inputs
12664 `(("python-nose" ,python-nose)
12665 ("python-tox" ,python-tox)))
12666 (home-page "https://github.com/pdfminer/pdfminer.six")
12667 (synopsis "PDF parser and analyzer")
12668 (description "@code{pdfminer.six} is a community maintained fork of
12669 the original PDFMiner. It is a tool for extracting information from PDF
12670 documents. It focuses on getting and analyzing text data. Pdfminer.six
12671 extracts the text from a page directly from the sourcecode of the PDF. It
12672 can also be used to get the exact location, font or color of the text.")
12673 (license license:expat)))
12674
12675 (define-public python-rarfile
12676 (package
12677 (name "python-rarfile")
12678 (version "2.8")
12679 (source (origin
12680 (method url-fetch)
12681 (uri (pypi-uri "rarfile" version))
12682 (sha256
12683 (base32
12684 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
12685 (build-system python-build-system)
12686 (arguments
12687 '(#:phases
12688 (modify-phases %standard-phases
12689 (replace 'check
12690 ;; Many tests fail, but the installation proceeds.
12691 (lambda _ (invoke "make" "-C" "test" "test"))))))
12692 (native-inputs
12693 `(("which" ,which))) ; required for tests
12694 (propagated-inputs
12695 `(("libarchive" ,libarchive)))
12696 (home-page "https://github.com/markokr/rarfile")
12697 (synopsis "RAR archive reader for Python")
12698 (description "This is Python module for RAR archive reading. The interface
12699 is made as zipfile like as possible.")
12700 (license license:isc)))
12701
12702 (define-public python2-rarfile
12703 (package-with-python2 python-rarfile))
12704
12705 (define-public python-magic
12706 (package
12707 (name "python-magic")
12708 (version "0.4.15")
12709 (source
12710 (origin
12711 (method url-fetch)
12712 (uri (pypi-uri "python-magic" version))
12713 (sha256
12714 (base32
12715 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
12716 (file-name (string-append name "-" version "-checkout"))))
12717 (build-system python-build-system)
12718 (arguments
12719 ;; The tests are unreliable, so don't run them. The tests fail
12720 ;; under Python3 because they were written for Python2 and
12721 ;; contain import statements that do not work in Python3. One of
12722 ;; the tests fails under Python2 because its assertions are
12723 ;; overly stringent; it relies on comparing output strings which
12724 ;; are brittle and can change depending on the version of
12725 ;; libmagic being used and the system on which the test is
12726 ;; running. In my case, under GuixSD 0.10.0, only one test
12727 ;; failed, and it seems to have failed only because the version
12728 ;; of libmagic that is packaged in Guix outputs a slightly
12729 ;; different (but not wrong) string than the one that the test
12730 ;; expected.
12731 '(#:tests? #f
12732 #:phases (modify-phases %standard-phases
12733 ;; Replace a specific method call with a hard-coded
12734 ;; path to the necessary libmagic.so file in the
12735 ;; store. If we don't do this, then the method call
12736 ;; will fail to find the libmagic.so file, which in
12737 ;; turn will cause any application using
12738 ;; python-magic to fail.
12739 (add-before 'build 'hard-code-path-to-libmagic
12740 (lambda* (#:key inputs #:allow-other-keys)
12741 (let ((file (assoc-ref inputs "file")))
12742 (substitute* "magic.py"
12743 (("ctypes.util.find_library\\('magic'\\)")
12744 (string-append "'" file "/lib/libmagic.so'")))
12745 #t)))
12746 (add-before 'install 'disable-egg-compression
12747 (lambda _
12748 (let ((port (open-file "setup.cfg" "a")))
12749 (display "\n[easy_install]\nzip_ok = 0\n"
12750 port)
12751 (close-port port)
12752 #t))))))
12753 (inputs
12754 ;; python-magic needs to be able to find libmagic.so.
12755 `(("file" ,file)))
12756 (home-page
12757 "https://github.com/ahupp/python-magic")
12758 (synopsis
12759 "File type identification using libmagic")
12760 (description
12761 "This module uses ctypes to access the libmagic file type
12762 identification library. It makes use of the local magic database and
12763 supports both textual and MIME-type output. Note that this module and
12764 the python-file module both provide a \"magic.py\" file; these two
12765 modules, which are different and were developed separately, both serve
12766 the same purpose: to provide Python bindings for libmagic.")
12767 (license license:expat)))
12768
12769 (define-public python2-magic
12770 (package-with-python2 python-magic))
12771
12772 (define-public python2-s3cmd
12773 (package
12774 (name "python2-s3cmd")
12775 (version "1.6.1")
12776 (source
12777 (origin
12778 (method url-fetch)
12779 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12780 "s3cmd-" version ".tar.gz"))
12781 (sha256
12782 (base32
12783 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12784 (build-system python-build-system)
12785 (arguments
12786 ;; s3cmd is written for python2 only and contains no tests.
12787 `(#:python ,python-2
12788 #:tests? #f))
12789 (propagated-inputs
12790 `(("python2-dateutil" ,python2-dateutil)
12791 ;; The python-file package also provides a magic.py module.
12792 ;; This is an unfortunate state of affairs; however, s3cmd
12793 ;; fails to install if it cannot find specifically the
12794 ;; python-magic package. Thus we include it, instead of using
12795 ;; python-file. Ironically, s3cmd sometimes works better
12796 ;; without libmagic bindings at all:
12797 ;; https://github.com/s3tools/s3cmd/issues/198
12798 ("python2-magic" ,python2-magic)))
12799 (home-page "https://s3tools.org/s3cmd")
12800 (synopsis "Command line tool for S3-compatible storage services")
12801 (description
12802 "S3cmd is a command line tool for uploading, retrieving and managing data
12803 in storage services that are compatible with the Amazon Simple Storage
12804 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12805 GnuPG encryption, and more. It also supports management of Amazon's
12806 CloudFront content delivery network.")
12807 (license license:gpl2+)))
12808
12809 (define-public python-pkgconfig
12810 (package
12811 (name "python-pkgconfig")
12812 (version "1.3.1")
12813 (source
12814 (origin
12815 (method url-fetch)
12816 (uri (pypi-uri "pkgconfig" version))
12817 (sha256
12818 (base32
12819 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
12820 (build-system python-build-system)
12821 (native-inputs
12822 `(("python-nose" ,python-nose)))
12823 (inputs
12824 `(("pkg-config" ,pkg-config)))
12825 (arguments
12826 `(#:phases
12827 (modify-phases %standard-phases
12828 (add-before 'build 'patch
12829 ;; Hard-code the path to pkg-config.
12830 (lambda _
12831 (substitute* "pkgconfig/pkgconfig.py"
12832 (("cmd = 'pkg-config")
12833 (string-append "cmd = '" (which "pkg-config"))))
12834 #t))
12835 (replace 'check
12836 (lambda _
12837 (invoke "nosetests" "test.py"))))))
12838 (home-page "https://github.com/matze/pkgconfig")
12839 (synopsis "Python interface for pkg-config")
12840 (description "This module provides a Python interface to pkg-config. It
12841 can be used to find all pkg-config packages, check if a package exists,
12842 check if a package meets certain version requirements, query CFLAGS and
12843 LDFLAGS and parse the output to build extensions with setup.py.")
12844 (license license:expat)))
12845
12846 (define-public python2-pkgconfig
12847 (package-with-python2 python-pkgconfig))
12848
12849 (define-public python-bz2file
12850 (package
12851 (name "python-bz2file")
12852 (version "0.98")
12853 (source
12854 (origin
12855 (method url-fetch)
12856 (uri (pypi-uri "bz2file" version))
12857 (sha256
12858 (base32
12859 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12860 (build-system python-build-system)
12861 (arguments
12862 `(#:tests? #f)) ; Tests use deprecated python modules.
12863 (home-page "https://github.com/nvawda/bz2file")
12864 (synopsis "Read and write bzip2-compressed files")
12865 (description
12866 "Bz2file is a Python library for reading and writing bzip2-compressed
12867 files. It contains a drop-in replacement for the I/O interface in the
12868 standard library's @code{bz2} module, including features from the latest
12869 development version of CPython that are not available in older releases.")
12870 (license license:asl2.0)))
12871
12872 (define-public python2-bz2file
12873 (package-with-python2 python-bz2file))
12874
12875 (define-public python-future
12876 (package
12877 (name "python-future")
12878 (version "0.17.1")
12879 (source
12880 (origin
12881 (method url-fetch)
12882 (uri (pypi-uri "future" version))
12883 (sha256
12884 (base32
12885 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12886 (build-system python-build-system)
12887 ;; Many tests connect to the network or are otherwise flawed.
12888 ;; https://github.com/PythonCharmers/python-future/issues/210
12889 (arguments
12890 `(#:tests? #f))
12891 (home-page "https://python-future.org")
12892 (synopsis "Single-source support for Python 3 and 2")
12893 (description
12894 "@code{python-future} is the missing compatibility layer between Python 2 and
12895 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12896 to support both Python 2 and Python 3 with minimal overhead.")
12897 (license license:expat)))
12898
12899 (define-public python2-future
12900 (package-with-python2 python-future))
12901
12902 (define-public python-cysignals
12903 (package
12904 (name "python-cysignals")
12905 (version "1.9.0")
12906 (source
12907 (origin
12908 (method url-fetch)
12909 (uri (pypi-uri "cysignals" version))
12910 (sha256
12911 (base32
12912 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12913 (build-system python-build-system)
12914 (native-inputs
12915 `(("python-cython" ,python-cython)
12916 ("python-sphinx" ,python-sphinx)))
12917 (inputs
12918 `(("pari-gp" ,pari-gp)))
12919 (arguments
12920 `(#:modules ((guix build python-build-system)
12921 ((guix build gnu-build-system) #:prefix gnu:)
12922 (guix build utils))
12923 ;; FIXME: Tests are executed after installation and currently fail
12924 ;; when not installing into standard locations; the author is working
12925 ;; on a fix.
12926 #:tests? #f
12927 #:phases
12928 (modify-phases %standard-phases
12929 (add-before
12930 'build 'configure
12931 (assoc-ref gnu:%standard-phases 'configure)))))
12932 (home-page
12933 "https://github.com/sagemath/cysignals")
12934 (synopsis
12935 "Handling of interrupts and signals for Cython")
12936 (description
12937 "The cysignals package provides mechanisms to handle interrupts (and
12938 other signals and errors) in Cython code, using two related approaches,
12939 for mixed Cython/Python code or external C libraries and pure Cython code,
12940 respectively.")
12941 (license license:lgpl3+)))
12942
12943 (define-public python2-cysignals
12944 (package-with-python2 python-cysignals))
12945
12946 (define-public python2-shedskin
12947 (package
12948 (name "python2-shedskin")
12949 (version "0.9.4")
12950 (source
12951 (origin
12952 (method url-fetch)
12953 (uri (string-append "https://github.com/shedskin/shedskin/"
12954 "releases/download/v" version
12955 "/shedskin-" version ".tgz"))
12956 (sha256
12957 (base32
12958 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12959 (build-system python-build-system)
12960 (arguments
12961 `(#:python ,python-2
12962 #:phases (modify-phases %standard-phases
12963 (add-after 'unpack 'fix-resulting-include-libs
12964 (lambda* (#:key inputs #:allow-other-keys)
12965 (let ((libgc (assoc-ref inputs "libgc"))
12966 (pcre (assoc-ref inputs "pcre")))
12967 (substitute* "shedskin/makefile.py"
12968 (("variable == 'CCFLAGS':[ ]*")
12969 (string-append "variable == 'CCFLAGS':\n"
12970 " line += ' -I " pcre "/include"
12971 " -I " libgc "/include'"))
12972 (("variable == 'LFLAGS':[ ]*")
12973 (string-append "variable == 'LFLAGS':\n"
12974 " line += ' -L" pcre "/lib"
12975 " -L " libgc "/lib'")))
12976 #t))))))
12977 (inputs `(("pcre" ,pcre)
12978 ("libgc" ,libgc)))
12979 (home-page "https://shedskin.github.io/")
12980 (synopsis "Experimental Python-2 to C++ Compiler")
12981 (description (string-append "This is an experimental compiler for a subset of
12982 Python. It generates C++ code and a Makefile."))
12983 (license (list license:gpl3 license:bsd-3 license:expat))))
12984
12985 (define-public python2-rope
12986 (package
12987 (name "python2-rope")
12988 (version "0.11.0")
12989 (source
12990 (origin
12991 (method url-fetch)
12992 (uri (pypi-uri "rope" version))
12993 (sha256
12994 (base32
12995 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12996 (arguments
12997 ;; Rope has only partial python3 support, see `python-rope'
12998 `(#:python ,python-2))
12999 (build-system python-build-system)
13000 (native-inputs
13001 `(("python2-unittest2" ,python2-unittest2)))
13002 (home-page "https://github.com/python-rope/rope")
13003 (synopsis "Refactoring library for Python")
13004 (description "Rope is a refactoring library for Python. It facilitates
13005 the renaming, moving and extracting of attributes, functions, modules, fields
13006 and parameters in Python 2 source code. These refactorings can also be applied
13007 to occurrences in strings and comments.")
13008 (license license:gpl2)))
13009
13010 (define-public python-rope
13011 (package/inherit python2-rope
13012 (name "python-rope")
13013 (arguments `(#:python ,python-wrapper
13014 ;; XXX: Only partial python3 support, results in some failing
13015 ;; tests: <https://github.com/python-rope/rope/issues/247>.
13016 #:tests? #f))
13017 (properties `((python2-variant . ,(delay python2-rope))))))
13018
13019 (define-public python-py3status
13020 (package
13021 (name "python-py3status")
13022 (version "3.21")
13023 (source
13024 (origin
13025 (method url-fetch)
13026 (uri (pypi-uri "py3status" version))
13027 (sha256
13028 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
13029 (build-system python-build-system)
13030 (inputs
13031 `(("file" ,file)))
13032 (arguments
13033 '(#:phases
13034 (modify-phases %standard-phases
13035 ;; 'file' is used for detection of configuration file encoding
13036 ;; let's make link the dependency to particular input
13037 (add-before 'build 'patch-file-path
13038 (lambda* (#:key inputs #:allow-other-keys)
13039 (let ((file-path (assoc-ref inputs "file")))
13040 (substitute* "py3status/parse_config.py"
13041 (("\\[\"file\", \"-b\"")
13042 (string-append "['" file-path "/bin/file', '-b'")))
13043 #t))))
13044 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
13045 (home-page "https://github.com/ultrabug/py3status")
13046 (synopsis "Extensible i3status wrapper written in Python")
13047 (description "py3status is an i3status wrapper which extends i3status
13048 functionality in a modular way, allowing you to extend your panel with your
13049 own code, responding to click events and updating clock every second.")
13050 (license license:bsd-3)))
13051
13052 (define-public python2-selectors2
13053 (package
13054 (name "python2-selectors2")
13055 (version "2.0.1")
13056 (source (origin
13057 (method url-fetch)
13058 (uri (pypi-uri "selectors2" version))
13059 (sha256
13060 (base32
13061 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
13062 (build-system python-build-system)
13063 (arguments
13064 `(#:python ,python-2))
13065 (native-inputs
13066 `(("python2-mock" ,python2-mock)
13067 ("python2-psutil" ,python2-psutil)))
13068 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
13069 (synopsis "Backport of the selectors module from Python 3.5+")
13070 (description
13071 "This package provides a drop-in replacement for the @code{selectors}
13072 module in Python 3.5 and later.")
13073 (license license:expat)))
13074
13075 (define-public python-tblib
13076 (package
13077 (name "python-tblib")
13078 (version "1.6.0")
13079 (source (origin
13080 (method url-fetch)
13081 (uri (pypi-uri "tblib" version))
13082 (sha256
13083 (base32
13084 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
13085 (build-system python-build-system)
13086 (arguments
13087 `(#:phases
13088 (modify-phases %standard-phases
13089 (replace 'check
13090 (lambda _
13091 ;; Upstream runs tests after installation and the package itself
13092 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
13093 ;; found.
13094 (setenv "PYTHONPATH"
13095 (string-append (getcwd) "/build/lib:"
13096 (getenv "PYTHONPATH")))
13097 (invoke "py.test" "-vv" "tests" "README.rst"))))))
13098 (native-inputs
13099 `(("python-pytest" ,python-pytest)
13100 ("python-six" ,python-six)))
13101 (home-page "https://github.com/ionelmc/python-tblib")
13102 (synopsis "Traceback serialization library")
13103 (description
13104 "Traceback serialization allows you to:
13105
13106 @enumerate
13107 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
13108 different processes. This allows better error handling when running code over
13109 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
13110
13111 @item Parse traceback strings and raise with the parsed tracebacks.
13112 @end enumerate\n")
13113 (license license:bsd-3)))
13114
13115 (define-public python2-tblib
13116 (package-with-python2 python-tblib))
13117
13118 (define-public python-greenlet
13119 (package
13120 (name "python-greenlet")
13121 (version "1.0.0")
13122 (source (origin
13123 (method url-fetch)
13124 (uri (pypi-uri "greenlet" version))
13125 (sha256
13126 (base32
13127 "1y6wbg9yhm9dw6m768n4yslp56h85pnxkk3drz6icn15g6f1d7ki"))))
13128 (build-system python-build-system)
13129 (home-page "https://greenlet.readthedocs.io/")
13130 (synopsis "Lightweight in-process concurrent programming")
13131 (description
13132 "Greenlet package is a spin-off of Stackless, a version of CPython
13133 that supports micro-threads called \"tasklets\". Tasklets run
13134 pseudo-concurrently (typically in a single or a few OS-level threads) and
13135 are synchronized with data exchanges on \"channels\".")
13136 (license (list license:psfl license:expat))))
13137
13138 (define-public python-objgraph
13139 (package
13140 (name "python-objgraph")
13141 (version "3.4.1")
13142 (source
13143 (origin
13144 (method url-fetch)
13145 (uri (pypi-uri "objgraph" version))
13146 (sha256
13147 (base32
13148 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
13149 (build-system python-build-system)
13150 (propagated-inputs
13151 `(("python-graphviz" ,python-graphviz)))
13152 (native-inputs
13153 `(("python-mock" ,python-mock)
13154 ("graphviz" ,graphviz)))
13155 (home-page "https://mg.pov.lt/objgraph/")
13156 (synopsis "Draw Python object reference graphs with graphviz")
13157 (description
13158 "This package provides tools to draw Python object reference graphs with
13159 graphviz.")
13160 (license license:expat)))
13161
13162 (define-public python2-objgraph
13163 (package-with-python2 python-objgraph))
13164
13165 (define-public python-gevent
13166 (package
13167 (name "python-gevent")
13168 (version "21.1.2")
13169 (source (origin
13170 (method url-fetch)
13171 (uri (pypi-uri "gevent" version))
13172 (sha256
13173 (base32
13174 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
13175 (modules '((guix build utils)))
13176 (snippet
13177 '(begin
13178 ;; unbunding libev and c-ares
13179 (delete-file-recursively "deps")))))
13180 (build-system python-build-system)
13181 (arguments
13182 `(#:modules ((ice-9 ftw)
13183 (ice-9 match)
13184 (srfi srfi-26)
13185 (guix build utils)
13186 (guix build python-build-system))
13187 #:phases (modify-phases %standard-phases
13188 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
13189 (lambda _
13190 (substitute* "src/gevent/subprocess.py"
13191 (("/bin/sh") (which "sh")))
13192 (for-each (lambda (file)
13193 (substitute* file
13194 (("/bin/sh") (which "sh"))
13195 (("/bin/true") (which "true"))))
13196 (find-files "src/greentest" "\\.py$"))))
13197 (add-before 'build 'do-not-use-bundled-sources
13198 (lambda _
13199 (setenv "GEVENTSETUP_EMBED" "0")
13200
13201 ;; Prevent building bundled libev.
13202 (substitute* "setup.py"
13203 (("run_make=_BUILDING")
13204 "run_make=False"))))
13205 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
13206 (lambda* (#:key inputs #:allow-other-keys)
13207 (let ((greenlet (string-append
13208 (assoc-ref inputs "python-greenlet")
13209 "/include")))
13210 (match (scandir greenlet
13211 (lambda (item)
13212 (string-prefix? "python" item)))
13213 ((python)
13214 (setenv "C_INCLUDE_PATH"
13215 (string-append greenlet "/" python ":"
13216 (or (getenv "C_INCLUDE_PATH")
13217 ""))))))))
13218 (add-before 'check 'pretend-to-be-CI
13219 (lambda _
13220 ;; A few tests are skipped due to network constraints or
13221 ;; get longer timeouts when running in a CI environment.
13222 ;; Piggy-back on that, as we need the same adjustments.
13223 (setenv "TRAVIS" "1")
13224 (setenv "APPVEYOR" "1")))
13225 (add-before 'check 'adjust-tests
13226 (lambda _
13227 (let ((disabled-tests
13228 '(;; These tests relies on networking which is
13229 ;; not available in the build container.
13230 "test__getaddrinfo_import.py"
13231 "test__server_pywsgi.py"
13232 ;; XXX: These tests borrow functionality from the
13233 ;; Python builtin 'test' module, but it is not
13234 ;; installed with the Guix Python distribution.
13235 "test_smtpd.py"
13236 "test_wsgiref.py"
13237 "test_urllib2.py"
13238 "test_thread.py"
13239 "test_threading.py"
13240 "test__threading_2.py"
13241 ;; These tests rely on KeyboardInterrupts which do not
13242 ;; work inside the build container for some reason
13243 ;; (lack of controlling terminal?).
13244 "test_subprocess.py"
13245 "test__issues461_471.py"
13246 ;; TODO: Patch out the tests that use getprotobyname, etc
13247 ;; instead of disabling all the tests from these files.
13248 "test__resolver_dnspython.py"
13249 "test__doctests.py"
13250 "test__all__.py"
13251 "test___config.py"
13252 "test__execmodules.py")))
13253 (call-with-output-file "skipped_tests.txt"
13254 (lambda (port)
13255 (format port "~a~%"
13256 (string-join disabled-tests "\n")))))))
13257 (replace 'check
13258 (lambda _
13259 ;; Make sure the build directory is on PYTHONPATH.
13260 (setenv "PYTHONPATH"
13261 (string-append
13262 (getenv "PYTHONPATH") ":"
13263 (getcwd) "/build/"
13264 (car (scandir "build" (cut string-prefix? "lib." <>)))))
13265
13266 ;; Use the build daemons configured number of workers.
13267 (setenv "NWORKERS" (number->string (parallel-job-count)))
13268
13269 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
13270 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
13271 (propagated-inputs
13272 `(("python-greenlet" ,python-greenlet)
13273 ("python-objgraph" ,python-objgraph)
13274 ("python-zope.event" ,python-zope-event)
13275 ("python-zope.interface" ,python-zope-interface)))
13276 (native-inputs
13277 `(("python-six" ,python-six)
13278
13279 ;; For tests.
13280 ("python-dnspython" ,python-dnspython)
13281 ("python-psutil" ,python-psutil)))
13282 (inputs
13283 `(("c-ares" ,c-ares)
13284 ("libev" ,libev)))
13285 (home-page "https://www.gevent.org/")
13286 (synopsis "Coroutine-based network library")
13287 (description
13288 "@code{gevent} is a coroutine-based Python networking library that uses
13289 @code{greenlet} to provide a high-level synchronous API on top of the
13290 @code{libev} event loop.")
13291 (license license:expat)))
13292
13293 (define-public python-fastimport
13294 (package
13295 (name "python-fastimport")
13296 (version "0.9.9")
13297 (source
13298 (origin
13299 (method url-fetch)
13300 (uri (pypi-uri "fastimport" version))
13301 (sha256
13302 (base32 "06gk14qgm9dxx3pzjn0ckdbywc8ial2bjfzddqwlr4bn1nnqkbll"))))
13303 (build-system python-build-system)
13304 (home-page "https://github.com/jelmer/python-fastimport")
13305 (synopsis "VCS fastimport parser and generator in Python")
13306 (description "This package provides a parser for and generator of the Git
13307 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
13308 format.")
13309 (license license:gpl2+)))
13310
13311 (define-public python2-fastimport
13312 (package-with-python2 python-fastimport))
13313
13314 (define-public python-twisted
13315 (package
13316 (name "python-twisted")
13317 (version "19.7.0")
13318 (source (origin
13319 (method url-fetch)
13320 (uri (pypi-uri "Twisted" version ".tar.bz2"))
13321 (sha256
13322 (base32
13323 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
13324 (build-system python-build-system)
13325 (arguments
13326 '(#:tests? #f)) ; FIXME: some tests fail
13327 (propagated-inputs
13328 `(("python-zope-interface" ,python-zope-interface)
13329 ("python-pyhamcrest" ,python-pyhamcrest)
13330 ("python-incremental" ,python-incremental)
13331 ("python-hyperlink" ,python-hyperlink)
13332 ("python-constantly" ,python-constantly)
13333 ("python-automat" ,python-automat)))
13334 (home-page "https://twistedmatrix.com/")
13335 (synopsis "Asynchronous networking framework written in Python")
13336 (description
13337 "Twisted is an extensible framework for Python programming, with special
13338 focus on event-based network programming and multiprotocol integration.")
13339 (license license:expat)))
13340
13341 (define-public python2-twisted
13342 (package-with-python2 python-twisted))
13343
13344 (define-public python-pika
13345 (package
13346 (name "python-pika")
13347 (version "0.12.0")
13348 (source
13349 (origin
13350 (method url-fetch)
13351 (uri (pypi-uri "pika" version))
13352 (sha256
13353 (base32
13354 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
13355 (build-system python-build-system)
13356 (native-inputs
13357 `(("python-pyev" ,python-pyev)
13358 ("python-tornado" ,python-tornado)
13359 ("python-twisted" ,python-twisted)))
13360 (home-page "https://pika.readthedocs.org")
13361 (synopsis "Pure Python AMQP Client Library")
13362 (description
13363 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
13364 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
13365 network support library.")
13366 (license license:bsd-3)))
13367
13368 (define-public python2-pika
13369 (package-with-python2 python-pika))
13370
13371 (define-public python-ply
13372 (package
13373 (name "python-ply")
13374 (version "3.11")
13375 (source
13376 (origin
13377 (method url-fetch)
13378 (uri (pypi-uri "ply" version))
13379 (sha256
13380 (base32
13381 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
13382 (build-system python-build-system)
13383 (home-page "http://www.dabeaz.com/ply/")
13384 (synopsis "Python Lex & Yacc")
13385 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
13386 It uses LR parsing and does extensive error checking.")
13387 (license license:bsd-3)))
13388
13389 (define-public python-tabulate
13390 (package
13391 (name "python-tabulate")
13392 (version "0.8.9")
13393 (source (origin
13394 (method url-fetch)
13395 (uri (pypi-uri "tabulate" version))
13396 (sha256
13397 (base32
13398 "19qkdz8xwk5jxa5xn53mnk76qnh4ysm81vzj664jw1b0azr167gb"))))
13399 (build-system python-build-system)
13400 (arguments
13401 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
13402 ;; and the latest release is not tagged in the upstream repository.
13403 '(#:tests? #f))
13404 (home-page "https://bitbucket.org/astanin/python-tabulate")
13405 (synopsis "Pretty-print tabular data")
13406 (description
13407 "Tabulate is a library and command-line utility to pretty-print tabular
13408 data in Python.")
13409 (license license:expat)))
13410
13411 (define-public python2-tabulate
13412 (package-with-python2 python-tabulate))
13413
13414 (define-public python-kazoo
13415 (package
13416 (name "python-kazoo")
13417 (version "2.4.0")
13418 (source
13419 (origin
13420 (method url-fetch)
13421 (uri (pypi-uri "kazoo" version))
13422 (sha256
13423 (base32
13424 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
13425 (build-system python-build-system)
13426 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
13427 (propagated-inputs
13428 `(("python-six" ,python-six)))
13429 (home-page "https://kazoo.readthedocs.org")
13430 (synopsis "High-level Zookeeper client library")
13431 (description
13432 "Kazoo is a Python client library for the Apache Zookeeper distributed
13433 application service. It is designed to be easy to use and to avoid common
13434 programming errors.")
13435 (license license:asl2.0)))
13436
13437 (define-public python2-kazoo
13438 (package-with-python2 python-kazoo))
13439
13440 (define-public python-pykafka
13441 (package
13442 (name "python-pykafka")
13443 (version "2.4.0")
13444 (source (origin
13445 (method url-fetch)
13446 (uri (pypi-uri "pykafka" version))
13447 (sha256
13448 (base32
13449 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
13450 (build-system python-build-system)
13451 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
13452 (propagated-inputs
13453 `(("python-gevent" ,python-gevent)
13454 ("python-kazoo" ,python-kazoo)
13455 ("python-tabulate" ,python-tabulate)))
13456 (inputs
13457 `(("librdkafka" ,librdkafka)))
13458 (home-page "https://pykafka.readthedocs.io/")
13459 (synopsis "Apache Kafka client for Python")
13460 (description
13461 "PyKafka is a client for the Apache Kafka distributed messaging system.
13462 It includes Python implementations of Kafka producers and consumers, which
13463 are optionally backed by a C extension built on librdkafka.")
13464 (license license:asl2.0)))
13465
13466 (define-public python-wcwidth
13467 (package
13468 (name "python-wcwidth")
13469 (version "0.1.8")
13470 (source (origin
13471 (method url-fetch)
13472 (uri (pypi-uri "wcwidth" version))
13473 (sha256
13474 (base32
13475 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
13476 (build-system python-build-system)
13477 (home-page "https://github.com/jquast/wcwidth")
13478 (synopsis "Measure number of terminal column cells of wide-character codes")
13479 (description "Wcwidth measures the number of terminal column cells of
13480 wide-character codes. It is useful for those implementing a terminal emulator,
13481 or programs that carefully produce output to be interpreted by one. It is a
13482 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
13483 specified in POSIX.1-2001 and POSIX.1-2008.")
13484 (license license:expat)))
13485
13486 (define-public python2-wcwidth
13487 (package-with-python2 python-wcwidth))
13488
13489 (define-public python2-jsonrpclib
13490 (package
13491 (name "python2-jsonrpclib")
13492 (version "0.1.7")
13493 (source (origin
13494 (method url-fetch)
13495 (uri (pypi-uri "jsonrpclib" version))
13496 (sha256
13497 (base32
13498 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
13499 (build-system python-build-system)
13500 (arguments
13501 `(#:tests? #f
13502 #:python ,python-2))
13503 (home-page "https://github.com/joshmarshall/jsonrpclib/")
13504 (synopsis "Implementation of JSON-RPC specification for Python")
13505 (description
13506 "This library is an implementation of the JSON-RPC specification.
13507 It supports both the original 1.0 specification, as well as the
13508 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
13509 etc.")
13510 (license license:asl2.0)))
13511
13512 (define-public python-chai
13513 (package
13514 (name "python-chai")
13515 (version "1.1.2")
13516 (source (origin
13517 (method url-fetch)
13518 (uri (pypi-uri "chai" version))
13519 (sha256
13520 (base32
13521 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
13522 (build-system python-build-system)
13523 (home-page "https://github.com/agoragames/chai")
13524 (synopsis "Mocking framework for Python")
13525 (description
13526 "Chai provides an api for mocking, stubbing and spying your python
13527 objects, patterned after the Mocha library for Ruby.")
13528 (license license:bsd-3)))
13529
13530 (define-public python2-chai
13531 (package-with-python2 python-chai))
13532
13533 (define-public python-inflection
13534 (package
13535 (name "python-inflection")
13536 (version "0.3.1")
13537 (source
13538 (origin (method url-fetch)
13539 (uri (pypi-uri "inflection" version))
13540 (sha256
13541 (base32
13542 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
13543 (build-system python-build-system)
13544 (native-inputs
13545 `(("python-pytest" ,python-pytest)))
13546 (home-page "https://github.com/jpvanhal/inflection")
13547 (synopsis "Python string transformation library")
13548 (description
13549 "Inflection is a string transformation library. It singularizes
13550 and pluralizes English words, and transforms strings from CamelCase to
13551 underscored string.")
13552 (license license:expat)))
13553
13554 (define-public python2-inflection
13555 (package-with-python2 python-inflection))
13556
13557 (define-public python-pylev
13558 (package
13559 (name "python-pylev")
13560 (version "1.3.0")
13561 (source (origin
13562 (method url-fetch)
13563 (uri (pypi-uri "pylev" version))
13564 (sha256
13565 (base32
13566 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
13567 (build-system python-build-system)
13568 (home-page "https://github.com/toastdriven/pylev")
13569 (synopsis "Levenshtein distance implementation in Python")
13570 (description "Pure Python Levenshtein implementation, based off the
13571 Wikipedia code samples at
13572 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
13573 (license license:bsd-3)))
13574
13575 (define-public python2-pylev
13576 (package-with-python2 python-pylev))
13577
13578 (define-public python-cleo
13579 (package
13580 (name "python-cleo")
13581 (version "0.8.1")
13582 (source (origin
13583 (method url-fetch)
13584 (uri (pypi-uri "cleo" version))
13585 (sha256
13586 (base32
13587 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
13588 (build-system python-build-system)
13589 (native-inputs
13590 `( ;; For testing
13591 ("python-mock" ,python-mock)
13592 ("python-pytest-mock" ,python-pytest-mock)
13593 ("python-pytest" ,python-pytest)))
13594 (propagated-inputs
13595 `(("python-backpack" ,python-backpack)
13596 ("python-clikit" ,python-clikit)
13597 ("python-pastel" ,python-pastel)
13598 ("python-pylev" ,python-pylev)))
13599 (home-page "https://github.com/sdispater/cleo")
13600 (synopsis "Command-line arguments library for Python")
13601 (description
13602 "Cleo allows you to create command-line commands with signature in
13603 docstring and colored output.")
13604 (license license:expat)))
13605
13606 (define-public python2-cleo
13607 (package-with-python2 python-cleo))
13608
13609 (define-public python-tomlkit
13610 (package
13611 (name "python-tomlkit")
13612 (version "0.7.0")
13613 (source
13614 (origin
13615 (method url-fetch)
13616 (uri (pypi-uri "tomlkit" version))
13617 (sha256
13618 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
13619 (build-system python-build-system)
13620 (native-inputs
13621 `(("python-pytest" ,python-pytest)
13622 ("python-pyyaml" ,python-pyyaml)))
13623 (home-page "https://github.com/sdispater/tomlkit")
13624 (synopsis "Style-preserving TOML library")
13625 (description
13626 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
13627 preserves all comments, indentations, whitespace and internal element ordering,
13628 and makes them accessible and editable via an intuitive API. It can also
13629 create new TOML documents from scratch using the provided helpers. Part of the
13630 implementation has been adapted, improved, and fixed from Molten.")
13631 (license license:expat)))
13632
13633 (define-public python-shellingham
13634 (package
13635 (name "python-shellingham")
13636 (version "1.3.2")
13637 (source
13638 (origin
13639 (method url-fetch)
13640 (uri (pypi-uri "shellingham" version))
13641 (sha256
13642 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
13643 (build-system python-build-system)
13644 (arguments
13645 `(#:phases
13646 (modify-phases %standard-phases
13647 (add-after 'unpack 'restore-setup.py
13648 ;; setup.py will return in the next release.
13649 ;; <https://github.com/sarugaku/shellingham/issues/33>
13650 (lambda _
13651 (with-output-to-file "setup.py"
13652 (lambda _
13653 (display "from setuptools import setup\nsetup()\n")))
13654 #t)))))
13655 (home-page "https://github.com/sarugaku/shellingham")
13656 (synopsis "Tool to detect surrounding shell")
13657 (description
13658 "Shellingham detects what shell the current Python executable is
13659 running in.")
13660 (license license:isc)))
13661
13662 (define-public python-memcached
13663 (package
13664 (name "python-memcached")
13665 (version "1.59")
13666 (source
13667 (origin
13668 (method url-fetch)
13669 (uri (pypi-uri "python-memcached" version))
13670 (sha256
13671 (base32
13672 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13673 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13674 (build-system python-build-system)
13675 (propagated-inputs `(("python-six" ,python-six)))
13676 (home-page
13677 "https://github.com/linsomniac/python-memcached")
13678 (synopsis "Pure python memcached client")
13679 (description
13680 "This software is a pure Python interface to the memcached memory cache
13681 daemon. It is the client side software which allows storing values in one or
13682 more, possibly remote, memcached servers.")
13683 (license license:psfl)))
13684
13685 (define-public python-clikit
13686 (package
13687 (name "python-clikit")
13688 (version "0.6.2")
13689 (source
13690 (origin
13691 (method url-fetch)
13692 (uri (pypi-uri "clikit" version))
13693 (sha256
13694 (base32
13695 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13696 (build-system python-build-system)
13697 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13698 (propagated-inputs
13699 `(("python-crashtest" ,python-crashtest)
13700 ("python-pastel" ,python-pastel)
13701 ("python-pylev" ,python-pylev)))
13702 (home-page "https://github.com/sdispater/clikit")
13703 (synopsis "Group of utilities to build command line interfaces")
13704 (description
13705 "CliKit is a group of utilities to build testable command line
13706 interfaces.")
13707 (properties `((python2-variant . ,(delay python2-clikit))))
13708 (license license:expat)))
13709
13710 (define-public python2-clikit
13711 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13712 (package/inherit
13713 base
13714 (propagated-inputs
13715 `(("python-enum34" ,python2-enum34)
13716 ("python-typing" ,python2-typing)
13717 ,@(package-propagated-inputs base))))))
13718
13719 (define-public python-msgpack-python
13720 (package
13721 (name "python-msgpack-python")
13722 (version "0.5.6")
13723 (source
13724 (origin
13725 (method url-fetch)
13726 (uri (pypi-uri "msgpack-python" version))
13727 (sha256
13728 (base32
13729 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13730 (build-system python-build-system)
13731 (home-page "https://msgpack.org/")
13732 (synopsis "Package to deserialize messages in MessagePack binary format")
13733 (description
13734 "MessagePack is an efficient binary serialization format. It lets you
13735 exchange data among multiple languages like JSON. But it's faster and
13736 smaller. Small integers are encoded into a single byte, and typical short
13737 strings require only one extra byte in addition to the strings themselves.")
13738 (license license:asl2.0)))
13739
13740 (define-public python-cachy
13741 (package
13742 (name "python-cachy")
13743 (version "0.3.0")
13744 (source
13745 (origin
13746 (method url-fetch)
13747 (uri (pypi-uri "cachy" version))
13748 (sha256
13749 (base32
13750 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13751 (build-system python-build-system)
13752 (arguments
13753 '(#:phases
13754 (modify-phases %standard-phases
13755 (replace 'check
13756 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13757 "pytest"))))))
13758 (native-inputs
13759 `(("memcached" ,memcached)
13760 ("python-fakeredis" ,python-fakeredis)
13761 ("python-flexmock" ,python-flexmock)
13762 ("python-pifpaf" ,python-pifpaf)
13763 ("python-pytest" ,python-pytest)))
13764 (propagated-inputs
13765 `(("python-memcached" ,python-memcached)
13766 ("python-msgpack-python" ,python-msgpack-python)
13767 ("python-redis" ,python-redis)))
13768 (home-page "https://github.com/sdispater/cachy")
13769 (synopsis "Simple yet effective caching library")
13770 (description
13771 "Cachy provides a simple yet effective caching library. A simple but
13772 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13773 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13774 (license license:expat)))
13775
13776 (define-public poetry
13777 (package
13778 (name "poetry")
13779 (version "1.1.5")
13780 ;; Poetry can only be built from source with Poetry.
13781 (source
13782 (origin
13783 (method url-fetch)
13784 (uri (pypi-uri "poetry" version))
13785 (sha256
13786 (base32
13787 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
13788 (build-system python-build-system)
13789 (arguments
13790 `(#:tests? #f ;; Pypi does not have tests.
13791 #:phases
13792 (modify-phases %standard-phases
13793 (add-before 'build 'patch-setup-py
13794 (lambda _
13795 (substitute* "setup.py"
13796 ;; Allow newer versions of python-keyring.
13797 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
13798 ;; TODO: remove after the next release cycle,
13799 ;; when packaging has been updated.
13800 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
13801 #t)))))
13802 (propagated-inputs
13803 `(("python-cachecontrol" ,python-cachecontrol)
13804 ("python-cachy" ,python-cachy)
13805 ("python-cleo" ,python-cleo)
13806 ("python-clikit" ,python-clikit)
13807 ("python-html5lib" ,python-html5lib)
13808 ("python-keyring" ,python-keyring)
13809 ("python-msgpack-transitional" ,python-msgpack-transitional)
13810 ("python-packaging" ,python-packaging)
13811 ("python-pexpect" ,python-pexpect)
13812 ("python-pip" ,python-pip)
13813 ("python-pkginfo" ,python-pkginfo)
13814 ("python-poetry-core" ,python-poetry-core)
13815 ("python-requests" ,python-requests)
13816 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
13817 ("python-shellingham" ,python-shellingham)
13818 ("python-tomlkit" ,python-tomlkit)
13819 ("python-virtualenv" ,python-virtualenv)))
13820 (home-page "https://python-poetry.org")
13821 (synopsis "Python dependency management and packaging made easy")
13822 (description "Poetry is a tool for dependency management and packaging
13823 in Python. It allows you to declare the libraries your project depends on and
13824 it will manage (install/update) them for you.")
13825 (license license:expat)))
13826
13827 (define-public python-lark-parser
13828 (package
13829 (name "python-lark-parser")
13830 (version "0.9.0")
13831 (source (origin
13832 (method url-fetch)
13833 (uri (pypi-uri "lark-parser" version))
13834 (sha256
13835 (base32
13836 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13837 (build-system python-build-system)
13838 (home-page "https://github.com/lark-parser/lark")
13839 (synopsis "Multi-language parser for Python")
13840 (description
13841 "Lark is a parser built with a focus on ergonomics, performance and
13842 resilience. Lark can parse all context-free languages. That means it is
13843 capable of parsing almost any programming language out there, and to
13844 some degree most natural languages too.")
13845 (license license:expat)))
13846
13847 (define-public python-libcst
13848 (package
13849 (name "python-libcst")
13850 (version "0.3.8")
13851 (source (origin
13852 (method url-fetch)
13853 (uri (pypi-uri "libcst" version))
13854 (sha256
13855 (base32
13856 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13857 (build-system python-build-system)
13858 (arguments
13859 `(#:phases
13860 (modify-phases %standard-phases
13861 (add-after 'unpack 'remove-failing-tests
13862 (lambda _
13863 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13864 (delete-file "libcst/tests/test_fuzz.py")
13865 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13866 (delete-file "libcst/tests/test_pyre_integration.py")
13867 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13868 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13869 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13870 #t))
13871 (add-before 'check 'generate-test-data
13872 (lambda _
13873 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13874 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13875 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13876 (replace 'check
13877 (lambda _
13878 (invoke "python" "-m" "unittest")
13879 #t)))))
13880 (native-inputs
13881 `(("python-black" ,python-black)
13882 ("python-isort" ,python-isort)))
13883 (propagated-inputs
13884 `(("python-typing-extensions" ,python-typing-extensions)
13885 ("python-typing-inspect" ,python-typing-inspect)
13886 ("python-pyyaml" ,python-pyyaml)))
13887 (home-page "https://github.com/Instagram/LibCST")
13888 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13889 (description
13890 "LibCST parses Python source code as a CST tree that keeps all
13891 formatting details (comments, whitespaces, parentheses, etc). It's useful
13892 for building automated refactoring (codemod) applications and linters.
13893 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13894 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13895 naming node types and fields, LibCST creates a lossless CST that looks and
13896 feels like an AST.")
13897 (license (list license:expat
13898 ;; Some files unde libcst/_parser/ are under Python Software
13899 ;; Foundation license (see LICENSE file for details)
13900 license:psfl
13901 ;; libcst/_add_slots.py
13902 license:asl2.0))))
13903
13904 (define-public python-typing-inspect
13905 (package
13906 (name "python-typing-inspect")
13907 (version "0.6.0")
13908 (source (origin
13909 (method url-fetch)
13910 (uri (pypi-uri "typing_inspect" version))
13911 (sha256
13912 (base32
13913 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13914 (build-system python-build-system)
13915 (propagated-inputs
13916 `(("python-mypy-extensions" ,python-mypy-extensions)
13917 ("python-typing-extensions" ,python-typing-extensions)))
13918 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13919 (synopsis "API for inspection of types in the Python @code{typing} module")
13920 (description
13921 "The @code{typing_inspect} module defines experimental API for runtime
13922 inspection of types defined in the Python standard typing module.")
13923 (license license:expat)))
13924
13925 (define-public python-lazy-object-proxy
13926 (package
13927 (name "python-lazy-object-proxy")
13928 (version "1.5.1")
13929 (source (origin
13930 (method url-fetch)
13931 (uri (pypi-uri "lazy-object-proxy" version))
13932 (sha256
13933 (base32
13934 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13935 (native-inputs
13936 `(("python-setuptools-scm" ,python-setuptools-scm)))
13937 (build-system python-build-system)
13938 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13939 (synopsis "Lazy object proxy for python")
13940 (description
13941 "Lazy object proxy is an object that wraps a callable but defers the call
13942 until the object is actually required, and caches the result of said call.")
13943 (license license:bsd-2)))
13944
13945 (define-public python2-lazy-object-proxy
13946 (package-with-python2 python-lazy-object-proxy))
13947
13948 (define-public python-dnspython
13949 (package
13950 (name "python-dnspython")
13951 (version "2.0.0")
13952 (source (origin
13953 (method url-fetch)
13954 (uri (pypi-uri "dnspython" version ".zip"))
13955 (sha256
13956 (base32
13957 "1dyip5ygqqhrgcaiy7qzjpndl9xciip186paxqwkm726fj9z0jh4"))))
13958 (build-system python-build-system)
13959 (native-inputs `(("unzip" ,unzip)))
13960 (arguments '(#:tests? #f)) ; XXX: requires internet access
13961 (home-page "https://www.dnspython.org")
13962 (synopsis "DNS toolkit for Python")
13963 (description
13964 "dnspython is a DNS toolkit for Python. It supports almost all record
13965 types. It can be used for queries, zone transfers, and dynamic updates.
13966 It supports TSIG authenticated messages and EDNS0.")
13967 (license license:expat)))
13968
13969 (define-public python-dnspython-1.16
13970 (package
13971 (inherit python-dnspython)
13972 (version "1.16.0")
13973 (source (origin
13974 (method url-fetch)
13975 (uri (string-append "http://www.dnspython.org/kits/"
13976 version "/dnspython-" version ".tar.gz"))
13977 (sha256
13978 (base32
13979 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13980 (native-inputs '())))
13981
13982 (define-public python2-dnspython-1.16
13983 (package-with-python2 python-dnspython-1.16))
13984
13985 (define-public python-py3dns
13986 (package
13987 (name "python-py3dns")
13988 (version "3.2.1")
13989 (source
13990 (origin
13991 (method url-fetch)
13992 (uri (pypi-uri "py3dns" version))
13993 (sha256
13994 (base32
13995 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13996 (build-system python-build-system)
13997 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13998 ;; removing functionality so we copy from Nix and "just don't build it".
13999 (arguments
14000 `(#:phases
14001 (modify-phases %standard-phases
14002 (add-after 'unpack 'patch-source
14003 (lambda _
14004 (substitute* "setup.py"
14005 (("import DNS") "")
14006 (("DNS.__version__") (string-append "\"" ,version "\"")))
14007 #t)))
14008 #:tests? #f)) ; Also skip the tests.
14009 (home-page "https://launchpad.net/py3dns")
14010 (synopsis "Python 3 DNS library")
14011 (description "This Python 3 module provides a DNS API for looking up DNS
14012 entries from within Python 3 modules and applications. This module is a
14013 simple, lightweight implementation.")
14014 (license license:psfl)))
14015
14016 (define-public python-email-validator
14017 (package
14018 (name "python-email-validator")
14019 (version "1.0.2")
14020 (source
14021 (origin (method url-fetch)
14022 (uri (pypi-uri "email_validator" version))
14023 (sha256
14024 (base32
14025 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
14026 (build-system python-build-system)
14027 (arguments
14028 '(#:phases
14029 (modify-phases %standard-phases
14030 (add-before 'build 'use-dnspython
14031 (lambda _
14032 (substitute* "setup.py"
14033 (("dnspython3") "dnspython"))
14034 #t)))))
14035 (propagated-inputs
14036 `(("python-dnspython" ,python-dnspython)
14037 ("python-idna" ,python-idna)))
14038 (home-page "https://github.com/JoshData/python-email-validator")
14039 (synopsis "Email address validation library for Python")
14040 (description
14041 "This library validates email address syntax and deliverability.")
14042 (license license:cc0)))
14043
14044 (define-public python2-email-validator
14045 (package-with-python2 python-email-validator))
14046
14047 (define-public python-ukpostcodeparser
14048 (package
14049 (name "python-ukpostcodeparser")
14050 (version "1.0.3")
14051 (source (origin
14052 (method url-fetch)
14053 (uri (pypi-uri "UkPostcodeParser" version))
14054 (sha256
14055 (base32
14056 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
14057 (build-system python-build-system)
14058 (home-page "https://github.com/hamstah/ukpostcodeparser")
14059 (synopsis "UK Postcode parser for Python")
14060 (description
14061 "This library provides the @code{parse_uk_postcode} function for
14062 parsing UK postcodes.")
14063 (license license:expat)))
14064
14065 (define-public python2-ukpostcodeparser
14066 (package-with-python2 python-ukpostcodeparser))
14067
14068 (define-public python-faker
14069 (package
14070 (name "python-faker")
14071 (version "4.0.2")
14072 (source (origin
14073 (method url-fetch)
14074 (uri (pypi-uri "Faker" version))
14075 (sha256
14076 (base32
14077 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
14078 (build-system python-build-system)
14079 (arguments
14080 '(#:phases
14081 (modify-phases %standard-phases
14082 (replace 'check
14083 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
14084 (native-inputs
14085 `(;; For testing
14086 ("python-freezegun" ,python-freezegun)
14087 ("python-pytest" ,python-pytest)
14088 ("python-random2" ,python-random2)
14089 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
14090 ("python-validators" ,python-validators)))
14091 (propagated-inputs
14092 `(("python-dateutil" ,python-dateutil)
14093 ("python-text-unidecode" ,python-text-unidecode)))
14094 (home-page "https://github.com/joke2k/faker")
14095 (synopsis "Python package that generates fake data")
14096 (description
14097 "Faker is a Python package that generates fake data such as names,
14098 addresses, and phone numbers.")
14099 (license license:expat)
14100 (properties `((python2-variant . ,(delay python2-faker))))))
14101
14102 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
14103 (define-public python2-faker
14104 (let ((base (package-with-python2 (strip-python2-variant
14105 python-faker))))
14106 (package
14107 (inherit base)
14108 (version "3.0.1")
14109 (source (origin
14110 (method url-fetch)
14111 (uri (pypi-uri "Faker" version))
14112 (sha256
14113 (base32
14114 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
14115 (native-inputs
14116 `(("python-mock" ,python2-mock)
14117 ,@(package-native-inputs base)))
14118 (propagated-inputs
14119 `(("python2-ipaddress" ,python2-ipaddress)
14120 ("python2-six" ,python2-six)
14121 ,@(package-propagated-inputs base))))))
14122
14123 (define-public python-pyaml
14124 (package
14125 (name "python-pyaml")
14126 (version "18.11.0")
14127 (source (origin
14128 (method url-fetch)
14129 (uri (pypi-uri "pyaml" version))
14130 (sha256
14131 (base32
14132 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
14133 (build-system python-build-system)
14134 (native-inputs
14135 `(("python-unidecode" ,python-unidecode)))
14136 (propagated-inputs
14137 `(("python-pyyaml" ,python-pyyaml)))
14138 (home-page "https://github.com/mk-fg/pretty-yaml")
14139 (synopsis "YAML pretty-print library for Python")
14140 (description
14141 "pyaml is a PyYAML based python module to produce pretty and readable
14142 YAML-serialized data.")
14143 (license license:wtfpl2)))
14144
14145 (define-public python2-pyaml
14146 (package-with-python2 python-pyaml))
14147
14148 (define-public python-backpack
14149 (package
14150 (name "python-backpack")
14151 (version "0.1")
14152 (source
14153 (origin
14154 (method url-fetch)
14155 (uri (pypi-uri "backpack" version))
14156 (sha256
14157 (base32
14158 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
14159 (build-system python-build-system)
14160 (native-inputs
14161 `(("python-pytest" ,python-pytest)
14162 ("python-nose" ,python-nose)))
14163 (propagated-inputs
14164 `(("python-simplejson" ,python-simplejson)))
14165 (home-page "https://github.com/sdispater/backpack")
14166 (synopsis "Utilities for working with Python collections")
14167 (description "Backpack provides some useful utilities for working with
14168 collections of data.")
14169 (license license:expat)))
14170
14171 (define-public python2-backpack
14172 (package-with-python2 python-backpack))
14173
14174 (define-public python-prompt-toolkit
14175 (package
14176 (name "python-prompt-toolkit")
14177 (version "3.0.9")
14178 (source
14179 (origin
14180 (method url-fetch)
14181 (uri (pypi-uri "prompt_toolkit" version))
14182 (sha256
14183 (base32 "0bvjp62cs6aj9lrh7njzxdjgg8pjfw3qgmr551243d9ivmcapvn5"))))
14184 (build-system python-build-system)
14185 (arguments
14186 `(#:phases
14187 (modify-phases %standard-phases
14188 (delete 'check)
14189 (add-after 'install 'post-install-check
14190 (lambda* (#:key inputs outputs #:allow-other-keys)
14191 ;; HOME is needed for the test
14192 ;; "test_pathcompleter_can_expanduser".
14193 (setenv "HOME" "/tmp")
14194 (add-installed-pythonpath inputs outputs)
14195 (invoke "py.test"))))))
14196 (propagated-inputs
14197 `(("python-wcwidth" ,python-wcwidth)))
14198 (native-inputs
14199 `(("python-pytest" ,python-pytest)))
14200 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
14201 (synopsis "Library for building command line interfaces in Python")
14202 (description
14203 "Prompt-Toolkit is a library for building interactive command line
14204 interfaces in Python. It's like GNU Readline but it also features syntax
14205 highlighting while typing, out-of-the-box multi-line input editing, advanced
14206 code completion, incremental search, support for Chinese double-width
14207 characters, mouse support, and auto suggestions.")
14208 (license license:bsd-3)
14209 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
14210
14211 (define-public python-prompt-toolkit-2
14212 (package (inherit python-prompt-toolkit)
14213 (name "python-prompt-toolkit")
14214 (version "2.0.7")
14215 (source
14216 (origin
14217 (method url-fetch)
14218 (uri (pypi-uri "prompt_toolkit" version))
14219 (sha256
14220 (base32
14221 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
14222 (propagated-inputs
14223 `(("python-wcwidth" ,python-wcwidth)
14224 ("python-six" ,python-six)
14225 ("python-pygments" ,python-pygments)))
14226 (properties '())))
14227
14228 (define-public python2-prompt-toolkit
14229 (package-with-python2 python-prompt-toolkit-2))
14230
14231 (define-public python-prompt-toolkit-1
14232 (package (inherit python-prompt-toolkit-2)
14233 (version "1.0.15")
14234 (source
14235 (origin
14236 (method url-fetch)
14237 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
14238 (sha256
14239 (base32
14240 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
14241
14242 (define-public python2-prompt-toolkit-1
14243 (package-with-python2 python-prompt-toolkit-1))
14244
14245 (define-public python-jedi
14246 (package
14247 (name "python-jedi")
14248 (version "0.17.2")
14249 (source
14250 (origin
14251 (method url-fetch)
14252 (uri (pypi-uri "jedi" version))
14253 (sha256
14254 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
14255 (build-system python-build-system)
14256 (arguments
14257 `(#:phases
14258 (modify-phases %standard-phases
14259 (replace 'check
14260 (lambda* (#:key tests? #:allow-other-keys)
14261 (when tests?
14262 (setenv "HOME" "/tmp")
14263 (invoke "python" "-m" "pytest" "-vv"))
14264 #t)))))
14265 (native-inputs
14266 `(("python-pytest" ,python-pytest)
14267 ("python-docopt" ,python-docopt)))
14268 (propagated-inputs
14269 `(("python-parso" ,python-parso)))
14270 (home-page "https://github.com/davidhalter/jedi")
14271 (synopsis "Autocompletion and static analysis library for Python")
14272 (description
14273 "Jedi is a static analysis tool for Python that can be used in Integrated
14274 Development Environments (@dfn{IDE}s) and text editors. It understands Python
14275 on a deeper level than many other static analysis frameworks for Python.
14276
14277 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
14278 well.")
14279 (license license:expat)))
14280
14281 (define-public python2-jedi
14282 (package-with-python2 python-jedi))
14283
14284 (define-public ptpython
14285 (package
14286 (name "ptpython")
14287 (version "3.0.5")
14288 (source (origin
14289 (method url-fetch)
14290 (uri (pypi-uri "ptpython" version))
14291 (sha256
14292 (base32
14293 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
14294 (build-system python-build-system)
14295 (arguments
14296 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
14297 (propagated-inputs
14298 `(("python-appdirs" ,python-appdirs)
14299 ("python-jedi" ,python-jedi)
14300 ("python-prompt-toolkit" ,python-prompt-toolkit)
14301 ("python-pygments" ,python-pygments)))
14302 (home-page "https://github.com/jonathanslenders/ptpython")
14303 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
14304 (description
14305 "ptpython is a Python read-eval-print loop with IDE-like features.
14306 It supports syntax highlighting, multiline editing, autocompletion, mouse,
14307 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
14308 etc.")
14309 (license license:bsd-3)
14310 (properties `((python2-variant . ,(delay ptpython-2))))))
14311
14312 (define-public ptpython-2
14313 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
14314 (package/inherit base
14315 (name "ptpython2"))))
14316
14317 (define-public python-stem
14318 (package
14319 (name "python-stem")
14320 (version "1.8.0")
14321 (source
14322 (origin
14323 (method url-fetch)
14324 (uri (pypi-uri "stem" version))
14325 (sha256
14326 (base32
14327 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
14328 (build-system python-build-system)
14329 (arguments
14330 `(#:phases
14331 (modify-phases %standard-phases
14332 (replace 'check
14333 (lambda _
14334 (invoke "./run_tests.py" "--unit")
14335 #t)))))
14336 (native-inputs
14337 `(("python-mock" ,python-mock)
14338 ("python-pycodestyle" ,python-pycodestyle)
14339 ("python-pyflakes" ,python-pyflakes)))
14340 (home-page "https://stem.torproject.org/")
14341 (synopsis
14342 "Python controller library that allows applications to interact with Tor")
14343 (description
14344 "Stem is a Python controller library for Tor. With it you can use Tor's
14345 control protocol to script against the Tor process and read descriptor data
14346 relays publish about themselves.")
14347 (license license:lgpl3)))
14348
14349 (define-public python-pyserial
14350 (package
14351 (name "python-pyserial")
14352 (version "3.5")
14353 (source
14354 (origin
14355 (method url-fetch)
14356 (uri (pypi-uri "pyserial" version))
14357 (sha256
14358 (base32
14359 "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw"))))
14360 (build-system python-build-system)
14361 (arguments
14362 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
14363 ;; #:phases
14364 ;; (modify-phases %standard-phases
14365 ;; (replace 'check
14366 ;; (lambda _
14367 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
14368 (home-page
14369 "https://github.com/pyserial/pyserial")
14370 (synopsis "Python Serial Port Bindings")
14371 (description "@code{pyserial} provide serial port bindings for Python. It
14372 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
14373 and/or Xon/Xoff. The port is accessed in RAW mode.")
14374 (license license:bsd-3)))
14375
14376 (define-public python2-pyserial
14377 (package-with-python2 python-pyserial))
14378
14379 (define-public python-kivy
14380 (package
14381 (name "python-kivy")
14382 (version "1.10.1")
14383 (source
14384 (origin
14385 (method url-fetch)
14386 (uri (pypi-uri "Kivy" version))
14387 (file-name (string-append name "-" version ".tar.gz"))
14388 (sha256
14389 (base32
14390 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
14391 (build-system python-build-system)
14392 (arguments
14393 `(#:tests? #f ; Tests require many optional packages
14394 #:phases
14395 (modify-phases %standard-phases
14396 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
14397 (lambda* (#:key inputs #:allow-other-keys)
14398 (setenv "KIVY_SDL2_PATH"
14399 (string-append (assoc-ref inputs "sdl-union")
14400 "/include/SDL2"))
14401 #t)))))
14402 (native-inputs
14403 `(("pkg-config" ,pkg-config)
14404 ("python-cython" ,python-cython)))
14405 (inputs
14406 `(("gstreamer" ,gstreamer)
14407 ("mesa" ,mesa)
14408 ("sdl-union"
14409 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
14410 (home-page "https://kivy.org")
14411 (synopsis
14412 "Multitouch application framework")
14413 (description
14414 "A software library for rapid development of
14415 hardware-accelerated multitouch applications.")
14416 (license license:expat)))
14417
14418 (define-public python2-kivy
14419 (package-with-python2 python-kivy))
14420
14421 (define-public python-binaryornot
14422 (package
14423 (name "python-binaryornot")
14424 (version "0.4.4")
14425 (source (origin
14426 (method url-fetch)
14427 (uri (pypi-uri "binaryornot" version))
14428 (sha256
14429 (base32
14430 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
14431 (build-system python-build-system)
14432 (arguments
14433 `(#:phases
14434 (modify-phases %standard-phases
14435 (add-after 'unpack 'patch-tests
14436 (lambda _
14437 ;; TypeError: binary() got an unexpected keyword argument
14438 ;; 'average_size'.
14439 (substitute* "tests/test_check.py"
14440 (("average_size=512") ""))
14441 #t)))))
14442 (propagated-inputs
14443 `(("python-chardet" ,python-chardet)
14444 ("python-hypothesis" ,python-hypothesis)))
14445 (home-page "https://github.com/audreyr/binaryornot")
14446 (synopsis "Package to check if a file is binary or text")
14447 (description "Ultra-lightweight pure Python package to check if a file is
14448 binary or text.")
14449 (license license:bsd-3)
14450 (properties `((python2-variant . ,(delay python2-binaryornot))))))
14451
14452 (define-public python2-binaryornot
14453 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
14454 (package/inherit base
14455 (propagated-inputs
14456 `(("python2-enum34" ,python2-enum34)
14457 ,@(package-propagated-inputs base))))))
14458
14459 (define-public python-binwalk
14460 (package
14461 (name "python-binwalk")
14462 (version "2.2.0")
14463 (source
14464 (origin
14465 (method git-fetch)
14466 (uri (git-reference
14467 (url "https://github.com/ReFirmLabs/binwalk")
14468 (commit (string-append "v" version))))
14469 (file-name (git-file-name name version))
14470 (sha256
14471 (base32
14472 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
14473 (build-system python-build-system)
14474 (arguments
14475 `(#:phases
14476 (modify-phases %standard-phases
14477 (add-before 'check 'set-pythonpath
14478 (lambda _
14479 (setenv "PYTHONPATH"
14480 (string-append
14481 (getcwd) "/src/"
14482 ":" (getenv "PYTHONPATH")))
14483 (setenv "HOME" "")
14484 #t)))))
14485 (native-inputs
14486 `(("python-coverage" ,python-coverage)
14487 ("python-nose" ,python-nose)))
14488 (home-page "https://github.com/ReFirmLabs/binwalk")
14489 (synopsis "Firmware analysis tool")
14490 (description "Binwalk is a tool for analyzing, reverse engineering, and
14491 extracting firmware images")
14492 (license license:expat)))
14493
14494 (define-public python-nltk
14495 (package
14496 (name "python-nltk")
14497 (version "3.2.1")
14498 (source (origin
14499 (method url-fetch)
14500 (uri (pypi-uri "nltk" version))
14501 (sha256
14502 (base32
14503 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
14504 (build-system python-build-system)
14505 (arguments
14506 '(;; The tests require some extra resources to be downloaded.
14507 ;; TODO Try packaging these resources.
14508 #:tests? #f))
14509 (home-page "http://nltk.org/")
14510 (synopsis "Natural Language Toolkit")
14511 (description "It provides interfaces to over 50 corpora and lexical
14512 resources such as WordNet, along with a suite of text processing libraries
14513 for classification, tokenization, stemming, tagging, parsing, and semantic
14514 reasoning, wrappers for natural language processing libraries.")
14515 (license license:asl2.0)))
14516
14517 (define-public python2-nltk
14518 (package-with-python2 python-nltk))
14519
14520 (define-public python-pymongo
14521 (package
14522 (name "python-pymongo")
14523 (version "3.7.2")
14524 (source (origin
14525 (method url-fetch)
14526 (uri (pypi-uri "pymongo" version))
14527 (sha256
14528 (base32
14529 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
14530 (build-system python-build-system)
14531 (propagated-inputs
14532 `(("python-certifi" ,python-certifi)))
14533 (home-page "https://github.com/mongodb/mongo-python-driver")
14534 (synopsis "Python driver for MongoDB")
14535 (description "Python driver for MongoDB.")
14536 (license license:asl2.0)))
14537
14538 (define-public python2-pymongo
14539 (package-with-python2 python-pymongo))
14540
14541 (define-public python-consul
14542 (package
14543 (name "python-consul")
14544 (version "0.6.1")
14545 (source
14546 (origin
14547 (method url-fetch)
14548 (uri (pypi-uri "python-consul" version))
14549 (sha256
14550 (base32
14551 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
14552 (build-system python-build-system)
14553 (arguments
14554 '(#:tests? #f)) ; The tests are not distributed
14555 (propagated-inputs
14556 `(("python-requests" ,python-requests)
14557 ("python-six" ,python-six)))
14558 (home-page "https://github.com/cablehead/python-consul")
14559 (synopsis "Python client for Consul")
14560 (description
14561 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
14562 discovery, monitoring and configuration.")
14563 (license license:expat)))
14564
14565 (define-public python2-consul
14566 (package-with-python2 python-consul))
14567
14568 (define-public python-schematics
14569 (package
14570 (name "python-schematics")
14571 (version "1.1.1")
14572 (source
14573 (origin
14574 (method git-fetch)
14575 (uri (git-reference
14576 (url "https://github.com/schematics/schematics")
14577 (commit (string-append "v" version))))
14578 (file-name (git-file-name name version))
14579 (sha256
14580 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
14581 (build-system python-build-system)
14582 (propagated-inputs
14583 `(("python-six" ,python-six)))
14584 (arguments
14585 ;; The tests require a bunch of not very nice packages with fixed
14586 ;; version requirements (e.g. python-coveralls).
14587 `(#:tests? #f))
14588 (home-page "https://github.com/schematics/schematics")
14589 (synopsis "Python Data Structures for Humans")
14590 (description "Python Data Structures for Humans.")
14591 (license license:bsd-3)))
14592
14593 (define-public python2-schematics
14594 (package-with-python2 python-schematics))
14595
14596 (define-public python-odfpy
14597 (package
14598 (name "python-odfpy")
14599 (version "1.4.1")
14600 (source (origin
14601 (method url-fetch)
14602 (uri (pypi-uri "odfpy" version))
14603 (sha256
14604 (base32
14605 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
14606 (arguments
14607 `(#:phases
14608 (modify-phases %standard-phases
14609 (replace 'check
14610 (lambda _
14611 (setenv "PYTHONPATH" (string-append "./build/lib:"
14612 (getenv "PYTHONPATH")))
14613 (invoke "pytest" "-vv"))))))
14614 (build-system python-build-system)
14615 (native-inputs
14616 `(("python-pytest" ,python-pytest)))
14617 (propagated-inputs
14618 `(("python-defusedxml" ,python-defusedxml)))
14619 (home-page "https://github.com/eea/odfpy")
14620 (synopsis "Python API and tools to manipulate OpenDocument files")
14621 (description "Collection of libraries and utility programs written in
14622 Python to manipulate OpenDocument 1.2 files.")
14623 (license
14624 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
14625 ;; number of files with other licenses.
14626 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
14627
14628 (define-public python2-odfpy
14629 (package-with-python2 python-odfpy))
14630
14631 (define-public python-natsort
14632 (package
14633 (name "python-natsort")
14634 (version "7.0.1")
14635 (source (origin
14636 (method url-fetch)
14637 (uri (pypi-uri "natsort" version))
14638 (sha256
14639 (base32
14640 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14641 (build-system python-build-system)
14642 (arguments
14643 `(#:modules ((guix build utils)
14644 (guix build python-build-system)
14645 (srfi srfi-1)
14646 (srfi srfi-26)
14647 (ice-9 ftw))
14648 #:phases
14649 (modify-phases %standard-phases
14650 (add-before 'check 'set-cachedir
14651 ;; Tests require write access to $HOME by default
14652 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14653 (replace 'check
14654 (lambda _
14655 (let ((cwd (getcwd)))
14656 (setenv "PYTHONPATH"
14657 (string-append
14658 cwd "/build/"
14659 (find (cut string-prefix? "lib" <>)
14660 (scandir (string-append cwd "/build")))
14661 ":"
14662 (getenv "PYTHONPATH")))
14663 (invoke "pytest" "-v")))))))
14664 (native-inputs
14665 `(("python-hypothesis" ,python-hypothesis)
14666 ("python-pytest-cov" ,python-pytest-cov)
14667 ("python-pytest-mock" ,python-pytest-mock)
14668 ("python-pytest" ,python-pytest)))
14669 (propagated-inputs ; TODO: Add python-fastnumbers.
14670 `(("python-pyicu" ,python-pyicu)))
14671 (home-page "https://github.com/SethMMorton/natsort")
14672 (synopsis "Natural sorting for python and shell")
14673 (description
14674 "Natsort lets you apply natural sorting on lists instead of
14675 lexicographical. If you use the built-in @code{sorted} method in python
14676 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14677 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14678 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14679 identifies numbers and sorts them separately from strings. It can also sort
14680 version numbers, real numbers, mixed types and more, and comes with a shell
14681 command @command{natsort} that exposes this functionality in the command line.")
14682 (license license:expat)
14683 (properties `((python2-variant . ,(delay python2-natsort))))))
14684
14685 ;; Natsort 6.x are the last versions with support for Python 2.
14686 (define-public python2-natsort
14687 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14688 (package (inherit base)
14689 (version "6.2.1")
14690 (source (origin
14691 (method url-fetch)
14692 (uri (pypi-uri "natsort" version))
14693 (sha256
14694 (base32
14695 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14696 (native-inputs
14697 `(("python2-pathlib" ,python2-pathlib)
14698 ,@(package-native-inputs base))))))
14699
14700 (define-public glances
14701 (package
14702 (name "glances")
14703 (version "3.1.6")
14704 (source
14705 (origin
14706 (method url-fetch)
14707 (uri (pypi-uri "Glances" version))
14708 (sha256
14709 (base32 "11xbm8jgcxha191ly7q76nab1ilabiz14mqf6i3y6aw5xvgg017c"))
14710 (modules '((guix build utils)))
14711 (snippet
14712 '(begin
14713 ;; Glances phones PyPI for weekly update checks by default.
14714 ;; Disable these. The user can re-enable them if desired.
14715 (substitute* "glances/outdated.py"
14716 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14717 (string-append indentation
14718 "self.args.disable_check_update = True\n"
14719 line)))
14720 #t))))
14721 (build-system python-build-system)
14722 (propagated-inputs
14723 `(("python-future" ,python-future)
14724 ("python-psutil" ,python-psutil)))
14725 (home-page "https://github.com/nicolargo/glances")
14726 (synopsis "Cross-platform curses-based monitoring tool")
14727 (description
14728 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14729 Glances uses the PsUtil library to get information from your system. It
14730 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14731 (license license:lgpl3+)))
14732
14733 (define-public python-glances
14734 (deprecated-package "python-glances" glances))
14735
14736 (define-public python-graphql-core
14737 (package
14738 (name "python-graphql-core")
14739 (version "3.1.2")
14740 (source
14741 (origin
14742 (method url-fetch)
14743 (uri (pypi-uri "graphql-core" version))
14744 (sha256
14745 (base32
14746 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
14747 (build-system python-build-system)
14748 (arguments
14749 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14750 #:phases
14751 (modify-phases %standard-phases
14752 (add-after 'unpack 'patch-hardcoded-version
14753 (lambda _ (substitute*
14754 "setup.py"
14755 (("'gevent==1.1rc1'") "'gevent'"))
14756 #t)))))
14757 (native-inputs
14758 `(("python-gevent" ,python-gevent)
14759 ("python-mock" ,python-mock)
14760 ("python-pytest-mock" ,python-pytest-mock)))
14761 (propagated-inputs
14762 `(("python-promise" ,python-promise)
14763 ("python-six" ,python-six)))
14764 (home-page "https://github.com/graphql-python/graphql-core")
14765 (synopsis "GraphQL implementation for Python")
14766 (description
14767 "GraphQL implementation for Python. GraphQL is a data query language and
14768 runtime designed and used to request and deliver data to mobile and web apps.
14769 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14770 to Python.")
14771 (license license:expat)))
14772
14773 (define-public python-graphql-relay
14774 (package
14775 (name "python-graphql-relay")
14776 (version "0.4.5")
14777 (source
14778 (origin
14779 (method url-fetch)
14780 (uri (pypi-uri "graphql-relay" version))
14781 (sha256
14782 (base32
14783 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14784 (build-system python-build-system)
14785 (arguments
14786 '(#:tests? #f)) ; The tests are not distributed
14787 (propagated-inputs
14788 `(("python-graphql-core" ,python-graphql-core)
14789 ("python-promise" ,python-promise)
14790 ("python-six" ,python-six)))
14791 (home-page "https://github.com/graphql-python/graphql-relay-py")
14792 (synopsis "Relay implementation for Python")
14793 (description
14794 "This is a library to allow the easy creation of Relay-compliant servers
14795 using the GraphQL Python reference implementation of a GraphQL server. It
14796 should be noted that the code is a exact port of the original
14797 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14798 from Facebook.")
14799 (license license:expat)))
14800
14801 (define-public python-graphene
14802 (package
14803 (name "python-graphene")
14804 (version "0.10.2")
14805 (source
14806 (origin
14807 (method url-fetch)
14808 (uri (pypi-uri "graphene" version))
14809 (sha256
14810 (base32
14811 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14812 (build-system python-build-system)
14813 (propagated-inputs
14814 `(("python-graphql-core" ,python-graphql-core)
14815 ("python-graphql-relay" ,python-graphql-relay)
14816 ("python-iso8601" ,python-iso8601)
14817 ("python-promise" ,python-promise)
14818 ("python-six" ,python-six)))
14819 (arguments
14820 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14821 (home-page "https://graphene-python.org/")
14822 (synopsis "GraphQL Framework for Python")
14823 (description
14824 "Graphene is a Python library for building GraphQL schemas/types.
14825 A GraphQL schema describes your data model, and provides a GraphQL server
14826 with an associated set of resolve methods that know how to fetch data.")
14827 (license license:expat)))
14828
14829 (define-public python-nautilus
14830 (package
14831 (name "python-nautilus")
14832 (version "0.4.9")
14833 (source
14834 (origin
14835 (method url-fetch)
14836 (uri (pypi-uri "nautilus" version))
14837 (sha256
14838 (base32
14839 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14840 (build-system python-build-system)
14841 (arguments `(#:tests? #f)) ; fails to import test modules
14842 (propagated-inputs
14843 `(("python-bcrypt" ,python-bcrypt)
14844 ("python-click" ,python-click)
14845 ("python-consul" ,python-consul)
14846 ("python-graphene" ,python-graphene)
14847 ("python-jinja2" ,python-jinja2)
14848 ("python-peewee" ,python-peewee)
14849 ("python-pika" ,python-pika)
14850 ("python-tornado" ,python-tornado)
14851 ("python-wtforms" ,python-wtforms)))
14852 (native-inputs
14853 `(("python-nose2" ,python-nose2)))
14854 (home-page "https://github.com/AlecAivazis/nautilus")
14855 (synopsis "Library for creating microservice applications")
14856 (description
14857 "Nautilus is a framework for flux based microservices that looks to
14858 provide extendible implementations of common aspects of a cloud so that you can
14859 focus on building massively scalable web applications.")
14860 (license license:expat)))
14861
14862 (define-public python-random2
14863 (package
14864 (name "python-random2")
14865 (version "1.0.1")
14866 (source (origin
14867 (method url-fetch)
14868 (uri (pypi-uri "random2" version ".zip"))
14869 (sha256
14870 (base32
14871 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14872 (build-system python-build-system)
14873 (native-inputs `(("unzip" ,unzip)))
14874 (home-page "http://pypi.python.org/pypi/random2")
14875 (synopsis "Python 3 version of the Python 2 @code{random} module")
14876 (description
14877 "This package provides a Python 3 ported version of Python 2.7’s
14878 @code{random} module. It has also been back-ported to work in Python 2.6.
14879
14880 In Python 3, the implementation of @code{randrange()} was changed, so that
14881 even with the same seed you get different sequences in Python 2 and 3.
14882
14883 This package closes that gap, allowing stable random number generation
14884 between the different Python versions.")
14885 (license license:psfl)))
14886
14887 (define-public python2-random2
14888 (package-with-python2 python-random2))
14889
14890 (define-public python-snowballstemmer
14891 (package
14892 (name "python-snowballstemmer")
14893 (version "2.0.0")
14894 (source (origin
14895 (method url-fetch)
14896 (uri (pypi-uri "snowballstemmer" version))
14897 (sha256
14898 (base32
14899 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14900 (build-system python-build-system)
14901 (arguments
14902 `(;; No tests exist
14903 #:tests? #f))
14904 (home-page "https://github.com/shibukawa/snowball_py")
14905 (synopsis "Snowball stemming library collection for Python")
14906 (description "This package provides 16 word stemmer algorithms generated
14907 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14908 English stemmer.")
14909 (license license:bsd-3)))
14910
14911 (define-public python2-snowballstemmer
14912 (package-with-python2 python-snowballstemmer))
14913
14914 (define-public python-setproctitle
14915 (package
14916 (name "python-setproctitle")
14917 (version "1.1.10")
14918 (source
14919 (origin
14920 (method url-fetch)
14921 (uri (pypi-uri "setproctitle" version))
14922 (sha256
14923 (base32
14924 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14925 (build-system python-build-system)
14926 (arguments
14927 '(#:phases
14928 (modify-phases %standard-phases
14929 (add-before 'check 'patch-Makefile
14930 ;; Stricly this is only required for the python2 variant.
14931 ;; But adding a phase in an inherited package seems to be
14932 ;; cumbersum. So we patch even for python3.
14933 (lambda _
14934 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14935 (when nose
14936 (substitute* "Makefile"
14937 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14938 (string-append nose "/bin/nosetests "))))
14939 #t)))
14940 (replace 'check
14941 (lambda _
14942 (setenv "PYTHON" (or (which "python3") (which "python")))
14943 (setenv "PYCONFIG" (if (which "python3-config")
14944 "python3-config --embed"
14945 "python-config"))
14946 (setenv "CC" "gcc")
14947 ;; No need to extend PYTHONPATH to find the built package, since
14948 ;; the Makefile will build anyway
14949 (invoke "make" "check"))))))
14950 (native-inputs
14951 `(("procps" ,procps))) ; required for tests
14952 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14953 (synopsis
14954 "Setproctitle implementation for Python to customize the process title")
14955 (description "The library allows a process to change its title (as displayed
14956 by system tools such as ps and top).
14957
14958 Changing the title is mostly useful in multi-process systems, for
14959 example when a master process is forked: changing the children's title
14960 allows identifying the task each process is busy with. The technique
14961 is used by PostgreSQL and the OpenSSH Server for example.")
14962 (license license:bsd-3)
14963 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14964
14965 (define-public python2-setproctitle
14966 (let ((base (package-with-python2
14967 (strip-python2-variant python-setproctitle))))
14968 (package/inherit base
14969 (native-inputs `(("python2-nose" ,python2-nose)
14970 ,@(package-native-inputs base))))))
14971
14972 (define-public python-validictory
14973 (package
14974 (name "python-validictory")
14975 (version "1.0.1")
14976 (source
14977 (origin
14978 (method url-fetch)
14979 (uri (pypi-uri "validictory" version))
14980 (sha256
14981 (base32
14982 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14983 (build-system python-build-system)
14984 (arguments
14985 '(#:phases
14986 (modify-phases %standard-phases
14987 (add-after 'unpack 'bootstrap
14988 ;; Move the tests out of the package directory to avoid
14989 ;; packaging them.
14990 (lambda* _
14991 (rename-file "validictory/tests" "tests")
14992 (delete-file "tests/__init__.py")))
14993 (replace 'check
14994 (lambda _
14995 ;; Extend PYTHONPATH so the built package will be found.
14996 (setenv "PYTHONPATH"
14997 (string-append (getcwd) "/build/lib:"
14998 (getenv "PYTHONPATH")))
14999 (invoke "py.test" "-vv" ))))))
15000 (native-inputs
15001 `(("python-pytest" ,python-pytest)))
15002 (home-page
15003 "https://github.com/jamesturk/validictory")
15004 (synopsis "General purpose Python data validator")
15005 (description "It allows validation of arbitrary Python data structures.
15006
15007 The schema format is based on the JSON Schema
15008 proposal (http://json-schema.org), so combined with json the library is also
15009 useful as a validator for JSON data.")
15010 (license license:expat)))
15011
15012 (define-public python2-validictory
15013 (package-with-python2 python-validictory))
15014
15015 (define-public python-pyelftools
15016 (package
15017 (name "python-pyelftools")
15018 (version "0.25")
15019 (source
15020 (origin
15021 (method url-fetch)
15022 (uri (pypi-uri "pyelftools" version))
15023 (sha256
15024 (base32
15025 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
15026 (build-system python-build-system)
15027 (arguments
15028 `(#:phases
15029 (modify-phases %standard-phases
15030 (add-before 'check 'set-pythonpath
15031 (lambda _
15032 (setenv "PYTHONPATH"
15033 (string-append
15034 (getcwd) "/test/"
15035 ":" (getenv "PYTHONPATH")))
15036 #t)))))
15037 (home-page
15038 "https://github.com/eliben/pyelftools")
15039 (synopsis
15040 "Analyze binary and library file information")
15041 (description "This Python library provides interfaces for parsing and
15042 analyzing two binary and library file formats; the Executable and Linking
15043 Format (ELF), and debugging information in the Debugging With Attributed
15044 Record Format (DWARF).")
15045 (license license:public-domain)))
15046
15047 (define-public python-pyev
15048 (package
15049 (name "python-pyev")
15050 (version "0.9.0")
15051 (source
15052 (origin
15053 (method url-fetch)
15054 (uri (pypi-uri "pyev" version))
15055 (sha256
15056 (base32
15057 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
15058 (build-system python-build-system)
15059 (arguments
15060 `(#:tests? #f ; no test suite
15061 #:phases
15062 (modify-phases %standard-phases
15063 (add-after 'unpack 'patch
15064 (lambda* (#:key inputs #:allow-other-keys)
15065 (let ((libev (string-append (assoc-ref inputs "libev")
15066 "/lib/libev.so.4")))
15067 (substitute* "setup.py"
15068 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
15069 (string-append "libev_dll_name = \"" libev "\"")))))))))
15070 (inputs
15071 `(("libev" ,libev)))
15072 (home-page "https://github.com/gabrielfalcao/pyev")
15073 (synopsis "Python libev interface")
15074 (description "Pyev provides a Python interface to libev.")
15075 (license license:gpl3)))
15076
15077 (define-public python2-pyev
15078 (package-with-python2 python-pyev))
15079
15080 (define-public python-imagesize
15081 (package
15082 (name "python-imagesize")
15083 (version "1.2.0")
15084 (source
15085 (origin
15086 (method url-fetch)
15087 (uri (pypi-uri "imagesize" version))
15088 (sha256
15089 (base32
15090 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
15091 (build-system python-build-system)
15092 (home-page "https://github.com/shibukawa/imagesize_py")
15093 (synopsis "Gets image size of files in various formats in Python")
15094 (description
15095 "This package allows determination of image size from
15096 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
15097 (license license:expat)))
15098
15099 (define-public python2-imagesize
15100 (package-with-python2 python-imagesize))
15101
15102 (define-public python-termstyle
15103 (package
15104 (name "python-termstyle")
15105 (version "0.1.11")
15106 (source
15107 (origin
15108 (method url-fetch)
15109 (uri (pypi-uri "termstyle" version))
15110 (sha256
15111 (base32
15112 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
15113 (build-system python-build-system)
15114 (arguments
15115 '(#:phases
15116 (modify-phases %standard-phases
15117 (replace 'check
15118 (lambda _
15119 (invoke "python" "test3.py"))))))
15120 (home-page "https://github.com/gfxmonk/termstyle")
15121 (synopsis "Console text coloring for Python")
15122 (description "This package provides console text coloring for Python.")
15123 (license license:bsd-3)))
15124
15125 (define-public python-argcomplete
15126 (package
15127 (name "python-argcomplete")
15128 (version "1.11.1")
15129 (source
15130 (origin
15131 (method url-fetch)
15132 (uri (pypi-uri "argcomplete" version))
15133 (sha256
15134 (base32
15135 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
15136 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
15137 (build-system python-build-system)
15138 (native-inputs
15139 `(("python-coverage" ,python-coverage)
15140 ("python-flake8" ,python-flake8)
15141 ("python-pexpect" ,python-pexpect)
15142 ("python-wheel" ,python-wheel)
15143 ("tcsh" ,tcsh)
15144 ("fish" ,fish)
15145 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
15146 (home-page "https://github.com/kislyuk/argcomplete")
15147 (synopsis "Shell tab completion for Python argparse")
15148 (description "argcomplete provides extensible command line tab completion
15149 of arguments and options for Python scripts using @code{argparse}. It's
15150 particularly useful for programs with many options or sub-parsers that can
15151 dynamically suggest completions; for example, when browsing resources over the
15152 network.")
15153 (license license:asl2.0)
15154 (properties `((python2-variant . ,(delay python2-argcomplete))))))
15155
15156 (define-public python2-argcomplete
15157 (let ((variant (package-with-python2
15158 (strip-python2-variant python-argcomplete))))
15159 (package/inherit variant
15160 (arguments
15161 (substitute-keyword-arguments (package-arguments variant)
15162 ((#:phases phases '%standard-phases)
15163 `(modify-phases ,phases
15164 (add-after 'unpack 'set-my-HOME
15165 (lambda _ (setenv "HOME" "/tmp")))))))
15166 (native-inputs
15167 `(("python2-importlib-metadata" ,python2-importlib-metadata)
15168 ,@(package-native-inputs variant))))))
15169
15170 (define-public python-csscompressor
15171 (package
15172 (name "python-csscompressor")
15173 (version "0.9.5")
15174 (source
15175 (origin
15176 (method url-fetch)
15177 (uri (pypi-uri "csscompressor" version))
15178 (sha256
15179 (base32
15180 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
15181 (build-system python-build-system)
15182 (arguments
15183 '(#:phases
15184 (modify-phases %standard-phases
15185 (replace 'check
15186 (lambda _
15187 (invoke "py.test"))))))
15188 (native-inputs
15189 `(("python-pytest" ,python-pytest)))
15190 (home-page "https://github.com/sprymix/csscompressor")
15191 (synopsis "Python port of YUI CSS Compressor")
15192 (description
15193 "This package provides a python port of YUI CSS Compressor.")
15194 (license license:bsd-3)))
15195
15196 (define-public python-rcssmin
15197 (package
15198 (name "python-rcssmin")
15199 (version "1.0.6")
15200 (source
15201 (origin
15202 (method url-fetch)
15203 (uri (pypi-uri "rcssmin" version))
15204 (sha256
15205 (base32
15206 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
15207 (build-system python-build-system)
15208 (arguments
15209 '(#:phases
15210 (modify-phases %standard-phases
15211 (replace 'check
15212 (lambda _
15213 (invoke "python" "run_tests.py" "tests"))))))
15214 (home-page "http://opensource.perlig.de/rcssmin/")
15215 (synopsis "CSS Minifier")
15216 (description "The minifier is based on the semantics of the YUI compressor,
15217 which itself is based on the rule list by Isaac Schlueter.")
15218 (license license:asl2.0)))
15219
15220 (define-public python-rjsmin
15221 (package
15222 (name "python-rjsmin")
15223 (version "1.1.0")
15224 (source
15225 (origin
15226 (method url-fetch)
15227 (uri (pypi-uri "rjsmin" version))
15228 (sha256
15229 (base32
15230 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
15231 (modules '((guix build utils)))
15232 (snippet
15233 '(begin
15234 (for-each delete-file (find-files "bench" "\\.js$"))
15235 #t))))
15236 (build-system python-build-system)
15237 (arguments
15238 '(#:tests? #f ; Not all test files included.
15239 #:phases
15240 (modify-phases %standard-phases
15241 (replace 'check
15242 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
15243 (add-installed-pythonpath inputs outputs)
15244 (if tests?
15245 (invoke "py.test" "-vv" "tests")
15246 #t))))))
15247 (native-inputs
15248 `(("python-pytest" ,python-pytest)))
15249 (home-page "http://opensource.perlig.de/rjsmin/")
15250 (synopsis "Javascript Minifier")
15251 (description "@code{rJSmin} is a javascript minifier written in Python. The
15252 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
15253 is a re-implementation aiming for speed, so it can be used at runtime (rather
15254 than during a preprocessing step).")
15255 (license license:asl2.0)))
15256
15257 (define-public python-xopen
15258 (package
15259 (name "python-xopen")
15260 (version "0.5.0")
15261 (source
15262 (origin
15263 (method url-fetch)
15264 (uri (pypi-uri "xopen" version))
15265 (sha256
15266 (base32
15267 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
15268 (build-system python-build-system)
15269 (propagated-inputs
15270 `(("python-setuptools-scm" ,python-setuptools-scm)))
15271 (home-page "https://github.com/marcelm/xopen/")
15272 (synopsis "Open compressed files transparently")
15273 (description "This module provides an @code{xopen} function that works like
15274 Python's built-in @code{open} function, but can also deal with compressed files.
15275 Supported compression formats are gzip, bzip2 and, xz, and are automatically
15276 recognized by their file extensions. The focus is on being as efficient as
15277 possible on all supported Python versions.")
15278 (license license:expat)))
15279
15280 (define-public python2-xopen
15281 (let ((base (package-with-python2
15282 (strip-python2-variant python-xopen))))
15283 (package/inherit base
15284 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
15285 ,@(package-propagated-inputs base))))))
15286
15287 (define-public python-cheetah
15288 (package
15289 (name "python-cheetah")
15290 (version "3.2.4")
15291 (source
15292 (origin
15293 (method url-fetch)
15294 (uri (pypi-uri "Cheetah3" version))
15295 (sha256
15296 (base32
15297 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
15298 (build-system python-build-system)
15299 (arguments
15300 `(#:modules ((guix build utils)
15301 (guix build python-build-system)
15302 (ice-9 ftw)
15303 (srfi srfi-1)
15304 (srfi srfi-26))
15305 #:phases (modify-phases %standard-phases
15306 (add-after 'unpack 'use-absolute-python
15307 (lambda _
15308 (substitute* "Cheetah/CheetahWrapper.py"
15309 (("#!/usr/bin/env python")
15310 (string-append "#!" (which "python"))))
15311 #t))
15312 (add-after 'unpack 'fix-tests
15313 (lambda _
15314 (substitute* "Cheetah/Tests/ImportHooks.py"
15315 (("os.path.dirname\\(__file__\\)")
15316 (string-append "'" (getcwd) "/Cheetah/Tests'")))
15317 #t))
15318 (replace 'check
15319 (lambda _
15320 (let ((cwd (getcwd)))
15321 (setenv "PYTHONPATH"
15322 (string-append
15323 cwd "/build/"
15324 (find (cut string-prefix? "lib" <>)
15325 (scandir (string-append cwd "/build")))
15326 ":" (getenv "PYTHONPATH")))
15327 (setenv "PATH"
15328 (string-append (getenv "PATH")
15329 ":" cwd "/bin"))
15330 (setenv "TMPDIR" "/tmp")
15331
15332 (substitute* "Cheetah/Tests/Test.py"
15333 (("unittest.TextTestRunner\\(\\)")
15334 "unittest.TextTestRunner(verbosity=2)"))
15335
15336 (invoke "python" "Cheetah/Tests/Test.py")))))))
15337 (propagated-inputs
15338 `(("python-markdown" ,python-markdown))) ;optional
15339 (home-page "https://cheetahtemplate.org/")
15340 (synopsis "Template engine")
15341 (description "Cheetah is a text-based template engine and Python code
15342 generator.
15343
15344 Cheetah can be used as a standalone templating utility or referenced as
15345 a library from other Python applications. It has many potential uses,
15346 but web developers looking for a viable alternative to ASP, JSP, PHP and
15347 PSP are expected to be its principle user group.
15348
15349 Features:
15350 @enumerate
15351 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
15352 text-based format.
15353 @item Cleanly separates content, graphic design, and program code.
15354 @item Blends the power and flexibility of Python with a simple template language
15355 that non-programmers can understand.
15356 @item Gives template writers full access to any Python data structure, module,
15357 function, object, or method in their templates.
15358 @item Makes code reuse easy by providing an object-orientated interface to
15359 templates that is accessible from Python code or other Cheetah templates.
15360 One template can subclass another and selectively reimplement sections of it.
15361 @item Provides a simple, yet powerful, caching mechanism that can dramatically
15362 improve the performance of a dynamic website.
15363 @item Compiles templates into optimized, yet readable, Python code.
15364 @end enumerate")
15365 (license (license:x11-style "file://LICENSE"))))
15366
15367 (define-public python2-cheetah
15368 (package-with-python2 python-cheetah))
15369
15370 (define-public python-dulwich
15371 (package
15372 (name "python-dulwich")
15373 (version "0.19.16")
15374 (source
15375 (origin
15376 (method url-fetch)
15377 (uri (list (string-append "https://www.dulwich.io/releases/"
15378 "dulwich-" version ".tar.gz")
15379 (pypi-uri "dulwich" version)))
15380 (sha256
15381 (base32
15382 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
15383 (build-system python-build-system)
15384 (arguments
15385 `(#:phases
15386 (modify-phases %standard-phases
15387 (add-before 'check 'fix-tests
15388 (lambda* (#:key inputs #:allow-other-keys)
15389 ;; The tests use Popen with a custom environment which doesn't
15390 ;; include PATH.
15391 (substitute* "dulwich/tests/compat/utils.py"
15392 (("'git'") (string-append "'"
15393 (which "git")
15394 "'")))
15395 (substitute* '("dulwich/tests/test_repository.py"
15396 "dulwich/tests/test_hooks.py")
15397 (("#!/bin/sh") (string-append "#!" (which "sh"))))
15398 (setenv "TEST_RUNNER" "unittest")
15399 (setenv "PYTHONHASHSEED" "random")
15400 #t)))))
15401 (propagated-inputs
15402 `(("python-fastimport" ,python-fastimport)
15403 ("python-urllib3" ,python-urllib3)))
15404 (native-inputs
15405 `(("python-mock" ,python-mock)
15406 ("python-geventhttpclient" ,python-geventhttpclient)
15407 ("git" ,git)))
15408 (home-page "https://www.dulwich.io/")
15409 (synopsis "Git implementation in Python")
15410 (description "Dulwich is an implementation of the Git file formats and
15411 protocols written in pure Python.")
15412 ;; Can be used with either license.
15413 (license (list license:asl2.0 license:gpl2+))))
15414
15415 (define-public python-pbkdf2
15416 (package
15417 (name "python-pbkdf2")
15418 (version "1.3")
15419 (source
15420 (origin
15421 (method url-fetch)
15422 (uri (pypi-uri "pbkdf2" version))
15423 (sha256
15424 (base32
15425 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
15426 (build-system python-build-system)
15427 (arguments
15428 '(#:phases
15429 (modify-phases %standard-phases
15430 (replace 'check
15431 (lambda _
15432 (setenv "PYTHONPATH"
15433 (string-append (getcwd) "/build/lib:"
15434 (getenv "PYTHONPATH")))
15435 (invoke "python" "test/test_pbkdf2.py"))))))
15436 (propagated-inputs
15437 `(("python-pycrypto" ,python-pycrypto))) ; optional
15438 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
15439 (synopsis "Password-based key derivation")
15440 (description "This module implements the password-based key derivation
15441 function, PBKDF2, specified in RSA PKCS#5 v2.0.
15442
15443 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
15444 is part of the RSA Public Key Cryptography Standards series. The provided
15445 implementation takes a password or a passphrase and a salt value (and
15446 optionally a iteration count, a digest module, and a MAC module) and provides
15447 a file-like object from which an arbitrarily-sized key can be read.")
15448 (license license:expat)))
15449
15450 (define-public python2-pbkdf2
15451 (package-with-python2 python-pbkdf2))
15452
15453 (define-public python-qrcode
15454 (package
15455 (name "python-qrcode")
15456 (version "6.1")
15457 (source
15458 (origin
15459 (method url-fetch)
15460 (uri (pypi-uri "qrcode" version))
15461 (sha256
15462 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
15463 (build-system python-build-system)
15464 (arguments
15465 ;; FIXME: Tests require packaging 'pymaging'.
15466 '(#:tests? #f))
15467 (propagated-inputs
15468 `(("python-lxml" ,python-lxml) ; for SVG output
15469 ("python-pillow" ,python-pillow) ; for PNG output
15470 ("python-six" ,python-six)))
15471 (home-page "https://github.com/lincolnloop/python-qrcode")
15472 (synopsis "QR Code image generator")
15473 (description "This package provides a pure Python QR Code generator
15474 module. It uses the Python Imaging Library (PIL) to allow for the generation
15475 of QR Codes.
15476
15477 In addition this package provides a command line tool to generate QR codes and
15478 either write these QR codes to a file or do the output as ascii art at the
15479 console.")
15480 (license license:bsd-3)))
15481
15482 (define-public python2-qrcode
15483 (package-with-python2 python-qrcode))
15484
15485 (define-public python-rst2ansi
15486 (package
15487 (name "python-rst2ansi")
15488 (version "0.1.5")
15489 (source
15490 (origin
15491 (method url-fetch)
15492 (uri (pypi-uri "rst2ansi" version))
15493 (sha256
15494 (base32
15495 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
15496 (build-system python-build-system)
15497 (propagated-inputs
15498 `(("python-docutils" ,python-docutils)))
15499 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
15500 (synopsis "Convert RST to ANSI-decorated console output")
15501 (description
15502 "Python module dedicated to rendering RST (reStructuredText) documents
15503 to ansi-escaped strings suitable for display in a terminal.")
15504 (license license:expat)))
15505
15506 (define-public python-ansi2html
15507 (package
15508 (name "python-ansi2html")
15509 (version "1.2.0")
15510 (source
15511 (origin
15512 (method url-fetch)
15513 (uri (pypi-uri "ansi2html" version))
15514 (sha256
15515 (base32
15516 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
15517 (build-system python-build-system)
15518 (native-inputs
15519 `(("python-mock" ,python-mock)
15520 ("python-nose" ,python-nose)))
15521 (propagated-inputs
15522 `(("python-six" ,python-six)))
15523 (home-page "https://github.com/ralphbean/ansi2html")
15524 (synopsis "Convert ANSI-decorated console output to HTML")
15525 (description
15526 "@command{ansi2html} is a Python library and command line utility for
15527 converting text with ANSI color codes to HTML or LaTeX.")
15528 (license license:gpl3+)))
15529
15530 (define-public python2-ansi2html
15531 (package-with-python2 python-ansi2html))
15532
15533 (define-public python-ddt
15534 (package
15535 (name "python-ddt")
15536 (version "1.4.1")
15537 (source
15538 (origin
15539 (method url-fetch)
15540 (uri (pypi-uri "ddt" version))
15541 (sha256
15542 (base32
15543 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
15544 (build-system python-build-system)
15545 (native-inputs
15546 `(("python-pytest" ,python-pytest)))
15547 (propagated-inputs
15548 `(("python-pyyaml" ,python-pyyaml)))
15549 (home-page "https://github.com/datadriventests/ddt")
15550 (synopsis "Data-Driven Tests")
15551 (description
15552 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
15553 running it with different test data, and make it appear as multiple test
15554 cases.")
15555 (license license:expat)))
15556
15557 (define-public python-pycountry
15558 (package
15559 (name "python-pycountry")
15560 (version "18.5.26")
15561 (source
15562 (origin
15563 (method url-fetch)
15564 (uri (pypi-uri "pycountry" version))
15565 (sha256
15566 (base32
15567 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
15568 (build-system python-build-system)
15569 (home-page "https://bitbucket.org/flyingcircus/pycountry")
15570 (synopsis "ISO databases for languages, countries, currencies, etc.")
15571 (description
15572 "@code{pycountry} provides the ISO databases for the standards:
15573 @enumerate
15574 @item 639-3 (Languages)
15575 @item 3166 (Countries)
15576 @item 3166-3 (Deleted Countries)
15577 @item 3166-2 (Subdivisions of countries)
15578 @item 4217 (Currencies)
15579 @item 15924 (Scripts)
15580 @end enumerate
15581 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
15582 through a Python API.")
15583 (license license:lgpl2.1+)))
15584
15585 (define-public python2-pycountry
15586 (package-with-python2 python-pycountry))
15587
15588 (define-public python-pycosat
15589 (package
15590 (name "python-pycosat")
15591 (version "0.6.3")
15592 (source
15593 (origin
15594 (method url-fetch)
15595 (uri (pypi-uri "pycosat" version ".zip"))
15596 (sha256
15597 (base32
15598 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
15599 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
15600 (build-system python-build-system)
15601 (native-inputs
15602 `(("unzip" ,unzip)))
15603 (home-page "https://github.com/ContinuumIO/pycosat")
15604 (synopsis "Bindings to picosat (a SAT solver)")
15605 (description
15606 "This package provides efficient Python bindings to @code{picosat} on
15607 the C level. When importing pycosat, the @code{picosat} solver becomes part
15608 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
15609 Problem} (SAT) solver.")
15610 (license license:expat)))
15611
15612 (define-public python2-pycosat
15613 (package-with-python2 python-pycosat))
15614
15615 (define-public python2-ruamel.ordereddict
15616 (package
15617 (name "python2-ruamel.ordereddict")
15618 (version "0.4.9")
15619 (source
15620 (origin
15621 (method url-fetch)
15622 (uri (pypi-uri "ruamel.ordereddict" version))
15623 (sha256
15624 (base32
15625 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
15626 (build-system python-build-system)
15627 (arguments
15628 `(#:python ,python-2
15629 #:phases
15630 (modify-phases %standard-phases
15631 (delete 'check)
15632 (add-after 'install 'check
15633 (lambda* (#:key inputs outputs #:allow-other-keys)
15634 (add-installed-pythonpath inputs outputs)
15635 (invoke "python" "test/testordereddict.py"))))))
15636 (home-page "https://bitbucket.org/ruamel/ordereddict")
15637 (synopsis "Version of dict that keeps keys in insertion order")
15638 (description
15639 "This is an implementation of an ordered dictionary with @dfn{Key
15640 Insertion Order} (KIO: updates of values do not affect the position of the
15641 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15642 removed and put at the back). The standard library module @code{OrderedDict},
15643 implemented later, implements a subset of @code{ordereddict} functionality.
15644 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15645 Order} (KSO, no sorting function can be specified, but a transform can be
15646 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15647 (license license:expat)))
15648
15649 (define-public python-pypeg2
15650 (package
15651 (name "python-pypeg2")
15652 (version "2.15.2")
15653 (source
15654 (origin
15655 (method url-fetch)
15656 (uri (pypi-uri "pyPEG2" version))
15657 (sha256
15658 (base32
15659 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15660 (build-system python-build-system)
15661 (propagated-inputs `(("python-lxml" ,python-lxml)))
15662 (arguments
15663 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15664 '(#:tests? #f))
15665 (home-page "https://fdik.org/pyPEG/")
15666 (synopsis "Parsing Expression Grammars in Python")
15667 (description "PyPEG is an intrinsic parser interpreter framework for
15668 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15669 parse many formal languages.")
15670 (license license:gpl2)))
15671
15672 (define-public python-incremental
15673 (package
15674 (name "python-incremental")
15675 (version "17.5.0")
15676 (source
15677 (origin
15678 (method url-fetch)
15679 (uri (pypi-uri "incremental" version))
15680 (sha256
15681 (base32
15682 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15683 (build-system python-build-system)
15684 (home-page "https://github.com/hawkowl/incremental")
15685 (synopsis "Library for versioning Python projects")
15686 (description "Incremental is a small library that versions your Python
15687 projects.")
15688 (license license:expat)))
15689
15690 (define-public python2-incremental
15691 (package-with-python2 python-incremental))
15692
15693 (define-public python-invoke
15694 (package
15695 (name "python-invoke")
15696 (home-page "https://www.pyinvoke.org/")
15697 (version "1.5.0")
15698 (source (origin
15699 (method url-fetch)
15700 (uri (pypi-uri "invoke" version))
15701 (sha256
15702 (base32
15703 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
15704 (build-system python-build-system)
15705 (arguments
15706 ;; XXX: Requires many dependencies that are not yet in Guix.
15707 `(#:tests? #f
15708 #:phases
15709 (modify-phases %standard-phases
15710 (add-after 'unpack 'fix-bash-path
15711 (lambda* (#:key inputs #:allow-other-keys)
15712 (let ((bash (assoc-ref inputs "bash")))
15713 (substitute* "invoke/config.py"
15714 (("shell = \"/bin/bash\"")
15715 (string-append "shell = \"" bash "/bin/bash\""))
15716 )
15717 #t))))))
15718 (inputs
15719 `(("bash" ,bash-minimal)))
15720 (synopsis "Pythonic task execution")
15721 (description
15722 "Invoke is a Python task execution tool and library, drawing inspiration
15723 from various sources to arrive at a powerful and clean feature set. It is
15724 evolved from the Fabric project, but focuses on local and abstract concerns
15725 instead of servers and network commands.")
15726 (license license:bsd-3)))
15727
15728 (define-public python2-invoke
15729 (package-with-python2 python-invoke))
15730
15731 (define-public python-automat
15732 (package
15733 (name "python-automat")
15734 (version "20.2.0")
15735 (source (origin
15736 (method url-fetch)
15737 (uri (pypi-uri "Automat" version))
15738 (sha256
15739 (base32
15740 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15741 (build-system python-build-system)
15742 ;; We disable the tests because they require python-twisted, while
15743 ;; python-twisted depends on python-automat. Twisted is optional, but the
15744 ;; tests fail if it is not available. Also see
15745 ;; <https://github.com/glyph/automat/issues/71>.
15746 (arguments '(#:tests? #f))
15747 (native-inputs
15748 `(("python-m2r" ,python-m2r)
15749 ("python-setuptools-scm" ,python-setuptools-scm)
15750 ("python-graphviz" ,python-graphviz)))
15751 (propagated-inputs
15752 `(("python-six" ,python-six)
15753 ("python-attrs" ,python-attrs)))
15754 (home-page "https://github.com/glyph/Automat")
15755 (synopsis "Self-service finite-state machines")
15756 (description "Automat is a library for concise, idiomatic Python
15757 expression of finite-state automata (particularly deterministic finite-state
15758 transducers).")
15759 (license license:expat)))
15760
15761 (define-public python2-automat
15762 (package-with-python2 python-automat))
15763
15764 (define-public python-m2r
15765 (package
15766 (name "python-m2r")
15767 (version "0.2.1")
15768 (source (origin
15769 (method url-fetch)
15770 (uri (pypi-uri "m2r" version))
15771 (sha256
15772 (base32
15773 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15774 (build-system python-build-system)
15775 (propagated-inputs
15776 `(("python-docutils" ,python-docutils)
15777 ("python-mistune" ,python-mistune)))
15778 (native-inputs
15779 `(("python-pygments" ,python-pygments)
15780 ("python-mock" ,python-mock)))
15781 (home-page "https://github.com/miyakogi/m2r")
15782 (synopsis "Markdown to reStructuredText converter")
15783 (description "M2R converts a markdown file including reST markups to valid
15784 reST format.")
15785 (license license:expat)))
15786
15787 (define-public python2-m2r
15788 (package-with-python2 python-m2r))
15789
15790 (define-public python-constantly
15791 (package
15792 (name "python-constantly")
15793 (version "15.1.0")
15794 (source (origin
15795 (method url-fetch)
15796 (uri (pypi-uri "constantly" version))
15797 (sha256
15798 (base32
15799 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15800 (build-system python-build-system)
15801 (home-page "https://github.com/twisted/constantly")
15802 (synopsis "Symbolic constants in Python")
15803 (description "Constantly is a Python library that provides symbolic
15804 constant support. It includes collections and constants with text, numeric,
15805 and bit flag values.")
15806 (license license:expat)))
15807
15808 (define-public python2-constantly
15809 (package-with-python2 python-constantly))
15810
15811 (define-public python-attrs
15812 (package
15813 (name "python-attrs")
15814 (version "19.3.0")
15815 (source (origin
15816 (method url-fetch)
15817 (uri (pypi-uri "attrs" version))
15818 (sha256
15819 (base32
15820 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15821 (build-system python-build-system)
15822 (arguments
15823 `(#:modules ((guix build utils)
15824 (guix build python-build-system)
15825 (ice-9 ftw)
15826 (srfi srfi-1)
15827 (srfi srfi-26))
15828 #:phases (modify-phases %standard-phases
15829 (replace 'check
15830 (lambda _
15831 (let ((cwd (getcwd)))
15832 (setenv "PYTHONPATH"
15833 (string-append
15834 cwd "/build/"
15835 (find (cut string-prefix? "lib" <>)
15836 (scandir (string-append cwd "/build")))
15837 ":"
15838 (getenv "PYTHONPATH")))
15839 (invoke "python" "-m" "pytest")))))))
15840 (native-inputs
15841 `(("python-coverage" ,python-coverage)
15842 ("python-hypothesis" ,python-hypothesis)
15843 ("python-pympler" ,python-pympler)
15844 ("python-pytest" ,python-pytest)
15845 ("python-six" ,python-six)
15846 ("python-sphinx" ,python-sphinx)
15847 ("python-zope-interface" ,python-zope-interface)))
15848 (home-page "https://github.com/python-attrs/attrs/")
15849 (synopsis "Attributes without boilerplate")
15850 (description "@code{attrs} is a Python package with class decorators that
15851 ease the chores of implementing the most common attribute-related object
15852 protocols.")
15853 (license license:expat)))
15854
15855 (define-public python2-attrs
15856 (package-with-python2 python-attrs))
15857
15858 (define-public python-attrs-bootstrap
15859 (package
15860 (inherit python-attrs)
15861 (name "python-attrs-bootstrap")
15862 (native-inputs `())
15863 (arguments `(#:tests? #f))))
15864
15865 (define-public python2-attrs-bootstrap
15866 (package-with-python2 python-attrs-bootstrap))
15867
15868 (define-public python2-cliapp
15869 (package
15870 (name "python2-cliapp")
15871 (version "1.20180812.1")
15872 (source
15873 (origin
15874 (method url-fetch)
15875 (uri (string-append
15876 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15877 version ".tar.gz"))
15878 (sha256
15879 (base32
15880 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15881 (build-system python-build-system)
15882 (arguments
15883 `(#:python ,python-2
15884 #:phases
15885 (modify-phases %standard-phases
15886 ;; check phase needs to be run before the build phase. If not,
15887 ;; coverage-test-runner looks for tests for the built source files,
15888 ;; and fails.
15889 (delete 'check)
15890 (add-before 'build 'check
15891 (lambda _
15892 ;; Disable python3 tests
15893 (substitute* "check"
15894 (("python3") "# python3"))
15895 (invoke "./check"))))))
15896 (native-inputs
15897 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15898 ("python2-pep8" ,python2-pep8)))
15899 (propagated-inputs
15900 `(("python2-pyaml" ,python2-pyaml)))
15901 (home-page "https://liw.fi/cliapp/")
15902 (synopsis "Python framework for command line programs")
15903 (description "@code{python2-cliapp} is a python framework for
15904 command line programs. It contains the typical stuff such programs
15905 need to do, such as parsing the command line for options, and
15906 iterating over input files.")
15907 (license license:gpl2+)))
15908
15909 (define-public python2-ttystatus
15910 (package
15911 (name "python2-ttystatus")
15912 (version "0.38")
15913 (source
15914 (origin
15915 (method git-fetch)
15916 (uri (git-reference
15917 (url "http://git.liw.fi/ttystatus")
15918 ;; There are no tags after ttystatus-0.36.
15919 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15920 (sha256
15921 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15922 (file-name (git-file-name name version))))
15923 (build-system python-build-system)
15924 (native-inputs
15925 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15926 ("python2-pep8" ,python2-pep8)))
15927 (arguments
15928 `(#:python ,python-2
15929 #:phases
15930 (modify-phases %standard-phases
15931 ;; check phase needs to be run before the build phase. If not,
15932 ;; coverage-test-runner looks for tests for the built source files,
15933 ;; and fails.
15934 (delete 'check)
15935 (add-before 'build 'check
15936 (lambda _ (invoke "make" "check"))))))
15937 (home-page "https://liw.fi/ttystatus/")
15938 (synopsis "Python library for showing progress reporting and
15939 status updates on terminals")
15940 (description "@code{python2-ttystatus} is a python library for
15941 showing progress reporting and status updates on terminals, for
15942 command line programs. Output is automatically adapted to the width
15943 of the terminal: truncated if it does not fit, and resized if the
15944 terminal size changes.")
15945 (license license:gpl3+)))
15946
15947 (define-public python2-tracing
15948 (package
15949 (name "python2-tracing")
15950 (version "0.10")
15951 (source
15952 (origin
15953 (method url-fetch)
15954 (uri (string-append
15955 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15956 version ".tar.gz"))
15957 (sha256
15958 (base32
15959 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15960 (build-system python-build-system)
15961 (arguments
15962 `(#:python ,python-2))
15963 (home-page "https://liw.fi/tracing/")
15964 (synopsis "Python debug logging helper")
15965 (description "@code{python2-tracing} is a python library for
15966 logging debug messages. It provides a way to turn debugging messages
15967 on and off, based on the filename they occur in. It is much faster
15968 than using @code{logging.Filter} to accomplish the same thing, which
15969 matters when code is run in production mode. The actual logging still
15970 happens using the @code{logging} library.")
15971 (license license:gpl3+)))
15972
15973 (define-public python2-larch
15974 (package
15975 (name "python2-larch")
15976 (version "1.20151025")
15977 (source
15978 (origin
15979 (method url-fetch)
15980 (uri (string-append
15981 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15982 version ".tar.gz"))
15983 (patches (search-patches
15984 "python2-larch-coverage-4.0a6-compatibility.patch"))
15985 (sha256
15986 (base32
15987 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15988 (build-system python-build-system)
15989 (arguments
15990 `(#:python ,python-2
15991 #:phases
15992 (modify-phases %standard-phases
15993 ;; check phase needs to be run before the build phase. If not,
15994 ;; coverage-test-runner looks for tests for the built source files,
15995 ;; and fails.
15996 (delete 'check)
15997 (add-before 'build 'check
15998 (lambda _ (invoke "make" "check"))))))
15999 (native-inputs
16000 `(("cmdtest" ,cmdtest)
16001 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
16002 (propagated-inputs
16003 `(("python2-tracing" ,python2-tracing)))
16004 (home-page "https://liw.fi/larch/")
16005 (synopsis "Python copy-on-write B-tree library")
16006 (description "@code{python2-larch} is an implementation of
16007 particular kind of B-tree, based on research by Ohad Rodeh. See
16008 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
16009 on the data structure.
16010
16011 The distinctive feature of this B-tree is that a node is never
16012 (conceptually) modified. Instead, all updates are done by
16013 copy-on-write. This makes it easy to clone a tree, and modify only the
16014 clone, while other processes access the original tree.")
16015 (license license:gpl3+)))
16016
16017 (define-public python-astroid
16018 (package
16019 (name "python-astroid")
16020 (version "2.4.2")
16021 (source
16022 (origin
16023 (method url-fetch)
16024 (uri (pypi-uri "astroid" version))
16025 (sha256
16026 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
16027 (modules '((guix build utils)))
16028 (snippet
16029 '(begin
16030 ;; Check to see if the version pinning has been removed.
16031 (substitute* "astroid/__pkginfo__.py"
16032 (("==1\\.4\\.\\*") ">=1.4.0"))
16033 #t))))
16034 (build-system python-build-system)
16035 (propagated-inputs
16036 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
16037 ("python-six" ,python-six)
16038 ("python-wrapt" ,python-wrapt)))
16039 (native-inputs
16040 `(("python-dateutil" ,python-dateutil)
16041 ("python-pytest" ,python-pytest)
16042 ("python-pytest-runner" ,python-pytest-runner)))
16043 (home-page "https://github.com/PyCQA/astroid")
16044 (synopsis "Common base representation of python source code for pylint and
16045 other projects")
16046 (description "@code{python-astroid} provides a common base representation
16047 of python source code for projects such as pychecker, pyreverse, pylint, etc.
16048
16049 It provides a compatible representation which comes from the _ast module. It
16050 rebuilds the tree generated by the builtin _ast module by recursively walking
16051 down the AST and building an extended ast. The new node classes have
16052 additional methods and attributes for different usages. They include some
16053 support for static inference and local name scopes. Furthermore, astroid
16054 builds partial trees by inspecting living objects.")
16055 (license license:lgpl2.1+)
16056 (properties `((python2-variant . ,(delay python2-astroid))))))
16057
16058 (define-public python2-astroid
16059 (let ((base (package-with-python2
16060 (strip-python2-variant python-astroid))))
16061 (package (inherit base)
16062 ;; Version 2.x removes python2 support.
16063 (version "1.6.5")
16064 (source
16065 (origin
16066 (method url-fetch)
16067 (uri (pypi-uri "astroid" version))
16068 (sha256
16069 (base32
16070 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
16071 (arguments
16072 (substitute-keyword-arguments (package-arguments base)
16073 ((#:phases phases)
16074 `(modify-phases ,phases
16075 (add-after 'unpack 'remove-spurious-test
16076 (lambda _
16077 ;; https://github.com/PyCQA/astroid/issues/276
16078 (delete-file "astroid/tests/unittest_brain.py")
16079 #t))
16080 (replace 'check
16081 (lambda _
16082 (invoke"python" "-m" "unittest" "discover"
16083 "-p" "unittest*.py")))))))
16084 (native-inputs `())
16085 (propagated-inputs
16086 `(("python2-backports-functools-lru-cache"
16087 ,python2-backports-functools-lru-cache)
16088 ("python2-enum34" ,python2-enum34)
16089 ("python2-singledispatch" ,python2-singledispatch)
16090 ,@(alist-delete "python-typed-ast"
16091 (package-propagated-inputs base)))))))
16092
16093 (define-public python-isbnlib
16094 (package
16095 (name "python-isbnlib")
16096 (version "3.10.4")
16097 (source
16098 (origin
16099 (method url-fetch)
16100 (uri (pypi-uri "isbnlib" version))
16101 (sha256
16102 (base32
16103 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
16104 (build-system python-build-system)
16105 (arguments '(#:tests? #f)) ; No test
16106 (home-page "https://github.com/xlcnd/isbnlib")
16107 (synopsis "Python library to work with ISBN strings")
16108 (description "@code{python-isbnlib} is a (pure) python library that provides
16109 several useful methods and functions to validate, clean, transform, hyphenate and
16110 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
16111 version, is suitable to be include as a dependency in other projects.")
16112 (license license:lgpl3+)))
16113
16114 (define-public python-isort
16115 (package
16116 (name "python-isort")
16117 (version "4.3.4")
16118 (source
16119 (origin
16120 (method git-fetch)
16121 (uri (git-reference
16122 ;; Tests pass only from the Github sources
16123 (url "https://github.com/timothycrosley/isort")
16124 (commit version)))
16125 (file-name (git-file-name name version))
16126 (sha256
16127 (base32
16128 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
16129 (build-system python-build-system)
16130 (native-inputs
16131 `(("python-mock" ,python-mock)
16132 ("python-pytest" ,python-pytest)))
16133 (home-page "https://github.com/timothycrosley/isort")
16134 (synopsis "Python utility/library to sort python imports")
16135 (description "@code{python-isort} is a python utility/library to sort
16136 imports alphabetically, and automatically separated into sections. It
16137 provides a command line utility, a python library and plugins for various
16138 editors.")
16139 (license license:expat)
16140 (properties `((python2-variant . ,(delay python2-isort))))))
16141
16142 (define-public python2-isort
16143 (let ((base (package-with-python2
16144 (strip-python2-variant python-isort))))
16145 (package/inherit base
16146 (native-inputs
16147 `(("python2-futures" ,python2-futures)
16148 ,@(package-native-inputs base))))))
16149
16150 (define-public python2-backports-functools-lru-cache
16151 (package
16152 (name "python2-backports-functools-lru-cache")
16153 (version "1.6.1")
16154 (source
16155 (origin
16156 (method url-fetch)
16157 ;; only the pypi tarballs contain the necessary metadata
16158 (uri (pypi-uri "backports.functools_lru_cache" version))
16159 (sha256
16160 (base32
16161 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
16162 (build-system python-build-system)
16163 (native-inputs
16164 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
16165 (arguments
16166 `(#:python ,python-2))
16167 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
16168 (synopsis "Backport of functools.lru_cache from Python 3.3")
16169 (description "@code{python2-backports-functools-lru-cache} is a backport
16170 of @code{functools.lru_cache} from python 3.3.")
16171 (license license:expat)))
16172
16173 (define-public python-configparser
16174 (package
16175 (name "python-configparser")
16176 (version "4.0.2")
16177 (source
16178 (origin
16179 (method url-fetch)
16180 (uri (pypi-uri "configparser" version))
16181 (sha256
16182 (base32
16183 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
16184 (native-inputs
16185 `(("python-setuptools_scm" ,python-setuptools-scm)))
16186 (build-system python-build-system)
16187 (home-page "https://github.com/jaraco/configparser/")
16188 (synopsis "Backport of configparser from python 3.5")
16189 (description "@code{python-configparser} is a backport of
16190 @code{configparser} from Python 3.5 so that it can be used directly
16191 in other versions.")
16192 (license license:expat)))
16193
16194 (define-public python2-configparser
16195 (package-with-python2 python-configparser))
16196
16197 (define-public python-iniconfig
16198 (package
16199 (name "python-iniconfig")
16200 (version "1.1.1")
16201 (source
16202 (origin
16203 (method url-fetch)
16204 (uri (pypi-uri "iniconfig" version))
16205 (sha256
16206 (base32
16207 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
16208 (build-system python-build-system)
16209 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
16210 (synopsis "Simple INI-file parser")
16211 (description "The @code{iniconfig} package provides a small and simple
16212 INI-file parser module having a unique set of features; @code{iniconfig}
16213 @itemize
16214 @item maintains the order of sections and entries;
16215 @item supports multi-line values with or without line-continuations;
16216 @item supports \"#\" comments everywhere;
16217 @item raises errors with proper line-numbers;
16218 @item raises an error when two sections have the same name.
16219 @end itemize")
16220 (license license:expat)))
16221
16222 (define-public python-mamba
16223 (package
16224 (name "python-mamba")
16225 (version "0.11.2")
16226 (source (origin
16227 (method url-fetch)
16228 (uri (pypi-uri "mamba" version))
16229 (sha256
16230 (base32
16231 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
16232 (build-system python-build-system)
16233 (arguments `(#:tests? #f)) ; No test
16234 (propagated-inputs
16235 `(("python-clint" ,python-clint)
16236 ("python-coverage" ,python-coverage)))
16237 (home-page "https://nestorsalceda.com/mamba/")
16238 (synopsis "Test runner for Python")
16239 (description
16240 "Mamba is a Behaviour-Driven Development tool for Python developers.
16241 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
16242 (license license:expat)))
16243
16244 (define-public python-mando
16245 (package
16246 (name "python-mando")
16247 (version "0.6.4")
16248 (source (origin
16249 (method url-fetch)
16250 (uri (pypi-uri "mando" version))
16251 (sha256
16252 (base32
16253 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
16254 (build-system python-build-system)
16255 (propagated-inputs
16256 `(("python-rst2ansi" ,python-rst2ansi)
16257 ("python-six" ,python-six)))
16258 (native-inputs
16259 `(("python-pytest" ,python-pytest)))
16260 (home-page "https://mando.readthedocs.org/")
16261 (synopsis
16262 "Wrapper around argparse, allowing creation of complete CLI applications")
16263 (description
16264 "This package is a wrapper around argparse, allowing you to write complete CLI
16265 applications in seconds while maintaining all the flexibility.")
16266 (license license:expat)))
16267
16268 (define-public python2-mando
16269 (package-with-python2 python-mando))
16270
16271 (define-public python2-argparse
16272 (package
16273 (name "python2-argparse")
16274 (version "1.4.0")
16275 (source
16276 (origin
16277 (method url-fetch)
16278 (uri (pypi-uri "argparse" version))
16279 (sha256
16280 (base32
16281 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
16282 (build-system python-build-system)
16283 (arguments
16284 `(#:python ,python-2))
16285 (home-page "https://github.com/ThomasWaldmann/argparse/")
16286 (synopsis "Python command-line parsing library")
16287 (description
16288 "This package is mostly for people who want to have @code{argparse} on
16289 older Pythons because it was not part of the standard library back then.")
16290 (license license:psfl)))
16291
16292 (define-public python-fudge
16293 (package
16294 (name "python-fudge")
16295 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
16296 ;; package, which is currently the only use of this package.
16297 (version "0.9.6")
16298 (source
16299 (origin
16300 (method url-fetch)
16301 (uri (pypi-uri "fudge" version))
16302 (sha256
16303 (base32
16304 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
16305 (build-system python-build-system)
16306 (arguments
16307 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
16308 (home-page "https://github.com/fudge-py/fudge")
16309 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
16310 (description
16311 "Fudge is a Python module for using fake objects (mocks and stubs) to
16312 test real ones.
16313
16314 In readable Python code, you declare the methods available on your fake object
16315 and how they should be called. Then you inject that into your application and
16316 start testing. This declarative approach means you don’t have to record and
16317 playback actions and you don’t have to inspect your fakes after running code.
16318 If the fake object was used incorrectly then you’ll see an informative
16319 exception message with a traceback that points to the culprit.")
16320 (license license:expat)))
16321
16322 (define-public python2-fudge
16323 (package-with-python2 python-fudge))
16324
16325 (define-public python-mwclient
16326 (package
16327 (name "python-mwclient")
16328 (version "0.10.1")
16329 (source
16330 (origin
16331 (method git-fetch)
16332 ;; The PyPI version wouldn't contain tests.
16333 (uri (git-reference
16334 (url "https://github.com/mwclient/mwclient")
16335 (commit (string-append "v" version))))
16336 (file-name (git-file-name name version))
16337 (sha256
16338 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
16339 (build-system python-build-system)
16340 (propagated-inputs
16341 `(("python-requests-oauthlib" ,python-requests-oauthlib)
16342 ("python-six" ,python-six)))
16343 (native-inputs
16344 `(("python-mock" ,python-mock)
16345 ("python-pytest" ,python-pytest)
16346 ("python-pytest-cov" ,python-pytest-cov)
16347 ("python-pytest-runner" ,python-pytest-runner)
16348 ("python-responses" ,python-responses)))
16349 (home-page "https://github.com/btongminh/mwclient")
16350 (synopsis "MediaWiki API client")
16351 (description "This package provides a MediaWiki API client.")
16352 (license license:expat)))
16353
16354 (define-public python-utils
16355 (package
16356 (name "python-utils")
16357 (version "2.4.0")
16358 (source (origin
16359 (method url-fetch)
16360 (uri (pypi-uri "python-utils" version))
16361 (sha256
16362 (base32
16363 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
16364 (build-system python-build-system)
16365 (arguments
16366 `(#:phases
16367 (modify-phases %standard-phases
16368 (replace 'check
16369 (lambda* (#:key inputs outputs #:allow-other-keys)
16370 (add-installed-pythonpath inputs outputs)
16371 (delete-file "pytest.ini")
16372 (invoke "pytest" "-vv"))))))
16373 (native-inputs
16374 `(("pytest-runner" ,python-pytest-runner)
16375 ("pytest" ,python-pytest)
16376 ("six" ,python-six)))
16377 (home-page "https://github.com/WoLpH/python-utils")
16378 (synopsis "Convenient utilities not included with the standard Python install")
16379 (description
16380 "Python Utils is a collection of small Python functions and classes which
16381 make common patterns shorter and easier.")
16382 (license license:bsd-2)))
16383
16384 (define-public python-diff-match-patch
16385 (package
16386 (name "python-diff-match-patch")
16387 (version "20121119")
16388 (source
16389 (origin
16390 (method url-fetch)
16391 (uri (pypi-uri "diff-match-patch" version))
16392 (sha256
16393 (base32
16394 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
16395 (build-system python-build-system)
16396 (home-page "https://code.google.com/p/google-diff-match-patch")
16397 (synopsis "Synchronize plain text")
16398 (description "Diff Match and Patch libraries offer robust algorithms to
16399 perform the operations required for synchronizing plain text.")
16400 (license license:asl2.0)))
16401
16402 (define-public python2-diff-match-patch
16403 (package-with-python2 python-diff-match-patch))
16404
16405 (define-public python-dirsync
16406 (package
16407 (name "python-dirsync")
16408 (version "2.2.5")
16409 (source
16410 (origin
16411 (method url-fetch)
16412 (uri (pypi-uri "dirsync" version))
16413 (sha256
16414 (base32
16415 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
16416 (build-system python-build-system)
16417 (propagated-inputs
16418 `(("six" ,python-six)))
16419 (home-page "https://github.com/tkhyn/dirsync")
16420 (synopsis "Advanced directory tree synchronisation tool")
16421 (description "Advanced directory tree synchronisation tool.")
16422 (license license:expat)))
16423
16424 (define-public python2-dirsync
16425 (package-with-python2 python-dirsync))
16426
16427 (define-public python-levenshtein
16428 (package
16429 (name "python-levenshtein")
16430 (version "0.12.0")
16431 (source
16432 (origin
16433 (method url-fetch)
16434 (uri (pypi-uri "python-Levenshtein" version))
16435 (sha256
16436 (base32
16437 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
16438 (build-system python-build-system)
16439 (home-page "https://github.com/ztane/python-Levenshtein")
16440 (synopsis "Fast computation of Levenshtein distance and string similarity")
16441 (description
16442 "The Levenshtein Python C extension module contains functions for fast computation of
16443 @enumerate
16444 @item Levenshtein (edit) distance, and edit operations
16445 @item string similarity
16446 @item approximate median strings, and generally string averaging
16447 @item string sequence and set similarity
16448 @end enumerate
16449 It supports both normal and Unicode strings.")
16450 (license license:gpl2+)))
16451
16452 (define-public python2-levenshtein
16453 (package-with-python2 python-levenshtein))
16454
16455 (define-public python-scandir
16456 (package
16457 (name "python-scandir")
16458 (version "1.10.0")
16459 (source
16460 (origin
16461 (method url-fetch)
16462 (uri (pypi-uri "scandir" version))
16463 (sha256
16464 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
16465 (build-system python-build-system)
16466 (arguments
16467 `(#:phases (modify-phases %standard-phases
16468 (replace 'check
16469 (lambda _
16470 (invoke "python" "test/run_tests.py"))))))
16471 (home-page "https://github.com/benhoyt/scandir")
16472 (synopsis "Directory iteration function")
16473 (description
16474 "Directory iteration function like os.listdir(), except that instead of
16475 returning a list of bare filenames, it yields DirEntry objects that include
16476 file type and stat information along with the name. Using scandir() increases
16477 the speed of os.walk() by 2-20 times (depending on the platform and file
16478 system) by avoiding unnecessary calls to os.stat() in most cases.
16479
16480 This package is part of the Python standard library since version 3.5.")
16481 (license license:bsd-3)))
16482
16483 (define-public python2-scandir
16484 (package-with-python2 python-scandir))
16485
16486 (define-public python2-stemming
16487 (package
16488 (name "python2-stemming")
16489 (version "1.0.1")
16490 (source
16491 (origin
16492 (method url-fetch)
16493 (uri (pypi-uri "stemming" version))
16494 (sha256
16495 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
16496 (build-system python-build-system)
16497 (arguments
16498 `(#:python ,python-2))
16499 (home-page "https://bitbucket.org/mchaput/stemming/overview")
16500 (synopsis "Python implementations of various stemming algorithms")
16501 (description
16502 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
16503 stemming algorithms for English. These implementations are straightforward and
16504 efficient, unlike some Python versions of the same algorithms available on the
16505 Web. This package is an extraction of the stemming code included in the Whoosh
16506 search engine.")
16507 (license license:public-domain)))
16508
16509 (define-public python-factory-boy
16510 (package
16511 (name "python-factory-boy")
16512 (version "2.8.1")
16513 (source
16514 (origin
16515 (method url-fetch)
16516 (uri (pypi-uri "factory_boy" version))
16517 (sha256
16518 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
16519 (build-system python-build-system)
16520 (arguments
16521 ;; Tests are not included in the tarball.
16522 `(#:tests? #f))
16523 (propagated-inputs
16524 `(("faker" ,python-faker)))
16525 (home-page "https://github.com/benhoyt/scandir")
16526 (synopsis "Versatile test fixtures replacement")
16527 (description
16528 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
16529
16530 As a fixtures replacement tool, it aims to replace static, hard to maintain
16531 fixtures with easy-to-use factories for complex object.
16532
16533 Instead of building an exhaustive test setup with every possible combination
16534 of corner cases, factory_boy allows you to use objects customized for the
16535 current test, while only declaring the test-specific fields")
16536 (license license:expat)))
16537
16538 (define-public python2-factory-boy
16539 (package-with-python2 python-factory-boy))
16540
16541 (define-public python-translate-toolkit
16542 (package
16543 (name "python-translate-toolkit")
16544 (version "2.1.0")
16545 (source
16546 (origin
16547 (method url-fetch)
16548 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
16549 (sha256
16550 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
16551 (build-system python-build-system)
16552 (native-inputs
16553 `(("python-pytest" ,python-pytest)
16554 ("python-sphinx" ,python-sphinx)))
16555 (propagated-inputs
16556 `(("python-babel" ,python-babel)
16557 ("python-beautifulsoup4" ,python-beautifulsoup4)
16558 ("python-chardet" ,python-chardet)
16559 ("python-diff-match-patch" ,python-diff-match-patch)
16560 ("python-levenshtein" ,python-levenshtein)
16561 ("python-lxml" ,python-lxml)
16562 ("python-six" ,python-six)
16563 ("python-vobject" ,python-vobject)
16564 ("python-pyyaml" ,python-pyyaml)))
16565 (arguments
16566 ;; TODO: tests are not run, because they end with
16567 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
16568 ;; 'parse_funcs'
16569 ;; during test setup.
16570 `(#:tests? #f))
16571 (home-page "https://toolkit.translatehouse.org")
16572 (synopsis "Tools and API for translation and localization engineering")
16573 (description
16574 "Tools and API for translation and localization engineering. It contains
16575 several utilities, as well as an API for building localization tools.")
16576 (license license:gpl2+)))
16577
16578 (define-public python2-translate-toolkit
16579 (package-with-python2 python-translate-toolkit))
16580
16581 (define-public python-packaging
16582 (package
16583 (name "python-packaging")
16584 (version "20.0")
16585 (source
16586 (origin
16587 (method url-fetch)
16588 (uri (pypi-uri "packaging" version))
16589 ;; XXX: The URL in the patch file is wrong, it should be
16590 ;; <https://github.com/pypa/packaging/pull/256>.
16591 (patches (search-patches "python-packaging-test-arch.patch"))
16592 (sha256
16593 (base32
16594 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
16595 (build-system python-build-system)
16596 (arguments
16597 `(#:phases (modify-phases %standard-phases
16598 (replace 'check
16599 (lambda* (#:key tests? #:allow-other-keys)
16600 (if tests?
16601 (invoke "py.test" "-vv")
16602 (format #t "test suite not run~%"))
16603 #t)))))
16604 (native-inputs
16605 `(("python-pretend" ,python-pretend)
16606 ("python-pytest" ,python-pytest)))
16607 (propagated-inputs
16608 `(("python-pyparsing" ,python-pyparsing)
16609 ("python-six" ,python-six)))
16610 (home-page "https://github.com/pypa/packaging")
16611 (synopsis "Core utilities for Python packages")
16612 (description "Packaging is a Python module for dealing with Python packages.
16613 It offers an interface for working with package versions, names, and dependency
16614 information.")
16615 ;; From 'LICENSE': This software is made available under the terms of
16616 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
16617 ;; Contributions to this software is made under the terms of *both* these
16618 ;; licenses.
16619 (license (list license:asl2.0 license:bsd-2))))
16620
16621 (define-public python2-packaging
16622 (package-with-python2 python-packaging))
16623
16624 ;; Variants with minimal dependencies, for bootstrapping Pytest.
16625 (define-public python-packaging-bootstrap
16626 (hidden-package
16627 (package/inherit
16628 python-packaging
16629 (name "python-packaging-bootstrap")
16630 (native-inputs '())
16631 (propagated-inputs
16632 `(("python-pyparsing" ,python-pyparsing)))
16633 (arguments '(#:tests? #f)))))
16634
16635 (define-public python2-packaging-bootstrap
16636 (hidden-package
16637 (package/inherit
16638 python2-packaging
16639 (name "python2-packaging-bootstrap")
16640 (native-inputs '())
16641 (propagated-inputs
16642 `(("python-pyparsing" ,python2-pyparsing)))
16643 (arguments
16644 `(#:tests? #f
16645 ,@(package-arguments python2-packaging))))))
16646
16647 (define-public python-relatorio
16648 (package
16649 (name "python-relatorio")
16650 (version "0.8.0")
16651 (source
16652 (origin
16653 (method url-fetch)
16654 (uri (pypi-uri "relatorio" version))
16655 (sha256
16656 (base32
16657 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16658 (build-system python-build-system)
16659 (propagated-inputs
16660 `(("python-lxml" ,python-lxml)
16661 ("python-genshi" ,python-genshi)))
16662 (native-inputs
16663 `(("python-magic" ,python-magic)))
16664 (home-page "https://relatorio.tryton.org/")
16665 (synopsis "Templating library able to output ODT and PDF files")
16666 (description "Relatorio is a templating library which provides a way to
16667 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16668 for more filetypes can be easily added by creating plugins for them.")
16669 (license license:gpl3+)))
16670
16671 (define-public python2-relatorio
16672 (package-with-python2 python-relatorio))
16673
16674 (define-public python-radon
16675 (package
16676 (name "python-radon")
16677 (version "4.1.0")
16678 (source
16679 (origin
16680 (method url-fetch)
16681 (uri (pypi-uri "radon" version))
16682 (sha256
16683 (base32
16684 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
16685 (build-system python-build-system)
16686 (arguments
16687 `(#:phases (modify-phases %standard-phases
16688 (replace 'check
16689 (lambda _
16690 (invoke "python" "radon/tests/run.py"))))))
16691 (propagated-inputs
16692 `(("python-colorama" ,python-colorama)
16693 ("python-flake8-polyfill" ,python-flake8-polyfill)
16694 ("python-mando" ,python-mando)))
16695 (native-inputs
16696 `(("python-pytest" ,python-pytest)
16697 ("python-pytest-mock" ,python-pytest-mock)))
16698 (home-page "https://radon.readthedocs.org/")
16699 (synopsis "Code Metrics in Python")
16700 (description "Radon is a Python tool which computes various code metrics.
16701 Supported metrics are:
16702 @itemize @bullet
16703 @item raw metrics: SLOC, comment lines, blank lines, &c.
16704 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16705 @item Halstead metrics (all of them)
16706 @item the Maintainability Index (a Visual Studio metric)
16707 @end itemize")
16708 (properties `((python2-variant . ,(delay python2-radon))))
16709 (license license:expat)))
16710
16711 (define-public python2-radon
16712 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16713 (package/inherit base
16714 (propagated-inputs
16715 `(("python-configparser" ,python2-configparser)
16716 ("python-future" ,python2-future)
16717 ,@(package-propagated-inputs base))))))
16718
16719 (define-public python-sure
16720 (package
16721 (name "python-sure")
16722 (version "1.4.11")
16723 (source
16724 (origin
16725 (method url-fetch)
16726 (uri (pypi-uri "sure" version))
16727 (sha256
16728 (base32
16729 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16730 (build-system python-build-system)
16731 (propagated-inputs
16732 `(("python-mock" ,python-mock)
16733 ("python-six" ,python-six)))
16734 (native-inputs
16735 `(("python-nose" ,python-nose)))
16736 (home-page "https://github.com/gabrielfalcao/sure")
16737 (synopsis "Automated testing library in python for python")
16738 (description
16739 "Sure is a python library that leverages a DSL for writing assertions.
16740 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16741 (license license:gpl3+)))
16742
16743 (define-public python2-sure
16744 (package-with-python2 python-sure))
16745
16746 (define-public python2-couleur
16747 ;; This package does not seem to support python3 at all, hence,
16748 ;; only the python2 variant definition is provided.
16749 (package
16750 (name "python2-couleur")
16751 (version "0.6.2")
16752 (source
16753 (origin
16754 (method url-fetch)
16755 (uri (pypi-uri "couleur" version))
16756 (sha256
16757 (base32
16758 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16759 (build-system python-build-system)
16760 (arguments
16761 `(#:python ,python-2))
16762 (home-page "https://github.com/gabrielfalcao/couleur")
16763 (synopsis
16764 "ANSI terminal tool for python, colored shell and other handy fancy features")
16765 (description
16766 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16767 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16768 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16769 ;; https://github.com/gabrielfalcao/couleur/issues/11
16770 (license license:lgpl3+)))
16771
16772 (define-public python-misaka
16773 (package
16774 (name "python-misaka")
16775 (version "2.1.1")
16776 (source
16777 (origin
16778 (method url-fetch)
16779 (uri (pypi-uri "misaka" version))
16780 (sha256
16781 (base32
16782 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16783 (build-system python-build-system)
16784 (arguments
16785 `(;; Line 37 of setup.py calls self.run_command('develop')
16786 ;; in the 'check' phase. This command seems to be trying
16787 ;; to write to
16788 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16789 ;; for which it does not have the permission to write.
16790 #:tests? #f))
16791 (propagated-inputs
16792 `(("python-cffi" ,python-cffi)))
16793 (home-page "https://github.com/FSX/misaka")
16794 (synopsis "Python binding for Hoedown")
16795 (description
16796 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16797 library written in C. It features a fast HTML renderer and functionality to make custom
16798 renderers (e.g. man pages or LaTeX).")
16799 (license license:expat)))
16800
16801 (define-public python2-misaka
16802 (package-with-python2 python-misaka))
16803
16804 (define-public python2-steadymark
16805 ;; This is forced into being a python2 only variant
16806 ;; due to its dependence on couleur that has no support
16807 ;; for python3
16808 (package
16809 (name "python2-steadymark")
16810 (version "0.7.3")
16811 (source
16812 (origin
16813 (method url-fetch)
16814 (uri (pypi-uri "steadymark" version))
16815 (sha256
16816 (base32
16817 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16818 (build-system python-build-system)
16819 (native-inputs
16820 `(("python-couleur" ,python2-couleur)
16821 ("python-sure" ,python2-sure)
16822 ("python-misaka" ,python2-misaka)))
16823 (arguments
16824 `(#:python ,python-2
16825 #:phases
16826 (modify-phases %standard-phases
16827 (add-before 'build 'patch-setup-py
16828 (lambda _
16829 ;; Update requirements from dependency==version
16830 ;; to dependency>=version
16831 (substitute* "setup.py"
16832 (("==") ">="))
16833 #t)))))
16834 (home-page "https://github.com/gabrielfalcao/steadymark")
16835 (synopsis "Markdown-based test runner for python")
16836 (description
16837 "@code{Steadymark} allows documentation to be written in github-flavoured
16838 markdown. The documentation may contain snippets of code surrounded by python
16839 code blocks and @code{Steadymark} will find these snippets and run them, making
16840 sure that there are no old malfunctional examples in the documentation examples.")
16841 (license license:expat)))
16842
16843 (define-public python-jsonpointer
16844 (package
16845 (name "python-jsonpointer")
16846 (version "1.10")
16847 (source
16848 (origin
16849 (method url-fetch)
16850 (uri (pypi-uri "jsonpointer" version))
16851 (sha256
16852 (base32
16853 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16854 (build-system python-build-system)
16855 (home-page "https://github.com/stefankoegl/python-json-pointer")
16856 (synopsis "Identify specific nodes in a JSON document")
16857 (description "@code{jsonpointer} allows you to access specific nodes
16858 by path in a JSON document (see RFC 6901).")
16859 (license license:bsd-3)))
16860
16861 (define-public python2-jsonpointer
16862 (package-with-python2 python-jsonpointer))
16863
16864 (define-public python-jsonpatch
16865 (package
16866 (name "python-jsonpatch")
16867 (version "1.16")
16868 (source
16869 (origin
16870 (method git-fetch)
16871 ;; pypi version lacks tests.js
16872 (uri (git-reference
16873 (url "https://github.com/stefankoegl/python-json-patch")
16874 (commit (string-append "v" version))))
16875 (file-name (git-file-name name version))
16876 (sha256
16877 (base32
16878 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16879 (build-system python-build-system)
16880 (propagated-inputs
16881 `(("python-jsonpointer" ,python-jsonpointer)))
16882 (home-page "https://github.com/stefankoegl/python-json-patch")
16883 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16884 (description "@code{jsonpatch} is a library and program that allows
16885 applying JSON Patches according to RFC 6902.")
16886 (license license:bsd-3)))
16887
16888 (define-public python2-jsonpatch
16889 (package-with-python2 python-jsonpatch))
16890
16891 (define-public python-jsonpatch-0.4
16892 (package (inherit python-jsonpatch)
16893 (name "python-jsonpatch")
16894 (version "0.4")
16895 (source
16896 (origin
16897 (method git-fetch)
16898 (uri (git-reference
16899 (url "https://github.com/stefankoegl/python-json-patch")
16900 (commit (string-append "v" version))))
16901 (file-name (git-file-name name version))
16902 (sha256
16903 (base32
16904 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16905
16906 (define-public python2-jsonpatch-0.4
16907 (package-with-python2 python-jsonpatch-0.4))
16908
16909 (define-public python-rfc3986
16910 (package
16911 (name "python-rfc3986")
16912 (version "1.4.0")
16913 (source (origin
16914 (method url-fetch)
16915 (uri (pypi-uri "rfc3986" version))
16916 (sha256
16917 (base32
16918 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16919 (build-system python-build-system)
16920 (arguments
16921 `(#:modules ((guix build utils)
16922 (guix build python-build-system)
16923 (ice-9 ftw)
16924 (srfi srfi-1)
16925 (srfi srfi-26))
16926 #:phases
16927 (modify-phases %standard-phases
16928 (replace 'check
16929 (lambda _
16930 (let ((cwd (getcwd)))
16931 (setenv "PYTHONPATH"
16932 (string-append cwd "/build/"
16933 (find (cut string-prefix? "lib" <>)
16934 (scandir (string-append cwd "/build")))
16935 ":"
16936 (getenv "PYTHONPATH")))
16937 (invoke "pytest" "-v")))))))
16938 (native-inputs
16939 `(("python-pytest" ,python-pytest)))
16940 (home-page "https://rfc3986.readthedocs.io/")
16941 (synopsis "Parse and validate URI references")
16942 (description
16943 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16944 validation and authority parsing. This module also supports RFC@tie{}6874
16945 which adds support for zone identifiers to IPv6 addresses.")
16946 (license license:asl2.0)))
16947
16948 (define-public python2-rfc3986
16949 (package-with-python2 python-rfc3986))
16950
16951 (define-public python-rfc3987
16952 (package
16953 (name "python-rfc3987")
16954 (version "1.3.7")
16955 (source
16956 (origin
16957 (method url-fetch)
16958 (uri (pypi-uri "rfc3987" version))
16959 (sha256
16960 (base32
16961 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16962 (build-system python-build-system)
16963 (home-page "https://pypi.org/project/rfc3987/")
16964 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16965 (description "@code{rfc3987} provides routines for parsing and
16966 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16967 (license license:gpl3+)))
16968
16969 (define-public python2-rfc3987
16970 (package-with-python2 python-rfc3987))
16971
16972 ;; The latest commit contains fixes for building with both python3 and python2.
16973 (define-public python-rfc6555
16974 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16975 (revision "1"))
16976 (package
16977 (name "python-rfc6555")
16978 (version (git-version "0.0.0" revision commit))
16979 (source (origin
16980 (method git-fetch)
16981 (uri (git-reference
16982 (url "https://github.com/sethmlarson/rfc6555")
16983 (commit commit)))
16984 (file-name (git-file-name name version))
16985 (sha256
16986 (base32
16987 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16988 (build-system python-build-system)
16989 (arguments
16990 '(#:phases
16991 (modify-phases %standard-phases
16992 (replace 'check
16993 (lambda* (#:key tests? #:allow-other-keys)
16994 (if tests?
16995 ;; Other tests require network access.
16996 (invoke "pytest" "tests/test_ipv6.py")
16997 #t))))))
16998 (native-inputs
16999 `(("python-pytest" ,python-pytest)))
17000 (home-page "https://pypi.org/project/rfc6555/")
17001 (synopsis "Python implementation of RFC 6555")
17002 (description
17003 "Python implementation of the Happy Eyeballs Algorithm described in RFC
17004 6555. Provided with a single file and dead-simple API to allow easy vendoring
17005 and integration into other projects.")
17006 (properties `((python2-variant . ,(delay python2-rfc6555))))
17007 (license license:asl2.0))))
17008
17009 (define-public python2-rfc6555
17010 (let ((base (package-with-python2
17011 (strip-python2-variant python-rfc6555))))
17012 (package/inherit base
17013 (propagated-inputs
17014 `(("python2-selectors2" ,python2-selectors2))))))
17015
17016 (define-public python-bagit
17017 (package
17018 (name "python-bagit")
17019 (version "1.7.0")
17020 (source
17021 (origin
17022 (method url-fetch)
17023 (uri (pypi-uri "bagit" version))
17024 (sha256
17025 (base32
17026 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
17027 (build-system python-build-system)
17028 (native-inputs
17029 `(("python-setuptools-scm" ,python-setuptools-scm)
17030 ("python-coverage" ,python-coverage)
17031 ("python-mock" ,python-mock)))
17032 (home-page "https://libraryofcongress.github.io/bagit-python/")
17033 (synopsis "Create and validate BagIt packages")
17034 (description "Bagit is a Python library and command line utility for working
17035 with BagIt style packages. BagIt is a minimalist packaging format for digital
17036 preservation.")
17037 (license license:cc0)))
17038
17039 (define-public python-prov
17040 (package
17041 (name "python-prov")
17042 (version "2.0.0")
17043 (source
17044 (origin
17045 (method url-fetch)
17046 (uri (pypi-uri "prov" version))
17047 (sha256
17048 (base32
17049 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
17050 (build-system python-build-system)
17051 (propagated-inputs
17052 `(("python-dateutil" ,python-dateutil)
17053 ("python-lxml" ,python-lxml)
17054 ("python-networkx" ,python-networkx)
17055 ("python-rdflib" ,python-rdflib)))
17056 (native-inputs
17057 `(("graphviz" ,graphviz)
17058 ("python-pydot" ,python-pydot)))
17059 (home-page "https://github.com/trungdong/prov")
17060 (synopsis
17061 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
17062 (description
17063 "This package provides a library for W3C Provenance Data Model supporting
17064 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
17065 (license license:expat)))
17066
17067 (define-public python-arcp
17068 (package
17069 (name "python-arcp")
17070 (version "0.2.1")
17071 (source
17072 (origin
17073 (method url-fetch)
17074 (uri (pypi-uri "arcp" version))
17075 (sha256
17076 (base32
17077 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
17078 (build-system python-build-system)
17079 (native-inputs
17080 `(("python-pytest" ,python-pytest)))
17081 (home-page "http://arcp.readthedocs.io/")
17082 (synopsis
17083 "Archive and Package URI parser and generator")
17084 (description
17085 "@acronym{arcp, Archive and Package} provides functions for creating
17086 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
17087 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
17088 consume or reference hypermedia resources bundled inside a file archive or an
17089 application package, as well as to resolve URIs for archive resources within a
17090 programmatic framework. This URI scheme provides mechanisms to generate a
17091 unique base URI to represent the root of the archive, so that relative URI
17092 references in a bundled resource can be resolved within the archive without
17093 having to extract the archive content on the local file system. An arcp URI can
17094 be used for purposes of isolation (e.g. when consuming multiple archives),
17095 security constraints (avoiding \"climb out\" from the archive), or for
17096 externally identiyfing sub-resources referenced by hypermedia formats.")
17097 (license license:asl2.0)))
17098
17099 (define-public python-shellescape
17100 (package
17101 (name "python-shellescape")
17102 (version "3.8.1")
17103 (source
17104 (origin
17105 (method git-fetch)
17106 (uri (git-reference
17107 (url "https://github.com/chrissimpkins/shellescape")
17108 (commit (string-append "v" version))))
17109 (file-name (git-file-name name version))
17110 (sha256
17111 (base32
17112 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
17113 (build-system python-build-system)
17114 (arguments
17115 '(#:phases
17116 (modify-phases %standard-phases
17117 (replace 'check
17118 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
17119 (when tests?
17120 (add-installed-pythonpath inputs outputs)
17121 (invoke "python" "tests/test_shellescape.py"))
17122 #t)))))
17123 (native-inputs
17124 `(("python-pytest" ,python-pytest)))
17125 (home-page "https://github.com/chrissimpkins/shellescape")
17126 (synopsis
17127 "Shell escape a string to safely use it as a token in a shell command")
17128 (description
17129 "The shellescape Python module defines the @code{shellescape.quote()}
17130 function that returns a shell-escaped version of a Python string. This is a
17131 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
17132 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
17133 (license license:expat)))
17134
17135 (define-public python-validators
17136 (package
17137 (name "python-validators")
17138 (version "0.14.2")
17139 (source (origin
17140 (method url-fetch)
17141 (uri (pypi-uri "validators" version))
17142 (sha256
17143 (base32
17144 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
17145 (build-system python-build-system)
17146 (arguments
17147 '(#:phases (modify-phases %standard-phases
17148 (replace 'check
17149 (lambda _
17150 (invoke "pytest" "-vv"))))))
17151 (propagated-inputs
17152 `(("python-decorator" ,python-decorator)
17153 ("python-six" ,python-six)))
17154 (native-inputs
17155 `(("python-flake8" ,python-flake8)
17156 ("python-isort" ,python-isort)
17157 ("python-pytest" ,python-pytest)))
17158 (home-page "https://github.com/kvesteri/validators")
17159 (synopsis "Data validation library")
17160 (description
17161 "This package contains validators for different things such as email
17162 addresses, IP addresses, URLs, hashes and more. It has been designed to
17163 be easy to use and not require defining a schema or form just to validate
17164 some input.")
17165 (license license:expat)))
17166
17167 (define-public python2-validators
17168 (package-with-python2 python-validators))
17169
17170 (define-public python-validate-email
17171 (package
17172 (name "python-validate-email")
17173 (version "1.3")
17174 (source
17175 (origin
17176 (method url-fetch)
17177 (uri (pypi-uri "validate_email" version))
17178 (sha256
17179 (base32
17180 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
17181 (build-system python-build-system)
17182 (home-page "https://github.com/syrusakbary/validate_email")
17183 (synopsis "Verifies if an email address is valid and really exists")
17184 (description "@code{validate_email} can be used to verify if an email
17185 address is valid and really exists.")
17186 (license license:lgpl3+)))
17187
17188 (define-public python2-validate-email
17189 (package-with-python2 python-validate-email))
17190
17191 (define-public python-flex
17192 (package
17193 (name "python-flex")
17194 (version "6.10.0")
17195 (source
17196 (origin
17197 (method url-fetch)
17198 (uri (pypi-uri "flex" version))
17199 (sha256
17200 (base32
17201 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
17202 (build-system python-build-system)
17203 (propagated-inputs
17204 `(("python-click" ,python-click)
17205 ("python-iso8601" ,python-iso8601)
17206 ("python-jsonpointer" ,python-jsonpointer)
17207 ("python-pyyaml" ,python-pyyaml)
17208 ("python-requests" ,python-requests)
17209 ("python-rfc3987" ,python-rfc3987)
17210 ("python-six" ,python-six)
17211 ("python-validate-email" ,python-validate-email)))
17212 (home-page "https://github.com/pipermerriam/flex")
17213 (synopsis "Validates Swagger schemata")
17214 (description "@code{flex} can be used to validate Swagger schemata.")
17215 (license license:bsd-3)))
17216
17217 (define-public python2-flex
17218 (package-with-python2 python-flex))
17219
17220 (define-public python-marshmallow
17221 (package
17222 (name "python-marshmallow")
17223 (version "3.9.1")
17224 (source
17225 (origin
17226 (method url-fetch)
17227 (uri (pypi-uri "marshmallow" version))
17228 (sha256
17229 (base32
17230 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
17231 (build-system python-build-system)
17232 (propagated-inputs
17233 `(("python-dateutil" ,python-dateutil)
17234 ("python-simplejson" ,python-simplejson)))
17235 (native-inputs
17236 `(("python-pytest" ,python-pytest)
17237 ("python-pytz" ,python-pytz)))
17238 (home-page "https://github.com/marshmallow-code/marshmallow")
17239 (synopsis "Convert complex datatypes to and from native
17240 Python datatypes.")
17241 (description "@code{marshmallow} provides a library for converting
17242 complex datatypes to and from native Python datatypes.")
17243 (license license:expat)))
17244
17245 (define-public python-apispec
17246 (package
17247 (name "python-apispec")
17248 (version "4.0.0")
17249 (source
17250 (origin
17251 (method url-fetch)
17252 (uri (pypi-uri "apispec" version))
17253 (sha256
17254 (base32
17255 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
17256 (build-system python-build-system)
17257 (arguments
17258 '(#:phases (modify-phases %standard-phases
17259 (add-after 'unpack 'disable-prance-tests
17260 (lambda _
17261 ;; Disable validation tests since they require the
17262 ;; optional 'prance' library which is not yet in Guix.
17263 (substitute* "tests/test_ext_marshmallow_openapi.py"
17264 (("def test_openapi_tools_validate.*" all)
17265 (string-append "@pytest.mark.xfail\n" all)))))
17266 (replace 'check
17267 (lambda _
17268 (setenv "PYTHONPATH"
17269 (string-append "./build/lib:"
17270 (getenv "PYTHONPATH")))
17271 (invoke "pytest" "-vv"))))))
17272 (propagated-inputs
17273 `(("python-pyyaml" ,python-pyyaml)))
17274 (native-inputs
17275 `(("python-pytest" ,python-pytest)
17276 ("python-marshmallow" ,python-marshmallow)))
17277 (home-page "https://github.com/marshmallow-code/apispec")
17278 (synopsis "Swagger/OpenAPI specification generator")
17279 (description "@code{python-apispec} is a pluggable API specification
17280 generator. It currently supports the OpenAPI specification, formerly known
17281 as Swagger.")
17282 (license license:expat)))
17283
17284 (define-public python-flasgger
17285 (package
17286 (name "python-flasgger")
17287 (version "0.6.3")
17288 (source
17289 (origin
17290 (method git-fetch)
17291 (uri (git-reference
17292 (url "https://github.com/rochacbruno/flasgger")
17293 (commit version)))
17294 (file-name (git-file-name name version))
17295 (sha256
17296 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
17297 (build-system python-build-system)
17298 (arguments
17299 `(#:phases
17300 (modify-phases %standard-phases
17301 (replace 'check
17302 (lambda* (#:key inputs outputs #:allow-other-keys)
17303 (substitute* "Makefile"
17304 (("flake8 flasgger --ignore=F403")
17305 "flake8 flasgger --ignore=E731,F403"))
17306 (setenv "PYTHONPATH" (string-append (getcwd)
17307 ":"
17308 (getenv "PYTHONPATH")))
17309 (invoke "py.test"))))))
17310 (propagated-inputs
17311 `(("python-flask" ,python-flask)
17312 ("python-pyyaml" ,python-pyyaml)
17313 ("python-jsonschema" ,python-jsonschema)
17314 ("python-mistune" ,python-mistune)
17315 ("python-six" ,python-six)))
17316 (native-inputs
17317 `(("python-decorator" ,python-decorator)
17318 ("python-flake8" ,python-flake8)
17319 ("python-flask-restful" ,python-flask-restful)
17320 ("python-flex" ,python-flex)
17321 ("python-pytest" ,python-pytest)
17322 ("python-pytest-cov" ,python-pytest-cov)
17323 ("python-marshmallow" ,python-marshmallow)
17324 ("python-apispec" ,python-apispec)))
17325 (home-page "https://github.com/rochacbruno/flasgger/")
17326 (synopsis "Extract Swagger specs from your Flask project")
17327 (description "@code{python-flasgger} allows extracting Swagger specs
17328 from your Flask project. It is a fork of Flask-Swagger.")
17329 (license license:expat)))
17330
17331 (define-public python-swagger-spec-validator
17332 (package
17333 (name "python-swagger-spec-validator")
17334 (version "2.4.3")
17335 (source
17336 (origin
17337 (method url-fetch)
17338 (uri (pypi-uri "swagger-spec-validator" version))
17339 (sha256
17340 (base32
17341 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
17342 (build-system python-build-system)
17343 (propagated-inputs
17344 `(("python-jsonschema" ,python-jsonschema)
17345 ("python-pyyaml" ,python-pyyaml)
17346 ("python-six" ,python-six)))
17347 (home-page
17348 "https://github.com/Yelp/swagger_spec_validator")
17349 (synopsis "Validation of Swagger specifications")
17350 (description "@code{swagger_spec_validator} provides a library for
17351 validating Swagger API specifications.")
17352 (license license:asl2.0)))
17353
17354 (define-public python2-swagger-spec-validator
17355 (package-with-python2 python-swagger-spec-validator))
17356
17357 (define-public python-apache-libcloud
17358 (package
17359 (name "python-apache-libcloud")
17360 (version "3.1.0")
17361 (source
17362 (origin
17363 (method url-fetch)
17364 (uri (pypi-uri "apache-libcloud" version))
17365 (sha256
17366 (base32
17367 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
17368 (build-system python-build-system)
17369 (arguments
17370 `(#:phases
17371 (modify-phases %standard-phases
17372 (add-after 'unpack 'patch-ssh
17373 (lambda* (#:key inputs #:allow-other-keys)
17374 (substitute* "libcloud/compute/ssh.py"
17375 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
17376 "/bin/ssh" "'")))
17377 #t))
17378 (add-after 'unpack 'patch-tests
17379 (lambda _
17380 (substitute* "libcloud/test/compute/test_ssh_client.py"
17381 (("class ShellOutSSHClientTests")
17382 "@unittest.skip(\"Guix container doesn't have ssh service\")
17383 class ShellOutSSHClientTests"))
17384 #t))
17385 (add-before 'check 'copy-secret
17386 (lambda _
17387 (copy-file "libcloud/test/secrets.py-dist"
17388 "libcloud/test/secrets.py")
17389 #t)))))
17390 (inputs
17391 `(("openssh" ,openssh)))
17392 (propagated-inputs
17393 `(("python-paramiko" ,python-paramiko)
17394 ("python-requests" ,python-requests)))
17395 (native-inputs
17396 `(("python-lockfile" ,python-lockfile)
17397 ("python-mock" ,python-mock)
17398 ("python-pytest" ,python-pytest)
17399 ("python-pytest-runner" ,python-pytest-runner)
17400 ("python-requests-mock" ,python-requests-mock)))
17401 (home-page "https://libcloud.apache.org/")
17402 (synopsis "Unified Cloud API")
17403 (description "@code{libcloud} is a Python library for interacting with
17404 many of the popular cloud service providers using a unified API.")
17405 (license license:asl2.0)))
17406
17407 (define-public python-smmap
17408 (package
17409 (name "python-smmap")
17410 (version "3.0.1")
17411 (source
17412 (origin
17413 (method url-fetch)
17414 (uri (pypi-uri "smmap" version))
17415 (sha256
17416 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
17417 (build-system python-build-system)
17418 (native-inputs
17419 `(("python-nosexcover" ,python-nosexcover)))
17420 (home-page "https://github.com/Byron/smmap")
17421 (synopsis "Python sliding window memory map manager")
17422 (description "@code{smmap} is a pure Python implementation of a sliding
17423 window memory map manager.")
17424 (license license:bsd-3)))
17425
17426 (define-public python-smmap2
17427 (deprecated-package "python-smmap2" python-smmap))
17428
17429 (define-public python2-smmap
17430 (package-with-python2 python-smmap))
17431
17432 (define-public python2-smmap2
17433 (deprecated-package "python2-smmap2" python2-smmap))
17434
17435 (define-public python-regex
17436 (package
17437 (name "python-regex")
17438 (version "2020.6.8")
17439 (source (origin
17440 (method url-fetch)
17441 (uri (pypi-uri "regex" version))
17442 (sha256
17443 (base32
17444 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
17445 (build-system python-build-system)
17446 (arguments
17447 '(#:phases
17448 (modify-phases %standard-phases
17449 (replace 'check
17450 (lambda* (#:key inputs outputs #:allow-other-keys)
17451 (add-installed-pythonpath inputs outputs)
17452 (invoke "python" "-c"
17453 "from regex.test_regex import test_main; test_main()"))))))
17454 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
17455 (synopsis "Alternative regular expression module")
17456 (description "This regular expression implementation is backwards-
17457 compatible with the standard @code{re} module, but offers additional
17458 functionality like full case-folding for case-insensitive matches in Unicode.")
17459 (license license:psfl)))
17460
17461 (define-public python2-regex
17462 (package-with-python2 python-regex))
17463
17464 (define-public python-pyopengl
17465 (package
17466 (name "python-pyopengl")
17467 (version "3.1.5")
17468 (source
17469 (origin
17470 (method url-fetch)
17471 (uri (pypi-uri "PyOpenGL" version))
17472 (sha256
17473 (base32
17474 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
17475 (build-system python-build-system)
17476 (inputs
17477 `(("mesa" ,mesa)
17478 ("freeglut" ,freeglut)
17479 ("glu" ,glu)))
17480 (arguments
17481 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
17482 ;attribute 'OSMesa'
17483 #:phases
17484 (modify-phases %standard-phases
17485 (add-before 'build 'fix-paths
17486 (lambda* (#:key inputs outputs #:allow-other-keys)
17487 (substitute* '("OpenGL/platform/ctypesloader.py")
17488 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
17489 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
17490 (("'GL'")
17491 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
17492 (("'GLU'")
17493 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
17494 (("'glut',")
17495 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
17496 (("'GLESv1_CM'")
17497 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
17498 (("'GLESv2'")
17499 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
17500 ;; Not providing libgle. It seems to be very old.
17501 #t)))))
17502 (home-page "http://pyopengl.sourceforge.net")
17503 (synopsis "Standard OpenGL bindings for Python")
17504 (description
17505 "PyOpenGL is the most common cross platform Python binding to OpenGL and
17506 related APIs. The binding is created using the standard @code{ctypes}
17507 library.")
17508 (license license:bsd-3)))
17509
17510 (define-public python-pyopengl-accelerate
17511 (package
17512 (inherit python-pyopengl)
17513 (name "python-pyopengl-accelerate")
17514 (version "3.1.5")
17515 (source
17516 (origin
17517 (method url-fetch)
17518 (uri (pypi-uri "PyOpenGL-accelerate" version))
17519 (sha256
17520 (base32
17521 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
17522 (inputs
17523 `(("mesa" ,mesa)
17524 ("python-numpy" ,python-numpy))) ; for cython module
17525 ; numpy_formathandler, thus not propagated
17526 (arguments
17527 `(#:tests? #f
17528 #:phases
17529 (modify-phases %standard-phases
17530 (delete 'fix-paths))))
17531 (synopsis "Acceleration code for PyOpenGL")
17532 (description
17533 "This is the Cython-coded accelerator module for PyOpenGL.")))
17534
17535 (define-public python-rencode
17536 (package
17537 (name "python-rencode")
17538 (version "1.0.5")
17539 (source
17540 (origin
17541 (method url-fetch)
17542 (uri (pypi-uri "rencode" version))
17543 (sha256
17544 (base32
17545 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
17546 (build-system python-build-system)
17547 (arguments
17548 `(#:phases
17549 (modify-phases %standard-phases
17550 (add-before 'check 'delete-bogus-test
17551 ;; This test requires /home/aresch/Downloads, which is not provided by
17552 ;; the build environment.
17553 (lambda _
17554 (delete-file "rencode/t.py")
17555 #t)))))
17556 (native-inputs `(("pkg-config" ,pkg-config)
17557 ("python-cython" ,python-cython)))
17558 (home-page "https://github.com/aresch/rencode")
17559 (synopsis "Serialization of heterogeneous data structures")
17560 (description
17561 "The @code{rencode} module is a data structure serialization library,
17562 similar to @code{bencode} from the BitTorrent project. For complex,
17563 heterogeneous data structures with many small elements, r-encoding stake up
17564 significantly less space than b-encodings. This version of rencode is a
17565 complete rewrite in Cython to attempt to increase the performance over the
17566 pure Python module.")
17567 (license license:bsd-3)))
17568
17569 (define-public python2-rencode
17570 (package-with-python2 python-rencode))
17571
17572 (define-public python-xenon
17573 (package
17574 (name "python-xenon")
17575 (version "0.7.0")
17576 (source
17577 (origin
17578 (method url-fetch)
17579 (uri (pypi-uri "xenon" version))
17580 (sha256
17581 (base32
17582 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
17583 (build-system python-build-system)
17584 (native-inputs
17585 `(("python-pyyaml" ,python-pyyaml)
17586 ("python-radon" ,python-radon)
17587 ("python-requests" ,python-requests)
17588 ("python-flake8" ,python-flake8)
17589 ("python-tox" ,python-tox)))
17590 (arguments
17591 `(#:tests? #f ;test suite not shipped with the PyPI archive
17592 #:phases
17593 (modify-phases %standard-phases
17594 (add-before 'build 'patch-test-requirements
17595 (lambda _
17596 ;; Remove httpretty dependency for tests.
17597 (substitute* "setup.py"
17598 (("httpretty") ""))
17599 #t)))))
17600 (home-page "https://xenon.readthedocs.org/")
17601 (synopsis "Monitor code metrics for Python on your CI server")
17602 (description
17603 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
17604 Ideally, @code{xenon} is run every time code is committed. Through command
17605 line options, various thresholds can be set for the complexity of code. It
17606 will fail (i.e. it will exit with a non-zero exit code) when any of these
17607 requirements is not met.")
17608 (license license:expat)))
17609
17610 (define-public python-pysocks
17611 (package
17612 (name "python-pysocks")
17613 (version "1.7.1")
17614 (source
17615 (origin
17616 (method url-fetch)
17617 (uri (pypi-uri "PySocks" version))
17618 (sha256
17619 (base32
17620 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
17621 (build-system python-build-system)
17622 (arguments `(#:tests? #f))
17623 (home-page "https://github.com/Anorov/PySocks")
17624 (synopsis "SOCKS client module")
17625 (description "@code{pysocks} is an updated and semi-actively maintained
17626 version of @code{SocksiPy} with bug fixes and extra features.")
17627 (license license:bsd-3)))
17628
17629 (define-public python2-pysocks
17630 (package-with-python2 python-pysocks))
17631
17632 (define-public python-pydiff
17633 (package
17634 (name "python-pydiff")
17635 (version "0.2")
17636 (source
17637 (origin
17638 (method url-fetch)
17639 (uri (pypi-uri "pydiff" version))
17640 (sha256
17641 (base32
17642 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17643 (build-system python-build-system)
17644 (home-page "https://github.com/myint/pydiff")
17645 (synopsis "Library to diff two Python files at the bytecode level")
17646 (description
17647 "@code{pydiff} makes it easy to look for actual code changes while
17648 ignoring formatting changes.")
17649 (license license:expat)))
17650
17651 (define-public python2-pydiff
17652 (package-with-python2 python-pydiff))
17653
17654 (define-public python-pydub
17655 (package
17656 (name "python-pydub")
17657 (version "0.24.1")
17658 (source
17659 (origin
17660 (method url-fetch)
17661 (uri (pypi-uri "pydub" version))
17662 (sha256
17663 (base32
17664 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17665 (build-system python-build-system)
17666 (arguments
17667 `(#:phases
17668 (modify-phases %standard-phases
17669 (add-after 'unpack 'fix-ffmpeg-path
17670 (lambda* (#:key inputs #:allow-other-keys)
17671 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17672 (substitute* '("pydub/utils.py")
17673 (("return \"ffmpeg\"")
17674 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17675 (("return \"ffplay\"")
17676 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17677 (("return \"ffprobe\"")
17678 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17679 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17680 #t))))))
17681 (home-page "https://pydub.com")
17682 (inputs
17683 `(("ffmpeg" ,ffmpeg)))
17684 (propagated-inputs
17685 `(("python-scipy" ,python-scipy)))
17686 (synopsis "Manipulate audio with a high level interface in Python")
17687 (description
17688 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17689 @code{ffmpeg} to open various audio formats.")
17690 (license license:expat))) ; MIT license
17691
17692 (define-public python-tqdm
17693 (package
17694 (name "python-tqdm")
17695 (version "4.43.0")
17696 (source
17697 (origin
17698 (method url-fetch)
17699 (uri (pypi-uri "tqdm" version))
17700 (sha256
17701 (base32
17702 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17703 (build-system python-build-system)
17704 (arguments
17705 '(#:phases (modify-phases %standard-phases
17706 (replace 'check
17707 (lambda* (#:key inputs outputs #:allow-other-keys)
17708 (add-installed-pythonpath inputs outputs)
17709 ;; This invokation is taken from tox.ini.
17710 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17711 "-d" "-v" "tqdm/"))))))
17712 (native-inputs
17713 `(("python-nose" ,python-nose)))
17714 (home-page "https://github.com/tqdm/tqdm")
17715 (synopsis "Fast, extensible progress meter")
17716 (description
17717 "Make loops show a progress bar on the console by just wrapping any
17718 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17719 design and layout.")
17720 (license (list license:mpl2.0 license:expat))))
17721
17722 (define-public python2-tqdm
17723 (package-with-python2 python-tqdm))
17724
17725 (define-public python-pkginfo
17726 (package
17727 (name "python-pkginfo")
17728 (version "1.7.0")
17729 (source
17730 (origin
17731 (method url-fetch)
17732 (uri (pypi-uri "pkginfo" version))
17733 (sha256
17734 (base32
17735 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
17736 (build-system python-build-system)
17737 (arguments
17738 `(#:phases
17739 (modify-phases %standard-phases
17740 (add-before 'check 'patch-tests
17741 (lambda _
17742 (substitute* "pkginfo/tests/test_installed.py"
17743 (("test_ctor_w_package_no_PKG_INFO")
17744 "_test_ctor_w_package_no_PKG_INFO"))
17745 #t)))))
17746 (home-page
17747 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17748 (synopsis
17749 "Query metadatdata from sdists, bdists, and installed packages")
17750 (description
17751 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17752 source distriubtion (an sdist) or a binary distribution (e.g., created by
17753 running bdist_egg). It can also query the EGG-INFO directory of an installed
17754 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17755 created by running @code{python setup.py develop}).")
17756 (license license:expat)))
17757
17758 (define-public python2-pkginfo
17759 (package-with-python2 python-pkginfo))
17760
17761 (define-public python-twine
17762 (package
17763 (name "python-twine")
17764 (version "1.15.0")
17765 (source
17766 (origin
17767 (method url-fetch)
17768 (uri (pypi-uri "twine" version))
17769 (sha256
17770 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17771 (build-system python-build-system)
17772 (propagated-inputs
17773 `(("python-tqdm" ,python-tqdm)
17774 ("python-packaging" ,python-packaging)
17775 ("python-pkginfo" ,python-pkginfo)
17776 ("python-readme-renderer" ,python-readme-renderer)
17777 ("python-requests" ,python-requests)
17778 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17779 (home-page "https://github.com/pypa/twine")
17780 (synopsis "Collection of utilities for interacting with PyPI")
17781 (description
17782 "@code{twine} currently supports registering projects and uploading
17783 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17784 their files and supports any packaging format (including wheels).")
17785 (license license:asl2.0)))
17786
17787 (define-public python2-twine
17788 (package-with-python2 python-twine))
17789
17790 (define-public python-linecache2
17791 (package
17792 (name "python-linecache2")
17793 (version "1.0.0")
17794 (source
17795 (origin
17796 (method url-fetch)
17797 (uri (pypi-uri "linecache2" version))
17798 (sha256
17799 (base32
17800 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17801 (build-system python-build-system)
17802 (arguments
17803 `(;; The tests depend on unittest2, and our version is a bit too old.
17804 #:tests? #f))
17805 (native-inputs
17806 `(("python-pbr" ,python-pbr-minimal)))
17807 (home-page
17808 "https://github.com/testing-cabal/linecache2")
17809 (synopsis "Backports of the linecache module")
17810 (description
17811 "The linecache module allows one to get any line from any file, while
17812 attempting to optimize internally, using a cache, the common case where many
17813 lines are read from a single file.")
17814 (license license:psfl)))
17815
17816 (define-public python2-linecache2
17817 (package-with-python2 python-linecache2))
17818
17819 (define-public python-traceback2
17820 (package
17821 (name "python-traceback2")
17822 (version "1.4.0")
17823 (source
17824 (origin
17825 (method url-fetch)
17826 (uri (pypi-uri "traceback2" version))
17827 (sha256
17828 (base32
17829 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17830 (build-system python-build-system)
17831 (arguments
17832 `(;; python-traceback2 and python-unittest2 depend on one another.
17833 #:tests? #f))
17834 (native-inputs
17835 `(("python-pbr" ,python-pbr-minimal)))
17836 (propagated-inputs
17837 `(("python-linecache2" ,python-linecache2)))
17838 (home-page
17839 "https://github.com/testing-cabal/traceback2")
17840 (synopsis "Backports of the traceback module")
17841 (description
17842 "This module provides a standard interface to extract, format and print
17843 stack traces of Python programs. It exactly mimics the behavior of the Python
17844 interpreter when it prints a stack trace.")
17845 (license license:psfl)))
17846
17847 (define-public python2-traceback2
17848 (package-with-python2 python-traceback2))
17849
17850 (define-public python-ratelimiter
17851 (package
17852 (name "python-ratelimiter")
17853 (version "1.2.0")
17854 (source
17855 (origin
17856 (method url-fetch)
17857 (uri (pypi-uri "ratelimiter" version))
17858 (sha256
17859 (base32
17860 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17861 (build-system python-build-system)
17862 (arguments
17863 '(#:tests? #f)) ; There are no tests in the pypi archive.
17864 (home-page "https://github.com/RazerM/ratelimiter")
17865 (synopsis "Simple rate limiting object")
17866 (description
17867 "The @code{ratelimiter} module ensures that an operation will not be
17868 executed more than a given number of times during a given period.")
17869 (license license:asl2.0)))
17870
17871 (define-public python2-ratelimiter
17872 (package-with-python2 python-ratelimiter))
17873
17874 (define-public python-dukpy
17875 (package
17876 (name "python-dukpy")
17877 (version "0.3")
17878 (source
17879 (origin
17880 (method git-fetch)
17881 (uri (git-reference
17882 (url "https://github.com/kovidgoyal/dukpy")
17883 (commit (string-append "v" version))))
17884 (file-name (git-file-name name version))
17885 (sha256
17886 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17887 (build-system python-build-system)
17888 (home-page "https://github.com/kovidgoyal/dukpy")
17889 (synopsis "Run JavaScript in python")
17890 (description
17891 "dukpy is a JavaScript runtime environment for Python using the duktape
17892 embeddable JavaScript engine.")
17893 ;; Dukpy is licensed under MIT like the embedded duktape library,
17894 ;; with 'errors.c' as GPL3.
17895 (license (list license:expat license:gpl3))))
17896
17897 (define-public python2-dukpy
17898 (package-with-python2 python-dukpy))
17899
17900 (define-public python-jsonrpclib-pelix
17901 (package
17902 (name "python-jsonrpclib-pelix")
17903 (version "0.3.2")
17904 (source
17905 (origin
17906 (method url-fetch)
17907 (uri (pypi-uri "jsonrpclib-pelix" version))
17908 (sha256
17909 (base32
17910 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17911 (build-system python-build-system)
17912 (arguments
17913 `(#:tests? #f)) ; no tests in PyPI tarball
17914 (home-page "https://github.com/tcalmant/jsonrpclib/")
17915 (synopsis "JSON-RPC 2.0 client library for Python")
17916 (description
17917 "This library implements the JSON-RPC v2.0
17918 specification (backwards-compatible) as a client library for Python. This
17919 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17920 services.")
17921 (license license:asl2.0)))
17922
17923 (define-public python2-jsonrpclib-pelix
17924 (package-with-python2 python-jsonrpclib-pelix))
17925
17926 (define-public python-setuptools-scm-git-archive
17927 (package
17928 (name "python-setuptools-scm-git-archive")
17929 (version "1.0")
17930 (source
17931 (origin
17932 (method url-fetch)
17933 (uri (pypi-uri "setuptools_scm_git_archive" version))
17934 (sha256
17935 (base32
17936 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17937 (build-system python-build-system)
17938 (native-inputs
17939 `(("python-pytest" ,python-pytest)))
17940 (propagated-inputs
17941 `(("python-setuptools-scm" ,python-setuptools-scm)))
17942 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17943 (synopsis "Setuptools_scm plugin for git archives")
17944 (description
17945 "The setuptools_scm_git_archive package is a plugin to
17946 setuptools_scm, which supports obtaining versions from git archives that
17947 belong to tagged versions.")
17948 (license license:expat)))
17949
17950 (define-public python2-setuptools-scm-git-archive
17951 (package-with-python2 python-setuptools-scm-git-archive))
17952
17953 (define-public python-setuptools-git
17954 (package
17955 (name "python-setuptools-git")
17956 (version "1.2")
17957 (source
17958 (origin
17959 (method url-fetch)
17960 (uri (pypi-uri "setuptools-git" version))
17961 (sha256
17962 (base32
17963 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17964 (build-system python-build-system)
17965 (arguments
17966 `(#:phases
17967 (modify-phases %standard-phases
17968 ;; This is needed for tests.
17969 (add-after 'unpack 'configure-git
17970 (lambda _
17971 (setenv "HOME" "/tmp")
17972 (invoke "git" "config" "--global" "user.email" "guix")
17973 (invoke "git" "config" "--global" "user.name" "guix")
17974 #t)))))
17975 (native-inputs
17976 `(("git" ,git-minimal)))
17977 (home-page "https://github.com/msabramo/setuptools-git")
17978 (synopsis "Setuptools revision control system plugin for Git")
17979 (description
17980 "This package provides a plugin for Setuptools for revision control with
17981 Git.")
17982 (license license:bsd-3)))
17983
17984 (define-public python-pyclipper
17985 (package
17986 (name "python-pyclipper")
17987 (version "1.1.0.post3")
17988 (source
17989 (origin
17990 (method url-fetch)
17991 (uri (pypi-uri "pyclipper" version ".zip"))
17992 (sha256
17993 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17994 (modules '((guix build utils)))
17995 (snippet
17996 '(begin
17997 ;; This file is generated by Cython.
17998 (delete-file "pyclipper/pyclipper.cpp") #t))))
17999 (build-system python-build-system)
18000 (arguments
18001 `(#:phases
18002 (modify-phases %standard-phases
18003 (add-before 'build 'cythonize-sources
18004 (lambda _
18005 (with-directory-excursion "pyclipper"
18006 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
18007 (propagated-inputs
18008 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
18009 (native-inputs
18010 `(("python-cython" ,python-cython)
18011 ("python-pytest" ,python-pytest)
18012 ("python-pytest-runner" ,python-pytest-runner)
18013 ("python-unittest2" ,python-unittest2)
18014 ("unzip" ,unzip)))
18015 (home-page "https://github.com/greginvm/pyclipper")
18016 (synopsis "Wrapper for Angus Johnson's Clipper library")
18017 (description
18018 "Pyclipper is a Cython wrapper for the C++ translation of the
18019 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
18020 (license license:expat)))
18021
18022 (define-public python2-pyclipper
18023 (package-with-python2 python-pyclipper))
18024
18025 (define-public python2-booleanoperations
18026 (package
18027 (name "python2-booleanoperations")
18028 (version "0.7.1")
18029 (source
18030 (origin
18031 (method url-fetch)
18032 (uri (pypi-uri "booleanOperations" version ".zip"))
18033 (sha256
18034 (base32
18035 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
18036 (build-system python-build-system)
18037 (arguments
18038 `(#:python ,python-2))
18039 (native-inputs
18040 `(("unzip" ,unzip)
18041 ("python2-pytest" ,python2-pytest)
18042 ("python2-pytest-runner" ,python2-pytest-runner)))
18043 (propagated-inputs
18044 `(("python-fonttools" ,python2-fonttools)
18045 ("python-pyclipper" ,python2-pyclipper)
18046 ("python-ufolib" ,python2-ufolib)))
18047 (home-page "https://github.com/typemytype/booleanOperations")
18048 (synopsis "Boolean operations on paths")
18049 (description
18050 "BooleanOperations provides a Python library that enables
18051 boolean operations on paths.")
18052 (license license:expat)))
18053
18054 (define-public python-tempdir
18055 (package
18056 (name "python-tempdir")
18057 (version "0.7.1")
18058 (source
18059 (origin
18060 (method url-fetch)
18061 (uri (pypi-uri "tempdir" version))
18062 (sha256
18063 (base32
18064 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
18065 (build-system python-build-system)
18066 (home-page "https://pypi.org/project/tempdir/")
18067 (arguments
18068 ;; the package has no tests
18069 '(#:tests? #f))
18070 (synopsis "Python library for managing temporary directories")
18071 (description
18072 "This library manages temporary directories that are automatically
18073 deleted with all their contents when they are no longer needed. It is
18074 particularly convenient for use in tests.")
18075 (license license:expat)))
18076
18077 (define-public python2-tempdir
18078 (package-with-python2 python-tempdir))
18079
18080 (define-public python-activepapers
18081 (package
18082 (name "python-activepapers")
18083 (version "0.2.2")
18084 (source
18085 (origin
18086 (method url-fetch)
18087 (uri (pypi-uri "ActivePapers.Py" version))
18088 (sha256
18089 (base32
18090 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
18091 (build-system python-build-system)
18092 (arguments
18093 `(#:modules ((ice-9 ftw)
18094 (srfi srfi-1)
18095 (guix build utils)
18096 (guix build python-build-system))
18097
18098 #:phases
18099 (modify-phases %standard-phases
18100 (add-after 'unpack 'delete-python2-code
18101 (lambda _
18102 (for-each delete-file
18103 '("lib/activepapers/builtins2.py"
18104 "lib/activepapers/standardlib2.py"
18105 "lib/activepapers/utility2.py"))))
18106 (replace 'check
18107 (lambda _
18108 ;; Deactivate the test cases that download files
18109 (setenv "NO_NETWORK_ACCESS" "1")
18110 ;; For some strange reason, some tests fail if nosetests runs all
18111 ;; test modules in a single execution. They pass if each test
18112 ;; module is run individually.
18113 (for-each (lambda (filename)
18114 (invoke "nosetests"
18115 (string-append "tests/" filename)))
18116 (scandir "tests"
18117 (lambda (filename)
18118 (string-suffix? ".py" filename)))))))))
18119 (native-inputs
18120 `(("python-tempdir" ,python-tempdir)
18121 ("python-nose" ,python-nose)))
18122 (propagated-inputs
18123 `(("python-h5py" ,python-h5py)))
18124 (home-page "https://www.activepapers.org/")
18125 (synopsis "Executable papers for scientific computing")
18126 (description
18127 "ActivePapers is a tool for working with executable papers, which
18128 combine data, code, and documentation in single-file packages,
18129 suitable for publication as supplementary material or on repositories
18130 such as figshare or Zenodo.")
18131 (properties `((python2-variant . ,(delay python2-activepapers))))
18132 (license license:bsd-3)))
18133
18134 (define-public python2-activepapers
18135 (let ((base (package-with-python2
18136 (strip-python2-variant python-activepapers))))
18137 (package/inherit base
18138 (arguments
18139 (substitute-keyword-arguments (package-arguments base)
18140 ((#:phases phases)
18141 `(modify-phases ,phases
18142 (delete 'delete-python2-code)
18143 (add-after 'unpack 'delete-python3-code
18144 (lambda _
18145 (for-each delete-file
18146 '("lib/activepapers/builtins3.py"
18147 "lib/activepapers/standardlib3.py"
18148 "lib/activepapers/utility3.py")))))))))))
18149
18150 (define-public python-semver
18151 (package
18152 (name "python-semver")
18153 (version "2.9.0")
18154 (source
18155 (origin
18156 (method url-fetch)
18157 (uri (pypi-uri "semver" version))
18158 (sha256
18159 (base32
18160 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
18161 (build-system python-build-system)
18162 (arguments
18163 `(#:phases (modify-phases %standard-phases
18164 (replace 'check
18165 (lambda _
18166 (delete-file "setup.cfg")
18167 (invoke "py.test"))))))
18168 (native-inputs
18169 `(("python-pytest" ,python-pytest)))
18170 (home-page "https://github.com/k-bx/python-semver")
18171 (synopsis "Python helper for Semantic Versioning")
18172 (description "This package provides a Python library for
18173 @url{Semantic Versioning, http://semver.org/}.")
18174 (license license:bsd-3)))
18175
18176 (define-public python2-semver
18177 (package-with-python2 python-semver))
18178
18179 (define-public python-pyro4
18180 (package
18181 (name "python-pyro4")
18182 (version "4.77")
18183 (source
18184 (origin
18185 (method url-fetch)
18186 (uri (pypi-uri "Pyro4" version))
18187 (sha256
18188 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
18189 (build-system python-build-system)
18190 (arguments
18191 '(#:tests? #f)) ;FIXME: Some tests require network access.
18192 (native-inputs
18193 `(("python-cloudpickle" ,python-cloudpickle)
18194 ("python-dill" ,python-dill)
18195 ("python-msgpack" ,python-msgpack)))
18196 (propagated-inputs
18197 `(("python-serpent" ,python-serpent)))
18198 (home-page "https://pyro4.readthedocs.io")
18199 (synopsis "Distributed object middleware for Python")
18200 (description
18201 "Pyro enables you to build applications in which objects can talk to each
18202 other over the network. You can just use normal Python method calls to call
18203 objects on other machines, also known as remote procedure calls (RPC).")
18204 (license license:expat)))
18205
18206 (define-public python2-pyro
18207 (package
18208 (name "python2-pyro")
18209 (version "3.16")
18210 (source
18211 (origin
18212 (method url-fetch)
18213 (uri (pypi-uri "Pyro" version))
18214 (file-name (string-append "Pyro-" version ".tar.gz"))
18215 (sha256
18216 (base32
18217 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
18218 (build-system python-build-system)
18219 (arguments
18220 ;; Pyro is not compatible with Python 3
18221 `(#:python ,python-2
18222 ;; Pyro has no test cases for automatic execution
18223 #:tests? #f))
18224 (home-page "https://pythonhosted.org/Pyro/")
18225 (synopsis "Distributed object manager for Python")
18226 (description "Pyro is a Distributed Object Technology system
18227 written in Python that is designed to be easy to use. It resembles
18228 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
18229 which is a system and language independent Distributed Object Technology
18230 and has much more to offer than Pyro or RMI. Pyro 3.x is no
18231 longer maintained. New projects should use Pyro4 instead, which
18232 is the new Pyro version that is actively developed.")
18233 (license license:expat)))
18234
18235 (define-public python2-scientific
18236 (package
18237 (name "python2-scientific")
18238 (version "2.9.4")
18239 (source
18240 (origin
18241 (method git-fetch)
18242 (uri (git-reference
18243 (url "https://github.com/khinsen/ScientificPython")
18244 (commit (string-append "rel" version))))
18245 (file-name (git-file-name name version))
18246 (sha256
18247 (base32
18248 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
18249 (build-system python-build-system)
18250 (inputs
18251 `(("netcdf" ,netcdf)))
18252 (propagated-inputs
18253 `(("python-numpy" ,python2-numpy-1.8)
18254 ("python-pyro" ,python2-pyro)))
18255 (arguments
18256 ;; ScientificPython is not compatible with Python 3
18257 `(#:python ,python-2
18258 #:tests? #f ; No test suite
18259 #:phases
18260 (modify-phases %standard-phases
18261 (replace 'build
18262 (lambda* (#:key inputs #:allow-other-keys)
18263 (invoke "python" "setup.py" "build"
18264 (string-append "--netcdf_prefix="
18265 (assoc-ref inputs "netcdf"))))))))
18266 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
18267 (synopsis "Python modules for scientific computing")
18268 (description "ScientificPython is a collection of Python modules that are
18269 useful for scientific computing. Most modules are rather general (Geometry,
18270 physical units, automatic derivatives, ...) whereas others are more
18271 domain-specific (e.g. netCDF and PDB support). The library is currently
18272 not actively maintained and works only with Python 2 and NumPy < 1.9.")
18273 (license license:cecill-c)))
18274
18275 (define-public python2-mmtk
18276 (package
18277 (name "python2-mmtk")
18278 (version "2.7.12")
18279 (source
18280 (origin
18281 (method git-fetch)
18282 (uri (git-reference
18283 (url "https://github.com/khinsen/MMTK")
18284 (commit (string-append "rel" version))))
18285 (file-name (git-file-name name version))
18286 (sha256
18287 (base32
18288 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
18289 (build-system python-build-system)
18290 (native-inputs
18291 `(("netcdf" ,netcdf)))
18292 (propagated-inputs
18293 `(("python-scientific" ,python2-scientific)
18294 ("python-tkinter" ,python-2 "tk")))
18295 (arguments
18296 `(#:python ,python-2
18297 #:tests? #f
18298 #:phases
18299 (modify-phases %standard-phases
18300 (add-before 'build 'includes-from-scientific
18301 (lambda* (#:key inputs #:allow-other-keys)
18302 (mkdir-p "Include/Scientific")
18303 (copy-recursively
18304 (string-append
18305 (assoc-ref inputs "python-scientific")
18306 "/include/python2.7/Scientific")
18307 "Include/Scientific"))))))
18308 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
18309 (synopsis "Python library for molecular simulation")
18310 (description "MMTK is a library for molecular simulations with an emphasis
18311 on biomolecules. It provides widely used methods such as Molecular Dynamics
18312 and normal mode analysis, but also basic routines for implementing new methods
18313 for simulation and analysis. The library is currently not actively maintained
18314 and works only with Python 2 and NumPy < 1.9.")
18315 (license license:cecill-c)))
18316
18317 (define-public python-phonenumbers
18318 (package
18319 (name "python-phonenumbers")
18320 (version "8.9.1")
18321 (source
18322 (origin
18323 (method url-fetch)
18324 (uri (pypi-uri "phonenumbers" version))
18325 (sha256
18326 (base32
18327 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
18328 (build-system python-build-system)
18329 (home-page
18330 "https://github.com/daviddrysdale/python-phonenumbers")
18331 (synopsis
18332 "Python library for dealing with international phone numbers")
18333 (description
18334 "This package provides a Python port of Google's libphonenumber library.")
18335 (license license:asl2.0)))
18336
18337 (define-public python2-phonenumbers
18338 (package-with-python2 python-phonenumbers))
18339
18340 (define-public python-send2trash
18341 (package
18342 (name "python-send2trash")
18343 (version "1.5.0")
18344 (source
18345 (origin (method git-fetch)
18346 ;; Source tarball on PyPI doesn't include tests.
18347 (uri (git-reference
18348 (url "https://github.com/hsoft/send2trash")
18349 (commit version)))
18350 (file-name (git-file-name name version))
18351 (sha256
18352 (base32
18353 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
18354 (build-system python-build-system)
18355 (arguments
18356 '(#:phases
18357 (modify-phases %standard-phases
18358 (add-before 'check 'pre-check
18359 (lambda _
18360 (mkdir-p "/tmp/foo")
18361 (setenv "HOME" "/tmp/foo")
18362 #t)))))
18363 (home-page "https://github.com/hsoft/send2trash")
18364 (synopsis "Send files to the user's @file{~/Trash} directory")
18365 (description "This package provides a Python library to send files to the
18366 user's @file{~/Trash} directory.")
18367 (properties `((python2-variant . ,(delay python2-send2trash))))
18368 (license license:bsd-3)))
18369
18370 (define-public python2-send2trash
18371 (let ((base (package-with-python2
18372 (strip-python2-variant python-send2trash))))
18373 (package/inherit base
18374 (arguments
18375 (substitute-keyword-arguments (package-arguments python-send2trash)
18376 ((#:phases phases)
18377 `(modify-phases ,phases
18378 (add-before 'check 'setenv
18379 (lambda _
18380 (setenv "PYTHONPATH"
18381 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18382 #t)))))))))
18383
18384 (define-public python-pyfavicon
18385 (package
18386 (name "python-pyfavicon")
18387 (version "0.1.1")
18388 (source
18389 (origin
18390 (method url-fetch)
18391 (uri (pypi-uri "pyfavicon" version))
18392 (sha256
18393 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
18394 (build-system python-build-system)
18395 (arguments
18396 ;; There are no tests in the PyPI tarball and the tests from the
18397 ;; repository require online data.
18398 '(#:tests? #f))
18399 (propagated-inputs
18400 `(("python-aiohttp" ,python-aiohttp)
18401 ("python-beautifulsoup4" ,python-beautifulsoup4)
18402 ("python-pillow" ,python-pillow)))
18403 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
18404 (synopsis "Async favicon fetcher")
18405 (description
18406 "@code{pyfavicon} is an async favicon fetcher.")
18407 (license license:expat)))
18408
18409 (define-public python-yamllint
18410 (package
18411 (name "python-yamllint")
18412 (version "1.26.1")
18413 (source
18414 (origin
18415 (method url-fetch)
18416 (uri (pypi-uri "yamllint" version))
18417 (sha256
18418 (base32 "090krlxj7az0d9yl8i20vjrqi66dfxx7y5xakjhxzsfp7qmldnc7"))))
18419 (build-system python-build-system)
18420 (propagated-inputs
18421 `(("python-pathspec" ,python-pathspec)
18422 ("python-pyyaml" ,python-pyyaml)
18423 ("python-setuptools" ,python-setuptools)))
18424 (home-page "https://github.com/adrienverge/yamllint")
18425 (synopsis "Linter for YAML files")
18426 (description
18427 "Yamllint is a linter for YAML files. yamllint does not only check for
18428 syntax validity, but for weirdnesses like key repetition and cosmetic problems
18429 such as lines length, trailing spaces, indentation, etc.")
18430 (license license:gpl3+)))
18431
18432 (define-public python-yapf
18433 (package
18434 (name "python-yapf")
18435 (version "0.29.0")
18436 (source
18437 (origin
18438 (method url-fetch)
18439 (uri (pypi-uri "yapf" version))
18440 (sha256
18441 (base32
18442 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
18443 (build-system python-build-system)
18444 (home-page "https://github.com/google/yapf")
18445 (synopsis "Formatter for Python code")
18446 (description "YAPF is a formatter for Python code. It's based off of
18447 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
18448 takes the code and reformats it to the best formatting that conforms to the
18449 style guide, even if the original code didn't violate the style guide.")
18450 (license license:asl2.0)))
18451
18452 (define-public python2-yapf
18453 (package-with-python2 python-yapf))
18454
18455 (define-public python-yq
18456 (package
18457 (name "python-yq")
18458 (version "2.11.1")
18459 (source
18460 (origin
18461 (method url-fetch)
18462 (uri (pypi-uri "yq" version))
18463 (sha256
18464 (base32
18465 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
18466 (build-system python-build-system)
18467 (arguments
18468 '(#:phases
18469 (modify-phases %standard-phases
18470 (add-after 'unpack 'patch
18471 (lambda* (#:key inputs #:allow-other-keys)
18472 (substitute* "yq/__init__.py"
18473 (("Popen\\(\\[\"jq")
18474 (string-append
18475 "Popen([\""
18476 (assoc-ref inputs "jq")
18477 "/bin/jq")))
18478 #t)))))
18479 (inputs
18480 `(("python-argcomplete" ,python-argcomplete)
18481 ("python-pyyaml" ,python-pyyaml)
18482 ("python-xmltodict" ,python-xmltodict)
18483 ("jq" ,jq)))
18484 (native-inputs
18485 `(("python-coverage" ,python-coverage)
18486 ("python-flake8" ,python-flake8)
18487 ("python-wheel" ,python-wheel)))
18488 (home-page "https://github.com/kislyuk/yq")
18489 (synopsis "Command-line YAML/XML processor")
18490 (description
18491 "This package provides @command{yq} and @command{xq} for processing YAML
18492 and XML respectively. The processing is done through @command{jq}, @command{jq}
18493 filters can be used to process the data as it passes through.")
18494 (license license:asl2.0)))
18495
18496 (define-public python-gyp
18497 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
18498 (revision "0"))
18499 (package
18500 (name "python-gyp")
18501 ;; Google does not release versions,
18502 ;; based on second most recent commit date.
18503 (version (git-version "0.0.0" revision commit))
18504 (source
18505 (origin
18506 ;; Google does not release tarballs,
18507 ;; git checkout is needed.
18508 (method git-fetch)
18509 (uri (git-reference
18510 (url "https://chromium.googlesource.com/external/gyp")
18511 (commit commit)))
18512 (file-name (git-file-name name version))
18513 (sha256
18514 (base32
18515 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
18516 (build-system python-build-system)
18517 (home-page "https://gyp.gsrc.io/")
18518 (synopsis "GYP is a Meta-Build system")
18519 (description
18520 "GYP builds build systems for large, cross platform applications.
18521 It can be used to generate XCode projects, Visual Studio projects, Ninja build
18522 files, and Makefiles.")
18523 (license license:bsd-3))))
18524
18525 (define-public python2-gyp
18526 (package-with-python2 python-gyp))
18527
18528 (define-public python-whatever
18529 (package
18530 (name "python-whatever")
18531 (version "0.6")
18532 (source
18533 (origin
18534 (method git-fetch)
18535 (uri (git-reference
18536 (url "https://github.com/Suor/whatever")
18537 (commit version)))
18538 (file-name (git-file-name name version))
18539 (sha256
18540 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
18541 (build-system python-build-system)
18542 (arguments
18543 `(#:phases
18544 (modify-phases %standard-phases
18545 (replace 'check
18546 (lambda _
18547 (invoke "py.test"))))))
18548 (native-inputs
18549 `(("python-pytest" ,python-pytest)))
18550 (home-page "https://github.com/Suor/whatever")
18551 (synopsis "Make anonymous functions by partial application of operators")
18552 (description "@code{whatever} provides an easy way to make anonymous
18553 functions by partial application of operators.")
18554 (license license:bsd-3)))
18555
18556 (define-public python2-whatever
18557 (package-with-python2 python-whatever))
18558
18559 (define-public python-funcy
18560 (package
18561 (name "python-funcy")
18562 (version "1.11")
18563 (source
18564 (origin
18565 (method git-fetch)
18566 (uri (git-reference
18567 (url "https://github.com/Suor/funcy")
18568 (commit version)))
18569 (sha256
18570 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
18571 (file-name (git-file-name name version))))
18572 (build-system python-build-system)
18573 (arguments
18574 `(#:phases
18575 (modify-phases %standard-phases
18576 (replace 'check
18577 (lambda _
18578 (invoke "py.test"))))))
18579 (native-inputs
18580 `(("python-pytest" ,python-pytest)
18581 ("python-whatever" ,python-whatever)))
18582 (home-page "https://github.com/Suor/funcy")
18583 (synopsis "Functional tools")
18584 (description "@code{funcy} is a library that provides functional tools.
18585 Examples are:
18586 @enumerate
18587 @item merge - Merges collections of the same type
18588 @item walk - Type-preserving map
18589 @item select - Selects a part of a collection
18590 @item take - Takes the first n items of a collection
18591 @item first - Takes the first item of a collection
18592 @item remove - Predicated-removes items of a collection
18593 @item concat - Concatenates two collections
18594 @item flatten - Flattens a collection with subcollections
18595 @item distinct - Returns only distinct items
18596 @item split - Predicated-splits a collection
18597 @item split_at - Splits a collection at a given item
18598 @item group_by - Groups items by group
18599 @item pairwise - Pairs off adjacent items
18600 @item partial - Partially-applies a function
18601 @item curry - Curries a function
18602 @item compose - Composes functions
18603 @item complement - Complements a predicate
18604 @item all_fn - \"all\" with predicate
18605 @end enumerate")
18606 (license license:bsd-3)))
18607
18608 (define-public python2-funcy
18609 (package-with-python2 python-funcy))
18610
18611 (define-public python-isoweek
18612 (package
18613 (name "python-isoweek")
18614 (version "1.3.3")
18615 (source
18616 (origin
18617 (method url-fetch)
18618 (uri (pypi-uri "isoweek" version))
18619 (sha256
18620 (base32
18621 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
18622 (build-system python-build-system)
18623 (home-page "https://github.com/gisle/isoweek")
18624 (synopsis "Objects representing a week")
18625 (description "The @code{isoweek} module provide the class Week that
18626 implements the week definition of ISO 8601. This standard also defines
18627 a notation for identifying weeks; yyyyWww (where the W is a literal).
18628 Week instances stringify to this form.")
18629 (license license:bsd-3)))
18630
18631 (define-public python2-isoweek
18632 (package-with-python2 python-isoweek))
18633
18634 (define-public python-pyzbar
18635 (package
18636 (name "python-pyzbar")
18637 (version "0.1.8")
18638 (source
18639 (origin
18640 ;; There's no source tarball on PyPI.
18641 (method git-fetch)
18642 (uri (git-reference
18643 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
18644 (commit (string-append "v" version))))
18645 (file-name (git-file-name name version))
18646 (sha256
18647 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
18648 (build-system python-build-system)
18649 (arguments
18650 `(#:phases
18651 (modify-phases %standard-phases
18652 (add-after 'unpack 'remove-failing-test
18653 (lambda _
18654 ;; This tests if find_library was called once, but we remove
18655 ;; the call in the stage below to make the library find libzbar.
18656 (delete-file "pyzbar/tests/test_zbar_library.py")
18657 #t))
18658 (add-before 'build 'set-library-file-name
18659 (lambda* (#:key inputs #:allow-other-keys)
18660 (let ((libzbar (assoc-ref inputs "zbar")))
18661 (substitute* "pyzbar/zbar_library.py"
18662 (("find_library\\('zbar'\\)")
18663 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18664 #t))))))
18665 (native-inputs
18666 `(("pkg-config" ,pkg-config)
18667 ("python-numpy" ,python-numpy)
18668 ("python-pillow" ,python-pillow)))
18669 (inputs
18670 `(("zbar" ,zbar)))
18671 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18672 (synopsis "Read one-dimensional barcodes and QR codes")
18673 (description
18674 "Read one-dimensional barcodes and QR codes using the zbar library.
18675
18676 Features:
18677
18678 @itemize
18679 @item Pure python
18680 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18681 @item Decodes locations of barcodes
18682 @item No dependencies, other than the zbar library itself
18683 @end itemize")
18684 (license license:expat)))
18685
18686 (define-public python-tokenize-rt
18687 (package
18688 (name "python-tokenize-rt")
18689 (version "2.0.1")
18690 (source
18691 (origin
18692 (method url-fetch)
18693 (uri (pypi-uri "tokenize-rt" version))
18694 (sha256
18695 (base32
18696 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
18697 (build-system python-build-system)
18698 (home-page "https://github.com/asottile/tokenize-rt")
18699 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
18700 (description
18701 "This Python library is a wrapper around @code{tokenize} from the Python
18702 standard library. It provides two additional tokens @code{ESCAPED_NL} and
18703 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
18704 and @code{tokens_to_src} to roundtrip.")
18705 (license license:expat)))
18706
18707 (define-public python-future-fstrings
18708 (package
18709 (name "python-future-fstrings")
18710 (version "0.4.1")
18711 (source
18712 (origin
18713 (method url-fetch)
18714 (uri (pypi-uri "future_fstrings" version))
18715 (sha256
18716 (base32
18717 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18718 (build-system python-build-system)
18719 (propagated-inputs
18720 `(("python-tokenize-rt" ,python-tokenize-rt)))
18721 (home-page "https://github.com/asottile/future-fstrings")
18722 (synopsis "Backport of fstrings to Python < 3.6")
18723 (description
18724 "This package provides a UTF-8 compatible encoding
18725 @code{future_fstrings}, which performs source manipulation. It decodes the
18726 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18727 @code{f} strings.")
18728 (license license:expat)))
18729
18730 (define-public python-typed-ast
18731 (package
18732 (name "python-typed-ast")
18733 (version "1.4.0")
18734 (source
18735 (origin
18736 (method git-fetch)
18737 (uri (git-reference
18738 (url "https://github.com/python/typed_ast")
18739 (commit version)))
18740 (sha256
18741 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18742 (file-name (git-file-name name version))))
18743 (build-system python-build-system)
18744 (arguments
18745 `(#:modules ((guix build utils)
18746 (guix build python-build-system)
18747 (ice-9 ftw)
18748 (srfi srfi-1)
18749 (srfi srfi-26))
18750 #:phases
18751 (modify-phases %standard-phases
18752 (replace 'check
18753 (lambda _
18754 (let ((cwd (getcwd)))
18755 (setenv "PYTHONPATH"
18756 (string-append cwd "/build/"
18757 (find (cut string-prefix? "lib" <>)
18758 (scandir (string-append cwd "/build")))
18759 ":"
18760 (getenv "PYTHONPATH"))))
18761 (invoke "pytest")
18762 #t)))))
18763 (native-inputs `(("python-pytest" ,python-pytest)))
18764 (home-page "https://github.com/python/typed_ast")
18765 (synopsis "Fork of Python @code{ast} modules with type comment support")
18766 (description "This package provides a parser similar to the standard
18767 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18768 include PEP 484 type comments and are independent of the version of Python
18769 under which they are run. The @code{typed_ast} parsers produce the standard
18770 Python AST (plus type comments), and are both fast and correct, as they are
18771 based on the CPython 2.7 and 3.7 parsers.")
18772 ;; See the file "LICENSE" for the details.
18773 (license (list license:psfl
18774 license:asl2.0
18775 license:expat)))) ;ast27/Parser/spark.py
18776
18777 (define-public python-typer
18778 (package
18779 (name "python-typer")
18780 (version "0.3.2")
18781 (source
18782 (origin
18783 ;; Building `python-typer` from the git repository requires the `flit-core`
18784 ;; Python package that is not installed by `python-flit`.
18785 (method url-fetch)
18786 (uri (pypi-uri "typer" version))
18787 (sha256
18788 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
18789 (build-system python-build-system)
18790 (arguments
18791 `(#:phases
18792 (modify-phases %standard-phases
18793 (add-before 'check 'disable-failing-tests
18794 (lambda _
18795 (substitute* "tests/test_completion/test_completion.py"
18796 (("def test_show_completion")
18797 "def _test_show_completion")
18798 (("def test_install_completion")
18799 "def _test_install_completion"))
18800 (substitute* "tests/test_completion/test_completion_install.py"
18801 (("def test_completion_install_bash")
18802 "def _test_completion_install_bash")
18803 (("def test_completion_install_zsh")
18804 "def _test_completion_install_zsh")
18805 (("def test_completion_install_fish")
18806 "def _test_completion_install_fish")
18807 (("def test_completion_install_powershell")
18808 "def _test_completion_install_powershell"))
18809 #t))
18810 (replace 'check
18811 (lambda _
18812 (setenv "PYTHONPATH"
18813 (string-append (getcwd) ":"
18814 (getenv "PYTHONPATH")))
18815 (invoke "python" "-m" "pytest" "tests/")
18816 #t)))))
18817 (propagated-inputs
18818 `(("python-click" ,python-click)))
18819 (native-inputs
18820 `(("python-coverage" ,python-coverage)
18821 ("python-pytest" ,python-pytest)
18822 ("python-shellingham" ,python-shellingham)))
18823 (home-page "https://github.com/tiangolo/typer")
18824 (synopsis
18825 "Typer builds CLI based on Python type hints")
18826 (description
18827 "Typer is a library for building CLI applications. It's based on
18828 Python 3.6+ type hints.")
18829 ;; MIT license
18830 (license license:expat)))
18831
18832 (define-public python-typing
18833 (package
18834 (name "python-typing")
18835 (version "3.7.4.3")
18836 (source
18837 (origin
18838 (method url-fetch)
18839 (uri (pypi-uri "typing" version))
18840 (sha256
18841 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18842 (build-system python-build-system)
18843 (home-page "https://docs.python.org/3/library/typing.html")
18844 (synopsis "Type hints for Python")
18845 (description "This is a backport of the standard library @code{typing}
18846 module to Python versions older than 3.5. Typing defines a standard notation
18847 for Python function and variable type annotations. The notation can be used
18848 for documenting code in a concise, standard format, and it has been designed
18849 to also be used by static and runtime type checkers, static analyzers, IDEs
18850 and other tools.")
18851 (license license:psfl)))
18852
18853 (define-public python2-typing
18854 (package-with-python2 python-typing))
18855
18856 (define-public python-typing-extensions
18857 (package
18858 (name "python-typing-extensions")
18859 (version "3.7.4.3")
18860 (source
18861 (origin
18862 (method url-fetch)
18863 (uri (pypi-uri "typing_extensions" version))
18864 (sha256
18865 (base32
18866 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
18867 (build-system python-build-system)
18868 (home-page
18869 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18870 (synopsis "Experimental type hints for Python")
18871 (description
18872 "The typing_extensions module contains additional @code{typing} hints not
18873 yet present in the of the @code{typing} standard library.
18874 Included are implementations of:
18875 @enumerate
18876 @item ClassVar
18877 @item ContextManager
18878 @item Counter
18879 @item DefaultDict
18880 @item Deque
18881 @item NewType
18882 @item NoReturn
18883 @item overload
18884 @item Protocol
18885 @item runtime
18886 @item Text
18887 @item Type
18888 @item TYPE_CHECKING
18889 @item AsyncGenerator
18890 @end enumerate\n")
18891 (license license:psfl)))
18892
18893 (define-public bpython
18894 (package
18895 (name "bpython")
18896 (version "0.20.1")
18897 (source
18898 (origin
18899 (method url-fetch)
18900 (uri (pypi-uri "bpython" version))
18901 (sha256
18902 (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
18903 (build-system python-build-system)
18904 (arguments
18905 `(#:phases
18906 (modify-phases %standard-phases
18907 (add-after 'unpack 'remove-failing-test
18908 (lambda _
18909 ;; Remove failing test. FIXME: make it pass
18910 (delete-file "bpython/test/test_args.py")
18911 #t))
18912 (add-after 'wrap 'add-aliases
18913 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18914 (lambda* (#:key outputs #:allow-other-keys)
18915 (let ((out (assoc-ref outputs "out")))
18916 (for-each
18917 (lambda (old new)
18918 (symlink old (string-append out "/bin/" new)))
18919 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18920 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18921 #t)))))
18922 (propagated-inputs
18923 `(("python-pygments" ,python-pygments)
18924 ("python-requests" ,python-requests)
18925 ("python-curtsies" ,python-curtsies)
18926 ("python-greenlet" ,python-greenlet)
18927 ("python-six" ,python-six)
18928 ("python-wcwidth" ,python-wcwidth)
18929 ;; optional dependencies
18930 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18931 ("python-watchdog" ,python-watchdog)
18932 ("python-jedi" ,python-jedi)))
18933 (native-inputs
18934 `(("python-sphinx" ,python-sphinx)
18935 ("python-mock" ,python-mock)))
18936 (home-page "https://bpython-interpreter.org/")
18937 (synopsis "Fancy interface to the Python interpreter")
18938 (description "Bpython is a fancy interface to the Python
18939 interpreter. bpython's main features are
18940
18941 @enumerate
18942 @item in-line syntax highlighting,
18943 @item readline-like autocomplete with suggestions displayed as you type,
18944 @item expected parameter list for any Python function,
18945 @item \"rewind\" function to pop the last line of code from memory and
18946 re-evaluate,
18947 @item send the code you've entered off to a pastebin,
18948 @item save the code you've entered to a file, and
18949 @item auto-indentation.
18950 @end enumerate")
18951 (license license:expat)))
18952
18953 (define-public python-pyinotify
18954 (package
18955 (name "python-pyinotify")
18956 (version "0.9.6")
18957 (source (origin
18958 (method url-fetch)
18959 (uri (pypi-uri "pyinotify" version))
18960 (sha256
18961 (base32
18962 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18963 (build-system python-build-system)
18964 (arguments `(#:tests? #f)) ;no tests
18965 (home-page "https://github.com/seb-m/pyinotify")
18966 (synopsis "Python library for monitoring inotify events")
18967 (description
18968 "@code{pyinotify} provides a Python interface for monitoring
18969 file system events on Linux.")
18970 (license license:expat)))
18971
18972 (define-public python2-pyinotify
18973 (package-with-python2 python-pyinotify))
18974
18975 ;; Ada parser uses this version.
18976 (define-public python2-quex-0.67.3
18977 (package
18978 (name "python2-quex")
18979 (version "0.67.3")
18980 (source
18981 (origin
18982 (method url-fetch)
18983 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18984 (version-major+minor version)
18985 "/quex-" version ".zip"))
18986 (sha256
18987 (base32
18988 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18989 (build-system python-build-system)
18990 (native-inputs
18991 `(("unzip" ,unzip)))
18992 (arguments
18993 `(#:python ,python-2
18994 #:tests? #f
18995 #:phases
18996 (modify-phases %standard-phases
18997 (delete 'configure)
18998 (delete 'build)
18999 (replace 'install
19000 (lambda* (#:key outputs #:allow-other-keys)
19001 (let* ((out (assoc-ref outputs "out"))
19002 (share/quex (string-append out "/share/quex"))
19003 (bin (string-append out "/bin")))
19004 (copy-recursively "." share/quex)
19005 (mkdir-p bin)
19006 (symlink (string-append share/quex "/quex-exe.py")
19007 (string-append bin "/quex"))
19008 #t))))))
19009 (native-search-paths
19010 (list (search-path-specification
19011 (variable "QUEX_PATH")
19012 (files '("share/quex")))))
19013 (home-page "http://quex.sourceforge.net/")
19014 (synopsis "Lexical analyzer generator in Python")
19015 (description "@code{quex} is a lexical analyzer generator in Python.")
19016 (license license:lgpl2.1+))) ; Non-military
19017
19018 (define-public python2-quex
19019 (package (inherit python2-quex-0.67.3)
19020 (name "python2-quex")
19021 (version "0.68.1")
19022 (source
19023 (origin
19024 (method url-fetch)
19025 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
19026 (sha256
19027 (base32
19028 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
19029 (file-name (string-append name "-" version ".tar.gz"))))))
19030
19031 (define-public python-more-itertools
19032 (package
19033 (name "python-more-itertools")
19034 (version "8.2.0")
19035 (source
19036 (origin
19037 (method url-fetch)
19038 (uri (pypi-uri "more-itertools" version))
19039 (sha256
19040 (base32
19041 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
19042 (build-system python-build-system)
19043 (home-page "https://github.com/erikrose/more-itertools")
19044 (synopsis "More routines for operating on iterables, beyond itertools")
19045 (description "Python's built-in @code{itertools} module implements a
19046 number of iterator building blocks inspired by constructs from APL, Haskell,
19047 and SML. @code{more-itertools} includes additional building blocks for
19048 working with iterables.")
19049 (properties `((python2-variant . ,(delay python2-more-itertools))))
19050 (license license:expat)))
19051
19052 ;; The 5.x series are the last versions supporting Python 2.7.
19053 (define-public python2-more-itertools
19054 (package
19055 (inherit python-more-itertools)
19056 (name "python2-more-itertools")
19057 (version "5.0.0")
19058 (source (origin
19059 (method url-fetch)
19060 (uri (pypi-uri "more-itertools" version))
19061 (sha256
19062 (base32
19063 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
19064 (arguments
19065 `(#:python ,python-2))
19066 (propagated-inputs
19067 `(("python2-six" ,python2-six-bootstrap)))))
19068
19069 (define-public python-latexcodec
19070 (package
19071 (name "python-latexcodec")
19072 (version "1.0.7")
19073 (source
19074 (origin
19075 (method url-fetch)
19076 (uri (pypi-uri "latexcodec" version))
19077 (sha256
19078 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
19079 (build-system python-build-system)
19080 (inputs
19081 `(("python-six" ,python-six)))
19082 (home-page "https://readthedocs.org/projects/latexcodec/")
19083 (synopsis "Work with LaTeX code in Python")
19084 (description "Lexer and codec to work with LaTeX code in Python.")
19085 (license license:expat)))
19086
19087 (define-public python-pybtex
19088 (package
19089 (name "python-pybtex")
19090 (version "0.22.2")
19091 (source
19092 (origin
19093 (method url-fetch)
19094 (uri (pypi-uri "pybtex" version))
19095 (sha256
19096 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
19097 (build-system python-build-system)
19098 (native-inputs
19099 `(("python-nose" ,python-nose)))
19100 (inputs
19101 `(("python-latexcodec" ,python-latexcodec)
19102 ("python-pyyaml" ,python-pyyaml)
19103 ("python-six" ,python-six)))
19104 (arguments
19105 `(#:test-target "nosetests"))
19106 (home-page "https://pybtex.org/")
19107 (synopsis "BibTeX-compatible bibliography processor")
19108 (description "Pybtex is a BibTeX-compatible bibliography processor written
19109 in Python. You can simply type pybtex instead of bibtex.")
19110 (license license:expat)))
19111
19112 (define-public python-onetimepass
19113 (package
19114 (name "python-onetimepass")
19115 (version "1.0.1")
19116 (source
19117 (origin
19118 (method url-fetch)
19119 (uri (pypi-uri "onetimepass" version))
19120 (sha256
19121 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
19122 (build-system python-build-system)
19123 (propagated-inputs `(("python-six" ,python-six)))
19124 (home-page "https://github.com/tadeck/onetimepass/")
19125 (synopsis "One-time password library")
19126 (description "Python one-time password library for HMAC-based (HOTP) and
19127 time-based (TOTP) passwords.")
19128 (license license:expat)))
19129
19130 (define-public python-parso
19131 (package
19132 (name "python-parso")
19133 (version "0.7.1")
19134 (source
19135 (origin
19136 (method url-fetch)
19137 (uri (pypi-uri "parso" version))
19138 (sha256
19139 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
19140 (native-inputs
19141 `(("python-pytest" ,python-pytest)))
19142 (build-system python-build-system)
19143 (arguments
19144 `(#:phases (modify-phases %standard-phases
19145 (replace 'check
19146 (lambda _ (invoke "pytest" "-vv"))))))
19147 (home-page "https://github.com/davidhalter/parso")
19148 (synopsis "Python Parser")
19149 (description "Parso is a Python parser that supports error recovery and
19150 round-trip parsing for different Python versions (in multiple Python versions).
19151 Parso is also able to list multiple syntax errors in your Python file.")
19152 (license license:expat)))
19153
19154 (define-public python2-parso
19155 (package-with-python2 python-parso))
19156
19157 (define-public python-async-generator
19158 (package
19159 (name "python-async-generator")
19160 (version "1.10")
19161 (source
19162 (origin
19163 (method url-fetch)
19164 (uri (pypi-uri "async_generator" version))
19165 (sha256
19166 (base32
19167 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
19168 (build-system python-build-system)
19169 (native-inputs
19170 `(("python-pytest" ,python-pytest)))
19171 (home-page "https://github.com/python-trio/async_generator")
19172 (synopsis "Async generators and context managers for Python 3.5+")
19173 (description "@code{async_generator} back-ports Python 3.6's native async
19174 generators and Python 3.7's context managers into Python 3.5.")
19175 ;; Dual licensed.
19176 (license (list license:expat license:asl2.0))))
19177
19178 (define-public python-async-timeout
19179 (package
19180 (name "python-async-timeout")
19181 (version "3.0.1")
19182 (source
19183 (origin
19184 (method url-fetch)
19185 (uri (pypi-uri "async-timeout" version))
19186 (sha256
19187 (base32
19188 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
19189 (build-system python-build-system)
19190 (home-page "https://github.com/aio-libs/async_timeout/")
19191 (synopsis "Timeout context manager for asyncio programs")
19192 (description "@code{async-timeout} provides a timeout timeout context
19193 manager compatible with @code{asyncio}.")
19194 (license license:asl2.0)))
19195
19196 (define-public python-glob2
19197 (package
19198 (name "python-glob2")
19199 (version "0.7")
19200 (source
19201 (origin
19202 (method git-fetch)
19203 (uri (git-reference
19204 (url "https://github.com/miracle2k/python-glob2")
19205 (commit (string-append "v" version))))
19206 (file-name (git-file-name name version))
19207 (sha256
19208 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
19209 (build-system python-build-system)
19210 (home-page "https://github.com/miracle2k/python-glob2/")
19211 (synopsis "Extended Version of the python buildin glob module")
19212 (description "This is an extended version of the Python
19213 @url{http://docs.python.org/library/glob.html, built-in glob module} which
19214 adds:
19215
19216 @itemize
19217 @item The ability to capture the text matched by glob patterns, and return
19218 those matches alongside the file names.
19219 @item A recursive @code{**} globbing syntax, akin for example to the
19220 @code{globstar} option of Bash.
19221 @item The ability to replace the file system functions used, in order to glob
19222 on virtual file systems.
19223 @item Compatible with Python 2 and Python 3 (tested with 3.3).
19224 @end itemize
19225
19226 Glob2 currently based on the glob code from Python 3.3.1.")
19227 (license license:bsd-2)))
19228
19229 (define-public python2-glob2
19230 (package-with-python2 python-glob2))
19231
19232 (define-public python-gipc
19233 (package
19234 (name "python-gipc")
19235 (version "0.6.0")
19236 (source
19237 (origin
19238 (method url-fetch)
19239 (uri (pypi-uri "gipc" version ".zip"))
19240 (sha256
19241 (base32
19242 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
19243 (build-system python-build-system)
19244 (native-inputs
19245 `(("unzip" ,unzip)))
19246 (propagated-inputs
19247 `(("python-gevent" ,python-gevent)))
19248 (home-page "https://gehrcke.de/gipc/")
19249 (synopsis "Child process management in the context of gevent")
19250 (description "Usage of Python's multiprocessing package in a
19251 gevent-powered application may raise problems. With @code{gipc},
19252 process-based child processes can safely be created anywhere within a
19253 gevent-powered application.")
19254 (license license:expat)))
19255
19256 (define-public python-beautifultable
19257 (package
19258 (name "python-beautifultable")
19259 (version "1.0.0")
19260 (source
19261 (origin
19262 (method url-fetch)
19263 (uri (pypi-uri "beautifultable" version))
19264 (sha256
19265 (base32
19266 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
19267 (build-system python-build-system)
19268 (propagated-inputs
19269 `(("python-wcwidth" ,python-wcwidth)))
19270 (arguments
19271 `(#:phases
19272 (modify-phases %standard-phases
19273 (add-after 'unpack 'patch-setup.py
19274 (lambda _
19275 (substitute* "setup.py"
19276 (("setup\\(")
19277 "setup(\n test_suite=\"test\",")))))))
19278 (home-page "https://github.com/pri22296/beautifultable")
19279 (synopsis "Print ASCII tables for terminals")
19280 (description "@code{python-beautifultable} provides a class for easily
19281 printing tabular data in a visually appealing ASCII format to a terminal.
19282
19283 Features include, but are not limited to:
19284 @itemize
19285 @item Full customization of the look and feel of the table
19286 @item Row and column accessors.
19287 @item Full support for colors using ANSI sequences or any library.
19288 @item Plenty of predefined styles and option to create custom ones.
19289 @item Support for Unicode characters.
19290 @item Supports streaming table when data is slow to retrieve.
19291 @end itemize")
19292 (license license:expat)))
19293
19294 (define-public python-globber
19295 (package
19296 (name "python-globber")
19297 (version "0.2.1")
19298 (source
19299 (origin
19300 (method git-fetch)
19301 (uri (git-reference
19302 (url "https://github.com/asharov/globber")
19303 (commit version)))
19304 (file-name (git-file-name name version))
19305 (sha256
19306 (base32
19307 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
19308 (build-system python-build-system)
19309 (home-page "https://github.com/asharov/globber")
19310 (synopsis "Library for string matching with glob patterns")
19311 (description
19312 "Globber is a Python library for matching file names against glob patterns.
19313 In contrast to other glob-matching libraries, it matches arbitrary strings and
19314 doesn't require the matched names to be existing files. In addition, it
19315 supports the globstar @code{**} operator to match an arbitrary number of
19316 path components.")
19317 (license license:asl2.0)))
19318
19319 (define-public python-git-hammer
19320 (package
19321 (name "python-git-hammer")
19322 (version "0.3.1")
19323 (source
19324 (origin
19325 (method git-fetch)
19326 (uri (git-reference
19327 (url "https://github.com/asharov/git-hammer")
19328 (commit version)))
19329 (file-name (git-file-name name version))
19330 (sha256
19331 (base32
19332 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
19333 (build-system python-build-system)
19334 (arguments
19335 `(#:phases
19336 (modify-phases %standard-phases
19337 (add-after 'unpack 'patch-setup.py
19338 (lambda _
19339 (substitute* "setup.py"
19340 (("setup\\(")
19341 "setup(\n test_suite=\"test\",")))))))
19342 (propagated-inputs
19343 `(("python-beautifultable" ,python-beautifultable)
19344 ("python-dateutil" ,python-dateutil)
19345 ("python-gitpython" ,python-gitpython)
19346 ("python-globber" ,python-globber)
19347 ("python-matplotlib" ,python-matplotlib)
19348 ("python-sqlalchemy" ,python-sqlalchemy)
19349 ("python-sqlalchemy-utils"
19350 ,python-sqlalchemy-utils)))
19351 (home-page "https://github.com/asharov/git-hammer")
19352 (synopsis "Provide statistics for git repositories")
19353 (description
19354 "Git Hammer is a statistics tool for projects in git repositories.
19355 Its major feature is tracking the number of lines authored by each person for every
19356 commit, but it also includes some other useful statistics.")
19357 (license license:asl2.0)))
19358
19359 (define-public python-fusepy
19360 (package
19361 (name "python-fusepy")
19362 (version "2.0.4")
19363 (source
19364 (origin
19365 (method url-fetch)
19366 (uri (pypi-uri "fusepy" version))
19367 (sha256
19368 (base32
19369 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
19370 (build-system python-build-system)
19371 (arguments
19372 `(#:phases
19373 (modify-phases %standard-phases
19374 (add-before 'build 'set-library-file-name
19375 (lambda* (#:key inputs #:allow-other-keys)
19376 (let ((fuse (assoc-ref inputs "fuse")))
19377 (substitute* "fuse.py"
19378 (("find_library\\('fuse'\\)")
19379 (string-append "'" fuse "/lib/libfuse.so'")))
19380 #t))))))
19381 (propagated-inputs
19382 `(("fuse" ,fuse)))
19383 (home-page "https://github.com/fusepy/fusepy")
19384 (synopsis "Simple ctypes bindings for FUSE")
19385 (description "Python module that provides a simple interface to FUSE and
19386 MacFUSE. The binding is created using the standard @code{ctypes} library.")
19387 (license license:isc)))
19388
19389 (define-public python2-fusepy
19390 (package-with-python2 python-fusepy))
19391
19392 (define-public python-fusepyng
19393 (package
19394 (name "python-fusepyng")
19395 (version "1.0.7")
19396 (source
19397 (origin
19398 (method url-fetch)
19399 (uri (pypi-uri "fusepyng" version))
19400 (sha256
19401 (base32
19402 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
19403 (build-system python-build-system)
19404 (arguments
19405 '(#:phases
19406 (modify-phases %standard-phases
19407 (add-after 'unpack 'set-libfuse-path
19408 (lambda* (#:key inputs #:allow-other-keys)
19409 (let ((fuse (assoc-ref inputs "fuse")))
19410 (substitute* "fusepyng.py"
19411 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
19412 (string-append "\"" fuse "/lib/libfuse.so\""))))
19413 #t)))))
19414 (inputs
19415 `(("fuse" ,fuse)))
19416 (propagated-inputs
19417 `(("python-paramiko" ,python-paramiko)))
19418 (home-page "https://github.com/rianhunter/fusepyng")
19419 (synopsis "Simple ctypes bindings for FUSE")
19420 (description "@code{fusepyng} is a Python module that provides a simple
19421 interface to FUSE on various operating systems. It's just one file and is
19422 implemented using @code{ctypes}.")
19423 (license license:isc)))
19424
19425 (define-public python-userspacefs
19426 (package
19427 (name "python-userspacefs")
19428 (version "2.0.3")
19429 (source
19430 (origin
19431 (method url-fetch)
19432 (uri (pypi-uri "userspacefs" version))
19433 (sha256
19434 (base32
19435 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
19436 (build-system python-build-system)
19437 (propagated-inputs
19438 `(("python-fusepyng" ,python-fusepyng)))
19439 (home-page "https://github.com/rianhunter/userspacefs")
19440 (synopsis "User-space file systems for Python")
19441 (description
19442 "@code{userspacefs} is a library that allows you to easily write
19443 user-space file systems in Python.")
19444 (license license:gpl3+)))
19445
19446 (define-public python-stone
19447 (package
19448 (name "python-stone")
19449 (version "3.2.1")
19450 (source
19451 (origin
19452 (method url-fetch)
19453 (uri (pypi-uri "stone" version))
19454 (sha256
19455 (base32
19456 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
19457 (build-system python-build-system)
19458 (arguments
19459 `(#:phases
19460 (modify-phases %standard-phases
19461 (add-after 'unpack 'change-version-requirements
19462 (lambda _
19463 ;; Match the requirement in test/requirements.txt
19464 (substitute* "setup.py"
19465 (("pytest < 5") "pytest < 7"))
19466 ;; We don't care about a coverage report.
19467 (substitute* "test/requirements.txt"
19468 (("coverage.*") "coverage\n"))
19469 #t))
19470 (replace 'check
19471 (lambda* (#:key tests? #:allow-other-keys)
19472 (when tests?
19473 ;; These tests don't import currectly.
19474 (delete-file "test/test_js_client.py")
19475 (delete-file "test/test_tsd_types.py")
19476 (delete-file "test/test_python_gen.py")
19477 (setenv "PYTHONPATH"
19478 (string-append (getcwd) ":"
19479 (getenv "PYTHONPATH")))
19480 (invoke "pytest"))
19481 #t)))))
19482 (propagated-inputs
19483 `(("python-ply" ,python-ply)
19484 ("python-six" ,python-six)))
19485 (native-inputs
19486 `(("python-coverage" ,python-coverage)
19487 ("python-mock" ,python-mock)
19488 ("python-pytest" ,python-pytest)
19489 ("python-pytest-runner" ,python-pytest-runner)))
19490 (home-page "https://github.com/dropbox/stone")
19491 (synopsis "Official Api Spec Language for Dropbox")
19492 (description
19493 "Stone is an interface description language (IDL) for APIs.")
19494 (license license:expat)))
19495
19496 (define-public pybind11
19497 (package
19498 (name "pybind11")
19499 (version "2.6.1")
19500 (source (origin
19501 (method git-fetch)
19502 (uri (git-reference
19503 (url "https://github.com/pybind/pybind11")
19504 (commit (string-append "v" version))))
19505 (sha256
19506 (base32
19507 "1wh5b1xnywzxwxkyac2wvyqwzmy1qxs341jjk820r7b825wn6yad"))
19508 (file-name (git-file-name name version))))
19509 (build-system cmake-build-system)
19510 (native-inputs
19511 `(("python" ,python-wrapper)
19512
19513 ;; The following dependencies are used for tests.
19514 ("python-pytest" ,python-pytest)
19515 ("catch" ,catch-framework2-1)
19516 ("eigen" ,eigen)))
19517 (arguments
19518 `(#:configure-flags
19519 (list (string-append "-DCATCH_INCLUDE_DIR="
19520 (assoc-ref %build-inputs "catch")
19521 "/include/catch"))
19522
19523 #:phases (modify-phases %standard-phases
19524 (add-after 'install 'install-python
19525 (lambda* (#:key outputs #:allow-other-keys)
19526 (let ((out (assoc-ref outputs "out")))
19527 (with-directory-excursion "../source"
19528 (setenv "PYBIND11_USE_CMAKE" "yes")
19529 (invoke "python" "setup.py" "install"
19530 "--single-version-externally-managed"
19531 "--root=/"
19532 (string-append "--prefix=" out)))))))
19533
19534 #:test-target "check"))
19535 (home-page "https://github.com/pybind/pybind11/")
19536 (synopsis "Seamless operability between C++11 and Python")
19537 (description
19538 "@code{pybind11} is a lightweight header-only library that exposes C++
19539 types in Python and vice versa, mainly to create Python bindings of existing
19540 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
19541 library: to minimize boilerplate code in traditional extension modules by
19542 inferring type information using compile-time introspection.")
19543 (license license:bsd-3)))
19544
19545 (define-public python-pooch
19546 (package
19547 (name "python-pooch")
19548 (version "1.3.0")
19549 (source
19550 (origin
19551 (method url-fetch)
19552 (uri (pypi-uri "pooch" version))
19553 (sha256
19554 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
19555 (build-system python-build-system)
19556 (arguments
19557 `(#:tests? #f)) ;requires online data
19558 (propagated-inputs
19559 `(("python-appdirs" ,python-appdirs)
19560 ("python-packaging" ,python-packaging)
19561 ("python-requests" ,python-requests)))
19562 (home-page "https://github.com/fatiando/pooch")
19563 (synopsis "Manage your Python library's sample data files")
19564 (description
19565 "Pooch manages your Python library's sample data files: it automatically
19566 downloads and stores them in a local directory, with support for versioning
19567 and corruption checks.")
19568 (license license:bsd-3)))
19569
19570 (define-public python-fasteners
19571 (package
19572 (name "python-fasteners")
19573 (version "0.15")
19574 (source
19575 (origin
19576 (method url-fetch)
19577 (uri (pypi-uri "fasteners" version))
19578 (sha256
19579 (base32
19580 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
19581 (build-system python-build-system)
19582 (propagated-inputs
19583 `(("python-monotonic" ,python-monotonic)
19584 ("python-six" ,python-six)))
19585 (native-inputs
19586 `(("python-testtools" ,python-testtools)))
19587 (home-page "https://github.com/harlowja/fasteners")
19588 (synopsis "Python package that provides useful locks")
19589 (description
19590 "This package provides a Python program that provides following locks:
19591
19592 @itemize
19593 @item Locking decorator
19594 @item Reader-writer locks
19595 @item Inter-process locks
19596 @item Generic helpers
19597 @end itemize\n")
19598 (license license:asl2.0)))
19599
19600 (define-public python-requests-file
19601 (package
19602 (name "python-requests-file")
19603 (version "1.4.3")
19604 (source
19605 (origin
19606 (method url-fetch)
19607 (uri (pypi-uri "requests-file" version))
19608 (sha256
19609 (base32
19610 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
19611 (build-system python-build-system)
19612 (propagated-inputs
19613 `(("python-requests" ,python-requests)
19614 ("python-six" ,python-six)))
19615 (home-page
19616 "https://github.com/dashea/requests-file")
19617 (synopsis "File transport adapter for Requests")
19618 (description
19619 "Requests-File is a transport adapter for use with the Requests Python
19620 library to allow local file system access via @code{file://} URLs.")
19621 (license license:asl2.0)))
19622
19623 (define-public python2-requests-file
19624 (package-with-python2 python-requests-file))
19625
19626 (define-public python-identify
19627 (package
19628 (name "python-identify")
19629 (version "1.4.25")
19630 (source
19631 (origin
19632 ;; There are no tests in the PyPI tarball.
19633 (method git-fetch)
19634 (uri (git-reference
19635 (url "https://github.com/chriskuehl/identify")
19636 (commit (string-append "v" version))))
19637 (file-name (git-file-name name version))
19638 (sha256
19639 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
19640 (build-system python-build-system)
19641 (arguments
19642 `(#:phases
19643 (modify-phases %standard-phases
19644 (replace 'check
19645 (lambda _
19646 (invoke "pytest" "-vv"))))))
19647 (native-inputs
19648 `(("python-coverage" ,python-coverage)
19649 ("python-pytest" ,python-pytest)))
19650 (propagated-inputs
19651 `(("python-editdistance" ,python-editdistance)))
19652 (home-page "https://github.com/chriskuehl/identify")
19653 (synopsis "File identification library for Python")
19654 (description
19655 "@code{identify} is a file identification library for Python. Given
19656 a file (or some information about a file), return a set of standardized tags
19657 identifying what the file is.")
19658 (license license:expat)))
19659
19660 (define-public python-tldextract
19661 (package
19662 (name "python-tldextract")
19663 (version "2.2.0")
19664 (source
19665 (origin
19666 (method url-fetch)
19667 (uri (pypi-uri "tldextract" version))
19668 (sha256
19669 (base32
19670 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
19671 (build-system python-build-system)
19672 (native-inputs
19673 `(("python-pytest" ,python-pytest)
19674 ("python-responses" ,python-responses)))
19675 (propagated-inputs
19676 `(("python-idna" ,python-idna)
19677 ("python-requests" ,python-requests)
19678 ("python-requests-file" ,python-requests-file)))
19679 (home-page
19680 "https://github.com/john-kurkowski/tldextract")
19681 (synopsis
19682 "Separate the TLD from the registered domain and subdomains of a URL")
19683 (description
19684 "TLDExtract accurately separates the TLD from the registered domain and
19685 subdomains of a URL, using the Public Suffix List. By default, this includes
19686 the public ICANN TLDs and their exceptions. It can optionally support the
19687 Public Suffix List's private domains as well.")
19688 (license license:bsd-3)))
19689
19690 (define-public python2-tldextract
19691 (package-with-python2 python-tldextract))
19692
19693 (define-public python-nodeenv
19694 (package
19695 (name "python-nodeenv")
19696 (version "1.4.0")
19697 (source
19698 (origin
19699 ;; There's no tarball in PyPI.
19700 (method git-fetch)
19701 (uri (git-reference
19702 (url "https://github.com/ekalinin/nodeenv")
19703 (commit version)))
19704 (file-name (git-file-name name version))
19705 (sha256
19706 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
19707 (build-system python-build-system)
19708 (arguments
19709 `(#:phases
19710 (modify-phases %standard-phases
19711 (replace 'check
19712 (lambda _
19713 ;; This test fails. It tries to open a network socket.
19714 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
19715 (native-inputs
19716 `(("python-coverage" ,python-coverage)
19717 ("python-mock" ,python-mock)
19718 ("python-pytest" ,python-pytest)))
19719 (home-page "https://ekalinin.github.io/nodeenv/")
19720 (synopsis "Create isolated node.js environments")
19721 (description
19722 "Nodeenv (node.js virtual environment) is a tool to create isolated
19723 node.js environments. It creates an environment that has its own installation
19724 directories, that doesn't share libraries with other node.js virtual
19725 environments.")
19726 (license license:bsd-3)))
19727
19728 (define-public python-pynamecheap
19729 (package
19730 (name "python-pynamecheap")
19731 (version "0.0.3")
19732 (source
19733 (origin
19734 (method url-fetch)
19735 (uri (pypi-uri "PyNamecheap" version))
19736 (sha256
19737 (base32
19738 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
19739 (build-system python-build-system)
19740 (propagated-inputs
19741 `(("python-requests" ,python-requests)))
19742 (home-page
19743 "https://github.com/Bemmu/PyNamecheap")
19744 (synopsis
19745 "Namecheap API client in Python")
19746 (description
19747 "PyNamecheap is a Namecheap API client in Python.")
19748 (license license:expat)))
19749
19750 (define-public python2-pynamecheap
19751 (package-with-python2 python-pynamecheap))
19752
19753 (define-public python-dns-lexicon
19754 (package
19755 (name "python-dns-lexicon")
19756 (version "2.4.0")
19757 (source
19758 (origin
19759 (method url-fetch)
19760 (uri (pypi-uri "dns-lexicon" version))
19761 (sha256
19762 (base32
19763 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
19764 (build-system python-build-system)
19765 (arguments
19766 `(#:tests? #f)) ;requires internet access
19767 (propagated-inputs
19768 `(("python-future" ,python-future)
19769 ("python-pynamecheap" ,python-pynamecheap)
19770 ("python-requests" ,python-requests)
19771 ("python-tldextract" ,python-tldextract)
19772 ("python-urllib3" ,python-urllib3)))
19773 (home-page "https://github.com/AnalogJ/lexicon")
19774 (synopsis
19775 "Manipulate DNS records on various DNS providers")
19776 (description
19777 "Lexicon provides a way to manipulate DNS records on multiple DNS
19778 providers in a standardized way. It has a CLI but it can also be used as a
19779 Python library. It was designed to be used in automation, specifically with
19780 Let's Encrypt.")
19781 (license license:expat)))
19782
19783 (define-public python2-dns-lexicon
19784 (package-with-python2 python-dns-lexicon))
19785
19786 (define-public python-cfgv
19787 (package
19788 (name "python-cfgv")
19789 (version "3.1.0")
19790 (source
19791 (origin
19792 ;; There are no tests in the PyPI tarball.
19793 (method git-fetch)
19794 (uri (git-reference
19795 (url "https://github.com/asottile/cfgv")
19796 (commit (string-append "v" version))))
19797 (file-name (git-file-name name version))
19798 (sha256
19799 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19800 (build-system python-build-system)
19801 (arguments
19802 `(#:phases
19803 (modify-phases %standard-phases
19804 (replace 'check
19805 (lambda _
19806 (invoke "pytest" "-vv"))))))
19807 (native-inputs
19808 `(("python-covdefaults" ,python-covdefaults)
19809 ("python-coverage" ,python-coverage)
19810 ("python-pytest" ,python-pytest)))
19811 (home-page "https://github.com/asottile/cfgv")
19812 (synopsis "Configuration validation library")
19813 (description
19814 "This library helps to validate configuration files and produce human
19815 readable error messages.")
19816 (license license:expat)))
19817
19818 (define-public python-commandlines
19819 (package
19820 (name "python-commandlines")
19821 (version "0.4.1")
19822 (source
19823 (origin
19824 (method url-fetch)
19825 (uri (pypi-uri "commandlines" version))
19826 (sha256
19827 (base32
19828 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
19829 (build-system python-build-system)
19830 (home-page "https://github.com/chrissimpkins/commandlines")
19831 (synopsis "Command line argument to object parsing library")
19832 (description
19833 "@code{Commandlines} is a Python library for command line application
19834 development that supports command line argument parsing, command string
19835 validation testing and application logic.")
19836 (license license:expat)))
19837
19838 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19839 ;; python-numba. They have a very unflexible relationship.
19840 (define-public python-numba
19841 (package
19842 (name "python-numba")
19843 (version "0.51.2")
19844 (source
19845 (origin
19846 (method url-fetch)
19847 (uri (pypi-uri "numba" version))
19848 (sha256
19849 (base32
19850 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19851 (build-system python-build-system)
19852 (arguments
19853 `(#:phases
19854 (modify-phases %standard-phases
19855 (add-after 'unpack 'disable-proprietary-features
19856 (lambda _
19857 (setenv "NUMBA_DISABLE_HSA" "1")
19858 (setenv "NUMBA_DISABLE_CUDA" "1")
19859 #t))
19860 (replace 'check
19861 (lambda* (#:key inputs outputs #:allow-other-keys)
19862 (add-installed-pythonpath inputs outputs)
19863 ;; Something is wrong with the PYTHONPATH when running the
19864 ;; tests from the build directory, as it complains about not being
19865 ;; able to import certain modules.
19866 (with-directory-excursion "/tmp"
19867 (setenv "HOME" (getcwd))
19868 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19869 (propagated-inputs
19870 `(("python-llvmlite" ,python-llvmlite)
19871 ("python-numpy" ,python-numpy)
19872 ("python-singledispatch" ,python-singledispatch)))
19873 (native-inputs ;for tests
19874 `(("python-jinja2" ,python-jinja2)
19875 ("python-pygments" ,python-pygments)))
19876 (home-page "https://numba.pydata.org")
19877 (synopsis "Compile Python code using LLVM")
19878 (description "Numba gives you the power to speed up your applications with
19879 high performance functions written directly in Python. With a few
19880 annotations, array-oriented and math-heavy Python code can be just-in-time
19881 compiled to native machine instructions, similar in performance to C, C++ and
19882 Fortran, without having to switch languages or Python interpreters.
19883
19884 Numba works by generating optimized machine code using the LLVM compiler
19885 infrastructure at import time, runtime, or statically (using the included pycc
19886 tool).")
19887 (license license:bsd-3)))
19888
19889 (define-public python-numcodecs
19890 (package
19891 (name "python-numcodecs")
19892 (version "0.6.4")
19893 (source
19894 (origin
19895 (method url-fetch)
19896 (uri (pypi-uri "numcodecs" version))
19897 (sha256
19898 (base32
19899 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19900 (build-system python-build-system)
19901 (propagated-inputs
19902 `(("python-numpy" ,python-numpy)
19903 ("python-msgpack" ,python-msgpack)))
19904 (native-inputs
19905 `(("python-pytest" ,python-pytest)
19906 ("python-setuptools-scm" ,python-setuptools-scm)))
19907 (home-page "https://github.com/zarr-developers/numcodecs")
19908 (synopsis "Buffer compression and transformation codecs")
19909 (description
19910 "This Python package provides buffer compression and transformation
19911 codecs for use in data storage and communication applications.")
19912 (license license:expat)))
19913
19914 (define-public python-asciitree
19915 (package
19916 (name "python-asciitree")
19917 (version "0.3.3")
19918 (source
19919 (origin
19920 (method url-fetch)
19921 (uri (pypi-uri "asciitree" version))
19922 (sha256
19923 (base32
19924 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19925 (build-system python-build-system)
19926 (home-page "https://github.com/mbr/asciitree")
19927 (synopsis "Draws ASCII trees")
19928 (description "This package draws tree structures using characters.")
19929 (license license:expat)))
19930
19931 (define-public python-zarr
19932 (package
19933 (name "python-zarr")
19934 (version "2.4.0")
19935 (source
19936 (origin
19937 (method url-fetch)
19938 (uri (pypi-uri "zarr" version))
19939 (sha256
19940 (base32
19941 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19942 (build-system python-build-system)
19943 (arguments
19944 `(#:phases
19945 (modify-phases %standard-phases
19946 (add-after 'unpack 'disable-service-tests
19947 (lambda _
19948 (setenv "ZARR_TEST_ABS" "0")
19949 (setenv "ZARR_TEST_MONGO" "0")
19950 (setenv "ZARR_TEST_REDIS" "0")
19951 #t))
19952 (replace 'check
19953 (lambda _
19954 (invoke "pytest" "-vv" "-k" "not lmdb")
19955 #t)))))
19956 (propagated-inputs
19957 `(("python-asciitree" ,python-asciitree)
19958 ("python-fasteners" ,python-fasteners)
19959 ("python-numcodecs" ,python-numcodecs)
19960 ("python-numpy" ,python-numpy)))
19961 (native-inputs
19962 `(("python-pytest" ,python-pytest)
19963 ("python-setuptools-scm" ,python-setuptools-scm)))
19964 (home-page "https://github.com/zarr-developers/zarr-python")
19965 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19966 (description
19967 "This package provides an implementation of chunked, compressed,
19968 N-dimensional arrays for Python.")
19969 (license license:expat)))
19970
19971 (define-public python-anndata
19972 (package
19973 (name "python-anndata")
19974 (version "0.7.1")
19975 (source
19976 (origin
19977 (method url-fetch)
19978 (uri (pypi-uri "anndata" version))
19979 (sha256
19980 (base32
19981 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19982 (build-system python-build-system)
19983 (arguments
19984 `(#:phases
19985 (modify-phases %standard-phases
19986 (add-after 'unpack 'delete-inconvenient-tests
19987 (lambda _
19988 ;; This test depends on python-scikit-learn.
19989 (delete-file "anndata/tests/test_inplace_subset.py")
19990 #t))
19991 (delete 'check)
19992 (add-after 'install 'check
19993 (lambda* (#:key inputs outputs #:allow-other-keys)
19994 (add-installed-pythonpath inputs outputs)
19995 (invoke "pytest" "-vv"))))))
19996 (propagated-inputs
19997 `(("python-h5py" ,python-h5py)
19998 ("python-importlib-metadata" ,python-importlib-metadata)
19999 ("python-natsort" ,python-natsort)
20000 ("python-numcodecs" ,python-numcodecs)
20001 ("python-packaging" ,python-packaging)
20002 ("python-pandas" ,python-pandas)
20003 ("python-scipy" ,python-scipy)
20004 ("python-zarr" ,python-zarr)))
20005 (native-inputs
20006 `(("python-joblib" ,python-joblib)
20007 ("python-pytest" ,python-pytest)
20008 ("python-setuptools-scm" ,python-setuptools-scm)))
20009 (home-page "https://github.com/theislab/anndata")
20010 (synopsis "Annotated data for data analysis pipelines")
20011 (description "Anndata is a package for simple (functional) high-level APIs
20012 for data analysis pipelines. In this context, it provides an efficient,
20013 scalable way of keeping track of data together with learned annotations and
20014 reduces the code overhead typically encountered when using a mostly
20015 object-oriented library such as @code{scikit-learn}.")
20016 (license license:bsd-3)))
20017
20018 (define-public python-dill
20019 (package
20020 (name "python-dill")
20021 (version "0.3.1.1")
20022 (source
20023 (origin
20024 (method url-fetch)
20025 (uri (pypi-uri "dill" version))
20026 (sha256
20027 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
20028 (build-system python-build-system)
20029 (arguments
20030 `(#:phases
20031 (modify-phases %standard-phases
20032 (replace 'check
20033 (lambda _
20034 (with-directory-excursion "/tmp"
20035 (invoke "nosetests" "-v"))
20036 #t)))))
20037 (native-inputs
20038 `(("python-nose" ,python-nose)))
20039 (home-page "https://pypi.org/project/dill/")
20040 (synopsis "Serialize all of Python")
20041 (description "Dill extends Python's @code{pickle} module for serializing
20042 and de-serializing Python objects to the majority of the built-in Python
20043 types. Dill provides the user the same interface as the @code{pickle} module,
20044 and also includes some additional features. In addition to pickling Python
20045 objects, @code{dill} provides the ability to save the state of an interpreter
20046 session in a single command. Hence, it would be feasible to save a
20047 interpreter session, close the interpreter, ship the pickled file to another
20048 computer, open a new interpreter, unpickle the session and thus continue from
20049 the saved state of the original interpreter session.")
20050 (license license:bsd-3)))
20051
20052 (define-public python-multiprocess
20053 (package
20054 (name "python-multiprocess")
20055 (version "0.70.9")
20056 (source
20057 (origin
20058 (method url-fetch)
20059 (uri (pypi-uri "multiprocess" version))
20060 (sha256
20061 (base32
20062 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
20063 (build-system python-build-system)
20064 (arguments
20065 `(#:phases
20066 (modify-phases %standard-phases
20067 (add-after 'unpack 'disable-broken-tests
20068 (lambda _
20069 ;; This test is broken as there is no keyboard interrupt.
20070 (substitute* "py3.7/multiprocess/tests/__init__.py"
20071 (("^(.*)def test_wait_result"
20072 line indent)
20073 (string-append indent
20074 "@unittest.skip(\"Disabled by Guix\")\n"
20075 line)))
20076 #t))
20077 ;; Tests must be run after installation.
20078 (delete 'check)
20079 (add-after 'install 'check
20080 (lambda* (#:key inputs outputs #:allow-other-keys)
20081 (add-installed-pythonpath inputs outputs)
20082 (invoke "python" "-m" "multiprocess.tests")
20083 #t)))))
20084 (propagated-inputs
20085 `(("python-dill" ,python-dill)))
20086 (home-page "https://pypi.org/project/multiprocess/")
20087 (synopsis "Multiprocessing and multithreading in Python")
20088 (description
20089 "This package is a fork of the multiprocessing Python package, a package
20090 which supports the spawning of processes using the API of the standard
20091 library's @code{threading} module.")
20092 (license license:bsd-3)))
20093
20094 (define-public python-toolz
20095 (package
20096 (name "python-toolz")
20097 (version "0.9.0")
20098 (source
20099 (origin
20100 (method url-fetch)
20101 (uri (pypi-uri "toolz" version))
20102 (sha256
20103 (base32
20104 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
20105 (build-system python-build-system)
20106 ;; FIXME: tests cannot be computed: "Can't perform this operation for
20107 ;; unregistered loader type"
20108 (arguments '(#:tests? #f))
20109 (home-page "https://github.com/pytoolz/toolz/")
20110 (synopsis "List processing tools and functional utilities")
20111 (description
20112 "This package provides a set of utility functions for iterators,
20113 functions, and dictionaries.")
20114 (license license:bsd-3)))
20115
20116 (define-public python2-toolz
20117 (package-with-python2 python-toolz))
20118
20119 (define-public python-cytoolz
20120 (package
20121 (name "python-cytoolz")
20122 (version "0.9.0.1")
20123 (source
20124 (origin
20125 (method url-fetch)
20126 (uri (pypi-uri "cytoolz" version))
20127 (sha256
20128 (base32
20129 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
20130 (build-system python-build-system)
20131 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
20132 ;; 'exceptions'"
20133 (arguments '(#:tests? #f))
20134 (propagated-inputs
20135 `(("python-toolz" ,python-toolz)))
20136 (native-inputs
20137 `(("python-cython" ,python-cython)))
20138 (home-page "https://github.com/pytoolz/cytoolz")
20139 (synopsis "High performance functional utilities")
20140 (description
20141 "The cytoolz package implements the same API as provided by toolz. The
20142 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
20143 that is accessible to other projects developed in Cython.")
20144 (license license:bsd-3)))
20145
20146 (define-public python-sortedcollections
20147 (package
20148 (name "python-sortedcollections")
20149 (version "2.1.0")
20150 (source
20151 (origin
20152 (method url-fetch)
20153 (uri (pypi-uri "sortedcollections" version))
20154 (sha256
20155 (base32
20156 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
20157 (build-system python-build-system)
20158 (propagated-inputs
20159 `(("python-sortedcontainers" ,python-sortedcontainers)))
20160 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
20161 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
20162 (synopsis "Python Sorted Collections")
20163 (description "Sorted Collections is a Python sorted collections library.")
20164 (license license:asl2.0)))
20165
20166 (define-public python-sortedcontainers
20167 (package
20168 (name "python-sortedcontainers")
20169 (version "2.1.0")
20170 (source
20171 (origin
20172 (method url-fetch)
20173 (uri (pypi-uri "sortedcontainers" version))
20174 (sha256
20175 (base32
20176 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
20177 (build-system python-build-system)
20178 (arguments
20179 ;; FIXME: Tests require many extra dependencies, and would introduce
20180 ;; a circular dependency on hypothesis, which uses this package.
20181 '(#:tests? #f))
20182 (propagated-inputs
20183 `(("python-appdirs" ,python-appdirs)
20184 ("python-distlib" ,python-distlib)
20185 ("python-filelock" ,python-filelock)
20186 ("python-six" ,python-six-bootstrap)))
20187 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
20188 (synopsis "Sorted List, Sorted Dict, Sorted Set")
20189 (description
20190 "This package provides a sorted collections library, written in
20191 pure-Python.")
20192 (license license:asl2.0)))
20193
20194 (define-public python2-sortedcontainers
20195 (package-with-python2 python-sortedcontainers))
20196
20197 (define-public python-cloudpickle
20198 (package
20199 (name "python-cloudpickle")
20200 (version "1.3.0")
20201 (source
20202 (origin
20203 (method url-fetch)
20204 (uri (pypi-uri "cloudpickle" version))
20205 (sha256
20206 (base32
20207 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
20208 (build-system python-build-system)
20209 (arguments
20210 '(#:phases (modify-phases %standard-phases
20211 (add-before 'check 'do-not-override-PYTHONPATH
20212 (lambda _
20213 ;; Append to PYTHONPATH instead of overriding it so
20214 ;; that dependencies from Guix can be found.
20215 (substitute* "tests/testutils.py"
20216 (("env\\['PYTHONPATH'\\] = pythonpath")
20217 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
20218 #t))
20219 (replace 'check
20220 (lambda* (#:key tests? #:allow-other-keys)
20221 (if tests?
20222 (invoke "pytest" "-s" "-vv")
20223 (format #t "test suite not run~%"))
20224 #t)))))
20225 (native-inputs
20226 `(;; For tests.
20227 ("python-psutil" ,python-psutil)
20228 ("python-pytest" ,python-pytest)
20229 ("python-tornado" ,python-tornado)))
20230 (home-page "https://github.com/cloudpipe/cloudpickle")
20231 (synopsis "Extended pickling support for Python objects")
20232 (description
20233 "Cloudpickle makes it possible to serialize Python constructs not
20234 supported by the default pickle module from the Python standard library. It
20235 is especially useful for cluster computing where Python expressions are
20236 shipped over the network to execute on remote hosts, possibly close to the
20237 data.")
20238 (properties `((python2-variant . ,(delay python2-cloudpickle))))
20239 (license license:bsd-3)))
20240
20241 (define-public python2-cloudpickle
20242 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
20243 (package/inherit base
20244 (native-inputs
20245 `(("python-mock" ,python2-mock)
20246 ,@(package-native-inputs base)))
20247 (propagated-inputs
20248 `(("python-futures" ,python2-futures)
20249 ,@(package-propagated-inputs base))))))
20250
20251 (define-public python-locket
20252 (package
20253 (name "python-locket")
20254 (version "0.2.0")
20255 (source
20256 (origin
20257 (method url-fetch)
20258 (uri (pypi-uri "locket" version))
20259 (sha256
20260 (base32
20261 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
20262 (build-system python-build-system)
20263 (home-page "https://github.com/mwilliamson/locket.py")
20264 (synopsis "File-based locks for Python")
20265 (description
20266 "Locket implements a lock that can be used by multiple processes provided
20267 they use the same path.")
20268 (license license:bsd-2)))
20269
20270 (define-public python2-locket
20271 (package-with-python2 python-locket))
20272
20273 (define-public python-blosc
20274 (package
20275 (name "python-blosc")
20276 (version "1.5.1")
20277 (source
20278 (origin
20279 (method url-fetch)
20280 (uri (pypi-uri "blosc" version))
20281 (sha256
20282 (base32
20283 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
20284 (build-system python-build-system)
20285 ;; FIXME: all tests pass, but then this error is printed:
20286 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
20287 (arguments '(#:tests? #f))
20288 (propagated-inputs
20289 `(("python-numpy" ,python-numpy)))
20290 (home-page "https://github.com/blosc/python-blosc")
20291 (synopsis "Python wrapper for the Blosc data compressor library")
20292 (description "Blosc is a high performance compressor optimized for binary
20293 data. It has been designed to transmit data to the processor cache faster
20294 than the traditional, non-compressed, direct memory fetch approach via a
20295 @code{memcpy()} system call.
20296
20297 Blosc works well for compressing numerical arrays that contains data with
20298 relatively low entropy, like sparse data, time series, grids with
20299 regular-spaced values, etc.
20300
20301 This Python package wraps the Blosc library.")
20302 (license license:bsd-3)))
20303
20304 (define-public python2-blosc
20305 (package-with-python2 python-blosc))
20306
20307 (define-public python-partd
20308 (package
20309 (name "python-partd")
20310 (version "0.3.9")
20311 (source
20312 (origin
20313 (method url-fetch)
20314 (uri (pypi-uri "partd" version))
20315 (sha256
20316 (base32
20317 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
20318 (build-system python-build-system)
20319 (propagated-inputs
20320 `(("python-blosc" ,python-blosc)
20321 ("python-locket" ,python-locket)
20322 ("python-numpy" ,python-numpy)
20323 ("python-pandas" ,python-pandas)
20324 ("python-pyzmq" ,python-pyzmq)
20325 ("python-toolz" ,python-toolz)))
20326 (home-page "https://github.com/dask/partd/")
20327 (synopsis "Appendable key-value storage")
20328 (description "Partd stores key-value pairs. Values are raw bytes. We
20329 append on old values. Partd excels at shuffling operations.")
20330 (license license:bsd-3)))
20331
20332 (define-public python2-partd
20333 (package-with-python2 python-partd))
20334
20335 (define-public python-fsspec
20336 (package
20337 (name "python-fsspec")
20338 (version "0.6.1")
20339 (source
20340 (origin
20341 (method url-fetch)
20342 (uri (pypi-uri "fsspec" version))
20343 (sha256
20344 (base32
20345 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
20346 (build-system python-build-system)
20347 (arguments '(#:tests? #f)) ; there are none
20348 (home-page "https://github.com/intake/filesystem_spec")
20349 (synopsis "File-system specification")
20350 (description "The purpose of this package is to produce a template or
20351 specification for a file-system interface, that specific implementations
20352 should follow, so that applications making use of them can rely on a common
20353 behavior and not have to worry about the specific internal implementation
20354 decisions with any given backend.")
20355 (license license:bsd-3)))
20356
20357 (define-public python-dask
20358 (package
20359 (name "python-dask")
20360 (version "2.14.0")
20361 (source
20362 (origin
20363 (method url-fetch)
20364 (uri (pypi-uri "dask" version))
20365 (sha256
20366 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
20367 (build-system python-build-system)
20368 (arguments
20369 `(#:phases
20370 (modify-phases %standard-phases
20371 (add-after 'unpack 'disable-broken-tests
20372 (lambda _
20373 ;; This test is marked as xfail when pytest-xdist is used.
20374 (substitute* "dask/tests/test_threaded.py"
20375 (("def test_interrupt\\(\\)" m)
20376 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20377 m)))
20378 ;; This one fails with a type error:
20379 ;; TypeError: Already tz-aware, use tz_convert to convert.
20380 (substitute* "dask/dataframe/tests/test_shuffle.py"
20381 (("def test_set_index_timestamp\\(\\)" m)
20382 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20383 m)))
20384 #t))
20385 (replace 'check
20386 (lambda _ (invoke "pytest" "-vv"))))))
20387 (propagated-inputs
20388 `(("python-cloudpickle" ,python-cloudpickle)
20389 ("python-fsspec" ,python-fsspec)
20390 ("python-numpy" ,python-numpy)
20391 ("python-packaging" ,python-packaging)
20392 ("python-pandas" ,python-pandas)
20393 ("python-partd" ,python-partd)
20394 ("python-toolz" ,python-toolz)
20395 ("python-pyyaml" ,python-pyyaml)))
20396 (native-inputs
20397 `(("python-pytest" ,python-pytest)
20398 ("python-pytest-runner" ,python-pytest-runner)))
20399 (home-page "https://github.com/dask/dask/")
20400 (synopsis "Parallel computing with task scheduling")
20401 (description
20402 "Dask is a flexible parallel computing library for analytics. It
20403 consists of two components: dynamic task scheduling optimized for computation,
20404 and large data collections like parallel arrays, dataframes, and lists that
20405 extend common interfaces like NumPy, Pandas, or Python iterators to
20406 larger-than-memory or distributed environments. These parallel collections
20407 run on top of the dynamic task schedulers. ")
20408 (license license:bsd-3)))
20409
20410 (define-public python-ilinkedlist
20411 (package
20412 (name "python-ilinkedlist")
20413 (version "0.4.0")
20414 (source
20415 (origin
20416 (method url-fetch)
20417 (uri (pypi-uri "ilinkedlist" version))
20418 (sha256
20419 (base32
20420 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
20421 (build-system python-build-system)
20422 (native-inputs `(("python-pytest" ,python-pytest)))
20423 (inputs `(("python" ,python)))
20424 (home-page "https://github.com/luther9/ilinkedlist-py")
20425 (synopsis "Immutable linked list library")
20426 (description
20427 "This is a implementation of immutable linked lists for Python. It
20428 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
20429 Since a linked list is treated as immutable, it is hashable, and its length
20430 can be retrieved in constant time. Some of the terminology is inspired by
20431 LISP. It is possible to create an improper list by creating a @code{Pair}
20432 with a non-list @code{cdr}.")
20433 (license license:gpl3+)))
20434
20435 (define-public python-readlike
20436 (package
20437 (name "python-readlike")
20438 (version "0.1.3")
20439 (source
20440 (origin
20441 (method url-fetch)
20442 (uri (pypi-uri "readlike" version))
20443 (sha256
20444 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
20445 (build-system python-build-system)
20446 (home-page "https://github.com/jangler/readlike")
20447 (synopsis "GNU Readline-like line editing module")
20448 (description
20449 "This Python module provides line editing functions similar to the default
20450 Emacs-style ones of GNU Readline. Unlike the Python standard library's
20451 @code{readline} package, this one allows access to those capabilities in settings
20452 outside of a standard command-line interface. It is especially well-suited to
20453 interfacing with Urwid, due to a shared syntax for describing key inputs.
20454
20455 Currently, all stateless Readline commands are implemented. Yanking and history
20456 are not supported.")
20457 (license license:expat)))
20458
20459 (define-public python2-readlike
20460 (package-with-python2 python-readlike))
20461
20462 (define-public python-reparser
20463 (package
20464 (name "python-reparser")
20465 (version "1.4.3")
20466 (source
20467 (origin
20468 (method url-fetch)
20469 (uri (pypi-uri "ReParser" version))
20470 (sha256
20471 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
20472 (build-system python-build-system)
20473 (home-page "https://github.com/xmikos/reparser")
20474 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
20475 (description
20476 "This Python library provides a simple lexer/parser for inline markup based
20477 on regular expressions.")
20478 (license license:expat)))
20479
20480 (define-public python2-reparser
20481 (let ((reparser (package-with-python2
20482 (strip-python2-variant python-reparser))))
20483 (package/inherit reparser
20484 (propagated-inputs
20485 `(("python2-enum34" ,python2-enum34)
20486 ,@(package-propagated-inputs reparser))))))
20487
20488 (define-public python-retrying
20489 (package
20490 (name "python-retrying")
20491 (version "1.3.3")
20492 (source
20493 (origin
20494 (method git-fetch)
20495 (uri (git-reference
20496 (url "https://github.com/rholder/retrying")
20497 (commit (string-append "v" version))))
20498 (file-name (git-file-name name version))
20499 (sha256
20500 (base32
20501 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
20502 (build-system python-build-system)
20503 (propagated-inputs
20504 `(("python-six" ,python-six)))
20505 (home-page "https://github.com/rholder/retrying")
20506 (synopsis "Library for adding retry behavior")
20507 (description "Retrying is a general-purpose retrying library to simplify
20508 the task of adding retry behavior to just about anything.
20509
20510 Features:
20511
20512 @itemize
20513 @item Generic Decorator API.
20514 @item Specify stop condition (i.e. limit by number of attempts).
20515 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
20516 @item Customize retrying on Exceptions.
20517 @item Customize retrying on expected returned result.
20518 @end itemize")
20519 (license license:asl2.0)))
20520
20521 (define-public python-pre-commit
20522 (package
20523 (name "python-pre-commit")
20524 (version "2.10.0")
20525 (source
20526 (origin
20527 (method url-fetch)
20528 (uri (pypi-uri "pre_commit" version))
20529 (sha256
20530 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
20531 (build-system python-build-system)
20532 (arguments
20533 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
20534 ;; attribute 'empty_template_setup'".
20535 `(#:tests? #false))
20536 (propagated-inputs
20537 `(("python-cfgv" ,python-cfgv)
20538 ("python-identify" ,python-identify)
20539 ("python-importlib-metadata" ,python-importlib-metadata)
20540 ("python-importlib-resources" ,python-importlib-resources)
20541 ("python-nodeenv" ,python-nodeenv)
20542 ("python-pyyaml" ,python-pyyaml)
20543 ("python-toml" ,python-toml)
20544 ("python-virtualenv" ,python-virtualenv)))
20545 (home-page "https://github.com/pre-commit/pre-commit")
20546 (synopsis "Framework for managing multi-language pre-commit hooks")
20547 (description
20548 "This package provides a framework for managing and maintaining
20549 multi-language pre-commit hooks.")
20550 (license license:expat)))
20551
20552 (define-public python-precis-i18n
20553 (package
20554 (name "python-precis-i18n")
20555 (version "1.0.0")
20556 (source
20557 (origin
20558 (method url-fetch)
20559 (uri (pypi-uri "precis_i18n" version))
20560 (sha256
20561 (base32
20562 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
20563 (build-system python-build-system)
20564 (home-page "https://github.com/byllyfish/precis_i18n")
20565 (synopsis "Implementation of the PRECIS framework")
20566 (description
20567 "This module implements the PRECIS Framework as described in RFC 8264,
20568 RFC 8265 and RFC 8266.")
20569 (license license:expat)))
20570
20571 (define-public python-absl-py
20572 (package
20573 (name "python-absl-py")
20574 (version "0.6.1")
20575 (source
20576 (origin
20577 (method url-fetch)
20578 (uri (pypi-uri "absl-py" version))
20579 (sha256
20580 (base32
20581 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
20582 (build-system python-build-system)
20583 (propagated-inputs
20584 `(("python-six" ,python-six)))
20585 (home-page "https://github.com/abseil/abseil-py")
20586 (synopsis "Abseil Python common libraries")
20587 (description
20588 "This package provides the Abseil Python Common Libraries, a collection
20589 of Python libraries for building Python applications.")
20590 (license license:asl2.0)))
20591
20592 (define-public python-astor
20593 (package
20594 (name "python-astor")
20595 (version "0.8.1")
20596 (source
20597 (origin
20598 (method url-fetch)
20599 (uri (pypi-uri "astor" version))
20600 (sha256
20601 (base32
20602 "0ppscdzzvxpznclkmhhj53iz314x3pfv4yc7c6gwxqgljgdgyvka"))))
20603 (build-system python-build-system)
20604 ;; FIXME: There are two errors and two test failures.
20605 (arguments `(#:tests? #f))
20606 (home-page "https://github.com/berkerpeksag/astor")
20607 (synopsis "Read and write Python ASTs")
20608 (description "Astor is designed to allow easy manipulation of Python
20609 source via the Abstract Syntax Tree.")
20610 (license license:bsd-3)))
20611
20612 (define-public python2-astor
20613 (package-with-python2 python-astor))
20614
20615 (define-public python-astunparse
20616 (package
20617 (name "python-astunparse")
20618 (version "1.6.2")
20619 (source
20620 (origin
20621 (method url-fetch)
20622 (uri (pypi-uri "astunparse" version))
20623 (sha256
20624 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
20625 (build-system python-build-system)
20626 (arguments '(#:tests? #f)) ; there are none
20627 (propagated-inputs
20628 `(("python-six" ,python-six)
20629 ("python-wheel" ,python-wheel)))
20630 (home-page "https://github.com/simonpercivall/astunparse")
20631 (synopsis "AST unparser for Python")
20632 (description "This package provides an AST unparser for Python. It is a
20633 factored out version of @code{unparse} found in the Python source
20634 distribution.")
20635 (license license:bsd-3)))
20636
20637 (define-public python-gast
20638 (package
20639 (name "python-gast")
20640 (version "0.3.3")
20641 (source
20642 (origin
20643 (method url-fetch)
20644 (uri (pypi-uri "gast" version))
20645 (sha256
20646 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
20647 (build-system python-build-system)
20648 (propagated-inputs
20649 `(("python-astunparse" ,python-astunparse)))
20650 (home-page "https://pypi.org/project/gast/")
20651 (synopsis "Generic Python AST that abstracts the underlying Python version")
20652 (description
20653 "GAST provides a compatibility layer between the AST of various Python
20654 versions, as produced by @code{ast.parse} from the standard @code{ast}
20655 module.")
20656 (license license:bsd-3)))
20657
20658 (define-public python-wikidata
20659 (package
20660 (name "python-wikidata")
20661 (version "0.6.1")
20662 (source
20663 (origin
20664 (method url-fetch)
20665 (uri (pypi-uri "Wikidata" version))
20666 (sha256
20667 (base32
20668 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
20669 (build-system python-build-system)
20670 (propagated-inputs
20671 `(("python-babel" ,python-babel)))
20672 (home-page "https://github.com/dahlia/wikidata")
20673 (synopsis "Wikidata client library")
20674 (description
20675 "This package provides a Python interface to
20676 @url{https://www.wikidata.org/, Wikidata}.")
20677 (properties '((upstream-name . "Wikidata")))
20678 (license license:gpl3+)))
20679
20680 (define-public python-doctest-ignore-unicode
20681 (package
20682 (name "python-doctest-ignore-unicode")
20683 (version "0.1.2")
20684 (source
20685 (origin
20686 (method url-fetch)
20687 (uri (pypi-uri "doctest-ignore-unicode" version))
20688 (sha256
20689 (base32
20690 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
20691 (build-system python-build-system)
20692 (native-inputs
20693 `(("python-nose" ,python-nose)))
20694 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
20695 (synopsis "Ignore Unicode literal prefixes in doctests")
20696 (description
20697 "This package adds support for a flag to ignore Unicode literal prefixes
20698 in doctests.")
20699 (license license:asl2.0)))
20700
20701 (define-public python-attr
20702 (package
20703 (name "python-attr")
20704 (version "0.3.1")
20705 (source
20706 (origin
20707 (method url-fetch)
20708 (uri (pypi-uri "attr" version))
20709 (sha256
20710 (base32
20711 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
20712 (build-system python-build-system)
20713 (home-page "https://github.com/denis-ryzhkov/attr")
20714 (synopsis "Decorator for attributes of target function or class")
20715 (description "Simple decorator to set attributes of target function or
20716 class in a @acronym{DRY, Don't Repeat Yourself} way.")
20717 (license license:expat)))
20718
20719 (define-public python-construct
20720 (package
20721 (name "python-construct")
20722 (version "2.10.56")
20723 (source
20724 (origin
20725 (method url-fetch)
20726 (uri (pypi-uri "construct" version))
20727 (sha256
20728 (base32
20729 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
20730 (build-system python-build-system)
20731 (arguments
20732 `(#:tests? #f)) ; No tests exist.
20733 (propagated-inputs
20734 `(("python-extras" ,python-extras)
20735 ("python-arrow" ,python-arrow)
20736 ("python-numpy" ,python-numpy)
20737 ("python-ruamel.yaml" ,python-ruamel.yaml)))
20738 (home-page "https://construct.readthedocs.io")
20739 (synopsis "Declarative and symmetrical parser and builder for binary data")
20740 (description
20741 "This package provides both simple, atomic constructs (such as
20742 integers of various sizes), as well as composite ones which allow you
20743 form hierarchical and sequential structures of increasing complexity.
20744 It features bit and byte granularity, easy debugging and testing, an
20745 easy-to-extend subclass system, and lots of primitive constructs to
20746 make your work easier.")
20747 (license license:expat)))
20748
20749 (define-public python-outcome
20750 (package
20751 (name "python-outcome")
20752 (version "1.0.1")
20753 (source
20754 (origin
20755 (method url-fetch)
20756 (uri (pypi-uri "outcome" version))
20757 (sha256
20758 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
20759 (build-system python-build-system)
20760 (arguments
20761 `(#:phases
20762 (modify-phases %standard-phases
20763 (replace 'check
20764 (lambda* (#:key inputs outputs #:allow-other-keys)
20765 (add-installed-pythonpath inputs outputs)
20766 (invoke "pytest" "-vv"))))))
20767 (native-inputs
20768 `(("python-pytest" ,python-pytest)
20769 ("python-pytest-cov" ,python-pytest-cov)
20770 ("python-pytest-asyncio" ,python-pytest-asyncio)))
20771 (propagated-inputs
20772 `(("python-async-generator" ,python-async-generator)
20773 ("python-attrs" ,python-attrs)))
20774 (home-page "https://github.com/python-trio/outcome")
20775 (synopsis "Capture the outcome of Python function calls")
20776 (description
20777 "Capture the outcome of Python function calls. Extracted from the Trio
20778 project.")
20779 ;; Either license applies.
20780 (license (list license:expat license:asl2.0))))
20781
20782 (define-public python-trio
20783 (package
20784 (name "python-trio")
20785 (version "0.17.0")
20786 (source
20787 (origin
20788 (method url-fetch)
20789 (uri (pypi-uri "trio" version))
20790 (sha256
20791 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
20792 (build-system python-build-system)
20793 (arguments
20794 `(#:phases
20795 (modify-phases %standard-phases
20796 (add-before 'check 'change-home
20797 (lambda _
20798 ;; Tests require a writable home.
20799 (setenv "HOME" "/tmp")
20800 #t))
20801 (replace 'check
20802 (lambda _
20803 (invoke "pytest" "-vv" "-k"
20804 (string-append
20805 ;; This test times out.
20806 "not test_ki_protection_works"
20807 ;; Assertion errors.
20808 " and not test_guest_mode_ki"
20809 " and not test_run_in_trio_thread_ki"
20810 ;; These try to raise KeyboardInterrupt which does not work
20811 ;; in the build environment.
20812 " and not test_ki_self"
20813 " and not test_ki_wakes_us_up"
20814 ;; Failure in name resolution.
20815 " and not test_getnameinfo"
20816 " and not test_SocketType_resolve"
20817 ;; OSError: protocol not found.
20818 " and not test_getprotobyname")))))))
20819 (native-inputs
20820 `(("python-astor" ,python-astor)
20821 ("python-ipython" ,python-ipython)
20822 ("python-jedi" ,python-jedi)
20823 ("python-pylint" ,python-pylint)
20824 ("python-pyopenssl" ,python-pyopenssl)
20825 ("python-pytest" ,python-pytest)
20826 ("python-pytest-cov" ,python-pytest-cov)
20827 ("python-trustme" ,python-trustme)))
20828 (propagated-inputs
20829 `(("python-attrs" ,python-attrs)
20830 ("python-idna" ,python-idna)
20831 ("python-outcome" ,python-outcome)
20832 ("python-sniffio" ,python-sniffio)
20833 ("python-sortedcontainers"
20834 ,python-sortedcontainers)))
20835 (home-page "https://github.com/python-trio/trio")
20836 (synopsis "Friendly Python library for async concurrency and I/O")
20837 (description
20838 "Trio strives to be a production-quality, async/await-native I/O library
20839 for Python. Like all async libraries, its main purpose is to help you write
20840 programs that do multiple things at the same time with parallelized I/O.")
20841 ;; Either license applies.
20842 (license (list license:expat license:asl2.0))))
20843
20844 (define-public python-trio-typing
20845 (package
20846 (name "python-trio-typing")
20847 (version "0.5.0")
20848 (source
20849 (origin
20850 (method url-fetch)
20851 (uri (pypi-uri "trio-typing" version))
20852 (sha256
20853 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
20854 (build-system python-build-system)
20855 (arguments
20856 `(#:phases
20857 (modify-phases %standard-phases
20858 (replace 'check
20859 (lambda _
20860 (invoke "pytest" "-vv"))))))
20861 (native-inputs
20862 `(("python-attrs" ,python-attrs)
20863 ("python-pytest" ,python-pytest)))
20864 (propagated-inputs
20865 `(("python-mypy" ,python-mypy)
20866 ("python-mypy-extensions"
20867 ,python-mypy-extensions)
20868 ("python-trio" ,python-trio)
20869 ("python-typing-extensions"
20870 ,python-typing-extensions)))
20871 (home-page "https://github.com/python-trio/trio-typing")
20872 (synopsis "Static type checking support for Trio and related projects")
20873 (description
20874 "This package provides:
20875
20876 @itemize
20877 @item PEP 561 typing stubs packages for the Trio project packages:
20878
20879 @itemize
20880 @item trio (@code{trio-stubs})
20881 @item outcome (@code{outcome-stubs})
20882 @item async_generator (@code{async_generator-stubs})
20883 @end itemize
20884
20885 @item A package @code{trio_typing} containing types that Trio programs often
20886 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20887 a mypy plugin that smooths over some limitations in the basic type hints.
20888 @end itemize")
20889 ;; Either license applies.
20890 (license (list license:expat license:asl2.0))))
20891
20892 (define-public python-humanize
20893 (package
20894 (name "python-humanize")
20895 (version "0.5.1")
20896 (source
20897 (origin
20898 (method url-fetch)
20899 (uri (pypi-uri "humanize" version))
20900 (sha256
20901 (base32
20902 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20903 (arguments
20904 '(#:tests? #f)) ; tests not in pypi archive
20905 (build-system python-build-system)
20906 (home-page "https://github.com/jmoiron/humanize")
20907 (synopsis "Print numerical information in a human-readable form")
20908 (description "This package provides a Python module that displays numbers
20909 and dates in \"human readable\" forms. For example, it would display
20910 \"12345591313\" as \"12.3 billion\".")
20911 (license license:expat)))
20912
20913 (define-public python-txaio
20914 (package
20915 (name "python-txaio")
20916 (version "18.8.1")
20917 (source
20918 (origin
20919 (method url-fetch)
20920 (uri (pypi-uri "txaio" version))
20921 (sha256
20922 (base32
20923 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20924 (build-system python-build-system)
20925 (propagated-inputs
20926 `(("python-twisted" ,python-twisted)
20927 ("python-six" ,python-six)))
20928 (home-page "https://github.com/crossbario/txaio")
20929 (synopsis "Compatibility layer between Python asyncio and Twisted")
20930 (description "Txaio provides a compatibility layer between the Python
20931 @code{asyncio} module and @code{Twisted}.")
20932 (license license:expat)))
20933
20934 (define-public python-toolshed
20935 (package
20936 (name "python-toolshed")
20937 (version "0.4.6")
20938 (source
20939 (origin
20940 (method url-fetch)
20941 (uri (pypi-uri "toolshed" version))
20942 (sha256
20943 (base32
20944 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20945 (build-system python-build-system)
20946 (native-inputs
20947 `(("python-nose" ,python-nose)))
20948 (home-page "https://github.com/brentp/toolshed/")
20949 (synopsis "Collection of modules and functions for working with data")
20950 (description "This is a collection of well-tested, simple modules and
20951 functions that aim to reduce boilerplate when working with data.")
20952 (license license:bsd-2)))
20953
20954 (define-public python-annoy
20955 (package
20956 (name "python-annoy")
20957 (version "1.15.1")
20958 (source
20959 (origin
20960 (method url-fetch)
20961 (uri (pypi-uri "annoy" version))
20962 (sha256
20963 (base32
20964 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20965 (build-system python-build-system)
20966 (native-inputs
20967 `(("python-nose" ,python-nose)))
20968 (home-page "https://github.com/spotify/annoy/")
20969 (synopsis "Approximate nearest neighbors library")
20970 (description
20971 "Annoy is a C++ library with Python bindings to search for points in
20972 space that are close to a given query point. It also creates large read-only
20973 file-based data structures that are @code{mmap}ped into memory so that many
20974 processes may share the same data.")
20975 (license license:asl2.0)))
20976
20977 (define-public python-croniter
20978 (package
20979 (name "python-croniter")
20980 (version "0.3.34")
20981 (source (origin
20982 (method url-fetch)
20983 (uri (pypi-uri "croniter" version))
20984 (sha256
20985 (base32
20986 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20987 (build-system python-build-system)
20988 (propagated-inputs
20989 `(("python-dateutil" ,python-dateutil)
20990 ("python-natsort" ,python-natsort)))
20991 (home-page "https://github.com/kiorky/croniter")
20992 (synopsis "Iterate datetime objects with cron-like syntax")
20993 (description
20994 "@code{croniter} provides iteration for datetime object with cron-like
20995 format.")
20996 (license license:expat)))
20997
20998 (define-public python-pylzma
20999 (package
21000 (name "python-pylzma")
21001 (version "0.5.0")
21002 (source
21003 (origin
21004 (method url-fetch)
21005 (uri (pypi-uri "pylzma" version))
21006 (sha256
21007 (base32
21008 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
21009 (build-system python-build-system)
21010 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
21011 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
21012 (description "This package provides Python bindings for the LZMA library
21013 by Igor Pavlov.")
21014 (license license:lgpl2.1+)))
21015
21016 (define-public python2-pylzma
21017 (package-with-python2 python-pylzma))
21018
21019 (define-public python-ifaddr
21020 (package
21021 (name "python-ifaddr")
21022 (version "0.1.7")
21023 (source
21024 (origin
21025 (method url-fetch)
21026 (uri (pypi-uri "ifaddr" version))
21027 (sha256
21028 (base32
21029 "150sxdlicwrphmhnv03ykxplyd2jdrxz0mikgnivavgilrn8m7hz"))))
21030 (build-system python-build-system)
21031 (arguments
21032 `(#:phases
21033 (modify-phases %standard-phases
21034 (replace 'check
21035 (lambda _ (invoke "nosetests"))))))
21036 (native-inputs
21037 `(("python-nose" ,python-nose)))
21038 (home-page "https://github.com/pydron/ifaddr")
21039 (synopsis "Network interface and IP address enumeration library")
21040 (description "This package provides a network interface and IP address
21041 enumeration library in Python.")
21042 (license license:expat)))
21043
21044 (define-public python-zeroconf
21045 (package
21046 (name "python-zeroconf")
21047 (version "0.28.8")
21048 (source
21049 (origin
21050 (method url-fetch)
21051 (uri (pypi-uri "zeroconf" version))
21052 (sha256
21053 (base32
21054 "0narq8haa3b375vfblbyil77n8bw0wxqnanl91pl0wwwm884mqjb"))))
21055 (build-system python-build-system)
21056 (native-inputs
21057 `(("python-nose" ,python-nose)))
21058 (propagated-inputs
21059 `(("python-ifaddr" ,python-ifaddr)))
21060 (arguments
21061 `(#:phases
21062 (modify-phases %standard-phases
21063 (replace 'check
21064 (lambda _ ;; Networking isn't available for these tests.
21065 (invoke "nosetests" "-v"
21066 "--exclude" "test_integration_with_listener_ipv6"
21067 "--exclude" "test_launch_and_close_v6_only"
21068 "--exclude" "test_launch_and_close_v4_v6"
21069 "--exclude" "test_launch_and_close"))))))
21070 (home-page "https://github.com/jstasiak/python-zeroconf")
21071 (synopsis "Pure Python mDNS service discovery")
21072 (description
21073 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
21074 compatible).")
21075 (license license:lgpl2.1+)))
21076
21077 (define-public python2-zeroconf
21078 (package
21079 (name "python2-zeroconf")
21080
21081 ;; This is the last version that supports Python 2.x.
21082 (version "0.19.1")
21083 (source
21084 (origin
21085 (method url-fetch)
21086 (uri (pypi-uri "zeroconf" version))
21087 (sha256
21088 (base32
21089 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
21090 (build-system python-build-system)
21091 (arguments
21092 `(#:python ,python-2
21093 #:phases
21094 (modify-phases %standard-phases
21095 (add-after 'unpack 'patch-requires
21096 (lambda* (#:key inputs #:allow-other-keys)
21097 (substitute* "setup.py"
21098 (("enum-compat")
21099 "enum34"))
21100 #t)))))
21101 (native-inputs
21102 `(("python2-six" ,python2-six)
21103 ("python2-enum32" ,python2-enum34)
21104 ("python2-netifaces" ,python2-netifaces)
21105 ("python2-typing" ,python2-typing)))
21106 (home-page "https://github.com/jstasiak/python-zeroconf")
21107 (synopsis "Pure Python mDNS service discovery")
21108 (description
21109 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
21110 compatible).")
21111 (license license:lgpl2.1+)))
21112
21113 (define-public python-bsddb3
21114 (package
21115 (name "python-bsddb3")
21116 (version "6.2.6")
21117 (source
21118 (origin
21119 (method url-fetch)
21120 (uri (pypi-uri "bsddb3" version))
21121 (sha256
21122 (base32
21123 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
21124 (build-system python-build-system)
21125 (inputs
21126 `(("bdb" ,bdb)))
21127 (arguments
21128 '(#:phases
21129 (modify-phases %standard-phases
21130 (add-after 'unpack 'configure-locations
21131 (lambda* (#:key inputs #:allow-other-keys)
21132 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
21133 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
21134 #t))
21135 (replace 'check
21136 (lambda _
21137 (invoke "python3" "test3.py" "-v"))))))
21138 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
21139 (synopsis "Python bindings for Oracle Berkeley DB")
21140 (description
21141 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
21142 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
21143 Transaction objects, and each of these is exposed as a Python type in the
21144 bsddb3.db module. The database objects can use various access methods: btree,
21145 hash, recno, and queue. Complete support of Berkeley DB distributed
21146 transactions. Complete support for Berkeley DB Replication Manager.
21147 Complete support for Berkeley DB Base Replication. Support for RPC.")
21148 (license license:bsd-3)))
21149
21150 (define-public python-dbfread
21151 (package
21152 (name "python-dbfread")
21153 (version "2.0.7")
21154 (source (origin
21155 (method url-fetch)
21156 (uri (pypi-uri "dbfread" version))
21157 (sha256
21158 (base32
21159 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
21160 (build-system python-build-system)
21161 (native-inputs
21162 `(("python-pytest" ,python-pytest)))
21163 (home-page "https://dbfread.readthedocs.io")
21164 (synopsis "Read DBF Files with Python")
21165 (description
21166 "This library reads DBF files and returns the data as native Python data
21167 types for further processing. It is primarily intended for batch jobs and
21168 one-off scripts.")
21169 (license license:expat)))
21170
21171 (define-public python-cached-property
21172 (package
21173 (name "python-cached-property")
21174 (version "1.5.1")
21175 (source
21176 (origin
21177 (method url-fetch)
21178 (uri (pypi-uri "cached-property" version))
21179 (sha256
21180 (base32
21181 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
21182 (build-system python-build-system)
21183 (arguments
21184 `(#:phases
21185 (modify-phases %standard-phases
21186 ;; https://github.com/pydanny/cached-property/issues/131
21187 ;; recent versions of freezegun break one test
21188 (add-after 'unpack 'disable-broken-test
21189 (lambda _
21190 (substitute* "tests/test_cached_property.py"
21191 (("def test_threads_ttl_expiry\\(self\\)" m)
21192 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
21193 " " m)))
21194 #t)))))
21195 (native-inputs
21196 `(("python-freezegun" ,python-freezegun)))
21197 (home-page
21198 "https://github.com/pydanny/cached-property")
21199 (synopsis
21200 "Decorator for caching properties in classes")
21201 (description
21202 "This package provides a decorator which makes caching
21203 time-or-computationally-expensive properties quick and easy and works in Python
21204 2 or 3.")
21205 (license license:bsd-3)))
21206
21207 (define-public python-folium
21208 (package
21209 (name "python-folium")
21210 (version "0.12.1")
21211 (source
21212 (origin
21213 ;; PyPI has a ".whl" file but not a proper source release.
21214 ;; Thus, fetch code from Git.
21215 (method git-fetch)
21216 (uri (git-reference
21217 (url "https://github.com/python-visualization/folium")
21218 (commit (string-append "v" version))))
21219 (file-name (git-file-name name version))
21220 (sha256
21221 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
21222 (build-system python-build-system)
21223 (propagated-inputs
21224 `(("python-branca" ,python-branca)
21225 ("python-jinja2" ,python-jinja2)
21226 ("python-numpy" ,python-numpy)
21227 ("python-requests" ,python-requests)))
21228 (native-inputs
21229 `(("python-pytest" ,python-pytest)))
21230 (home-page "https://github.com/python-visualization/folium")
21231 (synopsis "Make beautiful maps with Leaflet.js & Python")
21232 (description "@code{folium} makes it easy to visualize data that’s been
21233 manipulated in Python on an interactive leaflet map. It enables both the
21234 binding of data to a map for @code{choropleth} visualizations as well as
21235 passing rich vector/raster/HTML visualizations as markers on the map.
21236
21237 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
21238 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
21239 supports Image, Video, GeoJSON and TopoJSON overlays.")
21240 (license license:expat)))
21241
21242 (define-public jube
21243 (package
21244 ;; This is a command-line tool, so no "python-" prefix.
21245 (name "jube")
21246 (version "2.2.2")
21247 (source (origin
21248 (method url-fetch)
21249 (uri (string-append
21250 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
21251 version))
21252 (sha256
21253 (base32
21254 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
21255 (file-name (string-append "jube-" version ".tar.gz"))))
21256 (build-system python-build-system)
21257 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
21258 (synopsis "Benchmarking environment")
21259 (description
21260 "JUBE helps perform and analyze benchmarks in a systematic way. For each
21261 benchmarked application, benchmark data is stored in a format that allows JUBE
21262 to deduct the desired information. This data can be parsed by automatic pre-
21263 and post-processing scripts that draw information and store it more densely
21264 for manual interpretation.")
21265 (license license:gpl3+)))
21266
21267 (define-public python-pyroutelib3
21268 (package
21269 (name "python-pyroutelib3")
21270 (version "1.3.post1")
21271 (source
21272 (origin
21273 (method url-fetch)
21274 (uri (pypi-uri "pyroutelib3" version))
21275 (sha256
21276 (base32
21277 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
21278 (build-system python-build-system)
21279 (propagated-inputs
21280 `(("python-dateutil" ,python-dateutil)))
21281 (home-page "https://github.com/MKuranowski/pyroutelib3")
21282 (synopsis "Library for simple routing on OSM data")
21283 (description "Library for simple routing on OSM data")
21284 (license license:gpl3+)))
21285
21286 (define-public python-bibtexparser
21287 (package
21288 (name "python-bibtexparser")
21289 (version "1.1.0")
21290 (source
21291 (origin
21292 (method url-fetch)
21293 (uri (pypi-uri "bibtexparser" version))
21294 (sha256
21295 (base32
21296 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
21297 (build-system python-build-system)
21298 (propagated-inputs
21299 `(("python-pyparsing" ,python-pyparsing)))
21300 (native-inputs
21301 `(("python-future" ,python-future)))
21302 (home-page "https://github.com/sciunto-org/python-bibtexparser")
21303 (synopsis "Python library to parse BibTeX files")
21304 (description "BibtexParser is a Python library to parse BibTeX files.")
21305 (license (list license:bsd-3 license:lgpl3))))
21306
21307 (define-public python-distro
21308 (package
21309 (name "python-distro")
21310 (version "1.4.0")
21311 (source
21312 (origin
21313 (method url-fetch)
21314 (uri (pypi-uri "distro" version))
21315 (sha256
21316 (base32
21317 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
21318 (build-system python-build-system)
21319 (native-inputs
21320 `(("python-pytest" ,python-pytest)))
21321 (home-page "https://github.com/nir0s/distro")
21322 (synopsis
21323 "OS platform information API")
21324 (description
21325 "@code{distro} provides information about the OS distribution it runs on,
21326 such as a reliable machine-readable ID, or version information.
21327
21328 It is the recommended replacement for Python's original
21329 `platform.linux_distribution` function (which will be removed in Python 3.8).
21330 @code{distro} also provides a command-line interface to output the platform
21331 information in various formats.")
21332 (license license:asl2.0)))
21333
21334 (define-public python-cairosvg
21335 (package
21336 (name "python-cairosvg")
21337 (version "2.5.0")
21338 (source
21339 (origin
21340 (method url-fetch)
21341 (uri (pypi-uri "CairoSVG" version))
21342 (sha256
21343 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
21344 (build-system python-build-system)
21345 (arguments
21346 `(#:phases
21347 (modify-phases %standard-phases
21348 (replace 'check
21349 (lambda _ (invoke "pytest"))))))
21350 (propagated-inputs
21351 `(("python-cairocffi" ,python-cairocffi)
21352 ("python-cssselect2" ,python-cssselect2)
21353 ("python-defusedxml" ,python-defusedxml)
21354 ("python-pillow" ,python-pillow)
21355 ("python-tinycss2" ,python-tinycss2)))
21356 (native-inputs
21357 `(("python-pytest-flake8" ,python-pytest-flake8)
21358 ("python-pytest-isort" ,python-pytest-isort)
21359 ("python-pytest-runner" ,python-pytest-runner)))
21360 (home-page "https://cairosvg.org/")
21361 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
21362 (description "CairoSVG is a SVG converter based on Cairo. It can export
21363 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
21364 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
21365 parsed, the result is drawn to a Cairo surface that can be exported to
21366 qvarious formats: PDF, PostScript, PNG and even SVG.")
21367 (license license:lgpl3+)))
21368
21369 (define-public python-pyphen
21370 (package
21371 (name "python-pyphen")
21372 (version "0.10.0")
21373 (source
21374 (origin
21375 (method url-fetch)
21376 (uri (pypi-uri "Pyphen" version))
21377 (sha256
21378 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
21379 (build-system python-build-system)
21380 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
21381 ;; embedded set provided by upstream - like Debian does.
21382 (home-page "https://github.com/Kozea/Pyphen")
21383 (synopsis "Pure Python module to hyphenate text")
21384 (description "Pyphen is a pure Python module to hyphenate text using
21385 existing Hunspell hyphenation dictionaries.")
21386 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
21387
21388 (define-public python-intelhex
21389 (package
21390 (name "python-intelhex")
21391 (version "2.2.1")
21392 (source
21393 (origin
21394 (method url-fetch)
21395 (uri (pypi-uri "intelhex" version))
21396 (sha256
21397 (base32
21398 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
21399 (build-system python-build-system)
21400 (arguments '(#:tests? #f)) ;issue with version
21401 (home-page "https://pypi.org/project/IntelHex/")
21402 (synopsis "Python library for Intel HEX files manipulations")
21403 (description "The Intel HEX file format is widely used in microprocessors
21404 and microcontrollers area (embedded systems etc.) as the de facto standard for
21405 representation of code to be programmed into microelectronic devices. This
21406 package provides an intelhex Python library to read, write, create from
21407 scratch and manipulate data from Intel HEX file format. It also includes
21408 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
21409 converters and more, those based on the library itself.")
21410 (license license:bsd-3)))
21411
21412 (define-public python-pykwalify
21413 (package
21414 (name "python-pykwalify")
21415 (version "1.7.0")
21416 (source
21417 (origin
21418 (method url-fetch)
21419 (uri (pypi-uri "pykwalify" version))
21420 (sha256
21421 (base32
21422 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
21423 (build-system python-build-system)
21424 (arguments '(#:tests? #f)) ;missing dependencies
21425 (propagated-inputs
21426 `(("python-dateutil" ,python-dateutil)
21427 ("python-docopt" ,python-docopt)
21428 ("python-pyyaml" ,python-pyyaml)))
21429 (home-page "https://github.com/grokzen/pykwalify")
21430 (synopsis
21431 "Python lib/cli for JSON/YAML schema validation")
21432 (description
21433 "This package provides a parser, schema validator, and data binding tool
21434 for YAML and JSON.")
21435 (license license:expat)))
21436
21437 (define-public python-dbusmock
21438 (package
21439 (name "python-dbusmock")
21440 (version "0.18.3")
21441 (source
21442 (origin
21443 (method url-fetch)
21444 (uri (pypi-uri "python-dbusmock" version))
21445 (sha256
21446 (base32
21447 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
21448 (build-system python-build-system)
21449 (arguments
21450 '(#:phases
21451 (modify-phases %standard-phases
21452 (add-after 'unpack 'patch-shell-path
21453 (lambda _
21454 (substitute* "tests/test_code.py"
21455 (("/bin/bash") (which "bash")))
21456 #t)))))
21457 (native-inputs
21458 `(;; For tests.
21459 ("dbus" ,dbus) ; for dbus-daemon
21460 ("python-nose" ,python-nose)
21461 ("which" ,which)))
21462 (propagated-inputs
21463 `(("python-dbus" ,python-dbus)
21464 ("python-pygobject" ,python-pygobject)))
21465 (home-page "https://github.com/martinpitt/python-dbusmock")
21466 (synopsis "Python library for mock D-Bus objects")
21467 (description "python-dbusmock allows for the easy creation of mock objects on
21468 D-Bus. This is useful for writing tests for software which talks to D-Bus
21469 services such as upower, systemd, logind, gnome-session or others, and it is
21470 hard (or impossible without root privileges) to set the state of the real
21471 services to what you expect in your tests.")
21472 (license license:lgpl3+)))
21473
21474 (define-public python-jsonplus
21475 (package
21476 (name "python-jsonplus")
21477 (version "0.8.0")
21478 (home-page "https://github.com/randomir/jsonplus")
21479 (source (origin
21480 (method url-fetch)
21481 (uri (pypi-uri "jsonplus" version))
21482 (sha256
21483 (base32
21484 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
21485 (build-system python-build-system)
21486 ;; XXX: No tests on PyPI, and the repository has no tags.
21487 (arguments '(#:tests? #f))
21488 (propagated-inputs
21489 `(("python-dateutil" ,python-dateutil)
21490 ("python-simplejson" ,python-simplejson)
21491 ("python-sortedcontainers" ,python-sortedcontainers)))
21492 (synopsis "Serialize Python types to/from JSON")
21493 (description
21494 "This package provides functionality to serialize arbitrary data types
21495 to and from JSON. Common data types are implemented and it is easy to
21496 register custom encoders and decoders.")
21497 (license license:expat)))
21498
21499 (define-public python-ujson
21500 (package
21501 (name "python-ujson")
21502 (version "4.0.2")
21503 (source
21504 (origin
21505 (method url-fetch)
21506 (uri (pypi-uri "ujson" version))
21507 (sha256
21508 (base32
21509 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
21510 (modules '((guix build utils)))
21511 (snippet
21512 '(begin (delete-file-recursively "deps") #t))))
21513 (build-system python-build-system)
21514 (arguments
21515 `(#:phases
21516 (modify-phases %standard-phases
21517 (add-after 'unpack 'link-to-system-double-conversion
21518 (lambda* (#:key inputs #:allow-other-keys)
21519 (let ((d-c (assoc-ref inputs "double-conversion")))
21520 (substitute* "setup.py"
21521 (("./deps/double-conversion/double-conversion\"")
21522 (string-append d-c "/include/double-conversion\""))
21523 (("-lstdc++" stdc)
21524 (string-append "-L" d-c "/lib\","
21525 " \"-ldouble-conversion\","
21526 " \"" stdc)))
21527 #t)))
21528 (replace 'check
21529 (lambda* (#:key inputs outputs #:allow-other-keys)
21530 (add-installed-pythonpath inputs outputs)
21531 (invoke "pytest"))))))
21532 (native-inputs
21533 `(("double-conversion" ,double-conversion)
21534 ("python-setuptools-scm" ,python-setuptools-scm)
21535 ("python-pytest" ,python-pytest)))
21536 (home-page "https://github.com/ultrajson/ultrajson")
21537 (synopsis "Ultra fast JSON encoder and decoder for Python")
21538 (description
21539 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
21540 bindings for Python 3.")
21541 (license license:bsd-3)))
21542
21543 (define-public python-iocapture
21544 ;; The latest release is more than a year older than this commit.
21545 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
21546 (revision "1"))
21547 (package
21548 (name "python-iocapture")
21549 (version "0.1.2")
21550 (source
21551 (origin
21552 (method git-fetch)
21553 (uri (git-reference
21554 (url "https://github.com/oinume/iocapture")
21555 (commit commit)))
21556 (file-name (git-file-name name version))
21557 (sha256
21558 (base32
21559 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
21560 (build-system python-build-system)
21561 (arguments
21562 `(#:phases
21563 (modify-phases %standard-phases
21564 (delete 'check)
21565 (add-after 'install 'check
21566 (lambda* (#:key inputs outputs #:allow-other-keys)
21567 (add-installed-pythonpath inputs outputs)
21568 (invoke "py.test" "-v" "tests")
21569 #t)))))
21570 (propagated-inputs
21571 `(("python-flexmock" ,python-flexmock)
21572 ("python-pytest" ,python-pytest)
21573 ("python-pytest-cov" ,python-pytest-cov)
21574 ("python-six" ,python-six)))
21575 (home-page "https://github.com/oinume/iocapture")
21576 (synopsis "Python capturing tool for stdout and stderr")
21577 (description
21578 "This package helps you to capture the standard out (stdout) and the
21579 standard error channel (stderr) in your program.")
21580 (license license:expat))))
21581
21582 (define-public python-argh
21583 ;; There are 21 commits since the latest release containing important
21584 ;; improvements.
21585 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
21586 (revision "1"))
21587 (package
21588 (name "python-argh")
21589 (version (git-version "0.26.2" revision commit))
21590 (source
21591 (origin
21592 (method git-fetch)
21593 (uri (git-reference
21594 (url "https://github.com/neithere/argh")
21595 (commit commit)))
21596 (file-name (git-file-name name version))
21597 (sha256
21598 (base32
21599 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
21600 (build-system python-build-system)
21601 (propagated-inputs
21602 `(("python-iocapture" ,python-iocapture)
21603 ("python-mock" ,python-mock)
21604 ("python-pytest" ,python-pytest)
21605 ("python-pytest-cov" ,python-pytest-cov)
21606 ("python-pytest-xdist" ,python-pytest-xdist)
21607 ("python-tox" ,python-tox)))
21608 (home-page "https://github.com/neithere/argh/")
21609 (synopsis "Argparse wrapper with natural syntax")
21610 (description
21611 "python-argh is a small library that provides several layers of
21612 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
21613 always possible to declare a command with the highest possible (and least
21614 flexible) layer and then tune the behaviour with any of the lower layers
21615 including the native API of @code{python-argparse}.")
21616 (license license:lgpl3+))))
21617
21618 (define-public python-ppft
21619 (package
21620 (name "python-ppft")
21621 (version "1.6.6.1")
21622 (source
21623 (origin
21624 (method url-fetch)
21625 (uri (pypi-uri "ppft" version))
21626 (sha256
21627 (base32
21628 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
21629 (build-system python-build-system)
21630 (arguments '(#:tests? #f)) ; there are none
21631 (propagated-inputs
21632 `(("python-six" ,python-six)))
21633 (home-page "https://pypi.org/project/ppft/")
21634 (synopsis "Fork of Parallel Python")
21635 (description
21636 "This package is a fork of Parallel Python. The Parallel Python
21637 module (@code{pp}) provides an easy and efficient way to create
21638 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
21639 computers and clusters. It features cross-platform portability and dynamic
21640 load balancing.")
21641 (license license:bsd-3)))
21642
21643 (define-public python-pox
21644 (package
21645 (name "python-pox")
21646 (version "0.2.7")
21647 (source
21648 (origin
21649 (method url-fetch)
21650 (uri (pypi-uri "pox" version))
21651 (sha256
21652 (base32
21653 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
21654 (build-system python-build-system)
21655 (arguments
21656 `(#:phases
21657 (modify-phases %standard-phases
21658 (replace 'check
21659 (lambda _
21660 (mkdir-p "/tmp/guix")
21661 (setenv "SHELL" "bash")
21662 (setenv "USERNAME" "guix")
21663 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
21664 (invoke "py.test" "-vv")
21665 #t)))))
21666 (native-inputs
21667 `(("python-pytest" ,python-pytest)
21668 ("which" ,which)))
21669 (home-page "https://pypi.org/project/pox/")
21670 (synopsis "Python utilities for file system exploration and automated builds")
21671 (description
21672 "Pox provides a collection of utilities for navigating and manipulating
21673 file systems. This module is designed to facilitate some of the low-level
21674 operating system interactions that are useful when exploring a file system on a
21675 remote host. Pox provides Python equivalents of several shell commands such
21676 as @command{which} and @command{find}. These commands allow automated
21677 discovery of what has been installed on an operating system, and where the
21678 essential tools are located.")
21679 (license license:bsd-3)))
21680
21681 (define-public python-pathos
21682 (package
21683 (name "python-pathos")
21684 (version "0.2.5")
21685 (source
21686 (origin
21687 (method url-fetch)
21688 (uri (pypi-uri "pathos" version))
21689 (sha256
21690 (base32
21691 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
21692 (build-system python-build-system)
21693 (arguments
21694 '(#:phases
21695 (modify-phases %standard-phases
21696 (replace 'check
21697 (lambda _
21698 (setenv "PYTHONPATH"
21699 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
21700 (invoke "python" "./tests/__main__.py"))))))
21701 (propagated-inputs
21702 `(("python-dill" ,python-dill)
21703 ("python-multiprocess" ,python-multiprocess)
21704 ("python-pox" ,python-pox)
21705 ("python-ppft" ,python-ppft)))
21706 (native-inputs
21707 `(("python-pytest" ,python-pytest)))
21708 (home-page "https://pypi.org/project/pathos/")
21709 (synopsis
21710 "Parallel graph management and execution in heterogeneous computing")
21711 (description
21712 "Python-pathos is a framework for heterogeneous computing. It provides a
21713 consistent high-level interface for configuring and launching parallel
21714 computations across heterogeneous resources. Python-pathos provides configurable
21715 launchers for parallel and distributed computing, where each launcher contains
21716 the syntactic logic to configure and launch jobs in an execution environment.")
21717 (license license:bsd-3)))
21718
21719 (define-public python-flit
21720 (package
21721 (name "python-flit")
21722 (version "3.0.0")
21723 (source
21724 (origin
21725 (method url-fetch)
21726 (uri (pypi-uri "flit" version))
21727 (sha256
21728 (base32
21729 "14q8qa48bli2mniznc8b54qkwvhbik4kw99y01fi5gzzl620zzml"))))
21730 (build-system python-build-system)
21731 (arguments
21732 `(#:tests? #f)) ; XXX: Check requires network access.
21733 (home-page "https://flit.readthedocs.io/")
21734 (synopsis
21735 "Simple packaging tool for simple packages")
21736 (description
21737 "Flit is a simple way to put Python packages and modules on PyPI. Flit
21738 packages a single importable module or package at a time, using the import
21739 name as the name on PyPI. All subpackages and data files within a package
21740 are included automatically.")
21741 (license license:bsd-3)))
21742
21743 (define-public python-pathtools
21744 (package
21745 (name "python-pathtools")
21746 (version "0.1.2")
21747 (source
21748 (origin
21749 (method url-fetch)
21750 (uri (pypi-uri "pathtools" version))
21751 (sha256
21752 (base32
21753 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
21754 (build-system python-build-system)
21755 (home-page
21756 "https://github.com/gorakhargosh/pathtools")
21757 (synopsis "Path utilities for Python")
21758 (description "Pattern matching and various utilities for file systems
21759 paths.")
21760 (license license:expat)))
21761
21762 (define-public python-fastentrypoints
21763 (package
21764 (name "python-fastentrypoints")
21765 (version "0.12")
21766 (source
21767 (origin
21768 (method url-fetch)
21769 (uri (pypi-uri "fastentrypoints" version))
21770 (sha256
21771 (base32
21772 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
21773 (build-system python-build-system)
21774 (home-page
21775 "https://github.com/ninjaaron/fast-entry_points")
21776 (synopsis
21777 "Makes entry_points specified in setup.py load more quickly")
21778 (description
21779 "Using entry_points in your setup.py makes scripts that start really
21780 slowly because it imports pkg_resources. This package allows such setup
21781 scripts to load entry points more quickly.")
21782 (license license:bsd-3)))
21783
21784 (define-public python-funcparserlib
21785 (package
21786 (name "python-funcparserlib")
21787 (version "0.3.6")
21788 (source
21789 (origin
21790 (method url-fetch)
21791 (uri (pypi-uri "funcparserlib" version))
21792 (sha256
21793 (base32
21794 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
21795 (native-inputs
21796 `(("python-tox" ,python-tox)))
21797 (arguments
21798 `(#:phases
21799 (modify-phases %standard-phases
21800 (replace 'check
21801 (lambda _
21802 (invoke "tox"))))))
21803 (build-system python-build-system)
21804 (home-page
21805 "https://github.com/vlasovskikh/funcparserlib")
21806 (synopsis
21807 "Recursive descent parsing library based on functional combinators")
21808 (description
21809 "This package is a recursive descent parsing library for Python based on
21810 functional combinators. Parser combinators are just higher-order functions
21811 that take parsers as their arguments and return them as result values.")
21812 (license license:expat)))
21813
21814 (define-public python-speg
21815 (package
21816 (name "python-speg")
21817 (version "0.3")
21818 (source
21819 (origin
21820 (method url-fetch)
21821 (uri (pypi-uri "speg" version ".zip"))
21822 (sha256
21823 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
21824 (arguments
21825 `(#:tests? #f)) ;FIXME: tests fail, not sure why
21826 (native-inputs
21827 `(("unzip" ,unzip)))
21828 (build-system python-build-system)
21829 (home-page "https://github.com/avakar/speg")
21830 (synopsis "PEG-based parser interpreter with memoization")
21831 (description "This package is a PEG-based parser and interpreter with
21832 memoization.")
21833 (license license:expat)))
21834
21835 (define-public python-cson
21836 (package
21837 (name "python-cson")
21838 (version "0.8")
21839 (source
21840 (origin
21841 (method url-fetch)
21842 (uri (pypi-uri "cson" version))
21843 (sha256
21844 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
21845 (build-system python-build-system)
21846 (propagated-inputs
21847 `(("python-speg" ,python-speg)))
21848 (home-page "https://github.com/avakar/pycson")
21849 (synopsis "Parser for Coffeescript Object Notation (CSON)")
21850 (description "This package is a parser for Coffeescript Object
21851 Notation (CSON).")
21852 (license license:expat)))
21853
21854 (define-public python-asynctest
21855 (package
21856 (name "python-asynctest")
21857 (version "0.13.0")
21858 (source
21859 (origin
21860 (method url-fetch)
21861 (uri (pypi-uri "asynctest" version))
21862 (sha256
21863 (base32
21864 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
21865 (build-system python-build-system)
21866 (arguments
21867 '(#:phases
21868 (modify-phases %standard-phases
21869 (replace 'check
21870 (lambda _
21871 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
21872 (add-after 'unpack 'disable-tests
21873 (lambda* _
21874 ;; XXX: 7 tests fail out of 220. Disable them for now.
21875 (substitute* (list "test/test_selector.py"
21876 "test/test_mock.py")
21877 (("def test_events_watched_outside_test_are_ignored")
21878 "@unittest.skip('disabled by guix')
21879 def test_events_watched_outside_test_are_ignored")
21880 (("def test_awaited_from_autospec_mock.*" line)
21881 (string-append line " return True\n"))
21882 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
21883 (string-append line " return True\n"))
21884 (("def test_patch_coroutine_with_multiple_scopes.*" line)
21885 (string-append line " return True\n"))
21886 (("def test_multiple_patches_on_coroutine.*" line)
21887 (string-append line " return True\n"))
21888 (("def test_patch_coroutine_only_when_running.*" line)
21889 (string-append line " return True\n")))
21890 #t)))))
21891 (home-page "https://github.com/Martiusweb/asynctest")
21892 (synopsis "Extension of unittest for testing asyncio libraries")
21893 (description
21894 "The package asynctest is built on top of the standard unittest module
21895 and cuts down boilerplate code when testing libraries for asyncio.")
21896 (license license:asl2.0)))
21897
21898 (define-public python-aionotify
21899 (package
21900 (name "python-aionotify")
21901 (version "0.2.0")
21902 (source
21903 (origin
21904 ;; Source tarball on PyPi lacks tests
21905 (method git-fetch)
21906 (uri (git-reference
21907 (url "https://github.com/rbarrois/aionotify")
21908 (commit (string-append "v" version))))
21909 (file-name (git-file-name name version))
21910 (sha256
21911 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
21912 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
21913 (build-system python-build-system)
21914 (home-page "https://github.com/rbarrois/aionotify")
21915 (synopsis "Asyncio-powered inotify library")
21916 (description
21917 "@code{aionotify} is a simple, asyncio-based inotify library.")
21918 (license license:bsd-3)))
21919
21920 (define-public python-forbiddenfruit
21921 (package
21922 (name "python-forbiddenfruit")
21923 (version "0.1.3")
21924 (source
21925 (origin
21926 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21927 (method git-fetch)
21928 (uri (git-reference
21929 (url "https://github.com/clarete/forbiddenfruit")
21930 (commit version)))
21931 (file-name (git-file-name name version))
21932 (sha256
21933 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21934 (build-system python-build-system)
21935 (arguments
21936 '(#:phases
21937 (modify-phases %standard-phases
21938 (replace 'check
21939 (lambda _
21940 (invoke "make" "SKIP_DEPS=1"))))))
21941 (native-inputs
21942 `(("python-nose" ,python-nose)
21943 ("python-coverage" ,python-coverage)))
21944 (home-page "https://github.com/clarete/forbiddenfruit")
21945 (synopsis "Patch python built-in objects")
21946 (description "This project allows Python code to extend built-in types.")
21947 (license (list license:gpl3+ license:expat))))
21948
21949 (define-public python-k5test
21950 (package
21951 (name "python-k5test")
21952 (version "0.9.2")
21953 (source
21954 (origin
21955 (method url-fetch)
21956 (uri (pypi-uri "k5test" version))
21957 (sha256
21958 (base32
21959 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21960 (build-system python-build-system)
21961 (propagated-inputs
21962 `(("python-six" ,python-six)
21963 ;; `which`, `kadmin.local` binaries called inside library
21964 ("which" ,which)
21965 ("mit-krb5" ,mit-krb5)))
21966 (native-inputs `(("mit-krb5" ,mit-krb5)))
21967 (arguments
21968 '(#:phases
21969 (modify-phases %standard-phases
21970 (add-after 'unpack 'patch-paths
21971 (lambda* _
21972 (substitute* "k5test/realm.py"
21973 (("'kadmin_local'") "'kadmin.local'")))))))
21974 (home-page "https://github.com/pythongssapi/k5test")
21975 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21976 (description
21977 "@code{k5test} is a library for setting up self-contained Kerberos 5
21978 environments, and running Python unit tests inside those environments. It is
21979 based on the file of the same name found alongside the MIT Kerberos 5 unit
21980 tests.")
21981 (license license:isc)))
21982
21983 (define-public python-gssapi
21984 (package
21985 (name "python-gssapi")
21986 (version "1.6.12")
21987 (source
21988 (origin
21989 (method url-fetch)
21990 (uri (pypi-uri "gssapi" version))
21991 (sha256
21992 (base32
21993 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
21994 (build-system python-build-system)
21995 (propagated-inputs
21996 `(("python-decorator" ,python-decorator)
21997 ("python-six" ,python-six)))
21998 (inputs
21999 `(("mit-krb5" ,mit-krb5)))
22000 ;; for tests
22001 (native-inputs
22002 `(("python-parameterized" ,python-parameterized)
22003 ("python-k5test" ,python-k5test)
22004 ("python-nose" ,python-nose)))
22005 (home-page "https://github.com/pythongssapi/python-gssapi")
22006 (synopsis "Python GSSAPI Wrapper")
22007 (description
22008 "Python-GSSAPI provides both low-level and high level wrappers around the
22009 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
22010 also be usable with other GSSAPI mechanisms.")
22011 (license license:isc)))
22012
22013 (define-public python-check-manifest
22014 (package
22015 (name "python-check-manifest")
22016 (version "0.37")
22017 (source
22018 (origin
22019 (method url-fetch)
22020 (uri (pypi-uri "check-manifest" version))
22021 (sha256
22022 (base32
22023 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
22024 (build-system python-build-system)
22025 (native-inputs
22026 `(("python-mock" ,python-mock)
22027 ("git" ,git)))
22028 (home-page "https://github.com/mgedmin/check-manifest")
22029 (synopsis "Check MANIFEST.in in a Python source package for completeness")
22030 (description "Python package can include a MANIFEST.in file to help with
22031 sending package files to the Python Package Index. This package checks that
22032 file to ensure it completely and accurately describes your project.")
22033 (license license:expat)))
22034
22035 (define-public python-android-stringslib
22036 (package
22037 (name "python-android-stringslib")
22038 (version "0.1.2")
22039 (source
22040 (origin
22041 (method git-fetch)
22042 (uri (git-reference
22043 (url "https://framagit.org/tyreunom/python-android-strings-lib")
22044 (commit (string-append "v" version))))
22045 (file-name (git-file-name name version))
22046 (sha256
22047 (base32
22048 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
22049 (build-system python-build-system)
22050 (arguments
22051 `(#:tests? #f))
22052 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
22053 (synopsis "Android strings.xml support")
22054 (description "Android Strings Lib provides support for android's strings.xml
22055 files. These files are used to translate strings in android apps.")
22056 (license license:expat)))
22057
22058 (define-public python-watchdog
22059 (package
22060 (name "python-watchdog")
22061 (version "0.9.0")
22062 (source
22063 (origin
22064 (method url-fetch)
22065 (uri (pypi-uri "watchdog" version))
22066 (sha256
22067 (base32
22068 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
22069 (build-system python-build-system)
22070 (arguments
22071 `(#:phases
22072 (modify-phases %standard-phases
22073 (add-before 'check 'remove-failing
22074 (lambda _
22075 (delete-file "tests/test_inotify_buffer.py")
22076 (delete-file "tests/test_snapshot_diff.py")
22077 #t)))))
22078 (propagated-inputs
22079 `(("python-argh" ,python-argh)
22080 ("python-pathtools" ,python-pathtools)
22081 ("python-pyyaml" ,python-pyyaml)))
22082 (native-inputs
22083 `(("python-pytest-cov" ,python-pytest-cov)
22084 ("python-pytest-timeout" ,python-pytest-timeout)))
22085 (home-page "https://github.com/gorakhargosh/watchdog")
22086 (synopsis "File system events monitoring")
22087 (description "This package provides a way to monitor file system events
22088 such as a file modification and trigger an action. This is similar to inotify,
22089 but portable.")
22090 (license license:asl2.0)))
22091
22092 (define-public python-watchgod
22093 (package
22094 (name "python-watchgod")
22095 (version "0.6")
22096 (source
22097 (origin
22098 ;; There are no tests in the PyPI tarball.
22099 (method git-fetch)
22100 (uri (git-reference
22101 (url "https://github.com/samuelcolvin/watchgod")
22102 (commit (string-append "v" version))))
22103 (file-name (git-file-name name version))
22104 (sha256
22105 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
22106 (build-system python-build-system)
22107 (arguments
22108 `(#:phases
22109 (modify-phases %standard-phases
22110 (replace 'check
22111 (lambda _
22112 (invoke "pytest" "-vv"))))))
22113 (native-inputs
22114 `(("python-coverage" ,python-coverage)
22115 ("python-docutils" ,python-docutils)
22116 ("python-flake8" ,python-flake8)
22117 ("python-isort" ,python-isort)
22118 ("python-pycodestyle" ,python-pycodestyle)
22119 ("python-pyflakes" ,python-pyflakes)
22120 ("python-pygments" ,python-pygments)
22121 ("python-pytest" ,python-pytest)
22122 ("python-pytest-cov" ,python-pytest-cov)
22123 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
22124 ("python-pytest-mock" ,python-pytest-mock)
22125 ("python-pytest-sugar" ,python-pytest-sugar)
22126 ("python-pytest-toolbox" ,python-pytest-toolbox)))
22127 (home-page "https://github.com/samuelcolvin/watchgod")
22128 (synopsis "Simple, modern file watching and code reload in Python")
22129 (description
22130 "Simple, modern file watching and code reload in Python inspired by
22131 @code{watchdog}. Among the differences are a unified approach for each
22132 operating systems and an elegant approach to concurrency using threading.")
22133 (license license:expat)))
22134
22135 (define-public python-wget
22136 (package
22137 (name "python-wget")
22138 (version "3.2")
22139 (source
22140 (origin
22141 (method url-fetch)
22142 (uri (pypi-uri "wget" version ".zip"))
22143 (sha256
22144 (base32
22145 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
22146 (build-system python-build-system)
22147 (native-inputs `(("unzip" ,unzip)))
22148 (home-page "https://bitbucket.org/techtonik/python-wget/")
22149 (synopsis "Pure Python download utility")
22150 (description "The python-wget library provides an API to download files
22151 with features similar to the @command{wget} utility.")
22152 (license license:unlicense)))
22153
22154 (define-public offlate
22155 (package
22156 (name "offlate")
22157 (version "0.5")
22158 (source
22159 (origin
22160 (method git-fetch)
22161 (uri (git-reference
22162 (url "https://framagit.org/tyreunom/offlate")
22163 (commit version)))
22164 (file-name (git-file-name name version))
22165 (sha256
22166 (base32
22167 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
22168 (build-system python-build-system)
22169 (arguments
22170 ;; No tests
22171 `(#:tests? #f))
22172 (propagated-inputs
22173 `(("python-android-stringslib" ,python-android-stringslib)
22174 ("python-dateutil" ,python-dateutil)
22175 ("python-gitlab" ,python-gitlab)
22176 ("python-lxml" ,python-lxml)
22177 ("python-polib" ,python-polib)
22178 ("python-pyenchant" ,python-pyenchant)
22179 ("python-pygit2" ,python-pygit2)
22180 ("python-pygithub" ,python-pygithub)
22181 ("python-pyqt" ,python-pyqt)
22182 ("python-requests" ,python-requests)
22183 ("python-ruamel.yaml" ,python-ruamel.yaml)
22184 ("python-translation-finder" ,python-translation-finder)
22185 ("python-watchdog" ,python-watchdog)))
22186 (native-inputs
22187 `(("qttools" ,qttools)))
22188 (home-page "https://framagit.org/tyreunom/offlate")
22189 (synopsis "Offline translation interface for online translation tools")
22190 (description "Offlate offers a unified interface for different translation
22191 file formats, as well as many different online translation platforms. You can
22192 use it to get work from online platforms, specialized such as the Translation
22193 Project, or not such a gitlab instance when your upstream doesn't use any
22194 dedicated platform. The tool proposes a unified interface for any format and
22195 an upload option to send your work back to the platform.")
22196 (license license:gpl3+)))
22197
22198 (define-public python-titlecase
22199 (package
22200 (name "python-titlecase")
22201 (version "0.12.0")
22202 (source
22203 (origin
22204 (method url-fetch)
22205 (uri (pypi-uri "titlecase" version))
22206 (sha256
22207 (base32
22208 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
22209 (build-system python-build-system)
22210 (native-inputs
22211 `(("python-nose" ,python-nose)))
22212 (home-page "https://github.com/ppannuto/python-titlecase")
22213 (synopsis "Capitalize strings similar to book titles")
22214 (description
22215 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
22216 It capitalizes (predominantly English) strings in a way that is similar to
22217 book titles, using the New York Times Manual of Style to leave certain words
22218 lowercase.")
22219 (license license:expat)))
22220
22221 (define-public python-pypng
22222 (package
22223 (name "python-pypng")
22224 (version "0.0.20")
22225 (source
22226 (origin
22227 (method url-fetch)
22228 (uri (pypi-uri "pypng" version))
22229 (sha256
22230 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
22231 (build-system python-build-system)
22232 (home-page "https://github.com/drj11/pypng")
22233 (synopsis "Pure Python PNG image encoder/decoder")
22234 (description
22235 "The PyPNG module implements support for PNG images. It reads and writes
22236 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
22237 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
22238 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
22239 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
22240 A number of optional chunks can be specified (when writing) and
22241 understood (when reading): tRNS, bKGD, gAMA.
22242
22243 PyPNG is not a high level toolkit for image processing (like PIL) and does not
22244 aim at being a replacement or competitor. Its strength lies in fine-grained
22245 extensive support of PNG features. It can also read and write Netpbm PAM
22246 files, with a focus on its use as an intermediate format for implementing
22247 custom PNG processing.")
22248 (license license:expat)))
22249
22250 (define-public python-fuzzywuzzy
22251 (package
22252 (name "python-fuzzywuzzy")
22253 (version "0.18.0")
22254 (source
22255 (origin
22256 (method url-fetch)
22257 (uri (pypi-uri "fuzzywuzzy" version))
22258 (sha256
22259 (base32
22260 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
22261 (build-system python-build-system)
22262 (native-inputs
22263 `(("python-hypothesis" ,python-hypothesis)
22264 ("python-pycodestyle" ,python-pycodestyle)
22265 ("python-pytest" ,python-pytest)))
22266 (propagated-inputs
22267 `(("python-levenshtein" ,python-levenshtein)))
22268 (home-page "https://github.com/seatgeek/fuzzywuzzy")
22269 (synopsis "Fuzzy string matching in Python")
22270 (description "Approximate string matching using
22271 @emph{Levenshtein Distance} to calculate the differences between
22272 sequences.")
22273 (license license:gpl2)))
22274
22275 (define-public python2-fuzzywuzzy
22276 (package-with-python2 python-fuzzywuzzy))
22277
22278 (define-public python-block-tracing
22279 (package
22280 (name "python-block-tracing")
22281 (version "1.0.1")
22282 (source
22283 (origin
22284 (method url-fetch)
22285 (uri (pypi-uri "block_tracing" version))
22286 (sha256
22287 (base32
22288 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
22289 (build-system python-build-system)
22290 (arguments '(#:tests? #f)) ; no tests
22291 (home-page "https://github.com/rianhunter/block_tracing")
22292 (synopsis "Protect process memory")
22293 (description
22294 "@code{block_tracing} is a tiny Python library that can be used to
22295 prevent debuggers and other applications from inspecting the memory within
22296 your process.")
22297 (license license:expat)))
22298
22299 (define-public python-gcovr
22300 (package
22301 (name "python-gcovr")
22302 (version "4.2")
22303 (source
22304 (origin
22305 (method url-fetch)
22306 (uri (pypi-uri "gcovr" version))
22307 (sha256
22308 (base32
22309 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
22310 (build-system python-build-system)
22311 (propagated-inputs
22312 `(("python-lxml" ,python-lxml)
22313 ("python-jinja2" ,python-jinja2)))
22314 (home-page "https://gcovr.com/")
22315 (synopsis "Utility for generating code coverage results")
22316 (description
22317 "Gcovr provides a utility for managing the use of the GNU gcov
22318 utility and generating summarized code coverage results. It is inspired
22319 by the Python coverage.py package, which provides a similar utility for
22320 Python.")
22321 (license license:bsd-3)))
22322
22323 (define-public python-owslib
22324 (package
22325 (name "python-owslib")
22326 (version "0.19.2")
22327 (source
22328 (origin
22329 (method url-fetch)
22330 (uri (pypi-uri "OWSLib" version))
22331 (sha256
22332 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
22333 (build-system python-build-system)
22334 (arguments
22335 '(#:tests? #f)) ; TODO: package dependencies required for tests.
22336 (synopsis "Interface for Open Geospatial Consortium web service")
22337 (description
22338 "OWSLib is a Python package for client programming with Open Geospatial
22339 Consortium (OGC) web service (hence OWS) interface standards, and their related
22340 content models.")
22341 (home-page "https://geopython.github.io/OWSLib/")
22342 (license license:bsd-3)))
22343
22344 (define-public python-docusign-esign
22345 (package
22346 (name "python-docusign-esign")
22347 (version "3.1.0")
22348 (source (origin
22349 (method url-fetch)
22350 (uri (pypi-uri "docusign_esign" version))
22351 (sha256
22352 (base32
22353 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
22354 (build-system python-build-system)
22355 ;; Testing requires undocumented setup changes, and so testing is disabled here.
22356 (arguments `(#:tests? #f))
22357 (propagated-inputs
22358 `(("python-certifi" ,python-certifi)
22359 ("python-six" ,python-six)
22360 ("python-dateutil" ,python-dateutil)
22361 ("python-urllib3" ,python-urllib3)
22362 ("python-pyjwt" ,python-pyjwt)
22363 ("python-cryptography" ,python-cryptography)
22364 ("python-nose" ,python-nose)))
22365 (synopsis "DocuSign Python Client")
22366 (description "The Official DocuSign Python Client Library used to interact
22367 with the eSign REST API. Send, sign, and approve documents using this client.")
22368 (home-page "https://www.docusign.com/devcenter")
22369 (license license:expat)))
22370
22371 (define-public python-xattr
22372 (package
22373 (name "python-xattr")
22374 (version "0.9.7")
22375 (source
22376 (origin
22377 (method url-fetch)
22378 (uri (pypi-uri "xattr" version))
22379 (sha256
22380 (base32
22381 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
22382 (build-system python-build-system)
22383 (propagated-inputs
22384 `(("python-cffi" ,python-cffi)))
22385 (home-page "https://github.com/xattr/xattr")
22386 (synopsis
22387 "Python wrapper for extended file system attributes")
22388 (description "This package provides a Python wrapper for using extended
22389 file system attributes. Extended attributes extend the basic attributes of files
22390 and directories in the file system. They are stored as name:data pairs
22391 associated with file system objects (files, directories, symlinks, etc).")
22392 (license license:expat)))
22393
22394 (define-public python-json-logger
22395 (package
22396 (name "python-json-logger")
22397 (version "0.1.11")
22398 (source
22399 (origin
22400 (method url-fetch)
22401 (uri (pypi-uri "python-json-logger" version))
22402 (sha256
22403 (base32
22404 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
22405 (build-system python-build-system)
22406 (home-page
22407 "https://github.com/madzak/python-json-logger")
22408 (synopsis "JSON log formatter in Python")
22409 (description "This library allows standard Python logging to output log data
22410 as JSON objects. With JSON we can make our logs more readable by machines and
22411 we can stop writing custom parsers for syslog-type records.")
22412 (license license:bsd-3)))
22413
22414 (define-public python-daiquiri
22415 (package
22416 (name "python-daiquiri")
22417 (version "2.1.1")
22418 (source
22419 (origin
22420 (method url-fetch)
22421 (uri (pypi-uri "daiquiri" version))
22422 (sha256
22423 (base32
22424 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
22425 (build-system python-build-system)
22426 (propagated-inputs
22427 `(("python-json-logger" ,python-json-logger)))
22428 (native-inputs
22429 `(("python-mock" ,python-mock)
22430 ("python-pytest" ,python-pytest)
22431 ("python-setuptools-scm" ,python-setuptools-scm)
22432 ("python-six" ,python-six)))
22433 (home-page "https://github.com/jd/daiquiri")
22434 (synopsis
22435 "Library to configure Python logging easily")
22436 (description "The daiquiri library provides an easy way to configure
22437 logging in Python. It also provides some custom formatters and handlers.")
22438 (license license:asl2.0)))
22439
22440 (define-public python-pifpaf
22441 (package
22442 (name "python-pifpaf")
22443 (version "2.5.0")
22444 (source
22445 (origin
22446 (method url-fetch)
22447 (uri (pypi-uri "pifpaf" version))
22448 (sha256
22449 (base32
22450 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
22451 (build-system python-build-system)
22452 (arguments
22453 '(#:phases
22454 (modify-phases %standard-phases
22455 (replace 'check
22456 (lambda _
22457 (invoke "python" "setup.py" "testr" "--slowest"
22458 "--testr-args=until-failure"))))))
22459 (propagated-inputs
22460 `(("python-click" ,python-click)
22461 ("python-daiquiri" ,python-daiquiri)
22462 ("python-fixtures" ,python-fixtures)
22463 ("python-jinja2" ,python-jinja2)
22464 ("python-pbr" ,python-pbr)
22465 ("python-psutil" ,python-psutil)
22466 ("python-six" ,python-six)
22467 ("python-xattr" ,python-xattr)))
22468 (native-inputs
22469 `(("python-mock" ,python-mock)
22470 ("python-os-testr" ,python-os-testr)
22471 ("python-requests" ,python-requests)
22472 ("python-testrepository" ,python-testrepository)
22473 ("python-testtools" ,python-testtools)))
22474 (home-page "https://github.com/jd/pifpaf")
22475 (synopsis "Tools and fixtures to manage daemons for testing in Python")
22476 (description "Pifpaf is a suite of fixtures and a command-line tool that
22477 starts and stops daemons for a quick throw-away usage. This is typically
22478 useful when needing these daemons to run integration testing. It originally
22479 evolved from its precursor @code{overtest}.")
22480 (license license:asl2.0)))
22481
22482 (define-public python-pytest-check-links
22483 (package
22484 (name "python-pytest-check-links")
22485 (version "0.3.0")
22486 (source
22487 (origin
22488 (method url-fetch)
22489 ;; URI uses underscores
22490 (uri (pypi-uri "pytest_check_links" version))
22491 (sha256
22492 (base32
22493 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
22494 (build-system python-build-system)
22495 (propagated-inputs
22496 `(("python-docutils" ,python-docutils)
22497 ("python-html5lib" ,python-html5lib)
22498 ("python-nbconvert" ,python-nbconvert)
22499 ("python-nbformat" ,python-nbformat)
22500 ("python-pytest" ,python-pytest)
22501 ("python-six" ,python-six)))
22502 (native-inputs
22503 `(("python-pbr-minimal" ,python-pbr-minimal)))
22504 (home-page "https://github.com/minrk/pytest-check-links")
22505 (synopsis "Check links in files")
22506 (description "This package provides a pytest plugin that checks URLs for
22507 HTML-containing files.")
22508 (license license:bsd-3)))
22509
22510 (define-public python-json5
22511 (package
22512 (name "python-json5")
22513 (version "0.8.5")
22514 (source
22515 (origin
22516 ;; sample.json5 is missing from PyPi source tarball
22517 (method git-fetch)
22518 (uri (git-reference
22519 (url "https://github.com/dpranke/pyjson5")
22520 (commit (string-append "v" version))))
22521 (file-name (git-file-name name version))
22522 (sha256
22523 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
22524 (build-system python-build-system)
22525 (home-page "https://github.com/dpranke/pyjson5")
22526 (synopsis
22527 "Python implementation of the JSON5 data format")
22528 (description
22529 "JSON5 extends the JSON data interchange format to make it slightly more
22530 usable as a configuration language. This Python package implements parsing and
22531 dumping of JSON5 data structures.")
22532 (license license:asl2.0)))
22533
22534 (define-public python-frozendict
22535 (package
22536 (name "python-frozendict")
22537 (version "1.2")
22538 (source
22539 (origin
22540 (method url-fetch)
22541 (uri (pypi-uri "frozendict" version))
22542 (sha256
22543 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
22544 (build-system python-build-system)
22545 (home-page "https://github.com/slezica/python-frozendict")
22546 (synopsis "Simple immutable mapping for Python")
22547 (description
22548 "@dfn{frozendict} is an immutable wrapper around dictionaries that
22549 implements the complete mapping interface. It can be used as a drop-in
22550 replacement for dictionaries where immutability is desired.")
22551 (license license:expat)))
22552
22553 (define-public python-unpaddedbase64
22554 (package
22555 (name "python-unpaddedbase64")
22556 (version "1.1.0")
22557 (source
22558 (origin
22559 (method git-fetch)
22560 (uri (git-reference
22561 (url "https://github.com/matrix-org/python-unpaddedbase64")
22562 (commit (string-append "v" version))))
22563 (file-name (git-file-name name version))
22564 (sha256
22565 (base32
22566 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
22567 (build-system python-build-system)
22568 (home-page "https://pypi.org/project/unpaddedbase64/")
22569 (synopsis "Encode and decode Base64 without “=” padding")
22570 (description
22571 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
22572 using “=” characters. However this conveys no benefit so many protocols
22573 choose to use Base64 without the “=” padding.")
22574 (license license:asl2.0)))
22575
22576 (define-public python-py-cpuinfo
22577 (package
22578 (name "python-py-cpuinfo")
22579 (version "5.0.0")
22580 (source
22581 (origin
22582 (method url-fetch)
22583 (uri (pypi-uri "py-cpuinfo" version))
22584 (sha256
22585 (base32
22586 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
22587 (build-system python-build-system)
22588 (home-page "https://github.com/workhorsy/py-cpuinfo")
22589 (synopsis "Get CPU info with Python")
22590 (description
22591 "This Python module returns the CPU info by using the best sources of
22592 information for your operating system.")
22593 (license license:expat)))
22594
22595 (define-public python-canonicaljson
22596 (package
22597 (name "python-canonicaljson")
22598 (version "1.4.0")
22599 (source
22600 (origin
22601 (method url-fetch)
22602 (uri (pypi-uri "canonicaljson" version))
22603 (sha256
22604 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
22605 (build-system python-build-system)
22606 (propagated-inputs
22607 `(("python-six" ,python-six)
22608 ("python-frozendict" ,python-frozendict)
22609 ("python-simplejson" ,python-simplejson)))
22610 (home-page "https://github.com/matrix-org/python-canonicaljson")
22611 (synopsis "Canonical JSON")
22612 (description
22613 "Deterministically encode JSON.
22614
22615 @itemize
22616 @item Encodes objects and arrays as RFC 7159 JSON.
22617 @item Sorts object keys so that you get the same result each time.
22618 @item Has no insignificant whitespace to make the output as small as possible.
22619 @item Escapes only the characters that must be escaped, U+0000 to
22620 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
22621 @item Uses the shortest escape sequence for each escaped character.
22622 @item Encodes the JSON as UTF-8.
22623 @item Can encode frozendict immutable dictionaries.
22624 @end itemize")
22625 (license license:asl2.0)))
22626
22627 (define-public python-signedjson
22628 (package
22629 (name "python-signedjson")
22630 (version "1.1.1")
22631 (source
22632 (origin
22633 (method url-fetch)
22634 (uri (pypi-uri "signedjson" version))
22635 (sha256
22636 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
22637 (build-system python-build-system)
22638 (propagated-inputs
22639 `(("python-canonicaljson" ,python-canonicaljson)
22640 ("python-importlib-metadata" ,python-importlib-metadata)
22641 ("python-pynacl" ,python-pynacl)
22642 ("python-typing-extensions" ,python-typing-extensions)
22643 ("python-unpaddedbase64" ,python-unpaddedbase64)))
22644 (native-inputs
22645 `(("python-setuptools-scm" ,python-setuptools-scm)))
22646 (home-page "https://github.com/matrix-org/python-signedjson")
22647 (synopsis "Sign JSON objects with ED25519 signatures")
22648 (description
22649 "Sign JSON objects with ED25519 signatures.
22650
22651 @itemize
22652 @item More than one entity can sign the same object.
22653 @item Each entity can sign the object with more than one key making it easier to
22654 rotate keys
22655 @item ED25519 can be replaced with a different algorithm.
22656 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
22657 key.
22658 @end itemize")
22659 (license license:asl2.0)))
22660
22661 (define-public python-daemonize
22662 (package
22663 (name "python-daemonize")
22664 (version "2.5.0")
22665 (source
22666 (origin
22667 (method url-fetch)
22668 (uri (pypi-uri "daemonize" version))
22669 (sha256
22670 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
22671 (build-system python-build-system)
22672 (home-page "https://github.com/thesharp/daemonize")
22673 (synopsis "Library for writing system daemons in Python")
22674 (description "Daemonize is a library for writing system daemons in Python.")
22675 (license license:expat)))
22676
22677 (define-public python-pymacaroons
22678 (package
22679 (name "python-pymacaroons")
22680 (version "0.13.0")
22681 (source
22682 (origin
22683 (method url-fetch)
22684 (uri (pypi-uri "pymacaroons" version))
22685 (sha256
22686 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
22687 (build-system python-build-system)
22688 (propagated-inputs
22689 `(("python-six" ,python-six)
22690 ("python-pynacl" ,python-pynacl)))
22691 (home-page "https://github.com/ecordell/pymacaroons")
22692 (synopsis "Python Macaroon Library")
22693 (description
22694 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
22695 tokens, macaroons embed caveats that define specific authorization
22696 requirements for the target service, the service that issued the root macaroon
22697 and which is capable of verifying the integrity of macaroons it receives.
22698
22699 Macaroons allow for delegation and attenuation of authorization. They are
22700 simple and fast to verify, and decouple authorization policy from the
22701 enforcement of that policy.")
22702 (license license:expat)))
22703
22704 (define-public python-ldap3
22705 (package
22706 (name "python-ldap3")
22707 (version "2.7")
22708 (home-page "https://github.com/cannatag/ldap3")
22709 (source
22710 (origin
22711 (method git-fetch)
22712 (uri (git-reference (url home-page)
22713 (commit (string-append "v" version))))
22714 (file-name (git-file-name name version))
22715 (sha256
22716 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
22717 (build-system python-build-system)
22718 (arguments
22719 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
22720 #:phases (modify-phases %standard-phases
22721 (replace 'check
22722 (lambda* (#:key tests? #:allow-other-keys)
22723 (when tests?
22724 (invoke "nosetests" "-s" "test"))
22725 #t)))))
22726 (native-inputs
22727 `(("python-nose" ,python-nose)))
22728 (propagated-inputs
22729 `(("python-gssapi" ,python-gssapi)
22730 ("python-pyasn1" ,python-pyasn1)))
22731 (synopsis "Python LDAP client")
22732 (description
22733 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
22734 library.")
22735 (license license:lgpl3+)))
22736
22737 (define-public python-boltons
22738 (package
22739 (name "python-boltons")
22740 (version "20.0.0")
22741 (source
22742 (origin
22743 (method url-fetch)
22744 (uri (pypi-uri "boltons" version))
22745 (sha256
22746 (base32
22747 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
22748 (build-system python-build-system)
22749 (home-page "https://github.com/mahmoud/boltons")
22750 (synopsis "Extensions to the Python standard library")
22751 (description
22752 "Boltons is a set of over 230 pure-Python utilities in the same spirit
22753 as — and yet conspicuously missing from — the standard library, including:
22754
22755 @itemize
22756 @item Atomic file saving, bolted on with fileutils
22757 @item A highly-optimized OrderedMultiDict, in dictutils
22758 @item Two types of PriorityQueue, in queueutils
22759 @item Chunked and windowed iteration, in iterutils
22760 @item Recursive data structure iteration and merging, with iterutils.remap
22761 @item Exponential backoff functionality, including jitter, through
22762 iterutils.backoff
22763 @item A full-featured TracebackInfo type, for representing stack traces, in
22764 tbutils
22765 @end itemize")
22766 (license license:bsd-3)))
22767
22768 (define-public python-eliot
22769 (package
22770 (name "python-eliot")
22771 (version "1.12.0")
22772 (source
22773 (origin
22774 (method url-fetch)
22775 (uri (pypi-uri "eliot" version))
22776 (sha256
22777 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
22778 (build-system python-build-system)
22779 (arguments
22780 `(#:phases
22781 (modify-phases %standard-phases
22782 (add-after 'unpack 'remove-journald-support
22783 (lambda _
22784 (for-each delete-file
22785 '("eliot/tests/test_journald.py"
22786 "eliot/journald.py"))
22787 #t))
22788 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
22789 ;; remove command-line tool's tests. TODO eliot-prettyprint should
22790 ;; be installed and these tests should pass.
22791 (lambda _
22792 (delete-file "eliot/tests/test_prettyprint.py")
22793 #t)))))
22794 (propagated-inputs
22795 `(("python-boltons" ,python-boltons)
22796 ("python-pyrsistent" ,python-pyrsistent)
22797 ("python-six" ,python-six)
22798 ("python-zope-interface" ,python-zope-interface)))
22799 (native-inputs
22800 `(("python-black" ,python-black)
22801 ("python-coverage" ,python-coverage)
22802 ("python-dask" ,python-dask)
22803 ("python-flake8" ,python-flake8)
22804 ("python-hypothesis" ,python-hypothesis)
22805 ("python-pytest" ,python-pytest)
22806 ("python-setuptools" ,python-setuptools)
22807 ("python-sphinx" ,python-sphinx)
22808 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22809 ("python-testtools" ,python-testtools)
22810 ("python-twine" ,python-twine)
22811 ("python-twisted" ,python-twisted)))
22812 (home-page "https://github.com/itamarst/eliot/")
22813 (synopsis "Eliot: the logging system that tells you why it happened")
22814 (description
22815 "@dfn{eliot} is a Python logging system that outputs causal chains of
22816 actions: actions can spawn other actions, and eventually they either succeed
22817 or fail. The resulting logs tell you the story of what your software did: what
22818 happened, and what caused it.")
22819 (license license:asl2.0)))
22820
22821 (define-public python-pem
22822 (package
22823 (name "python-pem")
22824 (version "20.1.0")
22825 (source
22826 (origin
22827 (method url-fetch)
22828 (uri (pypi-uri "pem" version))
22829 (sha256
22830 (base32
22831 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
22832 (build-system python-build-system)
22833 (native-inputs
22834 `(("python-certifi" ,python-certifi)
22835 ("python-coverage" ,python-coverage)
22836 ("python-pretend" ,python-pretend)
22837 ("python-pyopenssl" ,python-pyopenssl)
22838 ("python-pytest" ,python-pytest)
22839 ("python-sphinx" ,python-sphinx)
22840 ("python-twisted" ,python-twisted)))
22841 (home-page "https://pem.readthedocs.io/")
22842 (synopsis "Easy PEM file parsing in Python")
22843 (description
22844 "This package provides a Python module for parsing and splitting PEM files.")
22845 (license license:expat)))
22846
22847 (define-public python-txsni
22848 ;; We need a few commits on top of 0.1.9 for compatibility with newer
22849 ;; Python and OpenSSL.
22850 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
22851 (revision "0"))
22852 (package
22853 (name "python-txsni")
22854 (version (git-version "0.1.9" revision commit))
22855 (home-page "https://github.com/glyph/txsni")
22856 (source
22857 (origin
22858 (method git-fetch)
22859 (uri (git-reference (url home-page) (commit commit)))
22860 (file-name (git-file-name name version))
22861 (sha256
22862 (base32
22863 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
22864 (build-system python-build-system)
22865 (propagated-inputs
22866 `(("python-pyopenssl" ,python-pyopenssl)
22867 ("python-service-identity" ,python-service-identity)
22868 ("python-twisted" ,python-twisted)))
22869 (synopsis "Run TLS servers with Twisted")
22870 (description
22871 "This package provides an easy-to-use SNI endpoint for use
22872 with the Twisted web framework.")
22873 (license license:expat))))
22874
22875 (define-public python-txacme
22876 (package
22877 (name "python-txacme")
22878 (version "0.9.2")
22879 (source
22880 (origin
22881 (method url-fetch)
22882 (uri (pypi-uri "txacme" version))
22883 (sha256
22884 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22885 (build-system python-build-system)
22886 (propagated-inputs
22887 `(("python-acme" ,python-acme)
22888 ("python-attrs" ,python-attrs)
22889 ("python-eliot" ,python-eliot)
22890 ("python-josepy" ,python-josepy)
22891 ("python-pem" ,python-pem)
22892 ("python-treq" ,python-treq)
22893 ("python-twisted" ,python-twisted)
22894 ("python-txsni" ,python-txsni)))
22895 (native-inputs
22896 `(("python-fixtures" ,python-fixtures)
22897 ("python-hypothesis" ,python-hypothesis)
22898 ("python-mock" ,python-mock)
22899 ("python-service-identity"
22900 ,python-service-identity)
22901 ("python-testrepository" ,python-testrepository)
22902 ("python-testscenarios" ,python-testscenarios)
22903 ("python-testtools" ,python-testtools)))
22904 (home-page "https://github.com/twisted/txacme")
22905 (synopsis "Twisted implexmentation of the ACME protocol")
22906 (description
22907 "ACME is Automatic Certificate Management Environment, a protocol that
22908 allows clients and certificate authorities to automate verification and
22909 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22910 Certificate Authority.
22911
22912 txacme is an implementation of the protocol for Twisted, the event-driven
22913 networking engine for Python.")
22914 (license license:expat)))
22915
22916 (define-public python-pysaml2
22917 (package
22918 (name "python-pysaml2")
22919 (version "6.5.1")
22920 (source
22921 (origin
22922 (method url-fetch)
22923 (uri (pypi-uri "pysaml2" version))
22924 (sha256
22925 (base32
22926 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
22927 (build-system python-build-system)
22928 (propagated-inputs
22929 `(("python-cryptography" ,python-cryptography)
22930 ("python-dateutil" ,python-dateutil)
22931 ("python-defusedxml" ,python-defusedxml)
22932 ("python-importlib-resources"
22933 ,python-importlib-resources)
22934 ("python-pyopenssl" ,python-pyopenssl)
22935 ("python-pytz" ,python-pytz)
22936 ("python-requests" ,python-requests)
22937 ("python-six" ,python-six)
22938 ("python-xmlschema" ,python-xmlschema)))
22939 (home-page "https://idpy.org")
22940 (synopsis "Python implementation of SAML Version 2 Standard")
22941 (description
22942 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22943 It contains all necessary pieces for building a SAML2 service provider or
22944 an identity provider. The distribution contains examples of both.
22945
22946 This package was originally written to work in a WSGI environment, but
22947 there are extensions that allow you to use it with other frameworks.")
22948 (license license:asl2.0)))
22949
22950 (define-public python-click-plugins
22951 (package
22952 (name "python-click-plugins")
22953 (version "1.1.1")
22954 (source
22955 (origin
22956 (method url-fetch)
22957 (uri (pypi-uri "click-plugins" version))
22958 (sha256
22959 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22960 (build-system python-build-system)
22961 (native-inputs
22962 `(("python-pytest" ,python-pytest)))
22963 (propagated-inputs
22964 `(("python-click" ,python-click)))
22965 (synopsis "Extension for Click to register external CLI commands")
22966 (description "This package provides n extension module for Click to
22967 register external CLI commands via setuptools entry-points.")
22968 (home-page "https://github.com/click-contrib/click-plugins")
22969 (license license:bsd-3)))
22970
22971 (define-public python-diceware
22972 (package
22973 (name "python-diceware")
22974 (version "0.9.6")
22975 (source
22976 (origin
22977 (method url-fetch)
22978 (uri (pypi-uri "diceware" version))
22979 (sha256
22980 (base32
22981 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22982 (build-system python-build-system)
22983 (native-inputs
22984 `(("python-coverage" ,python-coverage)
22985 ("python-pytest" ,python-pytest)
22986 ("python-pytest-runner" ,python-pytest-runner)))
22987 (home-page "https://github.com/ulif/diceware/")
22988 (synopsis "Generates memorable passphrases")
22989 (description "This package generates passphrases by concatenating words
22990 randomly picked from wordlists. It supports several sources of
22991 randomness (including real life dice) and different wordlists (including
22992 cryptographically signed ones).")
22993 (license license:gpl3+)))
22994
22995 (define-public python-dictdiffer
22996 (package
22997 (name "python-dictdiffer")
22998 (version "0.8.1")
22999 (source (origin
23000 (method url-fetch)
23001 (uri (pypi-uri "dictdiffer" version))
23002 (sha256
23003 (base32
23004 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
23005 (build-system python-build-system)
23006 (native-inputs
23007 `(("python-check-manifest" ,python-check-manifest)
23008 ("python-coverage" ,python-coverage)
23009 ("python-isort" ,python-isort)
23010 ("python-mock" ,python-mock)
23011 ("python-pydoctstyle" ,python-pydocstyle)
23012 ("python-pytest-cache" ,python-pytest-cache)
23013 ("python-pytest-cov" ,python-pytest-cov)
23014 ("python-pytest-pep8" ,python-pytest-pep8)
23015 ("python-pytest-runner" ,python-pytest-runner)
23016 ("python-pytest" ,python-pytest)
23017 ("python-setuptools-scm" ,python-setuptools-scm)
23018 ("python-tox" ,python-tox)))
23019 (home-page "https://github.com/inveniosoftware/dictdiffer")
23020 (synopsis "Diff and patch Python dictionary objects")
23021 (description
23022 "Dictdiffer is a Python module that helps you to diff and patch
23023 dictionaries.")
23024 (license license:expat)))
23025
23026 (define-public pyzo
23027 (package
23028 (name "pyzo")
23029 (version "4.11.2")
23030 (source
23031 (origin
23032 (method url-fetch)
23033 (uri (pypi-uri "pyzo" version))
23034 (sha256
23035 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
23036 (build-system python-build-system)
23037 (arguments
23038 `(#:phases
23039 (modify-phases %standard-phases
23040 (add-before 'check 'fix-home-directory
23041 (lambda _
23042 ;; Tests fail with "Permission denied: '/homeless-shelter'".
23043 (setenv "HOME" "/tmp")
23044 #t)))
23045 ;; Tests fail with "Uncaught Python exception: python: undefined
23046 ;; symbol: objc_getClass".
23047 #:tests? #f))
23048 (propagated-inputs
23049 `(("python-pyqt" ,python-pyqt)))
23050 (home-page "https://pyzo.org")
23051 (synopsis
23052 "Python IDE for scientific computing")
23053 (description
23054 "Pyzo is a Python IDE focused on interactivity and introspection,
23055 which makes it very suitable for scientific computing. Its practical
23056 design is aimed at simplicity and efficiency.
23057
23058 It consists of two main components, the editor and the shell, and uses
23059 a set of pluggable tools to help the programmer in various ways. Some
23060 example tools are source structure, project manager, interactive help,
23061 workspace...")
23062 (license license:bsd-2)))
23063
23064 (define-public python-osc
23065 (package
23066 (name "python-osc")
23067 (version "1.7.4")
23068 (source
23069 (origin
23070 (method url-fetch)
23071 (uri (pypi-uri "python-osc" version))
23072 (sha256
23073 (base32
23074 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
23075 (build-system python-build-system)
23076 (home-page "https://github.com/attwad/python-osc")
23077 (synopsis "Open Sound Control server and client implementations")
23078 (description
23079 "@code{python-osc} is a pure Python library with no external
23080 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
23081 Open Sound Control 1.0} specification.")
23082 (license license:unlicense)))
23083
23084 (define-public python-voluptuous
23085 (package
23086 (name "python-voluptuous")
23087 (version "0.11.7")
23088 (source
23089 (origin
23090 (method url-fetch)
23091 (uri (pypi-uri "voluptuous" version))
23092 (sha256
23093 (base32
23094 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
23095 (build-system python-build-system)
23096 (native-inputs
23097 `(("python-nose" ,python-nose)))
23098 (home-page "https://github.com/alecthomas/voluptuous")
23099 (synopsis "Python data validation library")
23100 (description
23101 "Voluptuous is a Python data validation library. It is primarily
23102 intended for validating data coming into Python as JSON, YAML, etc.")
23103 (license license:bsd-3)))
23104
23105 (define-public python-cmd2
23106 (package
23107 (name "python-cmd2")
23108 (version "1.0.2")
23109 (source
23110 (origin
23111 (method url-fetch)
23112 (uri (pypi-uri "cmd2" version))
23113 (sha256
23114 (base32
23115 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
23116 (build-system python-build-system)
23117 (propagated-inputs
23118 `(("python-attrs" ,python-attrs)
23119 ("python-colorama" ,python-colorama)
23120 ("python-pyperclip" ,python-pyperclip)
23121 ("python-wcwidth" ,python-wcwidth)))
23122 (native-inputs
23123 `(("python-codecov" ,python-codecov)
23124 ("python-coverage" ,python-coverage)
23125 ("python-doc8" ,python-doc8)
23126 ("python-flake8" ,python-flake8)
23127 ("python-invoke" ,python-invoke)
23128 ("python-mock" ,python-mock)
23129 ("python-pytest" ,python-pytest)
23130 ("python-pytest-cov" ,python-pytest-cov)
23131 ("python-pytest-mock" ,python-pytest-mock)
23132 ("python-setuptools-scm" ,python-setuptools-scm)
23133 ("python-sphinx" ,python-sphinx)
23134 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
23135 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
23136 ("python-tox" ,python-tox)
23137 ("python-twine" ,python-twine)
23138 ("which" ,which)))
23139 (home-page "https://github.com/python-cmd2/cmd2")
23140 (synopsis "Tool for building interactive command line applications")
23141 (description
23142 "Cmd2 is a tool for building interactive command line applications in
23143 Python. Its goal is to make it quick and easy for developers to build
23144 feature-rich and user-friendly interactive command line applications. It
23145 provides a simple API which is an extension of Python's built-in @code{cmd}
23146 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
23147 make your life easier and eliminates much of the boilerplate code which would
23148 be necessary when using @code{cmd}.")
23149 (license license:expat)))
23150
23151 (define-public python-pytidylib
23152 (package
23153 (name "python-pytidylib")
23154 (version "0.3.2")
23155 (source (origin
23156 (method url-fetch)
23157 (uri (pypi-uri "pytidylib" version))
23158 (sha256
23159 (base32
23160 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
23161 (build-system python-build-system)
23162 (arguments
23163 '(#:phases
23164 (modify-phases %standard-phases
23165 (add-before 'build 'qualify-libtidy
23166 (lambda* (#:key inputs #:allow-other-keys)
23167 (let ((libtidy (string-append (assoc-ref inputs "tidy")
23168 "/lib/libtidy.so")))
23169 (substitute* "tidylib/tidy.py"
23170 (("ctypes\\.util\\.find_library\\('tidy'\\)")
23171 (format #f "'~a'" libtidy)))
23172 #t))))))
23173 (inputs `(("tidy" ,tidy)))
23174 (home-page "https://github.com/countergram/pytidylib")
23175 (synopsis "Python wrapper for HTML Tidy library")
23176 (description
23177 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
23178 allows you, from Python code, to “fix” invalid (X)HTML markup.")
23179 (license license:expat)))
23180
23181 (define-public python2-pytidylib
23182 (package-with-python2 python-pytidylib))
23183
23184 (define-public python-mujson
23185 (package
23186 (name "python-mujson")
23187 (version "1.4")
23188 (source
23189 (origin
23190 (method url-fetch)
23191 (uri (pypi-uri "mujson" version))
23192 (sha256
23193 (base32
23194 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
23195 (build-system python-build-system)
23196 (home-page "https://github.com/mattgiles/mujson")
23197 (synopsis "Use the fastest JSON functions available at import time")
23198 (description "This package selects the fastest JSON functions available
23199 at import time.")
23200 (license license:expat)))
23201
23202 (define-public python-bashlex
23203 (package
23204 (name "python-bashlex")
23205 (version "0.14")
23206 (source
23207 (origin
23208 (method url-fetch)
23209 (uri (pypi-uri "bashlex" version))
23210 (sha256
23211 (base32
23212 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
23213 (build-system python-build-system)
23214 (arguments
23215 `(#:phases
23216 (modify-phases %standard-phases
23217 (add-before 'build 'pregenerate-yacc-tables
23218 (lambda _
23219 ;; parser.py caches tables, which attempts to write to site lib
23220 ;; see https://github.com/idank/bashlex/issues/51
23221 (invoke "python" "-c" "import bashlex"))))))
23222 (home-page
23223 "https://github.com/idank/bashlex")
23224 (synopsis "Python parser for bash")
23225 (description "@code{bashlex} is a Python port of the parser used
23226 internally by GNU bash.
23227
23228 For the most part it's transliterated from C, the major differences are:
23229
23230 @itemize
23231 @item it does not execute anything
23232 @item it is reentrant
23233 @item it generates a complete AST
23234 @end itemize
23235 ")
23236 (license license:gpl3+)))
23237
23238 (define-public python-jinxed
23239 (package
23240 (name "python-jinxed")
23241 (version "1.0.0")
23242 (source
23243 (origin
23244 (method url-fetch)
23245 (uri (pypi-uri "jinxed" version))
23246 (sha256
23247 (base32
23248 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
23249 (build-system python-build-system)
23250 (arguments
23251 '(#:phases
23252 (modify-phases %standard-phases
23253 (add-before 'check 'set-environment-variables
23254 (lambda* (#:key inputs #:allow-other-keys)
23255 (let ((ncurses (assoc-ref inputs "ncurses")))
23256 (setenv "TERM" "LINUX")
23257 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
23258 #t))))
23259 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
23260 (native-inputs
23261 `(("ncurses" ,ncurses)))
23262 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
23263 (synopsis "Jinxed Terminal Library")
23264 (description
23265 "Jinxed is an implementation of a subset of the Python curses library.")
23266 (license license:mpl2.0)))
23267
23268 (define-public python-blessed
23269 (package
23270 (name "python-blessed")
23271 (version "1.17.8")
23272 (source
23273 (origin
23274 (method url-fetch)
23275 (uri (pypi-uri "blessed" version))
23276 (sha256
23277 (base32
23278 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
23279 (modules '((guix build utils)))
23280 (snippet
23281 '(begin
23282 ;; Don't get hung up on Windows test failures.
23283 (delete-file "blessed/win_terminal.py") #t))))
23284 (build-system python-build-system)
23285 (propagated-inputs
23286 `(("python-jinxed" ,python-jinxed)
23287 ("python-six" ,python-six)
23288 ("python-wcwidth" ,python-wcwidth)))
23289 (native-inputs
23290 `(("python-mock" ,python-mock)
23291 ("python-pytest" ,python-pytest)))
23292 (home-page "https://github.com/jquast/blessed")
23293 (synopsis "Wrapper around terminal capabilities")
23294 (description
23295 "Blessed is a thin, practical wrapper around terminal styling, screen
23296 positioning, and keyboard input.")
23297 (license license:expat)))
23298
23299 (define-public python-readme-renderer
23300 (package
23301 (name "python-readme-renderer")
23302 (version "26.0")
23303 (source
23304 (origin
23305 (method url-fetch)
23306 (uri (pypi-uri "readme_renderer" version))
23307 (sha256
23308 (base32
23309 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
23310 (build-system python-build-system)
23311 (propagated-inputs
23312 `(("python-bleach" ,python-bleach)
23313 ("python-docutils" ,python-docutils)
23314 ("python-pygments" ,python-pygments)
23315 ("python-six" ,python-six)))
23316 (native-inputs
23317 `(("python-mock" ,python-mock)
23318 ("python-pytest" ,python-pytest)))
23319 (home-page "https://github.com/pypa/readme_renderer")
23320 (synopsis "Render README files in Warehouse")
23321 (description
23322 "Readme Renderer is a library that will safely render arbitrary README
23323 files into HTML. It is designed to be used in Warehouse to render the
23324 @code{long_description} for packages. It can handle Markdown, reStructuredText,
23325 and plain text.")
23326 (license license:asl2.0)))
23327
23328 (define-public python-lazr-delegates
23329 (package
23330 (name "python-lazr-delegates")
23331 (version "2.0.4")
23332 (source
23333 (origin
23334 (method url-fetch)
23335 (uri (pypi-uri "lazr.delegates" version))
23336 (sha256
23337 (base32
23338 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
23339 (build-system python-build-system)
23340 (arguments
23341 '(#:phases
23342 (modify-phases %standard-phases
23343 (replace 'check
23344 (lambda _
23345 (invoke "python" "setup.py" "nosetests"))))))
23346 (native-inputs
23347 `(("python-nose" ,python-nose)))
23348 (propagated-inputs
23349 `(("python-zope-interface" ,python-zope-interface)))
23350 (home-page "https://launchpad.net/lazr.delegates")
23351 (synopsis "Easily write objects that delegate behavior")
23352 (description
23353 "The @code{lazr.delegates} package makes it easy to write objects that
23354 delegate behavior to another object. The new object adds some property or
23355 behavior on to the other object, while still providing the underlying interface,
23356 and delegating behavior.")
23357 (license license:lgpl3)))
23358
23359 (define-public python-lazr-config
23360 (package
23361 (name "python-lazr-config")
23362 (version "2.2.2")
23363 (source
23364 (origin
23365 (method url-fetch)
23366 (uri (pypi-uri "lazr.config" version))
23367 (sha256
23368 (base32
23369 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
23370 (build-system python-build-system)
23371 (arguments
23372 '(#:phases
23373 (modify-phases %standard-phases
23374 (replace 'check
23375 (lambda _
23376 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
23377 (native-inputs
23378 `(("python-nose" ,python-nose)))
23379 (propagated-inputs
23380 `(("python-lazr-delegates" ,python-lazr-delegates)
23381 ("python-zope-interface" ,python-zope-interface)))
23382 (home-page "https://launchpad.net/lazr.config")
23383 (synopsis "Create configuration schemas and process and validate configurations")
23384 (description
23385 "The LAZR config system is typically used to manage process configuration.
23386 Process configuration is for saying how things change when we run systems on
23387 different machines, or under different circumstances. This system uses ini-like
23388 file format of section, keys, and values. The config file supports inheritance
23389 to minimize duplication of information across files. The format supports schema
23390 validation.")
23391 (license license:lgpl3)))
23392
23393 (define-public python-flufl-bounce
23394 (package
23395 (name "python-flufl-bounce")
23396 (version "3.0.1")
23397 (source
23398 (origin
23399 (method url-fetch)
23400 (uri (pypi-uri "flufl.bounce" version))
23401 (sha256
23402 (base32
23403 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
23404 (build-system python-build-system)
23405 (propagated-inputs
23406 `(("python-atpublic" ,python-atpublic)
23407 ("python-zope-interface" ,python-zope-interface)))
23408 (native-inputs
23409 `(("python-nose2" ,python-nose2)))
23410 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
23411 (synopsis "Email bounce detectors")
23412 (description "The @code{flufl.bounce} library provides a set of heuristics
23413 and an API for detecting the original bouncing email addresses from a bounce
23414 message. Many formats found in the wild are supported, as are VERP and
23415 RFC 3464.")
23416 (license (list license:asl2.0
23417 license:lgpl3)))) ; only for setup_headers.py
23418
23419 (define-public python-flufl-i18n
23420 (package
23421 (name "python-flufl-i18n")
23422 (version "3.0")
23423 (source
23424 (origin
23425 (method url-fetch)
23426 (uri (pypi-uri "flufl.i18n" version))
23427 (sha256
23428 (base32
23429 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
23430 (build-system python-build-system)
23431 (propagated-inputs
23432 `(("python-atpublic" ,python-atpublic)))
23433 (home-page "https://flufli18n.readthedocs.io")
23434 (synopsis "API for Python internationalization")
23435 (description
23436 "This package provides a high-level, convenient API for managing
23437 internationalization/translation contexts in Python applications. There is a
23438 simple API for single-context applications, such as command line scripts which
23439 only need to translate into one language during the entire course of their
23440 execution. There is a more flexible, but still convenient API for multi-context
23441 applications, such as servers, which may need to switch language contexts for
23442 different tasks.")
23443 (license license:asl2.0)))
23444
23445 (define-public python-flufl-lock
23446 (package
23447 (name "python-flufl-lock")
23448 (version "4.0")
23449 (source
23450 (origin
23451 (method url-fetch)
23452 (uri (pypi-uri "flufl.lock" version))
23453 (sha256
23454 (base32
23455 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
23456 (build-system python-build-system)
23457 (propagated-inputs
23458 `(("python-atpublic" ,python-atpublic)
23459 ("python-psutil" ,python-psutil)))
23460 (home-page "https://flufllock.readthedocs.io")
23461 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
23462 (description
23463 "The @dfn{flufl.lock} package provides NFS-safe file locking with
23464 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
23465 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
23466 and have a maximum lifetime built-in.")
23467 (license (list license:asl2.0
23468 license:lgpl3)))) ; only for setup_helpers.py
23469
23470 (define-public python-flufl-testing
23471 (package
23472 (name "python-flufl-testing")
23473 (version "0.8")
23474 (source
23475 (origin
23476 (method url-fetch)
23477 (uri (pypi-uri "flufl.testing" version))
23478 (sha256
23479 (base32
23480 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
23481 (build-system python-build-system)
23482 (native-inputs
23483 `(("python-nose2" ,python-nose2)))
23484 (home-page "https://gitlab.com/warsaw/flufl.testing")
23485 (synopsis "Collection of test tool plugins")
23486 (description
23487 "This package contains a small collection of test tool plugins for
23488 @code{nose2} and @code{flake8}.")
23489 (license license:asl2.0)))
23490
23491 (define-public python-devtools
23492 (package
23493 (name "python-devtools")
23494 (version "0.6")
23495 (source
23496 (origin
23497 (method git-fetch)
23498 (uri (git-reference
23499 (url "https://github.com/samuelcolvin/python-devtools")
23500 (commit (string-append "v" version))))
23501 (file-name (git-file-name name version))
23502 (sha256
23503 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
23504 (build-system python-build-system)
23505 (native-inputs
23506 `(("python-pytest" ,python-pytest)
23507 ("python-pytest-mock" ,python-pytest-mock)))
23508 (propagated-inputs
23509 `(("python-pygments" ,python-pygments)))
23510 (arguments
23511 `(#:phases (modify-phases %standard-phases
23512 (replace 'check
23513 (lambda _
23514 (invoke "pytest")
23515 #t)))))
23516 (home-page "https://github.com/samuelcolvin/python-devtools")
23517 (synopsis "Debug command and development tools")
23518 (description
23519 "This package provides a debug print command and other development tools.
23520 It adds a simple and readable way to print stuff during development.")
23521 (license license:expat)))
23522
23523 (define-public python-dateparser
23524 (package
23525 (name "python-dateparser")
23526 (version "0.7.6")
23527 (source
23528 (origin
23529 (method url-fetch)
23530 (uri (pypi-uri "dateparser" version))
23531 (sha256
23532 (base32
23533 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
23534 (build-system python-build-system)
23535 (propagated-inputs
23536 `(("python-dateutil" ,python-dateutil)
23537 ("python-pytz" ,python-pytz)
23538 ("python-regex" ,python-regex)
23539 ("python-ruamel.yaml" ,python-ruamel.yaml)
23540 ("python-tzlocal" ,python-tzlocal)))
23541 (native-inputs
23542 `(("python-mock" ,python-mock)
23543 ("python-parameterized" ,python-parameterized)
23544 ("tzdata" ,tzdata-for-tests)))
23545 (arguments
23546 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
23547 #:tests? #f
23548 #:phases
23549 (modify-phases %standard-phases
23550 (add-before 'check 'set-check-environment
23551 (lambda* (#:key inputs #:allow-other-keys)
23552 (setenv "TZ" "UTC")
23553 (setenv "TZDIR"
23554 (string-append (assoc-ref inputs "tzdata")
23555 "/share/zoneinfo"))
23556 #t)))))
23557 (home-page "https://github.com/scrapinghub/dateparser")
23558 (synopsis
23559 "Date parsing library designed to parse dates from HTML pages")
23560 (description
23561 "@code{python-dateparser} provides modules to easily parse localized
23562 dates in almost any string formats commonly found on web pages.")
23563 (license license:bsd-3)))
23564
23565 (define-public python-dparse
23566 (package
23567 (name "python-dparse")
23568 (version "0.5.1")
23569 (source
23570 (origin
23571 (method url-fetch)
23572 (uri (pypi-uri "dparse" version))
23573 (sha256
23574 (base32
23575 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
23576 (build-system python-build-system)
23577 (native-inputs
23578 `(("python-pytest" ,python-pytest)))
23579 (propagated-inputs
23580 `(("python-packaging" ,python-packaging)
23581 ("python-pyyaml" ,python-pyyaml)
23582 ("python-toml" ,python-toml)))
23583 (home-page "https://github.com/pyupio/dparse")
23584 (synopsis "Parser for Python dependency files")
23585 (description "This package provides a parser for Python dependency files.")
23586 (license license:expat)))
23587
23588 (define-public python-dpath
23589 (package
23590 (name "python-dpath")
23591 (version "2.0.1")
23592 (source
23593 (origin
23594 (method url-fetch)
23595 (uri (pypi-uri "dpath" version))
23596 (sha256
23597 (base32
23598 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
23599 (build-system python-build-system)
23600 (native-inputs
23601 `(("python-hypothesis" ,python-hypothesis)
23602 ("python-mock" ,python-mock)
23603 ("python-nose" ,python-nose)))
23604 (arguments
23605 '(#:phases
23606 (modify-phases %standard-phases
23607 (replace 'check
23608 (lambda* (#:key inputs outputs #:allow-other-keys)
23609 (add-installed-pythonpath inputs outputs)
23610 ;; This invokation is taken from tox.ini.
23611 (invoke "nosetests" "-d" "-v" "tests/"))))))
23612 (home-page "https://github.com/akesterson/dpath-python")
23613 (synopsis "File-system-like pathing and searching for dictionaries")
23614 (description
23615 "@code{python-dpath} is a library for accessing and searching
23616 dictionaries via /slashed/paths ala xpath.
23617
23618 Basically it lets you glob over a dictionary as if it were a file system. It
23619 allows you to specify globs (ala the bash eglob syntax, through some advanced
23620 fnmatch.fnmatch magic) to access dictionary elements, and provides some
23621 facility for filtering those results.")
23622 (license license:expat)))
23623
23624 (define-public python-safety
23625 (package
23626 (name "python-safety")
23627 (version "1.9.0")
23628 (source
23629 (origin
23630 (method url-fetch)
23631 (uri (pypi-uri "safety" version))
23632 (sha256
23633 (base32
23634 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
23635 (build-system python-build-system)
23636 (arguments
23637 `(#:phases
23638 (modify-phases %standard-phases
23639 (add-after 'unpack 'disable-tests
23640 (lambda _
23641 (substitute* "tests/test_safety.py"
23642 ;; requires network
23643 (("def test_check_live") "def _test_check_live"))
23644 #t)))))
23645 (propagated-inputs
23646 `(("python-click" ,python-click)
23647 ("python-dparse" ,python-dparse)
23648 ("python-packaging" ,python-packaging)
23649 ("python-requests" ,python-requests)))
23650 (home-page "https://github.com/pyupio/safety")
23651 (synopsis "Check installed dependencies for known vulnerabilities")
23652 (description "Safety checks installed dependencies for known vulnerabilities.
23653 By default it uses the open Python vulnerability database Safety DB.")
23654 (license license:expat)))
23655
23656 (define-public python-pypandoc
23657 (package
23658 (name "python-pypandoc")
23659 (version "1.5")
23660 (source
23661 (origin
23662 (method url-fetch)
23663 (uri (pypi-uri "pypandoc" version))
23664 (sha256
23665 (base32
23666 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
23667 (build-system python-build-system)
23668 (inputs
23669 `(("pandoc" ,pandoc)
23670 ("pandoc-citeproc" ,pandoc-citeproc)))
23671 (propagated-inputs
23672 `(("wheel" ,python-wheel)))
23673 (native-inputs
23674 `(("texlive" ,(texlive-union (list texlive-amsfonts
23675 texlive-fonts-ec
23676 texlive-latex-hyperref
23677 texlive-latex-oberdiek
23678 texlive-lm
23679 texlive-xcolor)))))
23680 (arguments
23681 `(#:phases
23682 (modify-phases %standard-phases
23683 (add-before 'check 'disable-tests
23684 (lambda _
23685 ;; Disable test requiring network access
23686 (substitute* "tests.py"
23687 (("test_basic_conversion_from_http_url")
23688 "skip_test_basic_conversion_from_http_url"))
23689 ;; Needed by texlive-union to generate fonts
23690 (setenv "HOME" "/tmp")
23691 #t)))))
23692 (home-page "https://github.com/bebraw/pypandoc")
23693 (synopsis "Python wrapper for pandoc")
23694 (description "pypandoc is a thin Python wrapper around pandoc
23695 and pandoc-citeproc.")
23696 (license license:expat)))
23697
23698 (define-public python-rnc2rng
23699 (package
23700 (name "python-rnc2rng")
23701 (version "2.6.4")
23702 (source
23703 (origin
23704 (method url-fetch)
23705 (uri (pypi-uri "rnc2rng" version))
23706 (sha256
23707 (base32
23708 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
23709 (build-system python-build-system)
23710 (propagated-inputs
23711 `(("python-rply" ,python-rply)))
23712 (arguments
23713 `(#:phases (modify-phases %standard-phases
23714 (replace 'check
23715 (lambda _
23716 (invoke "python" "test.py"))))))
23717 (home-page "https://github.com/djc/rnc2rng")
23718 (synopsis "Convert RELAX NG Compact to regular syntax")
23719 (description
23720 "This package provides the @command{rnc2rng} command-line tool as well as
23721 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
23722 equivalent schemata in the XML-based default RELAX NG syntax.")
23723 (license license:expat)))
23724
23725 (define-public python-telethon
23726 (package
23727 (name "python-telethon")
23728 (version "1.17.5")
23729 (source
23730 (origin
23731 (method git-fetch)
23732 (uri (git-reference
23733 (url "https://github.com/LonamiWebs/Telethon")
23734 (commit (string-append "v" version))))
23735 (file-name (git-file-name name version))
23736 (sha256
23737 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
23738 (build-system python-build-system)
23739 (arguments
23740 '(#:phases
23741 (modify-phases %standard-phases
23742 (replace 'check
23743 (lambda* (#:key tests? #:allow-other-keys)
23744 (when tests?
23745 (invoke "py.test" "-v"))
23746 #t)))))
23747 (propagated-inputs
23748 `(("python-rsa" ,python-rsa)
23749 ("python-pyaes" ,python-pyaes)))
23750 (native-inputs
23751 `(("python-pytest" ,python-pytest)
23752 ("python-pytest-asyncio" ,python-pytest-asyncio)
23753 ("python-pytest-trio" ,python-pytest-trio)))
23754 (home-page "https://docs.telethon.dev")
23755 (synopsis "Full-featured Telegram client library for Python 3")
23756 (description "This library is designed to make it easy to write Python
23757 programs that can interact with Telegram.")
23758 (license license:expat)))
23759
23760 (define-public python-citeproc-py
23761 (package
23762 (name "python-citeproc-py")
23763 (version "0.5.1")
23764 (source
23765 (origin
23766 (method url-fetch)
23767 (uri (pypi-uri "citeproc-py" version))
23768 (sha256
23769 (base32
23770 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
23771 (build-system python-build-system)
23772 (propagated-inputs
23773 `(("python-lxml" ,python-lxml)
23774 ("python-rnc2rng" ,python-rnc2rng)))
23775 (home-page
23776 "https://github.com/brechtm/citeproc-py")
23777 (synopsis "Citations and bibliography formatter")
23778 (description
23779 "Citeproc-py is a CSL processor for Python. It aims to implement the
23780 CSL 1.0.1 specification. citeproc-py can output styled citations and
23781 bibliographies in a number of different output formats. Currently supported
23782 are plain text, reStructuredText and HTML.")
23783 (license license:bsd-2)))
23784
23785 (define-public python-inform
23786 (package
23787 (name "python-inform")
23788 (version "1.23.0")
23789 (source
23790 (origin
23791 (method url-fetch)
23792 (uri (pypi-uri "inform" version))
23793 (sha256
23794 (base32
23795 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
23796 (build-system python-build-system)
23797 (arguments
23798 `(#:tests? #f)) ; PyPI tarball lacks tests
23799 (native-inputs
23800 `(("python-hypothesis" ,python-hypothesis)
23801 ("python-pytest-cov" ,python-pytest-cov)
23802 ("python-pytest-runner" ,python-pytest-runner)))
23803 (propagated-inputs
23804 `(("python-arrow" ,python-arrow)
23805 ("python-six" ,python-six)))
23806 (home-page "https://inform.readthedocs.io")
23807 (synopsis "Print & logging utilities for communicating with user")
23808 (description
23809 "Inform is designed to display messages from programs that are typically run from
23810 a console. It provides a collection of ‘print’ functions that allow you to simply and
23811 cleanly print different types of messages.")
23812 (license license:gpl3+)))
23813
23814 (define-public python-nestedtext
23815 (package
23816 (name "python-nestedtext")
23817 (version "1.0.0")
23818 (source
23819 (origin
23820 (method url-fetch)
23821 (uri (pypi-uri "nestedtext" version))
23822 (sha256
23823 (base32
23824 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
23825 (build-system python-build-system)
23826 (arguments
23827 `(#:tests? #f)) ; PyPI tarball lacks tests
23828 (propagated-inputs
23829 `(("python-inform" ,python-inform)))
23830 (home-page "https://nestedtext.org")
23831 (synopsis "Human readable and writable data interchange format")
23832 (description
23833 "NestedText is a file format for holding data that is to be entered, edited, or
23834 viewed by people. It allows data to be organized into a nested collection of
23835 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
23836 without the complexity and risk of YAML and without the syntactic clutter of JSON.
23837 NestedText is both simple and natural. Only a small number of concepts and rules must
23838 be kept in mind when creating it. It is easily created, modified, or viewed with
23839 a text editor and easily understood and used by both programmers and non-programmers.")
23840 (license license:expat))) ; MIT license
23841
23842 (define-public python-parallel
23843 (package
23844 (name "python-parallel")
23845 (version "1.6.4.4")
23846 (source
23847 (origin
23848 (method url-fetch)
23849 (uri (string-append
23850 "https://www.parallelpython.com/downloads/pp/pp-"
23851 version ".zip"))
23852 (sha256
23853 (base32
23854 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
23855 (native-inputs
23856 `(("unzip" ,unzip)))
23857 (build-system python-build-system)
23858 (arguments '(#:tests? #f)) ; No test suite.
23859 (home-page "https://www.parallelpython.com")
23860 (synopsis "Parallel and distributed programming for Python")
23861 (description "Parallel Python module (PP) provides an easy and efficient
23862 way to create parallel-enabled applications for SMP computers and clusters.
23863 PP module features cross-platform portability and dynamic load balancing.
23864 Thus applications written with PP will parallelize efficiently even on
23865 heterogeneous and multi-platform clusters (including clusters running other
23866 applications with variable CPU loads).")
23867 (license license:bsd-3)))
23868
23869 (define-public python2-parallel
23870 (package-with-python2 python-parallel))
23871
23872 (define-public python-djvulibre
23873 (package
23874 (name "python-djvulibre")
23875 (version "0.8.5")
23876 (source
23877 (origin
23878 (method url-fetch)
23879 (uri (pypi-uri "python-djvulibre" version))
23880 (sha256
23881 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
23882 (build-system python-build-system)
23883 (native-inputs
23884 `(("ghostscript" ,ghostscript)
23885 ("pkg-config" ,pkg-config)
23886 ("python-nose" ,python-nose)))
23887 (inputs
23888 `(("djvulibre" ,djvulibre)
23889 ("python-cython" ,python-cython)))
23890 (arguments
23891 `(#:phases
23892 (modify-phases %standard-phases
23893 (add-after 'unpack 'fix-tests
23894 (lambda _
23895 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23896 ;; doesn't make sense on GNU/Linux.
23897 (delete-file "djvu/dllpath.py")
23898 #t)))))
23899 (synopsis "Python bindings for DjVuLibre")
23900 (description "This is a set of Python bindings for the DjVuLibre library.")
23901 (home-page "https://jwilk.net/software/python-djvulibre")
23902 (license license:gpl2)))
23903
23904 (define-public python2-djvulibre
23905 (package-with-python2 python-djvulibre))
23906
23907 (define-public python-versioneer
23908 (package
23909 (name "python-versioneer")
23910 (version "0.19")
23911 (source
23912 (origin
23913 (method url-fetch)
23914 (uri (pypi-uri "versioneer" version))
23915 (sha256
23916 (base32
23917 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
23918 (build-system python-build-system)
23919 (home-page
23920 "https://github.com/python-versioneer/python-versioneer")
23921 (synopsis
23922 "Version-string management for VCS-controlled trees")
23923 (description
23924 "@code{versioneer} is a tool for managing a recorded version number in
23925 distutils-based python projects. The goal is to remove the tedious and
23926 error-prone \"update the embedded version string\" step from your release
23927 process.")
23928 (license license:public-domain)))
23929
23930 (define-public python2-gamera
23931 (package
23932 (name "python2-gamera")
23933 (version "3.4.4")
23934 (source
23935 (origin
23936 (method url-fetch)
23937 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
23938 "gamera-" version ".tar.gz"))
23939 (sha256
23940 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
23941 (modules '((guix build utils)))
23942 (snippet
23943 '(begin
23944 ;; Remove bundled libraries.
23945 (for-each delete-file-recursively
23946 '("src/libpng-1.2.5"
23947 "src/libtiff"
23948 "src/zlib-1.2.8"))))))
23949 (build-system python-build-system)
23950 (inputs
23951 `(("libpng" ,libpng)
23952 ("libtiff" ,libtiff)
23953 ("python2-wxpython" ,python2-wxpython)
23954 ("zlib" ,zlib)))
23955 (arguments
23956 `(#:python ,python-2))
23957 (synopsis "Framework for building document analysis applications")
23958 (description
23959 "Gamera is a toolkit for building document image recognition systems.")
23960 (home-page "https://gamera.informatik.hsnr.de/")
23961 (license license:gpl2+)))
23962
23963 (define-public python-contextvars
23964 (package
23965 (name "python-contextvars")
23966 (version "2.4")
23967 (source
23968 (origin
23969 (method url-fetch)
23970 (uri (pypi-uri "contextvars" version))
23971 (sha256
23972 (base32
23973 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
23974 (build-system python-build-system)
23975 (propagated-inputs
23976 `(("python-immutables" ,python-immutables)))
23977 (home-page
23978 "https://github.com/MagicStack/contextvars")
23979 (synopsis "PEP 567 Backport")
23980 (description "This package implements a backport of Python 3.7
23981 @code{contextvars} module (see PEP 567) for Python 3.6.")
23982 (license license:asl2.0)))
23983
23984 (define-public python-aiofiles
23985 (package
23986 (name "python-aiofiles")
23987 (version "0.6.0")
23988 (source
23989 (origin
23990 (method url-fetch)
23991 (uri (pypi-uri "aiofiles" version))
23992 (sha256
23993 (base32
23994 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
23995 (build-system python-build-system)
23996 (home-page "https://github.com/Tinche/aiofiles")
23997 (synopsis "File support for @code{asyncio}")
23998 (description "@code{python-aiofiles} is a library for handling local
23999 disk files in asyncio applications.")
24000 (license license:asl2.0)))
24001
24002 (define-public python-pyre-extensions
24003 (package
24004 (name "python-pyre-extensions")
24005 (version "0.0.18")
24006 (source
24007 (origin
24008 (method url-fetch)
24009 (uri (pypi-uri "pyre-extensions" version))
24010 (sha256
24011 (base32
24012 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
24013 (build-system python-build-system)
24014 (propagated-inputs
24015 `(("python-typing-extensions"
24016 ,python-typing-extensions)
24017 ("python-typing-inspect" ,python-typing-inspect)))
24018 (home-page "https://pyre-check.org")
24019 (synopsis
24020 "Type system extensions for use with @code{python-pyre}")
24021 (description
24022 "@code{python-pyre-extensions} defines extensions to the standard
24023 @code{typing} module that are supported by the Pyre typechecker.")
24024 (license license:expat)))
24025
24026 (define-public python-dataclasses
24027 (package
24028 (name "python-dataclasses")
24029 (version "0.7")
24030 (source
24031 (origin
24032 (method url-fetch)
24033 (uri (pypi-uri "dataclasses" version))
24034 (sha256
24035 (base32
24036 "1rh8111fbws2vxyf2qy2zw3x6p6cq1jfz8pf904gig5qwg56sjj9"))))
24037 (build-system python-build-system)
24038 (home-page
24039 "https://github.com/ericvsmith/dataclasses")
24040 (synopsis
24041 "Backport of the @code{dataclasses} module for Python 3.6")
24042 (description
24043 "This is an implementation of PEP 557, Data Classes. It is a
24044 backport of the @code{dataclasses} module for Python 3.6.")
24045 (license license:asl2.0)))
24046
24047 (define-public python-pywatchman
24048 (package
24049 (name "python-pywatchman")
24050 (version "1.4.1")
24051 (source
24052 (origin
24053 (method url-fetch)
24054 (uri (pypi-uri "pywatchman" version))
24055 (sha256
24056 (base32
24057 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
24058 (build-system python-build-system)
24059 (arguments
24060 `(#:tests? #f)) ;there are none
24061 (home-page
24062 "https://facebook.github.io/watchman/")
24063 (synopsis "Watchman client for python")
24064 (description "@code{python-pywatchman} is a library to connect and
24065 query Watchman to discover file changes.")
24066 (license license:bsd-3)))
24067
24068 (define-public python-helpdev
24069 (package
24070 (name "python-helpdev")
24071 (version "0.7.1")
24072 (source
24073 (origin
24074 (method url-fetch)
24075 (uri (pypi-uri "helpdev" version))
24076 (sha256
24077 (base32
24078 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
24079 (build-system python-build-system)
24080 (arguments
24081 `(#:phases
24082 (modify-phases %standard-phases
24083 (replace 'check
24084 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
24085 (when tests?
24086 (add-installed-pythonpath inputs outputs)
24087 (invoke "pytest" "tests"))
24088 #t)))))
24089 (propagated-inputs
24090 `(("python-importlib-metadata" ,python-importlib-metadata)))
24091 (native-inputs
24092 `(("python-pytest" ,python-pytest)))
24093 (home-page "https://gitlab.com/dpizetta/helpdev")
24094 (synopsis
24095 "Extract information about the Python environment easily")
24096 (description
24097 "Helpdev is a library to easily extract information about the Python
24098 environment.")
24099 (license license:expat)))
24100
24101 (define-public python-qdarkstyle
24102 (package
24103 (name "python-qdarkstyle")
24104 (version "2.8.1")
24105 (source
24106 (origin
24107 (method url-fetch)
24108 (uri (pypi-uri "QDarkStyle" version))
24109 (sha256
24110 (base32
24111 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
24112 (build-system python-build-system)
24113 (arguments
24114 `(;; Fails unable to detect valid Qt bindings even when
24115 ;; added as native-inputs.
24116 #:tests? #f))
24117 (propagated-inputs
24118 `(("python-helpdev" ,python-helpdev)
24119 ("python-qtpy" ,python-qtpy)))
24120 (home-page
24121 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
24122 (synopsis
24123 "Complete dark stylesheet for Python and Qt applications")
24124 (description "QDarkStyle is the most complete dark stylesheet for Python and
24125 Qt applications.")
24126 (license license:expat)))
24127
24128 (define-public python-bitstring
24129 (package
24130 (name "python-bitstring")
24131 (version "3.1.7")
24132 (source
24133 (origin
24134 (method url-fetch)
24135 (uri (pypi-uri "bitstring" version))
24136 (sha256
24137 (base32
24138 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
24139 (build-system python-build-system)
24140 (arguments
24141 `(#:phases
24142 (modify-phases %standard-phases
24143 (replace 'check
24144 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
24145 (when tests?
24146 (add-installed-pythonpath inputs outputs)
24147 (with-directory-excursion "test"
24148 (invoke "pytest")))
24149 #t)))))
24150 (native-inputs
24151 `(("python-pytest" ,python-pytest)))
24152 (home-page "https://github.com/scott-griffiths/bitstring")
24153 (synopsis
24154 "Simple construction, analysis and modification of binary data")
24155 (description
24156 "Bitstring is a library for simple construction, analysis and modification
24157 of binary data.")
24158 (license license:expat)))
24159
24160 (define-public python-confuse
24161 (package
24162 (name "python-confuse")
24163 (version "1.4.0")
24164 (source
24165 (origin
24166 (method url-fetch)
24167 (uri (pypi-uri "confuse" version))
24168 (sha256
24169 (base32
24170 "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j"))))
24171 (build-system python-build-system)
24172 (propagated-inputs
24173 `(("python-pathlib" ,python-pathlib)
24174 ("python-pyyaml" ,python-pyyaml)))
24175 (home-page "https://github.com/beetbox/confuse")
24176 (synopsis "Painless YAML configuration.")
24177 (description "Confuse is a configuration library for Python that uses
24178 YAML. It takes care of defaults, overrides, type checking, command-line
24179 integration, human-readable errors, and standard OS-specific locations.")
24180 (license license:expat)))
24181
24182 (define-public python-reflink
24183 (package
24184 (name "python-reflink")
24185 (version "0.2.1")
24186 (source
24187 (origin
24188 (method url-fetch)
24189 (uri (pypi-uri "reflink" version))
24190 (sha256
24191 (base32
24192 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
24193 (build-system python-build-system)
24194 (arguments
24195 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
24196 (propagated-inputs
24197 `(("python-cffi" ,python-cffi)))
24198 (native-inputs
24199 `(("python-pytest" ,python-pytest)
24200 ("python-pytest-runner" ,python-pytest-runner)))
24201 (home-page "https://gitlab.com/rubdos/pyreflink")
24202 (synopsis "Python wrapper around reflink system call")
24203 (description
24204 "Python reflink wraps around platform specific @code{reflink}
24205 implementations.")
24206 (license license:expat)))
24207
24208 (define-public python-pivy
24209 (package
24210 (name "python-pivy")
24211 (version "0.6.5")
24212 (source
24213 (origin
24214 (method git-fetch)
24215 (uri (git-reference
24216 (url "https://github.com/coin3d/pivy")
24217 (commit version)))
24218 (file-name (git-file-name name version))
24219 (sha256
24220 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
24221 (build-system python-build-system)
24222 (arguments
24223 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
24224 #:tests? #f
24225 #:phases
24226 (modify-phases %standard-phases
24227 (add-after 'unpack 'patch-cmake-include-dirs
24228 (lambda _
24229 ;; Patch buildsystem to respect Coin3D include directory
24230 (substitute* "CMakeLists.txt"
24231 (("\\$\\{SoQt_INCLUDE_DIRS}")
24232 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
24233 #t)))))
24234 (native-inputs
24235 `(("cmake" ,cmake)
24236 ("swig" ,swig)))
24237 (inputs
24238 `(("python-wrapper" ,python-wrapper)
24239 ("qtbase" ,qtbase)
24240 ("libxi" ,libxi)
24241 ("libice" ,libice)
24242 ("soqt" ,soqt)
24243 ("glew" ,glew)
24244 ("coin3D" ,coin3D-4)))
24245 (home-page "https://github.com/coin3d/pivy")
24246 (synopsis "Python bindings to Coin3D")
24247 (description
24248 "Pivy provides python bindings for Coin, a 3D graphics library with an
24249 Application Programming Interface based on the Open Inventor 2.1 API.")
24250 (license license:isc)))
24251
24252 (define-public python-crayons
24253 (package
24254 (name "python-crayons")
24255 (version "0.4.0")
24256 (source
24257 (origin
24258 (method url-fetch)
24259 (uri (pypi-uri "crayons" version))
24260 (sha256
24261 (base32
24262 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
24263 (build-system python-build-system)
24264 (propagated-inputs
24265 `(("python-colorama" ,python-colorama)))
24266 (home-page "https://github.com/MasterOdin/crayons")
24267 (synopsis "TextUI colors for Python")
24268 (description "This package gives you colored strings for the terminal.
24269 Crayons automatically wraps a given string in the foreground color and
24270 restores the original state after the string is printed.")
24271 (license license:expat)))
24272
24273 (define-public python-sane
24274 (package
24275 (name "python-sane")
24276 (version "2.9.1")
24277 (source
24278 (origin
24279 (method url-fetch)
24280 (uri (pypi-uri name version))
24281 (sha256
24282 (base32
24283 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
24284 (build-system python-build-system)
24285 (native-inputs
24286 `(("python-pytest" ,python-pytest)))
24287 (inputs
24288 `(("sane-backends" ,sane-backends)))
24289 (home-page "https://github.com/python-pillow/Sane")
24290 (synopsis "Python interface to the SANE scanner")
24291 (description "This package provides Python interface to the SANE scanner
24292 and frame grabber interface.")
24293 (license (license:non-copyleft
24294 ;; Yet another variant of the X/MIT license.
24295 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
24296
24297 (define-public python-screenkey
24298 (package
24299 (name "python-screenkey")
24300 (version "1.4")
24301 (source
24302 (origin
24303 (method git-fetch)
24304 (uri (git-reference
24305 (url "https://gitlab.com/screenkey/screenkey")
24306 (commit (string-append "v" version))))
24307 (file-name (git-file-name name version))
24308 (sha256
24309 (base32
24310 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
24311 (build-system python-build-system)
24312 (arguments
24313 `(#:phases
24314 (modify-phases %standard-phases
24315 (add-after 'unpack 'fix-dlopen-paths
24316 (lambda* (#:key inputs outputs #:allow-other-keys)
24317 (let* ((x11 (assoc-ref inputs "libx11"))
24318 (xtst (assoc-ref inputs "libxtst")))
24319 (substitute* "Screenkey/xlib.py"
24320 (("libX11.so.6")
24321 (string-append x11 "/lib/libX11.so.6")))
24322 (substitute* "Screenkey/xlib.py"
24323 (("libXtst.so.6")
24324 (string-append xtst "/lib/libXtst.so.6")))
24325 #t)))
24326 (add-after 'install 'wrap-screenkey
24327 (lambda* (#:key outputs #:allow-other-keys)
24328 (wrap-program
24329 (string-append (assoc-ref outputs "out") "/bin/screenkey")
24330 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
24331 `("GI_TYPELIB_PATH"
24332 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
24333 #t)))))
24334 (inputs
24335 `(("python-distutils-extra" ,python-distutils-extra)
24336 ("python-tokenize-rt" ,python-tokenize-rt)
24337 ("libx11" ,libx11)
24338 ("libxtst" ,libxtst)
24339 ("gtk+" ,gtk+)
24340 ("python-pygobject" ,python-pygobject)
24341 ("python-pycairo" ,python-pycairo)
24342 ("python-setuptools-git" ,python-setuptools-git)
24343 ("python-babel" ,python-babel)))
24344 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
24345 (synopsis
24346 "Screencast tool to display pressed keys")
24347 (description
24348 "A screencast tool to display your keys inspired by Screenflick.")
24349 (license license:gpl3+)))
24350
24351 (define-public python-jinja2-cli
24352 (package
24353 (name "python-jinja2-cli")
24354 (version "0.7.0")
24355 (source
24356 (origin
24357 (method url-fetch)
24358 (uri (pypi-uri "jinja2-cli" version))
24359 (sha256
24360 (base32
24361 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
24362 (build-system python-build-system)
24363 (propagated-inputs
24364 `(("python-jinja2" ,python-jinja2)))
24365 (native-inputs
24366 `(("python-flake8" ,python-flake8)
24367 ("python-jinja2" ,python-jinja2)
24368 ("python-pytest" ,python-pytest)))
24369 (home-page "https://github.com/mattrobenolt/jinja2-cli")
24370 (synopsis "Command-line interface to Jinja2")
24371 (description
24372 "This package provides a command-line interface (CLI) to the Jinja2
24373 template engine.")
24374 (license license:bsd-3)))
24375
24376 (define-public python-readability
24377 (package
24378 (name "python-readability")
24379 (version "0.3.1")
24380 (source
24381 (origin
24382 (method url-fetch)
24383 (uri (pypi-uri "readability" version))
24384 (sha256
24385 (base32
24386 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
24387 (build-system python-build-system)
24388 (home-page
24389 "https://github.com/andreasvc/readability/")
24390 (synopsis
24391 "Measure the readability of a given text using surface
24392 characteristics")
24393 (description
24394 "This package provides a Python library that is an implementation of
24395 traditional readability measures based on simple surface
24396 characteristics. These measures are basically linear regressions based on the
24397 number of words, syllables, and sentences.")
24398 (license license:asl2.0)))
24399
24400 (define-public python-listparser
24401 (package
24402 (name "python-listparser")
24403 (version "0.18")
24404 (source
24405 (origin
24406 (method url-fetch)
24407 (uri (pypi-uri "listparser" version))
24408 (sha256
24409 (base32
24410 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
24411 (build-system python-build-system)
24412 (home-page
24413 "https://github.com/kurtmckee/listparser")
24414 (synopsis
24415 "Parse subscription lists in Python")
24416 (description
24417 "This package provides a Python library that can parse OPML, FOAF, and
24418 iGoogle subscription lists.")
24419 (license license:expat)))
24420
24421 (define-public python-smartypants
24422 (package
24423 (name "python-smartypants")
24424 (version "2.0.1")
24425 (source
24426 (origin
24427 ;; There's no source tarball for 2.0.1 on PyPI.
24428 (method git-fetch)
24429 (uri (git-reference
24430 (url "https://github.com/leohemsted/smartypants.py")
24431 (commit (string-append "v" version))))
24432 (file-name (git-file-name name version))
24433 (sha256
24434 (base32 "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"))))
24435 (build-system python-build-system)
24436 (arguments
24437 '(#:phases
24438 (modify-phases %standard-phases
24439 (replace 'check
24440 ;; Its `setup.py test` doesn't report failure with exit status, so
24441 ;; we use `nose` instead.
24442 (lambda _
24443 (invoke "nosetests" "-v" "--exclude=^load_tests$"))))))
24444 (native-inputs
24445 ;; For tests.
24446 `(("python-docutils" ,python-docutils)
24447 ("python-nose" ,python-nose)
24448 ("python-pygments" ,python-pygments)))
24449 (home-page "https://github.com/leohemsted/smartypants.py")
24450 (synopsis "Translate punctuation characters into smart quotes")
24451 (description
24452 "@command{smartpants} can perform the following transformations:
24453 @enumerate
24454 @item Straight quotes ( \" and ' ) into \"curly\" quote HTML entities
24455 @item Backticks-style quotes (``like this'') into \"curly\" quote HTML
24456 entities
24457 @item Dashes (-- and ---) into en- and em-dash entities
24458 @item Three consecutive dots (... or . . .) into an ellipsis entity
24459 @end enumerate")
24460 (license license:bsd-3)))
24461
24462 (define-public python-typogrify
24463 (package
24464 (name "python-typogrify")
24465 (version "2.0.7")
24466 (source (origin
24467 (method url-fetch)
24468 (uri (pypi-uri "typogrify" version))
24469 (sha256
24470 (base32
24471 "0f6b2gnnxjbx1fbmkcscc6qjr4hi78kwm1wx4b766ha3va66dr4b"))))
24472 (build-system python-build-system)
24473 (arguments
24474 '(#:phases
24475 (modify-phases %standard-phases
24476 (replace 'check
24477 (lambda _
24478 (invoke "nosetests" "-v"))))))
24479 (propagated-inputs
24480 `(("python-smartypants" ,python-smartypants)))
24481 (native-inputs
24482 ;; For tests.
24483 `(("python-nose" ,python-nose)))
24484 (home-page "https://github.com/mintchaos/typogrify")
24485 (synopsis "Filters to transform text into typographically-improved HTML")
24486 (description
24487 "@code{typogrify} provides a set of custom filters that automatically
24488 apply various transformations to plain text in order to yield
24489 typographically-improved HTML. While often used in conjunction with Jinja and
24490 Django template systems, the filters can be used in any environment.")
24491 (license license:bsd-3)))
24492
24493 (define-public python-pathvalidate
24494 (package
24495 (name "python-pathvalidate")
24496 (version "2.4.1")
24497 (source
24498 (origin
24499 (method url-fetch)
24500 (uri (pypi-uri "pathvalidate" version))
24501 (sha256
24502 (base32 "0s14ycjgb44lxr2wg8lrq3b7kybmmrbf7yqz47xrqgn2gr6dk6rw"))))
24503 (build-system python-build-system)
24504 (arguments
24505 '(#:tests? #f))
24506 ;; Tests disabled because of circular dependencies.
24507 ;; pathvalidate tests depend on pytest-md-report, which
24508 ;; depends on pathvalidate.
24509 (native-inputs
24510 `(("python-allpairspy" ,python-allpairspy)
24511 ("python-click" ,python-click)
24512 ("python-faker" ,python-faker)
24513 ("python-pytest" ,python-pytest)))
24514 (home-page "https://github.com/thombashi/pathvalidate")
24515 (synopsis "Sanitize strings representing paths")
24516 (description
24517 "@code{pathvalidate} is a Python library to sanitize/validate strings
24518 representing paths or filenames.")
24519 (license license:expat)))