gnu: python2-sh: Remove package.
[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 Brendan Tildesley <mail@brendan.scot>
47 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
48 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
49 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
50 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
51 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
52 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
53 ;;; Copyright © 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
54 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
55 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
56 ;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
57 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
58 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
59 ;;; Copyright © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
60 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
72 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
73 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
74 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
75 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
76 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
77 ;;; Copyright © 2020, 2021 Alexandros Theodotou <alex@zrythm.org>
78 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
79 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
80 ;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
81 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
82 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
83 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
84 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
85 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
86 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
87 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
88 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
89 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
90 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
91 ;;; Copyright © 2020 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.com>
92 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
93 ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
94 ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
95 ;;; Copyright © 2019 Kristian Trandem <kristian@devup.no>
96 ;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com>
97 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
98 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
99 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
100 ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
101 ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
102 ;;;
103 ;;; This file is part of GNU Guix.
104 ;;;
105 ;;; GNU Guix is free software; you can redistribute it and/or modify it
106 ;;; under the terms of the GNU General Public License as published by
107 ;;; the Free Software Foundation; either version 3 of the License, or (at
108 ;;; your option) any later version.
109 ;;;
110 ;;; GNU Guix is distributed in the hope that it will be useful, but
111 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
112 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
113 ;;; GNU General Public License for more details.
114 ;;;
115 ;;; You should have received a copy of the GNU General Public License
116 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
117
118 (define-module (gnu packages python-xyz)
119 #:use-module ((guix licenses) #:prefix license:)
120 #:use-module (gnu packages)
121 #:use-module (gnu packages algebra)
122 #:use-module (gnu packages adns)
123 #:use-module (gnu packages aidc)
124 #:use-module (gnu packages attr)
125 #:use-module (gnu packages backup)
126 #:use-module (gnu packages bash)
127 #:use-module (gnu packages check)
128 #:use-module (gnu packages cmake)
129 #:use-module (gnu packages compression)
130 #:use-module (gnu packages crypto)
131 #:use-module (gnu packages databases)
132 #:use-module (gnu packages dbm)
133 #:use-module (gnu packages djvu)
134 #:use-module (gnu packages docker)
135 #:use-module (gnu packages enchant)
136 #:use-module (gnu packages file)
137 #:use-module (gnu packages fontutils)
138 #:use-module (gnu packages gcc)
139 #:use-module (gnu packages geo)
140 #:use-module (gnu packages ghostscript)
141 #:use-module (gnu packages gl)
142 #:use-module (gnu packages glib)
143 #:use-module (gnu packages gnome)
144 #:use-module (gnu packages gnupg)
145 #:use-module (gnu packages graphviz)
146 #:use-module (gnu packages graphics)
147 #:use-module (gnu packages gsasl)
148 #:use-module (gnu packages gstreamer)
149 #:use-module (gnu packages gtk)
150 #:use-module (gnu packages haskell-xyz)
151 #:use-module (gnu packages icu4c)
152 #:use-module (gnu packages image)
153 #:use-module (gnu packages imagemagick)
154 #:use-module (gnu packages kerberos)
155 #:use-module (gnu packages libevent)
156 #:use-module (gnu packages libffi)
157 #:use-module (gnu packages libidn)
158 #:use-module (gnu packages linux)
159 #:use-module (gnu packages llvm)
160 #:use-module (gnu packages man)
161 #:use-module (gnu packages markup)
162 #:use-module (gnu packages maths)
163 #:use-module (gnu packages monitoring)
164 #:use-module (gnu packages multiprecision)
165 #:use-module (gnu packages networking)
166 #:use-module (gnu packages ncurses)
167 #:use-module (gnu packages openstack)
168 #:use-module (gnu packages pcre)
169 #:use-module (gnu packages pdf)
170 #:use-module (gnu packages perl)
171 #:use-module (gnu packages photo)
172 #:use-module (gnu packages pkg-config)
173 #:use-module (gnu packages python)
174 #:use-module (gnu packages python-build)
175 #:use-module (gnu packages python-check)
176 #:use-module (gnu packages python-compression)
177 #:use-module (gnu packages python-crypto)
178 #:use-module (gnu packages python-science)
179 #:use-module (gnu packages python-web)
180 #:use-module (gnu packages qt)
181 #:use-module (gnu packages rdf)
182 #:use-module (gnu packages readline)
183 #:use-module (gnu packages sdl)
184 #:use-module (gnu packages search)
185 #:use-module (gnu packages scanner)
186 #:use-module (gnu packages shells)
187 #:use-module (gnu packages sphinx)
188 #:use-module (gnu packages ssh)
189 #:use-module (gnu packages swig)
190 #:use-module (gnu packages terminals)
191 #:use-module (gnu packages tex)
192 #:use-module (gnu packages texinfo)
193 #:use-module (gnu packages textutils)
194 #:use-module (gnu packages time)
195 #:use-module (gnu packages tls)
196 #:use-module (gnu packages version-control)
197 #:use-module (gnu packages video)
198 #:use-module (gnu packages web)
199 #:use-module (gnu packages wxwidgets)
200 #:use-module (gnu packages base)
201 #:use-module (gnu packages xml)
202 #:use-module (gnu packages xorg)
203 #:use-module (gnu packages xdisorg)
204 #:use-module (gnu packages tcl)
205 #:use-module (gnu packages bdw-gc)
206 #:use-module (gnu packages serialization)
207 #:use-module (guix packages)
208 #:use-module (guix download)
209 #:use-module (guix git-download)
210 #:use-module (guix hg-download)
211 #:use-module (guix utils)
212 #:use-module (guix build-system gnu)
213 #:use-module (guix build-system cmake)
214 #:use-module (guix build-system python)
215 #:use-module (guix build-system trivial)
216 #:use-module (srfi srfi-1)
217 #:use-module (srfi srfi-26))
218
219 (define-public python-slixmpp
220 (package
221 (name "python-slixmpp")
222 (version "1.5.2")
223 (source
224 (origin
225 (method git-fetch)
226 (uri
227 (git-reference
228 (url "https://lab.louiz.org/poezio/slixmpp.git")
229 (commit
230 (string-append "slix-" version))))
231 (file-name
232 (git-file-name name version))
233 (sha256
234 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
235 (build-system python-build-system)
236 (arguments
237 `(#:phases
238 (modify-phases %standard-phases
239 (add-after 'unpack 'patch
240 (lambda _
241 (substitute* "setup.py"
242 (("'CC', 'cc'")
243 "'CC', 'gcc'"))
244 #t)))))
245 (native-inputs
246 `(("cython" ,python-cython)
247 ("gnupg" ,gnupg)
248 ("pkg-config" ,pkg-config)))
249 (propagated-inputs
250 `(("python-aiodns" ,python-aiodns)
251 ("python-aiohttp" ,python-aiohttp)
252 ("python-pyasn1" ,python-pyasn1)
253 ("python-pyasn1-modules" ,python-pyasn1-modules)))
254 (inputs
255 `(("libidn" ,libidn)
256 ("python" ,python))) ; We are building a Python extension.
257 (synopsis "XMPP library without threads")
258 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
259 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
260 socket handling, the timers, the events dispatching) in order to remove all
261 threads.")
262 (home-page "https://lab.louiz.org/poezio/slixmpp")
263 (license license:expat)))
264
265 (define-public python-tenacity
266 (package
267 (name "python-tenacity")
268 (version "6.1.0")
269 (source (origin
270 (method url-fetch)
271 (uri (pypi-uri "tenacity" version))
272 (sha256
273 (base32
274 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
275 (build-system python-build-system)
276 (native-inputs
277 `(("python-setuptools-scm" ,python-setuptools-scm)
278 ("python-sphinx" ,python-sphinx)
279 ("python-tornado" ,python-tornado)
280 ("python-pytest" ,python-pytest)))
281 (propagated-inputs
282 `(("python-six" ,python-six)))
283 (arguments
284 `(#:phases (modify-phases %standard-phases
285 (replace 'check
286 (lambda _
287 (invoke "pytest")
288 #t)))))
289 (home-page "https://github.com/jd/tenacity")
290 (synopsis "Retrying library for python")
291 (description "Tenacity is a general-purpose python library to simplify the
292 task of adding retry behavior to just about anything.")
293 (license license:asl2.0)))
294
295 (define-public python-pytelegrambotapi
296 (package
297 (name "python-pytelegrambotapi")
298 (version "3.7.4")
299 (source
300 (origin
301 (method git-fetch)
302 (uri (git-reference
303 (url "https://github.com/eternnoir/pyTelegramBotAPI")
304 (commit version)))
305 (file-name (git-file-name name version))
306 (sha256
307 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
308 (build-system python-build-system)
309 (arguments
310 `(#:phases
311 (modify-phases %standard-phases
312 (replace 'check
313 (lambda* (#:key tests? #:allow-other-keys)
314 (when tests?
315 (with-directory-excursion "tests"
316 (invoke "py.test")))
317 #t)))))
318 (propagated-inputs
319 `(("python-requests" ,python-requests)))
320 (native-inputs
321 `(("python-pytest" ,python-pytest)))
322 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
323 (synopsis "Python Telegram bot api")
324 (description "This package provides a simple, but extensible Python
325 implementation for the Telegram Bot API.")
326 (license license:gpl2)))
327
328 (define-public python-colorlog
329 (package
330 (name "python-colorlog")
331 (version "4.1.0")
332 (source (origin
333 (method url-fetch)
334 (uri (pypi-uri "colorlog" version))
335 (sha256
336 (base32
337 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
338 (build-system python-build-system)
339 (native-inputs
340 `(("python-pytest" ,python-pytest)))
341 (arguments
342 `(#:phases (modify-phases %standard-phases
343 (replace 'check
344 (lambda _
345 ;; Extend PYTHONPATH so the built package will be found.
346 (setenv "PYTHONPATH"
347 (string-append (getcwd) "/build/lib:"
348 (getenv "PYTHONPATH")))
349 (invoke "pytest" "-p" "no:logging")
350 #t)))))
351 (home-page "https://github.com/borntyping/python-colorlog")
352 (synopsis "Log formatting with colors for python")
353 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
354 with Python's logging module that outputs records using terminal colors.")
355 (license license:expat)))
356
357 (define-public python-pyprind
358 (package
359 (name "python-pyprind")
360 (version "2.11.2")
361 (source (origin
362 (method url-fetch)
363 (uri (pypi-uri "PyPrind" version))
364 (sha256
365 (base32
366 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
367 (build-system python-build-system)
368 (propagated-inputs
369 `(("python-psutil" ,python-psutil)))
370 (home-page "https://github.com/rasbt/pyprind")
371 (synopsis "Python Progress Bar and Percent Indicator Utility")
372 (description "The PyPrind (Python Progress Indicator) module provides a
373 progress bar and a percentage indicator object that let you track the progress
374 of a loop structure or other iterative computation.")
375 (license license:bsd-3)))
376
377 (define-public python-gphoto2
378 (package
379 (name "python-gphoto2")
380 (version "2.2.1")
381 (source (origin
382 (method url-fetch)
383 (uri (pypi-uri "gphoto2" version))
384 (sha256
385 (base32
386 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
387 (build-system python-build-system)
388 (native-inputs
389 `(("pkg-config" ,pkg-config)))
390 (inputs
391 `(("libgphoto2" ,libgphoto2)))
392 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
393 (synopsis "Python interface to libgphoto2")
394 (description "@code{python-gphoto2} is a comprehensive Python interface
395 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
396 automatically generate the interface code.")
397 (license license:gpl3+)))
398
399 (define-public python-colour
400 (package
401 (name "python-colour")
402 (version "0.1.5")
403 (source (origin
404 (method url-fetch)
405 (uri (pypi-uri "colour" version))
406 (sha256
407 (base32
408 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
409 (build-system python-build-system)
410 (native-inputs
411 `(("python-d2to1" ,python-d2to1)))
412 (home-page "https://github.com/vaab/colour")
413 (synopsis "Convert and manipulate various color representations")
414 (description "Pythonic way to manipulate color representations (HSL, RVB,
415 web, X11, ...).")
416 (license license:expat)))
417
418 (define-public python-d2to1
419 (package
420 (name "python-d2to1")
421 (version "0.2.12.post1")
422 (source (origin
423 (method url-fetch)
424 (uri (pypi-uri "d2to1" version))
425 (sha256
426 (base32
427 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
428 (build-system python-build-system)
429 (native-inputs
430 `(("python-nose" ,python-nose)))
431 (home-page "https://github.com/embray/d2to1")
432 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
433 in python")
434 (description "The python package d2to1 (the d is for distutils) allows
435 using distutils2-like setup.cfg files for a package's metadata with a
436 distribute/setuptools setup.py script.")
437 (license license:bsd-2)))
438
439 (define-public python-rawkit
440 (package
441 (name "python-rawkit")
442 (version "0.6.0")
443 (source (origin
444 (method url-fetch)
445 (uri (pypi-uri "rawkit" version))
446 (sha256
447 (base32
448 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
449 (build-system python-build-system)
450 (native-inputs
451 `(("python-pytest" ,python-pytest)
452 ("python-mock" ,python-mock)))
453 (inputs
454 `(("libraw" ,libraw)))
455 (home-page "https://rawkit.readthedocs.io")
456 (synopsis "Ctypes-based LibRaw binding for Python")
457 (description "The rawkit package provides two modules: rawkit and libraw.
458 The rawkit module provides a high-level Pythonic interface for developing raw
459 photos, while the libraw module provides a CTypes based interface for
460 interacting with the low-level LibRaw C APIs.")
461 (license license:expat)))
462
463 (define-public python-easygui
464 (package
465 (name "python-easygui")
466 (version "0.98.1")
467 (source (origin
468 (method url-fetch)
469 (uri (pypi-uri "easygui" version))
470 (sha256
471 (base32
472 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
473 (build-system python-build-system)
474 (propagated-inputs
475 `(("python-tkinter" ,python "tk")))
476 (home-page "https://github.com/robertlugg/easygui")
477 (synopsis "GUI programming module for Python")
478 (description "EasyGUI is a module for very simple, very easy GUI
479 programming in Python. EasyGUI is different from other GUI generators in that
480 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
481 simple function calls.")
482 (license license:bsd-3)))
483
484 (define-public python-pymd4c
485 (package
486 (name "python-pymd4c")
487 (version "0.4.6.0b1")
488 (source
489 (origin
490 (method url-fetch)
491 (uri (pypi-uri "pymd4c" version))
492 (sha256
493 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
494 (build-system python-build-system)
495 (inputs
496 `(("md4c" ,md4c)))
497 (native-inputs
498 `(("python-flake8" ,python-flake8)
499 ("python-pkgconfig" ,python-pkgconfig)
500 ("pkg-config" ,pkg-config)))
501 (home-page "https://github.com/dominickpastore/pymd4c")
502 (synopsis "Python bindings for MD4C")
503 (description
504 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
505 to CommonMark.")
506 (license license:expat)))
507
508 (define-public python-pymediainfo
509 (package
510 (name "python-pymediainfo")
511 (version "4.1")
512 (source
513 (origin
514 (method url-fetch)
515 (uri (pypi-uri "pymediainfo" version))
516 (sha256
517 (base32
518 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
519 (build-system python-build-system)
520 (native-inputs
521 `(("python-setuptools-scm" ,python-setuptools-scm)
522 ("python-pytest" ,python-pytest)))
523 (inputs
524 `(("libmediainfo" ,libmediainfo)))
525 (arguments
526 `(#:phases
527 (modify-phases %standard-phases
528 (add-after 'unpack 'patch-libmediainfo
529 (lambda _
530 (substitute* "pymediainfo/__init__.py"
531 (("libmediainfo.so.0")
532 (string-append (assoc-ref %build-inputs "libmediainfo")
533 "/lib/libmediainfo.so.0")))
534 #t))
535 (replace 'check
536 (lambda _
537 ;; Extend PYTHONPATH so the built package will be found.
538 (setenv "PYTHONPATH"
539 (string-append (getcwd) "/build/lib:"
540 (getenv "PYTHONPATH")))
541 ;; Skip the only failing test "test_parse_url"
542 (invoke "pytest" "-vv" "-k" "not test_parse_url")
543 #t)))))
544 (home-page
545 "https://github.com/sbraz/pymediainfo")
546 (synopsis
547 "Python wrapper for the mediainfo library")
548 (description
549 "Python wrapper for the mediainfo library to access the technical and tag
550 data for video and audio files.")
551 (license license:expat)))
552
553 (define-public python-psutil
554 (package
555 (name "python-psutil")
556 (version "5.8.0")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "psutil" version))
561 (sha256
562 (base32 "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c"))))
563 (build-system python-build-system)
564 (arguments
565 ;; FIXME: some tests do not return and time out. Some tests fail because
566 ;; some processes survive kill().
567 '(#:tests? #f))
568 (home-page "https://github.com/giampaolo/psutil")
569 (synopsis "Library for retrieving information on running processes")
570 (description
571 "@code{psutil} (Python system and process utilities) is a library for
572 retrieving information on running processes and system utilization (CPU,
573 memory, disks, network) in Python. It is useful mainly for system monitoring,
574 profiling and limiting process resources and management of running processes.
575 It implements many functionalities offered by command line tools such as: ps,
576 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
577 iotop, uptime, pidof, tty, taskset, pmap.")
578 (properties `((python2-variant . ,(delay python2-psutil))))
579 (license license:bsd-3)))
580
581 (define-public python2-psutil
582 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
583 (package/inherit base
584 (propagated-inputs
585 `(("python2-enum34" ,python2-enum34) ;optional
586 ,@(package-propagated-inputs base))))))
587
588 (define-public python-shapely
589 (package
590 (name "python-shapely")
591 (version "1.7.1")
592 (source
593 (origin
594 (method url-fetch)
595 (uri (pypi-uri "Shapely" version))
596 (sha256
597 (base32
598 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
599 (modules '((guix build utils)))
600 (snippet
601 '(begin
602 (delete-file "shapely/speedups/_speedups.c")
603 (delete-file "shapely/vectorized/_vectorized.c")
604 #t))))
605 (build-system python-build-system)
606 (native-inputs
607 `(("python-cython" ,python-cython)
608 ("python-matplotlib" ,python-matplotlib)
609 ("python-pytest" ,python-pytest)
610 ("python-pytest-cov" ,python-pytest-cov)))
611 (inputs
612 `(("geos" ,geos)))
613 (propagated-inputs
614 `(("python-numpy" ,python-numpy)))
615 (arguments
616 `(#:phases
617 (modify-phases %standard-phases
618 (add-after 'unpack 'patch-geos-path
619 (lambda* (#:key inputs #:allow-other-keys)
620 (let ((geos (assoc-ref inputs "geos"))
621 (glibc (assoc-ref inputs ,(if (%current-target-system)
622 "cross-libc" "libc"))))
623 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
624 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
625 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
626 geos "/lib/libgeos_c.so'])"))
627 (("free = load_dll\\('c'\\)\\.free")
628 (string-append "free = load_dll('c', fallbacks=['"
629 glibc "/lib/libc.so.6']).free"))
630 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
631 (string-append "free = load_dll('c', fallbacks=['"
632 glibc "/lib/libc.so.6']).free"))))
633 #t)))))
634 (home-page "https://github.com/Toblerity/Shapely")
635 (synopsis "Library for the manipulation and analysis of geometric objects")
636 (description "Shapely is a Python package for manipulation and analysis of
637 planar geometric objects. It is based on the @code{GEOS} library.")
638 (license license:bsd-3)))
639
640 (define-public python-shortuuid
641 (package
642 (name "python-shortuuid")
643 (version "0.5.0")
644 (source
645 (origin
646 (method url-fetch)
647 (uri (pypi-uri "shortuuid" version))
648 (sha256
649 (base32
650 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
651 (build-system python-build-system)
652 (native-inputs
653 `(("python-pep8" ,python-pep8)))
654 (home-page "https://github.com/skorokithakis/shortuuid")
655 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
656 (description
657 "@code{shortuuid} is a Python library for generating concise, unambiguous
658 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
659 module and then similar looking characters are removed.")
660 (license license:bsd-3)))
661
662 (define-public python-logwrap
663 (package
664 (name "python-logwrap")
665 (version "8.2.0.post0")
666 (source
667 (origin
668 (method url-fetch)
669 (uri (pypi-uri "logwrap" version))
670 (sha256
671 (base32
672 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
673 (build-system python-build-system)
674 (arguments
675 `(#:tests? #f ; Tests not included in pypi release.
676 #:phases
677 (modify-phases %standard-phases
678 (replace 'check
679 (lambda* (#:key tests? #:allow-other-keys)
680 (when tests?
681 (invoke "pytest"))
682 #t)))))
683 (native-inputs
684 `(("python-cython" ,python-cython)
685 ("python-pytest" ,python-pytest)
686 ("python-setuptools-scm" ,python-setuptools-scm)
687 ("python-toml" ,python-toml)
688 ("python-wheel" ,python-wheel)))
689 (home-page "https://github.com/python-useful-helpers/logwrap")
690 (synopsis "Decorator for logging function arguments")
691 (description "This package provides a decorator to log function arguments
692 and function call return values in a human-readable way.")
693 (license license:asl2.0)))
694
695 (define-public python2-shapely
696 (package-with-python2 python-shapely))
697
698 (define-public python-clyent
699 (package
700 (name "python-clyent")
701 (version "1.2.1")
702 (source
703 (origin
704 (method url-fetch)
705 (uri (pypi-uri "clyent" version))
706 (sha256
707 (base32
708 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
709 (build-system python-build-system)
710 (native-inputs
711 `(("python-mock" ,python-mock)))
712 (home-page "https://github.com/Anaconda-Platform/clyent")
713 (synopsis "Command line client library")
714 (description "Clyent is a Python command line utility library. It is used
715 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
716 (license license:bsd-3)))
717
718 (define-public python2-clyent
719 (package-with-python2 python-clyent))
720
721 (define-public python-babel
722 (package
723 (name "python-babel")
724 (version "2.9.0")
725 (source
726 (origin
727 (method url-fetch)
728 (uri (pypi-uri "Babel" version))
729 (sha256
730 (base32
731 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
732 (build-system python-build-system)
733 (native-inputs
734 `(("python-freezegun" ,python-freezegun)
735 ("python-pytest" ,python-pytest)))
736 (propagated-inputs
737 `(("python-pytz" ,python-pytz)))
738 (arguments
739 `(#:phases (modify-phases %standard-phases
740 (replace 'check
741 (lambda _
742 (invoke "pytest" "-vv"))))))
743 (home-page "http://babel.pocoo.org/")
744 (synopsis
745 "Tools for internationalizing Python applications")
746 (description
747 "Babel is composed of two major parts:
748 - tools to build and work with gettext message catalogs
749 - a Python interface to the CLDR (Common Locale Data Repository), providing
750 access to various locale display names, localized number and date formatting,
751 etc. ")
752 (license license:bsd-3)))
753
754 (define-public python2-babel
755 (package-with-python2 python-babel))
756
757 (define-public python2-backport-ssl-match-hostname
758 (package
759 (name "python2-backport-ssl-match-hostname")
760 (version "3.5.0.1")
761 (source
762 (origin
763 (method url-fetch)
764 (uri (pypi-uri "backports.ssl_match_hostname" version))
765 (sha256
766 (base32
767 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
768 (build-system python-build-system)
769 (arguments
770 `(#:python ,python-2
771 #:tests? #f)) ; no test target
772 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
773 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
774 (description
775 "This backport brings the ssl.match_hostname() function to users of
776 earlier versions of Python. The function checks the hostname in the
777 certificate returned by the server to which a connection has been established,
778 and verifies that it matches the intended target hostname.")
779 (license license:psfl)))
780
781 (define-public python-bidict
782 (package
783 (name "python-bidict")
784 (version "0.21.2")
785 (source
786 (origin
787 (method url-fetch)
788 (uri (pypi-uri "bidict" version))
789 (sha256
790 (base32
791 "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
792 (build-system python-build-system)
793 (native-inputs
794 `(("python-coverage" ,python-coverage)
795 ("python-hypothesis" ,python-hypothesis-5.23) ; use_true_random=... from >=5.19.0
796 ("python-pre-commit" ,python-pre-commit)
797 ("python-py" ,python-py)
798 ("python-pytest" ,python-pytest)
799 ("python-pytest-benchmark" ,python-pytest-benchmark)
800 ("python-pytest-cov" ,python-pytest-cov)
801 ("python-setuptools-scm" ,python-setuptools-scm)
802 ("python-sortedcollections" ,python-sortedcollections)
803 ("python-sortedcontainers" ,python-sortedcontainers)
804 ("python-sphinx" ,python-sphinx)
805 ("python-sphinx-autodoc-typehints" ,python-sphinx-autodoc-typehints)
806 ("python-tox" ,python-tox)))
807 (arguments
808 `(#:phases (modify-phases %standard-phases
809 (add-after 'unpack 'relax-reqs
810 (lambda _
811 (substitute* "setup.py"
812 (("sortedcollections < 2") "sortedcollections"))
813 #t))
814 (replace 'check
815 (lambda _ (invoke "./run_tests.py"))))))
816 (home-page "https://bidict.readthedocs.io")
817 (synopsis "Bidirectional mapping library")
818 (description "The @code{bidict} library provides several data structures
819 for working with bidirectional mappings in Python.")
820 (license license:mpl2.0)))
821
822 (define-public python-bitarray
823 (package
824 (name "python-bitarray")
825 (version "1.4.0")
826 (source (origin
827 (method url-fetch)
828 (uri (pypi-uri "bitarray" version))
829 (sha256
830 (base32
831 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
832 (build-system python-build-system)
833 (home-page "https://github.com/ilanschnell/bitarray")
834 (synopsis "Efficient arrays of booleans")
835 (description "This package provides an object type which efficiently
836 represents an array of booleans. Bitarrays are sequence types and behave very
837 much like usual lists. Eight bits are represented by one byte in a contiguous
838 block of memory. The user can select between two representations:
839 little-endian and big-endian. All of the functionality is implemented in C.
840 Methods for accessing the machine representation are provided. This can be
841 useful when bit level access to binary files is required, such as portable
842 bitmap image files. Also, when dealing with compressed data which uses
843 variable bit length encoding, you may find this module useful.")
844 (license license:psfl)))
845
846 (define-public python-boolean.py
847 (package
848 (name "python-boolean.py")
849 (version "3.6")
850 (source
851 (origin
852 ;; There's no source tarball on PyPI.
853 (method git-fetch)
854 (uri (git-reference
855 (url "https://github.com/bastikr/boolean.py")
856 (commit (string-append "v" version))))
857 (file-name (git-file-name name version))
858 (sha256
859 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
860 (build-system python-build-system)
861 (home-page "https://github.com/bastikr/boolean.py")
862 (synopsis "Boolean algebra in one Python module")
863 (description
864 "This is a small Python library that implements boolean algebra.
865 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
866 @code{Symbol} class that can take on one of these two values. Calculations
867 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
868 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
869 Expressions are constructed from parsed strings or directly in Python.")
870 (license license:bsd-2)))
871
872 (define-public python-hdf4
873 (package
874 (name "python-hdf4")
875 (version "0.9")
876 (source
877 (origin
878 (method url-fetch)
879 (uri (pypi-uri name version))
880 (sha256
881 (base32
882 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
883 (build-system python-build-system)
884 (native-inputs `(("nose" ,python-nose)))
885 (propagated-inputs `(("numpy" ,python-numpy)))
886 (inputs
887 `(("hdf4" ,hdf4)
888 ("libjpeg" ,libjpeg-turbo)
889 ("zlib" ,zlib)))
890 (arguments
891 `(#:phases
892 (modify-phases %standard-phases
893 (replace 'check
894 (lambda _
895 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
896 ;; on to import numpy. Somehow this works on their CI system.
897 ;; Let's just manage PYTHONPATH here instead.
898 (substitute* "runexamples.sh"
899 (("export PYTHONPATH=.*") ""))
900 (setenv "PYTHONPATH"
901 (string-append (getcwd) ":"
902 (getenv "PYTHONPATH")))
903 (invoke "./runexamples.sh")
904 (invoke "nosetests" "-v"))))))
905 (home-page "https://github.com/fhs/python-hdf4")
906 (synopsis "Python interface to the NCSA HDF4 library")
907 (description
908 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
909 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
910 NetCDF files can also be read and modified. Python-HDF4 is a fork of
911 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
912 (license license:expat)))
913
914 (define-public python2-hdf4
915 (package-with-python2 python-hdf4))
916
917 (define-public python-h5py
918 (package
919 (name "python-h5py")
920 (version "2.10.0")
921 (source
922 (origin
923 (method url-fetch)
924 (uri (pypi-uri "h5py" version))
925 (sha256
926 (base32
927 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
928 (build-system python-build-system)
929 (arguments
930 `(#:tests? #f ; no test target
931 #:phases
932 (modify-phases %standard-phases
933 (add-after 'unpack 'fix-hdf5-paths
934 (lambda* (#:key inputs #:allow-other-keys)
935 (let ((prefix (assoc-ref inputs "hdf5")))
936 (substitute* "setup_build.py"
937 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
938 (string-append "['" prefix "/lib" "']"))
939 (("'/opt/local/include', '/usr/local/include'")
940 (string-append "'" prefix "/include" "'")))
941 (substitute* "setup_configure.py"
942 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
943 (string-append "['" prefix "/lib" "']")))
944 #t))))))
945 (propagated-inputs
946 `(("python-six" ,python-six)
947 ("python-numpy" ,python-numpy)))
948 (inputs
949 `(("hdf5" ,hdf5-1.10)))
950 (native-inputs
951 `(("python-cython" ,python-cython)
952 ("python-pkgconfig" ,python-pkgconfig)
953 ("pkg-config" ,pkg-config)))
954 (home-page "https://www.h5py.org/")
955 (synopsis "Read and write HDF5 files from Python")
956 (description
957 "The h5py package provides both a high- and low-level interface to the
958 HDF5 library from Python. The low-level interface is intended to be a
959 complete wrapping of the HDF5 API, while the high-level component supports
960 access to HDF5 files, datasets and groups using established Python and NumPy
961 concepts.")
962 (license license:bsd-3)))
963
964 (define-public python2-h5py
965 (package-with-python2 python-h5py))
966
967 (define-public python-sh
968 (package
969 (name "python-sh")
970 (version "1.12.14")
971 (source
972 (origin
973 (method url-fetch)
974 (uri (pypi-uri "sh" version))
975 (sha256
976 (base32
977 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
978 (build-system python-build-system)
979 (arguments
980 '(#:phases
981 (modify-phases %standard-phases
982 (replace 'check
983 (lambda _
984 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
985 (setenv "HOME" "/tmp")
986 (invoke "python" "sh.py" "test"))))))
987 (native-inputs
988 `(("python-coverage" ,python-coverage)))
989 (home-page "https://github.com/amoffat/sh")
990 (synopsis "Python subprocess replacement")
991 (description "This package provides a replacement for Python's
992 @code{subprocess} feature.")
993 (license license:expat)))
994
995 (define-public python-cftime
996 (package
997 (name "python-cftime")
998 (version "1.0.4.2")
999 (source
1000 (origin
1001 (method url-fetch)
1002 (uri (pypi-uri "cftime" version))
1003 (sha256
1004 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
1005 (build-system python-build-system)
1006 (propagated-inputs
1007 `(("python-numpy" ,python-numpy)))
1008 (native-inputs
1009 `(("python-coveralls" ,python-coveralls)
1010 ("python-cython" ,python-cython)
1011 ("python-pytest-cov" ,python-pytest-cov)))
1012 (home-page "https://github.com/Unidata/cftime")
1013 (synopsis "Library for time handling")
1014 (description
1015 "This package provides time-handling functionality that used to be part
1016 of the netcdf4 package before.")
1017 ;; This package claims to include code under the GPLv3 but is released
1018 ;; under ISC.
1019 (license (list license:isc license:gpl3+))))
1020
1021 (define-public python-netcdf4
1022 (package
1023 (name "python-netcdf4")
1024 (version "1.5.3")
1025 (source
1026 (origin
1027 (method url-fetch)
1028 (uri (pypi-uri "netCDF4" version))
1029 (sha256
1030 (base32
1031 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1032 (build-system python-build-system)
1033 (arguments
1034 '(#:phases
1035 (modify-phases %standard-phases
1036 (add-after 'unpack 'configure-locations
1037 (lambda* (#:key inputs #:allow-other-keys)
1038 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1039 #t)))))
1040 (native-inputs
1041 `(("python-cython" ,python-cython)))
1042 (propagated-inputs
1043 `(("python-numpy" ,python-numpy)
1044 ("python-cftime" ,python-cftime)))
1045 (inputs
1046 `(("netcdf" ,netcdf)
1047 ("hdf4" ,hdf4)
1048 ("hdf5" ,hdf5)))
1049 (home-page "https://github.com/Unidata/netcdf4-python")
1050 (synopsis "Python/numpy interface to the netCDF library")
1051 (description "Netcdf4-python is a Python interface to the netCDF C
1052 library. netCDF version 4 has many features not found in earlier
1053 versions of the library and is implemented on top of HDF5. This module
1054 can read and write files in both the new netCDF 4 and the old netCDF 3
1055 format, and can create files that are readable by HDF5 clients. The
1056 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1057 to users of that module.")
1058 ;; The software is mainly ISC, but includes some files covered
1059 ;; by the Expat license.
1060 (license (list license:isc license:expat))))
1061
1062 (define-public python-license-expression
1063 (package
1064 (name "python-license-expression")
1065 (version "1.2")
1066 (source
1067 (origin
1068 (method url-fetch)
1069 (uri (pypi-uri "license-expression" version))
1070 (sha256
1071 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1072 (build-system python-build-system)
1073 (propagated-inputs
1074 `(("python-boolean.py" ,python-boolean.py)))
1075 (home-page "https://github.com/nexB/license-expression")
1076 (synopsis "Apply boolean logic to license expressions")
1077 (description
1078 "This Python module defines a tiny language to evaluate and compare
1079 license expressions using boolean logic. Logical combinations of licenses can
1080 be tested for equality, containment, and equivalence. They can be normalised
1081 and simplified. It supports SPDX license expressions as well as other naming
1082 conventions and aliases in the same expression.")
1083 (license license:gpl2+)))
1084
1085 (define-public python-lockfile
1086 (package
1087 (name "python-lockfile")
1088 (version "0.12.2")
1089 (source
1090 (origin
1091 (method url-fetch)
1092 (uri (pypi-uri "lockfile" version))
1093 (sha256
1094 (base32
1095 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1096 (build-system python-build-system)
1097 (arguments '(#:test-target "check"))
1098 (native-inputs
1099 `(("python-pbr" ,python-pbr)))
1100 (home-page "https://launchpad.net/pylockfile")
1101 (synopsis "Platform-independent file locking module")
1102 (description
1103 "The lockfile package exports a LockFile class which provides a simple
1104 API for locking files.")
1105 (license license:expat)))
1106
1107 (define-public python-filelock
1108 (package
1109 (name "python-filelock")
1110 (version "3.0.12")
1111 (source
1112 (origin
1113 (method url-fetch)
1114 (uri (pypi-uri "filelock" version))
1115 (sha256
1116 (base32
1117 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1118 (build-system python-build-system)
1119 (home-page
1120 "https://github.com/benediktschmitt/py-filelock")
1121 (synopsis "Platform independent file lock")
1122 (description "@code{filelock} contains a single module implementing
1123 a platform independent file lock in Python, which provides a simple way of
1124 inter-process communication.")
1125 (license license:unlicense)))
1126
1127 (define-public python-semantic-version
1128 (package
1129 (name "python-semantic-version")
1130 (version "2.8.5")
1131 (source
1132 (origin
1133 (method url-fetch)
1134 (uri (pypi-uri "semantic_version" version))
1135 (sha256
1136 (base32
1137 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1138 (build-system python-build-system)
1139 (home-page "https://github.com/rbarrois/python-semanticversion")
1140 (synopsis "Semantic versioning module for Python")
1141 (description
1142 "The @code{semantic_version} class is a small library for handling
1143 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1144
1145 It can compare versions, generate a new version that represents a bump in one of
1146 the version levels, and check whether any given string is a proper semantic
1147 version identifier.")
1148 (license license:bsd-3)))
1149
1150 (define-public python2-semantic-version
1151 (package-with-python2 python-semantic-version))
1152
1153 (define-public python-serpent
1154 (package
1155 (name "python-serpent")
1156 (version "1.28")
1157 (source
1158 (origin
1159 (method url-fetch)
1160 (uri (pypi-uri "serpent" version))
1161 (sha256
1162 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1163 (build-system python-build-system)
1164 (native-inputs
1165 `(("python-attrs" ,python-attrs)
1166 ("python-pytz" ,python-pytz)))
1167 (home-page "https://github.com/irmen/Serpent")
1168 (synopsis "Serializer for literal Python expressions")
1169 (description
1170 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1171 serialization. It serializes an object tree into bytes (an utf-8 encoded
1172 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1173 to rebuild the original object tree.
1174
1175 Because only safe literals are encoded, it is safe to send serpent data to
1176 other machines, such as over the network.")
1177 (properties `((python2-variant . ,(delay python2-serpent))))
1178 (license license:expat)))
1179
1180 (define-public python2-serpent
1181 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1182 (package/inherit base
1183 (propagated-inputs
1184 `(("python-enum34" ,python2-enum34)
1185 ,@(package-propagated-inputs base))))))
1186
1187 (define-public python-setuptools
1188 (package
1189 (name "python-setuptools")
1190 (version "52.0.0")
1191 (source
1192 (origin
1193 (method url-fetch)
1194 (uri (pypi-uri "setuptools" version))
1195 (sha256
1196 (base32
1197 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1198 (modules '((guix build utils)))
1199 (snippet
1200 '(begin
1201 ;; Remove included binaries which are used to build self-extracting
1202 ;; installers for Windows.
1203 ;; TODO: Find some way to build them ourself so we can include them.
1204 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1205 #t))))
1206 (build-system python-build-system)
1207 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1208 ;; One could bootstrap with an internal untested setuptools.
1209 (arguments
1210 `(#:tests? #f))
1211 (home-page "https://pypi.org/project/setuptools/")
1212 (synopsis
1213 "Library designed to facilitate packaging Python projects")
1214 (description
1215 "Setuptools is a fully-featured, stable library designed to facilitate
1216 packaging Python projects, where packaging includes:
1217 Python package and module definitions,
1218 distribution package metadata,
1219 test hooks,
1220 project installation,
1221 platform-specific details,
1222 Python 3 support.")
1223 ;; TODO: setuptools now bundles the following libraries:
1224 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1225 (license (list license:psfl ; setuptools itself
1226 license:expat ; six, appdirs, pyparsing
1227 license:asl2.0 ; packaging is dual ASL2/BSD-2
1228 license:bsd-2))
1229 (properties `((python2-variant . ,(delay python2-setuptools))))))
1230
1231 ;; Newer versions of setuptools no longer support Python 2.
1232 (define-public python2-setuptools
1233 (package
1234 (name "python2-setuptools")
1235 (version "41.0.1")
1236 (source
1237 (origin
1238 (method url-fetch)
1239 (uri (pypi-uri "setuptools" version ".zip"))
1240 (sha256
1241 (base32
1242 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1243 (modules '((guix build utils)))
1244 (snippet
1245 '(begin
1246 ;; Remove included binaries which are used to build self-extracting
1247 ;; installers for Windows.
1248 ;; TODO: Find some way to build them ourself so we can include them.
1249 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1250 #t))))
1251 (build-system python-build-system)
1252 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1253 ;; One could bootstrap with an internal untested setuptools.
1254 (arguments
1255 `(#:tests? #f))
1256 (native-inputs
1257 `(("unzip" ,unzip)))
1258 (home-page "https://pypi.org/project/setuptools/")
1259 (synopsis
1260 "Library designed to facilitate packaging Python projects")
1261 (description
1262 "Setuptools is a fully-featured, stable library designed to facilitate
1263 packaging Python projects, where packaging includes:
1264 Python package and module definitions,
1265 distribution package metadata,
1266 test hooks,
1267 project installation,
1268 platform-specific details,
1269 Python 3 support.")
1270 ;; TODO: setuptools now bundles the following libraries:
1271 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1272 (license (list license:psfl ; setuptools itself
1273 license:expat ; six, appdirs, pyparsing
1274 license:asl2.0 ; packaging is dual ASL2/BSD-2
1275 license:bsd-2))))
1276
1277 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1278 (define-public python-setuptools-for-tensorflow
1279 (hidden-package
1280 (package
1281 (inherit python-setuptools)
1282 (version "39.1.0")
1283 (source (origin
1284 (inherit (package-source python-setuptools))
1285 (uri (pypi-uri "setuptools" version ".zip"))
1286 (sha256
1287 (base32
1288 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1289
1290 (define-public python-uniseg
1291 (package
1292 (name "python-uniseg")
1293 (version "0.7.1")
1294 (source
1295 (origin
1296 (method url-fetch)
1297 (uri (pypi-uri "uniseg" version ".zip"))
1298 (sha256
1299 (base32
1300 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1301 (build-system python-build-system)
1302 (arguments
1303 '(#:tests? #f)) ; The test suite requires network access.
1304 (native-inputs
1305 `(("unzip" ,unzip)))
1306 (home-page
1307 "https://bitbucket.org/emptypage/uniseg-python")
1308 (synopsis
1309 "Python library to determine Unicode text segmentations")
1310 (description
1311 "Uniseg is a Python package used to determine Unicode text segmentations.
1312 Supported segmentations include:
1313 @enumerate
1314 @item @dfn{Code point} (any value in the Unicode codespace)
1315 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1316 multiple Unicode code points, e.g. \"G\" + acute-accent)
1317 @item Word break
1318 @item Sentence break
1319 @item Line break
1320 @end enumerate")
1321 (license license:expat)))
1322
1323 (define-public python2-uniseg
1324 (package-with-python2 python-uniseg))
1325
1326 (define-public python-humanfriendly
1327 (package
1328 (name "python-humanfriendly")
1329 (version "8.2")
1330 (source
1331 (origin
1332 (method url-fetch)
1333 (uri (pypi-uri "humanfriendly" version))
1334 (sha256
1335 (base32
1336 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1337 (build-system python-build-system)
1338 (arguments
1339 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1340 #:tests? #f))
1341 (home-page "https://humanfriendly.readthedocs.io")
1342 (synopsis "Human-friendly input and output in Python")
1343 (description
1344 "The functions and classes in @code{humanfriendly} can be used to make
1345 text interfaces more user-friendly. It includes tools to parse and format
1346 numbers, file sizes, and timespans, timers for long-running operations, menus
1347 to allow the user to choose from a list of options, and terminal interaction
1348 helpers.")
1349 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1350 (license license:expat)))
1351
1352 (define-public python2-humanfriendly
1353 (let ((base (package-with-python2
1354 (strip-python2-variant python-humanfriendly))))
1355 (package/inherit base
1356 (propagated-inputs
1357 `(("python2-monotonic" ,python2-monotonic)
1358 ,@(package-propagated-inputs base))))))
1359
1360 (define-public python-textparser
1361 (package
1362 (name "python-textparser")
1363 (version "0.23.0")
1364 (source
1365 (origin
1366 (method url-fetch)
1367 (uri (pypi-uri "textparser" version))
1368 (sha256
1369 (base32
1370 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1371 (build-system python-build-system)
1372 (home-page "https://github.com/eerimoq/textparser")
1373 (synopsis "Fast text parser for Python")
1374 (description "This library provides a text parser written in the Python
1375 language. It aims to be fast.")
1376 (license license:expat)))
1377
1378 (define-public python-aenum
1379 (package
1380 (name "python-aenum")
1381 (version "2.2.4")
1382 (source
1383 (origin
1384 (method url-fetch)
1385 (uri (pypi-uri "aenum" version))
1386 (sha256
1387 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1388 (build-system python-build-system)
1389 (arguments
1390 `(#:phases (modify-phases %standard-phases
1391 (replace 'check
1392 (lambda _
1393 (format #t "current working dir ~s~%" (getcwd))
1394 (setenv "PYTHONPATH"
1395 (string-append ".:" (getenv "PYTHONPATH")))
1396 ;; We must run the test suite module directly, as it
1397 ;; fails to define the 'tempdir' variable in scope for
1398 ;; the tests otherwise
1399 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1400 ;; issues/32/running-tests-with-python-setuppy-test).
1401 (invoke "python3" "aenum/test.py")
1402 ;; This one fails with "NameError: name
1403 ;; 'test_pickle_dump_load' is not defined" (see:
1404 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1405 ;; /error-running-the-test_v3py-test-suite).
1406 ;; (invoke "python3" "aenum/test_v3.py")
1407 #t)))))
1408 (home-page "https://bitbucket.org/stoneleaf/aenum")
1409 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1410 (description "The aenum library includes an @code{Enum} base class, a
1411 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1412 class.")
1413 (license license:bsd-3)))
1414
1415 (define-public python-can
1416 (package
1417 (name "python-can")
1418 (version "3.3.3")
1419 (source
1420 (origin
1421 (method url-fetch)
1422 (uri (pypi-uri "python-can" version))
1423 (sha256
1424 (base32
1425 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1426 (build-system python-build-system)
1427 (arguments
1428 `(#:phases (modify-phases %standard-phases
1429 (add-after 'unpack 'relax-version-requirements
1430 (lambda _
1431 (substitute* "setup.py"
1432 (("mock~=2\\.0") "mock")
1433 (("coverage<5") "coverage")
1434 (("pytest~=4\\.3") "pytest")
1435 (("hypothesis~=4\\.56") "hypothesis"))
1436 #t))
1437 (add-after 'unpack 'fix-broken-tests
1438 ;; The tests try to run two scripts it expects should be
1439 ;; in PATH, but they aren't at this time (see:
1440 ;; https://github.com/hardbyte/python-can/issues/805).
1441 (lambda _
1442 (substitute* "test/test_scripts.py"
1443 (("\"can_logger\\.py --help\"") "")
1444 (("\"can_player\\.py --help\"") ""))
1445 #t)))))
1446 (propagated-inputs
1447 `(("python-aenum" ,python-aenum)
1448 ("python-wrapt" ,python-wrapt)))
1449 (native-inputs
1450 `(("python-codecov" ,python-codecov)
1451 ("python-coverage" ,python-coverage)
1452 ("python-future" ,python-future)
1453 ("python-hypothesis" ,python-hypothesis)
1454 ("python-mock" ,python-mock)
1455 ("python-pyserial" ,python-pyserial)
1456 ("python-pytest" ,python-pytest)
1457 ("python-pytest-cov" ,python-pytest-cov)
1458 ("python-pytest-runner" ,python-pytest-runner)
1459 ("python-pytest-timeout" ,python-pytest-timeout)))
1460 (home-page "https://github.com/hardbyte/python-can")
1461 (synopsis "Controller Area Network (CAN) interface module for Python")
1462 (description "This package defines the @code{can} module, which provides
1463 controller area network (CAN) support for Python developers; providing common
1464 abstractions to different hardware devices, and a suite of utilities for
1465 sending and receiving messages on a CAN bus.")
1466 (license license:lgpl3+)))
1467
1468 (define-public python-caniusepython3
1469 (package
1470 (name "python-caniusepython3")
1471 (version "7.2.0")
1472 (source
1473 (origin
1474 (method url-fetch)
1475 (uri (pypi-uri "caniusepython3" version))
1476 (sha256
1477 (base32
1478 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1479 (build-system python-build-system)
1480 (arguments
1481 `(#:phases (modify-phases %standard-phases
1482 (add-after 'unpack 'relax-requirements
1483 (lambda _
1484 (substitute* "setup.py"
1485 ;; These are for compatibility with Python 2.
1486 ((".*'argparse', 'backports.functools_lru_cache',.*")
1487 ""))
1488 (substitute* "dev_requirements.txt"
1489 ((".*pylint.*") "")) ;not actually required
1490 #t))
1491 (replace 'check
1492 (lambda _
1493 (invoke "py.test" "-k" "not NetworkTests"))))))
1494 (propagated-inputs
1495 `(("python-distlib" ,python-distlib)
1496 ("python-packaging" ,python-packaging)
1497 ("python-requests" ,python-requests)))
1498 (native-inputs
1499 `(("python-mock" ,python-mock)
1500 ("python-pytest" ,python-pytest)))
1501 (home-page "https://github.com/brettcannon/caniusepython3")
1502 (synopsis "Check for Python 3-incompatible Python libraries")
1503 (description "The @command{caniusepython3} command scans your project and
1504 reports the Python 3-incompatible libraries it found. It can also be used as
1505 a library.")
1506 (license license:asl2.0)))
1507
1508 (define-public python-diskcache
1509 (package
1510 (name "python-diskcache")
1511 (version "4.1.0")
1512 (source
1513 (origin
1514 (method url-fetch)
1515 (uri (pypi-uri "diskcache" version))
1516 (sha256
1517 (base32
1518 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1519 (build-system python-build-system)
1520 (arguments
1521 `(#:tests? #f)) ;test suite not included in the release
1522 (home-page "http://www.grantjenks.com/docs/diskcache/")
1523 (synopsis "Disk and file backed cache library")
1524 (description "DiskCache is a disk and file backed persistent cache.")
1525 (license license:asl2.0)))
1526
1527 (define-public python-bitstruct
1528 (package
1529 (name "python-bitstruct")
1530 (version "8.9.0")
1531 (source
1532 (origin
1533 (method url-fetch)
1534 (uri (pypi-uri "bitstruct" version))
1535 (sha256
1536 (base32
1537 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1538 (build-system python-build-system)
1539 (home-page "https://github.com/eerimoq/bitstruct")
1540 (synopsis "Python values to and C bit field structs converter")
1541 (description "This module performs conversions between Python values and C
1542 bit field structs represented as Python byte strings. It is intended to have
1543 a similar interface as the @code{struct} module from Python, but working on
1544 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1545 (license license:expat)))
1546
1547 (define-public python-cantools
1548 (package
1549 (name "python-cantools")
1550 (version "33.1.1")
1551 (source
1552 (origin
1553 ;; We take the sources from the Git repository as the documentation is
1554 ;; not included with the PyPI archive.
1555 (method git-fetch)
1556 (uri (git-reference
1557 (url "https://github.com/eerimoq/cantools")
1558 (commit version)))
1559 (file-name (git-file-name name version))
1560 (sha256
1561 (base32
1562 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1563 (build-system python-build-system)
1564 (arguments
1565 `(#:phases
1566 (modify-phases %standard-phases
1567 (add-after 'build 'build-doc
1568 (lambda _
1569 ;; See: https://github.com/eerimoq/cantools/issues/190.
1570 (substitute* "README.rst"
1571 (("https://github.com/eerimoq/cantools/raw/master\
1572 /docs/monitor.png")
1573 "monitor.png"))
1574 (with-directory-excursion "docs"
1575 (invoke "make" "man" "info"))))
1576 (add-after 'install 'install-doc
1577 (lambda* (#:key outputs #:allow-other-keys)
1578 (let* ((out (assoc-ref outputs "out"))
1579 (info (string-append out "/share/info"))
1580 (man1 (string-append out "/share/man/man1")))
1581 (format #t "CWD: ~s~%" (getcwd))
1582 (install-file "docs/_build/texinfo/cantools.info" info)
1583 (install-file "docs/_build/man/cantools.1" man1)
1584 #t))))))
1585 (native-inputs
1586 `(("sphinx" ,python-sphinx)
1587 ("texinfo" ,texinfo)))
1588 (propagated-inputs
1589 `(("python-bitstruct" ,python-bitstruct)
1590 ("python-can" ,python-can)
1591 ("python-diskcache" ,python-diskcache)
1592 ("python-textparser" ,python-textparser)))
1593 (home-page "https://github.com/eerimoq/cantools")
1594 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1595 (description "This package includes Controller Area Network (CAN) related
1596 tools that can be used to:
1597 @itemize
1598 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1599 @item encode and decode CAN messages
1600 @item multiplex simple and extended signals
1601 @item diagnose DID encoding and decoding
1602 @item dump the CAN decoder output
1603 @item test CAN nodes
1604 @item generate C source code
1605 @item monitor the CAN bus
1606 @end itemize")
1607 (license license:expat)))
1608
1609 (define-public python-capturer
1610 (package
1611 (name "python-capturer")
1612 (version "2.4")
1613 (source
1614 (origin
1615 (method url-fetch)
1616 (uri (pypi-uri "capturer" version))
1617 (sha256
1618 (base32
1619 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1620 (build-system python-build-system)
1621 (arguments
1622 `(#:tests? #f))
1623 (propagated-inputs
1624 `(("python-humanfriendly" ,python-humanfriendly)))
1625 (home-page "https://capturer.readthedocs.io")
1626 (synopsis "Capture stdout and stderr streams of the current process")
1627 (description
1628 "The capturer package makes it easy to capture the stdout and stderr
1629 streams of the current process and subprocesses. Output can be relayed
1630 to the terminal in real time but is also available to the Python program
1631 for additional processing.")
1632 (license license:expat)))
1633
1634 (define-public python2-capturer
1635 (package-with-python2 python-capturer))
1636
1637 (define-public python-case
1638 (package
1639 (name "python-case")
1640 (version "1.5.3")
1641 (source
1642 (origin
1643 (method url-fetch)
1644 (uri (pypi-uri "case" version))
1645 (sha256
1646 (base32
1647 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1648 (build-system python-build-system)
1649 (propagated-inputs
1650 `(("python-mock" ,python-mock)
1651 ("python-nose" ,python-nose)
1652 ("python-six" ,python-six)
1653 ("python-unittest2" ,python-unittest2)))
1654 (native-inputs
1655 `(("python-coverage" ,python-coverage)))
1656 (home-page "https://github.com/celery/case")
1657 (synopsis "Unittest utilities and convenience methods")
1658 (description
1659 "The @code{case} package provides utilities on top of unittest, including
1660 some helpful Python 2 compatibility convenience methods.")
1661 (license license:bsd-3)))
1662
1663 (define-public python-verboselogs
1664 (package
1665 (name "python-verboselogs")
1666 (version "1.7")
1667 (source
1668 (origin
1669 (method url-fetch)
1670 (uri (pypi-uri "verboselogs" version))
1671 (sha256
1672 (base32
1673 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1674 (build-system python-build-system)
1675 (arguments
1676 `(#:phases
1677 (modify-phases %standard-phases
1678 (replace 'check
1679 (lambda _
1680 ;; Do not run pylint plugin test, as astroid is an old
1681 ;; unsupported version.
1682 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1683 "verboselogs/tests.py"))))))
1684 (native-inputs
1685 `(("python-mock" ,python-mock)
1686 ("python-pytest" ,python-pytest)))
1687 (home-page "https://verboselogs.readthedocs.io")
1688 (synopsis "Verbose logging level for Python's logging module")
1689 (description
1690 "The @code{verboselogs} package extends Python's @code{logging} module to
1691 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1692 (license license:expat)))
1693
1694 (define-public python2-verboselogs
1695 (package-with-python2 python-verboselogs))
1696
1697 (define-public python-coloredlogs
1698 (package
1699 (name "python-coloredlogs")
1700 (version "10.0")
1701 (source
1702 (origin
1703 (method url-fetch)
1704 (uri (pypi-uri "coloredlogs" version))
1705 (sha256
1706 (base32
1707 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1708 (build-system python-build-system)
1709 (arguments
1710 `(;Tests require some updated modules
1711 #:tests? #f))
1712 (propagated-inputs
1713 `(("python-capturer" ,python-capturer)))
1714 (home-page "https://coloredlogs.readthedocs.io")
1715 (synopsis "Colored stream handler for Python's logging module")
1716 (description
1717 "The @code{coloredlogs} package enables colored terminal output for
1718 Python's logging module. The @code{ColoredFormatter} class inherits from
1719 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1720 messages in color.")
1721 (license license:expat)))
1722
1723 (define-public python2-coloredlogs
1724 (package-with-python2 python-coloredlogs))
1725
1726 (define-public python-editorconfig
1727 (package
1728 (name "python-editorconfig")
1729 (version "0.12.2")
1730 (source
1731 (origin
1732 (method url-fetch)
1733 (uri (pypi-uri "EditorConfig" version))
1734 (sha256
1735 (base32
1736 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1737 (build-system python-build-system)
1738 (home-page "https://editorconfig.org/")
1739 (synopsis "EditorConfig bindings for python")
1740 (description "The EditorConfig project consists of a file format for
1741 defining coding styles and a collection of text editor plugins that enable
1742 editors to read the file format and adhere to defined styles. EditorConfig
1743 files are easily readable and they work nicely with version control systems.")
1744 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1745 (license (list license:bsd-2 license:psfl))))
1746
1747 (define-public dosage
1748 (package
1749 (name "dosage")
1750 (version "2.17")
1751 (source
1752 (origin
1753 (method url-fetch)
1754 (uri (pypi-uri "dosage" version))
1755 (sha256
1756 (base32
1757 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1758 (build-system python-build-system)
1759 (propagated-inputs
1760 `(("python2-backports-functools-lru-cache"
1761 ,python2-backports-functools-lru-cache)
1762 ("python2-backports-shutil-get-terminal-size"
1763 ,python2-backports-shutil-get-terminal-size)
1764 ("python-cached-property" ,python-cached-property)
1765 ("python-colorama" ,python-colorama)
1766 ("python-imagesize" ,python-imagesize)
1767 ("python-importlib-metadata" ,python-importlib-metadata)
1768 ("python-lxml" ,python-lxml)
1769 ("python-requests" ,python-requests)
1770 ("python-six" ,python-six)))
1771 (native-inputs
1772 `(("python-pytest-cov" ,python-pytest-cov)
1773 ("python-pytest-xdist" ,python-pytest-xdist)
1774 ("python-responses" ,python-responses)
1775 ("python-setuptools-scm" ,python-setuptools-scm)))
1776 (home-page "https://github.com/webcomics/dosage")
1777 (synopsis "Comic strip downloader and archiver")
1778 (description "Dosage is designed to keep a local copy of specific webcomics and other
1779 picture-based content such as Picture of the Day sites. With the @command{dosage}
1780 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1781 downloaded, or download a strip for a particular date or index, if possible.")
1782 (license license:expat)))
1783
1784 (define-public python-et-xmlfile
1785 (package
1786 (name "python-et-xmlfile")
1787 (version "1.0.1")
1788 (source
1789 (origin
1790 (method url-fetch)
1791 (uri (pypi-uri "et_xmlfile" version))
1792 (sha256
1793 (base32
1794 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1795 (build-system python-build-system)
1796 (arguments
1797 `(#:phases (modify-phases %standard-phases
1798 (replace 'check
1799 (lambda _
1800 (invoke "pytest"))))))
1801 (native-inputs
1802 `(("python-pytest" ,python-pytest)
1803 ("python-lxml" ,python-lxml))) ;used for the tests
1804 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1805 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1806 (description "This Python library is based upon the @code{xmlfile} module
1807 from @code{lxml}. It aims to provide a low memory, compatible implementation
1808 of @code{xmlfile}.")
1809 (license license:expat)))
1810
1811 (define-public python2-et-xmlfile
1812 (package-with-python2 python-et-xmlfile))
1813
1814 (define-public python-openpyxl
1815 (package
1816 (name "python-openpyxl")
1817 (version "3.0.5")
1818 (source
1819 (origin
1820 ;; We use the upstream repository, as the tests are not included in the
1821 ;; PyPI releases.
1822 (method hg-fetch)
1823 (uri (hg-reference
1824 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1825 (changeset version)))
1826 (file-name (string-append name "-" version "-checkout"))
1827 (sha256
1828 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1829 (build-system python-build-system)
1830 (arguments
1831 `(#:phases (modify-phases %standard-phases
1832 (replace 'check
1833 (lambda _
1834 (invoke "pytest"))))))
1835 (native-inputs
1836 ;; For the test suite.
1837 `(("python-lxml" ,python-lxml)
1838 ("python-pillow" ,python-pillow)
1839 ("python-pytest" ,python-pytest)))
1840 (propagated-inputs
1841 `(("python-et-xmlfile" ,python-et-xmlfile)
1842 ("python-jdcal" ,python-jdcal)))
1843 (home-page "https://openpyxl.readthedocs.io")
1844 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1845 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1846 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1847 standard.")
1848 (properties `((python2-variant . ,(delay python2-openpyxl))))
1849 (license license:expat)))
1850
1851 (define-public python2-openpyxl
1852 (let ((base (package-with-python2
1853 (strip-python2-variant python-openpyxl))))
1854 (package
1855 (inherit base)
1856 ;; This is the latest version that has python2 support
1857 (version "2.6.4")
1858 (source
1859 (origin
1860 (method url-fetch)
1861 (uri (pypi-uri "openpyxl" version))
1862 (sha256
1863 (base32
1864 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1865 (arguments '(#:tests? #f))))) ; No test suite.
1866
1867 (define-public python-eventlet
1868 (package
1869 (name "python-eventlet")
1870 (version "0.25.1")
1871 (source
1872 (origin
1873 (method url-fetch)
1874 (uri (pypi-uri "eventlet" version))
1875 (sha256
1876 (base32
1877 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1878 (build-system python-build-system)
1879 (propagated-inputs
1880 `(("python-dnspython" ,python-dnspython)
1881 ("python-greenlet" ,python-greenlet)
1882 ("python-monotonic" ,python-monotonic)))
1883 (arguments
1884 ;; TODO: Requires unpackaged 'enum-compat'.
1885 '(#:tests? #f))
1886 (home-page "https://eventlet.net")
1887 (synopsis "Concurrent networking library for Python")
1888 (description
1889 "Eventlet is a concurrent networking library for Python that
1890 allows you to change how you run your code, not how you write it.
1891 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1892 Coroutines ensure that the developer uses a blocking style of programming
1893 that is similar to threading, but provide the benefits of non-blocking I/O.
1894 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1895 from the Python interpreter, or as a small part of a larger application.")
1896 (license license:expat)))
1897
1898 (define-public python-six
1899 (package
1900 (name "python-six")
1901 (version "1.14.0")
1902 (source
1903 (origin
1904 (method url-fetch)
1905 (uri (pypi-uri "six" version))
1906 (sha256
1907 (base32
1908 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1909 (build-system python-build-system)
1910 (arguments
1911 `(#:phases
1912 (modify-phases %standard-phases
1913 (replace 'check
1914 (lambda _
1915 (invoke "py.test" "-v"))))))
1916 (native-inputs
1917 `(("python-pytest" ,python-pytest-bootstrap)))
1918 (home-page "https://pypi.org/project/six/")
1919 (synopsis "Python 2 and 3 compatibility utilities")
1920 (description
1921 "Six is a Python 2 and 3 compatibility library. It provides utility
1922 functions for smoothing over the differences between the Python versions with
1923 the goal of writing Python code that is compatible on both Python versions.
1924 Six supports every Python version since 2.5. It is contained in only one
1925 Python file, so it can be easily copied into your project.")
1926 (license license:x11)))
1927
1928 (define-public python2-six
1929 (package-with-python2 python-six))
1930
1931 (define-public python-six-bootstrap
1932 (package
1933 (inherit python-six)
1934 (name "python-six-bootstrap")
1935 (native-inputs `())
1936 (arguments `(#:tests? #f))))
1937
1938 (define-public python2-six-bootstrap
1939 (package-with-python2 python-six-bootstrap))
1940
1941 (define-public python-schedule
1942 (package
1943 (name "python-schedule")
1944 (version "0.4.3")
1945 (source
1946 (origin
1947 (method url-fetch)
1948 (uri (pypi-uri "schedule" version))
1949 (sha256
1950 (base32
1951 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1952 (build-system python-build-system)
1953 (native-inputs
1954 `(("python-pytest" ,python-pytest)
1955 ("python-mock" ,python-mock)))
1956 (home-page "https://github.com/dbader/schedule")
1957 (synopsis "Schedule periodic function calls in Python")
1958 (description
1959 "Schedule is an in-process scheduler for periodic jobs that uses the
1960 builder pattern for configuration. Schedule lets you run Python functions (or
1961 any other callable) periodically at pre-determined intervals using a simple,
1962 human-friendly syntax.")
1963 (license license:expat)))
1964
1965 (define-public python2-schedule
1966 (package-with-python2 python-schedule))
1967
1968 (define-public python-scour
1969 (package
1970 (name "python-scour")
1971 (version "038.1")
1972 (source
1973 (origin
1974 (method git-fetch)
1975 (uri
1976 (git-reference
1977 (url "https://github.com/scour-project/scour")
1978 (commit
1979 (string-append "v" version))))
1980 (file-name (git-file-name name version))
1981 (sha256
1982 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1983 (propagated-inputs
1984 `(("python-six" ,python-six)))
1985 (build-system python-build-system)
1986 (home-page "https://github.com/scour-project/scour")
1987 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1988 (description "The goal of Scour is to output a file that renderes
1989 identically at a fraction of the size by removing a lot of redundant
1990 information created by most SVG editors. Optimization options are typically
1991 lossless but can be tweaked for more aggressive cleaning.")
1992 (license license:asl2.0)))
1993
1994 (define-public python-mechanize
1995 (package
1996 (name "python-mechanize")
1997 (version "0.4.5")
1998 (source
1999 (origin
2000 (method url-fetch)
2001 (uri (pypi-uri "mechanize" version))
2002 (sha256
2003 (base32
2004 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2005 (build-system python-build-system)
2006 (propagated-inputs
2007 `(("python-html5lib" ,python-html5lib)))
2008 (home-page "https://github.com/python-mechanize/mechanize")
2009 (synopsis
2010 "Stateful programmatic web browsing in Python")
2011 (description
2012 "Mechanize implements stateful programmatic web browsing in Python,
2013 after Andy Lester’s Perl module WWW::Mechanize.")
2014 (license license:bsd-3)))
2015
2016 (define-public python2-mechanize
2017 (package-with-python2 python-mechanize))
2018
2019 (define-public python-simpleaudio
2020 (package
2021 (name "python-simpleaudio")
2022 (version "1.0.4")
2023 (source
2024 (origin
2025 (method url-fetch)
2026 (uri (pypi-uri "simpleaudio" version))
2027 (sha256
2028 (base32
2029 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2030 (build-system python-build-system)
2031 (arguments
2032 `(#:tests? #f))
2033 (inputs
2034 `(("alsa-lib" ,alsa-lib)))
2035 (home-page
2036 "https://github.com/hamiltron/py-simple-audio")
2037 (synopsis "Simple, asynchronous audio playback for Python 3")
2038 (description
2039 "The @code{simplaudio} package provides cross-platform, dependency-free
2040 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2041 (license license:expat))) ; MIT license
2042
2043 (define-public python-simplejson
2044 (package
2045 (name "python-simplejson")
2046 (version "3.17.0")
2047 (source
2048 (origin
2049 (method url-fetch)
2050 (uri (pypi-uri "simplejson" version))
2051 (sha256
2052 (base32
2053 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
2054 (build-system python-build-system)
2055 (home-page "http://simplejson.readthedocs.org/en/latest/")
2056 (synopsis
2057 "Json library for Python")
2058 (description
2059 "JSON (JavaScript Object Notation) is a subset of JavaScript
2060 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2061 format.
2062
2063 Simplejson exposes an API familiar to users of the standard library marshal
2064 and pickle modules. It is the externally maintained version of the json
2065 library contained in Python 2.6, but maintains compatibility with Python 2.5
2066 and (currently) has significant performance advantages, even without using
2067 the optional C extension for speedups. Simplejson is also supported on
2068 Python 3.3+.")
2069 (license license:x11)))
2070
2071 (define-public python2-simplejson
2072 (package-with-python2 python-simplejson))
2073
2074
2075 (define-public python-pyicu
2076 (package
2077 (name "python-pyicu")
2078 (version "2.4.3")
2079 (source
2080 (origin
2081 (method url-fetch)
2082 (uri (pypi-uri "PyICU" version))
2083 (sha256
2084 (base32
2085 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
2086 (build-system python-build-system)
2087 (inputs
2088 `(("icu4c" ,icu4c)))
2089 (native-inputs
2090 `(("python-pytest" ,python-pytest)
2091 ("python-six" ,python-six)))
2092 (home-page "https://github.com/ovalhub/pyicu")
2093 (synopsis "Python extension wrapping the ICU C++ API")
2094 (description
2095 "PyICU is a python extension wrapping the ICU C++ API.")
2096 (license license:x11)))
2097
2098 (define-public python2-pyicu
2099 (package-with-python2 python-pyicu))
2100
2101 (define-public python-dogtail
2102 (package
2103 (name "python-dogtail")
2104 (version "0.9.11")
2105 (source (origin
2106 (method url-fetch)
2107 (uri
2108 (string-append
2109 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2110 "dogtail-" version ".tar.gz"))
2111 (sha256
2112 (base32
2113 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2114 (build-system python-build-system)
2115 (arguments
2116 `(#:tests? #f ; TODO Launching dbus for the tests
2117 ; fails
2118 #:phases
2119 (modify-phases %standard-phases
2120 (replace 'check
2121 (lambda* (#:key tests? #:allow-other-keys)
2122 (when tests?
2123 (system "Xvfb :1 &")
2124 (setenv "DISPLAY" ":1")
2125 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2126 #t)))))
2127 (propagated-inputs
2128 `(("python-pygobject" ,python-pygobject)
2129 ("python-pycairo" ,python-pycairo)
2130 ("python-pyatspi" ,python-pyatspi)))
2131 (native-inputs
2132 `(("python-nose" ,python-nose)
2133 ("gtk+" ,gtk+)
2134 ("xvfb" ,xorg-server)
2135 ("dbus" ,dbus)
2136 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2137 ("gobject-introspection" ,gobject-introspection)))
2138 (home-page "https://gitlab.com/dogtail/dogtail/")
2139 (synopsis "GUI test tool and automation framework written in Python")
2140 (description
2141 "Dogtail is a GUI test tool and automation framework written in Python.
2142 It uses Accessibility (a11y) technologies to communicate with desktop
2143 applications. dogtail scripts are written in Python and executed like any
2144 other Python program.")
2145 (license license:gpl2+)))
2146
2147 (define-public python2-dogtail
2148 (package-with-python2 python-dogtail))
2149
2150 (define-public python-empy
2151 (package
2152 (name "python-empy")
2153 (version "3.3.3")
2154 (source (origin
2155 (method url-fetch)
2156 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2157 version ".tar.gz"))
2158 (sha256
2159 (base32
2160 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2161 (build-system python-build-system)
2162 (arguments
2163 `(#:tests? #f)) ; python2 only
2164 (home-page "http://www.alcyone.com/software/empy/")
2165 (synopsis "Templating system for Python")
2166 (description
2167 "EmPy is a system for embedding Python expressions and statements in
2168 template text; it takes an EmPy source file, processes it, and produces
2169 output. This is accomplished via expansions, which are special signals to the
2170 EmPy system and are set off by a special prefix (by default the at sign, @@).
2171 EmPy can expand arbitrary Python expressions and statements in this way, as
2172 well as a variety of special forms. Textual data not explicitly delimited in
2173 this way is sent unaffected to the output, allowing Python to be used in
2174 effect as a markup language. Also supported are callbacks via hooks,
2175 recording and playback via diversions, and dynamic, chainable filters. The
2176 system is highly configurable via command line options and embedded
2177 commands.")
2178 (license license:lgpl2.1+)))
2179
2180 (define-public python2-empy
2181 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2182 (package/inherit base
2183 (arguments `(,@(package-arguments base)
2184 #:tests? #t)))))
2185
2186 (define-public python2-element-tree
2187 (package
2188 (name "python2-element-tree")
2189 (version "1.2.6")
2190 (source (origin
2191 (method url-fetch)
2192 (uri (string-append
2193 "http://effbot.org/media/downloads/elementtree-"
2194 version "-20050316.tar.gz"))
2195 (sha256
2196 (base32
2197 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2198 (build-system python-build-system)
2199 (arguments
2200 `(#:python ,python-2 ; seems to be part of Python 3
2201 #:tests? #f)) ; no 'test' sub-command
2202 (synopsis "Toolkit for XML processing in Python")
2203 (description
2204 "ElementTree is a Python library supporting lightweight XML processing.")
2205 (home-page "https://effbot.org/zone/element-index.htm")
2206 (license (license:x11-style
2207 "http://docs.python.org/2/license.html"
2208 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2209
2210 (define-public python2-pybugz
2211 (package
2212 (name "python2-pybugz")
2213 (version "0.6.11")
2214 (source (origin
2215 (method url-fetch)
2216 (uri (string-append
2217 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2218 version ".tar.gz"))
2219 (sha256
2220 (base32
2221 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2222 (patches (search-patches "pybugz-stty.patch"
2223 "pybugz-encode-error.patch"))))
2224 (build-system python-build-system)
2225 (arguments
2226 `(#:python ,python-2 ; SyntaxError with Python 3
2227 #:tests? #f)) ; no 'test' sub-command
2228 (propagated-inputs
2229 `(("element-tree" ,python2-element-tree)))
2230 (synopsis "Python and command-line interface to Bugzilla")
2231 (description
2232 "PyBugz is a Python library and command-line tool to query the Bugzilla
2233 bug tracking system. It is meant as an aid to speed up interaction with the
2234 bug tracker.")
2235 (home-page "http://www.liquidx.net/pybugz/")
2236 (license license:gpl2)))
2237
2238 (define-public python2-enum
2239 (package
2240 (name "python2-enum")
2241 (version "0.4.6")
2242 (source (origin
2243 (method url-fetch)
2244 (uri (pypi-uri "enum" version))
2245 (sha256
2246 (base32
2247 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2248 (build-system python-build-system)
2249 (arguments
2250 `(#:python ,python-2))
2251 (home-page "https://pypi.org/project/enum/")
2252 (synopsis "Robust enumerated type support in Python")
2253 (description
2254 "This provides a module for robust enumerations in Python. It has
2255 been superseded by the Python standard library and is provided only for
2256 compatibility.")
2257 ;; Choice of either license.
2258 (license (list license:gpl3+ license:psfl))))
2259
2260 (define-public python-enum34
2261 (package
2262 (name "python-enum34")
2263 (version "1.1.6")
2264 (source
2265 (origin
2266 (method url-fetch)
2267 (uri (pypi-uri "enum34" version))
2268 (sha256
2269 (base32
2270 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2271 (build-system python-build-system)
2272 (home-page "https://pypi.org/project/enum34/")
2273 (synopsis "Backported Python 3.4 Enum")
2274 (description
2275 "Enum34 is the new Python stdlib enum module available in Python 3.4
2276 backported for previous versions of Python from 2.4 to 3.3.")
2277 (license license:bsd-3)))
2278
2279 (define-public python2-enum34
2280 (package-with-python2 python-enum34))
2281
2282 (define-public python-parse-type
2283 (package
2284 (name "python-parse-type")
2285 (version "0.4.2")
2286 (source
2287 (origin
2288 (method url-fetch)
2289 (uri (pypi-uri "parse_type" version))
2290 (sha256
2291 (base32
2292 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2293 (build-system python-build-system)
2294 (propagated-inputs
2295 `(("python-six" ,python-six)
2296 ("python-parse" ,python-parse)))
2297 (native-inputs
2298 `(("python-pytest" ,python-pytest)
2299 ("python-pytest-runner" ,python-pytest-runner)))
2300 (home-page "https://github.com/jenisys/parse_type")
2301 (synopsis "Extended parse module")
2302 (description
2303 "Parse_type extends the python parse module.")
2304 (properties
2305 `((python2-variant . ,(delay python2-parse-type))))
2306 (license license:bsd-3)))
2307
2308 (define-public python2-parse-type
2309 (let ((base (package-with-python2
2310 (strip-python2-variant python-parse-type))))
2311 (package/inherit base
2312 (propagated-inputs
2313 `(("python2-enum34" ,python2-enum34)
2314 ,@(package-propagated-inputs base))))))
2315
2316 (define-public python-parse
2317 (package
2318 (name "python-parse")
2319 (version "1.18.0")
2320 (source
2321 (origin
2322 (method url-fetch)
2323 (uri (pypi-uri "parse" version))
2324 (sha256
2325 (base32
2326 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2327 (build-system python-build-system)
2328 (arguments
2329 `(#:phases
2330 (modify-phases %standard-phases
2331 (replace 'check
2332 (lambda _ (invoke "python" "test_parse.py"))))))
2333 (home-page "https://github.com/r1chardj0n3s/parse")
2334 (synopsis "Parse strings")
2335 (description
2336 "Parse strings using a specification based on the Python @code{format()}
2337 syntax.")
2338 (license license:x11)))
2339
2340 (define-public python-polib
2341 (package
2342 (name "python-polib")
2343 (version "1.1.0")
2344 (source (origin
2345 (method url-fetch)
2346 (uri (pypi-uri "polib" version))
2347 (sha256
2348 (base32
2349 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2350 (build-system python-build-system)
2351 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2352 (synopsis "Manipulate, create and modify gettext files")
2353 (description "Polib can manipulate any gettext format (po, pot and mo)
2354 files. It can be used to create po files from scratch or to modify
2355 existing ones.")
2356 (license license:expat)))
2357
2358 (define-public python2-polib
2359 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2360 (package/inherit base
2361 (arguments `(,@(package-arguments base)
2362 ;; Tests don't work with python2.
2363 #:tests? #f)))))
2364
2365 (define-public python-poyo
2366 (package
2367 (name "python-poyo")
2368 (version "0.5.0")
2369 (source
2370 (origin
2371 (method url-fetch)
2372 (uri (pypi-uri "poyo" version))
2373 (sha256
2374 (base32
2375 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2376 (build-system python-build-system)
2377 (home-page "https://github.com/hackebrot/poyo")
2378 (synopsis "Lightweight YAML Parser for Python")
2379 (description
2380 "This package provides a lightweight YAML Parser for Python. It supports
2381 only a chosen subset of the YAML format that is required to parse cookiecutter
2382 user configuration files. It does not have support for serializing into YAML
2383 and is not compatible with JSON.")
2384 (license license:expat)))
2385
2386 (define-public scons
2387 (package
2388 (name "scons")
2389 (version "3.0.4")
2390 (source (origin
2391 (method git-fetch)
2392 (uri (git-reference
2393 (url "https://github.com/SCons/scons")
2394 (commit version)))
2395 (file-name (git-file-name name version))
2396 (sha256
2397 (base32
2398 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2399 (build-system python-build-system)
2400 (arguments
2401 `(#:use-setuptools? #f ; still relies on distutils
2402 #:tests? #f ; no 'python setup.py test' command
2403 #:phases
2404 (modify-phases %standard-phases
2405 (add-before 'build 'bootstrap
2406 (lambda _
2407 (substitute* "src/engine/SCons/compat/__init__.py"
2408 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2409 "sys.modules[new] = __import__(old)"))
2410 (substitute* "src/engine/SCons/Platform/__init__.py"
2411 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2412 "mod = __import__(full_name)"))
2413 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2414 (chdir "build/scons")
2415 #t)))))
2416 (home-page "https://scons.org/")
2417 (synopsis "Software construction tool written in Python")
2418 (description
2419 "SCons is a software construction tool. Think of SCons as an improved,
2420 cross-platform substitute for the classic Make utility with integrated
2421 functionality similar to autoconf/automake and compiler caches such as ccache.
2422 In short, SCons is an easier, more reliable and faster way to build
2423 software.")
2424 (license license:x11)))
2425
2426 (define-public scons-python2
2427 (package
2428 (inherit (package-with-python2 scons))
2429 (name "scons-python2")))
2430
2431 (define-public python-extension-helpers
2432 (package
2433 (name "python-extension-helpers")
2434 (version "0.1")
2435 (source
2436 (origin
2437 (method url-fetch)
2438 (uri (pypi-uri "extension-helpers" version))
2439 (sha256
2440 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2441 (build-system python-build-system)
2442 (native-inputs
2443 `(("coverage" ,python-coverage)
2444 ("pytest" ,python-pytest-astropy)
2445 ("pytest-cov" ,python-pytest-cov)
2446 ("setuptools-scm" ,python-setuptools-scm)))
2447 (home-page "https://github.com/astropy/astropy-helpers")
2448 (synopsis
2449 "Utilities for building and installing packages in the Astropy ecosystem")
2450 (description
2451 "The extension-helpers package includes many build, installation, and
2452 documentation-related tools used by the Astropy project.")
2453 (license license:bsd-3)))
2454
2455 (define-public python-extras
2456 (package
2457 (name "python-extras")
2458 (version "1.0.0")
2459 (source
2460 (origin
2461 (method url-fetch)
2462 (uri (pypi-uri "extras" version))
2463 (sha256
2464 (base32
2465 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2466 (build-system python-build-system)
2467 (arguments
2468 ;; FIXME: Circular dependency on testtools.
2469 '(#:tests? #f))
2470 (home-page "https://github.com/testing-cabal/extras")
2471 (synopsis "Useful extensions to the Python standard library")
2472 (description
2473 "Extras is a set of extensions to the Python standard library.")
2474 (license license:expat)))
2475
2476 (define-public python2-extras
2477 (package-with-python2 python-extras))
2478
2479 (define-public python-mimeparse
2480 (package
2481 (name "python-mimeparse")
2482 (version "1.6.0")
2483 (source
2484 (origin
2485 (method url-fetch)
2486 (uri (pypi-uri "python-mimeparse" version))
2487 (sha256
2488 (base32
2489 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2490 (build-system python-build-system)
2491 (arguments
2492 '(#:phases
2493 (modify-phases %standard-phases
2494 (replace 'check
2495 (lambda _
2496 (invoke "./mimeparse_test.py"))))))
2497 (home-page
2498 "https://github.com/dbtsai/python-mimeparse")
2499 (synopsis "Python library for parsing MIME types")
2500 (description
2501 "Mimeparse provides basic functions for parsing MIME type names and
2502 matching them against a list of media-ranges.")
2503 (license license:expat)))
2504
2505 (define-public python2-mimeparse
2506 (package-with-python2 python-mimeparse))
2507
2508 (define-public python-miniboa
2509 (package
2510 (name "python-miniboa")
2511 (version "1.0.7")
2512 (source
2513 (origin
2514 (method url-fetch)
2515 (uri (pypi-uri "miniboa" version))
2516 (sha256
2517 (base32
2518 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2519 (build-system python-build-system)
2520 (home-page "https://github.com/shmup/miniboa")
2521 (synopsis "Simple, single-threaded Telnet server")
2522 (description
2523 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2524 server.")
2525 (license license:asl2.0)))
2526
2527 (define-public python2-miniboa
2528 (package-with-python2 python-miniboa))
2529
2530 (define-public python-pafy
2531 (package
2532 (name "python-pafy")
2533 (version "0.5.3.1")
2534 (source
2535 (origin
2536 (method url-fetch)
2537 (uri (pypi-uri "pafy" version))
2538 (sha256
2539 (base32
2540 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2541 (build-system python-build-system)
2542 (arguments
2543 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2544 (propagated-inputs
2545 ;; Youtube-dl is a python package which is imported in the file
2546 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2547 `(("youtube-dl" ,youtube-dl)))
2548 (home-page "https://np1.github.io/pafy/")
2549 (synopsis "Retrieve YouTube content and metadata")
2550 (description
2551 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2552 (license license:lgpl3+)))
2553
2554 (define-public python2-funcsigs
2555 (package
2556 (name "python2-funcsigs")
2557 (version "1.0.2")
2558 (source (origin
2559 (method url-fetch)
2560 (uri (pypi-uri "funcsigs" version))
2561 (sha256
2562 (base32
2563 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2564 (build-system python-build-system)
2565 (arguments
2566 `(#:python ,python-2))
2567 (native-inputs
2568 `(("python2-unittest2" ,python2-unittest2)))
2569 (home-page "http://funcsigs.readthedocs.org")
2570 (synopsis "Python function signatures from PEP362")
2571 (description
2572 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2573 (license license:asl2.0)))
2574
2575 (define-public python2-funcsigs-bootstrap
2576 (package
2577 (inherit python2-funcsigs)
2578 (name "python2-funcsigs-bootstrap")
2579 (native-inputs `())
2580 (arguments
2581 `(#:tests? #f
2582 ,@(package-arguments python2-funcsigs)))))
2583
2584 (define-public python-py
2585 (package
2586 (name "python-py")
2587 (version "1.8.1")
2588 (source
2589 (origin
2590 (method url-fetch)
2591 (uri (pypi-uri "py" version))
2592 (sha256
2593 (base32
2594 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2595 (build-system python-build-system)
2596 (arguments
2597 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2598 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2599 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2600 ;; Is this module globally installed?"
2601 '(#:tests? #f))
2602 (native-inputs
2603 `(("python-setuptools-scm" ,python-setuptools-scm)))
2604 (home-page "https://github.com/pytest-dev/py")
2605 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2606 (description
2607 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2608 code introspection, and logging.")
2609 (license license:expat)))
2610
2611 (define-public python-py-next
2612 (package
2613 (inherit python-py)
2614 (version "1.9.0")
2615 (source
2616 (origin
2617 (method url-fetch)
2618 (uri (pypi-uri "py" version))
2619 (sha256
2620 (base32
2621 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
2622
2623 (define-public python2-py
2624 (package-with-python2 python-py))
2625
2626 ;; Recent versions of python-fixtures and python-testrepository need
2627 ;; python-pbr for packaging, which itself needs these two packages for
2628 ;; testing.
2629 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2630 ;; same source, just without any test dependencies and with tests disabled.
2631 ;; python-pbr-minmal is then used to package python-fixtures and
2632 ;; python-testrepository.
2633 ;; Strictly speaking we currently could remove the test-requirements from the
2634 ;; normal python-pbr package (and save this package) since test are disabled
2635 ;; there anyway. But this may change in future.
2636 (define-public python-pbr-minimal
2637 (package
2638 (name "python-pbr-minimal")
2639 (version "3.0.1")
2640 (source
2641 (origin
2642 (method url-fetch)
2643 (uri (pypi-uri "pbr" version))
2644 (sha256
2645 (base32
2646 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2647 (build-system python-build-system)
2648 (arguments
2649 `(#:tests? #f))
2650 (home-page "https://docs.openstack.org/pbr/latest/")
2651 (synopsis "Minimal build of python-pbr used for bootstrapping")
2652 (description
2653 "Used only for bootstrapping python2-pbr, you should not need this.")
2654 (license license:asl2.0)))
2655
2656 (define-public python-pbr
2657 (package
2658 (inherit python-pbr-minimal)
2659 (name "python-pbr")
2660 (arguments
2661 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2662 (propagated-inputs
2663 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2664 (native-inputs
2665 `(("python-fixtures" ,python-fixtures-bootstrap)
2666 ;; discover, coverage, hacking, subunit
2667 ("python-mock" ,python-mock)
2668 ("python-six" ,python-six)
2669 ("python-sphinx" ,python-sphinx)
2670 ("python-testrepository" ,python-testrepository-bootstrap)
2671 ("python-testresources" ,python-testresources-bootstrap)
2672 ("python-testscenarios" ,python-testscenarios-bootstrap)
2673 ("python-testtools" ,python-testtools-bootstrap)
2674 ("python-virtualenv" ,python-virtualenv)))
2675 (synopsis "Enhance the default behavior of Python’s setuptools")
2676 (description
2677 "Python Build Reasonableness (PBR) is a library that injects some useful
2678 and sensible default behaviors into your setuptools run. It will set
2679 versions, process requirements files and generate AUTHORS and ChangeLog file
2680 from git information.
2681 ")))
2682
2683 (define-public python-pyrsistent
2684 (package
2685 (name "python-pyrsistent")
2686 (version "0.16.0")
2687 (home-page "https://github.com/tobgu/pyrsistent")
2688 (source (origin
2689 (method url-fetch)
2690 (uri (pypi-uri "pyrsistent" version))
2691 (sha256
2692 (base32
2693 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2694 (build-system python-build-system)
2695 (arguments
2696 '(#:phases (modify-phases %standard-phases
2697 ;; The package works fine with newer Pytest and Hypothesis, but
2698 ;; has pinned older versions to stay compatible with Python 2.
2699 (add-before 'check 'loosen-pytest-requirement
2700 (lambda _
2701 (substitute* "setup.py"
2702 (("pytest<5") "pytest")
2703 (("hypothesis<5") "hypothesis"))
2704 #t)))))
2705 (native-inputs
2706 `(("python-hypothesis" ,python-hypothesis)
2707 ("python-pytest" ,python-pytest)
2708 ("python-pytest-runner" ,python-pytest-runner)))
2709 (propagated-inputs
2710 `(("python-six" ,python-six)))
2711 (synopsis "Persistent data structures for Python")
2712 (description
2713 "Pyrsistent is a number of persistent collections (by some referred to as
2714 functional data structures). Persistent in the sense that they are immutable.
2715
2716 All methods on a data structure that would normally mutate it instead return a
2717 new copy of the structure containing the requested updates. The original
2718 structure is left untouched.")
2719 (license license:expat)))
2720
2721 (define-public python2-pyrsistent
2722 (package-with-python2 python-pyrsistent))
2723
2724 (define-public python-exif-read
2725 (package
2726 (name "python-exif-read")
2727 (version "2.1.2")
2728 (source (origin
2729 (method url-fetch)
2730 (uri (pypi-uri "ExifRead" version))
2731 (sha256
2732 (base32
2733 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2734 (build-system python-build-system)
2735 (arguments `(#:tests? #f)) ; no tests
2736 (home-page "https://github.com/ianare/exif-py")
2737 (synopsis "Python library to extract EXIF data from image files")
2738 (description
2739 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2740 files.")
2741 (license license:bsd-3)))
2742
2743 (define-public python2-exif-read
2744 (package-with-python2 python-exif-read))
2745
2746 (define-public python-pyld
2747 (package
2748 (name "python-pyld")
2749 (version "1.0.5")
2750 (source (origin
2751 (method url-fetch)
2752 (uri (pypi-uri "PyLD" version))
2753 (sha256
2754 (base32
2755 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2756 (build-system python-build-system)
2757 (home-page "https://github.com/digitalbazaar/pyld")
2758 (synopsis "Python implementation of the JSON-LD specification")
2759 (description
2760 "PyLD is an implementation of the JSON-LD specification.")
2761 (license license:bsd-3)))
2762
2763 (define-public python2-pyld
2764 (package-with-python2 python-pyld))
2765
2766 (define-public python-cli-helpers
2767 (package
2768 (name "python-cli-helpers")
2769 (version "2.0.1")
2770 (source
2771 (origin
2772 ;; There's no source tarball on PyPI.
2773 (method git-fetch)
2774 (uri (git-reference
2775 (url "https://github.com/dbcli/cli_helpers")
2776 (commit (string-append "v" version))))
2777 (file-name (git-file-name name version))
2778 (sha256
2779 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2780 (build-system python-build-system)
2781 (native-inputs
2782 `(("python-pytest" ,python-pytest)))
2783 (propagated-inputs
2784 `(("python-wcwidth" ,python-wcwidth)
2785 ("python-configobj" ,python-configobj)
2786 ("python-tabulate" ,python-tabulate)
2787 ("python-terminaltables" ,python-terminaltables)))
2788 (home-page "https://github.com/dbcli/cli_helpers")
2789 (synopsis "Helpers for building command-line apps")
2790 (description
2791 "CLI Helpers is a Python package that makes it easy to perform common
2792 tasks when building command-line apps. It's a helper library for command-line
2793 interfaces.")
2794 (license license:bsd-3)))
2795
2796 (define-public python-click
2797 (package
2798 (name "python-click")
2799 (version "7.1.2")
2800 (source
2801 (origin
2802 (method url-fetch)
2803 (uri (pypi-uri "click" version))
2804 (sha256
2805 (base32
2806 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2807 (build-system python-build-system)
2808 (arguments
2809 `(#:phases
2810 (modify-phases %standard-phases
2811 (add-after 'unpack 'fix-paths
2812 (lambda* (#:key inputs #:allow-other-keys)
2813 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2814 "cross-libc" "libc"))))
2815 (substitute* "src/click/_unicodefun.py"
2816 (("'locale'")
2817 (string-append "'" glibc "/bin/locale'"))))
2818 #t))
2819 (replace 'check
2820 (lambda _
2821 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2822 (invoke "python" "-m" "pytest"))))))
2823 (native-inputs
2824 `(("python-pytest" ,python-pytest)))
2825 (home-page "https://palletsprojects.com/p/click/")
2826 (synopsis "Command line library for Python")
2827 (description
2828 "Click is a Python package for creating command line interfaces in a
2829 composable way with as little code as necessary. Its name stands for
2830 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2831 with sensible defaults out of the box.")
2832 (license license:bsd-3)))
2833
2834 (define-public python2-click
2835 (package-with-python2 python-click))
2836
2837 (define-public python-click-5
2838 (package (inherit python-click)
2839 (name "python-click")
2840 (version "5.1")
2841 (source
2842 (origin
2843 (method url-fetch)
2844 (uri (pypi-uri "click" version))
2845 (sha256
2846 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2847 (arguments `())))
2848
2849 (define-public python-vcversioner
2850 (package
2851 (name "python-vcversioner")
2852 (version "2.16.0.0")
2853 (source
2854 (origin
2855 (method url-fetch)
2856 (uri (pypi-uri "vcversioner" version))
2857 (sha256
2858 (base32
2859 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2860 (build-system python-build-system)
2861 (synopsis "Python library for version number discovery")
2862 (description "Vcversioner is a Python library that inspects tagging
2863 information in a variety of version control systems in order to discover
2864 version numbers.")
2865 (home-page "https://github.com/habnabit/vcversioner")
2866 (license license:isc)))
2867
2868 (define-public python2-vcversioner
2869 (package-with-python2 python-vcversioner))
2870
2871 (define-public python-jdcal
2872 (package
2873 (name "python-jdcal")
2874 (version "1.4")
2875 (source
2876 (origin
2877 (method url-fetch)
2878 (uri (pypi-uri "jdcal" version))
2879 (sha256
2880 (base32
2881 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2882 (build-system python-build-system)
2883 (arguments
2884 `(#:phases (modify-phases %standard-phases
2885 (replace 'check
2886 (lambda _
2887 (invoke "pytest"))))))
2888 (native-inputs
2889 `(("python-pytest" ,python-pytest)))
2890 (home-page "https://github.com/phn/jdcal")
2891 (synopsis "Functions to convert between Julian dates Gregorian dates")
2892 (description "This Python library provides functions for converting
2893 between Julian dates and Gregorian dates.")
2894 (license license:bsd-2)))
2895
2896 (define-public python2-jdcal
2897 (package-with-python2 python-jdcal))
2898
2899 (define-public python-jsondiff
2900 (package
2901 (name "python-jsondiff")
2902 (version "1.2.0")
2903 (source
2904 (origin
2905 (method url-fetch)
2906 (uri (pypi-uri "jsondiff" version))
2907 (sha256
2908 (base32
2909 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2910 (build-system python-build-system)
2911 (native-inputs
2912 `(("python-nose" ,python-nose)
2913 ("python-nose-random" ,python-nose-random)))
2914 (home-page
2915 "https://github.com/fzumstein/jsondiff")
2916 (synopsis "Compare JSON and JSON-like structures in Python")
2917 (description "@code{jsondiff} is a Python library which lets you
2918 compare, diff, and patch JSON and JSON-like structures in Python.")
2919 (license license:expat)))
2920
2921 (define-public python-jsonschema
2922 (package
2923 (name "python-jsonschema")
2924 (version "3.2.0")
2925 (source (origin
2926 (method url-fetch)
2927 (uri (pypi-uri "jsonschema" version))
2928 (sha256
2929 (base32
2930 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2931 (build-system python-build-system)
2932 (arguments
2933 '(#:phases
2934 (modify-phases %standard-phases
2935 (replace 'check
2936 (lambda* (#:key inputs outputs #:allow-other-keys)
2937 (add-installed-pythonpath inputs outputs)
2938 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2939 (invoke "trial" "jsonschema"))))))
2940 (native-inputs
2941 `(("python-setuptools_scm" ,python-setuptools-scm)
2942 ("python-twisted" ,python-twisted)))
2943 (propagated-inputs
2944 `(("python-attrs" ,python-attrs)
2945 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2946 ("python-pyrsistent" ,python-pyrsistent)
2947 ("python-six" ,python-six)))
2948 (home-page "https://github.com/Julian/jsonschema")
2949 (synopsis "Implementation of JSON Schema for Python")
2950 (description
2951 "Jsonschema is an implementation of JSON Schema for Python.")
2952 (license license:expat)
2953 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2954
2955 (define-public python2-jsonschema
2956 (let ((jsonschema (package-with-python2
2957 (strip-python2-variant python-jsonschema))))
2958 (package/inherit jsonschema
2959 (propagated-inputs
2960 `(("python2-functools32" ,python2-functools32)
2961 ,@(package-propagated-inputs jsonschema))))))
2962
2963 (define-public python-schema
2964 (package
2965 (name "python-schema")
2966 (version "0.6.6")
2967 (source
2968 (origin
2969 (method url-fetch)
2970 (uri (pypi-uri "schema" version))
2971 (sha256
2972 (base32
2973 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2974 (build-system python-build-system)
2975 (native-inputs
2976 `(("python-pytest" ,python-pytest)))
2977 (home-page "https://github.com/keleshev/schema")
2978 (synopsis "Simple data validation library")
2979 (description
2980 "@code{python-schema} is a library for validating Python data
2981 structures, such as those obtained from config-files, forms, external
2982 services or command-line parsing, converted from JSON/YAML (or
2983 something else) to Python data-types.")
2984 (license license:psfl)))
2985
2986 (define-public python2-schema
2987 (package-with-python2 python-schema))
2988
2989 (define-public python-schema-0.5
2990 (package (inherit python-schema)
2991 (version "0.5.0")
2992 (source
2993 (origin
2994 (method url-fetch)
2995 (uri (pypi-uri "schema" version))
2996 (sha256
2997 (base32
2998 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2999
3000 (define-public python2-schema-0.5
3001 (package-with-python2 python-schema-0.5))
3002
3003 (define-public python-kitchen
3004 (package
3005 (name "python-kitchen")
3006 (version "1.2.5")
3007 (source
3008 (origin
3009 (method url-fetch)
3010 (uri (pypi-uri "kitchen" version))
3011 (sha256
3012 (base32
3013 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3014 (build-system python-build-system)
3015 (propagated-inputs
3016 `(("python-chardet" ,python-chardet)))
3017 (home-page "https://github.com/fedora-infra/kitchen")
3018 (synopsis "Python API for snippets")
3019 (description "@code{kitchen} module provides a python API for all sorts of
3020 little useful snippets of code that everybody ends up writing for their projects
3021 but never seem big enough to build an independent release. Use kitchen and stop
3022 cutting and pasting that code over and over.")
3023 (license (list license:lgpl2.1+
3024 ;; subprocess.py, test_subprocess.py,
3025 ;; kitchen/pycompat25/defaultdict.py:
3026 license:psfl))))
3027
3028 (define-public python2-kitchen
3029 (package-with-python2 python-kitchen))
3030
3031 (define-public python-unidecode
3032 (package
3033 (name "python-unidecode")
3034 (version "1.1.1")
3035 (source (origin
3036 (method url-fetch)
3037 (uri (pypi-uri "Unidecode" version))
3038 (sha256
3039 (base32
3040 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3041 (build-system python-build-system)
3042 (home-page "https://pypi.org/project/Unidecode/")
3043 (synopsis "ASCII transliterations of Unicode text")
3044 (description
3045 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3046 useful when integrating with legacy code that doesn't support Unicode, or for
3047 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3048 machine identifiers from human-readable Unicode strings that should still be
3049 somewhat intelligible.")
3050 (license license:gpl2+)))
3051
3052 (define-public python2-unidecode
3053 (package-with-python2 python-unidecode))
3054
3055 (define-public python-text-unidecode
3056 (package
3057 (name "python-text-unidecode")
3058 (version "1.3")
3059 (source (origin
3060 (method url-fetch)
3061 (uri (pypi-uri "text-unidecode" version))
3062 (sha256
3063 (base32
3064 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3065 (build-system python-build-system)
3066 (arguments
3067 '(#:phases (modify-phases %standard-phases
3068 (replace 'check
3069 (lambda _
3070 (setenv "PYTHONPATH"
3071 (string-append "./build/lib:"
3072 (getenv "PYTHONPATH")))
3073 (invoke "pytest" "-vv"))))))
3074 (native-inputs
3075 `(("python-pytest" ,python-pytest)))
3076 (home-page "https://github.com/kmike/text-unidecode/")
3077 (synopsis "Decode Unicode data")
3078 (description
3079 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3080 Perl library. It can create ASCII representations of Unicode data. In general
3081 users should prefer the @code{python-unidecode} package which offers better
3082 memory usage and transliteration quality.")
3083 ;; The user can choose either license.
3084 (license (list license:clarified-artistic license:gpl2+))))
3085
3086 (define-public python2-text-unidecode
3087 (package-with-python2 python-text-unidecode))
3088
3089 (define-public python-pyjwt
3090 (package
3091 (name "python-pyjwt")
3092 (version "1.7.1")
3093 (source
3094 (origin
3095 (method url-fetch)
3096 (uri (pypi-uri "PyJWT" version))
3097 (sha256
3098 (base32
3099 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3100 (modules '((guix build utils)))
3101 (snippet
3102 '(begin
3103 (for-each delete-file-recursively
3104 (find-files "." "\\.pyc$"))
3105 #t))))
3106 (build-system python-build-system)
3107 (arguments
3108 '(#:phases (modify-phases %standard-phases
3109 (replace 'check
3110 (lambda _
3111 ;; Mimic upstream commit 3a20892442b34c7 to get
3112 ;; rid of dependency on pytest-runner < 5.0.
3113 ;; Remove substitution for PyJWT > 1.7.1.
3114 (substitute* "setup.py"
3115 ((".*pytest-runner.*")
3116 ""))
3117 (invoke "pytest" "-vv"))))))
3118 (native-inputs
3119 `(("python-pytest" ,python-pytest)
3120 ("python-pytest-cov" ,python-pytest-cov)))
3121 (home-page "https://github.com/progrium/pyjwt")
3122 (synopsis "JSON Web Token implementation in Python")
3123 (description
3124 "PyJWT is a JSON Web Token implementation written in Python.")
3125 (license license:expat)))
3126
3127 (define-public python2-pyjwt
3128 (package-with-python2 python-pyjwt))
3129
3130 (define-public python-pykka
3131 (package
3132 (name "python-pykka")
3133 (version "1.2.1")
3134 (source
3135 (origin
3136 (method url-fetch)
3137 (uri (pypi-uri "Pykka" version))
3138 (sha256
3139 (base32
3140 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
3141 (build-system python-build-system)
3142 (native-inputs
3143 `(("python-mock" ,python-mock)
3144 ("python-nose" ,python-nose)
3145 ("python-gevent" ,python-gevent)
3146 ("python-eventlet" ,python-eventlet)))
3147 (home-page "https://www.pykka.org/")
3148 (synopsis "Pykka is a Python implementation of the actor model")
3149 (description
3150 "Pykka is a Python implementation of the actor model.
3151 The actor model introduces some simple rules to control the sharing
3152 of state and cooperation between execution units, which makes it
3153 easier to build concurrent applications.")
3154 (license license:asl2.0)))
3155
3156 (define-public python-pymsgbox
3157 (package
3158 (name "python-pymsgbox")
3159 (version "1.0.6")
3160 (source
3161 (origin
3162 (method git-fetch)
3163 (uri (git-reference
3164 ;; LICENSE.txt is not present on pypi
3165 (url "https://github.com/asweigart/PyMsgBox")
3166 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3167 (file-name (git-file-name name version))
3168 (sha256
3169 (base32
3170 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3171 (arguments
3172 ;; Circular dependency to run tests:
3173 ;; Tests need pyautogui, which depends on pymsgbox.
3174 '(#:tests? #f))
3175 (build-system python-build-system)
3176 (home-page "https://github.com/asweigart/PyMsgBox")
3177 (synopsis "Python module for JavaScript-like message boxes")
3178 (description
3179 "PyMsgBox is a simple, cross-platform, pure Python module for
3180 JavaScript-like message boxes. Types of dialog boxes include:
3181 @enumerate
3182 @item alert
3183 @item confirm
3184 @item prompt
3185 @item password
3186 @end enumerate
3187 ")
3188 (license license:bsd-3)))
3189
3190 (define-public python-pympler
3191 (package
3192 (name "python-pympler")
3193 (home-page "https://pythonhosted.org/Pympler/")
3194 (version "0.8")
3195 (source (origin
3196 (method url-fetch)
3197 (uri (pypi-uri "Pympler" version))
3198 (sha256
3199 (base32
3200 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3201 (build-system python-build-system)
3202 (arguments
3203 `(#:phases (modify-phases %standard-phases
3204 (delete 'check)
3205 (add-after 'install 'check
3206 (lambda* (#:key inputs outputs #:allow-other-keys)
3207 (add-installed-pythonpath inputs outputs)
3208 (invoke "python" "setup.py" "test"))))))
3209 (synopsis "Measure, monitor and analyze memory behavior")
3210 (description
3211 "Pympler is a development tool to measure, monitor and analyze
3212 the memory behavior of Python objects in a running Python application.
3213
3214 By pympling a Python application, detailed insight in the size and the
3215 lifetime of Python objects can be obtained. Undesirable or unexpected
3216 runtime behavior like memory bloat and other @samp{pymples} can easily
3217 be identified.
3218
3219 A web profiling frontend exposes process statistics, garbage
3220 visualisation and class tracker statistics.")
3221 (license license:asl2.0)))
3222
3223 (define-public python2-pympler
3224 (package-with-python2 python-pympler))
3225
3226 (define-public python-itsdangerous
3227 (package
3228 (name "python-itsdangerous")
3229 (version "1.1.0")
3230 (source
3231 (origin
3232 (method url-fetch)
3233 (uri (pypi-uri "itsdangerous" version))
3234 (sha256
3235 (base32
3236 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3237 (build-system python-build-system)
3238 (home-page "https://palletsprojects.com/p/itsdangerous/")
3239 (synopsis "Python library for passing data to/from untrusted environments")
3240 (description
3241 "Itsdangerous provides various helpers to pass trusted data to untrusted
3242 environments and back.")
3243 (license license:bsd-3)))
3244
3245 (define-public python2-itsdangerous
3246 (package-with-python2 python-itsdangerous))
3247
3248 (define-public python-pyyaml
3249 (package
3250 (name "python-pyyaml")
3251 (version "5.3.1")
3252 (source
3253 (origin
3254 (method url-fetch)
3255 (uri (pypi-uri "PyYAML" version))
3256 (sha256
3257 (base32
3258 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3259 (build-system python-build-system)
3260 (inputs
3261 `(("libyaml" ,libyaml)))
3262 (home-page "https://pyyaml.org")
3263 (synopsis "YAML parser and emitter for Python")
3264 (description
3265 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3266 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3267 API, and sensible error messages. PyYAML supports standard YAML tags and
3268 provides Python-specific tags that represent an arbitrary Python object.")
3269 (license license:expat)))
3270
3271 (define-public python2-pyyaml
3272 (package-with-python2 python-pyyaml))
3273
3274 (define-public python-vine
3275 (package
3276 (name "python-vine")
3277 (version "1.1.4")
3278 (source
3279 (origin
3280 (method url-fetch)
3281 (uri (pypi-uri "vine" version))
3282 (sha256
3283 (base32
3284 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3285 (build-system python-build-system)
3286 (native-inputs
3287 `(("python-pytest" ,python-pytest)
3288 ("python-case" ,python-case)))
3289 (home-page "https://github.com/celery/vine")
3290 (synopsis "Promises for Python")
3291 (description
3292 "@code{vine} provides a special implementation of promises in that it can
3293 be used both for \"promise of a value\" and lazy evaluation. The biggest
3294 upside for this is that everything in a promise can also be a promise,
3295 e.g. filters, callbacks and errbacks can all be promises.")
3296 (license license:bsd-3)))
3297
3298 (define-public python-virtualenv
3299 (package
3300 (name "python-virtualenv")
3301 (version "20.2.1")
3302 (source
3303 (origin
3304 (method url-fetch)
3305 (uri (pypi-uri "virtualenv" version))
3306 (sha256
3307 (base32
3308 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3309 (build-system python-build-system)
3310 (native-inputs
3311 `(("python-mock" ,python-mock)
3312 ("python-pytest" ,python-pytest)
3313 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3314 ;; be an input at all". However, removing the input makes the build error:
3315 ;; File "setup.py", line 4, in <module>
3316 ;; raise RuntimeError("setuptools >= 41 required to build")
3317 ("python-setuptools" ,python-setuptools)
3318 ("python-setuptools-scm" ,python-setuptools-scm)))
3319 (propagated-inputs
3320 `(("python-appdirs" ,python-appdirs)
3321 ("python-distlib" ,python-distlib/next)
3322 ("python-filelock" ,python-filelock)
3323 ("python-six" ,python-six)
3324 ("python-importlib-metadata" ,python-importlib-metadata)))
3325 (home-page "https://virtualenv.pypa.io/")
3326 (synopsis "Virtual Python environment builder")
3327 (description
3328 "Virtualenv is a tool to create isolated Python environments.")
3329 (license license:expat)))
3330
3331 (define-public python-markupsafe
3332 (package
3333 (name "python-markupsafe")
3334 (version "1.1.1")
3335 (source
3336 (origin
3337 (method url-fetch)
3338 (uri (pypi-uri "MarkupSafe" version))
3339 (sha256
3340 (base32
3341 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3342 (build-system python-build-system)
3343 (arguments
3344 `(#:modules ((ice-9 ftw)
3345 (srfi srfi-1)
3346 (srfi srfi-26)
3347 (guix build utils)
3348 (guix build python-build-system))
3349 #:phases (modify-phases %standard-phases
3350 (replace 'check
3351 (lambda _
3352 (let ((cwd (getcwd))
3353 (libdir (find (cut string-prefix? "lib." <>)
3354 (scandir "build"))))
3355 (setenv "PYTHONPATH"
3356 (string-append cwd "/build/" libdir ":"
3357 (getenv "PYTHONPATH")))
3358 (invoke "pytest" "-vv")))))))
3359 (native-inputs
3360 `(("python-pytest" ,python-pytest)))
3361 (home-page "https://github.com/mitsuhiko/markupsafe")
3362 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3363 (description
3364 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3365 for Python.")
3366 (license license:bsd-3)))
3367
3368 (define-public python2-markupsafe
3369 (package-with-python2 python-markupsafe))
3370
3371 (define-public python-jinja2
3372 (package
3373 (name "python-jinja2")
3374 (version "2.11.2")
3375 (source
3376 (origin
3377 (method url-fetch)
3378 (uri (pypi-uri "Jinja2" version))
3379 (sha256
3380 (base32
3381 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3382 (build-system python-build-system)
3383 (arguments
3384 '(#:phases (modify-phases %standard-phases
3385 (replace 'check
3386 (lambda* (#:key tests? #:allow-other-keys)
3387 (if tests?
3388 (begin
3389 (setenv "PYTHONPATH"
3390 (string-append "./build/lib:"
3391 (getenv "PYTHONPATH")))
3392 (invoke "pytest" "-vv"))
3393 (format #t "test suite not run~%"))
3394 #t)))))
3395 (native-inputs
3396 `(("python-pytest" ,python-pytest)))
3397 (propagated-inputs
3398 `(("python-markupsafe" ,python-markupsafe)))
3399 (home-page "http://jinja.pocoo.org/")
3400 (synopsis "Python template engine")
3401 (description
3402 "Jinja2 is a small but fast and easy to use stand-alone template engine
3403 written in pure Python.")
3404 (license license:bsd-3)))
3405
3406 (define-public python2-jinja2
3407 (package-with-python2 python-jinja2))
3408
3409 (define-public python-jinja2-time
3410 (package
3411 (name "python-jinja2-time")
3412 (version "0.2.0")
3413 (source
3414 (origin
3415 (method url-fetch)
3416 (uri (pypi-uri "jinja2-time" version))
3417 (sha256
3418 (base32
3419 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3420 (build-system python-build-system)
3421 (propagated-inputs
3422 `(("python-arrow" ,python-arrow)
3423 ("python-jinja2" ,python-jinja2)))
3424 (home-page
3425 "https://github.com/hackebrot/jinja2-time")
3426 (synopsis "Jinja2 Extension for Dates and Times")
3427 (description
3428 "This package provides an extension for the template engine Jinja2. It
3429 adds a 'now' tag providing a convenient access to the arrow.now() API from
3430 templates. A format string can be provided to control the output.")
3431 (license license:expat)))
3432
3433 (define-public python-pystache
3434 (package
3435 (name "python-pystache")
3436 (version "0.5.4")
3437 (source (origin
3438 (method url-fetch)
3439 (uri (pypi-uri "pystache" version))
3440 (sha256
3441 (base32
3442 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3443 (build-system python-build-system)
3444 (arguments
3445 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3446 (home-page "http://defunkt.io/pystache/")
3447 (synopsis "Python logic-less template engine")
3448 (description
3449 "Pystache is a Python implementation of the framework agnostic,
3450 logic-free templating system Mustache.")
3451 (license license:expat)
3452 (properties `((python2-variant . ,(delay python2-pystache))))))
3453
3454 (define-public python2-pystache
3455 (let ((base (package-with-python2
3456 (strip-python2-variant python-pystache))))
3457 (package/inherit base
3458 (arguments
3459 `(#:python ,python-2
3460 #:phases
3461 (modify-phases %standard-phases
3462 (replace 'check
3463 (lambda _
3464 (invoke "python" "test_pystache.py")))))))))
3465
3466 (define-public python-joblib
3467 (package
3468 (name "python-joblib")
3469 (version "0.14.1")
3470 (source (origin
3471 (method url-fetch)
3472 (uri (pypi-uri "joblib" version))
3473 (sha256
3474 (base32
3475 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3476 (build-system python-build-system)
3477 (arguments
3478 `(#:phases
3479 (modify-phases %standard-phases
3480 (replace 'check
3481 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3482 (native-inputs
3483 `(("python-pytest" ,python-pytest)))
3484 (home-page "https://joblib.readthedocs.io/")
3485 (synopsis "Using Python functions as pipeline jobs")
3486 (description
3487 "Joblib is a set of tools to provide lightweight pipelining in Python.
3488 In particular, joblib offers: transparent disk-caching of the output values
3489 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3490 logging and tracing of the execution.")
3491 (license license:bsd-3)))
3492
3493 (define-public python2-joblib
3494 (package-with-python2 python-joblib))
3495
3496 (define-public python-daemon
3497 (package
3498 (name "python-daemon")
3499 (version "2.2.3")
3500 (source
3501 (origin
3502 (method url-fetch)
3503 (uri (pypi-uri "python-daemon" version))
3504 (sha256
3505 (base32
3506 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3507 (build-system python-build-system)
3508 (arguments
3509 `(#:phases
3510 (modify-phases %standard-phases
3511 (add-before 'check 'disable-tests
3512 (lambda _
3513 ;; FIXME: Determine why test fails
3514 (substitute* "test/test_daemon.py"
3515 (("test_detaches_process_context")
3516 "skip_test_detaches_process_context"))
3517 #t)))))
3518 (propagated-inputs
3519 `(("python-lockfile" ,python-lockfile)))
3520 (native-inputs
3521 `(("python-unittest2" ,python-unittest2)
3522 ("python-testtools" ,python-testtools)
3523 ("python-testscenarios" ,python-testscenarios)
3524 ("python-mock" ,python-mock)
3525 ("python-docutils" ,python-docutils)))
3526 (home-page "https://pagure.io/python-daemon/")
3527 (synopsis "Python library for making a Unix daemon process")
3528 (description "Python-daemon is a library that assists a Python program to
3529 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3530
3531 This library provides a @code{DaemonContext} class that manages the following
3532 important tasks for becoming a daemon process:
3533 @enumerate
3534 @item Detach the process into its own process group.
3535 @item Set process environment appropriate for running inside a chroot.
3536 @item Renounce suid and sgid privileges.
3537 @item Close all open file descriptors.
3538 @item Change the working directory, uid, gid, and umask.
3539 @item Set appropriate signal handlers.
3540 @item Open new file descriptors for stdin, stdout, and stderr.
3541 @item Manage a specified PID lock file.
3542 @item Register cleanup functions for at-exit processing.
3543 @end enumerate")
3544 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3545 (license (list license:asl2.0 license:gpl3+))))
3546
3547 (define-public python-anytree
3548 (package
3549 (name "python-anytree")
3550 (version "2.8.0")
3551 (source (origin
3552 (method url-fetch)
3553 (uri (pypi-uri "anytree" version))
3554 (sha256
3555 (base32
3556 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3557 (build-system python-build-system)
3558 (propagated-inputs
3559 `(("python-six" ,python-six)))
3560 (native-inputs
3561 `(;; For tests.
3562 ("graphviz" ,graphviz) ;for 'dot'
3563 ("python-nose" ,python-nose)))
3564 (home-page "https://github.com/c0fec0de/anytree")
3565 (synopsis "Lightweight tree data library")
3566 (description
3567 "@code{anytree} is a simple, lightweight, and extensible tree data
3568 structure for Python.")
3569 (license license:asl2.0)))
3570
3571 (define-public python-docutils
3572 (package
3573 (name "python-docutils")
3574 (version "0.16")
3575 (source
3576 (origin
3577 (method url-fetch)
3578 (uri (pypi-uri "docutils" version))
3579 (sha256
3580 (base32
3581 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3582 (build-system python-build-system)
3583 (arguments
3584 '(#:phases (modify-phases %standard-phases
3585 (replace 'check
3586 (lambda* (#:key tests? #:allow-other-keys)
3587 (if tests?
3588 (invoke "python" "test/alltests.py")
3589 (format #t "test suite not run~%"))
3590 #t)))))
3591 (home-page "http://docutils.sourceforge.net/")
3592 (synopsis "Python Documentation Utilities")
3593 (description
3594 "Docutils is a modular system for processing documentation into useful
3595 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3596 easy to use markup language, for input.
3597
3598 This package provides tools for converting @file{.rst} files to other formats
3599 via commands such as @command{rst2man}, as well as supporting Python code.")
3600 ;; Most of the source code is public domain, but some source files are
3601 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3602 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3603
3604 (define-public python2-docutils
3605 (package-with-python2 python-docutils))
3606
3607 ;; python2-sphinx fails its test suite with newer versions.
3608 (define-public python2-docutils-0.14
3609 (package
3610 (inherit python2-docutils)
3611 (version "0.14")
3612 (source (origin
3613 (method url-fetch)
3614 (uri (pypi-uri "docutils" version))
3615 (sha256
3616 (base32
3617 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3618
3619 (define-public python-restructuredtext-lint
3620 (package
3621 (name "python-restructuredtext-lint")
3622 (version "1.3.0")
3623 (source
3624 (origin
3625 (method url-fetch)
3626 (uri (pypi-uri "restructuredtext-lint" version))
3627 (sha256
3628 (base32
3629 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3630 (build-system python-build-system)
3631 (arguments
3632 `(#:phases
3633 (modify-phases %standard-phases
3634 (delete 'check)
3635 (add-after 'install 'check
3636 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3637 (when tests?
3638 (add-installed-pythonpath inputs outputs)
3639 (invoke "nosetests" "-v"))
3640 #t)))))
3641 (propagated-inputs
3642 `(("python-docutils" ,python-docutils)))
3643 (native-inputs
3644 `(("python-nose" ,python-nose)))
3645 (home-page "https://github.com/twolfson/restructuredtext-lint")
3646 (synopsis "reStructuredText linter")
3647 (description "This package provides a linter for the reStructuredText
3648 format.")
3649 (license license:unlicense)))
3650
3651 (define-public python-doc8
3652 (package
3653 (name "python-doc8")
3654 (version "0.8.0")
3655 (source
3656 (origin
3657 (method url-fetch)
3658 (uri (pypi-uri "doc8" version))
3659 (sha256
3660 (base32
3661 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3662 (build-system python-build-system)
3663 (arguments
3664 `(#:phases
3665 (modify-phases %standard-phases
3666 (delete 'check)
3667 (add-after 'install 'check
3668 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3669 (when tests?
3670 (add-installed-pythonpath inputs outputs)
3671 (invoke "pytest" "-v"))
3672 #t)))))
3673 (propagated-inputs
3674 `(("python-chardet" ,python-chardet)
3675 ("python-docutils" ,python-docutils)
3676 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3677 ("python-six" ,python-six)
3678 ("python-stevedore" ,python-stevedore)))
3679 (native-inputs
3680 `(("python-testtools" ,python-testtools)
3681 ("python-pytest" ,python-pytest)))
3682 (home-page "https://launchpad.net/doc8")
3683 (synopsis
3684 "Style checker for Sphinx (or other) RST documentation")
3685 (description
3686 "Doc8 is an opinionated style checker for reStructured Text and plain
3687 text styles of documentation.")
3688 (license license:asl2.0)))
3689
3690 (define-public python-pygments
3691 (package
3692 (name "python-pygments")
3693 (version "2.7.3")
3694 (source
3695 (origin
3696 (method url-fetch)
3697 (uri (pypi-uri "Pygments" version))
3698 (sha256
3699 (base32
3700 "05mps9r966r3dpqw6zrs1nlwjdf5y4960hl9m7abwb3qyfnarwyc"))))
3701 (replacement python-pygments/fixed)
3702 (build-system python-build-system)
3703 (arguments
3704 ;; FIXME: Tests require sphinx, which depends on this.
3705 '(#:tests? #f))
3706 (home-page "https://pygments.org/")
3707 (synopsis "Syntax highlighting")
3708 (description
3709 "Pygments is a syntax highlighting package written in Python.")
3710 (license license:bsd-2)
3711 (properties `((python2-variant . ,(delay python2-pygments))))))
3712
3713 (define python-pygments/fixed
3714 (package/inherit python-pygments
3715 (version "2.7.4")
3716 (source
3717 (origin
3718 (method url-fetch)
3719 (uri (pypi-uri "Pygments" version))
3720 (sha256
3721 (base32
3722 "0dy35ry5qa8dpklk4fkj9kfpw2qb4mh5ha9866kw30wf96dx0jfz"))))))
3723
3724 ;; Pygments 2.6 and later does not support Python 2.
3725 (define-public python2-pygments
3726 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3727 (package
3728 (inherit base)
3729 (version "2.5.2")
3730 (source (origin
3731 (method url-fetch)
3732 (uri (pypi-uri "Pygments" version))
3733 (sha256
3734 (base32
3735 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3736
3737 (define-public python-bump2version
3738 (package
3739 (name "python-bump2version")
3740 (version "1.0.1")
3741 (source
3742 (origin
3743 (method url-fetch)
3744 (uri (pypi-uri "bump2version" version))
3745 (sha256
3746 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
3747 (build-system python-build-system)
3748 (arguments
3749 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
3750 ;; required: --new-version".
3751 `(#:tests? #false))
3752 (home-page "https://github.com/c4urself/bump2version")
3753 (synopsis "Version-bump your software with a single command!")
3754 (description
3755 "This package provides a small command line tool to simplify releasing
3756 software by updating all version strings in your source code by the correct
3757 increment. It also creates commits and tags.")
3758 (license license:expat)))
3759
3760 (define-public python-bumpversion
3761 (package
3762 (name "python-bumpversion")
3763 (version "0.5.3")
3764 (source
3765 (origin
3766 (method url-fetch)
3767 (uri (pypi-uri "bumpversion" version))
3768 (sha256
3769 (base32
3770 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3771 (build-system python-build-system)
3772 (home-page "https://github.com/peritus/bumpversion")
3773 (synopsis "Tool to bump software version")
3774 (description "This tool provides a command-line interface (CLI) to bump a
3775 software version simply.")
3776 (license license:expat)))
3777
3778 (define-public python-deprecated
3779 (package
3780 (name "python-deprecated")
3781 (version "1.2.5")
3782 (source
3783 (origin
3784 (method git-fetch)
3785 (uri (git-reference
3786 (url "https://github.com/tantale/deprecated")
3787 (commit (string-append "v" version))))
3788 (file-name (git-file-name name version))
3789 (sha256
3790 (base32
3791 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3792 (build-system python-build-system)
3793 (arguments
3794 `(#:phases (modify-phases %standard-phases
3795 (replace 'check
3796 (lambda _
3797 (invoke "pytest"))))))
3798 (propagated-inputs
3799 `(("python-wrapt" ,python-wrapt)))
3800 (native-inputs
3801 `(("python-bumpversion" ,python-bumpversion)
3802 ("python-pytest" ,python-pytest)
3803 ("python-pytest-cov" ,python-pytest-cov)
3804 ("python-sphinx" ,python-sphinx)
3805 ("python-tox" ,python-tox)))
3806 (home-page "https://github.com/tantale/deprecated")
3807 (synopsis "Python decorator to deprecate classes, functions or methods")
3808 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3809 to deprecate classes, functions or methods.")
3810 (license license:expat)))
3811
3812 (define-public python-pygithub
3813 (package
3814 (name "python-pygithub")
3815 (version "1.54.1")
3816 (source
3817 ;; We fetch from the Git repo because there are no tests in the PyPI
3818 ;; archive.
3819 (origin
3820 (method git-fetch)
3821 (uri (git-reference
3822 (url "https://github.com/PyGithub/PyGithub")
3823 (commit (string-append "v" version))))
3824 (file-name (git-file-name name version))
3825 (sha256
3826 (base32 "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"))))
3827 (build-system python-build-system)
3828 (arguments
3829 `(#:phases
3830 (modify-phases %standard-phases
3831 (replace 'check
3832 (lambda* (#:key tests? #:allow-other-keys)
3833 (when tests?
3834 (invoke "pytest"))
3835 #t)))))
3836 (propagated-inputs
3837 `(("python-cryptography" ,python-cryptography)
3838 ("python-deprecated" ,python-deprecated)
3839 ("python-pyjwt" ,python-pyjwt)
3840 ("python-requests" ,python-requests)))
3841 (native-inputs
3842 `(("python-httpretty" ,python-httpretty)
3843 ("python-pytest" ,python-pytest)))
3844 (home-page "https://pygithub.readthedocs.io/en/latest/")
3845 (synopsis "Python library for the GitHub API")
3846 (description "This library allows managing GitHub resources such as
3847 repositories, user profiles, and organizations in your Python applications,
3848 using version 3 of the GitHub application programming interface (API).")
3849 (license license:lgpl3+)))
3850
3851 (define-public python-rellu
3852 (package
3853 (name "python-rellu")
3854 (version "0.7")
3855 (source
3856 (origin
3857 (method url-fetch)
3858 (uri (pypi-uri "rellu" version))
3859 (sha256
3860 (base32
3861 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3862 (build-system python-build-system)
3863 (propagated-inputs
3864 `(("python-invoke" ,python-invoke)
3865 ("python-pygithub" ,python-pygithub)))
3866 (home-page "https://github.com/robotframework/rellu")
3867 (synopsis "Utilities to create PyPI releases")
3868 (description "This collection of utilities contains tooling and templates
3869 to assist in creating releases on GitHub and publishing them on PyPI. It is
3870 designed to be used by Robot Framework and tools and libraries in its
3871 ecosystem, but can naturally be used also by other projects.")
3872 (license license:asl2.0)))
3873
3874 (define-public python-robotframework
3875 (package
3876 (name "python-robotframework")
3877 (version "3.2.2")
3878 ;; There are no tests in the PyPI archive.
3879 (source
3880 (origin
3881 (method git-fetch)
3882 (uri (git-reference
3883 (url "https://github.com/robotframework/robotframework")
3884 (commit (string-append "v" version))))
3885 (file-name (git-file-name name version))
3886 (sha256
3887 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3888 (patches (search-patches
3889 "python-robotframework-source-date-epoch.patch"))))
3890 (build-system python-build-system)
3891 (arguments
3892 `(#:phases (modify-phases %standard-phases
3893 (add-before 'build 'build-and-install-doc
3894 (lambda* (#:key outputs #:allow-other-keys)
3895 (let* ((doc-output (assoc-ref outputs "doc"))
3896 (doc (string-append doc-output "/share/"
3897 ,name "-" ,version "/")))
3898 (invoke "invoke" "library-docs" "all")
3899 (mkdir-p doc)
3900 (copy-recursively "doc/libraries"
3901 (string-append doc "/libraries"))
3902 #t)))
3903 (replace 'check
3904 (lambda* (#:key inputs #:allow-other-keys)
3905 ;; Some tests require timezone data. Otherwise, they
3906 ;; look up /etc/localtime, which doesn't exist, and fail
3907 ;; with:
3908 ;;
3909 ;; OverflowError: mktime argument out of range
3910 (setenv "TZDIR"
3911 (string-append (assoc-ref inputs "tzdata")
3912 "/share/zoneinfo"))
3913 (setenv "TZ" "Europe/Paris")
3914
3915 (invoke "python" "utest/run.py"))))))
3916 (native-inputs
3917 `(("python-invoke" ,python-invoke)
3918 ("python-rellu" ,python-rellu)
3919 ("python:tk" ,python "tk") ;used when building the HTML doc
3920 ("tzdata" ,tzdata-for-tests)))
3921 (outputs '("out" "doc"))
3922 (home-page "https://robotframework.org")
3923 (synopsis "Generic automation framework")
3924 (description "Robot Framework is a generic automation framework for
3925 acceptance testing, acceptance test driven development (ATDD), and robotic
3926 process automation (RPA).")
3927 (license license:asl2.0)))
3928
3929 (define-public python-robotframework-lint
3930 ;; There is no properly tagged release; the commit below seems to correspond
3931 ;; to the 0.9 stable release available from PyPI. The tests are not
3932 ;; included in the PyPI archive, so we fetch the sources from the upstream
3933 ;; Git repo.
3934 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3935 (revision "0"))
3936 (package
3937 (name "python-robotframework-lint")
3938 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3939 revision commit))
3940 (source
3941 (origin
3942 (method git-fetch)
3943 (uri (git-reference
3944 (url "https://github.com/boakley/robotframework-lint")
3945 (commit commit)))
3946 (file-name (git-file-name name version))
3947 (sha256
3948 (base32
3949 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3950 (build-system python-build-system)
3951 (arguments
3952 `(#:phases
3953 (modify-phases %standard-phases
3954 (replace 'check
3955 (lambda _
3956 (invoke "python" "-m" "robot" "-A"
3957 "tests/conf/default.args" "tests"))))))
3958 (propagated-inputs
3959 `(("python-robotframework" ,python-robotframework)))
3960 (home-page "https://github.com/boakley/robotframework-lint/")
3961 (synopsis "Static analysis tool (linter) for Robot Framework")
3962 (description "This package provides the @code{rflint} command-line
3963 utility, a static analysis tool (linter) for Robot Framework source files.")
3964 (license license:asl2.0))))
3965
3966 (define-public python-robotframework-sshlibrary
3967 (package
3968 (name "python-robotframework-sshlibrary")
3969 (version "3.3.0")
3970 ;; There are no tests in the PyPI archive.
3971 (source
3972 (origin
3973 (method git-fetch)
3974 (uri (git-reference
3975 (url "https://github.com/robotframework/SSHLibrary")
3976 (commit (string-append "v" version))))
3977 (file-name (git-file-name name version))
3978 (sha256
3979 (base32
3980 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3981 (build-system python-build-system)
3982 (arguments
3983 `(#:phases
3984 (modify-phases %standard-phases
3985 (add-before 'build 'build-and-install-doc
3986 (lambda* (#:key outputs #:allow-other-keys)
3987 (let* ((doc-output (assoc-ref outputs "doc"))
3988 (doc (string-append doc-output "/share/"
3989 ,name "-" ,version "/")))
3990 (invoke "chmod" "-R" "+w" "docs")
3991 (invoke "invoke" "kw-docs" "project-docs")
3992 (mkdir-p doc)
3993 (for-each delete-file (find-files "docs" "\\.rst"))
3994 (copy-recursively "docs" doc)
3995 #t)))
3996 (replace 'check
3997 (lambda _
3998 ;; Some tests require an SSH server; we remove them.
3999 (delete-file "utest/test_client_api.py")
4000 (delete-file "utest/test_scp.py")
4001 (invoke "python" "utest/run.py"))))))
4002 (propagated-inputs
4003 `(("python-robotframework" ,python-robotframework)
4004 ("python-paramiko" ,python-paramiko)
4005 ("python-scp" ,python-scp)))
4006 (native-inputs
4007 `(("openssh" ,openssh)
4008 ("which" ,which)
4009 ;; To generate the documentation
4010 ("python-docutils" ,python-docutils)
4011 ("python-invoke" ,python-invoke)
4012 ("python-pygments" ,python-pygments)
4013 ("python-rellu" ,python-rellu)))
4014 (outputs '("out" "doc"))
4015 (home-page "https://github.com/robotframework/SSHLibrary")
4016 (synopsis "Robot Framework library for SSH and SFTP")
4017 (description "SSHLibrary is a Robot Framework library providing support
4018 for SSH and SFTP. It has the following main usages:
4019 @itemize @bullet
4020 @item Executing commands on the remote machine, either blocking or non-blocking.
4021 @item Writing and reading in an interactive shell.
4022 @item Transferring files and directories over SFTP.
4023 @item Ensuring that files and directories exist on the remote machine.
4024 @end itemize")
4025 (license license:asl2.0)))
4026
4027 (define-public python-rstr
4028 (package
4029 (name "python-rstr")
4030 (version "2.2.6")
4031 (source
4032 (origin
4033 (method url-fetch)
4034 (uri (pypi-uri "rstr" version))
4035 (sha256
4036 (base32
4037 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
4038 (build-system python-build-system)
4039 (home-page "https://github.com/leapfrogonline/rstr")
4040 (synopsis "Generate random strings in Python")
4041 (description "This package provides a python module for generating
4042 random strings of various types. It could be useful for fuzz testing,
4043 generating dummy data, or other applications. It has no dependencies
4044 outside the standard library.")
4045 (license license:bsd-3)))
4046
4047 (define-public python-scp
4048 (package
4049 (name "python-scp")
4050 (version "0.13.3")
4051 (source
4052 (origin
4053 (method url-fetch)
4054 (uri (pypi-uri "scp" version))
4055 (sha256
4056 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4057 (build-system python-build-system)
4058 (arguments
4059 '(#:tests? #f)) ;tests require an SSH server
4060 (propagated-inputs
4061 `(("python-paramiko" ,python-paramiko)))
4062 (home-page "https://github.com/jbardin/scp.py")
4063 (synopsis "SCP protocol module for Python and Paramiko")
4064 (description "The scp module extends the Paramiko library to send and
4065 receive files via the SCP1 protocol, as implemented by the OpenSSH
4066 @command{scp} program.")
4067 (license license:gpl2+)))
4068
4069 (define-public python-rst.linker
4070 (package
4071 (name "python-rst.linker")
4072 (version "1.11")
4073 (source
4074 (origin
4075 (method url-fetch)
4076 (uri (pypi-uri "rst.linker" version))
4077 (sha256
4078 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4079 (build-system python-build-system)
4080 (propagated-inputs
4081 `(("python-dateutil" ,python-dateutil)
4082 ("python-six" ,python-six)))
4083 (native-inputs
4084 `(("python-setuptools-scm" ,python-setuptools-scm)))
4085 ;; Test would require path.py, which would introduce a cyclic dependence.
4086 (arguments `(#:tests? #f))
4087 ;; Note: As of version 1.7 the documentation is not worth building.
4088 (home-page "https://github.com/jaraco/rst.linker")
4089 (synopsis "Sphinx plugin to add links and timestamps")
4090 (description "rst.linker automatically replaces text by a
4091 reStructuredText external reference or timestamps. It's primary purpose is to
4092 augment the changelog, but it can be used for other documents, too.")
4093 (license license:expat)))
4094
4095 (define-public python2-rst.linker
4096 (package-with-python2 python-rst.linker))
4097
4098 (define-public python-sshpubkeys
4099 (package
4100 (name "python-sshpubkeys")
4101 (version "3.1.0")
4102 (home-page "https://github.com/ojarva/python-sshpubkeys")
4103 (source (origin
4104 (method git-fetch)
4105 (uri (git-reference
4106 (url home-page)
4107 (commit (string-append "v" version))))
4108 (file-name (git-file-name name version))
4109 (sha256
4110 (base32
4111 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4112 (build-system python-build-system)
4113 (propagated-inputs
4114 `(("python-cryptography" ,python-cryptography)
4115 ("python-ecdsa" ,python-ecdsa)))
4116 (synopsis "OpenSSH public key parser")
4117 (description
4118 "This package provides a library for parsing and validating OpenSSH
4119 public key files.")
4120 (license license:bsd-3)))
4121
4122 (define-public python-feedgenerator
4123 (package
4124 (name "python-feedgenerator")
4125 (version "1.9")
4126 (source
4127 (origin
4128 (method url-fetch)
4129 (uri (pypi-uri "feedgenerator" version))
4130 (sha256
4131 (base32
4132 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4133 (modules '((guix build utils)))
4134 (snippet
4135 '(begin
4136 ;; Remove pre-compiled .pyc files from source.
4137 (for-each delete-file-recursively
4138 (find-files "." "__pycache__" #:directories? #t))
4139 (for-each delete-file (find-files "." "\\.pyc$"))
4140 #t))))
4141 (build-system python-build-system)
4142 (propagated-inputs
4143 `(("python-pytz" ,python-pytz)
4144 ("python-six" ,python-six)))
4145 (home-page "https://github.com/getpelican/feedgenerator")
4146 (synopsis
4147 "Standalone version of Django's Atom/RSS feed generator")
4148 (description
4149 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4150 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4151 (license license:bsd-3)))
4152
4153 (define-public python2-feedgenerator
4154 (package-with-python2 python-feedgenerator))
4155
4156 (define-public python-jsonrpc-server
4157 (package
4158 (name "python-jsonrpc-server")
4159 (version "0.4.0")
4160 (source
4161 (origin
4162 (method url-fetch)
4163 (uri (pypi-uri "python-jsonrpc-server" version))
4164 (sha256
4165 (base32
4166 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4167 (build-system python-build-system)
4168 (propagated-inputs
4169 `(("python-mock" ,python-mock)
4170 ("python-pytest" ,python-pytest)
4171 ("python-ujson" ,python-ujson)))
4172 (home-page
4173 "https://github.com/palantir/python-jsonrpc-server")
4174 (synopsis "JSON RPC 2.0 server library")
4175 (description
4176 "This package provides a JSON RPC 2.0 server library for Python.")
4177 (license license:expat)))
4178
4179 (define-public python-pydantic
4180 (package
4181 (name "python-pydantic")
4182 (version "1.6.1")
4183 (source
4184 (origin
4185 (method git-fetch)
4186 (uri (git-reference
4187 (url "https://github.com/samuelcolvin/pydantic")
4188 (commit (string-append "v" version))))
4189 (file-name (git-file-name name version))
4190 (sha256
4191 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4192 (build-system python-build-system)
4193 (arguments
4194 '(#:phases
4195 (modify-phases %standard-phases
4196 ;; Reported upstream:
4197 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4198 ;; Disable the faulty test as the fix is unclear.
4199 (add-before 'check 'disable-test
4200 (lambda _
4201 (substitute* "tests/test_validators.py"
4202 (("test_assert_raises_validation_error")
4203 "_test_assert_raises_validation_error"))
4204 #t))
4205 (replace 'check
4206 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4207 (native-inputs
4208 `(("python-pytest" ,python-pytest)))
4209 (home-page "https://github.com/samuelcolvin/pydantic")
4210 (synopsis "Python data validation and settings management")
4211 (description
4212 "Pydantic enforces type hints at runtime, and provides user friendly
4213 errors when data is invalid.")
4214 (license license:expat)))
4215
4216 (define-public python-pydocstyle
4217 (package
4218 (name "python-pydocstyle")
4219 (version "3.0.0")
4220 (source
4221 (origin
4222 (method url-fetch)
4223 (uri (pypi-uri "pydocstyle" version))
4224 (sha256
4225 (base32
4226 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4227 (build-system python-build-system)
4228 (propagated-inputs
4229 `(("python-six" ,python-six)
4230 ("python-snowballstemmer" ,python-snowballstemmer)))
4231 (home-page
4232 "https://github.com/PyCQA/pydocstyle/")
4233 (synopsis "Python docstring style checker")
4234 (description
4235 "This package provides a style checker for the Python Language
4236 Server (PLS).")
4237 (license license:expat)))
4238
4239 (define-public python-language-server
4240 (package
4241 (name "python-language-server")
4242 (version "0.36.2")
4243 (source
4244 (origin
4245 (method url-fetch)
4246 (uri (pypi-uri "python-language-server" version))
4247 (sha256
4248 (base32
4249 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4250 (build-system python-build-system)
4251 (propagated-inputs
4252 `(("python-autopep8" ,python-autopep8)
4253 ("python-configparser" ,python-configparser)
4254 ("python-pydocstyle" ,python-pydocstyle)
4255 ("python-future" ,python-future)
4256 ("python-jedi" ,python-jedi)
4257 ("python-jsonrpc-server" ,python-jsonrpc-server)
4258 ("python-pluggy" ,python-pluggy)
4259 ("python-pycodestyle" ,python-pycodestyle)
4260 ("python-pyflakes" ,python-pyflakes)
4261 ("python-rope" ,python-rope)
4262 ("python-ujson" ,python-ujson)
4263 ("python-yapf" ,python-yapf)))
4264 (native-inputs
4265 `(("python-coverage" ,python-coverage)
4266 ("python-flaky" ,python-flaky)
4267 ("python-matplotlib" ,python-matplotlib)
4268 ("python-mock" ,python-mock)
4269 ("python-numpy" ,python-numpy)
4270 ("python-pandas" ,python-pandas)
4271 ("python-pylint" ,python-pylint)
4272 ("python-pytest" ,python-pytest)
4273 ("python-pytest-cov" ,python-pytest-cov)
4274 ("python-versioneer" ,python-versioneer)))
4275 (home-page "https://github.com/palantir/python-language-server")
4276 (synopsis "Python implementation of the Language Server Protocol")
4277 (description
4278 "The Python Language Server (pyls) is an implementation of the Python 3
4279 language specification for the Language Server Protocol (LSP). This tool is
4280 used in text editing environments to provide a complete and integrated
4281 feature-set for programming Python effectively.")
4282 (license license:expat)))
4283
4284 (define-public python-pathspec
4285 (package
4286 (name "python-pathspec")
4287 (version "0.7.0")
4288 (source
4289 (origin
4290 (method url-fetch)
4291 (uri (pypi-uri "pathspec" version))
4292 (sha256
4293 (base32
4294 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4295 (build-system python-build-system)
4296 (home-page "https://github.com/cpburnz/python-path-specification")
4297 (synopsis "Utility library for gitignore style pattern matching of file paths")
4298 (description
4299 "This package provides a utility library for gitignore style pattern
4300 matching of file paths.")
4301 (license license:mpl2.0)))
4302
4303 (define-public python-black
4304 (package
4305 (name "python-black")
4306 (version "20.8b1")
4307 (source
4308 (origin
4309 (method url-fetch)
4310 (uri (pypi-uri "black" version))
4311 (sha256
4312 (base32
4313 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4314 (build-system python-build-system)
4315 (arguments
4316 `(#:phases
4317 (modify-phases %standard-phases
4318 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4319 (lambda _
4320 (let ((python3 (which "python3")))
4321 (substitute* '("tests/data/fmtonoff.py"
4322 "tests/data/string_prefixes.py"
4323 "tests/data/function.py"
4324 "tests/data/python37.py")
4325 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4326 (string-append "#!" python3 (if (string? minor-version)
4327 minor-version
4328 "")))))
4329 #t))
4330 (add-after 'unpack 'disable-broken-tests
4331 (lambda* (#:key outputs inputs #:allow-other-keys)
4332 ;; Make installed package available for running the tests
4333 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4334 ":" (getenv "PATH")))
4335
4336 ;; These tests are supposed to be skipped when the blackd
4337 ;; dependencies are missing, but this doesn't quite work.
4338 (substitute* "tests/test_black.py"
4339 (("( *)class BlackDTestCase.*" match indent)
4340 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4341 indent "class BlackDTestCase(unittest.TestCase):\n"))
4342 (("web.Application") "False")
4343 (("@unittest_run_loop") ""))
4344
4345 ;; Patching the above file breaks the self test
4346 (substitute* "tests/test_black.py"
4347 (("( *)def test_self" match indent)
4348 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4349
4350 (substitute* "tests/test_black.py"
4351 (("( *)def test_python38" match indent)
4352 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4353 #t)))))
4354 (propagated-inputs
4355 `(("python-click" ,python-click)
4356 ("python-attrs" ,python-attrs)
4357 ("python-appdirs" ,python-appdirs)
4358 ("python-pathspec" ,python-pathspec)
4359 ("python-mypy-extensions" ,python-mypy-extensions)
4360 ("python-regex" ,python-regex)
4361 ("python-toml" ,python-toml)
4362 ("python-typed-ast" ,python-typed-ast)
4363 ("python-typing-extensions" ,python-typing-extensions)))
4364 (native-inputs
4365 `(("python-setuptools-scm" ,python-setuptools-scm)))
4366 (home-page "https://github.com/ambv/black")
4367 (synopsis "The uncompromising code formatter")
4368 (description "Black is the uncompromising Python code formatter.")
4369 (license license:expat)))
4370
4371 (define-public python-black-macchiato
4372 (package
4373 (name "python-black-macchiato")
4374 (version "1.3.0")
4375 (source
4376 (origin
4377 (method url-fetch)
4378 (uri (pypi-uri "black-macchiato" version))
4379 (sha256
4380 (base32
4381 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4382 (build-system python-build-system)
4383 (propagated-inputs
4384 `(("python-black" ,python-black)))
4385 (home-page "https://github.com/wbolster/black-macchiato")
4386 (synopsis "Partial @code{python-black} formatting")
4387 (description
4388 "This package is built on top the @{python-black} code formatter to
4389 enable formatting of partial files.")
4390 (license license:bsd-3)))
4391
4392 (define-public python-blinker
4393 (package
4394 (name "python-blinker")
4395 (version "1.4")
4396 (source
4397 (origin
4398 (method url-fetch)
4399 (uri (pypi-uri "blinker" version))
4400 (sha256
4401 (base32
4402 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4403 (build-system python-build-system)
4404 (home-page "https://pythonhosted.org/blinker/")
4405 (synopsis "Fast, simple object-to-object and broadcast signaling")
4406 (description
4407 "Blinker provides a fast dispatching system that allows any number of
4408 interested parties to subscribe to events, or \"signals\".")
4409 (license license:expat)))
4410
4411 (define-public python2-blinker
4412 (package-with-python2 python-blinker))
4413
4414 (define-public pelican
4415 (package
4416 (name "pelican")
4417 (version "4.2.0")
4418 (source
4419 (origin
4420 (method url-fetch)
4421 (uri (pypi-uri "pelican" version))
4422 (sha256
4423 (base32
4424 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4425 (build-system python-build-system)
4426 (propagated-inputs
4427 `(("python-blinker" ,python-blinker)
4428 ("python-dateutil" ,python-dateutil)
4429 ("python-docutils" ,python-docutils)
4430 ("python-feedgenerator" ,python-feedgenerator)
4431 ("python-jinja2" ,python-jinja2)
4432 ("python-markdown" ,python-markdown)
4433 ("python-pygments" ,python-pygments)
4434 ("python-pytz" ,python-pytz)
4435 ("python-six" ,python-six)
4436 ("python-unidecode" ,python-unidecode)))
4437 (home-page "https://getpelican.com/")
4438 (arguments
4439 `(;; XXX Requires a lot more packages to do unit tests :P
4440 #:tests? #f))
4441 (synopsis "Python-based static site publishing system")
4442 (description
4443 "Pelican is a tool to generate a static blog from reStructuredText,
4444 Markdown input files, and more. Pelican uses Jinja2 for templating
4445 and is very extensible.")
4446 (license license:agpl3+)))
4447
4448 (define-public mallard-ducktype
4449 (package
4450 (name "mallard-ducktype")
4451 (version "1.0.2")
4452 (source
4453 (origin
4454 (method git-fetch)
4455 ;; git-reference because tests are not included in pypi source tarball
4456 ;; https://issues.guix.gnu.org/issue/36755#2
4457 (uri (git-reference
4458 (url "https://github.com/projectmallard/mallard-ducktype")
4459 (commit version)))
4460 (file-name (git-file-name name version))
4461 (sha256
4462 (base32
4463 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4464 (build-system python-build-system)
4465 (arguments
4466 '(#:phases
4467 (modify-phases %standard-phases
4468 (replace 'check
4469 (lambda _
4470 (with-directory-excursion "tests"
4471 (invoke "sh" "runtests")))))))
4472 (home-page "http://projectmallard.org")
4473 (synopsis "Convert Ducktype to Mallard documentation markup")
4474 (description
4475 "Ducktype is a lightweight syntax that can represent all the semantics
4476 of the Mallard XML documentation system. Ducktype files can be converted to
4477 Mallard using the @command{ducktype} tool. The yelp-tools package
4478 provides additional functionality on the produced Mallard documents.")
4479 (license license:expat)))
4480
4481 (define-public python-cython
4482 (package
4483 (name "python-cython")
4484 (version "0.29.21")
4485 (source
4486 (origin
4487 (method url-fetch)
4488 (uri (pypi-uri "Cython" version))
4489 (sha256
4490 (base32
4491 "1bcwpra7c6k30yvic3sw2v3rq2dr40ypc4zqif6kr52mpn4wnyp5"))))
4492 (build-system python-build-system)
4493 ;; we need the full python package and not just the python-wrapper
4494 ;; because we need libpython3.3m.so
4495 (inputs
4496 `(("python" ,python)))
4497 (arguments
4498 `(#:phases
4499 (modify-phases %standard-phases
4500 (add-before 'check 'set-HOME
4501 ;; some tests require access to "$HOME/.cython"
4502 (lambda _ (setenv "HOME" "/tmp") #t))
4503 (replace 'check
4504 (lambda _
4505 ;; Disable compiler optimizations to greatly reduce the running
4506 ;; time of the test suite.
4507 (setenv "CFLAGS" "-O0")
4508
4509 (invoke "python" "runtests.py" "-vv"
4510 "-j" (number->string (parallel-job-count))
4511 ;; XXX: On 32-bit architectures, running the parallel tests
4512 ;; fails on many-core systems, see
4513 ;; <https://github.com/cython/cython/issues/2807>.
4514 ,@(if (not (target-64bit?))
4515 '("-x" "run.parallel")
4516 '())))))))
4517 (home-page "https://cython.org/")
4518 (synopsis "C extensions for Python")
4519 (description "Cython is an optimising static compiler for both the Python
4520 programming language and the extended Cython programming language. It makes
4521 writing C extensions for Python as easy as Python itself.")
4522 (license license:asl2.0)
4523 (properties `((python2-variant . ,(delay python2-cython))))))
4524
4525 (define-public python2-cython
4526 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4527 (package/inherit base
4528 (name "python2-cython")
4529 (inputs
4530 `(("python-2" ,python-2))) ;this is not automatically changed
4531 (arguments
4532 (substitute-keyword-arguments (package-arguments base)
4533 ((#:phases phases)
4534 `(modify-phases ,phases
4535 (add-before 'check 'adjust-test_embed
4536 (lambda _
4537 (substitute* "runtests.py"
4538 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4539 ;; so it can give the right -L flag to GCC when embedding static
4540 ;; builds of Python. It is unaware that the Python "config"
4541 ;; directory (where the static library lives) was renamed in
4542 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4543 ;; which works fine, because that is where the shared library is.
4544 ;;
4545 ;; It also appears to be unaware that the Makefile in Demos/embed
4546 ;; already unconditionally pass the static library location to GCC,
4547 ;; after checking sysconfig.get_config_var('LIBPL).
4548 ;;
4549 ;; The effect is that the linker is unable to resolve libexpat
4550 ;; symbols when building for Python 2, because neither the Python 2
4551 ;; shared library nor Expat is available. To fix it, we can either
4552 ;; add Expat as an input and make it visible to the linker, or just
4553 ;; prevent it from overriding the Python shared library location.
4554 ;; The end result is identical, so we take the easy route.
4555 ((" or libname not in os\\.listdir\\(libdir\\)")
4556 ""))
4557 #t)))))))))
4558
4559 ;; The RPython toolchain currently does not support Python 3.
4560 (define-public python2-rpython
4561 (package
4562 (name "python2-rpython")
4563 (version "0.2.1")
4564 (source
4565 (origin
4566 (method url-fetch)
4567 (uri (pypi-uri "rpython" version))
4568 (sha256
4569 (base32
4570 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4571 (build-system python-build-system)
4572 (arguments `(#:python ,python-2))
4573 (native-inputs
4574 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4575 (home-page "https://rpython.readthedocs.org")
4576 (synopsis "Framework for implementing interpreters and virtual machines")
4577 (description "RPython is a translation and support framework for
4578 producing implementations of dynamic languages, emphasizing a clean separation
4579 between language specification and implementation aspects.")
4580 (license license:expat)))
4581
4582 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4583 ;; python-scipy still build, as these three packages are often used together.
4584 (define-public python-numpy
4585 (package
4586 (name "python-numpy")
4587 (version "1.17.3")
4588 (source
4589 (origin
4590 (method url-fetch)
4591 (uri (string-append
4592 "https://github.com/numpy/numpy/releases/download/v"
4593 version "/numpy-" version ".tar.gz"))
4594 (sha256
4595 (base32
4596 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4597 (build-system python-build-system)
4598 (inputs
4599 `(("openblas" ,openblas)
4600 ("lapack" ,lapack)))
4601 (native-inputs
4602 `(("python-cython" ,python-cython)
4603 ("python-pytest" ,python-pytest)
4604 ("gfortran" ,gfortran)))
4605 (arguments
4606 `(#:phases
4607 (modify-phases %standard-phases
4608 (add-before 'build 'configure-blas-lapack
4609 (lambda* (#:key inputs #:allow-other-keys)
4610 (call-with-output-file "site.cfg"
4611 (lambda (port)
4612 (format port
4613 "[openblas]
4614 libraries = openblas
4615 library_dirs = ~a/lib
4616 include_dirs = ~a/include
4617
4618 # backslash-n to make emacs happy
4619 \n[lapack]
4620 lapack_libs = lapack
4621 library_dirs = ~a/lib
4622 include_dirs = ~a/include
4623 "
4624 (assoc-ref inputs "openblas")
4625 (assoc-ref inputs "openblas")
4626 (assoc-ref inputs "lapack")
4627 (assoc-ref inputs "lapack"))))
4628 #t))
4629 (add-before 'build 'fix-executable-paths
4630 (lambda* (#:key inputs #:allow-other-keys)
4631 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4632 ;; instead of /bin/sh.
4633 (substitute* "numpy/distutils/exec_command.py"
4634 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4635 (string-append match-start (assoc-ref inputs "bash") match-end)))
4636 ;; Use "gcc" executable, not "cc".
4637 (substitute* "numpy/distutils/system_info.py"
4638 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4639 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4640 #t))
4641 ;; Tests can only be run after the library has been installed and not
4642 ;; within the source directory.
4643 (delete 'check)
4644 (add-after 'install 'check
4645 (lambda* (#:key outputs inputs #:allow-other-keys)
4646 ;; Make installed package available for running the tests
4647 (add-installed-pythonpath inputs outputs)
4648 ;; Make sure "f2py" etc is found.
4649 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4650 ":" (getenv "PATH")))
4651 (with-directory-excursion "/tmp"
4652 (invoke "python" "-c"
4653 "import numpy; numpy.test(verbose=2)")))))))
4654 (home-page "https://numpy.org")
4655 (synopsis "Fundamental package for scientific computing with Python")
4656 (description "NumPy is the fundamental package for scientific computing
4657 with Python. It contains among other things: a powerful N-dimensional array
4658 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4659 and Fortran code, useful linear algebra, Fourier transform, and random number
4660 capabilities.")
4661 (properties `((python2-variant . ,(delay python2-numpy))))
4662 (license license:bsd-3)))
4663
4664 ;; Numpy 1.16.x are the last versions that support Python 2.
4665 (define-public python2-numpy
4666 (let ((numpy (package-with-python2
4667 (strip-python2-variant python-numpy))))
4668 (package/inherit
4669 numpy
4670 (version "1.16.5")
4671 (source (origin
4672 (method url-fetch)
4673 (uri (string-append
4674 "https://github.com/numpy/numpy/releases/download/v"
4675 version "/numpy-" version ".tar.gz"))
4676 (sha256
4677 (base32
4678 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4679
4680 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4681 ;; interest only for legacy code going back to NumPy's predecessor
4682 ;; Numeric.
4683 (define-public python2-numpy-1.8
4684 (package (inherit python2-numpy)
4685 (version "1.8.2")
4686 (source
4687 (origin
4688 (method git-fetch)
4689 (uri (git-reference
4690 (url "https://github.com/numpy/numpy")
4691 (commit (string-append "v" version))))
4692 (file-name (git-file-name "numpy" version))
4693 (sha256
4694 (base32
4695 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4696 (arguments
4697 (substitute-keyword-arguments (package-arguments python2-numpy)
4698 ((#:phases phases)
4699 `(modify-phases ,phases
4700 (replace 'configure-blas-lapack
4701 (lambda* (#:key inputs #:allow-other-keys)
4702 (call-with-output-file "site.cfg"
4703 (lambda (port)
4704 (format port
4705 "[openblas]
4706 libraries = openblas,lapack
4707 library_dirs = ~a/lib:~a/lib
4708 include_dirs = ~a/include:~a/include
4709 "
4710 (assoc-ref inputs "openblas")
4711 (assoc-ref inputs "lapack")
4712 (assoc-ref inputs "openblas")
4713 (assoc-ref inputs "lapack"))))
4714 #t))))))
4715 (native-inputs
4716 `(("python2-nose" ,python2-nose)))
4717 (description "NumPy is the fundamental package for scientific computing
4718 with Python. It contains among other things: a powerful N-dimensional array
4719 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4720 and Fortran code, useful linear algebra, Fourier transform, and random number
4721 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4722 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4723 Numeric.")
4724 (license license:bsd-3)))
4725
4726 (define-public python-munch
4727 (package
4728 (name "python-munch")
4729 (version "2.0.4")
4730 (source
4731 (origin
4732 (method url-fetch)
4733 (uri (pypi-uri "munch" version))
4734 (sha256
4735 (base32
4736 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4737 (build-system python-build-system)
4738 (home-page "https://github.com/Infinidat/munch")
4739 (synopsis "Dot-accessible dictionary")
4740 (description "Munch is a dot-accessible dictionary similar to JavaScript
4741 objects.")
4742 (license license:expat)))
4743
4744 (define-public python2-munch
4745 (package-with-python2 python-munch))
4746
4747 (define-public python-colormath
4748 (package
4749 (name "python-colormath")
4750 (version "3.0.0")
4751 (source
4752 (origin
4753 (method url-fetch)
4754 (uri (pypi-uri "colormath" version))
4755 (sha256
4756 (base32
4757 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4758 (build-system python-build-system)
4759 (propagated-inputs
4760 `(("python-networkx" ,python-networkx)
4761 ("python-numpy" ,python-numpy)))
4762 (home-page "https://github.com/gtaylor/python-colormath")
4763 (synopsis "Color math and conversion library")
4764 (description
4765 "This is a Python library for color math and conversions.")
4766 (license license:bsd-3)))
4767
4768 (define-public python2-colormath
4769 (package-with-python2 python-colormath))
4770
4771 (define-public python-spectra
4772 (package
4773 (name "python-spectra")
4774 (version "0.0.11")
4775 (source
4776 (origin
4777 (method url-fetch)
4778 (uri (pypi-uri "spectra" version))
4779 (sha256
4780 (base32
4781 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4782 (build-system python-build-system)
4783 (arguments
4784 `(#:phases
4785 (modify-phases %standard-phases
4786 (replace 'check
4787 (lambda _ (invoke "nosetests" "-v"))))))
4788 (propagated-inputs
4789 `(("python-colormath" ,python-colormath)))
4790 (native-inputs
4791 `(("python-nose" ,python-nose)))
4792 (home-page "https://github.com/jsvine/spectra")
4793 (synopsis "Color scales and color conversion")
4794 (description
4795 "This package provides a Python library intended to make color math,
4796 color scales, and color space conversion easy. It has support for:
4797
4798 @enumerate
4799 @item Color scales
4800 @item Color ranges
4801 @item Color blending
4802 @item Brightening/darkening colors
4803 @item Saturating/desaturating colors
4804 @item Conversion to/from multiple color spaces.
4805 @end enumerate\n")
4806 (license license:expat)))
4807
4808 (define-public python2-spectra
4809 (package-with-python2 python-spectra))
4810
4811 (define-public python-numpy-documentation
4812 (package
4813 (name "python-numpy-documentation")
4814 (version (package-version python-numpy))
4815 (source (package-source python-numpy))
4816 (build-system python-build-system)
4817 (native-inputs
4818 `(("python-matplotlib" ,python-matplotlib)
4819 ("python-numpy" ,python-numpy)
4820 ("pkg-config" ,pkg-config)
4821 ("python-sphinx" ,python-sphinx)
4822 ("python-numpydoc" ,python-numpydoc)
4823 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4824 texlive-fonts-ec
4825 texlive-generic-ifxetex
4826 texlive-generic-pdftex
4827 texlive-amsfonts
4828 texlive-latex-capt-of
4829 texlive-latex-cmap
4830 texlive-latex-environ
4831 texlive-latex-eqparbox
4832 texlive-latex-etoolbox
4833 texlive-latex-expdlist
4834 texlive-latex-fancyhdr
4835 texlive-latex-fancyvrb
4836 texlive-latex-fncychap
4837 texlive-latex-float
4838 texlive-latex-framed
4839 texlive-latex-geometry
4840 texlive-latex-graphics
4841 texlive-latex-hyperref
4842 texlive-latex-mdwtools
4843 texlive-latex-multirow
4844 texlive-latex-needspace
4845 texlive-latex-oberdiek
4846 texlive-latex-parskip
4847 texlive-latex-preview
4848 texlive-latex-tabulary
4849 texlive-latex-threeparttable
4850 texlive-latex-titlesec
4851 texlive-latex-trimspaces
4852 texlive-latex-ucs
4853 texlive-latex-upquote
4854 texlive-latex-url
4855 texlive-latex-varwidth
4856 texlive-latex-wrapfig)))
4857 ("texinfo" ,texinfo)
4858 ("perl" ,perl)
4859 ("scipy-sphinx-theme"
4860 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
4861 (origin ;the build script expects scipy-sphinx-theme as a git submodule
4862 (method git-fetch)
4863 (uri (git-reference
4864 (url "https://github.com/scipy/scipy-sphinx-theme")
4865 (commit commit)))
4866 (file-name (git-file-name "python-scipy-sphinx-theme"
4867 (string-take commit 7)))
4868 (sha256
4869 (base32
4870 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
4871 ,@(package-native-inputs python-numpy)))
4872 (arguments
4873 `(#:tests? #f ; we're only generating the documentation
4874 #:phases
4875 (modify-phases %standard-phases
4876 (delete 'build)
4877 (replace 'install
4878 (lambda* (#:key inputs outputs #:allow-other-keys)
4879 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4880 (doc (string-append
4881 data "/doc/" ,name "-"
4882 ,(package-version python-numpy)))
4883 (info-reader (string-append data "/info"))
4884 (html (string-append doc "/html"))
4885 (scipy-sphinx-theme "scipy-sphinx-theme")
4886 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4887 (pyver ,(string-append "PYVER=")))
4888
4889 ;; FIXME: this is needed to for texlive-union to generate
4890 ;; fonts, which are not found.
4891 (setenv "HOME" "/tmp")
4892
4893 (with-directory-excursion "doc"
4894 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4895 (mkdir-p html)
4896 (invoke "make" "html" pyver)
4897 (invoke "make" "latex" "PAPER=a4" pyver)
4898 (invoke "make" "-C" "build/latex"
4899 "all-pdf" "PAPER=a4" pyver)
4900 ;; FIXME: Generation of the info file fails.
4901 ;; (invoke "make" "info" pyver)
4902 ;; (mkdir-p info)
4903 ;; (copy-file "build/texinfo/numpy.info"
4904 ;; (string-append info "/numpy.info"))
4905 (for-each (lambda (file)
4906 (copy-file (string-append "build/latex" file)
4907 (string-append doc file)))
4908 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4909 (with-directory-excursion "build/html"
4910 (for-each (lambda (file)
4911 (let* ((dir (dirname file))
4912 (tgt-dir (string-append html "/" dir)))
4913 (unless (equal? "." dir)
4914 (mkdir-p tgt-dir))
4915 (install-file file html)))
4916 (find-files "." ".*")))))
4917 #t)))))
4918 (home-page (package-home-page python-numpy))
4919 (synopsis "Documentation for the python-numpy package")
4920 (description (package-description python-numpy))
4921 (license (package-license python-numpy))))
4922
4923 (define-public python2-numpy-documentation
4924 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4925 (package
4926 (inherit numpy-documentation)
4927 (native-inputs `(("python2-functools32" ,python2-functools32)
4928 ,@(package-native-inputs numpy-documentation))))))
4929
4930 (define-public python-pygit2
4931 (package
4932 (name "python-pygit2")
4933 (version "1.4.0")
4934 (source
4935 (origin
4936 (method url-fetch)
4937 (uri (pypi-uri "pygit2" version))
4938 (sha256
4939 (base32 "1j71iskvirkm8jzfmwdm79v69878m9iix8a8cn4xidgr3nmkisyb"))))
4940 (build-system python-build-system)
4941 (arguments
4942 '(#:tests? #f)) ; tests don't run correctly in our environment
4943 (propagated-inputs
4944 `(("python-cached-property" ,python-cached-property)
4945 ("python-cffi" ,python-cffi)
4946 ("libgit2" ,libgit2)))
4947 (native-inputs
4948 `(("python-pytest" ,python-pytest)))
4949 (home-page "https://github.com/libgit2/pygit2")
4950 (synopsis "Python bindings for libgit2")
4951 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4952 library, libgit2 implements Git plumbing.")
4953 ;; GPL2.0 only, with linking exception.
4954 (license license:gpl2)))
4955
4956 (define-public python-patiencediff
4957 (package
4958 (name "python-patiencediff")
4959 (version "0.2.0")
4960 (source
4961 (origin
4962 (method url-fetch)
4963 (uri (pypi-uri "patiencediff" version))
4964 (sha256
4965 (base32
4966 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4967 (build-system python-build-system)
4968 (home-page "https://www.breezy-vcs.org/")
4969 (synopsis "Python implementation of the patiencediff algorithm")
4970 (description
4971 "This package contains a Python implementation of the @code{patiencediff}
4972 algorithm. Patiencediff provides a good balance of performance, nice output for
4973 humans, and implementation simplicity.")
4974 (license license:gpl2)))
4975
4976 (define-public python-pdftotext
4977 (package
4978 (name "python-pdftotext")
4979 (version "2.1.5")
4980 (source
4981 (origin
4982 (method url-fetch)
4983 (uri (pypi-uri "pdftotext" version))
4984 (sha256
4985 (base32
4986 "19la1cw1hmkcr8big04gm2dd5fw0y0z97g930aiy29s1gaqbiblq"))))
4987 (build-system python-build-system)
4988 (inputs
4989 `(("poppler" ,poppler)))
4990 (home-page "https://github.com/jalan/pdftotext")
4991 (synopsis "Simple PDF text extraction")
4992 (description "Pdftotext is a Python library of PDF text extraction.")
4993 (license license:expat)))
4994
4995 (define-public python-pyparsing
4996 (package
4997 (name "python-pyparsing")
4998 (version "2.4.6")
4999 (source
5000 (origin
5001 (method url-fetch)
5002 (uri (pypi-uri "pyparsing" version))
5003 (sha256
5004 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
5005 (build-system python-build-system)
5006 (outputs '("out" "doc"))
5007 (arguments
5008 `(#:tests? #f ; no test target
5009 #:phases
5010 (modify-phases %standard-phases
5011 (add-after 'install 'install-doc
5012 (lambda* (#:key outputs #:allow-other-keys)
5013 (let* ((doc (string-append (assoc-ref outputs "doc")
5014 "/share/doc/" ,name "-" ,version))
5015 (html-doc (string-append doc "/html"))
5016 (examples (string-append doc "/examples")))
5017 (mkdir-p html-doc)
5018 (mkdir-p examples)
5019 (for-each
5020 (lambda (dir tgt)
5021 (map (lambda (file)
5022 (install-file file tgt))
5023 (find-files dir ".*")))
5024 (list "docs" "htmldoc" "examples")
5025 (list doc html-doc examples))
5026 #t))))))
5027 (home-page "https://github.com/pyparsing/pyparsing")
5028 (synopsis "Python parsing class library")
5029 (description
5030 "The pyparsing module is an alternative approach to creating and
5031 executing simple grammars, vs. the traditional lex/yacc approach, or the use
5032 of regular expressions. The pyparsing module provides a library of classes
5033 that client code uses to construct the grammar directly in Python code.")
5034 (license license:expat)))
5035
5036 (define-public python2-pyparsing
5037 (package-with-python2 python-pyparsing))
5038
5039 (define-public python-pyparsing-2.4.7
5040 (package
5041 (inherit python-pyparsing)
5042 (version "2.4.7")
5043 (source
5044 (origin
5045 (method url-fetch)
5046 (uri (pypi-uri "pyparsing" version))
5047 (sha256
5048 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5049
5050 (define-public python-numpydoc
5051 (package
5052 (name "python-numpydoc")
5053 (version "0.8.0")
5054 (source
5055 (origin
5056 (method url-fetch)
5057 (uri (pypi-uri "numpydoc" version))
5058 (sha256
5059 (base32
5060 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5061 (build-system python-build-system)
5062 (propagated-inputs
5063 `(("python-sphinx" ,python-sphinx)))
5064 (native-inputs
5065 `(("python-nose" ,python-nose)))
5066 (home-page "https://pypi.org/project/numpydoc/")
5067 (synopsis
5068 "Numpy's Sphinx extensions")
5069 (description
5070 "Sphinx extension to support docstrings in Numpy format.")
5071 (license license:bsd-2)
5072 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5073
5074 (define-public python2-numpydoc
5075 (let ((base (package-with-python2
5076 (strip-python2-variant python-numpydoc))))
5077 (package/inherit base
5078 (propagated-inputs
5079 `(("python2-jinja2" ,python2-jinja2)
5080 ,@(package-propagated-inputs base))))))
5081
5082 (define-public python-numexpr
5083 (package
5084 (name "python-numexpr")
5085 (version "2.6.5")
5086 (source
5087 (origin
5088 (method url-fetch)
5089 (uri (pypi-uri "numexpr" version))
5090 (sha256
5091 (base32
5092 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
5093 (build-system python-build-system)
5094 (arguments `(#:tests? #f)) ; no tests included
5095 (propagated-inputs
5096 `(("python-numpy" ,python-numpy)))
5097 (home-page "https://github.com/pydata/numexpr")
5098 (synopsis "Fast numerical expression evaluator for NumPy")
5099 (description
5100 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5101 expressions that operate on arrays are accelerated and use less memory than
5102 doing the same calculation in Python. In addition, its multi-threaded
5103 capabilities can make use of all your cores, which may accelerate
5104 computations, most specially if they are not memory-bounded (e.g. those using
5105 transcendental functions).")
5106 (license license:expat)))
5107
5108 (define-public python2-numexpr
5109 (package-with-python2 python-numexpr))
5110
5111 (define-public python-cycler
5112 (package
5113 (name "python-cycler")
5114 (version "0.10.0")
5115 (source (origin
5116 (method url-fetch)
5117 (uri (pypi-uri "cycler" version))
5118 (sha256
5119 (base32
5120 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5121 (build-system python-build-system)
5122 (arguments
5123 ;; XXX: The current version requires 'coveralls' which we don't have.
5124 ;; Enable this for the next release which uses 'python-pytest'.
5125 '(#:tests? #f))
5126 (propagated-inputs
5127 `(("python-six" ,python-six)))
5128 (home-page "https://matplotlib.org/cycler/")
5129 (synopsis "Composable keyword argument iterator")
5130 (description
5131 "When using @code{matplotlib} and plotting more than one line, it is
5132 common to want to be able to want to be able to cycle over one or more artist
5133 styles; but the plotting logic can quickly become involved.
5134 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5135 @code{Cycler} class was developed.")
5136 (license license:bsd-3)))
5137
5138 (define-public python2-cycler
5139 (package-with-python2 python-cycler))
5140
5141 (define-public python-colorspacious
5142 (package
5143 (name "python-colorspacious")
5144 (version "1.1.2")
5145 (source
5146 (origin
5147 (method git-fetch)
5148 (uri (git-reference
5149 (url "https://github.com/njsmith/colorspacious")
5150 (commit (string-append "v" version))))
5151 (file-name (git-file-name name version))
5152 (sha256
5153 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5154 (build-system python-build-system)
5155 (propagated-inputs
5156 `(("python-numpy" ,python-numpy)))
5157 (native-inputs
5158 `(("python-nose" ,python-nose)))
5159 (arguments
5160 `(#:phases
5161 (modify-phases %standard-phases
5162 (replace 'check
5163 (lambda _
5164 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5165 (home-page "https://github.com/njsmith/colorspacious")
5166 (synopsis "Python library for colorspace conversions")
5167 (description "@code{colorspacious} is a Python library that lets you
5168 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5169 (license license:expat)))
5170
5171 (define-public python2-colorspacious
5172 (package-with-python2 python-colorspacious))
5173
5174 (define-public python-matplotlib
5175 (package
5176 (name "python-matplotlib")
5177 (version "3.1.2")
5178 (source
5179 (origin
5180 (method url-fetch)
5181 (uri (pypi-uri "matplotlib" version))
5182 (sha256
5183 (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
5184 (patches
5185 (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
5186 (build-system python-build-system)
5187 (propagated-inputs ; the following packages are all needed at run time
5188 `(("python-cycler" ,python-cycler)
5189 ("python-kiwisolver" ,python-kiwisolver)
5190 ("python-pyparsing" ,python-pyparsing)
5191 ("python-pygobject" ,python-pygobject)
5192 ("gobject-introspection" ,gobject-introspection)
5193 ("python-tkinter" ,python "tk")
5194 ("python-dateutil" ,python-dateutil)
5195 ("python-numpy" ,python-numpy)
5196 ("python-pillow" ,python-pillow)
5197 ("python-pytz" ,python-pytz)
5198 ("python-six" ,python-six)
5199 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5200 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5201 ;; object. For this reason we need to import both libraries.
5202 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5203 ("python-pycairo" ,python-pycairo)
5204 ("python-cairocffi" ,python-cairocffi)))
5205 (inputs
5206 `(("libpng" ,libpng)
5207 ("freetype" ,freetype)
5208 ("cairo" ,cairo)
5209 ("glib" ,glib)
5210 ;; FIXME: Add backends when available.
5211 ;("python-wxpython" ,python-wxpython)
5212 ("tcl" ,tcl)
5213 ("tk" ,tk)))
5214 (native-inputs
5215 `(("pkg-config" ,pkg-config)
5216 ("python-pytest" ,python-pytest)
5217 ("python-mock" ,python-mock)
5218 ("unzip" ,unzip)
5219 ("jquery-ui"
5220 ,(origin
5221 (method url-fetch)
5222 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5223 (sha256
5224 (base32
5225 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5226 (arguments
5227 `(#:phases
5228 (modify-phases %standard-phases
5229 ;; XXX We disable all image comparison tests because we're using a
5230 ;; newer version of FreeType than matplotlib expects. This leads to
5231 ;; minor differences throughout the tests.
5232 (add-after 'unpack 'fix-and-disable-failing-tests
5233 (lambda _
5234 (substitute* (append (find-files "lib/matplotlib/tests/"
5235 "test_.*\\.py$")
5236 (find-files "lib/mpl_toolkits/tests"
5237 "test_.*\\.py$"))
5238 (("^from matplotlib" match)
5239 (string-append "import pytest\n" match))
5240 (("( *)@image_comparison" match indent)
5241 (string-append indent
5242 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5243 match)))
5244 (substitute* "lib/matplotlib/tests/test_animation.py"
5245 (("/bin/sh") (which "sh")))
5246 (for-each delete-file
5247 ;; test_normal_axes, test_get_tightbbox_polar
5248 '("lib/matplotlib/tests/test_axes.py"
5249 ;; We don't use the webagg backend and this test forces it.
5250 "lib/matplotlib/tests/test_backend_webagg.py"
5251 ;; test_outward_ticks
5252 "lib/matplotlib/tests/test_tightlayout.py"
5253 ;; test_hidden_axes fails with minor extent
5254 ;; differences, possibly due to the use of a
5255 ;; different version of FreeType.
5256 "lib/matplotlib/tests/test_constrainedlayout.py"
5257 ;; Fontconfig returns no fonts.
5258 "lib/matplotlib/tests/test_font_manager.py"))
5259 #t))
5260 (add-before 'install 'install-jquery-ui
5261 (lambda* (#:key outputs inputs #:allow-other-keys)
5262 (let ((dir (string-append (assoc-ref outputs "out")
5263 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5264 (mkdir-p dir)
5265 (invoke "unzip"
5266 (assoc-ref inputs "jquery-ui")
5267 "-d" dir))
5268 #t))
5269 (replace 'check
5270 (lambda* (#:key outputs inputs #:allow-other-keys)
5271 (add-installed-pythonpath inputs outputs)
5272 (invoke "python" "tests.py" "-v"
5273 "-m" "not network and not webagg")))
5274 (add-before 'build 'configure-environment
5275 (lambda* (#:key outputs inputs #:allow-other-keys)
5276 (let ((cairo (assoc-ref inputs "cairo")))
5277 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5278 ;; has not effect.
5279 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5280 (setenv "HOME" (getcwd))
5281 ;; Fix rounding errors when using the x87 FPU.
5282 (when (string-prefix? "i686" ,(%current-system))
5283 (setenv "CFLAGS" "-ffloat-store"))
5284 (call-with-output-file "setup.cfg"
5285 (lambda (port)
5286 (format port "[directories]~%
5287 basedirlist = ~a,~a~%
5288 [packages]~%
5289 tests = True~%"
5290 (assoc-ref inputs "tcl")
5291 (assoc-ref inputs "tk")))))
5292 #t)))))
5293 (home-page "https://matplotlib.org/")
5294 (synopsis "2D plotting library for Python")
5295 (description
5296 "Matplotlib is a Python 2D plotting library which produces publication
5297 quality figures in a variety of hardcopy formats and interactive environments
5298 across platforms. Matplotlib can be used in Python scripts, the python and
5299 ipython shell, web application servers, and six graphical user interface
5300 toolkits.")
5301 (license license:psfl)
5302 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5303
5304 (define-public python2-matplotlib
5305 (let ((matplotlib (package-with-python2
5306 (strip-python2-variant python-matplotlib))))
5307 (package (inherit matplotlib)
5308 (version "2.2.4")
5309 (source
5310 (origin
5311 (method url-fetch)
5312 (uri (pypi-uri "matplotlib" version))
5313 (sha256
5314 (base32
5315 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5316 (arguments
5317 (substitute-keyword-arguments (package-arguments matplotlib)
5318 ((#:phases phases)
5319 `(modify-phases ,phases
5320 (replace 'install-jquery-ui
5321 (lambda* (#:key outputs inputs #:allow-other-keys)
5322 (let ((dir (string-append (assoc-ref outputs "out")
5323 "/lib/python2.7/site-packages/"
5324 "matplotlib/backends/web_backend/")))
5325 (mkdir-p dir)
5326 (invoke "unzip"
5327 (assoc-ref inputs "jquery-ui")
5328 "-d" dir))
5329 #t))
5330 (delete 'fix-and-disable-failing-tests)
5331 (delete 'check))))) ; These tests weren't run the the past.
5332 ;; Make sure to use special packages for Python 2 instead
5333 ;; of those automatically rewritten by package-with-python2.
5334 (propagated-inputs
5335 `(("python2-pycairo" ,python2-pycairo)
5336 ("python2-backports-functools-lru-cache"
5337 ,python2-backports-functools-lru-cache)
5338 ("python2-functools32" ,python2-functools32)
5339 ("python2-pygobject-2" ,python2-pygobject-2)
5340 ("python2-subprocess32" ,python2-subprocess32)
5341 ("python2-tkinter" ,python-2 "tk")
5342 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5343 '("python-cairocffi"
5344 "python-pycairo"
5345 "python-pygobject"
5346 "python-tkinter")))))))
5347
5348 (define-public python-matplotlib-documentation
5349 (package
5350 (name "python-matplotlib-documentation")
5351 (version (package-version python-matplotlib))
5352 (source (package-source python-matplotlib))
5353 (build-system python-build-system)
5354 (native-inputs
5355 `(("python-matplotlib" ,python-matplotlib)
5356 ("python-colorspacious" ,python-colorspacious)
5357 ("python-sphinx" ,python-sphinx)
5358 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5359 ("python-sphinx-gallery" ,python-sphinx-gallery)
5360 ("python-numpydoc" ,python-numpydoc)
5361 ("python-ipython" ,python-ipython)
5362 ("python-ipykernel" ,python-ipykernel)
5363 ("python-mock" ,python-mock)
5364 ("graphviz" ,graphviz)
5365 ("texlive" ,(texlive-union (list texlive-amsfonts
5366 texlive-latex-amsmath
5367 texlive-latex-enumitem
5368 texlive-latex-expdlist
5369 texlive-latex-geometry
5370 texlive-latex-preview
5371 texlive-latex-type1cm
5372 texlive-latex-ucs
5373
5374 texlive-generic-pdftex
5375
5376 texlive-fonts-ec
5377 texlive-fonts-adobe-times
5378 texlive-fonts-txfonts)))
5379 ("texinfo" ,texinfo)
5380 ,@(package-native-inputs python-matplotlib)))
5381 (arguments
5382 `(#:tests? #f ; we're only generating documentation
5383 #:phases
5384 (modify-phases %standard-phases
5385 ;; The tests in python-matplotlib are run after the install phase, so
5386 ;; we need to delete the extra phase here.
5387 (delete 'check)
5388 (replace 'build
5389 (lambda _
5390 (chdir "doc")
5391 (setenv "PYTHONPATH"
5392 (string-append (getenv "PYTHONPATH")
5393 ":" (getcwd) "/../examples/units"))
5394 (substitute* "conf.py"
5395 ;; Don't use git.
5396 (("^SHA = check_output.*")
5397 (string-append "SHA = \"" ,version "\"\n"))
5398 ;; Don't fetch intersphinx files from the Internet
5399 (("^explicit_order_folders" m)
5400 (string-append "intersphinx_mapping = {}\n" m))
5401 (("'sphinx.ext.intersphinx',") "")
5402 ;; Disable URL embedding which requires internet access.
5403 (("'https://docs.scipy.org/doc/numpy'") "None")
5404 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5405 (invoke "make"
5406 "SPHINXBUILD=sphinx-build"
5407 "SPHINXOPTS=" ; don't abort on warnings
5408 "html" "texinfo")))
5409 (replace 'install
5410 (lambda* (#:key inputs outputs #:allow-other-keys)
5411 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5412 (doc (string-append data "/doc/python-matplotlib-" ,version))
5413 (info (string-append data "/info"))
5414 (html (string-append doc "/html")))
5415 (mkdir-p html)
5416 (mkdir-p info)
5417 (copy-recursively "build/html" html)
5418 (symlink (string-append html "/_images")
5419 (string-append info "/matplotlib-figures"))
5420 (with-directory-excursion "build/texinfo"
5421 (substitute* "matplotlib.texi"
5422 (("@image\\{([^,]*)" all file)
5423 (string-append "@image{matplotlib-figures/" file)))
5424 (symlink (string-append html "/_images")
5425 "./matplotlib-figures")
5426 (invoke "makeinfo" "--no-split"
5427 "-o" "matplotlib.info" "matplotlib.texi"))
5428 (install-file "build/texinfo/matplotlib.info" info))
5429 #t)))))
5430 (home-page (package-home-page python-matplotlib))
5431 (synopsis "Documentation for the python-matplotlib package")
5432 (description (package-description python-matplotlib))
5433 (license (package-license python-matplotlib))))
5434
5435 (define-public python2-matplotlib-documentation
5436 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5437 (package
5438 (inherit parent)
5439 (native-inputs
5440 (alist-delete "python-sphinx-copybutton"
5441 (package-native-inputs parent))))))
5442
5443 (define-public python-matplotlib-venn
5444 (package
5445 (name "python-matplotlib-venn")
5446 (version "0.11.5")
5447 (source
5448 (origin
5449 (method url-fetch)
5450 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5451 (sha256
5452 (base32
5453 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5454 (build-system python-build-system)
5455 (arguments '(#:tests? #f)) ; tests are not included
5456 (propagated-inputs
5457 `(("python-matplotlib" ,python-matplotlib)
5458 ("python-numpy" ,python-numpy)
5459 ("python-scipy" ,python-scipy)))
5460 (native-inputs
5461 `(("unzip" ,unzip)))
5462 (home-page "https://github.com/konstantint/matplotlib-venn")
5463 (synopsis "Plot area-proportional Venn diagrams")
5464 (description
5465 "This package provides tools for plotting area-proportional two- and
5466 three-way Venn diagrams in @code{matplotlib}.")
5467 (license license:expat)))
5468
5469 (define-public python-pysnptools
5470 (package
5471 (name "python-pysnptools")
5472 (version "0.4.11")
5473 (source
5474 (origin
5475 (method url-fetch)
5476 (uri (pypi-uri "pysnptools" version))
5477 (sha256
5478 (base32
5479 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5480 (build-system python-build-system)
5481 (arguments
5482 `(#:tests? #f ; no test data are included
5483 #:phases
5484 (modify-phases %standard-phases
5485 (replace 'check
5486 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5487 (if tests?
5488 (begin
5489 (add-installed-pythonpath inputs outputs)
5490 (invoke "python3" "pysnptools/test.py"))
5491 #t))))))
5492 (propagated-inputs
5493 `(("python-dill" ,python-dill)
5494 ("python-h5py" ,python-h5py)
5495 ("python-numpy" ,python-numpy)
5496 ("python-pandas" ,python-pandas)
5497 ("python-psutil" ,python-psutil)
5498 ("python-scipy" ,python-scipy)))
5499 (native-inputs
5500 `(("python-cython" ,python-cython)))
5501 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5502 (synopsis "Library for reading and manipulating genetic data")
5503 (description
5504 "PySnpTools is a library for reading and manipulating genetic data. It
5505 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5506 those files. It can also efficiently manipulate ranges of integers using set
5507 operators such as union, intersection, and difference.")
5508 (license license:asl2.0)))
5509
5510 (define-public python2-pysnptools
5511 (package-with-python2 python-pysnptools))
5512
5513 (define-public python-wurlitzer
5514 (package
5515 (name "python-wurlitzer")
5516 (version "2.0.1")
5517 (source
5518 (origin
5519 (method url-fetch)
5520 (uri (pypi-uri "wurlitzer" version))
5521 (sha256
5522 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5523 (build-system python-build-system)
5524 (arguments
5525 '(#:phases
5526 (modify-phases %standard-phases
5527 (replace 'check
5528 (lambda _
5529 (invoke "pytest" "-vv" "test.py"))))))
5530 (native-inputs
5531 `(("python-mock" ,python-mock)
5532 ("python-pytest" ,python-pytest)))
5533 (home-page "https://github.com/minrk/wurlitzer")
5534 (synopsis "Capture C-level output in context managers")
5535 (description
5536 "This library helps to redirect @code{sys.stdout} to a stream or a file
5537 while executing some piece of code, including C code running within a Python
5538 process.")
5539 (license license:expat)))
5540
5541 (define-public python-socksipy-branch
5542 (package
5543 (name "python-socksipy-branch")
5544 (version "1.01")
5545 (source
5546 (origin
5547 (method url-fetch)
5548 (uri (pypi-uri "SocksiPy-branch" version))
5549 (sha256
5550 (base32
5551 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5552 (build-system python-build-system)
5553 (arguments
5554 `(#:tests? #f)) ; There are no tests
5555 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5556 (synopsis "Python SOCKS module")
5557 (description
5558 "SocksiPy - A Python SOCKS client module. It provides a
5559 socket-like interface that supports connections to any TCP
5560 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5561 The original version was developed by Dan Haim, this is a
5562 branch created by Mario Vilas to address some open issues,
5563 as the original project seems to have been abandoned circa 2007.")
5564 (license license:bsd-3)))
5565
5566 (define-public python2-socksipy-branch
5567 (package-with-python2 python-socksipy-branch))
5568
5569 (define-public python-socksipychain
5570 (package
5571 (name "python-socksipychain")
5572 (version "2.1.2")
5573 (source
5574 (origin
5575 (method git-fetch)
5576 (uri (git-reference
5577 (url "https://github.com/pagekite/PySocksipyChain")
5578 (commit (string-append "v" version))))
5579 (file-name (git-file-name name version))
5580 (sha256
5581 (base32
5582 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5583 (build-system python-build-system)
5584 (arguments
5585 `(#:tests? #f)) ; Tests try to access the network.
5586 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5587 (synopsis "Python SOCKS module with chained proxies support")
5588 (description
5589 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5590 adds support for arbitrary chaining of proxy servers and various modes of
5591 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5592 a simple netcat replacement with chaining support.")
5593 (license license:bsd-3)))
5594
5595 (define-public python-pycodestyle
5596 (package
5597 (name "python-pycodestyle")
5598 (version "2.6.0")
5599 (source
5600 (origin
5601 (method url-fetch)
5602 (uri (pypi-uri "pycodestyle" version))
5603 (sha256
5604 (base32
5605 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5606 (build-system python-build-system)
5607 (arguments
5608 `(#:phases
5609 (modify-phases %standard-phases
5610 (replace 'check
5611 (lambda _
5612 (invoke "pytest" "-vv"))))))
5613 (native-inputs
5614 `(("python-pytest" ,python-pytest)))
5615 (home-page "https://pycodestyle.readthedocs.io/")
5616 (synopsis "Python style guide checker")
5617 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5618 Python code against some of the style conventions in
5619 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5620 (license license:expat)))
5621
5622 (define-public python2-pycodestyle
5623 (package-with-python2 python-pycodestyle))
5624
5625 (define-public python-multidict
5626 (package
5627 (name "python-multidict")
5628 (version "4.7.5")
5629 (source
5630 (origin
5631 (method url-fetch)
5632 (uri (pypi-uri "multidict" version))
5633 (sha256
5634 (base32
5635 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5636 (build-system python-build-system)
5637 (arguments
5638 '(#:modules ((ice-9 ftw)
5639 (srfi srfi-1)
5640 (srfi srfi-26)
5641 (guix build utils)
5642 (guix build python-build-system))
5643 #:phases (modify-phases %standard-phases
5644 (replace 'check
5645 (lambda* (#:key tests? #:allow-other-keys)
5646 (if tests?
5647 (begin
5648 (let ((libdir (find (cut string-prefix? "lib." <>)
5649 (scandir "build"))))
5650 (setenv "PYTHONPATH"
5651 (string-append "./build/" libdir ":"
5652 (getenv "PYTHONPATH")))
5653 (invoke "pytest" "-vv")))
5654 (format #t "test suite not run~%"))
5655 #t)))))
5656 (native-inputs
5657 `(("python-pytest" ,python-pytest)
5658 ("python-pytest-cov" ,python-pytest-cov)))
5659 (home-page "https://github.com/aio-libs/multidict/")
5660 (synopsis "Multidict implementation")
5661 (description "Multidict is dict-like collection of key-value pairs
5662 where key might be occurred more than once in the container.")
5663 (license license:asl2.0)))
5664
5665 (define-public python-orderedmultidict
5666 (package
5667 (name "python-orderedmultidict")
5668 (version "1.0")
5669 (source
5670 (origin
5671 (method url-fetch)
5672 (uri (pypi-uri "orderedmultidict" version))
5673 (sha256
5674 (base32
5675 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5676 (build-system python-build-system)
5677 (arguments
5678 `(#:phases
5679 (modify-phases %standard-phases
5680 (add-after 'unpack 'fix-tests
5681 (lambda _
5682 ;; The package uses nosetest for running the tests.
5683 ;; Adding this initfile allows to run the test suite
5684 ;; without requiring nosetest.
5685 (with-output-to-file "tests/__init__.py" newline)
5686 #t)))))
5687 (propagated-inputs
5688 `(("python-six" ,python-six)))
5689 (native-inputs
5690 `(("python-pycodestyle" ,python-pycodestyle)))
5691 (home-page "https://github.com/gruns/orderedmultidict")
5692 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5693 (description "This package contains a library for ordered multivalue
5694 dictionaries. A multivalue dictionary is a dictionary that can store
5695 multiple values for the same key. An ordered multivalue dictionary is a
5696 multivalue dictionary that retains the order of insertions and deletions.")
5697 (license license:unlicense)))
5698
5699 (define-public python2-orderedmultidict
5700 (package-with-python2 python-orderedmultidict))
5701
5702 (define-public python-autopep8
5703 (package
5704 (name "python-autopep8")
5705 (version "1.5.3")
5706 (source
5707 (origin
5708 (method url-fetch)
5709 (uri (pypi-uri "autopep8" version))
5710 (sha256
5711 (base32
5712 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5713 (build-system python-build-system)
5714 (propagated-inputs
5715 `(("python-pycodestyle" ,python-pycodestyle)
5716 ("python-toml" ,python-toml)))
5717 (home-page "https://github.com/hhatto/autopep8")
5718 (synopsis "Format Python code according to the PEP 8 style guide")
5719 (description
5720 "@code{autopep8} automatically formats Python code to conform to
5721 the PEP 8 style guide. It uses the pycodestyle utility to determine
5722 what parts of the code needs to be formatted. @code{autopep8} is
5723 capable of fixing most of the formatting issues that can be reported
5724 by pycodestyle.")
5725 (license (license:non-copyleft
5726 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5727
5728 (define-public python2-autopep8
5729 (package-with-python2 python-autopep8))
5730
5731 (define-public python-distlib
5732 (package
5733 (name "python-distlib")
5734 (version "0.3.0")
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (pypi-uri "distlib" version ".zip"))
5739 (sha256
5740 (base32
5741 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5742 (build-system python-build-system)
5743 (arguments
5744 `(#:phases
5745 (modify-phases %standard-phases
5746 (add-before 'build 'no-/bin/sh
5747 (lambda _
5748 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5749 (("/bin/sh") (which "sh")))
5750 #t))
5751 (add-before 'check 'prepare-test-env
5752 (lambda _
5753 (setenv "HOME" "/tmp")
5754 ;; NOTE: Any value works, the variable just has to be present.
5755 (setenv "SKIP_ONLINE" "1")
5756 #t)))))
5757 (native-inputs `(("unzip" ,unzip)))
5758 (home-page "https://bitbucket.org/pypa/distlib")
5759 (synopsis "Distribution utilities")
5760 (description "Distlib is a library which implements low-level functions that
5761 relate to packaging and distribution of Python software. It is intended to be
5762 used as the basis for third-party packaging tools.")
5763 (license license:psfl)))
5764
5765 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
5766 (define-public python-distlib/next
5767 (package
5768 (inherit python-distlib)
5769 (version "0.3.1")
5770 (source
5771 (origin
5772 (method url-fetch)
5773 (uri (pypi-uri "distlib" version ".zip"))
5774 (sha256
5775 (base32
5776 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
5777
5778 (define-public python-distutils-extra
5779 (package
5780 (name "python-distutils-extra")
5781 (version "2.38")
5782 (source
5783 (origin
5784 (method url-fetch)
5785 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5786 version "/+download/python-distutils-extra-"
5787 version ".tar.gz"))
5788 (sha256
5789 (base32
5790 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5791 (build-system python-build-system)
5792 (home-page "https://launchpad.net/python-distutils-extra/")
5793 (synopsis "Enhancements to Python's distutils")
5794 (description
5795 "The python-distutils-extra module enables you to easily integrate
5796 gettext support, themed icons, and scrollkeeper-based documentation into
5797 Python's distutils.")
5798 (license license:gpl2)))
5799
5800 (define-public python2-distutils-extra
5801 (package-with-python2 python-distutils-extra))
5802
5803 (define-public python2-elib.intl
5804 (package
5805 (name "python2-elib.intl")
5806 (version "0.0.3")
5807 (source
5808 (origin
5809 ;; This project doesn't tag releases or publish tarballs, so we take
5810 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5811 (method git-fetch)
5812 (uri (git-reference
5813 (url "https://github.com/dieterv/elib.intl")
5814 (commit "d09997cfef")))
5815 (file-name (string-append name "-" version "-checkout"))
5816 (sha256
5817 (base32
5818 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5819 (build-system python-build-system)
5820 (arguments
5821 ;; incompatible with Python 3 (exception syntax)
5822 `(#:python ,python-2
5823 #:tests? #f))
5824 (home-page "https://github.com/dieterv/elib.intl")
5825 (synopsis "Enhanced internationalization for Python")
5826 (description
5827 "The elib.intl module provides enhanced internationalization (I18N)
5828 services for your Python modules and applications.")
5829 (license license:lgpl3+)))
5830
5831 (define-public python-olefile
5832 (package
5833 (name "python-olefile")
5834 (version "0.46")
5835 (source
5836 (origin
5837 (method url-fetch)
5838 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5839 "download/v" version "/olefile-" version ".tar.gz"))
5840 (file-name (string-append name "-" version ".tar.gz"))
5841 (sha256
5842 (base32
5843 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5844 (build-system python-build-system)
5845 (home-page "https://www.decalage.info/python/olefileio")
5846 (synopsis "Read and write Microsoft OLE2 files.")
5847 (description
5848 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5849 Storage or Compound Document, Microsoft Office). It is an improved version of
5850 the OleFileIO module from PIL, the Python Image Library.")
5851 (license license:bsd-3)))
5852
5853 (define-public python2-olefile
5854 (package-with-python2 python-olefile))
5855
5856 (define-public python-pikepdf
5857 (package
5858 (name "python-pikepdf")
5859 (version "2.9.1")
5860 (source
5861 (origin
5862 (method url-fetch)
5863 (uri (pypi-uri "pikepdf" version))
5864 (sha256
5865 (base32 "1n53fhdgnq9yxvm2m039vl8l2kg3fkln3pm0wv4rzj0gvpq9rhcr"))))
5866 (build-system python-build-system)
5867 (arguments
5868 `(#:tests? #false)) ;require python-xmp-toolkit
5869 (native-inputs
5870 `(("pybind11" ,pybind11)
5871 ("python-setuptools" ,python-setuptools)
5872 ("python-setuptools-scm" ,python-setuptools-scm/next)
5873 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
5874 ("python-toml" ,python-toml)
5875 ("python-wheel" ,python-wheel)))
5876 (inputs
5877 `(("qpdf" ,qpdf)))
5878 (propagated-inputs
5879 `(("python-lxml" ,python-lxml)
5880 ("python-pillow" ,python-pillow)))
5881 (home-page "https://github.com/pikepdf/pikepdf")
5882 (synopsis "Read and write PDFs with Python")
5883 (description
5884 "pikepdf is a Python library for reading and writing PDF files.")
5885 (license license:mpl2.0)))
5886
5887 (define-public python-pillow
5888 (package
5889 (name "python-pillow")
5890 (version "8.1.1")
5891 (source
5892 (origin
5893 (method url-fetch)
5894 (uri (pypi-uri "Pillow" version))
5895 (sha256
5896 (base32
5897 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
5898 (build-system python-build-system)
5899 (native-inputs
5900 `(("python-pytest" ,python-pytest)))
5901 (inputs
5902 `(("freetype" ,freetype)
5903 ("lcms" ,lcms)
5904 ("libjpeg" ,libjpeg-turbo)
5905 ("libtiff" ,libtiff)
5906 ("libwebp" ,libwebp)
5907 ("openjpeg" ,openjpeg)
5908 ("zlib" ,zlib)))
5909 (propagated-inputs
5910 `(("python-olefile" ,python-olefile)))
5911 (arguments
5912 `(#:phases
5913 (modify-phases %standard-phases
5914 (add-after 'unpack 'patch-ldconfig
5915 (lambda _
5916 (substitute* "setup.py"
5917 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5918 (replace 'check
5919 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5920 (if tests?
5921 (begin
5922 (setenv "HOME" (getcwd))
5923 ;; Make installed package available for running the tests.
5924 (add-installed-pythonpath inputs outputs)
5925 (invoke "python" "selftest.py" "--installed")
5926 (invoke "python" "-m" "pytest" "-vv"))
5927 #t))))))
5928 (home-page "https://python-pillow.org")
5929 (synopsis "Fork of the Python Imaging Library")
5930 (description
5931 "The Python Imaging Library adds image processing capabilities to your
5932 Python interpreter. This library provides extensive file format support, an
5933 efficient internal representation, and fairly powerful image processing
5934 capabilities. The core image library is designed for fast access to data
5935 stored in a few basic pixel formats. It should provide a solid foundation for
5936 a general image processing tool.")
5937 (properties `((python2-variant . ,(delay python2-pillow))))
5938 (license (license:x11-style
5939 "http://www.pythonware.com/products/pil/license.htm"
5940 "The PIL Software License"))))
5941
5942 (define-public python2-pillow
5943 (package-with-python2
5944 (package
5945 (inherit (strip-python2-variant python-pillow))
5946 ;; Version 6 is the last series with Python 2 support.
5947 (version "6.2.2")
5948 (source
5949 (origin
5950 (method url-fetch)
5951 (uri (pypi-uri "Pillow" version))
5952 (sha256
5953 (base32
5954 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
5955
5956 (define-public python-pillow-2.9
5957 (package
5958 (inherit python-pillow)
5959 (version "2.9.0")
5960 (source
5961 (origin
5962 (method url-fetch)
5963 (uri (pypi-uri "Pillow" version))
5964 (sha256
5965 (base32
5966 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5967 (arguments
5968 (substitute-keyword-arguments (package-arguments python-pillow)
5969 ((#:tests? _ #f) #f)))
5970 (properties '((hidden? #t)))))
5971
5972 (define-public python-pillow-simd
5973 (package
5974 (inherit python-pillow)
5975 (name "python-pillow-simd")
5976 (version "7.1.2")
5977 ;; The PyPI tarball does not include test files.
5978 (source
5979 (origin
5980 (method git-fetch)
5981 (uri (git-reference
5982 (url "https://github.com/uploadcare/pillow-simd")
5983 (commit version)))
5984 (file-name (git-file-name name version))
5985 (sha256
5986 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
5987 (arguments
5988 (substitute-keyword-arguments
5989 (package-arguments python-pillow)
5990 ((#:phases phases)
5991 `(modify-phases ,phases
5992 (add-after 'unpack 'make-tests-writable
5993 (lambda _
5994 (for-each make-file-writable (find-files "Tests"))
5995 #t))))))
5996 (inputs
5997 `(("libraqm" ,libraqm)
5998 ("libimagequant" ,libimagequant)
5999 ,@(package-inputs python-pillow)))
6000 (home-page "https://github.com/uploadcare/pillow-simd")
6001 (synopsis "Fork of the Python Imaging Library (Pillow)")
6002 (description "This package is a fork of Pillow which adds support for SIMD
6003 parallelism.")))
6004
6005 (define-public python-roifile
6006 (package
6007 (name "python-roifile")
6008 (version "2020.5.28")
6009 (source
6010 (origin
6011 (method url-fetch)
6012 (uri (pypi-uri "roifile" version))
6013 (sha256
6014 (base32
6015 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
6016 (build-system python-build-system)
6017 (arguments `(#:tests? #f)) ; there are none
6018 (propagated-inputs
6019 `(("python-numpy" ,python-numpy)))
6020 (home-page "https://www.lfd.uci.edu/~gohlke/")
6021 (synopsis "Read and write ImageJ ROI format")
6022 (description "Roifile is a Python library to read, write, create, and plot
6023 ImageJ ROIs, an undocumented and ImageJ application specific format to store
6024 regions of interest, geometric shapes, paths, text, etc for image overlays.")
6025 (license license:bsd-3)))
6026
6027 (define-public python-tifffile
6028 (package
6029 (name "python-tifffile")
6030 (version "2020.6.3")
6031 (source
6032 (origin
6033 (method url-fetch)
6034 (uri (pypi-uri "tifffile" version))
6035 (sha256
6036 (base32
6037 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
6038 (build-system python-build-system)
6039 ;; Tests require lfdfiles, which depends on tifffile
6040 (arguments `(#:tests? #f))
6041 (propagated-inputs
6042 `(("python-numpy" ,python-numpy)
6043 ;;("python-lfdfiles" ,python-lfdfiles)
6044 ("python-roifile" ,python-roifile)))
6045 (home-page "https://www.lfd.uci.edu/~gohlke/")
6046 (synopsis "Read and write TIFF(r) files")
6047 (description "This package lets you read image and metadata from many
6048 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6049 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6050 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6051 (license license:bsd-3)))
6052
6053 (define-public python-lfdfiles
6054 (package
6055 (name "python-lfdfiles")
6056 (version "2020.1.1")
6057 (source
6058 (origin
6059 (method url-fetch)
6060 (uri (pypi-uri "lfdfiles" version))
6061 (sha256
6062 (base32
6063 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
6064 (build-system python-build-system)
6065 (propagated-inputs
6066 `(("python-click" ,python-click)
6067 ("python-numpy" ,python-numpy)
6068 ("python-tifffile" ,python-tifffile)))
6069 (home-page "https://www.lfd.uci.edu/~gohlke/")
6070 (synopsis "Work with LFD data files")
6071 (description
6072 "Lfdfiles is a Python library and console script for reading, writing,
6073 converting, and viewing many of the proprietary file formats used to store
6074 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6075 (license license:bsd-3)))
6076
6077 (define-public python-imageio
6078 (package
6079 (name "python-imageio")
6080 (version "2.8.0")
6081 (source
6082 (origin
6083 (method url-fetch)
6084 (uri (pypi-uri "imageio" version))
6085 (sha256
6086 (base32
6087 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6088 (build-system python-build-system)
6089 (arguments
6090 `(#:tests? #f ; many tests require online data
6091 #:phases
6092 (modify-phases %standard-phases
6093 (replace 'check
6094 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6095 (if tests?
6096 (begin
6097 ;; Make installed package available for running the tests.
6098 (add-installed-pythonpath inputs outputs)
6099 (invoke "pytest" "-vv"))
6100 #t))))))
6101 (propagated-inputs
6102 `(("python-numpy" ,python-numpy)
6103 ("python-pillow" ,python-pillow)
6104 ("python-psutil" ,python-psutil)))
6105 (native-inputs
6106 `(("python-pytest" ,python-pytest)))
6107 (home-page "https://imageio.github.io/")
6108 (synopsis "Library for reading and writing a wide range of image data")
6109 (description
6110 "Imageio is a Python library that provides an easy interface to read and
6111 write a wide range of image data, including animated images, video, volumetric
6112 data, and scientific formats.")
6113 (license license:bsd-2)))
6114
6115 (define-public python-pycparser
6116 (package
6117 (name "python-pycparser")
6118 (version "2.20")
6119 (source
6120 (origin
6121 (method url-fetch)
6122 (uri (pypi-uri "pycparser" version))
6123 (sha256
6124 (base32
6125 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6126 (outputs '("out" "doc"))
6127 (build-system python-build-system)
6128 (native-inputs
6129 `(("pkg-config" ,pkg-config)))
6130 (arguments
6131 `(#:phases
6132 (modify-phases %standard-phases
6133 (replace 'check
6134 (lambda _
6135 (with-directory-excursion "tests"
6136 (invoke "python" "all_tests.py"))
6137 #t))
6138 (add-after 'install 'install-doc
6139 (lambda* (#:key outputs #:allow-other-keys)
6140 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6141 (doc (string-append data "/doc/" ,name "-" ,version))
6142 (examples (string-append doc "/examples")))
6143 (mkdir-p examples)
6144 (for-each (lambda (file)
6145 (copy-file (string-append "." file)
6146 (string-append doc file)))
6147 '("/README.rst" "/CHANGES" "/LICENSE"))
6148 (copy-recursively "examples" examples)
6149 #t))))))
6150 (home-page "https://github.com/eliben/pycparser")
6151 (synopsis "C parser in Python")
6152 (description
6153 "Pycparser is a complete parser of the C language, written in pure Python
6154 using the PLY parsing library. It parses C code into an AST and can serve as
6155 a front-end for C compilers or analysis tools.")
6156 (license license:bsd-3)))
6157
6158 (define-public python2-pycparser
6159 (package-with-python2 python-pycparser))
6160
6161 (define-public python-xlsxwriter
6162 (package
6163 (name "python-xlsxwriter")
6164 (version "1.3.7")
6165 (source
6166 (origin
6167 ;; There are no tests in the PyPI tarball.
6168 (method git-fetch)
6169 (uri (git-reference
6170 (url "https://github.com/jmcnamara/XlsxWriter")
6171 (commit (string-append "RELEASE_" version))))
6172 (file-name (git-file-name name version))
6173 (sha256
6174 (base32 "1qg40r2mwrqfmhaxnary1cfgi0dwwazp5qga7c9p2cdji2v0x5rm"))))
6175 (build-system python-build-system)
6176 (home-page "https://github.com/jmcnamara/XlsxWriter")
6177 (synopsis "Python module for creating Excel XLSX files")
6178 (description
6179 "XlsxWriter is a Python module that can be used to write text, numbers,
6180 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
6181 (license license:bsd-2)))
6182
6183 (define-public python-pywavelets
6184 (package
6185 (name "python-pywavelets")
6186 (version "1.1.1")
6187 (home-page "https://github.com/PyWavelets/pywt")
6188 (source (origin
6189 (method url-fetch)
6190 (uri (pypi-uri "PyWavelets" version))
6191 (sha256
6192 (base32
6193 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6194 (build-system python-build-system)
6195 (arguments
6196 '(#:modules ((ice-9 ftw)
6197 (srfi srfi-1)
6198 (srfi srfi-26)
6199 (guix build utils)
6200 (guix build python-build-system))
6201 #:phases
6202 (modify-phases %standard-phases
6203 (replace 'check
6204 (lambda _
6205 (let ((cwd (getcwd))
6206 (libdir (find (cut string-prefix? "lib." <>)
6207 (scandir "build"))))
6208 (with-directory-excursion (string-append cwd "/build/" libdir)
6209 (invoke "pytest" "-vv"))))))))
6210 (native-inputs
6211 `(("python-matplotlib" ,python-matplotlib) ;for tests
6212 ("python-pytest" ,python-pytest)))
6213 (propagated-inputs
6214 `(("python-numpy" ,python-numpy)))
6215 (synopsis "Wavelet transforms in Python")
6216 (description
6217 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6218 mathematical basis functions that are localized in both time and frequency.
6219 Wavelet transforms are time-frequency transforms employing wavelets. They are
6220 similar to Fourier transforms, the difference being that Fourier transforms are
6221 localized only in frequency instead of in time and frequency.")
6222 (license license:expat)))
6223
6224 (define-public python-pywal
6225 (package
6226 (name "python-pywal")
6227 (version "3.3.0")
6228 (source
6229 (origin
6230 (method git-fetch)
6231 (uri (git-reference
6232 (url "https://github.com/dylanaraps/pywal")
6233 (commit version)))
6234 (file-name (git-file-name name version))
6235 (sha256
6236 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
6237 (build-system python-build-system)
6238 (arguments
6239 `(#:phases
6240 (modify-phases %standard-phases
6241 (add-before 'check 'fix-home-directory
6242 (lambda _
6243 ;; Tests fail with "Permission denied: '/homeless-shelter'".
6244 (setenv "HOME" "/tmp")
6245 #t)))))
6246 (inputs
6247 `(("imagemagick" ,imagemagick)))
6248 (home-page "https://github.com/dylanaraps/pywal")
6249 (synopsis "Color palette generator and applicator")
6250 (description
6251 "Pywal is a tool that generates a color palette from the dominant colors
6252 in an image. It then applies the colors system-wide and on-the-fly in all of
6253 your favourite programs.")
6254 (license license:expat)))
6255
6256 (define-public python-pywinrm
6257 (package
6258 (name "python-pywinrm")
6259 (version "0.4.1")
6260 (source
6261 (origin
6262 (method url-fetch)
6263 (uri (pypi-uri "pywinrm" version))
6264 (sha256
6265 (base32
6266 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6267 (build-system python-build-system)
6268 (propagated-inputs
6269 `(("python-six" ,python-six)
6270 ("python-requests_ntlm" ,python-requests_ntlm)
6271 ("python-xmltodict" ,python-xmltodict)
6272 ("python-kerberos" ,python-kerberos)))
6273 (native-inputs
6274 `(("python-mock" ,python-mock)
6275 ("python-pytest" ,python-pytest)))
6276 (home-page "https://github.com/diyan/pywinrm/")
6277 (synopsis
6278 "Python library for Windows Remote Management (WinRM)")
6279 (description
6280 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6281 service. It allows you to invoke commands on target Windows machines from
6282 any machine that can run Python.")
6283 (license license:expat)))
6284
6285 (define-public python-xcffib
6286 (package
6287 (name "python-xcffib")
6288 (version "0.6.0")
6289 (source
6290 (origin
6291 (method url-fetch)
6292 (uri (pypi-uri "xcffib" version))
6293 (sha256
6294 (base32
6295 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6296 (build-system python-build-system)
6297 (inputs
6298 `(("libxcb" ,libxcb)))
6299 (propagated-inputs
6300 `(("python-cffi" ,python-cffi) ; used at run time
6301 ("python-six" ,python-six)))
6302 (arguments
6303 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6304 #:tests? #f
6305 #:phases
6306 (modify-phases %standard-phases
6307 (add-after 'unpack 'fix-libxcb-path
6308 (lambda* (#:key inputs #:allow-other-keys)
6309 (let ((libxcb (assoc-ref inputs "libxcb")))
6310 (substitute* '("xcffib/__init__.py")
6311 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6312 #t)))
6313 (add-after 'install 'install-doc
6314 (lambda* (#:key outputs #:allow-other-keys)
6315 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6316 "/doc/" ,name "-" ,version)))
6317 (mkdir-p doc)
6318 (copy-file "README.md"
6319 (string-append doc "/README.md"))
6320 #t))))))
6321 (home-page "https://github.com/tych0/xcffib")
6322 (synopsis "XCB Python bindings")
6323 (description
6324 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6325 support for Python 3 and PyPy. It is based on cffi.")
6326 (license license:expat)))
6327
6328 (define-public python2-xcffib
6329 (package-with-python2 python-xcffib))
6330
6331 (define-public python-cairocffi
6332 (package
6333 (name "python-cairocffi")
6334 (version "1.2.0")
6335 (source
6336 (origin
6337 ;; The PyPI archive does not include the documentation, so use Git.
6338 (method git-fetch)
6339 (uri (git-reference
6340 (url "https://github.com/Kozea/cairocffi")
6341 (commit (string-append "v" version))))
6342 (file-name (git-file-name name version))
6343 (sha256
6344 (base32
6345 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6346 (build-system python-build-system)
6347 (outputs '("out" "doc"))
6348 (inputs
6349 `(("glib" ,glib)
6350 ("gtk+" ,gtk+)
6351 ("gdk-pixbuf" ,gdk-pixbuf)
6352 ("cairo" ,cairo)))
6353 (native-inputs
6354 `(("python-numpy" ,python-numpy)
6355 ("python-pytest" ,python-pytest)
6356 ("python-pytest-cov" ,python-pytest-cov)
6357 ("python-pytest-runner" ,python-pytest-runner)
6358 ("python-sphinx" ,python-sphinx)
6359 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6360 (propagated-inputs
6361 `(("python-xcffib" ,python-xcffib))) ; used at run time
6362 (arguments
6363 `(#:phases
6364 (modify-phases %standard-phases
6365 (add-after 'unpack 'patch-paths
6366 (lambda* (#:key inputs #:allow-other-keys)
6367 (substitute* "cairocffi/__init__.py"
6368 ;; Hack the dynamic library loading mechanism.
6369 (("find_library\\(library_name\\)")
6370 "\"found\"")
6371 (("filenames = \\(library_filename,\\) \\+ filenames")
6372 "pass")
6373 (("libcairo.so.2")
6374 (string-append (assoc-ref inputs "cairo")
6375 "/lib/libcairo.so.2")))
6376 (substitute* "cairocffi/pixbuf.py"
6377 (("libgdk_pixbuf-2.0.so.0")
6378 (string-append (assoc-ref inputs "gdk-pixbuf")
6379 "/lib/libgdk_pixbuf-2.0.so.0"))
6380 (("libgobject-2.0.so.0")
6381 (string-append (assoc-ref inputs "glib")
6382 "/lib/libgobject-2.0.so.0"))
6383 (("libglib-2.0.so.0")
6384 (string-append (assoc-ref inputs "glib")
6385 "/lib/libglib-2.0.so.0"))
6386 (("libgdk-3.so.0")
6387 (string-append (assoc-ref inputs "gtk+")
6388 "/lib/libgdk-3.so.0")))
6389 #t))
6390 (add-after 'unpack 'disable-linters
6391 ;; Their check fails; none of our business.
6392 (lambda _
6393 (substitute* "setup.cfg"
6394 ((".*pytest-flake8.*") "")
6395 ((".*pytest-isort.*") "")
6396 (("--flake8") "")
6397 (("--isort") ""))
6398 #t))
6399 (add-after 'install 'install-doc
6400 (lambda* (#:key inputs outputs #:allow-other-keys)
6401 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6402 (doc (string-append data "/doc/" ,name "-" ,version))
6403 (html (string-append doc "/html")))
6404 (setenv "LD_LIBRARY_PATH"
6405 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6406 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6407 (setenv "LANG" "en_US.UTF-8")
6408 (mkdir-p html)
6409 (for-each (lambda (file)
6410 (copy-file (string-append "." file)
6411 (string-append doc file)))
6412 '("/README.rst" "/NEWS.rst"))
6413 (system* "python" "setup.py" "build_sphinx")
6414 (copy-recursively "docs/_build/html" html)
6415 #t))))))
6416 (home-page "https://github.com/Kozea/cairocffi")
6417 (synopsis "Python bindings and object-oriented API for Cairo")
6418 (description
6419 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6420 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6421 graphics library with support for multiple backends including image buffers,
6422 PNG, PostScript, PDF, and SVG file output.")
6423 (license license:bsd-3)))
6424
6425 (define-public python-decorator
6426 (package
6427 (name "python-decorator")
6428 (version "4.3.0")
6429 (source
6430 (origin
6431 (method url-fetch)
6432 (uri (pypi-uri "decorator" version))
6433 (sha256
6434 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6435 (build-system python-build-system)
6436 (home-page "https://pypi.org/project/decorator/")
6437 (synopsis "Python module to simplify usage of decorators")
6438 (description
6439 "The aim of the decorator module is to simplify the usage of decorators
6440 for the average programmer, and to popularize decorators usage giving examples
6441 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6442 etc. The core of this module is a decorator factory.")
6443 (license license:expat)))
6444
6445 (define-public python2-decorator
6446 (package-with-python2 python-decorator))
6447
6448 (define-public python-drmaa
6449 (package
6450 (name "python-drmaa")
6451 (version "0.7.7")
6452 (source
6453 (origin
6454 (method url-fetch)
6455 (uri (pypi-uri "drmaa" version))
6456 (sha256
6457 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6458 (build-system python-build-system)
6459 ;; The test suite requires libdrmaa which is provided by the cluster
6460 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6461 ;; should be set to the path of the libdrmaa library.
6462 (arguments '(#:tests? #f))
6463 (native-inputs
6464 `(("python-nose" ,python-nose)))
6465 (home-page "https://pypi.org/project/drmaa/")
6466 (synopsis "Python bindings for the DRMAA library")
6467 (description
6468 "A Python package for Distributed Resource Management (DRM) job
6469 submission and control. This package is an implementation of the DRMAA 1.0
6470 Python language binding specification.")
6471 (license license:bsd-3)))
6472
6473 (define-public python2-drmaa
6474 (package-with-python2 python-drmaa))
6475
6476 (define-public python-grako
6477 (package
6478 (name "python-grako")
6479 (version "3.99.9")
6480 (source
6481 (origin
6482 (method url-fetch)
6483 (uri
6484 (pypi-uri "grako" version ".zip"))
6485 (sha256
6486 (base32
6487 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6488 (build-system python-build-system)
6489 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6490 (native-inputs
6491 `(("unzip" ,unzip)
6492 ("python-pytest" ,python-pytest)
6493 ("python-pytest-runner" ,python-pytest-runner)))
6494 (home-page "https://bitbucket.org/neogeny/grako")
6495 (synopsis "EBNF parser generator")
6496 (description
6497 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6498 memoizing PEG/Packrat parser in Python.")
6499 (license license:bsd-3)))
6500
6501 (define-public python2-grako
6502 (package-with-python2 python-grako))
6503
6504 (define-public python-grandalf
6505 (package
6506 (name "python-grandalf")
6507 (version "0.7")
6508 (source
6509 (origin
6510 ;; There's no source tarball on PyPI.
6511 (method git-fetch)
6512 (uri (git-reference
6513 (url "https://github.com/bdcht/grandalf")
6514 (commit (string-append "v" version))))
6515 (file-name (git-file-name name version))
6516 (sha256
6517 (base32
6518 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6519 (build-system python-build-system)
6520 (arguments
6521 '(#:phases
6522 (modify-phases %standard-phases
6523 (replace 'check
6524 (lambda _
6525 (invoke "python" "setup.py" "pytest"))))))
6526 (native-inputs
6527 `(("python-pytest" ,python-pytest)
6528 ("python-pytest-runner" ,python-pytest-runner)))
6529 (propagated-inputs
6530 `(("python-numpy" ,python-numpy)
6531 ("python-ply" ,python-ply)))
6532 (home-page "https://github.com/bdcht/grandalf")
6533 (synopsis "Graph and drawing algorithms framework")
6534 (description
6535 "Grandalf is a Python package made for experimentations with graphs
6536 drawing algorithms. It is written in pure Python, and currently implements
6537 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6538 minimization approach. While not as fast or featured as graphviz or other
6539 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6540 than thousands of nodes, while keeping the source code simple enough to tweak
6541 and hack any part of it for experimental purpose. With a total of about 1500
6542 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6543 in less than 600 lines. The energy minimization approach is comprised of only
6544 250 lines!
6545
6546 Grandalf does only 2 not-so-simple things:
6547 @itemize
6548 @item computing the nodes (x,y) coordinates (based on provided nodes
6549 dimensions, and a chosen layout)
6550 @item routing the edges with lines or nurbs
6551 @end itemize
6552
6553 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6554 will help you find where to draw things like nodes and edges, but it’s up to
6555 you to actually draw things with your favorite toolkit.")
6556 ;; The user can choose either license.
6557 (license (list license:gpl2 license:epl1.0))))
6558
6559 (define-public python-gridmap
6560 (package
6561 (name "python-gridmap")
6562 (version "0.14.0")
6563 (source
6564 (origin
6565 (method git-fetch)
6566 (uri (git-reference
6567 (url "https://github.com/pygridtools/gridmap")
6568 (commit (string-append "v" version))))
6569 (file-name (git-file-name name version))
6570 (sha256
6571 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6572 (build-system python-build-system)
6573 (arguments
6574 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6575 (propagated-inputs
6576 `(("python-psutil" ,python-psutil)
6577 ("python-drmaa" ,python-drmaa)
6578 ("python-pyzmq" ,python-pyzmq)))
6579 (home-page "https://github.com/pygridtools/gridmap")
6580 (synopsis "Create jobs on a cluster directly from Python")
6581 (description
6582 "Gridmap is a Python package to allow you to easily create jobs on the
6583 cluster directly from Python. You can directly map Python functions onto the
6584 cluster without needing to write any wrapper code yourself.")
6585 (license license:gpl3+)))
6586
6587 (define-public python2-gridmap
6588 (package-with-python2 python-gridmap))
6589
6590 (define-public python-honcho
6591 (package
6592 (name "python-honcho")
6593 (version "1.0.1")
6594 (source
6595 (origin
6596 (method git-fetch)
6597 (uri (git-reference
6598 (url "https://github.com/nickstenning/honcho")
6599 (commit (string-append "v" version))))
6600 (file-name (git-file-name name version))
6601 (sha256
6602 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6603 (build-system python-build-system)
6604 (native-inputs
6605 `(("python-pytest" ,python-pytest)
6606 ("python-mock" ,python-mock)
6607 ("python-tox" ,python-tox)
6608 ("which" ,which))) ;for tests
6609 (propagated-inputs
6610 `(("python-jinja2" ,python-jinja2)))
6611 (arguments
6612 `(#:phases
6613 (modify-phases %standard-phases
6614 (delete 'check)
6615 (add-after 'install 'check
6616 (lambda* (#:key outputs inputs #:allow-other-keys)
6617 ;; fix honcho path in testsuite
6618 (substitute* "tests/conftest.py"
6619 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6620 "/bin/honcho" "'")))
6621 ;; It's easier to run tests after install.
6622 ;; Make installed package available for running the tests
6623 (add-installed-pythonpath inputs outputs)
6624 (invoke "py.test" "-v"))))))
6625 (home-page "https://github.com/nickstenning/honcho")
6626 (synopsis "Manage Procfile-based applications")
6627 (description
6628 "A Procfile is a file which describes how to run an application
6629 consisting of several processes. honcho starts all listed processes.
6630 The output of all running processes is collected by honcho and
6631 displayed.")
6632 (license license:expat)))
6633
6634 (define-public python-pexpect
6635 (package
6636 (name "python-pexpect")
6637 (version "4.8.0")
6638 (source
6639 (origin
6640 (method url-fetch)
6641 (uri (pypi-uri "pexpect" version))
6642 (sha256
6643 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6644 (build-system python-build-system)
6645 (arguments
6646 `(#:phases
6647 (modify-phases %standard-phases
6648 (add-before 'check 'prepare-tests
6649 (lambda _
6650 (substitute* (find-files "tests")
6651 (("/bin/ls") (which "ls"))
6652 (("/bin/echo") (which "echo"))
6653 (("/bin/which") (which "which"))
6654 ;; Many tests try to use the /bin directory which
6655 ;; is not present in the build environment.
6656 ;; Use one that's non-empty and unlikely to change.
6657 (("/bin'") "/dev'")
6658 ;; Disable failing test. See upstream bug report
6659 ;; https://github.com/pexpect/pexpect/issues/568
6660 (("def test_bash") "def _test_bash"))
6661 ;; XXX: Socket connection test gets "Connection reset by peer".
6662 ;; Why does it not work? Delete for now.
6663 (delete-file "tests/test_socket.py")
6664 #t))
6665 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6666 (native-inputs
6667 `(("python-nose" ,python-nose)
6668 ("python-pytest" ,python-pytest)
6669 ("man-db" ,man-db)
6670 ("which" ,which)
6671 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6672 (propagated-inputs
6673 `(("python-ptyprocess" ,python-ptyprocess)))
6674 (home-page "http://pexpect.readthedocs.org/")
6675 (synopsis "Controlling interactive console applications")
6676 (description
6677 "Pexpect is a pure Python module for spawning child applications;
6678 controlling them; and responding to expected patterns in their output.
6679 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6680 child application and control it as if a human were typing commands.")
6681 (license license:isc)))
6682
6683 (define-public python2-pexpect
6684 (package-with-python2 python-pexpect))
6685
6686 (define-public python-setuptools-scm
6687 (package
6688 (name "python-setuptools-scm")
6689 (version "3.4.3")
6690 (source (origin
6691 (method url-fetch)
6692 (uri (pypi-uri "setuptools_scm" version))
6693 (sha256
6694 (base32
6695 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6696 (build-system python-build-system)
6697 (home-page "https://github.com/pypa/setuptools_scm/")
6698 (synopsis "Manage Python package versions in SCM metadata")
6699 (description
6700 "Setuptools_scm handles managing your Python package versions in
6701 @dfn{software configuration management} (SCM) metadata instead of declaring
6702 them as the version argument or in a SCM managed file.")
6703 (license license:expat)))
6704
6705 ;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
6706 (define-public python-setuptools-scm/next
6707 (package
6708 (inherit python-setuptools-scm)
6709 (version "5.0.1")
6710 (source
6711 (origin
6712 (method url-fetch)
6713 (uri (pypi-uri "setuptools_scm" version))
6714 (sha256
6715 (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
6716
6717 (define-public python2-setuptools-scm
6718 (package-with-python2 python-setuptools-scm))
6719
6720 (define-public python-sexpdata
6721 (package
6722 (name "python-sexpdata")
6723 (version "0.0.3")
6724 (source
6725 (origin
6726 (method url-fetch)
6727 (uri (pypi-uri "sexpdata" version))
6728 (sha256
6729 (base32
6730 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6731 (build-system python-build-system)
6732 (home-page "https://github.com/jd-boyd/sexpdata")
6733 (synopsis "S-expression parser for Python")
6734 (description
6735 "Sexpdata is an S-expression parser/serializer. It has load and dump
6736 functions like pickle, json or PyYAML module.")
6737 (license license:bsd-3)))
6738
6739 (define-public python-pathlib2
6740 (package
6741 (name "python-pathlib2")
6742 (version "2.3.3")
6743 (source
6744 (origin
6745 (method url-fetch)
6746 (uri (pypi-uri "pathlib2" version))
6747 (sha256
6748 (base32
6749 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6750 (build-system python-build-system)
6751 (propagated-inputs
6752 `(("python-scandir" ,python-scandir)
6753 ("python-six" ,python-six)))
6754 (home-page "https://pypi.org/project/pathlib2/")
6755 (synopsis "Object-oriented file system paths")
6756 (description "The goal of pathlib2 is to provide a backport of the
6757 standard @code{pathlib} module which tracks the standard library module, so
6758 all the newest features of the standard @code{pathlib} can be used also on
6759 older Python versions.")
6760 (license license:expat)))
6761
6762 (define-public python-importlib-resources
6763 (package
6764 (name "python-importlib-resources")
6765 (version "3.0.0")
6766 (source
6767 (origin
6768 (method url-fetch)
6769 (uri (pypi-uri "importlib_resources" version))
6770 (sha256
6771 (base32
6772 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6773 (build-system python-build-system)
6774 (native-inputs
6775 `(("python-setuptools-scm" ,python-setuptools-scm)
6776 ("python-toml" ,python-toml)))
6777 (home-page "http://importlib-resources.readthedocs.io/")
6778 (synopsis "Read resources from Python packages")
6779 (description
6780 "@code{importlib_resources} is a backport of Python 3's standard library
6781 @code{importlib.resources} module for Python 2.7, and Python 3.")
6782 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6783 (license license:asl2.0)))
6784
6785 (define-public python2-importlib-resources
6786 (package
6787 (name "python2-importlib-resources")
6788 (version "1.0.2")
6789 (source (origin
6790 (method url-fetch)
6791 (uri (pypi-uri "importlib_resources" version))
6792 (sha256
6793 (base32
6794 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6795 (build-system python-build-system)
6796 (arguments
6797 `(#:python ,python-2
6798 #:phases (modify-phases %standard-phases
6799 ;; The build system tests for python-wheel, but it is
6800 ;; not required for Guix nor the test suite. Just drop
6801 ;; it to make bootstrapping pytest easier.
6802 (add-after 'unpack 'drop-wheel-dependency
6803 (lambda _
6804 (substitute* "setup.cfg"
6805 (("^[[:blank:]]+wheel")
6806 ""))
6807 #t)))))
6808 (propagated-inputs
6809 `(("python-pathlib2" ,python2-pathlib2)
6810 ("python-typing" ,python2-typing)))
6811 (home-page "https://gitlab.com/python-devs/importlib_resources")
6812 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6813 (description
6814 "This package provides an implementation of @code{importlib.resources}
6815 for older versions of Python.")
6816 (license license:asl2.0)))
6817
6818 ;; For importlib-metadata-bootstrap below.
6819 (define-public python2-importlib-resources-bootstrap
6820 (hidden-package
6821 (package/inherit
6822 python2-importlib-resources
6823 (name "python2-importlib-resources-bootstrap")
6824 (propagated-inputs
6825 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6826 ("python-typing" ,python2-typing))))))
6827
6828 (define-public python-importlib-metadata
6829 (package
6830 (name "python-importlib-metadata")
6831 (version "1.5.0")
6832 (source
6833 (origin
6834 (method url-fetch)
6835 (uri (pypi-uri "importlib_metadata" version))
6836 (sha256
6837 (base32
6838 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6839 (build-system python-build-system)
6840 (propagated-inputs
6841 `(("python-zipp" ,python-zipp)))
6842 (native-inputs
6843 `(("python-setuptools-scm" ,python-setuptools-scm)
6844 ("python-pyfakefs" ,python-pyfakefs)
6845 ("python-packaging" ,python-packaging)))
6846 (home-page "https://importlib-metadata.readthedocs.io/")
6847 (synopsis "Read metadata from Python packages")
6848 (description
6849 "@code{importlib_metadata} is a library which provides an API for
6850 accessing an installed Python package's metadata, such as its entry points or
6851 its top-level name. This functionality intends to replace most uses of
6852 @code{pkg_resources} entry point API and metadata API. Along with
6853 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6854 need to use the older and less efficient @code{pkg_resources} package.")
6855 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6856 (license license:asl2.0)))
6857
6858 (define-public python2-importlib-metadata
6859 (let ((base (package-with-python2 (strip-python2-variant
6860 python-importlib-metadata))))
6861 (package/inherit
6862 base
6863 (name "python2-importlib-metadata")
6864 (native-inputs
6865 `(("python-setuptools-scm" ,python2-setuptools-scm)
6866 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6867 ("python-packaging" ,python2-packaging-bootstrap)))
6868 (propagated-inputs
6869 `(("python-configparser" ,python2-configparser)
6870 ("python-contextlib2" ,python2-contextlib2)
6871 ("python-importlib-resources" ,python2-importlib-resources)
6872 ("python-pathlib2" ,python2-pathlib2)
6873 ,@(package-propagated-inputs base))))))
6874
6875 ;; This package is used by python2-pytest, and thus must not depend on it.
6876 (define-public python2-importlib-metadata-bootstrap
6877 (hidden-package
6878 (package/inherit
6879 python2-importlib-metadata
6880 (name "python2-importlib-metadata-bootstrap")
6881 (arguments
6882 `(#:tests? #f
6883 ,@(package-arguments python2-importlib-metadata)))
6884 (propagated-inputs
6885 `(("python-zipp" ,python2-zipp-bootstrap)
6886 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6887 ("python-configparser" ,python2-configparser)
6888 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6889 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6890
6891 (define-public python-importmagic
6892 (package
6893 (name "python-importmagic")
6894 (version "0.1.7")
6895 (source
6896 (origin
6897 (method url-fetch)
6898 (uri (pypi-uri "importmagic" version))
6899 (sha256
6900 (base32
6901 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6902 (build-system python-build-system)
6903 (home-page "https://github.com/alecthomas/importmagic")
6904 (synopsis "Library for adding, removing and managing Python imports")
6905 (description
6906 "Importmagic is a Python library for automatically managing imports by
6907 finding unresolved symbols in Python code and their corresponding imports.")
6908 (license license:bsd-3)))
6909
6910 (define-public python-inotify-simple
6911 (package
6912 (name "python-inotify-simple")
6913 (version "1.3.5")
6914 (source
6915 (origin
6916 (method git-fetch)
6917 (uri (git-reference
6918 (url "https://github.com/chrisjbillington/inotify_simple")
6919 (commit version)))
6920 (file-name (git-file-name name version))
6921 (sha256
6922 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
6923 (build-system python-build-system)
6924 (home-page
6925 "https://github.com/chrisjbillington/inotify_simple")
6926 (synopsis "Simple wrapper around inotify library")
6927 (description
6928 "@code{inotify-simple} is a simple wrapper around inotify library.")
6929 (license license:bsd-3)))
6930
6931 (define-public python-jaraco-packaging
6932 (package
6933 (name "python-jaraco-packaging")
6934 (version "6.1")
6935 (source
6936 (origin
6937 (method url-fetch)
6938 (uri (pypi-uri "jaraco.packaging" version))
6939 (sha256
6940 (base32
6941 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6942 (build-system python-build-system)
6943 (propagated-inputs
6944 `(("python-pytest" ,python-pytest)
6945 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6946 ("python-pytest-flake8" ,python-pytest-flake8)
6947 ("python-rst.linker" ,python-rst.linker)
6948 ("python-setuptools" ,python-setuptools)
6949 ("python-setuptools-scm" ,python-setuptools-scm)
6950 ("python-six" ,python-six)
6951 ("python-sphinx" ,python-sphinx)))
6952 (home-page "https://github.com/jaraco/jaraco.packaging")
6953 (synopsis "Tools to supplement packaging Python releases")
6954 (description
6955 "This package provides various tools to supplement packaging Python
6956 releases.")
6957 (license license:expat)))
6958
6959 (define-public python-pathpy
6960 (package
6961 (name "python-pathpy")
6962 (version "11.5.1")
6963 (source
6964 (origin
6965 (method url-fetch)
6966 (uri (pypi-uri "path.py" version))
6967 (sha256
6968 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6969 (outputs '("out" "doc"))
6970 (build-system python-build-system)
6971 (propagated-inputs
6972 `(("python-appdirs" ,python-appdirs)
6973 ("python-importlib-metadata" ,python-importlib-metadata)))
6974 (native-inputs
6975 `(("python-setuptools-scm" ,python-setuptools-scm)
6976 ("python-sphinx" ,python-sphinx)
6977 ("python-rst.linker" ,python-rst.linker)
6978 ("python-pytest" ,python-pytest)
6979 ("python-pytest-runner" ,python-pytest-runner)
6980 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6981 (arguments
6982 `(#:phases
6983 (modify-phases %standard-phases
6984 (add-after 'build 'build-doc
6985 (lambda _
6986 (setenv "LANG" "en_US.UTF-8")
6987 (invoke "python" "setup.py" "build_sphinx")))
6988 (add-after 'install 'install-doc
6989 (lambda* (#:key outputs #:allow-other-keys)
6990 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6991 (doc (string-append data "/doc/" ,name "-" ,version))
6992 (html (string-append doc "/html")))
6993 (mkdir-p html)
6994 (for-each (lambda (file)
6995 (copy-file file (string-append doc "/" file)))
6996 '("README.rst" "CHANGES.rst"))
6997 (copy-recursively "build/sphinx/html" html)
6998 #t)))
6999 (replace 'check
7000 (lambda _
7001 ;; The import time test aborts if an import takes longer than
7002 ;; 100ms. It may very well take a little longer than that.
7003 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
7004 (home-page "https://github.com/jaraco/path.py")
7005 (synopsis "Python module wrapper for built-in os.path")
7006 (description
7007 "@code{path.py} implements path objects as first-class entities, allowing
7008 common operations on files to be invoked on those path objects directly.")
7009 (license license:expat)))
7010
7011 (define-public python-simplegeneric
7012 (package
7013 (name "python-simplegeneric")
7014 (version "0.8.1")
7015 (source
7016 (origin
7017 (method url-fetch)
7018 (uri (pypi-uri "simplegeneric" version ".zip"))
7019 (sha256
7020 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
7021 (build-system python-build-system)
7022 (native-inputs
7023 `(("unzip" ,unzip)))
7024 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
7025 (synopsis "Python module for simple generic functions")
7026 (description
7027 "The simplegeneric module lets you define simple single-dispatch generic
7028 functions, akin to Python’s built-in generic functions like @code{len()},
7029 @code{iter()} and so on. However, instead of using specially-named methods,
7030 these generic functions use simple lookup tables, akin to those used by
7031 e.g. @code{pickle.dump()} and other generic functions found in the Python
7032 standard library.")
7033 (license license:zpl2.1)))
7034
7035 (define-public python2-simplegeneric
7036 (package-with-python2 python-simplegeneric))
7037
7038 (define-public python-ipython-genutils
7039 ;; TODO: This package is retired, check if can be removed, see description.
7040 (package
7041 (name "python-ipython-genutils")
7042 (version "0.1.0")
7043 (source
7044 (origin
7045 (method url-fetch)
7046 (uri (pypi-uri "ipython_genutils" version))
7047 (sha256
7048 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7049 (build-system python-build-system)
7050 (arguments `(#:tests? #f)) ; no tests
7051 (home-page "https://ipython.org")
7052 (synopsis "Vestigial utilities from IPython")
7053 (description
7054 "This package provides retired utilities from IPython. No packages
7055 outside IPython/Jupyter should depend on it.
7056
7057 This package shouldn't exist. It contains some common utilities shared by
7058 Jupyter and IPython projects during The Big Split. As soon as possible, those
7059 packages will remove their dependency on this, and this package will go
7060 away.")
7061 (license license:bsd-3)))
7062
7063 (define-public python2-ipython-genutils
7064 (package-with-python2 python-ipython-genutils))
7065
7066 (define-public python-ipyparallel
7067 (package
7068 (name "python-ipyparallel")
7069 (version "6.2.4")
7070 (source
7071 (origin
7072 (method url-fetch)
7073 (uri (pypi-uri "ipyparallel" version))
7074 (sha256
7075 (base32
7076 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7077 (build-system python-build-system)
7078 (arguments
7079 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7080 #:phases
7081 (modify-phases %standard-phases
7082 (add-before 'check 'prepare-for-tests
7083 (lambda _
7084 (setenv "HOME" (getcwd))
7085 #t)))))
7086 (propagated-inputs
7087 `(("python-dateutil" ,python-dateutil)
7088 ("python-decorator" ,python-decorator)
7089 ("python-ipykernel" ,python-ipykernel)
7090 ("python-ipython" ,python-ipython)
7091 ("python-ipython-genutils" ,python-ipython-genutils)
7092 ("python-jupyter-client" ,python-jupyter-client)
7093 ("python-pyzmq" ,python-pyzmq)
7094 ("python-tornado" ,python-tornado)
7095 ("python-traitlets" ,python-traitlets)))
7096 (native-inputs
7097 `(("python-ipython" ,python-ipython)
7098 ("python-mock" ,python-mock)
7099 ("python-nose" ,python-nose)
7100 ("python-pytest" ,python-pytest)
7101 ("python-pytest-cov" ,python-pytest-cov)
7102 ("python-testpath" ,python-testpath)))
7103 (home-page "https://ipython.org/")
7104 (synopsis "Interactive Parallel Computing with IPython")
7105 (description
7106 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7107 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7108 CLI scripts:
7109 @enumerate
7110 @item ipcluster - start/stop a cluster
7111 @item ipcontroller - start a scheduler
7112 @item ipengine - start an engine
7113 @end enumerate")
7114 (license license:bsd-3)))
7115
7116 (define-public python2-ipyparallel
7117 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
7118 (package/inherit ipyparallel
7119 (propagated-inputs
7120 `(("python2-futures" ,python2-futures)
7121 ,@(package-propagated-inputs ipyparallel))))))
7122
7123 (define-public python-ipython-cluster-helper
7124 (package
7125 (name "python-ipython-cluster-helper")
7126 (version "0.6.4")
7127 (source
7128 (origin
7129 (method url-fetch)
7130 (uri (pypi-uri "ipython-cluster-helper" version))
7131 (sha256
7132 (base32
7133 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
7134 (modules '((guix build utils)))
7135 (snippet
7136 '(begin (substitute* "requirements.txt"
7137 (("ipython.*") "ipython\n"))
7138 #t))))
7139 (build-system python-build-system)
7140 (arguments
7141 `(#:tests? #f ; Test suite can't find IPython.
7142 #:phases
7143 (modify-phases %standard-phases
7144 (replace 'check
7145 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7146 (if tests?
7147 (begin
7148 (setenv "HOME" (getcwd))
7149 (add-installed-pythonpath inputs outputs)
7150 (invoke "python" "example/example.py" "--local"))
7151 #t))))))
7152 (propagated-inputs
7153 `(("python-ipyparallel" ,python-ipyparallel)
7154 ("python-ipython" ,python-ipython)
7155 ("python-netifaces" ,python-netifaces)
7156 ("python-pyzmq" ,python-pyzmq)
7157 ("python-setuptools" ,python-setuptools)
7158 ("python-six" ,python-six)))
7159 (home-page "https://github.com/roryk/ipython-cluster-helper")
7160 (synopsis
7161 "Simplify IPython cluster start up and use for multiple schedulers")
7162 (description
7163 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
7164 profile, launches a cluster and returns a view. On program exit it shuts the
7165 cluster down and deletes the throwaway profile.")
7166 (license license:expat)))
7167
7168 (define-public python2-ipython-cluster-helper
7169 (package-with-python2 python-ipython-cluster-helper))
7170
7171 (define-public python-traitlets
7172 (package
7173 (name "python-traitlets")
7174 (version "4.3.3")
7175 (source
7176 (origin
7177 (method url-fetch)
7178 (uri (pypi-uri "traitlets" version))
7179 (sha256
7180 (base32
7181 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
7182 (build-system python-build-system)
7183 (arguments
7184 `(#:phases
7185 (modify-phases %standard-phases
7186 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
7187 (propagated-inputs
7188 `(("python-ipython-genutils" ,python-ipython-genutils)
7189 ("python-decorator" ,python-decorator)))
7190 (native-inputs
7191 `(("python-pytest" ,python-pytest)))
7192 (properties `((python2-variant . ,(delay python2-traitlets))))
7193 (home-page "https://ipython.org")
7194 (synopsis "Configuration system for Python applications")
7195 (description
7196 "Traitlets is a framework that lets Python classes have attributes with
7197 type checking, dynamically calculated default values, and ‘on change’
7198 callbacks. The package also includes a mechanism to use traitlets for
7199 configuration, loading values from files or from command line arguments. This
7200 is a distinct layer on top of traitlets, so you can use traitlets in your code
7201 without using the configuration machinery.")
7202 (license license:bsd-3)))
7203
7204 (define-public python2-traitlets
7205 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
7206 (package/inherit traitlets
7207 (propagated-inputs
7208 `(("python2-enum34" ,python2-enum34)
7209 ,@(package-propagated-inputs traitlets))))))
7210
7211 (define-public python-jupyter-core
7212 (package
7213 (name "python-jupyter-core")
7214 (version "4.4.0")
7215 (source
7216 (origin
7217 (method url-fetch)
7218 (uri (string-append (pypi-uri "jupyter_core" version)))
7219 (sha256
7220 (base32
7221 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
7222 (build-system python-build-system)
7223 ;; FIXME: not sure how to run the tests
7224 (arguments `(#:tests? #f))
7225 (propagated-inputs
7226 `(("python-traitlets" ,python-traitlets)))
7227 (home-page "https://jupyter.org/")
7228 (synopsis "Jupyter base package")
7229 (description
7230 "Jupyter core is the base package on which Jupyter projects rely.")
7231 (license license:bsd-3)))
7232
7233 (define-public python2-jupyter-core
7234 (package-with-python2 python-jupyter-core))
7235
7236 (define-public python-jupyter-client
7237 (package
7238 (name "python-jupyter-client")
7239 (version "5.2.4")
7240 (source
7241 (origin
7242 (method url-fetch)
7243 (uri (pypi-uri "jupyter_client" version))
7244 (sha256
7245 (base32
7246 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
7247 (build-system python-build-system)
7248 ;; Tests fail because of missing native python kernel which I assume is
7249 ;; provided by the ipython package, which we cannot use because it would
7250 ;; cause a dependency cycle.
7251 (arguments
7252 `(#:tests? #f
7253
7254 #:phases (modify-phases %standard-phases
7255 (add-after 'unpack 'set-tool-file-names
7256 (lambda* (#:key inputs #:allow-other-keys)
7257 (let ((iproute (assoc-ref inputs "iproute")))
7258 (substitute* "jupyter_client/localinterfaces.py"
7259 (("'ip'")
7260 (string-append "'" iproute "/sbin/ip'")))
7261 #t))))))
7262 (inputs
7263 `(("iproute" ,iproute)))
7264 (propagated-inputs
7265 `(("python-pyzmq" ,python-pyzmq)
7266 ("python-traitlets" ,python-traitlets)
7267 ("python-jupyter-core" ,python-jupyter-core)))
7268 (home-page "https://jupyter.org/")
7269 (synopsis "Jupyter protocol implementation and client libraries")
7270 (description
7271 "The @code{jupyter_client} package contains the reference implementation
7272 of the Jupyter protocol. It also provides client and kernel management APIs
7273 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7274 installing @code{kernelspec}s for use with Jupyter frontends.")
7275 (license license:bsd-3)))
7276
7277 (define-public python2-jupyter-client
7278 (package-with-python2 python-jupyter-client))
7279
7280 (define-public python-ipykernel
7281 (package
7282 (name "python-ipykernel")
7283 (version "5.1.3")
7284 (source
7285 (origin
7286 (method url-fetch)
7287 (uri (pypi-uri "ipykernel" version))
7288 (sha256
7289 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
7290 (build-system python-build-system)
7291 (arguments
7292 `(#:phases
7293 (modify-phases %standard-phases
7294 (replace 'check
7295 (lambda _
7296 (setenv "HOME" "/tmp")
7297 (invoke "pytest" "-v")
7298 #t))
7299 (add-after 'install 'set-python-file-name
7300 (lambda* (#:key outputs #:allow-other-keys)
7301 ;; Record the absolute file name of the 'python' executable in
7302 ;; 'kernel.json'.
7303 (let ((out (assoc-ref outputs "out")))
7304 (substitute* (string-append out "/share/jupyter"
7305 "/kernels/python3/kernel.json")
7306 (("\"python\"")
7307 (string-append "\"" (which "python") "\"")))
7308 #t))))))
7309 (propagated-inputs
7310 `(("python-ipython" ,python-ipython)
7311 ;; imported at runtime during connect
7312 ("python-jupyter-client" ,python-jupyter-client)))
7313 (native-inputs
7314 `(("python-flaky" ,python-flaky)
7315 ("python-nose" ,python-nose)
7316 ("python-pytest" ,python-pytest)))
7317 (home-page "https://ipython.org")
7318 (synopsis "IPython Kernel for Jupyter")
7319 (description
7320 "This package provides the IPython kernel for Jupyter.")
7321 (properties `((python2-variant . ,(delay python2-ipykernel))))
7322 (license license:bsd-3)))
7323
7324 ;; Version 5.x and above no longer support Python 2.
7325 (define-public python2-ipykernel
7326 (package
7327 (name "python2-ipykernel")
7328 (version "4.10.1")
7329 (source
7330 (origin
7331 (method url-fetch)
7332 (uri (pypi-uri "ipykernel" version))
7333 (sha256
7334 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
7335 (build-system python-build-system)
7336 (arguments
7337 `(#:python ,python-2))
7338 (propagated-inputs
7339 `(("python2-ipython" ,python2-ipython)
7340 ;; imported at runtime during connect
7341 ("python2-jupyter-client" ,python2-jupyter-client)
7342 ("python2-tornado" ,python2-tornado)
7343 ("python2-traitlets" ,python2-traitlets)))
7344 (native-inputs
7345 `(("python2-mock" ,python2-mock)
7346 ("python2-nose" ,python2-nose)
7347 ("python2-pytest" ,python2-pytest)
7348 ("python2-pytest-cov" ,python2-pytest-cov)))
7349 (home-page "https://ipython.org")
7350 (synopsis "IPython Kernel for Jupyter")
7351 (description
7352 "This package provides the IPython kernel for Jupyter.")
7353 (license license:bsd-3)))
7354
7355 (define-public python-pari-jupyter
7356 (package
7357 (name "python-pari-jupyter")
7358 (version "1.3.2")
7359 (source
7360 (origin
7361 (method url-fetch)
7362 (uri (pypi-uri "pari_jupyter" version))
7363 (sha256
7364 (base32
7365 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7366 (build-system python-build-system)
7367 (propagated-inputs
7368 `(("python-ipykernel" ,python-ipykernel)))
7369 (inputs
7370 `(("pari-gp" ,pari-gp)
7371 ("readline" ,readline)))
7372 (arguments
7373 `(#:tests? #f)) ; no test suite
7374 (home-page
7375 "https://github.com/jdemeyer/pari_jupyter")
7376 (synopsis "A Jupyter kernel for PARI/GP")
7377 (description "The package provides a PARI/GP kernel for Jupyter.")
7378 (license license:gpl3+)))
7379
7380 (define-public python-backcall
7381 (package
7382 (name "python-backcall")
7383 (version "0.1.0")
7384 (source
7385 (origin
7386 (method url-fetch)
7387 (uri (pypi-uri "backcall" version))
7388 (sha256
7389 (base32
7390 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
7391 (build-system python-build-system)
7392 (home-page "https://github.com/takluyver/backcall/")
7393 (synopsis "Specifications for callback functions passed in to an API")
7394 (description
7395 "If your code lets other people supply callback functions, it's important
7396 to specify the function signature you expect, and check that functions support
7397 that. Adding extra parameters later would break other peoples code unless
7398 you're careful. The @code{backcall} package provides a way of specifying the
7399 callback signature using a prototype function.")
7400 (license license:bsd-3)))
7401
7402 (define-public python-ipython
7403 (package
7404 (name "python-ipython")
7405 (version "7.9.0")
7406 (source
7407 (origin
7408 (method url-fetch)
7409 (uri (pypi-uri "ipython" version ".tar.gz"))
7410 (sha256
7411 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7412 (build-system python-build-system)
7413 (propagated-inputs
7414 `(("python-backcall" ,python-backcall)
7415 ("python-pyzmq" ,python-pyzmq)
7416 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7417 ("python-terminado" ,python-terminado)
7418 ("python-matplotlib" ,python-matplotlib)
7419 ("python-numpy" ,python-numpy)
7420 ("python-numpydoc" ,python-numpydoc)
7421 ("python-jedi" ,python-jedi)
7422 ("python-jinja2" ,python-jinja2)
7423 ("python-mistune" ,python-mistune)
7424 ("python-pexpect" ,python-pexpect)
7425 ("python-pickleshare" ,python-pickleshare)
7426 ("python-simplegeneric" ,python-simplegeneric)
7427 ("python-jsonschema" ,python-jsonschema)
7428 ("python-traitlets" ,python-traitlets)
7429 ("python-nbformat" ,python-nbformat)
7430 ("python-pygments" ,python-pygments)))
7431 (inputs
7432 `(("readline" ,readline)
7433 ("which" ,which)))
7434 (native-inputs
7435 `(("graphviz" ,graphviz)
7436 ("pkg-config" ,pkg-config)
7437 ("python-requests" ,python-requests) ;; for tests
7438 ("python-testpath" ,python-testpath)
7439 ("python-nose" ,python-nose)))
7440 (arguments
7441 `(#:phases
7442 (modify-phases %standard-phases
7443 (add-after 'unpack 'make-docs-reproducible
7444 (lambda _
7445 (substitute* "IPython/sphinxext/ipython_directive.py"
7446 ((".*import datetime") "")
7447 ((".*datetime.datetime.now\\(\\)") "")
7448 (("%timeit") "# %timeit"))
7449 #t))
7450 ;; Tests can only be run after the library has been installed and not
7451 ;; within the source directory.
7452 (delete 'check)
7453 (add-after 'install 'check
7454 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7455 (if tests?
7456 (begin
7457 ;; Make installed package available for running the tests
7458 (add-installed-pythonpath inputs outputs)
7459 (setenv "HOME" "/tmp/") ;; required by a test
7460 ;; We only test the core because one of the other tests
7461 ;; tries to import ipykernel.
7462 (invoke "python" "IPython/testing/iptest.py"
7463 "-v" "IPython/core/tests"))
7464 #t)))
7465 (add-before 'check 'fix-tests
7466 (lambda* (#:key inputs #:allow-other-keys)
7467 (substitute* "./IPython/utils/_process_posix.py"
7468 (("/usr/bin/env', 'which") (which "which")))
7469 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7470 (("#!/usr/bin/env python")
7471 (string-append "#!" (which "python"))))
7472 ;; This test introduces a circular dependency on ipykernel
7473 ;; (which depends on ipython).
7474 (delete-file "IPython/core/tests/test_display.py")
7475 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7476 (delete-file "IPython/core/tests/test_interactiveshell.py")
7477 #t)))))
7478 (home-page "https://ipython.org")
7479 (synopsis "IPython is a tool for interactive computing in Python")
7480 (description
7481 "IPython provides a rich architecture for interactive computing with:
7482 Powerful interactive shells, a browser-based notebook, support for interactive
7483 data visualization, embeddable interpreters and tools for parallel
7484 computing.")
7485 (properties `((python2-variant . ,(delay python2-ipython))))
7486 (license license:bsd-3)))
7487
7488 ;; This is the latest release of the LTS version of ipython with support for
7489 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7490 ;; dropped support for Python 2.7.
7491 (define-public python2-ipython
7492 (package
7493 (name "python2-ipython")
7494 (version "5.8.0")
7495 (source
7496 (origin
7497 (method url-fetch)
7498 (uri (pypi-uri "ipython" version ".tar.gz"))
7499 (sha256
7500 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7501 (build-system python-build-system)
7502 (propagated-inputs
7503 `(("python2-backports-shutil-get-terminal-size"
7504 ,python2-backports-shutil-get-terminal-size)
7505 ("python2-pathlib2" ,python2-pathlib2)
7506 ("python2-pyzmq" ,python2-pyzmq)
7507 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7508 ("python2-terminado" ,python2-terminado)
7509 ("python2-matplotlib" ,python2-matplotlib)
7510 ("python2-numpy" ,python2-numpy)
7511 ("python2-numpydoc" ,python2-numpydoc)
7512 ("python2-jinja2" ,python2-jinja2)
7513 ("python2-mistune" ,python2-mistune)
7514 ("python2-pexpect" ,python2-pexpect)
7515 ("python2-pickleshare" ,python2-pickleshare)
7516 ("python2-simplegeneric" ,python2-simplegeneric)
7517 ("python2-jsonschema" ,python2-jsonschema)
7518 ("python2-traitlets" ,python2-traitlets)
7519 ("python2-nbformat" ,python2-nbformat)
7520 ("python2-pygments" ,python2-pygments)))
7521 (inputs
7522 `(("readline" ,readline)
7523 ("which" ,which)))
7524 (native-inputs
7525 `(("graphviz" ,graphviz)
7526 ("pkg-config" ,pkg-config)
7527 ("python2-requests" ,python2-requests) ;; for tests
7528 ("python2-testpath" ,python2-testpath)
7529 ("python2-mock" ,python2-mock)
7530 ("python2-nose" ,python2-nose)))
7531 (arguments
7532 `(#:python ,python-2
7533 #:phases
7534 (modify-phases %standard-phases
7535 (add-before 'check 'delete-broken-tests
7536 (lambda* (#:key inputs #:allow-other-keys)
7537 ;; These tests throw errors for unknown reasons.
7538 (delete-file "IPython/core/tests/test_displayhook.py")
7539 (delete-file "IPython/core/tests/test_magic_terminal.py")
7540 (delete-file "IPython/core/tests/test_profile.py")
7541 #t)))))
7542 (home-page "https://ipython.org")
7543 (synopsis "IPython is a tool for interactive computing in Python")
7544 (description
7545 "IPython provides a rich architecture for interactive computing with:
7546 Powerful interactive shells, a browser-based notebook, support for interactive
7547 data visualization, embeddable interpreters and tools for parallel
7548 computing.")
7549 (license license:bsd-3)))
7550
7551 (define-public python-ipython-documentation
7552 (package
7553 (inherit python-ipython)
7554 (name "python-ipython-documentation")
7555 (version (package-version python-ipython))
7556 (arguments
7557 `(#:phases
7558 (modify-phases %standard-phases
7559 (delete 'build)
7560 (delete 'check)
7561 (replace 'install
7562 (lambda* (#:key outputs #:allow-other-keys)
7563 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7564 (doc (string-append data "/doc/" ,name "-" ,version))
7565 (html (string-append doc "/html"))
7566 (man1 (string-append data "/man/man1"))
7567 (info (string-append data "/info"))
7568 (examples (string-append doc "/examples"))
7569 (python-arg (string-append "PYTHON=" (which "python"))))
7570 (setenv "LANG" "en_US.utf8")
7571 (with-directory-excursion "docs"
7572 ;; FIXME: pdf fails to build
7573 ;;(system* "make" "pdf" "PAPER=a4")
7574 (system* "make" python-arg "html")
7575 ;; FIXME: the generated texi file contains ^@^@, which trips
7576 ;; up the parser.
7577 ;; (system* "make" python-arg "info")
7578 )
7579 (copy-recursively "docs/man" man1)
7580 (copy-recursively "examples" examples)
7581 (copy-recursively "docs/build/html" html)
7582 ;; (copy-file "docs/build/latex/ipython.pdf"
7583 ;; (string-append doc "/ipython.pdf"))
7584 (mkdir-p info)
7585 ;; (copy-file "docs/build/texinfo/ipython.info"
7586 ;; (string-append info "/ipython.info"))
7587 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7588 #t)))))
7589 (inputs
7590 `(("python-ipython" ,python-ipython)
7591 ("python-ipykernel" ,python-ipykernel)))
7592 (native-inputs
7593 `(("python-sphinx" ,python-sphinx)
7594 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7595 ;; FIXME: It's possible that a smaller union would work just as well.
7596 ("texlive" ,(texlive-union (list texlive-amsfonts
7597 texlive-fonts-ec
7598 texlive-generic-ifxetex
7599 texlive-generic-pdftex
7600 texlive-latex-capt-of
7601 texlive-latex-cmap
7602 texlive-latex-environ
7603 texlive-latex-eqparbox
7604 texlive-latex-etoolbox
7605 texlive-latex-expdlist
7606 texlive-latex-fancyhdr
7607 texlive-latex-fancyvrb
7608 texlive-latex-fncychap
7609 texlive-latex-float
7610 texlive-latex-framed
7611 texlive-latex-geometry
7612 texlive-latex-graphics
7613 texlive-latex-hyperref
7614 texlive-latex-mdwtools
7615 texlive-latex-multirow
7616 texlive-latex-needspace
7617 texlive-latex-oberdiek
7618 texlive-latex-parskip
7619 texlive-latex-preview
7620 texlive-latex-tabulary
7621 texlive-latex-threeparttable
7622 texlive-latex-titlesec
7623 texlive-latex-trimspaces
7624 texlive-latex-ucs
7625 texlive-latex-upquote
7626 texlive-latex-url
7627 texlive-latex-varwidth
7628 texlive-latex-wrapfig)))
7629 ("texinfo" ,texinfo)))))
7630
7631 (define-public python-urwid
7632 (package
7633 (name "python-urwid")
7634 (version "2.1.0")
7635 (source
7636 (origin
7637 (method url-fetch)
7638 (uri (pypi-uri "urwid" version))
7639 (sha256
7640 (base32
7641 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7642 (build-system python-build-system)
7643 (home-page "http://urwid.org")
7644 (synopsis "Console user interface library for Python")
7645 (description
7646 "Urwid is a curses-based UI/widget library for Python. It includes many
7647 features useful for text console applications.")
7648 (license license:lgpl2.1+)))
7649
7650 (define-public python2-urwid
7651 (package-with-python2 python-urwid))
7652
7653 (define-public python-urwidtrees
7654 (package
7655 (name "python-urwidtrees")
7656 (version "1.0.2")
7657 (source
7658 (origin
7659 (method git-fetch)
7660 ;; package author intends on distributing via github rather than pypi:
7661 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7662 (uri (git-reference
7663 (url "https://github.com/pazz/urwidtrees")
7664 (commit version)))
7665 (file-name (git-file-name name version))
7666 (sha256
7667 (base32
7668 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7669 (build-system python-build-system)
7670 (arguments
7671 '(#:use-setuptools? #f
7672 #:tests? #f)) ; no tests
7673 (propagated-inputs `(("python-urwid" ,python-urwid)))
7674 (home-page "https://github.com/pazz/urwidtrees")
7675 (synopsis "Tree widgets for urwid")
7676 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7677 toolkit. Use it to build trees of widgets.")
7678 (license license:gpl3+)))
7679
7680 (define-public python2-urwidtrees
7681 (package-with-python2 python-urwidtrees))
7682
7683 (define-public python-ua-parser
7684 (package
7685 (name "python-ua-parser")
7686 (version "0.8.0")
7687 (source
7688 (origin
7689 (method url-fetch)
7690 (uri (pypi-uri "ua-parser" version))
7691 (sha256
7692 (base32
7693 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7694 (build-system python-build-system)
7695 (arguments
7696 `(#:tests? #f)) ;no test suite in release
7697 (native-inputs
7698 `(("python-pyyaml" ,python-pyyaml)))
7699 (home-page "https://github.com/ua-parser/uap-python")
7700 (synopsis "User agent parser")
7701 (description
7702 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7703 (license license:asl2.0)))
7704
7705 (define-public python2-ua-parser
7706 (package-with-python2 python-ua-parser))
7707
7708 (define-public python-user-agents
7709 (package
7710 (name "python-user-agents")
7711 (version "1.1.0")
7712 (source
7713 (origin
7714 (method url-fetch)
7715 (uri (pypi-uri "user-agents" version))
7716 (sha256
7717 (base32
7718 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7719 (build-system python-build-system)
7720 (arguments
7721 `(#:tests? #f)) ;missing devices.json test file in release
7722 (propagated-inputs
7723 `(("python-ua-parser" ,python-ua-parser)))
7724 (home-page "https://github.com/selwin/python-user-agents")
7725 (synopsis "User Agent strings parsing library")
7726 (description
7727 "A library to identify devices (phones, tablets) and their capabilities by
7728 parsing (browser/HTTP) user agent strings.")
7729 (license license:expat)))
7730
7731 (define-public python2-user-agents
7732 (package-with-python2 python-user-agents))
7733
7734 (define-public python-dbus
7735 (package
7736 (name "python-dbus")
7737 (version "1.2.16")
7738 (source
7739 (origin
7740 (method url-fetch)
7741 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7742 "dbus-python-" version ".tar.gz"))
7743 (sha256
7744 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7745 (build-system gnu-build-system)
7746 (native-inputs
7747 `(("pkg-config" ,pkg-config)))
7748 (inputs
7749 `(("python" ,python-wrapper)
7750 ("dbus-glib" ,dbus-glib)))
7751 (synopsis "Python bindings for D-bus")
7752 (description "python-dbus provides bindings for libdbus, the reference
7753 implementation of D-Bus.")
7754 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7755 (license license:expat)))
7756
7757 (define-public python2-dbus
7758 (package/inherit python-dbus
7759 (name "python2-dbus")
7760 (inputs `(("python" ,python-2)
7761 ,@(alist-delete "python"
7762 (package-inputs python-dbus)
7763 equal?)))))
7764
7765 (define-public python-notify2
7766 (package
7767 (name "python-notify2")
7768 (version "0.3.1")
7769 (source
7770 (origin
7771 (method url-fetch)
7772 (uri (pypi-uri "notify2" version))
7773 (sha256
7774 (base32
7775 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7776 (build-system python-build-system)
7777 (arguments `(#:tests? #f)) ; tests depend on system state
7778 (native-inputs
7779 `(("python-dbus" ,python-dbus)))
7780 (home-page "https://bitbucket.org/takluyver/pynotify2")
7781 (synopsis "Python interface to D-Bus notifications")
7782 (description
7783 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7784 It is a reimplementation of pynotify in pure Python, and an alternative to
7785 the GObject Introspection bindings to libnotify for non-GTK applications.")
7786 (license (list license:bsd-2
7787 license:lgpl2.1+))))
7788
7789 (define-public python2-notify2
7790 (package-with-python2 python-notify2))
7791
7792 ;; beautifulsoup4 has a totally different namespace than 3.x,
7793 ;; and pypi seems to put it under its own name, so I guess we should too
7794 (define-public python-beautifulsoup4
7795 (package
7796 (name "python-beautifulsoup4")
7797 (version "4.9.1")
7798 (source
7799 (origin
7800 (method url-fetch)
7801 (uri (pypi-uri "beautifulsoup4" version))
7802 (sha256
7803 (base32
7804 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7805 (build-system python-build-system)
7806 (arguments
7807 `(#:phases
7808 (modify-phases %standard-phases
7809 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7810 ;; must use this conversion script when building with Python 3. The
7811 ;; conversion script also runs the tests.
7812 ;; For more information, see the file 'convert-py3k' in the source
7813 ;; distribution.
7814 (replace 'check
7815 (lambda _ (invoke "./convert-py3k"))))))
7816 (propagated-inputs
7817 `(("python-soupsieve" ,python-soupsieve)))
7818 (home-page
7819 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7820 (synopsis
7821 "Python screen-scraping library")
7822 (description
7823 "Beautiful Soup is a Python library designed for rapidly setting up
7824 screen-scraping projects. It offers Pythonic idioms for navigating,
7825 searching, and modifying a parse tree, providing a toolkit for
7826 dissecting a document and extracting what you need. It automatically
7827 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7828 (license license:expat)
7829 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7830
7831 (define-public python2-beautifulsoup4
7832 (let ((base (package-with-python2
7833 (strip-python2-variant python-beautifulsoup4))))
7834 (package/inherit base
7835 (arguments `(#:python ,python-2)))))
7836
7837 (define-public python-soupsieve
7838 (package
7839 (name "python-soupsieve")
7840 (version "2.0.1")
7841 (source
7842 (origin
7843 (method url-fetch)
7844 (uri (pypi-uri "soupsieve" version))
7845 (sha256
7846 (base32
7847 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7848 (build-system python-build-system)
7849 (arguments `(#:tests? #f))
7850 ;;XXX: 2 tests fail currently despite claming they were to be
7851 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7852 ;;don't want to create a circular dependency.
7853 (home-page "https://github.com/facelessuser/soupsieve")
7854 (synopsis "CSS selector library")
7855 (description
7856 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7857 Soup 4. It aims to provide selecting, matching, and filtering using modern
7858 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7859 specifications up through the latest CSS level 4 drafts and beyond (though
7860 some are not yet implemented).")
7861 (properties `((python2-variant . ,(delay python2-soupsieve))))
7862 (license license:expat)))
7863
7864 ;; This is the last version that supports python-2
7865 (define-public python2-soupsieve
7866 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7867 (package
7868 (inherit base)
7869 (version "1.9.6")
7870 (source
7871 (origin
7872 (method url-fetch)
7873 (uri (pypi-uri "soupsieve" version))
7874 (sha256
7875 (base32
7876 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7877 (propagated-inputs
7878 `(("python2-backports-functools-lru-cache"
7879 ,python2-backports-functools-lru-cache)
7880 ,@(package-propagated-inputs base))))))
7881
7882 (define-public python-netifaces
7883 (package
7884 (name "python-netifaces")
7885 (version "0.10.9")
7886 (source
7887 (origin
7888 (method url-fetch)
7889 (uri (pypi-uri "netifaces" version))
7890 (sha256
7891 (base32
7892 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7893 (build-system python-build-system)
7894 (home-page "https://github.com/al45tair/netifaces")
7895 (synopsis
7896 "Python module for portable network interface information")
7897 (description
7898 "Netifaces is a Python module providing information on network
7899 interfaces in an easy and portable manner.")
7900 (license license:expat)))
7901
7902 (define-public python2-netifaces
7903 (package-with-python2 python-netifaces))
7904
7905 (define-public python-networkx
7906 (package
7907 (name "python-networkx")
7908 (version "2.5")
7909 (source
7910 (origin
7911 (method url-fetch)
7912 (uri (pypi-uri "networkx" version))
7913 (sha256
7914 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7915 (build-system python-build-system)
7916 (arguments
7917 '(#:phases (modify-phases %standard-phases
7918 (replace 'check
7919 (lambda* (#:key tests? #:allow-other-keys)
7920 (if tests?
7921 (invoke "pytest" "-vv" "--pyargs" "networkx")
7922 (format #t "test suite not run~%"))
7923 #t)))))
7924 ;; python-decorator is needed at runtime.
7925 (propagated-inputs
7926 `(("python-decorator" ,python-decorator)))
7927 (native-inputs
7928 `(("python-pytest" ,python-pytest)))
7929 (home-page "https://networkx.github.io/")
7930 (synopsis "Python module for creating and manipulating graphs and networks")
7931 (description
7932 "NetworkX is a Python package for the creation, manipulation, and study
7933 of the structure, dynamics, and functions of complex networks.")
7934 (properties `((python2-variant . ,(delay python2-networkx))))
7935 (license license:bsd-3)))
7936
7937 ;; NetworkX 2.2 is the last version with support for Python 2.
7938 (define-public python2-networkx
7939 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7940 (package
7941 (inherit base)
7942 (version "2.2")
7943 (source (origin
7944 (method url-fetch)
7945 (uri (pypi-uri "networkx" version ".zip"))
7946 (sha256
7947 (base32
7948 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7949 (arguments
7950 `(#:python ,python-2))
7951 (native-inputs
7952 `(("python-nose" ,python2-nose)
7953 ("unzip" ,unzip))))))
7954
7955 (define-public python-datrie
7956 (package
7957 (name "python-datrie")
7958 (version "0.8.2")
7959 (source
7960 (origin
7961 (method url-fetch)
7962 (uri (pypi-uri "datrie" version))
7963 (sha256
7964 (base32
7965 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7966 (build-system python-build-system)
7967 (native-inputs
7968 `(("python-cython" ,python-cython)
7969 ("python-hypothesis" ,python-hypothesis)
7970 ("python-pytest" ,python-pytest)
7971 ("python-pytest-runner" ,python-pytest-runner)))
7972 (home-page "https://github.com/kmike/datrie")
7973 (synopsis "Fast, efficiently stored trie for Python")
7974 (description
7975 "This package provides a fast, efficiently stored trie implementation for
7976 Python.")
7977 (license license:lgpl2.1+)))
7978
7979 (define-public python-amply
7980 (package
7981 (name "python-amply")
7982 (version "0.1.4")
7983 (source
7984 (origin
7985 (method url-fetch)
7986 (uri (pypi-uri "amply" version))
7987 (sha256
7988 (base32
7989 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
7990 (build-system python-build-system)
7991 (propagated-inputs
7992 `(("python-docutils" ,python-docutils)
7993 ("python-pyparsing" ,python-pyparsing)))
7994 (native-inputs
7995 `(("python-setuptools-scm" ,python-setuptools-scm)))
7996 (home-page "https://github.com/willu47/amply")
7997 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
7998 (description
7999 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
8000 structures.")
8001 (license license:epl1.0)))
8002
8003 (define-public python-pulp
8004 (package
8005 (name "python-pulp")
8006 (version "2.4")
8007 (source
8008 (origin
8009 (method url-fetch)
8010 (uri (pypi-uri "PuLP" version))
8011 (sha256
8012 (base32
8013 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
8014 (build-system python-build-system)
8015 (propagated-inputs
8016 `(("python-amply" ,python-amply)))
8017 (home-page "https://github.com/coin-or/pulp")
8018 (synopsis "Linear Programming modeler")
8019 (description
8020 "PuLP is a Linear Programming modeler written in Python. PuLP can
8021 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
8022 solve linear problems.")
8023 (license license:expat)))
8024
8025 (define-public python-toposort
8026 (package
8027 (name "python-toposort")
8028 (version "1.6")
8029 (source
8030 (origin
8031 (method url-fetch)
8032 (uri (pypi-uri "toposort" version))
8033 (sha256
8034 (base32
8035 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
8036 (build-system python-build-system)
8037 (home-page "https://gitlab.com/ericvsmith/toposort")
8038 (synopsis "Topological sort algorithm")
8039 (description
8040 "This package provides an implementation of a topological sort
8041 algorithm.")
8042 (license license:asl2.0)))
8043
8044 (define-public snakemake
8045 (package
8046 (name "snakemake")
8047 (version "5.32.2")
8048 (source
8049 (origin
8050 (method url-fetch)
8051 (uri (pypi-uri "snakemake" version))
8052 (sha256
8053 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
8054 (build-system python-build-system)
8055 (arguments
8056 ;; TODO: Package missing test dependencies.
8057 '(#:tests? #f
8058 #:phases
8059 (modify-phases %standard-phases
8060 ;; For cluster execution Snakemake will call Python. Since there is
8061 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
8062 ;; this by calling the snakemake wrapper instead.
8063 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
8064 (lambda* (#:key outputs #:allow-other-keys)
8065 (substitute* "snakemake/executors/__init__.py"
8066 (("\\{sys.executable\\} -m snakemake")
8067 (string-append (assoc-ref outputs "out")
8068 "/bin/snakemake")))
8069 #t)))))
8070 (propagated-inputs
8071 `(("python-appdirs" ,python-appdirs)
8072 ("python-configargparse" ,python-configargparse)
8073 ("python-datrie" ,python-datrie)
8074 ("python-docutils" ,python-docutils)
8075 ("python-gitpython" ,python-gitpython)
8076 ("python-jinja2" ,python-jinja2)
8077 ("python-jsonschema" ,python-jsonschema)
8078 ("python-nbformat" ,python-nbformat)
8079 ("python-networkx" ,python-networkx)
8080 ("python-psutil" ,python-psutil)
8081 ("python-pulp" ,python-pulp)
8082 ("python-pyyaml" ,python-pyyaml)
8083 ("python-ratelimiter" ,python-ratelimiter)
8084 ("python-requests" ,python-requests)
8085 ("python-toposort" ,python-toposort)
8086 ("python-wrapt" ,python-wrapt)))
8087 (home-page "https://snakemake.readthedocs.io")
8088 (synopsis "Python-based execution environment for make-like workflows")
8089 (description
8090 "Snakemake aims to reduce the complexity of creating workflows by
8091 providing a clean and modern domain specific specification language (DSL) in
8092 Python style, together with a fast and comfortable execution environment.")
8093 (license license:expat)))
8094
8095 (define-public python-pyqrcode
8096 (package
8097 (name "python-pyqrcode")
8098 (version "1.2.1")
8099 (source
8100 (origin
8101 (method url-fetch)
8102 (uri (pypi-uri "PyQRCode" version))
8103 (sha256
8104 (base32
8105 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8106 (build-system python-build-system)
8107 (home-page
8108 "https://github.com/mnooner256/pyqrcode")
8109 (synopsis "QR code generator")
8110 (description
8111 "Pyqrcode is a QR code generator written purely in Python with
8112 SVG, EPS, PNG and terminal output.")
8113 (license license:bsd-3)))
8114
8115 (define-public python-seaborn
8116 (package
8117 (name "python-seaborn")
8118 (version "0.10.0")
8119 (source
8120 (origin
8121 (method url-fetch)
8122 (uri (pypi-uri "seaborn" version))
8123 (sha256
8124 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
8125 (build-system python-build-system)
8126 (arguments
8127 `(#:phases
8128 (modify-phases %standard-phases
8129 (add-before 'check 'start-xserver
8130 (lambda* (#:key inputs #:allow-other-keys)
8131 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8132 ;; There must be a running X server and make check doesn't
8133 ;; start one. Therefore we must do it.
8134 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8135 (setenv "DISPLAY" ":1")
8136 #t)))
8137 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
8138 (propagated-inputs
8139 `(("python-pandas" ,python-pandas)
8140 ("python-matplotlib" ,python-matplotlib)
8141 ("python-numpy" ,python-numpy)
8142 ("python-scipy" ,python-scipy)))
8143 (native-inputs
8144 `(("python-pytest" ,python-pytest)
8145 ("xorg-server" ,xorg-server-for-tests)))
8146 (home-page "https://seaborn.pydata.org/")
8147 (synopsis "Statistical data visualization")
8148 (description
8149 "Seaborn is a library for making attractive and informative statistical
8150 graphics in Python. It is built on top of matplotlib and tightly integrated
8151 with the PyData stack, including support for numpy and pandas data structures
8152 and statistical routines from scipy and statsmodels.")
8153 (properties `((python2-variant . ,(delay python2-seaborn))))
8154 (license license:bsd-3)))
8155
8156 ;; 0.9.1 is the last release with support for Python 2.
8157 (define-public python2-seaborn
8158 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8159 (package
8160 (inherit base)
8161 (version "0.9.1")
8162 (source (origin
8163 (method url-fetch)
8164 (uri (pypi-uri "seaborn" version))
8165 (sha256
8166 (base32
8167 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8168
8169 (define-public python-mpmath
8170 (package
8171 (name "python-mpmath")
8172 (version "1.1.0")
8173 (source (origin
8174 (method url-fetch)
8175 (uri (pypi-uri "mpmath" version))
8176 (file-name (git-file-name name version))
8177 (sha256
8178 (base32
8179 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8180 (build-system python-build-system)
8181 (native-inputs
8182 `(("python-pytest" ,python-pytest)))
8183 (arguments
8184 '(#:phases
8185 (modify-phases %standard-phases
8186 (replace 'check
8187 (lambda _
8188 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8189 (home-page "https://mpmath.org")
8190 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8191 (description
8192 "@code{mpmath} can be used as an arbitrary-precision substitute for
8193 Python's float/complex types and math/cmath modules, but also does much
8194 more advanced mathematics.")
8195 (license license:bsd-3)))
8196
8197 (define-public python2-mpmath
8198 (package-with-python2 python-mpmath))
8199
8200 (define-public python-bigfloat
8201 (package
8202 (name "python-bigfloat")
8203 (version "0.3.0")
8204 (source
8205 (origin
8206 (method url-fetch)
8207 (uri (pypi-uri "bigfloat" version))
8208 (sha256
8209 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8210 (build-system python-build-system)
8211 (inputs
8212 `(("mpfr" ,mpfr)))
8213 (home-page "https://github.com/mdickinson/bigfloat")
8214 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8215 (description
8216 "This package provides a Python interface to the MPFR library for
8217 multiprecision arithmetic.")
8218 (license license:lgpl3+)))
8219
8220 (define-public python2-bigfloat
8221 (package-with-python2 python-bigfloat))
8222
8223 (define-public python-sympy
8224 (package
8225 (name "python-sympy")
8226 (version "1.7.1")
8227 (source
8228 (origin
8229 (method url-fetch)
8230 (uri (pypi-uri "sympy" version))
8231 (sha256
8232 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8233 (build-system python-build-system)
8234 (arguments
8235 `(#:phases
8236 (modify-phases %standard-phases
8237 (replace 'check
8238 (lambda* (#:key outputs #:allow-other-keys)
8239 (invoke
8240 (or (which "python3") (which "python"))
8241 "-c" "import sympy; sympy.test(\"/core\")"))))))
8242 (propagated-inputs
8243 `(("python-mpmath" ,python-mpmath)))
8244 (home-page "https://www.sympy.org/")
8245 (synopsis "Python library for symbolic mathematics")
8246 (description
8247 "SymPy is a Python library for symbolic mathematics. It aims to become a
8248 full-featured computer algebra system (CAS) while keeping the code as simple
8249 as possible in order to be comprehensible and easily extensible.")
8250 (license license:bsd-3)))
8251
8252 (define-public python2-sympy
8253 (package
8254 (inherit (package-with-python2 python-sympy))
8255 (version "1.5.1") ; last release for python2
8256 (source
8257 (origin
8258 (method url-fetch)
8259 (uri (pypi-uri "sympy" version))
8260 (sha256
8261 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8262
8263 (define-public python-q
8264 (package
8265 (name "python-q")
8266 (version "2.6")
8267 (source
8268 (origin
8269 (method url-fetch)
8270 (uri (pypi-uri "q" version))
8271 (sha256
8272 (base32
8273 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
8274 (build-system python-build-system)
8275 (home-page "https://github.com/zestyping/q")
8276 (synopsis "Quick-and-dirty debugging output for tired programmers")
8277 (description
8278 "q is a Python module for \"print\" style of debugging Python code. It
8279 provides convenient short API for print out of values, tracebacks, and
8280 falling into the Python interpreter.")
8281 (license license:asl2.0)))
8282
8283 (define-public python2-q
8284 (package-with-python2 python-q))
8285
8286 (define-public python-xlib
8287 (package
8288 (name "python-xlib")
8289 (version "0.29")
8290 (source
8291 (origin
8292 (method git-fetch)
8293 (uri (git-reference
8294 (url "https://github.com/python-xlib/python-xlib")
8295 (commit version)))
8296 (file-name (git-file-name name version))
8297 (sha256
8298 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
8299 (build-system python-build-system)
8300 (arguments
8301 `(#:phases
8302 (modify-phases %standard-phases
8303 (add-before 'check 'start-xserver
8304 (lambda* (#:key inputs #:allow-other-keys)
8305 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8306 ;; There must be a running X server and make check doesn't
8307 ;; start one. Therefore we must do it.
8308 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8309 (setenv "DISPLAY" ":1")
8310 #t))))))
8311 (native-inputs
8312 `(("python-mock" ,python-mock)
8313 ("python-setuptools-scm" ,python-setuptools-scm)
8314 ("xorg-server" ,xorg-server)))
8315 (propagated-inputs
8316 `(("python-six" ,python-six)))
8317 (home-page "https://github.com/python-xlib/python-xlib")
8318 (synopsis "Python X11 client library")
8319 (description
8320 "The Python X Library is intended to be a fully functional
8321 X client library for Python programs. It is useful to implement
8322 low-level X clients. It is written entirely in Python.")
8323 (license license:gpl2+)))
8324
8325 (define-public python2-xlib
8326 (package-with-python2 python-xlib))
8327
8328 (define-public python-singledispatch
8329 (package
8330 (name "python-singledispatch")
8331 (version "3.4.0.3")
8332 (source
8333 (origin
8334 (method url-fetch)
8335 (uri (pypi-uri "singledispatch" version))
8336 (sha256
8337 (base32
8338 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8339 (build-system python-build-system)
8340 (native-inputs
8341 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8342 (home-page
8343 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8344 (synopsis "Backport of singledispatch feature from Python 3.4")
8345 (description
8346 "This library brings functools.singledispatch from Python 3.4 to Python
8347 2.6-3.3.")
8348 (license license:expat)))
8349
8350 (define-public python2-singledispatch
8351 (package-with-python2 python-singledispatch))
8352
8353 ;; the python- version can be removed with python-3.5
8354 (define-public python-backports-abc
8355 (package
8356 (name "python-backports-abc")
8357 (version "0.5")
8358 (source
8359 (origin
8360 (method url-fetch)
8361 (uri (pypi-uri "backports_abc" version))
8362 (sha256
8363 (base32
8364 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
8365 (build-system python-build-system)
8366 (home-page "https://github.com/cython/backports_abc")
8367 (synopsis "Backport of additions to the 'collections.abc' module")
8368 (description
8369 "Python-backports-abc provides a backport of additions to the
8370 @code{collections.abc} module in Python-3.5.")
8371 (license license:psfl)))
8372
8373 (define-public python2-backports-abc
8374 (package-with-python2 python-backports-abc))
8375
8376 (define-public python-backports-csv
8377 (package
8378 (name "python-backports-csv")
8379 (version "1.0.7")
8380 (source
8381 (origin
8382 (method url-fetch)
8383 (uri (pypi-uri "backports.csv" version))
8384 (sha256
8385 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8386 (build-system python-build-system)
8387 (home-page "https://github.com/ryanhiebert/backports.csv")
8388 (synopsis "Backport of Python 3's csv module for Python 2")
8389 (description
8390 "Provides a backport of Python 3's @code{csv} module for parsing
8391 comma separated values. The API of the @code{csv} module in Python 2
8392 is drastically different from the @code{csv} module in Python 3.
8393 This is due, for the most part, to the difference between str in
8394 Python 2 and Python 3.")
8395 (license license:psfl)))
8396
8397 (define-public python2-backports-csv
8398 (package-with-python2 python-backports-csv))
8399
8400 (define-public python2-backports-shutil-get-terminal-size
8401 (package
8402 (name "python2-backports-shutil-get-terminal-size")
8403 (version "1.0.0")
8404 (source
8405 (origin
8406 (method url-fetch)
8407 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8408 (sha256
8409 (base32
8410 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8411 (build-system python-build-system)
8412 (arguments
8413 `(#:python ,python-2
8414 #:phases
8415 (modify-phases %standard-phases
8416 (replace 'check
8417 (lambda _
8418 (setenv "PYTHONPATH" (string-append "./build/lib:"
8419 (getenv "PYTHONPATH")))
8420 (invoke "py.test" "-v"))))))
8421 (native-inputs
8422 `(("python2-pytest" ,python2-pytest)))
8423 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8424 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8425 (description
8426 "This package provides a backport of the @code{get_terminal_size
8427 function} from Python 3.3's @code{shutil}.
8428 Unlike the original version it is written in pure Python rather than C,
8429 so it might be a tiny bit slower.")
8430 (license license:expat)))
8431
8432 (define-public python-waf
8433 (package
8434 (name "python-waf")
8435 (version "2.0.19")
8436 (source (origin
8437 (method url-fetch)
8438 (uri (string-append "https://waf.io/"
8439 "waf-" version ".tar.bz2"))
8440 (sha256
8441 (base32
8442 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8443 (build-system python-build-system)
8444 (arguments
8445 '(#:phases
8446 (modify-phases %standard-phases
8447 (replace 'build
8448 (lambda _
8449 ;; XXX: Find a way to add all extra tools.
8450 (let ((tools '("gccdeps"
8451 "clang_compilation_database")))
8452 (invoke "python" "waf-light" "configure" "build"
8453 (string-append "--tools="
8454 (string-join tools ","))))))
8455 (replace 'check
8456 (lambda _
8457 (invoke "python" "waf" "--version")))
8458 (replace 'install
8459 (lambda* (#:key outputs #:allow-other-keys)
8460 (let ((out (assoc-ref outputs "out")))
8461 (install-file "waf" (string-append out "/bin")))
8462 #t))
8463 ;; waf breaks when it is wrapped.
8464 (delete 'wrap))))
8465 (home-page "https://waf.io/")
8466 (synopsis "Python-based build system")
8467 (description
8468 "Waf is a Python-based framework for configuring, compiling and installing
8469 applications.")
8470 (license license:bsd-3)))
8471
8472 (define-public python2-waf
8473 (package-with-python2 python-waf))
8474
8475 (define-public python-pyzmq
8476 (package
8477 (name "python-pyzmq")
8478 (version "17.1.2")
8479 (source
8480 (origin
8481 (method url-fetch)
8482 (uri (pypi-uri "pyzmq" version))
8483 (sha256
8484 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8485 (build-system python-build-system)
8486 (arguments
8487 `(#:configure-flags
8488 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8489 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8490 ;; --inplace' for 'python setup.py test' to work.
8491 #:tests? #f))
8492 (inputs
8493 `(("zeromq" ,zeromq)))
8494 (native-inputs
8495 `(("pkg-config" ,pkg-config)
8496 ("python-nose" ,python-nose)))
8497 (home-page "https://github.com/zeromq/pyzmq")
8498 (synopsis "Python bindings for 0MQ")
8499 (description
8500 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8501 (license license:bsd-4)))
8502
8503 (define-public python2-pyzmq
8504 (package-with-python2 python-pyzmq))
8505
8506 (define-public python-pep8
8507 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8508 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8509 ;; some dependents' test suites, and nothing more.
8510 (package
8511 (name "python-pep8")
8512 (version "1.7.0")
8513 (source
8514 (origin
8515 (method url-fetch)
8516 (uri (pypi-uri "pep8" version))
8517 (sha256
8518 (base32
8519 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8520 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8521 (build-system python-build-system)
8522 (home-page "https://pep8.readthedocs.org/")
8523 (synopsis "Python style guide checker")
8524 (description
8525 "This tools checks Python code against some of the style conventions in
8526 PEP 8.")
8527 (license license:expat)))
8528
8529 (define-public python2-pep8
8530 (package-with-python2 python-pep8))
8531
8532 (define-public python-pep517
8533 (package
8534 (inherit python-pep517-bootstrap)
8535 (name "python-pep517")
8536 (arguments
8537 '(#:phases
8538 (modify-phases %standard-phases
8539 (replace 'check
8540 (lambda* (#:key tests? #:allow-other-keys)
8541 (delete-file "pytest.ini")
8542 ;; This test tries to connect to the internet
8543 (delete-file "tests/test_meta.py")
8544 (if tests?
8545 (invoke "pytest")
8546 #t))))))
8547 (native-inputs
8548 `(("python-mock" ,python-mock)
8549 ("python-pytest" ,python-pytest)
8550 ("python-testpath" ,python-testpath)))
8551 (properties `((python2-variant . ,(delay python2-pep517))))))
8552
8553 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8554 (define-public python2-pep517
8555 (let ((base (package-with-python2
8556 (strip-python2-variant python-pep517))))
8557 (package/inherit base
8558 (name "python2-pep517")
8559 (arguments
8560 `(#:tests? #f
8561 ,@(package-arguments base)))
8562 (native-inputs `()))))
8563
8564 (define-public python-pyflakes
8565 (package
8566 (name "python-pyflakes")
8567 (version "2.2.0")
8568 (source
8569 (origin
8570 (method url-fetch)
8571 (uri (pypi-uri "pyflakes" version))
8572 (sha256
8573 (base32
8574 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8575 (build-system python-build-system)
8576 (home-page
8577 "https://github.com/pyflakes/pyflakes")
8578 (synopsis "Passive checker of Python programs")
8579 (description
8580 "Pyflakes statically checks Python source code for common errors.")
8581 (license license:expat)))
8582
8583 (define-public python2-pyflakes
8584 (package-with-python2 python-pyflakes))
8585
8586 (define-public python-mccabe
8587 (package
8588 (name "python-mccabe")
8589 (version "0.6.1")
8590 (source
8591 (origin
8592 (method url-fetch)
8593 (uri (pypi-uri "mccabe" version))
8594 (sha256
8595 (base32
8596 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8597 (build-system python-build-system)
8598 (native-inputs
8599 `(("python-pytest" ,python-pytest-bootstrap)
8600 ("python-pytest-runner" ,python-pytest-runner)))
8601 (home-page "https://github.com/flintwork/mccabe")
8602 (synopsis "McCabe checker, plugin for flake8")
8603 (description
8604 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8605 complexity of Python source code.")
8606 (license license:expat)))
8607
8608 (define-public python2-mccabe
8609 (package-with-python2 python-mccabe))
8610
8611 (define-public python-flake8
8612 (package
8613 (name "python-flake8")
8614 (version "3.8.4")
8615 (source (origin
8616 (method url-fetch)
8617 (uri (pypi-uri "flake8" version))
8618 (sha256
8619 (base32
8620 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8621 (build-system python-build-system)
8622 (arguments
8623 `(#:phases
8624 (modify-phases %standard-phases
8625 (delete 'check)
8626 (add-after 'install 'check
8627 (lambda* (#:key inputs outputs #:allow-other-keys)
8628 (add-installed-pythonpath inputs outputs)
8629 (invoke "pytest" "-v")
8630 #t)))))
8631 (propagated-inputs
8632 `(("python-pycodestyle" ,python-pycodestyle)
8633 ("python-entrypoints" ,python-entrypoints)
8634 ("python-pyflakes" ,python-pyflakes)
8635 ("python-mccabe" ,python-mccabe)))
8636 (native-inputs
8637 `(("python-mock" ,python-mock)
8638 ("python-pytest" ,python-pytest-bootstrap)))
8639 (home-page "https://gitlab.com/pycqa/flake8")
8640 (synopsis
8641 "The modular source code checker: pep8, pyflakes and co")
8642 (description
8643 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8644 (properties `((python2-variant . ,(delay python2-flake8))))
8645 (license license:expat)))
8646
8647 (define-public python2-flake8
8648 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8649 (package/inherit base
8650 (propagated-inputs
8651 `(("python2-configparser" ,python2-configparser)
8652 ("python2-enum34" ,python2-enum34)
8653 ("python2-functools32" ,python2-functools32)
8654 ("python2-typing" ,python2-typing)
8655 ,@(package-propagated-inputs base))))))
8656
8657 (define-public python-flake8-bugbear
8658 (package
8659 (name "python-flake8-bugbear")
8660 (version "20.1.4")
8661 (source
8662 (origin
8663 (method url-fetch)
8664 (uri (pypi-uri "flake8-bugbear" version))
8665 (sha256
8666 (base32
8667 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8668 (build-system python-build-system)
8669 (arguments
8670 '(#:phases
8671 (modify-phases %standard-phases
8672 (add-before 'check 'disable-test
8673 (lambda _
8674 ;; This test fails on slow computers.
8675 (substitute* "tests/test_bugbear.py"
8676 (("def test_does_not_crash_on_any_valid_code")
8677 "def _test_does_not_crash_on_any_valid_code")))))))
8678 (native-inputs
8679 `(("python-hypothesis" ,python-hypothesis)
8680 ("python-hypothesmith" ,python-hypothesmith)))
8681 (propagated-inputs
8682 `(("python-attrs" ,python-attrs)
8683 ("python-flake8" ,python-flake8)))
8684 (home-page "https://github.com/PyCQA/flake8-bugbear")
8685 (synopsis
8686 "Flake8 plugin for finding likely bugs and design problems in your program")
8687 (description
8688 "This package contains a plugin for Flake8 finding likely bugs and
8689 design problems in your program. It contains warnings that don't belong
8690 in pyflakes and pycodestyle.")
8691 (license license:expat)))
8692
8693 (define-public python-flake8-implicit-str-concat
8694 (package
8695 (name "python-flake8-implicit-str-concat")
8696 (version "0.2.0")
8697 (source
8698 (origin
8699 (method url-fetch)
8700 (uri (pypi-uri "flake8_implicit_str_concat" version))
8701 (sha256
8702 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
8703 (build-system python-build-system)
8704 (propagated-inputs
8705 `(("python-attrs" ,python-attrs)
8706 ("python-more-itertools" ,python-more-itertools)))
8707 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
8708 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
8709 (description
8710 "This is a plugin for the Python code checking tool Flake8 to encourage
8711 correct string literal concatenation.
8712
8713 It looks for style problems like implicitly concatenated string literals on
8714 the same line (which can be introduced by the code formating tool Black), or
8715 unnecessary plus operators for explicit string literal concatenation.")
8716 (license license:expat)))
8717
8718 (define-public python-flake8-polyfill
8719 (package
8720 (name "python-flake8-polyfill")
8721 (version "1.0.2")
8722 (source
8723 (origin
8724 (method url-fetch)
8725 (uri (pypi-uri "flake8-polyfill" version))
8726 (sha256
8727 (base32
8728 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8729 (build-system python-build-system)
8730 (arguments
8731 '(#:phases
8732 (modify-phases %standard-phases
8733 (replace 'check
8734 (lambda _
8735 ;; Be compatible with Pytest 4:
8736 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8737 (substitute* "setup.cfg"
8738 (("\\[pytest\\]")
8739 "[tool:pytest]"))
8740
8741 (setenv "PYTHONPATH"
8742 (string-append (getcwd) "/build/lib:"
8743 (getenv "PYTHONPATH")))
8744 (invoke "py.test" "-v"))))))
8745 (native-inputs
8746 `(("python-flake8" ,python-flake8)
8747 ("python-mock" ,python-mock)
8748 ("python-pep8" ,python-pep8)
8749 ("python-pycodestyle" ,python-pycodestyle)
8750 ("python-pytest" ,python-pytest)))
8751 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8752 (synopsis "Polyfill package for Flake8 plugins")
8753 (description
8754 "This package that provides some compatibility helpers for Flake8
8755 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8756 (license license:expat)))
8757
8758 (define-public python2-flake8-polyfill
8759 (package-with-python2 python-flake8-polyfill))
8760
8761 (define-public python-flake8-print
8762 (package
8763 (name "python-flake8-print")
8764 (version "4.0.0")
8765 (source
8766 (origin
8767 (method url-fetch)
8768 (uri (pypi-uri "flake8-print" version))
8769 (sha256
8770 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
8771 (build-system python-build-system)
8772 (propagated-inputs
8773 `(("python-flake8" ,python-flake8)
8774 ("python-pycodestyle" ,python-pycodestyle)
8775 ("python-six" ,python-six)))
8776 (home-page "https://github.com/jbkahn/flake8-print")
8777 (synopsis "Print statement checker plugin for Flake8")
8778 (description
8779 "This plugin for Flake8 checks for @code{print} statements in Python
8780 files.")
8781 (license license:expat)))
8782
8783 (define-public python-flake8-pyi
8784 (package
8785 (name "python-flake8-pyi")
8786 (version "20.5.0")
8787 (source
8788 (origin
8789 (method url-fetch)
8790 (uri (pypi-uri "flake8-pyi" version))
8791 (sha256
8792 (base32
8793 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8794 (build-system python-build-system)
8795 (propagated-inputs
8796 `(("python-attrs" ,python-attrs)
8797 ("python-flake8" ,python-flake8)
8798 ("python-pyflakes" ,python-pyflakes)))
8799 (home-page "https://github.com/ambv/flake8-pyi")
8800 (synopsis
8801 "Flake8 plugin that provides specializations for type hinting stub files")
8802 (description
8803 "This package contains a plugin that provides specializations for
8804 type hinting stub files, especially interesting for linting typeshed. It
8805 adds the @file{.pyi} extension to the default value of the @code{--filename}
8806 command-line argument to Flake8. This means stubs are linted by default with
8807 this plugin enabled, without needing to explicitly list every file. It
8808 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8809 expressions after the entire file has been read. This enables support for
8810 first-class forward references that stub files use.")
8811 (license license:expat)))
8812
8813 (define-public python-flake8-pie
8814 (package
8815 (name "python-flake8-pie")
8816 (version "0.5.0")
8817 (source
8818 (origin
8819 (method url-fetch)
8820 (uri (pypi-uri "flake8-pie" version))
8821 (sha256
8822 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8823 (build-system python-build-system)
8824 (home-page "https://github.com/sbdchd/flake8-pie")
8825 (synopsis "Flake8 extension that implements lints")
8826 (description
8827 "This package provides a flake8 extension that implements miscellaneous
8828 lints.")
8829 (license license:bsd-2)))
8830
8831 (define-public python-autoflake
8832 (package
8833 (name "python-autoflake")
8834 (version "1.3.1")
8835 (source
8836 (origin
8837 (method url-fetch)
8838 (uri (pypi-uri "autoflake" version))
8839 (sha256
8840 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8841 (build-system python-build-system)
8842 (propagated-inputs
8843 `(("python-pyflakes" ,python-pyflakes)))
8844 (home-page "https://github.com/myint/autoflake")
8845 (synopsis "Removes unused imports and unused variables")
8846 (description
8847 "@code{autoflake} removes unused imports and unused variables from Python
8848 code as reported by @code{pyflakes}.
8849
8850 By default, it only removes unused imports for modules that are part of the
8851 standard library. Removal of unused variables is also disabled by default.
8852 It also removes useless @code{pass} statements.")
8853 (license license:expat)))
8854
8855 (define-public python-mistune
8856 (package
8857 (name "python-mistune")
8858 (version "0.8.4")
8859 (source
8860 (origin
8861 (method url-fetch)
8862 (uri (pypi-uri "mistune" version))
8863 (sha256
8864 (base32
8865 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8866 (build-system python-build-system)
8867 (native-inputs
8868 `(("python-nose" ,python-nose)
8869 ("python-cython" ,python-cython)))
8870 (home-page "https://github.com/lepture/mistune")
8871 (synopsis "Markdown parser in pure Python")
8872 (description "This package provides a fast markdown parser in pure
8873 Python.")
8874 (license license:bsd-3)))
8875
8876 (define-public python2-mistune
8877 (package-with-python2 python-mistune))
8878
8879 (define-public python-markdown
8880 (package
8881 (name "python-markdown")
8882 (version "3.2.1")
8883 (source
8884 (origin
8885 (method url-fetch)
8886 (uri (pypi-uri "Markdown" version))
8887 (sha256
8888 (base32
8889 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8890 (build-system python-build-system)
8891 (native-inputs
8892 `(("python-nose" ,python-nose)
8893 ("python-pyyaml" ,python-pyyaml)))
8894 (home-page "https://python-markdown.github.io/")
8895 (synopsis "Python implementation of Markdown")
8896 (description
8897 "This package provides a Python implementation of John Gruber's
8898 Markdown. The library features international input, various Markdown
8899 extensions, and several HTML output formats. A command line wrapper
8900 markdown_py is also provided to convert Markdown files to HTML.")
8901 (properties `((python2-variant . ,(delay python2-markdown))))
8902 (license license:bsd-3)))
8903
8904 ;; Markdown 3.2 dropped support for Python 2.
8905 (define-public python2-markdown
8906 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8907 (package/inherit
8908 base
8909 (version "3.1.1")
8910 (source (origin
8911 (method url-fetch)
8912 (uri (pypi-uri "Markdown" version))
8913 (sha256
8914 (base32
8915 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8916
8917 (define-public python-ptyprocess
8918 (package
8919 (name "python-ptyprocess")
8920 (version "0.5.2")
8921 (source
8922 (origin
8923 (method url-fetch)
8924 (uri (pypi-uri "ptyprocess" version))
8925 (sha256
8926 (base32
8927 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8928 (build-system python-build-system)
8929 (native-inputs
8930 `(("python-nose" ,python-nose)))
8931 (arguments
8932 `(#:phases
8933 (modify-phases %standard-phases
8934 (replace 'check
8935 (lambda _ (invoke "nosetests"))))))
8936 (home-page "https://github.com/pexpect/ptyprocess")
8937 (synopsis "Run a subprocess in a pseudo terminal")
8938 (description
8939 "This package provides a Python library used to launch a subprocess in a
8940 pseudo terminal (pty), and interact with both the process and its pty.")
8941 (license license:isc)))
8942
8943 (define-public python2-ptyprocess
8944 (package-with-python2 python-ptyprocess))
8945
8946 (define-public python-cram
8947 (package
8948 (name "python-cram")
8949 (version "0.7")
8950 (home-page "https://bitheap.org/cram/")
8951 (source (origin
8952 (method url-fetch)
8953 (uri (list (string-append home-page "cram-"
8954 version ".tar.gz")
8955 (pypi-uri "cram" version)))
8956 (sha256
8957 (base32
8958 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8959 (arguments
8960 '(#:phases
8961 (modify-phases %standard-phases
8962 (add-after 'unpack 'patch-source
8963 (lambda _
8964 (substitute* (find-files "cram" ".*\\.py$")
8965 ;; Replace default shell path.
8966 (("/bin/sh") (which "sh")))
8967 (substitute* (find-files "tests" ".*\\.t$")
8968 (("md5") "md5sum")
8969 (("/bin/bash") (which "bash"))
8970 (("/bin/sh") (which "sh")))
8971 (substitute* "cram/_test.py"
8972 ;; This hack works around a bug triggered by substituting
8973 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8974 ;; "cram -h", which breaks the output at 80 characters. This
8975 ;; causes the line showing the default shell to break into two
8976 ;; lines, but the test expects a single line...
8977 (("env\\['COLUMNS'\\] = '80'")
8978 "env['COLUMNS'] = '160'"))
8979
8980 (substitute* "Makefile"
8981 ;; Recent versions of python-coverage have caused the test
8982 ;; coverage to decrease (as of version 0.7). Allow that.
8983 (("--fail-under=100")
8984 "--fail-under=90"))
8985
8986 #t))
8987 (replace 'check
8988 ;; The test phase uses the built library and executable.
8989 (lambda* (#:key inputs outputs #:allow-other-keys)
8990 (add-installed-pythonpath inputs outputs)
8991 (setenv "PATH" (string-append (getenv "PATH") ":"
8992 (assoc-ref outputs "out") "/bin"))
8993 (invoke "make" "test"))))))
8994 (build-system python-build-system)
8995 (native-inputs
8996 `(("python-coverage" ,python-coverage)
8997 ("which" ,which)))
8998 (synopsis "Simple testing framework for command line applications")
8999 (description
9000 "Cram is a functional testing framework for command line applications.
9001 Cram tests look like snippets of interactive shell sessions. Cram runs each
9002 command and compares the command output in the test with the command’s actual
9003 output.")
9004 (license license:gpl2+)))
9005
9006 (define-public python2-cram
9007 (package-with-python2 python-cram))
9008
9009 (define-public python-crashtest
9010 (package
9011 (name "python-crashtest")
9012 (version "0.3.1")
9013 (source
9014 (origin
9015 (method url-fetch)
9016 (uri (pypi-uri "crashtest" version))
9017 (sha256
9018 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
9019 (build-system python-build-system)
9020 (home-page "https://github.com/sdispater/crashtest")
9021 (synopsis "Manage Python errors with ease")
9022 (description
9023 "Python library that makes exceptions handling and inspection easier.")
9024 (license license:expat)))
9025
9026 (define-public python-straight-plugin
9027 (package
9028 (name "python-straight-plugin")
9029 (version "1.4.1")
9030 (source
9031 (origin
9032 (method url-fetch)
9033 (uri (pypi-uri "straight.plugin" version))
9034 (sha256
9035 (base32
9036 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
9037 (build-system python-build-system)
9038 (home-page "https://github.com/ironfroggy/straight.plugin")
9039 (synopsis "Simple namespaced plugin facility")
9040 (description "Straight Plugin provides a type of plugin you can create from
9041 almost any existing Python modules, and an easy way for outside developers to
9042 add functionality and customization to your projects with their own plugins.")
9043 (license license:expat)))
9044
9045 (define-public python2-straight-plugin
9046 (package-with-python2 python-straight-plugin))
9047
9048 (define-public python-fonttools
9049 (package
9050 (name "python-fonttools")
9051 (version "4.6.0")
9052 (source (origin
9053 (method url-fetch)
9054 (uri (pypi-uri "fonttools" version ".zip"))
9055 (sha256
9056 (base32
9057 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
9058 (build-system python-build-system)
9059 (native-inputs
9060 `(("unzip" ,unzip)
9061 ("python-pytest" ,python-pytest)
9062 ("python-pytest-runner" ,python-pytest-runner)))
9063 (home-page "https://github.com/fonttools/fonttools")
9064 (synopsis "Tools to manipulate font files")
9065 (description
9066 "FontTools/TTX is a library to manipulate font files from Python. It
9067 supports reading and writing of TrueType/OpenType fonts, reading and writing
9068 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
9069 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
9070 from an XML-based format.")
9071 (license license:expat)))
9072
9073 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
9074 (define-public python2-fonttools
9075 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
9076 (package/inherit
9077 base
9078 (version "3.44.0")
9079 (source (origin
9080 (method url-fetch)
9081 (uri (pypi-uri "fonttools" version ".zip"))
9082 (sha256
9083 (base32
9084 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
9085
9086 (define-public python-ly
9087 (package
9088 (name "python-ly")
9089 (version "0.9.5")
9090 (source
9091 (origin
9092 (method url-fetch)
9093 (uri (pypi-uri name version))
9094 (sha256
9095 (base32
9096 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
9097 (build-system python-build-system)
9098 (arguments
9099 ;; FIXME: Some tests need network access.
9100 '(#:tests? #f))
9101 (synopsis "Tool and library for manipulating LilyPond files")
9102 (description "This package provides a Python library to parse, manipulate
9103 or create documents in LilyPond format. A command line program ly is also
9104 provided that can be used to do various manipulations with LilyPond files.")
9105 (home-page "https://pypi.org/project/python-ly/")
9106 (license license:gpl2+)))
9107
9108 (define-public python-appdirs
9109 (package
9110 (name "python-appdirs")
9111 (version "1.4.3")
9112 (source
9113 (origin
9114 (method url-fetch)
9115 (uri (pypi-uri "appdirs" version))
9116 (sha256
9117 (base32
9118 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9119 (build-system python-build-system)
9120 (home-page "https://github.com/ActiveState/appdirs")
9121 (synopsis
9122 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9123 (description
9124 "This module provides a portable way of finding out where user data
9125 should be stored on various operating systems.")
9126 (license license:expat)))
9127
9128 (define-public python2-appdirs
9129 (package-with-python2 python-appdirs))
9130
9131 (define-public python-gorilla
9132 (package
9133 (name "python-gorilla")
9134 (version "0.3.0")
9135 (source (origin
9136 (method url-fetch)
9137 (uri (pypi-uri "gorilla" version))
9138 (sha256
9139 (base32
9140 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9141 (build-system python-build-system)
9142 (home-page "https://github.com/christophercrouzet/gorilla")
9143 (synopsis "Convenient monkey patching with Python")
9144 (description
9145 "Gorilla is a Python library that provides a convenient approach to
9146 monkey patching. Monkey patching is the process of modifying module and
9147 class attributes at runtime with the purpose of replacing or extending
9148 third-party code.")
9149 (license license:expat)))
9150
9151 (define-public python-llfuse
9152 (package
9153 (name "python-llfuse")
9154 (version "1.3.8")
9155 (source (origin
9156 (method url-fetch)
9157 (uri (pypi-uri "llfuse" version))
9158 (sha256
9159 (base32
9160 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9161 (build-system python-build-system)
9162 (inputs
9163 `(("fuse" ,fuse)
9164 ("attr" ,attr)))
9165 (native-inputs
9166 `(("pkg-config" ,pkg-config)))
9167 (synopsis "Python bindings for FUSE")
9168 (description
9169 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9170 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9171 (license license:lgpl2.0+)
9172 (properties `((python2-variant . ,(delay python2-llfuse))))))
9173
9174 (define-public python2-llfuse
9175 (let ((base (package-with-python2
9176 (strip-python2-variant python-llfuse))))
9177 (package/inherit base
9178 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
9179
9180 (define-public python-msgpack
9181 (package
9182 (name "python-msgpack")
9183 (version "1.0.0")
9184 (source (origin
9185 (method url-fetch)
9186 (uri (pypi-uri "msgpack" version))
9187 (sha256
9188 (base32
9189 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
9190 (build-system python-build-system)
9191 (arguments
9192 `(#:modules ((guix build utils)
9193 (guix build python-build-system)
9194 (ice-9 ftw)
9195 (srfi srfi-1)
9196 (srfi srfi-26))
9197 #:phases
9198 (modify-phases %standard-phases
9199 (replace 'check
9200 (lambda _
9201 (let ((cwd (getcwd)))
9202 (setenv "PYTHONPATH"
9203 (string-append cwd "/build/"
9204 (find (cut string-prefix? "lib" <>)
9205 (scandir (string-append cwd "/build")))
9206 ":"
9207 (getenv "PYTHONPATH")))
9208 (invoke "pytest" "-v" "test")))))))
9209 (native-inputs
9210 `(("python-pytest" ,python-pytest)))
9211 (synopsis "MessagePack (de)serializer")
9212 (description "MessagePack is a fast, compact binary serialization format,
9213 suitable for similar data to JSON. This package provides CPython bindings for
9214 reading and writing MessagePack data.")
9215 (home-page "https://pypi.org/project/msgpack/")
9216 (license license:asl2.0)))
9217
9218 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
9219 ;; release 0.5. Some packages like borg still call it by the old name for now.
9220 ;; <https://bugs.gnu.org/30662>
9221 (define-public python-msgpack-transitional
9222 (package
9223 (inherit python-msgpack)
9224 (name "python-msgpack-transitional")
9225 (version "0.5.6")
9226 (source (origin
9227 (method url-fetch)
9228 (uri (pypi-uri "msgpack" version))
9229 (sha256
9230 (base32
9231 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
9232 (arguments
9233 (substitute-keyword-arguments (package-arguments python-msgpack)
9234 ((#:phases phases)
9235 `(modify-phases ,phases
9236 (add-after 'unpack 'configure-transitional
9237 (lambda _
9238 ;; Keep using the old name.
9239 (substitute* "setup.py"
9240 (("TRANSITIONAL = False")
9241 "TRANSITIONAL = 1"))
9242 #t))))))))
9243
9244 (define-public python2-msgpack
9245 (package-with-python2 python-msgpack))
9246
9247 (define-public python-netaddr
9248 (package
9249 (name "python-netaddr")
9250 (version "0.7.19")
9251 (source
9252 (origin
9253 (method url-fetch)
9254 (uri (pypi-uri "netaddr" version))
9255 (sha256
9256 (base32
9257 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
9258 (build-system python-build-system)
9259 (arguments `(#:tests? #f)) ;; No tests.
9260 (home-page "https://github.com/drkjam/netaddr/")
9261 (synopsis "Pythonic manipulation of network addresses")
9262 (description
9263 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
9264 and MAC network addresses.")
9265 (license license:bsd-3)))
9266
9267 (define-public python2-netaddr
9268 (package-with-python2 python-netaddr))
9269
9270 (define-public python2-pyroute2
9271 (package
9272 (name "python2-pyroute2")
9273 (version "0.5.6")
9274 (source
9275 (origin
9276 (method url-fetch)
9277 (uri (pypi-uri "pyroute2" version))
9278 (sha256
9279 (base32
9280 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
9281 (build-system python-build-system)
9282 (arguments
9283 `(#:python ,python-2)) ;Python 3.x is not supported
9284 (home-page "https://github.com/svinota/pyroute2")
9285 (synopsis "Python netlink library")
9286 (description
9287 "Pyroute2 is a pure Python netlink library with minimal dependencies.
9288 Supported netlink families and protocols include:
9289 @itemize
9290 @item rtnl, network settings - addresses, routes, traffic controls
9291 @item nfnetlink - netfilter API: ipset, nftables, ...
9292 @item ipq - simplest userspace packet filtering, iptables QUEUE target
9293 @item devlink - manage and monitor devlink-enabled hardware
9294 @item generic - generic netlink families
9295 @itemize
9296 @item nl80211 - wireless functions API (basic support)
9297 @item taskstats - extended process statistics
9298 @item acpi_events - ACPI events monitoring
9299 @item thermal_events - thermal events monitoring
9300 @item VFS_DQUOT - disk quota events monitoring
9301 @end itemize
9302 @end itemize")
9303 (license license:gpl2+)))
9304
9305 (define-public python-wrapt
9306 (package
9307 (name "python-wrapt")
9308 (version "1.11.2")
9309 (source
9310 (origin
9311 (method url-fetch)
9312 (uri (pypi-uri "wrapt" version))
9313 (sha256
9314 (base32
9315 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
9316 (build-system python-build-system)
9317 (arguments
9318 ;; Tests are not included in the tarball, they are only available in the
9319 ;; git repository.
9320 `(#:tests? #f))
9321 (home-page "https://github.com/GrahamDumpleton/wrapt")
9322 (synopsis "Module for decorators, wrappers and monkey patching")
9323 (description
9324 "The aim of the wrapt module is to provide a transparent object proxy for
9325 Python, which can be used as the basis for the construction of function
9326 wrappers and decorator functions.")
9327 (license license:bsd-2)))
9328
9329 (define-public python2-wrapt
9330 (package-with-python2 python-wrapt))
9331
9332 (define-public python-commonmark
9333 (package
9334 (name "python-commonmark")
9335 (version "0.9.1")
9336 (source
9337 (origin
9338 (method url-fetch)
9339 (uri (pypi-uri "commonmark" version))
9340 (sha256
9341 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
9342 (build-system python-build-system)
9343 (arguments
9344 `(#:phases
9345 (modify-phases %standard-phases
9346 (replace 'check
9347 (lambda* (#:key inputs outputs #:allow-other-keys)
9348 (add-installed-pythonpath inputs outputs)
9349 (invoke "python" "setup.py" "test"))))))
9350 (home-page "https://github.com/readthedocs/commonmark.py")
9351 (synopsis "Python parser for the CommonMark Markdown spec")
9352 (description
9353 "This module is a pure Python port of jgm's @code{commonmark.js}, a
9354 Markdown parser and renderer for the CommonMark specification, using only
9355 native modules.")
9356 (license license:bsd-3)))
9357
9358 (define-public python-xlrd
9359 (package
9360 (name "python-xlrd")
9361 (version "1.2.0")
9362 (source (origin
9363 (method url-fetch)
9364 (uri (pypi-uri "xlrd" version))
9365 (sha256
9366 (base32
9367 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
9368 (build-system python-build-system)
9369 (arguments
9370 `(#:phases
9371 (modify-phases %standard-phases
9372 ;; Some tests depend on writing a temporary file to the user's home
9373 ;; directory.
9374 (add-after 'unpack 'fix-tests
9375 (lambda _
9376 (delete-file "tests/test_open_workbook.py")
9377 #t)))))
9378 (home-page "http://www.python-excel.org/")
9379 (synopsis "Library for extracting data from Excel files")
9380 (description "This package provides a library to extract data from
9381 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
9382 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
9383 Unicode-aware. It is not intended as an end-user tool.")
9384 (license license:bsd-3)))
9385
9386 (define-public python2-xlrd
9387 (package-with-python2 python-xlrd))
9388
9389 (define-public python-immutables
9390 (package
9391 (name "python-immutables")
9392 (version "0.14")
9393 (source
9394 (origin
9395 (method url-fetch)
9396 (uri (pypi-uri "immutables" version))
9397 (sha256
9398 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9399 (build-system python-build-system)
9400 (home-page "https://github.com/MagicStack/immutables")
9401 (synopsis "High-performance immutable mapping type for Python")
9402 (description
9403 "An immutable mapping type for Python. The underlying datastructure is a
9404 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9405 functional languages.")
9406 (license license:asl2.0)))
9407
9408 (define-public python-prettytable
9409 (package
9410 (name "python-prettytable")
9411 (version "0.7.2")
9412 (source
9413 (origin
9414 (method url-fetch)
9415 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9416 (sha256
9417 (base32
9418 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9419 (build-system python-build-system)
9420 (home-page "https://code.google.com/archive/p/prettytable/")
9421 (synopsis "Display tabular data in an ASCII table format")
9422 (description
9423 "A library designed to represent tabular data in visually appealing ASCII
9424 tables. PrettyTable allows for selection of which columns are to be printed,
9425 independent alignment of columns (left or right justified or centred) and
9426 printing of sub-tables by specifying a row range.")
9427 (license license:bsd-3)))
9428
9429 (define-public python2-prettytable
9430 (package-with-python2 python-prettytable))
9431
9432 (define-public python-curio
9433 (package
9434 (name "python-curio")
9435 (version "1.2")
9436 (source
9437 (origin
9438 (method url-fetch)
9439 (uri (pypi-uri "curio" version))
9440 (sha256
9441 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9442 (build-system python-build-system)
9443 (arguments
9444 `(#:phases
9445 (modify-phases %standard-phases
9446 (replace 'check
9447 (lambda* (#:key inputs outputs #:allow-other-keys)
9448 (add-installed-pythonpath inputs outputs)
9449 (invoke "pytest" "-vv" "-k"
9450 ;; Tries to open an outgoing connection.
9451 "not test_ssl_outgoing"))))))
9452 (native-inputs
9453 `(("python-pytest" ,python-pytest)))
9454 (home-page "https://github.com/dabeaz/curio")
9455 (synopsis "Coroutine-based library for concurrent Python")
9456 (description
9457 "Curio is a coroutine-based library for concurrent Python systems
9458 programming. It provides standard programming abstractions such as as
9459 tasks, sockets, files, locks, and queues.")
9460 (license license:bsd-3)))
9461
9462 (define-public python-tables
9463 (package
9464 (name "python-tables")
9465 (version "3.6.1")
9466 (source
9467 (origin
9468 (method url-fetch)
9469 (uri (pypi-uri "tables" version))
9470 (sha256
9471 (base32
9472 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9473 (modules '((guix build utils)))
9474 (snippet
9475 '(begin
9476 ;; Remove pre-compiled .pyc files from source.
9477 (for-each delete-file-recursively
9478 (find-files "." "__pycache__" #:directories? #t))
9479 (for-each delete-file (find-files "." "\\.pyc$"))
9480 #t))))
9481 (build-system python-build-system)
9482 (arguments
9483 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9484 ;; or "check", so we must override the build and check phases.
9485 #:phases
9486 (modify-phases %standard-phases
9487 (add-after 'unpack 'use-gcc
9488 (lambda _
9489 (substitute* "setup.py"
9490 (("^( +)compiler = new_compiler\\(\\)" line indent)
9491 (string-append line
9492 "\n"
9493 indent
9494 "compiler.set_executables(compiler='gcc',"
9495 "compiler_so='gcc',"
9496 "linker_exe='gcc',"
9497 "linker_so='gcc -shared')")))
9498 #t))
9499 (add-after 'unpack 'disable-tuning
9500 (lambda _
9501 (substitute* "setup.py"
9502 (("cpu_flags = .*")
9503 "cpu_flags = ['sse2']\n"))
9504 #t))
9505 (replace 'build
9506 (lambda* (#:key inputs #:allow-other-keys)
9507 (invoke "python" "setup.py" "build"
9508 (string-append "--hdf5="
9509 (assoc-ref inputs "hdf5")))))
9510 (replace 'check
9511 (lambda* (#:key inputs #:allow-other-keys)
9512 (invoke "python" "setup.py" "check"
9513 (string-append "--hdf5="
9514 (assoc-ref inputs "hdf5"))))))))
9515 (propagated-inputs
9516 `(("python-numexpr" ,python-numexpr)
9517 ("python-numpy" ,python-numpy)))
9518 (native-inputs
9519 `(("python-cython" ,python-cython)
9520 ("pkg-config" ,pkg-config)))
9521 (inputs
9522 `(("hdf5" ,hdf5-1.10)
9523 ("bzip2" ,bzip2)
9524 ("zlib" ,zlib)))
9525 (home-page "https://www.pytables.org/")
9526 (synopsis "Hierarchical datasets for Python")
9527 (description "PyTables is a package for managing hierarchical datasets and
9528 designed to efficiently cope with extremely large amounts of data.")
9529 (license license:bsd-3)))
9530
9531 (define-public python2-tables
9532 (package-with-python2 python-tables))
9533
9534 (define-public python-sniffio
9535 (package
9536 (name "python-sniffio")
9537 (version "1.1.0")
9538 (source
9539 (origin
9540 (method url-fetch)
9541 (uri (pypi-uri "sniffio" version))
9542 (sha256
9543 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9544 (build-system python-build-system)
9545 (arguments
9546 `(#:phases
9547 (modify-phases %standard-phases
9548 (replace 'check
9549 (lambda _
9550 (invoke "pytest" "-vv"))))))
9551 (native-inputs
9552 `(("python-curio" ,python-curio)
9553 ("python-pytest" ,python-pytest)
9554 ("python-pytest-cov" ,python-pytest-cov)))
9555 (home-page "https://github.com/python-trio/sniffio")
9556 (synopsis "Detect which async library a program is running under")
9557 (description "This package detects which async library a program is
9558 running under. It supports multiple async I/O packages, like Trio, and
9559 asyncio.")
9560 ;; Either license applies.
9561 (license (list license:expat license:asl2.0))))
9562
9563 (define-public python-pytest-black
9564 (package
9565 (name "python-pytest-black")
9566 (version "0.3.8")
9567 (source
9568 (origin
9569 (method url-fetch)
9570 (uri (pypi-uri "pytest-black" version))
9571 (sha256
9572 (base32
9573 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9574 (build-system python-build-system)
9575 (propagated-inputs
9576 `(("python-pytest" ,python-pytest)
9577 ("python-black" ,python-black)
9578 ("python-toml" ,python-toml)))
9579 (native-inputs
9580 `(("python-setuptools-scm" ,python-setuptools-scm)))
9581 (home-page "https://github.com/shopkeep/pytest-black")
9582 (synopsis "Pytest plugin to enable format checking with black")
9583 (description
9584 "This package provides a pytest plugin to enable format checking with the
9585 Python code formatter \"black\".")
9586 (license license:expat)))
9587
9588 (define-public python-get-version
9589 (package
9590 (name "python-get-version")
9591 (version "2.1")
9592 (source
9593 (origin
9594 (method url-fetch)
9595 (uri (pypi-uri "get_version" version))
9596 (sha256
9597 (base32
9598 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9599 (build-system python-build-system)
9600 (propagated-inputs
9601 `(("python-pygments" ,python-pygments)
9602 ("python-pytest" ,python-pytest)
9603 ("python-pytest-black" ,python-pytest-black)
9604 ("python-pytest-cov" ,python-pytest-cov)
9605 ("python-setuptools" ,python-setuptools)
9606 ("python-testpath" ,python-testpath)))
9607 (home-page "https://github.com/flying-sheep/get_version")
9608 (synopsis "Version helper in the spirit of versioneer")
9609 (description
9610 "This package provides a version helper that lets you automatically use
9611 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9612 also supports getting the version from Python source distributions or, once
9613 your package is installed, via @code{pkg_resources} (part of
9614 @code{setuptools}).")
9615 (license license:gpl3+)))
9616
9617 (define-public python-legacy-api-wrap
9618 (package
9619 (name "python-legacy-api-wrap")
9620 (version "1.2")
9621 (source
9622 (origin
9623 (method url-fetch)
9624 (uri (pypi-uri "legacy-api-wrap" version))
9625 (sha256
9626 (base32
9627 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9628 (build-system python-build-system)
9629 (propagated-inputs
9630 `(("python-get-version" ,python-get-version)
9631 ("python-pytest" ,python-pytest)
9632 ("python-pytest-black" ,python-pytest-black)
9633 ("python-pytest-cov" ,python-pytest-cov)
9634 ("python-setuptools" ,python-setuptools)))
9635 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9636 (synopsis "Legacy API wrapper")
9637 (description "This module defines a decorator to wrap legacy APIs. The
9638 primary use case is APIs defined before keyword-only parameters existed.")
9639 (license license:gpl3+)))
9640
9641 (define-public python-pyasn1
9642 (package
9643 (name "python-pyasn1")
9644 (version "0.4.8")
9645 (source
9646 (origin
9647 (method url-fetch)
9648 (uri (pypi-uri "pyasn1" version))
9649 (sha256
9650 (base32
9651 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9652 (build-system python-build-system)
9653 (home-page "http://pyasn1.sourceforge.net/")
9654 (synopsis "ASN.1 types and codecs")
9655 (description
9656 "This is an implementation of ASN.1 types and codecs in Python. It is
9657 suitable for a wide range of protocols based on the ASN.1 specification.")
9658 (license license:bsd-2)))
9659
9660 (define-public python2-pyasn1
9661 (package-with-python2 python-pyasn1))
9662
9663 (define-public python-pyasn1-modules
9664 (package
9665 (name "python-pyasn1-modules")
9666 (version "0.2.2")
9667 (source
9668 (origin
9669 (method url-fetch)
9670 (uri (pypi-uri "pyasn1-modules" version))
9671 (sha256
9672 (base32
9673 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9674 (build-system python-build-system)
9675 (propagated-inputs
9676 `(("python-pyasn1" ,python-pyasn1)))
9677 (home-page "https://sourceforge.net/projects/pyasn1/")
9678 (synopsis "ASN.1 codec implementations")
9679 (description
9680 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9681 implementations of ASN.1-based codecs and protocols.")
9682 (license license:bsd-3)))
9683
9684 (define-public python2-pyasn1-modules
9685 (package-with-python2 python-pyasn1-modules))
9686
9687 (define-public python-ipaddress
9688 (package
9689 (name "python-ipaddress")
9690 (version "1.0.22")
9691 (source (origin
9692 (method url-fetch)
9693 (uri (pypi-uri "ipaddress" version))
9694 (sha256
9695 (base32
9696 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9697 (build-system python-build-system)
9698 (home-page "https://github.com/phihag/ipaddress")
9699 (synopsis "IP address manipulation library")
9700 (description
9701 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9702 in Python. This library is used to create, poke at, and manipulate IPv4 and
9703 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9704 module to older versions of Python.")
9705 (license license:psfl)))
9706
9707 (define-public python2-ipaddress
9708 (package-with-python2 python-ipaddress))
9709
9710 (define-public python2-ipaddr
9711 (package
9712 (name "python2-ipaddr")
9713 (version "2.1.11")
9714 (source
9715 (origin
9716 (method url-fetch)
9717 (uri (pypi-uri "ipaddr" version))
9718 (sha256
9719 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9720 (build-system python-build-system)
9721 (arguments
9722 `(#:python ,python-2 ;version 2 only
9723 #:phases
9724 (modify-phases %standard-phases
9725 (replace 'check
9726 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9727 (home-page "https://github.com/google/ipaddr-py")
9728 (synopsis "IP address manipulation library")
9729 (description
9730 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9731 IPv6 addresses and networks.
9732
9733 For new implementations you may prefer to use the standard module
9734 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9735 versions of Python.")
9736 (license license:asl2.0)))
9737
9738 (define-public python-idna
9739 (package
9740 (name "python-idna")
9741 (version "2.10")
9742 (source
9743 (origin
9744 (method url-fetch)
9745 (uri (pypi-uri "idna" version))
9746 (sha256
9747 (base32
9748 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9749 (build-system python-build-system)
9750 (home-page "https://github.com/kjd/idna")
9751 (synopsis "Internationalized domain names in applications")
9752 (description
9753 "This is a library to support the Internationalised Domain Names in
9754 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9755 protocol is often referred to as “IDNA2008” and can produce different results
9756 from the earlier standard from 2003. The library is also intended to act as a
9757 suitable drop-in replacement for the “encodings.idna” module that comes with
9758 the Python standard library but currently only supports the older 2003
9759 specification.")
9760 (license license:bsd-4)))
9761
9762 (define-public python-idna-2.7
9763 (package (inherit python-idna)
9764 (version "2.7")
9765 (source (origin
9766 (method url-fetch)
9767 (uri (pypi-uri "idna" version))
9768 (sha256
9769 (base32
9770 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9771
9772
9773 (define-public python2-idna
9774 (package-with-python2 python-idna))
9775
9776 (define-public python-libsass
9777 (package
9778 (name "python-libsass")
9779 (version "0.20.1")
9780 (source
9781 (origin
9782 ;; PyPI tarball is missing some test files.
9783 (method git-fetch)
9784 (uri (git-reference
9785 (url "https://github.com/sass/libsass-python")
9786 (commit version)))
9787 (file-name (git-file-name name version))
9788 (sha256
9789 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9790 (build-system python-build-system)
9791 (arguments
9792 `(#:phases
9793 (modify-phases %standard-phases
9794 ;; Use Guix package of libsass instead of compiling from a checkout.
9795 (add-before 'build 'set-libsass
9796 (lambda _
9797 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9798 #t))
9799 (replace 'check
9800 (lambda* (#:key inputs outputs #:allow-other-keys)
9801 (add-installed-pythonpath inputs outputs)
9802 (invoke "pytest" "sasstests.py"))))))
9803 (native-inputs
9804 `(("python-pytest" ,python-pytest)
9805 ("python-werkzeug" ,python-werkzeug)))
9806 (inputs
9807 `(("libsass" ,libsass)))
9808 (propagated-inputs
9809 `(("python-six" ,python-six)))
9810 (home-page "https://sass.github.io/libsass-python/")
9811 (synopsis "Straightforward binding of libsass for Python")
9812 (description
9813 "This package provides a simple Python extension module @code{sass} which
9814 is binding LibSass.")
9815 (license license:expat)))
9816
9817 (define-public python-idna-ssl
9818 (package
9819 (name "python-idna-ssl")
9820 (version "1.0.1")
9821 (source
9822 (origin
9823 (method url-fetch)
9824 (uri (pypi-uri "idna-ssl" version))
9825 (sha256
9826 (base32
9827 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9828 (build-system python-build-system)
9829 (arguments
9830 `(#:tests? #f)) ;circular dependency with python-aiohttp
9831 (home-page "https://github.com/aio-libs/idna-ssl")
9832 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9833 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9834 domains support.")
9835 (license license:expat)))
9836
9837 (define-public python-pretend
9838 (package
9839 (name "python-pretend")
9840 (version "1.0.9")
9841 (source
9842 (origin
9843 (method url-fetch)
9844 (uri (pypi-uri "pretend" version))
9845 (sha256
9846 (base32
9847 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9848 (build-system python-build-system)
9849 (home-page "https://github.com/alex/pretend")
9850 (synopsis "Library for stubbing in Python")
9851 (description
9852 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9853 technique for writing tests. You may hear the term mixed up with mocks,
9854 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9855 responses, rather than doing any computation.")
9856 (license license:bsd-3)))
9857
9858 (define-public python2-pretend
9859 (package-with-python2 python-pretend))
9860
9861 (define-public python-pip
9862 (package
9863 (name "python-pip")
9864 (version "20.2.4")
9865 (source
9866 (origin
9867 (method url-fetch)
9868 (uri (pypi-uri "pip" version))
9869 (sha256
9870 (base32
9871 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
9872 (build-system python-build-system)
9873 (arguments
9874 '(#:tests? #f)) ; there are no tests in the pypi archive.
9875 (home-page "https://pip.pypa.io/")
9876 (synopsis "Package manager for Python software")
9877 (description
9878 "Pip is a package manager for Python software, that finds packages on the
9879 Python Package Index (PyPI).")
9880 (license license:expat)))
9881
9882 (define-public python2-pip
9883 (package-with-python2 python-pip))
9884
9885 (define-public python-tlsh
9886 (package
9887 (name "python-tlsh")
9888 (version "3.4.5")
9889 (home-page "https://github.com/trendmicro/tlsh")
9890 (source
9891 (origin
9892 (method git-fetch)
9893 (uri (git-reference
9894 (url "https://github.com/trendmicro/tlsh")
9895 (commit (string-append "v" version))))
9896 (file-name (git-file-name name version))
9897 (sha256
9898 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9899 (build-system cmake-build-system)
9900 (arguments
9901 '(#:out-of-source? #f
9902 #:phases (modify-phases %standard-phases
9903 (replace
9904 'install
9905 (lambda* (#:key outputs #:allow-other-keys)
9906 ;; Build and install the Python bindings. The underlying
9907 ;; C++ library is apparently not meant to be installed.
9908 (let ((out (assoc-ref outputs "out")))
9909 (with-directory-excursion "py_ext"
9910 (and (system* "python" "setup.py" "build")
9911 (system* "python" "setup.py" "install"
9912 (string-append "--prefix=" out))))))))))
9913 (inputs `(("python" ,python-wrapper))) ;for the bindings
9914 (synopsis "Fuzzy matching library for Python")
9915 (description
9916 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9917 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9918 value which can be used for similarity comparisons. Similar objects have
9919 similar hash values, which allows for the detection of similar objects by
9920 comparing their hash values. The byte stream should have a sufficient amount
9921 of complexity; for example, a byte stream of identical bytes will not generate
9922 a hash value.")
9923 (license license:asl2.0)))
9924
9925 (define-public python2-tlsh
9926 (package/inherit python-tlsh
9927 (name "python2-tlsh")
9928 (inputs `(("python" ,python-2)))))
9929
9930 (define-public python-termcolor
9931 (package
9932 (name "python-termcolor")
9933 (version "1.1.0")
9934 (source
9935 (origin
9936 (method url-fetch)
9937 (uri (pypi-uri "termcolor" version))
9938 (sha256
9939 (base32
9940 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9941 (build-system python-build-system)
9942 (arguments
9943 ;; There are no tests.
9944 `(#:tests? #f))
9945 (home-page "https://pypi.org/project/termcolor/")
9946 (synopsis "ANSII Color formatting for terminal output")
9947 (description
9948 "This package provides ANSII Color formatting for output in terminals.")
9949 (license license:expat)))
9950
9951 (define-public python2-termcolor
9952 (package-with-python2 python-termcolor))
9953
9954 (define-public python-terminaltables
9955 (package
9956 (name "python-terminaltables")
9957 (version "3.1.0")
9958 (source
9959 (origin
9960 (method url-fetch)
9961 (uri (pypi-uri "terminaltables" version))
9962 (sha256
9963 (base32
9964 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9965 (build-system python-build-system)
9966 (home-page "https://github.com/Robpol86/terminaltables")
9967 (synopsis
9968 "Generate simple tables in terminals from a nested list of strings")
9969 (description
9970 "This package makes it easy to draw tables in terminal/console
9971 applications from a list of lists of strings. It supports multi-line rows.")
9972 (license license:expat)))
9973
9974 (define-public python-libarchive-c
9975 (package
9976 (name "python-libarchive-c")
9977 (version "2.9")
9978 (source (origin
9979 (method url-fetch)
9980 (uri (pypi-uri "libarchive-c" version))
9981 (sha256
9982 (base32
9983 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9984 (build-system python-build-system)
9985 (arguments
9986 '(#:phases (modify-phases %standard-phases
9987 (add-before
9988 'build 'reference-libarchive
9989 (lambda* (#:key inputs #:allow-other-keys)
9990 ;; Retain the absolute file name of libarchive.so.
9991 (let ((libarchive (assoc-ref inputs "libarchive")))
9992 (substitute* "libarchive/ffi.py"
9993 (("find_library\\('archive'\\)")
9994 (string-append "'" libarchive
9995 "/lib/libarchive.so'"))))))
9996 (replace 'check
9997 (lambda _ (invoke "pytest" "-vv"))))))
9998 (native-inputs
9999 `(("python-mock" ,python-mock)
10000 ("python-pytest" ,python-pytest)))
10001 (inputs
10002 `(("libarchive" ,libarchive)))
10003 (home-page "https://github.com/Changaco/python-libarchive-c")
10004 (synopsis "Python interface to libarchive")
10005 (description
10006 "This package provides Python bindings to libarchive, a C library to
10007 access possibly compressed archives in many different formats. It uses
10008 Python's @code{ctypes} foreign function interface (FFI).")
10009 (license license:lgpl2.0+)))
10010
10011 (define-public python2-libarchive-c
10012 (package-with-python2 python-libarchive-c))
10013
10014 (define-public python-file
10015 (package/inherit file
10016 (name "python-file")
10017 (build-system python-build-system)
10018 (arguments
10019 '(#:tests? #f ;no tests
10020 #:configure-flags '("--single-version-externally-managed" "--root=/")
10021 #:phases (modify-phases %standard-phases
10022 (add-before 'build 'change-directory
10023 (lambda _
10024 (chdir "python")
10025 #t))
10026 (add-before 'build 'set-library-file-name
10027 (lambda* (#:key inputs #:allow-other-keys)
10028 (let ((file (assoc-ref inputs "file")))
10029 (substitute* "magic.py"
10030 (("find_library\\('magic'\\)")
10031 (string-append "'" file "/lib/libmagic.so'")))
10032 #t))))))
10033 (inputs `(("file" ,file)))
10034 (native-inputs (if (%current-target-system)
10035 `(("self" ,this-package))
10036 '()))
10037 (synopsis "Python bindings to the libmagic file type guesser")
10038 (description "This package provides Python bindings to the libmagic file
10039 type guesser.
10040
10041 Note that this module and the @code{python-magic} module both provide a
10042 @file{magic.py} file; these two modules, which are different and were
10043 developed separately, both serve the same purpose: provide Python bindings for
10044 libmagic.")))
10045
10046 (define-public python2-file
10047 (package-with-python2 python-file))
10048
10049 (define-public python-debian
10050 (package
10051 (name "python-debian")
10052 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
10053 (version "0.1.36")
10054 (source
10055 (origin
10056 ;; Use git-fetch, as pypi doesn't include test suite.
10057 (method git-fetch)
10058 (uri (git-reference
10059 (url home-page)
10060 (commit version)))
10061 (file-name (git-file-name name version))
10062 (sha256
10063 (base32
10064 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
10065 (build-system python-build-system)
10066 (arguments
10067 `(#:phases (modify-phases %standard-phases
10068 (add-after 'unpack 'remove-debian-specific-tests
10069 ;; python-apt, apt and dpkg are not yet available in guix,
10070 ;; and these tests heavily depend on them.
10071 (lambda _
10072 (delete-file "lib/debian/tests/test_deb822.py")
10073 (delete-file "lib/debian/tests/test_debfile.py")
10074 #t)))))
10075 (propagated-inputs
10076 `(("python-six" ,python-six)
10077 ("python-chardet" ,python-chardet)))
10078 (synopsis "Debian package related modules")
10079 (description
10080 ;; XXX: Use @enumerate instead of @itemize to work around
10081 ;; <http://bugs.gnu.org/21772>.
10082 "This package provides Python modules that abstract many formats of
10083 Debian-related files, such as:
10084
10085 @enumerate
10086 @item Debtags information;
10087 @item @file{debian/changelog} files;
10088 @item packages files, pdiffs;
10089 @item control files of single or multiple RFC822-style paragraphs---e.g.
10090 @file{debian/control}, @file{.changes}, @file{.dsc};
10091 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
10092 contained files and meta-information.
10093 @end enumerate\n")
10094
10095 ;; Modules are either GPLv2+ or GPLv3+.
10096 (license license:gpl3+)))
10097
10098 (define-public python-nbformat
10099 (package
10100 (name "python-nbformat")
10101 (version "4.4.0")
10102 (source
10103 (origin
10104 (method url-fetch)
10105 (uri (pypi-uri "nbformat" version))
10106 (sha256
10107 (base32
10108 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
10109 (build-system python-build-system)
10110 (arguments `(#:tests? #f)) ; no test target
10111 (propagated-inputs
10112 `(("python-ipython-genutils" ,python-ipython-genutils)
10113 ("python-jsonschema" ,python-jsonschema)
10114 ("python-jupyter-core" ,python-jupyter-core)
10115 ("python-traitlets" ,python-traitlets)))
10116 (home-page "https://jupyter.org")
10117 (synopsis "Jupyter Notebook format")
10118 (description "This package provides the reference implementation of the
10119 Jupyter Notebook format and Python APIs for working with notebooks.")
10120 (license license:bsd-3)))
10121
10122 (define-public python2-nbformat
10123 (package-with-python2 python-nbformat))
10124
10125 (define-public python-bleach
10126 (package
10127 (name "python-bleach")
10128 (version "3.1.5")
10129 (source
10130 (origin
10131 (method url-fetch)
10132 (uri (pypi-uri "bleach" version))
10133 (sha256
10134 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
10135 (build-system python-build-system)
10136 (propagated-inputs
10137 `(("python-webencodings" ,python-webencodings)
10138 ("python-six" ,python-six)))
10139 (native-inputs
10140 `(("python-datrie" ,python-datrie)
10141 ("python-genshi" ,python-genshi)
10142 ("python-lxml" ,python-lxml)
10143 ("python-pytest" ,python-pytest)))
10144 (home-page "https://github.com/mozilla/bleach")
10145 (synopsis "Whitelist-based HTML-sanitizing tool")
10146 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
10147 (license license:asl2.0)))
10148
10149 (define-public python2-bleach
10150 (package-with-python2 python-bleach))
10151
10152 (define-public python-entrypoints
10153 (package
10154 (name "python-entrypoints")
10155 (version "0.3")
10156 (source
10157 (origin
10158 (method url-fetch)
10159 (uri (pypi-uri "entrypoints" version))
10160 (sha256
10161 (base32
10162 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
10163 (build-system python-build-system)
10164 ;; The package does not come with a setup.py file, so we have to generate
10165 ;; one ourselves.
10166 (arguments
10167 `(#:tests? #f
10168 #:phases
10169 (modify-phases %standard-phases
10170 (add-after 'unpack 'create-setup.py
10171 (lambda _
10172 (call-with-output-file "setup.py"
10173 (lambda (port)
10174 (format port "\
10175 from setuptools import setup
10176 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
10177 " ,version))))))))
10178 (home-page "https://github.com/takluyver/entrypoints")
10179 (synopsis "Discover and load entry points from installed Python packages")
10180 (description "Entry points are a way for Python packages to advertise
10181 objects with some common interface. The most common examples are
10182 @code{console_scripts} entry points, which define shell commands by
10183 identifying a Python function to run. The @code{entrypoints} module contains
10184 functions to find and load entry points.")
10185 (license license:expat)))
10186
10187 (define-public python2-entrypoints
10188 (package-with-python2 python-entrypoints))
10189
10190 (define-public python-epc
10191 (package
10192 (name "python-epc")
10193 (version "0.0.5")
10194 (source
10195 (origin
10196 (method url-fetch)
10197 (uri (pypi-uri "epc" version))
10198 (sha256
10199 (base32
10200 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
10201 (build-system python-build-system)
10202 (propagated-inputs
10203 `(("python-sexpdata" ,python-sexpdata)))
10204 (native-inputs
10205 `(("python-nose" ,python-nose)))
10206 (home-page "https://github.com/tkf/python-epc")
10207 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
10208 (description
10209 "Python-EPC can call elisp functions from Python and Python functions
10210 from elisp.")
10211 (license license:gpl3)))
10212
10213 (define-public python-forex-python
10214 (package
10215 (name "python-forex-python")
10216 (version "1.5")
10217 (source
10218 (origin
10219 (method url-fetch)
10220 (uri (pypi-uri "forex-python" version))
10221 (sha256
10222 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
10223 (build-system python-build-system)
10224 (arguments
10225 ;; Tests are not included in the PyPI tarball. Also, the tests in the
10226 ;; repository require online data.
10227 `(#:tests? #f))
10228 (propagated-inputs
10229 `(("python-requests" ,python-requests)
10230 ("python-simplejson" ,python-simplejson)))
10231 (home-page "https://github.com/MicroPyramid/forex-python")
10232 (synopsis "Foreign exchange rates and currency conversion")
10233 (description
10234 "@code{python-forex-python} can be used to manipulate foreign
10235 exchange rates and to operate currency conversions.
10236
10237 Features:
10238 @itemize
10239 @item List all currency rates.
10240 @item BitCoin price for all currencies.
10241 @item Converting amount to BitCoins.
10242 @item Get historical rates for any day since 1999.
10243 @item Conversion rate for one currency(ex; USD to INR).
10244 @item Convert amount from one currency to other.('USD 10$' to INR).
10245 @item Currency symbols.
10246 @item Currency names.
10247 @end itemize")
10248 (license license:expat)))
10249
10250 (define-public python-simpleeval
10251 (package
10252 (name "python-simpleeval")
10253 (version "0.9.10")
10254 (source
10255 (origin
10256 (method url-fetch)
10257 (uri (pypi-uri "simpleeval" version))
10258 (sha256
10259 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
10260 (build-system python-build-system)
10261 (home-page "https://github.com/danthedeckie/simpleeval")
10262 (synopsis "Simple, safe single expression evaluator library")
10263 (description
10264 "This package provides a quick single file library for easily adding
10265 evaluatable expressions into python projects. Say you want to allow a user
10266 to set an alarm volume, which could depend on the time of day, alarm level,
10267 how many previous alarms had gone off, and if there is music playing at the
10268 time.")
10269 (license license:expat)))
10270
10271 (define-public python-nbconvert
10272 (package
10273 (name "python-nbconvert")
10274 (version "5.0.0b1")
10275 (source
10276 (origin
10277 (method url-fetch)
10278 (uri (pypi-uri "nbconvert" version))
10279 (sha256
10280 (base32
10281 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
10282 (build-system python-build-system)
10283 (arguments
10284 `(;; The "bdist_egg" target is disabled by default, causing the installation
10285 ;; to fail.
10286 #:configure-flags (list "bdist_egg")
10287 ;; FIXME: 5 failures, 40 errors.
10288 #:tests? #f))
10289 ;; #:phases
10290 ;; (modify-phases %standard-phases
10291 ;; (replace 'check
10292 ;; (lambda _
10293 ;; (zero? (system* "py.test" "-v")))))
10294 (native-inputs
10295 `(("python-pytest" ,python-pytest)))
10296 (propagated-inputs
10297 `(("python-bleach" ,python-bleach)
10298 ("python-entrypoints" ,python-entrypoints)
10299 ("python-jinja2" ,python-jinja2)
10300 ("python-jupyter-core" ,python-jupyter-core)
10301 ("python-mistune" ,python-mistune)
10302 ("python-nbformat" ,python-nbformat)
10303 ("python-pygments" ,python-pygments)
10304 ("python-traitlets" ,python-traitlets)))
10305 (home-page "https://jupyter.org")
10306 (synopsis "Converting Jupyter Notebooks")
10307 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
10308 notebooks to various other formats via Jinja templates. It allows you to
10309 convert an @code{.ipynb} notebook file into various static formats including:
10310
10311 @enumerate
10312 @item HTML
10313 @item LaTeX
10314 @item PDF
10315 @item Reveal JS
10316 @item Markdown (md)
10317 @item ReStructured Text (rst)
10318 @item executable script
10319 @end enumerate\n")
10320 (license license:bsd-3)))
10321
10322 (define-public python2-nbconvert
10323 (package-with-python2 python-nbconvert))
10324
10325 (define-public python-notebook
10326 (package
10327 (name "python-notebook")
10328 (version "5.7.4")
10329 (source (origin
10330 (method url-fetch)
10331 (uri (pypi-uri "notebook" version))
10332 (sha256
10333 (base32
10334 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
10335 (build-system python-build-system)
10336 (arguments
10337 `(#:phases
10338 (modify-phases %standard-phases
10339 (replace 'check
10340 (lambda _
10341 ;; These tests require a browser
10342 (delete-file-recursively "notebook/tests/selenium")
10343 ;; Some tests need HOME
10344 (setenv "HOME" "/tmp")
10345 ;; This file contains "warningfilters", which are not supported
10346 ;; by this version of nose.
10347 (delete-file "setup.cfg")
10348 (with-directory-excursion "/tmp"
10349 (invoke "nosetests" "-v"))
10350 #t)))))
10351 (propagated-inputs
10352 `(("python-jupyter-core" ,python-jupyter-core)
10353 ("python-nbformat" ,python-nbformat)
10354 ("python-nbconvert" ,python-nbconvert)
10355 ("python-prometheus-client" ,python-prometheus-client)
10356 ("python-send2trash" ,python-send2trash)
10357 ("python-terminado" ,python-terminado)))
10358 (native-inputs
10359 `(("python-nose" ,python-nose)
10360 ("python-sphinx" ,python-sphinx)
10361 ("python-requests" ,python-requests)))
10362 (home-page "https://jupyter.org/")
10363 (synopsis "Web-based notebook environment for interactive computing")
10364 (description
10365 "The Jupyter HTML notebook is a web-based notebook environment for
10366 interactive computing.")
10367 (properties `((python2-variant . ,(delay python2-notebook))))
10368 (license license:bsd-3)))
10369
10370 (define-public python2-notebook
10371 (let ((base (package-with-python2
10372 (strip-python2-variant python-notebook))))
10373 (package/inherit base
10374 (native-inputs
10375 `(("python2-mock" ,python2-mock)
10376 ,@(package-native-inputs base)))
10377 (arguments
10378 (substitute-keyword-arguments (package-arguments base)
10379 ((#:phases phases)
10380 `(modify-phases ,phases
10381 (add-before 'check 'disable-test-case
10382 ;; The test requires network access to localhost. Curiously it
10383 ;; fails with Python 2 only. Simply make the test-case return
10384 ;; immediately.
10385 (lambda _
10386 (substitute*
10387 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
10388 (("formats = self.nbconvert_api") "return #")))))))))))
10389
10390 (define-public python-widgetsnbextension
10391 (package
10392 (name "python-widgetsnbextension")
10393 (version "3.5.1")
10394 (source
10395 (origin
10396 (method url-fetch)
10397 (uri (pypi-uri "widgetsnbextension" version))
10398 (sha256
10399 (base32
10400 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10401 (build-system python-build-system)
10402 (propagated-inputs
10403 `(("python-ipykernel" ,python-ipykernel)
10404 ("python-notebook" ,python-notebook)))
10405 (native-inputs
10406 `(("python-certifi" ,python-certifi)
10407 ("python-nose" ,python-nose)))
10408 (home-page "https://ipython.org")
10409 (synopsis "IPython HTML widgets for Jupyter")
10410 (description "This package provides interactive HTML widgets for Jupyter
10411 notebooks.")
10412 (license license:bsd-3)))
10413
10414 (define-public python2-widgetsnbextension
10415 (package-with-python2 python-widgetsnbextension))
10416
10417 (define-public python-ipywidgets
10418 (package
10419 (name "python-ipywidgets")
10420 (version "7.5.1")
10421 (source
10422 (origin
10423 (method url-fetch)
10424 (uri (pypi-uri "ipywidgets" version))
10425 (sha256
10426 (base32
10427 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10428 (build-system python-build-system)
10429 (propagated-inputs
10430 `(("python-ipython" ,python-ipython)
10431 ("python-traitlets" ,python-traitlets)
10432 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10433 (native-inputs
10434 `(("python-nose" ,python-nose)
10435 ("python-pytest" ,python-pytest)))
10436 (home-page "https://ipython.org")
10437 (synopsis "IPython HTML widgets for Jupyter")
10438 (description "Ipywidgets are interactive HTML widgets for Jupyter
10439 notebooks and the IPython kernel. Notebooks come alive when interactive
10440 widgets are used. Users gain control of their data and can visualize changes
10441 in the data.")
10442 (license license:bsd-3)))
10443
10444 (define-public python-jupyter-console
10445 (package
10446 (name "python-jupyter-console")
10447 (version "6.1.0")
10448 (source
10449 (origin
10450 (method url-fetch)
10451 (uri (pypi-uri "jupyter_console" version))
10452 (sha256
10453 (base32
10454 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10455 (build-system python-build-system)
10456 (propagated-inputs
10457 `(("python-ipykernel" ,python-ipykernel)
10458 ("python-jupyter-client" ,python-jupyter-client)
10459 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10460 ("python-pygments" ,python-pygments)))
10461 (native-inputs
10462 `(("python-nose" ,python-nose)))
10463 (home-page "https://jupyter.org")
10464 (synopsis "Jupyter terminal console")
10465 (description "This package provides a terminal-based console frontend for
10466 Jupyter kernels. It also allows for console-based interaction with non-Python
10467 Jupyter kernels such as IJulia and IRKernel.")
10468 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10469 (license license:bsd-3)))
10470
10471 (define-public python2-jupyter-console
10472 (package
10473 (name "python2-jupyter-console")
10474 (version "5.2.0")
10475 (source
10476 (origin
10477 (method url-fetch)
10478 (uri (pypi-uri "jupyter_console" version))
10479 (sha256
10480 (base32
10481 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10482 (build-system python-build-system)
10483 (arguments
10484 `(#:python ,python-2
10485 #:tests? #f)) ; Tests only run in a TTY.
10486 (propagated-inputs
10487 `(("python2-ipykernel" ,python2-ipykernel)
10488 ("python2-jupyter-client" ,python2-jupyter-client)
10489 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10490 ("python2-pygments" ,python2-pygments)))
10491 (native-inputs
10492 `(("python2-nose" ,python2-nose)))
10493 (home-page "https://jupyter.org")
10494 (synopsis "Jupyter terminal console")
10495 (description "This package provides a terminal-based console frontend for
10496 Jupyter kernels. It also allows for console-based interaction with non-Python
10497 Jupyter kernels such as IJulia and IRKernel.")
10498 (license license:bsd-3)))
10499
10500 ;; The python-ipython and python-jupyter-console require each other. To get
10501 ;; the functionality in both packages working, strip down the
10502 ;; python-jupyter-console package when using it as an input to python-ipython.
10503 (define python-jupyter-console-minimal
10504 (package/inherit python-jupyter-console
10505 (name "python-jupyter-console-minimal")
10506 (arguments
10507 (substitute-keyword-arguments
10508 (package-arguments python-jupyter-console)
10509 ((#:phases phases)
10510 `(modify-phases ,phases
10511 (add-after 'install 'delete-bin
10512 (lambda* (#:key outputs #:allow-other-keys)
10513 ;; Delete the bin files, to avoid conflicts in profiles
10514 ;; where python-ipython and python-jupyter-console are
10515 ;; both present.
10516 (delete-file-recursively
10517 (string-append
10518 (assoc-ref outputs "out") "/bin"))))))))
10519 ;; Remove the python-ipython propagated input, to avoid the cycle
10520 (propagated-inputs
10521 (alist-delete
10522 "python-ipython"
10523 (package-propagated-inputs python-jupyter-console)))))
10524
10525 (define-public python-qtconsole
10526 (package
10527 (name "python-qtconsole")
10528 (version "4.4.3")
10529 (source
10530 (origin
10531 (method url-fetch)
10532 (uri (pypi-uri "qtconsole" version))
10533 (sha256
10534 (base32
10535 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10536 (build-system python-build-system)
10537 (arguments
10538 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10539 ;; but we only have the LTS version 5.x. This means that there might be
10540 ;; runtime errors, but since this is a dependency of the Jupyter package,
10541 ;; and Jupyter can be used without the qtconsole we can overlook this for
10542 ;; now.
10543 `(#:tests? #f
10544 #:phases
10545 (modify-phases %standard-phases
10546 (add-before 'check 'pre-check
10547 (lambda _
10548 (setenv "QT_QPA_PLATFORM" "offscreen")
10549 #t)))))
10550 (propagated-inputs
10551 `(("python-ipykernel" ,python-ipykernel)
10552 ("python-ipython" ,python-ipython)))
10553 (native-inputs
10554 `(("python-pytest" ,python-pytest)))
10555 (home-page "https://jupyter.org")
10556 (synopsis "Jupyter Qt console")
10557 (description "This package provides a Qt-based console for Jupyter with
10558 support for rich media output.")
10559 (license license:bsd-3)))
10560
10561 (define-public python-jsbeautifier
10562 (package
10563 (name "python-jsbeautifier")
10564 (version "1.10.2")
10565 (home-page "https://github.com/beautify-web/js-beautify")
10566 (source (origin
10567 (method git-fetch)
10568 (uri (git-reference
10569 (url home-page)
10570 (commit (string-append "v" version))))
10571 (file-name (git-file-name name version))
10572 (sha256
10573 (base32
10574 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10575 (build-system python-build-system)
10576 (arguments
10577 `(#:phases (modify-phases %standard-phases
10578 (add-after 'unpack 'chdir
10579 (lambda _
10580 ;; The upstream Git repository contains all the code,
10581 ;; but this package only builds the python code.
10582 (chdir "python")
10583 #t))
10584 (add-after 'unpack 'patch-python-six-requirements
10585 (lambda _
10586 (substitute* "python/setup.py"
10587 (("six>=1.12.0")
10588 "six>=1.11.0"))
10589 #t)))))
10590 (propagated-inputs
10591 `(("python-editorconfig" ,python-editorconfig)
10592 ("python-six" ,python-six)))
10593 (native-inputs
10594 `(("python-pytest" ,python-pytest)))
10595 (synopsis "JavaScript unobfuscator and beautifier")
10596 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10597 popular online obfuscators.")
10598 (license license:expat)))
10599
10600 (define-public jupyter
10601 (package
10602 (name "jupyter")
10603 (version "1.0.0")
10604 (source
10605 (origin
10606 (method url-fetch)
10607 (uri (pypi-uri "jupyter" version))
10608 (sha256
10609 (base32
10610 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10611 (build-system python-build-system)
10612 (arguments '(#:tests? #f)) ; there are none.
10613 (propagated-inputs
10614 `(("python-ipykernel" ,python-ipykernel)
10615 ("python-ipywidgets" ,python-ipywidgets)
10616 ("python-jupyter-console" ,python-jupyter-console)
10617 ("python-nbconvert" ,python-nbconvert)
10618 ("python-notebook" ,python-notebook)
10619 ("python-qtconsole" ,python-qtconsole)))
10620 (native-search-paths
10621 (list (search-path-specification
10622 (variable "JUPYTER_PATH")
10623 (files '("share/jupyter")))))
10624 (home-page "https://jupyter.org")
10625 (synopsis "Web application for interactive documents")
10626 (description
10627 "The Jupyter Notebook is a web application that allows you to create and
10628 share documents that contain live code, equations, visualizations and
10629 explanatory text. Uses include: data cleaning and transformation, numerical
10630 simulation, statistical modeling, machine learning and much more.")
10631 (license license:bsd-3)))
10632
10633 (define-public python-chardet
10634 (package
10635 (name "python-chardet")
10636 (version "3.0.4")
10637 (source
10638 (origin
10639 (method url-fetch)
10640 (uri (pypi-uri "chardet" version))
10641 (sha256
10642 (base32
10643 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10644 (native-inputs
10645 `(("python-hypothesis" ,python-hypothesis)
10646 ("python-pytest" ,python-pytest)
10647 ("python-pytest-runner" ,python-pytest-runner)))
10648 (build-system python-build-system)
10649 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10650 (arguments `(#:tests? #f))
10651 (home-page "https://github.com/chardet/chardet")
10652 (synopsis "Universal encoding detector for Python 2 and 3")
10653 (description
10654 "This package provides @code{chardet}, a Python module that can
10655 automatically detect a wide range of file encodings.")
10656 (license license:lgpl2.1+)))
10657
10658 (define-public python2-chardet
10659 (package-with-python2 python-chardet))
10660
10661 (define-public python-docopt
10662 (package
10663 (name "python-docopt")
10664 (version "0.6.2")
10665 (source
10666 (origin
10667 (method git-fetch)
10668 ;; The release on PyPI does not include tests.
10669 (uri (git-reference
10670 (url "https://github.com/docopt/docopt")
10671 (commit version)))
10672 (file-name (git-file-name name version))
10673 (sha256
10674 (base32
10675 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10676 (build-system python-build-system)
10677 (native-inputs
10678 `(("python-pytest" ,python-pytest)))
10679 (arguments
10680 `(#:phases
10681 (modify-phases %standard-phases
10682 (replace 'check
10683 (lambda _ (invoke "py.test"))))))
10684 (home-page "http://docopt.org")
10685 (synopsis "Command-line interface description language for Python")
10686 (description "This library allows the user to define a command-line
10687 interface from a program's help message rather than specifying it
10688 programmatically with command-line parsers like @code{getopt} and
10689 @code{argparse}.")
10690 (license license:expat)))
10691
10692 (define-public python2-docopt
10693 (package-with-python2 python-docopt))
10694
10695 (define-public python-pythondialog
10696 (package
10697 (name "python-pythondialog")
10698 (version "3.4.0")
10699 (source
10700 (origin
10701 (method url-fetch)
10702 (uri (pypi-uri "pythondialog" version))
10703 (sha256
10704 (base32
10705 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10706 (build-system python-build-system)
10707 (arguments
10708 `(#:phases
10709 (modify-phases %standard-phases
10710 (add-after 'unpack 'patch-path
10711 (lambda* (#:key inputs #:allow-other-keys)
10712 (let* ((dialog (assoc-ref inputs "dialog")))
10713 ;; Since this library really wants to grovel the search path, we
10714 ;; must hardcode dialog's store path into it.
10715 (substitute* "dialog.py"
10716 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10717 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10718 #t))))
10719 #:tests? #f)) ; no test suite
10720 (propagated-inputs
10721 `(("dialog" ,dialog)))
10722 (home-page "http://pythondialog.sourceforge.net/")
10723 (synopsis "Python interface to the UNIX dialog utility")
10724 (description "A Python wrapper for the dialog utility. Its purpose is to
10725 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10726 This allows one to make simple text-mode user interfaces on Unix-like systems")
10727 (license license:lgpl2.1)
10728 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10729
10730 (define-public python2-pythondialog
10731 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10732 (package
10733 (inherit base)
10734 (version (package-version python-pythondialog))
10735 (source (origin
10736 (method url-fetch)
10737 (uri (pypi-uri "python2-pythondialog" version))
10738 (sha256
10739 (base32
10740 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10741
10742 (define-public python-configobj
10743 (package
10744 (name "python-configobj")
10745 (version "5.0.6")
10746 (source (origin
10747 (method url-fetch)
10748 (uri (pypi-uri "configobj" version))
10749 (sha256
10750 (base32
10751 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10752 ;; Patch setup.py so it looks for python-setuptools, which is
10753 ;; required to parse the keyword 'install_requires' in setup.py.
10754 (patches (search-patches "python-configobj-setuptools.patch"))))
10755 (build-system python-build-system)
10756 (propagated-inputs
10757 `(("python-six" ,python-six)))
10758 (synopsis "Config file reading, writing and validation")
10759 (description "ConfigObj is a simple but powerful config file reader and
10760 writer: an ini file round tripper. Its main feature is that it is very easy to
10761 use, with a straightforward programmer’s interface and a simple syntax for
10762 config files.")
10763 (home-page "https://github.com/DiffSK/configobj")
10764 (license license:bsd-3)))
10765
10766 (define-public python2-configobj
10767 (package-with-python2 python-configobj))
10768
10769 (define-public python-configargparse
10770 (package
10771 (name "python-configargparse")
10772 (version "1.2.3")
10773 (source (origin
10774 (method url-fetch)
10775 (uri (pypi-uri "ConfigArgParse" version))
10776 (sha256
10777 (base32
10778 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
10779 (build-system python-build-system)
10780 (native-inputs
10781 `(("python-pyyaml" ,python-pyyaml)))
10782 (arguments
10783 `(#:phases
10784 (modify-phases %standard-phases
10785 (replace 'check
10786 (lambda _
10787 ;; Bypass setuptools-shim because one test relies on "setup.py"
10788 ;; being the first argument passed to the python call.
10789 ;;
10790 ;; NOTE: Many tests do not run because they rely on Python's
10791 ;; built-in test.test_argparse, but we remove the unit tests from
10792 ;; our Python installation.
10793 (invoke "python" "setup.py" "test"))))))
10794 (synopsis "Replacement for argparse")
10795 (description "A drop-in replacement for argparse that allows options to also
10796 be set via config files and/or environment variables.")
10797 (home-page "https://github.com/bw2/ConfigArgParse")
10798 (license license:expat)))
10799
10800 (define-public python-argparse-manpage
10801 (package
10802 (name "python-argparse-manpage")
10803 (version "1.1")
10804 (source
10805 (origin
10806 (method url-fetch)
10807 (uri (pypi-uri "argparse-manpage" version))
10808 (sha256
10809 (base32
10810 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10811 (build-system python-build-system)
10812 (home-page "https://github.com/praiskup/argparse-manpage")
10813 (synopsis "Build manual page from Python's ArgumentParser object")
10814 (description
10815 "This package provides tools to build manual pages from Python's
10816 @code{ArgumentParser} object.")
10817 (license license:asl2.0)))
10818
10819 (define-public python-contextlib2
10820 (package
10821 (name "python-contextlib2")
10822 (version "0.6.0.post1")
10823 (source
10824 (origin
10825 (method url-fetch)
10826 (uri (pypi-uri "contextlib2" version))
10827 (sha256
10828 (base32
10829 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10830 (build-system python-build-system)
10831 (home-page "https://contextlib2.readthedocs.org/")
10832 (synopsis "Tools for decorators and context managers")
10833 (description "This module is primarily a backport of the Python
10834 3.2 contextlib to earlier Python versions. Like contextlib, it
10835 provides utilities for common tasks involving decorators and context
10836 managers. It also contains additional features that are not part of
10837 the standard library.")
10838 (properties `((python2-variant . ,(delay python2-contextlib2))))
10839 (license license:psfl)))
10840
10841 (define-public python2-contextlib2
10842 (let ((base (package-with-python2
10843 (strip-python2-variant python-contextlib2))))
10844 (package/inherit base
10845 (arguments
10846 (substitute-keyword-arguments (package-arguments base)
10847 ((#:phases phases)
10848 `(modify-phases ,phases
10849 (replace 'check
10850 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10851 (native-inputs
10852 `(("python2-unittest2" ,python2-unittest2))))))
10853
10854 ;; This package is used by python2-pytest via python2-importlib-metadata,
10855 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10856 (define-public python2-contextlib2-bootstrap
10857 (hidden-package
10858 (package/inherit
10859 python2-contextlib2
10860 (name "python2-contextlib2-bootstrap")
10861 (arguments
10862 `(#:tests? #f
10863 ,@(package-arguments python2-contextlib2)))
10864 (native-inputs '()))))
10865
10866 (define-public python-texttable
10867 (package
10868 (name "python-texttable")
10869 (version "1.6.2")
10870 (source
10871 (origin
10872 (method url-fetch)
10873 (uri (pypi-uri "texttable" version))
10874 (sha256
10875 (base32
10876 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10877 (build-system python-build-system)
10878 (arguments
10879 `(#:phases
10880 (modify-phases %standard-phases
10881 (replace 'check
10882 (lambda _ (invoke "pytest" "tests.py"))))))
10883 (native-inputs
10884 `(("python-pytest" ,python-pytest)))
10885 (home-page "https://github.com/foutaise/texttable/")
10886 (synopsis "Python module for creating simple ASCII tables")
10887 (description "Texttable is a Python module for creating simple ASCII
10888 tables.")
10889 (license license:expat)))
10890
10891 (define-public python2-texttable
10892 (package-with-python2 python-texttable))
10893
10894 (define-public python-atomicwrites
10895 (package
10896 (name "python-atomicwrites")
10897 (version "1.3.0")
10898 (source (origin
10899 (method url-fetch)
10900 (uri (pypi-uri "atomicwrites" version))
10901 (sha256
10902 (base32
10903 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10904 (build-system python-build-system)
10905 (synopsis "Atomic file writes in Python")
10906 (description "Library for atomic file writes using platform dependent tools
10907 for atomic file system operations.")
10908 (home-page "https://github.com/untitaker/python-atomicwrites")
10909 (license license:expat)))
10910
10911 (define-public python2-atomicwrites
10912 (package-with-python2 python-atomicwrites))
10913
10914 (define-public python-click-threading
10915 (package
10916 (name "python-click-threading")
10917 (version "0.4.4")
10918 (source (origin
10919 (method url-fetch)
10920 (uri (pypi-uri "click-threading" version))
10921 (sha256
10922 (base32
10923 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10924 (build-system python-build-system)
10925 (propagated-inputs
10926 `(("python-click" ,python-click)))
10927 (synopsis "Utilities for multithreading in Click")
10928 (description "This package provides utilities for multithreading in Click
10929 applications.")
10930 (home-page "https://github.com/click-contrib/click-threading")
10931 (license license:expat)))
10932
10933 (define-public python-click-log
10934 (package
10935 (name "python-click-log")
10936 (version "0.3.2")
10937 (source (origin
10938 (method url-fetch)
10939 (uri (pypi-uri "click-log" version))
10940 (sha256
10941 (base32
10942 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10943 (build-system python-build-system)
10944 (propagated-inputs
10945 `(("python-click" ,python-click)))
10946 (synopsis "Logging for click applications")
10947 (description "This package provides a Python library for logging Click
10948 applications.")
10949 (home-page "https://github.com/click-contrib/click-log")
10950 (license license:expat)))
10951
10952 (define-public python-click-default-group
10953 (package
10954 (name "python-click-default-group")
10955 (version "1.2.2")
10956 (source (origin
10957 (method url-fetch)
10958 (uri (pypi-uri "click-default-group" version))
10959 (sha256
10960 (base32
10961 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
10962 (build-system python-build-system)
10963 (arguments
10964 `(#:tests? #f)) ; no target
10965 (propagated-inputs
10966 `(("python-click" ,python-click)))
10967 (synopsis "Extends click.Group")
10968 (description "This package extends click.Group to invoke a command without
10969 explicit subcommand name.")
10970 (home-page "https://github.com/click-contrib/click-default-group")
10971 (license license:bsd-3)))
10972
10973 (define-public python-structlog
10974 (package
10975 (name "python-structlog")
10976 (version "20.2.0")
10977 (source
10978 (origin
10979 (method url-fetch)
10980 (uri (pypi-uri "structlog" version))
10981 (sha256
10982 (base32
10983 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
10984 (build-system python-build-system)
10985 (arguments
10986 `(#:phases
10987 (modify-phases %standard-phases
10988 (replace 'check
10989 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10990 (when tests?
10991 (add-installed-pythonpath inputs outputs)
10992 (invoke "pytest"))
10993 #t)))))
10994 (native-inputs
10995 `(("python-coverage" ,python-coverage)
10996 ("python-freezegun" ,python-freezegun)
10997 ("python-pretend" ,python-pretend)
10998 ("python-pytest" ,python-pytest)
10999 ("python-pytest-asyncio" ,python-pytest-asyncio)
11000 ("python-simplejson" ,python-simplejson)
11001 ("python-twisted" ,python-twisted)))
11002 (home-page "https://www.structlog.org/")
11003 (synopsis "Structured Logging for Python")
11004 (description "@code{structlog} changes logging in Python by adding structure
11005 to your log entries.")
11006 (license (list license:asl2.0 license:expat))))
11007
11008 (define-public python-apipkg
11009 (package
11010 (name "python-apipkg")
11011 (version "1.5")
11012 (source (origin
11013 (method url-fetch)
11014 (uri (pypi-uri "apipkg" version))
11015 (sha256
11016 (base32
11017 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
11018 (build-system python-build-system)
11019 (native-inputs
11020 `(("python-pytest" ,python-pytest)
11021 ("python-setuptools-scm" ,python-setuptools-scm)))
11022 (synopsis "Namespace control and lazy-import mechanism")
11023 (description "With apipkg you can control the exported namespace of a Python
11024 package and greatly reduce the number of imports for your users. It is a small
11025 pure Python module that works on virtually all Python versions.")
11026 (home-page "https://github.com/pytest-dev/apipkg")
11027 (license license:expat)))
11028
11029 (define-public python-execnet
11030 (package
11031 (name "python-execnet")
11032 (version "1.4.1")
11033 (source (origin
11034 (method url-fetch)
11035 (uri (pypi-uri "execnet" version))
11036 (sha256
11037 (base32
11038 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
11039 (build-system python-build-system)
11040 (arguments
11041 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
11042 ;; The two test failures are caused by the lack of an `ssh` executable.
11043 ;; The test suite can be run with pytest after the 'install' phase.
11044 #:tests? #f))
11045 (native-inputs
11046 `(("python-pytest" ,python-pytest)
11047 ("python-setuptools-scm" ,python-setuptools-scm)))
11048 (propagated-inputs
11049 `(("python-apipkg" ,python-apipkg)))
11050 (synopsis "Rapid multi-Python deployment")
11051 (description "Execnet provides a share-nothing model with
11052 channel-send/receive communication for distributing execution across many
11053 Python interpreters across version, platform and network barriers. It has a
11054 minimal and fast API targeting the following uses:
11055 @enumerate
11056 @item distribute tasks to (many) local or remote CPUs
11057 @item write and deploy hybrid multi-process applications
11058 @item write scripts to administer multiple environments
11059 @end enumerate")
11060 (home-page "https://codespeak.net/execnet/")
11061 (license license:expat)))
11062
11063 (define-public python2-execnet
11064 (package-with-python2 python-execnet))
11065
11066 (define-public python-icalendar
11067 (package
11068 (name "python-icalendar")
11069 (version "4.0.5")
11070 (source (origin
11071 (method url-fetch)
11072 (uri (pypi-uri "icalendar" version))
11073 (sha256
11074 (base32
11075 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
11076 (build-system python-build-system)
11077 (propagated-inputs
11078 `(("python-dateutil" ,python-dateutil)
11079 ("python-pytz" ,python-pytz)))
11080 (synopsis "Python library for parsing iCalendar files")
11081 (description "The icalendar package is a parser/generator of iCalendar
11082 files for use with Python.")
11083 (home-page "https://github.com/collective/icalendar")
11084 (license license:bsd-2)))
11085
11086 (define-public python-args
11087 (package
11088 (name "python-args")
11089 (version "0.1.0")
11090 (source (origin
11091 (method url-fetch)
11092 (uri (pypi-uri "args" version))
11093 (sha256
11094 (base32
11095 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
11096 (build-system python-build-system)
11097 (home-page "https://github.com/kennethreitz/args")
11098 (synopsis "Command-line argument parser")
11099 (description
11100 "This library provides a Python module to parse command-line arguments.")
11101 (license license:bsd-3)))
11102
11103 (define-public python2-args
11104 (package-with-python2 python-args))
11105
11106 (define-public python-clint
11107 (package
11108 (name "python-clint")
11109 (version "0.5.1")
11110 (source (origin
11111 (method url-fetch)
11112 (uri (pypi-uri "clint" version))
11113 (sha256
11114 (base32
11115 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
11116 (build-system python-build-system)
11117 (arguments
11118 '(#:phases
11119 (modify-phases %standard-phases
11120 (replace 'check
11121 (lambda _ (invoke "py.test" "-v"))))))
11122 (native-inputs
11123 `(("python-pytest" ,python-pytest)))
11124 (propagated-inputs
11125 `(("python-args" ,python-args)))
11126 (home-page "https://github.com/kennethreitz/clint")
11127 (synopsis "Command-line interface tools")
11128 (description
11129 "Clint is a Python module filled with a set of tools for developing
11130 command-line applications, including tools for colored and indented
11131 output, progress bar display, and pipes.")
11132 (license license:isc)))
11133
11134 (define-public python2-clint
11135 (package-with-python2 python-clint))
11136
11137 (define-public python-rply
11138 (package
11139 (name "python-rply")
11140 (version "0.7.5")
11141 (source (origin
11142 (method url-fetch)
11143 (uri (pypi-uri "rply" version))
11144 (sha256
11145 (base32
11146 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
11147 (build-system python-build-system)
11148 (propagated-inputs
11149 `(("python-appdirs" ,python-appdirs)))
11150 (home-page "https://github.com/alex/rply")
11151 (synopsis "Parser generator for Python")
11152 (description
11153 "This package provides a pure Python based parser generator, that also
11154 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
11155 with a new public API, and RPython support.")
11156 (license license:bsd-3)))
11157
11158 (define-public python2-rply
11159 (package-with-python2 python-rply))
11160
11161 (define-public python-hy
11162 (package
11163 (name "python-hy")
11164 (version "0.18.0")
11165 (source (origin
11166 (method url-fetch)
11167 (uri (pypi-uri "hy" version))
11168 (sha256
11169 (base32
11170 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
11171 (build-system python-build-system)
11172 (arguments
11173 '(#:phases
11174 (modify-phases %standard-phases
11175 (add-before 'install 'set-HOME
11176 (lambda _
11177 (setenv "HOME" "/tmp") #t))
11178 (replace 'check
11179 (lambda _
11180 ;; Tests require write access to HOME.
11181 (setenv "HOME" "/tmp")
11182 (invoke "nosetests"))))))
11183 (native-inputs
11184 `(("python-coverage" ,python-coverage)
11185 ("python-nose" ,python-nose)))
11186 (propagated-inputs
11187 `(("python-astor" ,python-astor)
11188 ("python-colorama" ,python-colorama)
11189 ("python-rply" ,python-rply)
11190 ("python-funcparserlib"
11191 ,python-funcparserlib)))
11192 (home-page "http://hylang.org/")
11193 (synopsis "Lisp frontend to Python")
11194 (description
11195 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
11196 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
11197 Python at your fingertips, in Lisp form.")
11198 (license license:expat)))
11199
11200 (define-public python2-functools32
11201 (package
11202 (name "python2-functools32")
11203 (version "3.2.3-2")
11204 (source
11205 (origin
11206 (method url-fetch)
11207 (uri (pypi-uri "functools32" version))
11208 (sha256
11209 (base32
11210 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
11211 (build-system python-build-system)
11212 (arguments
11213 `(#:python ,python-2
11214 #:tests? #f)) ; no test target
11215 (home-page "https://github.com/MiCHiLU/python-functools32")
11216 (synopsis
11217 "Backport of the functools module from Python 3.2.3")
11218 (description
11219 "This package is a backport of the @code{functools} module from Python
11220 3.2.3 for use with older versions of Python and PyPy.")
11221 (license license:expat)))
11222
11223 (define-public python2-subprocess32
11224 (package
11225 (name "python2-subprocess32")
11226 (version "3.2.7")
11227 (source (origin
11228 (method url-fetch)
11229 (uri (pypi-uri "subprocess32" version))
11230 (sha256
11231 (base32
11232 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
11233 (patches
11234 (search-patches "python2-subprocess32-disable-input-test.patch"))))
11235 (build-system python-build-system)
11236 (arguments
11237 `(#:python ,python-2
11238 ;; The test suite fails with Python > 2.7.13:
11239 ;; import test.support
11240 ;; ImportError: No module named support
11241 #:tests? #f
11242 #:phases
11243 (modify-phases %standard-phases
11244 (add-after 'unpack 'patch-/bin/sh
11245 (lambda _
11246 (substitute* '("subprocess32.py"
11247 "test_subprocess32.py")
11248 (("/bin/sh") (which "sh")))
11249 #t)))))
11250 (home-page "https://github.com/google/python-subprocess32")
11251 (synopsis "Backport of the subprocess module from Python 3.2")
11252 (description
11253 "This is a backport of the @code{subprocess} standard library module
11254 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
11255 new features. On POSIX systems it is guaranteed to be reliable when used
11256 in threaded applications. It includes timeout support from Python 3.3 but
11257 otherwise matches 3.2’s API.")
11258 (license license:psfl)))
11259
11260 (define-public python2-futures
11261 (package
11262 (name "python2-futures")
11263 (version "3.2.0")
11264 (source
11265 (origin
11266 (method url-fetch)
11267 (uri (pypi-uri "futures" version))
11268 (sha256
11269 (base32
11270 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
11271 (build-system python-build-system)
11272 (arguments
11273 `(#:python ,python-2
11274 #:phases
11275 (modify-phases %standard-phases
11276 (replace 'check
11277 (lambda _
11278 (invoke "python" "test_futures.py")
11279 #t)))))
11280 (home-page "https://github.com/agronholm/pythonfutures")
11281 (synopsis
11282 "Backport of the concurrent.futures package from Python 3.2")
11283 (description
11284 "The concurrent.futures module provides a high-level interface for
11285 asynchronously executing callables. This package backports the
11286 concurrent.futures package from Python 3.2")
11287 (license license:bsd-3)))
11288
11289 (define-public python-promise
11290 (package
11291 (name "python-promise")
11292 (version "0.4.2")
11293 (source
11294 (origin
11295 (method url-fetch)
11296 (uri (pypi-uri "promise" version))
11297 (sha256
11298 (base32
11299 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
11300 (build-system python-build-system)
11301 ;; Tests wants python-futures, which is a python2 only program, and
11302 ;; can't be found by python-promise at test time.
11303 (arguments `(#:tests? #f))
11304 (home-page "https://github.com/syrusakbary/promise")
11305 (synopsis "Promises/A+ implementation for Python")
11306 (description
11307 "Promises/A+ implementation for Python")
11308 (properties `((python2-variant . ,(delay python2-promise))))
11309 (license license:expat)))
11310
11311 (define-public python2-promise
11312 (let ((promise (package-with-python2
11313 (strip-python2-variant python-promise))))
11314 (package/inherit promise
11315 (arguments (substitute-keyword-arguments (package-arguments promise)
11316 ((#:tests? _) #t)))
11317 (native-inputs
11318 `(("python2-futures" ,python2-futures)
11319 ("python2-pytest" ,python2-pytest)
11320 ,@(package-native-inputs promise))))))
11321
11322 (define-public python-progressbar2
11323 (package
11324 (name "python-progressbar2")
11325 (version "3.51.3")
11326 (source
11327 (origin
11328 (method url-fetch)
11329 (uri (pypi-uri "progressbar2" version))
11330 (sha256
11331 (base32
11332 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
11333 (build-system python-build-system)
11334 (propagated-inputs
11335 `(("python-six" ,python-six)
11336 ("python-utils" ,python-utils)))
11337 (native-inputs
11338 `(("python-flake8" ,python-flake8)
11339 ("python-freezegun" ,python-freezegun)
11340 ("python-pycodestyle" ,python-pycodestyle)
11341 ("python-pytest" ,python-pytest)
11342 ("python-pytest-cache" ,python-pytest-cache)
11343 ("python-pytest-cov" ,python-pytest-cov)
11344 ("python-pytest-flakes" ,python-pytest-flakes)
11345 ("python-pytest-pep8" ,python-pytest-pep8)
11346 ("python-sphinx" ,python-sphinx)))
11347 (home-page "https://github.com/WoLpH/python-progressbar")
11348 (synopsis "Text progress bar library for Python")
11349 (description
11350 "This package provides a Python progressbar library to provide
11351 visual (yet text based) progress to long running operations.")
11352 (license license:bsd-3)))
11353
11354 (define-public python-progressbar33
11355 (package
11356 (name "python-progressbar33")
11357 (version "2.4")
11358 (source
11359 (origin
11360 (method url-fetch)
11361 (uri (pypi-uri "progressbar33" version))
11362 (sha256
11363 (base32
11364 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
11365 (build-system python-build-system)
11366 (home-page "https://github.com/germangh/python-progressbar")
11367 (synopsis "Text progress bar library for Python")
11368 (description
11369 "This package provides a text progress bar library for Python. This
11370 version only differs from the original @code{progressbar} package in that it
11371 uses relative package imports instead of absolute imports, which is necessary
11372 for the module to work under Python 3.3.")
11373 ;; Either or both of these licenses may be selected.
11374 (license (list license:lgpl2.1+ license:bsd-3))))
11375
11376 (define-public python-colorama
11377 (package
11378 (name "python-colorama")
11379 (version "0.4.4")
11380 (source
11381 (origin
11382 (method url-fetch)
11383 (uri (pypi-uri "colorama" version))
11384 (sha256
11385 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
11386 (build-system python-build-system)
11387 (synopsis "Colored terminal text rendering for Python")
11388 (description "Colorama is a Python library for rendering colored terminal
11389 text.")
11390 (home-page "https://pypi.org/project/colorama/")
11391 (license license:bsd-3)))
11392
11393 (define-public python2-colorama
11394 (package-with-python2 python-colorama))
11395
11396 (define-public python-moto
11397 (package
11398 (name "python-moto")
11399 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
11400 (version "1.3.16.dev134")
11401 (source (origin
11402 (method url-fetch)
11403 (uri (pypi-uri "moto" version))
11404 (sha256
11405 (base32
11406 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
11407 (build-system python-build-system)
11408 (arguments
11409 `(#:phases (modify-phases %standard-phases
11410 (add-after 'unpack 'patch-hardcoded-executable-names
11411 (lambda _
11412 (substitute* "moto/batch/models.py"
11413 (("/bin/sh")
11414 (which "sh")))
11415 (substitute* (find-files "tests" "\\.py$")
11416 (("#!/bin/bash")
11417 (string-append "#!" (which "bash"))))
11418 #t))
11419 (replace 'check
11420 (lambda _
11421 (setenv "PYTHONPATH" (string-append "./build/lib:"
11422 (getenv "PYTHONPATH")))
11423 (invoke "pytest" "-vv" "-m" "not network"
11424 ;; These tests require Docker.
11425 "-k" "not test_terminate_job \
11426 and not test_invoke_function_from_sqs_exception"))))))
11427 (native-inputs
11428 `(("python-flask" ,python-flask)
11429 ("python-flask-cors" ,python-flask-cors)
11430 ("python-freezegun" ,python-freezegun)
11431 ("python-parameterized" ,python-parameterized)
11432 ("python-pytest" ,python-pytest)
11433 ("python-sure" ,python-sure)))
11434 (propagated-inputs
11435 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
11436 ("python-boto" ,python-boto)
11437 ("python-boto3" ,python-boto3)
11438 ("python-botocore" ,python-botocore)
11439 ("python-cfn-lint" ,python-cfn-lint)
11440 ("python-cryptography" ,python-cryptography)
11441 ("python-dateutil" ,python-dateutil)
11442 ("python-docker" ,python-docker)
11443 ("python-idna" ,python-idna)
11444 ("python-jinja2" ,python-jinja2)
11445 ("python-jose" ,python-jose)
11446 ("python-jsondiff" ,python-jsondiff)
11447 ("python-mock" ,python-mock)
11448 ("python-pytz" ,python-pytz)
11449 ("python-pyyaml" ,python-pyyaml)
11450 ("python-requests" ,python-requests)
11451 ("python-responses" ,python-responses)
11452 ("python-six" ,python-six)
11453 ("python-sshpubkeys" ,python-sshpubkeys)
11454 ("python-werkzeug" ,python-werkzeug)
11455 ("python-xmltodict" ,python-xmltodict)))
11456 (home-page "https://github.com/spulec/moto")
11457 (synopsis "Mock out the boto library")
11458 (description
11459 "@code{moto} is a library designed to easily mock out the
11460 @code{boto} library.")
11461 (license license:asl2.0)))
11462
11463 (define-public python-rsa
11464 (package
11465 (name "python-rsa")
11466 (version "3.4.2")
11467 (source
11468 (origin
11469 (method url-fetch)
11470 (uri (pypi-uri "rsa" version))
11471 (sha256
11472 (base32
11473 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11474 (build-system python-build-system)
11475 (propagated-inputs
11476 `(("python-pyasn1" ,python-pyasn1)))
11477 (synopsis "Pure-Python RSA implementation")
11478 (description "Python-RSA is a pure-Python RSA implementation. It supports
11479 encryption and decryption, signing and verifying signatures, and key
11480 generation according to PKCS#1 version 1.5. It can be used as a Python
11481 library as well as on the command line.")
11482 (home-page "https://stuvel.eu/rsa")
11483 (license license:asl2.0)))
11484
11485 (define-public python2-rsa
11486 (package-with-python2 python-rsa))
11487
11488 (define-public python-pluggy
11489 (package
11490 (name "python-pluggy")
11491 (version "0.13.1")
11492 (source
11493 (origin
11494 (method url-fetch)
11495 (uri (pypi-uri "pluggy" version))
11496 (sha256
11497 (base32
11498 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11499 (build-system python-build-system)
11500 (native-inputs
11501 `(("python-setuptools-scm" ,python-setuptools-scm)))
11502 (synopsis "Plugin and hook calling mechanism for Python")
11503 (description "Pluggy is an extraction of the plugin manager as used by
11504 Pytest but stripped of Pytest specific details.")
11505 (home-page "https://pypi.org/project/pluggy/")
11506 (properties `((python2-variant . ,(delay python2-pluggy))))
11507 (license license:expat)))
11508
11509 (define-public python2-pluggy
11510 (let ((base (package-with-python2 (strip-python2-variant
11511 python-pluggy))))
11512 (package/inherit
11513 base
11514 (propagated-inputs
11515 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11516
11517 ;; This package requires python2-importlib-metadata, but that package
11518 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11519 ;; variant to solve the circular dependency.
11520 (define-public python2-pluggy-bootstrap
11521 (hidden-package
11522 (package/inherit
11523 python2-pluggy
11524 (name "python2-pluggy-bootstrap")
11525 (arguments
11526 `(#:tests? #f
11527 ,@(package-arguments python2-pluggy)))
11528 (propagated-inputs
11529 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11530
11531 (define-public python-tox
11532 (package
11533 (name "python-tox")
11534 (version "3.20.0")
11535 (source
11536 (origin
11537 (method url-fetch)
11538 (uri (pypi-uri "tox" version))
11539 (sha256
11540 (base32
11541 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11542 (build-system python-build-system)
11543 (arguments
11544 ;; FIXME: Tests require pytest-timeout, which itself requires
11545 ;; pytest>=2.8.0 for installation.
11546 '(#:tests? #f))
11547 (propagated-inputs
11548 `(("python-filelock" ,python-filelock)
11549 ("python-packaging" ,python-packaging)
11550 ("python-pluggy" ,python-pluggy)
11551 ("python-py" ,python-py)
11552 ("python-six" ,python-six)
11553 ("python-toml" ,python-toml)
11554 ("python-virtualenv" ,python-virtualenv)))
11555 (native-inputs
11556 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11557 ("python-pytest" ,python-pytest) ; >= 2.3.5
11558 ("python-setuptools-scm" ,python-setuptools-scm)))
11559 (home-page "https://tox.readthedocs.io")
11560 (synopsis "Virtualenv-based automation of test activities")
11561 (description "Tox is a generic virtualenv management and test command line
11562 tool. It can be used to check that a package installs correctly with
11563 different Python versions and interpreters, or run tests in each type of
11564 supported environment, or act as a frontend to continuous integration
11565 servers.")
11566 (license license:expat)))
11567
11568 (define-public python-jmespath
11569 (package
11570 (name "python-jmespath")
11571 (version "0.9.4")
11572 (source
11573 (origin
11574 (method url-fetch)
11575 (uri (pypi-uri "jmespath" version))
11576 (sha256
11577 (base32
11578 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11579 (build-system python-build-system)
11580 (native-inputs
11581 `(("python-nose" ,python-nose)))
11582 (synopsis "JSON Matching Expressions")
11583 (description "JMESPath (pronounced “james path”) is a Python library that
11584 allows one to declaratively specify how to extract elements from a JSON
11585 document.")
11586 (home-page "https://github.com/jmespath/jmespath.py")
11587 (license license:expat)))
11588
11589 (define-public python2-jmespath
11590 (package-with-python2 python-jmespath))
11591
11592 (define-public python-symengine
11593 (package
11594 (name "python-symengine")
11595 (version "0.6.1")
11596 (source
11597 (origin
11598 (method url-fetch)
11599 (uri (pypi-uri "symengine" version))
11600 (sha256
11601 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11602 (build-system python-build-system)
11603 (native-inputs
11604 `(("cmake" ,cmake)
11605 ("python-cython" ,python-cython)))
11606 (inputs
11607 `(("symengine" ,symengine)))
11608 (home-page "https://github.com/symengine/symengine.py")
11609 (synopsis "Python library providing wrappers to SymEngine")
11610 (description
11611 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11612 manipulation library.")
11613 (license license:expat)))
11614
11615 (define-public python-uncertainties
11616 (package
11617 (name "python-uncertainties")
11618 (version "3.1.5")
11619 (source
11620 (origin
11621 (method url-fetch)
11622 (uri (pypi-uri "uncertainties" version))
11623 (sha256
11624 (base32
11625 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
11626 (build-system python-build-system)
11627 ;; While there are test files, there is no "tests" directory, so the tests
11628 ;; fail.
11629 (arguments '(#:tests? #false))
11630 (propagated-inputs
11631 `(("python-future" ,python-future)))
11632 (native-inputs
11633 `(("python-nose" ,python-nose)
11634 ("python-numpy" ,python-numpy)))
11635 (home-page "https://uncertainties-python-package.readthedocs.io/")
11636 (synopsis "Calculations with uncertainties")
11637 (description
11638 "The uncertainties package transparently handles calculations with
11639 numbers with uncertainties. It can also yield the derivatives of any
11640 expression.")
11641 (license license:bsd-3)))
11642
11643 (define-public python-asteval
11644 (package
11645 (name "python-asteval")
11646 (version "0.9.23")
11647 (source
11648 (origin
11649 (method url-fetch)
11650 (uri (pypi-uri "asteval" version))
11651 (sha256
11652 (base32
11653 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
11654 (build-system python-build-system)
11655 (native-inputs
11656 `(("python-pytest" ,python-pytest)))
11657 (home-page "https://github.com/newville/asteval")
11658 (synopsis "Minimalistic evaluator of Python expressions")
11659 (description
11660 "This package provides a minimalistic evaluator of Python expression
11661 using the @code{ast} module")
11662 (license license:expat)))
11663
11664 (define-public python-lmfit
11665 (package
11666 (name "python-lmfit")
11667 (version "1.0.2")
11668 (source
11669 (origin
11670 (method url-fetch)
11671 (uri (pypi-uri "lmfit" version))
11672 (sha256
11673 (base32
11674 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
11675 (build-system python-build-system)
11676 (propagated-inputs
11677 `(("python-asteval" ,python-asteval)
11678 ("python-numpy" ,python-numpy)
11679 ("python-scipy" ,python-scipy)
11680 ("python-uncertainties" ,python-uncertainties)))
11681 (native-inputs
11682 `(("python-pytest" ,python-pytest)))
11683 (home-page "https://lmfit.github.io/lmfit-py/")
11684 (synopsis "Least-Squares minimization with bounds and constraints")
11685 (description
11686 "Lmfit provides a high-level interface to non-linear optimization and
11687 curve fitting problems for Python. It builds on and extends many of the
11688 optimization methods of @code{scipy.optimize}. Initially inspired by (and
11689 named for) extending the Levenberg-Marquardt method from
11690 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
11691 enhancements to optimization and data fitting problems.")
11692 (license license:bsd-3)))
11693
11694 (define-public python-boto
11695 (package
11696 (name "python-boto")
11697 (version "2.49.0")
11698 (source (origin
11699 (method url-fetch)
11700 (uri (pypi-uri "boto" version))
11701 (sha256
11702 (base32
11703 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
11704 (build-system python-build-system)
11705 (arguments
11706 ;; XXX: This package is unmaintained and has problems with newer versions
11707 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
11708 ;; subset of this library, so keep it around for now, but disable tests.
11709 '(#:tests? #f))
11710 (propagated-inputs
11711 `(("python-paramiko" ,python-paramiko)
11712 ("python-requests" ,python-requests)))
11713 (home-page "https://github.com/boto/boto")
11714 (synopsis "Python interfaces for Amazon Web Services")
11715 (description
11716 "This package provides various facilities for interacting with Amazon
11717 Web Services through Python.
11718
11719 This software is unmaintained, and new projects should use @code{boto3} instead.")
11720 (license license:expat)))
11721
11722 (define-public python-botocore
11723 ;; Note: When updating botocore, also make sure that boto3 and awscli
11724 ;; are compatible.
11725 (package
11726 (name "python-botocore")
11727 (version "1.19.22")
11728 (source
11729 (origin
11730 (method url-fetch)
11731 (uri (pypi-uri "botocore" version))
11732 (sha256
11733 (base32
11734 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
11735 (build-system python-build-system)
11736 (arguments
11737 ;; FIXME: Many tests are failing.
11738 '(#:tests? #f))
11739 (propagated-inputs
11740 `(("python-dateutil" ,python-dateutil)
11741 ("python-jmespath" ,python-jmespath)
11742 ("python-urllib3" ,python-urllib3)))
11743 (home-page "https://github.com/boto/botocore")
11744 (synopsis "Low-level interface to AWS")
11745 (description "Botocore is a Python library that provides a low-level
11746 interface to the Amazon Web Services (AWS) API.")
11747 (license license:asl2.0)))
11748
11749 (define-public python2-botocore
11750 (package-with-python2 python-botocore))
11751
11752 (define-public python-boto3
11753 (package
11754 (name "python-boto3")
11755 (version "1.16.22")
11756 (home-page "https://github.com/boto/boto3")
11757 (source (origin
11758 (method git-fetch)
11759 (uri (git-reference (url home-page) (commit version)))
11760 (file-name (git-file-name name version))
11761 (sha256
11762 (base32
11763 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
11764 (arguments
11765 `(#:phases
11766 (modify-phases %standard-phases
11767 (add-after 'unpack 'delete-network-tests
11768 ;; Deleting integration tests because they are trying to connect to AWS.
11769 (lambda _
11770 (delete-file-recursively "tests/integration")
11771 #t)))))
11772 (build-system python-build-system)
11773 (native-inputs
11774 `(("python-nose" ,python-nose)
11775 ("python-mock" ,python-mock)))
11776 (propagated-inputs
11777 `(("python-botocore" ,python-botocore)
11778 ("python-jmespath" ,python-jmespath)
11779 ("python-s3transfer" ,python-s3transfer)))
11780 (synopsis "AWS SDK for Python")
11781 (description
11782 "Boto3 is a Python library for writing programs that interact with
11783 @acronym{AWS,Amazon Web Services}.")
11784 (license license:asl2.0)))
11785
11786 (define-public python-pyfiglet
11787 (package
11788 (name "python-pyfiglet")
11789 (version "0.8.post1")
11790 (source
11791 (origin
11792 (method url-fetch)
11793 (uri (pypi-uri "pyfiglet" version))
11794 (sha256
11795 (base32
11796 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11797 (build-system python-build-system)
11798 (home-page "https://github.com/pwaller/pyfiglet")
11799 (synopsis "Draw ASCII art big letters in Python")
11800 (description "This module lets you draw large letter from ordinary characters
11801 in pure Python.")
11802 (license license:expat)))
11803
11804 (define-public python-xdo
11805 (package
11806 (name "python-xdo")
11807 (version "0.3")
11808 (source (origin
11809 (method url-fetch)
11810 (uri (string-append
11811 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11812 "python-xdo_" version ".orig.tar.gz"))
11813 (sha256
11814 (base32
11815 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11816 (build-system python-build-system)
11817 (arguments
11818 '(#:phases
11819 (modify-phases %standard-phases
11820 (add-before 'install 'patch-libxdo-path
11821 ;; Hardcode the path of dynamically loaded libxdo library.
11822 (lambda* (#:key inputs #:allow-other-keys)
11823 (let ((libxdo (string-append
11824 (assoc-ref inputs "xdotool")
11825 "/lib/libxdo.so")))
11826 (substitute* "xdo/_xdo.py"
11827 (("find_library\\(\"xdo\"\\)")
11828 (simple-format #f "\"~a\"" libxdo)))
11829 #t))))
11830 #:tests? #f)) ; no tests provided
11831 (propagated-inputs
11832 `(("python-six" ,python-six)))
11833 (inputs
11834 `(("xdotool" ,xdotool)
11835 ("libX11" ,libx11)))
11836 (home-page "https://tracker.debian.org/pkg/python-xdo")
11837 (synopsis "Python library for simulating X11 keyboard/mouse input")
11838 (description "Provides bindings to libxdo for manipulating X11 via simulated
11839 input. (Note that this is mostly a legacy library; you may wish to look at
11840 python-xdo for newer bindings.)")
11841 (license license:bsd-3)))
11842
11843 (define-public python2-xdo
11844 (package-with-python2 python-xdo))
11845
11846 (define-public python-mako
11847 (package
11848 (name "python-mako")
11849 (version "1.1.3")
11850 (source
11851 (origin
11852 (method url-fetch)
11853 (uri (pypi-uri "Mako" version))
11854 (sha256
11855 (base32
11856 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11857 (build-system python-build-system)
11858 (arguments
11859 `(#:phases (modify-phases %standard-phases
11860 (replace 'check
11861 (lambda* (#:key tests? #:allow-other-keys)
11862 (if tests?
11863 (invoke "nosetests" "-v")
11864 (format #t "test suite not run~%"))
11865 #t)))))
11866 (propagated-inputs
11867 `(("python-markupsafe" ,python-markupsafe)))
11868 (native-inputs
11869 `(("python-mock" ,python-mock)
11870 ("python-nose" ,python-nose)))
11871 (home-page "https://www.makotemplates.org/")
11872 (synopsis "Templating language for Python")
11873 (description "Mako is a templating language for Python that compiles
11874 templates into Python modules.")
11875 (license license:expat)))
11876
11877 (define-public python2-mako
11878 (package-with-python2 python-mako))
11879
11880 (define-public python-waitress
11881 (package
11882 (name "python-waitress")
11883 (version "1.1.0")
11884 (source
11885 (origin
11886 (method url-fetch)
11887 (uri (pypi-uri "waitress" version))
11888 (patches (search-patches "python-waitress-fix-tests.patch"))
11889 (sha256
11890 (base32
11891 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11892 (build-system python-build-system)
11893 (home-page "https://github.com/Pylons/waitress")
11894 (synopsis "Waitress WSGI server")
11895 (description "Waitress is meant to be a production-quality pure-Python WSGI
11896 server with very acceptable performance.")
11897 (license license:zpl2.1)))
11898
11899 (define-public python2-waitress
11900 (package-with-python2 python-waitress))
11901
11902 (define-public python-whichcraft
11903 (package
11904 (name "python-whichcraft")
11905 (version "0.6.1")
11906 (source
11907 (origin
11908 (method url-fetch)
11909 (uri (pypi-uri "whichcraft" version))
11910 (sha256
11911 (base32
11912 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11913 (build-system python-build-system)
11914 (native-inputs
11915 `(("python-pytest" ,python-pytest)))
11916 (home-page "https://github.com/pydanny/whichcraft")
11917 (synopsis "Cross-platform cross-python shutil.which functionality")
11918 (description
11919 "This package provides a shim of the shutil.which function that's
11920 designed to work across multiple versions of Python.")
11921 (license license:bsd-3)))
11922
11923 (define-public python-cookiecutter
11924 (package
11925 (name "python-cookiecutter")
11926 (version "1.7.2")
11927 (source
11928 (origin
11929 (method url-fetch)
11930 (uri (pypi-uri "cookiecutter" version))
11931 (sha256
11932 (base32
11933 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11934 (build-system python-build-system)
11935 (native-inputs
11936 `(("python-freezegun" ,python-freezegun)
11937 ("python-pytest" ,python-pytest)
11938 ("python-pytest-catchlog" ,python-pytest-catchlog)
11939 ("python-pytest-cov" ,python-pytest-cov)
11940 ("python-pytest-mock" ,python-pytest-mock)))
11941 (propagated-inputs
11942 `(("python-binaryornot" ,python-binaryornot)
11943 ("python-click" ,python-click)
11944 ("python-future" ,python-future)
11945 ("python-jinja2" ,python-jinja2)
11946 ("python-jinja2-time" ,python-jinja2-time)
11947 ("python-poyo" ,python-poyo)
11948 ("python-requests" ,python-requests)
11949 ("python-slugify" ,python-slugify)
11950 ("python-text-unidecode" ,python-text-unidecode)
11951 ("python-whichcraft" ,python-whichcraft)))
11952 (home-page "https://github.com/cookiecutter/cookiecutter")
11953 (synopsis
11954 "Command-line utility that creates projects from project templates")
11955 (description
11956 "This package provides a command-line utility that creates projects from
11957 project templates, e.g. creating a Python package project from a Python package
11958 project template.")
11959 (license license:bsd-3)))
11960
11961 (define-public python-pyquery
11962 (package
11963 (name "python-pyquery")
11964 (version "1.2.17")
11965 (source
11966 (origin
11967 (method url-fetch)
11968 (uri (pypi-uri "pyquery" version))
11969 (sha256
11970 (base32
11971 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11972 (build-system python-build-system)
11973 (native-inputs
11974 `(("python-webob" ,python-webob)
11975 ("python-webtest" ,python-webtest)))
11976 (propagated-inputs
11977 `(("python-lxml" ,python-lxml)
11978 ("python-cssselect" ,python-cssselect)))
11979 (home-page "https://github.com/gawel/pyquery")
11980 (synopsis "Make jQuery-like queries on xml documents")
11981 (description "pyquery allows you to make jQuery queries on xml documents.
11982 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11983 fast xml and html manipulation.")
11984 (license license:bsd-3)))
11985
11986 (define-public python-anyjson
11987 (package
11988 (name "python-anyjson")
11989 (version "0.3.3")
11990 (source
11991 (origin
11992 (method url-fetch)
11993 (uri (pypi-uri "anyjson" version))
11994 (sha256
11995 (base32
11996 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11997 (build-system python-build-system)
11998 (arguments
11999 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
12000 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
12001 ;; whatever) so this transformation needs to be done before the tests
12002 ;; can be run. Maybe we could add a build step to transform beforehand
12003 ;; but it could be annoying/difficult.
12004 ;; We can enable tests for the Python 2 version, though, and do below.
12005 #:tests? #f))
12006 (home-page "https://bitbucket.org/runeh/anyjson/")
12007 (synopsis
12008 "Wraps best available JSON implementation in a common interface")
12009 (description
12010 "Anyjson loads whichever is the fastest JSON module installed
12011 and provides a uniform API regardless of which JSON implementation is used.")
12012 (license license:bsd-3)
12013 (properties `((python2-variant . ,(delay python2-anyjson))))))
12014
12015 (define-public python2-anyjson
12016 (let ((anyjson (package-with-python2
12017 (strip-python2-variant python-anyjson))))
12018 (package/inherit anyjson
12019 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
12020 #:tests? #t
12021 ,@(package-arguments anyjson)))
12022 (native-inputs `(("python2-nose" ,python2-nose))))))
12023
12024 (define-public python-amqp
12025 (package
12026 (name "python-amqp")
12027 (version "2.3.2")
12028 (source
12029 (origin
12030 (method url-fetch)
12031 (uri (pypi-uri "amqp" version))
12032 (sha256
12033 (base32
12034 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
12035 (build-system python-build-system)
12036 (native-inputs
12037 `(("python-case" ,python-case)
12038 ("python-pytest-sugar" ,python-pytest-sugar)
12039 ("python-mock" ,python-mock)))
12040 (propagated-inputs
12041 `(("python-vine" ,python-vine)))
12042 (home-page "https://github.com/celery/py-amqp")
12043 (synopsis
12044 "Low-level AMQP client for Python (fork of amqplib)")
12045 (description
12046 "This is a fork of amqplib which was originally written by Barry Pederson.
12047 It is maintained by the Celery project, and used by kombu as a pure python
12048 alternative when librabbitmq is not available.")
12049 (license license:lgpl2.1+)
12050 (properties `((python2-variant . ,(delay python2-amqp))))))
12051
12052 (define-public python2-amqp
12053 (let ((amqp (package-with-python2
12054 (strip-python2-variant python-amqp))))
12055 (package/inherit amqp
12056 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
12057 ;; unmaintained. Weirdly, does not do this on the python 3
12058 ;; version?
12059 #:tests? #f
12060 ,@(package-arguments amqp))))))
12061
12062 (define-public python-txamqp
12063 (package
12064 (name "python-txamqp")
12065 (version "0.8.2")
12066 (source
12067 (origin
12068 (method url-fetch)
12069 (uri (pypi-uri "txAMQP" version))
12070 (sha256
12071 (base32
12072 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
12073 (build-system python-build-system)
12074 (propagated-inputs
12075 `(("python-six" ,python-six)
12076 ("python-twisted" ,python-twisted)))
12077 (home-page "https://github.com/txamqp/txamqp")
12078 (synopsis "Communicate with AMQP peers and brokers using Twisted")
12079 (description
12080 "This package provides a Python library for communicating with AMQP peers
12081 and brokers using the asynchronous networking framework Twisted. It contains
12082 all the necessary code to connect, send and receive messages to/from an
12083 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
12084 also includes support for using Thrift RPC over AMQP in Twisted
12085 applications.")
12086 (license license:asl2.0)))
12087
12088 (define-public python2-txamqp
12089 (package-with-python2 python-txamqp))
12090
12091 (define-public python-kombu
12092 (package
12093 (name "python-kombu")
12094 (version "4.2.2")
12095 (source
12096 (origin
12097 (method url-fetch)
12098 (uri (pypi-uri "kombu" version))
12099 (sha256
12100 (base32
12101 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
12102 (build-system python-build-system)
12103 (native-inputs
12104 `(("python-mock" ,python-mock)
12105 ("python-case" ,python-case)
12106 ("python-pyro4" ,python-pyro4)
12107 ("python-pytest-sugar" ,python-pytest-sugar)
12108 ("python-pytz" ,python-pytz)))
12109 (propagated-inputs
12110 `(("python-anyjson" ,python-anyjson)
12111 ("python-amqp" ,python-amqp)
12112 ("python-redis" ,python-redis)))
12113 (home-page "https://kombu.readthedocs.io")
12114 (synopsis "Message passing library for Python")
12115 (description "The aim of Kombu is to make messaging in Python as easy as
12116 possible by providing an idiomatic high-level interface for the AMQ protocol,
12117 and also provide proven and tested solutions to common messaging problems.
12118 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
12119 message orientation, queuing, routing, reliability and security, for which the
12120 RabbitMQ messaging server is the most popular implementation.")
12121 (license license:bsd-3)
12122 (properties `((python2-variant . ,(delay python2-kombu))))))
12123
12124 (define-public python2-kombu
12125 (let ((kombu (package-with-python2
12126 (strip-python2-variant python-kombu))))
12127 (package/inherit kombu
12128 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
12129 ;; It works fine on the python3 variant.
12130 #:tests? #f
12131 ,@(package-arguments kombu)))
12132 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12133 ,@(package-native-inputs kombu))))))
12134
12135 (define-public python-billiard
12136 (package
12137 (name "python-billiard")
12138 (version "3.5.0.5")
12139 (source
12140 (origin
12141 (method url-fetch)
12142 (uri (pypi-uri "billiard" version))
12143 (sha256
12144 (base32
12145 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
12146 (build-system python-build-system)
12147 (native-inputs
12148 `(("python-case" ,python-case)
12149 ("python-pytest" ,python-pytest)))
12150 (home-page "https://github.com/celery/billiard")
12151 (synopsis
12152 "Python multiprocessing fork with improvements and bugfixes")
12153 (description
12154 "Billiard is a fork of the Python 2.7 multiprocessing package. The
12155 multiprocessing package itself is a renamed and updated version of R Oudkerk's
12156 pyprocessing package. This standalone variant is intended to be compatible with
12157 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
12158 (license license:bsd-3)
12159 (properties `((python2-variant . ,(delay python2-billiard))))))
12160
12161 (define-public python2-billiard
12162 (let ((billiard (package-with-python2
12163 (strip-python2-variant python-billiard))))
12164 (package/inherit billiard
12165 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12166 ("python2-mock" ,python2-mock)
12167 ,@(package-native-inputs billiard))))))
12168
12169 (define-public python-celery
12170 (package
12171 (name "python-celery")
12172 (version "4.2.1")
12173 (source
12174 (origin
12175 (method url-fetch)
12176 (uri (pypi-uri "celery" version))
12177 (sha256
12178 (base32
12179 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
12180 (build-system python-build-system)
12181 (arguments
12182 '(;; TODO The tests fail with Python 3.7
12183 ;; https://github.com/celery/celery/issues/4849
12184 #:tests? #f
12185 #:phases
12186 (modify-phases %standard-phases
12187 (add-after 'unpack 'patch-requirements
12188 (lambda _
12189 (substitute* "requirements/test.txt"
12190 (("pytest>=3\\.0,<3\\.3")
12191 "pytest>=3.0"))
12192 #t)))))
12193 (native-inputs
12194 `(("python-case" ,python-case)
12195 ("python-pytest" ,python-pytest)))
12196 (propagated-inputs
12197 `(("python-pytz" ,python-pytz)
12198 ("python-billiard" ,python-billiard)
12199 ("python-kombu" ,python-kombu)))
12200 (home-page "https://celeryproject.org")
12201 (synopsis "Distributed Task Queue")
12202 (description "Celery is an asynchronous task queue/job queue based on
12203 distributed message passing. It is focused on real-time operation, but
12204 supports scheduling as well. The execution units, called tasks, are executed
12205 concurrently on a single or more worker servers using multiprocessing,
12206 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
12207 synchronously (wait until ready).")
12208 (license license:bsd-3)
12209 (properties `((python2-variant . ,(delay python2-celery))))))
12210
12211 (define-public python2-celery
12212 (let ((celery (package-with-python2
12213 (strip-python2-variant python-celery))))
12214 (package/inherit celery
12215 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12216 ("python2-mock" ,python2-mock)
12217 ,@(package-native-inputs celery))))))
12218
12219 (define-public python-translitcodec
12220 (package
12221 (name "python-translitcodec")
12222 (version "0.4.0")
12223 (source
12224 (origin
12225 (method url-fetch)
12226 (uri (pypi-uri "translitcodec" version))
12227 (sha256
12228 (base32
12229 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
12230 (build-system python-build-system)
12231 (arguments
12232 `(#:tests? #f)) ; no tests provided
12233 (home-page
12234 "https://github.com/claudep/translitcodec")
12235 (synopsis
12236 "Unicode to 8-bit charset transliteration codec")
12237 (description
12238 "This package contains codecs for transliterating ISO 10646 texts into
12239 best-effort representations using smaller coded character sets (ASCII,
12240 ISO 8859, etc.).")
12241 (license license:expat)))
12242
12243 (define-public python2-translitcodec
12244 (package-with-python2 python-translitcodec))
12245
12246 (define-public python-editor
12247 (package
12248 (name "python-editor")
12249 (version "1.0.4")
12250 (source
12251 (origin
12252 (method url-fetch)
12253 (uri (pypi-uri "python-editor" version))
12254 (sha256
12255 (base32
12256 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
12257 (build-system python-build-system)
12258 (arguments
12259 '(#:tests? #f)) ;XXX: needs a TTY and an editor
12260 (home-page "https://github.com/fmoo/python-editor")
12261 (synopsis "Programmatically open an editor, capture the result")
12262 (description
12263 "python-editor is a library that provides the editor module for
12264 programmatically interfacing with your system's $EDITOR.")
12265 (license license:asl2.0)))
12266
12267 (define-public python2-editor
12268 (package-with-python2 python-editor))
12269
12270 (define-public python-multiprocessing-logging
12271 (package
12272 (name "python-multiprocessing-logging")
12273 (version "0.3.1")
12274 (home-page "https://github.com/jruere/multiprocessing-logging")
12275 (source (origin
12276 (method git-fetch)
12277 (uri (git-reference
12278 (url home-page)
12279 (commit (string-append "v" version))))
12280 (file-name (git-file-name name version))
12281 (sha256
12282 (base32
12283 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
12284 (build-system python-build-system)
12285 (synopsis "Manage logs from multiple processes")
12286 (description
12287 "This Python module implements a multiprocessing-aware @code{Handler}
12288 that, when set on the root @code{Logger}, will tunnel log records to the
12289 main process so that they are handled correctly.")
12290 (license license:lgpl3+)))
12291
12292 (define-public python-vobject
12293 (package
12294 (name "python-vobject")
12295 (version "0.9.6.1")
12296 (source (origin
12297 (method url-fetch)
12298 (uri (pypi-uri "vobject" version))
12299 (sha256
12300 (base32
12301 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
12302 (build-system python-build-system)
12303 (arguments
12304 '(;; The test suite relies on some non-portable Windows interfaces.
12305 #:tests? #f))
12306 (propagated-inputs
12307 `(("python-dateutil" ,python-dateutil)
12308 ("python-pyicu" ,python-pyicu)))
12309 (synopsis "Parse and generate vCard and vCalendar files")
12310 (description "Vobject is intended to be a full featured Python package for
12311 parsing and generating vCard and vCalendar files. Currently, iCalendar files
12312 are supported and well tested. vCard 3.0 files are supported, and all data
12313 should be imported, but only a few components are understood in a sophisticated
12314 way.")
12315 (home-page "https://eventable.github.io/vobject/")
12316 (license license:asl2.0)))
12317
12318 (define-public python2-vobject
12319 (package-with-python2 python-vobject))
12320
12321 (define-public python-munkres
12322 (package
12323 (name "python-munkres")
12324 (version "1.0.8")
12325 (source (origin
12326 (method url-fetch)
12327 (uri (pypi-uri "munkres" version))
12328 (sha256
12329 (base32
12330 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
12331 (build-system python-build-system)
12332 (arguments
12333 '(#:tests? #f)) ; no test suite
12334 (home-page "https://software.clapper.org/munkres/")
12335 (synopsis "Implementation of the Munkres algorithm")
12336 (description "The Munkres module provides an implementation of the Munkres
12337 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
12338 useful for solving the Assignment Problem.")
12339 (license license:bsd-3)))
12340
12341 (define-public python2-munkres
12342 (package-with-python2 python-munkres))
12343
12344 (define-public python-whoosh
12345 (package
12346 (name "python-whoosh")
12347 (version "2.7.4")
12348 (source
12349 (origin
12350 (method url-fetch)
12351 (uri (pypi-uri "Whoosh" version))
12352 (sha256
12353 (base32
12354 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
12355 (build-system python-build-system)
12356 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
12357 (native-inputs
12358 `(("python-pytest" ,python-pytest)))
12359 (home-page "https://bitbucket.org/mchaput/whoosh")
12360 (synopsis "Full text indexing, search, and spell checking library")
12361 (description
12362 "Whoosh is a fast, pure-Python full text indexing, search, and spell
12363 checking library.")
12364 (license license:bsd-2)))
12365
12366 (define-public python2-whoosh
12367 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
12368 (package/inherit whoosh
12369 (propagated-inputs
12370 `(("python2-backport-ssl-match-hostname"
12371 ,python2-backport-ssl-match-hostname)
12372 ,@(package-propagated-inputs whoosh))))))
12373
12374 (define-public python-pathlib
12375 (package
12376 (name "python-pathlib")
12377 (version "1.0.1")
12378 (source (origin
12379 (method url-fetch)
12380 (uri (pypi-uri "pathlib" version))
12381 (sha256
12382 (base32
12383 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
12384 (build-system python-build-system)
12385 ;; The tests depend on the internal "test" module, which does not provide
12386 ;; a stable interface.
12387 (arguments `(#:tests? #f))
12388 (home-page "https://pathlib.readthedocs.org/")
12389 (synopsis "Object-oriented file system paths")
12390 (description "Pathlib offers a set of classes to handle file system paths.
12391 It offers the following advantages over using string objects:
12392
12393 @enumerate
12394 @item No more cumbersome use of os and os.path functions. Everything can
12395 be done easily through operators, attribute accesses, and method calls.
12396 @item Embodies the semantics of different path types. For example,
12397 comparing Windows paths ignores casing.
12398 @item Well-defined semantics, eliminating any inconsistencies or
12399 ambiguities (forward vs. backward slashes, etc.).
12400 @end enumerate
12401
12402 Note: In Python 3.4, pathlib is now part of the standard library. For other
12403 Python versions please consider python-pathlib2 instead, which tracks the
12404 standard library module. This module (python-pathlib) isn't maintained
12405 anymore.")
12406 (license license:expat)))
12407
12408 (define-public python2-pathlib
12409 (package-with-python2 python-pathlib))
12410
12411 (define-public python2-pathlib2
12412 (package
12413 (name "python2-pathlib2")
12414 (version "2.3.5")
12415 (source (origin
12416 (method url-fetch)
12417 (uri (pypi-uri "pathlib2" version))
12418 (sha256
12419 (base32
12420 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
12421 (build-system python-build-system)
12422 ;; We only need the the Python 2 variant, since for Python 3 our minimum
12423 ;; version is 3.4 which already includes this package as part of the
12424 ;; standard library.
12425 (arguments
12426 `(#:python ,python-2))
12427 (propagated-inputs
12428 `(("python2-scandir" ,python2-scandir)
12429 ("python2-six" ,python2-six)))
12430 (home-page "https://pypi.org/project/pathlib2/")
12431 (synopsis "Object-oriented file system paths - backport of standard
12432 pathlib module")
12433 (description "The goal of pathlib2 is to provide a backport of standard
12434 pathlib module which tracks the standard library module, so all the newest
12435 features of the standard pathlib can be used also on older Python versions.
12436
12437 Pathlib offers a set of classes to handle file system paths. It offers the
12438 following advantages over using string objects:
12439
12440 @enumerate
12441 @item No more cumbersome use of os and os.path functions. Everything can
12442 be done easily through operators, attribute accesses, and method calls.
12443 @item Embodies the semantics of different path types. For example,
12444 comparing Windows paths ignores casing.
12445 @item Well-defined semantics, eliminating any inconsistencies or
12446 ambiguities (forward vs. backward slashes, etc.).
12447 @end enumerate")
12448 (license license:expat)))
12449
12450 (define-public python2-pathlib2-bootstrap
12451 (hidden-package
12452 (package
12453 (inherit python2-pathlib2)
12454 (name "python2-pathlib2-bootstrap")
12455 (propagated-inputs
12456 `(("python2-scandir" ,python2-scandir)
12457 ("python2-six" ,python2-six-bootstrap))))))
12458
12459 (define-public python-jellyfish
12460 (package
12461 (name "python-jellyfish")
12462 (version "0.5.6")
12463 (source (origin
12464 (method url-fetch)
12465 (uri (pypi-uri "jellyfish" version))
12466 (sha256
12467 (base32
12468 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
12469 (build-system python-build-system)
12470 (native-inputs
12471 `(("python-pytest" ,python-pytest)))
12472 (home-page "https://github.com/jamesturk/jellyfish")
12473 (synopsis "Approximate and phonetic matching of strings")
12474 (description "Jellyfish uses a variety of string comparison and phonetic
12475 encoding algorithms to do fuzzy string matching.")
12476 (license license:bsd-2)
12477 (properties `((python2-variant . ,(delay python2-jellyfish))))))
12478
12479 (define-public python2-jellyfish
12480 (let ((jellyfish (package-with-python2
12481 (strip-python2-variant python-jellyfish))))
12482 (package/inherit jellyfish
12483 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
12484 ,@(package-native-inputs jellyfish))))))
12485
12486 (define-public python2-unicodecsv
12487 (package
12488 (name "python2-unicodecsv")
12489 (version "0.14.1")
12490 (source (origin
12491 (method git-fetch)
12492 ;; The test suite is not included in the PyPi release.
12493 ;; https://github.com/jdunck/python-unicodecsv/issues/19
12494 (uri (git-reference
12495 (url "https://github.com/jdunck/python-unicodecsv")
12496 (commit version)))
12497 (file-name (git-file-name name version))
12498 (sha256
12499 (base32
12500 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
12501 (build-system python-build-system)
12502 (arguments
12503 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
12504 #:python ,python-2))
12505 (native-inputs
12506 `(("python2-unittest2" ,python2-unittest2)))
12507 (home-page "https://github.com/jdunck/python-unicodecsv")
12508 (synopsis "Unicode CSV module for Python 2")
12509 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
12510 module, adding support for Unicode strings.")
12511 (license license:bsd-2)))
12512
12513 (define-public python-pdfminer-six
12514 (package
12515 (name "python-pdfminer-six")
12516 (version "20201018")
12517 ;; There are no tests in the PyPI tarball.
12518 (source
12519 (origin
12520 (method git-fetch)
12521 (uri (git-reference
12522 (url "https://github.com/pdfminer/pdfminer.six")
12523 (commit version)))
12524 (file-name (git-file-name name version))
12525 (sha256
12526 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
12527 (build-system python-build-system)
12528 (arguments
12529 `(#:phases
12530 (modify-phases %standard-phases
12531 ;; Tests write to the source tree.
12532 (add-after 'unpack 'make-git-checkout-writable
12533 (lambda _
12534 (for-each make-file-writable (find-files "."))
12535 #t))
12536 (replace 'check
12537 (lambda _
12538 (invoke "make" "test")))
12539 (add-before 'reset-gzip-timestamps 'make-files-writable
12540 (lambda* (#:key outputs #:allow-other-keys)
12541 (let ((out (assoc-ref outputs "out")))
12542 (for-each make-file-writable
12543 (find-files out "\\.gz$"))
12544 #t))))))
12545 (propagated-inputs
12546 `(("python-chardet" ,python-chardet)
12547 ("python-cryptography" ,python-cryptography)
12548 ("python-sortedcontainers" ,python-sortedcontainers)))
12549 (native-inputs
12550 `(("python-nose" ,python-nose)
12551 ("python-tox" ,python-tox)))
12552 (home-page "https://github.com/pdfminer/pdfminer.six")
12553 (synopsis "PDF parser and analyzer")
12554 (description "@code{pdfminer.six} is a community maintained fork of
12555 the original PDFMiner. It is a tool for extracting information from PDF
12556 documents. It focuses on getting and analyzing text data. Pdfminer.six
12557 extracts the text from a page directly from the sourcecode of the PDF. It
12558 can also be used to get the exact location, font or color of the text.")
12559 (license license:expat)))
12560
12561 (define-public python-rarfile
12562 (package
12563 (name "python-rarfile")
12564 (version "2.8")
12565 (source (origin
12566 (method url-fetch)
12567 (uri (pypi-uri "rarfile" version))
12568 (sha256
12569 (base32
12570 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
12571 (build-system python-build-system)
12572 (arguments
12573 '(#:phases
12574 (modify-phases %standard-phases
12575 (replace 'check
12576 ;; Many tests fail, but the installation proceeds.
12577 (lambda _ (invoke "make" "-C" "test" "test"))))))
12578 (native-inputs
12579 `(("which" ,which))) ; required for tests
12580 (propagated-inputs
12581 `(("libarchive" ,libarchive)))
12582 (home-page "https://github.com/markokr/rarfile")
12583 (synopsis "RAR archive reader for Python")
12584 (description "This is Python module for RAR archive reading. The interface
12585 is made as zipfile like as possible.")
12586 (license license:isc)))
12587
12588 (define-public python2-rarfile
12589 (package-with-python2 python-rarfile))
12590
12591 (define-public python-magic
12592 (package
12593 (name "python-magic")
12594 (version "0.4.15")
12595 (source
12596 (origin
12597 (method url-fetch)
12598 (uri (pypi-uri "python-magic" version))
12599 (sha256
12600 (base32
12601 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
12602 (file-name (string-append name "-" version "-checkout"))))
12603 (build-system python-build-system)
12604 (arguments
12605 ;; The tests are unreliable, so don't run them. The tests fail
12606 ;; under Python3 because they were written for Python2 and
12607 ;; contain import statements that do not work in Python3. One of
12608 ;; the tests fails under Python2 because its assertions are
12609 ;; overly stringent; it relies on comparing output strings which
12610 ;; are brittle and can change depending on the version of
12611 ;; libmagic being used and the system on which the test is
12612 ;; running. In my case, under GuixSD 0.10.0, only one test
12613 ;; failed, and it seems to have failed only because the version
12614 ;; of libmagic that is packaged in Guix outputs a slightly
12615 ;; different (but not wrong) string than the one that the test
12616 ;; expected.
12617 '(#:tests? #f
12618 #:phases (modify-phases %standard-phases
12619 ;; Replace a specific method call with a hard-coded
12620 ;; path to the necessary libmagic.so file in the
12621 ;; store. If we don't do this, then the method call
12622 ;; will fail to find the libmagic.so file, which in
12623 ;; turn will cause any application using
12624 ;; python-magic to fail.
12625 (add-before 'build 'hard-code-path-to-libmagic
12626 (lambda* (#:key inputs #:allow-other-keys)
12627 (let ((file (assoc-ref inputs "file")))
12628 (substitute* "magic.py"
12629 (("ctypes.util.find_library\\('magic'\\)")
12630 (string-append "'" file "/lib/libmagic.so'")))
12631 #t)))
12632 (add-before 'install 'disable-egg-compression
12633 (lambda _
12634 (let ((port (open-file "setup.cfg" "a")))
12635 (display "\n[easy_install]\nzip_ok = 0\n"
12636 port)
12637 (close-port port)
12638 #t))))))
12639 (inputs
12640 ;; python-magic needs to be able to find libmagic.so.
12641 `(("file" ,file)))
12642 (home-page
12643 "https://github.com/ahupp/python-magic")
12644 (synopsis
12645 "File type identification using libmagic")
12646 (description
12647 "This module uses ctypes to access the libmagic file type
12648 identification library. It makes use of the local magic database and
12649 supports both textual and MIME-type output. Note that this module and
12650 the python-file module both provide a \"magic.py\" file; these two
12651 modules, which are different and were developed separately, both serve
12652 the same purpose: to provide Python bindings for libmagic.")
12653 (license license:expat)))
12654
12655 (define-public python2-magic
12656 (package-with-python2 python-magic))
12657
12658 (define-public python2-s3cmd
12659 (package
12660 (name "python2-s3cmd")
12661 (version "1.6.1")
12662 (source
12663 (origin
12664 (method url-fetch)
12665 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12666 "s3cmd-" version ".tar.gz"))
12667 (sha256
12668 (base32
12669 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12670 (build-system python-build-system)
12671 (arguments
12672 ;; s3cmd is written for python2 only and contains no tests.
12673 `(#:python ,python-2
12674 #:tests? #f))
12675 (propagated-inputs
12676 `(("python2-dateutil" ,python2-dateutil)
12677 ;; The python-file package also provides a magic.py module.
12678 ;; This is an unfortunate state of affairs; however, s3cmd
12679 ;; fails to install if it cannot find specifically the
12680 ;; python-magic package. Thus we include it, instead of using
12681 ;; python-file. Ironically, s3cmd sometimes works better
12682 ;; without libmagic bindings at all:
12683 ;; https://github.com/s3tools/s3cmd/issues/198
12684 ("python2-magic" ,python2-magic)))
12685 (home-page "https://s3tools.org/s3cmd")
12686 (synopsis "Command line tool for S3-compatible storage services")
12687 (description
12688 "S3cmd is a command line tool for uploading, retrieving and managing data
12689 in storage services that are compatible with the Amazon Simple Storage
12690 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12691 GnuPG encryption, and more. It also supports management of Amazon's
12692 CloudFront content delivery network.")
12693 (license license:gpl2+)))
12694
12695 (define-public python-pkgconfig
12696 (package
12697 (name "python-pkgconfig")
12698 (version "1.3.1")
12699 (source
12700 (origin
12701 (method url-fetch)
12702 (uri (pypi-uri "pkgconfig" version))
12703 (sha256
12704 (base32
12705 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
12706 (build-system python-build-system)
12707 (native-inputs
12708 `(("python-nose" ,python-nose)))
12709 (inputs
12710 `(("pkg-config" ,pkg-config)))
12711 (arguments
12712 `(#:phases
12713 (modify-phases %standard-phases
12714 (add-before 'build 'patch
12715 ;; Hard-code the path to pkg-config.
12716 (lambda _
12717 (substitute* "pkgconfig/pkgconfig.py"
12718 (("cmd = 'pkg-config")
12719 (string-append "cmd = '" (which "pkg-config"))))
12720 #t))
12721 (replace 'check
12722 (lambda _
12723 (invoke "nosetests" "test.py"))))))
12724 (home-page "https://github.com/matze/pkgconfig")
12725 (synopsis "Python interface for pkg-config")
12726 (description "This module provides a Python interface to pkg-config. It
12727 can be used to find all pkg-config packages, check if a package exists,
12728 check if a package meets certain version requirements, query CFLAGS and
12729 LDFLAGS and parse the output to build extensions with setup.py.")
12730 (license license:expat)))
12731
12732 (define-public python2-pkgconfig
12733 (package-with-python2 python-pkgconfig))
12734
12735 (define-public python-bz2file
12736 (package
12737 (name "python-bz2file")
12738 (version "0.98")
12739 (source
12740 (origin
12741 (method url-fetch)
12742 (uri (pypi-uri "bz2file" version))
12743 (sha256
12744 (base32
12745 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12746 (build-system python-build-system)
12747 (arguments
12748 `(#:tests? #f)) ; Tests use deprecated python modules.
12749 (home-page "https://github.com/nvawda/bz2file")
12750 (synopsis "Read and write bzip2-compressed files")
12751 (description
12752 "Bz2file is a Python library for reading and writing bzip2-compressed
12753 files. It contains a drop-in replacement for the I/O interface in the
12754 standard library's @code{bz2} module, including features from the latest
12755 development version of CPython that are not available in older releases.")
12756 (license license:asl2.0)))
12757
12758 (define-public python2-bz2file
12759 (package-with-python2 python-bz2file))
12760
12761 (define-public python-future
12762 (package
12763 (name "python-future")
12764 (version "0.17.1")
12765 (source
12766 (origin
12767 (method url-fetch)
12768 (uri (pypi-uri "future" version))
12769 (sha256
12770 (base32
12771 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12772 (build-system python-build-system)
12773 ;; Many tests connect to the network or are otherwise flawed.
12774 ;; https://github.com/PythonCharmers/python-future/issues/210
12775 (arguments
12776 `(#:tests? #f))
12777 (home-page "https://python-future.org")
12778 (synopsis "Single-source support for Python 3 and 2")
12779 (description
12780 "@code{python-future} is the missing compatibility layer between Python 2 and
12781 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12782 to support both Python 2 and Python 3 with minimal overhead.")
12783 (license license:expat)))
12784
12785 (define-public python2-future
12786 (package-with-python2 python-future))
12787
12788 (define-public python-cysignals
12789 (package
12790 (name "python-cysignals")
12791 (version "1.9.0")
12792 (source
12793 (origin
12794 (method url-fetch)
12795 (uri (pypi-uri "cysignals" version))
12796 (sha256
12797 (base32
12798 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12799 (build-system python-build-system)
12800 (native-inputs
12801 `(("python-cython" ,python-cython)
12802 ("python-sphinx" ,python-sphinx)))
12803 (inputs
12804 `(("pari-gp" ,pari-gp)))
12805 (arguments
12806 `(#:modules ((guix build python-build-system)
12807 ((guix build gnu-build-system) #:prefix gnu:)
12808 (guix build utils))
12809 ;; FIXME: Tests are executed after installation and currently fail
12810 ;; when not installing into standard locations; the author is working
12811 ;; on a fix.
12812 #:tests? #f
12813 #:phases
12814 (modify-phases %standard-phases
12815 (add-before
12816 'build 'configure
12817 (assoc-ref gnu:%standard-phases 'configure)))))
12818 (home-page
12819 "https://github.com/sagemath/cysignals")
12820 (synopsis
12821 "Handling of interrupts and signals for Cython")
12822 (description
12823 "The cysignals package provides mechanisms to handle interrupts (and
12824 other signals and errors) in Cython code, using two related approaches,
12825 for mixed Cython/Python code or external C libraries and pure Cython code,
12826 respectively.")
12827 (license license:lgpl3+)))
12828
12829 (define-public python2-cysignals
12830 (package-with-python2 python-cysignals))
12831
12832 (define-public python2-shedskin
12833 (package
12834 (name "python2-shedskin")
12835 (version "0.9.4")
12836 (source
12837 (origin
12838 (method url-fetch)
12839 (uri (string-append "https://github.com/shedskin/shedskin/"
12840 "releases/download/v" version
12841 "/shedskin-" version ".tgz"))
12842 (sha256
12843 (base32
12844 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12845 (build-system python-build-system)
12846 (arguments
12847 `(#:python ,python-2
12848 #:phases (modify-phases %standard-phases
12849 (add-after 'unpack 'fix-resulting-include-libs
12850 (lambda* (#:key inputs #:allow-other-keys)
12851 (let ((libgc (assoc-ref inputs "libgc"))
12852 (pcre (assoc-ref inputs "pcre")))
12853 (substitute* "shedskin/makefile.py"
12854 (("variable == 'CCFLAGS':[ ]*")
12855 (string-append "variable == 'CCFLAGS':\n"
12856 " line += ' -I " pcre "/include"
12857 " -I " libgc "/include'"))
12858 (("variable == 'LFLAGS':[ ]*")
12859 (string-append "variable == 'LFLAGS':\n"
12860 " line += ' -L" pcre "/lib"
12861 " -L " libgc "/lib'")))
12862 #t))))))
12863 (inputs `(("pcre" ,pcre)
12864 ("libgc" ,libgc)))
12865 (home-page "https://shedskin.github.io/")
12866 (synopsis "Experimental Python-2 to C++ Compiler")
12867 (description (string-append "This is an experimental compiler for a subset of
12868 Python. It generates C++ code and a Makefile."))
12869 (license (list license:gpl3 license:bsd-3 license:expat))))
12870
12871 (define-public python2-rope
12872 (package
12873 (name "python2-rope")
12874 (version "0.11.0")
12875 (source
12876 (origin
12877 (method url-fetch)
12878 (uri (pypi-uri "rope" version))
12879 (sha256
12880 (base32
12881 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12882 (arguments
12883 ;; Rope has only partial python3 support, see `python-rope'
12884 `(#:python ,python-2))
12885 (build-system python-build-system)
12886 (native-inputs
12887 `(("python2-unittest2" ,python2-unittest2)))
12888 (home-page "https://github.com/python-rope/rope")
12889 (synopsis "Refactoring library for Python")
12890 (description "Rope is a refactoring library for Python. It facilitates
12891 the renaming, moving and extracting of attributes, functions, modules, fields
12892 and parameters in Python 2 source code. These refactorings can also be applied
12893 to occurrences in strings and comments.")
12894 (license license:gpl2)))
12895
12896 (define-public python-rope
12897 (package/inherit python2-rope
12898 (name "python-rope")
12899 (arguments `(#:python ,python-wrapper
12900 ;; XXX: Only partial python3 support, results in some failing
12901 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12902 #:tests? #f))
12903 (properties `((python2-variant . ,(delay python2-rope))))))
12904
12905 (define-public python-py3status
12906 (package
12907 (name "python-py3status")
12908 (version "3.21")
12909 (source
12910 (origin
12911 (method url-fetch)
12912 (uri (pypi-uri "py3status" version))
12913 (sha256
12914 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12915 (build-system python-build-system)
12916 (inputs
12917 `(("file" ,file)))
12918 (arguments
12919 '(#:phases
12920 (modify-phases %standard-phases
12921 ;; 'file' is used for detection of configuration file encoding
12922 ;; let's make link the dependency to particular input
12923 (add-before 'build 'patch-file-path
12924 (lambda* (#:key inputs #:allow-other-keys)
12925 (let ((file-path (assoc-ref inputs "file")))
12926 (substitute* "py3status/parse_config.py"
12927 (("\\[\"file\", \"-b\"")
12928 (string-append "['" file-path "/bin/file', '-b'")))
12929 #t))))
12930 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12931 (home-page "https://github.com/ultrabug/py3status")
12932 (synopsis "Extensible i3status wrapper written in Python")
12933 (description "py3status is an i3status wrapper which extends i3status
12934 functionality in a modular way, allowing you to extend your panel with your
12935 own code, responding to click events and updating clock every second.")
12936 (license license:bsd-3)))
12937
12938 (define-public python2-selectors2
12939 (package
12940 (name "python2-selectors2")
12941 (version "2.0.1")
12942 (source (origin
12943 (method url-fetch)
12944 (uri (pypi-uri "selectors2" version))
12945 (sha256
12946 (base32
12947 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12948 (build-system python-build-system)
12949 (arguments
12950 `(#:python ,python-2))
12951 (native-inputs
12952 `(("python2-mock" ,python2-mock)
12953 ("python2-psutil" ,python2-psutil)))
12954 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12955 (synopsis "Backport of the selectors module from Python 3.5+")
12956 (description
12957 "This package provides a drop-in replacement for the @code{selectors}
12958 module in Python 3.5 and later.")
12959 (license license:expat)))
12960
12961 (define-public python-tblib
12962 (package
12963 (name "python-tblib")
12964 (version "1.6.0")
12965 (source (origin
12966 (method url-fetch)
12967 (uri (pypi-uri "tblib" version))
12968 (sha256
12969 (base32
12970 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12971 (build-system python-build-system)
12972 (arguments
12973 `(#:phases
12974 (modify-phases %standard-phases
12975 (replace 'check
12976 (lambda _
12977 ;; Upstream runs tests after installation and the package itself
12978 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12979 ;; found.
12980 (setenv "PYTHONPATH"
12981 (string-append (getcwd) "/build/lib:"
12982 (getenv "PYTHONPATH")))
12983 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12984 (native-inputs
12985 `(("python-pytest" ,python-pytest)
12986 ("python-six" ,python-six)))
12987 (home-page "https://github.com/ionelmc/python-tblib")
12988 (synopsis "Traceback serialization library")
12989 (description
12990 "Traceback serialization allows you to:
12991
12992 @enumerate
12993 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
12994 different processes. This allows better error handling when running code over
12995 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12996
12997 @item Parse traceback strings and raise with the parsed tracebacks.
12998 @end enumerate\n")
12999 (license license:bsd-3)))
13000
13001 (define-public python2-tblib
13002 (package-with-python2 python-tblib))
13003
13004 (define-public python-greenlet
13005 (package
13006 (name "python-greenlet")
13007 (version "1.0.0")
13008 (source (origin
13009 (method url-fetch)
13010 (uri (pypi-uri "greenlet" version))
13011 (sha256
13012 (base32
13013 "1y6wbg9yhm9dw6m768n4yslp56h85pnxkk3drz6icn15g6f1d7ki"))))
13014 (build-system python-build-system)
13015 (home-page "https://greenlet.readthedocs.io/")
13016 (synopsis "Lightweight in-process concurrent programming")
13017 (description
13018 "Greenlet package is a spin-off of Stackless, a version of CPython
13019 that supports micro-threads called \"tasklets\". Tasklets run
13020 pseudo-concurrently (typically in a single or a few OS-level threads) and
13021 are synchronized with data exchanges on \"channels\".")
13022 (license (list license:psfl license:expat))))
13023
13024 (define-public python-objgraph
13025 (package
13026 (name "python-objgraph")
13027 (version "3.4.1")
13028 (source
13029 (origin
13030 (method url-fetch)
13031 (uri (pypi-uri "objgraph" version))
13032 (sha256
13033 (base32
13034 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
13035 (build-system python-build-system)
13036 (propagated-inputs
13037 `(("python-graphviz" ,python-graphviz)))
13038 (native-inputs
13039 `(("python-mock" ,python-mock)
13040 ("graphviz" ,graphviz)))
13041 (home-page "https://mg.pov.lt/objgraph/")
13042 (synopsis "Draw Python object reference graphs with graphviz")
13043 (description
13044 "This package provides tools to draw Python object reference graphs with
13045 graphviz.")
13046 (license license:expat)))
13047
13048 (define-public python2-objgraph
13049 (package-with-python2 python-objgraph))
13050
13051 (define-public python-gevent
13052 (package
13053 (name "python-gevent")
13054 (version "21.1.2")
13055 (source (origin
13056 (method url-fetch)
13057 (uri (pypi-uri "gevent" version))
13058 (sha256
13059 (base32
13060 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
13061 (modules '((guix build utils)))
13062 (snippet
13063 '(begin
13064 ;; unbunding libev and c-ares
13065 (delete-file-recursively "deps")))))
13066 (build-system python-build-system)
13067 (arguments
13068 `(#:modules ((ice-9 ftw)
13069 (ice-9 match)
13070 (srfi srfi-26)
13071 (guix build utils)
13072 (guix build python-build-system))
13073 #:phases (modify-phases %standard-phases
13074 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
13075 (lambda _
13076 (substitute* "src/gevent/subprocess.py"
13077 (("/bin/sh") (which "sh")))
13078 (for-each (lambda (file)
13079 (substitute* file
13080 (("/bin/sh") (which "sh"))
13081 (("/bin/true") (which "true"))))
13082 (find-files "src/greentest" "\\.py$"))))
13083 (add-before 'build 'do-not-use-bundled-sources
13084 (lambda _
13085 (setenv "GEVENTSETUP_EMBED" "0")
13086
13087 ;; Prevent building bundled libev.
13088 (substitute* "setup.py"
13089 (("run_make=_BUILDING")
13090 "run_make=False"))))
13091 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
13092 (lambda* (#:key inputs #:allow-other-keys)
13093 (let ((greenlet (string-append
13094 (assoc-ref inputs "python-greenlet")
13095 "/include")))
13096 (match (scandir greenlet
13097 (lambda (item)
13098 (string-prefix? "python" item)))
13099 ((python)
13100 (setenv "C_INCLUDE_PATH"
13101 (string-append greenlet "/" python ":"
13102 (or (getenv "C_INCLUDE_PATH")
13103 ""))))))))
13104 (add-before 'check 'pretend-to-be-CI
13105 (lambda _
13106 ;; A few tests are skipped due to network constraints or
13107 ;; get longer timeouts when running in a CI environment.
13108 ;; Piggy-back on that, as we need the same adjustments.
13109 (setenv "TRAVIS" "1")
13110 (setenv "APPVEYOR" "1")))
13111 (add-before 'check 'adjust-tests
13112 (lambda _
13113 (let ((disabled-tests
13114 '(;; These tests relies on networking which is
13115 ;; not available in the build container.
13116 "test__getaddrinfo_import.py"
13117 "test__server_pywsgi.py"
13118 ;; XXX: These tests borrow functionality from the
13119 ;; Python builtin 'test' module, but it is not
13120 ;; installed with the Guix Python distribution.
13121 "test_smtpd.py"
13122 "test_wsgiref.py"
13123 "test_urllib2.py"
13124 "test_thread.py"
13125 "test_threading.py"
13126 "test__threading_2.py"
13127 ;; These tests rely on KeyboardInterrupts which do not
13128 ;; work inside the build container for some reason
13129 ;; (lack of controlling terminal?).
13130 "test_subprocess.py"
13131 "test__issues461_471.py"
13132 ;; TODO: Patch out the tests that use getprotobyname, etc
13133 ;; instead of disabling all the tests from these files.
13134 "test__resolver_dnspython.py"
13135 "test__doctests.py"
13136 "test__all__.py"
13137 "test___config.py"
13138 "test__execmodules.py")))
13139 (call-with-output-file "skipped_tests.txt"
13140 (lambda (port)
13141 (format port "~a~%"
13142 (string-join disabled-tests "\n")))))))
13143 (replace 'check
13144 (lambda _
13145 ;; Make sure the build directory is on PYTHONPATH.
13146 (setenv "PYTHONPATH"
13147 (string-append
13148 (getenv "PYTHONPATH") ":"
13149 (getcwd) "/build/"
13150 (car (scandir "build" (cut string-prefix? "lib." <>)))))
13151
13152 ;; Use the build daemons configured number of workers.
13153 (setenv "NWORKERS" (number->string (parallel-job-count)))
13154
13155 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
13156 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
13157 (propagated-inputs
13158 `(("python-greenlet" ,python-greenlet)
13159 ("python-objgraph" ,python-objgraph)
13160 ("python-zope.event" ,python-zope-event)
13161 ("python-zope.interface" ,python-zope-interface)))
13162 (native-inputs
13163 `(("python-six" ,python-six)
13164
13165 ;; For tests.
13166 ("python-dnspython" ,python-dnspython)
13167 ("python-psutil" ,python-psutil)))
13168 (inputs
13169 `(("c-ares" ,c-ares)
13170 ("libev" ,libev)))
13171 (home-page "https://www.gevent.org/")
13172 (synopsis "Coroutine-based network library")
13173 (description
13174 "@code{gevent} is a coroutine-based Python networking library that uses
13175 @code{greenlet} to provide a high-level synchronous API on top of the
13176 @code{libev} event loop.")
13177 (license license:expat)))
13178
13179 (define-public python-fastimport
13180 (package
13181 (name "python-fastimport")
13182 (version "0.9.8")
13183 (source
13184 (origin
13185 (method url-fetch)
13186 (uri (pypi-uri "fastimport" version))
13187 (sha256
13188 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
13189 (build-system python-build-system)
13190 (home-page "https://github.com/jelmer/python-fastimport")
13191 (synopsis "VCS fastimport parser and generator in Python")
13192 (description "This package provides a parser for and generator of the Git
13193 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
13194 format.")
13195 (license license:gpl2+)))
13196
13197 (define-public python2-fastimport
13198 (package-with-python2 python-fastimport))
13199
13200 (define-public python-twisted
13201 (package
13202 (name "python-twisted")
13203 (version "19.7.0")
13204 (source (origin
13205 (method url-fetch)
13206 (uri (pypi-uri "Twisted" version ".tar.bz2"))
13207 (sha256
13208 (base32
13209 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
13210 (build-system python-build-system)
13211 (arguments
13212 '(#:tests? #f)) ; FIXME: some tests fail
13213 (propagated-inputs
13214 `(("python-zope-interface" ,python-zope-interface)
13215 ("python-pyhamcrest" ,python-pyhamcrest)
13216 ("python-incremental" ,python-incremental)
13217 ("python-hyperlink" ,python-hyperlink)
13218 ("python-constantly" ,python-constantly)
13219 ("python-automat" ,python-automat)))
13220 (home-page "https://twistedmatrix.com/")
13221 (synopsis "Asynchronous networking framework written in Python")
13222 (description
13223 "Twisted is an extensible framework for Python programming, with special
13224 focus on event-based network programming and multiprotocol integration.")
13225 (license license:expat)))
13226
13227 (define-public python2-twisted
13228 (package-with-python2 python-twisted))
13229
13230 (define-public python-pika
13231 (package
13232 (name "python-pika")
13233 (version "0.12.0")
13234 (source
13235 (origin
13236 (method url-fetch)
13237 (uri (pypi-uri "pika" version))
13238 (sha256
13239 (base32
13240 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
13241 (build-system python-build-system)
13242 (native-inputs
13243 `(("python-pyev" ,python-pyev)
13244 ("python-tornado" ,python-tornado)
13245 ("python-twisted" ,python-twisted)))
13246 (home-page "https://pika.readthedocs.org")
13247 (synopsis "Pure Python AMQP Client Library")
13248 (description
13249 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
13250 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
13251 network support library.")
13252 (license license:bsd-3)))
13253
13254 (define-public python2-pika
13255 (package-with-python2 python-pika))
13256
13257 (define-public python-ply
13258 (package
13259 (name "python-ply")
13260 (version "3.11")
13261 (source
13262 (origin
13263 (method url-fetch)
13264 (uri (pypi-uri "ply" version))
13265 (sha256
13266 (base32
13267 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
13268 (build-system python-build-system)
13269 (home-page "http://www.dabeaz.com/ply/")
13270 (synopsis "Python Lex & Yacc")
13271 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
13272 It uses LR parsing and does extensive error checking.")
13273 (license license:bsd-3)))
13274
13275 (define-public python-tabulate
13276 (package
13277 (name "python-tabulate")
13278 (version "0.8.7")
13279 (source (origin
13280 (method url-fetch)
13281 (uri (pypi-uri "tabulate" version))
13282 (sha256
13283 (base32
13284 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
13285 (build-system python-build-system)
13286 (arguments
13287 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
13288 ;; and the latest release is not tagged in the upstream repository.
13289 '(#:tests? #f))
13290 (home-page "https://bitbucket.org/astanin/python-tabulate")
13291 (synopsis "Pretty-print tabular data")
13292 (description
13293 "Tabulate is a library and command-line utility to pretty-print tabular
13294 data in Python.")
13295 (license license:expat)))
13296
13297 (define-public python2-tabulate
13298 (package-with-python2 python-tabulate))
13299
13300 (define-public python-kazoo
13301 (package
13302 (name "python-kazoo")
13303 (version "2.4.0")
13304 (source
13305 (origin
13306 (method url-fetch)
13307 (uri (pypi-uri "kazoo" version))
13308 (sha256
13309 (base32
13310 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
13311 (build-system python-build-system)
13312 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
13313 (propagated-inputs
13314 `(("python-six" ,python-six)))
13315 (home-page "https://kazoo.readthedocs.org")
13316 (synopsis "High-level Zookeeper client library")
13317 (description
13318 "Kazoo is a Python client library for the Apache Zookeeper distributed
13319 application service. It is designed to be easy to use and to avoid common
13320 programming errors.")
13321 (license license:asl2.0)))
13322
13323 (define-public python2-kazoo
13324 (package-with-python2 python-kazoo))
13325
13326 (define-public python-pykafka
13327 (package
13328 (name "python-pykafka")
13329 (version "2.4.0")
13330 (source (origin
13331 (method url-fetch)
13332 (uri (pypi-uri "pykafka" version))
13333 (sha256
13334 (base32
13335 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
13336 (build-system python-build-system)
13337 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
13338 (propagated-inputs
13339 `(("python-gevent" ,python-gevent)
13340 ("python-kazoo" ,python-kazoo)
13341 ("python-tabulate" ,python-tabulate)))
13342 (inputs
13343 `(("librdkafka" ,librdkafka)))
13344 (home-page "https://pykafka.readthedocs.io/")
13345 (synopsis "Apache Kafka client for Python")
13346 (description
13347 "PyKafka is a client for the Apache Kafka distributed messaging system.
13348 It includes Python implementations of Kafka producers and consumers, which
13349 are optionally backed by a C extension built on librdkafka.")
13350 (license license:asl2.0)))
13351
13352 (define-public python-wcwidth
13353 (package
13354 (name "python-wcwidth")
13355 (version "0.1.8")
13356 (source (origin
13357 (method url-fetch)
13358 (uri (pypi-uri "wcwidth" version))
13359 (sha256
13360 (base32
13361 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
13362 (build-system python-build-system)
13363 (home-page "https://github.com/jquast/wcwidth")
13364 (synopsis "Measure number of terminal column cells of wide-character codes")
13365 (description "Wcwidth measures the number of terminal column cells of
13366 wide-character codes. It is useful for those implementing a terminal emulator,
13367 or programs that carefully produce output to be interpreted by one. It is a
13368 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
13369 specified in POSIX.1-2001 and POSIX.1-2008.")
13370 (license license:expat)))
13371
13372 (define-public python2-wcwidth
13373 (package-with-python2 python-wcwidth))
13374
13375 (define-public python2-jsonrpclib
13376 (package
13377 (name "python2-jsonrpclib")
13378 (version "0.1.7")
13379 (source (origin
13380 (method url-fetch)
13381 (uri (pypi-uri "jsonrpclib" version))
13382 (sha256
13383 (base32
13384 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
13385 (build-system python-build-system)
13386 (arguments
13387 `(#:tests? #f
13388 #:python ,python-2))
13389 (home-page "https://github.com/joshmarshall/jsonrpclib/")
13390 (synopsis "Implementation of JSON-RPC specification for Python")
13391 (description
13392 "This library is an implementation of the JSON-RPC specification.
13393 It supports both the original 1.0 specification, as well as the
13394 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
13395 etc.")
13396 (license license:asl2.0)))
13397
13398 (define-public python-chai
13399 (package
13400 (name "python-chai")
13401 (version "1.1.2")
13402 (source (origin
13403 (method url-fetch)
13404 (uri (pypi-uri "chai" version))
13405 (sha256
13406 (base32
13407 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
13408 (build-system python-build-system)
13409 (home-page "https://github.com/agoragames/chai")
13410 (synopsis "Mocking framework for Python")
13411 (description
13412 "Chai provides an api for mocking, stubbing and spying your python
13413 objects, patterned after the Mocha library for Ruby.")
13414 (license license:bsd-3)))
13415
13416 (define-public python2-chai
13417 (package-with-python2 python-chai))
13418
13419 (define-public python-inflection
13420 (package
13421 (name "python-inflection")
13422 (version "0.3.1")
13423 (source
13424 (origin (method url-fetch)
13425 (uri (pypi-uri "inflection" version))
13426 (sha256
13427 (base32
13428 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
13429 (build-system python-build-system)
13430 (native-inputs
13431 `(("python-pytest" ,python-pytest)))
13432 (home-page "https://github.com/jpvanhal/inflection")
13433 (synopsis "Python string transformation library")
13434 (description
13435 "Inflection is a string transformation library. It singularizes
13436 and pluralizes English words, and transforms strings from CamelCase to
13437 underscored string.")
13438 (license license:expat)))
13439
13440 (define-public python2-inflection
13441 (package-with-python2 python-inflection))
13442
13443 (define-public python-pylev
13444 (package
13445 (name "python-pylev")
13446 (version "1.3.0")
13447 (source (origin
13448 (method url-fetch)
13449 (uri (pypi-uri "pylev" version))
13450 (sha256
13451 (base32
13452 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
13453 (build-system python-build-system)
13454 (home-page "https://github.com/toastdriven/pylev")
13455 (synopsis "Levenshtein distance implementation in Python")
13456 (description "Pure Python Levenshtein implementation, based off the
13457 Wikipedia code samples at
13458 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
13459 (license license:bsd-3)))
13460
13461 (define-public python2-pylev
13462 (package-with-python2 python-pylev))
13463
13464 (define-public python-cleo
13465 (package
13466 (name "python-cleo")
13467 (version "0.8.1")
13468 (source (origin
13469 (method url-fetch)
13470 (uri (pypi-uri "cleo" version))
13471 (sha256
13472 (base32
13473 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
13474 (build-system python-build-system)
13475 (native-inputs
13476 `( ;; For testing
13477 ("python-mock" ,python-mock)
13478 ("python-pytest-mock" ,python-pytest-mock)
13479 ("python-pytest" ,python-pytest)))
13480 (propagated-inputs
13481 `(("python-backpack" ,python-backpack)
13482 ("python-clikit" ,python-clikit)
13483 ("python-pastel" ,python-pastel)
13484 ("python-pylev" ,python-pylev)))
13485 (home-page "https://github.com/sdispater/cleo")
13486 (synopsis "Command-line arguments library for Python")
13487 (description
13488 "Cleo allows you to create command-line commands with signature in
13489 docstring and colored output.")
13490 (license license:expat)))
13491
13492 (define-public python2-cleo
13493 (package-with-python2 python-cleo))
13494
13495 (define-public python-tomlkit
13496 (package
13497 (name "python-tomlkit")
13498 (version "0.7.0")
13499 (source
13500 (origin
13501 (method url-fetch)
13502 (uri (pypi-uri "tomlkit" version))
13503 (sha256
13504 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
13505 (build-system python-build-system)
13506 (native-inputs
13507 `(("python-pytest" ,python-pytest)
13508 ("python-pyyaml" ,python-pyyaml)))
13509 (home-page "https://github.com/sdispater/tomlkit")
13510 (synopsis "Style-preserving TOML library")
13511 (description
13512 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
13513 preserves all comments, indentations, whitespace and internal element ordering,
13514 and makes them accessible and editable via an intuitive API. It can also
13515 create new TOML documents from scratch using the provided helpers. Part of the
13516 implementation has been adapted, improved, and fixed from Molten.")
13517 (license license:expat)))
13518
13519 (define-public python-shellingham
13520 (package
13521 (name "python-shellingham")
13522 (version "1.3.2")
13523 (source
13524 (origin
13525 (method url-fetch)
13526 (uri (pypi-uri "shellingham" version))
13527 (sha256
13528 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
13529 (build-system python-build-system)
13530 (arguments
13531 `(#:phases
13532 (modify-phases %standard-phases
13533 (add-after 'unpack 'restore-setup.py
13534 ;; setup.py will return in the next release.
13535 ;; <https://github.com/sarugaku/shellingham/issues/33>
13536 (lambda _
13537 (with-output-to-file "setup.py"
13538 (lambda _
13539 (display "from setuptools import setup\nsetup()\n")))
13540 #t)))))
13541 (home-page "https://github.com/sarugaku/shellingham")
13542 (synopsis "Tool to detect surrounding shell")
13543 (description
13544 "Shellingham detects what shell the current Python executable is
13545 running in.")
13546 (license license:isc)))
13547
13548 (define-public python-memcached
13549 (package
13550 (name "python-memcached")
13551 (version "1.59")
13552 (source
13553 (origin
13554 (method url-fetch)
13555 (uri (pypi-uri "python-memcached" version))
13556 (sha256
13557 (base32
13558 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13559 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13560 (build-system python-build-system)
13561 (propagated-inputs `(("python-six" ,python-six)))
13562 (home-page
13563 "https://github.com/linsomniac/python-memcached")
13564 (synopsis "Pure python memcached client")
13565 (description
13566 "This software is a pure Python interface to the memcached memory cache
13567 daemon. It is the client side software which allows storing values in one or
13568 more, possibly remote, memcached servers.")
13569 (license license:psfl)))
13570
13571 (define-public python-clikit
13572 (package
13573 (name "python-clikit")
13574 (version "0.6.2")
13575 (source
13576 (origin
13577 (method url-fetch)
13578 (uri (pypi-uri "clikit" version))
13579 (sha256
13580 (base32
13581 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13582 (build-system python-build-system)
13583 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13584 (propagated-inputs
13585 `(("python-crashtest" ,python-crashtest)
13586 ("python-pastel" ,python-pastel)
13587 ("python-pylev" ,python-pylev)))
13588 (home-page "https://github.com/sdispater/clikit")
13589 (synopsis "Group of utilities to build command line interfaces")
13590 (description
13591 "CliKit is a group of utilities to build testable command line
13592 interfaces.")
13593 (properties `((python2-variant . ,(delay python2-clikit))))
13594 (license license:expat)))
13595
13596 (define-public python2-clikit
13597 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13598 (package/inherit
13599 base
13600 (propagated-inputs
13601 `(("python-enum34" ,python2-enum34)
13602 ("python-typing" ,python2-typing)
13603 ,@(package-propagated-inputs base))))))
13604
13605 (define-public python-msgpack-python
13606 (package
13607 (name "python-msgpack-python")
13608 (version "0.5.6")
13609 (source
13610 (origin
13611 (method url-fetch)
13612 (uri (pypi-uri "msgpack-python" version))
13613 (sha256
13614 (base32
13615 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13616 (build-system python-build-system)
13617 (home-page "https://msgpack.org/")
13618 (synopsis "Package to deserialize messages in MessagePack binary format")
13619 (description
13620 "MessagePack is an efficient binary serialization format. It lets you
13621 exchange data among multiple languages like JSON. But it's faster and
13622 smaller. Small integers are encoded into a single byte, and typical short
13623 strings require only one extra byte in addition to the strings themselves.")
13624 (license license:asl2.0)))
13625
13626 (define-public python-cachy
13627 (package
13628 (name "python-cachy")
13629 (version "0.3.0")
13630 (source
13631 (origin
13632 (method url-fetch)
13633 (uri (pypi-uri "cachy" version))
13634 (sha256
13635 (base32
13636 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13637 (build-system python-build-system)
13638 (arguments
13639 '(#:phases
13640 (modify-phases %standard-phases
13641 (replace 'check
13642 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13643 "pytest"))))))
13644 (native-inputs
13645 `(("memcached" ,memcached)
13646 ("python-fakeredis" ,python-fakeredis)
13647 ("python-flexmock" ,python-flexmock)
13648 ("python-pifpaf" ,python-pifpaf)
13649 ("python-pytest" ,python-pytest)))
13650 (propagated-inputs
13651 `(("python-memcached" ,python-memcached)
13652 ("python-msgpack-python" ,python-msgpack-python)
13653 ("python-redis" ,python-redis)))
13654 (home-page "https://github.com/sdispater/cachy")
13655 (synopsis "Simple yet effective caching library")
13656 (description
13657 "Cachy provides a simple yet effective caching library. A simple but
13658 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13659 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13660 (license license:expat)))
13661
13662 (define-public poetry
13663 (package
13664 (name "poetry")
13665 (version "1.1.5")
13666 ;; Poetry can only be built from source with Poetry.
13667 (source
13668 (origin
13669 (method url-fetch)
13670 (uri (pypi-uri "poetry" version))
13671 (sha256
13672 (base32
13673 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
13674 (build-system python-build-system)
13675 (arguments
13676 `(#:tests? #f ;; Pypi does not have tests.
13677 #:phases
13678 (modify-phases %standard-phases
13679 (add-before 'build 'patch-setup-py
13680 (lambda _
13681 (substitute* "setup.py"
13682 ;; Allow newer versions of python-keyring.
13683 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
13684 ;; TODO: remove after the next release cycle,
13685 ;; when packaging has been updated.
13686 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
13687 #t)))))
13688 (propagated-inputs
13689 `(("python-cachecontrol" ,python-cachecontrol)
13690 ("python-cachy" ,python-cachy)
13691 ("python-cleo" ,python-cleo)
13692 ("python-clikit" ,python-clikit)
13693 ("python-html5lib" ,python-html5lib)
13694 ("python-keyring" ,python-keyring)
13695 ("python-msgpack-transitional" ,python-msgpack-transitional)
13696 ("python-packaging" ,python-packaging)
13697 ("python-pexpect" ,python-pexpect)
13698 ("python-pip" ,python-pip)
13699 ("python-pkginfo" ,python-pkginfo)
13700 ("python-poetry-core" ,python-poetry-core)
13701 ("python-requests" ,python-requests)
13702 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
13703 ("python-shellingham" ,python-shellingham)
13704 ("python-tomlkit" ,python-tomlkit)
13705 ("python-virtualenv" ,python-virtualenv)))
13706 (home-page "https://python-poetry.org")
13707 (synopsis "Python dependency management and packaging made easy")
13708 (description "Poetry is a tool for dependency management and packaging
13709 in Python. It allows you to declare the libraries your project depends on and
13710 it will manage (install/update) them for you.")
13711 (license license:expat)))
13712
13713 (define-public python-lark-parser
13714 (package
13715 (name "python-lark-parser")
13716 (version "0.9.0")
13717 (source (origin
13718 (method url-fetch)
13719 (uri (pypi-uri "lark-parser" version))
13720 (sha256
13721 (base32
13722 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13723 (build-system python-build-system)
13724 (home-page "https://github.com/lark-parser/lark")
13725 (synopsis "Multi-language parser for Python")
13726 (description
13727 "Lark is a parser built with a focus on ergonomics, performance and
13728 resilience. Lark can parse all context-free languages. That means it is
13729 capable of parsing almost any programming language out there, and to
13730 some degree most natural languages too.")
13731 (license license:expat)))
13732
13733 (define-public python-libcst
13734 (package
13735 (name "python-libcst")
13736 (version "0.3.8")
13737 (source (origin
13738 (method url-fetch)
13739 (uri (pypi-uri "libcst" version))
13740 (sha256
13741 (base32
13742 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13743 (build-system python-build-system)
13744 (arguments
13745 `(#:phases
13746 (modify-phases %standard-phases
13747 (add-after 'unpack 'remove-failing-tests
13748 (lambda _
13749 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13750 (delete-file "libcst/tests/test_fuzz.py")
13751 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13752 (delete-file "libcst/tests/test_pyre_integration.py")
13753 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13754 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13755 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13756 #t))
13757 (add-before 'check 'generate-test-data
13758 (lambda _
13759 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13760 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13761 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13762 (replace 'check
13763 (lambda _
13764 (invoke "python" "-m" "unittest")
13765 #t)))))
13766 (native-inputs
13767 `(("python-black" ,python-black)
13768 ("python-isort" ,python-isort)))
13769 (propagated-inputs
13770 `(("python-typing-extensions" ,python-typing-extensions)
13771 ("python-typing-inspect" ,python-typing-inspect)
13772 ("python-pyyaml" ,python-pyyaml)))
13773 (home-page "https://github.com/Instagram/LibCST")
13774 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13775 (description
13776 "LibCST parses Python source code as a CST tree that keeps all
13777 formatting details (comments, whitespaces, parentheses, etc). It's useful
13778 for building automated refactoring (codemod) applications and linters.
13779 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13780 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13781 naming node types and fields, LibCST creates a lossless CST that looks and
13782 feels like an AST.")
13783 (license (list license:expat
13784 ;; Some files unde libcst/_parser/ are under Python Software
13785 ;; Foundation license (see LICENSE file for details)
13786 license:psfl
13787 ;; libcst/_add_slots.py
13788 license:asl2.0))))
13789
13790 (define-public python-typing-inspect
13791 (package
13792 (name "python-typing-inspect")
13793 (version "0.6.0")
13794 (source (origin
13795 (method url-fetch)
13796 (uri (pypi-uri "typing_inspect" version))
13797 (sha256
13798 (base32
13799 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13800 (build-system python-build-system)
13801 (propagated-inputs
13802 `(("python-mypy-extensions" ,python-mypy-extensions)
13803 ("python-typing-extensions" ,python-typing-extensions)))
13804 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13805 (synopsis "API for inspection of types in the Python @code{typing} module")
13806 (description
13807 "The @code{typing_inspect} module defines experimental API for runtime
13808 inspection of types defined in the Python standard typing module.")
13809 (license license:expat)))
13810
13811 (define-public python-lazy-object-proxy
13812 (package
13813 (name "python-lazy-object-proxy")
13814 (version "1.5.1")
13815 (source (origin
13816 (method url-fetch)
13817 (uri (pypi-uri "lazy-object-proxy" version))
13818 (sha256
13819 (base32
13820 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13821 (native-inputs
13822 `(("python-setuptools-scm" ,python-setuptools-scm)))
13823 (build-system python-build-system)
13824 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13825 (synopsis "Lazy object proxy for python")
13826 (description
13827 "Lazy object proxy is an object that wraps a callable but defers the call
13828 until the object is actually required, and caches the result of said call.")
13829 (license license:bsd-2)))
13830
13831 (define-public python2-lazy-object-proxy
13832 (package-with-python2 python-lazy-object-proxy))
13833
13834 (define-public python-dnspython
13835 (package
13836 (name "python-dnspython")
13837 (version "2.0.0")
13838 (source (origin
13839 (method url-fetch)
13840 (uri (pypi-uri "dnspython" version ".zip"))
13841 (sha256
13842 (base32
13843 "1dyip5ygqqhrgcaiy7qzjpndl9xciip186paxqwkm726fj9z0jh4"))))
13844 (build-system python-build-system)
13845 (native-inputs `(("unzip" ,unzip)))
13846 (arguments '(#:tests? #f)) ; XXX: requires internet access
13847 (home-page "https://www.dnspython.org")
13848 (synopsis "DNS toolkit for Python")
13849 (description
13850 "dnspython is a DNS toolkit for Python. It supports almost all record
13851 types. It can be used for queries, zone transfers, and dynamic updates.
13852 It supports TSIG authenticated messages and EDNS0.")
13853 (license license:expat)))
13854
13855 (define-public python-dnspython-1.16
13856 (package
13857 (inherit python-dnspython)
13858 (version "1.16.0")
13859 (source (origin
13860 (method url-fetch)
13861 (uri (string-append "http://www.dnspython.org/kits/"
13862 version "/dnspython-" version ".tar.gz"))
13863 (sha256
13864 (base32
13865 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13866 (native-inputs '())))
13867
13868 (define-public python2-dnspython-1.16
13869 (package-with-python2 python-dnspython-1.16))
13870
13871 (define-public python-py3dns
13872 (package
13873 (name "python-py3dns")
13874 (version "3.2.1")
13875 (source
13876 (origin
13877 (method url-fetch)
13878 (uri (pypi-uri "py3dns" version))
13879 (sha256
13880 (base32
13881 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13882 (build-system python-build-system)
13883 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13884 ;; removing functionality so we copy from Nix and "just don't build it".
13885 (arguments
13886 `(#:phases
13887 (modify-phases %standard-phases
13888 (add-after 'unpack 'patch-source
13889 (lambda _
13890 (substitute* "setup.py"
13891 (("import DNS") "")
13892 (("DNS.__version__") (string-append "\"" ,version "\"")))
13893 #t)))
13894 #:tests? #f)) ; Also skip the tests.
13895 (home-page "https://launchpad.net/py3dns")
13896 (synopsis "Python 3 DNS library")
13897 (description "This Python 3 module provides a DNS API for looking up DNS
13898 entries from within Python 3 modules and applications. This module is a
13899 simple, lightweight implementation.")
13900 (license license:psfl)))
13901
13902 (define-public python-email-validator
13903 (package
13904 (name "python-email-validator")
13905 (version "1.0.2")
13906 (source
13907 (origin (method url-fetch)
13908 (uri (pypi-uri "email_validator" version))
13909 (sha256
13910 (base32
13911 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13912 (build-system python-build-system)
13913 (arguments
13914 '(#:phases
13915 (modify-phases %standard-phases
13916 (add-before 'build 'use-dnspython
13917 (lambda _
13918 (substitute* "setup.py"
13919 (("dnspython3") "dnspython"))
13920 #t)))))
13921 (propagated-inputs
13922 `(("python-dnspython" ,python-dnspython)
13923 ("python-idna" ,python-idna)))
13924 (home-page "https://github.com/JoshData/python-email-validator")
13925 (synopsis "Email address validation library for Python")
13926 (description
13927 "This library validates email address syntax and deliverability.")
13928 (license license:cc0)))
13929
13930 (define-public python2-email-validator
13931 (package-with-python2 python-email-validator))
13932
13933 (define-public python-ukpostcodeparser
13934 (package
13935 (name "python-ukpostcodeparser")
13936 (version "1.0.3")
13937 (source (origin
13938 (method url-fetch)
13939 (uri (pypi-uri "UkPostcodeParser" version))
13940 (sha256
13941 (base32
13942 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13943 (build-system python-build-system)
13944 (home-page "https://github.com/hamstah/ukpostcodeparser")
13945 (synopsis "UK Postcode parser for Python")
13946 (description
13947 "This library provides the @code{parse_uk_postcode} function for
13948 parsing UK postcodes.")
13949 (license license:expat)))
13950
13951 (define-public python2-ukpostcodeparser
13952 (package-with-python2 python-ukpostcodeparser))
13953
13954 (define-public python-faker
13955 (package
13956 (name "python-faker")
13957 (version "4.0.2")
13958 (source (origin
13959 (method url-fetch)
13960 (uri (pypi-uri "Faker" version))
13961 (sha256
13962 (base32
13963 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13964 (build-system python-build-system)
13965 (arguments
13966 '(#:phases
13967 (modify-phases %standard-phases
13968 (replace 'check
13969 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13970 (native-inputs
13971 `(;; For testing
13972 ("python-freezegun" ,python-freezegun)
13973 ("python-pytest" ,python-pytest)
13974 ("python-random2" ,python-random2)
13975 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13976 ("python-validators" ,python-validators)))
13977 (propagated-inputs
13978 `(("python-dateutil" ,python-dateutil)
13979 ("python-text-unidecode" ,python-text-unidecode)))
13980 (home-page "https://github.com/joke2k/faker")
13981 (synopsis "Python package that generates fake data")
13982 (description
13983 "Faker is a Python package that generates fake data such as names,
13984 addresses, and phone numbers.")
13985 (license license:expat)
13986 (properties `((python2-variant . ,(delay python2-faker))))))
13987
13988 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13989 (define-public python2-faker
13990 (let ((base (package-with-python2 (strip-python2-variant
13991 python-faker))))
13992 (package
13993 (inherit base)
13994 (version "3.0.1")
13995 (source (origin
13996 (method url-fetch)
13997 (uri (pypi-uri "Faker" version))
13998 (sha256
13999 (base32
14000 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
14001 (native-inputs
14002 `(("python-mock" ,python2-mock)
14003 ,@(package-native-inputs base)))
14004 (propagated-inputs
14005 `(("python2-ipaddress" ,python2-ipaddress)
14006 ("python2-six" ,python2-six)
14007 ,@(package-propagated-inputs base))))))
14008
14009 (define-public python-pyaml
14010 (package
14011 (name "python-pyaml")
14012 (version "18.11.0")
14013 (source (origin
14014 (method url-fetch)
14015 (uri (pypi-uri "pyaml" version))
14016 (sha256
14017 (base32
14018 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
14019 (build-system python-build-system)
14020 (native-inputs
14021 `(("python-unidecode" ,python-unidecode)))
14022 (propagated-inputs
14023 `(("python-pyyaml" ,python-pyyaml)))
14024 (home-page "https://github.com/mk-fg/pretty-yaml")
14025 (synopsis "YAML pretty-print library for Python")
14026 (description
14027 "pyaml is a PyYAML based python module to produce pretty and readable
14028 YAML-serialized data.")
14029 (license license:wtfpl2)))
14030
14031 (define-public python2-pyaml
14032 (package-with-python2 python-pyaml))
14033
14034 (define-public python-backpack
14035 (package
14036 (name "python-backpack")
14037 (version "0.1")
14038 (source
14039 (origin
14040 (method url-fetch)
14041 (uri (pypi-uri "backpack" version))
14042 (sha256
14043 (base32
14044 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
14045 (build-system python-build-system)
14046 (native-inputs
14047 `(("python-pytest" ,python-pytest)
14048 ("python-nose" ,python-nose)))
14049 (propagated-inputs
14050 `(("python-simplejson" ,python-simplejson)))
14051 (home-page "https://github.com/sdispater/backpack")
14052 (synopsis "Utilities for working with Python collections")
14053 (description "Backpack provides some useful utilities for working with
14054 collections of data.")
14055 (license license:expat)))
14056
14057 (define-public python2-backpack
14058 (package-with-python2 python-backpack))
14059
14060 (define-public python-prompt-toolkit
14061 (package
14062 (name "python-prompt-toolkit")
14063 (version "3.0.9")
14064 (source
14065 (origin
14066 (method url-fetch)
14067 (uri (pypi-uri "prompt_toolkit" version))
14068 (sha256
14069 (base32 "0bvjp62cs6aj9lrh7njzxdjgg8pjfw3qgmr551243d9ivmcapvn5"))))
14070 (build-system python-build-system)
14071 (arguments
14072 `(#:phases
14073 (modify-phases %standard-phases
14074 (delete 'check)
14075 (add-after 'install 'post-install-check
14076 (lambda* (#:key inputs outputs #:allow-other-keys)
14077 ;; HOME is needed for the test
14078 ;; "test_pathcompleter_can_expanduser".
14079 (setenv "HOME" "/tmp")
14080 (add-installed-pythonpath inputs outputs)
14081 (invoke "py.test"))))))
14082 (propagated-inputs
14083 `(("python-wcwidth" ,python-wcwidth)))
14084 (native-inputs
14085 `(("python-pytest" ,python-pytest)))
14086 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
14087 (synopsis "Library for building command line interfaces in Python")
14088 (description
14089 "Prompt-Toolkit is a library for building interactive command line
14090 interfaces in Python. It's like GNU Readline but it also features syntax
14091 highlighting while typing, out-of-the-box multi-line input editing, advanced
14092 code completion, incremental search, support for Chinese double-width
14093 characters, mouse support, and auto suggestions.")
14094 (license license:bsd-3)
14095 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
14096
14097 (define-public python-prompt-toolkit-2
14098 (package (inherit python-prompt-toolkit)
14099 (name "python-prompt-toolkit")
14100 (version "2.0.7")
14101 (source
14102 (origin
14103 (method url-fetch)
14104 (uri (pypi-uri "prompt_toolkit" version))
14105 (sha256
14106 (base32
14107 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
14108 (propagated-inputs
14109 `(("python-wcwidth" ,python-wcwidth)
14110 ("python-six" ,python-six)
14111 ("python-pygments" ,python-pygments)))
14112 (properties '())))
14113
14114 (define-public python2-prompt-toolkit
14115 (package-with-python2 python-prompt-toolkit-2))
14116
14117 (define-public python-prompt-toolkit-1
14118 (package (inherit python-prompt-toolkit-2)
14119 (version "1.0.15")
14120 (source
14121 (origin
14122 (method url-fetch)
14123 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
14124 (sha256
14125 (base32
14126 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
14127
14128 (define-public python2-prompt-toolkit-1
14129 (package-with-python2 python-prompt-toolkit-1))
14130
14131 (define-public python-jedi
14132 (package
14133 (name "python-jedi")
14134 (version "0.17.2")
14135 (source
14136 (origin
14137 (method url-fetch)
14138 (uri (pypi-uri "jedi" version))
14139 (sha256
14140 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
14141 (build-system python-build-system)
14142 (arguments
14143 `(#:phases
14144 (modify-phases %standard-phases
14145 (replace 'check
14146 (lambda* (#:key tests? #:allow-other-keys)
14147 (when tests?
14148 (setenv "HOME" "/tmp")
14149 (invoke "python" "-m" "pytest" "-vv"))
14150 #t)))))
14151 (native-inputs
14152 `(("python-pytest" ,python-pytest)
14153 ("python-docopt" ,python-docopt)))
14154 (propagated-inputs
14155 `(("python-parso" ,python-parso)))
14156 (home-page "https://github.com/davidhalter/jedi")
14157 (synopsis "Autocompletion and static analysis library for Python")
14158 (description
14159 "Jedi is a static analysis tool for Python that can be used in Integrated
14160 Development Environments (@dfn{IDE}s) and text editors. It understands Python
14161 on a deeper level than many other static analysis frameworks for Python.
14162
14163 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
14164 well.")
14165 (license license:expat)))
14166
14167 (define-public python2-jedi
14168 (package-with-python2 python-jedi))
14169
14170 (define-public ptpython
14171 (package
14172 (name "ptpython")
14173 (version "3.0.5")
14174 (source (origin
14175 (method url-fetch)
14176 (uri (pypi-uri "ptpython" version))
14177 (sha256
14178 (base32
14179 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
14180 (build-system python-build-system)
14181 (arguments
14182 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
14183 (propagated-inputs
14184 `(("python-appdirs" ,python-appdirs)
14185 ("python-jedi" ,python-jedi)
14186 ("python-prompt-toolkit" ,python-prompt-toolkit)
14187 ("python-pygments" ,python-pygments)))
14188 (home-page "https://github.com/jonathanslenders/ptpython")
14189 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
14190 (description
14191 "ptpython is a Python read-eval-print loop with IDE-like features.
14192 It supports syntax highlighting, multiline editing, autocompletion, mouse,
14193 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
14194 etc.")
14195 (license license:bsd-3)
14196 (properties `((python2-variant . ,(delay ptpython-2))))))
14197
14198 (define-public ptpython-2
14199 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
14200 (package/inherit base
14201 (name "ptpython2"))))
14202
14203 (define-public python-stem
14204 (package
14205 (name "python-stem")
14206 (version "1.8.0")
14207 (source
14208 (origin
14209 (method url-fetch)
14210 (uri (pypi-uri "stem" version))
14211 (sha256
14212 (base32
14213 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
14214 (build-system python-build-system)
14215 (arguments
14216 `(#:phases
14217 (modify-phases %standard-phases
14218 (replace 'check
14219 (lambda _
14220 (invoke "./run_tests.py" "--unit")
14221 #t)))))
14222 (native-inputs
14223 `(("python-mock" ,python-mock)
14224 ("python-pycodestyle" ,python-pycodestyle)
14225 ("python-pyflakes" ,python-pyflakes)))
14226 (home-page "https://stem.torproject.org/")
14227 (synopsis
14228 "Python controller library that allows applications to interact with Tor")
14229 (description
14230 "Stem is a Python controller library for Tor. With it you can use Tor's
14231 control protocol to script against the Tor process and read descriptor data
14232 relays publish about themselves.")
14233 (license license:lgpl3)))
14234
14235 (define-public python2-stem
14236 (package-with-python2 python-stem))
14237
14238 (define-public python-pyserial
14239 (package
14240 (name "python-pyserial")
14241 (version "3.4")
14242 (source
14243 (origin
14244 (method url-fetch)
14245 (uri (pypi-uri "pyserial" version))
14246 (sha256
14247 (base32
14248 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
14249 (build-system python-build-system)
14250 (arguments
14251 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
14252 ;; #:phases
14253 ;; (modify-phases %standard-phases
14254 ;; (replace 'check
14255 ;; (lambda _
14256 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
14257 (home-page
14258 "https://github.com/pyserial/pyserial")
14259 (synopsis "Python Serial Port Bindings")
14260 (description "@code{pyserial} provide serial port bindings for Python. It
14261 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
14262 and/or Xon/Xoff. The port is accessed in RAW mode.")
14263 (license license:bsd-3)))
14264
14265 (define-public python2-pyserial
14266 (package-with-python2 python-pyserial))
14267
14268 (define-public python-kivy
14269 (package
14270 (name "python-kivy")
14271 (version "1.10.1")
14272 (source
14273 (origin
14274 (method url-fetch)
14275 (uri (pypi-uri "Kivy" version))
14276 (file-name (string-append name "-" version ".tar.gz"))
14277 (sha256
14278 (base32
14279 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
14280 (build-system python-build-system)
14281 (arguments
14282 `(#:tests? #f ; Tests require many optional packages
14283 #:phases
14284 (modify-phases %standard-phases
14285 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
14286 (lambda* (#:key inputs #:allow-other-keys)
14287 (setenv "KIVY_SDL2_PATH"
14288 (string-append (assoc-ref inputs "sdl-union")
14289 "/include/SDL2"))
14290 #t)))))
14291 (native-inputs
14292 `(("pkg-config" ,pkg-config)
14293 ("python-cython" ,python-cython)))
14294 (inputs
14295 `(("gstreamer" ,gstreamer)
14296 ("mesa" ,mesa)
14297 ("sdl-union"
14298 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
14299 (home-page "https://kivy.org")
14300 (synopsis
14301 "Multitouch application framework")
14302 (description
14303 "A software library for rapid development of
14304 hardware-accelerated multitouch applications.")
14305 (license license:expat)))
14306
14307 (define-public python2-kivy
14308 (package-with-python2 python-kivy))
14309
14310 (define-public python-binaryornot
14311 (package
14312 (name "python-binaryornot")
14313 (version "0.4.4")
14314 (source (origin
14315 (method url-fetch)
14316 (uri (pypi-uri "binaryornot" version))
14317 (sha256
14318 (base32
14319 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
14320 (build-system python-build-system)
14321 (arguments
14322 `(#:phases
14323 (modify-phases %standard-phases
14324 (add-after 'unpack 'patch-tests
14325 (lambda _
14326 ;; TypeError: binary() got an unexpected keyword argument
14327 ;; 'average_size'.
14328 (substitute* "tests/test_check.py"
14329 (("average_size=512") ""))
14330 #t)))))
14331 (propagated-inputs
14332 `(("python-chardet" ,python-chardet)
14333 ("python-hypothesis" ,python-hypothesis)))
14334 (home-page "https://github.com/audreyr/binaryornot")
14335 (synopsis "Package to check if a file is binary or text")
14336 (description "Ultra-lightweight pure Python package to check if a file is
14337 binary or text.")
14338 (license license:bsd-3)
14339 (properties `((python2-variant . ,(delay python2-binaryornot))))))
14340
14341 (define-public python2-binaryornot
14342 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
14343 (package/inherit base
14344 (propagated-inputs
14345 `(("python2-enum34" ,python2-enum34)
14346 ,@(package-propagated-inputs base))))))
14347
14348 (define-public python-binwalk
14349 (package
14350 (name "python-binwalk")
14351 (version "2.2.0")
14352 (source
14353 (origin
14354 (method git-fetch)
14355 (uri (git-reference
14356 (url "https://github.com/ReFirmLabs/binwalk")
14357 (commit (string-append "v" version))))
14358 (file-name (git-file-name name version))
14359 (sha256
14360 (base32
14361 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
14362 (build-system python-build-system)
14363 (arguments
14364 `(#:phases
14365 (modify-phases %standard-phases
14366 (add-before 'check 'set-pythonpath
14367 (lambda _
14368 (setenv "PYTHONPATH"
14369 (string-append
14370 (getcwd) "/src/"
14371 ":" (getenv "PYTHONPATH")))
14372 (setenv "HOME" "")
14373 #t)))))
14374 (native-inputs
14375 `(("python-coverage" ,python-coverage)
14376 ("python-nose" ,python-nose)))
14377 (home-page "https://github.com/ReFirmLabs/binwalk")
14378 (synopsis "Firmware analysis tool")
14379 (description "Binwalk is a tool for analyzing, reverse engineering, and
14380 extracting firmware images")
14381 (license license:expat)))
14382
14383 (define-public python-nltk
14384 (package
14385 (name "python-nltk")
14386 (version "3.2.1")
14387 (source (origin
14388 (method url-fetch)
14389 (uri (pypi-uri "nltk" version))
14390 (sha256
14391 (base32
14392 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
14393 (build-system python-build-system)
14394 (arguments
14395 '(;; The tests require some extra resources to be downloaded.
14396 ;; TODO Try packaging these resources.
14397 #:tests? #f))
14398 (home-page "http://nltk.org/")
14399 (synopsis "Natural Language Toolkit")
14400 (description "It provides interfaces to over 50 corpora and lexical
14401 resources such as WordNet, along with a suite of text processing libraries
14402 for classification, tokenization, stemming, tagging, parsing, and semantic
14403 reasoning, wrappers for natural language processing libraries.")
14404 (license license:asl2.0)))
14405
14406 (define-public python2-nltk
14407 (package-with-python2 python-nltk))
14408
14409 (define-public python-pymongo
14410 (package
14411 (name "python-pymongo")
14412 (version "3.7.2")
14413 (source (origin
14414 (method url-fetch)
14415 (uri (pypi-uri "pymongo" version))
14416 (sha256
14417 (base32
14418 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
14419 (build-system python-build-system)
14420 (propagated-inputs
14421 `(("python-certifi" ,python-certifi)))
14422 (home-page "https://github.com/mongodb/mongo-python-driver")
14423 (synopsis "Python driver for MongoDB")
14424 (description "Python driver for MongoDB.")
14425 (license license:asl2.0)))
14426
14427 (define-public python2-pymongo
14428 (package-with-python2 python-pymongo))
14429
14430 (define-public python-consul
14431 (package
14432 (name "python-consul")
14433 (version "0.6.1")
14434 (source
14435 (origin
14436 (method url-fetch)
14437 (uri (pypi-uri "python-consul" version))
14438 (sha256
14439 (base32
14440 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
14441 (build-system python-build-system)
14442 (arguments
14443 '(#:tests? #f)) ; The tests are not distributed
14444 (propagated-inputs
14445 `(("python-requests" ,python-requests)
14446 ("python-six" ,python-six)))
14447 (home-page "https://github.com/cablehead/python-consul")
14448 (synopsis "Python client for Consul")
14449 (description
14450 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
14451 discovery, monitoring and configuration.")
14452 (license license:expat)))
14453
14454 (define-public python2-consul
14455 (package-with-python2 python-consul))
14456
14457 (define-public python-schematics
14458 (package
14459 (name "python-schematics")
14460 (version "1.1.1")
14461 (source
14462 (origin
14463 (method git-fetch)
14464 (uri (git-reference
14465 (url "https://github.com/schematics/schematics")
14466 (commit (string-append "v" version))))
14467 (file-name (git-file-name name version))
14468 (sha256
14469 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
14470 (build-system python-build-system)
14471 (propagated-inputs
14472 `(("python-six" ,python-six)))
14473 (arguments
14474 ;; The tests require a bunch of not very nice packages with fixed
14475 ;; version requirements (e.g. python-coveralls).
14476 `(#:tests? #f))
14477 (home-page "https://github.com/schematics/schematics")
14478 (synopsis "Python Data Structures for Humans")
14479 (description "Python Data Structures for Humans.")
14480 (license license:bsd-3)))
14481
14482 (define-public python2-schematics
14483 (package-with-python2 python-schematics))
14484
14485 (define-public python-odfpy
14486 (package
14487 (name "python-odfpy")
14488 (version "1.4.1")
14489 (source (origin
14490 (method url-fetch)
14491 (uri (pypi-uri "odfpy" version))
14492 (sha256
14493 (base32
14494 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
14495 (arguments
14496 `(#:phases
14497 (modify-phases %standard-phases
14498 (replace 'check
14499 (lambda _
14500 (setenv "PYTHONPATH" (string-append "./build/lib:"
14501 (getenv "PYTHONPATH")))
14502 (invoke "pytest" "-vv"))))))
14503 (build-system python-build-system)
14504 (native-inputs
14505 `(("python-pytest" ,python-pytest)))
14506 (propagated-inputs
14507 `(("python-defusedxml" ,python-defusedxml)))
14508 (home-page "https://github.com/eea/odfpy")
14509 (synopsis "Python API and tools to manipulate OpenDocument files")
14510 (description "Collection of libraries and utility programs written in
14511 Python to manipulate OpenDocument 1.2 files.")
14512 (license
14513 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
14514 ;; number of files with other licenses.
14515 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
14516
14517 (define-public python2-odfpy
14518 (package-with-python2 python-odfpy))
14519
14520 (define-public python-natsort
14521 (package
14522 (name "python-natsort")
14523 (version "7.0.1")
14524 (source (origin
14525 (method url-fetch)
14526 (uri (pypi-uri "natsort" version))
14527 (sha256
14528 (base32
14529 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14530 (build-system python-build-system)
14531 (arguments
14532 `(#:modules ((guix build utils)
14533 (guix build python-build-system)
14534 (srfi srfi-1)
14535 (srfi srfi-26)
14536 (ice-9 ftw))
14537 #:phases
14538 (modify-phases %standard-phases
14539 (add-before 'check 'set-cachedir
14540 ;; Tests require write access to $HOME by default
14541 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14542 (replace 'check
14543 (lambda _
14544 (let ((cwd (getcwd)))
14545 (setenv "PYTHONPATH"
14546 (string-append
14547 cwd "/build/"
14548 (find (cut string-prefix? "lib" <>)
14549 (scandir (string-append cwd "/build")))
14550 ":"
14551 (getenv "PYTHONPATH")))
14552 (invoke "pytest" "-v")))))))
14553 (native-inputs
14554 `(("python-hypothesis" ,python-hypothesis)
14555 ("python-pytest-cov" ,python-pytest-cov)
14556 ("python-pytest-mock" ,python-pytest-mock)
14557 ("python-pytest" ,python-pytest)))
14558 (propagated-inputs ; TODO: Add python-fastnumbers.
14559 `(("python-pyicu" ,python-pyicu)))
14560 (home-page "https://github.com/SethMMorton/natsort")
14561 (synopsis "Natural sorting for python and shell")
14562 (description
14563 "Natsort lets you apply natural sorting on lists instead of
14564 lexicographical. If you use the built-in @code{sorted} method in python
14565 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14566 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14567 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14568 identifies numbers and sorts them separately from strings. It can also sort
14569 version numbers, real numbers, mixed types and more, and comes with a shell
14570 command @command{natsort} that exposes this functionality in the command line.")
14571 (license license:expat)
14572 (properties `((python2-variant . ,(delay python2-natsort))))))
14573
14574 ;; Natsort 6.x are the last versions with support for Python 2.
14575 (define-public python2-natsort
14576 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14577 (package (inherit base)
14578 (version "6.2.1")
14579 (source (origin
14580 (method url-fetch)
14581 (uri (pypi-uri "natsort" version))
14582 (sha256
14583 (base32
14584 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14585 (native-inputs
14586 `(("python2-pathlib" ,python2-pathlib)
14587 ,@(package-native-inputs base))))))
14588
14589 (define-public glances
14590 (package
14591 (name "glances")
14592 (version "3.1.6")
14593 (source
14594 (origin
14595 (method url-fetch)
14596 (uri (pypi-uri "Glances" version))
14597 (sha256
14598 (base32 "11xbm8jgcxha191ly7q76nab1ilabiz14mqf6i3y6aw5xvgg017c"))
14599 (modules '((guix build utils)))
14600 (snippet
14601 '(begin
14602 ;; Glances phones PyPI for weekly update checks by default.
14603 ;; Disable these. The user can re-enable them if desired.
14604 (substitute* "glances/outdated.py"
14605 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14606 (string-append indentation
14607 "self.args.disable_check_update = True\n"
14608 line)))
14609 #t))))
14610 (build-system python-build-system)
14611 (propagated-inputs
14612 `(("python-future" ,python-future)
14613 ("python-psutil" ,python-psutil)))
14614 (home-page "https://github.com/nicolargo/glances")
14615 (synopsis "Cross-platform curses-based monitoring tool")
14616 (description
14617 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14618 Glances uses the PsUtil library to get information from your system. It
14619 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14620 (license license:lgpl3+)))
14621
14622 (define-public python-glances
14623 (deprecated-package "python-glances" glances))
14624
14625 (define-public python-graphql-core
14626 (package
14627 (name "python-graphql-core")
14628 (version "3.1.2")
14629 (source
14630 (origin
14631 (method url-fetch)
14632 (uri (pypi-uri "graphql-core" version))
14633 (sha256
14634 (base32
14635 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
14636 (build-system python-build-system)
14637 (arguments
14638 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14639 #:phases
14640 (modify-phases %standard-phases
14641 (add-after 'unpack 'patch-hardcoded-version
14642 (lambda _ (substitute*
14643 "setup.py"
14644 (("'gevent==1.1rc1'") "'gevent'"))
14645 #t)))))
14646 (native-inputs
14647 `(("python-gevent" ,python-gevent)
14648 ("python-mock" ,python-mock)
14649 ("python-pytest-mock" ,python-pytest-mock)))
14650 (propagated-inputs
14651 `(("python-promise" ,python-promise)
14652 ("python-six" ,python-six)))
14653 (home-page "https://github.com/graphql-python/graphql-core")
14654 (synopsis "GraphQL implementation for Python")
14655 (description
14656 "GraphQL implementation for Python. GraphQL is a data query language and
14657 runtime designed and used to request and deliver data to mobile and web apps.
14658 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14659 to Python.")
14660 (license license:expat)))
14661
14662 (define-public python-graphql-relay
14663 (package
14664 (name "python-graphql-relay")
14665 (version "0.4.5")
14666 (source
14667 (origin
14668 (method url-fetch)
14669 (uri (pypi-uri "graphql-relay" version))
14670 (sha256
14671 (base32
14672 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14673 (build-system python-build-system)
14674 (arguments
14675 '(#:tests? #f)) ; The tests are not distributed
14676 (propagated-inputs
14677 `(("python-graphql-core" ,python-graphql-core)
14678 ("python-promise" ,python-promise)
14679 ("python-six" ,python-six)))
14680 (home-page "https://github.com/graphql-python/graphql-relay-py")
14681 (synopsis "Relay implementation for Python")
14682 (description
14683 "This is a library to allow the easy creation of Relay-compliant servers
14684 using the GraphQL Python reference implementation of a GraphQL server. It
14685 should be noted that the code is a exact port of the original
14686 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14687 from Facebook.")
14688 (license license:expat)))
14689
14690 (define-public python-graphene
14691 (package
14692 (name "python-graphene")
14693 (version "0.10.2")
14694 (source
14695 (origin
14696 (method url-fetch)
14697 (uri (pypi-uri "graphene" version))
14698 (sha256
14699 (base32
14700 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14701 (build-system python-build-system)
14702 (propagated-inputs
14703 `(("python-graphql-core" ,python-graphql-core)
14704 ("python-graphql-relay" ,python-graphql-relay)
14705 ("python-iso8601" ,python-iso8601)
14706 ("python-promise" ,python-promise)
14707 ("python-six" ,python-six)))
14708 (arguments
14709 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14710 (home-page "https://graphene-python.org/")
14711 (synopsis "GraphQL Framework for Python")
14712 (description
14713 "Graphene is a Python library for building GraphQL schemas/types.
14714 A GraphQL schema describes your data model, and provides a GraphQL server
14715 with an associated set of resolve methods that know how to fetch data.")
14716 (license license:expat)))
14717
14718 (define-public python-nautilus
14719 (package
14720 (name "python-nautilus")
14721 (version "0.4.9")
14722 (source
14723 (origin
14724 (method url-fetch)
14725 (uri (pypi-uri "nautilus" version))
14726 (sha256
14727 (base32
14728 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14729 (build-system python-build-system)
14730 (arguments `(#:tests? #f)) ; fails to import test modules
14731 (propagated-inputs
14732 `(("python-bcrypt" ,python-bcrypt)
14733 ("python-click" ,python-click)
14734 ("python-consul" ,python-consul)
14735 ("python-graphene" ,python-graphene)
14736 ("python-jinja2" ,python-jinja2)
14737 ("python-peewee" ,python-peewee)
14738 ("python-pika" ,python-pika)
14739 ("python-tornado" ,python-tornado)
14740 ("python-wtforms" ,python-wtforms)))
14741 (native-inputs
14742 `(("python-nose2" ,python-nose2)))
14743 (home-page "https://github.com/AlecAivazis/nautilus")
14744 (synopsis "Library for creating microservice applications")
14745 (description
14746 "Nautilus is a framework for flux based microservices that looks to
14747 provide extendible implementations of common aspects of a cloud so that you can
14748 focus on building massively scalable web applications.")
14749 (license license:expat)))
14750
14751 (define-public python-random2
14752 (package
14753 (name "python-random2")
14754 (version "1.0.1")
14755 (source (origin
14756 (method url-fetch)
14757 (uri (pypi-uri "random2" version ".zip"))
14758 (sha256
14759 (base32
14760 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14761 (build-system python-build-system)
14762 (native-inputs `(("unzip" ,unzip)))
14763 (home-page "http://pypi.python.org/pypi/random2")
14764 (synopsis "Python 3 version of the Python 2 @code{random} module")
14765 (description
14766 "This package provides a Python 3 ported version of Python 2.7’s
14767 @code{random} module. It has also been back-ported to work in Python 2.6.
14768
14769 In Python 3, the implementation of @code{randrange()} was changed, so that
14770 even with the same seed you get different sequences in Python 2 and 3.
14771
14772 This package closes that gap, allowing stable random number generation
14773 between the different Python versions.")
14774 (license license:psfl)))
14775
14776 (define-public python2-random2
14777 (package-with-python2 python-random2))
14778
14779 (define-public python-snowballstemmer
14780 (package
14781 (name "python-snowballstemmer")
14782 (version "2.0.0")
14783 (source (origin
14784 (method url-fetch)
14785 (uri (pypi-uri "snowballstemmer" version))
14786 (sha256
14787 (base32
14788 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14789 (build-system python-build-system)
14790 (arguments
14791 `(;; No tests exist
14792 #:tests? #f))
14793 (home-page "https://github.com/shibukawa/snowball_py")
14794 (synopsis "Snowball stemming library collection for Python")
14795 (description "This package provides 16 word stemmer algorithms generated
14796 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14797 English stemmer.")
14798 (license license:bsd-3)))
14799
14800 (define-public python2-snowballstemmer
14801 (package-with-python2 python-snowballstemmer))
14802
14803 (define-public python-setproctitle
14804 (package
14805 (name "python-setproctitle")
14806 (version "1.1.10")
14807 (source
14808 (origin
14809 (method url-fetch)
14810 (uri (pypi-uri "setproctitle" version))
14811 (sha256
14812 (base32
14813 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14814 (build-system python-build-system)
14815 (arguments
14816 '(#:phases
14817 (modify-phases %standard-phases
14818 (add-before 'check 'patch-Makefile
14819 ;; Stricly this is only required for the python2 variant.
14820 ;; But adding a phase in an inherited package seems to be
14821 ;; cumbersum. So we patch even for python3.
14822 (lambda _
14823 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14824 (when nose
14825 (substitute* "Makefile"
14826 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14827 (string-append nose "/bin/nosetests "))))
14828 #t)))
14829 (replace 'check
14830 (lambda _
14831 (setenv "PYTHON" (or (which "python3") (which "python")))
14832 (setenv "PYCONFIG" (if (which "python3-config")
14833 "python3-config --embed"
14834 "python-config"))
14835 (setenv "CC" "gcc")
14836 ;; No need to extend PYTHONPATH to find the built package, since
14837 ;; the Makefile will build anyway
14838 (invoke "make" "check"))))))
14839 (native-inputs
14840 `(("procps" ,procps))) ; required for tests
14841 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14842 (synopsis
14843 "Setproctitle implementation for Python to customize the process title")
14844 (description "The library allows a process to change its title (as displayed
14845 by system tools such as ps and top).
14846
14847 Changing the title is mostly useful in multi-process systems, for
14848 example when a master process is forked: changing the children's title
14849 allows identifying the task each process is busy with. The technique
14850 is used by PostgreSQL and the OpenSSH Server for example.")
14851 (license license:bsd-3)
14852 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14853
14854 (define-public python2-setproctitle
14855 (let ((base (package-with-python2
14856 (strip-python2-variant python-setproctitle))))
14857 (package/inherit base
14858 (native-inputs `(("python2-nose" ,python2-nose)
14859 ,@(package-native-inputs base))))))
14860
14861 (define-public python-validictory
14862 (package
14863 (name "python-validictory")
14864 (version "1.0.1")
14865 (source
14866 (origin
14867 (method url-fetch)
14868 (uri (pypi-uri "validictory" version))
14869 (sha256
14870 (base32
14871 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14872 (build-system python-build-system)
14873 (arguments
14874 '(#:phases
14875 (modify-phases %standard-phases
14876 (add-after 'unpack 'bootstrap
14877 ;; Move the tests out of the package directory to avoid
14878 ;; packaging them.
14879 (lambda* _
14880 (rename-file "validictory/tests" "tests")
14881 (delete-file "tests/__init__.py")))
14882 (replace 'check
14883 (lambda _
14884 ;; Extend PYTHONPATH so the built package will be found.
14885 (setenv "PYTHONPATH"
14886 (string-append (getcwd) "/build/lib:"
14887 (getenv "PYTHONPATH")))
14888 (invoke "py.test" "-vv" ))))))
14889 (native-inputs
14890 `(("python-pytest" ,python-pytest)))
14891 (home-page
14892 "https://github.com/jamesturk/validictory")
14893 (synopsis "General purpose Python data validator")
14894 (description "It allows validation of arbitrary Python data structures.
14895
14896 The schema format is based on the JSON Schema
14897 proposal (http://json-schema.org), so combined with json the library is also
14898 useful as a validator for JSON data.")
14899 (license license:expat)))
14900
14901 (define-public python2-validictory
14902 (package-with-python2 python-validictory))
14903
14904 (define-public python-pyelftools
14905 (package
14906 (name "python-pyelftools")
14907 (version "0.25")
14908 (source
14909 (origin
14910 (method url-fetch)
14911 (uri (pypi-uri "pyelftools" version))
14912 (sha256
14913 (base32
14914 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14915 (build-system python-build-system)
14916 (arguments
14917 `(#:phases
14918 (modify-phases %standard-phases
14919 (add-before 'check 'set-pythonpath
14920 (lambda _
14921 (setenv "PYTHONPATH"
14922 (string-append
14923 (getcwd) "/test/"
14924 ":" (getenv "PYTHONPATH")))
14925 #t)))))
14926 (home-page
14927 "https://github.com/eliben/pyelftools")
14928 (synopsis
14929 "Analyze binary and library file information")
14930 (description "This Python library provides interfaces for parsing and
14931 analyzing two binary and library file formats; the Executable and Linking
14932 Format (ELF), and debugging information in the Debugging With Attributed
14933 Record Format (DWARF).")
14934 (license license:public-domain)))
14935
14936 (define-public python-pyev
14937 (package
14938 (name "python-pyev")
14939 (version "0.9.0")
14940 (source
14941 (origin
14942 (method url-fetch)
14943 (uri (pypi-uri "pyev" version))
14944 (sha256
14945 (base32
14946 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14947 (build-system python-build-system)
14948 (arguments
14949 `(#:tests? #f ; no test suite
14950 #:phases
14951 (modify-phases %standard-phases
14952 (add-after 'unpack 'patch
14953 (lambda* (#:key inputs #:allow-other-keys)
14954 (let ((libev (string-append (assoc-ref inputs "libev")
14955 "/lib/libev.so.4")))
14956 (substitute* "setup.py"
14957 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14958 (string-append "libev_dll_name = \"" libev "\"")))))))))
14959 (inputs
14960 `(("libev" ,libev)))
14961 (home-page "https://github.com/gabrielfalcao/pyev")
14962 (synopsis "Python libev interface")
14963 (description "Pyev provides a Python interface to libev.")
14964 (license license:gpl3)))
14965
14966 (define-public python2-pyev
14967 (package-with-python2 python-pyev))
14968
14969 (define-public python-imagesize
14970 (package
14971 (name "python-imagesize")
14972 (version "1.2.0")
14973 (source
14974 (origin
14975 (method url-fetch)
14976 (uri (pypi-uri "imagesize" version))
14977 (sha256
14978 (base32
14979 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14980 (build-system python-build-system)
14981 (home-page "https://github.com/shibukawa/imagesize_py")
14982 (synopsis "Gets image size of files in various formats in Python")
14983 (description
14984 "This package allows determination of image size from
14985 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14986 (license license:expat)))
14987
14988 (define-public python2-imagesize
14989 (package-with-python2 python-imagesize))
14990
14991 (define-public python-termstyle
14992 (package
14993 (name "python-termstyle")
14994 (version "0.1.11")
14995 (source
14996 (origin
14997 (method url-fetch)
14998 (uri (pypi-uri "termstyle" version))
14999 (sha256
15000 (base32
15001 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
15002 (build-system python-build-system)
15003 (arguments
15004 '(#:phases
15005 (modify-phases %standard-phases
15006 (replace 'check
15007 (lambda _
15008 (invoke "python" "test3.py"))))))
15009 (home-page "https://github.com/gfxmonk/termstyle")
15010 (synopsis "Console text coloring for Python")
15011 (description "This package provides console text coloring for Python.")
15012 (license license:bsd-3)))
15013
15014 (define-public python-argcomplete
15015 (package
15016 (name "python-argcomplete")
15017 (version "1.11.1")
15018 (source
15019 (origin
15020 (method url-fetch)
15021 (uri (pypi-uri "argcomplete" version))
15022 (sha256
15023 (base32
15024 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
15025 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
15026 (build-system python-build-system)
15027 (native-inputs
15028 `(("python-coverage" ,python-coverage)
15029 ("python-flake8" ,python-flake8)
15030 ("python-pexpect" ,python-pexpect)
15031 ("python-wheel" ,python-wheel)
15032 ("tcsh" ,tcsh)
15033 ("fish" ,fish)
15034 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
15035 (home-page "https://github.com/kislyuk/argcomplete")
15036 (synopsis "Shell tab completion for Python argparse")
15037 (description "argcomplete provides extensible command line tab completion
15038 of arguments and options for Python scripts using @code{argparse}. It's
15039 particularly useful for programs with many options or sub-parsers that can
15040 dynamically suggest completions; for example, when browsing resources over the
15041 network.")
15042 (license license:asl2.0)
15043 (properties `((python2-variant . ,(delay python2-argcomplete))))))
15044
15045 (define-public python2-argcomplete
15046 (let ((variant (package-with-python2
15047 (strip-python2-variant python-argcomplete))))
15048 (package/inherit variant
15049 (arguments
15050 (substitute-keyword-arguments (package-arguments variant)
15051 ((#:phases phases '%standard-phases)
15052 `(modify-phases ,phases
15053 (add-after 'unpack 'set-my-HOME
15054 (lambda _ (setenv "HOME" "/tmp")))))))
15055 (native-inputs
15056 `(("python2-importlib-metadata" ,python2-importlib-metadata)
15057 ,@(package-native-inputs variant))))))
15058
15059 (define-public python-csscompressor
15060 (package
15061 (name "python-csscompressor")
15062 (version "0.9.5")
15063 (source
15064 (origin
15065 (method url-fetch)
15066 (uri (pypi-uri "csscompressor" version))
15067 (sha256
15068 (base32
15069 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
15070 (build-system python-build-system)
15071 (arguments
15072 '(#:phases
15073 (modify-phases %standard-phases
15074 (replace 'check
15075 (lambda _
15076 (invoke "py.test"))))))
15077 (native-inputs
15078 `(("python-pytest" ,python-pytest)))
15079 (home-page "https://github.com/sprymix/csscompressor")
15080 (synopsis "Python port of YUI CSS Compressor")
15081 (description
15082 "This package provides a python port of YUI CSS Compressor.")
15083 (license license:bsd-3)))
15084
15085 (define-public python-rcssmin
15086 (package
15087 (name "python-rcssmin")
15088 (version "1.0.6")
15089 (source
15090 (origin
15091 (method url-fetch)
15092 (uri (pypi-uri "rcssmin" version))
15093 (sha256
15094 (base32
15095 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
15096 (build-system python-build-system)
15097 (arguments
15098 '(#:phases
15099 (modify-phases %standard-phases
15100 (replace 'check
15101 (lambda _
15102 (invoke "python" "run_tests.py" "tests"))))))
15103 (home-page "http://opensource.perlig.de/rcssmin/")
15104 (synopsis "CSS Minifier")
15105 (description "The minifier is based on the semantics of the YUI compressor,
15106 which itself is based on the rule list by Isaac Schlueter.")
15107 (license license:asl2.0)))
15108
15109 (define-public python-rjsmin
15110 (package
15111 (name "python-rjsmin")
15112 (version "1.1.0")
15113 (source
15114 (origin
15115 (method url-fetch)
15116 (uri (pypi-uri "rjsmin" version))
15117 (sha256
15118 (base32
15119 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
15120 (modules '((guix build utils)))
15121 (snippet
15122 '(begin
15123 (for-each delete-file (find-files "bench" "\\.js$"))
15124 #t))))
15125 (build-system python-build-system)
15126 (arguments
15127 '(#:tests? #f ; Not all test files included.
15128 #:phases
15129 (modify-phases %standard-phases
15130 (replace 'check
15131 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
15132 (add-installed-pythonpath inputs outputs)
15133 (if tests?
15134 (invoke "py.test" "-vv" "tests")
15135 #t))))))
15136 (native-inputs
15137 `(("python-pytest" ,python-pytest)))
15138 (home-page "http://opensource.perlig.de/rjsmin/")
15139 (synopsis "Javascript Minifier")
15140 (description "@code{rJSmin} is a javascript minifier written in Python. The
15141 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
15142 is a re-implementation aiming for speed, so it can be used at runtime (rather
15143 than during a preprocessing step).")
15144 (license license:asl2.0)))
15145
15146 (define-public python-xopen
15147 (package
15148 (name "python-xopen")
15149 (version "0.5.0")
15150 (source
15151 (origin
15152 (method url-fetch)
15153 (uri (pypi-uri "xopen" version))
15154 (sha256
15155 (base32
15156 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
15157 (build-system python-build-system)
15158 (propagated-inputs
15159 `(("python-setuptools-scm" ,python-setuptools-scm)))
15160 (home-page "https://github.com/marcelm/xopen/")
15161 (synopsis "Open compressed files transparently")
15162 (description "This module provides an @code{xopen} function that works like
15163 Python's built-in @code{open} function, but can also deal with compressed files.
15164 Supported compression formats are gzip, bzip2 and, xz, and are automatically
15165 recognized by their file extensions. The focus is on being as efficient as
15166 possible on all supported Python versions.")
15167 (license license:expat)))
15168
15169 (define-public python2-xopen
15170 (let ((base (package-with-python2
15171 (strip-python2-variant python-xopen))))
15172 (package/inherit base
15173 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
15174 ,@(package-propagated-inputs base))))))
15175
15176 (define-public python-cheetah
15177 (package
15178 (name "python-cheetah")
15179 (version "3.2.4")
15180 (source
15181 (origin
15182 (method url-fetch)
15183 (uri (pypi-uri "Cheetah3" version))
15184 (sha256
15185 (base32
15186 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
15187 (build-system python-build-system)
15188 (arguments
15189 `(#:modules ((guix build utils)
15190 (guix build python-build-system)
15191 (ice-9 ftw)
15192 (srfi srfi-1)
15193 (srfi srfi-26))
15194 #:phases (modify-phases %standard-phases
15195 (add-after 'unpack 'use-absolute-python
15196 (lambda _
15197 (substitute* "Cheetah/CheetahWrapper.py"
15198 (("#!/usr/bin/env python")
15199 (string-append "#!" (which "python"))))
15200 #t))
15201 (add-after 'unpack 'fix-tests
15202 (lambda _
15203 (substitute* "Cheetah/Tests/ImportHooks.py"
15204 (("os.path.dirname\\(__file__\\)")
15205 (string-append "'" (getcwd) "/Cheetah/Tests'")))
15206 #t))
15207 (replace 'check
15208 (lambda _
15209 (let ((cwd (getcwd)))
15210 (setenv "PYTHONPATH"
15211 (string-append
15212 cwd "/build/"
15213 (find (cut string-prefix? "lib" <>)
15214 (scandir (string-append cwd "/build")))
15215 ":" (getenv "PYTHONPATH")))
15216 (setenv "PATH"
15217 (string-append (getenv "PATH")
15218 ":" cwd "/bin"))
15219 (setenv "TMPDIR" "/tmp")
15220
15221 (substitute* "Cheetah/Tests/Test.py"
15222 (("unittest.TextTestRunner\\(\\)")
15223 "unittest.TextTestRunner(verbosity=2)"))
15224
15225 (invoke "python" "Cheetah/Tests/Test.py")))))))
15226 (propagated-inputs
15227 `(("python-markdown" ,python-markdown))) ;optional
15228 (home-page "https://cheetahtemplate.org/")
15229 (synopsis "Template engine")
15230 (description "Cheetah is a text-based template engine and Python code
15231 generator.
15232
15233 Cheetah can be used as a standalone templating utility or referenced as
15234 a library from other Python applications. It has many potential uses,
15235 but web developers looking for a viable alternative to ASP, JSP, PHP and
15236 PSP are expected to be its principle user group.
15237
15238 Features:
15239 @enumerate
15240 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
15241 text-based format.
15242 @item Cleanly separates content, graphic design, and program code.
15243 @item Blends the power and flexibility of Python with a simple template language
15244 that non-programmers can understand.
15245 @item Gives template writers full access to any Python data structure, module,
15246 function, object, or method in their templates.
15247 @item Makes code reuse easy by providing an object-orientated interface to
15248 templates that is accessible from Python code or other Cheetah templates.
15249 One template can subclass another and selectively reimplement sections of it.
15250 @item Provides a simple, yet powerful, caching mechanism that can dramatically
15251 improve the performance of a dynamic website.
15252 @item Compiles templates into optimized, yet readable, Python code.
15253 @end enumerate")
15254 (license (license:x11-style "file://LICENSE"))))
15255
15256 (define-public python2-cheetah
15257 (package-with-python2 python-cheetah))
15258
15259 (define-public python-dulwich
15260 (package
15261 (name "python-dulwich")
15262 (version "0.19.16")
15263 (source
15264 (origin
15265 (method url-fetch)
15266 (uri (list (string-append "https://www.dulwich.io/releases/"
15267 "dulwich-" version ".tar.gz")
15268 (pypi-uri "dulwich" version)))
15269 (sha256
15270 (base32
15271 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
15272 (build-system python-build-system)
15273 (arguments
15274 `(#:phases
15275 (modify-phases %standard-phases
15276 (add-before 'check 'fix-tests
15277 (lambda* (#:key inputs #:allow-other-keys)
15278 ;; The tests use Popen with a custom environment which doesn't
15279 ;; include PATH.
15280 (substitute* "dulwich/tests/compat/utils.py"
15281 (("'git'") (string-append "'"
15282 (which "git")
15283 "'")))
15284 (substitute* '("dulwich/tests/test_repository.py"
15285 "dulwich/tests/test_hooks.py")
15286 (("#!/bin/sh") (string-append "#!" (which "sh"))))
15287 (setenv "TEST_RUNNER" "unittest")
15288 (setenv "PYTHONHASHSEED" "random")
15289 #t)))))
15290 (propagated-inputs
15291 `(("python-fastimport" ,python-fastimport)
15292 ("python-urllib3" ,python-urllib3)))
15293 (native-inputs
15294 `(("python-mock" ,python-mock)
15295 ("python-geventhttpclient" ,python-geventhttpclient)
15296 ("git" ,git)))
15297 (home-page "https://www.dulwich.io/")
15298 (synopsis "Git implementation in Python")
15299 (description "Dulwich is an implementation of the Git file formats and
15300 protocols written in pure Python.")
15301 ;; Can be used with either license.
15302 (license (list license:asl2.0 license:gpl2+))))
15303
15304 (define-public python-pbkdf2
15305 (package
15306 (name "python-pbkdf2")
15307 (version "1.3")
15308 (source
15309 (origin
15310 (method url-fetch)
15311 (uri (pypi-uri "pbkdf2" version))
15312 (sha256
15313 (base32
15314 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
15315 (build-system python-build-system)
15316 (arguments
15317 '(#:phases
15318 (modify-phases %standard-phases
15319 (replace 'check
15320 (lambda _
15321 (setenv "PYTHONPATH"
15322 (string-append (getcwd) "/build/lib:"
15323 (getenv "PYTHONPATH")))
15324 (invoke "python" "test/test_pbkdf2.py"))))))
15325 (propagated-inputs
15326 `(("python-pycrypto" ,python-pycrypto))) ; optional
15327 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
15328 (synopsis "Password-based key derivation")
15329 (description "This module implements the password-based key derivation
15330 function, PBKDF2, specified in RSA PKCS#5 v2.0.
15331
15332 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
15333 is part of the RSA Public Key Cryptography Standards series. The provided
15334 implementation takes a password or a passphrase and a salt value (and
15335 optionally a iteration count, a digest module, and a MAC module) and provides
15336 a file-like object from which an arbitrarily-sized key can be read.")
15337 (license license:expat)))
15338
15339 (define-public python2-pbkdf2
15340 (package-with-python2 python-pbkdf2))
15341
15342 (define-public python-qrcode
15343 (package
15344 (name "python-qrcode")
15345 (version "6.1")
15346 (source
15347 (origin
15348 (method url-fetch)
15349 (uri (pypi-uri "qrcode" version))
15350 (sha256
15351 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
15352 (build-system python-build-system)
15353 (arguments
15354 ;; FIXME: Tests require packaging 'pymaging'.
15355 '(#:tests? #f))
15356 (propagated-inputs
15357 `(("python-lxml" ,python-lxml) ; for SVG output
15358 ("python-pillow" ,python-pillow) ; for PNG output
15359 ("python-six" ,python-six)))
15360 (home-page "https://github.com/lincolnloop/python-qrcode")
15361 (synopsis "QR Code image generator")
15362 (description "This package provides a pure Python QR Code generator
15363 module. It uses the Python Imaging Library (PIL) to allow for the generation
15364 of QR Codes.
15365
15366 In addition this package provides a command line tool to generate QR codes and
15367 either write these QR codes to a file or do the output as ascii art at the
15368 console.")
15369 (license license:bsd-3)))
15370
15371 (define-public python2-qrcode
15372 (package-with-python2 python-qrcode))
15373
15374 (define-public python-rst2ansi
15375 (package
15376 (name "python-rst2ansi")
15377 (version "0.1.5")
15378 (source
15379 (origin
15380 (method url-fetch)
15381 (uri (pypi-uri "rst2ansi" version))
15382 (sha256
15383 (base32
15384 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
15385 (build-system python-build-system)
15386 (propagated-inputs
15387 `(("python-docutils" ,python-docutils)))
15388 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
15389 (synopsis "Convert RST to ANSI-decorated console output")
15390 (description
15391 "Python module dedicated to rendering RST (reStructuredText) documents
15392 to ansi-escaped strings suitable for display in a terminal.")
15393 (license license:expat)))
15394
15395 (define-public python-ansi2html
15396 (package
15397 (name "python-ansi2html")
15398 (version "1.2.0")
15399 (source
15400 (origin
15401 (method url-fetch)
15402 (uri (pypi-uri "ansi2html" version))
15403 (sha256
15404 (base32
15405 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
15406 (build-system python-build-system)
15407 (native-inputs
15408 `(("python-mock" ,python-mock)
15409 ("python-nose" ,python-nose)))
15410 (propagated-inputs
15411 `(("python-six" ,python-six)))
15412 (home-page "https://github.com/ralphbean/ansi2html")
15413 (synopsis "Convert ANSI-decorated console output to HTML")
15414 (description
15415 "@command{ansi2html} is a Python library and command line utility for
15416 converting text with ANSI color codes to HTML or LaTeX.")
15417 (license license:gpl3+)))
15418
15419 (define-public python2-ansi2html
15420 (package-with-python2 python-ansi2html))
15421
15422 (define-public python-ddt
15423 (package
15424 (name "python-ddt")
15425 (version "1.4.1")
15426 (source
15427 (origin
15428 (method url-fetch)
15429 (uri (pypi-uri "ddt" version))
15430 (sha256
15431 (base32
15432 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
15433 (build-system python-build-system)
15434 (native-inputs
15435 `(("python-pytest" ,python-pytest)))
15436 (propagated-inputs
15437 `(("python-pyyaml" ,python-pyyaml)))
15438 (home-page "https://github.com/datadriventests/ddt")
15439 (synopsis "Data-Driven Tests")
15440 (description
15441 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
15442 running it with different test data, and make it appear as multiple test
15443 cases.")
15444 (license license:expat)))
15445
15446 (define-public python-pycountry
15447 (package
15448 (name "python-pycountry")
15449 (version "18.5.26")
15450 (source
15451 (origin
15452 (method url-fetch)
15453 (uri (pypi-uri "pycountry" version))
15454 (sha256
15455 (base32
15456 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
15457 (build-system python-build-system)
15458 (home-page "https://bitbucket.org/flyingcircus/pycountry")
15459 (synopsis "ISO databases for languages, countries, currencies, etc.")
15460 (description
15461 "@code{pycountry} provides the ISO databases for the standards:
15462 @enumerate
15463 @item 639-3 (Languages)
15464 @item 3166 (Countries)
15465 @item 3166-3 (Deleted Countries)
15466 @item 3166-2 (Subdivisions of countries)
15467 @item 4217 (Currencies)
15468 @item 15924 (Scripts)
15469 @end enumerate
15470 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
15471 through a Python API.")
15472 (license license:lgpl2.1+)))
15473
15474 (define-public python2-pycountry
15475 (package-with-python2 python-pycountry))
15476
15477 (define-public python-pycosat
15478 (package
15479 (name "python-pycosat")
15480 (version "0.6.3")
15481 (source
15482 (origin
15483 (method url-fetch)
15484 (uri (pypi-uri "pycosat" version ".zip"))
15485 (sha256
15486 (base32
15487 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
15488 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
15489 (build-system python-build-system)
15490 (native-inputs
15491 `(("unzip" ,unzip)))
15492 (home-page "https://github.com/ContinuumIO/pycosat")
15493 (synopsis "Bindings to picosat (a SAT solver)")
15494 (description
15495 "This package provides efficient Python bindings to @code{picosat} on
15496 the C level. When importing pycosat, the @code{picosat} solver becomes part
15497 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
15498 Problem} (SAT) solver.")
15499 (license license:expat)))
15500
15501 (define-public python2-pycosat
15502 (package-with-python2 python-pycosat))
15503
15504 (define-public python2-ruamel.ordereddict
15505 (package
15506 (name "python2-ruamel.ordereddict")
15507 (version "0.4.9")
15508 (source
15509 (origin
15510 (method url-fetch)
15511 (uri (pypi-uri "ruamel.ordereddict" version))
15512 (sha256
15513 (base32
15514 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
15515 (build-system python-build-system)
15516 (arguments
15517 `(#:python ,python-2
15518 #:phases
15519 (modify-phases %standard-phases
15520 (delete 'check)
15521 (add-after 'install 'check
15522 (lambda* (#:key inputs outputs #:allow-other-keys)
15523 (add-installed-pythonpath inputs outputs)
15524 (invoke "python" "test/testordereddict.py"))))))
15525 (home-page "https://bitbucket.org/ruamel/ordereddict")
15526 (synopsis "Version of dict that keeps keys in insertion order")
15527 (description
15528 "This is an implementation of an ordered dictionary with @dfn{Key
15529 Insertion Order} (KIO: updates of values do not affect the position of the
15530 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15531 removed and put at the back). The standard library module @code{OrderedDict},
15532 implemented later, implements a subset of @code{ordereddict} functionality.
15533 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15534 Order} (KSO, no sorting function can be specified, but a transform can be
15535 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15536 (license license:expat)))
15537
15538 (define-public python-pypeg2
15539 (package
15540 (name "python-pypeg2")
15541 (version "2.15.2")
15542 (source
15543 (origin
15544 (method url-fetch)
15545 (uri (pypi-uri "pyPEG2" version))
15546 (sha256
15547 (base32
15548 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15549 (build-system python-build-system)
15550 (propagated-inputs `(("python-lxml" ,python-lxml)))
15551 (arguments
15552 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15553 '(#:tests? #f))
15554 (home-page "https://fdik.org/pyPEG/")
15555 (synopsis "Parsering Expression Grammars in Python")
15556 (description "PyPEG is an intrinsic parser interpreter framework for
15557 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15558 parse many formal languages.")
15559 (license license:gpl2)))
15560
15561 (define-public python-incremental
15562 (package
15563 (name "python-incremental")
15564 (version "17.5.0")
15565 (source
15566 (origin
15567 (method url-fetch)
15568 (uri (pypi-uri "incremental" version))
15569 (sha256
15570 (base32
15571 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15572 (build-system python-build-system)
15573 (home-page "https://github.com/hawkowl/incremental")
15574 (synopsis "Library for versioning Python projects")
15575 (description "Incremental is a small library that versions your Python
15576 projects.")
15577 (license license:expat)))
15578
15579 (define-public python2-incremental
15580 (package-with-python2 python-incremental))
15581
15582 (define-public python-invoke
15583 (package
15584 (name "python-invoke")
15585 (home-page "https://www.pyinvoke.org/")
15586 (version "1.5.0")
15587 (source (origin
15588 (method url-fetch)
15589 (uri (pypi-uri "invoke" version))
15590 (sha256
15591 (base32
15592 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
15593 (build-system python-build-system)
15594 (arguments
15595 ;; XXX: Requires many dependencies that are not yet in Guix.
15596 `(#:tests? #f
15597 #:phases
15598 (modify-phases %standard-phases
15599 (add-after 'unpack 'fix-bash-path
15600 (lambda* (#:key inputs #:allow-other-keys)
15601 (let ((bash (assoc-ref inputs "bash")))
15602 (substitute* "invoke/config.py"
15603 (("shell = \"/bin/bash\"")
15604 (string-append "shell = \"" bash "/bin/bash\""))
15605 )
15606 #t))))))
15607 (inputs
15608 `(("bash" ,bash-minimal)))
15609 (synopsis "Pythonic task execution")
15610 (description
15611 "Invoke is a Python task execution tool and library, drawing inspiration
15612 from various sources to arrive at a powerful and clean feature set. It is
15613 evolved from the Fabric project, but focuses on local and abstract concerns
15614 instead of servers and network commands.")
15615 (license license:bsd-3)))
15616
15617 (define-public python2-invoke
15618 (package-with-python2 python-invoke))
15619
15620 (define-public python-automat
15621 (package
15622 (name "python-automat")
15623 (version "20.2.0")
15624 (source (origin
15625 (method url-fetch)
15626 (uri (pypi-uri "Automat" version))
15627 (sha256
15628 (base32
15629 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15630 (build-system python-build-system)
15631 ;; We disable the tests because they require python-twisted, while
15632 ;; python-twisted depends on python-automat. Twisted is optional, but the
15633 ;; tests fail if it is not available. Also see
15634 ;; <https://github.com/glyph/automat/issues/71>.
15635 (arguments '(#:tests? #f))
15636 (native-inputs
15637 `(("python-m2r" ,python-m2r)
15638 ("python-setuptools-scm" ,python-setuptools-scm)
15639 ("python-graphviz" ,python-graphviz)))
15640 (propagated-inputs
15641 `(("python-six" ,python-six)
15642 ("python-attrs" ,python-attrs)))
15643 (home-page "https://github.com/glyph/Automat")
15644 (synopsis "Self-service finite-state machines")
15645 (description "Automat is a library for concise, idiomatic Python
15646 expression of finite-state automata (particularly deterministic finite-state
15647 transducers).")
15648 (license license:expat)))
15649
15650 (define-public python2-automat
15651 (package-with-python2 python-automat))
15652
15653 (define-public python-m2r
15654 (package
15655 (name "python-m2r")
15656 (version "0.2.1")
15657 (source (origin
15658 (method url-fetch)
15659 (uri (pypi-uri "m2r" version))
15660 (sha256
15661 (base32
15662 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15663 (build-system python-build-system)
15664 (propagated-inputs
15665 `(("python-docutils" ,python-docutils)
15666 ("python-mistune" ,python-mistune)))
15667 (native-inputs
15668 `(("python-pygments" ,python-pygments)
15669 ("python-mock" ,python-mock)))
15670 (home-page "https://github.com/miyakogi/m2r")
15671 (synopsis "Markdown to reStructuredText converter")
15672 (description "M2R converts a markdown file including reST markups to valid
15673 reST format.")
15674 (license license:expat)))
15675
15676 (define-public python2-m2r
15677 (package-with-python2 python-m2r))
15678
15679 (define-public python-constantly
15680 (package
15681 (name "python-constantly")
15682 (version "15.1.0")
15683 (source (origin
15684 (method url-fetch)
15685 (uri (pypi-uri "constantly" version))
15686 (sha256
15687 (base32
15688 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15689 (build-system python-build-system)
15690 (home-page "https://github.com/twisted/constantly")
15691 (synopsis "Symbolic constants in Python")
15692 (description "Constantly is a Python library that provides symbolic
15693 constant support. It includes collections and constants with text, numeric,
15694 and bit flag values.")
15695 (license license:expat)))
15696
15697 (define-public python2-constantly
15698 (package-with-python2 python-constantly))
15699
15700 (define-public python-attrs
15701 (package
15702 (name "python-attrs")
15703 (version "19.3.0")
15704 (source (origin
15705 (method url-fetch)
15706 (uri (pypi-uri "attrs" version))
15707 (sha256
15708 (base32
15709 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15710 (build-system python-build-system)
15711 (arguments
15712 `(#:modules ((guix build utils)
15713 (guix build python-build-system)
15714 (ice-9 ftw)
15715 (srfi srfi-1)
15716 (srfi srfi-26))
15717 #:phases (modify-phases %standard-phases
15718 (replace 'check
15719 (lambda _
15720 (let ((cwd (getcwd)))
15721 (setenv "PYTHONPATH"
15722 (string-append
15723 cwd "/build/"
15724 (find (cut string-prefix? "lib" <>)
15725 (scandir (string-append cwd "/build")))
15726 ":"
15727 (getenv "PYTHONPATH")))
15728 (invoke "python" "-m" "pytest")))))))
15729 (native-inputs
15730 `(("python-coverage" ,python-coverage)
15731 ("python-hypothesis" ,python-hypothesis)
15732 ("python-pympler" ,python-pympler)
15733 ("python-pytest" ,python-pytest)
15734 ("python-six" ,python-six)
15735 ("python-sphinx" ,python-sphinx)
15736 ("python-zope-interface" ,python-zope-interface)))
15737 (home-page "https://github.com/python-attrs/attrs/")
15738 (synopsis "Attributes without boilerplate")
15739 (description "@code{attrs} is a Python package with class decorators that
15740 ease the chores of implementing the most common attribute-related object
15741 protocols.")
15742 (license license:expat)))
15743
15744 (define-public python2-attrs
15745 (package-with-python2 python-attrs))
15746
15747 (define-public python-attrs-bootstrap
15748 (package
15749 (inherit python-attrs)
15750 (name "python-attrs-bootstrap")
15751 (native-inputs `())
15752 (arguments `(#:tests? #f))))
15753
15754 (define-public python2-attrs-bootstrap
15755 (package-with-python2 python-attrs-bootstrap))
15756
15757 (define-public python2-cliapp
15758 (package
15759 (name "python2-cliapp")
15760 (version "1.20180812.1")
15761 (source
15762 (origin
15763 (method url-fetch)
15764 (uri (string-append
15765 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15766 version ".tar.gz"))
15767 (sha256
15768 (base32
15769 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15770 (build-system python-build-system)
15771 (arguments
15772 `(#:python ,python-2
15773 #:phases
15774 (modify-phases %standard-phases
15775 ;; check phase needs to be run before the build phase. If not,
15776 ;; coverage-test-runner looks for tests for the built source files,
15777 ;; and fails.
15778 (delete 'check)
15779 (add-before 'build 'check
15780 (lambda _
15781 ;; Disable python3 tests
15782 (substitute* "check"
15783 (("python3") "# python3"))
15784 (invoke "./check"))))))
15785 (native-inputs
15786 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15787 ("python2-pep8" ,python2-pep8)))
15788 (propagated-inputs
15789 `(("python2-pyaml" ,python2-pyaml)))
15790 (home-page "https://liw.fi/cliapp/")
15791 (synopsis "Python framework for command line programs")
15792 (description "@code{python2-cliapp} is a python framework for
15793 command line programs. It contains the typical stuff such programs
15794 need to do, such as parsing the command line for options, and
15795 iterating over input files.")
15796 (license license:gpl2+)))
15797
15798 (define-public python2-ttystatus
15799 (package
15800 (name "python2-ttystatus")
15801 (version "0.38")
15802 (source
15803 (origin
15804 (method git-fetch)
15805 (uri (git-reference
15806 (url "http://git.liw.fi/ttystatus")
15807 ;; There are no tags after ttystatus-0.36.
15808 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15809 (sha256
15810 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15811 (file-name (git-file-name name version))))
15812 (build-system python-build-system)
15813 (native-inputs
15814 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15815 ("python2-pep8" ,python2-pep8)))
15816 (arguments
15817 `(#:python ,python-2
15818 #:phases
15819 (modify-phases %standard-phases
15820 ;; check phase needs to be run before the build phase. If not,
15821 ;; coverage-test-runner looks for tests for the built source files,
15822 ;; and fails.
15823 (delete 'check)
15824 (add-before 'build 'check
15825 (lambda _ (invoke "make" "check"))))))
15826 (home-page "https://liw.fi/ttystatus/")
15827 (synopsis "Python library for showing progress reporting and
15828 status updates on terminals")
15829 (description "@code{python2-ttystatus} is a python library for
15830 showing progress reporting and status updates on terminals, for
15831 command line programs. Output is automatically adapted to the width
15832 of the terminal: truncated if it does not fit, and resized if the
15833 terminal size changes.")
15834 (license license:gpl3+)))
15835
15836 (define-public python2-tracing
15837 (package
15838 (name "python2-tracing")
15839 (version "0.10")
15840 (source
15841 (origin
15842 (method url-fetch)
15843 (uri (string-append
15844 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15845 version ".tar.gz"))
15846 (sha256
15847 (base32
15848 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15849 (build-system python-build-system)
15850 (arguments
15851 `(#:python ,python-2))
15852 (home-page "https://liw.fi/tracing/")
15853 (synopsis "Python debug logging helper")
15854 (description "@code{python2-tracing} is a python library for
15855 logging debug messages. It provides a way to turn debugging messages
15856 on and off, based on the filename they occur in. It is much faster
15857 than using @code{logging.Filter} to accomplish the same thing, which
15858 matters when code is run in production mode. The actual logging still
15859 happens using the @code{logging} library.")
15860 (license license:gpl3+)))
15861
15862 (define-public python2-larch
15863 (package
15864 (name "python2-larch")
15865 (version "1.20151025")
15866 (source
15867 (origin
15868 (method url-fetch)
15869 (uri (string-append
15870 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15871 version ".tar.gz"))
15872 (patches (search-patches
15873 "python2-larch-coverage-4.0a6-compatibility.patch"))
15874 (sha256
15875 (base32
15876 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15877 (build-system python-build-system)
15878 (arguments
15879 `(#:python ,python-2
15880 #:phases
15881 (modify-phases %standard-phases
15882 ;; check phase needs to be run before the build phase. If not,
15883 ;; coverage-test-runner looks for tests for the built source files,
15884 ;; and fails.
15885 (delete 'check)
15886 (add-before 'build 'check
15887 (lambda _ (invoke "make" "check"))))))
15888 (native-inputs
15889 `(("cmdtest" ,cmdtest)
15890 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15891 (propagated-inputs
15892 `(("python2-tracing" ,python2-tracing)))
15893 (home-page "https://liw.fi/larch/")
15894 (synopsis "Python copy-on-write B-tree library")
15895 (description "@code{python2-larch} is an implementation of
15896 particular kind of B-tree, based on research by Ohad Rodeh. See
15897 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15898 on the data structure.
15899
15900 The distinctive feature of this B-tree is that a node is never
15901 (conceptually) modified. Instead, all updates are done by
15902 copy-on-write. This makes it easy to clone a tree, and modify only the
15903 clone, while other processes access the original tree.")
15904 (license license:gpl3+)))
15905
15906 (define-public python-astroid
15907 (package
15908 (name "python-astroid")
15909 (version "2.4.2")
15910 (source
15911 (origin
15912 (method url-fetch)
15913 (uri (pypi-uri "astroid" version))
15914 (sha256
15915 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15916 (modules '((guix build utils)))
15917 (snippet
15918 '(begin
15919 ;; Check to see if the version pinning has been removed.
15920 (substitute* "astroid/__pkginfo__.py"
15921 (("==1\\.4\\.\\*") ">=1.4.0"))
15922 #t))))
15923 (build-system python-build-system)
15924 (propagated-inputs
15925 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15926 ("python-six" ,python-six)
15927 ("python-wrapt" ,python-wrapt)))
15928 (native-inputs
15929 `(("python-dateutil" ,python-dateutil)
15930 ("python-pytest" ,python-pytest)
15931 ("python-pytest-runner" ,python-pytest-runner)))
15932 (home-page "https://github.com/PyCQA/astroid")
15933 (synopsis "Common base representation of python source code for pylint and
15934 other projects")
15935 (description "@code{python-astroid} provides a common base representation
15936 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15937
15938 It provides a compatible representation which comes from the _ast module. It
15939 rebuilds the tree generated by the builtin _ast module by recursively walking
15940 down the AST and building an extended ast. The new node classes have
15941 additional methods and attributes for different usages. They include some
15942 support for static inference and local name scopes. Furthermore, astroid
15943 builds partial trees by inspecting living objects.")
15944 (license license:lgpl2.1+)
15945 (properties `((python2-variant . ,(delay python2-astroid))))))
15946
15947 (define-public python2-astroid
15948 (let ((base (package-with-python2
15949 (strip-python2-variant python-astroid))))
15950 (package (inherit base)
15951 ;; Version 2.x removes python2 support.
15952 (version "1.6.5")
15953 (source
15954 (origin
15955 (method url-fetch)
15956 (uri (pypi-uri "astroid" version))
15957 (sha256
15958 (base32
15959 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15960 (arguments
15961 (substitute-keyword-arguments (package-arguments base)
15962 ((#:phases phases)
15963 `(modify-phases ,phases
15964 (add-after 'unpack 'remove-spurious-test
15965 (lambda _
15966 ;; https://github.com/PyCQA/astroid/issues/276
15967 (delete-file "astroid/tests/unittest_brain.py")
15968 #t))
15969 (replace 'check
15970 (lambda _
15971 (invoke"python" "-m" "unittest" "discover"
15972 "-p" "unittest*.py")))))))
15973 (native-inputs `())
15974 (propagated-inputs
15975 `(("python2-backports-functools-lru-cache"
15976 ,python2-backports-functools-lru-cache)
15977 ("python2-enum34" ,python2-enum34)
15978 ("python2-singledispatch" ,python2-singledispatch)
15979 ,@(alist-delete "python-typed-ast"
15980 (package-propagated-inputs base)))))))
15981
15982 (define-public python-isbnlib
15983 (package
15984 (name "python-isbnlib")
15985 (version "3.10.4")
15986 (source
15987 (origin
15988 (method url-fetch)
15989 (uri (pypi-uri "isbnlib" version))
15990 (sha256
15991 (base32
15992 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
15993 (build-system python-build-system)
15994 (arguments '(#:tests? #f)) ; No test
15995 (home-page "https://github.com/xlcnd/isbnlib")
15996 (synopsis "Python library to work with ISBN strings")
15997 (description "@code{python-isbnlib} is a (pure) python library that provides
15998 several useful methods and functions to validate, clean, transform, hyphenate and
15999 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
16000 version, is suitable to be include as a dependency in other projects.")
16001 (license license:lgpl3+)))
16002
16003 (define-public python-isort
16004 (package
16005 (name "python-isort")
16006 (version "4.3.4")
16007 (source
16008 (origin
16009 (method git-fetch)
16010 (uri (git-reference
16011 ;; Tests pass only from the Github sources
16012 (url "https://github.com/timothycrosley/isort")
16013 (commit version)))
16014 (file-name (git-file-name name version))
16015 (sha256
16016 (base32
16017 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
16018 (build-system python-build-system)
16019 (native-inputs
16020 `(("python-mock" ,python-mock)
16021 ("python-pytest" ,python-pytest)))
16022 (home-page "https://github.com/timothycrosley/isort")
16023 (synopsis "Python utility/library to sort python imports")
16024 (description "@code{python-isort} is a python utility/library to sort
16025 imports alphabetically, and automatically separated into sections. It
16026 provides a command line utility, a python library and plugins for various
16027 editors.")
16028 (license license:expat)
16029 (properties `((python2-variant . ,(delay python2-isort))))))
16030
16031 (define-public python2-isort
16032 (let ((base (package-with-python2
16033 (strip-python2-variant python-isort))))
16034 (package/inherit base
16035 (native-inputs
16036 `(("python2-futures" ,python2-futures)
16037 ,@(package-native-inputs base))))))
16038
16039 (define-public python2-backports-functools-lru-cache
16040 (package
16041 (name "python2-backports-functools-lru-cache")
16042 (version "1.6.1")
16043 (source
16044 (origin
16045 (method url-fetch)
16046 ;; only the pypi tarballs contain the necessary metadata
16047 (uri (pypi-uri "backports.functools_lru_cache" version))
16048 (sha256
16049 (base32
16050 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
16051 (build-system python-build-system)
16052 (native-inputs
16053 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
16054 (arguments
16055 `(#:python ,python-2))
16056 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
16057 (synopsis "Backport of functools.lru_cache from Python 3.3")
16058 (description "@code{python2-backports-functools-lru-cache} is a backport
16059 of @code{functools.lru_cache} from python 3.3.")
16060 (license license:expat)))
16061
16062 (define-public python-configparser
16063 (package
16064 (name "python-configparser")
16065 (version "4.0.2")
16066 (source
16067 (origin
16068 (method url-fetch)
16069 (uri (pypi-uri "configparser" version))
16070 (sha256
16071 (base32
16072 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
16073 (native-inputs
16074 `(("python-setuptools_scm" ,python-setuptools-scm)))
16075 (build-system python-build-system)
16076 (home-page "https://github.com/jaraco/configparser/")
16077 (synopsis "Backport of configparser from python 3.5")
16078 (description "@code{python-configparser} is a backport of
16079 @code{configparser} from Python 3.5 so that it can be used directly
16080 in other versions.")
16081 (license license:expat)))
16082
16083 (define-public python2-configparser
16084 (package-with-python2 python-configparser))
16085
16086 (define-public python-iniconfig
16087 (package
16088 (name "python-iniconfig")
16089 (version "1.1.1")
16090 (source
16091 (origin
16092 (method url-fetch)
16093 (uri (pypi-uri "iniconfig" version))
16094 (sha256
16095 (base32
16096 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
16097 (build-system python-build-system)
16098 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
16099 (synopsis "Simple INI-file parser")
16100 (description "The @code{iniconfig} package provides a small and simple
16101 INI-file parser module having a unique set of features; @code{iniconfig}
16102 @itemize
16103 @item maintains the order of sections and entries;
16104 @item supports multi-line values with or without line-continuations;
16105 @item supports \"#\" comments everywhere;
16106 @item raises errors with proper line-numbers;
16107 @item raises an error when two sections have the same name.
16108 @end itemize")
16109 (license license:expat)))
16110
16111 (define-public python-mamba
16112 (package
16113 (name "python-mamba")
16114 (version "0.11.2")
16115 (source (origin
16116 (method url-fetch)
16117 (uri (pypi-uri "mamba" version))
16118 (sha256
16119 (base32
16120 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
16121 (build-system python-build-system)
16122 (arguments `(#:tests? #f)) ; No test
16123 (propagated-inputs
16124 `(("python-clint" ,python-clint)
16125 ("python-coverage" ,python-coverage)))
16126 (home-page "https://nestorsalceda.com/mamba/")
16127 (synopsis "Test runner for Python")
16128 (description
16129 "Mamba is a Behaviour-Driven Development tool for Python developers.
16130 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
16131 (license license:expat)))
16132
16133 (define-public python-mando
16134 (package
16135 (name "python-mando")
16136 (version "0.6.4")
16137 (source (origin
16138 (method url-fetch)
16139 (uri (pypi-uri "mando" version))
16140 (sha256
16141 (base32
16142 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
16143 (build-system python-build-system)
16144 (propagated-inputs
16145 `(("python-rst2ansi" ,python-rst2ansi)
16146 ("python-six" ,python-six)))
16147 (native-inputs
16148 `(("python-pytest" ,python-pytest)))
16149 (home-page "https://mando.readthedocs.org/")
16150 (synopsis
16151 "Wrapper around argparse, allowing creation of complete CLI applications")
16152 (description
16153 "This package is a wrapper around argparse, allowing you to write complete CLI
16154 applications in seconds while maintaining all the flexibility.")
16155 (license license:expat)))
16156
16157 (define-public python2-mando
16158 (package-with-python2 python-mando))
16159
16160 (define-public python2-argparse
16161 (package
16162 (name "python2-argparse")
16163 (version "1.4.0")
16164 (source
16165 (origin
16166 (method url-fetch)
16167 (uri (pypi-uri "argparse" version))
16168 (sha256
16169 (base32
16170 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
16171 (build-system python-build-system)
16172 (arguments
16173 `(#:python ,python-2))
16174 (home-page "https://github.com/ThomasWaldmann/argparse/")
16175 (synopsis "Python command-line parsing library")
16176 (description
16177 "This package is mostly for people who want to have @code{argparse} on
16178 older Pythons because it was not part of the standard library back then.")
16179 (license license:psfl)))
16180
16181 (define-public python-fudge
16182 (package
16183 (name "python-fudge")
16184 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
16185 ;; package, which is currently the only use of this package.
16186 (version "0.9.6")
16187 (source
16188 (origin
16189 (method url-fetch)
16190 (uri (pypi-uri "fudge" version))
16191 (sha256
16192 (base32
16193 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
16194 (build-system python-build-system)
16195 (arguments
16196 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
16197 (home-page "https://github.com/fudge-py/fudge")
16198 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
16199 (description
16200 "Fudge is a Python module for using fake objects (mocks and stubs) to
16201 test real ones.
16202
16203 In readable Python code, you declare the methods available on your fake object
16204 and how they should be called. Then you inject that into your application and
16205 start testing. This declarative approach means you don’t have to record and
16206 playback actions and you don’t have to inspect your fakes after running code.
16207 If the fake object was used incorrectly then you’ll see an informative
16208 exception message with a traceback that points to the culprit.")
16209 (license license:expat)))
16210
16211 (define-public python2-fudge
16212 (package-with-python2 python-fudge))
16213
16214 (define-public python-mwclient
16215 (package
16216 (name "python-mwclient")
16217 (version "0.10.1")
16218 (source
16219 (origin
16220 (method git-fetch)
16221 ;; The PyPI version wouldn't contain tests.
16222 (uri (git-reference
16223 (url "https://github.com/mwclient/mwclient")
16224 (commit (string-append "v" version))))
16225 (file-name (git-file-name name version))
16226 (sha256
16227 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
16228 (build-system python-build-system)
16229 (propagated-inputs
16230 `(("python-requests-oauthlib" ,python-requests-oauthlib)
16231 ("python-six" ,python-six)))
16232 (native-inputs
16233 `(("python-mock" ,python-mock)
16234 ("python-pytest" ,python-pytest)
16235 ("python-pytest-cov" ,python-pytest-cov)
16236 ("python-pytest-runner" ,python-pytest-runner)
16237 ("python-responses" ,python-responses)))
16238 (home-page "https://github.com/btongminh/mwclient")
16239 (synopsis "MediaWiki API client")
16240 (description "This package provides a MediaWiki API client.")
16241 (license license:expat)))
16242
16243 (define-public python-utils
16244 (package
16245 (name "python-utils")
16246 (version "2.4.0")
16247 (source (origin
16248 (method url-fetch)
16249 (uri (pypi-uri "python-utils" version))
16250 (sha256
16251 (base32
16252 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
16253 (build-system python-build-system)
16254 (arguments
16255 `(#:phases
16256 (modify-phases %standard-phases
16257 (replace 'check
16258 (lambda* (#:key inputs outputs #:allow-other-keys)
16259 (add-installed-pythonpath inputs outputs)
16260 (delete-file "pytest.ini")
16261 (invoke "pytest" "-vv"))))))
16262 (native-inputs
16263 `(("pytest-runner" ,python-pytest-runner)
16264 ("pytest" ,python-pytest)
16265 ("six" ,python-six)))
16266 (home-page "https://github.com/WoLpH/python-utils")
16267 (synopsis "Convenient utilities not included with the standard Python install")
16268 (description
16269 "Python Utils is a collection of small Python functions and classes which
16270 make common patterns shorter and easier.")
16271 (license license:bsd-2)))
16272
16273 (define-public python2-utils
16274 (package-with-python2 python-utils))
16275
16276 (define-public python-diff-match-patch
16277 (package
16278 (name "python-diff-match-patch")
16279 (version "20121119")
16280 (source
16281 (origin
16282 (method url-fetch)
16283 (uri (pypi-uri "diff-match-patch" version))
16284 (sha256
16285 (base32
16286 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
16287 (build-system python-build-system)
16288 (home-page "https://code.google.com/p/google-diff-match-patch")
16289 (synopsis "Synchronize plain text")
16290 (description "Diff Match and Patch libraries offer robust algorithms to
16291 perform the operations required for synchronizing plain text.")
16292 (license license:asl2.0)))
16293
16294 (define-public python2-diff-match-patch
16295 (package-with-python2 python-diff-match-patch))
16296
16297 (define-public python-dirsync
16298 (package
16299 (name "python-dirsync")
16300 (version "2.2.5")
16301 (source
16302 (origin
16303 (method url-fetch)
16304 (uri (pypi-uri "dirsync" version))
16305 (sha256
16306 (base32
16307 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
16308 (build-system python-build-system)
16309 (propagated-inputs
16310 `(("six" ,python-six)))
16311 (home-page "https://github.com/tkhyn/dirsync")
16312 (synopsis "Advanced directory tree synchronisation tool")
16313 (description "Advanced directory tree synchronisation tool.")
16314 (license license:expat)))
16315
16316 (define-public python2-dirsync
16317 (package-with-python2 python-dirsync))
16318
16319 (define-public python-levenshtein
16320 (package
16321 (name "python-levenshtein")
16322 (version "0.12.0")
16323 (source
16324 (origin
16325 (method url-fetch)
16326 (uri (pypi-uri "python-Levenshtein" version))
16327 (sha256
16328 (base32
16329 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
16330 (build-system python-build-system)
16331 (home-page "https://github.com/ztane/python-Levenshtein")
16332 (synopsis "Fast computation of Levenshtein distance and string similarity")
16333 (description
16334 "The Levenshtein Python C extension module contains functions for fast computation of
16335 @enumerate
16336 @item Levenshtein (edit) distance, and edit operations
16337 @item string similarity
16338 @item approximate median strings, and generally string averaging
16339 @item string sequence and set similarity
16340 @end enumerate
16341 It supports both normal and Unicode strings.")
16342 (license license:gpl2+)))
16343
16344 (define-public python2-levenshtein
16345 (package-with-python2 python-levenshtein))
16346
16347 (define-public python-scandir
16348 (package
16349 (name "python-scandir")
16350 (version "1.10.0")
16351 (source
16352 (origin
16353 (method url-fetch)
16354 (uri (pypi-uri "scandir" version))
16355 (sha256
16356 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
16357 (build-system python-build-system)
16358 (arguments
16359 `(#:phases (modify-phases %standard-phases
16360 (replace 'check
16361 (lambda _
16362 (invoke "python" "test/run_tests.py"))))))
16363 (home-page "https://github.com/benhoyt/scandir")
16364 (synopsis "Directory iteration function")
16365 (description
16366 "Directory iteration function like os.listdir(), except that instead of
16367 returning a list of bare filenames, it yields DirEntry objects that include
16368 file type and stat information along with the name. Using scandir() increases
16369 the speed of os.walk() by 2-20 times (depending on the platform and file
16370 system) by avoiding unnecessary calls to os.stat() in most cases.
16371
16372 This package is part of the Python standard library since version 3.5.")
16373 (license license:bsd-3)))
16374
16375 (define-public python2-scandir
16376 (package-with-python2 python-scandir))
16377
16378 (define-public python2-stemming
16379 (package
16380 (name "python2-stemming")
16381 (version "1.0.1")
16382 (source
16383 (origin
16384 (method url-fetch)
16385 (uri (pypi-uri "stemming" version))
16386 (sha256
16387 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
16388 (build-system python-build-system)
16389 (arguments
16390 `(#:python ,python-2))
16391 (home-page "https://bitbucket.org/mchaput/stemming/overview")
16392 (synopsis "Python implementations of various stemming algorithms")
16393 (description
16394 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
16395 stemming algorithms for English. These implementations are straightforward and
16396 efficient, unlike some Python versions of the same algorithms available on the
16397 Web. This package is an extraction of the stemming code included in the Whoosh
16398 search engine.")
16399 (license license:public-domain)))
16400
16401 (define-public python-factory-boy
16402 (package
16403 (name "python-factory-boy")
16404 (version "2.8.1")
16405 (source
16406 (origin
16407 (method url-fetch)
16408 (uri (pypi-uri "factory_boy" version))
16409 (sha256
16410 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
16411 (build-system python-build-system)
16412 (arguments
16413 ;; Tests are not included in the tarball.
16414 `(#:tests? #f))
16415 (propagated-inputs
16416 `(("faker" ,python-faker)))
16417 (home-page "https://github.com/benhoyt/scandir")
16418 (synopsis "Versatile test fixtures replacement")
16419 (description
16420 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
16421
16422 As a fixtures replacement tool, it aims to replace static, hard to maintain
16423 fixtures with easy-to-use factories for complex object.
16424
16425 Instead of building an exhaustive test setup with every possible combination
16426 of corner cases, factory_boy allows you to use objects customized for the
16427 current test, while only declaring the test-specific fields")
16428 (license license:expat)))
16429
16430 (define-public python2-factory-boy
16431 (package-with-python2 python-factory-boy))
16432
16433 (define-public python-translate-toolkit
16434 (package
16435 (name "python-translate-toolkit")
16436 (version "2.1.0")
16437 (source
16438 (origin
16439 (method url-fetch)
16440 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
16441 (sha256
16442 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
16443 (build-system python-build-system)
16444 (native-inputs
16445 `(("python-pytest" ,python-pytest)
16446 ("python-sphinx" ,python-sphinx)))
16447 (propagated-inputs
16448 `(("python-babel" ,python-babel)
16449 ("python-beautifulsoup4" ,python-beautifulsoup4)
16450 ("python-chardet" ,python-chardet)
16451 ("python-diff-match-patch" ,python-diff-match-patch)
16452 ("python-levenshtein" ,python-levenshtein)
16453 ("python-lxml" ,python-lxml)
16454 ("python-six" ,python-six)
16455 ("python-vobject" ,python-vobject)
16456 ("python-pyyaml" ,python-pyyaml)))
16457 (arguments
16458 ;; TODO: tests are not run, because they end with
16459 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
16460 ;; 'parse_funcs'
16461 ;; during test setup.
16462 `(#:tests? #f))
16463 (home-page "https://toolkit.translatehouse.org")
16464 (synopsis "Tools and API for translation and localization engineering")
16465 (description
16466 "Tools and API for translation and localization engineering. It contains
16467 several utilities, as well as an API for building localization tools.")
16468 (license license:gpl2+)))
16469
16470 (define-public python2-translate-toolkit
16471 (package-with-python2 python-translate-toolkit))
16472
16473 (define-public python-packaging
16474 (package
16475 (name "python-packaging")
16476 (version "20.0")
16477 (source
16478 (origin
16479 (method url-fetch)
16480 (uri (pypi-uri "packaging" version))
16481 ;; XXX: The URL in the patch file is wrong, it should be
16482 ;; <https://github.com/pypa/packaging/pull/256>.
16483 (patches (search-patches "python-packaging-test-arch.patch"))
16484 (sha256
16485 (base32
16486 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
16487 (build-system python-build-system)
16488 (arguments
16489 `(#:phases (modify-phases %standard-phases
16490 (replace 'check
16491 (lambda* (#:key tests? #:allow-other-keys)
16492 (if tests?
16493 (invoke "py.test" "-vv")
16494 (format #t "test suite not run~%"))
16495 #t)))))
16496 (native-inputs
16497 `(("python-pretend" ,python-pretend)
16498 ("python-pytest" ,python-pytest)))
16499 (propagated-inputs
16500 `(("python-pyparsing" ,python-pyparsing)
16501 ("python-six" ,python-six)))
16502 (home-page "https://github.com/pypa/packaging")
16503 (synopsis "Core utilities for Python packages")
16504 (description "Packaging is a Python module for dealing with Python packages.
16505 It offers an interface for working with package versions, names, and dependency
16506 information.")
16507 ;; From 'LICENSE': This software is made available under the terms of
16508 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
16509 ;; Contributions to this software is made under the terms of *both* these
16510 ;; licenses.
16511 (license (list license:asl2.0 license:bsd-2))))
16512
16513 (define-public python2-packaging
16514 (package-with-python2 python-packaging))
16515
16516 ;; Variants with minimal dependencies, for bootstrapping Pytest.
16517 (define-public python-packaging-bootstrap
16518 (hidden-package
16519 (package/inherit
16520 python-packaging
16521 (name "python-packaging-bootstrap")
16522 (native-inputs '())
16523 (propagated-inputs
16524 `(("python-pyparsing" ,python-pyparsing)))
16525 (arguments '(#:tests? #f)))))
16526
16527 (define-public python2-packaging-bootstrap
16528 (hidden-package
16529 (package/inherit
16530 python2-packaging
16531 (name "python2-packaging-bootstrap")
16532 (native-inputs '())
16533 (propagated-inputs
16534 `(("python-pyparsing" ,python2-pyparsing)))
16535 (arguments
16536 `(#:tests? #f
16537 ,@(package-arguments python2-packaging))))))
16538
16539 (define-public python-relatorio
16540 (package
16541 (name "python-relatorio")
16542 (version "0.8.0")
16543 (source
16544 (origin
16545 (method url-fetch)
16546 (uri (pypi-uri "relatorio" version))
16547 (sha256
16548 (base32
16549 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16550 (build-system python-build-system)
16551 (propagated-inputs
16552 `(("python-lxml" ,python-lxml)
16553 ("python-genshi" ,python-genshi)))
16554 (native-inputs
16555 `(("python-magic" ,python-magic)))
16556 (home-page "https://relatorio.tryton.org/")
16557 (synopsis "Templating library able to output ODT and PDF files")
16558 (description "Relatorio is a templating library which provides a way to
16559 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16560 for more filetypes can be easily added by creating plugins for them.")
16561 (license license:gpl3+)))
16562
16563 (define-public python2-relatorio
16564 (package-with-python2 python-relatorio))
16565
16566 (define-public python-radon
16567 (package
16568 (name "python-radon")
16569 (version "4.1.0")
16570 (source
16571 (origin
16572 (method url-fetch)
16573 (uri (pypi-uri "radon" version))
16574 (sha256
16575 (base32
16576 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
16577 (build-system python-build-system)
16578 (arguments
16579 `(#:phases (modify-phases %standard-phases
16580 (replace 'check
16581 (lambda _
16582 (invoke "python" "radon/tests/run.py"))))))
16583 (propagated-inputs
16584 `(("python-colorama" ,python-colorama)
16585 ("python-flake8-polyfill" ,python-flake8-polyfill)
16586 ("python-mando" ,python-mando)))
16587 (native-inputs
16588 `(("python-pytest" ,python-pytest)
16589 ("python-pytest-mock" ,python-pytest-mock)))
16590 (home-page "https://radon.readthedocs.org/")
16591 (synopsis "Code Metrics in Python")
16592 (description "Radon is a Python tool which computes various code metrics.
16593 Supported metrics are:
16594 @itemize @bullet
16595 @item raw metrics: SLOC, comment lines, blank lines, &c.
16596 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16597 @item Halstead metrics (all of them)
16598 @item the Maintainability Index (a Visual Studio metric)
16599 @end itemize")
16600 (properties `((python2-variant . ,(delay python2-radon))))
16601 (license license:expat)))
16602
16603 (define-public python2-radon
16604 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16605 (package/inherit base
16606 (propagated-inputs
16607 `(("python-configparser" ,python2-configparser)
16608 ("python-future" ,python2-future)
16609 ,@(package-propagated-inputs base))))))
16610
16611 (define-public python-sure
16612 (package
16613 (name "python-sure")
16614 (version "1.4.11")
16615 (source
16616 (origin
16617 (method url-fetch)
16618 (uri (pypi-uri "sure" version))
16619 (sha256
16620 (base32
16621 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16622 (build-system python-build-system)
16623 (propagated-inputs
16624 `(("python-mock" ,python-mock)
16625 ("python-six" ,python-six)))
16626 (native-inputs
16627 `(("python-nose" ,python-nose)))
16628 (home-page "https://github.com/gabrielfalcao/sure")
16629 (synopsis "Automated testing library in python for python")
16630 (description
16631 "Sure is a python library that leverages a DSL for writing assertions.
16632 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16633 (license license:gpl3+)))
16634
16635 (define-public python2-sure
16636 (package-with-python2 python-sure))
16637
16638 (define-public python2-couleur
16639 ;; This package does not seem to support python3 at all, hence,
16640 ;; only the python2 variant definition is provided.
16641 (package
16642 (name "python2-couleur")
16643 (version "0.6.2")
16644 (source
16645 (origin
16646 (method url-fetch)
16647 (uri (pypi-uri "couleur" version))
16648 (sha256
16649 (base32
16650 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16651 (build-system python-build-system)
16652 (arguments
16653 `(#:python ,python-2))
16654 (home-page "https://github.com/gabrielfalcao/couleur")
16655 (synopsis
16656 "ANSI terminal tool for python, colored shell and other handy fancy features")
16657 (description
16658 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16659 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16660 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16661 ;; https://github.com/gabrielfalcao/couleur/issues/11
16662 (license license:lgpl3+)))
16663
16664 (define-public python-misaka
16665 (package
16666 (name "python-misaka")
16667 (version "2.1.1")
16668 (source
16669 (origin
16670 (method url-fetch)
16671 (uri (pypi-uri "misaka" version))
16672 (sha256
16673 (base32
16674 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16675 (build-system python-build-system)
16676 (arguments
16677 `(;; Line 37 of setup.py calls self.run_command('develop')
16678 ;; in the 'check' phase. This command seems to be trying
16679 ;; to write to
16680 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16681 ;; for which it does not have the permission to write.
16682 #:tests? #f))
16683 (propagated-inputs
16684 `(("python-cffi" ,python-cffi)))
16685 (home-page "https://github.com/FSX/misaka")
16686 (synopsis "Python binding for Hoedown")
16687 (description
16688 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16689 library written in C. It features a fast HTML renderer and functionality to make custom
16690 renderers (e.g. man pages or LaTeX).")
16691 (license license:expat)))
16692
16693 (define-public python2-misaka
16694 (package-with-python2 python-misaka))
16695
16696 (define-public python2-steadymark
16697 ;; This is forced into being a python2 only variant
16698 ;; due to its dependence on couleur that has no support
16699 ;; for python3
16700 (package
16701 (name "python2-steadymark")
16702 (version "0.7.3")
16703 (source
16704 (origin
16705 (method url-fetch)
16706 (uri (pypi-uri "steadymark" version))
16707 (sha256
16708 (base32
16709 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16710 (build-system python-build-system)
16711 (native-inputs
16712 `(("python-couleur" ,python2-couleur)
16713 ("python-sure" ,python2-sure)
16714 ("python-misaka" ,python2-misaka)))
16715 (arguments
16716 `(#:python ,python-2
16717 #:phases
16718 (modify-phases %standard-phases
16719 (add-before 'build 'patch-setup-py
16720 (lambda _
16721 ;; Update requirements from dependency==version
16722 ;; to dependency>=version
16723 (substitute* "setup.py"
16724 (("==") ">="))
16725 #t)))))
16726 (home-page "https://github.com/gabrielfalcao/steadymark")
16727 (synopsis "Markdown-based test runner for python")
16728 (description
16729 "@code{Steadymark} allows documentation to be written in github-flavoured
16730 markdown. The documentation may contain snippets of code surrounded by python
16731 code blocks and @code{Steadymark} will find these snippets and run them, making
16732 sure that there are no old malfunctional examples in the documentation examples.")
16733 (license license:expat)))
16734
16735 (define-public python-jsonpointer
16736 (package
16737 (name "python-jsonpointer")
16738 (version "1.10")
16739 (source
16740 (origin
16741 (method url-fetch)
16742 (uri (pypi-uri "jsonpointer" version))
16743 (sha256
16744 (base32
16745 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16746 (build-system python-build-system)
16747 (home-page "https://github.com/stefankoegl/python-json-pointer")
16748 (synopsis "Identify specific nodes in a JSON document")
16749 (description "@code{jsonpointer} allows you to access specific nodes
16750 by path in a JSON document (see RFC 6901).")
16751 (license license:bsd-3)))
16752
16753 (define-public python2-jsonpointer
16754 (package-with-python2 python-jsonpointer))
16755
16756 (define-public python-jsonpatch
16757 (package
16758 (name "python-jsonpatch")
16759 (version "1.16")
16760 (source
16761 (origin
16762 (method git-fetch)
16763 ;; pypi version lacks tests.js
16764 (uri (git-reference
16765 (url "https://github.com/stefankoegl/python-json-patch")
16766 (commit (string-append "v" version))))
16767 (file-name (git-file-name name version))
16768 (sha256
16769 (base32
16770 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16771 (build-system python-build-system)
16772 (propagated-inputs
16773 `(("python-jsonpointer" ,python-jsonpointer)))
16774 (home-page "https://github.com/stefankoegl/python-json-patch")
16775 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16776 (description "@code{jsonpatch} is a library and program that allows
16777 applying JSON Patches according to RFC 6902.")
16778 (license license:bsd-3)))
16779
16780 (define-public python2-jsonpatch
16781 (package-with-python2 python-jsonpatch))
16782
16783 (define-public python-jsonpatch-0.4
16784 (package (inherit python-jsonpatch)
16785 (name "python-jsonpatch")
16786 (version "0.4")
16787 (source
16788 (origin
16789 (method git-fetch)
16790 (uri (git-reference
16791 (url "https://github.com/stefankoegl/python-json-patch")
16792 (commit (string-append "v" version))))
16793 (file-name (git-file-name name version))
16794 (sha256
16795 (base32
16796 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16797
16798 (define-public python2-jsonpatch-0.4
16799 (package-with-python2 python-jsonpatch-0.4))
16800
16801 (define-public python-rfc3986
16802 (package
16803 (name "python-rfc3986")
16804 (version "1.4.0")
16805 (source (origin
16806 (method url-fetch)
16807 (uri (pypi-uri "rfc3986" version))
16808 (sha256
16809 (base32
16810 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16811 (build-system python-build-system)
16812 (arguments
16813 `(#:modules ((guix build utils)
16814 (guix build python-build-system)
16815 (ice-9 ftw)
16816 (srfi srfi-1)
16817 (srfi srfi-26))
16818 #:phases
16819 (modify-phases %standard-phases
16820 (replace 'check
16821 (lambda _
16822 (let ((cwd (getcwd)))
16823 (setenv "PYTHONPATH"
16824 (string-append cwd "/build/"
16825 (find (cut string-prefix? "lib" <>)
16826 (scandir (string-append cwd "/build")))
16827 ":"
16828 (getenv "PYTHONPATH")))
16829 (invoke "pytest" "-v")))))))
16830 (native-inputs
16831 `(("python-pytest" ,python-pytest)))
16832 (home-page "https://rfc3986.readthedocs.io/")
16833 (synopsis "Parse and validate URI references")
16834 (description
16835 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16836 validation and authority parsing. This module also supports RFC@tie{}6874
16837 which adds support for zone identifiers to IPv6 addresses.")
16838 (license license:asl2.0)))
16839
16840 (define-public python2-rfc3986
16841 (package-with-python2 python-rfc3986))
16842
16843 (define-public python-rfc3987
16844 (package
16845 (name "python-rfc3987")
16846 (version "1.3.7")
16847 (source
16848 (origin
16849 (method url-fetch)
16850 (uri (pypi-uri "rfc3987" version))
16851 (sha256
16852 (base32
16853 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16854 (build-system python-build-system)
16855 (home-page "https://pypi.org/project/rfc3987/")
16856 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16857 (description "@code{rfc3987} provides routines for parsing and
16858 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16859 (license license:gpl3+)))
16860
16861 (define-public python2-rfc3987
16862 (package-with-python2 python-rfc3987))
16863
16864 ;; The latest commit contains fixes for building with both python3 and python2.
16865 (define-public python-rfc6555
16866 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16867 (revision "1"))
16868 (package
16869 (name "python-rfc6555")
16870 (version (git-version "0.0.0" revision commit))
16871 (source (origin
16872 (method git-fetch)
16873 (uri (git-reference
16874 (url "https://github.com/sethmlarson/rfc6555")
16875 (commit commit)))
16876 (file-name (git-file-name name version))
16877 (sha256
16878 (base32
16879 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16880 (build-system python-build-system)
16881 (arguments
16882 '(#:phases
16883 (modify-phases %standard-phases
16884 (replace 'check
16885 (lambda* (#:key tests? #:allow-other-keys)
16886 (if tests?
16887 ;; Other tests require network access.
16888 (invoke "pytest" "tests/test_ipv6.py")
16889 #t))))))
16890 (native-inputs
16891 `(("python-pytest" ,python-pytest)))
16892 (home-page "https://pypi.org/project/rfc6555/")
16893 (synopsis "Python implementation of RFC 6555")
16894 (description
16895 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16896 6555. Provided with a single file and dead-simple API to allow easy vendoring
16897 and integration into other projects.")
16898 (properties `((python2-variant . ,(delay python2-rfc6555))))
16899 (license license:asl2.0))))
16900
16901 (define-public python2-rfc6555
16902 (let ((base (package-with-python2
16903 (strip-python2-variant python-rfc6555))))
16904 (package/inherit base
16905 (propagated-inputs
16906 `(("python2-selectors2" ,python2-selectors2))))))
16907
16908 (define-public python-bagit
16909 (package
16910 (name "python-bagit")
16911 (version "1.7.0")
16912 (source
16913 (origin
16914 (method url-fetch)
16915 (uri (pypi-uri "bagit" version))
16916 (sha256
16917 (base32
16918 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
16919 (build-system python-build-system)
16920 (native-inputs
16921 `(("python-setuptools-scm" ,python-setuptools-scm)
16922 ("python-coverage" ,python-coverage)
16923 ("python-mock" ,python-mock)))
16924 (home-page "https://libraryofcongress.github.io/bagit-python/")
16925 (synopsis "Create and validate BagIt packages")
16926 (description "Bagit is a Python library and command line utility for working
16927 with BagIt style packages. BagIt is a minimalist packaging format for digital
16928 preservation.")
16929 (license license:cc0)))
16930
16931 (define-public python-prov
16932 (package
16933 (name "python-prov")
16934 (version "2.0.0")
16935 (source
16936 (origin
16937 (method url-fetch)
16938 (uri (pypi-uri "prov" version))
16939 (sha256
16940 (base32
16941 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
16942 (build-system python-build-system)
16943 (propagated-inputs
16944 `(("python-dateutil" ,python-dateutil)
16945 ("python-lxml" ,python-lxml)
16946 ("python-networkx" ,python-networkx)
16947 ("python-rdflib" ,python-rdflib)))
16948 (native-inputs
16949 `(("graphviz" ,graphviz)
16950 ("python-pydot" ,python-pydot)))
16951 (home-page "https://github.com/trungdong/prov")
16952 (synopsis
16953 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
16954 (description
16955 "This package provides a library for W3C Provenance Data Model supporting
16956 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
16957 (license license:expat)))
16958
16959 (define-public python-arcp
16960 (package
16961 (name "python-arcp")
16962 (version "0.2.1")
16963 (source
16964 (origin
16965 (method url-fetch)
16966 (uri (pypi-uri "arcp" version))
16967 (sha256
16968 (base32
16969 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
16970 (build-system python-build-system)
16971 (native-inputs
16972 `(("python-pytest" ,python-pytest)))
16973 (home-page "http://arcp.readthedocs.io/")
16974 (synopsis
16975 "Archive and Package URI parser and generator")
16976 (description
16977 "@acronym{arcp, Archive and Package} provides functions for creating
16978 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
16979 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
16980 consume or reference hypermedia resources bundled inside a file archive or an
16981 application package, as well as to resolve URIs for archive resources within a
16982 programmatic framework. This URI scheme provides mechanisms to generate a
16983 unique base URI to represent the root of the archive, so that relative URI
16984 references in a bundled resource can be resolved within the archive without
16985 having to extract the archive content on the local file system. An arcp URI can
16986 be used for purposes of isolation (e.g. when consuming multiple archives),
16987 security constraints (avoiding \"climb out\" from the archive), or for
16988 externally identiyfing sub-resources referenced by hypermedia formats.")
16989 (license license:asl2.0)))
16990
16991 (define-public python-shellescape
16992 (package
16993 (name "python-shellescape")
16994 (version "3.8.1")
16995 (source
16996 (origin
16997 (method git-fetch)
16998 (uri (git-reference
16999 (url "https://github.com/chrissimpkins/shellescape")
17000 (commit (string-append "v" version))))
17001 (file-name (git-file-name name version))
17002 (sha256
17003 (base32
17004 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
17005 (build-system python-build-system)
17006 (arguments
17007 '(#:phases
17008 (modify-phases %standard-phases
17009 (replace 'check
17010 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
17011 (when tests?
17012 (add-installed-pythonpath inputs outputs)
17013 (invoke "python" "tests/test_shellescape.py"))
17014 #t)))))
17015 (native-inputs
17016 `(("python-pytest" ,python-pytest)))
17017 (home-page "https://github.com/chrissimpkins/shellescape")
17018 (synopsis
17019 "Shell escape a string to safely use it as a token in a shell command")
17020 (description
17021 "The shellescape Python module defines the @code{shellescape.quote()}
17022 function that returns a shell-escaped version of a Python string. This is a
17023 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
17024 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
17025 (license license:expat)))
17026
17027 (define-public python-validators
17028 (package
17029 (name "python-validators")
17030 (version "0.14.2")
17031 (source (origin
17032 (method url-fetch)
17033 (uri (pypi-uri "validators" version))
17034 (sha256
17035 (base32
17036 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
17037 (build-system python-build-system)
17038 (arguments
17039 '(#:phases (modify-phases %standard-phases
17040 (replace 'check
17041 (lambda _
17042 (invoke "pytest" "-vv"))))))
17043 (propagated-inputs
17044 `(("python-decorator" ,python-decorator)
17045 ("python-six" ,python-six)))
17046 (native-inputs
17047 `(("python-flake8" ,python-flake8)
17048 ("python-isort" ,python-isort)
17049 ("python-pytest" ,python-pytest)))
17050 (home-page "https://github.com/kvesteri/validators")
17051 (synopsis "Data validation library")
17052 (description
17053 "This package contains validators for different things such as email
17054 addresses, IP addresses, URLs, hashes and more. It has been designed to
17055 be easy to use and not require defining a schema or form just to validate
17056 some input.")
17057 (license license:expat)))
17058
17059 (define-public python2-validators
17060 (package-with-python2 python-validators))
17061
17062 (define-public python-validate-email
17063 (package
17064 (name "python-validate-email")
17065 (version "1.3")
17066 (source
17067 (origin
17068 (method url-fetch)
17069 (uri (pypi-uri "validate_email" version))
17070 (sha256
17071 (base32
17072 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
17073 (build-system python-build-system)
17074 (home-page "https://github.com/syrusakbary/validate_email")
17075 (synopsis "Verifies if an email address is valid and really exists")
17076 (description "@code{validate_email} can be used to verify if an email
17077 address is valid and really exists.")
17078 (license license:lgpl3+)))
17079
17080 (define-public python2-validate-email
17081 (package-with-python2 python-validate-email))
17082
17083 (define-public python-flex
17084 (package
17085 (name "python-flex")
17086 (version "6.10.0")
17087 (source
17088 (origin
17089 (method url-fetch)
17090 (uri (pypi-uri "flex" version))
17091 (sha256
17092 (base32
17093 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
17094 (build-system python-build-system)
17095 (propagated-inputs
17096 `(("python-click" ,python-click)
17097 ("python-iso8601" ,python-iso8601)
17098 ("python-jsonpointer" ,python-jsonpointer)
17099 ("python-pyyaml" ,python-pyyaml)
17100 ("python-requests" ,python-requests)
17101 ("python-rfc3987" ,python-rfc3987)
17102 ("python-six" ,python-six)
17103 ("python-validate-email" ,python-validate-email)))
17104 (home-page "https://github.com/pipermerriam/flex")
17105 (synopsis "Validates Swagger schemata")
17106 (description "@code{flex} can be used to validate Swagger schemata.")
17107 (license license:bsd-3)))
17108
17109 (define-public python2-flex
17110 (package-with-python2 python-flex))
17111
17112 (define-public python-marshmallow
17113 (package
17114 (name "python-marshmallow")
17115 (version "3.9.1")
17116 (source
17117 (origin
17118 (method url-fetch)
17119 (uri (pypi-uri "marshmallow" version))
17120 (sha256
17121 (base32
17122 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
17123 (build-system python-build-system)
17124 (propagated-inputs
17125 `(("python-dateutil" ,python-dateutil)
17126 ("python-simplejson" ,python-simplejson)))
17127 (native-inputs
17128 `(("python-pytest" ,python-pytest)
17129 ("python-pytz" ,python-pytz)))
17130 (home-page "https://github.com/marshmallow-code/marshmallow")
17131 (synopsis "Convert complex datatypes to and from native
17132 Python datatypes.")
17133 (description "@code{marshmallow} provides a library for converting
17134 complex datatypes to and from native Python datatypes.")
17135 (license license:expat)))
17136
17137 (define-public python-apispec
17138 (package
17139 (name "python-apispec")
17140 (version "4.0.0")
17141 (source
17142 (origin
17143 (method url-fetch)
17144 (uri (pypi-uri "apispec" version))
17145 (sha256
17146 (base32
17147 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
17148 (build-system python-build-system)
17149 (arguments
17150 '(#:phases (modify-phases %standard-phases
17151 (add-after 'unpack 'disable-prance-tests
17152 (lambda _
17153 ;; Disable validation tests since they require the
17154 ;; optional 'prance' library which is not yet in Guix.
17155 (substitute* "tests/test_ext_marshmallow_openapi.py"
17156 (("def test_openapi_tools_validate.*" all)
17157 (string-append "@pytest.mark.xfail\n" all)))))
17158 (replace 'check
17159 (lambda _
17160 (setenv "PYTHONPATH"
17161 (string-append "./build/lib:"
17162 (getenv "PYTHONPATH")))
17163 (invoke "pytest" "-vv"))))))
17164 (propagated-inputs
17165 `(("python-pyyaml" ,python-pyyaml)))
17166 (native-inputs
17167 `(("python-pytest" ,python-pytest)
17168 ("python-marshmallow" ,python-marshmallow)))
17169 (home-page "https://github.com/marshmallow-code/apispec")
17170 (synopsis "Swagger/OpenAPI specification generator")
17171 (description "@code{python-apispec} is a pluggable API specification
17172 generator. It currently supports the OpenAPI specification, formerly known
17173 as Swagger.")
17174 (license license:expat)))
17175
17176 (define-public python-flasgger
17177 (package
17178 (name "python-flasgger")
17179 (version "0.6.3")
17180 (source
17181 (origin
17182 (method git-fetch)
17183 (uri (git-reference
17184 (url "https://github.com/rochacbruno/flasgger")
17185 (commit version)))
17186 (file-name (git-file-name name version))
17187 (sha256
17188 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
17189 (build-system python-build-system)
17190 (arguments
17191 `(#:phases
17192 (modify-phases %standard-phases
17193 (replace 'check
17194 (lambda* (#:key inputs outputs #:allow-other-keys)
17195 (substitute* "Makefile"
17196 (("flake8 flasgger --ignore=F403")
17197 "flake8 flasgger --ignore=E731,F403"))
17198 (setenv "PYTHONPATH" (string-append (getcwd)
17199 ":"
17200 (getenv "PYTHONPATH")))
17201 (invoke "py.test"))))))
17202 (propagated-inputs
17203 `(("python-flask" ,python-flask)
17204 ("python-pyyaml" ,python-pyyaml)
17205 ("python-jsonschema" ,python-jsonschema)
17206 ("python-mistune" ,python-mistune)
17207 ("python-six" ,python-six)))
17208 (native-inputs
17209 `(("python-decorator" ,python-decorator)
17210 ("python-flake8" ,python-flake8)
17211 ("python-flask-restful" ,python-flask-restful)
17212 ("python-flex" ,python-flex)
17213 ("python-pytest" ,python-pytest)
17214 ("python-pytest-cov" ,python-pytest-cov)
17215 ("python-marshmallow" ,python-marshmallow)
17216 ("python-apispec" ,python-apispec)))
17217 (home-page "https://github.com/rochacbruno/flasgger/")
17218 (synopsis "Extract Swagger specs from your Flask project")
17219 (description "@code{python-flasgger} allows extracting Swagger specs
17220 from your Flask project. It is a fork of Flask-Swagger.")
17221 (license license:expat)))
17222
17223 (define-public python-swagger-spec-validator
17224 (package
17225 (name "python-swagger-spec-validator")
17226 (version "2.4.3")
17227 (source
17228 (origin
17229 (method url-fetch)
17230 (uri (pypi-uri "swagger-spec-validator" version))
17231 (sha256
17232 (base32
17233 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
17234 (build-system python-build-system)
17235 (propagated-inputs
17236 `(("python-jsonschema" ,python-jsonschema)
17237 ("python-pyyaml" ,python-pyyaml)
17238 ("python-six" ,python-six)))
17239 (home-page
17240 "https://github.com/Yelp/swagger_spec_validator")
17241 (synopsis "Validation of Swagger specifications")
17242 (description "@code{swagger_spec_validator} provides a library for
17243 validating Swagger API specifications.")
17244 (license license:asl2.0)))
17245
17246 (define-public python2-swagger-spec-validator
17247 (package-with-python2 python-swagger-spec-validator))
17248
17249 (define-public python-apache-libcloud
17250 (package
17251 (name "python-apache-libcloud")
17252 (version "3.1.0")
17253 (source
17254 (origin
17255 (method url-fetch)
17256 (uri (pypi-uri "apache-libcloud" version))
17257 (sha256
17258 (base32
17259 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
17260 (build-system python-build-system)
17261 (arguments
17262 `(#:phases
17263 (modify-phases %standard-phases
17264 (add-after 'unpack 'patch-ssh
17265 (lambda* (#:key inputs #:allow-other-keys)
17266 (substitute* "libcloud/compute/ssh.py"
17267 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
17268 "/bin/ssh" "'")))
17269 #t))
17270 (add-after 'unpack 'patch-tests
17271 (lambda _
17272 (substitute* "libcloud/test/compute/test_ssh_client.py"
17273 (("class ShellOutSSHClientTests")
17274 "@unittest.skip(\"Guix container doesn't have ssh service\")
17275 class ShellOutSSHClientTests"))
17276 #t))
17277 (add-before 'check 'copy-secret
17278 (lambda _
17279 (copy-file "libcloud/test/secrets.py-dist"
17280 "libcloud/test/secrets.py")
17281 #t)))))
17282 (inputs
17283 `(("openssh" ,openssh)))
17284 (propagated-inputs
17285 `(("python-paramiko" ,python-paramiko)
17286 ("python-requests" ,python-requests)))
17287 (native-inputs
17288 `(("python-lockfile" ,python-lockfile)
17289 ("python-mock" ,python-mock)
17290 ("python-pytest" ,python-pytest)
17291 ("python-pytest-runner" ,python-pytest-runner)
17292 ("python-requests-mock" ,python-requests-mock)))
17293 (home-page "https://libcloud.apache.org/")
17294 (synopsis "Unified Cloud API")
17295 (description "@code{libcloud} is a Python library for interacting with
17296 many of the popular cloud service providers using a unified API.")
17297 (license license:asl2.0)))
17298
17299 (define-public python-smmap
17300 (package
17301 (name "python-smmap")
17302 (version "3.0.1")
17303 (source
17304 (origin
17305 (method url-fetch)
17306 (uri (pypi-uri "smmap" version))
17307 (sha256
17308 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
17309 (build-system python-build-system)
17310 (native-inputs
17311 `(("python-nosexcover" ,python-nosexcover)))
17312 (home-page "https://github.com/Byron/smmap")
17313 (synopsis "Python sliding window memory map manager")
17314 (description "@code{smmap} is a pure Python implementation of a sliding
17315 window memory map manager.")
17316 (license license:bsd-3)))
17317
17318 (define-public python-smmap2
17319 (deprecated-package "python-smmap2" python-smmap))
17320
17321 (define-public python2-smmap
17322 (package-with-python2 python-smmap))
17323
17324 (define-public python2-smmap2
17325 (deprecated-package "python2-smmap2" python2-smmap))
17326
17327 (define-public python-regex
17328 (package
17329 (name "python-regex")
17330 (version "2020.6.8")
17331 (source (origin
17332 (method url-fetch)
17333 (uri (pypi-uri "regex" version))
17334 (sha256
17335 (base32
17336 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
17337 (build-system python-build-system)
17338 (arguments
17339 '(#:phases
17340 (modify-phases %standard-phases
17341 (replace 'check
17342 (lambda* (#:key inputs outputs #:allow-other-keys)
17343 (add-installed-pythonpath inputs outputs)
17344 (invoke "python" "-c"
17345 "from regex.test_regex import test_main; test_main()"))))))
17346 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
17347 (synopsis "Alternative regular expression module")
17348 (description "This regular expression implementation is backwards-
17349 compatible with the standard @code{re} module, but offers additional
17350 functionality like full case-folding for case-insensitive matches in Unicode.")
17351 (license license:psfl)))
17352
17353 (define-public python2-regex
17354 (package-with-python2 python-regex))
17355
17356 (define-public python-pyopengl
17357 (package
17358 (name "python-pyopengl")
17359 (version "3.1.5")
17360 (source
17361 (origin
17362 (method url-fetch)
17363 (uri (pypi-uri "PyOpenGL" version))
17364 (sha256
17365 (base32
17366 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
17367 (build-system python-build-system)
17368 (inputs
17369 `(("mesa" ,mesa)
17370 ("freeglut" ,freeglut)
17371 ("glu" ,glu)))
17372 (arguments
17373 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
17374 ;attribute 'OSMesa'
17375 #:phases
17376 (modify-phases %standard-phases
17377 (add-before 'build 'fix-paths
17378 (lambda* (#:key inputs outputs #:allow-other-keys)
17379 (substitute* '("OpenGL/platform/ctypesloader.py")
17380 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
17381 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
17382 (("'GL'")
17383 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
17384 (("'GLU'")
17385 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
17386 (("'glut',")
17387 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
17388 (("'GLESv1_CM'")
17389 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
17390 (("'GLESv2'")
17391 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
17392 ;; Not providing libgle. It seems to be very old.
17393 #t)))))
17394 (home-page "http://pyopengl.sourceforge.net")
17395 (synopsis "Standard OpenGL bindings for Python")
17396 (description
17397 "PyOpenGL is the most common cross platform Python binding to OpenGL and
17398 related APIs. The binding is created using the standard @code{ctypes}
17399 library.")
17400 (license license:bsd-3)))
17401
17402 (define-public python-pyopengl-accelerate
17403 (package
17404 (inherit python-pyopengl)
17405 (name "python-pyopengl-accelerate")
17406 (version "3.1.5")
17407 (source
17408 (origin
17409 (method url-fetch)
17410 (uri (pypi-uri "PyOpenGL-accelerate" version))
17411 (sha256
17412 (base32
17413 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
17414 (inputs
17415 `(("mesa" ,mesa)
17416 ("python-numpy" ,python-numpy))) ; for cython module
17417 ; numpy_formathandler, thus not propagated
17418 (arguments
17419 `(#:tests? #f
17420 #:phases
17421 (modify-phases %standard-phases
17422 (delete 'fix-paths))))
17423 (synopsis "Acceleration code for PyOpenGL")
17424 (description
17425 "This is the Cython-coded accelerator module for PyOpenGL.")))
17426
17427 (define-public python-rencode
17428 (package
17429 (name "python-rencode")
17430 (version "1.0.5")
17431 (source
17432 (origin
17433 (method url-fetch)
17434 (uri (pypi-uri "rencode" version))
17435 (sha256
17436 (base32
17437 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
17438 (build-system python-build-system)
17439 (arguments
17440 `(#:phases
17441 (modify-phases %standard-phases
17442 (add-before 'check 'delete-bogus-test
17443 ;; This test requires /home/aresch/Downloads, which is not provided by
17444 ;; the build environment.
17445 (lambda _
17446 (delete-file "rencode/t.py")
17447 #t)))))
17448 (native-inputs `(("pkg-config" ,pkg-config)
17449 ("python-cython" ,python-cython)))
17450 (home-page "https://github.com/aresch/rencode")
17451 (synopsis "Serialization of heterogeneous data structures")
17452 (description
17453 "The @code{rencode} module is a data structure serialization library,
17454 similar to @code{bencode} from the BitTorrent project. For complex,
17455 heterogeneous data structures with many small elements, r-encoding stake up
17456 significantly less space than b-encodings. This version of rencode is a
17457 complete rewrite in Cython to attempt to increase the performance over the
17458 pure Python module.")
17459 (license license:bsd-3)))
17460
17461 (define-public python2-rencode
17462 (package-with-python2 python-rencode))
17463
17464 (define-public python-xenon
17465 (package
17466 (name "python-xenon")
17467 (version "0.7.0")
17468 (source
17469 (origin
17470 (method url-fetch)
17471 (uri (pypi-uri "xenon" version))
17472 (sha256
17473 (base32
17474 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
17475 (build-system python-build-system)
17476 (native-inputs
17477 `(("python-pyyaml" ,python-pyyaml)
17478 ("python-radon" ,python-radon)
17479 ("python-requests" ,python-requests)
17480 ("python-flake8" ,python-flake8)
17481 ("python-tox" ,python-tox)))
17482 (arguments
17483 `(#:tests? #f ;test suite not shipped with the PyPI archive
17484 #:phases
17485 (modify-phases %standard-phases
17486 (add-before 'build 'patch-test-requirements
17487 (lambda _
17488 ;; Remove httpretty dependency for tests.
17489 (substitute* "setup.py"
17490 (("httpretty") ""))
17491 #t)))))
17492 (home-page "https://xenon.readthedocs.org/")
17493 (synopsis "Monitor code metrics for Python on your CI server")
17494 (description
17495 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
17496 Ideally, @code{xenon} is run every time code is committed. Through command
17497 line options, various thresholds can be set for the complexity of code. It
17498 will fail (i.e. it will exit with a non-zero exit code) when any of these
17499 requirements is not met.")
17500 (license license:expat)))
17501
17502 (define-public python-pysocks
17503 (package
17504 (name "python-pysocks")
17505 (version "1.7.1")
17506 (source
17507 (origin
17508 (method url-fetch)
17509 (uri (pypi-uri "PySocks" version))
17510 (sha256
17511 (base32
17512 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
17513 (build-system python-build-system)
17514 (arguments `(#:tests? #f))
17515 (home-page "https://github.com/Anorov/PySocks")
17516 (synopsis "SOCKS client module")
17517 (description "@code{pysocks} is an updated and semi-actively maintained
17518 version of @code{SocksiPy} with bug fixes and extra features.")
17519 (license license:bsd-3)))
17520
17521 (define-public python2-pysocks
17522 (package-with-python2 python-pysocks))
17523
17524 (define-public python-pydiff
17525 (package
17526 (name "python-pydiff")
17527 (version "0.2")
17528 (source
17529 (origin
17530 (method url-fetch)
17531 (uri (pypi-uri "pydiff" version))
17532 (sha256
17533 (base32
17534 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17535 (build-system python-build-system)
17536 (home-page "https://github.com/myint/pydiff")
17537 (synopsis "Library to diff two Python files at the bytecode level")
17538 (description
17539 "@code{pydiff} makes it easy to look for actual code changes while
17540 ignoring formatting changes.")
17541 (license license:expat)))
17542
17543 (define-public python2-pydiff
17544 (package-with-python2 python-pydiff))
17545
17546 (define-public python-pydub
17547 (package
17548 (name "python-pydub")
17549 (version "0.24.1")
17550 (source
17551 (origin
17552 (method url-fetch)
17553 (uri (pypi-uri "pydub" version))
17554 (sha256
17555 (base32
17556 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17557 (build-system python-build-system)
17558 (arguments
17559 `(#:phases
17560 (modify-phases %standard-phases
17561 (add-after 'unpack 'fix-ffmpeg-path
17562 (lambda* (#:key inputs #:allow-other-keys)
17563 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17564 (substitute* '("pydub/utils.py")
17565 (("return \"ffmpeg\"")
17566 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17567 (("return \"ffplay\"")
17568 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17569 (("return \"ffprobe\"")
17570 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17571 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17572 #t))))))
17573 (home-page "https://pydub.com")
17574 (inputs
17575 `(("ffmpeg" ,ffmpeg)))
17576 (propagated-inputs
17577 `(("python-scipy" ,python-scipy)))
17578 (synopsis "Manipulate audio with a high level interface in Python")
17579 (description
17580 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17581 @code{ffmpeg} to open various audio formats.")
17582 (license license:expat))) ; MIT license
17583
17584 (define-public python-tqdm
17585 (package
17586 (name "python-tqdm")
17587 (version "4.43.0")
17588 (source
17589 (origin
17590 (method url-fetch)
17591 (uri (pypi-uri "tqdm" version))
17592 (sha256
17593 (base32
17594 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17595 (build-system python-build-system)
17596 (arguments
17597 '(#:phases (modify-phases %standard-phases
17598 (replace 'check
17599 (lambda* (#:key inputs outputs #:allow-other-keys)
17600 (add-installed-pythonpath inputs outputs)
17601 ;; This invokation is taken from tox.ini.
17602 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17603 "-d" "-v" "tqdm/"))))))
17604 (native-inputs
17605 `(("python-nose" ,python-nose)))
17606 (home-page "https://github.com/tqdm/tqdm")
17607 (synopsis "Fast, extensible progress meter")
17608 (description
17609 "Make loops show a progress bar on the console by just wrapping any
17610 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17611 design and layout.")
17612 (license (list license:mpl2.0 license:expat))))
17613
17614 (define-public python2-tqdm
17615 (package-with-python2 python-tqdm))
17616
17617 (define-public python-pkginfo
17618 (package
17619 (name "python-pkginfo")
17620 (version "1.7.0")
17621 (source
17622 (origin
17623 (method url-fetch)
17624 (uri (pypi-uri "pkginfo" version))
17625 (sha256
17626 (base32
17627 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
17628 (build-system python-build-system)
17629 (arguments
17630 `(#:phases
17631 (modify-phases %standard-phases
17632 (add-before 'check 'patch-tests
17633 (lambda _
17634 (substitute* "pkginfo/tests/test_installed.py"
17635 (("test_ctor_w_package_no_PKG_INFO")
17636 "_test_ctor_w_package_no_PKG_INFO"))
17637 #t)))))
17638 (home-page
17639 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17640 (synopsis
17641 "Query metadatdata from sdists, bdists, and installed packages")
17642 (description
17643 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17644 source distriubtion (an sdist) or a binary distribution (e.g., created by
17645 running bdist_egg). It can also query the EGG-INFO directory of an installed
17646 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17647 created by running @code{python setup.py develop}).")
17648 (license license:expat)))
17649
17650 (define-public python2-pkginfo
17651 (package-with-python2 python-pkginfo))
17652
17653 (define-public python-twine
17654 (package
17655 (name "python-twine")
17656 (version "1.15.0")
17657 (source
17658 (origin
17659 (method url-fetch)
17660 (uri (pypi-uri "twine" version))
17661 (sha256
17662 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17663 (build-system python-build-system)
17664 (propagated-inputs
17665 `(("python-tqdm" ,python-tqdm)
17666 ("python-packaging" ,python-packaging)
17667 ("python-pkginfo" ,python-pkginfo)
17668 ("python-readme-renderer" ,python-readme-renderer)
17669 ("python-requests" ,python-requests)
17670 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17671 (home-page "https://github.com/pypa/twine")
17672 (synopsis "Collection of utilities for interacting with PyPI")
17673 (description
17674 "@code{twine} currently supports registering projects and uploading
17675 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17676 their files and supports any packaging format (including wheels).")
17677 (license license:asl2.0)))
17678
17679 (define-public python2-twine
17680 (package-with-python2 python-twine))
17681
17682 (define-public python-linecache2
17683 (package
17684 (name "python-linecache2")
17685 (version "1.0.0")
17686 (source
17687 (origin
17688 (method url-fetch)
17689 (uri (pypi-uri "linecache2" version))
17690 (sha256
17691 (base32
17692 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17693 (build-system python-build-system)
17694 (arguments
17695 `(;; The tests depend on unittest2, and our version is a bit too old.
17696 #:tests? #f))
17697 (native-inputs
17698 `(("python-pbr" ,python-pbr-minimal)))
17699 (home-page
17700 "https://github.com/testing-cabal/linecache2")
17701 (synopsis "Backports of the linecache module")
17702 (description
17703 "The linecache module allows one to get any line from any file, while
17704 attempting to optimize internally, using a cache, the common case where many
17705 lines are read from a single file.")
17706 (license license:psfl)))
17707
17708 (define-public python2-linecache2
17709 (package-with-python2 python-linecache2))
17710
17711 (define-public python-traceback2
17712 (package
17713 (name "python-traceback2")
17714 (version "1.4.0")
17715 (source
17716 (origin
17717 (method url-fetch)
17718 (uri (pypi-uri "traceback2" version))
17719 (sha256
17720 (base32
17721 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17722 (build-system python-build-system)
17723 (arguments
17724 `(;; python-traceback2 and python-unittest2 depend on one another.
17725 #:tests? #f))
17726 (native-inputs
17727 `(("python-pbr" ,python-pbr-minimal)))
17728 (propagated-inputs
17729 `(("python-linecache2" ,python-linecache2)))
17730 (home-page
17731 "https://github.com/testing-cabal/traceback2")
17732 (synopsis "Backports of the traceback module")
17733 (description
17734 "This module provides a standard interface to extract, format and print
17735 stack traces of Python programs. It exactly mimics the behavior of the Python
17736 interpreter when it prints a stack trace.")
17737 (license license:psfl)))
17738
17739 (define-public python2-traceback2
17740 (package-with-python2 python-traceback2))
17741
17742 (define-public python-ratelimiter
17743 (package
17744 (name "python-ratelimiter")
17745 (version "1.2.0")
17746 (source
17747 (origin
17748 (method url-fetch)
17749 (uri (pypi-uri "ratelimiter" version))
17750 (sha256
17751 (base32
17752 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17753 (build-system python-build-system)
17754 (arguments
17755 '(#:tests? #f)) ; There are no tests in the pypi archive.
17756 (home-page "https://github.com/RazerM/ratelimiter")
17757 (synopsis "Simple rate limiting object")
17758 (description
17759 "The @code{ratelimiter} module ensures that an operation will not be
17760 executed more than a given number of times during a given period.")
17761 (license license:asl2.0)))
17762
17763 (define-public python2-ratelimiter
17764 (package-with-python2 python-ratelimiter))
17765
17766 (define-public python-dukpy
17767 (package
17768 (name "python-dukpy")
17769 (version "0.3")
17770 (source
17771 (origin
17772 (method git-fetch)
17773 (uri (git-reference
17774 (url "https://github.com/kovidgoyal/dukpy")
17775 (commit (string-append "v" version))))
17776 (file-name (git-file-name name version))
17777 (sha256
17778 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17779 (build-system python-build-system)
17780 (home-page "https://github.com/kovidgoyal/dukpy")
17781 (synopsis "Run JavaScript in python")
17782 (description
17783 "dukpy is a JavaScript runtime environment for Python using the duktape
17784 embeddable JavaScript engine.")
17785 ;; Dukpy is licensed under MIT like the embedded duktape library,
17786 ;; with 'errors.c' as GPL3.
17787 (license (list license:expat license:gpl3))))
17788
17789 (define-public python2-dukpy
17790 (package-with-python2 python-dukpy))
17791
17792 (define-public python-jsonrpclib-pelix
17793 (package
17794 (name "python-jsonrpclib-pelix")
17795 (version "0.3.2")
17796 (source
17797 (origin
17798 (method url-fetch)
17799 (uri (pypi-uri "jsonrpclib-pelix" version))
17800 (sha256
17801 (base32
17802 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17803 (build-system python-build-system)
17804 (arguments
17805 `(#:tests? #f)) ; no tests in PyPI tarball
17806 (home-page "https://github.com/tcalmant/jsonrpclib/")
17807 (synopsis "JSON-RPC 2.0 client library for Python")
17808 (description
17809 "This library implements the JSON-RPC v2.0
17810 specification (backwards-compatible) as a client library for Python. This
17811 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17812 services.")
17813 (license license:asl2.0)))
17814
17815 (define-public python2-jsonrpclib-pelix
17816 (package-with-python2 python-jsonrpclib-pelix))
17817
17818 (define-public python-setuptools-scm-git-archive
17819 (package
17820 (name "python-setuptools-scm-git-archive")
17821 (version "1.0")
17822 (source
17823 (origin
17824 (method url-fetch)
17825 (uri (pypi-uri "setuptools_scm_git_archive" version))
17826 (sha256
17827 (base32
17828 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17829 (build-system python-build-system)
17830 (native-inputs
17831 `(("python-pytest" ,python-pytest)))
17832 (propagated-inputs
17833 `(("python-setuptools-scm" ,python-setuptools-scm)))
17834 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17835 (synopsis "Setuptools_scm plugin for git archives")
17836 (description
17837 "The setuptools_scm_git_archive package is a plugin to
17838 setuptools_scm, which supports obtaining versions from git archives that
17839 belong to tagged versions.")
17840 (license license:expat)))
17841
17842 (define-public python2-setuptools-scm-git-archive
17843 (package-with-python2 python-setuptools-scm-git-archive))
17844
17845 (define-public python-setuptools-git
17846 (package
17847 (name "python-setuptools-git")
17848 (version "1.2")
17849 (source
17850 (origin
17851 (method url-fetch)
17852 (uri (pypi-uri "setuptools-git" version))
17853 (sha256
17854 (base32
17855 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17856 (build-system python-build-system)
17857 (arguments
17858 `(#:phases
17859 (modify-phases %standard-phases
17860 ;; This is needed for tests.
17861 (add-after 'unpack 'configure-git
17862 (lambda _
17863 (setenv "HOME" "/tmp")
17864 (invoke "git" "config" "--global" "user.email" "guix")
17865 (invoke "git" "config" "--global" "user.name" "guix")
17866 #t)))))
17867 (native-inputs
17868 `(("git" ,git-minimal)))
17869 (home-page "https://github.com/msabramo/setuptools-git")
17870 (synopsis "Setuptools revision control system plugin for Git")
17871 (description
17872 "This package provides a plugin for Setuptools for revision control with
17873 Git.")
17874 (license license:bsd-3)))
17875
17876 (define-public python-pyclipper
17877 (package
17878 (name "python-pyclipper")
17879 (version "1.1.0.post3")
17880 (source
17881 (origin
17882 (method url-fetch)
17883 (uri (pypi-uri "pyclipper" version ".zip"))
17884 (sha256
17885 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17886 (modules '((guix build utils)))
17887 (snippet
17888 '(begin
17889 ;; This file is generated by Cython.
17890 (delete-file "pyclipper/pyclipper.cpp") #t))))
17891 (build-system python-build-system)
17892 (arguments
17893 `(#:phases
17894 (modify-phases %standard-phases
17895 (add-before 'build 'cythonize-sources
17896 (lambda _
17897 (with-directory-excursion "pyclipper"
17898 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17899 (propagated-inputs
17900 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17901 (native-inputs
17902 `(("python-cython" ,python-cython)
17903 ("python-pytest" ,python-pytest)
17904 ("python-pytest-runner" ,python-pytest-runner)
17905 ("python-unittest2" ,python-unittest2)
17906 ("unzip" ,unzip)))
17907 (home-page "https://github.com/greginvm/pyclipper")
17908 (synopsis "Wrapper for Angus Johnson's Clipper library")
17909 (description
17910 "Pyclipper is a Cython wrapper for the C++ translation of the
17911 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17912 (license license:expat)))
17913
17914 (define-public python2-pyclipper
17915 (package-with-python2 python-pyclipper))
17916
17917 (define-public python2-booleanoperations
17918 (package
17919 (name "python2-booleanoperations")
17920 (version "0.7.1")
17921 (source
17922 (origin
17923 (method url-fetch)
17924 (uri (pypi-uri "booleanOperations" version ".zip"))
17925 (sha256
17926 (base32
17927 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17928 (build-system python-build-system)
17929 (arguments
17930 `(#:python ,python-2))
17931 (native-inputs
17932 `(("unzip" ,unzip)
17933 ("python2-pytest" ,python2-pytest)
17934 ("python2-pytest-runner" ,python2-pytest-runner)))
17935 (propagated-inputs
17936 `(("python-fonttools" ,python2-fonttools)
17937 ("python-pyclipper" ,python2-pyclipper)
17938 ("python-ufolib" ,python2-ufolib)))
17939 (home-page "https://github.com/typemytype/booleanOperations")
17940 (synopsis "Boolean operations on paths")
17941 (description
17942 "BooleanOperations provides a Python library that enables
17943 boolean operations on paths.")
17944 (license license:expat)))
17945
17946 (define-public python-tempdir
17947 (package
17948 (name "python-tempdir")
17949 (version "0.7.1")
17950 (source
17951 (origin
17952 (method url-fetch)
17953 (uri (pypi-uri "tempdir" version))
17954 (sha256
17955 (base32
17956 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17957 (build-system python-build-system)
17958 (home-page "https://pypi.org/project/tempdir/")
17959 (arguments
17960 ;; the package has no tests
17961 '(#:tests? #f))
17962 (synopsis "Python library for managing temporary directories")
17963 (description
17964 "This library manages temporary directories that are automatically
17965 deleted with all their contents when they are no longer needed. It is
17966 particularly convenient for use in tests.")
17967 (license license:expat)))
17968
17969 (define-public python2-tempdir
17970 (package-with-python2 python-tempdir))
17971
17972 (define-public python-activepapers
17973 (package
17974 (name "python-activepapers")
17975 (version "0.2.2")
17976 (source
17977 (origin
17978 (method url-fetch)
17979 (uri (pypi-uri "ActivePapers.Py" version))
17980 (sha256
17981 (base32
17982 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17983 (build-system python-build-system)
17984 (arguments
17985 `(#:modules ((ice-9 ftw)
17986 (srfi srfi-1)
17987 (guix build utils)
17988 (guix build python-build-system))
17989
17990 #:phases
17991 (modify-phases %standard-phases
17992 (add-after 'unpack 'delete-python2-code
17993 (lambda _
17994 (for-each delete-file
17995 '("lib/activepapers/builtins2.py"
17996 "lib/activepapers/standardlib2.py"
17997 "lib/activepapers/utility2.py"))))
17998 (replace 'check
17999 (lambda _
18000 ;; Deactivate the test cases that download files
18001 (setenv "NO_NETWORK_ACCESS" "1")
18002 ;; For some strange reason, some tests fail if nosetests runs all
18003 ;; test modules in a single execution. They pass if each test
18004 ;; module is run individually.
18005 (for-each (lambda (filename)
18006 (invoke "nosetests"
18007 (string-append "tests/" filename)))
18008 (scandir "tests"
18009 (lambda (filename)
18010 (string-suffix? ".py" filename)))))))))
18011 (native-inputs
18012 `(("python-tempdir" ,python-tempdir)
18013 ("python-nose" ,python-nose)))
18014 (propagated-inputs
18015 `(("python-h5py" ,python-h5py)))
18016 (home-page "https://www.activepapers.org/")
18017 (synopsis "Executable papers for scientific computing")
18018 (description
18019 "ActivePapers is a tool for working with executable papers, which
18020 combine data, code, and documentation in single-file packages,
18021 suitable for publication as supplementary material or on repositories
18022 such as figshare or Zenodo.")
18023 (properties `((python2-variant . ,(delay python2-activepapers))))
18024 (license license:bsd-3)))
18025
18026 (define-public python2-activepapers
18027 (let ((base (package-with-python2
18028 (strip-python2-variant python-activepapers))))
18029 (package/inherit base
18030 (arguments
18031 (substitute-keyword-arguments (package-arguments base)
18032 ((#:phases phases)
18033 `(modify-phases ,phases
18034 (delete 'delete-python2-code)
18035 (add-after 'unpack 'delete-python3-code
18036 (lambda _
18037 (for-each delete-file
18038 '("lib/activepapers/builtins3.py"
18039 "lib/activepapers/standardlib3.py"
18040 "lib/activepapers/utility3.py")))))))))))
18041
18042 (define-public python-semver
18043 (package
18044 (name "python-semver")
18045 (version "2.9.0")
18046 (source
18047 (origin
18048 (method url-fetch)
18049 (uri (pypi-uri "semver" version))
18050 (sha256
18051 (base32
18052 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
18053 (build-system python-build-system)
18054 (arguments
18055 `(#:phases (modify-phases %standard-phases
18056 (replace 'check
18057 (lambda _
18058 (delete-file "setup.cfg")
18059 (invoke "py.test"))))))
18060 (native-inputs
18061 `(("python-pytest" ,python-pytest)))
18062 (home-page "https://github.com/k-bx/python-semver")
18063 (synopsis "Python helper for Semantic Versioning")
18064 (description "This package provides a Python library for
18065 @url{Semantic Versioning, http://semver.org/}.")
18066 (license license:bsd-3)))
18067
18068 (define-public python2-semver
18069 (package-with-python2 python-semver))
18070
18071 (define-public python-pyro4
18072 (package
18073 (name "python-pyro4")
18074 (version "4.77")
18075 (source
18076 (origin
18077 (method url-fetch)
18078 (uri (pypi-uri "Pyro4" version))
18079 (sha256
18080 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
18081 (build-system python-build-system)
18082 (arguments
18083 '(#:tests? #f)) ;FIXME: Some tests require network access.
18084 (native-inputs
18085 `(("python-cloudpickle" ,python-cloudpickle)
18086 ("python-dill" ,python-dill)
18087 ("python-msgpack" ,python-msgpack)))
18088 (propagated-inputs
18089 `(("python-serpent" ,python-serpent)))
18090 (home-page "https://pyro4.readthedocs.io")
18091 (synopsis "Distributed object middleware for Python")
18092 (description
18093 "Pyro enables you to build applications in which objects can talk to each
18094 other over the network. You can just use normal Python method calls to call
18095 objects on other machines, also known as remote procedure calls (RPC).")
18096 (license license:expat)))
18097
18098 (define-public python2-pyro
18099 (package
18100 (name "python2-pyro")
18101 (version "3.16")
18102 (source
18103 (origin
18104 (method url-fetch)
18105 (uri (pypi-uri "Pyro" version))
18106 (file-name (string-append "Pyro-" version ".tar.gz"))
18107 (sha256
18108 (base32
18109 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
18110 (build-system python-build-system)
18111 (arguments
18112 ;; Pyro is not compatible with Python 3
18113 `(#:python ,python-2
18114 ;; Pyro has no test cases for automatic execution
18115 #:tests? #f))
18116 (home-page "https://pythonhosted.org/Pyro/")
18117 (synopsis "Distributed object manager for Python")
18118 (description "Pyro is a Distributed Object Technology system
18119 written in Python that is designed to be easy to use. It resembles
18120 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
18121 which is a system and language independent Distributed Object Technology
18122 and has much more to offer than Pyro or RMI. Pyro 3.x is no
18123 longer maintained. New projects should use Pyro4 instead, which
18124 is the new Pyro version that is actively developed.")
18125 (license license:expat)))
18126
18127 (define-public python2-scientific
18128 (package
18129 (name "python2-scientific")
18130 (version "2.9.4")
18131 (source
18132 (origin
18133 (method git-fetch)
18134 (uri (git-reference
18135 (url "https://github.com/khinsen/ScientificPython")
18136 (commit (string-append "rel" version))))
18137 (file-name (git-file-name name version))
18138 (sha256
18139 (base32
18140 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
18141 (build-system python-build-system)
18142 (inputs
18143 `(("netcdf" ,netcdf)))
18144 (propagated-inputs
18145 `(("python-numpy" ,python2-numpy-1.8)
18146 ("python-pyro" ,python2-pyro)))
18147 (arguments
18148 ;; ScientificPython is not compatible with Python 3
18149 `(#:python ,python-2
18150 #:tests? #f ; No test suite
18151 #:phases
18152 (modify-phases %standard-phases
18153 (replace 'build
18154 (lambda* (#:key inputs #:allow-other-keys)
18155 (invoke "python" "setup.py" "build"
18156 (string-append "--netcdf_prefix="
18157 (assoc-ref inputs "netcdf"))))))))
18158 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
18159 (synopsis "Python modules for scientific computing")
18160 (description "ScientificPython is a collection of Python modules that are
18161 useful for scientific computing. Most modules are rather general (Geometry,
18162 physical units, automatic derivatives, ...) whereas others are more
18163 domain-specific (e.g. netCDF and PDB support). The library is currently
18164 not actively maintained and works only with Python 2 and NumPy < 1.9.")
18165 (license license:cecill-c)))
18166
18167 (define-public python2-mmtk
18168 (package
18169 (name "python2-mmtk")
18170 (version "2.7.12")
18171 (source
18172 (origin
18173 (method git-fetch)
18174 (uri (git-reference
18175 (url "https://github.com/khinsen/MMTK")
18176 (commit (string-append "rel" version))))
18177 (file-name (git-file-name name version))
18178 (sha256
18179 (base32
18180 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
18181 (build-system python-build-system)
18182 (native-inputs
18183 `(("netcdf" ,netcdf)))
18184 (propagated-inputs
18185 `(("python-scientific" ,python2-scientific)
18186 ("python-tkinter" ,python-2 "tk")))
18187 (arguments
18188 `(#:python ,python-2
18189 #:tests? #f
18190 #:phases
18191 (modify-phases %standard-phases
18192 (add-before 'build 'includes-from-scientific
18193 (lambda* (#:key inputs #:allow-other-keys)
18194 (mkdir-p "Include/Scientific")
18195 (copy-recursively
18196 (string-append
18197 (assoc-ref inputs "python-scientific")
18198 "/include/python2.7/Scientific")
18199 "Include/Scientific"))))))
18200 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
18201 (synopsis "Python library for molecular simulation")
18202 (description "MMTK is a library for molecular simulations with an emphasis
18203 on biomolecules. It provides widely used methods such as Molecular Dynamics
18204 and normal mode analysis, but also basic routines for implementing new methods
18205 for simulation and analysis. The library is currently not actively maintained
18206 and works only with Python 2 and NumPy < 1.9.")
18207 (license license:cecill-c)))
18208
18209 (define-public python-phonenumbers
18210 (package
18211 (name "python-phonenumbers")
18212 (version "8.9.1")
18213 (source
18214 (origin
18215 (method url-fetch)
18216 (uri (pypi-uri "phonenumbers" version))
18217 (sha256
18218 (base32
18219 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
18220 (build-system python-build-system)
18221 (home-page
18222 "https://github.com/daviddrysdale/python-phonenumbers")
18223 (synopsis
18224 "Python library for dealing with international phone numbers")
18225 (description
18226 "This package provides a Python port of Google's libphonenumber library.")
18227 (license license:asl2.0)))
18228
18229 (define-public python2-phonenumbers
18230 (package-with-python2 python-phonenumbers))
18231
18232 (define-public python-send2trash
18233 (package
18234 (name "python-send2trash")
18235 (version "1.5.0")
18236 (source
18237 (origin (method git-fetch)
18238 ;; Source tarball on PyPI doesn't include tests.
18239 (uri (git-reference
18240 (url "https://github.com/hsoft/send2trash")
18241 (commit version)))
18242 (file-name (git-file-name name version))
18243 (sha256
18244 (base32
18245 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
18246 (build-system python-build-system)
18247 (arguments
18248 '(#:phases
18249 (modify-phases %standard-phases
18250 (add-before 'check 'pre-check
18251 (lambda _
18252 (mkdir-p "/tmp/foo")
18253 (setenv "HOME" "/tmp/foo")
18254 #t)))))
18255 (home-page "https://github.com/hsoft/send2trash")
18256 (synopsis "Send files to the user's @file{~/Trash} directory")
18257 (description "This package provides a Python library to send files to the
18258 user's @file{~/Trash} directory.")
18259 (properties `((python2-variant . ,(delay python2-send2trash))))
18260 (license license:bsd-3)))
18261
18262 (define-public python2-send2trash
18263 (let ((base (package-with-python2
18264 (strip-python2-variant python-send2trash))))
18265 (package/inherit base
18266 (arguments
18267 (substitute-keyword-arguments (package-arguments python-send2trash)
18268 ((#:phases phases)
18269 `(modify-phases ,phases
18270 (add-before 'check 'setenv
18271 (lambda _
18272 (setenv "PYTHONPATH"
18273 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18274 #t)))))))))
18275
18276 (define-public python-pyfavicon
18277 (package
18278 (name "python-pyfavicon")
18279 (version "0.1.1")
18280 (source
18281 (origin
18282 (method url-fetch)
18283 (uri (pypi-uri "pyfavicon" version))
18284 (sha256
18285 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
18286 (build-system python-build-system)
18287 (arguments
18288 ;; There are no tests in the PyPI tarball and the tests from the
18289 ;; repository require online data.
18290 '(#:tests? #f))
18291 (propagated-inputs
18292 `(("python-aiohttp" ,python-aiohttp)
18293 ("python-beautifulsoup4" ,python-beautifulsoup4)
18294 ("python-pillow" ,python-pillow)))
18295 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
18296 (synopsis "Async favicon fetcher")
18297 (description
18298 "@code{pyfavicon} is an async favicon fetcher.")
18299 (license license:expat)))
18300
18301 (define-public python-yamllint
18302 (package
18303 (name "python-yamllint")
18304 (version "1.26.0")
18305 (source
18306 (origin
18307 (method url-fetch)
18308 (uri (pypi-uri "yamllint" version))
18309 (sha256
18310 (base32 "11qhs1jk9pwvyk5k3q5blh9sq42dh1ywdf1f3i2zixf7hncwir5h"))))
18311 (build-system python-build-system)
18312 (propagated-inputs
18313 `(("python-pathspec" ,python-pathspec)
18314 ("python-pyyaml" ,python-pyyaml)
18315 ("python-setuptools" ,python-setuptools)))
18316 (home-page "https://github.com/adrienverge/yamllint")
18317 (synopsis "Linter for YAML files")
18318 (description
18319 "Yamllint is a linter for YAML files. yamllint does not only check for
18320 syntax validity, but for weirdnesses like key repetition and cosmetic problems
18321 such as lines length, trailing spaces, indentation, etc.")
18322 (license license:gpl3+)))
18323
18324 (define-public python-yapf
18325 (package
18326 (name "python-yapf")
18327 (version "0.29.0")
18328 (source
18329 (origin
18330 (method url-fetch)
18331 (uri (pypi-uri "yapf" version))
18332 (sha256
18333 (base32
18334 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
18335 (build-system python-build-system)
18336 (home-page "https://github.com/google/yapf")
18337 (synopsis "Formatter for Python code")
18338 (description "YAPF is a formatter for Python code. It's based off of
18339 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
18340 takes the code and reformats it to the best formatting that conforms to the
18341 style guide, even if the original code didn't violate the style guide.")
18342 (license license:asl2.0)))
18343
18344 (define-public python2-yapf
18345 (package-with-python2 python-yapf))
18346
18347 (define-public python-yq
18348 (package
18349 (name "python-yq")
18350 (version "2.11.1")
18351 (source
18352 (origin
18353 (method url-fetch)
18354 (uri (pypi-uri "yq" version))
18355 (sha256
18356 (base32
18357 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
18358 (build-system python-build-system)
18359 (arguments
18360 '(#:phases
18361 (modify-phases %standard-phases
18362 (add-after 'unpack 'patch
18363 (lambda* (#:key inputs #:allow-other-keys)
18364 (substitute* "yq/__init__.py"
18365 (("Popen\\(\\[\"jq")
18366 (string-append
18367 "Popen([\""
18368 (assoc-ref inputs "jq")
18369 "/bin/jq")))
18370 #t)))))
18371 (inputs
18372 `(("python-argcomplete" ,python-argcomplete)
18373 ("python-pyyaml" ,python-pyyaml)
18374 ("python-xmltodict" ,python-xmltodict)
18375 ("jq" ,jq)))
18376 (native-inputs
18377 `(("python-coverage" ,python-coverage)
18378 ("python-flake8" ,python-flake8)
18379 ("python-wheel" ,python-wheel)))
18380 (home-page "https://github.com/kislyuk/yq")
18381 (synopsis "Command-line YAML/XML processor")
18382 (description
18383 "This package provides @command{yq} and @command{xq} for processing YAML
18384 and XML respectively. The processing is done through @command{jq}, @command{jq}
18385 filters can be used to process the data as it passes through.")
18386 (license license:asl2.0)))
18387
18388 (define-public python-gyp
18389 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
18390 (revision "0"))
18391 (package
18392 (name "python-gyp")
18393 ;; Google does not release versions,
18394 ;; based on second most recent commit date.
18395 (version (git-version "0.0.0" revision commit))
18396 (source
18397 (origin
18398 ;; Google does not release tarballs,
18399 ;; git checkout is needed.
18400 (method git-fetch)
18401 (uri (git-reference
18402 (url "https://chromium.googlesource.com/external/gyp")
18403 (commit commit)))
18404 (file-name (git-file-name name version))
18405 (sha256
18406 (base32
18407 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
18408 (build-system python-build-system)
18409 (home-page "https://gyp.gsrc.io/")
18410 (synopsis "GYP is a Meta-Build system")
18411 (description
18412 "GYP builds build systems for large, cross platform applications.
18413 It can be used to generate XCode projects, Visual Studio projects, Ninja build
18414 files, and Makefiles.")
18415 (license license:bsd-3))))
18416
18417 (define-public python2-gyp
18418 (package-with-python2 python-gyp))
18419
18420 (define-public python-whatever
18421 (package
18422 (name "python-whatever")
18423 (version "0.6")
18424 (source
18425 (origin
18426 (method git-fetch)
18427 (uri (git-reference
18428 (url "https://github.com/Suor/whatever")
18429 (commit version)))
18430 (file-name (git-file-name name version))
18431 (sha256
18432 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
18433 (build-system python-build-system)
18434 (arguments
18435 `(#:phases
18436 (modify-phases %standard-phases
18437 (replace 'check
18438 (lambda _
18439 (invoke "py.test"))))))
18440 (native-inputs
18441 `(("python-pytest" ,python-pytest)))
18442 (home-page "https://github.com/Suor/whatever")
18443 (synopsis "Make anonymous functions by partial application of operators")
18444 (description "@code{whatever} provides an easy way to make anonymous
18445 functions by partial application of operators.")
18446 (license license:bsd-3)))
18447
18448 (define-public python2-whatever
18449 (package-with-python2 python-whatever))
18450
18451 (define-public python-funcy
18452 (package
18453 (name "python-funcy")
18454 (version "1.11")
18455 (source
18456 (origin
18457 (method git-fetch)
18458 (uri (git-reference
18459 (url "https://github.com/Suor/funcy")
18460 (commit version)))
18461 (sha256
18462 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
18463 (file-name (git-file-name name version))))
18464 (build-system python-build-system)
18465 (arguments
18466 `(#:phases
18467 (modify-phases %standard-phases
18468 (replace 'check
18469 (lambda _
18470 (invoke "py.test"))))))
18471 (native-inputs
18472 `(("python-pytest" ,python-pytest)
18473 ("python-whatever" ,python-whatever)))
18474 (home-page "https://github.com/Suor/funcy")
18475 (synopsis "Functional tools")
18476 (description "@code{funcy} is a library that provides functional tools.
18477 Examples are:
18478 @enumerate
18479 @item merge - Merges collections of the same type
18480 @item walk - Type-preserving map
18481 @item select - Selects a part of a collection
18482 @item take - Takes the first n items of a collection
18483 @item first - Takes the first item of a collection
18484 @item remove - Predicated-removes items of a collection
18485 @item concat - Concatenates two collections
18486 @item flatten - Flattens a collection with subcollections
18487 @item distinct - Returns only distinct items
18488 @item split - Predicated-splits a collection
18489 @item split_at - Splits a collection at a given item
18490 @item group_by - Groups items by group
18491 @item pairwise - Pairs off adjacent items
18492 @item partial - Partially-applies a function
18493 @item curry - Curries a function
18494 @item compose - Composes functions
18495 @item complement - Complements a predicate
18496 @item all_fn - \"all\" with predicate
18497 @end enumerate")
18498 (license license:bsd-3)))
18499
18500 (define-public python2-funcy
18501 (package-with-python2 python-funcy))
18502
18503 (define-public python-isoweek
18504 (package
18505 (name "python-isoweek")
18506 (version "1.3.3")
18507 (source
18508 (origin
18509 (method url-fetch)
18510 (uri (pypi-uri "isoweek" version))
18511 (sha256
18512 (base32
18513 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
18514 (build-system python-build-system)
18515 (home-page "https://github.com/gisle/isoweek")
18516 (synopsis "Objects representing a week")
18517 (description "The @code{isoweek} module provide the class Week that
18518 implements the week definition of ISO 8601. This standard also defines
18519 a notation for identifying weeks; yyyyWww (where the W is a literal).
18520 Week instances stringify to this form.")
18521 (license license:bsd-3)))
18522
18523 (define-public python2-isoweek
18524 (package-with-python2 python-isoweek))
18525
18526 (define-public python-pyzbar
18527 (package
18528 (name "python-pyzbar")
18529 (version "0.1.8")
18530 (source
18531 (origin
18532 ;; There's no source tarball on PyPI.
18533 (method git-fetch)
18534 (uri (git-reference
18535 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
18536 (commit (string-append "v" version))))
18537 (file-name (git-file-name name version))
18538 (sha256
18539 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
18540 (build-system python-build-system)
18541 (arguments
18542 `(#:phases
18543 (modify-phases %standard-phases
18544 (add-after 'unpack 'remove-failing-test
18545 (lambda _
18546 ;; This tests if find_library was called once, but we remove
18547 ;; the call in the stage below to make the library find libzbar.
18548 (delete-file "pyzbar/tests/test_zbar_library.py")
18549 #t))
18550 (add-before 'build 'set-library-file-name
18551 (lambda* (#:key inputs #:allow-other-keys)
18552 (let ((libzbar (assoc-ref inputs "zbar")))
18553 (substitute* "pyzbar/zbar_library.py"
18554 (("find_library\\('zbar'\\)")
18555 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18556 #t))))))
18557 (native-inputs
18558 `(("pkg-config" ,pkg-config)
18559 ("python-numpy" ,python-numpy)
18560 ("python-pillow" ,python-pillow)))
18561 (inputs
18562 `(("zbar" ,zbar)))
18563 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18564 (synopsis "Read one-dimensional barcodes and QR codes")
18565 (description
18566 "Read one-dimensional barcodes and QR codes using the zbar library.
18567
18568 Features:
18569
18570 @itemize
18571 @item Pure python
18572 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18573 @item Decodes locations of barcodes
18574 @item No dependencies, other than the zbar library itself
18575 @end itemize")
18576 (license license:expat)))
18577
18578 (define-public python-tokenize-rt
18579 (package
18580 (name "python-tokenize-rt")
18581 (version "2.0.1")
18582 (source
18583 (origin
18584 (method url-fetch)
18585 (uri (pypi-uri "tokenize-rt" version))
18586 (sha256
18587 (base32
18588 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
18589 (build-system python-build-system)
18590 (home-page "https://github.com/asottile/tokenize-rt")
18591 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
18592 (description
18593 "This Python library is a wrapper around @code{tokenize} from the Python
18594 standard library. It provides two additional tokens @code{ESCAPED_NL} and
18595 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
18596 and @code{tokens_to_src} to roundtrip.")
18597 (license license:expat)))
18598
18599 (define-public python-future-fstrings
18600 (package
18601 (name "python-future-fstrings")
18602 (version "0.4.1")
18603 (source
18604 (origin
18605 (method url-fetch)
18606 (uri (pypi-uri "future_fstrings" version))
18607 (sha256
18608 (base32
18609 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18610 (build-system python-build-system)
18611 (propagated-inputs
18612 `(("python-tokenize-rt" ,python-tokenize-rt)))
18613 (home-page "https://github.com/asottile/future-fstrings")
18614 (synopsis "Backport of fstrings to Python < 3.6")
18615 (description
18616 "This package provides a UTF-8 compatible encoding
18617 @code{future_fstrings}, which performs source manipulation. It decodes the
18618 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18619 @code{f} strings.")
18620 (license license:expat)))
18621
18622 (define-public python-typed-ast
18623 (package
18624 (name "python-typed-ast")
18625 (version "1.4.0")
18626 (source
18627 (origin
18628 (method git-fetch)
18629 (uri (git-reference
18630 (url "https://github.com/python/typed_ast")
18631 (commit version)))
18632 (sha256
18633 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18634 (file-name (git-file-name name version))))
18635 (build-system python-build-system)
18636 (arguments
18637 `(#:modules ((guix build utils)
18638 (guix build python-build-system)
18639 (ice-9 ftw)
18640 (srfi srfi-1)
18641 (srfi srfi-26))
18642 #:phases
18643 (modify-phases %standard-phases
18644 (replace 'check
18645 (lambda _
18646 (let ((cwd (getcwd)))
18647 (setenv "PYTHONPATH"
18648 (string-append cwd "/build/"
18649 (find (cut string-prefix? "lib" <>)
18650 (scandir (string-append cwd "/build")))
18651 ":"
18652 (getenv "PYTHONPATH"))))
18653 (invoke "pytest")
18654 #t)))))
18655 (native-inputs `(("python-pytest" ,python-pytest)))
18656 (home-page "https://github.com/python/typed_ast")
18657 (synopsis "Fork of Python @code{ast} modules with type comment support")
18658 (description "This package provides a parser similar to the standard
18659 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18660 include PEP 484 type comments and are independent of the version of Python
18661 under which they are run. The @code{typed_ast} parsers produce the standard
18662 Python AST (plus type comments), and are both fast and correct, as they are
18663 based on the CPython 2.7 and 3.7 parsers.")
18664 ;; See the file "LICENSE" for the details.
18665 (license (list license:psfl
18666 license:asl2.0
18667 license:expat)))) ;ast27/Parser/spark.py
18668
18669 (define-public python-typer
18670 (package
18671 (name "python-typer")
18672 (version "0.3.2")
18673 (source
18674 (origin
18675 ;; Building `python-typer` from the git repository requires the `flit-core`
18676 ;; Python package that is not installed by `python-flit`.
18677 (method url-fetch)
18678 (uri (pypi-uri "typer" version))
18679 (sha256
18680 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
18681 (build-system python-build-system)
18682 (arguments
18683 `(#:phases
18684 (modify-phases %standard-phases
18685 (add-before 'check 'disable-failing-tests
18686 (lambda _
18687 (substitute* "tests/test_completion/test_completion.py"
18688 (("def test_show_completion")
18689 "def _test_show_completion")
18690 (("def test_install_completion")
18691 "def _test_install_completion"))
18692 (substitute* "tests/test_completion/test_completion_install.py"
18693 (("def test_completion_install_bash")
18694 "def _test_completion_install_bash")
18695 (("def test_completion_install_zsh")
18696 "def _test_completion_install_zsh")
18697 (("def test_completion_install_fish")
18698 "def _test_completion_install_fish")
18699 (("def test_completion_install_powershell")
18700 "def _test_completion_install_powershell"))
18701 #t))
18702 (replace 'check
18703 (lambda _
18704 (setenv "PYTHONPATH"
18705 (string-append (getcwd) ":"
18706 (getenv "PYTHONPATH")))
18707 (invoke "python" "-m" "pytest" "tests/")
18708 #t)))))
18709 (propagated-inputs
18710 `(("python-click" ,python-click)))
18711 (native-inputs
18712 `(("python-coverage" ,python-coverage)
18713 ("python-pytest" ,python-pytest)
18714 ("python-shellingham" ,python-shellingham)))
18715 (home-page "https://github.com/tiangolo/typer")
18716 (synopsis
18717 "Typer builds CLI based on Python type hints")
18718 (description
18719 "Typer is a library for building CLI applications. It's based on
18720 Python 3.6+ type hints.")
18721 ;; MIT license
18722 (license license:expat)))
18723
18724 (define-public python-typing
18725 (package
18726 (name "python-typing")
18727 (version "3.7.4.3")
18728 (source
18729 (origin
18730 (method url-fetch)
18731 (uri (pypi-uri "typing" version))
18732 (sha256
18733 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18734 (build-system python-build-system)
18735 (home-page "https://docs.python.org/3/library/typing.html")
18736 (synopsis "Type hints for Python")
18737 (description "This is a backport of the standard library @code{typing}
18738 module to Python versions older than 3.5. Typing defines a standard notation
18739 for Python function and variable type annotations. The notation can be used
18740 for documenting code in a concise, standard format, and it has been designed
18741 to also be used by static and runtime type checkers, static analyzers, IDEs
18742 and other tools.")
18743 (license license:psfl)))
18744
18745 (define-public python2-typing
18746 (package-with-python2 python-typing))
18747
18748 (define-public python-typing-extensions
18749 (package
18750 (name "python-typing-extensions")
18751 (version "3.7.4.3")
18752 (source
18753 (origin
18754 (method url-fetch)
18755 (uri (pypi-uri "typing_extensions" version))
18756 (sha256
18757 (base32
18758 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
18759 (build-system python-build-system)
18760 (home-page
18761 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18762 (synopsis "Experimental type hints for Python")
18763 (description
18764 "The typing_extensions module contains additional @code{typing} hints not
18765 yet present in the of the @code{typing} standard library.
18766 Included are implementations of:
18767 @enumerate
18768 @item ClassVar
18769 @item ContextManager
18770 @item Counter
18771 @item DefaultDict
18772 @item Deque
18773 @item NewType
18774 @item NoReturn
18775 @item overload
18776 @item Protocol
18777 @item runtime
18778 @item Text
18779 @item Type
18780 @item TYPE_CHECKING
18781 @item AsyncGenerator
18782 @end enumerate\n")
18783 (license license:psfl)))
18784
18785 (define-public bpython
18786 (package
18787 (name "bpython")
18788 (version "0.20.1")
18789 (source
18790 (origin
18791 (method url-fetch)
18792 (uri (pypi-uri "bpython" version))
18793 (sha256
18794 (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
18795 (build-system python-build-system)
18796 (arguments
18797 `(#:phases
18798 (modify-phases %standard-phases
18799 (add-after 'unpack 'remove-failing-test
18800 (lambda _
18801 ;; Remove failing test. FIXME: make it pass
18802 (delete-file "bpython/test/test_args.py")
18803 #t))
18804 (add-after 'wrap 'add-aliases
18805 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18806 (lambda* (#:key outputs #:allow-other-keys)
18807 (let ((out (assoc-ref outputs "out")))
18808 (for-each
18809 (lambda (old new)
18810 (symlink old (string-append out "/bin/" new)))
18811 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18812 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18813 #t)))))
18814 (propagated-inputs
18815 `(("python-pygments" ,python-pygments)
18816 ("python-requests" ,python-requests)
18817 ("python-curtsies" ,python-curtsies)
18818 ("python-greenlet" ,python-greenlet)
18819 ("python-six" ,python-six)
18820 ("python-wcwidth" ,python-wcwidth)
18821 ;; optional dependencies
18822 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18823 ("python-watchdog" ,python-watchdog)
18824 ("python-jedi" ,python-jedi)))
18825 (native-inputs
18826 `(("python-sphinx" ,python-sphinx)
18827 ("python-mock" ,python-mock)))
18828 (home-page "https://bpython-interpreter.org/")
18829 (synopsis "Fancy interface to the Python interpreter")
18830 (description "Bpython is a fancy interface to the Python
18831 interpreter. bpython's main features are
18832
18833 @enumerate
18834 @item in-line syntax highlighting,
18835 @item readline-like autocomplete with suggestions displayed as you type,
18836 @item expected parameter list for any Python function,
18837 @item \"rewind\" function to pop the last line of code from memory and
18838 re-evaluate,
18839 @item send the code you've entered off to a pastebin,
18840 @item save the code you've entered to a file, and
18841 @item auto-indentation.
18842 @end enumerate")
18843 (license license:expat)))
18844
18845 (define-public python-pyinotify
18846 (package
18847 (name "python-pyinotify")
18848 (version "0.9.6")
18849 (source (origin
18850 (method url-fetch)
18851 (uri (pypi-uri "pyinotify" version))
18852 (sha256
18853 (base32
18854 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18855 (build-system python-build-system)
18856 (arguments `(#:tests? #f)) ;no tests
18857 (home-page "https://github.com/seb-m/pyinotify")
18858 (synopsis "Python library for monitoring inotify events")
18859 (description
18860 "@code{pyinotify} provides a Python interface for monitoring
18861 file system events on Linux.")
18862 (license license:expat)))
18863
18864 (define-public python2-pyinotify
18865 (package-with-python2 python-pyinotify))
18866
18867 ;; Ada parser uses this version.
18868 (define-public python2-quex-0.67.3
18869 (package
18870 (name "python2-quex")
18871 (version "0.67.3")
18872 (source
18873 (origin
18874 (method url-fetch)
18875 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18876 (version-major+minor version)
18877 "/quex-" version ".zip"))
18878 (sha256
18879 (base32
18880 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18881 (build-system python-build-system)
18882 (native-inputs
18883 `(("unzip" ,unzip)))
18884 (arguments
18885 `(#:python ,python-2
18886 #:tests? #f
18887 #:phases
18888 (modify-phases %standard-phases
18889 (delete 'configure)
18890 (delete 'build)
18891 (replace 'install
18892 (lambda* (#:key outputs #:allow-other-keys)
18893 (let* ((out (assoc-ref outputs "out"))
18894 (share/quex (string-append out "/share/quex"))
18895 (bin (string-append out "/bin")))
18896 (copy-recursively "." share/quex)
18897 (mkdir-p bin)
18898 (symlink (string-append share/quex "/quex-exe.py")
18899 (string-append bin "/quex"))
18900 #t))))))
18901 (native-search-paths
18902 (list (search-path-specification
18903 (variable "QUEX_PATH")
18904 (files '("share/quex")))))
18905 (home-page "http://quex.sourceforge.net/")
18906 (synopsis "Lexical analyzer generator in Python")
18907 (description "@code{quex} is a lexical analyzer generator in Python.")
18908 (license license:lgpl2.1+))) ; Non-military
18909
18910 (define-public python2-quex
18911 (package (inherit python2-quex-0.67.3)
18912 (name "python2-quex")
18913 (version "0.68.1")
18914 (source
18915 (origin
18916 (method url-fetch)
18917 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18918 (sha256
18919 (base32
18920 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18921 (file-name (string-append name "-" version ".tar.gz"))))))
18922
18923 (define-public python-more-itertools
18924 (package
18925 (name "python-more-itertools")
18926 (version "8.2.0")
18927 (source
18928 (origin
18929 (method url-fetch)
18930 (uri (pypi-uri "more-itertools" version))
18931 (sha256
18932 (base32
18933 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18934 (build-system python-build-system)
18935 (home-page "https://github.com/erikrose/more-itertools")
18936 (synopsis "More routines for operating on iterables, beyond itertools")
18937 (description "Python's built-in @code{itertools} module implements a
18938 number of iterator building blocks inspired by constructs from APL, Haskell,
18939 and SML. @code{more-itertools} includes additional building blocks for
18940 working with iterables.")
18941 (properties `((python2-variant . ,(delay python2-more-itertools))))
18942 (license license:expat)))
18943
18944 ;; The 5.x series are the last versions supporting Python 2.7.
18945 (define-public python2-more-itertools
18946 (package
18947 (inherit python-more-itertools)
18948 (name "python2-more-itertools")
18949 (version "5.0.0")
18950 (source (origin
18951 (method url-fetch)
18952 (uri (pypi-uri "more-itertools" version))
18953 (sha256
18954 (base32
18955 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18956 (arguments
18957 `(#:python ,python-2))
18958 (propagated-inputs
18959 `(("python2-six" ,python2-six-bootstrap)))))
18960
18961 (define-public python-latexcodec
18962 (package
18963 (name "python-latexcodec")
18964 (version "1.0.7")
18965 (source
18966 (origin
18967 (method url-fetch)
18968 (uri (pypi-uri "latexcodec" version))
18969 (sha256
18970 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18971 (build-system python-build-system)
18972 (inputs
18973 `(("python-six" ,python-six)))
18974 (home-page "https://readthedocs.org/projects/latexcodec/")
18975 (synopsis "Work with LaTeX code in Python")
18976 (description "Lexer and codec to work with LaTeX code in Python.")
18977 (license license:expat)))
18978
18979 (define-public python-pybtex
18980 (package
18981 (name "python-pybtex")
18982 (version "0.22.2")
18983 (source
18984 (origin
18985 (method url-fetch)
18986 (uri (pypi-uri "pybtex" version))
18987 (sha256
18988 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18989 (build-system python-build-system)
18990 (native-inputs
18991 `(("python-nose" ,python-nose)))
18992 (inputs
18993 `(("python-latexcodec" ,python-latexcodec)
18994 ("python-pyyaml" ,python-pyyaml)
18995 ("python-six" ,python-six)))
18996 (arguments
18997 `(#:test-target "nosetests"))
18998 (home-page "https://pybtex.org/")
18999 (synopsis "BibTeX-compatible bibliography processor")
19000 (description "Pybtex is a BibTeX-compatible bibliography processor written
19001 in Python. You can simply type pybtex instead of bibtex.")
19002 (license license:expat)))
19003
19004 (define-public python-onetimepass
19005 (package
19006 (name "python-onetimepass")
19007 (version "1.0.1")
19008 (source
19009 (origin
19010 (method url-fetch)
19011 (uri (pypi-uri "onetimepass" version))
19012 (sha256
19013 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
19014 (build-system python-build-system)
19015 (propagated-inputs `(("python-six" ,python-six)))
19016 (home-page "https://github.com/tadeck/onetimepass/")
19017 (synopsis "One-time password library")
19018 (description "Python one-time password library for HMAC-based (HOTP) and
19019 time-based (TOTP) passwords.")
19020 (license license:expat)))
19021
19022 (define-public python-parso
19023 (package
19024 (name "python-parso")
19025 (version "0.7.1")
19026 (source
19027 (origin
19028 (method url-fetch)
19029 (uri (pypi-uri "parso" version))
19030 (sha256
19031 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
19032 (native-inputs
19033 `(("python-pytest" ,python-pytest)))
19034 (build-system python-build-system)
19035 (arguments
19036 `(#:phases (modify-phases %standard-phases
19037 (replace 'check
19038 (lambda _ (invoke "pytest" "-vv"))))))
19039 (home-page "https://github.com/davidhalter/parso")
19040 (synopsis "Python Parser")
19041 (description "Parso is a Python parser that supports error recovery and
19042 round-trip parsing for different Python versions (in multiple Python versions).
19043 Parso is also able to list multiple syntax errors in your Python file.")
19044 (license license:expat)))
19045
19046 (define-public python2-parso
19047 (package-with-python2 python-parso))
19048
19049 (define-public python-async-generator
19050 (package
19051 (name "python-async-generator")
19052 (version "1.10")
19053 (source
19054 (origin
19055 (method url-fetch)
19056 (uri (pypi-uri "async_generator" version))
19057 (sha256
19058 (base32
19059 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
19060 (build-system python-build-system)
19061 (native-inputs
19062 `(("python-pytest" ,python-pytest)))
19063 (home-page "https://github.com/python-trio/async_generator")
19064 (synopsis "Async generators and context managers for Python 3.5+")
19065 (description "@code{async_generator} back-ports Python 3.6's native async
19066 generators and Python 3.7's context managers into Python 3.5.")
19067 ;; Dual licensed.
19068 (license (list license:expat license:asl2.0))))
19069
19070 (define-public python-async-timeout
19071 (package
19072 (name "python-async-timeout")
19073 (version "3.0.1")
19074 (source
19075 (origin
19076 (method url-fetch)
19077 (uri (pypi-uri "async-timeout" version))
19078 (sha256
19079 (base32
19080 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
19081 (build-system python-build-system)
19082 (home-page "https://github.com/aio-libs/async_timeout/")
19083 (synopsis "Timeout context manager for asyncio programs")
19084 (description "@code{async-timeout} provides a timeout timeout context
19085 manager compatible with @code{asyncio}.")
19086 (license license:asl2.0)))
19087
19088 (define-public python-glob2
19089 (package
19090 (name "python-glob2")
19091 (version "0.7")
19092 (source
19093 (origin
19094 (method git-fetch)
19095 (uri (git-reference
19096 (url "https://github.com/miracle2k/python-glob2")
19097 (commit (string-append "v" version))))
19098 (file-name (git-file-name name version))
19099 (sha256
19100 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
19101 (build-system python-build-system)
19102 (home-page "https://github.com/miracle2k/python-glob2/")
19103 (synopsis "Extended Version of the python buildin glob module")
19104 (description "This is an extended version of the Python
19105 @url{http://docs.python.org/library/glob.html, built-in glob module} which
19106 adds:
19107
19108 @itemize
19109 @item The ability to capture the text matched by glob patterns, and return
19110 those matches alongside the file names.
19111 @item A recursive @code{**} globbing syntax, akin for example to the
19112 @code{globstar} option of Bash.
19113 @item The ability to replace the file system functions used, in order to glob
19114 on virtual file systems.
19115 @item Compatible with Python 2 and Python 3 (tested with 3.3).
19116 @end itemize
19117
19118 Glob2 currently based on the glob code from Python 3.3.1.")
19119 (license license:bsd-2)))
19120
19121 (define-public python2-glob2
19122 (package-with-python2 python-glob2))
19123
19124 (define-public python-gipc
19125 (package
19126 (name "python-gipc")
19127 (version "0.6.0")
19128 (source
19129 (origin
19130 (method url-fetch)
19131 (uri (pypi-uri "gipc" version ".zip"))
19132 (sha256
19133 (base32
19134 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
19135 (build-system python-build-system)
19136 (native-inputs
19137 `(("unzip" ,unzip)))
19138 (propagated-inputs
19139 `(("python-gevent" ,python-gevent)))
19140 (home-page "https://gehrcke.de/gipc/")
19141 (synopsis "Child process management in the context of gevent")
19142 (description "Usage of Python's multiprocessing package in a
19143 gevent-powered application may raise problems. With @code{gipc},
19144 process-based child processes can safely be created anywhere within a
19145 gevent-powered application.")
19146 (license license:expat)))
19147
19148 (define-public python-beautifultable
19149 (package
19150 (name "python-beautifultable")
19151 (version "1.0.0")
19152 (source
19153 (origin
19154 (method url-fetch)
19155 (uri (pypi-uri "beautifultable" version))
19156 (sha256
19157 (base32
19158 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
19159 (build-system python-build-system)
19160 (propagated-inputs
19161 `(("python-wcwidth" ,python-wcwidth)))
19162 (arguments
19163 `(#:phases
19164 (modify-phases %standard-phases
19165 (add-after 'unpack 'patch-setup.py
19166 (lambda _
19167 (substitute* "setup.py"
19168 (("setup\\(")
19169 "setup(\n test_suite=\"test\",")))))))
19170 (home-page "https://github.com/pri22296/beautifultable")
19171 (synopsis "Print ASCII tables for terminals")
19172 (description "@code{python-beautifultable} provides a class for easily
19173 printing tabular data in a visually appealing ASCII format to a terminal.
19174
19175 Features include, but are not limited to:
19176 @itemize
19177 @item Full customization of the look and feel of the table
19178 @item Row and column accessors.
19179 @item Full support for colors using ANSI sequences or any library.
19180 @item Plenty of predefined styles and option to create custom ones.
19181 @item Support for Unicode characters.
19182 @item Supports streaming table when data is slow to retrieve.
19183 @end itemize")
19184 (license license:expat)))
19185
19186 (define-public python-globber
19187 (package
19188 (name "python-globber")
19189 (version "0.2.1")
19190 (source
19191 (origin
19192 (method git-fetch)
19193 (uri (git-reference
19194 (url "https://github.com/asharov/globber")
19195 (commit version)))
19196 (file-name (git-file-name name version))
19197 (sha256
19198 (base32
19199 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
19200 (build-system python-build-system)
19201 (home-page "https://github.com/asharov/globber")
19202 (synopsis "Library for string matching with glob patterns")
19203 (description
19204 "Globber is a Python library for matching file names against glob patterns.
19205 In contrast to other glob-matching libraries, it matches arbitrary strings and
19206 doesn't require the matched names to be existing files. In addition, it
19207 supports the globstar @code{**} operator to match an arbitrary number of
19208 path components.")
19209 (license license:asl2.0)))
19210
19211 (define-public python-git-hammer
19212 (package
19213 (name "python-git-hammer")
19214 (version "0.3.1")
19215 (source
19216 (origin
19217 (method git-fetch)
19218 (uri (git-reference
19219 (url "https://github.com/asharov/git-hammer")
19220 (commit version)))
19221 (file-name (git-file-name name version))
19222 (sha256
19223 (base32
19224 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
19225 (build-system python-build-system)
19226 (arguments
19227 `(#:phases
19228 (modify-phases %standard-phases
19229 (add-after 'unpack 'patch-setup.py
19230 (lambda _
19231 (substitute* "setup.py"
19232 (("setup\\(")
19233 "setup(\n test_suite=\"test\",")))))))
19234 (propagated-inputs
19235 `(("python-beautifultable" ,python-beautifultable)
19236 ("python-dateutil" ,python-dateutil)
19237 ("python-gitpython" ,python-gitpython)
19238 ("python-globber" ,python-globber)
19239 ("python-matplotlib" ,python-matplotlib)
19240 ("python-sqlalchemy" ,python-sqlalchemy)
19241 ("python-sqlalchemy-utils"
19242 ,python-sqlalchemy-utils)))
19243 (home-page "https://github.com/asharov/git-hammer")
19244 (synopsis "Provide statistics for git repositories")
19245 (description
19246 "Git Hammer is a statistics tool for projects in git repositories.
19247 Its major feature is tracking the number of lines authored by each person for every
19248 commit, but it also includes some other useful statistics.")
19249 (license license:asl2.0)))
19250
19251 (define-public python-fusepy
19252 (package
19253 (name "python-fusepy")
19254 (version "2.0.4")
19255 (source
19256 (origin
19257 (method url-fetch)
19258 (uri (pypi-uri "fusepy" version))
19259 (sha256
19260 (base32
19261 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
19262 (build-system python-build-system)
19263 (arguments
19264 `(#:phases
19265 (modify-phases %standard-phases
19266 (add-before 'build 'set-library-file-name
19267 (lambda* (#:key inputs #:allow-other-keys)
19268 (let ((fuse (assoc-ref inputs "fuse")))
19269 (substitute* "fuse.py"
19270 (("find_library\\('fuse'\\)")
19271 (string-append "'" fuse "/lib/libfuse.so'")))
19272 #t))))))
19273 (propagated-inputs
19274 `(("fuse" ,fuse)))
19275 (home-page "https://github.com/fusepy/fusepy")
19276 (synopsis "Simple ctypes bindings for FUSE")
19277 (description "Python module that provides a simple interface to FUSE and
19278 MacFUSE. The binding is created using the standard @code{ctypes} library.")
19279 (license license:isc)))
19280
19281 (define-public python2-fusepy
19282 (package-with-python2 python-fusepy))
19283
19284 (define-public python-fusepyng
19285 (package
19286 (name "python-fusepyng")
19287 (version "1.0.7")
19288 (source
19289 (origin
19290 (method url-fetch)
19291 (uri (pypi-uri "fusepyng" version))
19292 (sha256
19293 (base32
19294 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
19295 (build-system python-build-system)
19296 (arguments
19297 '(#:phases
19298 (modify-phases %standard-phases
19299 (add-after 'unpack 'set-libfuse-path
19300 (lambda* (#:key inputs #:allow-other-keys)
19301 (let ((fuse (assoc-ref inputs "fuse")))
19302 (substitute* "fusepyng.py"
19303 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
19304 (string-append "\"" fuse "/lib/libfuse.so\""))))
19305 #t)))))
19306 (inputs
19307 `(("fuse" ,fuse)))
19308 (propagated-inputs
19309 `(("python-paramiko" ,python-paramiko)))
19310 (home-page "https://github.com/rianhunter/fusepyng")
19311 (synopsis "Simple ctypes bindings for FUSE")
19312 (description "@code{fusepyng} is a Python module that provides a simple
19313 interface to FUSE on various operating systems. It's just one file and is
19314 implemented using @code{ctypes}.")
19315 (license license:isc)))
19316
19317 (define-public python-userspacefs
19318 (package
19319 (name "python-userspacefs")
19320 (version "2.0.3")
19321 (source
19322 (origin
19323 (method url-fetch)
19324 (uri (pypi-uri "userspacefs" version))
19325 (sha256
19326 (base32
19327 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
19328 (build-system python-build-system)
19329 (propagated-inputs
19330 `(("python-fusepyng" ,python-fusepyng)))
19331 (home-page "https://github.com/rianhunter/userspacefs")
19332 (synopsis "User-space file systems for Python")
19333 (description
19334 "@code{userspacefs} is a library that allows you to easily write
19335 user-space file systems in Python.")
19336 (license license:gpl3+)))
19337
19338 (define-public python-stone
19339 (package
19340 (name "python-stone")
19341 (version "3.2.1")
19342 (source
19343 (origin
19344 (method url-fetch)
19345 (uri (pypi-uri "stone" version))
19346 (sha256
19347 (base32
19348 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
19349 (build-system python-build-system)
19350 (arguments
19351 `(#:phases
19352 (modify-phases %standard-phases
19353 (add-after 'unpack 'change-version-requirements
19354 (lambda _
19355 ;; Match the requirement in test/requirements.txt
19356 (substitute* "setup.py"
19357 (("pytest < 5") "pytest < 7"))
19358 ;; We don't care about a coverage report.
19359 (substitute* "test/requirements.txt"
19360 (("coverage.*") "coverage\n"))
19361 #t))
19362 (replace 'check
19363 (lambda* (#:key tests? #:allow-other-keys)
19364 (when tests?
19365 ;; These tests don't import currectly.
19366 (delete-file "test/test_js_client.py")
19367 (delete-file "test/test_tsd_types.py")
19368 (delete-file "test/test_python_gen.py")
19369 (setenv "PYTHONPATH"
19370 (string-append (getcwd) ":"
19371 (getenv "PYTHONPATH")))
19372 (invoke "pytest"))
19373 #t)))))
19374 (propagated-inputs
19375 `(("python-ply" ,python-ply)
19376 ("python-six" ,python-six)))
19377 (native-inputs
19378 `(("python-coverage" ,python-coverage)
19379 ("python-mock" ,python-mock)
19380 ("python-pytest" ,python-pytest)
19381 ("python-pytest-runner" ,python-pytest-runner)))
19382 (home-page "https://github.com/dropbox/stone")
19383 (synopsis "Official Api Spec Language for Dropbox")
19384 (description
19385 "Stone is an interface description language (IDL) for APIs.")
19386 (license license:expat)))
19387
19388 (define-public pybind11
19389 (package
19390 (name "pybind11")
19391 (version "2.6.1")
19392 (source (origin
19393 (method git-fetch)
19394 (uri (git-reference
19395 (url "https://github.com/pybind/pybind11")
19396 (commit (string-append "v" version))))
19397 (sha256
19398 (base32
19399 "1wh5b1xnywzxwxkyac2wvyqwzmy1qxs341jjk820r7b825wn6yad"))
19400 (file-name (git-file-name name version))))
19401 (build-system cmake-build-system)
19402 (native-inputs
19403 `(("python" ,python-wrapper)
19404
19405 ;; The following dependencies are used for tests.
19406 ("python-pytest" ,python-pytest)
19407 ("catch" ,catch-framework2-1)
19408 ("eigen" ,eigen)))
19409 (arguments
19410 `(#:configure-flags
19411 (list (string-append "-DCATCH_INCLUDE_DIR="
19412 (assoc-ref %build-inputs "catch")
19413 "/include/catch"))
19414
19415 #:phases (modify-phases %standard-phases
19416 (add-after 'install 'install-python
19417 (lambda* (#:key outputs #:allow-other-keys)
19418 (let ((out (assoc-ref outputs "out")))
19419 (with-directory-excursion "../source"
19420 (setenv "PYBIND11_USE_CMAKE" "yes")
19421 (invoke "python" "setup.py" "install"
19422 "--single-version-externally-managed"
19423 "--root=/"
19424 (string-append "--prefix=" out)))))))
19425
19426 #:test-target "check"))
19427 (home-page "https://github.com/pybind/pybind11/")
19428 (synopsis "Seamless operability between C++11 and Python")
19429 (description
19430 "@code{pybind11} is a lightweight header-only library that exposes C++
19431 types in Python and vice versa, mainly to create Python bindings of existing
19432 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
19433 library: to minimize boilerplate code in traditional extension modules by
19434 inferring type information using compile-time introspection.")
19435 (license license:bsd-3)))
19436
19437 (define-public python-pooch
19438 (package
19439 (name "python-pooch")
19440 (version "1.3.0")
19441 (source
19442 (origin
19443 (method url-fetch)
19444 (uri (pypi-uri "pooch" version))
19445 (sha256
19446 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
19447 (build-system python-build-system)
19448 (arguments
19449 `(#:tests? #f)) ;requires online data
19450 (propagated-inputs
19451 `(("python-appdirs" ,python-appdirs)
19452 ("python-packaging" ,python-packaging)
19453 ("python-requests" ,python-requests)))
19454 (home-page "https://github.com/fatiando/pooch")
19455 (synopsis "Manage your Python library's sample data files")
19456 (description
19457 "Pooch manages your Python library's sample data files: it automatically
19458 downloads and stores them in a local directory, with support for versioning
19459 and corruption checks.")
19460 (license license:bsd-3)))
19461
19462 (define-public python-fasteners
19463 (package
19464 (name "python-fasteners")
19465 (version "0.15")
19466 (source
19467 (origin
19468 (method url-fetch)
19469 (uri (pypi-uri "fasteners" version))
19470 (sha256
19471 (base32
19472 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
19473 (build-system python-build-system)
19474 (propagated-inputs
19475 `(("python-monotonic" ,python-monotonic)
19476 ("python-six" ,python-six)))
19477 (native-inputs
19478 `(("python-testtools" ,python-testtools)))
19479 (home-page "https://github.com/harlowja/fasteners")
19480 (synopsis "Python package that provides useful locks")
19481 (description
19482 "This package provides a Python program that provides following locks:
19483
19484 @itemize
19485 @item Locking decorator
19486 @item Reader-writer locks
19487 @item Inter-process locks
19488 @item Generic helpers
19489 @end itemize\n")
19490 (license license:asl2.0)))
19491
19492 (define-public python-requests-file
19493 (package
19494 (name "python-requests-file")
19495 (version "1.4.3")
19496 (source
19497 (origin
19498 (method url-fetch)
19499 (uri (pypi-uri "requests-file" version))
19500 (sha256
19501 (base32
19502 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
19503 (build-system python-build-system)
19504 (propagated-inputs
19505 `(("python-requests" ,python-requests)
19506 ("python-six" ,python-six)))
19507 (home-page
19508 "https://github.com/dashea/requests-file")
19509 (synopsis "File transport adapter for Requests")
19510 (description
19511 "Requests-File is a transport adapter for use with the Requests Python
19512 library to allow local file system access via @code{file://} URLs.")
19513 (license license:asl2.0)))
19514
19515 (define-public python2-requests-file
19516 (package-with-python2 python-requests-file))
19517
19518 (define-public python-identify
19519 (package
19520 (name "python-identify")
19521 (version "1.4.25")
19522 (source
19523 (origin
19524 ;; There are no tests in the PyPI tarball.
19525 (method git-fetch)
19526 (uri (git-reference
19527 (url "https://github.com/chriskuehl/identify")
19528 (commit (string-append "v" version))))
19529 (file-name (git-file-name name version))
19530 (sha256
19531 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
19532 (build-system python-build-system)
19533 (arguments
19534 `(#:phases
19535 (modify-phases %standard-phases
19536 (replace 'check
19537 (lambda _
19538 (invoke "pytest" "-vv"))))))
19539 (native-inputs
19540 `(("python-coverage" ,python-coverage)
19541 ("python-pytest" ,python-pytest)))
19542 (propagated-inputs
19543 `(("python-editdistance" ,python-editdistance)))
19544 (home-page "https://github.com/chriskuehl/identify")
19545 (synopsis "File identification library for Python")
19546 (description
19547 "@code{identify} is a file identification library for Python. Given
19548 a file (or some information about a file), return a set of standardized tags
19549 identifying what the file is.")
19550 (license license:expat)))
19551
19552 (define-public python-tldextract
19553 (package
19554 (name "python-tldextract")
19555 (version "2.2.0")
19556 (source
19557 (origin
19558 (method url-fetch)
19559 (uri (pypi-uri "tldextract" version))
19560 (sha256
19561 (base32
19562 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
19563 (build-system python-build-system)
19564 (native-inputs
19565 `(("python-pytest" ,python-pytest)
19566 ("python-responses" ,python-responses)))
19567 (propagated-inputs
19568 `(("python-idna" ,python-idna)
19569 ("python-requests" ,python-requests)
19570 ("python-requests-file" ,python-requests-file)))
19571 (home-page
19572 "https://github.com/john-kurkowski/tldextract")
19573 (synopsis
19574 "Separate the TLD from the registered domain and subdomains of a URL")
19575 (description
19576 "TLDExtract accurately separates the TLD from the registered domain and
19577 subdomains of a URL, using the Public Suffix List. By default, this includes
19578 the public ICANN TLDs and their exceptions. It can optionally support the
19579 Public Suffix List's private domains as well.")
19580 (license license:bsd-3)))
19581
19582 (define-public python2-tldextract
19583 (package-with-python2 python-tldextract))
19584
19585 (define-public python-nodeenv
19586 (package
19587 (name "python-nodeenv")
19588 (version "1.4.0")
19589 (source
19590 (origin
19591 ;; There's no tarball in PyPI.
19592 (method git-fetch)
19593 (uri (git-reference
19594 (url "https://github.com/ekalinin/nodeenv")
19595 (commit version)))
19596 (file-name (git-file-name name version))
19597 (sha256
19598 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
19599 (build-system python-build-system)
19600 (arguments
19601 `(#:phases
19602 (modify-phases %standard-phases
19603 (replace 'check
19604 (lambda _
19605 ;; This test fails. It tries to open a network socket.
19606 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
19607 (native-inputs
19608 `(("python-coverage" ,python-coverage)
19609 ("python-mock" ,python-mock)
19610 ("python-pytest" ,python-pytest)))
19611 (home-page "https://ekalinin.github.io/nodeenv/")
19612 (synopsis "Create isolated node.js environments")
19613 (description
19614 "Nodeenv (node.js virtual environment) is a tool to create isolated
19615 node.js environments. It creates an environment that has its own installation
19616 directories, that doesn't share libraries with other node.js virtual
19617 environments.")
19618 (license license:bsd-3)))
19619
19620 (define-public python-pynamecheap
19621 (package
19622 (name "python-pynamecheap")
19623 (version "0.0.3")
19624 (source
19625 (origin
19626 (method url-fetch)
19627 (uri (pypi-uri "PyNamecheap" version))
19628 (sha256
19629 (base32
19630 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
19631 (build-system python-build-system)
19632 (propagated-inputs
19633 `(("python-requests" ,python-requests)))
19634 (home-page
19635 "https://github.com/Bemmu/PyNamecheap")
19636 (synopsis
19637 "Namecheap API client in Python")
19638 (description
19639 "PyNamecheap is a Namecheap API client in Python.")
19640 (license license:expat)))
19641
19642 (define-public python2-pynamecheap
19643 (package-with-python2 python-pynamecheap))
19644
19645 (define-public python-dns-lexicon
19646 (package
19647 (name "python-dns-lexicon")
19648 (version "2.4.0")
19649 (source
19650 (origin
19651 (method url-fetch)
19652 (uri (pypi-uri "dns-lexicon" version))
19653 (sha256
19654 (base32
19655 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
19656 (build-system python-build-system)
19657 (arguments
19658 `(#:tests? #f)) ;requires internet access
19659 (propagated-inputs
19660 `(("python-future" ,python-future)
19661 ("python-pynamecheap" ,python-pynamecheap)
19662 ("python-requests" ,python-requests)
19663 ("python-tldextract" ,python-tldextract)
19664 ("python-urllib3" ,python-urllib3)))
19665 (home-page "https://github.com/AnalogJ/lexicon")
19666 (synopsis
19667 "Manipulate DNS records on various DNS providers")
19668 (description
19669 "Lexicon provides a way to manipulate DNS records on multiple DNS
19670 providers in a standardized way. It has a CLI but it can also be used as a
19671 Python library. It was designed to be used in automation, specifically with
19672 Let's Encrypt.")
19673 (license license:expat)))
19674
19675 (define-public python2-dns-lexicon
19676 (package-with-python2 python-dns-lexicon))
19677
19678 (define-public python-cfgv
19679 (package
19680 (name "python-cfgv")
19681 (version "3.1.0")
19682 (source
19683 (origin
19684 ;; There are no tests in the PyPI tarball.
19685 (method git-fetch)
19686 (uri (git-reference
19687 (url "https://github.com/asottile/cfgv")
19688 (commit (string-append "v" version))))
19689 (file-name (git-file-name name version))
19690 (sha256
19691 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19692 (build-system python-build-system)
19693 (arguments
19694 `(#:phases
19695 (modify-phases %standard-phases
19696 (replace 'check
19697 (lambda _
19698 (invoke "pytest" "-vv"))))))
19699 (native-inputs
19700 `(("python-covdefaults" ,python-covdefaults)
19701 ("python-coverage" ,python-coverage)
19702 ("python-pytest" ,python-pytest)))
19703 (home-page "https://github.com/asottile/cfgv")
19704 (synopsis "Configuration validation library")
19705 (description
19706 "This library helps to validate configuration files and produce human
19707 readable error messages.")
19708 (license license:expat)))
19709
19710 (define-public python-commandlines
19711 (package
19712 (name "python-commandlines")
19713 (version "0.4.1")
19714 (source
19715 (origin
19716 (method url-fetch)
19717 (uri (pypi-uri "commandlines" version))
19718 (sha256
19719 (base32
19720 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
19721 (build-system python-build-system)
19722 (home-page "https://github.com/chrissimpkins/commandlines")
19723 (synopsis "Command line argument to object parsing library")
19724 (description
19725 "@code{Commandlines} is a Python library for command line application
19726 development that supports command line argument parsing, command string
19727 validation testing and application logic.")
19728 (license license:expat)))
19729
19730 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19731 ;; python-numba. They have a very unflexible relationship.
19732 (define-public python-numba
19733 (package
19734 (name "python-numba")
19735 (version "0.51.2")
19736 (source
19737 (origin
19738 (method url-fetch)
19739 (uri (pypi-uri "numba" version))
19740 (sha256
19741 (base32
19742 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19743 (build-system python-build-system)
19744 (arguments
19745 `(#:phases
19746 (modify-phases %standard-phases
19747 (add-after 'unpack 'disable-proprietary-features
19748 (lambda _
19749 (setenv "NUMBA_DISABLE_HSA" "1")
19750 (setenv "NUMBA_DISABLE_CUDA" "1")
19751 #t))
19752 (replace 'check
19753 (lambda* (#:key inputs outputs #:allow-other-keys)
19754 (add-installed-pythonpath inputs outputs)
19755 ;; Something is wrong with the PYTHONPATH when running the
19756 ;; tests from the build directory, as it complains about not being
19757 ;; able to import certain modules.
19758 (with-directory-excursion "/tmp"
19759 (setenv "HOME" (getcwd))
19760 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19761 (propagated-inputs
19762 `(("python-llvmlite" ,python-llvmlite)
19763 ("python-numpy" ,python-numpy)
19764 ("python-singledispatch" ,python-singledispatch)))
19765 (native-inputs ;for tests
19766 `(("python-jinja2" ,python-jinja2)
19767 ("python-pygments" ,python-pygments)))
19768 (home-page "https://numba.pydata.org")
19769 (synopsis "Compile Python code using LLVM")
19770 (description "Numba gives you the power to speed up your applications with
19771 high performance functions written directly in Python. With a few
19772 annotations, array-oriented and math-heavy Python code can be just-in-time
19773 compiled to native machine instructions, similar in performance to C, C++ and
19774 Fortran, without having to switch languages or Python interpreters.
19775
19776 Numba works by generating optimized machine code using the LLVM compiler
19777 infrastructure at import time, runtime, or statically (using the included pycc
19778 tool).")
19779 (license license:bsd-3)))
19780
19781 (define-public python-numcodecs
19782 (package
19783 (name "python-numcodecs")
19784 (version "0.6.4")
19785 (source
19786 (origin
19787 (method url-fetch)
19788 (uri (pypi-uri "numcodecs" version))
19789 (sha256
19790 (base32
19791 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19792 (build-system python-build-system)
19793 (propagated-inputs
19794 `(("python-numpy" ,python-numpy)
19795 ("python-msgpack" ,python-msgpack)))
19796 (native-inputs
19797 `(("python-pytest" ,python-pytest)
19798 ("python-setuptools-scm" ,python-setuptools-scm)))
19799 (home-page "https://github.com/zarr-developers/numcodecs")
19800 (synopsis "Buffer compression and transformation codecs")
19801 (description
19802 "This Python package provides buffer compression and transformation
19803 codecs for use in data storage and communication applications.")
19804 (license license:expat)))
19805
19806 (define-public python-asciitree
19807 (package
19808 (name "python-asciitree")
19809 (version "0.3.3")
19810 (source
19811 (origin
19812 (method url-fetch)
19813 (uri (pypi-uri "asciitree" version))
19814 (sha256
19815 (base32
19816 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19817 (build-system python-build-system)
19818 (home-page "https://github.com/mbr/asciitree")
19819 (synopsis "Draws ASCII trees")
19820 (description "This package draws tree structures using characters.")
19821 (license license:expat)))
19822
19823 (define-public python-zarr
19824 (package
19825 (name "python-zarr")
19826 (version "2.4.0")
19827 (source
19828 (origin
19829 (method url-fetch)
19830 (uri (pypi-uri "zarr" version))
19831 (sha256
19832 (base32
19833 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19834 (build-system python-build-system)
19835 (arguments
19836 `(#:phases
19837 (modify-phases %standard-phases
19838 (add-after 'unpack 'disable-service-tests
19839 (lambda _
19840 (setenv "ZARR_TEST_ABS" "0")
19841 (setenv "ZARR_TEST_MONGO" "0")
19842 (setenv "ZARR_TEST_REDIS" "0")
19843 #t))
19844 (replace 'check
19845 (lambda _
19846 (invoke "pytest" "-vv" "-k" "not lmdb")
19847 #t)))))
19848 (propagated-inputs
19849 `(("python-asciitree" ,python-asciitree)
19850 ("python-fasteners" ,python-fasteners)
19851 ("python-numcodecs" ,python-numcodecs)
19852 ("python-numpy" ,python-numpy)))
19853 (native-inputs
19854 `(("python-pytest" ,python-pytest)
19855 ("python-setuptools-scm" ,python-setuptools-scm)))
19856 (home-page "https://github.com/zarr-developers/zarr-python")
19857 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19858 (description
19859 "This package provides an implementation of chunked, compressed,
19860 N-dimensional arrays for Python.")
19861 (license license:expat)))
19862
19863 (define-public python-anndata
19864 (package
19865 (name "python-anndata")
19866 (version "0.7.1")
19867 (source
19868 (origin
19869 (method url-fetch)
19870 (uri (pypi-uri "anndata" version))
19871 (sha256
19872 (base32
19873 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19874 (build-system python-build-system)
19875 (arguments
19876 `(#:phases
19877 (modify-phases %standard-phases
19878 (add-after 'unpack 'delete-inconvenient-tests
19879 (lambda _
19880 ;; This test depends on python-scikit-learn.
19881 (delete-file "anndata/tests/test_inplace_subset.py")
19882 #t))
19883 (delete 'check)
19884 (add-after 'install 'check
19885 (lambda* (#:key inputs outputs #:allow-other-keys)
19886 (add-installed-pythonpath inputs outputs)
19887 (invoke "pytest" "-vv"))))))
19888 (propagated-inputs
19889 `(("python-h5py" ,python-h5py)
19890 ("python-importlib-metadata" ,python-importlib-metadata)
19891 ("python-natsort" ,python-natsort)
19892 ("python-numcodecs" ,python-numcodecs)
19893 ("python-packaging" ,python-packaging)
19894 ("python-pandas" ,python-pandas)
19895 ("python-scipy" ,python-scipy)
19896 ("python-zarr" ,python-zarr)))
19897 (native-inputs
19898 `(("python-joblib" ,python-joblib)
19899 ("python-pytest" ,python-pytest)
19900 ("python-setuptools-scm" ,python-setuptools-scm)))
19901 (home-page "https://github.com/theislab/anndata")
19902 (synopsis "Annotated data for data analysis pipelines")
19903 (description "Anndata is a package for simple (functional) high-level APIs
19904 for data analysis pipelines. In this context, it provides an efficient,
19905 scalable way of keeping track of data together with learned annotations and
19906 reduces the code overhead typically encountered when using a mostly
19907 object-oriented library such as @code{scikit-learn}.")
19908 (license license:bsd-3)))
19909
19910 (define-public python-dill
19911 (package
19912 (name "python-dill")
19913 (version "0.3.1.1")
19914 (source
19915 (origin
19916 (method url-fetch)
19917 (uri (pypi-uri "dill" version))
19918 (sha256
19919 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
19920 (build-system python-build-system)
19921 (arguments
19922 `(#:phases
19923 (modify-phases %standard-phases
19924 (replace 'check
19925 (lambda _
19926 (with-directory-excursion "/tmp"
19927 (invoke "nosetests" "-v"))
19928 #t)))))
19929 (native-inputs
19930 `(("python-nose" ,python-nose)))
19931 (home-page "https://pypi.org/project/dill/")
19932 (synopsis "Serialize all of Python")
19933 (description "Dill extends Python's @code{pickle} module for serializing
19934 and de-serializing Python objects to the majority of the built-in Python
19935 types. Dill provides the user the same interface as the @code{pickle} module,
19936 and also includes some additional features. In addition to pickling Python
19937 objects, @code{dill} provides the ability to save the state of an interpreter
19938 session in a single command. Hence, it would be feasible to save a
19939 interpreter session, close the interpreter, ship the pickled file to another
19940 computer, open a new interpreter, unpickle the session and thus continue from
19941 the saved state of the original interpreter session.")
19942 (license license:bsd-3)))
19943
19944 (define-public python-multiprocess
19945 (package
19946 (name "python-multiprocess")
19947 (version "0.70.9")
19948 (source
19949 (origin
19950 (method url-fetch)
19951 (uri (pypi-uri "multiprocess" version))
19952 (sha256
19953 (base32
19954 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
19955 (build-system python-build-system)
19956 (arguments
19957 `(#:phases
19958 (modify-phases %standard-phases
19959 (add-after 'unpack 'disable-broken-tests
19960 (lambda _
19961 ;; This test is broken as there is no keyboard interrupt.
19962 (substitute* "py3.7/multiprocess/tests/__init__.py"
19963 (("^(.*)def test_wait_result"
19964 line indent)
19965 (string-append indent
19966 "@unittest.skip(\"Disabled by Guix\")\n"
19967 line)))
19968 #t))
19969 ;; Tests must be run after installation.
19970 (delete 'check)
19971 (add-after 'install 'check
19972 (lambda* (#:key inputs outputs #:allow-other-keys)
19973 (add-installed-pythonpath inputs outputs)
19974 (invoke "python" "-m" "multiprocess.tests")
19975 #t)))))
19976 (propagated-inputs
19977 `(("python-dill" ,python-dill)))
19978 (home-page "https://pypi.org/project/multiprocess/")
19979 (synopsis "Multiprocessing and multithreading in Python")
19980 (description
19981 "This package is a fork of the multiprocessing Python package, a package
19982 which supports the spawning of processes using the API of the standard
19983 library's @code{threading} module.")
19984 (license license:bsd-3)))
19985
19986 (define-public python-toolz
19987 (package
19988 (name "python-toolz")
19989 (version "0.9.0")
19990 (source
19991 (origin
19992 (method url-fetch)
19993 (uri (pypi-uri "toolz" version))
19994 (sha256
19995 (base32
19996 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
19997 (build-system python-build-system)
19998 ;; FIXME: tests cannot be computed: "Can't perform this operation for
19999 ;; unregistered loader type"
20000 (arguments '(#:tests? #f))
20001 (home-page "https://github.com/pytoolz/toolz/")
20002 (synopsis "List processing tools and functional utilities")
20003 (description
20004 "This package provides a set of utility functions for iterators,
20005 functions, and dictionaries.")
20006 (license license:bsd-3)))
20007
20008 (define-public python2-toolz
20009 (package-with-python2 python-toolz))
20010
20011 (define-public python-cytoolz
20012 (package
20013 (name "python-cytoolz")
20014 (version "0.9.0.1")
20015 (source
20016 (origin
20017 (method url-fetch)
20018 (uri (pypi-uri "cytoolz" version))
20019 (sha256
20020 (base32
20021 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
20022 (build-system python-build-system)
20023 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
20024 ;; 'exceptions'"
20025 (arguments '(#:tests? #f))
20026 (propagated-inputs
20027 `(("python-toolz" ,python-toolz)))
20028 (native-inputs
20029 `(("python-cython" ,python-cython)))
20030 (home-page "https://github.com/pytoolz/cytoolz")
20031 (synopsis "High performance functional utilities")
20032 (description
20033 "The cytoolz package implements the same API as provided by toolz. The
20034 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
20035 that is accessible to other projects developed in Cython.")
20036 (license license:bsd-3)))
20037
20038 (define-public python-sortedcollections
20039 (package
20040 (name "python-sortedcollections")
20041 (version "2.1.0")
20042 (source
20043 (origin
20044 (method url-fetch)
20045 (uri (pypi-uri "sortedcollections" version))
20046 (sha256
20047 (base32
20048 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
20049 (build-system python-build-system)
20050 (propagated-inputs
20051 `(("python-sortedcontainers" ,python-sortedcontainers)))
20052 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
20053 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
20054 (synopsis "Python Sorted Collections")
20055 (description "Sorted Collections is a Python sorted collections library.")
20056 (license license:asl2.0)))
20057
20058 (define-public python-sortedcontainers
20059 (package
20060 (name "python-sortedcontainers")
20061 (version "2.1.0")
20062 (source
20063 (origin
20064 (method url-fetch)
20065 (uri (pypi-uri "sortedcontainers" version))
20066 (sha256
20067 (base32
20068 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
20069 (build-system python-build-system)
20070 (arguments
20071 ;; FIXME: Tests require many extra dependencies, and would introduce
20072 ;; a circular dependency on hypothesis, which uses this package.
20073 '(#:tests? #f))
20074 (propagated-inputs
20075 `(("python-appdirs" ,python-appdirs)
20076 ("python-distlib" ,python-distlib)
20077 ("python-filelock" ,python-filelock)
20078 ("python-six" ,python-six-bootstrap)))
20079 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
20080 (synopsis "Sorted List, Sorted Dict, Sorted Set")
20081 (description
20082 "This package provides a sorted collections library, written in
20083 pure-Python.")
20084 (license license:asl2.0)))
20085
20086 (define-public python2-sortedcontainers
20087 (package-with-python2 python-sortedcontainers))
20088
20089 (define-public python-cloudpickle
20090 (package
20091 (name "python-cloudpickle")
20092 (version "1.3.0")
20093 (source
20094 (origin
20095 (method url-fetch)
20096 (uri (pypi-uri "cloudpickle" version))
20097 (sha256
20098 (base32
20099 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
20100 (build-system python-build-system)
20101 (arguments
20102 '(#:phases (modify-phases %standard-phases
20103 (add-before 'check 'do-not-override-PYTHONPATH
20104 (lambda _
20105 ;; Append to PYTHONPATH instead of overriding it so
20106 ;; that dependencies from Guix can be found.
20107 (substitute* "tests/testutils.py"
20108 (("env\\['PYTHONPATH'\\] = pythonpath")
20109 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
20110 #t))
20111 (replace 'check
20112 (lambda* (#:key tests? #:allow-other-keys)
20113 (if tests?
20114 (invoke "pytest" "-s" "-vv")
20115 (format #t "test suite not run~%"))
20116 #t)))))
20117 (native-inputs
20118 `(;; For tests.
20119 ("python-psutil" ,python-psutil)
20120 ("python-pytest" ,python-pytest)
20121 ("python-tornado" ,python-tornado)))
20122 (home-page "https://github.com/cloudpipe/cloudpickle")
20123 (synopsis "Extended pickling support for Python objects")
20124 (description
20125 "Cloudpickle makes it possible to serialize Python constructs not
20126 supported by the default pickle module from the Python standard library. It
20127 is especially useful for cluster computing where Python expressions are
20128 shipped over the network to execute on remote hosts, possibly close to the
20129 data.")
20130 (properties `((python2-variant . ,(delay python2-cloudpickle))))
20131 (license license:bsd-3)))
20132
20133 (define-public python2-cloudpickle
20134 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
20135 (package/inherit base
20136 (native-inputs
20137 `(("python-mock" ,python2-mock)
20138 ,@(package-native-inputs base)))
20139 (propagated-inputs
20140 `(("python-futures" ,python2-futures)
20141 ,@(package-propagated-inputs base))))))
20142
20143 (define-public python-locket
20144 (package
20145 (name "python-locket")
20146 (version "0.2.0")
20147 (source
20148 (origin
20149 (method url-fetch)
20150 (uri (pypi-uri "locket" version))
20151 (sha256
20152 (base32
20153 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
20154 (build-system python-build-system)
20155 (home-page "https://github.com/mwilliamson/locket.py")
20156 (synopsis "File-based locks for Python")
20157 (description
20158 "Locket implements a lock that can be used by multiple processes provided
20159 they use the same path.")
20160 (license license:bsd-2)))
20161
20162 (define-public python2-locket
20163 (package-with-python2 python-locket))
20164
20165 (define-public python-blosc
20166 (package
20167 (name "python-blosc")
20168 (version "1.5.1")
20169 (source
20170 (origin
20171 (method url-fetch)
20172 (uri (pypi-uri "blosc" version))
20173 (sha256
20174 (base32
20175 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
20176 (build-system python-build-system)
20177 ;; FIXME: all tests pass, but then this error is printed:
20178 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
20179 (arguments '(#:tests? #f))
20180 (propagated-inputs
20181 `(("python-numpy" ,python-numpy)))
20182 (home-page "https://github.com/blosc/python-blosc")
20183 (synopsis "Python wrapper for the Blosc data compressor library")
20184 (description "Blosc is a high performance compressor optimized for binary
20185 data. It has been designed to transmit data to the processor cache faster
20186 than the traditional, non-compressed, direct memory fetch approach via a
20187 @code{memcpy()} system call.
20188
20189 Blosc works well for compressing numerical arrays that contains data with
20190 relatively low entropy, like sparse data, time series, grids with
20191 regular-spaced values, etc.
20192
20193 This Python package wraps the Blosc library.")
20194 (license license:bsd-3)))
20195
20196 (define-public python2-blosc
20197 (package-with-python2 python-blosc))
20198
20199 (define-public python-partd
20200 (package
20201 (name "python-partd")
20202 (version "0.3.9")
20203 (source
20204 (origin
20205 (method url-fetch)
20206 (uri (pypi-uri "partd" version))
20207 (sha256
20208 (base32
20209 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
20210 (build-system python-build-system)
20211 (propagated-inputs
20212 `(("python-blosc" ,python-blosc)
20213 ("python-locket" ,python-locket)
20214 ("python-numpy" ,python-numpy)
20215 ("python-pandas" ,python-pandas)
20216 ("python-pyzmq" ,python-pyzmq)
20217 ("python-toolz" ,python-toolz)))
20218 (home-page "https://github.com/dask/partd/")
20219 (synopsis "Appendable key-value storage")
20220 (description "Partd stores key-value pairs. Values are raw bytes. We
20221 append on old values. Partd excels at shuffling operations.")
20222 (license license:bsd-3)))
20223
20224 (define-public python2-partd
20225 (package-with-python2 python-partd))
20226
20227 (define-public python-fsspec
20228 (package
20229 (name "python-fsspec")
20230 (version "0.6.1")
20231 (source
20232 (origin
20233 (method url-fetch)
20234 (uri (pypi-uri "fsspec" version))
20235 (sha256
20236 (base32
20237 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
20238 (build-system python-build-system)
20239 (arguments '(#:tests? #f)) ; there are none
20240 (home-page "https://github.com/intake/filesystem_spec")
20241 (synopsis "File-system specification")
20242 (description "The purpose of this package is to produce a template or
20243 specification for a file-system interface, that specific implementations
20244 should follow, so that applications making use of them can rely on a common
20245 behavior and not have to worry about the specific internal implementation
20246 decisions with any given backend.")
20247 (license license:bsd-3)))
20248
20249 (define-public python-dask
20250 (package
20251 (name "python-dask")
20252 (version "2.14.0")
20253 (source
20254 (origin
20255 (method url-fetch)
20256 (uri (pypi-uri "dask" version))
20257 (sha256
20258 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
20259 (build-system python-build-system)
20260 (arguments
20261 `(#:phases
20262 (modify-phases %standard-phases
20263 (add-after 'unpack 'disable-broken-tests
20264 (lambda _
20265 ;; This test is marked as xfail when pytest-xdist is used.
20266 (substitute* "dask/tests/test_threaded.py"
20267 (("def test_interrupt\\(\\)" m)
20268 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20269 m)))
20270 ;; This one fails with a type error:
20271 ;; TypeError: Already tz-aware, use tz_convert to convert.
20272 (substitute* "dask/dataframe/tests/test_shuffle.py"
20273 (("def test_set_index_timestamp\\(\\)" m)
20274 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20275 m)))
20276 #t))
20277 (replace 'check
20278 (lambda _ (invoke "pytest" "-vv"))))))
20279 (propagated-inputs
20280 `(("python-cloudpickle" ,python-cloudpickle)
20281 ("python-fsspec" ,python-fsspec)
20282 ("python-numpy" ,python-numpy)
20283 ("python-packaging" ,python-packaging)
20284 ("python-pandas" ,python-pandas)
20285 ("python-partd" ,python-partd)
20286 ("python-toolz" ,python-toolz)
20287 ("python-pyyaml" ,python-pyyaml)))
20288 (native-inputs
20289 `(("python-pytest" ,python-pytest)
20290 ("python-pytest-runner" ,python-pytest-runner)))
20291 (home-page "https://github.com/dask/dask/")
20292 (synopsis "Parallel computing with task scheduling")
20293 (description
20294 "Dask is a flexible parallel computing library for analytics. It
20295 consists of two components: dynamic task scheduling optimized for computation,
20296 and large data collections like parallel arrays, dataframes, and lists that
20297 extend common interfaces like NumPy, Pandas, or Python iterators to
20298 larger-than-memory or distributed environments. These parallel collections
20299 run on top of the dynamic task schedulers. ")
20300 (license license:bsd-3)))
20301
20302 (define-public python-ilinkedlist
20303 (package
20304 (name "python-ilinkedlist")
20305 (version "0.4.0")
20306 (source
20307 (origin
20308 (method url-fetch)
20309 (uri (pypi-uri "ilinkedlist" version))
20310 (sha256
20311 (base32
20312 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
20313 (build-system python-build-system)
20314 (native-inputs `(("python-pytest" ,python-pytest)))
20315 (inputs `(("python" ,python)))
20316 (home-page "https://github.com/luther9/ilinkedlist-py")
20317 (synopsis "Immutable linked list library")
20318 (description
20319 "This is a implementation of immutable linked lists for Python. It
20320 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
20321 Since a linked list is treated as immutable, it is hashable, and its length
20322 can be retrieved in constant time. Some of the terminology is inspired by
20323 LISP. It is possible to create an improper list by creating a @code{Pair}
20324 with a non-list @code{cdr}.")
20325 (license license:gpl3+)))
20326
20327 (define-public python-readlike
20328 (package
20329 (name "python-readlike")
20330 (version "0.1.3")
20331 (source
20332 (origin
20333 (method url-fetch)
20334 (uri (pypi-uri "readlike" version))
20335 (sha256
20336 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
20337 (build-system python-build-system)
20338 (home-page "https://github.com/jangler/readlike")
20339 (synopsis "GNU Readline-like line editing module")
20340 (description
20341 "This Python module provides line editing functions similar to the default
20342 Emacs-style ones of GNU Readline. Unlike the Python standard library's
20343 @code{readline} package, this one allows access to those capabilities in settings
20344 outside of a standard command-line interface. It is especially well-suited to
20345 interfacing with Urwid, due to a shared syntax for describing key inputs.
20346
20347 Currently, all stateless Readline commands are implemented. Yanking and history
20348 are not supported.")
20349 (license license:expat)))
20350
20351 (define-public python2-readlike
20352 (package-with-python2 python-readlike))
20353
20354 (define-public python-reparser
20355 (package
20356 (name "python-reparser")
20357 (version "1.4.3")
20358 (source
20359 (origin
20360 (method url-fetch)
20361 (uri (pypi-uri "ReParser" version))
20362 (sha256
20363 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
20364 (build-system python-build-system)
20365 (home-page "https://github.com/xmikos/reparser")
20366 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
20367 (description
20368 "This Python library provides a simple lexer/parser for inline markup based
20369 on regular expressions.")
20370 (license license:expat)))
20371
20372 (define-public python2-reparser
20373 (let ((reparser (package-with-python2
20374 (strip-python2-variant python-reparser))))
20375 (package/inherit reparser
20376 (propagated-inputs
20377 `(("python2-enum34" ,python2-enum34)
20378 ,@(package-propagated-inputs reparser))))))
20379
20380 (define-public python-retrying
20381 (package
20382 (name "python-retrying")
20383 (version "1.3.3")
20384 (source
20385 (origin
20386 (method git-fetch)
20387 (uri (git-reference
20388 (url "https://github.com/rholder/retrying")
20389 (commit (string-append "v" version))))
20390 (file-name (git-file-name name version))
20391 (sha256
20392 (base32
20393 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
20394 (build-system python-build-system)
20395 (propagated-inputs
20396 `(("python-six" ,python-six)))
20397 (home-page "https://github.com/rholder/retrying")
20398 (synopsis "Library for adding retry behavior")
20399 (description "Retrying is a general-purpose retrying library to simplify
20400 the task of adding retry behavior to just about anything.
20401
20402 Features:
20403
20404 @itemize
20405 @item Generic Decorator API.
20406 @item Specify stop condition (i.e. limit by number of attempts).
20407 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
20408 @item Customize retrying on Exceptions.
20409 @item Customize retrying on expected returned result.
20410 @end itemize")
20411 (license license:asl2.0)))
20412
20413 (define-public python-pre-commit
20414 (package
20415 (name "python-pre-commit")
20416 (version "2.10.0")
20417 (source
20418 (origin
20419 (method url-fetch)
20420 (uri (pypi-uri "pre_commit" version))
20421 (sha256
20422 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
20423 (build-system python-build-system)
20424 (arguments
20425 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
20426 ;; attribute 'empty_template_setup'".
20427 `(#:tests? #false))
20428 (propagated-inputs
20429 `(("python-cfgv" ,python-cfgv)
20430 ("python-identify" ,python-identify)
20431 ("python-importlib-metadata" ,python-importlib-metadata)
20432 ("python-importlib-resources" ,python-importlib-resources)
20433 ("python-nodeenv" ,python-nodeenv)
20434 ("python-pyyaml" ,python-pyyaml)
20435 ("python-toml" ,python-toml)
20436 ("python-virtualenv" ,python-virtualenv)))
20437 (home-page "https://github.com/pre-commit/pre-commit")
20438 (synopsis "Framework for managing multi-language pre-commit hooks")
20439 (description
20440 "This package provides a framework for managing and maintaining
20441 multi-language pre-commit hooks.")
20442 (license license:expat)))
20443
20444 (define-public python-precis-i18n
20445 (package
20446 (name "python-precis-i18n")
20447 (version "1.0.0")
20448 (source
20449 (origin
20450 (method url-fetch)
20451 (uri (pypi-uri "precis_i18n" version))
20452 (sha256
20453 (base32
20454 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
20455 (build-system python-build-system)
20456 (home-page "https://github.com/byllyfish/precis_i18n")
20457 (synopsis "Implementation of the PRECIS framework")
20458 (description
20459 "This module implements the PRECIS Framework as described in RFC 8264,
20460 RFC 8265 and RFC 8266.")
20461 (license license:expat)))
20462
20463 (define-public python-absl-py
20464 (package
20465 (name "python-absl-py")
20466 (version "0.6.1")
20467 (source
20468 (origin
20469 (method url-fetch)
20470 (uri (pypi-uri "absl-py" version))
20471 (sha256
20472 (base32
20473 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
20474 (build-system python-build-system)
20475 (propagated-inputs
20476 `(("python-six" ,python-six)))
20477 (home-page "https://github.com/abseil/abseil-py")
20478 (synopsis "Abseil Python common libraries")
20479 (description
20480 "This package provides the Abseil Python Common Libraries, a collection
20481 of Python libraries for building Python applications.")
20482 (license license:asl2.0)))
20483
20484 (define-public python-astor
20485 (package
20486 (name "python-astor")
20487 (version "0.7.1")
20488 (source
20489 (origin
20490 (method url-fetch)
20491 (uri (pypi-uri "astor" version))
20492 (sha256
20493 (base32
20494 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
20495 (build-system python-build-system)
20496 ;; FIXME: There are two errors and two test failures.
20497 (arguments `(#:tests? #f))
20498 (home-page "https://github.com/berkerpeksag/astor")
20499 (synopsis "Read and write Python ASTs")
20500 (description "Astor is designed to allow easy manipulation of Python
20501 source via the Abstract Syntax Tree.")
20502 (license license:bsd-3)))
20503
20504 (define-public python2-astor
20505 (package-with-python2 python-astor))
20506
20507 (define-public python-astunparse
20508 (package
20509 (name "python-astunparse")
20510 (version "1.6.2")
20511 (source
20512 (origin
20513 (method url-fetch)
20514 (uri (pypi-uri "astunparse" version))
20515 (sha256
20516 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
20517 (build-system python-build-system)
20518 (arguments '(#:tests? #f)) ; there are none
20519 (propagated-inputs
20520 `(("python-six" ,python-six)
20521 ("python-wheel" ,python-wheel)))
20522 (home-page "https://github.com/simonpercivall/astunparse")
20523 (synopsis "AST unparser for Python")
20524 (description "This package provides an AST unparser for Python. It is a
20525 factored out version of @code{unparse} found in the Python source
20526 distribution.")
20527 (license license:bsd-3)))
20528
20529 (define-public python-gast
20530 (package
20531 (name "python-gast")
20532 (version "0.3.3")
20533 (source
20534 (origin
20535 (method url-fetch)
20536 (uri (pypi-uri "gast" version))
20537 (sha256
20538 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
20539 (build-system python-build-system)
20540 (propagated-inputs
20541 `(("python-astunparse" ,python-astunparse)))
20542 (home-page "https://pypi.org/project/gast/")
20543 (synopsis "Generic Python AST that abstracts the underlying Python version")
20544 (description
20545 "GAST provides a compatibility layer between the AST of various Python
20546 versions, as produced by @code{ast.parse} from the standard @code{ast}
20547 module.")
20548 (license license:bsd-3)))
20549
20550 (define-public python-wikidata
20551 (package
20552 (name "python-wikidata")
20553 (version "0.6.1")
20554 (source
20555 (origin
20556 (method url-fetch)
20557 (uri (pypi-uri "Wikidata" version))
20558 (sha256
20559 (base32
20560 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
20561 (build-system python-build-system)
20562 (propagated-inputs
20563 `(("python-babel" ,python-babel)))
20564 (home-page "https://github.com/dahlia/wikidata")
20565 (synopsis "Wikidata client library")
20566 (description
20567 "This package provides a Python interface to
20568 @url{https://www.wikidata.org/, Wikidata}.")
20569 (properties '((upstream-name . "Wikidata")))
20570 (license license:gpl3+)))
20571
20572 (define-public python-doctest-ignore-unicode
20573 (package
20574 (name "python-doctest-ignore-unicode")
20575 (version "0.1.2")
20576 (source
20577 (origin
20578 (method url-fetch)
20579 (uri (pypi-uri "doctest-ignore-unicode" version))
20580 (sha256
20581 (base32
20582 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
20583 (build-system python-build-system)
20584 (native-inputs
20585 `(("python-nose" ,python-nose)))
20586 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
20587 (synopsis "Ignore Unicode literal prefixes in doctests")
20588 (description
20589 "This package adds support for a flag to ignore Unicode literal prefixes
20590 in doctests.")
20591 (license license:asl2.0)))
20592
20593 (define-public python-attr
20594 (package
20595 (name "python-attr")
20596 (version "0.3.1")
20597 (source
20598 (origin
20599 (method url-fetch)
20600 (uri (pypi-uri "attr" version))
20601 (sha256
20602 (base32
20603 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
20604 (build-system python-build-system)
20605 (home-page "https://github.com/denis-ryzhkov/attr")
20606 (synopsis "Decorator for attributes of target function or class")
20607 (description "Simple decorator to set attributes of target function or
20608 class in a @acronym{DRY, Don't Repeat Yourself} way.")
20609 (license license:expat)))
20610
20611 (define-public python-construct
20612 (package
20613 (name "python-construct")
20614 (version "2.10.56")
20615 (source
20616 (origin
20617 (method url-fetch)
20618 (uri (pypi-uri "construct" version))
20619 (sha256
20620 (base32
20621 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
20622 (build-system python-build-system)
20623 (arguments
20624 `(#:tests? #f)) ; No tests exist.
20625 (propagated-inputs
20626 `(("python-extras" ,python-extras)
20627 ("python-arrow" ,python-arrow)
20628 ("python-numpy" ,python-numpy)
20629 ("python-ruamel.yaml" ,python-ruamel.yaml)))
20630 (home-page "https://construct.readthedocs.io")
20631 (synopsis "Declarative and symmetrical parser and builder for binary data")
20632 (description
20633 "This package provides both simple, atomic constructs (such as
20634 integers of various sizes), as well as composite ones which allow you
20635 form hierarchical and sequential structures of increasing complexity.
20636 It features bit and byte granularity, easy debugging and testing, an
20637 easy-to-extend subclass system, and lots of primitive constructs to
20638 make your work easier.")
20639 (license license:expat)))
20640
20641 (define-public python-outcome
20642 (package
20643 (name "python-outcome")
20644 (version "1.0.1")
20645 (source
20646 (origin
20647 (method url-fetch)
20648 (uri (pypi-uri "outcome" version))
20649 (sha256
20650 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
20651 (build-system python-build-system)
20652 (arguments
20653 `(#:phases
20654 (modify-phases %standard-phases
20655 (replace 'check
20656 (lambda* (#:key inputs outputs #:allow-other-keys)
20657 (add-installed-pythonpath inputs outputs)
20658 (invoke "pytest" "-vv"))))))
20659 (native-inputs
20660 `(("python-pytest" ,python-pytest)
20661 ("python-pytest-cov" ,python-pytest-cov)
20662 ("python-pytest-asyncio" ,python-pytest-asyncio)))
20663 (propagated-inputs
20664 `(("python-async-generator" ,python-async-generator)
20665 ("python-attrs" ,python-attrs)))
20666 (home-page "https://github.com/python-trio/outcome")
20667 (synopsis "Capture the outcome of Python function calls")
20668 (description
20669 "Capture the outcome of Python function calls. Extracted from the Trio
20670 project.")
20671 ;; Either license applies.
20672 (license (list license:expat license:asl2.0))))
20673
20674 (define-public python-trio
20675 (package
20676 (name "python-trio")
20677 (version "0.17.0")
20678 (source
20679 (origin
20680 (method url-fetch)
20681 (uri (pypi-uri "trio" version))
20682 (sha256
20683 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
20684 (build-system python-build-system)
20685 (arguments
20686 `(#:phases
20687 (modify-phases %standard-phases
20688 (add-before 'check 'change-home
20689 (lambda _
20690 ;; Tests require a writable home.
20691 (setenv "HOME" "/tmp")
20692 #t))
20693 (replace 'check
20694 (lambda _
20695 (invoke "pytest" "-vv" "-k"
20696 (string-append
20697 ;; This test times out.
20698 "not test_ki_protection_works"
20699 ;; Assertion errors.
20700 " and not test_guest_mode_ki"
20701 " and not test_run_in_trio_thread_ki"
20702 ;; These try to raise KeyboardInterrupt which does not work
20703 ;; in the build environment.
20704 " and not test_ki_self"
20705 " and not test_ki_wakes_us_up"
20706 ;; Failure in name resolution.
20707 " and not test_getnameinfo"
20708 " and not test_SocketType_resolve"
20709 ;; OSError: protocol not found.
20710 " and not test_getprotobyname")))))))
20711 (native-inputs
20712 `(("python-astor" ,python-astor)
20713 ("python-ipython" ,python-ipython)
20714 ("python-jedi" ,python-jedi)
20715 ("python-pylint" ,python-pylint)
20716 ("python-pyopenssl" ,python-pyopenssl)
20717 ("python-pytest" ,python-pytest)
20718 ("python-pytest-cov" ,python-pytest-cov)
20719 ("python-trustme" ,python-trustme)))
20720 (propagated-inputs
20721 `(("python-attrs" ,python-attrs)
20722 ("python-idna" ,python-idna)
20723 ("python-outcome" ,python-outcome)
20724 ("python-sniffio" ,python-sniffio)
20725 ("python-sortedcontainers"
20726 ,python-sortedcontainers)))
20727 (home-page "https://github.com/python-trio/trio")
20728 (synopsis "Friendly Python library for async concurrency and I/O")
20729 (description
20730 "Trio strives to be a production-quality, async/await-native I/O library
20731 for Python. Like all async libraries, its main purpose is to help you write
20732 programs that do multiple things at the same time with parallelized I/O.")
20733 ;; Either license applies.
20734 (license (list license:expat license:asl2.0))))
20735
20736 (define-public python-trio-typing
20737 (package
20738 (name "python-trio-typing")
20739 (version "0.5.0")
20740 (source
20741 (origin
20742 (method url-fetch)
20743 (uri (pypi-uri "trio-typing" version))
20744 (sha256
20745 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
20746 (build-system python-build-system)
20747 (arguments
20748 `(#:phases
20749 (modify-phases %standard-phases
20750 (replace 'check
20751 (lambda _
20752 (invoke "pytest" "-vv"))))))
20753 (native-inputs
20754 `(("python-attrs" ,python-attrs)
20755 ("python-pytest" ,python-pytest)))
20756 (propagated-inputs
20757 `(("python-mypy" ,python-mypy)
20758 ("python-mypy-extensions"
20759 ,python-mypy-extensions)
20760 ("python-trio" ,python-trio)
20761 ("python-typing-extensions"
20762 ,python-typing-extensions)))
20763 (home-page "https://github.com/python-trio/trio-typing")
20764 (synopsis "Static type checking support for Trio and related projects")
20765 (description
20766 "This package provides:
20767
20768 @itemize
20769 @item PEP 561 typing stubs packages for the Trio project packages:
20770
20771 @itemize
20772 @item trio (@code{trio-stubs})
20773 @item outcome (@code{outcome-stubs})
20774 @item async_generator (@code{async_generator-stubs})
20775 @end itemize
20776
20777 @item A package @code{trio_typing} containing types that Trio programs often
20778 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20779 a mypy plugin that smooths over some limitations in the basic type hints.
20780 @end itemize")
20781 ;; Either license applies.
20782 (license (list license:expat license:asl2.0))))
20783
20784 (define-public python-humanize
20785 (package
20786 (name "python-humanize")
20787 (version "0.5.1")
20788 (source
20789 (origin
20790 (method url-fetch)
20791 (uri (pypi-uri "humanize" version))
20792 (sha256
20793 (base32
20794 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20795 (arguments
20796 '(#:tests? #f)) ; tests not in pypi archive
20797 (build-system python-build-system)
20798 (home-page "https://github.com/jmoiron/humanize")
20799 (synopsis "Print numerical information in a human-readable form")
20800 (description "This package provides a Python module that displays numbers
20801 and dates in \"human readable\" forms. For example, it would display
20802 \"12345591313\" as \"12.3 billion\".")
20803 (license license:expat)))
20804
20805 (define-public python-txaio
20806 (package
20807 (name "python-txaio")
20808 (version "18.8.1")
20809 (source
20810 (origin
20811 (method url-fetch)
20812 (uri (pypi-uri "txaio" version))
20813 (sha256
20814 (base32
20815 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20816 (build-system python-build-system)
20817 (propagated-inputs
20818 `(("python-twisted" ,python-twisted)
20819 ("python-six" ,python-six)))
20820 (home-page "https://github.com/crossbario/txaio")
20821 (synopsis "Compatibility layer between Python asyncio and Twisted")
20822 (description "Txaio provides a compatibility layer between the Python
20823 @code{asyncio} module and @code{Twisted}.")
20824 (license license:expat)))
20825
20826 (define-public python-toolshed
20827 (package
20828 (name "python-toolshed")
20829 (version "0.4.6")
20830 (source
20831 (origin
20832 (method url-fetch)
20833 (uri (pypi-uri "toolshed" version))
20834 (sha256
20835 (base32
20836 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20837 (build-system python-build-system)
20838 (native-inputs
20839 `(("python-nose" ,python-nose)))
20840 (home-page "https://github.com/brentp/toolshed/")
20841 (synopsis "Collection of modules and functions for working with data")
20842 (description "This is a collection of well-tested, simple modules and
20843 functions that aim to reduce boilerplate when working with data.")
20844 (license license:bsd-2)))
20845
20846 (define-public python-annoy
20847 (package
20848 (name "python-annoy")
20849 (version "1.15.1")
20850 (source
20851 (origin
20852 (method url-fetch)
20853 (uri (pypi-uri "annoy" version))
20854 (sha256
20855 (base32
20856 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20857 (build-system python-build-system)
20858 (native-inputs
20859 `(("python-nose" ,python-nose)))
20860 (home-page "https://github.com/spotify/annoy/")
20861 (synopsis "Approximate nearest neighbors library")
20862 (description
20863 "Annoy is a C++ library with Python bindings to search for points in
20864 space that are close to a given query point. It also creates large read-only
20865 file-based data structures that are @code{mmap}ped into memory so that many
20866 processes may share the same data.")
20867 (license license:asl2.0)))
20868
20869 (define-public python-croniter
20870 (package
20871 (name "python-croniter")
20872 (version "0.3.34")
20873 (source (origin
20874 (method url-fetch)
20875 (uri (pypi-uri "croniter" version))
20876 (sha256
20877 (base32
20878 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20879 (build-system python-build-system)
20880 (propagated-inputs
20881 `(("python-dateutil" ,python-dateutil)
20882 ("python-natsort" ,python-natsort)))
20883 (home-page "https://github.com/kiorky/croniter")
20884 (synopsis "Iterate datetime objects with cron-like syntax")
20885 (description
20886 "@code{croniter} provides iteration for datetime object with cron-like
20887 format.")
20888 (license license:expat)))
20889
20890 (define-public python-pylzma
20891 (package
20892 (name "python-pylzma")
20893 (version "0.5.0")
20894 (source
20895 (origin
20896 (method url-fetch)
20897 (uri (pypi-uri "pylzma" version))
20898 (sha256
20899 (base32
20900 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
20901 (build-system python-build-system)
20902 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
20903 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
20904 (description "This package provides Python bindings for the LZMA library
20905 by Igor Pavlov.")
20906 (license license:lgpl2.1+)))
20907
20908 (define-public python2-pylzma
20909 (package-with-python2 python-pylzma))
20910
20911 (define-public python2-zeroconf
20912 (package
20913 (name "python2-zeroconf")
20914
20915 ;; This is the last version that supports Python 2.x.
20916 (version "0.19.1")
20917 (source
20918 (origin
20919 (method url-fetch)
20920 (uri (pypi-uri "zeroconf" version))
20921 (sha256
20922 (base32
20923 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
20924 (build-system python-build-system)
20925 (arguments
20926 `(#:python ,python-2
20927 #:phases
20928 (modify-phases %standard-phases
20929 (add-after 'unpack 'patch-requires
20930 (lambda* (#:key inputs #:allow-other-keys)
20931 (substitute* "setup.py"
20932 (("enum-compat")
20933 "enum34"))
20934 #t)))))
20935 (native-inputs
20936 `(("python2-six" ,python2-six)
20937 ("python2-enum32" ,python2-enum34)
20938 ("python2-netifaces" ,python2-netifaces)
20939 ("python2-typing" ,python2-typing)))
20940 (home-page "https://github.com/jstasiak/python-zeroconf")
20941 (synopsis "Pure Python mDNS service discovery")
20942 (description
20943 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
20944 compatible).")
20945 (license license:lgpl2.1+)))
20946
20947 (define-public python-bsddb3
20948 (package
20949 (name "python-bsddb3")
20950 (version "6.2.6")
20951 (source
20952 (origin
20953 (method url-fetch)
20954 (uri (pypi-uri "bsddb3" version))
20955 (sha256
20956 (base32
20957 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
20958 (build-system python-build-system)
20959 (inputs
20960 `(("bdb" ,bdb)))
20961 (arguments
20962 '(#:phases
20963 (modify-phases %standard-phases
20964 (add-after 'unpack 'configure-locations
20965 (lambda* (#:key inputs #:allow-other-keys)
20966 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
20967 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
20968 #t))
20969 (replace 'check
20970 (lambda _
20971 (invoke "python3" "test3.py" "-v"))))))
20972 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
20973 (synopsis "Python bindings for Oracle Berkeley DB")
20974 (description
20975 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
20976 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
20977 Transaction objects, and each of these is exposed as a Python type in the
20978 bsddb3.db module. The database objects can use various access methods: btree,
20979 hash, recno, and queue. Complete support of Berkeley DB distributed
20980 transactions. Complete support for Berkeley DB Replication Manager.
20981 Complete support for Berkeley DB Base Replication. Support for RPC.")
20982 (license license:bsd-3)))
20983
20984 (define-public python-dbfread
20985 (package
20986 (name "python-dbfread")
20987 (version "2.0.7")
20988 (source (origin
20989 (method url-fetch)
20990 (uri (pypi-uri "dbfread" version))
20991 (sha256
20992 (base32
20993 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
20994 (build-system python-build-system)
20995 (native-inputs
20996 `(("python-pytest" ,python-pytest)))
20997 (home-page "https://dbfread.readthedocs.io")
20998 (synopsis "Read DBF Files with Python")
20999 (description
21000 "This library reads DBF files and returns the data as native Python data
21001 types for further processing. It is primarily intended for batch jobs and
21002 one-off scripts.")
21003 (license license:expat)))
21004
21005 (define-public python-cached-property
21006 (package
21007 (name "python-cached-property")
21008 (version "1.5.1")
21009 (source
21010 (origin
21011 (method url-fetch)
21012 (uri (pypi-uri "cached-property" version))
21013 (sha256
21014 (base32
21015 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
21016 (build-system python-build-system)
21017 (arguments
21018 `(#:phases
21019 (modify-phases %standard-phases
21020 ;; https://github.com/pydanny/cached-property/issues/131
21021 ;; recent versions of freezegun break one test
21022 (add-after 'unpack 'disable-broken-test
21023 (lambda _
21024 (substitute* "tests/test_cached_property.py"
21025 (("def test_threads_ttl_expiry\\(self\\)" m)
21026 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
21027 " " m)))
21028 #t)))))
21029 (native-inputs
21030 `(("python-freezegun" ,python-freezegun)))
21031 (home-page
21032 "https://github.com/pydanny/cached-property")
21033 (synopsis
21034 "Decorator for caching properties in classes")
21035 (description
21036 "This package provides a decorator which makes caching
21037 time-or-computationally-expensive properties quick and easy and works in Python
21038 2 or 3.")
21039 (license license:bsd-3)))
21040
21041 (define-public python-folium
21042 (package
21043 (name "python-folium")
21044 (version "0.12.1")
21045 (source
21046 (origin
21047 ;; PyPI has a ".whl" file but not a proper source release.
21048 ;; Thus, fetch code from Git.
21049 (method git-fetch)
21050 (uri (git-reference
21051 (url "https://github.com/python-visualization/folium")
21052 (commit (string-append "v" version))))
21053 (file-name (git-file-name name version))
21054 (sha256
21055 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
21056 (build-system python-build-system)
21057 (propagated-inputs
21058 `(("python-branca" ,python-branca)
21059 ("python-jinja2" ,python-jinja2)
21060 ("python-numpy" ,python-numpy)
21061 ("python-requests" ,python-requests)))
21062 (native-inputs
21063 `(("python-pytest" ,python-pytest)))
21064 (home-page "https://github.com/python-visualization/folium")
21065 (synopsis "Make beautiful maps with Leaflet.js & Python")
21066 (description "@code{folium} makes it easy to visualize data that’s been
21067 manipulated in Python on an interactive leaflet map. It enables both the
21068 binding of data to a map for @code{choropleth} visualizations as well as
21069 passing rich vector/raster/HTML visualizations as markers on the map.
21070
21071 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
21072 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
21073 supports Image, Video, GeoJSON and TopoJSON overlays.")
21074 (license license:expat)))
21075
21076 (define-public jube
21077 (package
21078 ;; This is a command-line tool, so no "python-" prefix.
21079 (name "jube")
21080 (version "2.2.2")
21081 (source (origin
21082 (method url-fetch)
21083 (uri (string-append
21084 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
21085 version))
21086 (sha256
21087 (base32
21088 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
21089 (file-name (string-append "jube-" version ".tar.gz"))))
21090 (build-system python-build-system)
21091 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
21092 (synopsis "Benchmarking environment")
21093 (description
21094 "JUBE helps perform and analyze benchmarks in a systematic way. For each
21095 benchmarked application, benchmark data is stored in a format that allows JUBE
21096 to deduct the desired information. This data can be parsed by automatic pre-
21097 and post-processing scripts that draw information and store it more densely
21098 for manual interpretation.")
21099 (license license:gpl3+)))
21100
21101 (define-public python-pyroutelib3
21102 (package
21103 (name "python-pyroutelib3")
21104 (version "1.3.post1")
21105 (source
21106 (origin
21107 (method url-fetch)
21108 (uri (pypi-uri "pyroutelib3" version))
21109 (sha256
21110 (base32
21111 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
21112 (build-system python-build-system)
21113 (propagated-inputs
21114 `(("python-dateutil" ,python-dateutil)))
21115 (home-page "https://github.com/MKuranowski/pyroutelib3")
21116 (synopsis "Library for simple routing on OSM data")
21117 (description "Library for simple routing on OSM data")
21118 (license license:gpl3+)))
21119
21120 (define-public python-bibtexparser
21121 (package
21122 (name "python-bibtexparser")
21123 (version "1.1.0")
21124 (source
21125 (origin
21126 (method url-fetch)
21127 (uri (pypi-uri "bibtexparser" version))
21128 (sha256
21129 (base32
21130 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
21131 (build-system python-build-system)
21132 (propagated-inputs
21133 `(("python-pyparsing" ,python-pyparsing)))
21134 (native-inputs
21135 `(("python-future" ,python-future)))
21136 (home-page "https://github.com/sciunto-org/python-bibtexparser")
21137 (synopsis "Python library to parse BibTeX files")
21138 (description "BibtexParser is a Python library to parse BibTeX files.")
21139 (license (list license:bsd-3 license:lgpl3))))
21140
21141 (define-public python-distro
21142 (package
21143 (name "python-distro")
21144 (version "1.4.0")
21145 (source
21146 (origin
21147 (method url-fetch)
21148 (uri (pypi-uri "distro" version))
21149 (sha256
21150 (base32
21151 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
21152 (build-system python-build-system)
21153 (native-inputs
21154 `(("python-pytest" ,python-pytest)))
21155 (home-page "https://github.com/nir0s/distro")
21156 (synopsis
21157 "OS platform information API")
21158 (description
21159 "@code{distro} provides information about the OS distribution it runs on,
21160 such as a reliable machine-readable ID, or version information.
21161
21162 It is the recommended replacement for Python's original
21163 `platform.linux_distribution` function (which will be removed in Python 3.8).
21164 @code{distro} also provides a command-line interface to output the platform
21165 information in various formats.")
21166 (license license:asl2.0)))
21167
21168 (define-public python-cairosvg
21169 (package
21170 (name "python-cairosvg")
21171 (version "2.5.0")
21172 (source
21173 (origin
21174 (method url-fetch)
21175 (uri (pypi-uri "CairoSVG" version))
21176 (sha256
21177 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
21178 (build-system python-build-system)
21179 (arguments
21180 `(#:phases
21181 (modify-phases %standard-phases
21182 (replace 'check
21183 (lambda _ (invoke "pytest"))))))
21184 (propagated-inputs
21185 `(("python-cairocffi" ,python-cairocffi)
21186 ("python-cssselect2" ,python-cssselect2)
21187 ("python-defusedxml" ,python-defusedxml)
21188 ("python-pillow" ,python-pillow)
21189 ("python-tinycss2" ,python-tinycss2)))
21190 (native-inputs
21191 `(("python-pytest-flake8" ,python-pytest-flake8)
21192 ("python-pytest-isort" ,python-pytest-isort)
21193 ("python-pytest-runner" ,python-pytest-runner)))
21194 (home-page "https://cairosvg.org/")
21195 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
21196 (description "CairoSVG is a SVG converter based on Cairo. It can export
21197 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
21198 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
21199 parsed, the result is drawn to a Cairo surface that can be exported to
21200 qvarious formats: PDF, PostScript, PNG and even SVG.")
21201 (license license:lgpl3+)))
21202
21203 (define-public python-pyphen
21204 (package
21205 (name "python-pyphen")
21206 (version "0.10.0")
21207 (source
21208 (origin
21209 (method url-fetch)
21210 (uri (pypi-uri "Pyphen" version))
21211 (sha256
21212 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
21213 (build-system python-build-system)
21214 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
21215 ;; embedded set provided by upstream - like Debian does.
21216 (home-page "https://github.com/Kozea/Pyphen")
21217 (synopsis "Pure Python module to hyphenate text")
21218 (description "Pyphen is a pure Python module to hyphenate text using
21219 existing Hunspell hyphenation dictionaries.")
21220 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
21221
21222 (define-public python-intelhex
21223 (package
21224 (name "python-intelhex")
21225 (version "2.2.1")
21226 (source
21227 (origin
21228 (method url-fetch)
21229 (uri (pypi-uri "intelhex" version))
21230 (sha256
21231 (base32
21232 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
21233 (build-system python-build-system)
21234 (arguments '(#:tests? #f)) ;issue with version
21235 (home-page "https://pypi.org/project/IntelHex/")
21236 (synopsis "Python library for Intel HEX files manipulations")
21237 (description "The Intel HEX file format is widely used in microprocessors
21238 and microcontrollers area (embedded systems etc.) as the de facto standard for
21239 representation of code to be programmed into microelectronic devices. This
21240 package provides an intelhex Python library to read, write, create from
21241 scratch and manipulate data from Intel HEX file format. It also includes
21242 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
21243 converters and more, those based on the library itself.")
21244 (license license:bsd-3)))
21245
21246 (define-public python-pykwalify
21247 (package
21248 (name "python-pykwalify")
21249 (version "1.7.0")
21250 (source
21251 (origin
21252 (method url-fetch)
21253 (uri (pypi-uri "pykwalify" version))
21254 (sha256
21255 (base32
21256 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
21257 (build-system python-build-system)
21258 (arguments '(#:tests? #f)) ;missing dependencies
21259 (propagated-inputs
21260 `(("python-dateutil" ,python-dateutil)
21261 ("python-docopt" ,python-docopt)
21262 ("python-pyyaml" ,python-pyyaml)))
21263 (home-page "https://github.com/grokzen/pykwalify")
21264 (synopsis
21265 "Python lib/cli for JSON/YAML schema validation")
21266 (description
21267 "This package provides a parser, schema validator, and data binding tool
21268 for YAML and JSON.")
21269 (license license:expat)))
21270
21271 (define-public python-dbusmock
21272 (package
21273 (name "python-dbusmock")
21274 (version "0.18.3")
21275 (source
21276 (origin
21277 (method url-fetch)
21278 (uri (pypi-uri "python-dbusmock" version))
21279 (sha256
21280 (base32
21281 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
21282 (build-system python-build-system)
21283 (arguments
21284 '(#:phases
21285 (modify-phases %standard-phases
21286 (add-after 'unpack 'patch-shell-path
21287 (lambda _
21288 (substitute* "tests/test_code.py"
21289 (("/bin/bash") (which "bash")))
21290 #t)))))
21291 (native-inputs
21292 `(;; For tests.
21293 ("dbus" ,dbus) ; for dbus-daemon
21294 ("python-nose" ,python-nose)
21295 ("which" ,which)))
21296 (propagated-inputs
21297 `(("python-dbus" ,python-dbus)
21298 ("python-pygobject" ,python-pygobject)))
21299 (home-page "https://github.com/martinpitt/python-dbusmock")
21300 (synopsis "Python library for mock D-Bus objects")
21301 (description "python-dbusmock allows for the easy creation of mock objects on
21302 D-Bus. This is useful for writing tests for software which talks to D-Bus
21303 services such as upower, systemd, logind, gnome-session or others, and it is
21304 hard (or impossible without root privileges) to set the state of the real
21305 services to what you expect in your tests.")
21306 (license license:lgpl3+)))
21307
21308 (define-public python-jsonplus
21309 (package
21310 (name "python-jsonplus")
21311 (version "0.8.0")
21312 (home-page "https://github.com/randomir/jsonplus")
21313 (source (origin
21314 (method url-fetch)
21315 (uri (pypi-uri "jsonplus" version))
21316 (sha256
21317 (base32
21318 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
21319 (build-system python-build-system)
21320 ;; XXX: No tests on PyPI, and the repository has no tags.
21321 (arguments '(#:tests? #f))
21322 (propagated-inputs
21323 `(("python-dateutil" ,python-dateutil)
21324 ("python-simplejson" ,python-simplejson)
21325 ("python-sortedcontainers" ,python-sortedcontainers)))
21326 (synopsis "Serialize Python types to/from JSON")
21327 (description
21328 "This package provides functionality to serialize arbitrary data types
21329 to and from JSON. Common data types are implemented and it is easy to
21330 register custom encoders and decoders.")
21331 (license license:expat)))
21332
21333 (define-public python-ujson
21334 (package
21335 (name "python-ujson")
21336 (version "4.0.2")
21337 (source
21338 (origin
21339 (method url-fetch)
21340 (uri (pypi-uri "ujson" version))
21341 (sha256
21342 (base32
21343 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
21344 (modules '((guix build utils)))
21345 (snippet
21346 '(begin (delete-file-recursively "deps") #t))))
21347 (build-system python-build-system)
21348 (arguments
21349 `(#:phases
21350 (modify-phases %standard-phases
21351 (add-after 'unpack 'link-to-system-double-conversion
21352 (lambda* (#:key inputs #:allow-other-keys)
21353 (let ((d-c (assoc-ref inputs "double-conversion")))
21354 (substitute* "setup.py"
21355 (("./deps/double-conversion/double-conversion\"")
21356 (string-append d-c "/include/double-conversion\""))
21357 (("-lstdc++" stdc)
21358 (string-append "-L" d-c "/lib\","
21359 " \"-ldouble-conversion\","
21360 " \"" stdc)))
21361 #t)))
21362 (replace 'check
21363 (lambda* (#:key inputs outputs #:allow-other-keys)
21364 (add-installed-pythonpath inputs outputs)
21365 (invoke "pytest"))))))
21366 (native-inputs
21367 `(("double-conversion" ,double-conversion)
21368 ("python-setuptools-scm" ,python-setuptools-scm)
21369 ("python-pytest" ,python-pytest)))
21370 (home-page "https://github.com/ultrajson/ultrajson")
21371 (synopsis "Ultra fast JSON encoder and decoder for Python")
21372 (description
21373 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
21374 bindings for Python 3.")
21375 (license license:bsd-3)))
21376
21377 (define-public python-iocapture
21378 ;; The latest release is more than a year older than this commit.
21379 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
21380 (revision "1"))
21381 (package
21382 (name "python-iocapture")
21383 (version "0.1.2")
21384 (source
21385 (origin
21386 (method git-fetch)
21387 (uri (git-reference
21388 (url "https://github.com/oinume/iocapture")
21389 (commit commit)))
21390 (file-name (git-file-name name version))
21391 (sha256
21392 (base32
21393 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
21394 (build-system python-build-system)
21395 (arguments
21396 `(#:phases
21397 (modify-phases %standard-phases
21398 (delete 'check)
21399 (add-after 'install 'check
21400 (lambda* (#:key inputs outputs #:allow-other-keys)
21401 (add-installed-pythonpath inputs outputs)
21402 (invoke "py.test" "-v" "tests")
21403 #t)))))
21404 (propagated-inputs
21405 `(("python-flexmock" ,python-flexmock)
21406 ("python-pytest" ,python-pytest)
21407 ("python-pytest-cov" ,python-pytest-cov)
21408 ("python-six" ,python-six)))
21409 (home-page "https://github.com/oinume/iocapture")
21410 (synopsis "Python capturing tool for stdout and stderr")
21411 (description
21412 "This package helps you to capture the standard out (stdout) and the
21413 standard error channel (stderr) in your program.")
21414 (license license:expat))))
21415
21416 (define-public python-argh
21417 ;; There are 21 commits since the latest release containing important
21418 ;; improvements.
21419 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
21420 (revision "1"))
21421 (package
21422 (name "python-argh")
21423 (version (git-version "0.26.2" revision commit))
21424 (source
21425 (origin
21426 (method git-fetch)
21427 (uri (git-reference
21428 (url "https://github.com/neithere/argh")
21429 (commit commit)))
21430 (file-name (git-file-name name version))
21431 (sha256
21432 (base32
21433 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
21434 (build-system python-build-system)
21435 (propagated-inputs
21436 `(("python-iocapture" ,python-iocapture)
21437 ("python-mock" ,python-mock)
21438 ("python-pytest" ,python-pytest)
21439 ("python-pytest-cov" ,python-pytest-cov)
21440 ("python-pytest-xdist" ,python-pytest-xdist)
21441 ("python-tox" ,python-tox)))
21442 (home-page "https://github.com/neithere/argh/")
21443 (synopsis "Argparse wrapper with natural syntax")
21444 (description
21445 "python-argh is a small library that provides several layers of
21446 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
21447 always possible to declare a command with the highest possible (and least
21448 flexible) layer and then tune the behaviour with any of the lower layers
21449 including the native API of @code{python-argparse}.")
21450 (license license:lgpl3+))))
21451
21452 (define-public python-ppft
21453 (package
21454 (name "python-ppft")
21455 (version "1.6.6.1")
21456 (source
21457 (origin
21458 (method url-fetch)
21459 (uri (pypi-uri "ppft" version))
21460 (sha256
21461 (base32
21462 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
21463 (build-system python-build-system)
21464 (arguments '(#:tests? #f)) ; there are none
21465 (propagated-inputs
21466 `(("python-six" ,python-six)))
21467 (home-page "https://pypi.org/project/ppft/")
21468 (synopsis "Fork of Parallel Python")
21469 (description
21470 "This package is a fork of Parallel Python. The Parallel Python
21471 module (@code{pp}) provides an easy and efficient way to create
21472 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
21473 computers and clusters. It features cross-platform portability and dynamic
21474 load balancing.")
21475 (license license:bsd-3)))
21476
21477 (define-public python-pox
21478 (package
21479 (name "python-pox")
21480 (version "0.2.7")
21481 (source
21482 (origin
21483 (method url-fetch)
21484 (uri (pypi-uri "pox" version))
21485 (sha256
21486 (base32
21487 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
21488 (build-system python-build-system)
21489 (arguments
21490 `(#:phases
21491 (modify-phases %standard-phases
21492 (replace 'check
21493 (lambda _
21494 (mkdir-p "/tmp/guix")
21495 (setenv "SHELL" "bash")
21496 (setenv "USERNAME" "guix")
21497 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
21498 (invoke "py.test" "-vv")
21499 #t)))))
21500 (native-inputs
21501 `(("python-pytest" ,python-pytest)
21502 ("which" ,which)))
21503 (home-page "https://pypi.org/project/pox/")
21504 (synopsis "Python utilities for file system exploration and automated builds")
21505 (description
21506 "Pox provides a collection of utilities for navigating and manipulating
21507 file systems. This module is designed to facilitate some of the low-level
21508 operating system interactions that are useful when exploring a file system on a
21509 remote host. Pox provides Python equivalents of several shell commands such
21510 as @command{which} and @command{find}. These commands allow automated
21511 discovery of what has been installed on an operating system, and where the
21512 essential tools are located.")
21513 (license license:bsd-3)))
21514
21515 (define-public python-pathos
21516 (package
21517 (name "python-pathos")
21518 (version "0.2.5")
21519 (source
21520 (origin
21521 (method url-fetch)
21522 (uri (pypi-uri "pathos" version))
21523 (sha256
21524 (base32
21525 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
21526 (build-system python-build-system)
21527 (arguments
21528 '(#:phases
21529 (modify-phases %standard-phases
21530 (replace 'check
21531 (lambda _
21532 (setenv "PYTHONPATH"
21533 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
21534 (invoke "python" "./tests/__main__.py"))))))
21535 (propagated-inputs
21536 `(("python-dill" ,python-dill)
21537 ("python-multiprocess" ,python-multiprocess)
21538 ("python-pox" ,python-pox)
21539 ("python-ppft" ,python-ppft)))
21540 (native-inputs
21541 `(("python-pytest" ,python-pytest)))
21542 (home-page "https://pypi.org/project/pathos/")
21543 (synopsis
21544 "Parallel graph management and execution in heterogeneous computing")
21545 (description
21546 "Python-pathos is a framework for heterogeneous computing. It provides a
21547 consistent high-level interface for configuring and launching parallel
21548 computations across heterogeneous resources. Python-pathos provides configurable
21549 launchers for parallel and distributed computing, where each launcher contains
21550 the syntactic logic to configure and launch jobs in an execution environment.")
21551 (license license:bsd-3)))
21552
21553 (define-public python-flit
21554 (package
21555 (name "python-flit")
21556 (version "3.0.0")
21557 (source
21558 (origin
21559 (method url-fetch)
21560 (uri (pypi-uri "flit" version))
21561 (sha256
21562 (base32
21563 "14q8qa48bli2mniznc8b54qkwvhbik4kw99y01fi5gzzl620zzml"))))
21564 (build-system python-build-system)
21565 (arguments
21566 `(#:tests? #f)) ; XXX: Check requires network access.
21567 (home-page "https://flit.readthedocs.io/")
21568 (synopsis
21569 "Simple packaging tool for simple packages")
21570 (description
21571 "Flit is a simple way to put Python packages and modules on PyPI. Flit
21572 packages a single importable module or package at a time, using the import
21573 name as the name on PyPI. All subpackages and data files within a package
21574 are included automatically.")
21575 (license license:bsd-3)))
21576
21577 (define-public python-pathtools
21578 (package
21579 (name "python-pathtools")
21580 (version "0.1.2")
21581 (source
21582 (origin
21583 (method url-fetch)
21584 (uri (pypi-uri "pathtools" version))
21585 (sha256
21586 (base32
21587 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
21588 (build-system python-build-system)
21589 (home-page
21590 "https://github.com/gorakhargosh/pathtools")
21591 (synopsis "Path utilities for Python")
21592 (description "Pattern matching and various utilities for file systems
21593 paths.")
21594 (license license:expat)))
21595
21596 (define-public python-fastentrypoints
21597 (package
21598 (name "python-fastentrypoints")
21599 (version "0.12")
21600 (source
21601 (origin
21602 (method url-fetch)
21603 (uri (pypi-uri "fastentrypoints" version))
21604 (sha256
21605 (base32
21606 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
21607 (build-system python-build-system)
21608 (home-page
21609 "https://github.com/ninjaaron/fast-entry_points")
21610 (synopsis
21611 "Makes entry_points specified in setup.py load more quickly")
21612 (description
21613 "Using entry_points in your setup.py makes scripts that start really
21614 slowly because it imports pkg_resources. This package allows such setup
21615 scripts to load entry points more quickly.")
21616 (license license:bsd-3)))
21617
21618 (define-public python-funcparserlib
21619 (package
21620 (name "python-funcparserlib")
21621 (version "0.3.6")
21622 (source
21623 (origin
21624 (method url-fetch)
21625 (uri (pypi-uri "funcparserlib" version))
21626 (sha256
21627 (base32
21628 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
21629 (native-inputs
21630 `(("python-tox" ,python-tox)))
21631 (arguments
21632 `(#:phases
21633 (modify-phases %standard-phases
21634 (replace 'check
21635 (lambda _
21636 (invoke "tox"))))))
21637 (build-system python-build-system)
21638 (home-page
21639 "https://github.com/vlasovskikh/funcparserlib")
21640 (synopsis
21641 "Recursive descent parsing library based on functional combinators")
21642 (description
21643 "This package is a recursive descent parsing library for Python based on
21644 functional combinators. Parser combinators are just higher-order functions
21645 that take parsers as their arguments and return them as result values.")
21646 (license license:expat)))
21647
21648 (define-public python-speg
21649 (package
21650 (name "python-speg")
21651 (version "0.3")
21652 (source
21653 (origin
21654 (method url-fetch)
21655 (uri (pypi-uri "speg" version ".zip"))
21656 (sha256
21657 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
21658 (arguments
21659 `(#:tests? #f)) ;FIXME: tests fail, not sure why
21660 (native-inputs
21661 `(("unzip" ,unzip)))
21662 (build-system python-build-system)
21663 (home-page "https://github.com/avakar/speg")
21664 (synopsis "PEG-based parser interpreter with memoization")
21665 (description "This package is a PEG-based parser and interpreter with
21666 memoization.")
21667 (license license:expat)))
21668
21669 (define-public python-cson
21670 (package
21671 (name "python-cson")
21672 (version "0.8")
21673 (source
21674 (origin
21675 (method url-fetch)
21676 (uri (pypi-uri "cson" version))
21677 (sha256
21678 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
21679 (build-system python-build-system)
21680 (propagated-inputs
21681 `(("python-speg" ,python-speg)))
21682 (home-page "https://github.com/avakar/pycson")
21683 (synopsis "Parser for Coffeescript Object Notation (CSON)")
21684 (description "This package is a parser for Coffeescript Object
21685 Notation (CSON).")
21686 (license license:expat)))
21687
21688 (define-public python-asynctest
21689 (package
21690 (name "python-asynctest")
21691 (version "0.13.0")
21692 (source
21693 (origin
21694 (method url-fetch)
21695 (uri (pypi-uri "asynctest" version))
21696 (sha256
21697 (base32
21698 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
21699 (build-system python-build-system)
21700 (arguments
21701 '(#:phases
21702 (modify-phases %standard-phases
21703 (replace 'check
21704 (lambda _
21705 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
21706 (add-after 'unpack 'disable-tests
21707 (lambda* _
21708 ;; XXX: 7 tests fail out of 220. Disable them for now.
21709 (substitute* (list "test/test_selector.py"
21710 "test/test_mock.py")
21711 (("def test_events_watched_outside_test_are_ignored")
21712 "@unittest.skip('disabled by guix')
21713 def test_events_watched_outside_test_are_ignored")
21714 (("def test_awaited_from_autospec_mock.*" line)
21715 (string-append line " return True\n"))
21716 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
21717 (string-append line " return True\n"))
21718 (("def test_patch_coroutine_with_multiple_scopes.*" line)
21719 (string-append line " return True\n"))
21720 (("def test_multiple_patches_on_coroutine.*" line)
21721 (string-append line " return True\n"))
21722 (("def test_patch_coroutine_only_when_running.*" line)
21723 (string-append line " return True\n")))
21724 #t)))))
21725 (home-page "https://github.com/Martiusweb/asynctest")
21726 (synopsis "Extension of unittest for testing asyncio libraries")
21727 (description
21728 "The package asynctest is built on top of the standard unittest module
21729 and cuts down boilerplate code when testing libraries for asyncio.")
21730 (license license:asl2.0)))
21731
21732 (define-public python-aionotify
21733 (package
21734 (name "python-aionotify")
21735 (version "0.2.0")
21736 (source
21737 (origin
21738 ;; Source tarball on PyPi lacks tests
21739 (method git-fetch)
21740 (uri (git-reference
21741 (url "https://github.com/rbarrois/aionotify")
21742 (commit (string-append "v" version))))
21743 (file-name (git-file-name name version))
21744 (sha256
21745 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
21746 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
21747 (build-system python-build-system)
21748 (home-page "https://github.com/rbarrois/aionotify")
21749 (synopsis "Asyncio-powered inotify library")
21750 (description
21751 "@code{aionotify} is a simple, asyncio-based inotify library.")
21752 (license license:bsd-3)))
21753
21754 (define-public python-forbiddenfruit
21755 (package
21756 (name "python-forbiddenfruit")
21757 (version "0.1.3")
21758 (source
21759 (origin
21760 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21761 (method git-fetch)
21762 (uri (git-reference
21763 (url "https://github.com/clarete/forbiddenfruit")
21764 (commit version)))
21765 (file-name (git-file-name name version))
21766 (sha256
21767 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21768 (build-system python-build-system)
21769 (arguments
21770 '(#:phases
21771 (modify-phases %standard-phases
21772 (replace 'check
21773 (lambda _
21774 (invoke "make" "SKIP_DEPS=1"))))))
21775 (native-inputs
21776 `(("python-nose" ,python-nose)
21777 ("python-coverage" ,python-coverage)))
21778 (home-page "https://github.com/clarete/forbiddenfruit")
21779 (synopsis "Patch python built-in objects")
21780 (description "This project allows Python code to extend built-in types.")
21781 (license (list license:gpl3+ license:expat))))
21782
21783 (define-public python-k5test
21784 (package
21785 (name "python-k5test")
21786 (version "0.9.2")
21787 (source
21788 (origin
21789 (method url-fetch)
21790 (uri (pypi-uri "k5test" version))
21791 (sha256
21792 (base32
21793 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21794 (build-system python-build-system)
21795 (propagated-inputs
21796 `(("python-six" ,python-six)
21797 ;; `which`, `kadmin.local` binaries called inside library
21798 ("which" ,which)
21799 ("mit-krb5" ,mit-krb5)))
21800 (native-inputs `(("mit-krb5" ,mit-krb5)))
21801 (arguments
21802 '(#:phases
21803 (modify-phases %standard-phases
21804 (add-after 'unpack 'patch-paths
21805 (lambda* _
21806 (substitute* "k5test/realm.py"
21807 (("'kadmin_local'") "'kadmin.local'")))))))
21808 (home-page "https://github.com/pythongssapi/k5test")
21809 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21810 (description
21811 "@code{k5test} is a library for setting up self-contained Kerberos 5
21812 environments, and running Python unit tests inside those environments. It is
21813 based on the file of the same name found alongside the MIT Kerberos 5 unit
21814 tests.")
21815 (license license:isc)))
21816
21817 (define-public python-gssapi
21818 (package
21819 (name "python-gssapi")
21820 (version "1.6.12")
21821 (source
21822 (origin
21823 (method url-fetch)
21824 (uri (pypi-uri "gssapi" version))
21825 (sha256
21826 (base32
21827 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
21828 (build-system python-build-system)
21829 (propagated-inputs
21830 `(("python-decorator" ,python-decorator)
21831 ("python-six" ,python-six)))
21832 (inputs
21833 `(("mit-krb5" ,mit-krb5)))
21834 ;; for tests
21835 (native-inputs
21836 `(("python-parameterized" ,python-parameterized)
21837 ("python-k5test" ,python-k5test)
21838 ("python-nose" ,python-nose)))
21839 (home-page "https://github.com/pythongssapi/python-gssapi")
21840 (synopsis "Python GSSAPI Wrapper")
21841 (description
21842 "Python-GSSAPI provides both low-level and high level wrappers around the
21843 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
21844 also be usable with other GSSAPI mechanisms.")
21845 (license license:isc)))
21846
21847 (define-public python-check-manifest
21848 (package
21849 (name "python-check-manifest")
21850 (version "0.37")
21851 (source
21852 (origin
21853 (method url-fetch)
21854 (uri (pypi-uri "check-manifest" version))
21855 (sha256
21856 (base32
21857 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
21858 (build-system python-build-system)
21859 (native-inputs
21860 `(("python-mock" ,python-mock)
21861 ("git" ,git)))
21862 (home-page "https://github.com/mgedmin/check-manifest")
21863 (synopsis "Check MANIFEST.in in a Python source package for completeness")
21864 (description "Python package can include a MANIFEST.in file to help with
21865 sending package files to the Python Package Index. This package checks that
21866 file to ensure it completely and accurately describes your project.")
21867 (license license:expat)))
21868
21869 (define-public python-android-stringslib
21870 (package
21871 (name "python-android-stringslib")
21872 (version "0.1.2")
21873 (source
21874 (origin
21875 (method git-fetch)
21876 (uri (git-reference
21877 (url "https://framagit.org/tyreunom/python-android-strings-lib")
21878 (commit (string-append "v" version))))
21879 (file-name (git-file-name name version))
21880 (sha256
21881 (base32
21882 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
21883 (build-system python-build-system)
21884 (arguments
21885 `(#:tests? #f))
21886 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
21887 (synopsis "Android strings.xml support")
21888 (description "Android Strings Lib provides support for android's strings.xml
21889 files. These files are used to translate strings in android apps.")
21890 (license license:expat)))
21891
21892 (define-public python-watchdog
21893 (package
21894 (name "python-watchdog")
21895 (version "0.9.0")
21896 (source
21897 (origin
21898 (method url-fetch)
21899 (uri (pypi-uri "watchdog" version))
21900 (sha256
21901 (base32
21902 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
21903 (build-system python-build-system)
21904 (arguments
21905 `(#:phases
21906 (modify-phases %standard-phases
21907 (add-before 'check 'remove-failing
21908 (lambda _
21909 (delete-file "tests/test_inotify_buffer.py")
21910 (delete-file "tests/test_snapshot_diff.py")
21911 #t)))))
21912 (propagated-inputs
21913 `(("python-argh" ,python-argh)
21914 ("python-pathtools" ,python-pathtools)
21915 ("python-pyyaml" ,python-pyyaml)))
21916 (native-inputs
21917 `(("python-pytest-cov" ,python-pytest-cov)
21918 ("python-pytest-timeout" ,python-pytest-timeout)))
21919 (home-page "https://github.com/gorakhargosh/watchdog")
21920 (synopsis "File system events monitoring")
21921 (description "This package provides a way to monitor file system events
21922 such as a file modification and trigger an action. This is similar to inotify,
21923 but portable.")
21924 (license license:asl2.0)))
21925
21926 (define-public python-watchgod
21927 (package
21928 (name "python-watchgod")
21929 (version "0.6")
21930 (source
21931 (origin
21932 ;; There are no tests in the PyPI tarball.
21933 (method git-fetch)
21934 (uri (git-reference
21935 (url "https://github.com/samuelcolvin/watchgod")
21936 (commit (string-append "v" version))))
21937 (file-name (git-file-name name version))
21938 (sha256
21939 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
21940 (build-system python-build-system)
21941 (arguments
21942 `(#:phases
21943 (modify-phases %standard-phases
21944 (replace 'check
21945 (lambda _
21946 (invoke "pytest" "-vv"))))))
21947 (native-inputs
21948 `(("python-coverage" ,python-coverage)
21949 ("python-docutils" ,python-docutils)
21950 ("python-flake8" ,python-flake8)
21951 ("python-isort" ,python-isort)
21952 ("python-pycodestyle" ,python-pycodestyle)
21953 ("python-pyflakes" ,python-pyflakes)
21954 ("python-pygments" ,python-pygments)
21955 ("python-pytest" ,python-pytest)
21956 ("python-pytest-cov" ,python-pytest-cov)
21957 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
21958 ("python-pytest-mock" ,python-pytest-mock)
21959 ("python-pytest-sugar" ,python-pytest-sugar)
21960 ("python-pytest-toolbox" ,python-pytest-toolbox)))
21961 (home-page "https://github.com/samuelcolvin/watchgod")
21962 (synopsis "Simple, modern file watching and code reload in Python")
21963 (description
21964 "Simple, modern file watching and code reload in Python inspired by
21965 @code{watchdog}. Among the differences are a unified approach for each
21966 operating systems and an elegant approach to concurrency using threading.")
21967 (license license:expat)))
21968
21969 (define-public python-wget
21970 (package
21971 (name "python-wget")
21972 (version "3.2")
21973 (source
21974 (origin
21975 (method url-fetch)
21976 (uri (pypi-uri "wget" version ".zip"))
21977 (sha256
21978 (base32
21979 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
21980 (build-system python-build-system)
21981 (native-inputs `(("unzip" ,unzip)))
21982 (home-page "https://bitbucket.org/techtonik/python-wget/")
21983 (synopsis "Pure Python download utility")
21984 (description "The python-wget library provides an API to download files
21985 with features similar to the @command{wget} utility.")
21986 (license license:unlicense)))
21987
21988 (define-public offlate
21989 (package
21990 (name "offlate")
21991 (version "0.5")
21992 (source
21993 (origin
21994 (method git-fetch)
21995 (uri (git-reference
21996 (url "https://framagit.org/tyreunom/offlate")
21997 (commit version)))
21998 (file-name (git-file-name name version))
21999 (sha256
22000 (base32
22001 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
22002 (build-system python-build-system)
22003 (arguments
22004 ;; No tests
22005 `(#:tests? #f))
22006 (propagated-inputs
22007 `(("python-android-stringslib" ,python-android-stringslib)
22008 ("python-dateutil" ,python-dateutil)
22009 ("python-gitlab" ,python-gitlab)
22010 ("python-lxml" ,python-lxml)
22011 ("python-polib" ,python-polib)
22012 ("python-pyenchant" ,python-pyenchant)
22013 ("python-pygit2" ,python-pygit2)
22014 ("python-pygithub" ,python-pygithub)
22015 ("python-pyqt" ,python-pyqt)
22016 ("python-requests" ,python-requests)
22017 ("python-ruamel.yaml" ,python-ruamel.yaml)
22018 ("python-translation-finder" ,python-translation-finder)
22019 ("python-watchdog" ,python-watchdog)))
22020 (native-inputs
22021 `(("qttools" ,qttools)))
22022 (home-page "https://framagit.org/tyreunom/offlate")
22023 (synopsis "Offline translation interface for online translation tools")
22024 (description "Offlate offers a unified interface for different translation
22025 file formats, as well as many different online translation platforms. You can
22026 use it to get work from online platforms, specialized such as the Translation
22027 Project, or not such a gitlab instance when your upstream doesn't use any
22028 dedicated platform. The tool proposes a unified interface for any format and
22029 an upload option to send your work back to the platform.")
22030 (license license:gpl3+)))
22031
22032 (define-public python-titlecase
22033 (package
22034 (name "python-titlecase")
22035 (version "0.12.0")
22036 (source
22037 (origin
22038 (method url-fetch)
22039 (uri (pypi-uri "titlecase" version))
22040 (sha256
22041 (base32
22042 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
22043 (build-system python-build-system)
22044 (native-inputs
22045 `(("python-nose" ,python-nose)))
22046 (home-page "https://github.com/ppannuto/python-titlecase")
22047 (synopsis "Capitalize strings similar to book titles")
22048 (description
22049 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
22050 It capitalizes (predominantly English) strings in a way that is similar to
22051 book titles, using the New York Times Manual of Style to leave certain words
22052 lowercase.")
22053 (license license:expat)))
22054
22055 (define-public python-pypng
22056 (package
22057 (name "python-pypng")
22058 (version "0.0.20")
22059 (source
22060 (origin
22061 (method url-fetch)
22062 (uri (pypi-uri "pypng" version))
22063 (sha256
22064 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
22065 (build-system python-build-system)
22066 (home-page "https://github.com/drj11/pypng")
22067 (synopsis "Pure Python PNG image encoder/decoder")
22068 (description
22069 "The PyPNG module implements support for PNG images. It reads and writes
22070 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
22071 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
22072 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
22073 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
22074 A number of optional chunks can be specified (when writing) and
22075 understood (when reading): tRNS, bKGD, gAMA.
22076
22077 PyPNG is not a high level toolkit for image processing (like PIL) and does not
22078 aim at being a replacement or competitor. Its strength lies in fine-grained
22079 extensive support of PNG features. It can also read and write Netpbm PAM
22080 files, with a focus on its use as an intermediate format for implementing
22081 custom PNG processing.")
22082 (license license:expat)))
22083
22084 (define-public python-fuzzywuzzy
22085 (package
22086 (name "python-fuzzywuzzy")
22087 (version "0.18.0")
22088 (source
22089 (origin
22090 (method url-fetch)
22091 (uri (pypi-uri "fuzzywuzzy" version))
22092 (sha256
22093 (base32
22094 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
22095 (build-system python-build-system)
22096 (native-inputs
22097 `(("python-hypothesis" ,python-hypothesis)
22098 ("python-pycodestyle" ,python-pycodestyle)
22099 ("python-pytest" ,python-pytest)))
22100 (propagated-inputs
22101 `(("python-levenshtein" ,python-levenshtein)))
22102 (home-page "https://github.com/seatgeek/fuzzywuzzy")
22103 (synopsis "Fuzzy string matching in Python")
22104 (description "Approximate string matching using
22105 @emph{Levenshtein Distance} to calculate the differences between
22106 sequences.")
22107 (license license:gpl2)))
22108
22109 (define-public python2-fuzzywuzzy
22110 (package-with-python2 python-fuzzywuzzy))
22111
22112 (define-public python-block-tracing
22113 (package
22114 (name "python-block-tracing")
22115 (version "1.0.1")
22116 (source
22117 (origin
22118 (method url-fetch)
22119 (uri (pypi-uri "block_tracing" version))
22120 (sha256
22121 (base32
22122 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
22123 (build-system python-build-system)
22124 (arguments '(#:tests? #f)) ; no tests
22125 (home-page "https://github.com/rianhunter/block_tracing")
22126 (synopsis "Protect process memory")
22127 (description
22128 "@code{block_tracing} is a tiny Python library that can be used to
22129 prevent debuggers and other applications from inspecting the memory within
22130 your process.")
22131 (license license:expat)))
22132
22133 (define-public python-gcovr
22134 (package
22135 (name "python-gcovr")
22136 (version "4.2")
22137 (source
22138 (origin
22139 (method url-fetch)
22140 (uri (pypi-uri "gcovr" version))
22141 (sha256
22142 (base32
22143 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
22144 (build-system python-build-system)
22145 (propagated-inputs
22146 `(("python-lxml" ,python-lxml)
22147 ("python-jinja2" ,python-jinja2)))
22148 (home-page "https://gcovr.com/")
22149 (synopsis "Utility for generating code coverage results")
22150 (description
22151 "Gcovr provides a utility for managing the use of the GNU gcov
22152 utility and generating summarized code coverage results. It is inspired
22153 by the Python coverage.py package, which provides a similar utility for
22154 Python.")
22155 (license license:bsd-3)))
22156
22157 (define-public python-owslib
22158 (package
22159 (name "python-owslib")
22160 (version "0.19.2")
22161 (source
22162 (origin
22163 (method url-fetch)
22164 (uri (pypi-uri "OWSLib" version))
22165 (sha256
22166 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
22167 (build-system python-build-system)
22168 (arguments
22169 '(#:tests? #f)) ; TODO: package dependencies required for tests.
22170 (synopsis "Interface for Open Geospatial Consortium web service")
22171 (description
22172 "OWSLib is a Python package for client programming with Open Geospatial
22173 Consortium (OGC) web service (hence OWS) interface standards, and their related
22174 content models.")
22175 (home-page "https://geopython.github.io/OWSLib/")
22176 (license license:bsd-3)))
22177
22178 (define-public python-docusign-esign
22179 (package
22180 (name "python-docusign-esign")
22181 (version "3.1.0")
22182 (source (origin
22183 (method url-fetch)
22184 (uri (pypi-uri "docusign_esign" version))
22185 (sha256
22186 (base32
22187 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
22188 (build-system python-build-system)
22189 ;; Testing requires undocumented setup changes, and so testing is disabled here.
22190 (arguments `(#:tests? #f))
22191 (propagated-inputs
22192 `(("python-certifi" ,python-certifi)
22193 ("python-six" ,python-six)
22194 ("python-dateutil" ,python-dateutil)
22195 ("python-urllib3" ,python-urllib3)
22196 ("python-pyjwt" ,python-pyjwt)
22197 ("python-cryptography" ,python-cryptography)
22198 ("python-nose" ,python-nose)))
22199 (synopsis "DocuSign Python Client")
22200 (description "The Official DocuSign Python Client Library used to interact
22201 with the eSign REST API. Send, sign, and approve documents using this client.")
22202 (home-page "https://www.docusign.com/devcenter")
22203 (license license:expat)))
22204
22205 (define-public python-xattr
22206 (package
22207 (name "python-xattr")
22208 (version "0.9.7")
22209 (source
22210 (origin
22211 (method url-fetch)
22212 (uri (pypi-uri "xattr" version))
22213 (sha256
22214 (base32
22215 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
22216 (build-system python-build-system)
22217 (propagated-inputs
22218 `(("python-cffi" ,python-cffi)))
22219 (home-page "https://github.com/xattr/xattr")
22220 (synopsis
22221 "Python wrapper for extended file system attributes")
22222 (description "This package provides a Python wrapper for using extended
22223 file system attributes. Extended attributes extend the basic attributes of files
22224 and directories in the file system. They are stored as name:data pairs
22225 associated with file system objects (files, directories, symlinks, etc).")
22226 (license license:expat)))
22227
22228 (define-public python-json-logger
22229 (package
22230 (name "python-json-logger")
22231 (version "0.1.11")
22232 (source
22233 (origin
22234 (method url-fetch)
22235 (uri (pypi-uri "python-json-logger" version))
22236 (sha256
22237 (base32
22238 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
22239 (build-system python-build-system)
22240 (home-page
22241 "https://github.com/madzak/python-json-logger")
22242 (synopsis "JSON log formatter in Python")
22243 (description "This library allows standard Python logging to output log data
22244 as JSON objects. With JSON we can make our logs more readable by machines and
22245 we can stop writing custom parsers for syslog-type records.")
22246 (license license:bsd-3)))
22247
22248 (define-public python-daiquiri
22249 (package
22250 (name "python-daiquiri")
22251 (version "2.1.1")
22252 (source
22253 (origin
22254 (method url-fetch)
22255 (uri (pypi-uri "daiquiri" version))
22256 (sha256
22257 (base32
22258 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
22259 (build-system python-build-system)
22260 (propagated-inputs
22261 `(("python-json-logger" ,python-json-logger)))
22262 (native-inputs
22263 `(("python-mock" ,python-mock)
22264 ("python-pytest" ,python-pytest)
22265 ("python-setuptools-scm" ,python-setuptools-scm)
22266 ("python-six" ,python-six)))
22267 (home-page "https://github.com/jd/daiquiri")
22268 (synopsis
22269 "Library to configure Python logging easily")
22270 (description "The daiquiri library provides an easy way to configure
22271 logging in Python. It also provides some custom formatters and handlers.")
22272 (license license:asl2.0)))
22273
22274 (define-public python-pifpaf
22275 (package
22276 (name "python-pifpaf")
22277 (version "2.5.0")
22278 (source
22279 (origin
22280 (method url-fetch)
22281 (uri (pypi-uri "pifpaf" version))
22282 (sha256
22283 (base32
22284 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
22285 (build-system python-build-system)
22286 (arguments
22287 '(#:phases
22288 (modify-phases %standard-phases
22289 (replace 'check
22290 (lambda _
22291 (invoke "python" "setup.py" "testr" "--slowest"
22292 "--testr-args=until-failure"))))))
22293 (propagated-inputs
22294 `(("python-click" ,python-click)
22295 ("python-daiquiri" ,python-daiquiri)
22296 ("python-fixtures" ,python-fixtures)
22297 ("python-jinja2" ,python-jinja2)
22298 ("python-pbr" ,python-pbr)
22299 ("python-psutil" ,python-psutil)
22300 ("python-six" ,python-six)
22301 ("python-xattr" ,python-xattr)))
22302 (native-inputs
22303 `(("python-mock" ,python-mock)
22304 ("python-os-testr" ,python-os-testr)
22305 ("python-requests" ,python-requests)
22306 ("python-testrepository" ,python-testrepository)
22307 ("python-testtools" ,python-testtools)))
22308 (home-page "https://github.com/jd/pifpaf")
22309 (synopsis "Tools and fixtures to manage daemons for testing in Python")
22310 (description "Pifpaf is a suite of fixtures and a command-line tool that
22311 starts and stops daemons for a quick throw-away usage. This is typically
22312 useful when needing these daemons to run integration testing. It originally
22313 evolved from its precursor @code{overtest}.")
22314 (license license:asl2.0)))
22315
22316 (define-public python-pytest-check-links
22317 (package
22318 (name "python-pytest-check-links")
22319 (version "0.3.0")
22320 (source
22321 (origin
22322 (method url-fetch)
22323 ;; URI uses underscores
22324 (uri (pypi-uri "pytest_check_links" version))
22325 (sha256
22326 (base32
22327 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
22328 (build-system python-build-system)
22329 (propagated-inputs
22330 `(("python-docutils" ,python-docutils)
22331 ("python-html5lib" ,python-html5lib)
22332 ("python-nbconvert" ,python-nbconvert)
22333 ("python-nbformat" ,python-nbformat)
22334 ("python-pytest" ,python-pytest)
22335 ("python-six" ,python-six)))
22336 (native-inputs
22337 `(("python-pbr-minimal" ,python-pbr-minimal)))
22338 (home-page "https://github.com/minrk/pytest-check-links")
22339 (synopsis "Check links in files")
22340 (description "This package provides a pytest plugin that checks URLs for
22341 HTML-containing files.")
22342 (license license:bsd-3)))
22343
22344 (define-public python-json5
22345 (package
22346 (name "python-json5")
22347 (version "0.8.5")
22348 (source
22349 (origin
22350 ;; sample.json5 is missing from PyPi source tarball
22351 (method git-fetch)
22352 (uri (git-reference
22353 (url "https://github.com/dpranke/pyjson5")
22354 (commit (string-append "v" version))))
22355 (file-name (git-file-name name version))
22356 (sha256
22357 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
22358 (build-system python-build-system)
22359 (home-page "https://github.com/dpranke/pyjson5")
22360 (synopsis
22361 "Python implementation of the JSON5 data format")
22362 (description
22363 "JSON5 extends the JSON data interchange format to make it slightly more
22364 usable as a configuration language. This Python package implements parsing and
22365 dumping of JSON5 data structures.")
22366 (license license:asl2.0)))
22367
22368 (define-public python-frozendict
22369 (package
22370 (name "python-frozendict")
22371 (version "1.2")
22372 (source
22373 (origin
22374 (method url-fetch)
22375 (uri (pypi-uri "frozendict" version))
22376 (sha256
22377 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
22378 (build-system python-build-system)
22379 (home-page "https://github.com/slezica/python-frozendict")
22380 (synopsis "Simple immutable mapping for Python")
22381 (description
22382 "@dfn{frozendict} is an immutable wrapper around dictionaries that
22383 implements the complete mapping interface. It can be used as a drop-in
22384 replacement for dictionaries where immutability is desired.")
22385 (license license:expat)))
22386
22387 (define-public python-unpaddedbase64
22388 (package
22389 (name "python-unpaddedbase64")
22390 (version "1.1.0")
22391 (source
22392 (origin
22393 (method git-fetch)
22394 (uri (git-reference
22395 (url "https://github.com/matrix-org/python-unpaddedbase64")
22396 (commit (string-append "v" version))))
22397 (file-name (git-file-name name version))
22398 (sha256
22399 (base32
22400 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
22401 (build-system python-build-system)
22402 (home-page "https://pypi.org/project/unpaddedbase64/")
22403 (synopsis "Encode and decode Base64 without “=” padding")
22404 (description
22405 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
22406 using “=” characters. However this conveys no benefit so many protocols
22407 choose to use Base64 without the “=” padding.")
22408 (license license:asl2.0)))
22409
22410 (define-public python-py-cpuinfo
22411 (package
22412 (name "python-py-cpuinfo")
22413 (version "5.0.0")
22414 (source
22415 (origin
22416 (method url-fetch)
22417 (uri (pypi-uri "py-cpuinfo" version))
22418 (sha256
22419 (base32
22420 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
22421 (build-system python-build-system)
22422 (home-page "https://github.com/workhorsy/py-cpuinfo")
22423 (synopsis "Get CPU info with Python")
22424 (description
22425 "This Python module returns the CPU info by using the best sources of
22426 information for your operating system.")
22427 (license license:expat)))
22428
22429 (define-public python-canonicaljson
22430 (package
22431 (name "python-canonicaljson")
22432 (version "1.4.0")
22433 (source
22434 (origin
22435 (method url-fetch)
22436 (uri (pypi-uri "canonicaljson" version))
22437 (sha256
22438 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
22439 (build-system python-build-system)
22440 (propagated-inputs
22441 `(("python-six" ,python-six)
22442 ("python-frozendict" ,python-frozendict)
22443 ("python-simplejson" ,python-simplejson)))
22444 (home-page "https://github.com/matrix-org/python-canonicaljson")
22445 (synopsis "Canonical JSON")
22446 (description
22447 "Deterministically encode JSON.
22448
22449 @itemize
22450 @item Encodes objects and arrays as RFC 7159 JSON.
22451 @item Sorts object keys so that you get the same result each time.
22452 @item Has no insignificant whitespace to make the output as small as possible.
22453 @item Escapes only the characters that must be escaped, U+0000 to
22454 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
22455 @item Uses the shortest escape sequence for each escaped character.
22456 @item Encodes the JSON as UTF-8.
22457 @item Can encode frozendict immutable dictionaries.
22458 @end itemize")
22459 (license license:asl2.0)))
22460
22461 (define-public python-signedjson
22462 (package
22463 (name "python-signedjson")
22464 (version "1.1.1")
22465 (source
22466 (origin
22467 (method url-fetch)
22468 (uri (pypi-uri "signedjson" version))
22469 (sha256
22470 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
22471 (build-system python-build-system)
22472 (propagated-inputs
22473 `(("python-canonicaljson" ,python-canonicaljson)
22474 ("python-importlib-metadata" ,python-importlib-metadata)
22475 ("python-pynacl" ,python-pynacl)
22476 ("python-typing-extensions" ,python-typing-extensions)
22477 ("python-unpaddedbase64" ,python-unpaddedbase64)))
22478 (native-inputs
22479 `(("python-setuptools-scm" ,python-setuptools-scm)))
22480 (home-page "https://github.com/matrix-org/python-signedjson")
22481 (synopsis "Sign JSON objects with ED25519 signatures")
22482 (description
22483 "Sign JSON objects with ED25519 signatures.
22484
22485 @itemize
22486 @item More than one entity can sign the same object.
22487 @item Each entity can sign the object with more than one key making it easier to
22488 rotate keys
22489 @item ED25519 can be replaced with a different algorithm.
22490 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
22491 key.
22492 @end itemize")
22493 (license license:asl2.0)))
22494
22495 (define-public python-daemonize
22496 (package
22497 (name "python-daemonize")
22498 (version "2.5.0")
22499 (source
22500 (origin
22501 (method url-fetch)
22502 (uri (pypi-uri "daemonize" version))
22503 (sha256
22504 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
22505 (build-system python-build-system)
22506 (home-page "https://github.com/thesharp/daemonize")
22507 (synopsis "Library for writing system daemons in Python")
22508 (description "Daemonize is a library for writing system daemons in Python.")
22509 (license license:expat)))
22510
22511 (define-public python-pymacaroons
22512 (package
22513 (name "python-pymacaroons")
22514 (version "0.13.0")
22515 (source
22516 (origin
22517 (method url-fetch)
22518 (uri (pypi-uri "pymacaroons" version))
22519 (sha256
22520 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
22521 (build-system python-build-system)
22522 (propagated-inputs
22523 `(("python-six" ,python-six)
22524 ("python-pynacl" ,python-pynacl)))
22525 (home-page "https://github.com/ecordell/pymacaroons")
22526 (synopsis "Python Macaroon Library")
22527 (description
22528 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
22529 tokens, macaroons embed caveats that define specific authorization
22530 requirements for the target service, the service that issued the root macaroon
22531 and which is capable of verifying the integrity of macaroons it receives.
22532
22533 Macaroons allow for delegation and attenuation of authorization. They are
22534 simple and fast to verify, and decouple authorization policy from the
22535 enforcement of that policy.")
22536 (license license:expat)))
22537
22538 (define-public python-ldap3
22539 (package
22540 (name "python-ldap3")
22541 (version "2.7")
22542 (home-page "https://github.com/cannatag/ldap3")
22543 (source
22544 (origin
22545 (method git-fetch)
22546 (uri (git-reference (url home-page)
22547 (commit (string-append "v" version))))
22548 (file-name (git-file-name name version))
22549 (sha256
22550 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
22551 (build-system python-build-system)
22552 (arguments
22553 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
22554 #:phases (modify-phases %standard-phases
22555 (replace 'check
22556 (lambda* (#:key tests? #:allow-other-keys)
22557 (when tests?
22558 (invoke "nosetests" "-s" "test"))
22559 #t)))))
22560 (native-inputs
22561 `(("python-nose" ,python-nose)))
22562 (propagated-inputs
22563 `(("python-gssapi" ,python-gssapi)
22564 ("python-pyasn1" ,python-pyasn1)))
22565 (synopsis "Python LDAP client")
22566 (description
22567 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
22568 library.")
22569 (license license:lgpl3+)))
22570
22571 (define-public python-boltons
22572 (package
22573 (name "python-boltons")
22574 (version "20.0.0")
22575 (source
22576 (origin
22577 (method url-fetch)
22578 (uri (pypi-uri "boltons" version))
22579 (sha256
22580 (base32
22581 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
22582 (build-system python-build-system)
22583 (home-page "https://github.com/mahmoud/boltons")
22584 (synopsis "Extensions to the Python standard library")
22585 (description
22586 "Boltons is a set of over 230 pure-Python utilities in the same spirit
22587 as — and yet conspicuously missing from — the standard library, including:
22588
22589 @itemize
22590 @item Atomic file saving, bolted on with fileutils
22591 @item A highly-optimized OrderedMultiDict, in dictutils
22592 @item Two types of PriorityQueue, in queueutils
22593 @item Chunked and windowed iteration, in iterutils
22594 @item Recursive data structure iteration and merging, with iterutils.remap
22595 @item Exponential backoff functionality, including jitter, through
22596 iterutils.backoff
22597 @item A full-featured TracebackInfo type, for representing stack traces, in
22598 tbutils
22599 @end itemize")
22600 (license license:bsd-3)))
22601
22602 (define-public python-eliot
22603 (package
22604 (name "python-eliot")
22605 (version "1.12.0")
22606 (source
22607 (origin
22608 (method url-fetch)
22609 (uri (pypi-uri "eliot" version))
22610 (sha256
22611 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
22612 (build-system python-build-system)
22613 (arguments
22614 `(#:phases
22615 (modify-phases %standard-phases
22616 (add-after 'unpack 'remove-journald-support
22617 (lambda _
22618 (for-each delete-file
22619 '("eliot/tests/test_journald.py"
22620 "eliot/journald.py"))
22621 #t))
22622 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
22623 ;; remove command-line tool's tests. TODO eliot-prettyprint should
22624 ;; be installed and these tests should pass.
22625 (lambda _
22626 (delete-file "eliot/tests/test_prettyprint.py")
22627 #t)))))
22628 (propagated-inputs
22629 `(("python-boltons" ,python-boltons)
22630 ("python-pyrsistent" ,python-pyrsistent)
22631 ("python-six" ,python-six)
22632 ("python-zope-interface" ,python-zope-interface)))
22633 (native-inputs
22634 `(("python-black" ,python-black)
22635 ("python-coverage" ,python-coverage)
22636 ("python-dask" ,python-dask)
22637 ("python-flake8" ,python-flake8)
22638 ("python-hypothesis" ,python-hypothesis)
22639 ("python-pytest" ,python-pytest)
22640 ("python-setuptools" ,python-setuptools)
22641 ("python-sphinx" ,python-sphinx)
22642 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22643 ("python-testtools" ,python-testtools)
22644 ("python-twine" ,python-twine)
22645 ("python-twisted" ,python-twisted)))
22646 (home-page "https://github.com/itamarst/eliot/")
22647 (synopsis "Eliot: the logging system that tells you why it happened")
22648 (description
22649 "@dfn{eliot} is a Python logging system that outputs causal chains of
22650 actions: actions can spawn other actions, and eventually they either succeed
22651 or fail. The resulting logs tell you the story of what your software did: what
22652 happened, and what caused it.")
22653 (license license:asl2.0)))
22654
22655 (define-public python-pem
22656 (package
22657 (name "python-pem")
22658 (version "20.1.0")
22659 (source
22660 (origin
22661 (method url-fetch)
22662 (uri (pypi-uri "pem" version))
22663 (sha256
22664 (base32
22665 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
22666 (build-system python-build-system)
22667 (native-inputs
22668 `(("python-certifi" ,python-certifi)
22669 ("python-coverage" ,python-coverage)
22670 ("python-pretend" ,python-pretend)
22671 ("python-pyopenssl" ,python-pyopenssl)
22672 ("python-pytest" ,python-pytest)
22673 ("python-sphinx" ,python-sphinx)
22674 ("python-twisted" ,python-twisted)))
22675 (home-page "https://pem.readthedocs.io/")
22676 (synopsis "Easy PEM file parsing in Python")
22677 (description
22678 "This package provides a Python module for parsing and splitting PEM files.")
22679 (license license:expat)))
22680
22681 (define-public python-txsni
22682 ;; We need a few commits on top of 0.1.9 for compatibility with newer
22683 ;; Python and OpenSSL.
22684 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
22685 (revision "0"))
22686 (package
22687 (name "python-txsni")
22688 (version (git-version "0.1.9" revision commit))
22689 (home-page "https://github.com/glyph/txsni")
22690 (source
22691 (origin
22692 (method git-fetch)
22693 (uri (git-reference (url home-page) (commit commit)))
22694 (file-name (git-file-name name version))
22695 (sha256
22696 (base32
22697 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
22698 (build-system python-build-system)
22699 (propagated-inputs
22700 `(("python-pyopenssl" ,python-pyopenssl)
22701 ("python-service-identity" ,python-service-identity)
22702 ("python-twisted" ,python-twisted)))
22703 (synopsis "Run TLS servers with Twisted")
22704 (description
22705 "This package provides an easy-to-use SNI endpoint for use
22706 with the Twisted web framework.")
22707 (license license:expat))))
22708
22709 (define-public python-txacme
22710 (package
22711 (name "python-txacme")
22712 (version "0.9.2")
22713 (source
22714 (origin
22715 (method url-fetch)
22716 (uri (pypi-uri "txacme" version))
22717 (sha256
22718 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22719 (build-system python-build-system)
22720 (propagated-inputs
22721 `(("python-acme" ,python-acme)
22722 ("python-attrs" ,python-attrs)
22723 ("python-eliot" ,python-eliot)
22724 ("python-josepy" ,python-josepy)
22725 ("python-pem" ,python-pem)
22726 ("python-treq" ,python-treq)
22727 ("python-twisted" ,python-twisted)
22728 ("python-txsni" ,python-txsni)))
22729 (native-inputs
22730 `(("python-fixtures" ,python-fixtures)
22731 ("python-hypothesis" ,python-hypothesis)
22732 ("python-mock" ,python-mock)
22733 ("python-service-identity"
22734 ,python-service-identity)
22735 ("python-testrepository" ,python-testrepository)
22736 ("python-testscenarios" ,python-testscenarios)
22737 ("python-testtools" ,python-testtools)))
22738 (home-page "https://github.com/twisted/txacme")
22739 (synopsis "Twisted implexmentation of the ACME protocol")
22740 (description
22741 "ACME is Automatic Certificate Management Environment, a protocol that
22742 allows clients and certificate authorities to automate verification and
22743 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22744 Certificate Authority.
22745
22746 txacme is an implementation of the protocol for Twisted, the event-driven
22747 networking engine for Python.")
22748 (license license:expat)))
22749
22750 (define-public python-pysaml2
22751 (package
22752 (name "python-pysaml2")
22753 (version "6.5.1")
22754 (source
22755 (origin
22756 (method url-fetch)
22757 (uri (pypi-uri "pysaml2" version))
22758 (sha256
22759 (base32
22760 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
22761 (build-system python-build-system)
22762 (propagated-inputs
22763 `(("python-cryptography" ,python-cryptography)
22764 ("python-dateutil" ,python-dateutil)
22765 ("python-defusedxml" ,python-defusedxml)
22766 ("python-importlib-resources"
22767 ,python-importlib-resources)
22768 ("python-pyopenssl" ,python-pyopenssl)
22769 ("python-pytz" ,python-pytz)
22770 ("python-requests" ,python-requests)
22771 ("python-six" ,python-six)
22772 ("python-xmlschema" ,python-xmlschema)))
22773 (home-page "https://idpy.org")
22774 (synopsis "Python implementation of SAML Version 2 Standard")
22775 (description
22776 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22777 It contains all necessary pieces for building a SAML2 service provider or
22778 an identity provider. The distribution contains examples of both.
22779
22780 This package was originally written to work in a WSGI environment, but
22781 there are extensions that allow you to use it with other frameworks.")
22782 (license license:asl2.0)))
22783
22784 (define-public python-click-plugins
22785 (package
22786 (name "python-click-plugins")
22787 (version "1.1.1")
22788 (source
22789 (origin
22790 (method url-fetch)
22791 (uri (pypi-uri "click-plugins" version))
22792 (sha256
22793 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22794 (build-system python-build-system)
22795 (native-inputs
22796 `(("python-pytest" ,python-pytest)))
22797 (propagated-inputs
22798 `(("python-click" ,python-click)))
22799 (synopsis "Extension for Click to register external CLI commands")
22800 (description "This package provides n extension module for Click to
22801 register external CLI commands via setuptools entry-points.")
22802 (home-page "https://github.com/click-contrib/click-plugins")
22803 (license license:bsd-3)))
22804
22805 (define-public python-diceware
22806 (package
22807 (name "python-diceware")
22808 (version "0.9.6")
22809 (source
22810 (origin
22811 (method url-fetch)
22812 (uri (pypi-uri "diceware" version))
22813 (sha256
22814 (base32
22815 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22816 (build-system python-build-system)
22817 (native-inputs
22818 `(("python-coverage" ,python-coverage)
22819 ("python-pytest" ,python-pytest)
22820 ("python-pytest-runner" ,python-pytest-runner)))
22821 (home-page "https://github.com/ulif/diceware/")
22822 (synopsis "Generates memorable passphrases")
22823 (description "This package generates passphrases by concatenating words
22824 randomly picked from wordlists. It supports several sources of
22825 randomness (including real life dice) and different wordlists (including
22826 cryptographically signed ones).")
22827 (license license:gpl3+)))
22828
22829 (define-public python-dictdiffer
22830 (package
22831 (name "python-dictdiffer")
22832 (version "0.8.1")
22833 (source (origin
22834 (method url-fetch)
22835 (uri (pypi-uri "dictdiffer" version))
22836 (sha256
22837 (base32
22838 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
22839 (build-system python-build-system)
22840 (native-inputs
22841 `(("python-check-manifest" ,python-check-manifest)
22842 ("python-coverage" ,python-coverage)
22843 ("python-isort" ,python-isort)
22844 ("python-mock" ,python-mock)
22845 ("python-pydoctstyle" ,python-pydocstyle)
22846 ("python-pytest-cache" ,python-pytest-cache)
22847 ("python-pytest-cov" ,python-pytest-cov)
22848 ("python-pytest-pep8" ,python-pytest-pep8)
22849 ("python-pytest-runner" ,python-pytest-runner)
22850 ("python-pytest" ,python-pytest)
22851 ("python-setuptools-scm" ,python-setuptools-scm)
22852 ("python-tox" ,python-tox)))
22853 (home-page "https://github.com/inveniosoftware/dictdiffer")
22854 (synopsis "Diff and patch Python dictionary objects")
22855 (description
22856 "Dictdiffer is a Python module that helps you to diff and patch
22857 dictionaries.")
22858 (license license:expat)))
22859
22860 (define-public pyzo
22861 (package
22862 (name "pyzo")
22863 (version "4.11.2")
22864 (source
22865 (origin
22866 (method url-fetch)
22867 (uri (pypi-uri "pyzo" version))
22868 (sha256
22869 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
22870 (build-system python-build-system)
22871 (arguments
22872 `(#:phases
22873 (modify-phases %standard-phases
22874 (add-before 'check 'fix-home-directory
22875 (lambda _
22876 ;; Tests fail with "Permission denied: '/homeless-shelter'".
22877 (setenv "HOME" "/tmp")
22878 #t)))
22879 ;; Tests fail with "Uncaught Python exception: python: undefined
22880 ;; symbol: objc_getClass".
22881 #:tests? #f))
22882 (propagated-inputs
22883 `(("python-pyqt" ,python-pyqt)))
22884 (home-page "https://pyzo.org")
22885 (synopsis
22886 "Python IDE for scientific computing")
22887 (description
22888 "Pyzo is a Python IDE focused on interactivity and introspection,
22889 which makes it very suitable for scientific computing. Its practical
22890 design is aimed at simplicity and efficiency.
22891
22892 It consists of two main components, the editor and the shell, and uses
22893 a set of pluggable tools to help the programmer in various ways. Some
22894 example tools are source structure, project manager, interactive help,
22895 workspace...")
22896 (license license:bsd-2)))
22897
22898 (define-public python-osc
22899 (package
22900 (name "python-osc")
22901 (version "1.7.4")
22902 (source
22903 (origin
22904 (method url-fetch)
22905 (uri (pypi-uri "python-osc" version))
22906 (sha256
22907 (base32
22908 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
22909 (build-system python-build-system)
22910 (home-page "https://github.com/attwad/python-osc")
22911 (synopsis "Open Sound Control server and client implementations")
22912 (description
22913 "@code{python-osc} is a pure Python library with no external
22914 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
22915 Open Sound Control 1.0} specification.")
22916 (license license:unlicense)))
22917
22918 (define-public python-voluptuous
22919 (package
22920 (name "python-voluptuous")
22921 (version "0.11.7")
22922 (source
22923 (origin
22924 (method url-fetch)
22925 (uri (pypi-uri "voluptuous" version))
22926 (sha256
22927 (base32
22928 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
22929 (build-system python-build-system)
22930 (native-inputs
22931 `(("python-nose" ,python-nose)))
22932 (home-page "https://github.com/alecthomas/voluptuous")
22933 (synopsis "Python data validation library")
22934 (description
22935 "Voluptuous is a Python data validation library. It is primarily
22936 intended for validating data coming into Python as JSON, YAML, etc.")
22937 (license license:bsd-3)))
22938
22939 (define-public python-cmd2
22940 (package
22941 (name "python-cmd2")
22942 (version "1.0.2")
22943 (source
22944 (origin
22945 (method url-fetch)
22946 (uri (pypi-uri "cmd2" version))
22947 (sha256
22948 (base32
22949 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
22950 (build-system python-build-system)
22951 (propagated-inputs
22952 `(("python-attrs" ,python-attrs)
22953 ("python-colorama" ,python-colorama)
22954 ("python-pyperclip" ,python-pyperclip)
22955 ("python-wcwidth" ,python-wcwidth)))
22956 (native-inputs
22957 `(("python-codecov" ,python-codecov)
22958 ("python-coverage" ,python-coverage)
22959 ("python-doc8" ,python-doc8)
22960 ("python-flake8" ,python-flake8)
22961 ("python-invoke" ,python-invoke)
22962 ("python-mock" ,python-mock)
22963 ("python-pytest" ,python-pytest)
22964 ("python-pytest-cov" ,python-pytest-cov)
22965 ("python-pytest-mock" ,python-pytest-mock)
22966 ("python-setuptools-scm" ,python-setuptools-scm)
22967 ("python-sphinx" ,python-sphinx)
22968 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
22969 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22970 ("python-tox" ,python-tox)
22971 ("python-twine" ,python-twine)
22972 ("which" ,which)))
22973 (home-page "https://github.com/python-cmd2/cmd2")
22974 (synopsis "Tool for building interactive command line applications")
22975 (description
22976 "Cmd2 is a tool for building interactive command line applications in
22977 Python. Its goal is to make it quick and easy for developers to build
22978 feature-rich and user-friendly interactive command line applications. It
22979 provides a simple API which is an extension of Python's built-in @code{cmd}
22980 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
22981 make your life easier and eliminates much of the boilerplate code which would
22982 be necessary when using @code{cmd}.")
22983 (license license:expat)))
22984
22985 (define-public python-pytidylib
22986 (package
22987 (name "python-pytidylib")
22988 (version "0.3.2")
22989 (source (origin
22990 (method url-fetch)
22991 (uri (pypi-uri "pytidylib" version))
22992 (sha256
22993 (base32
22994 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
22995 (build-system python-build-system)
22996 (arguments
22997 '(#:phases
22998 (modify-phases %standard-phases
22999 (add-before 'build 'qualify-libtidy
23000 (lambda* (#:key inputs #:allow-other-keys)
23001 (let ((libtidy (string-append (assoc-ref inputs "tidy")
23002 "/lib/libtidy.so")))
23003 (substitute* "tidylib/tidy.py"
23004 (("ctypes\\.util\\.find_library\\('tidy'\\)")
23005 (format #f "'~a'" libtidy)))
23006 #t))))))
23007 (inputs `(("tidy" ,tidy)))
23008 (home-page "https://github.com/countergram/pytidylib")
23009 (synopsis "Python wrapper for HTML Tidy library")
23010 (description
23011 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
23012 allows you, from Python code, to “fix” invalid (X)HTML markup.")
23013 (license license:expat)))
23014
23015 (define-public python2-pytidylib
23016 (package-with-python2 python-pytidylib))
23017
23018 (define-public python-mujson
23019 (package
23020 (name "python-mujson")
23021 (version "1.4")
23022 (source
23023 (origin
23024 (method url-fetch)
23025 (uri (pypi-uri "mujson" version))
23026 (sha256
23027 (base32
23028 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
23029 (build-system python-build-system)
23030 (home-page "https://github.com/mattgiles/mujson")
23031 (synopsis "Use the fastest JSON functions available at import time")
23032 (description "This package selects the fastest JSON functions available
23033 at import time.")
23034 (license license:expat)))
23035
23036 (define-public python-bashlex
23037 (package
23038 (name "python-bashlex")
23039 (version "0.14")
23040 (source
23041 (origin
23042 (method url-fetch)
23043 (uri (pypi-uri "bashlex" version))
23044 (sha256
23045 (base32
23046 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
23047 (build-system python-build-system)
23048 (arguments
23049 `(#:phases
23050 (modify-phases %standard-phases
23051 (add-before 'build 'pregenerate-yacc-tables
23052 (lambda _
23053 ;; parser.py caches tables, which attempts to write to site lib
23054 ;; see https://github.com/idank/bashlex/issues/51
23055 (invoke "python" "-c" "import bashlex"))))))
23056 (home-page
23057 "https://github.com/idank/bashlex")
23058 (synopsis "Python parser for bash")
23059 (description "@code{bashlex} is a Python port of the parser used
23060 internally by GNU bash.
23061
23062 For the most part it's transliterated from C, the major differences are:
23063
23064 @itemize
23065 @item it does not execute anything
23066 @item it is reentrant
23067 @item it generates a complete AST
23068 @end itemize
23069 ")
23070 (license license:gpl3+)))
23071
23072 (define-public python-jinxed
23073 (package
23074 (name "python-jinxed")
23075 (version "1.0.0")
23076 (source
23077 (origin
23078 (method url-fetch)
23079 (uri (pypi-uri "jinxed" version))
23080 (sha256
23081 (base32
23082 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
23083 (build-system python-build-system)
23084 (arguments
23085 '(#:phases
23086 (modify-phases %standard-phases
23087 (add-before 'check 'set-environment-variables
23088 (lambda* (#:key inputs #:allow-other-keys)
23089 (let ((ncurses (assoc-ref inputs "ncurses")))
23090 (setenv "TERM" "LINUX")
23091 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
23092 #t))))
23093 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
23094 (native-inputs
23095 `(("ncurses" ,ncurses)))
23096 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
23097 (synopsis "Jinxed Terminal Library")
23098 (description
23099 "Jinxed is an implementation of a subset of the Python curses library.")
23100 (license license:mpl2.0)))
23101
23102 (define-public python-blessed
23103 (package
23104 (name "python-blessed")
23105 (version "1.17.8")
23106 (source
23107 (origin
23108 (method url-fetch)
23109 (uri (pypi-uri "blessed" version))
23110 (sha256
23111 (base32
23112 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
23113 (modules '((guix build utils)))
23114 (snippet
23115 '(begin
23116 ;; Don't get hung up on Windows test failures.
23117 (delete-file "blessed/win_terminal.py") #t))))
23118 (build-system python-build-system)
23119 (propagated-inputs
23120 `(("python-jinxed" ,python-jinxed)
23121 ("python-six" ,python-six)
23122 ("python-wcwidth" ,python-wcwidth)))
23123 (native-inputs
23124 `(("python-mock" ,python-mock)
23125 ("python-pytest" ,python-pytest)))
23126 (home-page "https://github.com/jquast/blessed")
23127 (synopsis "Wrapper around terminal capabilities")
23128 (description
23129 "Blessed is a thin, practical wrapper around terminal styling, screen
23130 positioning, and keyboard input.")
23131 (license license:expat)))
23132
23133 (define-public python-readme-renderer
23134 (package
23135 (name "python-readme-renderer")
23136 (version "26.0")
23137 (source
23138 (origin
23139 (method url-fetch)
23140 (uri (pypi-uri "readme_renderer" version))
23141 (sha256
23142 (base32
23143 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
23144 (build-system python-build-system)
23145 (propagated-inputs
23146 `(("python-bleach" ,python-bleach)
23147 ("python-docutils" ,python-docutils)
23148 ("python-pygments" ,python-pygments)
23149 ("python-six" ,python-six)))
23150 (native-inputs
23151 `(("python-mock" ,python-mock)
23152 ("python-pytest" ,python-pytest)))
23153 (home-page "https://github.com/pypa/readme_renderer")
23154 (synopsis "Render README files in Warehouse")
23155 (description
23156 "Readme Renderer is a library that will safely render arbitrary README
23157 files into HTML. It is designed to be used in Warehouse to render the
23158 @code{long_description} for packages. It can handle Markdown, reStructuredText,
23159 and plain text.")
23160 (license license:asl2.0)))
23161
23162 (define-public python-lazr-delegates
23163 (package
23164 (name "python-lazr-delegates")
23165 (version "2.0.4")
23166 (source
23167 (origin
23168 (method url-fetch)
23169 (uri (pypi-uri "lazr.delegates" version))
23170 (sha256
23171 (base32
23172 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
23173 (build-system python-build-system)
23174 (arguments
23175 '(#:phases
23176 (modify-phases %standard-phases
23177 (replace 'check
23178 (lambda _
23179 (invoke "python" "setup.py" "nosetests"))))))
23180 (native-inputs
23181 `(("python-nose" ,python-nose)))
23182 (propagated-inputs
23183 `(("python-zope-interface" ,python-zope-interface)))
23184 (home-page "https://launchpad.net/lazr.delegates")
23185 (synopsis "Easily write objects that delegate behavior")
23186 (description
23187 "The @code{lazr.delegates} package makes it easy to write objects that
23188 delegate behavior to another object. The new object adds some property or
23189 behavior on to the other object, while still providing the underlying interface,
23190 and delegating behavior.")
23191 (license license:lgpl3)))
23192
23193 (define-public python-lazr-config
23194 (package
23195 (name "python-lazr-config")
23196 (version "2.2.2")
23197 (source
23198 (origin
23199 (method url-fetch)
23200 (uri (pypi-uri "lazr.config" version))
23201 (sha256
23202 (base32
23203 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
23204 (build-system python-build-system)
23205 (arguments
23206 '(#:phases
23207 (modify-phases %standard-phases
23208 (replace 'check
23209 (lambda _
23210 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
23211 (native-inputs
23212 `(("python-nose" ,python-nose)))
23213 (propagated-inputs
23214 `(("python-lazr-delegates" ,python-lazr-delegates)
23215 ("python-zope-interface" ,python-zope-interface)))
23216 (home-page "https://launchpad.net/lazr.config")
23217 (synopsis "Create configuration schemas and process and validate configurations")
23218 (description
23219 "The LAZR config system is typically used to manage process configuration.
23220 Process configuration is for saying how things change when we run systems on
23221 different machines, or under different circumstances. This system uses ini-like
23222 file format of section, keys, and values. The config file supports inheritance
23223 to minimize duplication of information across files. The format supports schema
23224 validation.")
23225 (license license:lgpl3)))
23226
23227 (define-public python-flufl-bounce
23228 (package
23229 (name "python-flufl-bounce")
23230 (version "3.0.1")
23231 (source
23232 (origin
23233 (method url-fetch)
23234 (uri (pypi-uri "flufl.bounce" version))
23235 (sha256
23236 (base32
23237 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
23238 (build-system python-build-system)
23239 (propagated-inputs
23240 `(("python-atpublic" ,python-atpublic)
23241 ("python-zope-interface" ,python-zope-interface)))
23242 (native-inputs
23243 `(("python-nose2" ,python-nose2)))
23244 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
23245 (synopsis "Email bounce detectors")
23246 (description "The @code{flufl.bounce} library provides a set of heuristics
23247 and an API for detecting the original bouncing email addresses from a bounce
23248 message. Many formats found in the wild are supported, as are VERP and
23249 RFC 3464.")
23250 (license (list license:asl2.0
23251 license:lgpl3)))) ; only for setup_headers.py
23252
23253 (define-public python-flufl-i18n
23254 (package
23255 (name "python-flufl-i18n")
23256 (version "3.0")
23257 (source
23258 (origin
23259 (method url-fetch)
23260 (uri (pypi-uri "flufl.i18n" version))
23261 (sha256
23262 (base32
23263 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
23264 (build-system python-build-system)
23265 (propagated-inputs
23266 `(("python-atpublic" ,python-atpublic)))
23267 (home-page "https://flufli18n.readthedocs.io")
23268 (synopsis "API for Python internationalization")
23269 (description
23270 "This package provides a high-level, convenient API for managing
23271 internationalization/translation contexts in Python applications. There is a
23272 simple API for single-context applications, such as command line scripts which
23273 only need to translate into one language during the entire course of their
23274 execution. There is a more flexible, but still convenient API for multi-context
23275 applications, such as servers, which may need to switch language contexts for
23276 different tasks.")
23277 (license license:asl2.0)))
23278
23279 (define-public python-flufl-lock
23280 (package
23281 (name "python-flufl-lock")
23282 (version "4.0")
23283 (source
23284 (origin
23285 (method url-fetch)
23286 (uri (pypi-uri "flufl.lock" version))
23287 (sha256
23288 (base32
23289 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
23290 (build-system python-build-system)
23291 (propagated-inputs
23292 `(("python-atpublic" ,python-atpublic)
23293 ("python-psutil" ,python-psutil)))
23294 (home-page "https://flufllock.readthedocs.io")
23295 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
23296 (description
23297 "The @dfn{flufl.lock} package provides NFS-safe file locking with
23298 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
23299 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
23300 and have a maximum lifetime built-in.")
23301 (license (list license:asl2.0
23302 license:lgpl3)))) ; only for setup_helpers.py
23303
23304 (define-public python-flufl-testing
23305 (package
23306 (name "python-flufl-testing")
23307 (version "0.8")
23308 (source
23309 (origin
23310 (method url-fetch)
23311 (uri (pypi-uri "flufl.testing" version))
23312 (sha256
23313 (base32
23314 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
23315 (build-system python-build-system)
23316 (native-inputs
23317 `(("python-nose2" ,python-nose2)))
23318 (home-page "https://gitlab.com/warsaw/flufl.testing")
23319 (synopsis "Collection of test tool plugins")
23320 (description
23321 "This package contains a small collection of test tool plugins for
23322 @code{nose2} and @code{flake8}.")
23323 (license license:asl2.0)))
23324
23325 (define-public python-devtools
23326 (package
23327 (name "python-devtools")
23328 (version "0.6")
23329 (source
23330 (origin
23331 (method git-fetch)
23332 (uri (git-reference
23333 (url "https://github.com/samuelcolvin/python-devtools")
23334 (commit (string-append "v" version))))
23335 (file-name (git-file-name name version))
23336 (sha256
23337 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
23338 (build-system python-build-system)
23339 (native-inputs
23340 `(("python-pytest" ,python-pytest)
23341 ("python-pytest-mock" ,python-pytest-mock)))
23342 (propagated-inputs
23343 `(("python-pygments" ,python-pygments)))
23344 (arguments
23345 `(#:phases (modify-phases %standard-phases
23346 (replace 'check
23347 (lambda _
23348 (invoke "pytest")
23349 #t)))))
23350 (home-page "https://github.com/samuelcolvin/python-devtools")
23351 (synopsis "Debug command and development tools")
23352 (description
23353 "This package provides a debug print command and other development tools.
23354 It adds a simple and readable way to print stuff during development.")
23355 (license license:expat)))
23356
23357 (define-public python-dateparser
23358 (package
23359 (name "python-dateparser")
23360 (version "0.7.6")
23361 (source
23362 (origin
23363 (method url-fetch)
23364 (uri (pypi-uri "dateparser" version))
23365 (sha256
23366 (base32
23367 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
23368 (build-system python-build-system)
23369 (propagated-inputs
23370 `(("python-dateutil" ,python-dateutil)
23371 ("python-pytz" ,python-pytz)
23372 ("python-regex" ,python-regex)
23373 ("python-ruamel.yaml" ,python-ruamel.yaml)
23374 ("python-tzlocal" ,python-tzlocal)))
23375 (native-inputs
23376 `(("python-mock" ,python-mock)
23377 ("python-parameterized" ,python-parameterized)
23378 ("tzdata" ,tzdata-for-tests)))
23379 (arguments
23380 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
23381 #:tests? #f
23382 #:phases
23383 (modify-phases %standard-phases
23384 (add-before 'check 'set-check-environment
23385 (lambda* (#:key inputs #:allow-other-keys)
23386 (setenv "TZ" "UTC")
23387 (setenv "TZDIR"
23388 (string-append (assoc-ref inputs "tzdata")
23389 "/share/zoneinfo"))
23390 #t)))))
23391 (home-page "https://github.com/scrapinghub/dateparser")
23392 (synopsis
23393 "Date parsing library designed to parse dates from HTML pages")
23394 (description
23395 "@code{python-dateparser} provides modules to easily parse localized
23396 dates in almost any string formats commonly found on web pages.")
23397 (license license:bsd-3)))
23398
23399 (define-public python-dparse
23400 (package
23401 (name "python-dparse")
23402 (version "0.5.1")
23403 (source
23404 (origin
23405 (method url-fetch)
23406 (uri (pypi-uri "dparse" version))
23407 (sha256
23408 (base32
23409 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
23410 (build-system python-build-system)
23411 (native-inputs
23412 `(("python-pytest" ,python-pytest)))
23413 (propagated-inputs
23414 `(("python-packaging" ,python-packaging)
23415 ("python-pyyaml" ,python-pyyaml)
23416 ("python-toml" ,python-toml)))
23417 (home-page "https://github.com/pyupio/dparse")
23418 (synopsis "Parser for Python dependency files")
23419 (description "This package provides a parser for Python dependency files.")
23420 (license license:expat)))
23421
23422 (define-public python-dpath
23423 (package
23424 (name "python-dpath")
23425 (version "2.0.1")
23426 (source
23427 (origin
23428 (method url-fetch)
23429 (uri (pypi-uri "dpath" version))
23430 (sha256
23431 (base32
23432 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
23433 (build-system python-build-system)
23434 (native-inputs
23435 `(("python-hypothesis" ,python-hypothesis)
23436 ("python-mock" ,python-mock)
23437 ("python-nose" ,python-nose)))
23438 (arguments
23439 '(#:phases
23440 (modify-phases %standard-phases
23441 (replace 'check
23442 (lambda* (#:key inputs outputs #:allow-other-keys)
23443 (add-installed-pythonpath inputs outputs)
23444 ;; This invokation is taken from tox.ini.
23445 (invoke "nosetests" "-d" "-v" "tests/"))))))
23446 (home-page "https://github.com/akesterson/dpath-python")
23447 (synopsis "Filesystem-like pathing and searching for dictionaries")
23448 (description
23449 "@code{python-dpath} is a library for accessing and searching
23450 dictionaries via /slashed/paths ala xpath.
23451
23452 Basically it lets you glob over a dictionary as if it were a filesystem. It
23453 allows you to specify globs (ala the bash eglob syntax, through some advanced
23454 fnmatch.fnmatch magic) to access dictionary elements, and provides some
23455 facility for filtering those results.")
23456 (license license:expat)))
23457
23458 (define-public python-safety
23459 (package
23460 (name "python-safety")
23461 (version "1.9.0")
23462 (source
23463 (origin
23464 (method url-fetch)
23465 (uri (pypi-uri "safety" version))
23466 (sha256
23467 (base32
23468 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
23469 (build-system python-build-system)
23470 (arguments
23471 `(#:phases
23472 (modify-phases %standard-phases
23473 (add-after 'unpack 'disable-tests
23474 (lambda _
23475 (substitute* "tests/test_safety.py"
23476 ;; requires network
23477 (("def test_check_live") "def _test_check_live"))
23478 #t)))))
23479 (propagated-inputs
23480 `(("python-click" ,python-click)
23481 ("python-dparse" ,python-dparse)
23482 ("python-packaging" ,python-packaging)
23483 ("python-requests" ,python-requests)))
23484 (home-page "https://github.com/pyupio/safety")
23485 (synopsis "Check installed dependencies for known vulnerabilities")
23486 (description "Safety checks installed dependencies for known vulnerabilities.
23487 By default it uses the open Python vulnerability database Safety DB.")
23488 (license license:expat)))
23489
23490 (define-public python-pypandoc
23491 (package
23492 (name "python-pypandoc")
23493 (version "1.5")
23494 (source
23495 (origin
23496 (method url-fetch)
23497 (uri (pypi-uri "pypandoc" version))
23498 (sha256
23499 (base32
23500 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
23501 (build-system python-build-system)
23502 (inputs
23503 `(("pandoc" ,pandoc)
23504 ("pandoc-citeproc" ,pandoc-citeproc)))
23505 (propagated-inputs
23506 `(("wheel" ,python-wheel)))
23507 (native-inputs
23508 `(("texlive" ,(texlive-union (list texlive-amsfonts
23509 texlive-fonts-ec
23510 texlive-latex-hyperref
23511 texlive-latex-oberdiek
23512 texlive-lm
23513 texlive-xcolor)))))
23514 (arguments
23515 `(#:phases
23516 (modify-phases %standard-phases
23517 (add-before 'check 'disable-tests
23518 (lambda _
23519 ;; Disable test requiring network access
23520 (substitute* "tests.py"
23521 (("test_basic_conversion_from_http_url")
23522 "skip_test_basic_conversion_from_http_url"))
23523 ;; Needed by texlive-union to generate fonts
23524 (setenv "HOME" "/tmp")
23525 #t)))))
23526 (home-page "https://github.com/bebraw/pypandoc")
23527 (synopsis "Python wrapper for pandoc")
23528 (description "pypandoc is a thin Python wrapper around pandoc
23529 and pandoc-citeproc.")
23530 (license license:expat)))
23531
23532 (define-public python-rnc2rng
23533 (package
23534 (name "python-rnc2rng")
23535 (version "2.6.4")
23536 (source
23537 (origin
23538 (method url-fetch)
23539 (uri (pypi-uri "rnc2rng" version))
23540 (sha256
23541 (base32
23542 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
23543 (build-system python-build-system)
23544 (propagated-inputs
23545 `(("python-rply" ,python-rply)))
23546 (arguments
23547 `(#:phases (modify-phases %standard-phases
23548 (replace 'check
23549 (lambda _
23550 (invoke "python" "test.py"))))))
23551 (home-page "https://github.com/djc/rnc2rng")
23552 (synopsis "Convert RELAX NG Compact to regular syntax")
23553 (description
23554 "This package provides the @command{rnc2rng} command-line tool as well as
23555 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
23556 equivalent schemata in the XML-based default RELAX NG syntax.")
23557 (license license:expat)))
23558
23559 (define-public python-telethon
23560 (package
23561 (name "python-telethon")
23562 (version "1.17.5")
23563 (source
23564 (origin
23565 (method git-fetch)
23566 (uri (git-reference
23567 (url "https://github.com/LonamiWebs/Telethon")
23568 (commit (string-append "v" version))))
23569 (file-name (git-file-name name version))
23570 (sha256
23571 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
23572 (build-system python-build-system)
23573 (arguments
23574 '(#:phases
23575 (modify-phases %standard-phases
23576 (replace 'check
23577 (lambda* (#:key tests? #:allow-other-keys)
23578 (when tests?
23579 (invoke "py.test" "-v"))
23580 #t)))))
23581 (propagated-inputs
23582 `(("python-rsa" ,python-rsa)
23583 ("python-pyaes" ,python-pyaes)))
23584 (native-inputs
23585 `(("python-pytest" ,python-pytest)
23586 ("python-pytest-asyncio" ,python-pytest-asyncio)
23587 ("python-pytest-trio" ,python-pytest-trio)))
23588 (home-page "https://docs.telethon.dev")
23589 (synopsis "Full-featured Telegram client library for Python 3")
23590 (description "This library is designed to make it easy to write Python
23591 programs that can interact with Telegram.")
23592 (license license:expat)))
23593
23594 (define-public python-citeproc-py
23595 (package
23596 (name "python-citeproc-py")
23597 (version "0.5.1")
23598 (source
23599 (origin
23600 (method url-fetch)
23601 (uri (pypi-uri "citeproc-py" version))
23602 (sha256
23603 (base32
23604 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
23605 (build-system python-build-system)
23606 (propagated-inputs
23607 `(("python-lxml" ,python-lxml)
23608 ("python-rnc2rng" ,python-rnc2rng)))
23609 (home-page
23610 "https://github.com/brechtm/citeproc-py")
23611 (synopsis "Citations and bibliography formatter")
23612 (description
23613 "Citeproc-py is a CSL processor for Python. It aims to implement the
23614 CSL 1.0.1 specification. citeproc-py can output styled citations and
23615 bibliographies in a number of different output formats. Currently supported
23616 are plain text, reStructuredText and HTML.")
23617 (license license:bsd-2)))
23618
23619 (define-public python-inform
23620 (package
23621 (name "python-inform")
23622 (version "1.23.0")
23623 (source
23624 (origin
23625 (method url-fetch)
23626 (uri (pypi-uri "inform" version))
23627 (sha256
23628 (base32
23629 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
23630 (build-system python-build-system)
23631 (arguments
23632 `(#:tests? #f)) ; PyPI tarball lacks tests
23633 (native-inputs
23634 `(("python-hypothesis" ,python-hypothesis)
23635 ("python-pytest-cov" ,python-pytest-cov)
23636 ("python-pytest-runner" ,python-pytest-runner)))
23637 (propagated-inputs
23638 `(("python-arrow" ,python-arrow)
23639 ("python-six" ,python-six)))
23640 (home-page "https://inform.readthedocs.io")
23641 (synopsis "Print & logging utilities for communicating with user")
23642 (description
23643 "Inform is designed to display messages from programs that are typically run from
23644 a console. It provides a collection of ‘print’ functions that allow you to simply and
23645 cleanly print different types of messages.")
23646 (license license:gpl3+)))
23647
23648 (define-public python-nestedtext
23649 (package
23650 (name "python-nestedtext")
23651 (version "1.0.0")
23652 (source
23653 (origin
23654 (method url-fetch)
23655 (uri (pypi-uri "nestedtext" version))
23656 (sha256
23657 (base32
23658 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
23659 (build-system python-build-system)
23660 (arguments
23661 `(#:tests? #f)) ; PyPI tarball lacks tests
23662 (propagated-inputs
23663 `(("python-inform" ,python-inform)))
23664 (home-page "https://nestedtext.org")
23665 (synopsis "Human readable and writable data interchange format")
23666 (description
23667 "NestedText is a file format for holding data that is to be entered, edited, or
23668 viewed by people. It allows data to be organized into a nested collection of
23669 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
23670 without the complexity and risk of YAML and without the syntatic clutter of JSON.
23671 NestedText is both simple and natural. Only a small number of concepts and rules must
23672 be kept in mind when creating it. It is easily created, modified, or viewed with
23673 a text editor and easily understood and used by both programmers and non-programmers.")
23674 (license license:expat))) ; MIT license
23675
23676 (define-public python-parallel
23677 (package
23678 (name "python-parallel")
23679 (version "1.6.4.4")
23680 (source
23681 (origin
23682 (method url-fetch)
23683 (uri (string-append
23684 "https://www.parallelpython.com/downloads/pp/pp-"
23685 version ".zip"))
23686 (sha256
23687 (base32
23688 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
23689 (native-inputs
23690 `(("unzip" ,unzip)))
23691 (build-system python-build-system)
23692 (arguments '(#:tests? #f)) ; No test suite.
23693 (home-page "https://www.parallelpython.com")
23694 (synopsis "Parallel and distributed programming for Python")
23695 (description "Parallel Python module (PP) provides an easy and efficient
23696 way to create parallel-enabled applications for SMP computers and clusters.
23697 PP module features cross-platform portability and dynamic load balancing.
23698 Thus applications written with PP will parallelize efficiently even on
23699 heterogeneous and multi-platform clusters (including clusters running other
23700 applications with variable CPU loads).")
23701 (license license:bsd-3)))
23702
23703 (define-public python2-parallel
23704 (package-with-python2 python-parallel))
23705
23706 (define-public python-djvulibre
23707 (package
23708 (name "python-djvulibre")
23709 (version "0.8.5")
23710 (source
23711 (origin
23712 (method url-fetch)
23713 (uri (pypi-uri "python-djvulibre" version))
23714 (sha256
23715 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
23716 (build-system python-build-system)
23717 (native-inputs
23718 `(("ghostscript" ,ghostscript)
23719 ("pkg-config" ,pkg-config)
23720 ("python-nose" ,python-nose)))
23721 (inputs
23722 `(("djvulibre" ,djvulibre)
23723 ("python-cython" ,python-cython)))
23724 (arguments
23725 `(#:phases
23726 (modify-phases %standard-phases
23727 (add-after 'unpack 'fix-tests
23728 (lambda _
23729 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23730 ;; doesn't make sense on GNU/Linux.
23731 (delete-file "djvu/dllpath.py")
23732 #t)))))
23733 (synopsis "Python bindings for DjVuLibre")
23734 (description "This is a set of Python bindings for the DjVuLibre library.")
23735 (home-page "https://jwilk.net/software/python-djvulibre")
23736 (license license:gpl2)))
23737
23738 (define-public python2-djvulibre
23739 (package-with-python2 python-djvulibre))
23740
23741 (define-public python-versioneer
23742 (package
23743 (name "python-versioneer")
23744 (version "0.19")
23745 (source
23746 (origin
23747 (method url-fetch)
23748 (uri (pypi-uri "versioneer" version))
23749 (sha256
23750 (base32
23751 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
23752 (build-system python-build-system)
23753 (home-page
23754 "https://github.com/python-versioneer/python-versioneer")
23755 (synopsis
23756 "Version-string management for VCS-controlled trees")
23757 (description
23758 "@code{versioneer} is a tool for managing a recorded version number in
23759 distutils-based python projects. The goal is to remove the tedious and
23760 error-prone \"update the embedded version string\" step from your release
23761 process.")
23762 (license license:public-domain)))
23763
23764 (define-public python2-gamera
23765 (package
23766 (name "python2-gamera")
23767 (version "3.4.4")
23768 (source
23769 (origin
23770 (method url-fetch)
23771 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
23772 "gamera-" version ".tar.gz"))
23773 (sha256
23774 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
23775 (modules '((guix build utils)))
23776 (snippet
23777 '(begin
23778 ;; Remove bundled libraries.
23779 (for-each delete-file-recursively
23780 '("src/libpng-1.2.5"
23781 "src/libtiff"
23782 "src/zlib-1.2.8"))))))
23783 (build-system python-build-system)
23784 (inputs
23785 `(("libpng" ,libpng)
23786 ("libtiff" ,libtiff)
23787 ("python2-wxpython" ,python2-wxpython)
23788 ("zlib" ,zlib)))
23789 (arguments
23790 `(#:python ,python-2))
23791 (synopsis "Framework for building document analysis applications")
23792 (description
23793 "Gamera is a toolkit for building document image recognition systems.")
23794 (home-page "https://gamera.informatik.hsnr.de/")
23795 (license license:gpl2+)))
23796
23797 (define-public python-contextvars
23798 (package
23799 (name "python-contextvars")
23800 (version "2.4")
23801 (source
23802 (origin
23803 (method url-fetch)
23804 (uri (pypi-uri "contextvars" version))
23805 (sha256
23806 (base32
23807 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
23808 (build-system python-build-system)
23809 (propagated-inputs
23810 `(("python-immutables" ,python-immutables)))
23811 (home-page
23812 "https://github.com/MagicStack/contextvars")
23813 (synopsis "PEP 567 Backport")
23814 (description "This package implements a backport of Python 3.7
23815 @code{contextvars} module (see PEP 567) for Python 3.6.")
23816 (license license:asl2.0)))
23817
23818 (define-public python-aiofiles
23819 (package
23820 (name "python-aiofiles")
23821 (version "0.6.0")
23822 (source
23823 (origin
23824 (method url-fetch)
23825 (uri (pypi-uri "aiofiles" version))
23826 (sha256
23827 (base32
23828 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
23829 (build-system python-build-system)
23830 (home-page "https://github.com/Tinche/aiofiles")
23831 (synopsis "File support for @code{asyncio}")
23832 (description "@code{python-aiofiles} is a library for handling local
23833 disk files in asyncio applications.")
23834 (license license:asl2.0)))
23835
23836 (define-public python-pyre-extensions
23837 (package
23838 (name "python-pyre-extensions")
23839 (version "0.0.18")
23840 (source
23841 (origin
23842 (method url-fetch)
23843 (uri (pypi-uri "pyre-extensions" version))
23844 (sha256
23845 (base32
23846 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
23847 (build-system python-build-system)
23848 (propagated-inputs
23849 `(("python-typing-extensions"
23850 ,python-typing-extensions)
23851 ("python-typing-inspect" ,python-typing-inspect)))
23852 (home-page "https://pyre-check.org")
23853 (synopsis
23854 "Type system extensions for use with @code{python-pyre}")
23855 (description
23856 "@code{python-pyre-extensions} defines extensions to the standard
23857 @code{typing} module that are supported by the Pyre typechecker.")
23858 (license license:expat)))
23859
23860 (define-public python-dataclasses
23861 (package
23862 (name "python-dataclasses")
23863 (version "0.7")
23864 (source
23865 (origin
23866 (method url-fetch)
23867 (uri (pypi-uri "dataclasses" version))
23868 (sha256
23869 (base32
23870 "1rh8111fbws2vxyf2qy2zw3x6p6cq1jfz8pf904gig5qwg56sjj9"))))
23871 (build-system python-build-system)
23872 (home-page
23873 "https://github.com/ericvsmith/dataclasses")
23874 (synopsis
23875 "Backport of the @code{dataclasses} module for Python 3.6")
23876 (description
23877 "This is an implementation of PEP 557, Data Classes. It is a
23878 backport of the @code{dataclasses} module for Python 3.6.")
23879 (license license:asl2.0)))
23880
23881 (define-public python-pywatchman
23882 (package
23883 (name "python-pywatchman")
23884 (version "1.4.1")
23885 (source
23886 (origin
23887 (method url-fetch)
23888 (uri (pypi-uri "pywatchman" version))
23889 (sha256
23890 (base32
23891 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
23892 (build-system python-build-system)
23893 (arguments
23894 `(#:tests? #f)) ;there are none
23895 (home-page
23896 "https://facebook.github.io/watchman/")
23897 (synopsis "Watchman client for python")
23898 (description "@code{python-pywatchman} is a library to connect and
23899 query Watchman to discover file changes.")
23900 (license license:bsd-3)))
23901
23902 (define-public python-helpdev
23903 (package
23904 (name "python-helpdev")
23905 (version "0.7.1")
23906 (source
23907 (origin
23908 (method url-fetch)
23909 (uri (pypi-uri "helpdev" version))
23910 (sha256
23911 (base32
23912 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
23913 (build-system python-build-system)
23914 (arguments
23915 `(#:phases
23916 (modify-phases %standard-phases
23917 (replace 'check
23918 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
23919 (when tests?
23920 (add-installed-pythonpath inputs outputs)
23921 (invoke "pytest" "tests"))
23922 #t)))))
23923 (propagated-inputs
23924 `(("python-importlib-metadata" ,python-importlib-metadata)))
23925 (native-inputs
23926 `(("python-pytest" ,python-pytest)))
23927 (home-page "https://gitlab.com/dpizetta/helpdev")
23928 (synopsis
23929 "Extract information about the Python environment easily")
23930 (description
23931 "Helpdev is a library to easily extract information about the Python
23932 environment.")
23933 (license license:expat)))
23934
23935 (define-public python-qdarkstyle
23936 (package
23937 (name "python-qdarkstyle")
23938 (version "2.8.1")
23939 (source
23940 (origin
23941 (method url-fetch)
23942 (uri (pypi-uri "QDarkStyle" version))
23943 (sha256
23944 (base32
23945 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
23946 (build-system python-build-system)
23947 (arguments
23948 `(;; Fails unable to detect valid Qt bindings even when
23949 ;; added as native-inputs.
23950 #:tests? #f))
23951 (propagated-inputs
23952 `(("python-helpdev" ,python-helpdev)
23953 ("python-qtpy" ,python-qtpy)))
23954 (home-page
23955 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
23956 (synopsis
23957 "Complete dark stylesheet for Python and Qt applications")
23958 (description "QDarkStyle is the most complete dark stylesheet for Python and
23959 Qt applications.")
23960 (license license:expat)))
23961
23962 (define-public python-bitstring
23963 (package
23964 (name "python-bitstring")
23965 (version "3.1.7")
23966 (source
23967 (origin
23968 (method url-fetch)
23969 (uri (pypi-uri "bitstring" version))
23970 (sha256
23971 (base32
23972 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
23973 (build-system python-build-system)
23974 (arguments
23975 `(#:phases
23976 (modify-phases %standard-phases
23977 (replace 'check
23978 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
23979 (when tests?
23980 (add-installed-pythonpath inputs outputs)
23981 (with-directory-excursion "test"
23982 (invoke "pytest")))
23983 #t)))))
23984 (native-inputs
23985 `(("python-pytest" ,python-pytest)))
23986 (home-page "https://github.com/scott-griffiths/bitstring")
23987 (synopsis
23988 "Simple construction, analysis and modification of binary data")
23989 (description
23990 "Bitstring is a library for simple construction, analysis and modification
23991 of binary data.")
23992 (license license:expat)))
23993
23994 (define-public python-confuse
23995 (package
23996 (name "python-confuse")
23997 (version "1.4.0")
23998 (source
23999 (origin
24000 (method url-fetch)
24001 (uri (pypi-uri "confuse" version))
24002 (sha256
24003 (base32
24004 "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j"))))
24005 (build-system python-build-system)
24006 (propagated-inputs
24007 `(("python-pathlib" ,python-pathlib)
24008 ("python-pyyaml" ,python-pyyaml)))
24009 (home-page "https://github.com/beetbox/confuse")
24010 (synopsis "Painless YAML configuration.")
24011 (description "Confuse is a configuration library for Python that uses
24012 YAML. It takes care of defaults, overrides, type checking, command-line
24013 integration, human-readable errors, and standard OS-specific locations.")
24014 (license license:expat)))
24015
24016 (define-public python-reflink
24017 (package
24018 (name "python-reflink")
24019 (version "0.2.1")
24020 (source
24021 (origin
24022 (method url-fetch)
24023 (uri (pypi-uri "reflink" version))
24024 (sha256
24025 (base32
24026 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
24027 (build-system python-build-system)
24028 (arguments
24029 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
24030 (propagated-inputs
24031 `(("python-cffi" ,python-cffi)))
24032 (native-inputs
24033 `(("python-pytest" ,python-pytest)
24034 ("python-pytest-runner" ,python-pytest-runner)))
24035 (home-page "https://gitlab.com/rubdos/pyreflink")
24036 (synopsis "Python wrapper around reflink system call")
24037 (description
24038 "Python reflink wraps around platform specific @code{reflink}
24039 implementations.")
24040 (license license:expat)))
24041
24042 (define-public python-pivy
24043 (package
24044 (name "python-pivy")
24045 (version "0.6.5")
24046 (source
24047 (origin
24048 (method git-fetch)
24049 (uri (git-reference
24050 (url "https://github.com/coin3d/pivy")
24051 (commit version)))
24052 (file-name (git-file-name name version))
24053 (sha256
24054 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
24055 (build-system python-build-system)
24056 (arguments
24057 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
24058 #:tests? #f
24059 #:phases
24060 (modify-phases %standard-phases
24061 (add-after 'unpack 'patch-cmake-include-dirs
24062 (lambda _
24063 ;; Patch buildsystem to respect Coin3D include directory
24064 (substitute* "CMakeLists.txt"
24065 (("\\$\\{SoQt_INCLUDE_DIRS}")
24066 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
24067 #t)))))
24068 (native-inputs
24069 `(("cmake" ,cmake)
24070 ("swig" ,swig)))
24071 (inputs
24072 `(("python-wrapper" ,python-wrapper)
24073 ("qtbase" ,qtbase)
24074 ("libxi" ,libxi)
24075 ("libice" ,libice)
24076 ("soqt" ,soqt)
24077 ("glew" ,glew)
24078 ("coin3D" ,coin3D-4)))
24079 (home-page "https://github.com/coin3d/pivy")
24080 (synopsis "Python bindings to Coin3D")
24081 (description
24082 "Pivy provides python bindings for Coin, a 3D graphics library with an
24083 Application Programming Interface based on the Open Inventor 2.1 API.")
24084 (license license:isc)))
24085
24086 (define-public python-crayons
24087 (package
24088 (name "python-crayons")
24089 (version "0.4.0")
24090 (source
24091 (origin
24092 (method url-fetch)
24093 (uri (pypi-uri "crayons" version))
24094 (sha256
24095 (base32
24096 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
24097 (build-system python-build-system)
24098 (propagated-inputs
24099 `(("python-colorama" ,python-colorama)))
24100 (home-page "https://github.com/MasterOdin/crayons")
24101 (synopsis "TextUI colors for Python")
24102 (description "This package gives you colored strings for the terminal.
24103 Crayons automatically wraps a given string in the foreground color and
24104 restores the original state after the string is printed.")
24105 (license license:expat)))
24106
24107 (define-public python-sane
24108 (package
24109 (name "python-sane")
24110 (version "2.9.1")
24111 (source
24112 (origin
24113 (method url-fetch)
24114 (uri (pypi-uri name version))
24115 (sha256
24116 (base32
24117 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
24118 (build-system python-build-system)
24119 (native-inputs
24120 `(("python-pytest" ,python-pytest)))
24121 (inputs
24122 `(("sane-backends" ,sane-backends)))
24123 (home-page "https://github.com/python-pillow/Sane")
24124 (synopsis "Python interface to the SANE scanner")
24125 (description "This package provides Python interface to the SANE scanner
24126 and frame grabber interface.")
24127 (license (license:non-copyleft
24128 ;; Yet another variant of the X/MIT license.
24129 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
24130
24131 (define-public python-screenkey
24132 (package
24133 (name "python-screenkey")
24134 (version "1.4")
24135 (source
24136 (origin
24137 (method git-fetch)
24138 (uri (git-reference
24139 (url "https://gitlab.com/screenkey/screenkey")
24140 (commit (string-append "v" version))))
24141 (file-name (git-file-name name version))
24142 (sha256
24143 (base32
24144 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
24145 (build-system python-build-system)
24146 (arguments
24147 `(#:phases
24148 (modify-phases %standard-phases
24149 (add-after 'unpack 'fix-dlopen-paths
24150 (lambda* (#:key inputs outputs #:allow-other-keys)
24151 (let* ((x11 (assoc-ref inputs "libx11"))
24152 (xtst (assoc-ref inputs "libxtst")))
24153 (substitute* "Screenkey/xlib.py"
24154 (("libX11.so.6")
24155 (string-append x11 "/lib/libX11.so.6")))
24156 (substitute* "Screenkey/xlib.py"
24157 (("libXtst.so.6")
24158 (string-append xtst "/lib/libXtst.so.6")))
24159 #t)))
24160 (add-after 'install 'wrap-screenkey
24161 (lambda* (#:key outputs #:allow-other-keys)
24162 (wrap-program
24163 (string-append (assoc-ref outputs "out") "/bin/screenkey")
24164 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
24165 `("GI_TYPELIB_PATH"
24166 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
24167 #t)))))
24168 (inputs
24169 `(("python-distutils-extra" ,python-distutils-extra)
24170 ("python-tokenize-rt" ,python-tokenize-rt)
24171 ("libx11" ,libx11)
24172 ("libxtst" ,libxtst)
24173 ("gtk+" ,gtk+)
24174 ("python-pygobject" ,python-pygobject)
24175 ("python-pycairo" ,python-pycairo)
24176 ("python-setuptools-git" ,python-setuptools-git)
24177 ("python-babel" ,python-babel)))
24178 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
24179 (synopsis
24180 "Screencast tool to display pressed keys")
24181 (description
24182 "A screencast tool to display your keys inspired by Screenflick.")
24183 (license license:gpl3+)))
24184
24185 (define-public python-jinja2-cli
24186 (package
24187 (name "python-jinja2-cli")
24188 (version "0.7.0")
24189 (source
24190 (origin
24191 (method url-fetch)
24192 (uri (pypi-uri "jinja2-cli" version))
24193 (sha256
24194 (base32
24195 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
24196 (build-system python-build-system)
24197 (propagated-inputs
24198 `(("python-jinja2" ,python-jinja2)))
24199 (native-inputs
24200 `(("python-flake8" ,python-flake8)
24201 ("python-jinja2" ,python-jinja2)
24202 ("python-pytest" ,python-pytest)))
24203 (home-page "https://github.com/mattrobenolt/jinja2-cli")
24204 (synopsis "Command-line interface to Jinja2")
24205 (description
24206 "This package provides a command-line interface (CLI) to the Jinja2
24207 template engine.")
24208 (license license:bsd-3)))
24209
24210 (define-public python-readability
24211 (package
24212 (name "python-readability")
24213 (version "0.3.1")
24214 (source
24215 (origin
24216 (method url-fetch)
24217 (uri (pypi-uri "readability" version))
24218 (sha256
24219 (base32
24220 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
24221 (build-system python-build-system)
24222 (home-page
24223 "https://github.com/andreasvc/readability/")
24224 (synopsis
24225 "Measure the readability of a given text using surface
24226 characteristics")
24227 (description
24228 "This package provides a Python library that is an implementation of
24229 traditional readability measures based on simple surface
24230 characteristics. These measures are basically linear regressions based on the
24231 number of words, syllables, and sentences.")
24232 (license license:asl2.0)))
24233
24234 (define-public python-listparser
24235 (package
24236 (name "python-listparser")
24237 (version "0.18")
24238 (source
24239 (origin
24240 (method url-fetch)
24241 (uri (pypi-uri "listparser" version))
24242 (sha256
24243 (base32
24244 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
24245 (build-system python-build-system)
24246 (home-page
24247 "https://github.com/kurtmckee/listparser")
24248 (synopsis
24249 "Parse subscription lists in Python")
24250 (description
24251 "This package provides a Python library that can parse OPML, FOAF, and
24252 iGoogle subscription lists.")
24253 (license license:expat)))