gnu: python-lfdfiles: Update to 2021.2.22.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017, 2021 Eric Bavier <bavier@posteo.net>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016, 2020 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017, 2020 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
30 ;;; Copyright © 2016, 2017, 2021 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
32 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
33 ;;; Copyright © 2016, 2017, 2018, 2020, 2021 Julien Lepiller <julien@lepiller.eu>
34 ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
35 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
36 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
37 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
38 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
39 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
40 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
41 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
42 ;;; Copyright © 2017, 2020, 2021 Roel Janssen <roel@gnu.org>
43 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
45 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
46 ;;; Copyright © 2017, 2019, 2021 Brendan Tildesley <mail@brendan.scot>
47 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
48 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
49 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
50 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
51 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
52 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
53 ;;; Copyright © 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
54 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
55 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
56 ;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
57 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
58 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
59 ;;; Copyright © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
60 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
72 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
73 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
74 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
75 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
76 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
77 ;;; Copyright © 2020, 2021 Alexandros Theodotou <alex@zrythm.org>
78 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
79 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
80 ;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
81 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
82 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
83 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
84 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
85 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
86 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
87 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
88 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
89 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
90 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
91 ;;; Copyright © 2020 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.com>
92 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
93 ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
94 ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
95 ;;; Copyright © 2019 Kristian Trandem <kristian@devup.no>
96 ;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com>
97 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
98 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
99 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
100 ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
101 ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
102 ;;;
103 ;;; This file is part of GNU Guix.
104 ;;;
105 ;;; GNU Guix is free software; you can redistribute it and/or modify it
106 ;;; under the terms of the GNU General Public License as published by
107 ;;; the Free Software Foundation; either version 3 of the License, or (at
108 ;;; your option) any later version.
109 ;;;
110 ;;; GNU Guix is distributed in the hope that it will be useful, but
111 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
112 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
113 ;;; GNU General Public License for more details.
114 ;;;
115 ;;; You should have received a copy of the GNU General Public License
116 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
117
118 (define-module (gnu packages python-xyz)
119 #:use-module ((guix licenses) #:prefix license:)
120 #:use-module (gnu packages)
121 #:use-module (gnu packages algebra)
122 #:use-module (gnu packages adns)
123 #:use-module (gnu packages aidc)
124 #:use-module (gnu packages attr)
125 #:use-module (gnu packages backup)
126 #:use-module (gnu packages bash)
127 #:use-module (gnu packages check)
128 #:use-module (gnu packages cmake)
129 #:use-module (gnu packages compression)
130 #:use-module (gnu packages crypto)
131 #:use-module (gnu packages databases)
132 #:use-module (gnu packages dbm)
133 #:use-module (gnu packages djvu)
134 #:use-module (gnu packages docker)
135 #:use-module (gnu packages enchant)
136 #:use-module (gnu packages file)
137 #:use-module (gnu packages fontutils)
138 #:use-module (gnu packages gcc)
139 #:use-module (gnu packages geo)
140 #:use-module (gnu packages ghostscript)
141 #:use-module (gnu packages gl)
142 #:use-module (gnu packages glib)
143 #:use-module (gnu packages gnome)
144 #:use-module (gnu packages gnupg)
145 #:use-module (gnu packages graphviz)
146 #:use-module (gnu packages graphics)
147 #:use-module (gnu packages gsasl)
148 #:use-module (gnu packages gstreamer)
149 #:use-module (gnu packages gtk)
150 #:use-module (gnu packages haskell-xyz)
151 #:use-module (gnu packages icu4c)
152 #:use-module (gnu packages image)
153 #:use-module (gnu packages imagemagick)
154 #:use-module (gnu packages jupyter)
155 #:use-module (gnu packages kerberos)
156 #:use-module (gnu packages libevent)
157 #:use-module (gnu packages libffi)
158 #:use-module (gnu packages libidn)
159 #:use-module (gnu packages linux)
160 #:use-module (gnu packages llvm)
161 #:use-module (gnu packages man)
162 #:use-module (gnu packages markup)
163 #:use-module (gnu packages maths)
164 #:use-module (gnu packages monitoring)
165 #:use-module (gnu packages multiprecision)
166 #:use-module (gnu packages networking)
167 #:use-module (gnu packages ncurses)
168 #:use-module (gnu packages openstack)
169 #:use-module (gnu packages pcre)
170 #:use-module (gnu packages pdf)
171 #:use-module (gnu packages perl)
172 #:use-module (gnu packages photo)
173 #:use-module (gnu packages pkg-config)
174 #:use-module (gnu packages python)
175 #:use-module (gnu packages python-build)
176 #:use-module (gnu packages python-check)
177 #:use-module (gnu packages python-compression)
178 #:use-module (gnu packages python-crypto)
179 #:use-module (gnu packages python-science)
180 #:use-module (gnu packages python-web)
181 #:use-module (gnu packages qt)
182 #:use-module (gnu packages rdf)
183 #:use-module (gnu packages readline)
184 #:use-module (gnu packages sdl)
185 #:use-module (gnu packages search)
186 #:use-module (gnu packages scanner)
187 #:use-module (gnu packages shells)
188 #:use-module (gnu packages sphinx)
189 #:use-module (gnu packages ssh)
190 #:use-module (gnu packages swig)
191 #:use-module (gnu packages terminals)
192 #:use-module (gnu packages tex)
193 #:use-module (gnu packages texinfo)
194 #:use-module (gnu packages textutils)
195 #:use-module (gnu packages time)
196 #:use-module (gnu packages tls)
197 #:use-module (gnu packages version-control)
198 #:use-module (gnu packages video)
199 #:use-module (gnu packages web)
200 #:use-module (gnu packages wxwidgets)
201 #:use-module (gnu packages base)
202 #:use-module (gnu packages xml)
203 #:use-module (gnu packages xorg)
204 #:use-module (gnu packages xdisorg)
205 #:use-module (gnu packages tcl)
206 #:use-module (gnu packages bdw-gc)
207 #:use-module (gnu packages serialization)
208 #:use-module (guix packages)
209 #:use-module (guix download)
210 #:use-module (guix git-download)
211 #:use-module (guix hg-download)
212 #:use-module (guix utils)
213 #:use-module (guix build-system gnu)
214 #:use-module (guix build-system cmake)
215 #:use-module (guix build-system python)
216 #:use-module (guix build-system trivial)
217 #:use-module (srfi srfi-1)
218 #:use-module (srfi srfi-26))
219
220 (define-public python-slixmpp
221 (package
222 (name "python-slixmpp")
223 (version "1.5.2")
224 (source
225 (origin
226 (method git-fetch)
227 (uri
228 (git-reference
229 (url "https://lab.louiz.org/poezio/slixmpp.git")
230 (commit
231 (string-append "slix-" version))))
232 (file-name
233 (git-file-name name version))
234 (sha256
235 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
236 (build-system python-build-system)
237 (arguments
238 `(#:phases
239 (modify-phases %standard-phases
240 (add-after 'unpack 'patch
241 (lambda _
242 (substitute* "setup.py"
243 (("'CC', 'cc'")
244 "'CC', 'gcc'"))
245 #t)))))
246 (native-inputs
247 `(("cython" ,python-cython)
248 ("gnupg" ,gnupg)
249 ("pkg-config" ,pkg-config)))
250 (propagated-inputs
251 `(("python-aiodns" ,python-aiodns)
252 ("python-aiohttp" ,python-aiohttp)
253 ("python-pyasn1" ,python-pyasn1)
254 ("python-pyasn1-modules" ,python-pyasn1-modules)))
255 (inputs
256 `(("libidn" ,libidn)
257 ("python" ,python))) ; We are building a Python extension.
258 (synopsis "XMPP library without threads")
259 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
260 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
261 socket handling, the timers, the events dispatching) in order to remove all
262 threads.")
263 (home-page "https://lab.louiz.org/poezio/slixmpp")
264 (license license:expat)))
265
266 (define-public python-tenacity
267 (package
268 (name "python-tenacity")
269 (version "6.1.0")
270 (source (origin
271 (method url-fetch)
272 (uri (pypi-uri "tenacity" version))
273 (sha256
274 (base32
275 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
276 (build-system python-build-system)
277 (native-inputs
278 `(("python-setuptools-scm" ,python-setuptools-scm)
279 ("python-sphinx" ,python-sphinx)
280 ("python-tornado" ,python-tornado)
281 ("python-pytest" ,python-pytest)))
282 (propagated-inputs
283 `(("python-six" ,python-six)))
284 (arguments
285 `(#:phases (modify-phases %standard-phases
286 (replace 'check
287 (lambda _
288 (invoke "pytest")
289 #t)))))
290 (home-page "https://github.com/jd/tenacity")
291 (synopsis "Retrying library for python")
292 (description "Tenacity is a general-purpose python library to simplify the
293 task of adding retry behavior to just about anything.")
294 (license license:asl2.0)))
295
296 (define-public python-pytelegrambotapi
297 (package
298 (name "python-pytelegrambotapi")
299 (version "3.7.4")
300 (source
301 (origin
302 (method git-fetch)
303 (uri (git-reference
304 (url "https://github.com/eternnoir/pyTelegramBotAPI")
305 (commit version)))
306 (file-name (git-file-name name version))
307 (sha256
308 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
309 (build-system python-build-system)
310 (arguments
311 `(#:phases
312 (modify-phases %standard-phases
313 (replace 'check
314 (lambda* (#:key tests? #:allow-other-keys)
315 (when tests?
316 (with-directory-excursion "tests"
317 (invoke "py.test")))
318 #t)))))
319 (propagated-inputs
320 `(("python-requests" ,python-requests)))
321 (native-inputs
322 `(("python-pytest" ,python-pytest)))
323 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
324 (synopsis "Python Telegram bot api")
325 (description "This package provides a simple, but extensible Python
326 implementation for the Telegram Bot API.")
327 (license license:gpl2)))
328
329 (define-public python-colorlog
330 (package
331 (name "python-colorlog")
332 (version "4.1.0")
333 (source (origin
334 (method url-fetch)
335 (uri (pypi-uri "colorlog" version))
336 (sha256
337 (base32
338 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
339 (build-system python-build-system)
340 (native-inputs
341 `(("python-pytest" ,python-pytest)))
342 (arguments
343 `(#:phases (modify-phases %standard-phases
344 (replace 'check
345 (lambda _
346 ;; Extend PYTHONPATH so the built package will be found.
347 (setenv "PYTHONPATH"
348 (string-append (getcwd) "/build/lib:"
349 (getenv "PYTHONPATH")))
350 (invoke "pytest" "-p" "no:logging")
351 #t)))))
352 (home-page "https://github.com/borntyping/python-colorlog")
353 (synopsis "Log formatting with colors for python")
354 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
355 with Python's logging module that outputs records using terminal colors.")
356 (license license:expat)))
357
358 (define-public python-pyprind
359 (package
360 (name "python-pyprind")
361 (version "2.11.2")
362 (source (origin
363 (method url-fetch)
364 (uri (pypi-uri "PyPrind" version))
365 (sha256
366 (base32
367 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
368 (build-system python-build-system)
369 (propagated-inputs
370 `(("python-psutil" ,python-psutil)))
371 (home-page "https://github.com/rasbt/pyprind")
372 (synopsis "Python Progress Bar and Percent Indicator Utility")
373 (description "The PyPrind (Python Progress Indicator) module provides a
374 progress bar and a percentage indicator object that let you track the progress
375 of a loop structure or other iterative computation.")
376 (license license:bsd-3)))
377
378 (define-public python-gphoto2
379 (package
380 (name "python-gphoto2")
381 (version "2.2.1")
382 (source (origin
383 (method url-fetch)
384 (uri (pypi-uri "gphoto2" version))
385 (sha256
386 (base32
387 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
388 (build-system python-build-system)
389 (native-inputs
390 `(("pkg-config" ,pkg-config)))
391 (inputs
392 `(("libgphoto2" ,libgphoto2)))
393 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
394 (synopsis "Python interface to libgphoto2")
395 (description "@code{python-gphoto2} is a comprehensive Python interface
396 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
397 automatically generate the interface code.")
398 (license license:gpl3+)))
399
400 (define-public python-colour
401 (package
402 (name "python-colour")
403 (version "0.1.5")
404 (source (origin
405 (method url-fetch)
406 (uri (pypi-uri "colour" version))
407 (sha256
408 (base32
409 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
410 (build-system python-build-system)
411 (native-inputs
412 `(("python-d2to1" ,python-d2to1)))
413 (home-page "https://github.com/vaab/colour")
414 (synopsis "Convert and manipulate various color representations")
415 (description "Pythonic way to manipulate color representations (HSL, RVB,
416 web, X11, ...).")
417 (license license:expat)))
418
419 (define-public python-d2to1
420 (package
421 (name "python-d2to1")
422 (version "0.2.12.post1")
423 (source (origin
424 (method url-fetch)
425 (uri (pypi-uri "d2to1" version))
426 (sha256
427 (base32
428 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
429 (build-system python-build-system)
430 (native-inputs
431 `(("python-nose" ,python-nose)))
432 (home-page "https://github.com/embray/d2to1")
433 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
434 in python")
435 (description "The python package d2to1 (the d is for distutils) allows
436 using distutils2-like setup.cfg files for a package's metadata with a
437 distribute/setuptools setup.py script.")
438 (license license:bsd-2)))
439
440 (define-public python-rawkit
441 (package
442 (name "python-rawkit")
443 (version "0.6.0")
444 (source (origin
445 (method url-fetch)
446 (uri (pypi-uri "rawkit" version))
447 (sha256
448 (base32
449 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
450 (build-system python-build-system)
451 (native-inputs
452 `(("python-pytest" ,python-pytest)
453 ("python-mock" ,python-mock)))
454 (inputs
455 `(("libraw" ,libraw)))
456 (home-page "https://rawkit.readthedocs.io")
457 (synopsis "Ctypes-based LibRaw binding for Python")
458 (description "The rawkit package provides two modules: rawkit and libraw.
459 The rawkit module provides a high-level Pythonic interface for developing raw
460 photos, while the libraw module provides a CTypes based interface for
461 interacting with the low-level LibRaw C APIs.")
462 (license license:expat)))
463
464 (define-public python-easygui
465 (package
466 (name "python-easygui")
467 (version "0.98.1")
468 (source (origin
469 (method url-fetch)
470 (uri (pypi-uri "easygui" version))
471 (sha256
472 (base32
473 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
474 (build-system python-build-system)
475 (propagated-inputs
476 `(("python-tkinter" ,python "tk")))
477 (home-page "https://github.com/robertlugg/easygui")
478 (synopsis "GUI programming module for Python")
479 (description "EasyGUI is a module for very simple, very easy GUI
480 programming in Python. EasyGUI is different from other GUI generators in that
481 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
482 simple function calls.")
483 (license license:bsd-3)))
484
485 (define-public python-pymd4c
486 (package
487 (name "python-pymd4c")
488 (version "0.4.6.0b1")
489 (source
490 (origin
491 (method url-fetch)
492 (uri (pypi-uri "pymd4c" version))
493 (sha256
494 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
495 (build-system python-build-system)
496 (inputs
497 `(("md4c" ,md4c)))
498 (native-inputs
499 `(("python-flake8" ,python-flake8)
500 ("python-pkgconfig" ,python-pkgconfig)
501 ("pkg-config" ,pkg-config)))
502 (home-page "https://github.com/dominickpastore/pymd4c")
503 (synopsis "Python bindings for MD4C")
504 (description
505 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
506 to CommonMark.")
507 (license license:expat)))
508
509 (define-public python-pymediainfo
510 (package
511 (name "python-pymediainfo")
512 (version "4.1")
513 (source
514 (origin
515 (method url-fetch)
516 (uri (pypi-uri "pymediainfo" version))
517 (sha256
518 (base32
519 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
520 (build-system python-build-system)
521 (native-inputs
522 `(("python-setuptools-scm" ,python-setuptools-scm)
523 ("python-pytest" ,python-pytest)))
524 (inputs
525 `(("libmediainfo" ,libmediainfo)))
526 (arguments
527 `(#:phases
528 (modify-phases %standard-phases
529 (add-after 'unpack 'patch-libmediainfo
530 (lambda _
531 (substitute* "pymediainfo/__init__.py"
532 (("libmediainfo.so.0")
533 (string-append (assoc-ref %build-inputs "libmediainfo")
534 "/lib/libmediainfo.so.0")))
535 #t))
536 (replace 'check
537 (lambda _
538 ;; Extend PYTHONPATH so the built package will be found.
539 (setenv "PYTHONPATH"
540 (string-append (getcwd) "/build/lib:"
541 (getenv "PYTHONPATH")))
542 ;; Skip the only failing test "test_parse_url"
543 (invoke "pytest" "-vv" "-k" "not test_parse_url")
544 #t)))))
545 (home-page
546 "https://github.com/sbraz/pymediainfo")
547 (synopsis
548 "Python wrapper for the mediainfo library")
549 (description
550 "Python wrapper for the mediainfo library to access the technical and tag
551 data for video and audio files.")
552 (license license:expat)))
553
554 (define-public python-psutil
555 (package
556 (name "python-psutil")
557 (version "5.8.0")
558 (source
559 (origin
560 (method url-fetch)
561 (uri (pypi-uri "psutil" version))
562 (sha256
563 (base32 "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c"))))
564 (build-system python-build-system)
565 (arguments
566 ;; FIXME: some tests do not return and time out. Some tests fail because
567 ;; some processes survive kill().
568 '(#:tests? #f))
569 (home-page "https://github.com/giampaolo/psutil")
570 (synopsis "Library for retrieving information on running processes")
571 (description
572 "@code{psutil} (Python system and process utilities) is a library for
573 retrieving information on running processes and system utilization (CPU,
574 memory, disks, network) in Python. It is useful mainly for system monitoring,
575 profiling and limiting process resources and management of running processes.
576 It implements many functionalities offered by command line tools such as: ps,
577 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
578 iotop, uptime, pidof, tty, taskset, pmap.")
579 (properties `((python2-variant . ,(delay python2-psutil))))
580 (license license:bsd-3)))
581
582 (define-public python2-psutil
583 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
584 (package/inherit base
585 (propagated-inputs
586 `(("python2-enum34" ,python2-enum34) ;optional
587 ,@(package-propagated-inputs base))))))
588
589 (define-public python-shapely
590 (package
591 (name "python-shapely")
592 (version "1.7.1")
593 (source
594 (origin
595 (method url-fetch)
596 (uri (pypi-uri "Shapely" version))
597 (sha256
598 (base32
599 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
600 (modules '((guix build utils)))
601 (snippet
602 '(begin
603 (delete-file "shapely/speedups/_speedups.c")
604 (delete-file "shapely/vectorized/_vectorized.c")
605 #t))))
606 (build-system python-build-system)
607 (native-inputs
608 `(("python-cython" ,python-cython)
609 ("python-matplotlib" ,python-matplotlib)
610 ("python-pytest" ,python-pytest)
611 ("python-pytest-cov" ,python-pytest-cov)))
612 (inputs
613 `(("geos" ,geos)))
614 (propagated-inputs
615 `(("python-numpy" ,python-numpy)))
616 (arguments
617 `(#:phases
618 (modify-phases %standard-phases
619 (add-after 'unpack 'patch-geos-path
620 (lambda* (#:key inputs #:allow-other-keys)
621 (let ((geos (assoc-ref inputs "geos"))
622 (glibc (assoc-ref inputs ,(if (%current-target-system)
623 "cross-libc" "libc"))))
624 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
625 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
626 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
627 geos "/lib/libgeos_c.so'])"))
628 (("free = load_dll\\('c'\\)\\.free")
629 (string-append "free = load_dll('c', fallbacks=['"
630 glibc "/lib/libc.so.6']).free"))
631 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
632 (string-append "free = load_dll('c', fallbacks=['"
633 glibc "/lib/libc.so.6']).free"))))
634 #t)))))
635 (home-page "https://github.com/Toblerity/Shapely")
636 (synopsis "Library for the manipulation and analysis of geometric objects")
637 (description "Shapely is a Python package for manipulation and analysis of
638 planar geometric objects. It is based on the @code{GEOS} library.")
639 (license license:bsd-3)))
640
641 (define-public python-shortuuid
642 (package
643 (name "python-shortuuid")
644 (version "0.5.0")
645 (source
646 (origin
647 (method url-fetch)
648 (uri (pypi-uri "shortuuid" version))
649 (sha256
650 (base32
651 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
652 (build-system python-build-system)
653 (native-inputs
654 `(("python-pep8" ,python-pep8)))
655 (home-page "https://github.com/skorokithakis/shortuuid")
656 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
657 (description
658 "@code{shortuuid} is a Python library for generating concise, unambiguous
659 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
660 module and then similar looking characters are removed.")
661 (license license:bsd-3)))
662
663 (define-public python-logwrap
664 (package
665 (name "python-logwrap")
666 (version "8.2.0.post0")
667 (source
668 (origin
669 (method url-fetch)
670 (uri (pypi-uri "logwrap" version))
671 (sha256
672 (base32
673 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
674 (build-system python-build-system)
675 (arguments
676 `(#:tests? #f ; Tests not included in pypi release.
677 #:phases
678 (modify-phases %standard-phases
679 (replace 'check
680 (lambda* (#:key tests? #:allow-other-keys)
681 (when tests?
682 (invoke "pytest"))
683 #t)))))
684 (native-inputs
685 `(("python-cython" ,python-cython)
686 ("python-pytest" ,python-pytest)
687 ("python-setuptools-scm" ,python-setuptools-scm)
688 ("python-toml" ,python-toml)
689 ("python-wheel" ,python-wheel)))
690 (home-page "https://github.com/python-useful-helpers/logwrap")
691 (synopsis "Decorator for logging function arguments")
692 (description "This package provides a decorator to log function arguments
693 and function call return values in a human-readable way.")
694 (license license:asl2.0)))
695
696 (define-public python2-shapely
697 (package-with-python2 python-shapely))
698
699 (define-public python-clyent
700 (package
701 (name "python-clyent")
702 (version "1.2.1")
703 (source
704 (origin
705 (method url-fetch)
706 (uri (pypi-uri "clyent" version))
707 (sha256
708 (base32
709 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
710 (build-system python-build-system)
711 (native-inputs
712 `(("python-mock" ,python-mock)))
713 (home-page "https://github.com/Anaconda-Platform/clyent")
714 (synopsis "Command line client library")
715 (description "Clyent is a Python command line utility library. It is used
716 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
717 (license license:bsd-3)))
718
719 (define-public python2-clyent
720 (package-with-python2 python-clyent))
721
722 (define-public python-babel
723 (package
724 (name "python-babel")
725 (version "2.9.0")
726 (source
727 (origin
728 (method url-fetch)
729 (uri (pypi-uri "Babel" version))
730 (sha256
731 (base32
732 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
733 (build-system python-build-system)
734 (native-inputs
735 `(("python-freezegun" ,python-freezegun)
736 ("python-pytest" ,python-pytest)))
737 (propagated-inputs
738 `(("python-pytz" ,python-pytz)))
739 (arguments
740 `(#:phases (modify-phases %standard-phases
741 (replace 'check
742 (lambda _
743 (invoke "pytest" "-vv"))))))
744 (home-page "http://babel.pocoo.org/")
745 (synopsis
746 "Tools for internationalizing Python applications")
747 (description
748 "Babel is composed of two major parts:
749 - tools to build and work with gettext message catalogs
750 - a Python interface to the CLDR (Common Locale Data Repository), providing
751 access to various locale display names, localized number and date formatting,
752 etc. ")
753 (license license:bsd-3)))
754
755 (define-public python2-babel
756 (package-with-python2 python-babel))
757
758 (define-public python2-backport-ssl-match-hostname
759 (package
760 (name "python2-backport-ssl-match-hostname")
761 (version "3.5.0.1")
762 (source
763 (origin
764 (method url-fetch)
765 (uri (pypi-uri "backports.ssl_match_hostname" version))
766 (sha256
767 (base32
768 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
769 (build-system python-build-system)
770 (arguments
771 `(#:python ,python-2
772 #:tests? #f)) ; no test target
773 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
774 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
775 (description
776 "This backport brings the ssl.match_hostname() function to users of
777 earlier versions of Python. The function checks the hostname in the
778 certificate returned by the server to which a connection has been established,
779 and verifies that it matches the intended target hostname.")
780 (license license:psfl)))
781
782 (define-public python-bidict
783 (package
784 (name "python-bidict")
785 (version "0.21.2")
786 (source
787 (origin
788 (method url-fetch)
789 (uri (pypi-uri "bidict" version))
790 (sha256
791 (base32
792 "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
793 (build-system python-build-system)
794 (native-inputs
795 `(("python-coverage" ,python-coverage)
796 ("python-hypothesis" ,python-hypothesis-5.23) ; use_true_random=... from >=5.19.0
797 ("python-pre-commit" ,python-pre-commit)
798 ("python-py" ,python-py)
799 ("python-pytest" ,python-pytest)
800 ("python-pytest-benchmark" ,python-pytest-benchmark)
801 ("python-pytest-cov" ,python-pytest-cov)
802 ("python-setuptools-scm" ,python-setuptools-scm)
803 ("python-sortedcollections" ,python-sortedcollections)
804 ("python-sortedcontainers" ,python-sortedcontainers)
805 ("python-sphinx" ,python-sphinx)
806 ("python-sphinx-autodoc-typehints" ,python-sphinx-autodoc-typehints)
807 ("python-tox" ,python-tox)))
808 (arguments
809 `(#:phases (modify-phases %standard-phases
810 (add-after 'unpack 'relax-reqs
811 (lambda _
812 (substitute* "setup.py"
813 (("sortedcollections < 2") "sortedcollections"))
814 #t))
815 (replace 'check
816 (lambda _ (invoke "./run_tests.py"))))))
817 (home-page "https://bidict.readthedocs.io")
818 (synopsis "Bidirectional mapping library")
819 (description "The @code{bidict} library provides several data structures
820 for working with bidirectional mappings in Python.")
821 (license license:mpl2.0)))
822
823 (define-public python-bitarray
824 (package
825 (name "python-bitarray")
826 (version "1.4.0")
827 (source (origin
828 (method url-fetch)
829 (uri (pypi-uri "bitarray" version))
830 (sha256
831 (base32
832 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
833 (build-system python-build-system)
834 (home-page "https://github.com/ilanschnell/bitarray")
835 (synopsis "Efficient arrays of booleans")
836 (description "This package provides an object type which efficiently
837 represents an array of booleans. Bitarrays are sequence types and behave very
838 much like usual lists. Eight bits are represented by one byte in a contiguous
839 block of memory. The user can select between two representations:
840 little-endian and big-endian. All of the functionality is implemented in C.
841 Methods for accessing the machine representation are provided. This can be
842 useful when bit level access to binary files is required, such as portable
843 bitmap image files. Also, when dealing with compressed data which uses
844 variable bit length encoding, you may find this module useful.")
845 (license license:psfl)))
846
847 (define-public python-boolean.py
848 (package
849 (name "python-boolean.py")
850 (version "3.6")
851 (source
852 (origin
853 ;; There's no source tarball on PyPI.
854 (method git-fetch)
855 (uri (git-reference
856 (url "https://github.com/bastikr/boolean.py")
857 (commit (string-append "v" version))))
858 (file-name (git-file-name name version))
859 (sha256
860 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
861 (build-system python-build-system)
862 (home-page "https://github.com/bastikr/boolean.py")
863 (synopsis "Boolean algebra in one Python module")
864 (description
865 "This is a small Python library that implements boolean algebra.
866 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
867 @code{Symbol} class that can take on one of these two values. Calculations
868 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
869 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
870 Expressions are constructed from parsed strings or directly in Python.")
871 (license license:bsd-2)))
872
873 (define-public python-hdf4
874 (package
875 (name "python-hdf4")
876 (version "0.9")
877 (source
878 (origin
879 (method url-fetch)
880 (uri (pypi-uri name version))
881 (sha256
882 (base32
883 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
884 (build-system python-build-system)
885 (native-inputs `(("nose" ,python-nose)))
886 (propagated-inputs `(("numpy" ,python-numpy)))
887 (inputs
888 `(("hdf4" ,hdf4)
889 ("libjpeg" ,libjpeg-turbo)
890 ("zlib" ,zlib)))
891 (arguments
892 `(#:phases
893 (modify-phases %standard-phases
894 (replace 'check
895 (lambda _
896 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
897 ;; on to import numpy. Somehow this works on their CI system.
898 ;; Let's just manage PYTHONPATH here instead.
899 (substitute* "runexamples.sh"
900 (("export PYTHONPATH=.*") ""))
901 (setenv "PYTHONPATH"
902 (string-append (getcwd) ":"
903 (getenv "PYTHONPATH")))
904 (invoke "./runexamples.sh")
905 (invoke "nosetests" "-v"))))))
906 (home-page "https://github.com/fhs/python-hdf4")
907 (synopsis "Python interface to the NCSA HDF4 library")
908 (description
909 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
910 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
911 NetCDF files can also be read and modified. Python-HDF4 is a fork of
912 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
913 (license license:expat)))
914
915 (define-public python2-hdf4
916 (package-with-python2 python-hdf4))
917
918 (define-public python-h5py
919 (package
920 (name "python-h5py")
921 (version "2.10.0")
922 (source
923 (origin
924 (method url-fetch)
925 (uri (pypi-uri "h5py" version))
926 (sha256
927 (base32
928 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
929 (build-system python-build-system)
930 (arguments
931 `(#:tests? #f ; no test target
932 #:phases
933 (modify-phases %standard-phases
934 (add-after 'unpack 'fix-hdf5-paths
935 (lambda* (#:key inputs #:allow-other-keys)
936 (let ((prefix (assoc-ref inputs "hdf5")))
937 (substitute* "setup_build.py"
938 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
939 (string-append "['" prefix "/lib" "']"))
940 (("'/opt/local/include', '/usr/local/include'")
941 (string-append "'" prefix "/include" "'")))
942 (substitute* "setup_configure.py"
943 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
944 (string-append "['" prefix "/lib" "']")))
945 #t))))))
946 (propagated-inputs
947 `(("python-six" ,python-six)
948 ("python-numpy" ,python-numpy)))
949 (inputs
950 `(("hdf5" ,hdf5-1.10)))
951 (native-inputs
952 `(("python-cython" ,python-cython)
953 ("python-pkgconfig" ,python-pkgconfig)
954 ("pkg-config" ,pkg-config)))
955 (home-page "https://www.h5py.org/")
956 (synopsis "Read and write HDF5 files from Python")
957 (description
958 "The h5py package provides both a high- and low-level interface to the
959 HDF5 library from Python. The low-level interface is intended to be a
960 complete wrapping of the HDF5 API, while the high-level component supports
961 access to HDF5 files, datasets and groups using established Python and NumPy
962 concepts.")
963 (license license:bsd-3)))
964
965 (define-public python2-h5py
966 (package-with-python2 python-h5py))
967
968 (define-public python-sh
969 (package
970 (name "python-sh")
971 (version "1.12.14")
972 (source
973 (origin
974 (method url-fetch)
975 (uri (pypi-uri "sh" version))
976 (sha256
977 (base32
978 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
979 (build-system python-build-system)
980 (arguments
981 '(#:phases
982 (modify-phases %standard-phases
983 (replace 'check
984 (lambda _
985 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
986 (setenv "HOME" "/tmp")
987 (invoke "python" "sh.py" "test"))))))
988 (native-inputs
989 `(("python-coverage" ,python-coverage)))
990 (home-page "https://github.com/amoffat/sh")
991 (synopsis "Python subprocess replacement")
992 (description "This package provides a replacement for Python's
993 @code{subprocess} feature.")
994 (license license:expat)))
995
996 (define-public python-cftime
997 (package
998 (name "python-cftime")
999 (version "1.0.4.2")
1000 (source
1001 (origin
1002 (method url-fetch)
1003 (uri (pypi-uri "cftime" version))
1004 (sha256
1005 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
1006 (build-system python-build-system)
1007 (propagated-inputs
1008 `(("python-numpy" ,python-numpy)))
1009 (native-inputs
1010 `(("python-coveralls" ,python-coveralls)
1011 ("python-cython" ,python-cython)
1012 ("python-pytest-cov" ,python-pytest-cov)))
1013 (home-page "https://github.com/Unidata/cftime")
1014 (synopsis "Library for time handling")
1015 (description
1016 "This package provides time-handling functionality that used to be part
1017 of the netcdf4 package before.")
1018 ;; This package claims to include code under the GPLv3 but is released
1019 ;; under ISC.
1020 (license (list license:isc license:gpl3+))))
1021
1022 (define-public python-netcdf4
1023 (package
1024 (name "python-netcdf4")
1025 (version "1.5.3")
1026 (source
1027 (origin
1028 (method url-fetch)
1029 (uri (pypi-uri "netCDF4" version))
1030 (sha256
1031 (base32
1032 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1033 (build-system python-build-system)
1034 (arguments
1035 '(#:phases
1036 (modify-phases %standard-phases
1037 (add-after 'unpack 'configure-locations
1038 (lambda* (#:key inputs #:allow-other-keys)
1039 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1040 #t)))))
1041 (native-inputs
1042 `(("python-cython" ,python-cython)))
1043 (propagated-inputs
1044 `(("python-numpy" ,python-numpy)
1045 ("python-cftime" ,python-cftime)))
1046 (inputs
1047 `(("netcdf" ,netcdf)
1048 ("hdf4" ,hdf4)
1049 ("hdf5" ,hdf5)))
1050 (home-page "https://github.com/Unidata/netcdf4-python")
1051 (synopsis "Python/numpy interface to the netCDF library")
1052 (description "Netcdf4-python is a Python interface to the netCDF C
1053 library. netCDF version 4 has many features not found in earlier
1054 versions of the library and is implemented on top of HDF5. This module
1055 can read and write files in both the new netCDF 4 and the old netCDF 3
1056 format, and can create files that are readable by HDF5 clients. The
1057 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1058 to users of that module.")
1059 ;; The software is mainly ISC, but includes some files covered
1060 ;; by the Expat license.
1061 (license (list license:isc license:expat))))
1062
1063 (define-public python-license-expression
1064 (package
1065 (name "python-license-expression")
1066 (version "1.2")
1067 (source
1068 (origin
1069 (method url-fetch)
1070 (uri (pypi-uri "license-expression" version))
1071 (sha256
1072 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1073 (build-system python-build-system)
1074 (propagated-inputs
1075 `(("python-boolean.py" ,python-boolean.py)))
1076 (home-page "https://github.com/nexB/license-expression")
1077 (synopsis "Apply boolean logic to license expressions")
1078 (description
1079 "This Python module defines a tiny language to evaluate and compare
1080 license expressions using boolean logic. Logical combinations of licenses can
1081 be tested for equality, containment, and equivalence. They can be normalised
1082 and simplified. It supports SPDX license expressions as well as other naming
1083 conventions and aliases in the same expression.")
1084 (license license:gpl2+)))
1085
1086 (define-public python-lockfile
1087 (package
1088 (name "python-lockfile")
1089 (version "0.12.2")
1090 (source
1091 (origin
1092 (method url-fetch)
1093 (uri (pypi-uri "lockfile" version))
1094 (sha256
1095 (base32
1096 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1097 (build-system python-build-system)
1098 (arguments '(#:test-target "check"))
1099 (native-inputs
1100 `(("python-pbr" ,python-pbr)))
1101 (home-page "https://launchpad.net/pylockfile")
1102 (synopsis "Platform-independent file locking module")
1103 (description
1104 "The lockfile package exports a LockFile class which provides a simple
1105 API for locking files.")
1106 (license license:expat)))
1107
1108 (define-public python-filelock
1109 (package
1110 (name "python-filelock")
1111 (version "3.0.12")
1112 (source
1113 (origin
1114 (method url-fetch)
1115 (uri (pypi-uri "filelock" version))
1116 (sha256
1117 (base32
1118 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1119 (build-system python-build-system)
1120 (home-page
1121 "https://github.com/benediktschmitt/py-filelock")
1122 (synopsis "Platform independent file lock")
1123 (description "@code{filelock} contains a single module implementing
1124 a platform independent file lock in Python, which provides a simple way of
1125 inter-process communication.")
1126 (license license:unlicense)))
1127
1128 (define-public python-semantic-version
1129 (package
1130 (name "python-semantic-version")
1131 (version "2.8.5")
1132 (source
1133 (origin
1134 (method url-fetch)
1135 (uri (pypi-uri "semantic_version" version))
1136 (sha256
1137 (base32
1138 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1139 (build-system python-build-system)
1140 (home-page "https://github.com/rbarrois/python-semanticversion")
1141 (synopsis "Semantic versioning module for Python")
1142 (description
1143 "The @code{semantic_version} class is a small library for handling
1144 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1145
1146 It can compare versions, generate a new version that represents a bump in one of
1147 the version levels, and check whether any given string is a proper semantic
1148 version identifier.")
1149 (license license:bsd-3)))
1150
1151 (define-public python2-semantic-version
1152 (package-with-python2 python-semantic-version))
1153
1154 (define-public python-serpent
1155 (package
1156 (name "python-serpent")
1157 (version "1.28")
1158 (source
1159 (origin
1160 (method url-fetch)
1161 (uri (pypi-uri "serpent" version))
1162 (sha256
1163 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1164 (build-system python-build-system)
1165 (native-inputs
1166 `(("python-attrs" ,python-attrs)
1167 ("python-pytz" ,python-pytz)))
1168 (home-page "https://github.com/irmen/Serpent")
1169 (synopsis "Serializer for literal Python expressions")
1170 (description
1171 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1172 serialization. It serializes an object tree into bytes (an utf-8 encoded
1173 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1174 to rebuild the original object tree.
1175
1176 Because only safe literals are encoded, it is safe to send serpent data to
1177 other machines, such as over the network.")
1178 (properties `((python2-variant . ,(delay python2-serpent))))
1179 (license license:expat)))
1180
1181 (define-public python2-serpent
1182 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1183 (package/inherit base
1184 (propagated-inputs
1185 `(("python-enum34" ,python2-enum34)
1186 ,@(package-propagated-inputs base))))))
1187
1188 (define-public python-setuptools
1189 (package
1190 (name "python-setuptools")
1191 (version "52.0.0")
1192 (source
1193 (origin
1194 (method url-fetch)
1195 (uri (pypi-uri "setuptools" version))
1196 (sha256
1197 (base32
1198 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1199 (modules '((guix build utils)))
1200 (snippet
1201 '(begin
1202 ;; Remove included binaries which are used to build self-extracting
1203 ;; installers for Windows.
1204 ;; TODO: Find some way to build them ourself so we can include them.
1205 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1206 #t))))
1207 (build-system python-build-system)
1208 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1209 ;; One could bootstrap with an internal untested setuptools.
1210 (arguments
1211 `(#:tests? #f))
1212 (home-page "https://pypi.org/project/setuptools/")
1213 (synopsis
1214 "Library designed to facilitate packaging Python projects")
1215 (description
1216 "Setuptools is a fully-featured, stable library designed to facilitate
1217 packaging Python projects, where packaging includes:
1218 Python package and module definitions,
1219 distribution package metadata,
1220 test hooks,
1221 project installation,
1222 platform-specific details,
1223 Python 3 support.")
1224 ;; TODO: setuptools now bundles the following libraries:
1225 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1226 (license (list license:psfl ; setuptools itself
1227 license:expat ; six, appdirs, pyparsing
1228 license:asl2.0 ; packaging is dual ASL2/BSD-2
1229 license:bsd-2))
1230 (properties `((python2-variant . ,(delay python2-setuptools))))))
1231
1232 ;; Newer versions of setuptools no longer support Python 2.
1233 (define-public python2-setuptools
1234 (package
1235 (name "python2-setuptools")
1236 (version "41.0.1")
1237 (source
1238 (origin
1239 (method url-fetch)
1240 (uri (pypi-uri "setuptools" version ".zip"))
1241 (sha256
1242 (base32
1243 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1244 (modules '((guix build utils)))
1245 (snippet
1246 '(begin
1247 ;; Remove included binaries which are used to build self-extracting
1248 ;; installers for Windows.
1249 ;; TODO: Find some way to build them ourself so we can include them.
1250 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1251 #t))))
1252 (build-system python-build-system)
1253 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1254 ;; One could bootstrap with an internal untested setuptools.
1255 (arguments
1256 `(#:tests? #f))
1257 (native-inputs
1258 `(("unzip" ,unzip)))
1259 (home-page "https://pypi.org/project/setuptools/")
1260 (synopsis
1261 "Library designed to facilitate packaging Python projects")
1262 (description
1263 "Setuptools is a fully-featured, stable library designed to facilitate
1264 packaging Python projects, where packaging includes:
1265 Python package and module definitions,
1266 distribution package metadata,
1267 test hooks,
1268 project installation,
1269 platform-specific details,
1270 Python 3 support.")
1271 ;; TODO: setuptools now bundles the following libraries:
1272 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1273 (license (list license:psfl ; setuptools itself
1274 license:expat ; six, appdirs, pyparsing
1275 license:asl2.0 ; packaging is dual ASL2/BSD-2
1276 license:bsd-2))))
1277
1278 (define-public python-setuptools-declarative-requirements
1279 (package
1280 (name "python-setuptools-declarative-requirements")
1281 (version "1.2.0")
1282 (source
1283 (origin
1284 (method url-fetch)
1285 (uri (pypi-uri
1286 "setuptools-declarative-requirements"
1287 version))
1288 (sha256
1289 (base32
1290 "1l8zmcnp9h8sp8hsw7b81djaa1a9yig0y7i4phh5pihqz1gdn7yi"))))
1291 (build-system python-build-system)
1292 (native-inputs
1293 `(("python-pytest" ,python-pytest)
1294 ("python-setuptools-scm" ,python-setuptools-scm)))
1295 (propagated-inputs
1296 `(("python-toml" ,python-toml)
1297 ("python-wheel" ,python-wheel)))
1298 (home-page
1299 "https://github.com/s0undt3ch/setuptools-declarative-requirements")
1300 (synopsis "File support for setuptools declarative setup.cfg")
1301 (description
1302 "This package provides file support for setuptools declarative
1303 @code{setup.cfg}.")
1304 (license license:asl2.0)))
1305
1306 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1307 (define-public python-setuptools-for-tensorflow
1308 (hidden-package
1309 (package
1310 (inherit python-setuptools)
1311 (version "39.1.0")
1312 (source (origin
1313 (inherit (package-source python-setuptools))
1314 (uri (pypi-uri "setuptools" version ".zip"))
1315 (sha256
1316 (base32
1317 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1318
1319 (define-public python-uniseg
1320 (package
1321 (name "python-uniseg")
1322 (version "0.7.1")
1323 (source
1324 (origin
1325 (method url-fetch)
1326 (uri (pypi-uri "uniseg" version ".zip"))
1327 (sha256
1328 (base32
1329 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1330 (build-system python-build-system)
1331 (arguments
1332 '(#:tests? #f)) ; The test suite requires network access.
1333 (native-inputs
1334 `(("unzip" ,unzip)))
1335 (home-page
1336 "https://bitbucket.org/emptypage/uniseg-python")
1337 (synopsis
1338 "Python library to determine Unicode text segmentations")
1339 (description
1340 "Uniseg is a Python package used to determine Unicode text segmentations.
1341 Supported segmentations include:
1342 @enumerate
1343 @item @dfn{Code point} (any value in the Unicode codespace)
1344 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1345 multiple Unicode code points, e.g. \"G\" + acute-accent)
1346 @item Word break
1347 @item Sentence break
1348 @item Line break
1349 @end enumerate")
1350 (license license:expat)))
1351
1352 (define-public python2-uniseg
1353 (package-with-python2 python-uniseg))
1354
1355 (define-public python-humanfriendly
1356 (package
1357 (name "python-humanfriendly")
1358 (version "8.2")
1359 (source
1360 (origin
1361 (method url-fetch)
1362 (uri (pypi-uri "humanfriendly" version))
1363 (sha256
1364 (base32
1365 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1366 (build-system python-build-system)
1367 (arguments
1368 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1369 #:tests? #f))
1370 (home-page "https://humanfriendly.readthedocs.io")
1371 (synopsis "Human-friendly input and output in Python")
1372 (description
1373 "The functions and classes in @code{humanfriendly} can be used to make
1374 text interfaces more user-friendly. It includes tools to parse and format
1375 numbers, file sizes, and timespans, timers for long-running operations, menus
1376 to allow the user to choose from a list of options, and terminal interaction
1377 helpers.")
1378 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1379 (license license:expat)))
1380
1381 (define-public python2-humanfriendly
1382 (let ((base (package-with-python2
1383 (strip-python2-variant python-humanfriendly))))
1384 (package/inherit base
1385 (propagated-inputs
1386 `(("python2-monotonic" ,python2-monotonic)
1387 ,@(package-propagated-inputs base))))))
1388
1389 (define-public python-textparser
1390 (package
1391 (name "python-textparser")
1392 (version "0.23.0")
1393 (source
1394 (origin
1395 (method url-fetch)
1396 (uri (pypi-uri "textparser" version))
1397 (sha256
1398 (base32
1399 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1400 (build-system python-build-system)
1401 (home-page "https://github.com/eerimoq/textparser")
1402 (synopsis "Fast text parser for Python")
1403 (description "This library provides a text parser written in the Python
1404 language. It aims to be fast.")
1405 (license license:expat)))
1406
1407 (define-public python-aenum
1408 (package
1409 (name "python-aenum")
1410 (version "2.2.4")
1411 (source
1412 (origin
1413 (method url-fetch)
1414 (uri (pypi-uri "aenum" version))
1415 (sha256
1416 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1417 (build-system python-build-system)
1418 (arguments
1419 `(#:phases (modify-phases %standard-phases
1420 (replace 'check
1421 (lambda _
1422 (format #t "current working dir ~s~%" (getcwd))
1423 (setenv "PYTHONPATH"
1424 (string-append ".:" (getenv "PYTHONPATH")))
1425 ;; We must run the test suite module directly, as it
1426 ;; fails to define the 'tempdir' variable in scope for
1427 ;; the tests otherwise
1428 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1429 ;; issues/32/running-tests-with-python-setuppy-test).
1430 (invoke "python3" "aenum/test.py")
1431 ;; This one fails with "NameError: name
1432 ;; 'test_pickle_dump_load' is not defined" (see:
1433 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1434 ;; /error-running-the-test_v3py-test-suite).
1435 ;; (invoke "python3" "aenum/test_v3.py")
1436 #t)))))
1437 (home-page "https://bitbucket.org/stoneleaf/aenum")
1438 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1439 (description "The aenum library includes an @code{Enum} base class, a
1440 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1441 class.")
1442 (license license:bsd-3)))
1443
1444 (define-public python-can
1445 (package
1446 (name "python-can")
1447 (version "3.3.3")
1448 (source
1449 (origin
1450 (method url-fetch)
1451 (uri (pypi-uri "python-can" version))
1452 (sha256
1453 (base32
1454 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1455 (build-system python-build-system)
1456 (arguments
1457 `(#:phases (modify-phases %standard-phases
1458 (add-after 'unpack 'relax-version-requirements
1459 (lambda _
1460 (substitute* "setup.py"
1461 (("mock~=2\\.0") "mock")
1462 (("coverage<5") "coverage")
1463 (("pytest~=4\\.3") "pytest")
1464 (("hypothesis~=4\\.56") "hypothesis"))
1465 #t))
1466 (add-after 'unpack 'fix-broken-tests
1467 ;; The tests try to run two scripts it expects should be
1468 ;; in PATH, but they aren't at this time (see:
1469 ;; https://github.com/hardbyte/python-can/issues/805).
1470 (lambda _
1471 (substitute* "test/test_scripts.py"
1472 (("\"can_logger\\.py --help\"") "")
1473 (("\"can_player\\.py --help\"") ""))
1474 #t)))))
1475 (propagated-inputs
1476 `(("python-aenum" ,python-aenum)
1477 ("python-wrapt" ,python-wrapt)))
1478 (native-inputs
1479 `(("python-codecov" ,python-codecov)
1480 ("python-coverage" ,python-coverage)
1481 ("python-future" ,python-future)
1482 ("python-hypothesis" ,python-hypothesis)
1483 ("python-mock" ,python-mock)
1484 ("python-pyserial" ,python-pyserial)
1485 ("python-pytest" ,python-pytest)
1486 ("python-pytest-cov" ,python-pytest-cov)
1487 ("python-pytest-runner" ,python-pytest-runner)
1488 ("python-pytest-timeout" ,python-pytest-timeout)))
1489 (home-page "https://github.com/hardbyte/python-can")
1490 (synopsis "Controller Area Network (CAN) interface module for Python")
1491 (description "This package defines the @code{can} module, which provides
1492 controller area network (CAN) support for Python developers; providing common
1493 abstractions to different hardware devices, and a suite of utilities for
1494 sending and receiving messages on a CAN bus.")
1495 (license license:lgpl3+)))
1496
1497 (define-public python-caniusepython3
1498 (package
1499 (name "python-caniusepython3")
1500 (version "7.2.0")
1501 (source
1502 (origin
1503 (method url-fetch)
1504 (uri (pypi-uri "caniusepython3" version))
1505 (sha256
1506 (base32
1507 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1508 (build-system python-build-system)
1509 (arguments
1510 `(#:phases (modify-phases %standard-phases
1511 (add-after 'unpack 'relax-requirements
1512 (lambda _
1513 (substitute* "setup.py"
1514 ;; These are for compatibility with Python 2.
1515 ((".*'argparse', 'backports.functools_lru_cache',.*")
1516 ""))
1517 (substitute* "dev_requirements.txt"
1518 ((".*pylint.*") "")) ;not actually required
1519 #t))
1520 (replace 'check
1521 (lambda _
1522 (invoke "py.test" "-k" "not NetworkTests"))))))
1523 (propagated-inputs
1524 `(("python-distlib" ,python-distlib)
1525 ("python-packaging" ,python-packaging)
1526 ("python-requests" ,python-requests)))
1527 (native-inputs
1528 `(("python-mock" ,python-mock)
1529 ("python-pytest" ,python-pytest)))
1530 (home-page "https://github.com/brettcannon/caniusepython3")
1531 (synopsis "Check for Python 3-incompatible Python libraries")
1532 (description "The @command{caniusepython3} command scans your project and
1533 reports the Python 3-incompatible libraries it found. It can also be used as
1534 a library.")
1535 (license license:asl2.0)))
1536
1537 (define-public python-diskcache
1538 (package
1539 (name "python-diskcache")
1540 (version "4.1.0")
1541 (source
1542 (origin
1543 (method url-fetch)
1544 (uri (pypi-uri "diskcache" version))
1545 (sha256
1546 (base32
1547 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1548 (build-system python-build-system)
1549 (arguments
1550 `(#:tests? #f)) ;test suite not included in the release
1551 (home-page "http://www.grantjenks.com/docs/diskcache/")
1552 (synopsis "Disk and file backed cache library")
1553 (description "DiskCache is a disk and file backed persistent cache.")
1554 (license license:asl2.0)))
1555
1556 (define-public python-bitstruct
1557 (package
1558 (name "python-bitstruct")
1559 (version "8.9.0")
1560 (source
1561 (origin
1562 (method url-fetch)
1563 (uri (pypi-uri "bitstruct" version))
1564 (sha256
1565 (base32
1566 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1567 (build-system python-build-system)
1568 (home-page "https://github.com/eerimoq/bitstruct")
1569 (synopsis "Python values to and C bit field structs converter")
1570 (description "This module performs conversions between Python values and C
1571 bit field structs represented as Python byte strings. It is intended to have
1572 a similar interface as the @code{struct} module from Python, but working on
1573 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1574 (license license:expat)))
1575
1576 (define-public python-cantools
1577 (package
1578 (name "python-cantools")
1579 (version "33.1.1")
1580 (source
1581 (origin
1582 ;; We take the sources from the Git repository as the documentation is
1583 ;; not included with the PyPI archive.
1584 (method git-fetch)
1585 (uri (git-reference
1586 (url "https://github.com/eerimoq/cantools")
1587 (commit version)))
1588 (file-name (git-file-name name version))
1589 (sha256
1590 (base32
1591 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1592 (build-system python-build-system)
1593 (arguments
1594 `(#:phases
1595 (modify-phases %standard-phases
1596 (add-after 'build 'build-doc
1597 (lambda _
1598 ;; See: https://github.com/eerimoq/cantools/issues/190.
1599 (substitute* "README.rst"
1600 (("https://github.com/eerimoq/cantools/raw/master\
1601 /docs/monitor.png")
1602 "monitor.png"))
1603 (with-directory-excursion "docs"
1604 (invoke "make" "man" "info"))))
1605 (add-after 'install 'install-doc
1606 (lambda* (#:key outputs #:allow-other-keys)
1607 (let* ((out (assoc-ref outputs "out"))
1608 (info (string-append out "/share/info"))
1609 (man1 (string-append out "/share/man/man1")))
1610 (format #t "CWD: ~s~%" (getcwd))
1611 (install-file "docs/_build/texinfo/cantools.info" info)
1612 (install-file "docs/_build/man/cantools.1" man1)
1613 #t))))))
1614 (native-inputs
1615 `(("sphinx" ,python-sphinx)
1616 ("texinfo" ,texinfo)))
1617 (propagated-inputs
1618 `(("python-bitstruct" ,python-bitstruct)
1619 ("python-can" ,python-can)
1620 ("python-diskcache" ,python-diskcache)
1621 ("python-textparser" ,python-textparser)))
1622 (home-page "https://github.com/eerimoq/cantools")
1623 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1624 (description "This package includes Controller Area Network (CAN) related
1625 tools that can be used to:
1626 @itemize
1627 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1628 @item encode and decode CAN messages
1629 @item multiplex simple and extended signals
1630 @item diagnose DID encoding and decoding
1631 @item dump the CAN decoder output
1632 @item test CAN nodes
1633 @item generate C source code
1634 @item monitor the CAN bus
1635 @end itemize")
1636 (license license:expat)))
1637
1638 (define-public python-capturer
1639 (package
1640 (name "python-capturer")
1641 (version "2.4")
1642 (source
1643 (origin
1644 (method url-fetch)
1645 (uri (pypi-uri "capturer" version))
1646 (sha256
1647 (base32
1648 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1649 (build-system python-build-system)
1650 (arguments
1651 `(#:tests? #f))
1652 (propagated-inputs
1653 `(("python-humanfriendly" ,python-humanfriendly)))
1654 (home-page "https://capturer.readthedocs.io")
1655 (synopsis "Capture stdout and stderr streams of the current process")
1656 (description
1657 "The capturer package makes it easy to capture the stdout and stderr
1658 streams of the current process and subprocesses. Output can be relayed
1659 to the terminal in real time but is also available to the Python program
1660 for additional processing.")
1661 (license license:expat)))
1662
1663 (define-public python2-capturer
1664 (package-with-python2 python-capturer))
1665
1666 (define-public python-case
1667 (package
1668 (name "python-case")
1669 (version "1.5.3")
1670 (source
1671 (origin
1672 (method url-fetch)
1673 (uri (pypi-uri "case" version))
1674 (sha256
1675 (base32
1676 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1677 (build-system python-build-system)
1678 (propagated-inputs
1679 `(("python-mock" ,python-mock)
1680 ("python-nose" ,python-nose)
1681 ("python-six" ,python-six)
1682 ("python-unittest2" ,python-unittest2)))
1683 (native-inputs
1684 `(("python-coverage" ,python-coverage)))
1685 (home-page "https://github.com/celery/case")
1686 (synopsis "Unittest utilities and convenience methods")
1687 (description
1688 "The @code{case} package provides utilities on top of unittest, including
1689 some helpful Python 2 compatibility convenience methods.")
1690 (license license:bsd-3)))
1691
1692 (define-public python-verboselogs
1693 (package
1694 (name "python-verboselogs")
1695 (version "1.7")
1696 (source
1697 (origin
1698 (method url-fetch)
1699 (uri (pypi-uri "verboselogs" version))
1700 (sha256
1701 (base32
1702 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1703 (build-system python-build-system)
1704 (arguments
1705 `(#:phases
1706 (modify-phases %standard-phases
1707 (replace 'check
1708 (lambda _
1709 ;; Do not run pylint plugin test, as astroid is an old
1710 ;; unsupported version.
1711 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1712 "verboselogs/tests.py"))))))
1713 (native-inputs
1714 `(("python-mock" ,python-mock)
1715 ("python-pytest" ,python-pytest)))
1716 (home-page "https://verboselogs.readthedocs.io")
1717 (synopsis "Verbose logging level for Python's logging module")
1718 (description
1719 "The @code{verboselogs} package extends Python's @code{logging} module to
1720 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1721 (license license:expat)))
1722
1723 (define-public python2-verboselogs
1724 (package-with-python2 python-verboselogs))
1725
1726 (define-public python-coloredlogs
1727 (package
1728 (name "python-coloredlogs")
1729 (version "10.0")
1730 (source
1731 (origin
1732 (method url-fetch)
1733 (uri (pypi-uri "coloredlogs" version))
1734 (sha256
1735 (base32
1736 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1737 (build-system python-build-system)
1738 (arguments
1739 `(;Tests require some updated modules
1740 #:tests? #f))
1741 (propagated-inputs
1742 `(("python-capturer" ,python-capturer)))
1743 (home-page "https://coloredlogs.readthedocs.io")
1744 (synopsis "Colored stream handler for Python's logging module")
1745 (description
1746 "The @code{coloredlogs} package enables colored terminal output for
1747 Python's logging module. The @code{ColoredFormatter} class inherits from
1748 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1749 messages in color.")
1750 (license license:expat)))
1751
1752 (define-public python2-coloredlogs
1753 (package-with-python2 python-coloredlogs))
1754
1755 (define-public python-editorconfig
1756 (package
1757 (name "python-editorconfig")
1758 (version "0.12.2")
1759 (source
1760 (origin
1761 (method url-fetch)
1762 (uri (pypi-uri "EditorConfig" version))
1763 (sha256
1764 (base32
1765 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1766 (build-system python-build-system)
1767 (home-page "https://editorconfig.org/")
1768 (synopsis "EditorConfig bindings for python")
1769 (description "The EditorConfig project consists of a file format for
1770 defining coding styles and a collection of text editor plugins that enable
1771 editors to read the file format and adhere to defined styles. EditorConfig
1772 files are easily readable and they work nicely with version control systems.")
1773 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1774 (license (list license:bsd-2 license:psfl))))
1775
1776 (define-public dosage
1777 (package
1778 (name "dosage")
1779 (version "2.17")
1780 (source
1781 (origin
1782 (method url-fetch)
1783 (uri (pypi-uri "dosage" version))
1784 (sha256
1785 (base32
1786 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1787 (build-system python-build-system)
1788 (propagated-inputs
1789 `(("python2-backports-functools-lru-cache"
1790 ,python2-backports-functools-lru-cache)
1791 ("python2-backports-shutil-get-terminal-size"
1792 ,python2-backports-shutil-get-terminal-size)
1793 ("python-cached-property" ,python-cached-property)
1794 ("python-colorama" ,python-colorama)
1795 ("python-imagesize" ,python-imagesize)
1796 ("python-importlib-metadata" ,python-importlib-metadata)
1797 ("python-lxml" ,python-lxml)
1798 ("python-requests" ,python-requests)
1799 ("python-six" ,python-six)))
1800 (native-inputs
1801 `(("python-pytest-cov" ,python-pytest-cov)
1802 ("python-pytest-xdist" ,python-pytest-xdist)
1803 ("python-responses" ,python-responses)
1804 ("python-setuptools-scm" ,python-setuptools-scm)))
1805 (home-page "https://github.com/webcomics/dosage")
1806 (synopsis "Comic strip downloader and archiver")
1807 (description "Dosage is designed to keep a local copy of specific webcomics and other
1808 picture-based content such as Picture of the Day sites. With the @command{dosage}
1809 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1810 downloaded, or download a strip for a particular date or index, if possible.")
1811 (license license:expat)))
1812
1813 (define-public python-et-xmlfile
1814 (package
1815 (name "python-et-xmlfile")
1816 (version "1.0.1")
1817 (source
1818 (origin
1819 (method url-fetch)
1820 (uri (pypi-uri "et_xmlfile" version))
1821 (sha256
1822 (base32
1823 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1824 (build-system python-build-system)
1825 (arguments
1826 `(#:phases (modify-phases %standard-phases
1827 (replace 'check
1828 (lambda _
1829 (invoke "pytest"))))))
1830 (native-inputs
1831 `(("python-pytest" ,python-pytest)
1832 ("python-lxml" ,python-lxml))) ;used for the tests
1833 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1834 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1835 (description "This Python library is based upon the @code{xmlfile} module
1836 from @code{lxml}. It aims to provide a low memory, compatible implementation
1837 of @code{xmlfile}.")
1838 (license license:expat)))
1839
1840 (define-public python2-et-xmlfile
1841 (package-with-python2 python-et-xmlfile))
1842
1843 (define-public python-openpyxl
1844 (package
1845 (name "python-openpyxl")
1846 (version "3.0.5")
1847 (source
1848 (origin
1849 ;; We use the upstream repository, as the tests are not included in the
1850 ;; PyPI releases.
1851 (method hg-fetch)
1852 (uri (hg-reference
1853 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1854 (changeset version)))
1855 (file-name (string-append name "-" version "-checkout"))
1856 (sha256
1857 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1858 (build-system python-build-system)
1859 (arguments
1860 `(#:phases (modify-phases %standard-phases
1861 (replace 'check
1862 (lambda _
1863 (invoke "pytest"))))))
1864 (native-inputs
1865 ;; For the test suite.
1866 `(("python-lxml" ,python-lxml)
1867 ("python-pillow" ,python-pillow)
1868 ("python-pytest" ,python-pytest)))
1869 (propagated-inputs
1870 `(("python-et-xmlfile" ,python-et-xmlfile)
1871 ("python-jdcal" ,python-jdcal)))
1872 (home-page "https://openpyxl.readthedocs.io")
1873 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1874 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1875 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1876 standard.")
1877 (properties `((python2-variant . ,(delay python2-openpyxl))))
1878 (license license:expat)))
1879
1880 (define-public python2-openpyxl
1881 (let ((base (package-with-python2
1882 (strip-python2-variant python-openpyxl))))
1883 (package
1884 (inherit base)
1885 ;; This is the latest version that has python2 support
1886 (version "2.6.4")
1887 (source
1888 (origin
1889 (method url-fetch)
1890 (uri (pypi-uri "openpyxl" version))
1891 (sha256
1892 (base32
1893 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1894 (arguments '(#:tests? #f))))) ; No test suite.
1895
1896 (define-public python-eventlet
1897 (package
1898 (name "python-eventlet")
1899 (version "0.25.1")
1900 (source
1901 (origin
1902 (method url-fetch)
1903 (uri (pypi-uri "eventlet" version))
1904 (sha256
1905 (base32
1906 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1907 (build-system python-build-system)
1908 (propagated-inputs
1909 `(("python-dnspython" ,python-dnspython)
1910 ("python-greenlet" ,python-greenlet)
1911 ("python-monotonic" ,python-monotonic)))
1912 (arguments
1913 ;; TODO: Requires unpackaged 'enum-compat'.
1914 '(#:tests? #f))
1915 (home-page "https://eventlet.net")
1916 (synopsis "Concurrent networking library for Python")
1917 (description
1918 "Eventlet is a concurrent networking library for Python that
1919 allows you to change how you run your code, not how you write it.
1920 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1921 Coroutines ensure that the developer uses a blocking style of programming
1922 that is similar to threading, but provide the benefits of non-blocking I/O.
1923 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1924 from the Python interpreter, or as a small part of a larger application.")
1925 (license license:expat)))
1926
1927 (define-public python-six
1928 (package
1929 (name "python-six")
1930 (version "1.14.0")
1931 (source
1932 (origin
1933 (method url-fetch)
1934 (uri (pypi-uri "six" version))
1935 (sha256
1936 (base32
1937 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1938 (build-system python-build-system)
1939 (arguments
1940 `(#:phases
1941 (modify-phases %standard-phases
1942 (replace 'check
1943 (lambda _
1944 (invoke "py.test" "-v"))))))
1945 (native-inputs
1946 `(("python-pytest" ,python-pytest-bootstrap)))
1947 (home-page "https://pypi.org/project/six/")
1948 (synopsis "Python 2 and 3 compatibility utilities")
1949 (description
1950 "Six is a Python 2 and 3 compatibility library. It provides utility
1951 functions for smoothing over the differences between the Python versions with
1952 the goal of writing Python code that is compatible on both Python versions.
1953 Six supports every Python version since 2.5. It is contained in only one
1954 Python file, so it can be easily copied into your project.")
1955 (license license:x11)))
1956
1957 (define-public python2-six
1958 (package-with-python2 python-six))
1959
1960 (define-public python-six-bootstrap
1961 (package
1962 (inherit python-six)
1963 (name "python-six-bootstrap")
1964 (native-inputs `())
1965 (arguments `(#:tests? #f))))
1966
1967 (define-public python2-six-bootstrap
1968 (package-with-python2 python-six-bootstrap))
1969
1970 (define-public python-schedule
1971 (package
1972 (name "python-schedule")
1973 (version "0.4.3")
1974 (source
1975 (origin
1976 (method url-fetch)
1977 (uri (pypi-uri "schedule" version))
1978 (sha256
1979 (base32
1980 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1981 (build-system python-build-system)
1982 (native-inputs
1983 `(("python-pytest" ,python-pytest)
1984 ("python-mock" ,python-mock)))
1985 (home-page "https://github.com/dbader/schedule")
1986 (synopsis "Schedule periodic function calls in Python")
1987 (description
1988 "Schedule is an in-process scheduler for periodic jobs that uses the
1989 builder pattern for configuration. Schedule lets you run Python functions (or
1990 any other callable) periodically at pre-determined intervals using a simple,
1991 human-friendly syntax.")
1992 (license license:expat)))
1993
1994 (define-public python2-schedule
1995 (package-with-python2 python-schedule))
1996
1997 (define-public python-scour
1998 (package
1999 (name "python-scour")
2000 (version "038.1")
2001 (source
2002 (origin
2003 (method git-fetch)
2004 (uri
2005 (git-reference
2006 (url "https://github.com/scour-project/scour")
2007 (commit
2008 (string-append "v" version))))
2009 (file-name (git-file-name name version))
2010 (sha256
2011 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
2012 (propagated-inputs
2013 `(("python-six" ,python-six)))
2014 (build-system python-build-system)
2015 (home-page "https://github.com/scour-project/scour")
2016 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
2017 (description "The goal of Scour is to output a file that renders
2018 identically at a fraction of the size by removing a lot of redundant
2019 information created by most SVG editors. Optimization options are typically
2020 lossless but can be tweaked for more aggressive cleaning.")
2021 (license license:asl2.0)))
2022
2023 (define-public python-mappy
2024 (package
2025 (name "python-mappy")
2026 (version "2.18")
2027 (source (origin
2028 (method url-fetch)
2029 (uri (pypi-uri "mappy" version))
2030 (sha256
2031 (base32
2032 "1a05p7rkmxa6qhm108na8flzj2v45jab06drk59kzk1ip2sgvzqq"))))
2033 (build-system python-build-system)
2034 (native-inputs
2035 `(("python-cython" ,python-cython)))
2036 (inputs
2037 `(("zlib" ,zlib)))
2038 (home-page "https://github.com/lh3/minimap2")
2039 (synopsis "Python binding for minimap2")
2040 (description "This package provides a convenient interface to minimap2,
2041 a fast and accurate C program to align genomic and transcribe nucleotide
2042 sequences.")
2043 (license license:expat)))
2044
2045 (define-public python-mechanize
2046 (package
2047 (name "python-mechanize")
2048 (version "0.4.5")
2049 (source
2050 (origin
2051 (method url-fetch)
2052 (uri (pypi-uri "mechanize" version))
2053 (sha256
2054 (base32
2055 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2056 (build-system python-build-system)
2057 (propagated-inputs
2058 `(("python-html5lib" ,python-html5lib)))
2059 (home-page "https://github.com/python-mechanize/mechanize")
2060 (synopsis
2061 "Stateful programmatic web browsing in Python")
2062 (description
2063 "Mechanize implements stateful programmatic web browsing in Python,
2064 after Andy Lester’s Perl module WWW::Mechanize.")
2065 (license license:bsd-3)))
2066
2067 (define-public python2-mechanize
2068 (package-with-python2 python-mechanize))
2069
2070 (define-public python-simpleaudio
2071 (package
2072 (name "python-simpleaudio")
2073 (version "1.0.4")
2074 (source
2075 (origin
2076 (method url-fetch)
2077 (uri (pypi-uri "simpleaudio" version))
2078 (sha256
2079 (base32
2080 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2081 (build-system python-build-system)
2082 (arguments
2083 `(#:tests? #f))
2084 (inputs
2085 `(("alsa-lib" ,alsa-lib)))
2086 (home-page
2087 "https://github.com/hamiltron/py-simple-audio")
2088 (synopsis "Simple, asynchronous audio playback for Python 3")
2089 (description
2090 "The @code{simplaudio} package provides cross-platform, dependency-free
2091 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2092 (license license:expat))) ; MIT license
2093
2094 (define-public python-simplejson
2095 (package
2096 (name "python-simplejson")
2097 (version "3.17.0")
2098 (source
2099 (origin
2100 (method url-fetch)
2101 (uri (pypi-uri "simplejson" version))
2102 (sha256
2103 (base32
2104 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
2105 (build-system python-build-system)
2106 (home-page "http://simplejson.readthedocs.org/en/latest/")
2107 (synopsis
2108 "Json library for Python")
2109 (description
2110 "JSON (JavaScript Object Notation) is a subset of JavaScript
2111 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2112 format.
2113
2114 Simplejson exposes an API familiar to users of the standard library marshal
2115 and pickle modules. It is the externally maintained version of the json
2116 library contained in Python 2.6, but maintains compatibility with Python 2.5
2117 and (currently) has significant performance advantages, even without using
2118 the optional C extension for speedups. Simplejson is also supported on
2119 Python 3.3+.")
2120 (license license:x11)))
2121
2122 (define-public python2-simplejson
2123 (package-with-python2 python-simplejson))
2124
2125
2126 (define-public python-pyicu
2127 (package
2128 (name "python-pyicu")
2129 (version "2.4.3")
2130 (source
2131 (origin
2132 (method url-fetch)
2133 (uri (pypi-uri "PyICU" version))
2134 (sha256
2135 (base32
2136 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
2137 (build-system python-build-system)
2138 (inputs
2139 `(("icu4c" ,icu4c)))
2140 (native-inputs
2141 `(("python-pytest" ,python-pytest)
2142 ("python-six" ,python-six)))
2143 (home-page "https://github.com/ovalhub/pyicu")
2144 (synopsis "Python extension wrapping the ICU C++ API")
2145 (description
2146 "PyICU is a python extension wrapping the ICU C++ API.")
2147 (license license:x11)))
2148
2149 (define-public python2-pyicu
2150 (package-with-python2 python-pyicu))
2151
2152 (define-public python-dogtail
2153 (package
2154 (name "python-dogtail")
2155 (version "0.9.11")
2156 (source (origin
2157 (method url-fetch)
2158 (uri
2159 (string-append
2160 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2161 "dogtail-" version ".tar.gz"))
2162 (sha256
2163 (base32
2164 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2165 (build-system python-build-system)
2166 (arguments
2167 `(#:tests? #f ; TODO Launching dbus for the tests
2168 ; fails
2169 #:phases
2170 (modify-phases %standard-phases
2171 (replace 'check
2172 (lambda* (#:key tests? #:allow-other-keys)
2173 (when tests?
2174 (system "Xvfb :1 &")
2175 (setenv "DISPLAY" ":1")
2176 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2177 #t)))))
2178 (propagated-inputs
2179 `(("python-pygobject" ,python-pygobject)
2180 ("python-pycairo" ,python-pycairo)
2181 ("python-pyatspi" ,python-pyatspi)))
2182 (native-inputs
2183 `(("python-nose" ,python-nose)
2184 ("gtk+" ,gtk+)
2185 ("xvfb" ,xorg-server)
2186 ("dbus" ,dbus)
2187 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2188 ("gobject-introspection" ,gobject-introspection)))
2189 (home-page "https://gitlab.com/dogtail/dogtail/")
2190 (synopsis "GUI test tool and automation framework written in Python")
2191 (description
2192 "Dogtail is a GUI test tool and automation framework written in Python.
2193 It uses Accessibility (a11y) technologies to communicate with desktop
2194 applications. dogtail scripts are written in Python and executed like any
2195 other Python program.")
2196 (license license:gpl2+)))
2197
2198 (define-public python2-dogtail
2199 (package-with-python2 python-dogtail))
2200
2201 (define-public python-empy
2202 (package
2203 (name "python-empy")
2204 (version "3.3.3")
2205 (source (origin
2206 (method url-fetch)
2207 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2208 version ".tar.gz"))
2209 (sha256
2210 (base32
2211 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2212 (build-system python-build-system)
2213 (arguments
2214 `(#:tests? #f)) ; python2 only
2215 (home-page "http://www.alcyone.com/software/empy/")
2216 (synopsis "Templating system for Python")
2217 (description
2218 "EmPy is a system for embedding Python expressions and statements in
2219 template text; it takes an EmPy source file, processes it, and produces
2220 output. This is accomplished via expansions, which are special signals to the
2221 EmPy system and are set off by a special prefix (by default the at sign, @@).
2222 EmPy can expand arbitrary Python expressions and statements in this way, as
2223 well as a variety of special forms. Textual data not explicitly delimited in
2224 this way is sent unaffected to the output, allowing Python to be used in
2225 effect as a markup language. Also supported are callbacks via hooks,
2226 recording and playback via diversions, and dynamic, chainable filters. The
2227 system is highly configurable via command line options and embedded
2228 commands.")
2229 (license license:lgpl2.1+)))
2230
2231 (define-public python2-empy
2232 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2233 (package/inherit base
2234 (arguments `(,@(package-arguments base)
2235 #:tests? #t)))))
2236
2237 (define-public python2-element-tree
2238 (package
2239 (name "python2-element-tree")
2240 (version "1.2.6")
2241 (source (origin
2242 (method url-fetch)
2243 (uri (string-append
2244 "http://effbot.org/media/downloads/elementtree-"
2245 version "-20050316.tar.gz"))
2246 (sha256
2247 (base32
2248 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2249 (build-system python-build-system)
2250 (arguments
2251 `(#:python ,python-2 ; seems to be part of Python 3
2252 #:tests? #f)) ; no 'test' sub-command
2253 (synopsis "Toolkit for XML processing in Python")
2254 (description
2255 "ElementTree is a Python library supporting lightweight XML processing.")
2256 (home-page "https://effbot.org/zone/element-index.htm")
2257 (license (license:x11-style
2258 "http://docs.python.org/2/license.html"
2259 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2260
2261 (define-public python2-pybugz
2262 (package
2263 (name "python2-pybugz")
2264 (version "0.6.11")
2265 (source (origin
2266 (method url-fetch)
2267 (uri (string-append
2268 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2269 version ".tar.gz"))
2270 (sha256
2271 (base32
2272 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2273 (patches (search-patches "pybugz-stty.patch"
2274 "pybugz-encode-error.patch"))))
2275 (build-system python-build-system)
2276 (arguments
2277 `(#:python ,python-2 ; SyntaxError with Python 3
2278 #:tests? #f)) ; no 'test' sub-command
2279 (propagated-inputs
2280 `(("element-tree" ,python2-element-tree)))
2281 (synopsis "Python and command-line interface to Bugzilla")
2282 (description
2283 "PyBugz is a Python library and command-line tool to query the Bugzilla
2284 bug tracking system. It is meant as an aid to speed up interaction with the
2285 bug tracker.")
2286 (home-page "http://www.liquidx.net/pybugz/")
2287 (license license:gpl2)))
2288
2289 (define-public python2-enum
2290 (package
2291 (name "python2-enum")
2292 (version "0.4.6")
2293 (source (origin
2294 (method url-fetch)
2295 (uri (pypi-uri "enum" version))
2296 (sha256
2297 (base32
2298 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2299 (build-system python-build-system)
2300 (arguments
2301 `(#:python ,python-2))
2302 (home-page "https://pypi.org/project/enum/")
2303 (synopsis "Robust enumerated type support in Python")
2304 (description
2305 "This provides a module for robust enumerations in Python. It has
2306 been superseded by the Python standard library and is provided only for
2307 compatibility.")
2308 ;; Choice of either license.
2309 (license (list license:gpl3+ license:psfl))))
2310
2311 (define-public python-enum34
2312 (package
2313 (name "python-enum34")
2314 (version "1.1.6")
2315 (source
2316 (origin
2317 (method url-fetch)
2318 (uri (pypi-uri "enum34" version))
2319 (sha256
2320 (base32
2321 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2322 (build-system python-build-system)
2323 (home-page "https://pypi.org/project/enum34/")
2324 (synopsis "Backported Python 3.4 Enum")
2325 (description
2326 "Enum34 is the new Python stdlib enum module available in Python 3.4
2327 backported for previous versions of Python from 2.4 to 3.3.")
2328 (license license:bsd-3)))
2329
2330 (define-public python2-enum34
2331 (package-with-python2 python-enum34))
2332
2333 (define-public python-parse-type
2334 (package
2335 (name "python-parse-type")
2336 (version "0.4.2")
2337 (source
2338 (origin
2339 (method url-fetch)
2340 (uri (pypi-uri "parse_type" version))
2341 (sha256
2342 (base32
2343 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2344 (build-system python-build-system)
2345 (propagated-inputs
2346 `(("python-six" ,python-six)
2347 ("python-parse" ,python-parse)))
2348 (native-inputs
2349 `(("python-pytest" ,python-pytest)
2350 ("python-pytest-runner" ,python-pytest-runner)))
2351 (home-page "https://github.com/jenisys/parse_type")
2352 (synopsis "Extended parse module")
2353 (description
2354 "Parse_type extends the python parse module.")
2355 (properties
2356 `((python2-variant . ,(delay python2-parse-type))))
2357 (license license:bsd-3)))
2358
2359 (define-public python2-parse-type
2360 (let ((base (package-with-python2
2361 (strip-python2-variant python-parse-type))))
2362 (package/inherit base
2363 (propagated-inputs
2364 `(("python2-enum34" ,python2-enum34)
2365 ,@(package-propagated-inputs base))))))
2366
2367 (define-public python-parse
2368 (package
2369 (name "python-parse")
2370 (version "1.18.0")
2371 (source
2372 (origin
2373 (method url-fetch)
2374 (uri (pypi-uri "parse" version))
2375 (sha256
2376 (base32
2377 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2378 (build-system python-build-system)
2379 (arguments
2380 `(#:phases
2381 (modify-phases %standard-phases
2382 (replace 'check
2383 (lambda _ (invoke "python" "test_parse.py"))))))
2384 (home-page "https://github.com/r1chardj0n3s/parse")
2385 (synopsis "Parse strings")
2386 (description
2387 "Parse strings using a specification based on the Python @code{format()}
2388 syntax.")
2389 (license license:x11)))
2390
2391 (define-public python-polib
2392 (package
2393 (name "python-polib")
2394 (version "1.1.0")
2395 (source (origin
2396 (method url-fetch)
2397 (uri (pypi-uri "polib" version))
2398 (sha256
2399 (base32
2400 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2401 (build-system python-build-system)
2402 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2403 (synopsis "Manipulate, create and modify gettext files")
2404 (description "Polib can manipulate any gettext format (po, pot and mo)
2405 files. It can be used to create po files from scratch or to modify
2406 existing ones.")
2407 (license license:expat)))
2408
2409 (define-public python2-polib
2410 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2411 (package/inherit base
2412 (arguments `(,@(package-arguments base)
2413 ;; Tests don't work with python2.
2414 #:tests? #f)))))
2415
2416 (define-public python-poyo
2417 (package
2418 (name "python-poyo")
2419 (version "0.5.0")
2420 (source
2421 (origin
2422 (method url-fetch)
2423 (uri (pypi-uri "poyo" version))
2424 (sha256
2425 (base32
2426 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2427 (build-system python-build-system)
2428 (home-page "https://github.com/hackebrot/poyo")
2429 (synopsis "Lightweight YAML Parser for Python")
2430 (description
2431 "This package provides a lightweight YAML Parser for Python. It supports
2432 only a chosen subset of the YAML format that is required to parse cookiecutter
2433 user configuration files. It does not have support for serializing into YAML
2434 and is not compatible with JSON.")
2435 (license license:expat)))
2436
2437 (define-public scons
2438 (package
2439 (name "scons")
2440 (version "3.0.4")
2441 (source (origin
2442 (method git-fetch)
2443 (uri (git-reference
2444 (url "https://github.com/SCons/scons")
2445 (commit version)))
2446 (file-name (git-file-name name version))
2447 (sha256
2448 (base32
2449 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2450 (build-system python-build-system)
2451 (arguments
2452 `(#:use-setuptools? #f ; still relies on distutils
2453 #:tests? #f ; no 'python setup.py test' command
2454 #:phases
2455 (modify-phases %standard-phases
2456 (add-before 'build 'bootstrap
2457 (lambda _
2458 (substitute* "src/engine/SCons/compat/__init__.py"
2459 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2460 "sys.modules[new] = __import__(old)"))
2461 (substitute* "src/engine/SCons/Platform/__init__.py"
2462 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2463 "mod = __import__(full_name)"))
2464 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2465 (chdir "build/scons")
2466 #t)))))
2467 (home-page "https://scons.org/")
2468 (synopsis "Software construction tool written in Python")
2469 (description
2470 "SCons is a software construction tool. Think of SCons as an improved,
2471 cross-platform substitute for the classic Make utility with integrated
2472 functionality similar to autoconf/automake and compiler caches such as ccache.
2473 In short, SCons is an easier, more reliable and faster way to build
2474 software.")
2475 (license license:x11)))
2476
2477 (define-public scons-python2
2478 (package
2479 (inherit (package-with-python2 scons))
2480 (name "scons-python2")))
2481
2482 (define-public python-extension-helpers
2483 (package
2484 (name "python-extension-helpers")
2485 (version "0.1")
2486 (source
2487 (origin
2488 (method url-fetch)
2489 (uri (pypi-uri "extension-helpers" version))
2490 (sha256
2491 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2492 (build-system python-build-system)
2493 (native-inputs
2494 `(("coverage" ,python-coverage)
2495 ("pytest" ,python-pytest-astropy)
2496 ("pytest-cov" ,python-pytest-cov)
2497 ("setuptools-scm" ,python-setuptools-scm)))
2498 (home-page "https://github.com/astropy/astropy-helpers")
2499 (synopsis
2500 "Utilities for building and installing packages in the Astropy ecosystem")
2501 (description
2502 "The extension-helpers package includes many build, installation, and
2503 documentation-related tools used by the Astropy project.")
2504 (license license:bsd-3)))
2505
2506 (define-public python-extras
2507 (package
2508 (name "python-extras")
2509 (version "1.0.0")
2510 (source
2511 (origin
2512 (method url-fetch)
2513 (uri (pypi-uri "extras" version))
2514 (sha256
2515 (base32
2516 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2517 (build-system python-build-system)
2518 (arguments
2519 ;; FIXME: Circular dependency on testtools.
2520 '(#:tests? #f))
2521 (home-page "https://github.com/testing-cabal/extras")
2522 (synopsis "Useful extensions to the Python standard library")
2523 (description
2524 "Extras is a set of extensions to the Python standard library.")
2525 (license license:expat)))
2526
2527 (define-public python2-extras
2528 (package-with-python2 python-extras))
2529
2530 (define-public python-mimeparse
2531 (package
2532 (name "python-mimeparse")
2533 (version "1.6.0")
2534 (source
2535 (origin
2536 (method url-fetch)
2537 (uri (pypi-uri "python-mimeparse" version))
2538 (sha256
2539 (base32
2540 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2541 (build-system python-build-system)
2542 (arguments
2543 '(#:phases
2544 (modify-phases %standard-phases
2545 (replace 'check
2546 (lambda _
2547 (invoke "./mimeparse_test.py"))))))
2548 (home-page
2549 "https://github.com/dbtsai/python-mimeparse")
2550 (synopsis "Python library for parsing MIME types")
2551 (description
2552 "Mimeparse provides basic functions for parsing MIME type names and
2553 matching them against a list of media-ranges.")
2554 (license license:expat)))
2555
2556 (define-public python2-mimeparse
2557 (package-with-python2 python-mimeparse))
2558
2559 (define-public python-miniboa
2560 (package
2561 (name "python-miniboa")
2562 (version "1.0.7")
2563 (source
2564 (origin
2565 (method url-fetch)
2566 (uri (pypi-uri "miniboa" version))
2567 (sha256
2568 (base32
2569 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2570 (build-system python-build-system)
2571 (home-page "https://github.com/shmup/miniboa")
2572 (synopsis "Simple, single-threaded Telnet server")
2573 (description
2574 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2575 server.")
2576 (license license:asl2.0)))
2577
2578 (define-public python2-miniboa
2579 (package-with-python2 python-miniboa))
2580
2581 (define-public python-pafy
2582 (package
2583 (name "python-pafy")
2584 (version "0.5.3.1")
2585 (source
2586 (origin
2587 (method url-fetch)
2588 (uri (pypi-uri "pafy" version))
2589 (sha256
2590 (base32
2591 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2592 (build-system python-build-system)
2593 (arguments
2594 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2595 (propagated-inputs
2596 ;; Youtube-dl is a python package which is imported in the file
2597 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2598 `(("youtube-dl" ,youtube-dl)))
2599 (home-page "https://np1.github.io/pafy/")
2600 (synopsis "Retrieve YouTube content and metadata")
2601 (description
2602 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2603 (license license:lgpl3+)))
2604
2605 (define-public python2-funcsigs
2606 (package
2607 (name "python2-funcsigs")
2608 (version "1.0.2")
2609 (source (origin
2610 (method url-fetch)
2611 (uri (pypi-uri "funcsigs" version))
2612 (sha256
2613 (base32
2614 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2615 (build-system python-build-system)
2616 (arguments
2617 `(#:python ,python-2))
2618 (native-inputs
2619 `(("python2-unittest2" ,python2-unittest2)))
2620 (home-page "http://funcsigs.readthedocs.org")
2621 (synopsis "Python function signatures from PEP362")
2622 (description
2623 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2624 (license license:asl2.0)))
2625
2626 (define-public python2-funcsigs-bootstrap
2627 (package
2628 (inherit python2-funcsigs)
2629 (name "python2-funcsigs-bootstrap")
2630 (native-inputs `())
2631 (arguments
2632 `(#:tests? #f
2633 ,@(package-arguments python2-funcsigs)))))
2634
2635 (define-public python-py
2636 (package
2637 (name "python-py")
2638 (version "1.8.1")
2639 (source
2640 (origin
2641 (method url-fetch)
2642 (uri (pypi-uri "py" version))
2643 (sha256
2644 (base32
2645 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2646 (build-system python-build-system)
2647 (arguments
2648 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2649 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2650 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2651 ;; Is this module globally installed?"
2652 '(#:tests? #f))
2653 (native-inputs
2654 `(("python-setuptools-scm" ,python-setuptools-scm)))
2655 (home-page "https://github.com/pytest-dev/py")
2656 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2657 (description
2658 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2659 code introspection, and logging.")
2660 (license license:expat)))
2661
2662 (define-public python-py-next
2663 (package
2664 (inherit python-py)
2665 (version "1.9.0")
2666 (source
2667 (origin
2668 (method url-fetch)
2669 (uri (pypi-uri "py" version))
2670 (sha256
2671 (base32
2672 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
2673
2674 (define-public python2-py
2675 (package-with-python2 python-py))
2676
2677 ;; Recent versions of python-fixtures and python-testrepository need
2678 ;; python-pbr for packaging, which itself needs these two packages for
2679 ;; testing.
2680 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2681 ;; same source, just without any test dependencies and with tests disabled.
2682 ;; python-pbr-minmal is then used to package python-fixtures and
2683 ;; python-testrepository.
2684 ;; Strictly speaking we currently could remove the test-requirements from the
2685 ;; normal python-pbr package (and save this package) since test are disabled
2686 ;; there anyway. But this may change in future.
2687 (define-public python-pbr-minimal
2688 (package
2689 (name "python-pbr-minimal")
2690 (version "3.0.1")
2691 (source
2692 (origin
2693 (method url-fetch)
2694 (uri (pypi-uri "pbr" version))
2695 (sha256
2696 (base32
2697 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2698 (build-system python-build-system)
2699 (arguments
2700 `(#:tests? #f))
2701 (home-page "https://docs.openstack.org/pbr/latest/")
2702 (synopsis "Minimal build of python-pbr used for bootstrapping")
2703 (description
2704 "Used only for bootstrapping python2-pbr, you should not need this.")
2705 (license license:asl2.0)))
2706
2707 (define-public python-pbr
2708 (package
2709 (inherit python-pbr-minimal)
2710 (name "python-pbr")
2711 (arguments
2712 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2713 (propagated-inputs
2714 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2715 (native-inputs
2716 `(("python-fixtures" ,python-fixtures-bootstrap)
2717 ;; discover, coverage, hacking, subunit
2718 ("python-mock" ,python-mock)
2719 ("python-six" ,python-six)
2720 ("python-sphinx" ,python-sphinx)
2721 ("python-testrepository" ,python-testrepository-bootstrap)
2722 ("python-testresources" ,python-testresources-bootstrap)
2723 ("python-testscenarios" ,python-testscenarios-bootstrap)
2724 ("python-testtools" ,python-testtools-bootstrap)
2725 ("python-virtualenv" ,python-virtualenv)))
2726 (synopsis "Enhance the default behavior of Python’s setuptools")
2727 (description
2728 "Python Build Reasonableness (PBR) is a library that injects some useful
2729 and sensible default behaviors into your setuptools run. It will set
2730 versions, process requirements files and generate AUTHORS and ChangeLog file
2731 from git information.
2732 ")))
2733
2734 (define-public python-pyrsistent
2735 (package
2736 (name "python-pyrsistent")
2737 (version "0.16.0")
2738 (home-page "https://github.com/tobgu/pyrsistent")
2739 (source (origin
2740 (method url-fetch)
2741 (uri (pypi-uri "pyrsistent" version))
2742 (sha256
2743 (base32
2744 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2745 (build-system python-build-system)
2746 (arguments
2747 '(#:phases (modify-phases %standard-phases
2748 ;; The package works fine with newer Pytest and Hypothesis, but
2749 ;; has pinned older versions to stay compatible with Python 2.
2750 (add-before 'check 'loosen-pytest-requirement
2751 (lambda _
2752 (substitute* "setup.py"
2753 (("pytest<5") "pytest")
2754 (("hypothesis<5") "hypothesis"))
2755 #t)))))
2756 (native-inputs
2757 `(("python-hypothesis" ,python-hypothesis)
2758 ("python-pytest" ,python-pytest)
2759 ("python-pytest-runner" ,python-pytest-runner)))
2760 (propagated-inputs
2761 `(("python-six" ,python-six)))
2762 (synopsis "Persistent data structures for Python")
2763 (description
2764 "Pyrsistent is a number of persistent collections (by some referred to as
2765 functional data structures). Persistent in the sense that they are immutable.
2766
2767 All methods on a data structure that would normally mutate it instead return a
2768 new copy of the structure containing the requested updates. The original
2769 structure is left untouched.")
2770 (license license:expat)))
2771
2772 (define-public python2-pyrsistent
2773 (package-with-python2 python-pyrsistent))
2774
2775 (define-public python-exif-read
2776 (package
2777 (name "python-exif-read")
2778 (version "2.1.2")
2779 (source (origin
2780 (method url-fetch)
2781 (uri (pypi-uri "ExifRead" version))
2782 (sha256
2783 (base32
2784 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2785 (build-system python-build-system)
2786 (arguments `(#:tests? #f)) ; no tests
2787 (home-page "https://github.com/ianare/exif-py")
2788 (synopsis "Python library to extract EXIF data from image files")
2789 (description
2790 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2791 files.")
2792 (license license:bsd-3)))
2793
2794 (define-public python2-exif-read
2795 (package-with-python2 python-exif-read))
2796
2797 (define-public python-pyld
2798 (package
2799 (name "python-pyld")
2800 (version "1.0.5")
2801 (source (origin
2802 (method url-fetch)
2803 (uri (pypi-uri "PyLD" version))
2804 (sha256
2805 (base32
2806 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2807 (build-system python-build-system)
2808 (home-page "https://github.com/digitalbazaar/pyld")
2809 (synopsis "Python implementation of the JSON-LD specification")
2810 (description
2811 "PyLD is an implementation of the JSON-LD specification.")
2812 (license license:bsd-3)))
2813
2814 (define-public python2-pyld
2815 (package-with-python2 python-pyld))
2816
2817 (define-public python-cli-helpers
2818 (package
2819 (name "python-cli-helpers")
2820 (version "2.0.1")
2821 (source
2822 (origin
2823 ;; There's no source tarball on PyPI.
2824 (method git-fetch)
2825 (uri (git-reference
2826 (url "https://github.com/dbcli/cli_helpers")
2827 (commit (string-append "v" version))))
2828 (file-name (git-file-name name version))
2829 (sha256
2830 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2831 (build-system python-build-system)
2832 (native-inputs
2833 `(("python-pytest" ,python-pytest)))
2834 (propagated-inputs
2835 `(("python-wcwidth" ,python-wcwidth)
2836 ("python-configobj" ,python-configobj)
2837 ("python-tabulate" ,python-tabulate)
2838 ("python-terminaltables" ,python-terminaltables)))
2839 (home-page "https://github.com/dbcli/cli_helpers")
2840 (synopsis "Helpers for building command-line apps")
2841 (description
2842 "CLI Helpers is a Python package that makes it easy to perform common
2843 tasks when building command-line apps. It's a helper library for command-line
2844 interfaces.")
2845 (license license:bsd-3)))
2846
2847 (define-public python-click
2848 (package
2849 (name "python-click")
2850 (version "7.1.2")
2851 (source
2852 (origin
2853 (method url-fetch)
2854 (uri (pypi-uri "click" version))
2855 (sha256
2856 (base32
2857 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2858 (build-system python-build-system)
2859 (arguments
2860 `(#:phases
2861 (modify-phases %standard-phases
2862 (add-after 'unpack 'fix-paths
2863 (lambda* (#:key inputs #:allow-other-keys)
2864 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2865 "cross-libc" "libc"))))
2866 (substitute* "src/click/_unicodefun.py"
2867 (("'locale'")
2868 (string-append "'" glibc "/bin/locale'"))))
2869 #t))
2870 (replace 'check
2871 (lambda _
2872 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2873 (invoke "python" "-m" "pytest"))))))
2874 (native-inputs
2875 `(("python-pytest" ,python-pytest)))
2876 (home-page "https://palletsprojects.com/p/click/")
2877 (synopsis "Command line library for Python")
2878 (description
2879 "Click is a Python package for creating command line interfaces in a
2880 composable way with as little code as necessary. Its name stands for
2881 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2882 with sensible defaults out of the box.")
2883 (license license:bsd-3)))
2884
2885 (define-public python2-click
2886 (package-with-python2 python-click))
2887
2888 (define-public python-click-5
2889 (package (inherit python-click)
2890 (name "python-click")
2891 (version "5.1")
2892 (source
2893 (origin
2894 (method url-fetch)
2895 (uri (pypi-uri "click" version))
2896 (sha256
2897 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2898 (arguments `())))
2899
2900 (define-public python-vcversioner
2901 (package
2902 (name "python-vcversioner")
2903 (version "2.16.0.0")
2904 (source
2905 (origin
2906 (method url-fetch)
2907 (uri (pypi-uri "vcversioner" version))
2908 (sha256
2909 (base32
2910 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2911 (build-system python-build-system)
2912 (synopsis "Python library for version number discovery")
2913 (description "Vcversioner is a Python library that inspects tagging
2914 information in a variety of version control systems in order to discover
2915 version numbers.")
2916 (home-page "https://github.com/habnabit/vcversioner")
2917 (license license:isc)))
2918
2919 (define-public python2-vcversioner
2920 (package-with-python2 python-vcversioner))
2921
2922 (define-public python-jdcal
2923 (package
2924 (name "python-jdcal")
2925 (version "1.4")
2926 (source
2927 (origin
2928 (method url-fetch)
2929 (uri (pypi-uri "jdcal" version))
2930 (sha256
2931 (base32
2932 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2933 (build-system python-build-system)
2934 (arguments
2935 `(#:phases (modify-phases %standard-phases
2936 (replace 'check
2937 (lambda _
2938 (invoke "pytest"))))))
2939 (native-inputs
2940 `(("python-pytest" ,python-pytest)))
2941 (home-page "https://github.com/phn/jdcal")
2942 (synopsis "Functions to convert between Julian dates Gregorian dates")
2943 (description "This Python library provides functions for converting
2944 between Julian dates and Gregorian dates.")
2945 (license license:bsd-2)))
2946
2947 (define-public python2-jdcal
2948 (package-with-python2 python-jdcal))
2949
2950 (define-public python-jsondiff
2951 (package
2952 (name "python-jsondiff")
2953 (version "1.2.0")
2954 (source
2955 (origin
2956 (method url-fetch)
2957 (uri (pypi-uri "jsondiff" version))
2958 (sha256
2959 (base32
2960 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2961 (build-system python-build-system)
2962 (native-inputs
2963 `(("python-nose" ,python-nose)
2964 ("python-nose-random" ,python-nose-random)))
2965 (home-page
2966 "https://github.com/fzumstein/jsondiff")
2967 (synopsis "Compare JSON and JSON-like structures in Python")
2968 (description "@code{jsondiff} is a Python library which lets you
2969 compare, diff, and patch JSON and JSON-like structures in Python.")
2970 (license license:expat)))
2971
2972 (define-public python-jsonschema
2973 (package
2974 (name "python-jsonschema")
2975 (version "3.2.0")
2976 (source (origin
2977 (method url-fetch)
2978 (uri (pypi-uri "jsonschema" version))
2979 (sha256
2980 (base32
2981 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2982 (build-system python-build-system)
2983 (arguments
2984 '(#:phases
2985 (modify-phases %standard-phases
2986 (replace 'check
2987 (lambda* (#:key inputs outputs #:allow-other-keys)
2988 (add-installed-pythonpath inputs outputs)
2989 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2990 (invoke "trial" "jsonschema"))))))
2991 (native-inputs
2992 `(("python-setuptools_scm" ,python-setuptools-scm)
2993 ("python-twisted" ,python-twisted)))
2994 (propagated-inputs
2995 `(("python-attrs" ,python-attrs)
2996 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2997 ("python-pyrsistent" ,python-pyrsistent)
2998 ("python-six" ,python-six)))
2999 (home-page "https://github.com/Julian/jsonschema")
3000 (synopsis "Implementation of JSON Schema for Python")
3001 (description
3002 "Jsonschema is an implementation of JSON Schema for Python.")
3003 (license license:expat)
3004 (properties `((python2-variant . ,(delay python2-jsonschema))))))
3005
3006 (define-public python2-jsonschema
3007 (let ((jsonschema (package-with-python2
3008 (strip-python2-variant python-jsonschema))))
3009 (package/inherit jsonschema
3010 (propagated-inputs
3011 `(("python2-functools32" ,python2-functools32)
3012 ,@(package-propagated-inputs jsonschema))))))
3013
3014 (define-public python-schema
3015 (package
3016 (name "python-schema")
3017 (version "0.6.6")
3018 (source
3019 (origin
3020 (method url-fetch)
3021 (uri (pypi-uri "schema" version))
3022 (sha256
3023 (base32
3024 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
3025 (build-system python-build-system)
3026 (native-inputs
3027 `(("python-pytest" ,python-pytest)))
3028 (home-page "https://github.com/keleshev/schema")
3029 (synopsis "Simple data validation library")
3030 (description
3031 "@code{python-schema} is a library for validating Python data
3032 structures, such as those obtained from config-files, forms, external
3033 services or command-line parsing, converted from JSON/YAML (or
3034 something else) to Python data-types.")
3035 (license license:psfl)))
3036
3037 (define-public python2-schema
3038 (package-with-python2 python-schema))
3039
3040 (define-public python-schema-0.5
3041 (package (inherit python-schema)
3042 (version "0.5.0")
3043 (source
3044 (origin
3045 (method url-fetch)
3046 (uri (pypi-uri "schema" version))
3047 (sha256
3048 (base32
3049 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
3050
3051 (define-public python2-schema-0.5
3052 (package-with-python2 python-schema-0.5))
3053
3054 (define-public python-kitchen
3055 (package
3056 (name "python-kitchen")
3057 (version "1.2.5")
3058 (source
3059 (origin
3060 (method url-fetch)
3061 (uri (pypi-uri "kitchen" version))
3062 (sha256
3063 (base32
3064 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3065 (build-system python-build-system)
3066 (propagated-inputs
3067 `(("python-chardet" ,python-chardet)))
3068 (home-page "https://github.com/fedora-infra/kitchen")
3069 (synopsis "Python API for snippets")
3070 (description "@code{kitchen} module provides a python API for all sorts of
3071 little useful snippets of code that everybody ends up writing for their projects
3072 but never seem big enough to build an independent release. Use kitchen and stop
3073 cutting and pasting that code over and over.")
3074 (license (list license:lgpl2.1+
3075 ;; subprocess.py, test_subprocess.py,
3076 ;; kitchen/pycompat25/defaultdict.py:
3077 license:psfl))))
3078
3079 (define-public python2-kitchen
3080 (package-with-python2 python-kitchen))
3081
3082 (define-public python-roman
3083 (package
3084 (name "python-roman")
3085 (version "3.3")
3086 (source
3087 (origin
3088 (method url-fetch)
3089 (uri (pypi-uri "roman" version))
3090 (sha256
3091 (base32
3092 "0gyp2bmw47jgpm8j64gydzqq838bgxz5gh6cm57lxlr7p26sqiic"))))
3093 (build-system python-build-system)
3094 (home-page "https://github.com/zopefoundation/roman")
3095 (synopsis "Integer to Roman numerals converter")
3096 (description
3097 "This package provides a small helper library to convert Arabic Numbers
3098 to Roman Numerals.")
3099 (license license:psfl)))
3100
3101 (define-public python-unidecode
3102 (package
3103 (name "python-unidecode")
3104 (version "1.1.1")
3105 (source (origin
3106 (method url-fetch)
3107 (uri (pypi-uri "Unidecode" version))
3108 (sha256
3109 (base32
3110 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3111 (build-system python-build-system)
3112 (home-page "https://pypi.org/project/Unidecode/")
3113 (synopsis "ASCII transliterations of Unicode text")
3114 (description
3115 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3116 useful when integrating with legacy code that doesn't support Unicode, or for
3117 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3118 machine identifiers from human-readable Unicode strings that should still be
3119 somewhat intelligible.")
3120 (license license:gpl2+)))
3121
3122 (define-public python2-unidecode
3123 (package-with-python2 python-unidecode))
3124
3125 (define-public python-text-unidecode
3126 (package
3127 (name "python-text-unidecode")
3128 (version "1.3")
3129 (source (origin
3130 (method url-fetch)
3131 (uri (pypi-uri "text-unidecode" version))
3132 (sha256
3133 (base32
3134 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3135 (build-system python-build-system)
3136 (arguments
3137 '(#:phases (modify-phases %standard-phases
3138 (replace 'check
3139 (lambda _
3140 (setenv "PYTHONPATH"
3141 (string-append "./build/lib:"
3142 (getenv "PYTHONPATH")))
3143 (invoke "pytest" "-vv"))))))
3144 (native-inputs
3145 `(("python-pytest" ,python-pytest)))
3146 (home-page "https://github.com/kmike/text-unidecode/")
3147 (synopsis "Decode Unicode data")
3148 (description
3149 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3150 Perl library. It can create ASCII representations of Unicode data. In general
3151 users should prefer the @code{python-unidecode} package which offers better
3152 memory usage and transliteration quality.")
3153 ;; The user can choose either license.
3154 (license (list license:clarified-artistic license:gpl2+))))
3155
3156 (define-public python2-text-unidecode
3157 (package-with-python2 python-text-unidecode))
3158
3159 (define-public python-pyjwt
3160 (package
3161 (name "python-pyjwt")
3162 (version "1.7.1")
3163 (source
3164 (origin
3165 (method url-fetch)
3166 (uri (pypi-uri "PyJWT" version))
3167 (sha256
3168 (base32
3169 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3170 (modules '((guix build utils)))
3171 (snippet
3172 '(begin
3173 (for-each delete-file-recursively
3174 (find-files "." "\\.pyc$"))
3175 #t))))
3176 (build-system python-build-system)
3177 (arguments
3178 '(#:phases (modify-phases %standard-phases
3179 (replace 'check
3180 (lambda _
3181 ;; Mimic upstream commit 3a20892442b34c7 to get
3182 ;; rid of dependency on pytest-runner < 5.0.
3183 ;; Remove substitution for PyJWT > 1.7.1.
3184 (substitute* "setup.py"
3185 ((".*pytest-runner.*")
3186 ""))
3187 (invoke "pytest" "-vv"))))))
3188 (native-inputs
3189 `(("python-pytest" ,python-pytest)
3190 ("python-pytest-cov" ,python-pytest-cov)))
3191 (home-page "https://github.com/progrium/pyjwt")
3192 (synopsis "JSON Web Token implementation in Python")
3193 (description
3194 "PyJWT is a JSON Web Token implementation written in Python.")
3195 (license license:expat)))
3196
3197 (define-public python2-pyjwt
3198 (package-with-python2 python-pyjwt))
3199
3200 (define-public python-pykka
3201 (package
3202 (name "python-pykka")
3203 (version "1.2.1")
3204 (source
3205 (origin
3206 (method url-fetch)
3207 (uri (pypi-uri "Pykka" version))
3208 (sha256
3209 (base32
3210 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
3211 (build-system python-build-system)
3212 (native-inputs
3213 `(("python-mock" ,python-mock)
3214 ("python-nose" ,python-nose)
3215 ("python-gevent" ,python-gevent)
3216 ("python-eventlet" ,python-eventlet)))
3217 (home-page "https://www.pykka.org/")
3218 (synopsis "Pykka is a Python implementation of the actor model")
3219 (description
3220 "Pykka is a Python implementation of the actor model.
3221 The actor model introduces some simple rules to control the sharing
3222 of state and cooperation between execution units, which makes it
3223 easier to build concurrent applications.")
3224 (license license:asl2.0)))
3225
3226 (define-public python-pymsgbox
3227 (package
3228 (name "python-pymsgbox")
3229 (version "1.0.6")
3230 (source
3231 (origin
3232 (method git-fetch)
3233 (uri (git-reference
3234 ;; LICENSE.txt is not present on pypi
3235 (url "https://github.com/asweigart/PyMsgBox")
3236 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3237 (file-name (git-file-name name version))
3238 (sha256
3239 (base32
3240 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3241 (arguments
3242 ;; Circular dependency to run tests:
3243 ;; Tests need pyautogui, which depends on pymsgbox.
3244 '(#:tests? #f))
3245 (build-system python-build-system)
3246 (home-page "https://github.com/asweigart/PyMsgBox")
3247 (synopsis "Python module for JavaScript-like message boxes")
3248 (description
3249 "PyMsgBox is a simple, cross-platform, pure Python module for
3250 JavaScript-like message boxes. Types of dialog boxes include:
3251 @enumerate
3252 @item alert
3253 @item confirm
3254 @item prompt
3255 @item password
3256 @end enumerate
3257 ")
3258 (license license:bsd-3)))
3259
3260 (define-public python-pympler
3261 (package
3262 (name "python-pympler")
3263 (home-page "https://pythonhosted.org/Pympler/")
3264 (version "0.8")
3265 (source (origin
3266 (method url-fetch)
3267 (uri (pypi-uri "Pympler" version))
3268 (sha256
3269 (base32
3270 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3271 (build-system python-build-system)
3272 (arguments
3273 `(#:phases (modify-phases %standard-phases
3274 (delete 'check)
3275 (add-after 'install 'check
3276 (lambda* (#:key inputs outputs #:allow-other-keys)
3277 (add-installed-pythonpath inputs outputs)
3278 (invoke "python" "setup.py" "test"))))))
3279 (synopsis "Measure, monitor and analyze memory behavior")
3280 (description
3281 "Pympler is a development tool to measure, monitor and analyze
3282 the memory behavior of Python objects in a running Python application.
3283
3284 By pympling a Python application, detailed insight in the size and the
3285 lifetime of Python objects can be obtained. Undesirable or unexpected
3286 runtime behavior like memory bloat and other @samp{pymples} can easily
3287 be identified.
3288
3289 A web profiling frontend exposes process statistics, garbage
3290 visualisation and class tracker statistics.")
3291 (license license:asl2.0)))
3292
3293 (define-public python2-pympler
3294 (package-with-python2 python-pympler))
3295
3296 (define-public python-itsdangerous
3297 (package
3298 (name "python-itsdangerous")
3299 (version "1.1.0")
3300 (source
3301 (origin
3302 (method url-fetch)
3303 (uri (pypi-uri "itsdangerous" version))
3304 (sha256
3305 (base32
3306 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3307 (build-system python-build-system)
3308 (home-page "https://palletsprojects.com/p/itsdangerous/")
3309 (synopsis "Python library for passing data to/from untrusted environments")
3310 (description
3311 "Itsdangerous provides various helpers to pass trusted data to untrusted
3312 environments and back.")
3313 (license license:bsd-3)))
3314
3315 (define-public python2-itsdangerous
3316 (package-with-python2 python-itsdangerous))
3317
3318 (define-public python-pyyaml
3319 (package
3320 (name "python-pyyaml")
3321 (version "5.3.1")
3322 (source
3323 (origin
3324 (method url-fetch)
3325 (uri (pypi-uri "PyYAML" version))
3326 (sha256
3327 (base32
3328 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3329 (build-system python-build-system)
3330 (inputs
3331 `(("libyaml" ,libyaml)))
3332 (home-page "https://pyyaml.org")
3333 (synopsis "YAML parser and emitter for Python")
3334 (description
3335 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3336 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3337 API, and sensible error messages. PyYAML supports standard YAML tags and
3338 provides Python-specific tags that represent an arbitrary Python object.")
3339 (license license:expat)))
3340
3341 (define-public python2-pyyaml
3342 (package-with-python2 python-pyyaml))
3343
3344 (define-public python-vine
3345 (package
3346 (name "python-vine")
3347 (version "1.1.4")
3348 (source
3349 (origin
3350 (method url-fetch)
3351 (uri (pypi-uri "vine" version))
3352 (sha256
3353 (base32
3354 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3355 (build-system python-build-system)
3356 (native-inputs
3357 `(("python-pytest" ,python-pytest)
3358 ("python-case" ,python-case)))
3359 (home-page "https://github.com/celery/vine")
3360 (synopsis "Promises for Python")
3361 (description
3362 "@code{vine} provides a special implementation of promises in that it can
3363 be used both for \"promise of a value\" and lazy evaluation. The biggest
3364 upside for this is that everything in a promise can also be a promise,
3365 e.g. filters, callbacks and errbacks can all be promises.")
3366 (license license:bsd-3)))
3367
3368 (define-public python-virtualenv
3369 (package
3370 (name "python-virtualenv")
3371 (version "20.2.1")
3372 (source
3373 (origin
3374 (method url-fetch)
3375 (uri (pypi-uri "virtualenv" version))
3376 (sha256
3377 (base32
3378 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3379 (build-system python-build-system)
3380 (native-inputs
3381 `(("python-mock" ,python-mock)
3382 ("python-pytest" ,python-pytest)
3383 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3384 ;; be an input at all". However, removing the input makes the build error:
3385 ;; File "setup.py", line 4, in <module>
3386 ;; raise RuntimeError("setuptools >= 41 required to build")
3387 ("python-setuptools" ,python-setuptools)
3388 ("python-setuptools-scm" ,python-setuptools-scm)))
3389 (propagated-inputs
3390 `(("python-appdirs" ,python-appdirs)
3391 ("python-distlib" ,python-distlib/next)
3392 ("python-filelock" ,python-filelock)
3393 ("python-six" ,python-six)
3394 ("python-importlib-metadata" ,python-importlib-metadata)))
3395 (home-page "https://virtualenv.pypa.io/")
3396 (synopsis "Virtual Python environment builder")
3397 (description
3398 "Virtualenv is a tool to create isolated Python environments.")
3399 (license license:expat)))
3400
3401 (define-public python-markupsafe
3402 (package
3403 (name "python-markupsafe")
3404 (version "1.1.1")
3405 (source
3406 (origin
3407 (method url-fetch)
3408 (uri (pypi-uri "MarkupSafe" version))
3409 (sha256
3410 (base32
3411 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3412 (build-system python-build-system)
3413 (arguments
3414 `(#:modules ((ice-9 ftw)
3415 (srfi srfi-1)
3416 (srfi srfi-26)
3417 (guix build utils)
3418 (guix build python-build-system))
3419 #:phases (modify-phases %standard-phases
3420 (replace 'check
3421 (lambda _
3422 (let ((cwd (getcwd))
3423 (libdir (find (cut string-prefix? "lib." <>)
3424 (scandir "build"))))
3425 (setenv "PYTHONPATH"
3426 (string-append cwd "/build/" libdir ":"
3427 (getenv "PYTHONPATH")))
3428 (invoke "pytest" "-vv")))))))
3429 (native-inputs
3430 `(("python-pytest" ,python-pytest)))
3431 (home-page "https://github.com/mitsuhiko/markupsafe")
3432 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3433 (description
3434 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3435 for Python.")
3436 (license license:bsd-3)))
3437
3438 (define-public python2-markupsafe
3439 (package-with-python2 python-markupsafe))
3440
3441 (define-public python-jinja2
3442 (package
3443 (name "python-jinja2")
3444 (version "2.11.2")
3445 (source
3446 (origin
3447 (method url-fetch)
3448 (uri (pypi-uri "Jinja2" version))
3449 (sha256
3450 (base32
3451 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3452 (build-system python-build-system)
3453 (arguments
3454 '(#:phases (modify-phases %standard-phases
3455 (replace 'check
3456 (lambda* (#:key tests? #:allow-other-keys)
3457 (if tests?
3458 (begin
3459 (setenv "PYTHONPATH"
3460 (string-append "./build/lib:"
3461 (getenv "PYTHONPATH")))
3462 (invoke "pytest" "-vv"))
3463 (format #t "test suite not run~%"))
3464 #t)))))
3465 (native-inputs
3466 `(("python-pytest" ,python-pytest)))
3467 (propagated-inputs
3468 `(("python-markupsafe" ,python-markupsafe)))
3469 (home-page "http://jinja.pocoo.org/")
3470 (synopsis "Python template engine")
3471 (description
3472 "Jinja2 is a small but fast and easy to use stand-alone template engine
3473 written in pure Python.")
3474 (license license:bsd-3)))
3475
3476 (define-public python2-jinja2
3477 (package-with-python2 python-jinja2))
3478
3479 (define-public python-jinja2-time
3480 (package
3481 (name "python-jinja2-time")
3482 (version "0.2.0")
3483 (source
3484 (origin
3485 (method url-fetch)
3486 (uri (pypi-uri "jinja2-time" version))
3487 (sha256
3488 (base32
3489 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3490 (build-system python-build-system)
3491 (propagated-inputs
3492 `(("python-arrow" ,python-arrow)
3493 ("python-jinja2" ,python-jinja2)))
3494 (home-page
3495 "https://github.com/hackebrot/jinja2-time")
3496 (synopsis "Jinja2 Extension for Dates and Times")
3497 (description
3498 "This package provides an extension for the template engine Jinja2. It
3499 adds a 'now' tag providing a convenient access to the arrow.now() API from
3500 templates. A format string can be provided to control the output.")
3501 (license license:expat)))
3502
3503 (define-public python-pystache
3504 (package
3505 (name "python-pystache")
3506 (version "0.5.4")
3507 (source (origin
3508 (method url-fetch)
3509 (uri (pypi-uri "pystache" version))
3510 (sha256
3511 (base32
3512 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3513 (build-system python-build-system)
3514 (arguments
3515 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3516 (home-page "http://defunkt.io/pystache/")
3517 (synopsis "Python logic-less template engine")
3518 (description
3519 "Pystache is a Python implementation of the framework agnostic,
3520 logic-free templating system Mustache.")
3521 (license license:expat)
3522 (properties `((python2-variant . ,(delay python2-pystache))))))
3523
3524 (define-public python2-pystache
3525 (let ((base (package-with-python2
3526 (strip-python2-variant python-pystache))))
3527 (package/inherit base
3528 (arguments
3529 `(#:python ,python-2
3530 #:phases
3531 (modify-phases %standard-phases
3532 (replace 'check
3533 (lambda _
3534 (invoke "python" "test_pystache.py")))))))))
3535
3536 (define-public python-joblib
3537 (package
3538 (name "python-joblib")
3539 (version "0.14.1")
3540 (source (origin
3541 (method url-fetch)
3542 (uri (pypi-uri "joblib" version))
3543 (sha256
3544 (base32
3545 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3546 (build-system python-build-system)
3547 (arguments
3548 `(#:phases
3549 (modify-phases %standard-phases
3550 (replace 'check
3551 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3552 (native-inputs
3553 `(("python-pytest" ,python-pytest)))
3554 (home-page "https://joblib.readthedocs.io/")
3555 (synopsis "Using Python functions as pipeline jobs")
3556 (description
3557 "Joblib is a set of tools to provide lightweight pipelining in Python.
3558 In particular, joblib offers: transparent disk-caching of the output values
3559 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3560 logging and tracing of the execution.")
3561 (license license:bsd-3)))
3562
3563 (define-public python2-joblib
3564 (package-with-python2 python-joblib))
3565
3566 (define-public python-daemon
3567 (package
3568 (name "python-daemon")
3569 (version "2.2.3")
3570 (source
3571 (origin
3572 (method url-fetch)
3573 (uri (pypi-uri "python-daemon" version))
3574 (sha256
3575 (base32
3576 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3577 (build-system python-build-system)
3578 (arguments
3579 `(#:phases
3580 (modify-phases %standard-phases
3581 (add-before 'check 'disable-tests
3582 (lambda _
3583 ;; FIXME: Determine why test fails
3584 (substitute* "test/test_daemon.py"
3585 (("test_detaches_process_context")
3586 "skip_test_detaches_process_context"))
3587 #t)))))
3588 (propagated-inputs
3589 `(("python-lockfile" ,python-lockfile)))
3590 (native-inputs
3591 `(("python-unittest2" ,python-unittest2)
3592 ("python-testtools" ,python-testtools)
3593 ("python-testscenarios" ,python-testscenarios)
3594 ("python-mock" ,python-mock)
3595 ("python-docutils" ,python-docutils)))
3596 (home-page "https://pagure.io/python-daemon/")
3597 (synopsis "Python library for making a Unix daemon process")
3598 (description "Python-daemon is a library that assists a Python program to
3599 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3600
3601 This library provides a @code{DaemonContext} class that manages the following
3602 important tasks for becoming a daemon process:
3603 @enumerate
3604 @item Detach the process into its own process group.
3605 @item Set process environment appropriate for running inside a chroot.
3606 @item Renounce suid and sgid privileges.
3607 @item Close all open file descriptors.
3608 @item Change the working directory, uid, gid, and umask.
3609 @item Set appropriate signal handlers.
3610 @item Open new file descriptors for stdin, stdout, and stderr.
3611 @item Manage a specified PID lock file.
3612 @item Register cleanup functions for at-exit processing.
3613 @end enumerate")
3614 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3615 (license (list license:asl2.0 license:gpl3+))))
3616
3617 (define-public python-anytree
3618 (package
3619 (name "python-anytree")
3620 (version "2.8.0")
3621 (source (origin
3622 (method url-fetch)
3623 (uri (pypi-uri "anytree" version))
3624 (sha256
3625 (base32
3626 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3627 (build-system python-build-system)
3628 (propagated-inputs
3629 `(("python-six" ,python-six)))
3630 (native-inputs
3631 `(;; For tests.
3632 ("graphviz" ,graphviz) ;for 'dot'
3633 ("python-nose" ,python-nose)))
3634 (home-page "https://github.com/c0fec0de/anytree")
3635 (synopsis "Lightweight tree data library")
3636 (description
3637 "@code{anytree} is a simple, lightweight, and extensible tree data
3638 structure for Python.")
3639 (license license:asl2.0)))
3640
3641 (define-public python-docutils
3642 (package
3643 (name "python-docutils")
3644 (version "0.16")
3645 (source
3646 (origin
3647 (method url-fetch)
3648 (uri (pypi-uri "docutils" version))
3649 (sha256
3650 (base32
3651 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3652 (build-system python-build-system)
3653 (arguments
3654 '(#:phases (modify-phases %standard-phases
3655 (replace 'check
3656 (lambda* (#:key tests? #:allow-other-keys)
3657 (if tests?
3658 (invoke "python" "test/alltests.py")
3659 (format #t "test suite not run~%"))
3660 #t)))))
3661 (home-page "http://docutils.sourceforge.net/")
3662 (synopsis "Python Documentation Utilities")
3663 (description
3664 "Docutils is a modular system for processing documentation into useful
3665 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3666 easy to use markup language, for input.
3667
3668 This package provides tools for converting @file{.rst} files to other formats
3669 via commands such as @command{rst2man}, as well as supporting Python code.")
3670 ;; Most of the source code is public domain, but some source files are
3671 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3672 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3673
3674 (define-public python2-docutils
3675 (package-with-python2 python-docutils))
3676
3677 ;; python2-sphinx fails its test suite with newer versions.
3678 (define-public python2-docutils-0.14
3679 (package
3680 (inherit python2-docutils)
3681 (version "0.14")
3682 (source (origin
3683 (method url-fetch)
3684 (uri (pypi-uri "docutils" version))
3685 (sha256
3686 (base32
3687 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3688
3689 (define-public python-restructuredtext-lint
3690 (package
3691 (name "python-restructuredtext-lint")
3692 (version "1.3.0")
3693 (source
3694 (origin
3695 (method url-fetch)
3696 (uri (pypi-uri "restructuredtext-lint" version))
3697 (sha256
3698 (base32
3699 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3700 (build-system python-build-system)
3701 (arguments
3702 `(#:phases
3703 (modify-phases %standard-phases
3704 (delete 'check)
3705 (add-after 'install 'check
3706 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3707 (when tests?
3708 (add-installed-pythonpath inputs outputs)
3709 (invoke "nosetests" "-v"))
3710 #t)))))
3711 (propagated-inputs
3712 `(("python-docutils" ,python-docutils)))
3713 (native-inputs
3714 `(("python-nose" ,python-nose)))
3715 (home-page "https://github.com/twolfson/restructuredtext-lint")
3716 (synopsis "reStructuredText linter")
3717 (description "This package provides a linter for the reStructuredText
3718 format.")
3719 (license license:unlicense)))
3720
3721 (define-public python-doc8
3722 (package
3723 (name "python-doc8")
3724 (version "0.8.0")
3725 (source
3726 (origin
3727 (method url-fetch)
3728 (uri (pypi-uri "doc8" version))
3729 (sha256
3730 (base32
3731 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3732 (build-system python-build-system)
3733 (arguments
3734 `(#:phases
3735 (modify-phases %standard-phases
3736 (delete 'check)
3737 (add-after 'install 'check
3738 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3739 (when tests?
3740 (add-installed-pythonpath inputs outputs)
3741 (invoke "pytest" "-v"))
3742 #t)))))
3743 (propagated-inputs
3744 `(("python-chardet" ,python-chardet)
3745 ("python-docutils" ,python-docutils)
3746 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3747 ("python-six" ,python-six)
3748 ("python-stevedore" ,python-stevedore)))
3749 (native-inputs
3750 `(("python-testtools" ,python-testtools)
3751 ("python-pytest" ,python-pytest)))
3752 (home-page "https://launchpad.net/doc8")
3753 (synopsis
3754 "Style checker for Sphinx (or other) RST documentation")
3755 (description
3756 "Doc8 is an opinionated style checker for reStructured Text and plain
3757 text styles of documentation.")
3758 (license license:asl2.0)))
3759
3760 (define-public python-pygments
3761 (package
3762 (name "python-pygments")
3763 (version "2.7.3")
3764 (source
3765 (origin
3766 (method url-fetch)
3767 (uri (pypi-uri "Pygments" version))
3768 (sha256
3769 (base32
3770 "05mps9r966r3dpqw6zrs1nlwjdf5y4960hl9m7abwb3qyfnarwyc"))))
3771 (replacement python-pygments/fixed)
3772 (build-system python-build-system)
3773 (arguments
3774 ;; FIXME: Tests require sphinx, which depends on this.
3775 '(#:tests? #f))
3776 (home-page "https://pygments.org/")
3777 (synopsis "Syntax highlighting")
3778 (description
3779 "Pygments is a syntax highlighting package written in Python.")
3780 (license license:bsd-2)
3781 (properties `((python2-variant . ,(delay python2-pygments))))))
3782
3783 (define python-pygments/fixed
3784 (package/inherit python-pygments
3785 (version "2.7.4")
3786 (source
3787 (origin
3788 (method url-fetch)
3789 (uri (pypi-uri "Pygments" version))
3790 (sha256
3791 (base32
3792 "0dy35ry5qa8dpklk4fkj9kfpw2qb4mh5ha9866kw30wf96dx0jfz"))))))
3793
3794 ;; Pygments 2.6 and later does not support Python 2.
3795 (define-public python2-pygments
3796 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3797 (package
3798 (inherit base)
3799 (version "2.5.2")
3800 (source (origin
3801 (method url-fetch)
3802 (uri (pypi-uri "Pygments" version))
3803 (sha256
3804 (base32
3805 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3806
3807 (define-public python-pygments-github-lexers
3808 (package
3809 (name "python-pygments-github-lexers")
3810 (version "0.0.5")
3811 (source
3812 (origin
3813 (method url-fetch)
3814 (uri (pypi-uri "pygments-github-lexers" version))
3815 (sha256
3816 (base32
3817 "0cz14clcc9z4pn79ll8hp3xzgsrfjscak5zfsvlgrz6ngkkmgjma"))))
3818 (build-system python-build-system)
3819 (propagated-inputs
3820 `(("python-pygments" ,python-pygments)))
3821 (home-page "https://github.com/liluo/pygments-github-lexers")
3822 (synopsis "Pygments Github custom lexers")
3823 (description "This package installs Github custom lexers to Pygments.")
3824 (license license:bsd-3)))
3825
3826 (define-public python-bump2version
3827 (package
3828 (name "python-bump2version")
3829 (version "1.0.1")
3830 (source
3831 (origin
3832 (method url-fetch)
3833 (uri (pypi-uri "bump2version" version))
3834 (sha256
3835 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
3836 (build-system python-build-system)
3837 (arguments
3838 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
3839 ;; required: --new-version".
3840 `(#:tests? #false))
3841 (home-page "https://github.com/c4urself/bump2version")
3842 (synopsis "Version-bump your software with a single command!")
3843 (description
3844 "This package provides a small command line tool to simplify releasing
3845 software by updating all version strings in your source code by the correct
3846 increment. It also creates commits and tags.")
3847 (license license:expat)))
3848
3849 (define-public python-bumpversion
3850 (package
3851 (name "python-bumpversion")
3852 (version "0.5.3")
3853 (source
3854 (origin
3855 (method url-fetch)
3856 (uri (pypi-uri "bumpversion" version))
3857 (sha256
3858 (base32
3859 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3860 (build-system python-build-system)
3861 (home-page "https://github.com/peritus/bumpversion")
3862 (synopsis "Tool to bump software version")
3863 (description "This tool provides a command-line interface (CLI) to bump a
3864 software version simply.")
3865 (license license:expat)))
3866
3867 (define-public python-deprecated
3868 (package
3869 (name "python-deprecated")
3870 (version "1.2.5")
3871 (source
3872 (origin
3873 (method git-fetch)
3874 (uri (git-reference
3875 (url "https://github.com/tantale/deprecated")
3876 (commit (string-append "v" version))))
3877 (file-name (git-file-name name version))
3878 (sha256
3879 (base32
3880 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3881 (build-system python-build-system)
3882 (arguments
3883 `(#:phases (modify-phases %standard-phases
3884 (replace 'check
3885 (lambda _
3886 (invoke "pytest"))))))
3887 (propagated-inputs
3888 `(("python-wrapt" ,python-wrapt)))
3889 (native-inputs
3890 `(("python-bumpversion" ,python-bumpversion)
3891 ("python-pytest" ,python-pytest)
3892 ("python-pytest-cov" ,python-pytest-cov)
3893 ("python-sphinx" ,python-sphinx)
3894 ("python-tox" ,python-tox)))
3895 (home-page "https://github.com/tantale/deprecated")
3896 (synopsis "Python decorator to deprecate classes, functions or methods")
3897 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3898 to deprecate classes, functions or methods.")
3899 (license license:expat)))
3900
3901 (define-public python-pygithub
3902 (package
3903 (name "python-pygithub")
3904 (version "1.54.1")
3905 (source
3906 ;; We fetch from the Git repo because there are no tests in the PyPI
3907 ;; archive.
3908 (origin
3909 (method git-fetch)
3910 (uri (git-reference
3911 (url "https://github.com/PyGithub/PyGithub")
3912 (commit (string-append "v" version))))
3913 (file-name (git-file-name name version))
3914 (sha256
3915 (base32 "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"))))
3916 (build-system python-build-system)
3917 (arguments
3918 `(#:phases
3919 (modify-phases %standard-phases
3920 (replace 'check
3921 (lambda* (#:key tests? #:allow-other-keys)
3922 (when tests?
3923 (invoke "pytest"))
3924 #t)))))
3925 (propagated-inputs
3926 `(("python-cryptography" ,python-cryptography)
3927 ("python-deprecated" ,python-deprecated)
3928 ("python-pyjwt" ,python-pyjwt)
3929 ("python-requests" ,python-requests)))
3930 (native-inputs
3931 `(("python-httpretty" ,python-httpretty)
3932 ("python-pytest" ,python-pytest)))
3933 (home-page "https://pygithub.readthedocs.io/en/latest/")
3934 (synopsis "Python library for the GitHub API")
3935 (description "This library allows managing GitHub resources such as
3936 repositories, user profiles, and organizations in your Python applications,
3937 using version 3 of the GitHub application programming interface (API).")
3938 (license license:lgpl3+)))
3939
3940 (define-public python-rellu
3941 (package
3942 (name "python-rellu")
3943 (version "0.7")
3944 (source
3945 (origin
3946 (method url-fetch)
3947 (uri (pypi-uri "rellu" version))
3948 (sha256
3949 (base32
3950 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3951 (build-system python-build-system)
3952 (propagated-inputs
3953 `(("python-invoke" ,python-invoke)
3954 ("python-pygithub" ,python-pygithub)))
3955 (home-page "https://github.com/robotframework/rellu")
3956 (synopsis "Utilities to create PyPI releases")
3957 (description "This collection of utilities contains tooling and templates
3958 to assist in creating releases on GitHub and publishing them on PyPI. It is
3959 designed to be used by Robot Framework and tools and libraries in its
3960 ecosystem, but can naturally be used also by other projects.")
3961 (license license:asl2.0)))
3962
3963 (define-public python-robotframework
3964 (package
3965 (name "python-robotframework")
3966 (version "3.2.2")
3967 ;; There are no tests in the PyPI archive.
3968 (source
3969 (origin
3970 (method git-fetch)
3971 (uri (git-reference
3972 (url "https://github.com/robotframework/robotframework")
3973 (commit (string-append "v" version))))
3974 (file-name (git-file-name name version))
3975 (sha256
3976 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3977 (patches (search-patches
3978 "python-robotframework-source-date-epoch.patch"))))
3979 (build-system python-build-system)
3980 (arguments
3981 `(#:phases (modify-phases %standard-phases
3982 (add-before 'build 'build-and-install-doc
3983 (lambda* (#:key outputs #:allow-other-keys)
3984 (let* ((doc-output (assoc-ref outputs "doc"))
3985 (doc (string-append doc-output "/share/"
3986 ,name "-" ,version "/")))
3987 (invoke "invoke" "library-docs" "all")
3988 (mkdir-p doc)
3989 (copy-recursively "doc/libraries"
3990 (string-append doc "/libraries"))
3991 #t)))
3992 (replace 'check
3993 (lambda* (#:key inputs #:allow-other-keys)
3994 ;; Some tests require timezone data. Otherwise, they
3995 ;; look up /etc/localtime, which doesn't exist, and fail
3996 ;; with:
3997 ;;
3998 ;; OverflowError: mktime argument out of range
3999 (setenv "TZDIR"
4000 (string-append (assoc-ref inputs "tzdata")
4001 "/share/zoneinfo"))
4002 (setenv "TZ" "Europe/Paris")
4003
4004 (invoke "python" "utest/run.py"))))))
4005 (native-inputs
4006 `(("python-invoke" ,python-invoke)
4007 ("python-rellu" ,python-rellu)
4008 ("python:tk" ,python "tk") ;used when building the HTML doc
4009 ("tzdata" ,tzdata-for-tests)))
4010 (outputs '("out" "doc"))
4011 (home-page "https://robotframework.org")
4012 (synopsis "Generic automation framework")
4013 (description "Robot Framework is a generic automation framework for
4014 acceptance testing, acceptance test driven development (ATDD), and robotic
4015 process automation (RPA).")
4016 (license license:asl2.0)))
4017
4018 (define-public python-robotframework-lint
4019 ;; There is no properly tagged release; the commit below seems to correspond
4020 ;; to the 0.9 stable release available from PyPI. The tests are not
4021 ;; included in the PyPI archive, so we fetch the sources from the upstream
4022 ;; Git repo.
4023 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
4024 (revision "0"))
4025 (package
4026 (name "python-robotframework-lint")
4027 (version (git-version "1.1" ;version taken from 'rflint/version.py'
4028 revision commit))
4029 (source
4030 (origin
4031 (method git-fetch)
4032 (uri (git-reference
4033 (url "https://github.com/boakley/robotframework-lint")
4034 (commit commit)))
4035 (file-name (git-file-name name version))
4036 (sha256
4037 (base32
4038 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
4039 (build-system python-build-system)
4040 (arguments
4041 `(#:phases
4042 (modify-phases %standard-phases
4043 (replace 'check
4044 (lambda _
4045 (invoke "python" "-m" "robot" "-A"
4046 "tests/conf/default.args" "tests"))))))
4047 (propagated-inputs
4048 `(("python-robotframework" ,python-robotframework)))
4049 (home-page "https://github.com/boakley/robotframework-lint/")
4050 (synopsis "Static analysis tool (linter) for Robot Framework")
4051 (description "This package provides the @code{rflint} command-line
4052 utility, a static analysis tool (linter) for Robot Framework source files.")
4053 (license license:asl2.0))))
4054
4055 (define-public python-robotframework-sshlibrary
4056 (package
4057 (name "python-robotframework-sshlibrary")
4058 (version "3.3.0")
4059 ;; There are no tests in the PyPI archive.
4060 (source
4061 (origin
4062 (method git-fetch)
4063 (uri (git-reference
4064 (url "https://github.com/robotframework/SSHLibrary")
4065 (commit (string-append "v" version))))
4066 (file-name (git-file-name name version))
4067 (sha256
4068 (base32
4069 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
4070 (build-system python-build-system)
4071 (arguments
4072 `(#:phases
4073 (modify-phases %standard-phases
4074 (add-before 'build 'build-and-install-doc
4075 (lambda* (#:key outputs #:allow-other-keys)
4076 (let* ((doc-output (assoc-ref outputs "doc"))
4077 (doc (string-append doc-output "/share/"
4078 ,name "-" ,version "/")))
4079 (invoke "chmod" "-R" "+w" "docs")
4080 (invoke "invoke" "kw-docs" "project-docs")
4081 (mkdir-p doc)
4082 (for-each delete-file (find-files "docs" "\\.rst"))
4083 (copy-recursively "docs" doc)
4084 #t)))
4085 (replace 'check
4086 (lambda _
4087 ;; Some tests require an SSH server; we remove them.
4088 (delete-file "utest/test_client_api.py")
4089 (delete-file "utest/test_scp.py")
4090 (invoke "python" "utest/run.py"))))))
4091 (propagated-inputs
4092 `(("python-robotframework" ,python-robotframework)
4093 ("python-paramiko" ,python-paramiko)
4094 ("python-scp" ,python-scp)))
4095 (native-inputs
4096 `(("openssh" ,openssh)
4097 ("which" ,which)
4098 ;; To generate the documentation
4099 ("python-docutils" ,python-docutils)
4100 ("python-invoke" ,python-invoke)
4101 ("python-pygments" ,python-pygments)
4102 ("python-rellu" ,python-rellu)))
4103 (outputs '("out" "doc"))
4104 (home-page "https://github.com/robotframework/SSHLibrary")
4105 (synopsis "Robot Framework library for SSH and SFTP")
4106 (description "SSHLibrary is a Robot Framework library providing support
4107 for SSH and SFTP. It has the following main usages:
4108 @itemize @bullet
4109 @item Executing commands on the remote machine, either blocking or non-blocking.
4110 @item Writing and reading in an interactive shell.
4111 @item Transferring files and directories over SFTP.
4112 @item Ensuring that files and directories exist on the remote machine.
4113 @end itemize")
4114 (license license:asl2.0)))
4115
4116 (define-public python-rstr
4117 (package
4118 (name "python-rstr")
4119 (version "2.2.6")
4120 (source
4121 (origin
4122 (method url-fetch)
4123 (uri (pypi-uri "rstr" version))
4124 (sha256
4125 (base32
4126 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
4127 (build-system python-build-system)
4128 (home-page "https://github.com/leapfrogonline/rstr")
4129 (synopsis "Generate random strings in Python")
4130 (description "This package provides a python module for generating
4131 random strings of various types. It could be useful for fuzz testing,
4132 generating dummy data, or other applications. It has no dependencies
4133 outside the standard library.")
4134 (license license:bsd-3)))
4135
4136 (define-public python-scp
4137 (package
4138 (name "python-scp")
4139 (version "0.13.3")
4140 (source
4141 (origin
4142 (method url-fetch)
4143 (uri (pypi-uri "scp" version))
4144 (sha256
4145 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4146 (build-system python-build-system)
4147 (arguments
4148 '(#:tests? #f)) ;tests require an SSH server
4149 (propagated-inputs
4150 `(("python-paramiko" ,python-paramiko)))
4151 (home-page "https://github.com/jbardin/scp.py")
4152 (synopsis "SCP protocol module for Python and Paramiko")
4153 (description "The scp module extends the Paramiko library to send and
4154 receive files via the SCP1 protocol, as implemented by the OpenSSH
4155 @command{scp} program.")
4156 (license license:gpl2+)))
4157
4158 (define-public python-rst.linker
4159 (package
4160 (name "python-rst.linker")
4161 (version "1.11")
4162 (source
4163 (origin
4164 (method url-fetch)
4165 (uri (pypi-uri "rst.linker" version))
4166 (sha256
4167 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4168 (build-system python-build-system)
4169 (propagated-inputs
4170 `(("python-dateutil" ,python-dateutil)
4171 ("python-six" ,python-six)))
4172 (native-inputs
4173 `(("python-setuptools-scm" ,python-setuptools-scm)))
4174 ;; Test would require path.py, which would introduce a cyclic dependence.
4175 (arguments `(#:tests? #f))
4176 ;; Note: As of version 1.7 the documentation is not worth building.
4177 (home-page "https://github.com/jaraco/rst.linker")
4178 (synopsis "Sphinx plugin to add links and timestamps")
4179 (description "rst.linker automatically replaces text by a
4180 reStructuredText external reference or timestamps. It's primary purpose is to
4181 augment the changelog, but it can be used for other documents, too.")
4182 (license license:expat)))
4183
4184 (define-public python2-rst.linker
4185 (package-with-python2 python-rst.linker))
4186
4187 (define-public python-sshpubkeys
4188 (package
4189 (name "python-sshpubkeys")
4190 (version "3.1.0")
4191 (home-page "https://github.com/ojarva/python-sshpubkeys")
4192 (source (origin
4193 (method git-fetch)
4194 (uri (git-reference
4195 (url home-page)
4196 (commit (string-append "v" version))))
4197 (file-name (git-file-name name version))
4198 (sha256
4199 (base32
4200 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4201 (build-system python-build-system)
4202 (propagated-inputs
4203 `(("python-cryptography" ,python-cryptography)
4204 ("python-ecdsa" ,python-ecdsa)))
4205 (synopsis "OpenSSH public key parser")
4206 (description
4207 "This package provides a library for parsing and validating OpenSSH
4208 public key files.")
4209 (license license:bsd-3)))
4210
4211 (define-public python-feedgenerator
4212 (package
4213 (name "python-feedgenerator")
4214 (version "1.9")
4215 (source
4216 (origin
4217 (method url-fetch)
4218 (uri (pypi-uri "feedgenerator" version))
4219 (sha256
4220 (base32
4221 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4222 (modules '((guix build utils)))
4223 (snippet
4224 '(begin
4225 ;; Remove pre-compiled .pyc files from source.
4226 (for-each delete-file-recursively
4227 (find-files "." "__pycache__" #:directories? #t))
4228 (for-each delete-file (find-files "." "\\.pyc$"))
4229 #t))))
4230 (build-system python-build-system)
4231 (propagated-inputs
4232 `(("python-pytz" ,python-pytz)
4233 ("python-six" ,python-six)))
4234 (home-page "https://github.com/getpelican/feedgenerator")
4235 (synopsis
4236 "Standalone version of Django's Atom/RSS feed generator")
4237 (description
4238 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4239 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4240 (license license:bsd-3)))
4241
4242 (define-public python2-feedgenerator
4243 (package-with-python2 python-feedgenerator))
4244
4245 (define-public python-jsonrpc-server
4246 (package
4247 (name "python-jsonrpc-server")
4248 (version "0.4.0")
4249 (source
4250 (origin
4251 (method url-fetch)
4252 (uri (pypi-uri "python-jsonrpc-server" version))
4253 (sha256
4254 (base32
4255 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4256 (build-system python-build-system)
4257 (propagated-inputs
4258 `(("python-mock" ,python-mock)
4259 ("python-pytest" ,python-pytest)
4260 ("python-ujson" ,python-ujson)))
4261 (home-page
4262 "https://github.com/palantir/python-jsonrpc-server")
4263 (synopsis "JSON RPC 2.0 server library")
4264 (description
4265 "This package provides a JSON RPC 2.0 server library for Python.")
4266 (license license:expat)))
4267
4268 (define-public python-pydantic
4269 (package
4270 (name "python-pydantic")
4271 (version "1.6.1")
4272 (source
4273 (origin
4274 (method git-fetch)
4275 (uri (git-reference
4276 (url "https://github.com/samuelcolvin/pydantic")
4277 (commit (string-append "v" version))))
4278 (file-name (git-file-name name version))
4279 (sha256
4280 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4281 (build-system python-build-system)
4282 (arguments
4283 '(#:phases
4284 (modify-phases %standard-phases
4285 ;; Reported upstream:
4286 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4287 ;; Disable the faulty test as the fix is unclear.
4288 (add-before 'check 'disable-test
4289 (lambda _
4290 (substitute* "tests/test_validators.py"
4291 (("test_assert_raises_validation_error")
4292 "_test_assert_raises_validation_error"))
4293 #t))
4294 (replace 'check
4295 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4296 (native-inputs
4297 `(("python-pytest" ,python-pytest)))
4298 (home-page "https://github.com/samuelcolvin/pydantic")
4299 (synopsis "Python data validation and settings management")
4300 (description
4301 "Pydantic enforces type hints at runtime, and provides user friendly
4302 errors when data is invalid.")
4303 (license license:expat)))
4304
4305 (define-public python-pydocstyle
4306 (package
4307 (name "python-pydocstyle")
4308 (version "3.0.0")
4309 (source
4310 (origin
4311 (method url-fetch)
4312 (uri (pypi-uri "pydocstyle" version))
4313 (sha256
4314 (base32
4315 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4316 (build-system python-build-system)
4317 (propagated-inputs
4318 `(("python-six" ,python-six)
4319 ("python-snowballstemmer" ,python-snowballstemmer)))
4320 (home-page
4321 "https://github.com/PyCQA/pydocstyle/")
4322 (synopsis "Python docstring style checker")
4323 (description
4324 "This package provides a style checker for the Python Language
4325 Server (PLS).")
4326 (license license:expat)))
4327
4328 (define-public python-language-server
4329 (package
4330 (name "python-language-server")
4331 (version "0.36.2")
4332 (source
4333 (origin
4334 (method url-fetch)
4335 (uri (pypi-uri "python-language-server" version))
4336 (sha256
4337 (base32
4338 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4339 (build-system python-build-system)
4340 (propagated-inputs
4341 `(("python-autopep8" ,python-autopep8)
4342 ("python-configparser" ,python-configparser)
4343 ("python-pydocstyle" ,python-pydocstyle)
4344 ("python-future" ,python-future)
4345 ("python-jedi" ,python-jedi)
4346 ("python-jsonrpc-server" ,python-jsonrpc-server)
4347 ("python-pluggy" ,python-pluggy)
4348 ("python-pycodestyle" ,python-pycodestyle)
4349 ("python-pyflakes" ,python-pyflakes)
4350 ("python-rope" ,python-rope)
4351 ("python-ujson" ,python-ujson)
4352 ("python-yapf" ,python-yapf)))
4353 (native-inputs
4354 `(("python-coverage" ,python-coverage)
4355 ("python-flaky" ,python-flaky)
4356 ("python-matplotlib" ,python-matplotlib)
4357 ("python-mock" ,python-mock)
4358 ("python-numpy" ,python-numpy)
4359 ("python-pandas" ,python-pandas)
4360 ("python-pylint" ,python-pylint)
4361 ("python-pytest" ,python-pytest)
4362 ("python-pytest-cov" ,python-pytest-cov)
4363 ("python-versioneer" ,python-versioneer)))
4364 (home-page "https://github.com/palantir/python-language-server")
4365 (synopsis "Python implementation of the Language Server Protocol")
4366 (description
4367 "The Python Language Server (pyls) is an implementation of the Python 3
4368 language specification for the Language Server Protocol (LSP). This tool is
4369 used in text editing environments to provide a complete and integrated
4370 feature-set for programming Python effectively.")
4371 (license license:expat)))
4372
4373 (define-public python-pathspec
4374 (package
4375 (name "python-pathspec")
4376 (version "0.7.0")
4377 (source
4378 (origin
4379 (method url-fetch)
4380 (uri (pypi-uri "pathspec" version))
4381 (sha256
4382 (base32
4383 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4384 (build-system python-build-system)
4385 (home-page "https://github.com/cpburnz/python-path-specification")
4386 (synopsis "Utility library for gitignore style pattern matching of file paths")
4387 (description
4388 "This package provides a utility library for gitignore style pattern
4389 matching of file paths.")
4390 (license license:mpl2.0)))
4391
4392 (define-public python-black
4393 (package
4394 (name "python-black")
4395 (version "20.8b1")
4396 (source
4397 (origin
4398 (method url-fetch)
4399 (uri (pypi-uri "black" version))
4400 (sha256
4401 (base32
4402 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4403 (build-system python-build-system)
4404 (arguments
4405 `(#:phases
4406 (modify-phases %standard-phases
4407 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4408 (lambda _
4409 (let ((python3 (which "python3")))
4410 (substitute* '("tests/data/fmtonoff.py"
4411 "tests/data/string_prefixes.py"
4412 "tests/data/function.py"
4413 "tests/data/python37.py")
4414 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4415 (string-append "#!" python3 (if (string? minor-version)
4416 minor-version
4417 "")))))
4418 #t))
4419 (add-after 'unpack 'disable-broken-tests
4420 (lambda* (#:key outputs inputs #:allow-other-keys)
4421 ;; Make installed package available for running the tests
4422 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4423 ":" (getenv "PATH")))
4424
4425 ;; These tests are supposed to be skipped when the blackd
4426 ;; dependencies are missing, but this doesn't quite work.
4427 (substitute* "tests/test_black.py"
4428 (("( *)class BlackDTestCase.*" match indent)
4429 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4430 indent "class BlackDTestCase(unittest.TestCase):\n"))
4431 (("web.Application") "False")
4432 (("@unittest_run_loop") ""))
4433
4434 ;; Patching the above file breaks the self test
4435 (substitute* "tests/test_black.py"
4436 (("( *)def test_self" match indent)
4437 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4438
4439 (substitute* "tests/test_black.py"
4440 (("( *)def test_python38" match indent)
4441 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4442 #t)))))
4443 (propagated-inputs
4444 `(("python-click" ,python-click)
4445 ("python-attrs" ,python-attrs)
4446 ("python-appdirs" ,python-appdirs)
4447 ("python-pathspec" ,python-pathspec)
4448 ("python-mypy-extensions" ,python-mypy-extensions)
4449 ("python-regex" ,python-regex)
4450 ("python-toml" ,python-toml)
4451 ("python-typed-ast" ,python-typed-ast)
4452 ("python-typing-extensions" ,python-typing-extensions)))
4453 (native-inputs
4454 `(("python-setuptools-scm" ,python-setuptools-scm)))
4455 (home-page "https://github.com/ambv/black")
4456 (synopsis "The uncompromising code formatter")
4457 (description "Black is the uncompromising Python code formatter.")
4458 (license license:expat)))
4459
4460 (define-public python-black-macchiato
4461 (package
4462 (name "python-black-macchiato")
4463 (version "1.3.0")
4464 (source
4465 (origin
4466 (method url-fetch)
4467 (uri (pypi-uri "black-macchiato" version))
4468 (sha256
4469 (base32
4470 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4471 (build-system python-build-system)
4472 (propagated-inputs
4473 `(("python-black" ,python-black)))
4474 (home-page "https://github.com/wbolster/black-macchiato")
4475 (synopsis "Partial @code{python-black} formatting")
4476 (description
4477 "This package is built on top the @{python-black} code formatter to
4478 enable formatting of partial files.")
4479 (license license:bsd-3)))
4480
4481 (define-public python-blinker
4482 (package
4483 (name "python-blinker")
4484 (version "1.4")
4485 (source
4486 (origin
4487 (method url-fetch)
4488 (uri (pypi-uri "blinker" version))
4489 (sha256
4490 (base32
4491 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4492 (build-system python-build-system)
4493 (home-page "https://pythonhosted.org/blinker/")
4494 (synopsis "Fast, simple object-to-object and broadcast signaling")
4495 (description
4496 "Blinker provides a fast dispatching system that allows any number of
4497 interested parties to subscribe to events, or \"signals\".")
4498 (license license:expat)))
4499
4500 (define-public python2-blinker
4501 (package-with-python2 python-blinker))
4502
4503 (define-public pelican
4504 (package
4505 (name "pelican")
4506 (version "4.2.0")
4507 (source
4508 (origin
4509 (method url-fetch)
4510 (uri (pypi-uri "pelican" version))
4511 (sha256
4512 (base32
4513 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4514 (build-system python-build-system)
4515 (propagated-inputs
4516 `(("python-blinker" ,python-blinker)
4517 ("python-dateutil" ,python-dateutil)
4518 ("python-docutils" ,python-docutils)
4519 ("python-feedgenerator" ,python-feedgenerator)
4520 ("python-jinja2" ,python-jinja2)
4521 ("python-markdown" ,python-markdown)
4522 ("python-pygments" ,python-pygments)
4523 ("python-pytz" ,python-pytz)
4524 ("python-six" ,python-six)
4525 ("python-unidecode" ,python-unidecode)))
4526 (home-page "https://getpelican.com/")
4527 (arguments
4528 `(;; XXX Requires a lot more packages to do unit tests :P
4529 #:tests? #f))
4530 (synopsis "Python-based static site publishing system")
4531 (description
4532 "Pelican is a tool to generate a static blog from reStructuredText,
4533 Markdown input files, and more. Pelican uses Jinja2 for templating
4534 and is very extensible.")
4535 (license license:agpl3+)))
4536
4537 (define-public mallard-ducktype
4538 (package
4539 (name "mallard-ducktype")
4540 (version "1.0.2")
4541 (source
4542 (origin
4543 (method git-fetch)
4544 ;; git-reference because tests are not included in pypi source tarball
4545 ;; https://issues.guix.gnu.org/issue/36755#2
4546 (uri (git-reference
4547 (url "https://github.com/projectmallard/mallard-ducktype")
4548 (commit version)))
4549 (file-name (git-file-name name version))
4550 (sha256
4551 (base32
4552 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4553 (build-system python-build-system)
4554 (arguments
4555 '(#:phases
4556 (modify-phases %standard-phases
4557 (replace 'check
4558 (lambda _
4559 (with-directory-excursion "tests"
4560 (invoke "sh" "runtests")))))))
4561 (home-page "http://projectmallard.org")
4562 (synopsis "Convert Ducktype to Mallard documentation markup")
4563 (description
4564 "Ducktype is a lightweight syntax that can represent all the semantics
4565 of the Mallard XML documentation system. Ducktype files can be converted to
4566 Mallard using the @command{ducktype} tool. The yelp-tools package
4567 provides additional functionality on the produced Mallard documents.")
4568 (license license:expat)))
4569
4570 (define-public python-cython
4571 (package
4572 (name "python-cython")
4573 (version "0.29.22")
4574 (source
4575 (origin
4576 (method url-fetch)
4577 (uri (pypi-uri "Cython" version))
4578 (sha256
4579 (base32 "01jl3544qwsi8lp6anbl55566xqkjd53x452i7m6gnfilv3q6syz"))))
4580 (build-system python-build-system)
4581 ;; we need the full python package and not just the python-wrapper
4582 ;; because we need libpython3.3m.so
4583 (inputs
4584 `(("python" ,python)))
4585 (arguments
4586 `(#:phases
4587 (modify-phases %standard-phases
4588 (add-before 'check 'set-HOME
4589 ;; some tests require access to "$HOME/.cython"
4590 (lambda _ (setenv "HOME" "/tmp") #t))
4591 (replace 'check
4592 (lambda _
4593 ;; Disable compiler optimizations to greatly reduce the running
4594 ;; time of the test suite.
4595 (setenv "CFLAGS" "-O0")
4596
4597 (invoke "python" "runtests.py" "-vv"
4598 "-j" (number->string (parallel-job-count))
4599 ;; XXX: On 32-bit architectures, running the parallel tests
4600 ;; fails on many-core systems, see
4601 ;; <https://github.com/cython/cython/issues/2807>.
4602 ,@(if (not (target-64bit?))
4603 '("-x" "run.parallel")
4604 '())))))))
4605 (home-page "https://cython.org/")
4606 (synopsis "C extensions for Python")
4607 (description "Cython is an optimising static compiler for both the Python
4608 programming language and the extended Cython programming language. It makes
4609 writing C extensions for Python as easy as Python itself.")
4610 (license license:asl2.0)
4611 (properties `((python2-variant . ,(delay python2-cython))))))
4612
4613 (define-public python2-cython
4614 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4615 (package/inherit base
4616 (name "python2-cython")
4617 (inputs
4618 `(("python-2" ,python-2))) ;this is not automatically changed
4619 (arguments
4620 (substitute-keyword-arguments (package-arguments base)
4621 ((#:phases phases)
4622 `(modify-phases ,phases
4623 (add-before 'check 'adjust-test_embed
4624 (lambda _
4625 (substitute* "runtests.py"
4626 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4627 ;; so it can give the right -L flag to GCC when embedding static
4628 ;; builds of Python. It is unaware that the Python "config"
4629 ;; directory (where the static library lives) was renamed in
4630 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4631 ;; which works fine, because that is where the shared library is.
4632 ;;
4633 ;; It also appears to be unaware that the Makefile in Demos/embed
4634 ;; already unconditionally pass the static library location to GCC,
4635 ;; after checking sysconfig.get_config_var('LIBPL).
4636 ;;
4637 ;; The effect is that the linker is unable to resolve libexpat
4638 ;; symbols when building for Python 2, because neither the Python 2
4639 ;; shared library nor Expat is available. To fix it, we can either
4640 ;; add Expat as an input and make it visible to the linker, or just
4641 ;; prevent it from overriding the Python shared library location.
4642 ;; The end result is identical, so we take the easy route.
4643 ((" or libname not in os\\.listdir\\(libdir\\)")
4644 ""))
4645 #t)))))))))
4646
4647 ;; The RPython toolchain currently does not support Python 3.
4648 (define-public python2-rpython
4649 (package
4650 (name "python2-rpython")
4651 (version "0.2.1")
4652 (source
4653 (origin
4654 (method url-fetch)
4655 (uri (pypi-uri "rpython" version))
4656 (sha256
4657 (base32
4658 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4659 (build-system python-build-system)
4660 (arguments `(#:python ,python-2))
4661 (native-inputs
4662 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4663 (home-page "https://rpython.readthedocs.org")
4664 (synopsis "Framework for implementing interpreters and virtual machines")
4665 (description "RPython is a translation and support framework for
4666 producing implementations of dynamic languages, emphasizing a clean separation
4667 between language specification and implementation aspects.")
4668 (license license:expat)))
4669
4670 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4671 ;; python-scipy still build, as these three packages are often used together.
4672 (define-public python-numpy
4673 (package
4674 (name "python-numpy")
4675 (version "1.17.3")
4676 (source
4677 (origin
4678 (method url-fetch)
4679 (uri (string-append
4680 "https://github.com/numpy/numpy/releases/download/v"
4681 version "/numpy-" version ".tar.gz"))
4682 (sha256
4683 (base32
4684 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4685 (build-system python-build-system)
4686 (inputs
4687 `(("openblas" ,openblas)
4688 ("lapack" ,lapack)))
4689 (native-inputs
4690 `(("python-cython" ,python-cython)
4691 ("python-pytest" ,python-pytest)
4692 ("gfortran" ,gfortran)))
4693 (arguments
4694 `(#:phases
4695 (modify-phases %standard-phases
4696 (add-before 'build 'configure-blas-lapack
4697 (lambda* (#:key inputs #:allow-other-keys)
4698 (call-with-output-file "site.cfg"
4699 (lambda (port)
4700 (format port
4701 "[openblas]
4702 libraries = openblas
4703 library_dirs = ~a/lib
4704 include_dirs = ~a/include
4705
4706 # backslash-n to make emacs happy
4707 \n[lapack]
4708 lapack_libs = lapack
4709 library_dirs = ~a/lib
4710 include_dirs = ~a/include
4711 "
4712 (assoc-ref inputs "openblas")
4713 (assoc-ref inputs "openblas")
4714 (assoc-ref inputs "lapack")
4715 (assoc-ref inputs "lapack"))))
4716 #t))
4717 (add-before 'build 'fix-executable-paths
4718 (lambda* (#:key inputs #:allow-other-keys)
4719 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4720 ;; instead of /bin/sh.
4721 (substitute* "numpy/distutils/exec_command.py"
4722 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4723 (string-append match-start (assoc-ref inputs "bash") match-end)))
4724 ;; Use "gcc" executable, not "cc".
4725 (substitute* "numpy/distutils/system_info.py"
4726 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4727 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4728 #t))
4729 ;; Tests can only be run after the library has been installed and not
4730 ;; within the source directory.
4731 (delete 'check)
4732 (add-after 'install 'check
4733 (lambda* (#:key outputs inputs #:allow-other-keys)
4734 ;; Make installed package available for running the tests
4735 (add-installed-pythonpath inputs outputs)
4736 ;; Make sure "f2py" etc is found.
4737 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4738 ":" (getenv "PATH")))
4739 (with-directory-excursion "/tmp"
4740 (invoke "python" "-c"
4741 "import numpy; numpy.test(verbose=2)")))))))
4742 (home-page "https://numpy.org")
4743 (synopsis "Fundamental package for scientific computing with Python")
4744 (description "NumPy is the fundamental package for scientific computing
4745 with Python. It contains among other things: a powerful N-dimensional array
4746 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4747 and Fortran code, useful linear algebra, Fourier transform, and random number
4748 capabilities.")
4749 (properties `((python2-variant . ,(delay python2-numpy))))
4750 (license license:bsd-3)))
4751
4752 ;; Numpy 1.16.x are the last versions that support Python 2.
4753 (define-public python2-numpy
4754 (let ((numpy (package-with-python2
4755 (strip-python2-variant python-numpy))))
4756 (package/inherit
4757 numpy
4758 (version "1.16.5")
4759 (source (origin
4760 (method url-fetch)
4761 (uri (string-append
4762 "https://github.com/numpy/numpy/releases/download/v"
4763 version "/numpy-" version ".tar.gz"))
4764 (sha256
4765 (base32
4766 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4767
4768 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4769 ;; interest only for legacy code going back to NumPy's predecessor
4770 ;; Numeric.
4771 (define-public python2-numpy-1.8
4772 (package (inherit python2-numpy)
4773 (version "1.8.2")
4774 (source
4775 (origin
4776 (method git-fetch)
4777 (uri (git-reference
4778 (url "https://github.com/numpy/numpy")
4779 (commit (string-append "v" version))))
4780 (file-name (git-file-name "numpy" version))
4781 (sha256
4782 (base32
4783 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4784 (arguments
4785 (substitute-keyword-arguments (package-arguments python2-numpy)
4786 ((#:phases phases)
4787 `(modify-phases ,phases
4788 (replace 'configure-blas-lapack
4789 (lambda* (#:key inputs #:allow-other-keys)
4790 (call-with-output-file "site.cfg"
4791 (lambda (port)
4792 (format port
4793 "[openblas]
4794 libraries = openblas,lapack
4795 library_dirs = ~a/lib:~a/lib
4796 include_dirs = ~a/include:~a/include
4797 "
4798 (assoc-ref inputs "openblas")
4799 (assoc-ref inputs "lapack")
4800 (assoc-ref inputs "openblas")
4801 (assoc-ref inputs "lapack"))))
4802 #t))))))
4803 (native-inputs
4804 `(("python2-nose" ,python2-nose)))
4805 (description "NumPy is the fundamental package for scientific computing
4806 with Python. It contains among other things: a powerful N-dimensional array
4807 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4808 and Fortran code, useful linear algebra, Fourier transform, and random number
4809 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4810 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4811 Numeric.")
4812 (license license:bsd-3)))
4813
4814 (define-public python-munch
4815 (package
4816 (name "python-munch")
4817 (version "2.0.4")
4818 (source
4819 (origin
4820 (method url-fetch)
4821 (uri (pypi-uri "munch" version))
4822 (sha256
4823 (base32
4824 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4825 (build-system python-build-system)
4826 (home-page "https://github.com/Infinidat/munch")
4827 (synopsis "Dot-accessible dictionary")
4828 (description "Munch is a dot-accessible dictionary similar to JavaScript
4829 objects.")
4830 (license license:expat)))
4831
4832 (define-public python2-munch
4833 (package-with-python2 python-munch))
4834
4835 (define-public python-colormath
4836 (package
4837 (name "python-colormath")
4838 (version "3.0.0")
4839 (source
4840 (origin
4841 (method url-fetch)
4842 (uri (pypi-uri "colormath" version))
4843 (sha256
4844 (base32
4845 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4846 (build-system python-build-system)
4847 (propagated-inputs
4848 `(("python-networkx" ,python-networkx)
4849 ("python-numpy" ,python-numpy)))
4850 (home-page "https://github.com/gtaylor/python-colormath")
4851 (synopsis "Color math and conversion library")
4852 (description
4853 "This is a Python library for color math and conversions.")
4854 (license license:bsd-3)))
4855
4856 (define-public python2-colormath
4857 (package-with-python2 python-colormath))
4858
4859 (define-public python-spectra
4860 (package
4861 (name "python-spectra")
4862 (version "0.0.11")
4863 (source
4864 (origin
4865 (method url-fetch)
4866 (uri (pypi-uri "spectra" version))
4867 (sha256
4868 (base32
4869 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4870 (build-system python-build-system)
4871 (arguments
4872 `(#:phases
4873 (modify-phases %standard-phases
4874 (replace 'check
4875 (lambda _ (invoke "nosetests" "-v"))))))
4876 (propagated-inputs
4877 `(("python-colormath" ,python-colormath)))
4878 (native-inputs
4879 `(("python-nose" ,python-nose)))
4880 (home-page "https://github.com/jsvine/spectra")
4881 (synopsis "Color scales and color conversion")
4882 (description
4883 "This package provides a Python library intended to make color math,
4884 color scales, and color space conversion easy. It has support for:
4885
4886 @enumerate
4887 @item Color scales
4888 @item Color ranges
4889 @item Color blending
4890 @item Brightening/darkening colors
4891 @item Saturating/desaturating colors
4892 @item Conversion to/from multiple color spaces.
4893 @end enumerate\n")
4894 (license license:expat)))
4895
4896 (define-public python2-spectra
4897 (package-with-python2 python-spectra))
4898
4899 (define-public python-numpy-documentation
4900 (package
4901 (name "python-numpy-documentation")
4902 (version (package-version python-numpy))
4903 (source (package-source python-numpy))
4904 (build-system python-build-system)
4905 (native-inputs
4906 `(("python-matplotlib" ,python-matplotlib)
4907 ("python-numpy" ,python-numpy)
4908 ("pkg-config" ,pkg-config)
4909 ("python-sphinx" ,python-sphinx)
4910 ("python-numpydoc" ,python-numpydoc)
4911 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4912 texlive-fonts-ec
4913 texlive-generic-ifxetex
4914 texlive-generic-pdftex
4915 texlive-amsfonts
4916 texlive-latex-capt-of
4917 texlive-latex-cmap
4918 texlive-latex-environ
4919 texlive-latex-eqparbox
4920 texlive-latex-etoolbox
4921 texlive-latex-expdlist
4922 texlive-latex-fancyhdr
4923 texlive-latex-fancyvrb
4924 texlive-latex-fncychap
4925 texlive-latex-float
4926 texlive-latex-framed
4927 texlive-latex-geometry
4928 texlive-latex-graphics
4929 texlive-latex-hyperref
4930 texlive-latex-mdwtools
4931 texlive-latex-multirow
4932 texlive-latex-needspace
4933 texlive-latex-oberdiek
4934 texlive-latex-parskip
4935 texlive-latex-preview
4936 texlive-latex-tabulary
4937 texlive-latex-threeparttable
4938 texlive-latex-titlesec
4939 texlive-latex-trimspaces
4940 texlive-latex-ucs
4941 texlive-latex-upquote
4942 texlive-latex-url
4943 texlive-latex-varwidth
4944 texlive-latex-wrapfig)))
4945 ("texinfo" ,texinfo)
4946 ("perl" ,perl)
4947 ("scipy-sphinx-theme"
4948 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
4949 (origin ;the build script expects scipy-sphinx-theme as a git submodule
4950 (method git-fetch)
4951 (uri (git-reference
4952 (url "https://github.com/scipy/scipy-sphinx-theme")
4953 (commit commit)))
4954 (file-name (git-file-name "python-scipy-sphinx-theme"
4955 (string-take commit 7)))
4956 (sha256
4957 (base32
4958 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
4959 ,@(package-native-inputs python-numpy)))
4960 (arguments
4961 `(#:tests? #f ; we're only generating the documentation
4962 #:phases
4963 (modify-phases %standard-phases
4964 (delete 'build)
4965 (replace 'install
4966 (lambda* (#:key inputs outputs #:allow-other-keys)
4967 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4968 (doc (string-append
4969 data "/doc/" ,name "-"
4970 ,(package-version python-numpy)))
4971 (info-reader (string-append data "/info"))
4972 (html (string-append doc "/html"))
4973 (scipy-sphinx-theme "scipy-sphinx-theme")
4974 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4975 (pyver ,(string-append "PYVER=")))
4976
4977 ;; FIXME: this is needed to for texlive-union to generate
4978 ;; fonts, which are not found.
4979 (setenv "HOME" "/tmp")
4980
4981 (with-directory-excursion "doc"
4982 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4983 (mkdir-p html)
4984 (invoke "make" "html" pyver)
4985 (invoke "make" "latex" "PAPER=a4" pyver)
4986 (invoke "make" "-C" "build/latex"
4987 "all-pdf" "PAPER=a4" pyver)
4988 ;; FIXME: Generation of the info file fails.
4989 ;; (invoke "make" "info" pyver)
4990 ;; (mkdir-p info)
4991 ;; (copy-file "build/texinfo/numpy.info"
4992 ;; (string-append info "/numpy.info"))
4993 (for-each (lambda (file)
4994 (copy-file (string-append "build/latex" file)
4995 (string-append doc file)))
4996 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4997 (with-directory-excursion "build/html"
4998 (for-each (lambda (file)
4999 (let* ((dir (dirname file))
5000 (tgt-dir (string-append html "/" dir)))
5001 (unless (equal? "." dir)
5002 (mkdir-p tgt-dir))
5003 (install-file file html)))
5004 (find-files "." ".*")))))
5005 #t)))))
5006 (home-page (package-home-page python-numpy))
5007 (synopsis "Documentation for the python-numpy package")
5008 (description (package-description python-numpy))
5009 (license (package-license python-numpy))))
5010
5011 (define-public python2-numpy-documentation
5012 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
5013 (package
5014 (inherit numpy-documentation)
5015 (native-inputs `(("python2-functools32" ,python2-functools32)
5016 ,@(package-native-inputs numpy-documentation))))))
5017
5018 (define-public python-pygit2
5019 (package
5020 (name "python-pygit2")
5021 (version "1.4.0")
5022 (source
5023 (origin
5024 (method url-fetch)
5025 (uri (pypi-uri "pygit2" version))
5026 (sha256
5027 (base32 "1j71iskvirkm8jzfmwdm79v69878m9iix8a8cn4xidgr3nmkisyb"))))
5028 (build-system python-build-system)
5029 (arguments
5030 '(#:tests? #f)) ; tests don't run correctly in our environment
5031 (propagated-inputs
5032 `(("python-cached-property" ,python-cached-property)
5033 ("python-cffi" ,python-cffi)
5034 ("libgit2" ,libgit2)))
5035 (native-inputs
5036 `(("python-pytest" ,python-pytest)))
5037 (home-page "https://github.com/libgit2/pygit2")
5038 (synopsis "Python bindings for libgit2")
5039 (description "Pygit2 is a set of Python bindings to the libgit2 shared
5040 library, libgit2 implements Git plumbing.")
5041 ;; GPL2.0 only, with linking exception.
5042 (license license:gpl2)))
5043
5044 (define-public python-patiencediff
5045 (package
5046 (name "python-patiencediff")
5047 (version "0.2.0")
5048 (source
5049 (origin
5050 (method url-fetch)
5051 (uri (pypi-uri "patiencediff" version))
5052 (sha256
5053 (base32
5054 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
5055 (build-system python-build-system)
5056 (home-page "https://www.breezy-vcs.org/")
5057 (synopsis "Python implementation of the patiencediff algorithm")
5058 (description
5059 "This package contains a Python implementation of the @code{patiencediff}
5060 algorithm. Patiencediff provides a good balance of performance, nice output for
5061 humans, and implementation simplicity.")
5062 (license license:gpl2)))
5063
5064 (define-public python-pdftotext
5065 (package
5066 (name "python-pdftotext")
5067 (version "2.1.5")
5068 (source
5069 (origin
5070 (method url-fetch)
5071 (uri (pypi-uri "pdftotext" version))
5072 (sha256
5073 (base32
5074 "19la1cw1hmkcr8big04gm2dd5fw0y0z97g930aiy29s1gaqbiblq"))))
5075 (build-system python-build-system)
5076 (inputs
5077 `(("poppler" ,poppler)))
5078 (home-page "https://github.com/jalan/pdftotext")
5079 (synopsis "Simple PDF text extraction")
5080 (description "Pdftotext is a Python library of PDF text extraction.")
5081 (license license:expat)))
5082
5083 (define-public python-pyparsing
5084 (package
5085 (name "python-pyparsing")
5086 (version "2.4.6")
5087 (source
5088 (origin
5089 (method url-fetch)
5090 (uri (pypi-uri "pyparsing" version))
5091 (sha256
5092 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
5093 (build-system python-build-system)
5094 (outputs '("out" "doc"))
5095 (arguments
5096 `(#:tests? #f ; no test target
5097 #:phases
5098 (modify-phases %standard-phases
5099 (add-after 'install 'install-doc
5100 (lambda* (#:key outputs #:allow-other-keys)
5101 (let* ((doc (string-append (assoc-ref outputs "doc")
5102 "/share/doc/" ,name "-" ,version))
5103 (html-doc (string-append doc "/html"))
5104 (examples (string-append doc "/examples")))
5105 (mkdir-p html-doc)
5106 (mkdir-p examples)
5107 (for-each
5108 (lambda (dir tgt)
5109 (map (lambda (file)
5110 (install-file file tgt))
5111 (find-files dir ".*")))
5112 (list "docs" "htmldoc" "examples")
5113 (list doc html-doc examples))
5114 #t))))))
5115 (home-page "https://github.com/pyparsing/pyparsing")
5116 (synopsis "Python parsing class library")
5117 (description
5118 "The pyparsing module is an alternative approach to creating and
5119 executing simple grammars, vs. the traditional lex/yacc approach, or the use
5120 of regular expressions. The pyparsing module provides a library of classes
5121 that client code uses to construct the grammar directly in Python code.")
5122 (license license:expat)))
5123
5124 (define-public python2-pyparsing
5125 (package-with-python2 python-pyparsing))
5126
5127 (define-public python-pyparsing-2.4.7
5128 (package
5129 (inherit python-pyparsing)
5130 (version "2.4.7")
5131 (source
5132 (origin
5133 (method url-fetch)
5134 (uri (pypi-uri "pyparsing" version))
5135 (sha256
5136 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5137
5138 (define-public python-numpydoc
5139 (package
5140 (name "python-numpydoc")
5141 (version "0.8.0")
5142 (source
5143 (origin
5144 (method url-fetch)
5145 (uri (pypi-uri "numpydoc" version))
5146 (sha256
5147 (base32
5148 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5149 (build-system python-build-system)
5150 (propagated-inputs
5151 `(("python-sphinx" ,python-sphinx)))
5152 (native-inputs
5153 `(("python-nose" ,python-nose)))
5154 (home-page "https://pypi.org/project/numpydoc/")
5155 (synopsis
5156 "Numpy's Sphinx extensions")
5157 (description
5158 "Sphinx extension to support docstrings in Numpy format.")
5159 (license license:bsd-2)
5160 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5161
5162 (define-public python2-numpydoc
5163 (let ((base (package-with-python2
5164 (strip-python2-variant python-numpydoc))))
5165 (package/inherit base
5166 (propagated-inputs
5167 `(("python2-jinja2" ,python2-jinja2)
5168 ,@(package-propagated-inputs base))))))
5169
5170 (define-public python-numexpr
5171 (package
5172 (name "python-numexpr")
5173 (version "2.6.5")
5174 (source
5175 (origin
5176 (method url-fetch)
5177 (uri (pypi-uri "numexpr" version))
5178 (sha256
5179 (base32
5180 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
5181 (build-system python-build-system)
5182 (arguments `(#:tests? #f)) ; no tests included
5183 (propagated-inputs
5184 `(("python-numpy" ,python-numpy)))
5185 (home-page "https://github.com/pydata/numexpr")
5186 (synopsis "Fast numerical expression evaluator for NumPy")
5187 (description
5188 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5189 expressions that operate on arrays are accelerated and use less memory than
5190 doing the same calculation in Python. In addition, its multi-threaded
5191 capabilities can make use of all your cores, which may accelerate
5192 computations, most specially if they are not memory-bounded (e.g. those using
5193 transcendental functions).")
5194 (license license:expat)))
5195
5196 (define-public python2-numexpr
5197 (package-with-python2 python-numexpr))
5198
5199 (define-public python-cycler
5200 (package
5201 (name "python-cycler")
5202 (version "0.10.0")
5203 (source (origin
5204 (method url-fetch)
5205 (uri (pypi-uri "cycler" version))
5206 (sha256
5207 (base32
5208 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5209 (build-system python-build-system)
5210 (arguments
5211 ;; XXX: The current version requires 'coveralls' which we don't have.
5212 ;; Enable this for the next release which uses 'python-pytest'.
5213 '(#:tests? #f))
5214 (propagated-inputs
5215 `(("python-six" ,python-six)))
5216 (home-page "https://matplotlib.org/cycler/")
5217 (synopsis "Composable keyword argument iterator")
5218 (description
5219 "When using @code{matplotlib} and plotting more than one line, it is
5220 common to want to be able to want to be able to cycle over one or more artist
5221 styles; but the plotting logic can quickly become involved.
5222 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5223 @code{Cycler} class was developed.")
5224 (license license:bsd-3)))
5225
5226 (define-public python2-cycler
5227 (package-with-python2 python-cycler))
5228
5229 (define-public python-colorspacious
5230 (package
5231 (name "python-colorspacious")
5232 (version "1.1.2")
5233 (source
5234 (origin
5235 (method git-fetch)
5236 (uri (git-reference
5237 (url "https://github.com/njsmith/colorspacious")
5238 (commit (string-append "v" version))))
5239 (file-name (git-file-name name version))
5240 (sha256
5241 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5242 (build-system python-build-system)
5243 (propagated-inputs
5244 `(("python-numpy" ,python-numpy)))
5245 (native-inputs
5246 `(("python-nose" ,python-nose)))
5247 (arguments
5248 `(#:phases
5249 (modify-phases %standard-phases
5250 (replace 'check
5251 (lambda _
5252 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5253 (home-page "https://github.com/njsmith/colorspacious")
5254 (synopsis "Python library for colorspace conversions")
5255 (description "@code{colorspacious} is a Python library that lets you
5256 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5257 (license license:expat)))
5258
5259 (define-public python2-colorspacious
5260 (package-with-python2 python-colorspacious))
5261
5262 (define-public python-matplotlib
5263 (package
5264 (name "python-matplotlib")
5265 (version "3.1.2")
5266 (source
5267 (origin
5268 (method url-fetch)
5269 (uri (pypi-uri "matplotlib" version))
5270 (sha256
5271 (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
5272 (patches
5273 (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
5274 (build-system python-build-system)
5275 (propagated-inputs ; the following packages are all needed at run time
5276 `(("python-cycler" ,python-cycler)
5277 ("python-kiwisolver" ,python-kiwisolver)
5278 ("python-pyparsing" ,python-pyparsing)
5279 ("python-pygobject" ,python-pygobject)
5280 ("gobject-introspection" ,gobject-introspection)
5281 ("python-tkinter" ,python "tk")
5282 ("python-dateutil" ,python-dateutil)
5283 ("python-numpy" ,python-numpy)
5284 ("python-pillow" ,python-pillow)
5285 ("python-pytz" ,python-pytz)
5286 ("python-six" ,python-six)
5287 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5288 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5289 ;; object. For this reason we need to import both libraries.
5290 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5291 ("python-pycairo" ,python-pycairo)
5292 ("python-cairocffi" ,python-cairocffi)))
5293 (inputs
5294 `(("libpng" ,libpng)
5295 ("freetype" ,freetype)
5296 ("cairo" ,cairo)
5297 ("glib" ,glib)
5298 ;; FIXME: Add backends when available.
5299 ;("python-wxpython" ,python-wxpython)
5300 ("tcl" ,tcl)
5301 ("tk" ,tk)))
5302 (native-inputs
5303 `(("pkg-config" ,pkg-config)
5304 ("python-pytest" ,python-pytest)
5305 ("python-mock" ,python-mock)
5306 ("unzip" ,unzip)
5307 ("jquery-ui"
5308 ,(origin
5309 (method url-fetch)
5310 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5311 (sha256
5312 (base32
5313 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5314 (arguments
5315 `(#:phases
5316 (modify-phases %standard-phases
5317 ;; XXX We disable all image comparison tests because we're using a
5318 ;; newer version of FreeType than matplotlib expects. This leads to
5319 ;; minor differences throughout the tests.
5320 (add-after 'unpack 'fix-and-disable-failing-tests
5321 (lambda _
5322 (substitute* (append (find-files "lib/matplotlib/tests/"
5323 "test_.*\\.py$")
5324 (find-files "lib/mpl_toolkits/tests"
5325 "test_.*\\.py$"))
5326 (("^from matplotlib" match)
5327 (string-append "import pytest\n" match))
5328 (("( *)@image_comparison" match indent)
5329 (string-append indent
5330 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5331 match)))
5332 (substitute* "lib/matplotlib/tests/test_animation.py"
5333 (("/bin/sh") (which "sh")))
5334 (for-each delete-file
5335 ;; test_normal_axes, test_get_tightbbox_polar
5336 '("lib/matplotlib/tests/test_axes.py"
5337 ;; We don't use the webagg backend and this test forces it.
5338 "lib/matplotlib/tests/test_backend_webagg.py"
5339 ;; test_outward_ticks
5340 "lib/matplotlib/tests/test_tightlayout.py"
5341 ;; test_hidden_axes fails with minor extent
5342 ;; differences, possibly due to the use of a
5343 ;; different version of FreeType.
5344 "lib/matplotlib/tests/test_constrainedlayout.py"
5345 ;; Fontconfig returns no fonts.
5346 "lib/matplotlib/tests/test_font_manager.py"))
5347 #t))
5348 (add-before 'install 'install-jquery-ui
5349 (lambda* (#:key outputs inputs #:allow-other-keys)
5350 (let ((dir (string-append (assoc-ref outputs "out")
5351 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5352 (mkdir-p dir)
5353 (invoke "unzip"
5354 (assoc-ref inputs "jquery-ui")
5355 "-d" dir))
5356 #t))
5357 (replace 'check
5358 (lambda* (#:key outputs inputs #:allow-other-keys)
5359 (add-installed-pythonpath inputs outputs)
5360 (invoke "python" "tests.py" "-v"
5361 "-m" "not network and not webagg")))
5362 (add-before 'build 'configure-environment
5363 (lambda* (#:key outputs inputs #:allow-other-keys)
5364 (let ((cairo (assoc-ref inputs "cairo")))
5365 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5366 ;; has not effect.
5367 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5368 (setenv "HOME" (getcwd))
5369 ;; Fix rounding errors when using the x87 FPU.
5370 (when (string-prefix? "i686" ,(%current-system))
5371 (setenv "CFLAGS" "-ffloat-store"))
5372 (call-with-output-file "setup.cfg"
5373 (lambda (port)
5374 (format port "[directories]~%
5375 basedirlist = ~a,~a~%
5376 [packages]~%
5377 tests = True~%"
5378 (assoc-ref inputs "tcl")
5379 (assoc-ref inputs "tk")))))
5380 #t)))))
5381 (home-page "https://matplotlib.org/")
5382 (synopsis "2D plotting library for Python")
5383 (description
5384 "Matplotlib is a Python 2D plotting library which produces publication
5385 quality figures in a variety of hardcopy formats and interactive environments
5386 across platforms. Matplotlib can be used in Python scripts, the python and
5387 ipython shell, web application servers, and six graphical user interface
5388 toolkits.")
5389 (license license:psfl)
5390 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5391
5392 (define-public python2-matplotlib
5393 (let ((matplotlib (package-with-python2
5394 (strip-python2-variant python-matplotlib))))
5395 (package (inherit matplotlib)
5396 (version "2.2.4")
5397 (source
5398 (origin
5399 (method url-fetch)
5400 (uri (pypi-uri "matplotlib" version))
5401 (sha256
5402 (base32
5403 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5404 (arguments
5405 (substitute-keyword-arguments (package-arguments matplotlib)
5406 ((#:phases phases)
5407 `(modify-phases ,phases
5408 (replace 'install-jquery-ui
5409 (lambda* (#:key outputs inputs #:allow-other-keys)
5410 (let ((dir (string-append (assoc-ref outputs "out")
5411 "/lib/python2.7/site-packages/"
5412 "matplotlib/backends/web_backend/")))
5413 (mkdir-p dir)
5414 (invoke "unzip"
5415 (assoc-ref inputs "jquery-ui")
5416 "-d" dir))
5417 #t))
5418 (delete 'fix-and-disable-failing-tests)
5419 (delete 'check))))) ; These tests weren't run the the past.
5420 ;; Make sure to use special packages for Python 2 instead
5421 ;; of those automatically rewritten by package-with-python2.
5422 (propagated-inputs
5423 `(("python2-pycairo" ,python2-pycairo)
5424 ("python2-backports-functools-lru-cache"
5425 ,python2-backports-functools-lru-cache)
5426 ("python2-functools32" ,python2-functools32)
5427 ("python2-pygobject-2" ,python2-pygobject-2)
5428 ("python2-subprocess32" ,python2-subprocess32)
5429 ("python2-tkinter" ,python-2 "tk")
5430 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5431 '("python-cairocffi"
5432 "python-pycairo"
5433 "python-pygobject"
5434 "python-tkinter")))))))
5435
5436 (define-public python-matplotlib-documentation
5437 (package
5438 (name "python-matplotlib-documentation")
5439 (version (package-version python-matplotlib))
5440 (source (package-source python-matplotlib))
5441 (build-system python-build-system)
5442 (native-inputs
5443 `(("python-matplotlib" ,python-matplotlib)
5444 ("python-colorspacious" ,python-colorspacious)
5445 ("python-sphinx" ,python-sphinx)
5446 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5447 ("python-sphinx-gallery" ,python-sphinx-gallery)
5448 ("python-numpydoc" ,python-numpydoc)
5449 ("python-ipython" ,python-ipython)
5450 ("python-ipykernel" ,python-ipykernel)
5451 ("python-mock" ,python-mock)
5452 ("graphviz" ,graphviz)
5453 ("texlive" ,(texlive-union (list texlive-amsfonts
5454 texlive-latex-amsmath
5455 texlive-latex-enumitem
5456 texlive-latex-expdlist
5457 texlive-latex-geometry
5458 texlive-latex-preview
5459 texlive-latex-type1cm
5460 texlive-latex-ucs
5461
5462 texlive-generic-pdftex
5463
5464 texlive-fonts-ec
5465 texlive-fonts-adobe-times
5466 texlive-fonts-txfonts)))
5467 ("texinfo" ,texinfo)
5468 ,@(package-native-inputs python-matplotlib)))
5469 (arguments
5470 `(#:tests? #f ; we're only generating documentation
5471 #:phases
5472 (modify-phases %standard-phases
5473 ;; The tests in python-matplotlib are run after the install phase, so
5474 ;; we need to delete the extra phase here.
5475 (delete 'check)
5476 (replace 'build
5477 (lambda _
5478 (chdir "doc")
5479 (setenv "PYTHONPATH"
5480 (string-append (getenv "PYTHONPATH")
5481 ":" (getcwd) "/../examples/units"))
5482 (substitute* "conf.py"
5483 ;; Don't use git.
5484 (("^SHA = check_output.*")
5485 (string-append "SHA = \"" ,version "\"\n"))
5486 ;; Don't fetch intersphinx files from the Internet
5487 (("^explicit_order_folders" m)
5488 (string-append "intersphinx_mapping = {}\n" m))
5489 (("'sphinx.ext.intersphinx',") "")
5490 ;; Disable URL embedding which requires internet access.
5491 (("'https://docs.scipy.org/doc/numpy'") "None")
5492 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5493 (invoke "make"
5494 "SPHINXBUILD=sphinx-build"
5495 "SPHINXOPTS=" ; don't abort on warnings
5496 "html" "texinfo")))
5497 (replace 'install
5498 (lambda* (#:key inputs outputs #:allow-other-keys)
5499 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5500 (doc (string-append data "/doc/python-matplotlib-" ,version))
5501 (info (string-append data "/info"))
5502 (html (string-append doc "/html")))
5503 (mkdir-p html)
5504 (mkdir-p info)
5505 (copy-recursively "build/html" html)
5506 (symlink (string-append html "/_images")
5507 (string-append info "/matplotlib-figures"))
5508 (with-directory-excursion "build/texinfo"
5509 (substitute* "matplotlib.texi"
5510 (("@image\\{([^,]*)" all file)
5511 (string-append "@image{matplotlib-figures/" file)))
5512 (symlink (string-append html "/_images")
5513 "./matplotlib-figures")
5514 (invoke "makeinfo" "--no-split"
5515 "-o" "matplotlib.info" "matplotlib.texi"))
5516 (install-file "build/texinfo/matplotlib.info" info))
5517 #t)))))
5518 (home-page (package-home-page python-matplotlib))
5519 (synopsis "Documentation for the python-matplotlib package")
5520 (description (package-description python-matplotlib))
5521 (license (package-license python-matplotlib))))
5522
5523 (define-public python-matplotlib-venn
5524 (package
5525 (name "python-matplotlib-venn")
5526 (version "0.11.5")
5527 (source
5528 (origin
5529 (method url-fetch)
5530 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5531 (sha256
5532 (base32
5533 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5534 (build-system python-build-system)
5535 (arguments '(#:tests? #f)) ; tests are not included
5536 (propagated-inputs
5537 `(("python-matplotlib" ,python-matplotlib)
5538 ("python-numpy" ,python-numpy)
5539 ("python-scipy" ,python-scipy)))
5540 (native-inputs
5541 `(("unzip" ,unzip)))
5542 (home-page "https://github.com/konstantint/matplotlib-venn")
5543 (synopsis "Plot area-proportional Venn diagrams")
5544 (description
5545 "This package provides tools for plotting area-proportional two- and
5546 three-way Venn diagrams in @code{matplotlib}.")
5547 (license license:expat)))
5548
5549 (define-public python-pysnptools
5550 (package
5551 (name "python-pysnptools")
5552 (version "0.4.11")
5553 (source
5554 (origin
5555 (method url-fetch)
5556 (uri (pypi-uri "pysnptools" version))
5557 (sha256
5558 (base32
5559 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5560 (build-system python-build-system)
5561 (arguments
5562 `(#:tests? #f ; no test data are included
5563 #:phases
5564 (modify-phases %standard-phases
5565 (replace 'check
5566 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5567 (if tests?
5568 (begin
5569 (add-installed-pythonpath inputs outputs)
5570 (invoke "python3" "pysnptools/test.py"))
5571 #t))))))
5572 (propagated-inputs
5573 `(("python-dill" ,python-dill)
5574 ("python-h5py" ,python-h5py)
5575 ("python-numpy" ,python-numpy)
5576 ("python-pandas" ,python-pandas)
5577 ("python-psutil" ,python-psutil)
5578 ("python-scipy" ,python-scipy)))
5579 (native-inputs
5580 `(("python-cython" ,python-cython)))
5581 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5582 (synopsis "Library for reading and manipulating genetic data")
5583 (description
5584 "PySnpTools is a library for reading and manipulating genetic data. It
5585 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5586 those files. It can also efficiently manipulate ranges of integers using set
5587 operators such as union, intersection, and difference.")
5588 (license license:asl2.0)))
5589
5590 (define-public python2-pysnptools
5591 (package-with-python2 python-pysnptools))
5592
5593 (define-public python-wurlitzer
5594 (package
5595 (name "python-wurlitzer")
5596 (version "2.0.1")
5597 (source
5598 (origin
5599 (method url-fetch)
5600 (uri (pypi-uri "wurlitzer" version))
5601 (sha256
5602 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5603 (build-system python-build-system)
5604 (arguments
5605 '(#:phases
5606 (modify-phases %standard-phases
5607 (replace 'check
5608 (lambda _
5609 (invoke "pytest" "-vv" "test.py"))))))
5610 (native-inputs
5611 `(("python-mock" ,python-mock)
5612 ("python-pytest" ,python-pytest)))
5613 (home-page "https://github.com/minrk/wurlitzer")
5614 (synopsis "Capture C-level output in context managers")
5615 (description
5616 "This library helps to redirect @code{sys.stdout} to a stream or a file
5617 while executing some piece of code, including C code running within a Python
5618 process.")
5619 (license license:expat)))
5620
5621 (define-public python-socksipy-branch
5622 (package
5623 (name "python-socksipy-branch")
5624 (version "1.01")
5625 (source
5626 (origin
5627 (method url-fetch)
5628 (uri (pypi-uri "SocksiPy-branch" version))
5629 (sha256
5630 (base32
5631 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5632 (build-system python-build-system)
5633 (arguments
5634 `(#:tests? #f)) ; There are no tests
5635 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5636 (synopsis "Python SOCKS module")
5637 (description
5638 "SocksiPy - A Python SOCKS client module. It provides a
5639 socket-like interface that supports connections to any TCP
5640 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5641 The original version was developed by Dan Haim, this is a
5642 branch created by Mario Vilas to address some open issues,
5643 as the original project seems to have been abandoned circa 2007.")
5644 (license license:bsd-3)))
5645
5646 (define-public python2-socksipy-branch
5647 (package-with-python2 python-socksipy-branch))
5648
5649 (define-public python-socksipychain
5650 (package
5651 (name "python-socksipychain")
5652 (version "2.1.2")
5653 (source
5654 (origin
5655 (method git-fetch)
5656 (uri (git-reference
5657 (url "https://github.com/pagekite/PySocksipyChain")
5658 (commit (string-append "v" version))))
5659 (file-name (git-file-name name version))
5660 (sha256
5661 (base32
5662 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5663 (build-system python-build-system)
5664 (arguments
5665 `(#:tests? #f)) ; Tests try to access the network.
5666 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5667 (synopsis "Python SOCKS module with chained proxies support")
5668 (description
5669 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5670 adds support for arbitrary chaining of proxy servers and various modes of
5671 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5672 a simple netcat replacement with chaining support.")
5673 (license license:bsd-3)))
5674
5675 (define-public python-pycodestyle
5676 (package
5677 (name "python-pycodestyle")
5678 (version "2.7.0")
5679 (source
5680 (origin
5681 (method url-fetch)
5682 (uri (pypi-uri "pycodestyle" version))
5683 (sha256
5684 (base32
5685 "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
5686 (build-system python-build-system)
5687 (arguments
5688 `(#:phases
5689 (modify-phases %standard-phases
5690 (replace 'check
5691 (lambda _
5692 (invoke "pytest" "-vv"))))))
5693 (native-inputs
5694 `(("python-pytest" ,python-pytest)))
5695 (home-page "https://pycodestyle.readthedocs.io/")
5696 (synopsis "Python style guide checker")
5697 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5698 Python code against some of the style conventions in
5699 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5700 (license license:expat)))
5701
5702 (define-public python2-pycodestyle
5703 (package-with-python2 python-pycodestyle))
5704
5705 (define-public python-multidict
5706 (package
5707 (name "python-multidict")
5708 (version "4.7.5")
5709 (source
5710 (origin
5711 (method url-fetch)
5712 (uri (pypi-uri "multidict" version))
5713 (sha256
5714 (base32
5715 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5716 (build-system python-build-system)
5717 (arguments
5718 '(#:modules ((ice-9 ftw)
5719 (srfi srfi-1)
5720 (srfi srfi-26)
5721 (guix build utils)
5722 (guix build python-build-system))
5723 #:phases (modify-phases %standard-phases
5724 (replace 'check
5725 (lambda* (#:key tests? #:allow-other-keys)
5726 (if tests?
5727 (begin
5728 (let ((libdir (find (cut string-prefix? "lib." <>)
5729 (scandir "build"))))
5730 (setenv "PYTHONPATH"
5731 (string-append "./build/" libdir ":"
5732 (getenv "PYTHONPATH")))
5733 (invoke "pytest" "-vv")))
5734 (format #t "test suite not run~%"))
5735 #t)))))
5736 (native-inputs
5737 `(("python-pytest" ,python-pytest)
5738 ("python-pytest-cov" ,python-pytest-cov)))
5739 (home-page "https://github.com/aio-libs/multidict/")
5740 (synopsis "Multidict implementation")
5741 (description "Multidict is dict-like collection of key-value pairs
5742 where key might be occurred more than once in the container.")
5743 (license license:asl2.0)))
5744
5745 (define-public python-orderedmultidict
5746 (package
5747 (name "python-orderedmultidict")
5748 (version "1.0")
5749 (source
5750 (origin
5751 (method url-fetch)
5752 (uri (pypi-uri "orderedmultidict" version))
5753 (sha256
5754 (base32
5755 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5756 (build-system python-build-system)
5757 (arguments
5758 `(#:phases
5759 (modify-phases %standard-phases
5760 (add-after 'unpack 'fix-tests
5761 (lambda _
5762 ;; The package uses nosetest for running the tests.
5763 ;; Adding this initfile allows to run the test suite
5764 ;; without requiring nosetest.
5765 (with-output-to-file "tests/__init__.py" newline)
5766 #t)))))
5767 (propagated-inputs
5768 `(("python-six" ,python-six)))
5769 (native-inputs
5770 `(("python-pycodestyle" ,python-pycodestyle)))
5771 (home-page "https://github.com/gruns/orderedmultidict")
5772 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5773 (description "This package contains a library for ordered multivalue
5774 dictionaries. A multivalue dictionary is a dictionary that can store
5775 multiple values for the same key. An ordered multivalue dictionary is a
5776 multivalue dictionary that retains the order of insertions and deletions.")
5777 (license license:unlicense)))
5778
5779 (define-public python2-orderedmultidict
5780 (package-with-python2 python-orderedmultidict))
5781
5782 (define-public python-autopep8
5783 (package
5784 (name "python-autopep8")
5785 (version "1.5.3")
5786 (source
5787 (origin
5788 (method url-fetch)
5789 (uri (pypi-uri "autopep8" version))
5790 (sha256
5791 (base32
5792 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5793 (build-system python-build-system)
5794 (propagated-inputs
5795 `(("python-pycodestyle" ,python-pycodestyle)
5796 ("python-toml" ,python-toml)))
5797 (home-page "https://github.com/hhatto/autopep8")
5798 (synopsis "Format Python code according to the PEP 8 style guide")
5799 (description
5800 "@code{autopep8} automatically formats Python code to conform to
5801 the PEP 8 style guide. It uses the pycodestyle utility to determine
5802 what parts of the code needs to be formatted. @code{autopep8} is
5803 capable of fixing most of the formatting issues that can be reported
5804 by pycodestyle.")
5805 (license (license:non-copyleft
5806 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5807
5808 (define-public python2-autopep8
5809 (package-with-python2 python-autopep8))
5810
5811 (define-public python-distlib
5812 (package
5813 (name "python-distlib")
5814 (version "0.3.0")
5815 (source
5816 (origin
5817 (method url-fetch)
5818 (uri (pypi-uri "distlib" version ".zip"))
5819 (sha256
5820 (base32
5821 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5822 (build-system python-build-system)
5823 (arguments
5824 `(#:phases
5825 (modify-phases %standard-phases
5826 (add-before 'build 'no-/bin/sh
5827 (lambda _
5828 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5829 (("/bin/sh") (which "sh")))
5830 #t))
5831 (add-before 'check 'prepare-test-env
5832 (lambda _
5833 (setenv "HOME" "/tmp")
5834 ;; NOTE: Any value works, the variable just has to be present.
5835 (setenv "SKIP_ONLINE" "1")
5836 #t)))))
5837 (native-inputs `(("unzip" ,unzip)))
5838 (home-page "https://bitbucket.org/pypa/distlib")
5839 (synopsis "Distribution utilities")
5840 (description "Distlib is a library which implements low-level functions that
5841 relate to packaging and distribution of Python software. It is intended to be
5842 used as the basis for third-party packaging tools.")
5843 (license license:psfl)))
5844
5845 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
5846 (define-public python-distlib/next
5847 (package
5848 (inherit python-distlib)
5849 (version "0.3.1")
5850 (source
5851 (origin
5852 (method url-fetch)
5853 (uri (pypi-uri "distlib" version ".zip"))
5854 (sha256
5855 (base32
5856 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
5857
5858 (define-public python-distutils-extra
5859 (package
5860 (name "python-distutils-extra")
5861 (version "2.38")
5862 (source
5863 (origin
5864 (method url-fetch)
5865 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5866 version "/+download/python-distutils-extra-"
5867 version ".tar.gz"))
5868 (sha256
5869 (base32
5870 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5871 (build-system python-build-system)
5872 (home-page "https://launchpad.net/python-distutils-extra/")
5873 (synopsis "Enhancements to Python's distutils")
5874 (description
5875 "The python-distutils-extra module enables you to easily integrate
5876 gettext support, themed icons, and scrollkeeper-based documentation into
5877 Python's distutils.")
5878 (license license:gpl2)))
5879
5880 (define-public python2-distutils-extra
5881 (package-with-python2 python-distutils-extra))
5882
5883 (define-public python2-elib.intl
5884 (package
5885 (name "python2-elib.intl")
5886 (version "0.0.3")
5887 (source
5888 (origin
5889 ;; This project doesn't tag releases or publish tarballs, so we take
5890 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5891 (method git-fetch)
5892 (uri (git-reference
5893 (url "https://github.com/dieterv/elib.intl")
5894 (commit "d09997cfef")))
5895 (file-name (string-append name "-" version "-checkout"))
5896 (sha256
5897 (base32
5898 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5899 (build-system python-build-system)
5900 (arguments
5901 ;; incompatible with Python 3 (exception syntax)
5902 `(#:python ,python-2
5903 #:tests? #f))
5904 (home-page "https://github.com/dieterv/elib.intl")
5905 (synopsis "Enhanced internationalization for Python")
5906 (description
5907 "The elib.intl module provides enhanced internationalization (I18N)
5908 services for your Python modules and applications.")
5909 (license license:lgpl3+)))
5910
5911 (define-public python-olefile
5912 (package
5913 (name "python-olefile")
5914 (version "0.46")
5915 (source
5916 (origin
5917 (method url-fetch)
5918 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5919 "download/v" version "/olefile-" version ".tar.gz"))
5920 (file-name (string-append name "-" version ".tar.gz"))
5921 (sha256
5922 (base32
5923 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5924 (build-system python-build-system)
5925 (home-page "https://www.decalage.info/python/olefileio")
5926 (synopsis "Read and write Microsoft OLE2 files.")
5927 (description
5928 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5929 Storage or Compound Document, Microsoft Office). It is an improved version of
5930 the OleFileIO module from PIL, the Python Image Library.")
5931 (license license:bsd-3)))
5932
5933 (define-public python2-olefile
5934 (package-with-python2 python-olefile))
5935
5936 (define-public python-pikepdf
5937 (package
5938 (name "python-pikepdf")
5939 (version "2.10.0")
5940 (source
5941 (origin
5942 (method url-fetch)
5943 (uri (pypi-uri "pikepdf" version))
5944 (sha256
5945 (base32 "09wfj1hjvj3r9gv7ywrqd7h3d0bz64bvils8sm3ghj90jhalb03s"))))
5946 (build-system python-build-system)
5947 (arguments
5948 `(#:tests? #false)) ;require python-xmp-toolkit
5949 (native-inputs
5950 `(("pybind11" ,pybind11)
5951 ("python-setuptools" ,python-setuptools)
5952 ("python-setuptools-scm" ,python-setuptools-scm/next)
5953 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
5954 ("python-toml" ,python-toml)
5955 ("python-wheel" ,python-wheel)))
5956 (inputs
5957 `(("qpdf" ,qpdf)))
5958 (propagated-inputs
5959 `(("python-lxml" ,python-lxml)
5960 ("python-pillow" ,python-pillow)))
5961 (home-page "https://github.com/pikepdf/pikepdf")
5962 (synopsis "Read and write PDFs with Python")
5963 (description
5964 "pikepdf is a Python library for reading and writing PDF files.")
5965 (license license:mpl2.0)))
5966
5967 (define-public python-pillow
5968 (package
5969 (name "python-pillow")
5970 (version "8.1.1")
5971 (source
5972 (origin
5973 (method url-fetch)
5974 (uri (pypi-uri "Pillow" version))
5975 (sha256
5976 (base32
5977 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
5978 (build-system python-build-system)
5979 (native-inputs
5980 `(("python-pytest" ,python-pytest)))
5981 (inputs
5982 `(("freetype" ,freetype)
5983 ("lcms" ,lcms)
5984 ("libjpeg" ,libjpeg-turbo)
5985 ("libtiff" ,libtiff)
5986 ("libwebp" ,libwebp)
5987 ("openjpeg" ,openjpeg)
5988 ("zlib" ,zlib)))
5989 (propagated-inputs
5990 `(("python-olefile" ,python-olefile)))
5991 (arguments
5992 `(#:phases
5993 (modify-phases %standard-phases
5994 (add-after 'unpack 'patch-ldconfig
5995 (lambda _
5996 (substitute* "setup.py"
5997 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5998 (replace 'check
5999 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6000 (if tests?
6001 (begin
6002 (setenv "HOME" (getcwd))
6003 ;; Make installed package available for running the tests.
6004 (add-installed-pythonpath inputs outputs)
6005 (invoke "python" "selftest.py" "--installed")
6006 (invoke "python" "-m" "pytest" "-vv"))
6007 #t))))))
6008 (home-page "https://python-pillow.org")
6009 (synopsis "Fork of the Python Imaging Library")
6010 (description
6011 "The Python Imaging Library adds image processing capabilities to your
6012 Python interpreter. This library provides extensive file format support, an
6013 efficient internal representation, and fairly powerful image processing
6014 capabilities. The core image library is designed for fast access to data
6015 stored in a few basic pixel formats. It should provide a solid foundation for
6016 a general image processing tool.")
6017 (properties `((python2-variant . ,(delay python2-pillow))))
6018 (license (license:x11-style
6019 "http://www.pythonware.com/products/pil/license.htm"
6020 "The PIL Software License"))))
6021
6022 (define-public python2-pillow
6023 (package-with-python2
6024 (package
6025 (inherit (strip-python2-variant python-pillow))
6026 ;; Version 6 is the last series with Python 2 support.
6027 (version "6.2.2")
6028 (source
6029 (origin
6030 (method url-fetch)
6031 (uri (pypi-uri "Pillow" version))
6032 (sha256
6033 (base32
6034 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
6035
6036 (define-public python-pillow-2.9
6037 (package
6038 (inherit python-pillow)
6039 (version "2.9.0")
6040 (source
6041 (origin
6042 (method url-fetch)
6043 (uri (pypi-uri "Pillow" version))
6044 (sha256
6045 (base32
6046 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
6047 (arguments
6048 (substitute-keyword-arguments (package-arguments python-pillow)
6049 ((#:tests? _ #f) #f)))
6050 (properties '((hidden? #t)))))
6051
6052 (define-public python-pillow-simd
6053 (package
6054 (inherit python-pillow)
6055 (name "python-pillow-simd")
6056 (version "7.1.2")
6057 ;; The PyPI tarball does not include test files.
6058 (source
6059 (origin
6060 (method git-fetch)
6061 (uri (git-reference
6062 (url "https://github.com/uploadcare/pillow-simd")
6063 (commit version)))
6064 (file-name (git-file-name name version))
6065 (sha256
6066 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
6067 (arguments
6068 (substitute-keyword-arguments
6069 (package-arguments python-pillow)
6070 ((#:phases phases)
6071 `(modify-phases ,phases
6072 (add-after 'unpack 'make-tests-writable
6073 (lambda _
6074 (for-each make-file-writable (find-files "Tests"))
6075 #t))))))
6076 (inputs
6077 `(("libraqm" ,libraqm)
6078 ("libimagequant" ,libimagequant)
6079 ,@(package-inputs python-pillow)))
6080 (home-page "https://github.com/uploadcare/pillow-simd")
6081 (synopsis "Fork of the Python Imaging Library (Pillow)")
6082 (description "This package is a fork of Pillow which adds support for SIMD
6083 parallelism.")))
6084
6085 (define-public python-imagecodecs
6086 (package
6087 (name "python-imagecodecs")
6088 (version "2021.3.31")
6089 (source
6090 (origin
6091 (method url-fetch)
6092 (uri (pypi-uri "imagecodecs" version))
6093 (sha256
6094 (base32
6095 "0q7pslb6wd56vbcq2mdxwsiha32mxjr7mgqqfbq5w42q601p9pi0"))
6096 (modules '((guix build utils)))
6097 (snippet
6098 '(begin
6099 ;; Unbundle 3rd party modules.
6100 (delete-file-recursively "3rdparty")
6101 ;; Delete pre-generated Cython files.
6102 (for-each delete-file (find-files "imagecodecs" "_.*\\.c$"))
6103 #t))))
6104 (build-system python-build-system)
6105 (arguments
6106 `(#:tests? #f ; Tests are disabled, because dependencies are missing.
6107 #:phases
6108 (modify-phases %standard-phases
6109 (add-after 'unpack 'create-configuration
6110 (lambda* (#:key inputs #:allow-other-keys)
6111 ;; By default everything is enabled. We can selectively disable
6112 ;; extensions (and thus dependencies) by deleting them from the
6113 ;; EXTENSIONS dictionary. This is upstream’s preferred way.
6114 (call-with-output-file "imagecodecs_distributor_setup.py"
6115 (lambda (port)
6116 (format port "\
6117 def customize_build(EXTENSIONS, OPTIONS):
6118 del EXTENSIONS['aec']
6119 del EXTENSIONS['avif']
6120 del EXTENSIONS['bitshuffle']
6121 del EXTENSIONS['deflate']
6122 del EXTENSIONS['jpeg2k']
6123 del EXTENSIONS['jpeg12']
6124 del EXTENSIONS['jpegls']
6125 del EXTENSIONS['jpegxl']
6126 del EXTENSIONS['jpegxr']
6127 del EXTENSIONS['lerc']
6128 del EXTENSIONS['ljpeg']
6129 del EXTENSIONS['lzf']
6130 del EXTENSIONS['zfp']
6131 del EXTENSIONS['zopfli']
6132 OPTIONS['cythonize']
6133 ")))
6134 #t)))))
6135 (inputs
6136 `(("c-blosc" ,c-blosc)
6137 ("giflib" ,giflib)
6138 ("google-brotli" ,google-brotli)
6139 ("libjpeg-turbo" ,libjpeg-turbo)
6140 ("libpng" ,libpng)
6141 ("libtiff" ,libtiff)
6142 ("libwebp" ,libwebp)
6143 ("lz4" ,lz4)
6144 ("snappy" ,snappy)
6145 ("xz" ,xz)
6146 ("zlib" ,zlib)
6147 ("zstd" ,zstd "lib")))
6148 (propagated-inputs
6149 `(("python-numpy" ,python-numpy)))
6150 (native-inputs
6151 ;; For building.
6152 `(("python-cython" ,python-cython)
6153 ;; For testing. Incomplete.
6154 ;("python-numcodecs" ,python-numcodecs)
6155 ;("python-zarr" ,python-zarr)
6156 ;("python-pytest" ,python-pytest)
6157 ))
6158 (home-page "https://www.lfd.uci.edu/~gohlke/")
6159 (synopsis
6160 "Image transformation, compression, and decompression codecs")
6161 (description
6162 "Imagecodecs is a Python library that provides block-oriented, in-memory
6163 buffer transformation, compression, and decompression functions for use in the
6164 tifffile, czifile, and other scientific image input/output modules.")
6165 (license license:bsd-3)))
6166
6167 (define-public python-roifile
6168 (package
6169 (name "python-roifile")
6170 (version "2020.11.28")
6171 (source
6172 (origin
6173 (method url-fetch)
6174 (uri (pypi-uri "roifile" version))
6175 (sha256
6176 (base32
6177 "04argnc7qccybkrj9ww18bf81ghsghhh93hnqy3p111rcdlyn66p"))))
6178 (build-system python-build-system)
6179 (arguments `(#:tests? #f)) ; there are none
6180 (propagated-inputs
6181 `(("python-numpy" ,python-numpy)))
6182 (home-page "https://www.lfd.uci.edu/~gohlke/")
6183 (synopsis "Read and write ImageJ ROI format")
6184 (description "Roifile is a Python library to read, write, create, and plot
6185 ImageJ ROIs, an undocumented and ImageJ application specific format to store
6186 regions of interest, geometric shapes, paths, text, etc for image overlays.")
6187 (license license:bsd-3)))
6188
6189 (define-public python-tifffile
6190 (package
6191 (name "python-tifffile")
6192 (version "2021.4.8")
6193 (source
6194 (origin
6195 (method url-fetch)
6196 (uri (pypi-uri "tifffile" version))
6197 (sha256
6198 (base32
6199 "16r0hw7shka1bqf28bv198lj2jhf2r9gy3s5zv4nf5cfsfm8pajm"))))
6200 (build-system python-build-system)
6201 ;; Tests require lfdfiles, which depends on tifffile
6202 (arguments `(#:tests? #f))
6203 (propagated-inputs
6204 `(("python-numpy" ,python-numpy)
6205 ("python-imagecodecs" ,python-imagecodecs)))
6206 (home-page "https://www.lfd.uci.edu/~gohlke/")
6207 (synopsis "Read and write TIFF(r) files")
6208 (description "This package lets you read image and metadata from many
6209 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6210 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6211 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6212 (license license:bsd-3)))
6213
6214 (define-public python-lfdfiles
6215 (package
6216 (name "python-lfdfiles")
6217 (version "2021.2.22")
6218 (source
6219 (origin
6220 (method url-fetch)
6221 (uri (pypi-uri "lfdfiles" version))
6222 (sha256
6223 (base32
6224 "12fxm4v805dgjrih7x6jnl1wd7y7jw1rkhjs3d4am8s6qk1cbar2"))))
6225 (build-system python-build-system)
6226 (propagated-inputs
6227 `(("python-click" ,python-click)
6228 ("python-numpy" ,python-numpy)
6229 ("python-tifffile" ,python-tifffile)))
6230 (home-page "https://www.lfd.uci.edu/~gohlke/")
6231 (synopsis "Work with LFD data files")
6232 (description
6233 "Lfdfiles is a Python library and console script for reading, writing,
6234 converting, and viewing many of the proprietary file formats used to store
6235 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6236 (license license:bsd-3)))
6237
6238 (define-public python-imageio
6239 (package
6240 (name "python-imageio")
6241 (version "2.8.0")
6242 (source
6243 (origin
6244 (method url-fetch)
6245 (uri (pypi-uri "imageio" version))
6246 (sha256
6247 (base32
6248 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6249 (build-system python-build-system)
6250 (arguments
6251 `(#:tests? #f ; many tests require online data
6252 #:phases
6253 (modify-phases %standard-phases
6254 (replace 'check
6255 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6256 (if tests?
6257 (begin
6258 ;; Make installed package available for running the tests.
6259 (add-installed-pythonpath inputs outputs)
6260 (invoke "pytest" "-vv"))
6261 #t))))))
6262 (propagated-inputs
6263 `(("python-numpy" ,python-numpy)
6264 ("python-pillow" ,python-pillow)
6265 ("python-psutil" ,python-psutil)))
6266 (native-inputs
6267 `(("python-pytest" ,python-pytest)))
6268 (home-page "https://imageio.github.io/")
6269 (synopsis "Library for reading and writing a wide range of image data")
6270 (description
6271 "Imageio is a Python library that provides an easy interface to read and
6272 write a wide range of image data, including animated images, video, volumetric
6273 data, and scientific formats.")
6274 (license license:bsd-2)))
6275
6276 (define-public python-pycparser
6277 (package
6278 (name "python-pycparser")
6279 (version "2.20")
6280 (source
6281 (origin
6282 (method url-fetch)
6283 (uri (pypi-uri "pycparser" version))
6284 (sha256
6285 (base32
6286 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6287 (outputs '("out" "doc"))
6288 (build-system python-build-system)
6289 (native-inputs
6290 `(("pkg-config" ,pkg-config)))
6291 (arguments
6292 `(#:phases
6293 (modify-phases %standard-phases
6294 (replace 'check
6295 (lambda _
6296 (with-directory-excursion "tests"
6297 (invoke "python" "all_tests.py"))
6298 #t))
6299 (add-after 'install 'install-doc
6300 (lambda* (#:key outputs #:allow-other-keys)
6301 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6302 (doc (string-append data "/doc/" ,name "-" ,version))
6303 (examples (string-append doc "/examples")))
6304 (mkdir-p examples)
6305 (for-each (lambda (file)
6306 (copy-file (string-append "." file)
6307 (string-append doc file)))
6308 '("/README.rst" "/CHANGES" "/LICENSE"))
6309 (copy-recursively "examples" examples)
6310 #t))))))
6311 (home-page "https://github.com/eliben/pycparser")
6312 (synopsis "C parser in Python")
6313 (description
6314 "Pycparser is a complete parser of the C language, written in pure Python
6315 using the PLY parsing library. It parses C code into an AST and can serve as
6316 a front-end for C compilers or analysis tools.")
6317 (license license:bsd-3)))
6318
6319 (define-public python2-pycparser
6320 (package-with-python2 python-pycparser))
6321
6322 (define-public python-xlsxwriter
6323 (package
6324 (name "python-xlsxwriter")
6325 (version "1.3.7")
6326 (source
6327 (origin
6328 ;; There are no tests in the PyPI tarball.
6329 (method git-fetch)
6330 (uri (git-reference
6331 (url "https://github.com/jmcnamara/XlsxWriter")
6332 (commit (string-append "RELEASE_" version))))
6333 (file-name (git-file-name name version))
6334 (sha256
6335 (base32 "1qg40r2mwrqfmhaxnary1cfgi0dwwazp5qga7c9p2cdji2v0x5rm"))))
6336 (build-system python-build-system)
6337 (home-page "https://github.com/jmcnamara/XlsxWriter")
6338 (synopsis "Python module for creating Excel XLSX files")
6339 (description
6340 "XlsxWriter is a Python module that can be used to write text, numbers,
6341 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
6342 (license license:bsd-2)))
6343
6344 (define-public python-pywavelets
6345 (package
6346 (name "python-pywavelets")
6347 (version "1.1.1")
6348 (home-page "https://github.com/PyWavelets/pywt")
6349 (source (origin
6350 (method url-fetch)
6351 (uri (pypi-uri "PyWavelets" version))
6352 (sha256
6353 (base32
6354 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6355 (build-system python-build-system)
6356 (arguments
6357 '(#:modules ((ice-9 ftw)
6358 (srfi srfi-1)
6359 (srfi srfi-26)
6360 (guix build utils)
6361 (guix build python-build-system))
6362 #:phases
6363 (modify-phases %standard-phases
6364 (replace 'check
6365 (lambda _
6366 (let ((cwd (getcwd))
6367 (libdir (find (cut string-prefix? "lib." <>)
6368 (scandir "build"))))
6369 (with-directory-excursion (string-append cwd "/build/" libdir)
6370 (invoke "pytest" "-vv"))))))))
6371 (native-inputs
6372 `(("python-matplotlib" ,python-matplotlib) ;for tests
6373 ("python-pytest" ,python-pytest)))
6374 (propagated-inputs
6375 `(("python-numpy" ,python-numpy)))
6376 (synopsis "Wavelet transforms in Python")
6377 (description
6378 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6379 mathematical basis functions that are localized in both time and frequency.
6380 Wavelet transforms are time-frequency transforms employing wavelets. They are
6381 similar to Fourier transforms, the difference being that Fourier transforms are
6382 localized only in frequency instead of in time and frequency.")
6383 (license license:expat)))
6384
6385 (define-public python-pywal
6386 (package
6387 (name "python-pywal")
6388 (version "3.3.0")
6389 (source
6390 (origin
6391 (method git-fetch)
6392 (uri (git-reference
6393 (url "https://github.com/dylanaraps/pywal")
6394 (commit version)))
6395 (file-name (git-file-name name version))
6396 (sha256
6397 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
6398 (build-system python-build-system)
6399 (arguments
6400 `(#:phases
6401 (modify-phases %standard-phases
6402 (add-before 'check 'fix-home-directory
6403 (lambda _
6404 ;; Tests fail with "Permission denied: '/homeless-shelter'".
6405 (setenv "HOME" "/tmp")
6406 #t)))))
6407 (inputs
6408 `(("imagemagick" ,imagemagick)))
6409 (home-page "https://github.com/dylanaraps/pywal")
6410 (synopsis "Color palette generator and applicator")
6411 (description
6412 "Pywal is a tool that generates a color palette from the dominant colors
6413 in an image. It then applies the colors system-wide and on-the-fly in all of
6414 your favourite programs.")
6415 (license license:expat)))
6416
6417 (define-public python-pywinrm
6418 (package
6419 (name "python-pywinrm")
6420 (version "0.4.1")
6421 (source
6422 (origin
6423 (method url-fetch)
6424 (uri (pypi-uri "pywinrm" version))
6425 (sha256
6426 (base32
6427 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6428 (build-system python-build-system)
6429 (propagated-inputs
6430 `(("python-six" ,python-six)
6431 ("python-requests_ntlm" ,python-requests_ntlm)
6432 ("python-xmltodict" ,python-xmltodict)
6433 ("python-kerberos" ,python-kerberos)))
6434 (native-inputs
6435 `(("python-mock" ,python-mock)
6436 ("python-pytest" ,python-pytest)))
6437 (home-page "https://github.com/diyan/pywinrm/")
6438 (synopsis
6439 "Python library for Windows Remote Management (WinRM)")
6440 (description
6441 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6442 service. It allows you to invoke commands on target Windows machines from
6443 any machine that can run Python.")
6444 (license license:expat)))
6445
6446 (define-public python-xcffib
6447 (package
6448 (name "python-xcffib")
6449 (version "0.6.0")
6450 (source
6451 (origin
6452 (method url-fetch)
6453 (uri (pypi-uri "xcffib" version))
6454 (sha256
6455 (base32
6456 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6457 (build-system python-build-system)
6458 (inputs
6459 `(("libxcb" ,libxcb)))
6460 (propagated-inputs
6461 `(("python-cffi" ,python-cffi) ; used at run time
6462 ("python-six" ,python-six)))
6463 (arguments
6464 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6465 #:tests? #f
6466 #:phases
6467 (modify-phases %standard-phases
6468 (add-after 'unpack 'fix-libxcb-path
6469 (lambda* (#:key inputs #:allow-other-keys)
6470 (let ((libxcb (assoc-ref inputs "libxcb")))
6471 (substitute* '("xcffib/__init__.py")
6472 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6473 #t)))
6474 (add-after 'install 'install-doc
6475 (lambda* (#:key outputs #:allow-other-keys)
6476 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6477 "/doc/" ,name "-" ,version)))
6478 (mkdir-p doc)
6479 (copy-file "README.md"
6480 (string-append doc "/README.md"))
6481 #t))))))
6482 (home-page "https://github.com/tych0/xcffib")
6483 (synopsis "XCB Python bindings")
6484 (description
6485 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6486 support for Python 3 and PyPy. It is based on cffi.")
6487 (license license:expat)))
6488
6489 (define-public python2-xcffib
6490 (package-with-python2 python-xcffib))
6491
6492 (define-public python-cairocffi
6493 (package
6494 (name "python-cairocffi")
6495 (version "1.2.0")
6496 (source
6497 (origin
6498 ;; The PyPI archive does not include the documentation, so use Git.
6499 (method git-fetch)
6500 (uri (git-reference
6501 (url "https://github.com/Kozea/cairocffi")
6502 (commit (string-append "v" version))))
6503 (file-name (git-file-name name version))
6504 (sha256
6505 (base32
6506 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6507 (build-system python-build-system)
6508 (outputs '("out" "doc"))
6509 (inputs
6510 `(("glib" ,glib)
6511 ("gtk+" ,gtk+)
6512 ("gdk-pixbuf" ,gdk-pixbuf)
6513 ("cairo" ,cairo)))
6514 (native-inputs
6515 `(("python-numpy" ,python-numpy)
6516 ("python-pytest" ,python-pytest)
6517 ("python-pytest-cov" ,python-pytest-cov)
6518 ("python-pytest-runner" ,python-pytest-runner)
6519 ("python-sphinx" ,python-sphinx)
6520 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6521 (propagated-inputs
6522 `(("python-xcffib" ,python-xcffib))) ; used at run time
6523 (arguments
6524 `(#:phases
6525 (modify-phases %standard-phases
6526 (add-after 'unpack 'patch-paths
6527 (lambda* (#:key inputs #:allow-other-keys)
6528 (substitute* "cairocffi/__init__.py"
6529 ;; Hack the dynamic library loading mechanism.
6530 (("find_library\\(library_name\\)")
6531 "\"found\"")
6532 (("filenames = \\(library_filename,\\) \\+ filenames")
6533 "pass")
6534 (("libcairo.so.2")
6535 (string-append (assoc-ref inputs "cairo")
6536 "/lib/libcairo.so.2")))
6537 (substitute* "cairocffi/pixbuf.py"
6538 (("libgdk_pixbuf-2.0.so.0")
6539 (string-append (assoc-ref inputs "gdk-pixbuf")
6540 "/lib/libgdk_pixbuf-2.0.so.0"))
6541 (("libgobject-2.0.so.0")
6542 (string-append (assoc-ref inputs "glib")
6543 "/lib/libgobject-2.0.so.0"))
6544 (("libglib-2.0.so.0")
6545 (string-append (assoc-ref inputs "glib")
6546 "/lib/libglib-2.0.so.0"))
6547 (("libgdk-3.so.0")
6548 (string-append (assoc-ref inputs "gtk+")
6549 "/lib/libgdk-3.so.0")))
6550 #t))
6551 (add-after 'unpack 'disable-linters
6552 ;; Their check fails; none of our business.
6553 (lambda _
6554 (substitute* "setup.cfg"
6555 ((".*pytest-flake8.*") "")
6556 ((".*pytest-isort.*") "")
6557 (("--flake8") "")
6558 (("--isort") ""))
6559 #t))
6560 (add-after 'install 'install-doc
6561 (lambda* (#:key inputs outputs #:allow-other-keys)
6562 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6563 (doc (string-append data "/doc/" ,name "-" ,version))
6564 (html (string-append doc "/html")))
6565 (setenv "LD_LIBRARY_PATH"
6566 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6567 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6568 (setenv "LANG" "en_US.UTF-8")
6569 (mkdir-p html)
6570 (for-each (lambda (file)
6571 (copy-file (string-append "." file)
6572 (string-append doc file)))
6573 '("/README.rst" "/NEWS.rst"))
6574 (system* "python" "setup.py" "build_sphinx")
6575 (copy-recursively "docs/_build/html" html)
6576 #t))))))
6577 (home-page "https://github.com/Kozea/cairocffi")
6578 (synopsis "Python bindings and object-oriented API for Cairo")
6579 (description
6580 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6581 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6582 graphics library with support for multiple backends including image buffers,
6583 PNG, PostScript, PDF, and SVG file output.")
6584 (license license:bsd-3)))
6585
6586 (define-public python-decorator
6587 (package
6588 (name "python-decorator")
6589 (version "4.3.0")
6590 (source
6591 (origin
6592 (method url-fetch)
6593 (uri (pypi-uri "decorator" version))
6594 (sha256
6595 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6596 (build-system python-build-system)
6597 (home-page "https://pypi.org/project/decorator/")
6598 (synopsis "Python module to simplify usage of decorators")
6599 (description
6600 "The aim of the decorator module is to simplify the usage of decorators
6601 for the average programmer, and to popularize decorators usage giving examples
6602 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6603 etc. The core of this module is a decorator factory.")
6604 (license license:expat)))
6605
6606 (define-public python2-decorator
6607 (package-with-python2 python-decorator))
6608
6609 (define-public python-drmaa
6610 (package
6611 (name "python-drmaa")
6612 (version "0.7.7")
6613 (source
6614 (origin
6615 (method url-fetch)
6616 (uri (pypi-uri "drmaa" version))
6617 (sha256
6618 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6619 (build-system python-build-system)
6620 ;; The test suite requires libdrmaa which is provided by the cluster
6621 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6622 ;; should be set to the path of the libdrmaa library.
6623 (arguments '(#:tests? #f))
6624 (native-inputs
6625 `(("python-nose" ,python-nose)))
6626 (home-page "https://pypi.org/project/drmaa/")
6627 (synopsis "Python bindings for the DRMAA library")
6628 (description
6629 "A Python package for Distributed Resource Management (DRM) job
6630 submission and control. This package is an implementation of the DRMAA 1.0
6631 Python language binding specification.")
6632 (license license:bsd-3)))
6633
6634 (define-public python2-drmaa
6635 (package-with-python2 python-drmaa))
6636
6637 (define-public python-grako
6638 (package
6639 (name "python-grako")
6640 (version "3.99.9")
6641 (source
6642 (origin
6643 (method url-fetch)
6644 (uri
6645 (pypi-uri "grako" version ".zip"))
6646 (sha256
6647 (base32
6648 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6649 (build-system python-build-system)
6650 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6651 (native-inputs
6652 `(("unzip" ,unzip)
6653 ("python-pytest" ,python-pytest)
6654 ("python-pytest-runner" ,python-pytest-runner)))
6655 (home-page "https://bitbucket.org/neogeny/grako")
6656 (synopsis "EBNF parser generator")
6657 (description
6658 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6659 memoizing PEG/Packrat parser in Python.")
6660 (license license:bsd-3)))
6661
6662 (define-public python2-grako
6663 (package-with-python2 python-grako))
6664
6665 (define-public python-grandalf
6666 (package
6667 (name "python-grandalf")
6668 (version "0.7")
6669 (source
6670 (origin
6671 ;; There's no source tarball on PyPI.
6672 (method git-fetch)
6673 (uri (git-reference
6674 (url "https://github.com/bdcht/grandalf")
6675 (commit (string-append "v" version))))
6676 (file-name (git-file-name name version))
6677 (sha256
6678 (base32
6679 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6680 (build-system python-build-system)
6681 (arguments
6682 '(#:phases
6683 (modify-phases %standard-phases
6684 (replace 'check
6685 (lambda _
6686 (invoke "python" "setup.py" "pytest"))))))
6687 (native-inputs
6688 `(("python-pytest" ,python-pytest)
6689 ("python-pytest-runner" ,python-pytest-runner)))
6690 (propagated-inputs
6691 `(("python-numpy" ,python-numpy)
6692 ("python-ply" ,python-ply)))
6693 (home-page "https://github.com/bdcht/grandalf")
6694 (synopsis "Graph and drawing algorithms framework")
6695 (description
6696 "Grandalf is a Python package made for experimentations with graphs
6697 drawing algorithms. It is written in pure Python, and currently implements
6698 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6699 minimization approach. While not as fast or featured as graphviz or other
6700 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6701 than thousands of nodes, while keeping the source code simple enough to tweak
6702 and hack any part of it for experimental purpose. With a total of about 1500
6703 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6704 in less than 600 lines. The energy minimization approach is comprised of only
6705 250 lines!
6706
6707 Grandalf does only 2 not-so-simple things:
6708 @itemize
6709 @item computing the nodes (x,y) coordinates (based on provided nodes
6710 dimensions, and a chosen layout)
6711 @item routing the edges with lines or nurbs
6712 @end itemize
6713
6714 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6715 will help you find where to draw things like nodes and edges, but it’s up to
6716 you to actually draw things with your favorite toolkit.")
6717 ;; The user can choose either license.
6718 (license (list license:gpl2 license:epl1.0))))
6719
6720 (define-public python-gridmap
6721 (package
6722 (name "python-gridmap")
6723 (version "0.14.0")
6724 (source
6725 (origin
6726 (method git-fetch)
6727 (uri (git-reference
6728 (url "https://github.com/pygridtools/gridmap")
6729 (commit (string-append "v" version))))
6730 (file-name (git-file-name name version))
6731 (sha256
6732 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6733 (build-system python-build-system)
6734 (arguments
6735 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6736 (propagated-inputs
6737 `(("python-psutil" ,python-psutil)
6738 ("python-drmaa" ,python-drmaa)
6739 ("python-pyzmq" ,python-pyzmq)))
6740 (home-page "https://github.com/pygridtools/gridmap")
6741 (synopsis "Create jobs on a cluster directly from Python")
6742 (description
6743 "Gridmap is a Python package to allow you to easily create jobs on the
6744 cluster directly from Python. You can directly map Python functions onto the
6745 cluster without needing to write any wrapper code yourself.")
6746 (license license:gpl3+)))
6747
6748 (define-public python2-gridmap
6749 (package-with-python2 python-gridmap))
6750
6751 (define-public python-honcho
6752 (package
6753 (name "python-honcho")
6754 (version "1.0.1")
6755 (source
6756 (origin
6757 (method git-fetch)
6758 (uri (git-reference
6759 (url "https://github.com/nickstenning/honcho")
6760 (commit (string-append "v" version))))
6761 (file-name (git-file-name name version))
6762 (sha256
6763 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6764 (build-system python-build-system)
6765 (native-inputs
6766 `(("python-pytest" ,python-pytest)
6767 ("python-mock" ,python-mock)
6768 ("python-tox" ,python-tox)
6769 ("which" ,which))) ;for tests
6770 (propagated-inputs
6771 `(("python-jinja2" ,python-jinja2)))
6772 (arguments
6773 `(#:phases
6774 (modify-phases %standard-phases
6775 (delete 'check)
6776 (add-after 'install 'check
6777 (lambda* (#:key outputs inputs #:allow-other-keys)
6778 ;; fix honcho path in testsuite
6779 (substitute* "tests/conftest.py"
6780 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6781 "/bin/honcho" "'")))
6782 ;; It's easier to run tests after install.
6783 ;; Make installed package available for running the tests
6784 (add-installed-pythonpath inputs outputs)
6785 (invoke "py.test" "-v"))))))
6786 (home-page "https://github.com/nickstenning/honcho")
6787 (synopsis "Manage Procfile-based applications")
6788 (description
6789 "A Procfile is a file which describes how to run an application
6790 consisting of several processes. honcho starts all listed processes.
6791 The output of all running processes is collected by honcho and
6792 displayed.")
6793 (license license:expat)))
6794
6795 (define-public python-pexpect
6796 (package
6797 (name "python-pexpect")
6798 (version "4.8.0")
6799 (source
6800 (origin
6801 (method url-fetch)
6802 (uri (pypi-uri "pexpect" version))
6803 (sha256
6804 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6805 (build-system python-build-system)
6806 (arguments
6807 `(#:phases
6808 (modify-phases %standard-phases
6809 (add-before 'check 'prepare-tests
6810 (lambda _
6811 (substitute* (find-files "tests")
6812 (("/bin/ls") (which "ls"))
6813 (("/bin/echo") (which "echo"))
6814 (("/bin/which") (which "which"))
6815 ;; Many tests try to use the /bin directory which
6816 ;; is not present in the build environment.
6817 ;; Use one that's non-empty and unlikely to change.
6818 (("/bin'") "/dev'")
6819 ;; Disable failing test. See upstream bug report
6820 ;; https://github.com/pexpect/pexpect/issues/568
6821 (("def test_bash") "def _test_bash"))
6822 ;; XXX: Socket connection test gets "Connection reset by peer".
6823 ;; Why does it not work? Delete for now.
6824 (delete-file "tests/test_socket.py")
6825 #t))
6826 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6827 (native-inputs
6828 `(("python-nose" ,python-nose)
6829 ("python-pytest" ,python-pytest)
6830 ("man-db" ,man-db)
6831 ("which" ,which)
6832 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6833 (propagated-inputs
6834 `(("python-ptyprocess" ,python-ptyprocess)))
6835 (home-page "http://pexpect.readthedocs.org/")
6836 (synopsis "Controlling interactive console applications")
6837 (description
6838 "Pexpect is a pure Python module for spawning child applications;
6839 controlling them; and responding to expected patterns in their output.
6840 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6841 child application and control it as if a human were typing commands.")
6842 (license license:isc)))
6843
6844 (define-public python2-pexpect
6845 (package-with-python2 python-pexpect))
6846
6847 (define-public python-setuptools-scm
6848 (package
6849 (name "python-setuptools-scm")
6850 (version "3.4.3")
6851 (source (origin
6852 (method url-fetch)
6853 (uri (pypi-uri "setuptools_scm" version))
6854 (sha256
6855 (base32
6856 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6857 (build-system python-build-system)
6858 (home-page "https://github.com/pypa/setuptools_scm/")
6859 (synopsis "Manage Python package versions in SCM metadata")
6860 (description
6861 "Setuptools_scm handles managing your Python package versions in
6862 @dfn{software configuration management} (SCM) metadata instead of declaring
6863 them as the version argument or in a SCM managed file.")
6864 (license license:expat)))
6865
6866 ;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
6867 (define-public python-setuptools-scm/next
6868 (package
6869 (inherit python-setuptools-scm)
6870 (version "5.0.1")
6871 (source
6872 (origin
6873 (method url-fetch)
6874 (uri (pypi-uri "setuptools_scm" version))
6875 (sha256
6876 (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
6877
6878 (define-public python2-setuptools-scm
6879 (package-with-python2 python-setuptools-scm))
6880
6881 (define-public python-sexpdata
6882 (package
6883 (name "python-sexpdata")
6884 (version "0.0.3")
6885 (source
6886 (origin
6887 (method url-fetch)
6888 (uri (pypi-uri "sexpdata" version))
6889 (sha256
6890 (base32
6891 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6892 (build-system python-build-system)
6893 (home-page "https://github.com/jd-boyd/sexpdata")
6894 (synopsis "S-expression parser for Python")
6895 (description
6896 "Sexpdata is an S-expression parser/serializer. It has load and dump
6897 functions like pickle, json or PyYAML module.")
6898 (license license:bsd-3)))
6899
6900 (define-public python-pathlib2
6901 (package
6902 (name "python-pathlib2")
6903 (version "2.3.3")
6904 (source
6905 (origin
6906 (method url-fetch)
6907 (uri (pypi-uri "pathlib2" version))
6908 (sha256
6909 (base32
6910 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6911 (build-system python-build-system)
6912 (propagated-inputs
6913 `(("python-scandir" ,python-scandir)
6914 ("python-six" ,python-six)))
6915 (home-page "https://pypi.org/project/pathlib2/")
6916 (synopsis "Object-oriented file system paths")
6917 (description "The goal of pathlib2 is to provide a backport of the
6918 standard @code{pathlib} module which tracks the standard library module, so
6919 all the newest features of the standard @code{pathlib} can be used also on
6920 older Python versions.")
6921 (license license:expat)))
6922
6923 (define-public python-importlib-resources
6924 (package
6925 (name "python-importlib-resources")
6926 (version "3.0.0")
6927 (source
6928 (origin
6929 (method url-fetch)
6930 (uri (pypi-uri "importlib_resources" version))
6931 (sha256
6932 (base32
6933 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6934 (build-system python-build-system)
6935 (native-inputs
6936 `(("python-setuptools-scm" ,python-setuptools-scm)
6937 ("python-toml" ,python-toml)))
6938 (home-page "http://importlib-resources.readthedocs.io/")
6939 (synopsis "Read resources from Python packages")
6940 (description
6941 "@code{importlib_resources} is a backport of Python 3's standard library
6942 @code{importlib.resources} module for Python 2.7, and Python 3.")
6943 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6944 (license license:asl2.0)))
6945
6946 (define-public python2-importlib-resources
6947 (package
6948 (name "python2-importlib-resources")
6949 (version "1.0.2")
6950 (source (origin
6951 (method url-fetch)
6952 (uri (pypi-uri "importlib_resources" version))
6953 (sha256
6954 (base32
6955 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6956 (build-system python-build-system)
6957 (arguments
6958 `(#:python ,python-2
6959 #:phases (modify-phases %standard-phases
6960 ;; The build system tests for python-wheel, but it is
6961 ;; not required for Guix nor the test suite. Just drop
6962 ;; it to make bootstrapping pytest easier.
6963 (add-after 'unpack 'drop-wheel-dependency
6964 (lambda _
6965 (substitute* "setup.cfg"
6966 (("^[[:blank:]]+wheel")
6967 ""))
6968 #t)))))
6969 (propagated-inputs
6970 `(("python-pathlib2" ,python2-pathlib2)
6971 ("python-typing" ,python2-typing)))
6972 (home-page "https://gitlab.com/python-devs/importlib_resources")
6973 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6974 (description
6975 "This package provides an implementation of @code{importlib.resources}
6976 for older versions of Python.")
6977 (license license:asl2.0)))
6978
6979 ;; For importlib-metadata-bootstrap below.
6980 (define-public python2-importlib-resources-bootstrap
6981 (hidden-package
6982 (package/inherit
6983 python2-importlib-resources
6984 (name "python2-importlib-resources-bootstrap")
6985 (propagated-inputs
6986 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6987 ("python-typing" ,python2-typing))))))
6988
6989 (define-public python-importlib-metadata
6990 (package
6991 (name "python-importlib-metadata")
6992 (version "1.5.0")
6993 (source
6994 (origin
6995 (method url-fetch)
6996 (uri (pypi-uri "importlib_metadata" version))
6997 (sha256
6998 (base32
6999 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
7000 (build-system python-build-system)
7001 (propagated-inputs
7002 `(("python-zipp" ,python-zipp)))
7003 (native-inputs
7004 `(("python-setuptools-scm" ,python-setuptools-scm)
7005 ("python-pyfakefs" ,python-pyfakefs)
7006 ("python-packaging" ,python-packaging)))
7007 (home-page "https://importlib-metadata.readthedocs.io/")
7008 (synopsis "Read metadata from Python packages")
7009 (description
7010 "@code{importlib_metadata} is a library which provides an API for
7011 accessing an installed Python package's metadata, such as its entry points or
7012 its top-level name. This functionality intends to replace most uses of
7013 @code{pkg_resources} entry point API and metadata API. Along with
7014 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
7015 need to use the older and less efficient @code{pkg_resources} package.")
7016 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
7017 (license license:asl2.0)))
7018
7019 (define-public python2-importlib-metadata
7020 (let ((base (package-with-python2 (strip-python2-variant
7021 python-importlib-metadata))))
7022 (package/inherit
7023 base
7024 (name "python2-importlib-metadata")
7025 (native-inputs
7026 `(("python-setuptools-scm" ,python2-setuptools-scm)
7027 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
7028 ("python-packaging" ,python2-packaging-bootstrap)))
7029 (propagated-inputs
7030 `(("python-configparser" ,python2-configparser)
7031 ("python-contextlib2" ,python2-contextlib2)
7032 ("python-importlib-resources" ,python2-importlib-resources)
7033 ("python-pathlib2" ,python2-pathlib2)
7034 ,@(package-propagated-inputs base))))))
7035
7036 ;; This package is used by python2-pytest, and thus must not depend on it.
7037 (define-public python2-importlib-metadata-bootstrap
7038 (hidden-package
7039 (package/inherit
7040 python2-importlib-metadata
7041 (name "python2-importlib-metadata-bootstrap")
7042 (arguments
7043 `(#:tests? #f
7044 ,@(package-arguments python2-importlib-metadata)))
7045 (propagated-inputs
7046 `(("python-zipp" ,python2-zipp-bootstrap)
7047 ("python-pathlib2" ,python2-pathlib2-bootstrap)
7048 ("python-configparser" ,python2-configparser)
7049 ("python-contextlib2" ,python2-contextlib2-bootstrap)
7050 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
7051
7052 (define-public python-importmagic
7053 (package
7054 (name "python-importmagic")
7055 (version "0.1.7")
7056 (source
7057 (origin
7058 (method url-fetch)
7059 (uri (pypi-uri "importmagic" version))
7060 (sha256
7061 (base32
7062 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
7063 (build-system python-build-system)
7064 (home-page "https://github.com/alecthomas/importmagic")
7065 (synopsis "Library for adding, removing and managing Python imports")
7066 (description
7067 "Importmagic is a Python library for automatically managing imports by
7068 finding unresolved symbols in Python code and their corresponding imports.")
7069 (license license:bsd-3)))
7070
7071 (define-public python-inotify-simple
7072 (package
7073 (name "python-inotify-simple")
7074 (version "1.3.5")
7075 (source
7076 (origin
7077 (method git-fetch)
7078 (uri (git-reference
7079 (url "https://github.com/chrisjbillington/inotify_simple")
7080 (commit version)))
7081 (file-name (git-file-name name version))
7082 (sha256
7083 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
7084 (build-system python-build-system)
7085 (home-page
7086 "https://github.com/chrisjbillington/inotify_simple")
7087 (synopsis "Simple wrapper around inotify library")
7088 (description
7089 "@code{inotify-simple} is a simple wrapper around inotify library.")
7090 (license license:bsd-3)))
7091
7092 (define-public python-jaraco-packaging
7093 (package
7094 (name "python-jaraco-packaging")
7095 (version "6.1")
7096 (source
7097 (origin
7098 (method url-fetch)
7099 (uri (pypi-uri "jaraco.packaging" version))
7100 (sha256
7101 (base32
7102 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
7103 (build-system python-build-system)
7104 (propagated-inputs
7105 `(("python-pytest" ,python-pytest)
7106 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
7107 ("python-pytest-flake8" ,python-pytest-flake8)
7108 ("python-rst.linker" ,python-rst.linker)
7109 ("python-setuptools" ,python-setuptools)
7110 ("python-setuptools-scm" ,python-setuptools-scm)
7111 ("python-six" ,python-six)
7112 ("python-sphinx" ,python-sphinx)))
7113 (home-page "https://github.com/jaraco/jaraco.packaging")
7114 (synopsis "Tools to supplement packaging Python releases")
7115 (description
7116 "This package provides various tools to supplement packaging Python
7117 releases.")
7118 (license license:expat)))
7119
7120 (define-public python-pathpy
7121 (package
7122 (name "python-pathpy")
7123 (version "11.5.1")
7124 (source
7125 (origin
7126 (method url-fetch)
7127 (uri (pypi-uri "path.py" version))
7128 (sha256
7129 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
7130 (outputs '("out" "doc"))
7131 (build-system python-build-system)
7132 (propagated-inputs
7133 `(("python-appdirs" ,python-appdirs)
7134 ("python-importlib-metadata" ,python-importlib-metadata)))
7135 (native-inputs
7136 `(("python-setuptools-scm" ,python-setuptools-scm)
7137 ("python-sphinx" ,python-sphinx)
7138 ("python-rst.linker" ,python-rst.linker)
7139 ("python-pytest" ,python-pytest)
7140 ("python-pytest-runner" ,python-pytest-runner)
7141 ("python-jaraco-packaging" ,python-jaraco-packaging)))
7142 (arguments
7143 `(#:phases
7144 (modify-phases %standard-phases
7145 (add-after 'build 'build-doc
7146 (lambda _
7147 (setenv "LANG" "en_US.UTF-8")
7148 (invoke "python" "setup.py" "build_sphinx")))
7149 (add-after 'install 'install-doc
7150 (lambda* (#:key outputs #:allow-other-keys)
7151 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7152 (doc (string-append data "/doc/" ,name "-" ,version))
7153 (html (string-append doc "/html")))
7154 (mkdir-p html)
7155 (for-each (lambda (file)
7156 (copy-file file (string-append doc "/" file)))
7157 '("README.rst" "CHANGES.rst"))
7158 (copy-recursively "build/sphinx/html" html)
7159 #t)))
7160 (replace 'check
7161 (lambda _
7162 ;; The import time test aborts if an import takes longer than
7163 ;; 100ms. It may very well take a little longer than that.
7164 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
7165 (home-page "https://github.com/jaraco/path.py")
7166 (synopsis "Python module wrapper for built-in os.path")
7167 (description
7168 "@code{path.py} implements path objects as first-class entities, allowing
7169 common operations on files to be invoked on those path objects directly.")
7170 (license license:expat)))
7171
7172 (define-public python-simplegeneric
7173 (package
7174 (name "python-simplegeneric")
7175 (version "0.8.1")
7176 (source
7177 (origin
7178 (method url-fetch)
7179 (uri (pypi-uri "simplegeneric" version ".zip"))
7180 (sha256
7181 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
7182 (build-system python-build-system)
7183 (native-inputs
7184 `(("unzip" ,unzip)))
7185 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
7186 (synopsis "Python module for simple generic functions")
7187 (description
7188 "The simplegeneric module lets you define simple single-dispatch generic
7189 functions, akin to Python’s built-in generic functions like @code{len()},
7190 @code{iter()} and so on. However, instead of using specially-named methods,
7191 these generic functions use simple lookup tables, akin to those used by
7192 e.g. @code{pickle.dump()} and other generic functions found in the Python
7193 standard library.")
7194 (license license:zpl2.1)))
7195
7196 (define-public python2-simplegeneric
7197 (package-with-python2 python-simplegeneric))
7198
7199 (define-public python-ipython-genutils
7200 ;; TODO: This package is retired, check if can be removed, see description.
7201 (package
7202 (name "python-ipython-genutils")
7203 (version "0.1.0")
7204 (source
7205 (origin
7206 (method url-fetch)
7207 (uri (pypi-uri "ipython_genutils" version))
7208 (sha256
7209 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7210 (build-system python-build-system)
7211 (arguments `(#:tests? #f)) ; no tests
7212 (home-page "https://ipython.org")
7213 (synopsis "Vestigial utilities from IPython")
7214 (description
7215 "This package provides retired utilities from IPython. No packages
7216 outside IPython/Jupyter should depend on it.
7217
7218 This package shouldn't exist. It contains some common utilities shared by
7219 Jupyter and IPython projects during The Big Split. As soon as possible, those
7220 packages will remove their dependency on this, and this package will go
7221 away.")
7222 (license license:bsd-3)))
7223
7224 (define-public python2-ipython-genutils
7225 (package-with-python2 python-ipython-genutils))
7226
7227 (define-public python-ipyparallel
7228 (package
7229 (name "python-ipyparallel")
7230 (version "6.2.4")
7231 (source
7232 (origin
7233 (method url-fetch)
7234 (uri (pypi-uri "ipyparallel" version))
7235 (sha256
7236 (base32
7237 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7238 (build-system python-build-system)
7239 (arguments
7240 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7241 #:phases
7242 (modify-phases %standard-phases
7243 (add-before 'check 'prepare-for-tests
7244 (lambda _
7245 (setenv "HOME" (getcwd))
7246 #t)))))
7247 (propagated-inputs
7248 `(("python-dateutil" ,python-dateutil)
7249 ("python-decorator" ,python-decorator)
7250 ("python-ipykernel" ,python-ipykernel)
7251 ("python-ipython" ,python-ipython)
7252 ("python-ipython-genutils" ,python-ipython-genutils)
7253 ("python-jupyter-client" ,python-jupyter-client)
7254 ("python-pyzmq" ,python-pyzmq)
7255 ("python-tornado" ,python-tornado)
7256 ("python-traitlets" ,python-traitlets)))
7257 (native-inputs
7258 `(("python-ipython" ,python-ipython)
7259 ("python-mock" ,python-mock)
7260 ("python-nose" ,python-nose)
7261 ("python-pytest" ,python-pytest)
7262 ("python-pytest-cov" ,python-pytest-cov)
7263 ("python-testpath" ,python-testpath)))
7264 (home-page "https://ipython.org/")
7265 (synopsis "Interactive Parallel Computing with IPython")
7266 (description
7267 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7268 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7269 CLI scripts:
7270 @enumerate
7271 @item ipcluster - start/stop a cluster
7272 @item ipcontroller - start a scheduler
7273 @item ipengine - start an engine
7274 @end enumerate")
7275 (license license:bsd-3)))
7276
7277 (define-public python-ipython-cluster-helper
7278 (package
7279 (name "python-ipython-cluster-helper")
7280 (version "0.6.4")
7281 (source
7282 (origin
7283 (method url-fetch)
7284 (uri (pypi-uri "ipython-cluster-helper" version))
7285 (sha256
7286 (base32
7287 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
7288 (modules '((guix build utils)))
7289 (snippet
7290 '(begin (substitute* "requirements.txt"
7291 (("ipython.*") "ipython\n"))
7292 #t))))
7293 (build-system python-build-system)
7294 (arguments
7295 `(#:tests? #f ; Test suite can't find IPython.
7296 #:phases
7297 (modify-phases %standard-phases
7298 (replace 'check
7299 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7300 (if tests?
7301 (begin
7302 (setenv "HOME" (getcwd))
7303 (add-installed-pythonpath inputs outputs)
7304 (invoke "python" "example/example.py" "--local"))
7305 #t))))))
7306 (propagated-inputs
7307 `(("python-ipyparallel" ,python-ipyparallel)
7308 ("python-ipython" ,python-ipython)
7309 ("python-netifaces" ,python-netifaces)
7310 ("python-pyzmq" ,python-pyzmq)
7311 ("python-setuptools" ,python-setuptools)
7312 ("python-six" ,python-six)))
7313 (home-page "https://github.com/roryk/ipython-cluster-helper")
7314 (synopsis
7315 "Simplify IPython cluster start up and use for multiple schedulers")
7316 (description
7317 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
7318 profile, launches a cluster and returns a view. On program exit it shuts the
7319 cluster down and deletes the throwaway profile.")
7320 (license license:expat)))
7321
7322 (define-public python2-ipython-cluster-helper
7323 (package-with-python2 python-ipython-cluster-helper))
7324
7325 (define-public python-traitlets
7326 (package
7327 (name "python-traitlets")
7328 (version "4.3.3")
7329 (source
7330 (origin
7331 (method url-fetch)
7332 (uri (pypi-uri "traitlets" version))
7333 (sha256
7334 (base32
7335 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
7336 (build-system python-build-system)
7337 (arguments
7338 `(#:phases
7339 (modify-phases %standard-phases
7340 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
7341 (propagated-inputs
7342 `(("python-ipython-genutils" ,python-ipython-genutils)
7343 ("python-decorator" ,python-decorator)))
7344 (native-inputs
7345 `(("python-pytest" ,python-pytest)))
7346 (properties `((python2-variant . ,(delay python2-traitlets))))
7347 (home-page "https://ipython.org")
7348 (synopsis "Configuration system for Python applications")
7349 (description
7350 "Traitlets is a framework that lets Python classes have attributes with
7351 type checking, dynamically calculated default values, and ‘on change’
7352 callbacks. The package also includes a mechanism to use traitlets for
7353 configuration, loading values from files or from command line arguments. This
7354 is a distinct layer on top of traitlets, so you can use traitlets in your code
7355 without using the configuration machinery.")
7356 (license license:bsd-3)))
7357
7358 (define-public python2-traitlets
7359 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
7360 (package/inherit traitlets
7361 (propagated-inputs
7362 `(("python2-enum34" ,python2-enum34)
7363 ,@(package-propagated-inputs traitlets))))))
7364
7365 (define-public python-jupyter-core
7366 (package
7367 (name "python-jupyter-core")
7368 (version "4.7.1")
7369 (source
7370 (origin
7371 (method url-fetch)
7372 (uri (string-append (pypi-uri "jupyter_core" version)))
7373 (sha256
7374 (base32
7375 "1d12j5hkff0xiax87pnhmzbsph3jqqzhz16h8xld7z2y4armq0kr"))))
7376 (build-system python-build-system)
7377 ;; FIXME: not sure how to run the tests
7378 (arguments `(#:tests? #f))
7379 (propagated-inputs
7380 `(("python-traitlets" ,python-traitlets)))
7381 (home-page "https://jupyter.org/")
7382 (synopsis "Jupyter base package")
7383 (description
7384 "Jupyter core is the base package on which Jupyter projects rely.")
7385 (license license:bsd-3)))
7386
7387 (define-public python-jupyter-client
7388 (package
7389 (name "python-jupyter-client")
7390 (version "6.1.12")
7391 (source
7392 (origin
7393 (method url-fetch)
7394 (uri (pypi-uri "jupyter_client" version))
7395 (sha256
7396 (base32
7397 "10p7fcgvv9hvz9zical9wk68ks5ssak2ykbzx65wm1k1hk8a3g64"))))
7398 (build-system python-build-system)
7399 ;; Tests fail because of missing native python kernel which I assume is
7400 ;; provided by the ipython package, which we cannot use because it would
7401 ;; cause a dependency cycle.
7402 (arguments
7403 `(#:tests? #f
7404 #:phases (modify-phases %standard-phases
7405 (add-after 'unpack 'set-tool-file-names
7406 (lambda* (#:key inputs #:allow-other-keys)
7407 (let ((iproute (assoc-ref inputs "iproute")))
7408 (substitute* "jupyter_client/localinterfaces.py"
7409 (("'ip'")
7410 (string-append "'" iproute "/sbin/ip'")))
7411 #t))))))
7412 (inputs
7413 `(("iproute" ,iproute)))
7414 (propagated-inputs
7415 `(("python-dateutil" ,python-dateutil)
7416 ("python-jupyter-core" ,python-jupyter-core)
7417 ("python-pyzmq" ,python-pyzmq)
7418 ("python-tornado" ,python-tornado-6)
7419 ("python-traitlets" ,python-traitlets)))
7420 (native-inputs
7421 `(("python-pytest" ,python-pytest)))
7422 (home-page "https://jupyter.org/")
7423 (synopsis "Jupyter protocol implementation and client libraries")
7424 (description
7425 "The @code{jupyter_client} package contains the reference implementation
7426 of the Jupyter protocol. It also provides client and kernel management APIs
7427 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7428 installing @code{kernelspec}s for use with Jupyter frontends.")
7429 (license license:bsd-3)))
7430
7431 (define-public python2-jupyter-client
7432 (package-with-python2 python-jupyter-client))
7433
7434 (define-public python-ipykernel
7435 (package
7436 (name "python-ipykernel")
7437 (version "5.5.3")
7438 (source
7439 (origin
7440 (method url-fetch)
7441 (uri (pypi-uri "ipykernel" version))
7442 (sha256
7443 (base32 "02f55cjkp5q64x7ikjxznbxwjpkdmfy237b9kg7dk1pxmzvy90m6"))))
7444 (build-system python-build-system)
7445 (arguments
7446 `(#:phases
7447 (modify-phases %standard-phases
7448 (replace 'check
7449 (lambda _
7450 (setenv "HOME" "/tmp")
7451 (invoke "pytest" "-v")
7452 #t))
7453 (add-after 'install 'set-python-file-name
7454 (lambda* (#:key outputs #:allow-other-keys)
7455 ;; Record the absolute file name of the 'python' executable in
7456 ;; 'kernel.json'.
7457 (let ((out (assoc-ref outputs "out")))
7458 (substitute* (string-append out "/share/jupyter"
7459 "/kernels/python3/kernel.json")
7460 (("\"python\"")
7461 (string-append "\"" (which "python") "\"")))
7462 #t))))))
7463 (propagated-inputs
7464 `(("python-ipython" ,python-ipython)
7465 ;; imported at runtime during connect
7466 ("python-jupyter-client" ,python-jupyter-client)))
7467 (native-inputs
7468 `(("python-flaky" ,python-flaky)
7469 ("python-nose" ,python-nose)
7470 ("python-pytest" ,python-pytest)))
7471 (home-page "https://ipython.org")
7472 (synopsis "IPython Kernel for Jupyter")
7473 (description
7474 "This package provides the IPython kernel for Jupyter.")
7475 (license license:bsd-3)))
7476
7477 (define-public python-pari-jupyter
7478 (package
7479 (name "python-pari-jupyter")
7480 (version "1.3.2")
7481 (source
7482 (origin
7483 (method url-fetch)
7484 (uri (pypi-uri "pari_jupyter" version))
7485 (sha256
7486 (base32
7487 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7488 (build-system python-build-system)
7489 (propagated-inputs
7490 `(("python-ipykernel" ,python-ipykernel)))
7491 (inputs
7492 `(("pari-gp" ,pari-gp)
7493 ("readline" ,readline)))
7494 (arguments
7495 `(#:tests? #f)) ; no test suite
7496 (home-page
7497 "https://github.com/jdemeyer/pari_jupyter")
7498 (synopsis "A Jupyter kernel for PARI/GP")
7499 (description "The package provides a PARI/GP kernel for Jupyter.")
7500 (license license:gpl3+)))
7501
7502 (define-public python-backcall
7503 (package
7504 (name "python-backcall")
7505 (version "0.2.0")
7506 (source
7507 (origin
7508 (method url-fetch)
7509 (uri (pypi-uri "backcall" version))
7510 (sha256
7511 (base32
7512 "07jy4562lvnhkk6kfr3cphmizy88anlhmbwb8kdzlz2ypqkvzgaw"))))
7513 (build-system python-build-system)
7514 (home-page "https://github.com/takluyver/backcall/")
7515 (synopsis "Specifications for callback functions passed in to an API")
7516 (description
7517 "If your code lets other people supply callback functions, it's important
7518 to specify the function signature you expect, and check that functions support
7519 that. Adding extra parameters later would break other peoples code unless
7520 you're careful. The @code{backcall} package provides a way of specifying the
7521 callback signature using a prototype function.")
7522 (license license:bsd-3)))
7523
7524 (define-public python-ipython
7525 (package
7526 (name "python-ipython")
7527 (version "7.9.0")
7528 (source
7529 (origin
7530 (method url-fetch)
7531 (uri (pypi-uri "ipython" version ".tar.gz"))
7532 (sha256
7533 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7534 (build-system python-build-system)
7535 (propagated-inputs
7536 `(("python-backcall" ,python-backcall)
7537 ("python-pyzmq" ,python-pyzmq)
7538 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7539 ("python-terminado" ,python-terminado)
7540 ("python-matplotlib" ,python-matplotlib)
7541 ("python-numpy" ,python-numpy)
7542 ("python-numpydoc" ,python-numpydoc)
7543 ("python-jedi" ,python-jedi)
7544 ("python-jinja2" ,python-jinja2)
7545 ("python-mistune" ,python-mistune)
7546 ("python-pexpect" ,python-pexpect)
7547 ("python-pickleshare" ,python-pickleshare)
7548 ("python-simplegeneric" ,python-simplegeneric)
7549 ("python-jsonschema" ,python-jsonschema)
7550 ("python-traitlets" ,python-traitlets)
7551 ("python-nbformat" ,python-nbformat)
7552 ("python-pygments" ,python-pygments)))
7553 (inputs
7554 `(("readline" ,readline)
7555 ("which" ,which)))
7556 (native-inputs
7557 `(("graphviz" ,graphviz)
7558 ("pkg-config" ,pkg-config)
7559 ("python-requests" ,python-requests) ;; for tests
7560 ("python-testpath" ,python-testpath)
7561 ("python-nose" ,python-nose)))
7562 (arguments
7563 `(#:phases
7564 (modify-phases %standard-phases
7565 (add-after 'unpack 'make-docs-reproducible
7566 (lambda _
7567 (substitute* "IPython/sphinxext/ipython_directive.py"
7568 ((".*import datetime") "")
7569 ((".*datetime.datetime.now\\(\\)") "")
7570 (("%timeit") "# %timeit"))
7571 #t))
7572 ;; Tests can only be run after the library has been installed and not
7573 ;; within the source directory.
7574 (delete 'check)
7575 (add-after 'install 'check
7576 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7577 (if tests?
7578 (begin
7579 ;; Make installed package available for running the tests
7580 (add-installed-pythonpath inputs outputs)
7581 (setenv "HOME" "/tmp/") ;; required by a test
7582 ;; We only test the core because one of the other tests
7583 ;; tries to import ipykernel.
7584 (invoke "python" "IPython/testing/iptest.py"
7585 "-v" "IPython/core/tests"))
7586 #t)))
7587 (add-before 'check 'fix-tests
7588 (lambda* (#:key inputs #:allow-other-keys)
7589 (substitute* "./IPython/utils/_process_posix.py"
7590 (("/usr/bin/env', 'which") (which "which")))
7591 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7592 (("#!/usr/bin/env python")
7593 (string-append "#!" (which "python"))))
7594 ;; This test introduces a circular dependency on ipykernel
7595 ;; (which depends on ipython).
7596 (delete-file "IPython/core/tests/test_display.py")
7597 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7598 (delete-file "IPython/core/tests/test_interactiveshell.py")
7599 #t)))))
7600 (home-page "https://ipython.org")
7601 (synopsis "IPython is a tool for interactive computing in Python")
7602 (description
7603 "IPython provides a rich architecture for interactive computing with:
7604 Powerful interactive shells, a browser-based notebook, support for interactive
7605 data visualization, embeddable interpreters and tools for parallel
7606 computing.")
7607 (properties `((python2-variant . ,(delay python2-ipython))))
7608 (license license:bsd-3)))
7609
7610 ;; This is the latest release of the LTS version of ipython with support for
7611 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7612 ;; dropped support for Python 2.7.
7613 (define-public python2-ipython
7614 (package
7615 (name "python2-ipython")
7616 (version "5.8.0")
7617 (source
7618 (origin
7619 (method url-fetch)
7620 (uri (pypi-uri "ipython" version ".tar.gz"))
7621 (sha256
7622 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7623 (build-system python-build-system)
7624 (propagated-inputs
7625 `(("python2-backports-shutil-get-terminal-size"
7626 ,python2-backports-shutil-get-terminal-size)
7627 ("python2-pathlib2" ,python2-pathlib2)
7628 ("python2-pyzmq" ,python2-pyzmq)
7629 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7630 ("python2-terminado" ,python2-terminado)
7631 ("python2-matplotlib" ,python2-matplotlib)
7632 ("python2-numpy" ,python2-numpy)
7633 ("python2-numpydoc" ,python2-numpydoc)
7634 ("python2-jinja2" ,python2-jinja2)
7635 ("python2-mistune" ,python2-mistune)
7636 ("python2-pexpect" ,python2-pexpect)
7637 ("python2-pickleshare" ,python2-pickleshare)
7638 ("python2-simplegeneric" ,python2-simplegeneric)
7639 ("python2-jsonschema" ,python2-jsonschema)
7640 ("python2-traitlets" ,python2-traitlets)
7641 ("python2-nbformat" ,python2-nbformat)
7642 ("python2-pygments" ,python2-pygments)))
7643 (inputs
7644 `(("readline" ,readline)
7645 ("which" ,which)))
7646 (native-inputs
7647 `(("graphviz" ,graphviz)
7648 ("pkg-config" ,pkg-config)
7649 ("python2-requests" ,python2-requests) ;; for tests
7650 ("python2-testpath" ,python2-testpath)
7651 ("python2-mock" ,python2-mock)
7652 ("python2-nose" ,python2-nose)))
7653 (arguments
7654 `(#:python ,python-2
7655 #:phases
7656 (modify-phases %standard-phases
7657 (add-before 'check 'delete-broken-tests
7658 (lambda* (#:key inputs #:allow-other-keys)
7659 ;; These tests throw errors for unknown reasons.
7660 (delete-file "IPython/core/tests/test_displayhook.py")
7661 (delete-file "IPython/core/tests/test_magic_terminal.py")
7662 (delete-file "IPython/core/tests/test_profile.py")
7663 #t)))))
7664 (home-page "https://ipython.org")
7665 (synopsis "IPython is a tool for interactive computing in Python")
7666 (description
7667 "IPython provides a rich architecture for interactive computing with:
7668 Powerful interactive shells, a browser-based notebook, support for interactive
7669 data visualization, embeddable interpreters and tools for parallel
7670 computing.")
7671 (license license:bsd-3)))
7672
7673 (define-public python-ipython-documentation
7674 (package
7675 (inherit python-ipython)
7676 (name "python-ipython-documentation")
7677 (version (package-version python-ipython))
7678 (arguments
7679 `(#:phases
7680 (modify-phases %standard-phases
7681 (delete 'build)
7682 (delete 'check)
7683 (replace 'install
7684 (lambda* (#:key outputs #:allow-other-keys)
7685 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7686 (doc (string-append data "/doc/" ,name "-" ,version))
7687 (html (string-append doc "/html"))
7688 (man1 (string-append data "/man/man1"))
7689 (info (string-append data "/info"))
7690 (examples (string-append doc "/examples"))
7691 (python-arg (string-append "PYTHON=" (which "python"))))
7692 (setenv "LANG" "en_US.utf8")
7693 (with-directory-excursion "docs"
7694 ;; FIXME: pdf fails to build
7695 ;;(system* "make" "pdf" "PAPER=a4")
7696 (system* "make" python-arg "html")
7697 ;; FIXME: the generated texi file contains ^@^@, which trips
7698 ;; up the parser.
7699 ;; (system* "make" python-arg "info")
7700 )
7701 (copy-recursively "docs/man" man1)
7702 (copy-recursively "examples" examples)
7703 (copy-recursively "docs/build/html" html)
7704 ;; (copy-file "docs/build/latex/ipython.pdf"
7705 ;; (string-append doc "/ipython.pdf"))
7706 (mkdir-p info)
7707 ;; (copy-file "docs/build/texinfo/ipython.info"
7708 ;; (string-append info "/ipython.info"))
7709 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7710 #t)))))
7711 (inputs
7712 `(("python-ipython" ,python-ipython)
7713 ("python-ipykernel" ,python-ipykernel)))
7714 (native-inputs
7715 `(("python-sphinx" ,python-sphinx)
7716 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7717 ;; FIXME: It's possible that a smaller union would work just as well.
7718 ("texlive" ,(texlive-union (list texlive-amsfonts
7719 texlive-fonts-ec
7720 texlive-generic-ifxetex
7721 texlive-generic-pdftex
7722 texlive-latex-capt-of
7723 texlive-latex-cmap
7724 texlive-latex-environ
7725 texlive-latex-eqparbox
7726 texlive-latex-etoolbox
7727 texlive-latex-expdlist
7728 texlive-latex-fancyhdr
7729 texlive-latex-fancyvrb
7730 texlive-latex-fncychap
7731 texlive-latex-float
7732 texlive-latex-framed
7733 texlive-latex-geometry
7734 texlive-latex-graphics
7735 texlive-latex-hyperref
7736 texlive-latex-mdwtools
7737 texlive-latex-multirow
7738 texlive-latex-needspace
7739 texlive-latex-oberdiek
7740 texlive-latex-parskip
7741 texlive-latex-preview
7742 texlive-latex-tabulary
7743 texlive-latex-threeparttable
7744 texlive-latex-titlesec
7745 texlive-latex-trimspaces
7746 texlive-latex-ucs
7747 texlive-latex-upquote
7748 texlive-latex-url
7749 texlive-latex-varwidth
7750 texlive-latex-wrapfig)))
7751 ("texinfo" ,texinfo)))))
7752
7753 (define-public python-urwid
7754 (package
7755 (name "python-urwid")
7756 (version "2.1.2")
7757 (source
7758 (origin
7759 (method url-fetch)
7760 (uri (pypi-uri "urwid" version))
7761 (sha256
7762 (base32
7763 "1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq"))))
7764 (build-system python-build-system)
7765 (home-page "http://urwid.org")
7766 (synopsis "Console user interface library for Python")
7767 (description
7768 "Urwid is a curses-based UI/widget library for Python. It includes many
7769 features useful for text console applications.")
7770 (properties `((python2-variant . ,(delay python2-urwid))))
7771 (license license:lgpl2.1+)))
7772
7773 (define-public python2-urwid
7774 (let ((base (package-with-python2
7775 (strip-python2-variant python-urwid))))
7776 (package/inherit base
7777 (version "2.1.0")
7778 (source
7779 (origin
7780 (method url-fetch)
7781 (uri (pypi-uri "urwid" version))
7782 (sha256
7783 (base32
7784 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8")))))))
7785
7786 (define-public python-urwid-readline
7787 (package
7788 (name "python-urwid-readline")
7789 (version "0.12")
7790 (source
7791 (origin
7792 (method git-fetch)
7793 (uri (git-reference
7794 (url "https://github.com/rr-/urwid_readline")
7795 (commit version)))
7796 (file-name (git-file-name name version))
7797 (sha256
7798 (base32
7799 "0sq5qgxj7gcfww3ww7idr87isnmp0hi36n241b3q395x1zafdv22"))))
7800 (build-system python-build-system)
7801 (arguments
7802 `(#:phases
7803 (modify-phases %standard-phases
7804 (replace 'check
7805 (lambda* (#:key tests? #:allow-other-keys)
7806 (when tests?
7807 (invoke "python" "-m" "pytest"))
7808 #t)))))
7809 (propagated-inputs
7810 `(("python-urwid" ,python-urwid)))
7811 (native-inputs
7812 `(("python-pytest" ,python-pytest)))
7813 (home-page "https://github.com/rr-/urwid_readline")
7814 (synopsis "Text input widget for urwid that supports readline shortcuts")
7815 (description
7816 "This package provides a textbox edit widget for @code{python-urwid} that
7817 supports @code{readline} shortcuts.")
7818 (license license:expat)))
7819
7820 (define-public python-urwidtrees
7821 (package
7822 (name "python-urwidtrees")
7823 (version "1.0.2")
7824 (source
7825 (origin
7826 (method git-fetch)
7827 ;; package author intends on distributing via github rather than pypi:
7828 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7829 (uri (git-reference
7830 (url "https://github.com/pazz/urwidtrees")
7831 (commit version)))
7832 (file-name (git-file-name name version))
7833 (sha256
7834 (base32
7835 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7836 (build-system python-build-system)
7837 (arguments
7838 '(#:use-setuptools? #f
7839 #:tests? #f)) ; no tests
7840 (propagated-inputs `(("python-urwid" ,python-urwid)))
7841 (home-page "https://github.com/pazz/urwidtrees")
7842 (synopsis "Tree widgets for urwid")
7843 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7844 toolkit. Use it to build trees of widgets.")
7845 (license license:gpl3+)))
7846
7847 (define-public python2-urwidtrees
7848 (package-with-python2 python-urwidtrees))
7849
7850 (define-public python-ua-parser
7851 (package
7852 (name "python-ua-parser")
7853 (version "0.8.0")
7854 (source
7855 (origin
7856 (method url-fetch)
7857 (uri (pypi-uri "ua-parser" version))
7858 (sha256
7859 (base32
7860 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7861 (build-system python-build-system)
7862 (arguments
7863 `(#:tests? #f)) ;no test suite in release
7864 (native-inputs
7865 `(("python-pyyaml" ,python-pyyaml)))
7866 (home-page "https://github.com/ua-parser/uap-python")
7867 (synopsis "User agent parser")
7868 (description
7869 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7870 (license license:asl2.0)))
7871
7872 (define-public python2-ua-parser
7873 (package-with-python2 python-ua-parser))
7874
7875 (define-public python-user-agents
7876 (package
7877 (name "python-user-agents")
7878 (version "1.1.0")
7879 (source
7880 (origin
7881 (method url-fetch)
7882 (uri (pypi-uri "user-agents" version))
7883 (sha256
7884 (base32
7885 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7886 (build-system python-build-system)
7887 (arguments
7888 `(#:tests? #f)) ;missing devices.json test file in release
7889 (propagated-inputs
7890 `(("python-ua-parser" ,python-ua-parser)))
7891 (home-page "https://github.com/selwin/python-user-agents")
7892 (synopsis "User Agent strings parsing library")
7893 (description
7894 "A library to identify devices (phones, tablets) and their capabilities by
7895 parsing (browser/HTTP) user agent strings.")
7896 (license license:expat)))
7897
7898 (define-public python2-user-agents
7899 (package-with-python2 python-user-agents))
7900
7901 (define-public python-dbus
7902 (package
7903 (name "python-dbus")
7904 (version "1.2.16")
7905 (source
7906 (origin
7907 (method url-fetch)
7908 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7909 "dbus-python-" version ".tar.gz"))
7910 (sha256
7911 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7912 (build-system gnu-build-system)
7913 (native-inputs
7914 `(("pkg-config" ,pkg-config)))
7915 (inputs
7916 `(("python" ,python-wrapper)
7917 ("dbus-glib" ,dbus-glib)))
7918 (synopsis "Python bindings for D-bus")
7919 (description "python-dbus provides bindings for libdbus, the reference
7920 implementation of D-Bus.")
7921 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7922 (license license:expat)))
7923
7924 (define-public python2-dbus
7925 (package/inherit python-dbus
7926 (name "python2-dbus")
7927 (inputs `(("python" ,python-2)
7928 ,@(alist-delete "python"
7929 (package-inputs python-dbus)
7930 equal?)))))
7931
7932 (define-public python-notify2
7933 (package
7934 (name "python-notify2")
7935 (version "0.3.1")
7936 (source
7937 (origin
7938 (method url-fetch)
7939 (uri (pypi-uri "notify2" version))
7940 (sha256
7941 (base32
7942 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7943 (build-system python-build-system)
7944 (arguments `(#:tests? #f)) ; tests depend on system state
7945 (native-inputs
7946 `(("python-dbus" ,python-dbus)))
7947 (home-page "https://bitbucket.org/takluyver/pynotify2")
7948 (synopsis "Python interface to D-Bus notifications")
7949 (description
7950 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7951 It is a reimplementation of pynotify in pure Python, and an alternative to
7952 the GObject Introspection bindings to libnotify for non-GTK applications.")
7953 (license (list license:bsd-2
7954 license:lgpl2.1+))))
7955
7956 (define-public python2-notify2
7957 (package-with-python2 python-notify2))
7958
7959 ;; beautifulsoup4 has a totally different namespace than 3.x,
7960 ;; and pypi seems to put it under its own name, so I guess we should too
7961 (define-public python-beautifulsoup4
7962 (package
7963 (name "python-beautifulsoup4")
7964 (version "4.9.3")
7965 (source
7966 (origin
7967 (method url-fetch)
7968 (uri (pypi-uri "beautifulsoup4" version))
7969 (sha256
7970 (base32
7971 "09gbd49mwz86k572r1231x2rdp82p42zlnw0bz9b9mfi58r9wwl4"))))
7972 (build-system python-build-system)
7973 (arguments
7974 `(#:phases
7975 (modify-phases %standard-phases
7976 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7977 ;; must use this conversion script when building with Python 3. The
7978 ;; conversion script also runs the tests.
7979 ;; For more information, see the file 'convert-py3k' in the source
7980 ;; distribution.
7981 (replace 'check
7982 (lambda _ (invoke "./convert-py3k"))))))
7983 (propagated-inputs
7984 `(("python-soupsieve" ,python-soupsieve)))
7985 (home-page
7986 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7987 (synopsis
7988 "Python screen-scraping library")
7989 (description
7990 "Beautiful Soup is a Python library designed for rapidly setting up
7991 screen-scraping projects. It offers Pythonic idioms for navigating,
7992 searching, and modifying a parse tree, providing a toolkit for
7993 dissecting a document and extracting what you need. It automatically
7994 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7995 (license license:expat)
7996 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7997
7998 (define-public python2-beautifulsoup4
7999 (let ((base (package-with-python2
8000 (strip-python2-variant python-beautifulsoup4))))
8001 (package/inherit base
8002 (arguments `(#:python ,python-2)))))
8003
8004 (define-public python-soupsieve
8005 (package
8006 (name "python-soupsieve")
8007 (version "2.2.1")
8008 (source
8009 (origin
8010 (method url-fetch)
8011 (uri (pypi-uri "soupsieve" version))
8012 (sha256
8013 (base32
8014 "1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
8015 (build-system python-build-system)
8016 (arguments `(#:tests? #f))
8017 ;;XXX: 2 tests fail currently despite claming they were to be
8018 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
8019 ;;don't want to create a circular dependency.
8020 (home-page "https://github.com/facelessuser/soupsieve")
8021 (synopsis "CSS selector library")
8022 (description
8023 "Soup Sieve is a CSS selector library designed to be used with Beautiful
8024 Soup 4. It aims to provide selecting, matching, and filtering using modern
8025 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
8026 specifications up through the latest CSS level 4 drafts and beyond (though
8027 some are not yet implemented).")
8028 (properties `((python2-variant . ,(delay python2-soupsieve))))
8029 (license license:expat)))
8030
8031 ;; This is the last version that supports python-2
8032 (define-public python2-soupsieve
8033 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
8034 (package
8035 (inherit base)
8036 (version "1.9.6")
8037 (source
8038 (origin
8039 (method url-fetch)
8040 (uri (pypi-uri "soupsieve" version))
8041 (sha256
8042 (base32
8043 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
8044 (propagated-inputs
8045 `(("python2-backports-functools-lru-cache"
8046 ,python2-backports-functools-lru-cache)
8047 ,@(package-propagated-inputs base))))))
8048
8049 (define-public python-netifaces
8050 (package
8051 (name "python-netifaces")
8052 (version "0.10.9")
8053 (source
8054 (origin
8055 (method url-fetch)
8056 (uri (pypi-uri "netifaces" version))
8057 (sha256
8058 (base32
8059 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
8060 (build-system python-build-system)
8061 (home-page "https://github.com/al45tair/netifaces")
8062 (synopsis
8063 "Python module for portable network interface information")
8064 (description
8065 "Netifaces is a Python module providing information on network
8066 interfaces in an easy and portable manner.")
8067 (license license:expat)))
8068
8069 (define-public python2-netifaces
8070 (package-with-python2 python-netifaces))
8071
8072 (define-public python-networkx
8073 (package
8074 (name "python-networkx")
8075 (version "2.5")
8076 (source
8077 (origin
8078 (method url-fetch)
8079 (uri (pypi-uri "networkx" version))
8080 (sha256
8081 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
8082 (build-system python-build-system)
8083 (arguments
8084 '(#:phases (modify-phases %standard-phases
8085 (replace 'check
8086 (lambda* (#:key tests? #:allow-other-keys)
8087 (if tests?
8088 (invoke "pytest" "-vv" "--pyargs" "networkx")
8089 (format #t "test suite not run~%"))
8090 #t)))))
8091 ;; python-decorator is needed at runtime.
8092 (propagated-inputs
8093 `(("python-decorator" ,python-decorator)))
8094 (native-inputs
8095 `(("python-pytest" ,python-pytest)))
8096 (home-page "https://networkx.github.io/")
8097 (synopsis "Python module for creating and manipulating graphs and networks")
8098 (description
8099 "NetworkX is a Python package for the creation, manipulation, and study
8100 of the structure, dynamics, and functions of complex networks.")
8101 (properties `((python2-variant . ,(delay python2-networkx))))
8102 (license license:bsd-3)))
8103
8104 ;; NetworkX 2.2 is the last version with support for Python 2.
8105 (define-public python2-networkx
8106 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
8107 (package
8108 (inherit base)
8109 (version "2.2")
8110 (source (origin
8111 (method url-fetch)
8112 (uri (pypi-uri "networkx" version ".zip"))
8113 (sha256
8114 (base32
8115 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
8116 (arguments
8117 `(#:python ,python-2))
8118 (native-inputs
8119 `(("python-nose" ,python2-nose)
8120 ("unzip" ,unzip))))))
8121
8122 (define-public python-datrie
8123 (package
8124 (name "python-datrie")
8125 (version "0.8.2")
8126 (source
8127 (origin
8128 (method url-fetch)
8129 (uri (pypi-uri "datrie" version))
8130 (sha256
8131 (base32
8132 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
8133 (build-system python-build-system)
8134 (native-inputs
8135 `(("python-cython" ,python-cython)
8136 ("python-hypothesis" ,python-hypothesis)
8137 ("python-pytest" ,python-pytest)
8138 ("python-pytest-runner" ,python-pytest-runner)))
8139 (home-page "https://github.com/kmike/datrie")
8140 (synopsis "Fast, efficiently stored trie for Python")
8141 (description
8142 "This package provides a fast, efficiently stored trie implementation for
8143 Python.")
8144 (license license:lgpl2.1+)))
8145
8146 (define-public python-amply
8147 (package
8148 (name "python-amply")
8149 (version "0.1.4")
8150 (source
8151 (origin
8152 (method url-fetch)
8153 (uri (pypi-uri "amply" version))
8154 (sha256
8155 (base32
8156 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
8157 (build-system python-build-system)
8158 (propagated-inputs
8159 `(("python-docutils" ,python-docutils)
8160 ("python-pyparsing" ,python-pyparsing)))
8161 (native-inputs
8162 `(("python-setuptools-scm" ,python-setuptools-scm)))
8163 (home-page "https://github.com/willu47/amply")
8164 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
8165 (description
8166 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
8167 structures.")
8168 (license license:epl1.0)))
8169
8170 (define-public python-pulp
8171 (package
8172 (name "python-pulp")
8173 (version "2.4")
8174 (source
8175 (origin
8176 (method url-fetch)
8177 (uri (pypi-uri "PuLP" version))
8178 (sha256
8179 (base32
8180 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
8181 (build-system python-build-system)
8182 (propagated-inputs
8183 `(("python-amply" ,python-amply)))
8184 (home-page "https://github.com/coin-or/pulp")
8185 (synopsis "Linear Programming modeler")
8186 (description
8187 "PuLP is a Linear Programming modeler written in Python. PuLP can
8188 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
8189 solve linear problems.")
8190 (license license:expat)))
8191
8192 (define-public python-toposort
8193 (package
8194 (name "python-toposort")
8195 (version "1.6")
8196 (source
8197 (origin
8198 (method url-fetch)
8199 (uri (pypi-uri "toposort" version))
8200 (sha256
8201 (base32
8202 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
8203 (build-system python-build-system)
8204 (home-page "https://gitlab.com/ericvsmith/toposort")
8205 (synopsis "Topological sort algorithm")
8206 (description
8207 "This package provides an implementation of a topological sort
8208 algorithm.")
8209 (license license:asl2.0)))
8210
8211 (define-public snakemake
8212 (package
8213 (name "snakemake")
8214 (version "5.32.2")
8215 (source
8216 (origin
8217 (method url-fetch)
8218 (uri (pypi-uri "snakemake" version))
8219 (sha256
8220 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
8221 (build-system python-build-system)
8222 (arguments
8223 ;; TODO: Package missing test dependencies.
8224 '(#:tests? #f
8225 #:phases
8226 (modify-phases %standard-phases
8227 ;; For cluster execution Snakemake will call Python. Since there is
8228 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
8229 ;; this by calling the snakemake wrapper instead.
8230 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
8231 (lambda* (#:key outputs #:allow-other-keys)
8232 (substitute* "snakemake/executors/__init__.py"
8233 (("\\{sys.executable\\} -m snakemake")
8234 (string-append (assoc-ref outputs "out")
8235 "/bin/snakemake")))
8236 #t)))))
8237 (propagated-inputs
8238 `(("python-appdirs" ,python-appdirs)
8239 ("python-configargparse" ,python-configargparse)
8240 ("python-datrie" ,python-datrie)
8241 ("python-docutils" ,python-docutils)
8242 ("python-gitpython" ,python-gitpython)
8243 ("python-jinja2" ,python-jinja2)
8244 ("python-jsonschema" ,python-jsonschema)
8245 ("python-nbformat" ,python-nbformat)
8246 ("python-networkx" ,python-networkx)
8247 ("python-psutil" ,python-psutil)
8248 ("python-pulp" ,python-pulp)
8249 ("python-pyyaml" ,python-pyyaml)
8250 ("python-ratelimiter" ,python-ratelimiter)
8251 ("python-requests" ,python-requests)
8252 ("python-toposort" ,python-toposort)
8253 ("python-wrapt" ,python-wrapt)))
8254 (home-page "https://snakemake.readthedocs.io")
8255 (synopsis "Python-based execution environment for make-like workflows")
8256 (description
8257 "Snakemake aims to reduce the complexity of creating workflows by
8258 providing a clean and modern domain specific specification language (DSL) in
8259 Python style, together with a fast and comfortable execution environment.")
8260 (license license:expat)))
8261
8262 (define-public python-pyqrcode
8263 (package
8264 (name "python-pyqrcode")
8265 (version "1.2.1")
8266 (source
8267 (origin
8268 (method url-fetch)
8269 (uri (pypi-uri "PyQRCode" version))
8270 (sha256
8271 (base32
8272 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8273 (build-system python-build-system)
8274 (home-page
8275 "https://github.com/mnooner256/pyqrcode")
8276 (synopsis "QR code generator")
8277 (description
8278 "Pyqrcode is a QR code generator written purely in Python with
8279 SVG, EPS, PNG and terminal output.")
8280 (license license:bsd-3)))
8281
8282 (define-public python-seaborn
8283 (package
8284 (name "python-seaborn")
8285 (version "0.10.0")
8286 (source
8287 (origin
8288 (method url-fetch)
8289 (uri (pypi-uri "seaborn" version))
8290 (sha256
8291 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
8292 (build-system python-build-system)
8293 (arguments
8294 `(#:phases
8295 (modify-phases %standard-phases
8296 (add-before 'check 'start-xserver
8297 (lambda* (#:key inputs #:allow-other-keys)
8298 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8299 ;; There must be a running X server and make check doesn't
8300 ;; start one. Therefore we must do it.
8301 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8302 (setenv "DISPLAY" ":1")
8303 #t)))
8304 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
8305 (propagated-inputs
8306 `(("python-pandas" ,python-pandas)
8307 ("python-matplotlib" ,python-matplotlib)
8308 ("python-numpy" ,python-numpy)
8309 ("python-scipy" ,python-scipy)))
8310 (native-inputs
8311 `(("python-pytest" ,python-pytest)
8312 ("xorg-server" ,xorg-server-for-tests)))
8313 (home-page "https://seaborn.pydata.org/")
8314 (synopsis "Statistical data visualization")
8315 (description
8316 "Seaborn is a library for making attractive and informative statistical
8317 graphics in Python. It is built on top of matplotlib and tightly integrated
8318 with the PyData stack, including support for numpy and pandas data structures
8319 and statistical routines from scipy and statsmodels.")
8320 (properties `((python2-variant . ,(delay python2-seaborn))))
8321 (license license:bsd-3)))
8322
8323 ;; 0.9.1 is the last release with support for Python 2.
8324 (define-public python2-seaborn
8325 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8326 (package
8327 (inherit base)
8328 (version "0.9.1")
8329 (source (origin
8330 (method url-fetch)
8331 (uri (pypi-uri "seaborn" version))
8332 (sha256
8333 (base32
8334 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8335
8336 (define-public python-mpmath
8337 (package
8338 (name "python-mpmath")
8339 (version "1.1.0")
8340 (source (origin
8341 (method url-fetch)
8342 (uri (pypi-uri "mpmath" version))
8343 (file-name (git-file-name name version))
8344 (sha256
8345 (base32
8346 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8347 (build-system python-build-system)
8348 (native-inputs
8349 `(("python-pytest" ,python-pytest)))
8350 (arguments
8351 '(#:phases
8352 (modify-phases %standard-phases
8353 (replace 'check
8354 (lambda _
8355 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8356 (home-page "https://mpmath.org")
8357 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8358 (description
8359 "@code{mpmath} can be used as an arbitrary-precision substitute for
8360 Python's float/complex types and math/cmath modules, but also does much
8361 more advanced mathematics.")
8362 (license license:bsd-3)))
8363
8364 (define-public python2-mpmath
8365 (package-with-python2 python-mpmath))
8366
8367 (define-public python-bigfloat
8368 (package
8369 (name "python-bigfloat")
8370 (version "0.3.0")
8371 (source
8372 (origin
8373 (method url-fetch)
8374 (uri (pypi-uri "bigfloat" version))
8375 (sha256
8376 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8377 (build-system python-build-system)
8378 (inputs
8379 `(("mpfr" ,mpfr)))
8380 (home-page "https://github.com/mdickinson/bigfloat")
8381 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8382 (description
8383 "This package provides a Python interface to the MPFR library for
8384 multiprecision arithmetic.")
8385 (license license:lgpl3+)))
8386
8387 (define-public python2-bigfloat
8388 (package-with-python2 python-bigfloat))
8389
8390 (define-public python-sympy
8391 (package
8392 (name "python-sympy")
8393 (version "1.7.1")
8394 (source
8395 (origin
8396 (method url-fetch)
8397 (uri (pypi-uri "sympy" version))
8398 (sha256
8399 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8400 (build-system python-build-system)
8401 (arguments
8402 `(#:phases
8403 (modify-phases %standard-phases
8404 (replace 'check
8405 (lambda* (#:key outputs #:allow-other-keys)
8406 (invoke
8407 (or (which "python3") (which "python"))
8408 "-c" "import sympy; sympy.test(\"/core\")"))))))
8409 (propagated-inputs
8410 `(("python-mpmath" ,python-mpmath)))
8411 (home-page "https://www.sympy.org/")
8412 (synopsis "Python library for symbolic mathematics")
8413 (description
8414 "SymPy is a Python library for symbolic mathematics. It aims to become a
8415 full-featured computer algebra system (CAS) while keeping the code as simple
8416 as possible in order to be comprehensible and easily extensible.")
8417 (license license:bsd-3)))
8418
8419 (define-public python2-sympy
8420 (package
8421 (inherit (package-with-python2 python-sympy))
8422 (version "1.5.1") ; last release for python2
8423 (source
8424 (origin
8425 (method url-fetch)
8426 (uri (pypi-uri "sympy" version))
8427 (sha256
8428 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8429
8430 (define-public python-q
8431 (package
8432 (name "python-q")
8433 (version "2.6")
8434 (source
8435 (origin
8436 (method url-fetch)
8437 (uri (pypi-uri "q" version))
8438 (sha256
8439 (base32
8440 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
8441 (build-system python-build-system)
8442 (home-page "https://github.com/zestyping/q")
8443 (synopsis "Quick-and-dirty debugging output for tired programmers")
8444 (description
8445 "q is a Python module for \"print\" style of debugging Python code. It
8446 provides convenient short API for print out of values, tracebacks, and
8447 falling into the Python interpreter.")
8448 (license license:asl2.0)))
8449
8450 (define-public python2-q
8451 (package-with-python2 python-q))
8452
8453 (define-public python-xlib
8454 (package
8455 (name "python-xlib")
8456 (version "0.29")
8457 (source
8458 (origin
8459 (method git-fetch)
8460 (uri (git-reference
8461 (url "https://github.com/python-xlib/python-xlib")
8462 (commit version)))
8463 (file-name (git-file-name name version))
8464 (sha256
8465 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
8466 (build-system python-build-system)
8467 (arguments
8468 `(#:phases
8469 (modify-phases %standard-phases
8470 (add-before 'check 'start-xserver
8471 (lambda* (#:key inputs #:allow-other-keys)
8472 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8473 ;; There must be a running X server and make check doesn't
8474 ;; start one. Therefore we must do it.
8475 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8476 (setenv "DISPLAY" ":1")
8477 #t))))))
8478 (native-inputs
8479 `(("python-mock" ,python-mock)
8480 ("python-setuptools-scm" ,python-setuptools-scm)
8481 ("xorg-server" ,xorg-server)))
8482 (propagated-inputs
8483 `(("python-six" ,python-six)))
8484 (home-page "https://github.com/python-xlib/python-xlib")
8485 (synopsis "Python X11 client library")
8486 (description
8487 "The Python X Library is intended to be a fully functional
8488 X client library for Python programs. It is useful to implement
8489 low-level X clients. It is written entirely in Python.")
8490 (license license:gpl2+)))
8491
8492 (define-public python2-xlib
8493 (package-with-python2 python-xlib))
8494
8495 (define-public python-singledispatch
8496 (package
8497 (name "python-singledispatch")
8498 (version "3.4.0.3")
8499 (source
8500 (origin
8501 (method url-fetch)
8502 (uri (pypi-uri "singledispatch" version))
8503 (sha256
8504 (base32
8505 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8506 (build-system python-build-system)
8507 (native-inputs
8508 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8509 (home-page
8510 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8511 (synopsis "Backport of singledispatch feature from Python 3.4")
8512 (description
8513 "This library brings functools.singledispatch from Python 3.4 to Python
8514 2.6-3.3.")
8515 (license license:expat)))
8516
8517 (define-public python2-singledispatch
8518 (package-with-python2 python-singledispatch))
8519
8520 ;; the python- version can be removed with python-3.5
8521 (define-public python-backports-abc
8522 (package
8523 (name "python-backports-abc")
8524 (version "0.5")
8525 (source
8526 (origin
8527 (method url-fetch)
8528 (uri (pypi-uri "backports_abc" version))
8529 (sha256
8530 (base32
8531 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
8532 (build-system python-build-system)
8533 (home-page "https://github.com/cython/backports_abc")
8534 (synopsis "Backport of additions to the 'collections.abc' module")
8535 (description
8536 "Python-backports-abc provides a backport of additions to the
8537 @code{collections.abc} module in Python-3.5.")
8538 (license license:psfl)))
8539
8540 (define-public python2-backports-abc
8541 (package-with-python2 python-backports-abc))
8542
8543 (define-public python-backports-csv
8544 (package
8545 (name "python-backports-csv")
8546 (version "1.0.7")
8547 (source
8548 (origin
8549 (method url-fetch)
8550 (uri (pypi-uri "backports.csv" version))
8551 (sha256
8552 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8553 (build-system python-build-system)
8554 (home-page "https://github.com/ryanhiebert/backports.csv")
8555 (synopsis "Backport of Python 3's csv module for Python 2")
8556 (description
8557 "Provides a backport of Python 3's @code{csv} module for parsing
8558 comma separated values. The API of the @code{csv} module in Python 2
8559 is drastically different from the @code{csv} module in Python 3.
8560 This is due, for the most part, to the difference between str in
8561 Python 2 and Python 3.")
8562 (license license:psfl)))
8563
8564 (define-public python2-backports-csv
8565 (package-with-python2 python-backports-csv))
8566
8567 (define-public python2-backports-shutil-get-terminal-size
8568 (package
8569 (name "python2-backports-shutil-get-terminal-size")
8570 (version "1.0.0")
8571 (source
8572 (origin
8573 (method url-fetch)
8574 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8575 (sha256
8576 (base32
8577 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8578 (build-system python-build-system)
8579 (arguments
8580 `(#:python ,python-2
8581 #:phases
8582 (modify-phases %standard-phases
8583 (replace 'check
8584 (lambda _
8585 (setenv "PYTHONPATH" (string-append "./build/lib:"
8586 (getenv "PYTHONPATH")))
8587 (invoke "py.test" "-v"))))))
8588 (native-inputs
8589 `(("python2-pytest" ,python2-pytest)))
8590 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8591 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8592 (description
8593 "This package provides a backport of the @code{get_terminal_size
8594 function} from Python 3.3's @code{shutil}.
8595 Unlike the original version it is written in pure Python rather than C,
8596 so it might be a tiny bit slower.")
8597 (license license:expat)))
8598
8599 (define-public python-waf
8600 (package
8601 (name "python-waf")
8602 (version "2.0.19")
8603 (source (origin
8604 (method url-fetch)
8605 (uri (string-append "https://waf.io/"
8606 "waf-" version ".tar.bz2"))
8607 (sha256
8608 (base32
8609 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8610 (build-system python-build-system)
8611 (arguments
8612 '(#:phases
8613 (modify-phases %standard-phases
8614 (replace 'build
8615 (lambda _
8616 ;; XXX: Find a way to add all extra tools.
8617 (let ((tools '("gccdeps"
8618 "clang_compilation_database")))
8619 (invoke "python" "waf-light" "configure" "build"
8620 (string-append "--tools="
8621 (string-join tools ","))))))
8622 (replace 'check
8623 (lambda _
8624 (invoke "python" "waf" "--version")))
8625 (replace 'install
8626 (lambda* (#:key outputs #:allow-other-keys)
8627 (let ((out (assoc-ref outputs "out")))
8628 (install-file "waf" (string-append out "/bin")))
8629 #t))
8630 ;; waf breaks when it is wrapped.
8631 (delete 'wrap))))
8632 (home-page "https://waf.io/")
8633 (synopsis "Python-based build system")
8634 (description
8635 "Waf is a Python-based framework for configuring, compiling and installing
8636 applications.")
8637 (license license:bsd-3)))
8638
8639 (define-public python2-waf
8640 (package-with-python2 python-waf))
8641
8642 (define-public python-pyzmq
8643 (package
8644 (name "python-pyzmq")
8645 (version "22.0.3")
8646 (source
8647 (origin
8648 (method url-fetch)
8649 (uri (pypi-uri "pyzmq" version))
8650 (sha256
8651 (base32 "0bgrn65cxfz1c1sjrgyq5dy1mkhppxxbizd5wvrl03cq4zhkrxpp"))))
8652 (build-system python-build-system)
8653 (arguments
8654 `(#:configure-flags
8655 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8656 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8657 ;; --inplace' for 'python setup.py test' to work.
8658 #:tests? #f))
8659 (inputs
8660 `(("zeromq" ,zeromq)))
8661 (native-inputs
8662 `(("pkg-config" ,pkg-config)
8663 ("python-nose" ,python-nose)))
8664 (home-page "https://github.com/zeromq/pyzmq")
8665 (synopsis "Python bindings for 0MQ")
8666 (description
8667 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8668 (license license:bsd-4)))
8669
8670 (define-public python2-pyzmq
8671 (package-with-python2 python-pyzmq))
8672
8673 (define-public python-pep8
8674 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8675 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8676 ;; some dependents' test suites, and nothing more.
8677 (package
8678 (name "python-pep8")
8679 (version "1.7.0")
8680 (source
8681 (origin
8682 (method url-fetch)
8683 (uri (pypi-uri "pep8" version))
8684 (sha256
8685 (base32
8686 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8687 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8688 (build-system python-build-system)
8689 (home-page "https://pep8.readthedocs.org/")
8690 (synopsis "Python style guide checker")
8691 (description
8692 "This tools checks Python code against some of the style conventions in
8693 PEP 8.")
8694 (license license:expat)))
8695
8696 (define-public python2-pep8
8697 (package-with-python2 python-pep8))
8698
8699 (define-public python-pep517
8700 (package
8701 (inherit python-pep517-bootstrap)
8702 (name "python-pep517")
8703 (arguments
8704 '(#:phases
8705 (modify-phases %standard-phases
8706 (replace 'check
8707 (lambda* (#:key tests? #:allow-other-keys)
8708 (delete-file "pytest.ini")
8709 ;; This test tries to connect to the internet
8710 (delete-file "tests/test_meta.py")
8711 (if tests?
8712 (invoke "pytest")
8713 #t))))))
8714 (native-inputs
8715 `(("python-mock" ,python-mock)
8716 ("python-pytest" ,python-pytest)
8717 ("python-testpath" ,python-testpath)))
8718 (properties `((python2-variant . ,(delay python2-pep517))))))
8719
8720 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8721 (define-public python2-pep517
8722 (let ((base (package-with-python2
8723 (strip-python2-variant python-pep517))))
8724 (package/inherit base
8725 (name "python2-pep517")
8726 (arguments
8727 `(#:tests? #f
8728 ,@(package-arguments base)))
8729 (native-inputs `()))))
8730
8731 (define-public python-pyflakes
8732 (package
8733 (name "python-pyflakes")
8734 (version "2.3.1")
8735 (source
8736 (origin
8737 (method url-fetch)
8738 (uri (pypi-uri "pyflakes" version))
8739 (sha256
8740 (base32
8741 "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
8742 (build-system python-build-system)
8743 (home-page
8744 "https://github.com/pyflakes/pyflakes")
8745 (synopsis "Passive checker of Python programs")
8746 (description
8747 "Pyflakes statically checks Python source code for common errors.")
8748 (license license:expat)))
8749
8750 (define-public python2-pyflakes
8751 (package-with-python2 python-pyflakes))
8752
8753 (define-public python-mccabe
8754 (package
8755 (name "python-mccabe")
8756 (version "0.6.1")
8757 (source
8758 (origin
8759 (method url-fetch)
8760 (uri (pypi-uri "mccabe" version))
8761 (sha256
8762 (base32
8763 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8764 (build-system python-build-system)
8765 (native-inputs
8766 `(("python-pytest" ,python-pytest-bootstrap)
8767 ("python-pytest-runner" ,python-pytest-runner)))
8768 (home-page "https://github.com/flintwork/mccabe")
8769 (synopsis "McCabe checker, plugin for flake8")
8770 (description
8771 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8772 complexity of Python source code.")
8773 (license license:expat)))
8774
8775 (define-public python2-mccabe
8776 (package-with-python2 python-mccabe))
8777
8778 (define-public python-flake8
8779 (package
8780 (name "python-flake8")
8781 (version "3.9.0")
8782 (source (origin
8783 (method url-fetch)
8784 (uri (pypi-uri "flake8" version))
8785 (sha256
8786 (base32
8787 "1w65iyjnrwipv4dbcqxh725ri7mdx01d6pjyggd97c0j5cvkx1vq"))))
8788 (build-system python-build-system)
8789 (arguments
8790 `(#:phases
8791 (modify-phases %standard-phases
8792 (delete 'check)
8793 (add-after 'install 'check
8794 (lambda* (#:key inputs outputs #:allow-other-keys)
8795 (add-installed-pythonpath inputs outputs)
8796 (invoke "pytest" "-v")
8797 #t)))))
8798 (propagated-inputs
8799 `(("python-pycodestyle" ,python-pycodestyle)
8800 ("python-entrypoints" ,python-entrypoints)
8801 ("python-pyflakes" ,python-pyflakes)
8802 ("python-mccabe" ,python-mccabe)))
8803 (native-inputs
8804 `(("python-mock" ,python-mock)
8805 ("python-pytest" ,python-pytest-bootstrap)))
8806 (home-page "https://gitlab.com/pycqa/flake8")
8807 (synopsis
8808 "The modular source code checker: pep8, pyflakes and co")
8809 (description
8810 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8811 (properties `((python2-variant . ,(delay python2-flake8))))
8812 (license license:expat)))
8813
8814 (define-public python2-flake8
8815 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8816 (package/inherit base
8817 (propagated-inputs
8818 `(("python2-configparser" ,python2-configparser)
8819 ("python2-enum34" ,python2-enum34)
8820 ("python2-functools32" ,python2-functools32)
8821 ("python2-typing" ,python2-typing)
8822 ,@(package-propagated-inputs base))))))
8823
8824 (define-public python-flake8-bugbear
8825 (package
8826 (name "python-flake8-bugbear")
8827 (version "20.1.4")
8828 (source
8829 (origin
8830 (method url-fetch)
8831 (uri (pypi-uri "flake8-bugbear" version))
8832 (sha256
8833 (base32
8834 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8835 (build-system python-build-system)
8836 (arguments
8837 '(#:phases
8838 (modify-phases %standard-phases
8839 (add-before 'check 'disable-test
8840 (lambda _
8841 ;; This test fails on slow computers.
8842 (substitute* "tests/test_bugbear.py"
8843 (("def test_does_not_crash_on_any_valid_code")
8844 "def _test_does_not_crash_on_any_valid_code")))))))
8845 (native-inputs
8846 `(("python-hypothesis" ,python-hypothesis)
8847 ("python-hypothesmith" ,python-hypothesmith)))
8848 (propagated-inputs
8849 `(("python-attrs" ,python-attrs)
8850 ("python-flake8" ,python-flake8)))
8851 (home-page "https://github.com/PyCQA/flake8-bugbear")
8852 (synopsis
8853 "Flake8 plugin for finding likely bugs and design problems in your program")
8854 (description
8855 "This package contains a plugin for Flake8 finding likely bugs and
8856 design problems in your program. It contains warnings that don't belong
8857 in pyflakes and pycodestyle.")
8858 (license license:expat)))
8859
8860 (define-public python-flake8-continuation
8861 (package
8862 (name "python-flake8-continuation")
8863 (version "1.0.5")
8864 (source
8865 (origin
8866 (method url-fetch)
8867 (uri (pypi-uri "flake8-continuation" version))
8868 (sha256
8869 (base32
8870 "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y"))))
8871 (build-system python-build-system)
8872 (propagated-inputs
8873 `(("python-flake8" ,python-flake8)
8874 ("python-pycodestyle" ,python-pycodestyle)
8875 ("python-six" ,python-six)))
8876 (home-page "https://github.com/planetlabs/flake8-continuation")
8877 (synopsis "Flake8 Line Continuation Plugin")
8878 (description "A Flake8 plugin that checks for the line continuation
8879 style to be in the preferred method according to PEP-8, specifically:
8880 @quotation
8881 The preferred way of wrapping long lines is by using Python's implied
8882 line continuation inside parentheses, brackets and braces. Long lines
8883 can be broken over multiple lines by wrapping expressions in parentheses.
8884 These should be used in preference to using a backslash for line continuation.
8885 @end quotation")
8886 (license license:asl2.0)))
8887
8888 (define-public python-flake8-implicit-str-concat
8889 (package
8890 (name "python-flake8-implicit-str-concat")
8891 (version "0.2.0")
8892 (source
8893 (origin
8894 (method url-fetch)
8895 (uri (pypi-uri "flake8_implicit_str_concat" version))
8896 (sha256
8897 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
8898 (build-system python-build-system)
8899 (propagated-inputs
8900 `(("python-attrs" ,python-attrs)
8901 ("python-more-itertools" ,python-more-itertools)))
8902 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
8903 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
8904 (description
8905 "This is a plugin for the Python code checking tool Flake8 to encourage
8906 correct string literal concatenation.
8907
8908 It looks for style problems like implicitly concatenated string literals on
8909 the same line (which can be introduced by the code formating tool Black), or
8910 unnecessary plus operators for explicit string literal concatenation.")
8911 (license license:expat)))
8912
8913 (define-public python-flake8-polyfill
8914 (package
8915 (name "python-flake8-polyfill")
8916 (version "1.0.2")
8917 (source
8918 (origin
8919 (method url-fetch)
8920 (uri (pypi-uri "flake8-polyfill" version))
8921 (sha256
8922 (base32
8923 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8924 (build-system python-build-system)
8925 (arguments
8926 '(#:phases
8927 (modify-phases %standard-phases
8928 (replace 'check
8929 (lambda _
8930 ;; Be compatible with Pytest 4:
8931 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8932 (substitute* "setup.cfg"
8933 (("\\[pytest\\]")
8934 "[tool:pytest]"))
8935
8936 (setenv "PYTHONPATH"
8937 (string-append (getcwd) "/build/lib:"
8938 (getenv "PYTHONPATH")))
8939 (invoke "py.test" "-v"))))))
8940 (native-inputs
8941 `(("python-flake8" ,python-flake8)
8942 ("python-mock" ,python-mock)
8943 ("python-pep8" ,python-pep8)
8944 ("python-pycodestyle" ,python-pycodestyle)
8945 ("python-pytest" ,python-pytest)))
8946 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8947 (synopsis "Polyfill package for Flake8 plugins")
8948 (description
8949 "This package that provides some compatibility helpers for Flake8
8950 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8951 (license license:expat)))
8952
8953 (define-public python2-flake8-polyfill
8954 (package-with-python2 python-flake8-polyfill))
8955
8956 (define-public python-flake8-print
8957 (package
8958 (name "python-flake8-print")
8959 (version "4.0.0")
8960 (source
8961 (origin
8962 (method url-fetch)
8963 (uri (pypi-uri "flake8-print" version))
8964 (sha256
8965 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
8966 (build-system python-build-system)
8967 (propagated-inputs
8968 `(("python-flake8" ,python-flake8)
8969 ("python-pycodestyle" ,python-pycodestyle)
8970 ("python-six" ,python-six)))
8971 (home-page "https://github.com/jbkahn/flake8-print")
8972 (synopsis "Print statement checker plugin for Flake8")
8973 (description
8974 "This plugin for Flake8 checks for @code{print} statements in Python
8975 files.")
8976 (license license:expat)))
8977
8978 (define-public python-flake8-pyi
8979 (package
8980 (name "python-flake8-pyi")
8981 (version "20.5.0")
8982 (source
8983 (origin
8984 (method url-fetch)
8985 (uri (pypi-uri "flake8-pyi" version))
8986 (sha256
8987 (base32
8988 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8989 (build-system python-build-system)
8990 (propagated-inputs
8991 `(("python-attrs" ,python-attrs)
8992 ("python-flake8" ,python-flake8)
8993 ("python-pyflakes" ,python-pyflakes)))
8994 (home-page "https://github.com/ambv/flake8-pyi")
8995 (synopsis
8996 "Flake8 plugin that provides specializations for type hinting stub files")
8997 (description
8998 "This package contains a plugin that provides specializations for
8999 type hinting stub files, especially interesting for linting typeshed. It
9000 adds the @file{.pyi} extension to the default value of the @code{--filename}
9001 command-line argument to Flake8. This means stubs are linted by default with
9002 this plugin enabled, without needing to explicitly list every file. It
9003 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
9004 expressions after the entire file has been read. This enables support for
9005 first-class forward references that stub files use.")
9006 (license license:expat)))
9007
9008 (define-public python-flake8-pie
9009 (package
9010 (name "python-flake8-pie")
9011 (version "0.5.0")
9012 (source
9013 (origin
9014 (method url-fetch)
9015 (uri (pypi-uri "flake8-pie" version))
9016 (sha256
9017 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
9018 (build-system python-build-system)
9019 (home-page "https://github.com/sbdchd/flake8-pie")
9020 (synopsis "Flake8 extension that implements lints")
9021 (description
9022 "This package provides a flake8 extension that implements miscellaneous
9023 lints.")
9024 (license license:bsd-2)))
9025
9026 (define-public python-flake8-quotes
9027 (package
9028 (name "python-flake8-quotes")
9029 (version "3.2.0")
9030 (source
9031 (origin
9032 (method url-fetch)
9033 (uri (pypi-uri "flake8-quotes" version))
9034 (sha256
9035 (base32
9036 "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z"))))
9037 (build-system python-build-system)
9038 (propagated-inputs
9039 `(("python-flake8" ,python-flake8)))
9040 (home-page "https://github.com/zheller/flake8-quotes/")
9041 (synopsis "Flake8 lint for quotes")
9042 (description "This package provides a Flake8 lint for quotes.")
9043 (license license:expat)))
9044
9045 (define-public python-autoflake
9046 (package
9047 (name "python-autoflake")
9048 (version "1.3.1")
9049 (source
9050 (origin
9051 (method url-fetch)
9052 (uri (pypi-uri "autoflake" version))
9053 (sha256
9054 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
9055 (build-system python-build-system)
9056 (propagated-inputs
9057 `(("python-pyflakes" ,python-pyflakes)))
9058 (home-page "https://github.com/myint/autoflake")
9059 (synopsis "Removes unused imports and unused variables")
9060 (description
9061 "@code{autoflake} removes unused imports and unused variables from Python
9062 code as reported by @code{pyflakes}.
9063
9064 By default, it only removes unused imports for modules that are part of the
9065 standard library. Removal of unused variables is also disabled by default.
9066 It also removes useless @code{pass} statements.")
9067 (license license:expat)))
9068
9069 (define-public python-mistune
9070 (package
9071 (name "python-mistune")
9072 (version "0.8.4")
9073 (source
9074 (origin
9075 (method url-fetch)
9076 (uri (pypi-uri "mistune" version))
9077 (sha256
9078 (base32
9079 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
9080 (build-system python-build-system)
9081 (native-inputs
9082 `(("python-nose" ,python-nose)
9083 ("python-cython" ,python-cython)))
9084 (home-page "https://github.com/lepture/mistune")
9085 (synopsis "Markdown parser in pure Python")
9086 (description "This package provides a fast markdown parser in pure
9087 Python.")
9088 (license license:bsd-3)))
9089
9090 (define-public python2-mistune
9091 (package-with-python2 python-mistune))
9092
9093 (define-public python-markdown
9094 (package
9095 (name "python-markdown")
9096 (version "3.3.4")
9097 (source
9098 (origin
9099 (method url-fetch)
9100 (uri (pypi-uri "Markdown" version))
9101 (sha256
9102 (base32
9103 "0jbs73nincha8fkfxx267sfxac6pl0ckszjbqbb8gk4dhs8v9d9i"))))
9104 (build-system python-build-system)
9105 (native-inputs
9106 `(("python-nose" ,python-nose)
9107 ("python-pyyaml" ,python-pyyaml)))
9108 (home-page "https://python-markdown.github.io/")
9109 (synopsis "Python implementation of Markdown")
9110 (description
9111 "This package provides a Python implementation of John Gruber's
9112 Markdown. The library features international input, various Markdown
9113 extensions, and several HTML output formats. A command line wrapper
9114 markdown_py is also provided to convert Markdown files to HTML.")
9115 (properties `((python2-variant . ,(delay python2-markdown))))
9116 (license license:bsd-3)))
9117
9118 ;; Markdown 3.2 dropped support for Python 2.
9119 (define-public python2-markdown
9120 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
9121 (package/inherit
9122 base
9123 (version "3.1.1")
9124 (source (origin
9125 (method url-fetch)
9126 (uri (pypi-uri "Markdown" version))
9127 (sha256
9128 (base32
9129 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
9130
9131 (define-public python-ptyprocess
9132 (package
9133 (name "python-ptyprocess")
9134 (version "0.5.2")
9135 (source
9136 (origin
9137 (method url-fetch)
9138 (uri (pypi-uri "ptyprocess" version))
9139 (sha256
9140 (base32
9141 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
9142 (build-system python-build-system)
9143 (native-inputs
9144 `(("python-nose" ,python-nose)))
9145 (arguments
9146 `(#:phases
9147 (modify-phases %standard-phases
9148 (replace 'check
9149 (lambda _ (invoke "nosetests"))))))
9150 (home-page "https://github.com/pexpect/ptyprocess")
9151 (synopsis "Run a subprocess in a pseudo terminal")
9152 (description
9153 "This package provides a Python library used to launch a subprocess in a
9154 pseudo terminal (pty), and interact with both the process and its pty.")
9155 (license license:isc)))
9156
9157 (define-public python2-ptyprocess
9158 (package-with-python2 python-ptyprocess))
9159
9160 (define-public python-cram
9161 (package
9162 (name "python-cram")
9163 (version "0.7")
9164 (home-page "https://bitheap.org/cram/")
9165 (source (origin
9166 (method url-fetch)
9167 (uri (list (string-append home-page "cram-"
9168 version ".tar.gz")
9169 (pypi-uri "cram" version)))
9170 (sha256
9171 (base32
9172 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
9173 (arguments
9174 '(#:phases
9175 (modify-phases %standard-phases
9176 (add-after 'unpack 'patch-source
9177 (lambda _
9178 (substitute* (find-files "cram" ".*\\.py$")
9179 ;; Replace default shell path.
9180 (("/bin/sh") (which "sh")))
9181 (substitute* (find-files "tests" ".*\\.t$")
9182 (("md5") "md5sum")
9183 (("/bin/bash") (which "bash"))
9184 (("/bin/sh") (which "sh")))
9185 (substitute* "cram/_test.py"
9186 ;; This hack works around a bug triggered by substituting
9187 ;; the /bin/sh paths. "tests/usage.t" compares the output of
9188 ;; "cram -h", which breaks the output at 80 characters. This
9189 ;; causes the line showing the default shell to break into two
9190 ;; lines, but the test expects a single line...
9191 (("env\\['COLUMNS'\\] = '80'")
9192 "env['COLUMNS'] = '160'"))
9193
9194 (substitute* "Makefile"
9195 ;; Recent versions of python-coverage have caused the test
9196 ;; coverage to decrease (as of version 0.7). Allow that.
9197 (("--fail-under=100")
9198 "--fail-under=90"))
9199
9200 #t))
9201 (replace 'check
9202 ;; The test phase uses the built library and executable.
9203 (lambda* (#:key inputs outputs #:allow-other-keys)
9204 (add-installed-pythonpath inputs outputs)
9205 (setenv "PATH" (string-append (getenv "PATH") ":"
9206 (assoc-ref outputs "out") "/bin"))
9207 (invoke "make" "test"))))))
9208 (build-system python-build-system)
9209 (native-inputs
9210 `(("python-coverage" ,python-coverage)
9211 ("which" ,which)))
9212 (synopsis "Simple testing framework for command line applications")
9213 (description
9214 "Cram is a functional testing framework for command line applications.
9215 Cram tests look like snippets of interactive shell sessions. Cram runs each
9216 command and compares the command output in the test with the command’s actual
9217 output.")
9218 (license license:gpl2+)))
9219
9220 (define-public python2-cram
9221 (package-with-python2 python-cram))
9222
9223 (define-public python-crashtest
9224 (package
9225 (name "python-crashtest")
9226 (version "0.3.1")
9227 (source
9228 (origin
9229 (method url-fetch)
9230 (uri (pypi-uri "crashtest" version))
9231 (sha256
9232 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
9233 (build-system python-build-system)
9234 (home-page "https://github.com/sdispater/crashtest")
9235 (synopsis "Manage Python errors with ease")
9236 (description
9237 "Python library that makes exceptions handling and inspection easier.")
9238 (license license:expat)))
9239
9240 (define-public python-straight-plugin
9241 (package
9242 (name "python-straight-plugin")
9243 (version "1.4.1")
9244 (source
9245 (origin
9246 (method url-fetch)
9247 (uri (pypi-uri "straight.plugin" version))
9248 (sha256
9249 (base32
9250 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
9251 (build-system python-build-system)
9252 (home-page "https://github.com/ironfroggy/straight.plugin")
9253 (synopsis "Simple namespaced plugin facility")
9254 (description "Straight Plugin provides a type of plugin you can create from
9255 almost any existing Python modules, and an easy way for outside developers to
9256 add functionality and customization to your projects with their own plugins.")
9257 (license license:expat)))
9258
9259 (define-public python2-straight-plugin
9260 (package-with-python2 python-straight-plugin))
9261
9262 (define-public python-fonttools
9263 (package
9264 (name "python-fonttools")
9265 (version "4.6.0")
9266 (source (origin
9267 (method url-fetch)
9268 (uri (pypi-uri "fonttools" version ".zip"))
9269 (sha256
9270 (base32
9271 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
9272 (build-system python-build-system)
9273 (native-inputs
9274 `(("unzip" ,unzip)
9275 ("python-pytest" ,python-pytest)
9276 ("python-pytest-runner" ,python-pytest-runner)))
9277 (home-page "https://github.com/fonttools/fonttools")
9278 (synopsis "Tools to manipulate font files")
9279 (description
9280 "FontTools/TTX is a library to manipulate font files from Python. It
9281 supports reading and writing of TrueType/OpenType fonts, reading and writing
9282 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
9283 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
9284 from an XML-based format.")
9285 (license license:expat)))
9286
9287 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
9288 (define-public python2-fonttools
9289 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
9290 (package/inherit
9291 base
9292 (version "3.44.0")
9293 (source (origin
9294 (method url-fetch)
9295 (uri (pypi-uri "fonttools" version ".zip"))
9296 (sha256
9297 (base32
9298 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
9299
9300 (define-public python-ly
9301 (package
9302 (name "python-ly")
9303 (version "0.9.5")
9304 (source
9305 (origin
9306 (method url-fetch)
9307 (uri (pypi-uri name version))
9308 (sha256
9309 (base32
9310 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
9311 (build-system python-build-system)
9312 (arguments
9313 ;; FIXME: Some tests need network access.
9314 '(#:tests? #f))
9315 (synopsis "Tool and library for manipulating LilyPond files")
9316 (description "This package provides a Python library to parse, manipulate
9317 or create documents in LilyPond format. A command line program ly is also
9318 provided that can be used to do various manipulations with LilyPond files.")
9319 (home-page "https://pypi.org/project/python-ly/")
9320 (license license:gpl2+)))
9321
9322 (define-public python-appdirs
9323 (package
9324 (name "python-appdirs")
9325 (version "1.4.3")
9326 (source
9327 (origin
9328 (method url-fetch)
9329 (uri (pypi-uri "appdirs" version))
9330 (sha256
9331 (base32
9332 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9333 (build-system python-build-system)
9334 (home-page "https://github.com/ActiveState/appdirs")
9335 (synopsis
9336 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9337 (description
9338 "This module provides a portable way of finding out where user data
9339 should be stored on various operating systems.")
9340 (license license:expat)))
9341
9342 (define-public python2-appdirs
9343 (package-with-python2 python-appdirs))
9344
9345 (define-public python-gorilla
9346 (package
9347 (name "python-gorilla")
9348 (version "0.3.0")
9349 (source (origin
9350 (method url-fetch)
9351 (uri (pypi-uri "gorilla" version))
9352 (sha256
9353 (base32
9354 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9355 (build-system python-build-system)
9356 (home-page "https://github.com/christophercrouzet/gorilla")
9357 (synopsis "Convenient monkey patching with Python")
9358 (description
9359 "Gorilla is a Python library that provides a convenient approach to
9360 monkey patching. Monkey patching is the process of modifying module and
9361 class attributes at runtime with the purpose of replacing or extending
9362 third-party code.")
9363 (license license:expat)))
9364
9365 (define-public python-llfuse
9366 (package
9367 (name "python-llfuse")
9368 (version "1.3.8")
9369 (source (origin
9370 (method url-fetch)
9371 (uri (pypi-uri "llfuse" version))
9372 (sha256
9373 (base32
9374 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9375 (build-system python-build-system)
9376 (inputs
9377 `(("fuse" ,fuse)
9378 ("attr" ,attr)))
9379 (native-inputs
9380 `(("pkg-config" ,pkg-config)))
9381 (synopsis "Python bindings for FUSE")
9382 (description
9383 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9384 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9385 (license license:lgpl2.0+)
9386 (properties `((python2-variant . ,(delay python2-llfuse))))))
9387
9388 (define-public python2-llfuse
9389 (let ((base (package-with-python2
9390 (strip-python2-variant python-llfuse))))
9391 (package/inherit base
9392 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
9393
9394 (define-public python-msgpack
9395 (package
9396 (name "python-msgpack")
9397 (version "1.0.0")
9398 (source (origin
9399 (method url-fetch)
9400 (uri (pypi-uri "msgpack" version))
9401 (sha256
9402 (base32
9403 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
9404 (build-system python-build-system)
9405 (arguments
9406 `(#:modules ((guix build utils)
9407 (guix build python-build-system)
9408 (ice-9 ftw)
9409 (srfi srfi-1)
9410 (srfi srfi-26))
9411 #:phases
9412 (modify-phases %standard-phases
9413 (replace 'check
9414 (lambda _
9415 (let ((cwd (getcwd)))
9416 (setenv "PYTHONPATH"
9417 (string-append cwd "/build/"
9418 (find (cut string-prefix? "lib" <>)
9419 (scandir (string-append cwd "/build")))
9420 ":"
9421 (getenv "PYTHONPATH")))
9422 (invoke "pytest" "-v" "test")))))))
9423 (native-inputs
9424 `(("python-pytest" ,python-pytest)))
9425 (synopsis "MessagePack (de)serializer")
9426 (description "MessagePack is a fast, compact binary serialization format,
9427 suitable for similar data to JSON. This package provides CPython bindings for
9428 reading and writing MessagePack data.")
9429 (home-page "https://pypi.org/project/msgpack/")
9430 (license license:asl2.0)))
9431
9432 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
9433 ;; release 0.5. Some packages like borg still call it by the old name for now.
9434 ;; <https://bugs.gnu.org/30662>
9435 (define-public python-msgpack-transitional
9436 (package
9437 (inherit python-msgpack)
9438 (name "python-msgpack-transitional")
9439 (version "0.5.6")
9440 (source (origin
9441 (method url-fetch)
9442 (uri (pypi-uri "msgpack" version))
9443 (sha256
9444 (base32
9445 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
9446 (arguments
9447 (substitute-keyword-arguments (package-arguments python-msgpack)
9448 ((#:phases phases)
9449 `(modify-phases ,phases
9450 (add-after 'unpack 'configure-transitional
9451 (lambda _
9452 ;; Keep using the old name.
9453 (substitute* "setup.py"
9454 (("TRANSITIONAL = False")
9455 "TRANSITIONAL = 1"))
9456 #t))))))))
9457
9458 (define-public python2-msgpack
9459 (package-with-python2 python-msgpack))
9460
9461 (define-public python-netaddr
9462 (package
9463 (name "python-netaddr")
9464 (version "0.7.19")
9465 (source
9466 (origin
9467 (method url-fetch)
9468 (uri (pypi-uri "netaddr" version))
9469 (sha256
9470 (base32
9471 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
9472 (build-system python-build-system)
9473 (arguments `(#:tests? #f)) ;; No tests.
9474 (home-page "https://github.com/drkjam/netaddr/")
9475 (synopsis "Pythonic manipulation of network addresses")
9476 (description
9477 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
9478 and MAC network addresses.")
9479 (license license:bsd-3)))
9480
9481 (define-public python2-netaddr
9482 (package-with-python2 python-netaddr))
9483
9484 (define-public python2-pyroute2
9485 (package
9486 (name "python2-pyroute2")
9487 (version "0.5.6")
9488 (source
9489 (origin
9490 (method url-fetch)
9491 (uri (pypi-uri "pyroute2" version))
9492 (sha256
9493 (base32
9494 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
9495 (build-system python-build-system)
9496 (arguments
9497 `(#:python ,python-2)) ;Python 3.x is not supported
9498 (home-page "https://github.com/svinota/pyroute2")
9499 (synopsis "Python netlink library")
9500 (description
9501 "Pyroute2 is a pure Python netlink library with minimal dependencies.
9502 Supported netlink families and protocols include:
9503 @itemize
9504 @item rtnl, network settings - addresses, routes, traffic controls
9505 @item nfnetlink - netfilter API: ipset, nftables, ...
9506 @item ipq - simplest userspace packet filtering, iptables QUEUE target
9507 @item devlink - manage and monitor devlink-enabled hardware
9508 @item generic - generic netlink families
9509 @itemize
9510 @item nl80211 - wireless functions API (basic support)
9511 @item taskstats - extended process statistics
9512 @item acpi_events - ACPI events monitoring
9513 @item thermal_events - thermal events monitoring
9514 @item VFS_DQUOT - disk quota events monitoring
9515 @end itemize
9516 @end itemize")
9517 (license license:gpl2+)))
9518
9519 (define-public python-wrapt
9520 (package
9521 (name "python-wrapt")
9522 (version "1.11.2")
9523 (source
9524 (origin
9525 (method url-fetch)
9526 (uri (pypi-uri "wrapt" version))
9527 (sha256
9528 (base32
9529 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
9530 (build-system python-build-system)
9531 (arguments
9532 ;; Tests are not included in the tarball, they are only available in the
9533 ;; git repository.
9534 `(#:tests? #f))
9535 (home-page "https://github.com/GrahamDumpleton/wrapt")
9536 (synopsis "Module for decorators, wrappers and monkey patching")
9537 (description
9538 "The aim of the wrapt module is to provide a transparent object proxy for
9539 Python, which can be used as the basis for the construction of function
9540 wrappers and decorator functions.")
9541 (license license:bsd-2)))
9542
9543 (define-public python2-wrapt
9544 (package-with-python2 python-wrapt))
9545
9546 (define-public python-commonmark
9547 (package
9548 (name "python-commonmark")
9549 (version "0.9.1")
9550 (source
9551 (origin
9552 (method url-fetch)
9553 (uri (pypi-uri "commonmark" version))
9554 (sha256
9555 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
9556 (build-system python-build-system)
9557 (arguments
9558 `(#:phases
9559 (modify-phases %standard-phases
9560 (replace 'check
9561 (lambda* (#:key inputs outputs #:allow-other-keys)
9562 (add-installed-pythonpath inputs outputs)
9563 (invoke "python" "setup.py" "test"))))))
9564 (home-page "https://github.com/readthedocs/commonmark.py")
9565 (synopsis "Python parser for the CommonMark Markdown spec")
9566 (description
9567 "This module is a pure Python port of jgm's @code{commonmark.js}, a
9568 Markdown parser and renderer for the CommonMark specification, using only
9569 native modules.")
9570 (license license:bsd-3)))
9571
9572 (define-public python-xlrd
9573 (package
9574 (name "python-xlrd")
9575 (version "1.2.0")
9576 (source (origin
9577 (method url-fetch)
9578 (uri (pypi-uri "xlrd" version))
9579 (sha256
9580 (base32
9581 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
9582 (build-system python-build-system)
9583 (arguments
9584 `(#:phases
9585 (modify-phases %standard-phases
9586 ;; Some tests depend on writing a temporary file to the user's home
9587 ;; directory.
9588 (add-after 'unpack 'fix-tests
9589 (lambda _
9590 (delete-file "tests/test_open_workbook.py")
9591 #t)))))
9592 (home-page "http://www.python-excel.org/")
9593 (synopsis "Library for extracting data from Excel files")
9594 (description "This package provides a library to extract data from
9595 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
9596 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
9597 Unicode-aware. It is not intended as an end-user tool.")
9598 (license license:bsd-3)))
9599
9600 (define-public python2-xlrd
9601 (package-with-python2 python-xlrd))
9602
9603 (define-public python-immutables
9604 (package
9605 (name "python-immutables")
9606 (version "0.14")
9607 (source
9608 (origin
9609 (method url-fetch)
9610 (uri (pypi-uri "immutables" version))
9611 (sha256
9612 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9613 (build-system python-build-system)
9614 (home-page "https://github.com/MagicStack/immutables")
9615 (synopsis "High-performance immutable mapping type for Python")
9616 (description
9617 "An immutable mapping type for Python. The underlying datastructure is a
9618 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9619 functional languages.")
9620 (license license:asl2.0)))
9621
9622 (define-public python-prettytable
9623 (package
9624 (name "python-prettytable")
9625 (version "0.7.2")
9626 (source
9627 (origin
9628 (method url-fetch)
9629 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9630 (sha256
9631 (base32
9632 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9633 (build-system python-build-system)
9634 (home-page "https://code.google.com/archive/p/prettytable/")
9635 (synopsis "Display tabular data in an ASCII table format")
9636 (description
9637 "A library designed to represent tabular data in visually appealing ASCII
9638 tables. PrettyTable allows for selection of which columns are to be printed,
9639 independent alignment of columns (left or right justified or centred) and
9640 printing of sub-tables by specifying a row range.")
9641 (license license:bsd-3)))
9642
9643 (define-public python2-prettytable
9644 (package-with-python2 python-prettytable))
9645
9646 (define-public python-curio
9647 (package
9648 (name "python-curio")
9649 (version "1.2")
9650 (source
9651 (origin
9652 (method url-fetch)
9653 (uri (pypi-uri "curio" version))
9654 (sha256
9655 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9656 (build-system python-build-system)
9657 (arguments
9658 `(#:phases
9659 (modify-phases %standard-phases
9660 (replace 'check
9661 (lambda* (#:key inputs outputs #:allow-other-keys)
9662 (add-installed-pythonpath inputs outputs)
9663 (invoke "pytest" "-vv" "-k"
9664 ;; Tries to open an outgoing connection.
9665 "not test_ssl_outgoing"))))))
9666 (native-inputs
9667 `(("python-pytest" ,python-pytest)))
9668 (home-page "https://github.com/dabeaz/curio")
9669 (synopsis "Coroutine-based library for concurrent Python")
9670 (description
9671 "Curio is a coroutine-based library for concurrent Python systems
9672 programming. It provides standard programming abstractions such as as
9673 tasks, sockets, files, locks, and queues.")
9674 (license license:bsd-3)))
9675
9676 (define-public python-tables
9677 (package
9678 (name "python-tables")
9679 (version "3.6.1")
9680 (source
9681 (origin
9682 (method url-fetch)
9683 (uri (pypi-uri "tables" version))
9684 (sha256
9685 (base32
9686 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9687 (modules '((guix build utils)))
9688 (snippet
9689 '(begin
9690 ;; Remove pre-compiled .pyc files from source.
9691 (for-each delete-file-recursively
9692 (find-files "." "__pycache__" #:directories? #t))
9693 (for-each delete-file (find-files "." "\\.pyc$"))
9694 #t))))
9695 (build-system python-build-system)
9696 (arguments
9697 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9698 ;; or "check", so we must override the build and check phases.
9699 #:phases
9700 (modify-phases %standard-phases
9701 (add-after 'unpack 'use-gcc
9702 (lambda _
9703 (substitute* "setup.py"
9704 (("^( +)compiler = new_compiler\\(\\)" line indent)
9705 (string-append line
9706 "\n"
9707 indent
9708 "compiler.set_executables(compiler='gcc',"
9709 "compiler_so='gcc',"
9710 "linker_exe='gcc',"
9711 "linker_so='gcc -shared')")))
9712 #t))
9713 (add-after 'unpack 'disable-tuning
9714 (lambda _
9715 (substitute* "setup.py"
9716 (("cpu_flags = .*")
9717 "cpu_flags = ['sse2']\n"))
9718 #t))
9719 (replace 'build
9720 (lambda* (#:key inputs #:allow-other-keys)
9721 (invoke "python" "setup.py" "build"
9722 (string-append "--hdf5="
9723 (assoc-ref inputs "hdf5")))))
9724 (replace 'check
9725 (lambda* (#:key inputs #:allow-other-keys)
9726 (invoke "python" "setup.py" "check"
9727 (string-append "--hdf5="
9728 (assoc-ref inputs "hdf5"))))))))
9729 (propagated-inputs
9730 `(("python-numexpr" ,python-numexpr)
9731 ("python-numpy" ,python-numpy)))
9732 (native-inputs
9733 `(("python-cython" ,python-cython)
9734 ("pkg-config" ,pkg-config)))
9735 (inputs
9736 `(("hdf5" ,hdf5-1.10)
9737 ("bzip2" ,bzip2)
9738 ("zlib" ,zlib)))
9739 (home-page "https://www.pytables.org/")
9740 (synopsis "Hierarchical datasets for Python")
9741 (description "PyTables is a package for managing hierarchical datasets and
9742 designed to efficiently cope with extremely large amounts of data.")
9743 (license license:bsd-3)))
9744
9745 (define-public python-sniffio
9746 (package
9747 (name "python-sniffio")
9748 (version "1.1.0")
9749 (source
9750 (origin
9751 (method url-fetch)
9752 (uri (pypi-uri "sniffio" version))
9753 (sha256
9754 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9755 (build-system python-build-system)
9756 (arguments
9757 `(#:phases
9758 (modify-phases %standard-phases
9759 (replace 'check
9760 (lambda _
9761 (invoke "pytest" "-vv"))))))
9762 (native-inputs
9763 `(("python-curio" ,python-curio)
9764 ("python-pytest" ,python-pytest)
9765 ("python-pytest-cov" ,python-pytest-cov)))
9766 (home-page "https://github.com/python-trio/sniffio")
9767 (synopsis "Detect which async library a program is running under")
9768 (description "This package detects which async library a program is
9769 running under. It supports multiple async I/O packages, like Trio, and
9770 asyncio.")
9771 ;; Either license applies.
9772 (license (list license:expat license:asl2.0))))
9773
9774 (define-public python-pytest-black
9775 (package
9776 (name "python-pytest-black")
9777 (version "0.3.8")
9778 (source
9779 (origin
9780 (method url-fetch)
9781 (uri (pypi-uri "pytest-black" version))
9782 (sha256
9783 (base32
9784 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9785 (build-system python-build-system)
9786 (propagated-inputs
9787 `(("python-pytest" ,python-pytest)
9788 ("python-black" ,python-black)
9789 ("python-toml" ,python-toml)))
9790 (native-inputs
9791 `(("python-setuptools-scm" ,python-setuptools-scm)))
9792 (home-page "https://github.com/shopkeep/pytest-black")
9793 (synopsis "Pytest plugin to enable format checking with black")
9794 (description
9795 "This package provides a pytest plugin to enable format checking with the
9796 Python code formatter \"black\".")
9797 (license license:expat)))
9798
9799 (define-public python-get-version
9800 (package
9801 (name "python-get-version")
9802 (version "2.1")
9803 (source
9804 (origin
9805 (method url-fetch)
9806 (uri (pypi-uri "get_version" version))
9807 (sha256
9808 (base32
9809 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9810 (build-system python-build-system)
9811 (propagated-inputs
9812 `(("python-pygments" ,python-pygments)
9813 ("python-pytest" ,python-pytest)
9814 ("python-pytest-black" ,python-pytest-black)
9815 ("python-pytest-cov" ,python-pytest-cov)
9816 ("python-setuptools" ,python-setuptools)
9817 ("python-testpath" ,python-testpath)))
9818 (home-page "https://github.com/flying-sheep/get_version")
9819 (synopsis "Version helper in the spirit of versioneer")
9820 (description
9821 "This package provides a version helper that lets you automatically use
9822 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9823 also supports getting the version from Python source distributions or, once
9824 your package is installed, via @code{pkg_resources} (part of
9825 @code{setuptools}).")
9826 (license license:gpl3+)))
9827
9828 (define-public python-legacy-api-wrap
9829 (package
9830 (name "python-legacy-api-wrap")
9831 (version "1.2")
9832 (source
9833 (origin
9834 (method url-fetch)
9835 (uri (pypi-uri "legacy-api-wrap" version))
9836 (sha256
9837 (base32
9838 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9839 (build-system python-build-system)
9840 (propagated-inputs
9841 `(("python-get-version" ,python-get-version)
9842 ("python-pytest" ,python-pytest)
9843 ("python-pytest-black" ,python-pytest-black)
9844 ("python-pytest-cov" ,python-pytest-cov)
9845 ("python-setuptools" ,python-setuptools)))
9846 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9847 (synopsis "Legacy API wrapper")
9848 (description "This module defines a decorator to wrap legacy APIs. The
9849 primary use case is APIs defined before keyword-only parameters existed.")
9850 (license license:gpl3+)))
9851
9852 (define-public python-pyasn1
9853 (package
9854 (name "python-pyasn1")
9855 (version "0.4.8")
9856 (source
9857 (origin
9858 (method url-fetch)
9859 (uri (pypi-uri "pyasn1" version))
9860 (sha256
9861 (base32
9862 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9863 (build-system python-build-system)
9864 (home-page "http://pyasn1.sourceforge.net/")
9865 (synopsis "ASN.1 types and codecs")
9866 (description
9867 "This is an implementation of ASN.1 types and codecs in Python. It is
9868 suitable for a wide range of protocols based on the ASN.1 specification.")
9869 (license license:bsd-2)))
9870
9871 (define-public python2-pyasn1
9872 (package-with-python2 python-pyasn1))
9873
9874 (define-public python-pyasn1-modules
9875 (package
9876 (name "python-pyasn1-modules")
9877 (version "0.2.2")
9878 (source
9879 (origin
9880 (method url-fetch)
9881 (uri (pypi-uri "pyasn1-modules" version))
9882 (sha256
9883 (base32
9884 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9885 (build-system python-build-system)
9886 (propagated-inputs
9887 `(("python-pyasn1" ,python-pyasn1)))
9888 (home-page "https://sourceforge.net/projects/pyasn1/")
9889 (synopsis "ASN.1 codec implementations")
9890 (description
9891 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9892 implementations of ASN.1-based codecs and protocols.")
9893 (license license:bsd-3)))
9894
9895 (define-public python2-pyasn1-modules
9896 (package-with-python2 python-pyasn1-modules))
9897
9898 (define-public python-ipaddress
9899 (package
9900 (name "python-ipaddress")
9901 (version "1.0.23")
9902 (source (origin
9903 (method url-fetch)
9904 (uri (pypi-uri "ipaddress" version))
9905 (sha256
9906 (base32
9907 "1qp743h30s04m3cg3yk3fycad930jv17q7dsslj4mfw0jlvf1y5p"))))
9908 (build-system python-build-system)
9909 (home-page "https://github.com/phihag/ipaddress")
9910 (synopsis "IP address manipulation library")
9911 (description
9912 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9913 in Python. This library is used to create, poke at, and manipulate IPv4 and
9914 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9915 module to older versions of Python.")
9916 (license license:psfl)))
9917
9918 (define-public python2-ipaddress
9919 (package-with-python2 python-ipaddress))
9920
9921 (define-public python2-ipaddr
9922 (package
9923 (name "python2-ipaddr")
9924 (version "2.1.11")
9925 (source
9926 (origin
9927 (method url-fetch)
9928 (uri (pypi-uri "ipaddr" version))
9929 (sha256
9930 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9931 (build-system python-build-system)
9932 (arguments
9933 `(#:python ,python-2 ;version 2 only
9934 #:phases
9935 (modify-phases %standard-phases
9936 (replace 'check
9937 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9938 (home-page "https://github.com/google/ipaddr-py")
9939 (synopsis "IP address manipulation library")
9940 (description
9941 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9942 IPv6 addresses and networks.
9943
9944 For new implementations you may prefer to use the standard module
9945 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9946 versions of Python.")
9947 (license license:asl2.0)))
9948
9949 (define-public python-idna
9950 (package
9951 (name "python-idna")
9952 (version "2.10")
9953 (source
9954 (origin
9955 (method url-fetch)
9956 (uri (pypi-uri "idna" version))
9957 (sha256
9958 (base32
9959 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9960 (build-system python-build-system)
9961 (home-page "https://github.com/kjd/idna")
9962 (synopsis "Internationalized domain names in applications")
9963 (description
9964 "This is a library to support the Internationalised Domain Names in
9965 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9966 protocol is often referred to as “IDNA2008” and can produce different results
9967 from the earlier standard from 2003. The library is also intended to act as a
9968 suitable drop-in replacement for the “encodings.idna” module that comes with
9969 the Python standard library but currently only supports the older 2003
9970 specification.")
9971 (license license:bsd-4)))
9972
9973 (define-public python-idna-2.7
9974 (package (inherit python-idna)
9975 (version "2.7")
9976 (source (origin
9977 (method url-fetch)
9978 (uri (pypi-uri "idna" version))
9979 (sha256
9980 (base32
9981 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9982
9983
9984 (define-public python2-idna
9985 (package-with-python2 python-idna))
9986
9987 (define-public python-libsass
9988 (package
9989 (name "python-libsass")
9990 (version "0.20.1")
9991 (source
9992 (origin
9993 ;; PyPI tarball is missing some test files.
9994 (method git-fetch)
9995 (uri (git-reference
9996 (url "https://github.com/sass/libsass-python")
9997 (commit version)))
9998 (file-name (git-file-name name version))
9999 (sha256
10000 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
10001 (build-system python-build-system)
10002 (arguments
10003 `(#:phases
10004 (modify-phases %standard-phases
10005 ;; Use Guix package of libsass instead of compiling from a checkout.
10006 (add-before 'build 'set-libsass
10007 (lambda _
10008 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
10009 #t))
10010 (replace 'check
10011 (lambda* (#:key inputs outputs #:allow-other-keys)
10012 (add-installed-pythonpath inputs outputs)
10013 (invoke "pytest" "sasstests.py"))))))
10014 (native-inputs
10015 `(("python-pytest" ,python-pytest)
10016 ("python-werkzeug" ,python-werkzeug)))
10017 (inputs
10018 `(("libsass" ,libsass)))
10019 (propagated-inputs
10020 `(("python-six" ,python-six)))
10021 (home-page "https://sass.github.io/libsass-python/")
10022 (synopsis "Straightforward binding of libsass for Python")
10023 (description
10024 "This package provides a simple Python extension module @code{sass} which
10025 is binding LibSass.")
10026 (license license:expat)))
10027
10028 (define-public python-idna-ssl
10029 (package
10030 (name "python-idna-ssl")
10031 (version "1.0.1")
10032 (source
10033 (origin
10034 (method url-fetch)
10035 (uri (pypi-uri "idna-ssl" version))
10036 (sha256
10037 (base32
10038 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
10039 (build-system python-build-system)
10040 (arguments
10041 `(#:tests? #f)) ;circular dependency with python-aiohttp
10042 (home-page "https://github.com/aio-libs/idna-ssl")
10043 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
10044 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
10045 domains support.")
10046 (license license:expat)))
10047
10048 (define-public python-pretend
10049 (package
10050 (name "python-pretend")
10051 (version "1.0.9")
10052 (source
10053 (origin
10054 (method url-fetch)
10055 (uri (pypi-uri "pretend" version))
10056 (sha256
10057 (base32
10058 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
10059 (build-system python-build-system)
10060 (home-page "https://github.com/alex/pretend")
10061 (synopsis "Library for stubbing in Python")
10062 (description
10063 "Pretend is a library to make stubbing with Python easier. Stubbing is a
10064 technique for writing tests. You may hear the term mixed up with mocks,
10065 fakes, or doubles. Basically, a stub is an object that returns pre-canned
10066 responses, rather than doing any computation.")
10067 (license license:bsd-3)))
10068
10069 (define-public python2-pretend
10070 (package-with-python2 python-pretend))
10071
10072 (define-public python-pip
10073 (package
10074 (name "python-pip")
10075 (version "20.2.4")
10076 (source
10077 (origin
10078 (method url-fetch)
10079 (uri (pypi-uri "pip" version))
10080 (sha256
10081 (base32
10082 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
10083 (build-system python-build-system)
10084 (arguments
10085 '(#:tests? #f)) ; there are no tests in the pypi archive.
10086 (home-page "https://pip.pypa.io/")
10087 (synopsis "Package manager for Python software")
10088 (description
10089 "Pip is a package manager for Python software, that finds packages on the
10090 Python Package Index (PyPI).")
10091 (license license:expat)))
10092
10093 (define-public python2-pip
10094 (package-with-python2 python-pip))
10095
10096 (define-public python-tlsh
10097 (package
10098 (name "python-tlsh")
10099 (version "3.4.5")
10100 (home-page "https://github.com/trendmicro/tlsh")
10101 (source
10102 (origin
10103 (method git-fetch)
10104 (uri (git-reference
10105 (url "https://github.com/trendmicro/tlsh")
10106 (commit (string-append "v" version))))
10107 (file-name (git-file-name name version))
10108 (sha256
10109 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
10110 (build-system cmake-build-system)
10111 (arguments
10112 '(#:out-of-source? #f
10113 #:phases (modify-phases %standard-phases
10114 (replace
10115 'install
10116 (lambda* (#:key outputs #:allow-other-keys)
10117 ;; Build and install the Python bindings. The underlying
10118 ;; C++ library is apparently not meant to be installed.
10119 (let ((out (assoc-ref outputs "out")))
10120 (with-directory-excursion "py_ext"
10121 (and (system* "python" "setup.py" "build")
10122 (system* "python" "setup.py" "install"
10123 (string-append "--prefix=" out))))))))))
10124 (inputs `(("python" ,python-wrapper))) ;for the bindings
10125 (synopsis "Fuzzy matching library for Python")
10126 (description
10127 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
10128 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
10129 value which can be used for similarity comparisons. Similar objects have
10130 similar hash values, which allows for the detection of similar objects by
10131 comparing their hash values. The byte stream should have a sufficient amount
10132 of complexity; for example, a byte stream of identical bytes will not generate
10133 a hash value.")
10134 (license license:asl2.0)))
10135
10136 (define-public python2-tlsh
10137 (package/inherit python-tlsh
10138 (name "python2-tlsh")
10139 (inputs `(("python" ,python-2)))))
10140
10141 (define-public python-termcolor
10142 (package
10143 (name "python-termcolor")
10144 (version "1.1.0")
10145 (source
10146 (origin
10147 (method url-fetch)
10148 (uri (pypi-uri "termcolor" version))
10149 (sha256
10150 (base32
10151 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
10152 (build-system python-build-system)
10153 (arguments
10154 ;; There are no tests.
10155 `(#:tests? #f))
10156 (home-page "https://pypi.org/project/termcolor/")
10157 (synopsis "ANSII Color formatting for terminal output")
10158 (description
10159 "This package provides ANSII Color formatting for output in terminals.")
10160 (license license:expat)))
10161
10162 (define-public python2-termcolor
10163 (package-with-python2 python-termcolor))
10164
10165 (define-public python-terminaltables
10166 (package
10167 (name "python-terminaltables")
10168 (version "3.1.0")
10169 (source
10170 (origin
10171 (method url-fetch)
10172 (uri (pypi-uri "terminaltables" version))
10173 (sha256
10174 (base32
10175 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
10176 (build-system python-build-system)
10177 (home-page "https://github.com/Robpol86/terminaltables")
10178 (synopsis
10179 "Generate simple tables in terminals from a nested list of strings")
10180 (description
10181 "This package makes it easy to draw tables in terminal/console
10182 applications from a list of lists of strings. It supports multi-line rows.")
10183 (license license:expat)))
10184
10185 (define-public python-libarchive-c
10186 (package
10187 (name "python-libarchive-c")
10188 (version "2.9")
10189 (source (origin
10190 (method url-fetch)
10191 (uri (pypi-uri "libarchive-c" version))
10192 (sha256
10193 (base32
10194 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
10195 (build-system python-build-system)
10196 (arguments
10197 '(#:phases (modify-phases %standard-phases
10198 (add-before
10199 'build 'reference-libarchive
10200 (lambda* (#:key inputs #:allow-other-keys)
10201 ;; Retain the absolute file name of libarchive.so.
10202 (let ((libarchive (assoc-ref inputs "libarchive")))
10203 (substitute* "libarchive/ffi.py"
10204 (("find_library\\('archive'\\)")
10205 (string-append "'" libarchive
10206 "/lib/libarchive.so'"))))))
10207 (replace 'check
10208 (lambda _ (invoke "pytest" "-vv"))))))
10209 (native-inputs
10210 `(("python-mock" ,python-mock)
10211 ("python-pytest" ,python-pytest)))
10212 (inputs
10213 `(("libarchive" ,libarchive)))
10214 (home-page "https://github.com/Changaco/python-libarchive-c")
10215 (synopsis "Python interface to libarchive")
10216 (description
10217 "This package provides Python bindings to libarchive, a C library to
10218 access possibly compressed archives in many different formats. It uses
10219 Python's @code{ctypes} foreign function interface (FFI).")
10220 (license license:lgpl2.0+)))
10221
10222 (define-public python2-libarchive-c
10223 (package-with-python2 python-libarchive-c))
10224
10225 (define-public python-file
10226 (package/inherit file
10227 (name "python-file")
10228 (build-system python-build-system)
10229 (arguments
10230 '(#:tests? #f ;no tests
10231 #:configure-flags '("--single-version-externally-managed" "--root=/")
10232 #:phases (modify-phases %standard-phases
10233 (add-before 'build 'change-directory
10234 (lambda _
10235 (chdir "python")
10236 #t))
10237 (add-before 'build 'set-library-file-name
10238 (lambda* (#:key inputs #:allow-other-keys)
10239 (let ((file (assoc-ref inputs "file")))
10240 (substitute* "magic.py"
10241 (("find_library\\('magic'\\)")
10242 (string-append "'" file "/lib/libmagic.so'")))
10243 #t))))))
10244 (inputs `(("file" ,file)))
10245 (native-inputs (if (%current-target-system)
10246 `(("self" ,this-package))
10247 '()))
10248 (synopsis "Python bindings to the libmagic file type guesser")
10249 (description "This package provides Python bindings to the libmagic file
10250 type guesser.
10251
10252 Note that this module and the @code{python-magic} module both provide a
10253 @file{magic.py} file; these two modules, which are different and were
10254 developed separately, both serve the same purpose: provide Python bindings for
10255 libmagic.")))
10256
10257 (define-public python2-file
10258 (package-with-python2 python-file))
10259
10260 (define-public python-debian
10261 (package
10262 (name "python-debian")
10263 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
10264 (version "0.1.36")
10265 (source
10266 (origin
10267 ;; Use git-fetch, as pypi doesn't include test suite.
10268 (method git-fetch)
10269 (uri (git-reference
10270 (url home-page)
10271 (commit version)))
10272 (file-name (git-file-name name version))
10273 (sha256
10274 (base32
10275 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
10276 (build-system python-build-system)
10277 (arguments
10278 `(#:phases (modify-phases %standard-phases
10279 (add-after 'unpack 'remove-debian-specific-tests
10280 ;; python-apt, apt and dpkg are not yet available in guix,
10281 ;; and these tests heavily depend on them.
10282 (lambda _
10283 (delete-file "lib/debian/tests/test_deb822.py")
10284 (delete-file "lib/debian/tests/test_debfile.py")
10285 #t)))))
10286 (propagated-inputs
10287 `(("python-six" ,python-six)
10288 ("python-chardet" ,python-chardet)))
10289 (synopsis "Debian package related modules")
10290 (description
10291 ;; XXX: Use @enumerate instead of @itemize to work around
10292 ;; <http://bugs.gnu.org/21772>.
10293 "This package provides Python modules that abstract many formats of
10294 Debian-related files, such as:
10295
10296 @enumerate
10297 @item Debtags information;
10298 @item @file{debian/changelog} files;
10299 @item packages files, pdiffs;
10300 @item control files of single or multiple RFC822-style paragraphs---e.g.
10301 @file{debian/control}, @file{.changes}, @file{.dsc};
10302 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
10303 contained files and meta-information.
10304 @end enumerate\n")
10305
10306 ;; Modules are either GPLv2+ or GPLv3+.
10307 (license license:gpl3+)))
10308
10309 (define-public python-nbformat
10310 (package
10311 (name "python-nbformat")
10312 (version "5.1.3")
10313 (source
10314 (origin
10315 (method url-fetch)
10316 (uri (pypi-uri "nbformat" version))
10317 (sha256
10318 (base32
10319 "1j6idwsw59cslsssvlkg2bkfpvd6ri7kghbp14jwcw87sy57h5mm"))))
10320 (build-system python-build-system)
10321 (propagated-inputs
10322 `(("python-ipython-genutils" ,python-ipython-genutils)
10323 ("python-jsonschema" ,python-jsonschema)
10324 ("python-jupyter-core" ,python-jupyter-core)
10325 ("python-traitlets" ,python-traitlets)))
10326 (native-inputs
10327 `(("python-pytest" ,python-pytest)))
10328 (home-page "https://jupyter.org")
10329 (synopsis "Jupyter Notebook format")
10330 (description "This package provides the reference implementation of the
10331 Jupyter Notebook format and Python APIs for working with notebooks.")
10332 (properties `((python2-variant . ,(delay python2-nbformat))))
10333 (license license:bsd-3)))
10334
10335 (define-public python2-nbformat
10336 (let ((parent (package-with-python2
10337 (strip-python2-variant python-nbformat))))
10338 (package
10339 (inherit parent)
10340 (version "4.4.0")
10341 (source
10342 (origin
10343 (method url-fetch)
10344 (uri (pypi-uri "nbformat" version))
10345 (sha256
10346 (base32
10347 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp")))))))
10348
10349 (define-public python-bleach
10350 (package
10351 (name "python-bleach")
10352 (version "3.1.5")
10353 (source
10354 (origin
10355 (method url-fetch)
10356 (uri (pypi-uri "bleach" version))
10357 (sha256
10358 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
10359 (build-system python-build-system)
10360 (propagated-inputs
10361 `(("python-webencodings" ,python-webencodings)
10362 ("python-six" ,python-six)))
10363 (native-inputs
10364 `(("python-datrie" ,python-datrie)
10365 ("python-genshi" ,python-genshi)
10366 ("python-lxml" ,python-lxml)
10367 ("python-pytest" ,python-pytest)))
10368 (home-page "https://github.com/mozilla/bleach")
10369 (synopsis "Whitelist-based HTML-sanitizing tool")
10370 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
10371 (license license:asl2.0)))
10372
10373 (define-public python2-bleach
10374 (package-with-python2 python-bleach))
10375
10376 (define-public python-entrypoints
10377 (package
10378 (name "python-entrypoints")
10379 (version "0.3")
10380 (source
10381 (origin
10382 (method url-fetch)
10383 (uri (pypi-uri "entrypoints" version))
10384 (sha256
10385 (base32
10386 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
10387 (build-system python-build-system)
10388 ;; The package does not come with a setup.py file, so we have to generate
10389 ;; one ourselves.
10390 (arguments
10391 `(#:tests? #f
10392 #:phases
10393 (modify-phases %standard-phases
10394 (add-after 'unpack 'create-setup.py
10395 (lambda _
10396 (call-with-output-file "setup.py"
10397 (lambda (port)
10398 (format port "\
10399 from setuptools import setup
10400 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
10401 " ,version))))))))
10402 (home-page "https://github.com/takluyver/entrypoints")
10403 (synopsis "Discover and load entry points from installed Python packages")
10404 (description "Entry points are a way for Python packages to advertise
10405 objects with some common interface. The most common examples are
10406 @code{console_scripts} entry points, which define shell commands by
10407 identifying a Python function to run. The @code{entrypoints} module contains
10408 functions to find and load entry points.")
10409 (license license:expat)))
10410
10411 (define-public python2-entrypoints
10412 (package-with-python2 python-entrypoints))
10413
10414 (define-public python-epc
10415 (package
10416 (name "python-epc")
10417 (version "0.0.5")
10418 (source
10419 (origin
10420 (method url-fetch)
10421 (uri (pypi-uri "epc" version))
10422 (sha256
10423 (base32
10424 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
10425 (build-system python-build-system)
10426 (propagated-inputs
10427 `(("python-sexpdata" ,python-sexpdata)))
10428 (native-inputs
10429 `(("python-nose" ,python-nose)))
10430 (home-page "https://github.com/tkf/python-epc")
10431 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
10432 (description
10433 "Python-EPC can call elisp functions from Python and Python functions
10434 from elisp.")
10435 (license license:gpl3)))
10436
10437 (define-public python-forex-python
10438 (package
10439 (name "python-forex-python")
10440 (version "1.5")
10441 (source
10442 (origin
10443 (method url-fetch)
10444 (uri (pypi-uri "forex-python" version))
10445 (sha256
10446 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
10447 (build-system python-build-system)
10448 (arguments
10449 ;; Tests are not included in the PyPI tarball. Also, the tests in the
10450 ;; repository require online data.
10451 `(#:tests? #f))
10452 (propagated-inputs
10453 `(("python-requests" ,python-requests)
10454 ("python-simplejson" ,python-simplejson)))
10455 (home-page "https://github.com/MicroPyramid/forex-python")
10456 (synopsis "Foreign exchange rates and currency conversion")
10457 (description
10458 "@code{python-forex-python} can be used to manipulate foreign
10459 exchange rates and to operate currency conversions.
10460
10461 Features:
10462 @itemize
10463 @item List all currency rates.
10464 @item BitCoin price for all currencies.
10465 @item Converting amount to BitCoins.
10466 @item Get historical rates for any day since 1999.
10467 @item Conversion rate for one currency(ex; USD to INR).
10468 @item Convert amount from one currency to other.('USD 10$' to INR).
10469 @item Currency symbols.
10470 @item Currency names.
10471 @end itemize")
10472 (license license:expat)))
10473
10474 (define-public python-simpleeval
10475 (package
10476 (name "python-simpleeval")
10477 (version "0.9.10")
10478 (source
10479 (origin
10480 (method url-fetch)
10481 (uri (pypi-uri "simpleeval" version))
10482 (sha256
10483 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
10484 (build-system python-build-system)
10485 (home-page "https://github.com/danthedeckie/simpleeval")
10486 (synopsis "Simple, safe single expression evaluator library")
10487 (description
10488 "This package provides a quick single file library for easily adding
10489 evaluatable expressions into python projects. Say you want to allow a user
10490 to set an alarm volume, which could depend on the time of day, alarm level,
10491 how many previous alarms had gone off, and if there is music playing at the
10492 time.")
10493 (license license:expat)))
10494
10495 (define-public python-nbconvert
10496 (package
10497 (name "python-nbconvert")
10498 (version "6.0.7")
10499 (source
10500 (origin
10501 (method url-fetch)
10502 (uri (pypi-uri "nbconvert" version))
10503 (sha256
10504 (base32
10505 "00lhqaxn481qvk2w5568asqlsnvrw2fm61p1vssx3m7vdnl17g6b"))))
10506 (build-system python-build-system)
10507 (arguments
10508 `(#:phases
10509 (modify-phases %standard-phases
10510 (replace 'check
10511 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10512 (when tests?
10513 (add-installed-pythonpath inputs outputs)
10514
10515 ;; This seems to require Chromium.
10516 (delete-file "nbconvert/exporters/tests/test_webpdf.py")
10517
10518 ;; This depends on the python3 kernel, which is provided by a
10519 ;; package that depends on nbconvert.
10520 (delete-file "nbconvert/preprocessors/tests/test_execute.py")
10521
10522 ;; Most of these tests fail because nbconvert fails to execute
10523 ;; itself.
10524 (delete-file "nbconvert/tests/test_nbconvertapp.py")
10525
10526 ;; One test here fails with an unclear error. It looks like
10527 ;; "%%pylabprint" is supposed to be expanded to some other
10528 ;; code, but isn't.
10529 (delete-file "nbconvert/filters/tests/test_strings.py")
10530
10531 ;; Some tests need HOME
10532 (setenv "HOME" "/tmp")
10533 (invoke "pytest")))))))
10534 (native-inputs
10535 `(("python-pytest" ,python-pytest)))
10536 (propagated-inputs
10537 `(("python-bleach" ,python-bleach)
10538 ("python-defusedxml" ,python-defusedxml)
10539 ("python-entrypoints" ,python-entrypoints)
10540 ("python-jinja2" ,python-jinja2)
10541 ("python-jupyter-core" ,python-jupyter-core)
10542 ("python-mistune" ,python-mistune)
10543 ("python-nbclient" ,python-nbclient)
10544 ("python-nbformat" ,python-nbformat)
10545 ("python-pandocfilters" ,python-pandocfilters)
10546 ("python-pygments" ,python-pygments)
10547 ("python-jupyterlab-pygments" ,python-jupyterlab-pygments)
10548 ("python-testpath" ,python-testpath)
10549 ("python-traitlets" ,python-traitlets)))
10550 (home-page "https://jupyter.org")
10551 (synopsis "Converting Jupyter Notebooks")
10552 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
10553 notebooks to various other formats via Jinja templates. It allows you to
10554 convert an @code{.ipynb} notebook file into various static formats including:
10555
10556 @enumerate
10557 @item HTML
10558 @item LaTeX
10559 @item PDF
10560 @item Reveal JS
10561 @item Markdown (md)
10562 @item ReStructured Text (rst)
10563 @item executable script
10564 @end enumerate\n")
10565 (license license:bsd-3)
10566 (properties `((python2-variant . ,(delay python2-nbconvert))))))
10567
10568 (define-public python2-nbconvert
10569 (let ((parent
10570 (package-with-python2
10571 (strip-python2-variant python-nbconvert))))
10572 (package
10573 (inherit parent)
10574 (version "5.0.0b1")
10575 (source
10576 (origin
10577 (method url-fetch)
10578 (uri (pypi-uri "nbconvert" version))
10579 (sha256
10580 (base32
10581 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
10582 (arguments
10583 `(;; The "bdist_egg" target is disabled by default, causing the installation
10584 ;; to fail.
10585 #:configure-flags (list "bdist_egg")
10586 ;; FIXME: 5 failures, 40 errors.
10587 #:tests? #f))
10588 (propagated-inputs
10589 `(("python-bleach" ,python-bleach)
10590 ("python-entrypoints" ,python-entrypoints)
10591 ("python-jinja2" ,python-jinja2)
10592 ("python-jupyter-core" ,python-jupyter-core)
10593 ("python-mistune" ,python-mistune)
10594 ("python-nbformat" ,python-nbformat)
10595 ("python-pygments" ,python-pygments)
10596 ("python-traitlets" ,python-traitlets))))))
10597
10598 (define-public python-notebook
10599 (package
10600 (name "python-notebook")
10601 (version "6.3.0")
10602 (source (origin
10603 (method url-fetch)
10604 (uri (pypi-uri "notebook" version))
10605 (sha256
10606 (base32
10607 "0zfwr87ndjzmdp9adpc9lby1hdqdkjp2q7c9vff3wiw1dj6kkjfb"))))
10608 (build-system python-build-system)
10609 (arguments
10610 `(#:phases
10611 (modify-phases %standard-phases
10612 (replace 'check
10613 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10614 ;; These tests require a browser
10615 (delete-file-recursively "notebook/tests/selenium")
10616 (when tests?
10617 (add-installed-pythonpath inputs outputs)
10618 ;; Some tests need HOME
10619 (setenv "HOME" "/tmp")
10620 (with-directory-excursion "/tmp"
10621 (invoke "pytest" "-vv"
10622 ;; TODO: This tests fails because nbconvert does not
10623 ;; list "python" as a format.
10624 "-k" "not test_list_formats"))))))))
10625 (propagated-inputs
10626 `(("python-argon2-cffi" ,python-argon2-cffi)
10627 ("python-ipykernel" ,python-ipykernel)
10628 ("python-ipython-genutils" ,python-ipython-genutils)
10629 ("python-jinja2" ,python-jinja2)
10630 ("python-jupyter-client" ,python-jupyter-client)
10631 ("python-jupyter-core" ,python-jupyter-core)
10632 ("python-nbconvert" ,python-nbconvert)
10633 ("python-nbformat" ,python-nbformat)
10634 ("python-prometheus-client" ,python-prometheus-client)
10635 ("python-pyzmq" ,python-pyzmq)
10636 ("python-send2trash" ,python-send2trash)
10637 ("python-terminado" ,python-terminado)
10638 ("python-tornado" ,python-tornado-6)
10639 ("python-traitlets" ,python-traitlets)))
10640 (native-inputs
10641 `(("python-coverage" ,python-coverage)
10642 ("python-nbval" ,python-nbval)
10643 ("python-pytest" ,python-pytest)
10644 ("python-pytest-cov" ,python-pytest-cov)
10645 ("python-requests" ,python-requests)
10646 ("python-requests-unixsocket" ,python-requests-unixsocket)))
10647 (home-page "https://jupyter.org/")
10648 (synopsis "Web-based notebook environment for interactive computing")
10649 (description
10650 "The Jupyter HTML notebook is a web-based notebook environment for
10651 interactive computing.")
10652 (properties `((python2-variant . ,(delay python2-notebook))))
10653 (license license:bsd-3)))
10654
10655 (define-public python2-notebook
10656 (let ((base (package-with-python2
10657 (strip-python2-variant python-notebook))))
10658 (package/inherit base
10659 (native-inputs
10660 `(("python2-mock" ,python2-mock)
10661 ,@(package-native-inputs base)))
10662 (arguments
10663 (substitute-keyword-arguments (package-arguments base)
10664 ((#:phases phases)
10665 `(modify-phases ,phases
10666 (add-before 'check 'disable-test-case
10667 ;; The test requires network access to localhost. Curiously it
10668 ;; fails with Python 2 only. Simply make the test-case return
10669 ;; immediately.
10670 (lambda _
10671 (substitute*
10672 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
10673 (("formats = self.nbconvert_api") "return #")))))))))))
10674
10675 (define-public python-widgetsnbextension
10676 (package
10677 (name "python-widgetsnbextension")
10678 (version "3.5.1")
10679 (source
10680 (origin
10681 (method url-fetch)
10682 (uri (pypi-uri "widgetsnbextension" version))
10683 (sha256
10684 (base32
10685 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10686 (build-system python-build-system)
10687 (propagated-inputs
10688 `(("python-notebook" ,python-notebook)))
10689 (home-page "https://ipython.org")
10690 (synopsis "IPython HTML widgets for Jupyter")
10691 (description "This package provides interactive HTML widgets for Jupyter
10692 notebooks.")
10693 (license license:bsd-3)))
10694
10695 (define-public python-ipywidgets
10696 (package
10697 (name "python-ipywidgets")
10698 (version "7.6.3")
10699 (source
10700 (origin
10701 (method url-fetch)
10702 (uri (pypi-uri "ipywidgets" version))
10703 (sha256
10704 (base32
10705 "1w217j8i53x14l7b05fk300k222zs9vkcjaa1rbrw3sk43k466lz"))))
10706 (build-system python-build-system)
10707 (propagated-inputs
10708 `(("python-ipykernel" ,python-ipykernel)
10709 ("python-ipython" ,python-ipython)
10710 ("python-jupyterlab-widgets" ,python-jupyterlab-widgets)
10711 ("python-nbformat" ,python-nbformat)
10712 ("python-traitlets" ,python-traitlets)
10713 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10714 (native-inputs
10715 `(("python-mock" ,python-mock)
10716 ("python-pytest" ,python-pytest)
10717 ("python-pytest-cov" ,python-pytest-cov)))
10718 (home-page "https://ipython.org")
10719 (synopsis "IPython HTML widgets for Jupyter")
10720 (description "Ipywidgets are interactive HTML widgets for Jupyter
10721 notebooks and the IPython kernel. Notebooks come alive when interactive
10722 widgets are used. Users gain control of their data and can visualize changes
10723 in the data.")
10724 (license license:bsd-3)))
10725
10726 (define-public python-jupyter-console
10727 (package
10728 (name "python-jupyter-console")
10729 (version "6.1.0")
10730 (source
10731 (origin
10732 (method url-fetch)
10733 (uri (pypi-uri "jupyter_console" version))
10734 (sha256
10735 (base32
10736 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10737 (build-system python-build-system)
10738 (propagated-inputs
10739 `(("python-ipykernel" ,python-ipykernel)
10740 ("python-jupyter-client" ,python-jupyter-client)
10741 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10742 ("python-pygments" ,python-pygments)))
10743 (native-inputs
10744 `(("python-nose" ,python-nose)))
10745 (home-page "https://jupyter.org")
10746 (synopsis "Jupyter terminal console")
10747 (description "This package provides a terminal-based console frontend for
10748 Jupyter kernels. It also allows for console-based interaction with non-Python
10749 Jupyter kernels such as IJulia and IRKernel.")
10750 (license license:bsd-3)))
10751
10752 ;; The python-ipython and python-jupyter-console require each other. To get
10753 ;; the functionality in both packages working, strip down the
10754 ;; python-jupyter-console package when using it as an input to python-ipython.
10755 (define python-jupyter-console-minimal
10756 (package/inherit python-jupyter-console
10757 (name "python-jupyter-console-minimal")
10758 (arguments
10759 (substitute-keyword-arguments
10760 (package-arguments python-jupyter-console)
10761 ((#:phases phases)
10762 `(modify-phases ,phases
10763 (add-after 'install 'delete-bin
10764 (lambda* (#:key outputs #:allow-other-keys)
10765 ;; Delete the bin files, to avoid conflicts in profiles
10766 ;; where python-ipython and python-jupyter-console are
10767 ;; both present.
10768 (delete-file-recursively
10769 (string-append
10770 (assoc-ref outputs "out") "/bin"))))))))
10771 ;; Remove the python-ipython propagated input, to avoid the cycle
10772 (propagated-inputs
10773 (alist-delete
10774 "python-ipython"
10775 (package-propagated-inputs python-jupyter-console)))))
10776
10777 (define-public python-qtconsole
10778 (package
10779 (name "python-qtconsole")
10780 (version "4.4.3")
10781 (source
10782 (origin
10783 (method url-fetch)
10784 (uri (pypi-uri "qtconsole" version))
10785 (sha256
10786 (base32
10787 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10788 (build-system python-build-system)
10789 (arguments
10790 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10791 ;; but we only have the LTS version 5.x. This means that there might be
10792 ;; runtime errors, but since this is a dependency of the Jupyter package,
10793 ;; and Jupyter can be used without the qtconsole we can overlook this for
10794 ;; now.
10795 `(#:tests? #f
10796 #:phases
10797 (modify-phases %standard-phases
10798 (add-before 'check 'pre-check
10799 (lambda _
10800 (setenv "QT_QPA_PLATFORM" "offscreen")
10801 #t)))))
10802 (propagated-inputs
10803 `(("python-ipykernel" ,python-ipykernel)
10804 ("python-ipython" ,python-ipython)))
10805 (native-inputs
10806 `(("python-pytest" ,python-pytest)))
10807 (home-page "https://jupyter.org")
10808 (synopsis "Jupyter Qt console")
10809 (description "This package provides a Qt-based console for Jupyter with
10810 support for rich media output.")
10811 (license license:bsd-3)))
10812
10813 (define-public python-jsbeautifier
10814 (package
10815 (name "python-jsbeautifier")
10816 (version "1.10.2")
10817 (home-page "https://github.com/beautify-web/js-beautify")
10818 (source (origin
10819 (method git-fetch)
10820 (uri (git-reference
10821 (url home-page)
10822 (commit (string-append "v" version))))
10823 (file-name (git-file-name name version))
10824 (sha256
10825 (base32
10826 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10827 (build-system python-build-system)
10828 (arguments
10829 `(#:phases (modify-phases %standard-phases
10830 (add-after 'unpack 'chdir
10831 (lambda _
10832 ;; The upstream Git repository contains all the code,
10833 ;; but this package only builds the python code.
10834 (chdir "python")
10835 #t))
10836 (add-after 'unpack 'patch-python-six-requirements
10837 (lambda _
10838 (substitute* "python/setup.py"
10839 (("six>=1.12.0")
10840 "six>=1.11.0"))
10841 #t)))))
10842 (propagated-inputs
10843 `(("python-editorconfig" ,python-editorconfig)
10844 ("python-six" ,python-six)))
10845 (native-inputs
10846 `(("python-pytest" ,python-pytest)))
10847 (synopsis "JavaScript unobfuscator and beautifier")
10848 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10849 popular online obfuscators.")
10850 (license license:expat)))
10851
10852 (define-public jupyter
10853 (package
10854 (name "jupyter")
10855 (version "1.0.0")
10856 (source
10857 (origin
10858 (method url-fetch)
10859 (uri (pypi-uri "jupyter" version))
10860 (sha256
10861 (base32
10862 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10863 (build-system python-build-system)
10864 (arguments '(#:tests? #f)) ; there are none.
10865 (propagated-inputs
10866 `(("python-ipykernel" ,python-ipykernel)
10867 ("python-ipywidgets" ,python-ipywidgets)
10868 ("python-jupyter-console" ,python-jupyter-console)
10869 ("python-nbconvert" ,python-nbconvert)
10870 ("python-notebook" ,python-notebook)
10871 ("python-qtconsole" ,python-qtconsole)))
10872 (native-search-paths
10873 (list (search-path-specification
10874 (variable "JUPYTER_PATH")
10875 (files '("share/jupyter")))))
10876 (home-page "https://jupyter.org")
10877 (synopsis "Web application for interactive documents")
10878 (description
10879 "The Jupyter Notebook is a web application that allows you to create and
10880 share documents that contain live code, equations, visualizations and
10881 explanatory text. Uses include: data cleaning and transformation, numerical
10882 simulation, statistical modeling, machine learning and much more.")
10883 (license license:bsd-3)))
10884
10885 (define-public python-chardet
10886 (package
10887 (name "python-chardet")
10888 (version "3.0.4")
10889 (source
10890 (origin
10891 (method url-fetch)
10892 (uri (pypi-uri "chardet" version))
10893 (sha256
10894 (base32
10895 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10896 (native-inputs
10897 `(("python-hypothesis" ,python-hypothesis)
10898 ("python-pytest" ,python-pytest)
10899 ("python-pytest-runner" ,python-pytest-runner)))
10900 (build-system python-build-system)
10901 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10902 (arguments `(#:tests? #f))
10903 (home-page "https://github.com/chardet/chardet")
10904 (synopsis "Universal encoding detector for Python 2 and 3")
10905 (description
10906 "This package provides @code{chardet}, a Python module that can
10907 automatically detect a wide range of file encodings.")
10908 (license license:lgpl2.1+)))
10909
10910 (define-public python2-chardet
10911 (package-with-python2 python-chardet))
10912
10913 (define-public python-docopt
10914 (package
10915 (name "python-docopt")
10916 (version "0.6.2")
10917 (source
10918 (origin
10919 (method git-fetch)
10920 ;; The release on PyPI does not include tests.
10921 (uri (git-reference
10922 (url "https://github.com/docopt/docopt")
10923 (commit version)))
10924 (file-name (git-file-name name version))
10925 (sha256
10926 (base32
10927 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10928 (build-system python-build-system)
10929 (native-inputs
10930 `(("python-pytest" ,python-pytest)))
10931 (arguments
10932 `(#:phases
10933 (modify-phases %standard-phases
10934 (replace 'check
10935 (lambda _ (invoke "py.test"))))))
10936 (home-page "http://docopt.org")
10937 (synopsis "Command-line interface description language for Python")
10938 (description "This library allows the user to define a command-line
10939 interface from a program's help message rather than specifying it
10940 programmatically with command-line parsers like @code{getopt} and
10941 @code{argparse}.")
10942 (license license:expat)))
10943
10944 (define-public python2-docopt
10945 (package-with-python2 python-docopt))
10946
10947 (define-public python-pythondialog
10948 (package
10949 (name "python-pythondialog")
10950 (version "3.4.0")
10951 (source
10952 (origin
10953 (method url-fetch)
10954 (uri (pypi-uri "pythondialog" version))
10955 (sha256
10956 (base32
10957 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10958 (build-system python-build-system)
10959 (arguments
10960 `(#:phases
10961 (modify-phases %standard-phases
10962 (add-after 'unpack 'patch-path
10963 (lambda* (#:key inputs #:allow-other-keys)
10964 (let* ((dialog (assoc-ref inputs "dialog")))
10965 ;; Since this library really wants to grovel the search path, we
10966 ;; must hardcode dialog's store path into it.
10967 (substitute* "dialog.py"
10968 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10969 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10970 #t))))
10971 #:tests? #f)) ; no test suite
10972 (propagated-inputs
10973 `(("dialog" ,dialog)))
10974 (home-page "http://pythondialog.sourceforge.net/")
10975 (synopsis "Python interface to the UNIX dialog utility")
10976 (description "A Python wrapper for the dialog utility. Its purpose is to
10977 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10978 This allows one to make simple text-mode user interfaces on Unix-like systems")
10979 (license license:lgpl2.1)
10980 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10981
10982 (define-public python2-pythondialog
10983 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10984 (package
10985 (inherit base)
10986 (version (package-version python-pythondialog))
10987 (source (origin
10988 (method url-fetch)
10989 (uri (pypi-uri "python2-pythondialog" version))
10990 (sha256
10991 (base32
10992 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10993
10994 (define-public python-configobj
10995 (package
10996 (name "python-configobj")
10997 (version "5.0.6")
10998 (source (origin
10999 (method url-fetch)
11000 (uri (pypi-uri "configobj" version))
11001 (sha256
11002 (base32
11003 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
11004 ;; Patch setup.py so it looks for python-setuptools, which is
11005 ;; required to parse the keyword 'install_requires' in setup.py.
11006 (patches (search-patches "python-configobj-setuptools.patch"))))
11007 (build-system python-build-system)
11008 (propagated-inputs
11009 `(("python-six" ,python-six)))
11010 (synopsis "Config file reading, writing and validation")
11011 (description "ConfigObj is a simple but powerful config file reader and
11012 writer: an ini file round tripper. Its main feature is that it is very easy to
11013 use, with a straightforward programmer’s interface and a simple syntax for
11014 config files.")
11015 (home-page "https://github.com/DiffSK/configobj")
11016 (license license:bsd-3)))
11017
11018 (define-public python2-configobj
11019 (package-with-python2 python-configobj))
11020
11021 (define-public python-configargparse
11022 (package
11023 (name "python-configargparse")
11024 (version "1.2.3")
11025 (source (origin
11026 (method url-fetch)
11027 (uri (pypi-uri "ConfigArgParse" version))
11028 (sha256
11029 (base32
11030 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
11031 (build-system python-build-system)
11032 (native-inputs
11033 `(("python-pyyaml" ,python-pyyaml)))
11034 (arguments
11035 `(#:phases
11036 (modify-phases %standard-phases
11037 (replace 'check
11038 (lambda _
11039 ;; Bypass setuptools-shim because one test relies on "setup.py"
11040 ;; being the first argument passed to the python call.
11041 ;;
11042 ;; NOTE: Many tests do not run because they rely on Python's
11043 ;; built-in test.test_argparse, but we remove the unit tests from
11044 ;; our Python installation.
11045 (invoke "python" "setup.py" "test"))))))
11046 (synopsis "Replacement for argparse")
11047 (description "A drop-in replacement for argparse that allows options to also
11048 be set via config files and/or environment variables.")
11049 (home-page "https://github.com/bw2/ConfigArgParse")
11050 (license license:expat)))
11051
11052 (define-public python-argparse-manpage
11053 (package
11054 (name "python-argparse-manpage")
11055 (version "1.1")
11056 (source
11057 (origin
11058 (method url-fetch)
11059 (uri (pypi-uri "argparse-manpage" version))
11060 (sha256
11061 (base32
11062 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
11063 (build-system python-build-system)
11064 (home-page "https://github.com/praiskup/argparse-manpage")
11065 (synopsis "Build manual page from Python's ArgumentParser object")
11066 (description
11067 "This package provides tools to build manual pages from Python's
11068 @code{ArgumentParser} object.")
11069 (license license:asl2.0)))
11070
11071 (define-public python-contextlib2
11072 (package
11073 (name "python-contextlib2")
11074 (version "0.6.0.post1")
11075 (source
11076 (origin
11077 (method url-fetch)
11078 (uri (pypi-uri "contextlib2" version))
11079 (sha256
11080 (base32
11081 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
11082 (build-system python-build-system)
11083 (home-page "https://contextlib2.readthedocs.org/")
11084 (synopsis "Tools for decorators and context managers")
11085 (description "This module is primarily a backport of the Python
11086 3.2 contextlib to earlier Python versions. Like contextlib, it
11087 provides utilities for common tasks involving decorators and context
11088 managers. It also contains additional features that are not part of
11089 the standard library.")
11090 (properties `((python2-variant . ,(delay python2-contextlib2))))
11091 (license license:psfl)))
11092
11093 (define-public python2-contextlib2
11094 (let ((base (package-with-python2
11095 (strip-python2-variant python-contextlib2))))
11096 (package/inherit base
11097 (arguments
11098 (substitute-keyword-arguments (package-arguments base)
11099 ((#:phases phases)
11100 `(modify-phases ,phases
11101 (replace 'check
11102 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
11103 (native-inputs
11104 `(("python2-unittest2" ,python2-unittest2))))))
11105
11106 ;; This package is used by python2-pytest via python2-importlib-metadata,
11107 ;; and thus can not depend on python-unittest2 (which depends on pytest).
11108 (define-public python2-contextlib2-bootstrap
11109 (hidden-package
11110 (package/inherit
11111 python2-contextlib2
11112 (name "python2-contextlib2-bootstrap")
11113 (arguments
11114 `(#:tests? #f
11115 ,@(package-arguments python2-contextlib2)))
11116 (native-inputs '()))))
11117
11118 (define-public python-texttable
11119 (package
11120 (name "python-texttable")
11121 (version "1.6.2")
11122 (source
11123 (origin
11124 (method url-fetch)
11125 (uri (pypi-uri "texttable" version))
11126 (sha256
11127 (base32
11128 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
11129 (build-system python-build-system)
11130 (arguments
11131 `(#:phases
11132 (modify-phases %standard-phases
11133 (replace 'check
11134 (lambda _ (invoke "pytest" "tests.py"))))))
11135 (native-inputs
11136 `(("python-pytest" ,python-pytest)))
11137 (home-page "https://github.com/foutaise/texttable/")
11138 (synopsis "Python module for creating simple ASCII tables")
11139 (description "Texttable is a Python module for creating simple ASCII
11140 tables.")
11141 (license license:expat)))
11142
11143 (define-public python2-texttable
11144 (package-with-python2 python-texttable))
11145
11146 (define-public python-atomicwrites
11147 (package
11148 (name "python-atomicwrites")
11149 (version "1.3.0")
11150 (source (origin
11151 (method url-fetch)
11152 (uri (pypi-uri "atomicwrites" version))
11153 (sha256
11154 (base32
11155 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
11156 (build-system python-build-system)
11157 (synopsis "Atomic file writes in Python")
11158 (description "Library for atomic file writes using platform dependent tools
11159 for atomic file system operations.")
11160 (home-page "https://github.com/untitaker/python-atomicwrites")
11161 (license license:expat)))
11162
11163 (define-public python2-atomicwrites
11164 (package-with-python2 python-atomicwrites))
11165
11166 (define-public python-click-threading
11167 (package
11168 (name "python-click-threading")
11169 (version "0.4.4")
11170 (source (origin
11171 (method url-fetch)
11172 (uri (pypi-uri "click-threading" version))
11173 (sha256
11174 (base32
11175 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
11176 (build-system python-build-system)
11177 (propagated-inputs
11178 `(("python-click" ,python-click)))
11179 (synopsis "Utilities for multithreading in Click")
11180 (description "This package provides utilities for multithreading in Click
11181 applications.")
11182 (home-page "https://github.com/click-contrib/click-threading")
11183 (license license:expat)))
11184
11185 (define-public python-click-log
11186 (package
11187 (name "python-click-log")
11188 (version "0.3.2")
11189 (source (origin
11190 (method url-fetch)
11191 (uri (pypi-uri "click-log" version))
11192 (sha256
11193 (base32
11194 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
11195 (build-system python-build-system)
11196 (propagated-inputs
11197 `(("python-click" ,python-click)))
11198 (synopsis "Logging for click applications")
11199 (description "This package provides a Python library for logging Click
11200 applications.")
11201 (home-page "https://github.com/click-contrib/click-log")
11202 (license license:expat)))
11203
11204 (define-public python-click-default-group
11205 (package
11206 (name "python-click-default-group")
11207 (version "1.2.2")
11208 (source (origin
11209 (method url-fetch)
11210 (uri (pypi-uri "click-default-group" version))
11211 (sha256
11212 (base32
11213 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
11214 (build-system python-build-system)
11215 (arguments
11216 `(#:tests? #f)) ; no target
11217 (propagated-inputs
11218 `(("python-click" ,python-click)))
11219 (synopsis "Extends click.Group")
11220 (description "This package extends click.Group to invoke a command without
11221 explicit subcommand name.")
11222 (home-page "https://github.com/click-contrib/click-default-group")
11223 (license license:bsd-3)))
11224
11225 (define-public python-structlog
11226 (package
11227 (name "python-structlog")
11228 (version "20.2.0")
11229 (source
11230 (origin
11231 (method url-fetch)
11232 (uri (pypi-uri "structlog" version))
11233 (sha256
11234 (base32
11235 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
11236 (build-system python-build-system)
11237 (arguments
11238 `(#:phases
11239 (modify-phases %standard-phases
11240 (replace 'check
11241 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11242 (when tests?
11243 (add-installed-pythonpath inputs outputs)
11244 (invoke "pytest"))
11245 #t)))))
11246 (native-inputs
11247 `(("python-coverage" ,python-coverage)
11248 ("python-freezegun" ,python-freezegun)
11249 ("python-pretend" ,python-pretend)
11250 ("python-pytest" ,python-pytest)
11251 ("python-pytest-asyncio" ,python-pytest-asyncio)
11252 ("python-simplejson" ,python-simplejson)
11253 ("python-twisted" ,python-twisted)))
11254 (home-page "https://www.structlog.org/")
11255 (synopsis "Structured Logging for Python")
11256 (description "@code{structlog} changes logging in Python by adding structure
11257 to your log entries.")
11258 (license (list license:asl2.0 license:expat))))
11259
11260 (define-public python-apipkg
11261 (package
11262 (name "python-apipkg")
11263 (version "1.5")
11264 (source (origin
11265 (method url-fetch)
11266 (uri (pypi-uri "apipkg" version))
11267 (sha256
11268 (base32
11269 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
11270 (build-system python-build-system)
11271 (native-inputs
11272 `(("python-pytest" ,python-pytest)
11273 ("python-setuptools-scm" ,python-setuptools-scm)))
11274 (synopsis "Namespace control and lazy-import mechanism")
11275 (description "With apipkg you can control the exported namespace of a Python
11276 package and greatly reduce the number of imports for your users. It is a small
11277 pure Python module that works on virtually all Python versions.")
11278 (home-page "https://github.com/pytest-dev/apipkg")
11279 (license license:expat)))
11280
11281 (define-public python-execnet
11282 (package
11283 (name "python-execnet")
11284 (version "1.4.1")
11285 (source (origin
11286 (method url-fetch)
11287 (uri (pypi-uri "execnet" version))
11288 (sha256
11289 (base32
11290 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
11291 (build-system python-build-system)
11292 (arguments
11293 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
11294 ;; The two test failures are caused by the lack of an `ssh` executable.
11295 ;; The test suite can be run with pytest after the 'install' phase.
11296 #:tests? #f))
11297 (native-inputs
11298 `(("python-pytest" ,python-pytest)
11299 ("python-setuptools-scm" ,python-setuptools-scm)))
11300 (propagated-inputs
11301 `(("python-apipkg" ,python-apipkg)))
11302 (synopsis "Rapid multi-Python deployment")
11303 (description "Execnet provides a share-nothing model with
11304 channel-send/receive communication for distributing execution across many
11305 Python interpreters across version, platform and network barriers. It has a
11306 minimal and fast API targeting the following uses:
11307 @enumerate
11308 @item distribute tasks to (many) local or remote CPUs
11309 @item write and deploy hybrid multi-process applications
11310 @item write scripts to administer multiple environments
11311 @end enumerate")
11312 (home-page "https://codespeak.net/execnet/")
11313 (license license:expat)))
11314
11315 (define-public python2-execnet
11316 (package-with-python2 python-execnet))
11317
11318 (define-public python-icalendar
11319 (package
11320 (name "python-icalendar")
11321 (version "4.0.7")
11322 (source (origin
11323 (method url-fetch)
11324 (uri (pypi-uri "icalendar" version))
11325 (sha256
11326 (base32
11327 "19574j3jwssm2dkqykih4568xqfgjsa3hcd79yl5s2vfys3qvh8g"))))
11328 (build-system python-build-system)
11329 (propagated-inputs
11330 `(("python-dateutil" ,python-dateutil)
11331 ("python-pytz" ,python-pytz)))
11332 (synopsis "Python library for parsing iCalendar files")
11333 (description "The icalendar package is a parser/generator of iCalendar
11334 files for use with Python.")
11335 (home-page "https://github.com/collective/icalendar")
11336 (license license:bsd-2)))
11337
11338 (define-public python-args
11339 (package
11340 (name "python-args")
11341 (version "0.1.0")
11342 (source (origin
11343 (method url-fetch)
11344 (uri (pypi-uri "args" version))
11345 (sha256
11346 (base32
11347 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
11348 (build-system python-build-system)
11349 (home-page "https://github.com/kennethreitz/args")
11350 (synopsis "Command-line argument parser")
11351 (description
11352 "This library provides a Python module to parse command-line arguments.")
11353 (license license:bsd-3)))
11354
11355 (define-public python2-args
11356 (package-with-python2 python-args))
11357
11358 (define-public python-clint
11359 (package
11360 (name "python-clint")
11361 (version "0.5.1")
11362 (source (origin
11363 (method url-fetch)
11364 (uri (pypi-uri "clint" version))
11365 (sha256
11366 (base32
11367 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
11368 (build-system python-build-system)
11369 (arguments
11370 '(#:phases
11371 (modify-phases %standard-phases
11372 (replace 'check
11373 (lambda _ (invoke "py.test" "-v"))))))
11374 (native-inputs
11375 `(("python-pytest" ,python-pytest)))
11376 (propagated-inputs
11377 `(("python-args" ,python-args)))
11378 (home-page "https://github.com/kennethreitz/clint")
11379 (synopsis "Command-line interface tools")
11380 (description
11381 "Clint is a Python module filled with a set of tools for developing
11382 command-line applications, including tools for colored and indented
11383 output, progress bar display, and pipes.")
11384 (license license:isc)))
11385
11386 (define-public python2-clint
11387 (package-with-python2 python-clint))
11388
11389 (define-public python-rply
11390 (package
11391 (name "python-rply")
11392 (version "0.7.5")
11393 (source (origin
11394 (method url-fetch)
11395 (uri (pypi-uri "rply" version))
11396 (sha256
11397 (base32
11398 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
11399 (build-system python-build-system)
11400 (propagated-inputs
11401 `(("python-appdirs" ,python-appdirs)))
11402 (home-page "https://github.com/alex/rply")
11403 (synopsis "Parser generator for Python")
11404 (description
11405 "This package provides a pure Python based parser generator, that also
11406 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
11407 with a new public API, and RPython support.")
11408 (license license:bsd-3)))
11409
11410 (define-public python2-rply
11411 (package-with-python2 python-rply))
11412
11413 (define-public python-hy
11414 (package
11415 (name "python-hy")
11416 (version "0.18.0")
11417 (source (origin
11418 (method url-fetch)
11419 (uri (pypi-uri "hy" version))
11420 (sha256
11421 (base32
11422 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
11423 (build-system python-build-system)
11424 (arguments
11425 '(#:phases
11426 (modify-phases %standard-phases
11427 (add-before 'install 'set-HOME
11428 (lambda _
11429 (setenv "HOME" "/tmp") #t))
11430 (replace 'check
11431 (lambda _
11432 ;; Tests require write access to HOME.
11433 (setenv "HOME" "/tmp")
11434 (invoke "nosetests"))))))
11435 (native-inputs
11436 `(("python-coverage" ,python-coverage)
11437 ("python-nose" ,python-nose)))
11438 (propagated-inputs
11439 `(("python-astor" ,python-astor)
11440 ("python-colorama" ,python-colorama)
11441 ("python-rply" ,python-rply)
11442 ("python-funcparserlib"
11443 ,python-funcparserlib)))
11444 (home-page "http://hylang.org/")
11445 (synopsis "Lisp frontend to Python")
11446 (description
11447 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
11448 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
11449 Python at your fingertips, in Lisp form.")
11450 (license license:expat)))
11451
11452 (define-public python2-functools32
11453 (package
11454 (name "python2-functools32")
11455 (version "3.2.3-2")
11456 (source
11457 (origin
11458 (method url-fetch)
11459 (uri (pypi-uri "functools32" version))
11460 (sha256
11461 (base32
11462 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
11463 (build-system python-build-system)
11464 (arguments
11465 `(#:python ,python-2
11466 #:tests? #f)) ; no test target
11467 (home-page "https://github.com/MiCHiLU/python-functools32")
11468 (synopsis
11469 "Backport of the functools module from Python 3.2.3")
11470 (description
11471 "This package is a backport of the @code{functools} module from Python
11472 3.2.3 for use with older versions of Python and PyPy.")
11473 (license license:expat)))
11474
11475 (define-public python2-subprocess32
11476 (package
11477 (name "python2-subprocess32")
11478 (version "3.2.7")
11479 (source (origin
11480 (method url-fetch)
11481 (uri (pypi-uri "subprocess32" version))
11482 (sha256
11483 (base32
11484 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
11485 (patches
11486 (search-patches "python2-subprocess32-disable-input-test.patch"))))
11487 (build-system python-build-system)
11488 (arguments
11489 `(#:python ,python-2
11490 ;; The test suite fails with Python > 2.7.13:
11491 ;; import test.support
11492 ;; ImportError: No module named support
11493 #:tests? #f
11494 #:phases
11495 (modify-phases %standard-phases
11496 (add-after 'unpack 'patch-/bin/sh
11497 (lambda _
11498 (substitute* '("subprocess32.py"
11499 "test_subprocess32.py")
11500 (("/bin/sh") (which "sh")))
11501 #t)))))
11502 (home-page "https://github.com/google/python-subprocess32")
11503 (synopsis "Backport of the subprocess module from Python 3.2")
11504 (description
11505 "This is a backport of the @code{subprocess} standard library module
11506 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
11507 new features. On POSIX systems it is guaranteed to be reliable when used
11508 in threaded applications. It includes timeout support from Python 3.3 but
11509 otherwise matches 3.2’s API.")
11510 (license license:psfl)))
11511
11512 (define-public python2-futures
11513 (package
11514 (name "python2-futures")
11515 (version "3.2.0")
11516 (source
11517 (origin
11518 (method url-fetch)
11519 (uri (pypi-uri "futures" version))
11520 (sha256
11521 (base32
11522 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
11523 (build-system python-build-system)
11524 (arguments
11525 `(#:python ,python-2
11526 #:phases
11527 (modify-phases %standard-phases
11528 (replace 'check
11529 (lambda _
11530 (invoke "python" "test_futures.py")
11531 #t)))))
11532 (home-page "https://github.com/agronholm/pythonfutures")
11533 (synopsis
11534 "Backport of the concurrent.futures package from Python 3.2")
11535 (description
11536 "The concurrent.futures module provides a high-level interface for
11537 asynchronously executing callables. This package backports the
11538 concurrent.futures package from Python 3.2")
11539 (license license:bsd-3)))
11540
11541 (define-public python-promise
11542 (package
11543 (name "python-promise")
11544 (version "0.4.2")
11545 (source
11546 (origin
11547 (method url-fetch)
11548 (uri (pypi-uri "promise" version))
11549 (sha256
11550 (base32
11551 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
11552 (build-system python-build-system)
11553 ;; Tests wants python-futures, which is a python2 only program, and
11554 ;; can't be found by python-promise at test time.
11555 (arguments `(#:tests? #f))
11556 (home-page "https://github.com/syrusakbary/promise")
11557 (synopsis "Promises/A+ implementation for Python")
11558 (description
11559 "Promises/A+ implementation for Python")
11560 (properties `((python2-variant . ,(delay python2-promise))))
11561 (license license:expat)))
11562
11563 (define-public python2-promise
11564 (let ((promise (package-with-python2
11565 (strip-python2-variant python-promise))))
11566 (package/inherit promise
11567 (arguments (substitute-keyword-arguments (package-arguments promise)
11568 ((#:tests? _) #t)))
11569 (native-inputs
11570 `(("python2-futures" ,python2-futures)
11571 ("python2-pytest" ,python2-pytest)
11572 ,@(package-native-inputs promise))))))
11573
11574 (define-public python-progressbar2
11575 (package
11576 (name "python-progressbar2")
11577 (version "3.51.3")
11578 (source
11579 (origin
11580 (method url-fetch)
11581 (uri (pypi-uri "progressbar2" version))
11582 (sha256
11583 (base32
11584 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
11585 (build-system python-build-system)
11586 (propagated-inputs
11587 `(("python-six" ,python-six)
11588 ("python-utils" ,python-utils)))
11589 (native-inputs
11590 `(("python-flake8" ,python-flake8)
11591 ("python-freezegun" ,python-freezegun)
11592 ("python-pycodestyle" ,python-pycodestyle)
11593 ("python-pytest" ,python-pytest)
11594 ("python-pytest-cache" ,python-pytest-cache)
11595 ("python-pytest-cov" ,python-pytest-cov)
11596 ("python-pytest-flakes" ,python-pytest-flakes)
11597 ("python-pytest-pep8" ,python-pytest-pep8)
11598 ("python-sphinx" ,python-sphinx)))
11599 (home-page "https://github.com/WoLpH/python-progressbar")
11600 (synopsis "Text progress bar library for Python")
11601 (description
11602 "This package provides a Python progressbar library to provide
11603 visual (yet text based) progress to long running operations.")
11604 (license license:bsd-3)))
11605
11606 (define-public python-progressbar33
11607 (package
11608 (name "python-progressbar33")
11609 (version "2.4")
11610 (source
11611 (origin
11612 (method url-fetch)
11613 (uri (pypi-uri "progressbar33" version))
11614 (sha256
11615 (base32
11616 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
11617 (build-system python-build-system)
11618 (home-page "https://github.com/germangh/python-progressbar")
11619 (synopsis "Text progress bar library for Python")
11620 (description
11621 "This package provides a text progress bar library for Python. This
11622 version only differs from the original @code{progressbar} package in that it
11623 uses relative package imports instead of absolute imports, which is necessary
11624 for the module to work under Python 3.3.")
11625 ;; Either or both of these licenses may be selected.
11626 (license (list license:lgpl2.1+ license:bsd-3))))
11627
11628 (define-public python-colorama
11629 (package
11630 (name "python-colorama")
11631 (version "0.4.4")
11632 (source
11633 (origin
11634 (method url-fetch)
11635 (uri (pypi-uri "colorama" version))
11636 (sha256
11637 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
11638 (build-system python-build-system)
11639 (synopsis "Colored terminal text rendering for Python")
11640 (description "Colorama is a Python library for rendering colored terminal
11641 text.")
11642 (home-page "https://pypi.org/project/colorama/")
11643 (license license:bsd-3)))
11644
11645 (define-public python2-colorama
11646 (package-with-python2 python-colorama))
11647
11648 (define-public python-moto
11649 (package
11650 (name "python-moto")
11651 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
11652 (version "1.3.16.dev134")
11653 (source (origin
11654 (method url-fetch)
11655 (uri (pypi-uri "moto" version))
11656 (sha256
11657 (base32
11658 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
11659 (build-system python-build-system)
11660 (arguments
11661 `(#:phases (modify-phases %standard-phases
11662 (add-after 'unpack 'patch-hardcoded-executable-names
11663 (lambda _
11664 (substitute* "moto/batch/models.py"
11665 (("/bin/sh")
11666 (which "sh")))
11667 (substitute* (find-files "tests" "\\.py$")
11668 (("#!/bin/bash")
11669 (string-append "#!" (which "bash"))))
11670 #t))
11671 (replace 'check
11672 (lambda _
11673 (setenv "PYTHONPATH" (string-append "./build/lib:"
11674 (getenv "PYTHONPATH")))
11675 (invoke "pytest" "-vv" "-m" "not network"
11676 ;; These tests require Docker.
11677 "-k" "not test_terminate_job \
11678 and not test_invoke_function_from_sqs_exception"))))))
11679 (native-inputs
11680 `(("python-flask" ,python-flask)
11681 ("python-flask-cors" ,python-flask-cors)
11682 ("python-freezegun" ,python-freezegun)
11683 ("python-parameterized" ,python-parameterized)
11684 ("python-pytest" ,python-pytest)
11685 ("python-sure" ,python-sure)))
11686 (propagated-inputs
11687 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
11688 ("python-boto" ,python-boto)
11689 ("python-boto3" ,python-boto3)
11690 ("python-botocore" ,python-botocore)
11691 ("python-cfn-lint" ,python-cfn-lint)
11692 ("python-cryptography" ,python-cryptography)
11693 ("python-dateutil" ,python-dateutil)
11694 ("python-docker" ,python-docker)
11695 ("python-idna" ,python-idna)
11696 ("python-jinja2" ,python-jinja2)
11697 ("python-jose" ,python-jose)
11698 ("python-jsondiff" ,python-jsondiff)
11699 ("python-mock" ,python-mock)
11700 ("python-pytz" ,python-pytz)
11701 ("python-pyyaml" ,python-pyyaml)
11702 ("python-requests" ,python-requests)
11703 ("python-responses" ,python-responses)
11704 ("python-six" ,python-six)
11705 ("python-sshpubkeys" ,python-sshpubkeys)
11706 ("python-werkzeug" ,python-werkzeug)
11707 ("python-xmltodict" ,python-xmltodict)))
11708 (home-page "https://github.com/spulec/moto")
11709 (synopsis "Mock out the boto library")
11710 (description
11711 "@code{moto} is a library designed to easily mock out the
11712 @code{boto} library.")
11713 (license license:asl2.0)))
11714
11715 (define-public python-rsa
11716 (package
11717 (name "python-rsa")
11718 (version "3.4.2")
11719 (source
11720 (origin
11721 (method url-fetch)
11722 (uri (pypi-uri "rsa" version))
11723 (sha256
11724 (base32
11725 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11726 (build-system python-build-system)
11727 (propagated-inputs
11728 `(("python-pyasn1" ,python-pyasn1)))
11729 (synopsis "Pure-Python RSA implementation")
11730 (description "Python-RSA is a pure-Python RSA implementation. It supports
11731 encryption and decryption, signing and verifying signatures, and key
11732 generation according to PKCS#1 version 1.5. It can be used as a Python
11733 library as well as on the command line.")
11734 (home-page "https://stuvel.eu/rsa")
11735 (license license:asl2.0)))
11736
11737 (define-public python2-rsa
11738 (package-with-python2 python-rsa))
11739
11740 (define-public python-pluggy
11741 (package
11742 (name "python-pluggy")
11743 (version "0.13.1")
11744 (source
11745 (origin
11746 (method url-fetch)
11747 (uri (pypi-uri "pluggy" version))
11748 (sha256
11749 (base32
11750 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11751 (build-system python-build-system)
11752 (native-inputs
11753 `(("python-setuptools-scm" ,python-setuptools-scm)))
11754 (synopsis "Plugin and hook calling mechanism for Python")
11755 (description "Pluggy is an extraction of the plugin manager as used by
11756 Pytest but stripped of Pytest specific details.")
11757 (home-page "https://pypi.org/project/pluggy/")
11758 (properties `((python2-variant . ,(delay python2-pluggy))))
11759 (license license:expat)))
11760
11761 (define-public python2-pluggy
11762 (let ((base (package-with-python2 (strip-python2-variant
11763 python-pluggy))))
11764 (package/inherit
11765 base
11766 (propagated-inputs
11767 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11768
11769 ;; This package requires python2-importlib-metadata, but that package
11770 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11771 ;; variant to solve the circular dependency.
11772 (define-public python2-pluggy-bootstrap
11773 (hidden-package
11774 (package/inherit
11775 python2-pluggy
11776 (name "python2-pluggy-bootstrap")
11777 (arguments
11778 `(#:tests? #f
11779 ,@(package-arguments python2-pluggy)))
11780 (propagated-inputs
11781 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11782
11783 (define-public python-plumbum
11784 (package
11785 (name "python-plumbum")
11786 (version "1.7.0")
11787 (source
11788 (origin
11789 (method url-fetch)
11790 (uri (pypi-uri "plumbum" version))
11791 (sha256
11792 (base32 "1kidj821k79dw064rlxh84xamb9h79ychg3pgj81jlvm5hs48xri"))))
11793 (build-system python-build-system)
11794 (arguments
11795 `(#:tests? #f)) ;no tests
11796 (native-inputs
11797 ;; XXX: Not actually used since there are no tests but required for
11798 ;; build.
11799 `(("python-pytest" ,python-pytest)))
11800 (home-page "https://plumbum.readthedocs.io")
11801 (synopsis "Python shell combinators library")
11802 (description
11803 "Plumbum is a library of tools for replacing shell scripts with Python
11804 code.")
11805 (license license:expat)))
11806
11807 (define-public python-deprecation
11808 (package
11809 (name "python-deprecation")
11810 (version "2.1.0")
11811 (source
11812 (origin
11813 (method url-fetch)
11814 (uri (pypi-uri "deprecation" version))
11815 (sha256
11816 (base32
11817 "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj"))))
11818 (build-system python-build-system)
11819 (propagated-inputs
11820 `(("python-packaging" ,python-packaging)))
11821 (native-inputs
11822 `(("python-unittest2" ,python-unittest2)))
11823 (home-page "https://deprecation.readthedocs.io/")
11824 (synopsis "Python library to handle automated deprecations")
11825 (description
11826 "This is a library that enables automated deprecations. It offers the
11827 @code{deprecated()} decorator to wrap functions, providing proper warnings
11828 both in documentation and via Python’s warnings system, as well as the
11829 @code{deprecation.fail_if_not_removed()} decorator for test methods to ensure
11830 that deprecated code is eventually removed.")
11831 (license license:asl2.0)))
11832
11833 (define-public python-tox
11834 (package
11835 (name "python-tox")
11836 (version "3.20.0")
11837 (source
11838 (origin
11839 (method url-fetch)
11840 (uri (pypi-uri "tox" version))
11841 (sha256
11842 (base32
11843 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11844 (build-system python-build-system)
11845 (arguments
11846 ;; FIXME: Tests require pytest-timeout, which itself requires
11847 ;; pytest>=2.8.0 for installation.
11848 '(#:tests? #f))
11849 (propagated-inputs
11850 `(("python-filelock" ,python-filelock)
11851 ("python-packaging" ,python-packaging)
11852 ("python-pluggy" ,python-pluggy)
11853 ("python-py" ,python-py)
11854 ("python-six" ,python-six)
11855 ("python-toml" ,python-toml)
11856 ("python-virtualenv" ,python-virtualenv)))
11857 (native-inputs
11858 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11859 ("python-pytest" ,python-pytest) ; >= 2.3.5
11860 ("python-setuptools-scm" ,python-setuptools-scm)))
11861 (home-page "https://tox.readthedocs.io")
11862 (synopsis "Virtualenv-based automation of test activities")
11863 (description "Tox is a generic virtualenv management and test command line
11864 tool. It can be used to check that a package installs correctly with
11865 different Python versions and interpreters, or run tests in each type of
11866 supported environment, or act as a frontend to continuous integration
11867 servers.")
11868 (license license:expat)))
11869
11870 (define-public python-jmespath
11871 (package
11872 (name "python-jmespath")
11873 (version "0.9.4")
11874 (source
11875 (origin
11876 (method url-fetch)
11877 (uri (pypi-uri "jmespath" version))
11878 (sha256
11879 (base32
11880 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11881 (build-system python-build-system)
11882 (native-inputs
11883 `(("python-nose" ,python-nose)))
11884 (synopsis "JSON Matching Expressions")
11885 (description "JMESPath (pronounced “james path”) is a Python library that
11886 allows one to declaratively specify how to extract elements from a JSON
11887 document.")
11888 (home-page "https://github.com/jmespath/jmespath.py")
11889 (license license:expat)))
11890
11891 (define-public python2-jmespath
11892 (package-with-python2 python-jmespath))
11893
11894 (define-public python-symengine
11895 (package
11896 (name "python-symengine")
11897 (version "0.6.1")
11898 (source
11899 (origin
11900 (method url-fetch)
11901 (uri (pypi-uri "symengine" version))
11902 (sha256
11903 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11904 (build-system python-build-system)
11905 (native-inputs
11906 `(("cmake" ,cmake)
11907 ("python-cython" ,python-cython)))
11908 (inputs
11909 `(("symengine" ,symengine)))
11910 (home-page "https://github.com/symengine/symengine.py")
11911 (synopsis "Python library providing wrappers to SymEngine")
11912 (description
11913 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11914 manipulation library.")
11915 (license license:expat)))
11916
11917 (define-public python-uncertainties
11918 (package
11919 (name "python-uncertainties")
11920 (version "3.1.5")
11921 (source
11922 (origin
11923 (method url-fetch)
11924 (uri (pypi-uri "uncertainties" version))
11925 (sha256
11926 (base32
11927 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
11928 (build-system python-build-system)
11929 ;; While there are test files, there is no "tests" directory, so the tests
11930 ;; fail.
11931 (arguments '(#:tests? #false))
11932 (propagated-inputs
11933 `(("python-future" ,python-future)))
11934 (native-inputs
11935 `(("python-nose" ,python-nose)
11936 ("python-numpy" ,python-numpy)))
11937 (home-page "https://uncertainties-python-package.readthedocs.io/")
11938 (synopsis "Calculations with uncertainties")
11939 (description
11940 "The uncertainties package transparently handles calculations with
11941 numbers with uncertainties. It can also yield the derivatives of any
11942 expression.")
11943 (license license:bsd-3)))
11944
11945 (define-public python-asteval
11946 (package
11947 (name "python-asteval")
11948 (version "0.9.23")
11949 (source
11950 (origin
11951 (method url-fetch)
11952 (uri (pypi-uri "asteval" version))
11953 (sha256
11954 (base32
11955 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
11956 (build-system python-build-system)
11957 (native-inputs
11958 `(("python-pytest" ,python-pytest)))
11959 (home-page "https://github.com/newville/asteval")
11960 (synopsis "Minimalistic evaluator of Python expressions")
11961 (description
11962 "This package provides a minimalistic evaluator of Python expression
11963 using the @code{ast} module")
11964 (license license:expat)))
11965
11966 (define-public python-lmfit
11967 (package
11968 (name "python-lmfit")
11969 (version "1.0.2")
11970 (source
11971 (origin
11972 (method url-fetch)
11973 (uri (pypi-uri "lmfit" version))
11974 (sha256
11975 (base32
11976 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
11977 (build-system python-build-system)
11978 (propagated-inputs
11979 `(("python-asteval" ,python-asteval)
11980 ("python-numpy" ,python-numpy)
11981 ("python-scipy" ,python-scipy)
11982 ("python-uncertainties" ,python-uncertainties)))
11983 (native-inputs
11984 `(("python-pytest" ,python-pytest)))
11985 (home-page "https://lmfit.github.io/lmfit-py/")
11986 (synopsis "Least-Squares minimization with bounds and constraints")
11987 (description
11988 "Lmfit provides a high-level interface to non-linear optimization and
11989 curve fitting problems for Python. It builds on and extends many of the
11990 optimization methods of @code{scipy.optimize}. Initially inspired by (and
11991 named for) extending the Levenberg-Marquardt method from
11992 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
11993 enhancements to optimization and data fitting problems.")
11994 (license license:bsd-3)))
11995
11996 (define-public python-boto
11997 (package
11998 (name "python-boto")
11999 (version "2.49.0")
12000 (source (origin
12001 (method url-fetch)
12002 (uri (pypi-uri "boto" version))
12003 (sha256
12004 (base32
12005 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
12006 (build-system python-build-system)
12007 (arguments
12008 ;; XXX: This package is unmaintained and has problems with newer versions
12009 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
12010 ;; subset of this library, so keep it around for now, but disable tests.
12011 '(#:tests? #f))
12012 (propagated-inputs
12013 `(("python-paramiko" ,python-paramiko)
12014 ("python-requests" ,python-requests)))
12015 (home-page "https://github.com/boto/boto")
12016 (synopsis "Python interfaces for Amazon Web Services")
12017 (description
12018 "This package provides various facilities for interacting with Amazon
12019 Web Services through Python.
12020
12021 This software is unmaintained, and new projects should use @code{boto3} instead.")
12022 (license license:expat)))
12023
12024 (define-public python-botocore
12025 ;; Note: When updating botocore, also make sure that boto3 and awscli
12026 ;; are compatible.
12027 (package
12028 (name "python-botocore")
12029 (version "1.19.22")
12030 (source
12031 (origin
12032 (method url-fetch)
12033 (uri (pypi-uri "botocore" version))
12034 (sha256
12035 (base32
12036 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
12037 (build-system python-build-system)
12038 (arguments
12039 ;; FIXME: Many tests are failing.
12040 '(#:tests? #f))
12041 (propagated-inputs
12042 `(("python-dateutil" ,python-dateutil)
12043 ("python-jmespath" ,python-jmespath)
12044 ("python-urllib3" ,python-urllib3)))
12045 (home-page "https://github.com/boto/botocore")
12046 (synopsis "Low-level interface to AWS")
12047 (description "Botocore is a Python library that provides a low-level
12048 interface to the Amazon Web Services (AWS) API.")
12049 (license license:asl2.0)))
12050
12051 (define-public python2-botocore
12052 (package-with-python2 python-botocore))
12053
12054 (define-public python-boto3
12055 (package
12056 (name "python-boto3")
12057 (version "1.16.22")
12058 (home-page "https://github.com/boto/boto3")
12059 (source (origin
12060 (method git-fetch)
12061 (uri (git-reference (url home-page) (commit version)))
12062 (file-name (git-file-name name version))
12063 (sha256
12064 (base32
12065 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
12066 (arguments
12067 `(#:phases
12068 (modify-phases %standard-phases
12069 (add-after 'unpack 'delete-network-tests
12070 ;; Deleting integration tests because they are trying to connect to AWS.
12071 (lambda _
12072 (delete-file-recursively "tests/integration")
12073 #t)))))
12074 (build-system python-build-system)
12075 (native-inputs
12076 `(("python-nose" ,python-nose)
12077 ("python-mock" ,python-mock)))
12078 (propagated-inputs
12079 `(("python-botocore" ,python-botocore)
12080 ("python-jmespath" ,python-jmespath)
12081 ("python-s3transfer" ,python-s3transfer)))
12082 (synopsis "AWS SDK for Python")
12083 (description
12084 "Boto3 is a Python library for writing programs that interact with
12085 @acronym{AWS,Amazon Web Services}.")
12086 (license license:asl2.0)))
12087
12088 (define-public python-pyfiglet
12089 (package
12090 (name "python-pyfiglet")
12091 (version "0.8.post1")
12092 (source
12093 (origin
12094 (method url-fetch)
12095 (uri (pypi-uri "pyfiglet" version))
12096 (sha256
12097 (base32
12098 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
12099 (build-system python-build-system)
12100 (home-page "https://github.com/pwaller/pyfiglet")
12101 (synopsis "Draw ASCII art big letters in Python")
12102 (description "This module lets you draw large letter from ordinary characters
12103 in pure Python.")
12104 (license license:expat)))
12105
12106 (define-public python-xdo
12107 (package
12108 (name "python-xdo")
12109 (version "0.3")
12110 (source (origin
12111 (method url-fetch)
12112 (uri (string-append
12113 "http://http.debian.net/debian/pool/main/p/python-xdo/"
12114 "python-xdo_" version ".orig.tar.gz"))
12115 (sha256
12116 (base32
12117 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
12118 (build-system python-build-system)
12119 (arguments
12120 '(#:phases
12121 (modify-phases %standard-phases
12122 (add-before 'install 'patch-libxdo-path
12123 ;; Hardcode the path of dynamically loaded libxdo library.
12124 (lambda* (#:key inputs #:allow-other-keys)
12125 (let ((libxdo (string-append
12126 (assoc-ref inputs "xdotool")
12127 "/lib/libxdo.so")))
12128 (substitute* "xdo/_xdo.py"
12129 (("find_library\\(\"xdo\"\\)")
12130 (simple-format #f "\"~a\"" libxdo)))
12131 #t))))
12132 #:tests? #f)) ; no tests provided
12133 (propagated-inputs
12134 `(("python-six" ,python-six)))
12135 (inputs
12136 `(("xdotool" ,xdotool)
12137 ("libX11" ,libx11)))
12138 (home-page "https://tracker.debian.org/pkg/python-xdo")
12139 (synopsis "Python library for simulating X11 keyboard/mouse input")
12140 (description "Provides bindings to libxdo for manipulating X11 via simulated
12141 input. (Note that this is mostly a legacy library; you may wish to look at
12142 python-xdo for newer bindings.)")
12143 (license license:bsd-3)))
12144
12145 (define-public python2-xdo
12146 (package-with-python2 python-xdo))
12147
12148 (define-public python-mako
12149 (package
12150 (name "python-mako")
12151 (version "1.1.3")
12152 (source
12153 (origin
12154 (method url-fetch)
12155 (uri (pypi-uri "Mako" version))
12156 (sha256
12157 (base32
12158 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
12159 (build-system python-build-system)
12160 (arguments
12161 `(#:phases (modify-phases %standard-phases
12162 (replace 'check
12163 (lambda* (#:key tests? #:allow-other-keys)
12164 (if tests?
12165 (invoke "nosetests" "-v")
12166 (format #t "test suite not run~%"))
12167 #t)))))
12168 (propagated-inputs
12169 `(("python-markupsafe" ,python-markupsafe)))
12170 (native-inputs
12171 `(("python-mock" ,python-mock)
12172 ("python-nose" ,python-nose)))
12173 (home-page "https://www.makotemplates.org/")
12174 (synopsis "Templating language for Python")
12175 (description "Mako is a templating language for Python that compiles
12176 templates into Python modules.")
12177 (license license:expat)))
12178
12179 (define-public python2-mako
12180 (package-with-python2 python-mako))
12181
12182 (define-public python-waitress
12183 (package
12184 (name "python-waitress")
12185 (version "1.1.0")
12186 (source
12187 (origin
12188 (method url-fetch)
12189 (uri (pypi-uri "waitress" version))
12190 (patches (search-patches "python-waitress-fix-tests.patch"))
12191 (sha256
12192 (base32
12193 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
12194 (build-system python-build-system)
12195 (home-page "https://github.com/Pylons/waitress")
12196 (synopsis "Waitress WSGI server")
12197 (description "Waitress is meant to be a production-quality pure-Python WSGI
12198 server with very acceptable performance.")
12199 (license license:zpl2.1)))
12200
12201 (define-public python2-waitress
12202 (package-with-python2 python-waitress))
12203
12204 (define-public python-whichcraft
12205 (package
12206 (name "python-whichcraft")
12207 (version "0.6.1")
12208 (source
12209 (origin
12210 (method url-fetch)
12211 (uri (pypi-uri "whichcraft" version))
12212 (sha256
12213 (base32
12214 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
12215 (build-system python-build-system)
12216 (native-inputs
12217 `(("python-pytest" ,python-pytest)))
12218 (home-page "https://github.com/pydanny/whichcraft")
12219 (synopsis "Cross-platform cross-python shutil.which functionality")
12220 (description
12221 "This package provides a shim of the shutil.which function that's
12222 designed to work across multiple versions of Python.")
12223 (license license:bsd-3)))
12224
12225 (define-public python-cookiecutter
12226 (package
12227 (name "python-cookiecutter")
12228 (version "1.7.2")
12229 (source
12230 (origin
12231 (method url-fetch)
12232 (uri (pypi-uri "cookiecutter" version))
12233 (sha256
12234 (base32
12235 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
12236 (build-system python-build-system)
12237 (native-inputs
12238 `(("python-freezegun" ,python-freezegun)
12239 ("python-pytest" ,python-pytest)
12240 ("python-pytest-catchlog" ,python-pytest-catchlog)
12241 ("python-pytest-cov" ,python-pytest-cov)
12242 ("python-pytest-mock" ,python-pytest-mock)))
12243 (propagated-inputs
12244 `(("python-binaryornot" ,python-binaryornot)
12245 ("python-click" ,python-click)
12246 ("python-future" ,python-future)
12247 ("python-jinja2" ,python-jinja2)
12248 ("python-jinja2-time" ,python-jinja2-time)
12249 ("python-poyo" ,python-poyo)
12250 ("python-requests" ,python-requests)
12251 ("python-slugify" ,python-slugify)
12252 ("python-text-unidecode" ,python-text-unidecode)
12253 ("python-whichcraft" ,python-whichcraft)))
12254 (home-page "https://github.com/cookiecutter/cookiecutter")
12255 (synopsis
12256 "Command-line utility that creates projects from project templates")
12257 (description
12258 "This package provides a command-line utility that creates projects from
12259 project templates, e.g. creating a Python package project from a Python package
12260 project template.")
12261 (license license:bsd-3)))
12262
12263 (define-public python-pyquery
12264 (package
12265 (name "python-pyquery")
12266 (version "1.2.17")
12267 (source
12268 (origin
12269 (method url-fetch)
12270 (uri (pypi-uri "pyquery" version))
12271 (sha256
12272 (base32
12273 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
12274 (build-system python-build-system)
12275 (native-inputs
12276 `(("python-webob" ,python-webob)
12277 ("python-webtest" ,python-webtest)))
12278 (propagated-inputs
12279 `(("python-lxml" ,python-lxml)
12280 ("python-cssselect" ,python-cssselect)))
12281 (home-page "https://github.com/gawel/pyquery")
12282 (synopsis "Make jQuery-like queries on xml documents")
12283 (description "pyquery allows you to make jQuery queries on xml documents.
12284 The API is as much as possible the similar to jQuery. pyquery uses lxml for
12285 fast xml and html manipulation.")
12286 (license license:bsd-3)))
12287
12288 (define-public python-anyjson
12289 (package
12290 (name "python-anyjson")
12291 (version "0.3.3")
12292 (source
12293 (origin
12294 (method url-fetch)
12295 (uri (pypi-uri "anyjson" version))
12296 (sha256
12297 (base32
12298 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
12299 (build-system python-build-system)
12300 (arguments
12301 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
12302 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
12303 ;; whatever) so this transformation needs to be done before the tests
12304 ;; can be run. Maybe we could add a build step to transform beforehand
12305 ;; but it could be annoying/difficult.
12306 ;; We can enable tests for the Python 2 version, though, and do below.
12307 #:tests? #f))
12308 (home-page "https://bitbucket.org/runeh/anyjson/")
12309 (synopsis
12310 "Wraps best available JSON implementation in a common interface")
12311 (description
12312 "Anyjson loads whichever is the fastest JSON module installed
12313 and provides a uniform API regardless of which JSON implementation is used.")
12314 (license license:bsd-3)
12315 (properties `((python2-variant . ,(delay python2-anyjson))))))
12316
12317 (define-public python2-anyjson
12318 (let ((anyjson (package-with-python2
12319 (strip-python2-variant python-anyjson))))
12320 (package/inherit anyjson
12321 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
12322 #:tests? #t
12323 ,@(package-arguments anyjson)))
12324 (native-inputs `(("python2-nose" ,python2-nose))))))
12325
12326 (define-public python-amqp
12327 (package
12328 (name "python-amqp")
12329 (version "2.3.2")
12330 (source
12331 (origin
12332 (method url-fetch)
12333 (uri (pypi-uri "amqp" version))
12334 (sha256
12335 (base32
12336 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
12337 (build-system python-build-system)
12338 (native-inputs
12339 `(("python-case" ,python-case)
12340 ("python-pytest-sugar" ,python-pytest-sugar)
12341 ("python-mock" ,python-mock)))
12342 (propagated-inputs
12343 `(("python-vine" ,python-vine)))
12344 (home-page "https://github.com/celery/py-amqp")
12345 (synopsis
12346 "Low-level AMQP client for Python (fork of amqplib)")
12347 (description
12348 "This is a fork of amqplib which was originally written by Barry Pederson.
12349 It is maintained by the Celery project, and used by kombu as a pure python
12350 alternative when librabbitmq is not available.")
12351 (license license:lgpl2.1+)
12352 (properties `((python2-variant . ,(delay python2-amqp))))))
12353
12354 (define-public python2-amqp
12355 (let ((amqp (package-with-python2
12356 (strip-python2-variant python-amqp))))
12357 (package/inherit amqp
12358 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
12359 ;; unmaintained. Weirdly, does not do this on the python 3
12360 ;; version?
12361 #:tests? #f
12362 ,@(package-arguments amqp))))))
12363
12364 (define-public python-txamqp
12365 (package
12366 (name "python-txamqp")
12367 (version "0.8.2")
12368 (source
12369 (origin
12370 (method url-fetch)
12371 (uri (pypi-uri "txAMQP" version))
12372 (sha256
12373 (base32
12374 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
12375 (build-system python-build-system)
12376 (propagated-inputs
12377 `(("python-six" ,python-six)
12378 ("python-twisted" ,python-twisted)))
12379 (home-page "https://github.com/txamqp/txamqp")
12380 (synopsis "Communicate with AMQP peers and brokers using Twisted")
12381 (description
12382 "This package provides a Python library for communicating with AMQP peers
12383 and brokers using the asynchronous networking framework Twisted. It contains
12384 all the necessary code to connect, send and receive messages to/from an
12385 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
12386 also includes support for using Thrift RPC over AMQP in Twisted
12387 applications.")
12388 (license license:asl2.0)))
12389
12390 (define-public python2-txamqp
12391 (package-with-python2 python-txamqp))
12392
12393 (define-public python-kombu
12394 (package
12395 (name "python-kombu")
12396 (version "4.2.2")
12397 (source
12398 (origin
12399 (method url-fetch)
12400 (uri (pypi-uri "kombu" version))
12401 (sha256
12402 (base32
12403 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
12404 (build-system python-build-system)
12405 (native-inputs
12406 `(("python-mock" ,python-mock)
12407 ("python-case" ,python-case)
12408 ("python-pyro4" ,python-pyro4)
12409 ("python-pytest-sugar" ,python-pytest-sugar)
12410 ("python-pytz" ,python-pytz)))
12411 (propagated-inputs
12412 `(("python-anyjson" ,python-anyjson)
12413 ("python-amqp" ,python-amqp)
12414 ("python-redis" ,python-redis)))
12415 (home-page "https://kombu.readthedocs.io")
12416 (synopsis "Message passing library for Python")
12417 (description "The aim of Kombu is to make messaging in Python as easy as
12418 possible by providing an idiomatic high-level interface for the AMQ protocol,
12419 and also provide proven and tested solutions to common messaging problems.
12420 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
12421 message orientation, queuing, routing, reliability and security, for which the
12422 RabbitMQ messaging server is the most popular implementation.")
12423 (license license:bsd-3)
12424 (properties `((python2-variant . ,(delay python2-kombu))))))
12425
12426 (define-public python2-kombu
12427 (let ((kombu (package-with-python2
12428 (strip-python2-variant python-kombu))))
12429 (package/inherit kombu
12430 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
12431 ;; It works fine on the python3 variant.
12432 #:tests? #f
12433 ,@(package-arguments kombu)))
12434 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12435 ,@(package-native-inputs kombu))))))
12436
12437 (define-public python-billiard
12438 (package
12439 (name "python-billiard")
12440 (version "3.5.0.5")
12441 (source
12442 (origin
12443 (method url-fetch)
12444 (uri (pypi-uri "billiard" version))
12445 (sha256
12446 (base32
12447 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
12448 (build-system python-build-system)
12449 (native-inputs
12450 `(("python-case" ,python-case)
12451 ("python-pytest" ,python-pytest)))
12452 (home-page "https://github.com/celery/billiard")
12453 (synopsis
12454 "Python multiprocessing fork with improvements and bugfixes")
12455 (description
12456 "Billiard is a fork of the Python 2.7 multiprocessing package. The
12457 multiprocessing package itself is a renamed and updated version of R Oudkerk's
12458 pyprocessing package. This standalone variant is intended to be compatible with
12459 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
12460 (license license:bsd-3)
12461 (properties `((python2-variant . ,(delay python2-billiard))))))
12462
12463 (define-public python2-billiard
12464 (let ((billiard (package-with-python2
12465 (strip-python2-variant python-billiard))))
12466 (package/inherit billiard
12467 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12468 ("python2-mock" ,python2-mock)
12469 ,@(package-native-inputs billiard))))))
12470
12471 (define-public python-celery
12472 (package
12473 (name "python-celery")
12474 (version "4.2.1")
12475 (source
12476 (origin
12477 (method url-fetch)
12478 (uri (pypi-uri "celery" version))
12479 (sha256
12480 (base32
12481 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
12482 (build-system python-build-system)
12483 (arguments
12484 '(;; TODO The tests fail with Python 3.7
12485 ;; https://github.com/celery/celery/issues/4849
12486 #:tests? #f
12487 #:phases
12488 (modify-phases %standard-phases
12489 (add-after 'unpack 'patch-requirements
12490 (lambda _
12491 (substitute* "requirements/test.txt"
12492 (("pytest>=3\\.0,<3\\.3")
12493 "pytest>=3.0"))
12494 #t)))))
12495 (native-inputs
12496 `(("python-case" ,python-case)
12497 ("python-pytest" ,python-pytest)))
12498 (propagated-inputs
12499 `(("python-pytz" ,python-pytz)
12500 ("python-billiard" ,python-billiard)
12501 ("python-kombu" ,python-kombu)))
12502 (home-page "https://celeryproject.org")
12503 (synopsis "Distributed Task Queue")
12504 (description "Celery is an asynchronous task queue/job queue based on
12505 distributed message passing. It is focused on real-time operation, but
12506 supports scheduling as well. The execution units, called tasks, are executed
12507 concurrently on a single or more worker servers using multiprocessing,
12508 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
12509 synchronously (wait until ready).")
12510 (license license:bsd-3)
12511 (properties `((python2-variant . ,(delay python2-celery))))))
12512
12513 (define-public python2-celery
12514 (let ((celery (package-with-python2
12515 (strip-python2-variant python-celery))))
12516 (package/inherit celery
12517 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12518 ("python2-mock" ,python2-mock)
12519 ,@(package-native-inputs celery))))))
12520
12521 (define-public python-translitcodec
12522 (package
12523 (name "python-translitcodec")
12524 (version "0.4.0")
12525 (source
12526 (origin
12527 (method url-fetch)
12528 (uri (pypi-uri "translitcodec" version))
12529 (sha256
12530 (base32
12531 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
12532 (build-system python-build-system)
12533 (arguments
12534 `(#:tests? #f)) ; no tests provided
12535 (home-page
12536 "https://github.com/claudep/translitcodec")
12537 (synopsis
12538 "Unicode to 8-bit charset transliteration codec")
12539 (description
12540 "This package contains codecs for transliterating ISO 10646 texts into
12541 best-effort representations using smaller coded character sets (ASCII,
12542 ISO 8859, etc.).")
12543 (license license:expat)))
12544
12545 (define-public python2-translitcodec
12546 (package-with-python2 python-translitcodec))
12547
12548 (define-public python-editor
12549 (package
12550 (name "python-editor")
12551 (version "1.0.4")
12552 (source
12553 (origin
12554 (method url-fetch)
12555 (uri (pypi-uri "python-editor" version))
12556 (sha256
12557 (base32
12558 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
12559 (build-system python-build-system)
12560 (arguments
12561 '(#:tests? #f)) ;XXX: needs a TTY and an editor
12562 (home-page "https://github.com/fmoo/python-editor")
12563 (synopsis "Programmatically open an editor, capture the result")
12564 (description
12565 "python-editor is a library that provides the editor module for
12566 programmatically interfacing with your system's $EDITOR.")
12567 (license license:asl2.0)))
12568
12569 (define-public python2-editor
12570 (package-with-python2 python-editor))
12571
12572 (define-public python-multiprocessing-logging
12573 (package
12574 (name "python-multiprocessing-logging")
12575 (version "0.3.1")
12576 (home-page "https://github.com/jruere/multiprocessing-logging")
12577 (source (origin
12578 (method git-fetch)
12579 (uri (git-reference
12580 (url home-page)
12581 (commit (string-append "v" version))))
12582 (file-name (git-file-name name version))
12583 (sha256
12584 (base32
12585 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
12586 (build-system python-build-system)
12587 (synopsis "Manage logs from multiple processes")
12588 (description
12589 "This Python module implements a multiprocessing-aware @code{Handler}
12590 that, when set on the root @code{Logger}, will tunnel log records to the
12591 main process so that they are handled correctly.")
12592 (license license:lgpl3+)))
12593
12594 (define-public python-vobject
12595 (package
12596 (name "python-vobject")
12597 (version "0.9.6.1")
12598 (source (origin
12599 (method url-fetch)
12600 (uri (pypi-uri "vobject" version))
12601 (sha256
12602 (base32
12603 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
12604 (build-system python-build-system)
12605 (arguments
12606 '(;; The test suite relies on some non-portable Windows interfaces.
12607 #:tests? #f))
12608 (propagated-inputs
12609 `(("python-dateutil" ,python-dateutil)
12610 ("python-pyicu" ,python-pyicu)))
12611 (synopsis "Parse and generate vCard and vCalendar files")
12612 (description "Vobject is intended to be a full featured Python package for
12613 parsing and generating vCard and vCalendar files. Currently, iCalendar files
12614 are supported and well tested. vCard 3.0 files are supported, and all data
12615 should be imported, but only a few components are understood in a sophisticated
12616 way.")
12617 (home-page "https://eventable.github.io/vobject/")
12618 (license license:asl2.0)))
12619
12620 (define-public python2-vobject
12621 (package-with-python2 python-vobject))
12622
12623 (define-public python-munkres
12624 (package
12625 (name "python-munkres")
12626 (version "1.0.8")
12627 (source (origin
12628 (method url-fetch)
12629 (uri (pypi-uri "munkres" version))
12630 (sha256
12631 (base32
12632 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
12633 (build-system python-build-system)
12634 (arguments
12635 '(#:tests? #f)) ; no test suite
12636 (home-page "https://software.clapper.org/munkres/")
12637 (synopsis "Implementation of the Munkres algorithm")
12638 (description "The Munkres module provides an implementation of the Munkres
12639 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
12640 useful for solving the Assignment Problem.")
12641 (license license:bsd-3)))
12642
12643 (define-public python2-munkres
12644 (package-with-python2 python-munkres))
12645
12646 (define-public python-whoosh
12647 (package
12648 (name "python-whoosh")
12649 (version "2.7.4")
12650 (source
12651 (origin
12652 (method url-fetch)
12653 (uri (pypi-uri "Whoosh" version))
12654 (sha256
12655 (base32
12656 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
12657 (build-system python-build-system)
12658 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
12659 (native-inputs
12660 `(("python-pytest" ,python-pytest)))
12661 (home-page "https://bitbucket.org/mchaput/whoosh")
12662 (synopsis "Full text indexing, search, and spell checking library")
12663 (description
12664 "Whoosh is a fast, pure-Python full text indexing, search, and spell
12665 checking library.")
12666 (license license:bsd-2)))
12667
12668 (define-public python2-whoosh
12669 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
12670 (package/inherit whoosh
12671 (propagated-inputs
12672 `(("python2-backport-ssl-match-hostname"
12673 ,python2-backport-ssl-match-hostname)
12674 ,@(package-propagated-inputs whoosh))))))
12675
12676 (define-public python-pathlib
12677 (package
12678 (name "python-pathlib")
12679 (version "1.0.1")
12680 (source (origin
12681 (method url-fetch)
12682 (uri (pypi-uri "pathlib" version))
12683 (sha256
12684 (base32
12685 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
12686 (build-system python-build-system)
12687 ;; The tests depend on the internal "test" module, which does not provide
12688 ;; a stable interface.
12689 (arguments `(#:tests? #f))
12690 (home-page "https://pathlib.readthedocs.org/")
12691 (synopsis "Object-oriented file system paths")
12692 (description "Pathlib offers a set of classes to handle file system paths.
12693 It offers the following advantages over using string objects:
12694
12695 @enumerate
12696 @item No more cumbersome use of os and os.path functions. Everything can
12697 be done easily through operators, attribute accesses, and method calls.
12698 @item Embodies the semantics of different path types. For example,
12699 comparing Windows paths ignores casing.
12700 @item Well-defined semantics, eliminating any inconsistencies or
12701 ambiguities (forward vs. backward slashes, etc.).
12702 @end enumerate
12703
12704 Note: In Python 3.4, pathlib is now part of the standard library. For other
12705 Python versions please consider python-pathlib2 instead, which tracks the
12706 standard library module. This module (python-pathlib) isn't maintained
12707 anymore.")
12708 (license license:expat)))
12709
12710 (define-public python2-pathlib
12711 (package-with-python2 python-pathlib))
12712
12713 (define-public python2-pathlib2
12714 (package
12715 (name "python2-pathlib2")
12716 (version "2.3.5")
12717 (source (origin
12718 (method url-fetch)
12719 (uri (pypi-uri "pathlib2" version))
12720 (sha256
12721 (base32
12722 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
12723 (build-system python-build-system)
12724 ;; We only need the the Python 2 variant, since for Python 3 our minimum
12725 ;; version is 3.4 which already includes this package as part of the
12726 ;; standard library.
12727 (arguments
12728 `(#:python ,python-2))
12729 (propagated-inputs
12730 `(("python2-scandir" ,python2-scandir)
12731 ("python2-six" ,python2-six)))
12732 (home-page "https://pypi.org/project/pathlib2/")
12733 (synopsis "Object-oriented file system paths - backport of standard
12734 pathlib module")
12735 (description "The goal of pathlib2 is to provide a backport of standard
12736 pathlib module which tracks the standard library module, so all the newest
12737 features of the standard pathlib can be used also on older Python versions.
12738
12739 Pathlib offers a set of classes to handle file system paths. It offers the
12740 following advantages over using string objects:
12741
12742 @enumerate
12743 @item No more cumbersome use of os and os.path functions. Everything can
12744 be done easily through operators, attribute accesses, and method calls.
12745 @item Embodies the semantics of different path types. For example,
12746 comparing Windows paths ignores casing.
12747 @item Well-defined semantics, eliminating any inconsistencies or
12748 ambiguities (forward vs. backward slashes, etc.).
12749 @end enumerate")
12750 (license license:expat)))
12751
12752 (define-public python2-pathlib2-bootstrap
12753 (hidden-package
12754 (package
12755 (inherit python2-pathlib2)
12756 (name "python2-pathlib2-bootstrap")
12757 (propagated-inputs
12758 `(("python2-scandir" ,python2-scandir)
12759 ("python2-six" ,python2-six-bootstrap))))))
12760
12761 (define-public python-jellyfish
12762 (package
12763 (name "python-jellyfish")
12764 (version "0.5.6")
12765 (source (origin
12766 (method url-fetch)
12767 (uri (pypi-uri "jellyfish" version))
12768 (sha256
12769 (base32
12770 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
12771 (build-system python-build-system)
12772 (native-inputs
12773 `(("python-pytest" ,python-pytest)))
12774 (home-page "https://github.com/jamesturk/jellyfish")
12775 (synopsis "Approximate and phonetic matching of strings")
12776 (description "Jellyfish uses a variety of string comparison and phonetic
12777 encoding algorithms to do fuzzy string matching.")
12778 (license license:bsd-2)
12779 (properties `((python2-variant . ,(delay python2-jellyfish))))))
12780
12781 (define-public python2-jellyfish
12782 (let ((jellyfish (package-with-python2
12783 (strip-python2-variant python-jellyfish))))
12784 (package/inherit jellyfish
12785 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
12786 ,@(package-native-inputs jellyfish))))))
12787
12788 (define-public python2-unicodecsv
12789 (package
12790 (name "python2-unicodecsv")
12791 (version "0.14.1")
12792 (source (origin
12793 (method git-fetch)
12794 ;; The test suite is not included in the PyPi release.
12795 ;; https://github.com/jdunck/python-unicodecsv/issues/19
12796 (uri (git-reference
12797 (url "https://github.com/jdunck/python-unicodecsv")
12798 (commit version)))
12799 (file-name (git-file-name name version))
12800 (sha256
12801 (base32
12802 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
12803 (build-system python-build-system)
12804 (arguments
12805 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
12806 #:python ,python-2))
12807 (native-inputs
12808 `(("python2-unittest2" ,python2-unittest2)))
12809 (home-page "https://github.com/jdunck/python-unicodecsv")
12810 (synopsis "Unicode CSV module for Python 2")
12811 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
12812 module, adding support for Unicode strings.")
12813 (license license:bsd-2)))
12814
12815 (define-public python-pdfminer-six
12816 (package
12817 (name "python-pdfminer-six")
12818 (version "20201018")
12819 ;; There are no tests in the PyPI tarball.
12820 (source
12821 (origin
12822 (method git-fetch)
12823 (uri (git-reference
12824 (url "https://github.com/pdfminer/pdfminer.six")
12825 (commit version)))
12826 (file-name (git-file-name name version))
12827 (sha256
12828 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
12829 (build-system python-build-system)
12830 (arguments
12831 `(#:phases
12832 (modify-phases %standard-phases
12833 ;; Tests write to the source tree.
12834 (add-after 'unpack 'make-git-checkout-writable
12835 (lambda _
12836 (for-each make-file-writable (find-files "."))
12837 #t))
12838 (replace 'check
12839 (lambda _
12840 (invoke "make" "test")))
12841 (add-before 'reset-gzip-timestamps 'make-files-writable
12842 (lambda* (#:key outputs #:allow-other-keys)
12843 (let ((out (assoc-ref outputs "out")))
12844 (for-each make-file-writable
12845 (find-files out "\\.gz$"))
12846 #t))))))
12847 (propagated-inputs
12848 `(("python-chardet" ,python-chardet)
12849 ("python-cryptography" ,python-cryptography)
12850 ("python-sortedcontainers" ,python-sortedcontainers)))
12851 (native-inputs
12852 `(("python-nose" ,python-nose)
12853 ("python-tox" ,python-tox)))
12854 (home-page "https://github.com/pdfminer/pdfminer.six")
12855 (synopsis "PDF parser and analyzer")
12856 (description "@code{pdfminer.six} is a community maintained fork of
12857 the original PDFMiner. It is a tool for extracting information from PDF
12858 documents. It focuses on getting and analyzing text data. Pdfminer.six
12859 extracts the text from a page directly from the sourcecode of the PDF. It
12860 can also be used to get the exact location, font or color of the text.")
12861 (license license:expat)))
12862
12863 (define-public python-rarfile
12864 (package
12865 (name "python-rarfile")
12866 (version "2.8")
12867 (source (origin
12868 (method url-fetch)
12869 (uri (pypi-uri "rarfile" version))
12870 (sha256
12871 (base32
12872 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
12873 (build-system python-build-system)
12874 (arguments
12875 '(#:phases
12876 (modify-phases %standard-phases
12877 (replace 'check
12878 ;; Many tests fail, but the installation proceeds.
12879 (lambda _ (invoke "make" "-C" "test" "test"))))))
12880 (native-inputs
12881 `(("which" ,which))) ; required for tests
12882 (propagated-inputs
12883 `(("libarchive" ,libarchive)))
12884 (home-page "https://github.com/markokr/rarfile")
12885 (synopsis "RAR archive reader for Python")
12886 (description "This is Python module for RAR archive reading. The interface
12887 is made as zipfile like as possible.")
12888 (license license:isc)))
12889
12890 (define-public python2-rarfile
12891 (package-with-python2 python-rarfile))
12892
12893 (define-public python-magic
12894 (package
12895 (name "python-magic")
12896 (version "0.4.15")
12897 (source
12898 (origin
12899 (method url-fetch)
12900 (uri (pypi-uri "python-magic" version))
12901 (sha256
12902 (base32
12903 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
12904 (file-name (string-append name "-" version "-checkout"))))
12905 (build-system python-build-system)
12906 (arguments
12907 ;; The tests are unreliable, so don't run them. The tests fail
12908 ;; under Python3 because they were written for Python2 and
12909 ;; contain import statements that do not work in Python3. One of
12910 ;; the tests fails under Python2 because its assertions are
12911 ;; overly stringent; it relies on comparing output strings which
12912 ;; are brittle and can change depending on the version of
12913 ;; libmagic being used and the system on which the test is
12914 ;; running. In my case, under GuixSD 0.10.0, only one test
12915 ;; failed, and it seems to have failed only because the version
12916 ;; of libmagic that is packaged in Guix outputs a slightly
12917 ;; different (but not wrong) string than the one that the test
12918 ;; expected.
12919 '(#:tests? #f
12920 #:phases (modify-phases %standard-phases
12921 ;; Replace a specific method call with a hard-coded
12922 ;; path to the necessary libmagic.so file in the
12923 ;; store. If we don't do this, then the method call
12924 ;; will fail to find the libmagic.so file, which in
12925 ;; turn will cause any application using
12926 ;; python-magic to fail.
12927 (add-before 'build 'hard-code-path-to-libmagic
12928 (lambda* (#:key inputs #:allow-other-keys)
12929 (let ((file (assoc-ref inputs "file")))
12930 (substitute* "magic.py"
12931 (("ctypes.util.find_library\\('magic'\\)")
12932 (string-append "'" file "/lib/libmagic.so'")))
12933 #t)))
12934 (add-before 'install 'disable-egg-compression
12935 (lambda _
12936 (let ((port (open-file "setup.cfg" "a")))
12937 (display "\n[easy_install]\nzip_ok = 0\n"
12938 port)
12939 (close-port port)
12940 #t))))))
12941 (inputs
12942 ;; python-magic needs to be able to find libmagic.so.
12943 `(("file" ,file)))
12944 (home-page
12945 "https://github.com/ahupp/python-magic")
12946 (synopsis
12947 "File type identification using libmagic")
12948 (description
12949 "This module uses ctypes to access the libmagic file type
12950 identification library. It makes use of the local magic database and
12951 supports both textual and MIME-type output. Note that this module and
12952 the python-file module both provide a \"magic.py\" file; these two
12953 modules, which are different and were developed separately, both serve
12954 the same purpose: to provide Python bindings for libmagic.")
12955 (license license:expat)))
12956
12957 (define-public python2-magic
12958 (package-with-python2 python-magic))
12959
12960 (define-public python2-s3cmd
12961 (package
12962 (name "python2-s3cmd")
12963 (version "1.6.1")
12964 (source
12965 (origin
12966 (method url-fetch)
12967 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12968 "s3cmd-" version ".tar.gz"))
12969 (sha256
12970 (base32
12971 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12972 (build-system python-build-system)
12973 (arguments
12974 ;; s3cmd is written for python2 only and contains no tests.
12975 `(#:python ,python-2
12976 #:tests? #f))
12977 (propagated-inputs
12978 `(("python2-dateutil" ,python2-dateutil)
12979 ;; The python-file package also provides a magic.py module.
12980 ;; This is an unfortunate state of affairs; however, s3cmd
12981 ;; fails to install if it cannot find specifically the
12982 ;; python-magic package. Thus we include it, instead of using
12983 ;; python-file. Ironically, s3cmd sometimes works better
12984 ;; without libmagic bindings at all:
12985 ;; https://github.com/s3tools/s3cmd/issues/198
12986 ("python2-magic" ,python2-magic)))
12987 (home-page "https://s3tools.org/s3cmd")
12988 (synopsis "Command line tool for S3-compatible storage services")
12989 (description
12990 "S3cmd is a command line tool for uploading, retrieving and managing data
12991 in storage services that are compatible with the Amazon Simple Storage
12992 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12993 GnuPG encryption, and more. It also supports management of Amazon's
12994 CloudFront content delivery network.")
12995 (license license:gpl2+)))
12996
12997 (define-public python-pkgconfig
12998 (package
12999 (name "python-pkgconfig")
13000 (version "1.3.1")
13001 (source
13002 (origin
13003 (method url-fetch)
13004 (uri (pypi-uri "pkgconfig" version))
13005 (sha256
13006 (base32
13007 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
13008 (build-system python-build-system)
13009 (native-inputs
13010 `(("python-nose" ,python-nose)))
13011 (inputs
13012 `(("pkg-config" ,pkg-config)))
13013 (arguments
13014 `(#:phases
13015 (modify-phases %standard-phases
13016 (add-before 'build 'patch
13017 ;; Hard-code the path to pkg-config.
13018 (lambda _
13019 (substitute* "pkgconfig/pkgconfig.py"
13020 (("cmd = 'pkg-config")
13021 (string-append "cmd = '" (which "pkg-config"))))
13022 #t))
13023 (replace 'check
13024 (lambda _
13025 (invoke "nosetests" "test.py"))))))
13026 (home-page "https://github.com/matze/pkgconfig")
13027 (synopsis "Python interface for pkg-config")
13028 (description "This module provides a Python interface to pkg-config. It
13029 can be used to find all pkg-config packages, check if a package exists,
13030 check if a package meets certain version requirements, query CFLAGS and
13031 LDFLAGS and parse the output to build extensions with setup.py.")
13032 (license license:expat)))
13033
13034 (define-public python2-pkgconfig
13035 (package-with-python2 python-pkgconfig))
13036
13037 (define-public python-bz2file
13038 (package
13039 (name "python-bz2file")
13040 (version "0.98")
13041 (source
13042 (origin
13043 (method url-fetch)
13044 (uri (pypi-uri "bz2file" version))
13045 (sha256
13046 (base32
13047 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
13048 (build-system python-build-system)
13049 (arguments
13050 `(#:tests? #f)) ; Tests use deprecated python modules.
13051 (home-page "https://github.com/nvawda/bz2file")
13052 (synopsis "Read and write bzip2-compressed files")
13053 (description
13054 "Bz2file is a Python library for reading and writing bzip2-compressed
13055 files. It contains a drop-in replacement for the I/O interface in the
13056 standard library's @code{bz2} module, including features from the latest
13057 development version of CPython that are not available in older releases.")
13058 (license license:asl2.0)))
13059
13060 (define-public python2-bz2file
13061 (package-with-python2 python-bz2file))
13062
13063 (define-public python-future
13064 (package
13065 (name "python-future")
13066 (version "0.17.1")
13067 (source
13068 (origin
13069 (method url-fetch)
13070 (uri (pypi-uri "future" version))
13071 (sha256
13072 (base32
13073 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
13074 (build-system python-build-system)
13075 ;; Many tests connect to the network or are otherwise flawed.
13076 ;; https://github.com/PythonCharmers/python-future/issues/210
13077 (arguments
13078 `(#:tests? #f))
13079 (home-page "https://python-future.org")
13080 (synopsis "Single-source support for Python 3 and 2")
13081 (description
13082 "@code{python-future} is the missing compatibility layer between Python 2 and
13083 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
13084 to support both Python 2 and Python 3 with minimal overhead.")
13085 (license license:expat)))
13086
13087 (define-public python2-future
13088 (package-with-python2 python-future))
13089
13090 (define-public python-cysignals
13091 (package
13092 (name "python-cysignals")
13093 (version "1.9.0")
13094 (source
13095 (origin
13096 (method url-fetch)
13097 (uri (pypi-uri "cysignals" version))
13098 (sha256
13099 (base32
13100 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
13101 (build-system python-build-system)
13102 (native-inputs
13103 `(("python-cython" ,python-cython)
13104 ("python-sphinx" ,python-sphinx)))
13105 (inputs
13106 `(("pari-gp" ,pari-gp)))
13107 (arguments
13108 `(#:modules ((guix build python-build-system)
13109 ((guix build gnu-build-system) #:prefix gnu:)
13110 (guix build utils))
13111 ;; FIXME: Tests are executed after installation and currently fail
13112 ;; when not installing into standard locations; the author is working
13113 ;; on a fix.
13114 #:tests? #f
13115 #:phases
13116 (modify-phases %standard-phases
13117 (add-before
13118 'build 'configure
13119 (assoc-ref gnu:%standard-phases 'configure)))))
13120 (home-page
13121 "https://github.com/sagemath/cysignals")
13122 (synopsis
13123 "Handling of interrupts and signals for Cython")
13124 (description
13125 "The cysignals package provides mechanisms to handle interrupts (and
13126 other signals and errors) in Cython code, using two related approaches,
13127 for mixed Cython/Python code or external C libraries and pure Cython code,
13128 respectively.")
13129 (license license:lgpl3+)))
13130
13131 (define-public python2-cysignals
13132 (package-with-python2 python-cysignals))
13133
13134 (define-public python2-shedskin
13135 (package
13136 (name "python2-shedskin")
13137 (version "0.9.4")
13138 (source
13139 (origin
13140 (method url-fetch)
13141 (uri (string-append "https://github.com/shedskin/shedskin/"
13142 "releases/download/v" version
13143 "/shedskin-" version ".tgz"))
13144 (sha256
13145 (base32
13146 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
13147 (build-system python-build-system)
13148 (arguments
13149 `(#:python ,python-2
13150 #:phases (modify-phases %standard-phases
13151 (add-after 'unpack 'fix-resulting-include-libs
13152 (lambda* (#:key inputs #:allow-other-keys)
13153 (let ((libgc (assoc-ref inputs "libgc"))
13154 (pcre (assoc-ref inputs "pcre")))
13155 (substitute* "shedskin/makefile.py"
13156 (("variable == 'CCFLAGS':[ ]*")
13157 (string-append "variable == 'CCFLAGS':\n"
13158 " line += ' -I " pcre "/include"
13159 " -I " libgc "/include'"))
13160 (("variable == 'LFLAGS':[ ]*")
13161 (string-append "variable == 'LFLAGS':\n"
13162 " line += ' -L" pcre "/lib"
13163 " -L " libgc "/lib'")))
13164 #t))))))
13165 (inputs `(("pcre" ,pcre)
13166 ("libgc" ,libgc)))
13167 (home-page "https://shedskin.github.io/")
13168 (synopsis "Experimental Python-2 to C++ Compiler")
13169 (description (string-append "This is an experimental compiler for a subset of
13170 Python. It generates C++ code and a Makefile."))
13171 (license (list license:gpl3 license:bsd-3 license:expat))))
13172
13173 (define-public python2-rope
13174 (package
13175 (name "python2-rope")
13176 (version "0.11.0")
13177 (source
13178 (origin
13179 (method url-fetch)
13180 (uri (pypi-uri "rope" version))
13181 (sha256
13182 (base32
13183 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
13184 (arguments
13185 ;; Rope has only partial python3 support, see `python-rope'
13186 `(#:python ,python-2))
13187 (build-system python-build-system)
13188 (native-inputs
13189 `(("python2-unittest2" ,python2-unittest2)))
13190 (home-page "https://github.com/python-rope/rope")
13191 (synopsis "Refactoring library for Python")
13192 (description "Rope is a refactoring library for Python. It facilitates
13193 the renaming, moving and extracting of attributes, functions, modules, fields
13194 and parameters in Python 2 source code. These refactorings can also be applied
13195 to occurrences in strings and comments.")
13196 (license license:gpl2)))
13197
13198 (define-public python-rope
13199 (package/inherit python2-rope
13200 (name "python-rope")
13201 (arguments `(#:python ,python-wrapper
13202 ;; XXX: Only partial python3 support, results in some failing
13203 ;; tests: <https://github.com/python-rope/rope/issues/247>.
13204 #:tests? #f))
13205 (properties `((python2-variant . ,(delay python2-rope))))))
13206
13207 (define-public python-py3status
13208 (package
13209 (name "python-py3status")
13210 (version "3.21")
13211 (source
13212 (origin
13213 (method url-fetch)
13214 (uri (pypi-uri "py3status" version))
13215 (sha256
13216 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
13217 (build-system python-build-system)
13218 (inputs
13219 `(("file" ,file)))
13220 (arguments
13221 '(#:phases
13222 (modify-phases %standard-phases
13223 ;; 'file' is used for detection of configuration file encoding
13224 ;; let's make link the dependency to particular input
13225 (add-before 'build 'patch-file-path
13226 (lambda* (#:key inputs #:allow-other-keys)
13227 (let ((file-path (assoc-ref inputs "file")))
13228 (substitute* "py3status/parse_config.py"
13229 (("\\[\"file\", \"-b\"")
13230 (string-append "['" file-path "/bin/file', '-b'")))
13231 #t))))
13232 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
13233 (home-page "https://github.com/ultrabug/py3status")
13234 (synopsis "Extensible i3status wrapper written in Python")
13235 (description "py3status is an i3status wrapper which extends i3status
13236 functionality in a modular way, allowing you to extend your panel with your
13237 own code, responding to click events and updating clock every second.")
13238 (license license:bsd-3)))
13239
13240 (define-public python2-selectors2
13241 (package
13242 (name "python2-selectors2")
13243 (version "2.0.1")
13244 (source (origin
13245 (method url-fetch)
13246 (uri (pypi-uri "selectors2" version))
13247 (sha256
13248 (base32
13249 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
13250 (build-system python-build-system)
13251 (arguments
13252 `(#:python ,python-2))
13253 (native-inputs
13254 `(("python2-mock" ,python2-mock)
13255 ("python2-psutil" ,python2-psutil)))
13256 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
13257 (synopsis "Backport of the selectors module from Python 3.5+")
13258 (description
13259 "This package provides a drop-in replacement for the @code{selectors}
13260 module in Python 3.5 and later.")
13261 (license license:expat)))
13262
13263 (define-public python-tblib
13264 (package
13265 (name "python-tblib")
13266 (version "1.6.0")
13267 (source (origin
13268 (method url-fetch)
13269 (uri (pypi-uri "tblib" version))
13270 (sha256
13271 (base32
13272 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
13273 (build-system python-build-system)
13274 (arguments
13275 `(#:phases
13276 (modify-phases %standard-phases
13277 (replace 'check
13278 (lambda _
13279 ;; Upstream runs tests after installation and the package itself
13280 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
13281 ;; found.
13282 (setenv "PYTHONPATH"
13283 (string-append (getcwd) "/build/lib:"
13284 (getenv "PYTHONPATH")))
13285 (invoke "py.test" "-vv" "tests" "README.rst"))))))
13286 (native-inputs
13287 `(("python-pytest" ,python-pytest)
13288 ("python-six" ,python-six)))
13289 (home-page "https://github.com/ionelmc/python-tblib")
13290 (synopsis "Traceback serialization library")
13291 (description
13292 "Traceback serialization allows you to:
13293
13294 @enumerate
13295 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
13296 different processes. This allows better error handling when running code over
13297 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
13298
13299 @item Parse traceback strings and raise with the parsed tracebacks.
13300 @end enumerate\n")
13301 (license license:bsd-3)))
13302
13303 (define-public python2-tblib
13304 (package-with-python2 python-tblib))
13305
13306 (define-public python-greenlet
13307 (package
13308 (name "python-greenlet")
13309 (version "1.0.0")
13310 (source (origin
13311 (method url-fetch)
13312 (uri (pypi-uri "greenlet" version))
13313 (sha256
13314 (base32
13315 "1y6wbg9yhm9dw6m768n4yslp56h85pnxkk3drz6icn15g6f1d7ki"))))
13316 (build-system python-build-system)
13317 (home-page "https://greenlet.readthedocs.io/")
13318 (synopsis "Lightweight in-process concurrent programming")
13319 (description
13320 "Greenlet package is a spin-off of Stackless, a version of CPython
13321 that supports micro-threads called \"tasklets\". Tasklets run
13322 pseudo-concurrently (typically in a single or a few OS-level threads) and
13323 are synchronized with data exchanges on \"channels\".")
13324 (license (list license:psfl license:expat))))
13325
13326 (define-public python-objgraph
13327 (package
13328 (name "python-objgraph")
13329 (version "3.4.1")
13330 (source
13331 (origin
13332 (method url-fetch)
13333 (uri (pypi-uri "objgraph" version))
13334 (sha256
13335 (base32
13336 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
13337 (build-system python-build-system)
13338 (propagated-inputs
13339 `(("python-graphviz" ,python-graphviz)))
13340 (native-inputs
13341 `(("python-mock" ,python-mock)
13342 ("graphviz" ,graphviz)))
13343 (home-page "https://mg.pov.lt/objgraph/")
13344 (synopsis "Draw Python object reference graphs with graphviz")
13345 (description
13346 "This package provides tools to draw Python object reference graphs with
13347 graphviz.")
13348 (license license:expat)))
13349
13350 (define-public python2-objgraph
13351 (package-with-python2 python-objgraph))
13352
13353 (define-public python-gevent
13354 (package
13355 (name "python-gevent")
13356 (version "21.1.2")
13357 (source (origin
13358 (method url-fetch)
13359 (uri (pypi-uri "gevent" version))
13360 (sha256
13361 (base32
13362 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
13363 (modules '((guix build utils)))
13364 (snippet
13365 '(begin
13366 ;; unbunding libev and c-ares
13367 (delete-file-recursively "deps")))))
13368 (build-system python-build-system)
13369 (arguments
13370 `(#:modules ((ice-9 ftw)
13371 (ice-9 match)
13372 (srfi srfi-26)
13373 (guix build utils)
13374 (guix build python-build-system))
13375 #:phases (modify-phases %standard-phases
13376 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
13377 (lambda _
13378 (substitute* "src/gevent/subprocess.py"
13379 (("/bin/sh") (which "sh")))
13380 (for-each (lambda (file)
13381 (substitute* file
13382 (("/bin/sh") (which "sh"))
13383 (("/bin/true") (which "true"))))
13384 (find-files "src/greentest" "\\.py$"))))
13385 (add-before 'build 'do-not-use-bundled-sources
13386 (lambda _
13387 (setenv "GEVENTSETUP_EMBED" "0")
13388
13389 ;; Prevent building bundled libev.
13390 (substitute* "setup.py"
13391 (("run_make=_BUILDING")
13392 "run_make=False"))))
13393 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
13394 (lambda* (#:key inputs #:allow-other-keys)
13395 (let ((greenlet (string-append
13396 (assoc-ref inputs "python-greenlet")
13397 "/include")))
13398 (match (scandir greenlet
13399 (lambda (item)
13400 (string-prefix? "python" item)))
13401 ((python)
13402 (setenv "C_INCLUDE_PATH"
13403 (string-append greenlet "/" python ":"
13404 (or (getenv "C_INCLUDE_PATH")
13405 ""))))))))
13406 (add-before 'check 'pretend-to-be-CI
13407 (lambda _
13408 ;; A few tests are skipped due to network constraints or
13409 ;; get longer timeouts when running in a CI environment.
13410 ;; Piggy-back on that, as we need the same adjustments.
13411 (setenv "TRAVIS" "1")
13412 (setenv "APPVEYOR" "1")))
13413 (add-before 'check 'adjust-tests
13414 (lambda _
13415 (let ((disabled-tests
13416 '(;; These tests relies on networking which is
13417 ;; not available in the build container.
13418 "test__getaddrinfo_import.py"
13419 "test__server_pywsgi.py"
13420 ;; XXX: These tests borrow functionality from the
13421 ;; Python builtin 'test' module, but it is not
13422 ;; installed with the Guix Python distribution.
13423 "test_smtpd.py"
13424 "test_wsgiref.py"
13425 "test_urllib2.py"
13426 "test_thread.py"
13427 "test_threading.py"
13428 "test__threading_2.py"
13429 ;; These tests rely on KeyboardInterrupts which do not
13430 ;; work inside the build container for some reason
13431 ;; (lack of controlling terminal?).
13432 "test_subprocess.py"
13433 "test__issues461_471.py"
13434 ;; TODO: Patch out the tests that use getprotobyname, etc
13435 ;; instead of disabling all the tests from these files.
13436 "test__resolver_dnspython.py"
13437 "test__doctests.py"
13438 "test__all__.py"
13439 "test___config.py"
13440 "test__execmodules.py")))
13441 (call-with-output-file "skipped_tests.txt"
13442 (lambda (port)
13443 (format port "~a~%"
13444 (string-join disabled-tests "\n")))))))
13445 (replace 'check
13446 (lambda _
13447 ;; Make sure the build directory is on PYTHONPATH.
13448 (setenv "PYTHONPATH"
13449 (string-append
13450 (getenv "PYTHONPATH") ":"
13451 (getcwd) "/build/"
13452 (car (scandir "build" (cut string-prefix? "lib." <>)))))
13453
13454 ;; Use the build daemons configured number of workers.
13455 (setenv "NWORKERS" (number->string (parallel-job-count)))
13456
13457 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
13458 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
13459 (propagated-inputs
13460 `(("python-greenlet" ,python-greenlet)
13461 ("python-objgraph" ,python-objgraph)
13462 ("python-zope.event" ,python-zope-event)
13463 ("python-zope.interface" ,python-zope-interface)))
13464 (native-inputs
13465 `(("python-six" ,python-six)
13466
13467 ;; For tests.
13468 ("python-dnspython" ,python-dnspython)
13469 ("python-psutil" ,python-psutil)))
13470 (inputs
13471 `(("c-ares" ,c-ares)
13472 ("libev" ,libev)))
13473 (home-page "https://www.gevent.org/")
13474 (synopsis "Coroutine-based network library")
13475 (description
13476 "@code{gevent} is a coroutine-based Python networking library that uses
13477 @code{greenlet} to provide a high-level synchronous API on top of the
13478 @code{libev} event loop.")
13479 (license license:expat)))
13480
13481 (define-public python-fastimport
13482 (package
13483 (name "python-fastimport")
13484 (version "0.9.9")
13485 (source
13486 (origin
13487 (method url-fetch)
13488 (uri (pypi-uri "fastimport" version))
13489 (sha256
13490 (base32 "06gk14qgm9dxx3pzjn0ckdbywc8ial2bjfzddqwlr4bn1nnqkbll"))))
13491 (build-system python-build-system)
13492 (home-page "https://github.com/jelmer/python-fastimport")
13493 (synopsis "VCS fastimport parser and generator in Python")
13494 (description "This package provides a parser for and generator of the Git
13495 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
13496 format.")
13497 (license license:gpl2+)))
13498
13499 (define-public python2-fastimport
13500 (package-with-python2 python-fastimport))
13501
13502 (define-public python-twisted
13503 (package
13504 (name "python-twisted")
13505 (version "19.7.0")
13506 (source (origin
13507 (method url-fetch)
13508 (uri (pypi-uri "Twisted" version ".tar.bz2"))
13509 (sha256
13510 (base32
13511 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
13512 (build-system python-build-system)
13513 (arguments
13514 '(#:tests? #f)) ; FIXME: some tests fail
13515 (propagated-inputs
13516 `(("python-zope-interface" ,python-zope-interface)
13517 ("python-pyhamcrest" ,python-pyhamcrest)
13518 ("python-incremental" ,python-incremental)
13519 ("python-hyperlink" ,python-hyperlink)
13520 ("python-constantly" ,python-constantly)
13521 ("python-automat" ,python-automat)))
13522 (home-page "https://twistedmatrix.com/")
13523 (synopsis "Asynchronous networking framework written in Python")
13524 (description
13525 "Twisted is an extensible framework for Python programming, with special
13526 focus on event-based network programming and multiprotocol integration.")
13527 (license license:expat)))
13528
13529 (define-public python2-twisted
13530 (package-with-python2 python-twisted))
13531
13532 (define-public python-pika
13533 (package
13534 (name "python-pika")
13535 (version "0.12.0")
13536 (source
13537 (origin
13538 (method url-fetch)
13539 (uri (pypi-uri "pika" version))
13540 (sha256
13541 (base32
13542 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
13543 (build-system python-build-system)
13544 (native-inputs
13545 `(("python-pyev" ,python-pyev)
13546 ("python-tornado" ,python-tornado)
13547 ("python-twisted" ,python-twisted)))
13548 (home-page "https://pika.readthedocs.org")
13549 (synopsis "Pure Python AMQP Client Library")
13550 (description
13551 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
13552 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
13553 network support library.")
13554 (license license:bsd-3)))
13555
13556 (define-public python2-pika
13557 (package-with-python2 python-pika))
13558
13559 (define-public python-ply
13560 (package
13561 (name "python-ply")
13562 (version "3.11")
13563 (source
13564 (origin
13565 (method url-fetch)
13566 (uri (pypi-uri "ply" version))
13567 (sha256
13568 (base32
13569 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
13570 (build-system python-build-system)
13571 (home-page "http://www.dabeaz.com/ply/")
13572 (synopsis "Python Lex & Yacc")
13573 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
13574 It uses LR parsing and does extensive error checking.")
13575 (license license:bsd-3)))
13576
13577 (define-public python-tabulate
13578 (package
13579 (name "python-tabulate")
13580 (version "0.8.9")
13581 (source (origin
13582 (method url-fetch)
13583 (uri (pypi-uri "tabulate" version))
13584 (sha256
13585 (base32
13586 "19qkdz8xwk5jxa5xn53mnk76qnh4ysm81vzj664jw1b0azr167gb"))))
13587 (build-system python-build-system)
13588 (arguments
13589 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
13590 ;; and the latest release is not tagged in the upstream repository.
13591 '(#:tests? #f))
13592 (home-page "https://bitbucket.org/astanin/python-tabulate")
13593 (synopsis "Pretty-print tabular data")
13594 (description
13595 "Tabulate is a library and command-line utility to pretty-print tabular
13596 data in Python.")
13597 (license license:expat)))
13598
13599 (define-public python2-tabulate
13600 (package-with-python2 python-tabulate))
13601
13602 (define-public python-kazoo
13603 (package
13604 (name "python-kazoo")
13605 (version "2.4.0")
13606 (source
13607 (origin
13608 (method url-fetch)
13609 (uri (pypi-uri "kazoo" version))
13610 (sha256
13611 (base32
13612 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
13613 (build-system python-build-system)
13614 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
13615 (propagated-inputs
13616 `(("python-six" ,python-six)))
13617 (home-page "https://kazoo.readthedocs.org")
13618 (synopsis "High-level Zookeeper client library")
13619 (description
13620 "Kazoo is a Python client library for the Apache Zookeeper distributed
13621 application service. It is designed to be easy to use and to avoid common
13622 programming errors.")
13623 (license license:asl2.0)))
13624
13625 (define-public python2-kazoo
13626 (package-with-python2 python-kazoo))
13627
13628 (define-public python-pykafka
13629 (package
13630 (name "python-pykafka")
13631 (version "2.4.0")
13632 (source (origin
13633 (method url-fetch)
13634 (uri (pypi-uri "pykafka" version))
13635 (sha256
13636 (base32
13637 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
13638 (build-system python-build-system)
13639 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
13640 (propagated-inputs
13641 `(("python-gevent" ,python-gevent)
13642 ("python-kazoo" ,python-kazoo)
13643 ("python-tabulate" ,python-tabulate)))
13644 (inputs
13645 `(("librdkafka" ,librdkafka)))
13646 (home-page "https://pykafka.readthedocs.io/")
13647 (synopsis "Apache Kafka client for Python")
13648 (description
13649 "PyKafka is a client for the Apache Kafka distributed messaging system.
13650 It includes Python implementations of Kafka producers and consumers, which
13651 are optionally backed by a C extension built on librdkafka.")
13652 (license license:asl2.0)))
13653
13654 (define-public python-wcwidth
13655 (package
13656 (name "python-wcwidth")
13657 (version "0.1.8")
13658 (source (origin
13659 (method url-fetch)
13660 (uri (pypi-uri "wcwidth" version))
13661 (sha256
13662 (base32
13663 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
13664 (build-system python-build-system)
13665 (home-page "https://github.com/jquast/wcwidth")
13666 (synopsis "Measure number of terminal column cells of wide-character codes")
13667 (description "Wcwidth measures the number of terminal column cells of
13668 wide-character codes. It is useful for those implementing a terminal emulator,
13669 or programs that carefully produce output to be interpreted by one. It is a
13670 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
13671 specified in POSIX.1-2001 and POSIX.1-2008.")
13672 (license license:expat)))
13673
13674 (define-public python2-wcwidth
13675 (package-with-python2 python-wcwidth))
13676
13677 (define-public python2-jsonrpclib
13678 (package
13679 (name "python2-jsonrpclib")
13680 (version "0.1.7")
13681 (source (origin
13682 (method url-fetch)
13683 (uri (pypi-uri "jsonrpclib" version))
13684 (sha256
13685 (base32
13686 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
13687 (build-system python-build-system)
13688 (arguments
13689 `(#:tests? #f
13690 #:python ,python-2))
13691 (home-page "https://github.com/joshmarshall/jsonrpclib/")
13692 (synopsis "Implementation of JSON-RPC specification for Python")
13693 (description
13694 "This library is an implementation of the JSON-RPC specification.
13695 It supports both the original 1.0 specification, as well as the
13696 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
13697 etc.")
13698 (license license:asl2.0)))
13699
13700 (define-public python-chai
13701 (package
13702 (name "python-chai")
13703 (version "1.1.2")
13704 (source (origin
13705 (method url-fetch)
13706 (uri (pypi-uri "chai" version))
13707 (sha256
13708 (base32
13709 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
13710 (build-system python-build-system)
13711 (home-page "https://github.com/agoragames/chai")
13712 (synopsis "Mocking framework for Python")
13713 (description
13714 "Chai provides an api for mocking, stubbing and spying your python
13715 objects, patterned after the Mocha library for Ruby.")
13716 (license license:bsd-3)))
13717
13718 (define-public python2-chai
13719 (package-with-python2 python-chai))
13720
13721 (define-public python-inflection
13722 (package
13723 (name "python-inflection")
13724 (version "0.3.1")
13725 (source
13726 (origin (method url-fetch)
13727 (uri (pypi-uri "inflection" version))
13728 (sha256
13729 (base32
13730 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
13731 (build-system python-build-system)
13732 (native-inputs
13733 `(("python-pytest" ,python-pytest)))
13734 (home-page "https://github.com/jpvanhal/inflection")
13735 (synopsis "Python string transformation library")
13736 (description
13737 "Inflection is a string transformation library. It singularizes
13738 and pluralizes English words, and transforms strings from CamelCase to
13739 underscored string.")
13740 (license license:expat)))
13741
13742 (define-public python2-inflection
13743 (package-with-python2 python-inflection))
13744
13745 (define-public python-pylev
13746 (package
13747 (name "python-pylev")
13748 (version "1.3.0")
13749 (source (origin
13750 (method url-fetch)
13751 (uri (pypi-uri "pylev" version))
13752 (sha256
13753 (base32
13754 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
13755 (build-system python-build-system)
13756 (home-page "https://github.com/toastdriven/pylev")
13757 (synopsis "Levenshtein distance implementation in Python")
13758 (description "Pure Python Levenshtein implementation, based off the
13759 Wikipedia code samples at
13760 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
13761 (license license:bsd-3)))
13762
13763 (define-public python2-pylev
13764 (package-with-python2 python-pylev))
13765
13766 (define-public python-cleo
13767 (package
13768 (name "python-cleo")
13769 (version "0.8.1")
13770 (source (origin
13771 (method url-fetch)
13772 (uri (pypi-uri "cleo" version))
13773 (sha256
13774 (base32
13775 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
13776 (build-system python-build-system)
13777 (native-inputs
13778 `( ;; For testing
13779 ("python-mock" ,python-mock)
13780 ("python-pytest-mock" ,python-pytest-mock)
13781 ("python-pytest" ,python-pytest)))
13782 (propagated-inputs
13783 `(("python-backpack" ,python-backpack)
13784 ("python-clikit" ,python-clikit)
13785 ("python-pastel" ,python-pastel)
13786 ("python-pylev" ,python-pylev)))
13787 (home-page "https://github.com/sdispater/cleo")
13788 (synopsis "Command-line arguments library for Python")
13789 (description
13790 "Cleo allows you to create command-line commands with signature in
13791 docstring and colored output.")
13792 (license license:expat)))
13793
13794 (define-public python2-cleo
13795 (package-with-python2 python-cleo))
13796
13797 (define-public python-tomlkit
13798 (package
13799 (name "python-tomlkit")
13800 (version "0.7.0")
13801 (source
13802 (origin
13803 (method url-fetch)
13804 (uri (pypi-uri "tomlkit" version))
13805 (sha256
13806 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
13807 (build-system python-build-system)
13808 (native-inputs
13809 `(("python-pytest" ,python-pytest)
13810 ("python-pyyaml" ,python-pyyaml)))
13811 (home-page "https://github.com/sdispater/tomlkit")
13812 (synopsis "Style-preserving TOML library")
13813 (description
13814 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
13815 preserves all comments, indentations, whitespace and internal element ordering,
13816 and makes them accessible and editable via an intuitive API. It can also
13817 create new TOML documents from scratch using the provided helpers. Part of the
13818 implementation has been adapted, improved, and fixed from Molten.")
13819 (license license:expat)))
13820
13821 (define-public python-shellingham
13822 (package
13823 (name "python-shellingham")
13824 (version "1.3.2")
13825 (source
13826 (origin
13827 (method url-fetch)
13828 (uri (pypi-uri "shellingham" version))
13829 (sha256
13830 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
13831 (build-system python-build-system)
13832 (arguments
13833 `(#:phases
13834 (modify-phases %standard-phases
13835 (add-after 'unpack 'restore-setup.py
13836 ;; setup.py will return in the next release.
13837 ;; <https://github.com/sarugaku/shellingham/issues/33>
13838 (lambda _
13839 (with-output-to-file "setup.py"
13840 (lambda _
13841 (display "from setuptools import setup\nsetup()\n")))
13842 #t)))))
13843 (home-page "https://github.com/sarugaku/shellingham")
13844 (synopsis "Tool to detect surrounding shell")
13845 (description
13846 "Shellingham detects what shell the current Python executable is
13847 running in.")
13848 (license license:isc)))
13849
13850 (define-public python-memcached
13851 (package
13852 (name "python-memcached")
13853 (version "1.59")
13854 (source
13855 (origin
13856 (method url-fetch)
13857 (uri (pypi-uri "python-memcached" version))
13858 (sha256
13859 (base32
13860 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13861 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13862 (build-system python-build-system)
13863 (propagated-inputs `(("python-six" ,python-six)))
13864 (home-page
13865 "https://github.com/linsomniac/python-memcached")
13866 (synopsis "Pure python memcached client")
13867 (description
13868 "This software is a pure Python interface to the memcached memory cache
13869 daemon. It is the client side software which allows storing values in one or
13870 more, possibly remote, memcached servers.")
13871 (license license:psfl)))
13872
13873 (define-public python-clikit
13874 (package
13875 (name "python-clikit")
13876 (version "0.6.2")
13877 (source
13878 (origin
13879 (method url-fetch)
13880 (uri (pypi-uri "clikit" version))
13881 (sha256
13882 (base32
13883 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13884 (build-system python-build-system)
13885 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13886 (propagated-inputs
13887 `(("python-crashtest" ,python-crashtest)
13888 ("python-pastel" ,python-pastel)
13889 ("python-pylev" ,python-pylev)))
13890 (home-page "https://github.com/sdispater/clikit")
13891 (synopsis "Group of utilities to build command line interfaces")
13892 (description
13893 "CliKit is a group of utilities to build testable command line
13894 interfaces.")
13895 (properties `((python2-variant . ,(delay python2-clikit))))
13896 (license license:expat)))
13897
13898 (define-public python2-clikit
13899 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13900 (package/inherit
13901 base
13902 (propagated-inputs
13903 `(("python-enum34" ,python2-enum34)
13904 ("python-typing" ,python2-typing)
13905 ,@(package-propagated-inputs base))))))
13906
13907 (define-public python-msgpack-python
13908 (package
13909 (name "python-msgpack-python")
13910 (version "0.5.6")
13911 (source
13912 (origin
13913 (method url-fetch)
13914 (uri (pypi-uri "msgpack-python" version))
13915 (sha256
13916 (base32
13917 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13918 (build-system python-build-system)
13919 (home-page "https://msgpack.org/")
13920 (synopsis "Package to deserialize messages in MessagePack binary format")
13921 (description
13922 "MessagePack is an efficient binary serialization format. It lets you
13923 exchange data among multiple languages like JSON. But it's faster and
13924 smaller. Small integers are encoded into a single byte, and typical short
13925 strings require only one extra byte in addition to the strings themselves.")
13926 (license license:asl2.0)))
13927
13928 (define-public python-cachy
13929 (package
13930 (name "python-cachy")
13931 (version "0.3.0")
13932 (source
13933 (origin
13934 (method url-fetch)
13935 (uri (pypi-uri "cachy" version))
13936 (sha256
13937 (base32
13938 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13939 (build-system python-build-system)
13940 (arguments
13941 '(#:phases
13942 (modify-phases %standard-phases
13943 (replace 'check
13944 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13945 "pytest"))))))
13946 (native-inputs
13947 `(("memcached" ,memcached)
13948 ("python-fakeredis" ,python-fakeredis)
13949 ("python-flexmock" ,python-flexmock)
13950 ("python-pifpaf" ,python-pifpaf)
13951 ("python-pytest" ,python-pytest)))
13952 (propagated-inputs
13953 `(("python-memcached" ,python-memcached)
13954 ("python-msgpack-python" ,python-msgpack-python)
13955 ("python-redis" ,python-redis)))
13956 (home-page "https://github.com/sdispater/cachy")
13957 (synopsis "Simple yet effective caching library")
13958 (description
13959 "Cachy provides a simple yet effective caching library. A simple but
13960 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13961 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13962 (license license:expat)))
13963
13964 (define-public poetry
13965 (package
13966 (name "poetry")
13967 (version "1.1.5")
13968 ;; Poetry can only be built from source with Poetry.
13969 (source
13970 (origin
13971 (method url-fetch)
13972 (uri (pypi-uri "poetry" version))
13973 (sha256
13974 (base32
13975 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
13976 (build-system python-build-system)
13977 (arguments
13978 `(#:tests? #f ;; Pypi does not have tests.
13979 #:phases
13980 (modify-phases %standard-phases
13981 (add-before 'build 'patch-setup-py
13982 (lambda _
13983 (substitute* "setup.py"
13984 ;; Allow newer versions of python-keyring.
13985 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
13986 ;; TODO: remove after the next release cycle,
13987 ;; when packaging has been updated.
13988 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
13989 #t)))))
13990 (propagated-inputs
13991 `(("python-cachecontrol" ,python-cachecontrol)
13992 ("python-cachy" ,python-cachy)
13993 ("python-cleo" ,python-cleo)
13994 ("python-clikit" ,python-clikit)
13995 ("python-html5lib" ,python-html5lib)
13996 ("python-keyring" ,python-keyring)
13997 ("python-msgpack-transitional" ,python-msgpack-transitional)
13998 ("python-packaging" ,python-packaging)
13999 ("python-pexpect" ,python-pexpect)
14000 ("python-pip" ,python-pip)
14001 ("python-pkginfo" ,python-pkginfo)
14002 ("python-poetry-core" ,python-poetry-core)
14003 ("python-requests" ,python-requests)
14004 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
14005 ("python-shellingham" ,python-shellingham)
14006 ("python-tomlkit" ,python-tomlkit)
14007 ("python-virtualenv" ,python-virtualenv)))
14008 (home-page "https://python-poetry.org")
14009 (synopsis "Python dependency management and packaging made easy")
14010 (description "Poetry is a tool for dependency management and packaging
14011 in Python. It allows you to declare the libraries your project depends on and
14012 it will manage (install/update) them for you.")
14013 (license license:expat)))
14014
14015 (define-public python-lark-parser
14016 (package
14017 (name "python-lark-parser")
14018 (version "0.9.0")
14019 (source (origin
14020 (method url-fetch)
14021 (uri (pypi-uri "lark-parser" version))
14022 (sha256
14023 (base32
14024 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
14025 (build-system python-build-system)
14026 (home-page "https://github.com/lark-parser/lark")
14027 (synopsis "Multi-language parser for Python")
14028 (description
14029 "Lark is a parser built with a focus on ergonomics, performance and
14030 resilience. Lark can parse all context-free languages. That means it is
14031 capable of parsing almost any programming language out there, and to
14032 some degree most natural languages too.")
14033 (license license:expat)))
14034
14035 (define-public python-libcst
14036 (package
14037 (name "python-libcst")
14038 (version "0.3.8")
14039 (source (origin
14040 (method url-fetch)
14041 (uri (pypi-uri "libcst" version))
14042 (sha256
14043 (base32
14044 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
14045 (build-system python-build-system)
14046 (arguments
14047 `(#:phases
14048 (modify-phases %standard-phases
14049 (add-after 'unpack 'remove-failing-tests
14050 (lambda _
14051 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
14052 (delete-file "libcst/tests/test_fuzz.py")
14053 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
14054 (delete-file "libcst/tests/test_pyre_integration.py")
14055 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
14056 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
14057 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
14058 #t))
14059 (add-before 'check 'generate-test-data
14060 (lambda _
14061 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14062 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
14063 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
14064 (replace 'check
14065 (lambda _
14066 (invoke "python" "-m" "unittest")
14067 #t)))))
14068 (native-inputs
14069 `(("python-black" ,python-black)
14070 ("python-isort" ,python-isort)))
14071 (propagated-inputs
14072 `(("python-typing-extensions" ,python-typing-extensions)
14073 ("python-typing-inspect" ,python-typing-inspect)
14074 ("python-pyyaml" ,python-pyyaml)))
14075 (home-page "https://github.com/Instagram/LibCST")
14076 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
14077 (description
14078 "LibCST parses Python source code as a CST tree that keeps all
14079 formatting details (comments, whitespaces, parentheses, etc). It's useful
14080 for building automated refactoring (codemod) applications and linters.
14081 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
14082 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
14083 naming node types and fields, LibCST creates a lossless CST that looks and
14084 feels like an AST.")
14085 (license (list license:expat
14086 ;; Some files unde libcst/_parser/ are under Python Software
14087 ;; Foundation license (see LICENSE file for details)
14088 license:psfl
14089 ;; libcst/_add_slots.py
14090 license:asl2.0))))
14091
14092 (define-public python-typing-inspect
14093 (package
14094 (name "python-typing-inspect")
14095 (version "0.6.0")
14096 (source (origin
14097 (method url-fetch)
14098 (uri (pypi-uri "typing_inspect" version))
14099 (sha256
14100 (base32
14101 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
14102 (build-system python-build-system)
14103 (propagated-inputs
14104 `(("python-mypy-extensions" ,python-mypy-extensions)
14105 ("python-typing-extensions" ,python-typing-extensions)))
14106 (home-page "https://github.com/ilevkivskyi/typing_inspect")
14107 (synopsis "API for inspection of types in the Python @code{typing} module")
14108 (description
14109 "The @code{typing_inspect} module defines experimental API for runtime
14110 inspection of types defined in the Python standard typing module.")
14111 (license license:expat)))
14112
14113 (define-public python-lazy-object-proxy
14114 (package
14115 (name "python-lazy-object-proxy")
14116 (version "1.5.1")
14117 (source (origin
14118 (method url-fetch)
14119 (uri (pypi-uri "lazy-object-proxy" version))
14120 (sha256
14121 (base32
14122 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
14123 (native-inputs
14124 `(("python-setuptools-scm" ,python-setuptools-scm)))
14125 (build-system python-build-system)
14126 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
14127 (synopsis "Lazy object proxy for python")
14128 (description
14129 "Lazy object proxy is an object that wraps a callable but defers the call
14130 until the object is actually required, and caches the result of said call.")
14131 (license license:bsd-2)))
14132
14133 (define-public python2-lazy-object-proxy
14134 (package-with-python2 python-lazy-object-proxy))
14135
14136 (define-public python-dnspython
14137 (package
14138 (name "python-dnspython")
14139 (version "2.0.0")
14140 (source (origin
14141 (method url-fetch)
14142 (uri (pypi-uri "dnspython" version ".zip"))
14143 (sha256
14144 (base32
14145 "1dyip5ygqqhrgcaiy7qzjpndl9xciip186paxqwkm726fj9z0jh4"))))
14146 (build-system python-build-system)
14147 (native-inputs `(("unzip" ,unzip)))
14148 (arguments '(#:tests? #f)) ; XXX: requires internet access
14149 (home-page "https://www.dnspython.org")
14150 (synopsis "DNS toolkit for Python")
14151 (description
14152 "dnspython is a DNS toolkit for Python. It supports almost all record
14153 types. It can be used for queries, zone transfers, and dynamic updates.
14154 It supports TSIG authenticated messages and EDNS0.")
14155 (license license:expat)))
14156
14157 (define-public python-dnspython-1.16
14158 (package
14159 (inherit python-dnspython)
14160 (version "1.16.0")
14161 (source (origin
14162 (method url-fetch)
14163 (uri (string-append "http://www.dnspython.org/kits/"
14164 version "/dnspython-" version ".tar.gz"))
14165 (sha256
14166 (base32
14167 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
14168 (native-inputs '())))
14169
14170 (define-public python2-dnspython-1.16
14171 (package-with-python2 python-dnspython-1.16))
14172
14173 (define-public python-py3dns
14174 (package
14175 (name "python-py3dns")
14176 (version "3.2.1")
14177 (source
14178 (origin
14179 (method url-fetch)
14180 (uri (pypi-uri "py3dns" version))
14181 (sha256
14182 (base32
14183 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
14184 (build-system python-build-system)
14185 ;; This package wants to read /etc/resolv.conf. We can't patch it without
14186 ;; removing functionality so we copy from Nix and "just don't build it".
14187 (arguments
14188 `(#:phases
14189 (modify-phases %standard-phases
14190 (add-after 'unpack 'patch-source
14191 (lambda _
14192 (substitute* "setup.py"
14193 (("import DNS") "")
14194 (("DNS.__version__") (string-append "\"" ,version "\"")))
14195 #t)))
14196 #:tests? #f)) ; Also skip the tests.
14197 (home-page "https://launchpad.net/py3dns")
14198 (synopsis "Python 3 DNS library")
14199 (description "This Python 3 module provides a DNS API for looking up DNS
14200 entries from within Python 3 modules and applications. This module is a
14201 simple, lightweight implementation.")
14202 (license license:psfl)))
14203
14204 (define-public python-email-validator
14205 (package
14206 (name "python-email-validator")
14207 (version "1.0.2")
14208 (source
14209 (origin (method url-fetch)
14210 (uri (pypi-uri "email_validator" version))
14211 (sha256
14212 (base32
14213 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
14214 (build-system python-build-system)
14215 (arguments
14216 '(#:phases
14217 (modify-phases %standard-phases
14218 (add-before 'build 'use-dnspython
14219 (lambda _
14220 (substitute* "setup.py"
14221 (("dnspython3") "dnspython"))
14222 #t)))))
14223 (propagated-inputs
14224 `(("python-dnspython" ,python-dnspython)
14225 ("python-idna" ,python-idna)))
14226 (home-page "https://github.com/JoshData/python-email-validator")
14227 (synopsis "Email address validation library for Python")
14228 (description
14229 "This library validates email address syntax and deliverability.")
14230 (license license:cc0)))
14231
14232 (define-public python2-email-validator
14233 (package-with-python2 python-email-validator))
14234
14235 (define-public python-ukpostcodeparser
14236 (package
14237 (name "python-ukpostcodeparser")
14238 (version "1.0.3")
14239 (source (origin
14240 (method url-fetch)
14241 (uri (pypi-uri "UkPostcodeParser" version))
14242 (sha256
14243 (base32
14244 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
14245 (build-system python-build-system)
14246 (home-page "https://github.com/hamstah/ukpostcodeparser")
14247 (synopsis "UK Postcode parser for Python")
14248 (description
14249 "This library provides the @code{parse_uk_postcode} function for
14250 parsing UK postcodes.")
14251 (license license:expat)))
14252
14253 (define-public python2-ukpostcodeparser
14254 (package-with-python2 python-ukpostcodeparser))
14255
14256 (define-public python-faker
14257 (package
14258 (name "python-faker")
14259 (version "4.0.2")
14260 (source (origin
14261 (method url-fetch)
14262 (uri (pypi-uri "Faker" version))
14263 (sha256
14264 (base32
14265 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
14266 (build-system python-build-system)
14267 (arguments
14268 '(#:phases
14269 (modify-phases %standard-phases
14270 (replace 'check
14271 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
14272 (native-inputs
14273 `(;; For testing
14274 ("python-freezegun" ,python-freezegun)
14275 ("python-pytest" ,python-pytest)
14276 ("python-random2" ,python-random2)
14277 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
14278 ("python-validators" ,python-validators)))
14279 (propagated-inputs
14280 `(("python-dateutil" ,python-dateutil)
14281 ("python-text-unidecode" ,python-text-unidecode)))
14282 (home-page "https://github.com/joke2k/faker")
14283 (synopsis "Python package that generates fake data")
14284 (description
14285 "Faker is a Python package that generates fake data such as names,
14286 addresses, and phone numbers.")
14287 (license license:expat)
14288 (properties `((python2-variant . ,(delay python2-faker))))))
14289
14290 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
14291 (define-public python2-faker
14292 (let ((base (package-with-python2 (strip-python2-variant
14293 python-faker))))
14294 (package
14295 (inherit base)
14296 (version "3.0.1")
14297 (source (origin
14298 (method url-fetch)
14299 (uri (pypi-uri "Faker" version))
14300 (sha256
14301 (base32
14302 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
14303 (native-inputs
14304 `(("python-mock" ,python2-mock)
14305 ,@(package-native-inputs base)))
14306 (propagated-inputs
14307 `(("python2-ipaddress" ,python2-ipaddress)
14308 ("python2-six" ,python2-six)
14309 ,@(package-propagated-inputs base))))))
14310
14311 (define-public python-pyaml
14312 (package
14313 (name "python-pyaml")
14314 (version "18.11.0")
14315 (source (origin
14316 (method url-fetch)
14317 (uri (pypi-uri "pyaml" version))
14318 (sha256
14319 (base32
14320 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
14321 (build-system python-build-system)
14322 (native-inputs
14323 `(("python-unidecode" ,python-unidecode)))
14324 (propagated-inputs
14325 `(("python-pyyaml" ,python-pyyaml)))
14326 (home-page "https://github.com/mk-fg/pretty-yaml")
14327 (synopsis "YAML pretty-print library for Python")
14328 (description
14329 "pyaml is a PyYAML based python module to produce pretty and readable
14330 YAML-serialized data.")
14331 (license license:wtfpl2)))
14332
14333 (define-public python2-pyaml
14334 (package-with-python2 python-pyaml))
14335
14336 (define-public python-backpack
14337 (package
14338 (name "python-backpack")
14339 (version "0.1")
14340 (source
14341 (origin
14342 (method url-fetch)
14343 (uri (pypi-uri "backpack" version))
14344 (sha256
14345 (base32
14346 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
14347 (build-system python-build-system)
14348 (native-inputs
14349 `(("python-pytest" ,python-pytest)
14350 ("python-nose" ,python-nose)))
14351 (propagated-inputs
14352 `(("python-simplejson" ,python-simplejson)))
14353 (home-page "https://github.com/sdispater/backpack")
14354 (synopsis "Utilities for working with Python collections")
14355 (description "Backpack provides some useful utilities for working with
14356 collections of data.")
14357 (license license:expat)))
14358
14359 (define-public python2-backpack
14360 (package-with-python2 python-backpack))
14361
14362 (define-public python-prompt-toolkit
14363 (package
14364 (name "python-prompt-toolkit")
14365 (version "3.0.9")
14366 (source
14367 (origin
14368 (method url-fetch)
14369 (uri (pypi-uri "prompt_toolkit" version))
14370 (sha256
14371 (base32 "0bvjp62cs6aj9lrh7njzxdjgg8pjfw3qgmr551243d9ivmcapvn5"))))
14372 (build-system python-build-system)
14373 (arguments
14374 `(#:phases
14375 (modify-phases %standard-phases
14376 (delete 'check)
14377 (add-after 'install 'post-install-check
14378 (lambda* (#:key inputs outputs #:allow-other-keys)
14379 ;; HOME is needed for the test
14380 ;; "test_pathcompleter_can_expanduser".
14381 (setenv "HOME" "/tmp")
14382 (add-installed-pythonpath inputs outputs)
14383 (invoke "py.test"))))))
14384 (propagated-inputs
14385 `(("python-wcwidth" ,python-wcwidth)))
14386 (native-inputs
14387 `(("python-pytest" ,python-pytest)))
14388 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
14389 (synopsis "Library for building command line interfaces in Python")
14390 (description
14391 "Prompt-Toolkit is a library for building interactive command line
14392 interfaces in Python. It's like GNU Readline but it also features syntax
14393 highlighting while typing, out-of-the-box multi-line input editing, advanced
14394 code completion, incremental search, support for Chinese double-width
14395 characters, mouse support, and auto suggestions.")
14396 (license license:bsd-3)
14397 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
14398
14399 (define-public python-prompt-toolkit-2
14400 (package (inherit python-prompt-toolkit)
14401 (name "python-prompt-toolkit")
14402 (version "2.0.7")
14403 (source
14404 (origin
14405 (method url-fetch)
14406 (uri (pypi-uri "prompt_toolkit" version))
14407 (sha256
14408 (base32
14409 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
14410 (propagated-inputs
14411 `(("python-wcwidth" ,python-wcwidth)
14412 ("python-six" ,python-six)
14413 ("python-pygments" ,python-pygments)))
14414 (properties '())))
14415
14416 (define-public python2-prompt-toolkit
14417 (package-with-python2 python-prompt-toolkit-2))
14418
14419 (define-public python-prompt-toolkit-1
14420 (package (inherit python-prompt-toolkit-2)
14421 (version "1.0.15")
14422 (source
14423 (origin
14424 (method url-fetch)
14425 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
14426 (sha256
14427 (base32
14428 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
14429
14430 (define-public python2-prompt-toolkit-1
14431 (package-with-python2 python-prompt-toolkit-1))
14432
14433 (define-public python-jedi
14434 (package
14435 (name "python-jedi")
14436 (version "0.17.2")
14437 (source
14438 (origin
14439 (method url-fetch)
14440 (uri (pypi-uri "jedi" version))
14441 (sha256
14442 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
14443 (build-system python-build-system)
14444 (arguments
14445 `(#:phases
14446 (modify-phases %standard-phases
14447 (replace 'check
14448 (lambda* (#:key tests? #:allow-other-keys)
14449 (when tests?
14450 (setenv "HOME" "/tmp")
14451 (invoke "python" "-m" "pytest" "-vv"))
14452 #t)))))
14453 (native-inputs
14454 `(("python-pytest" ,python-pytest)
14455 ("python-docopt" ,python-docopt)))
14456 (propagated-inputs
14457 `(("python-parso" ,python-parso)))
14458 (home-page "https://github.com/davidhalter/jedi")
14459 (synopsis "Autocompletion and static analysis library for Python")
14460 (description
14461 "Jedi is a static analysis tool for Python that can be used in Integrated
14462 Development Environments (@dfn{IDE}s) and text editors. It understands Python
14463 on a deeper level than many other static analysis frameworks for Python.
14464
14465 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
14466 well.")
14467 (license license:expat)))
14468
14469 (define-public python2-jedi
14470 (package-with-python2 python-jedi))
14471
14472 (define-public ptpython
14473 (package
14474 (name "ptpython")
14475 (version "3.0.5")
14476 (source (origin
14477 (method url-fetch)
14478 (uri (pypi-uri "ptpython" version))
14479 (sha256
14480 (base32
14481 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
14482 (build-system python-build-system)
14483 (arguments
14484 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
14485 (propagated-inputs
14486 `(("python-appdirs" ,python-appdirs)
14487 ("python-jedi" ,python-jedi)
14488 ("python-prompt-toolkit" ,python-prompt-toolkit)
14489 ("python-pygments" ,python-pygments)))
14490 (home-page "https://github.com/jonathanslenders/ptpython")
14491 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
14492 (description
14493 "ptpython is a Python read-eval-print loop with IDE-like features.
14494 It supports syntax highlighting, multiline editing, autocompletion, mouse,
14495 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
14496 etc.")
14497 (license license:bsd-3)
14498 (properties `((python2-variant . ,(delay ptpython-2))))))
14499
14500 (define-public ptpython-2
14501 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
14502 (package/inherit base
14503 (name "ptpython2"))))
14504
14505 (define-public python-stem
14506 (package
14507 (name "python-stem")
14508 (version "1.8.0")
14509 (source
14510 (origin
14511 (method url-fetch)
14512 (uri (pypi-uri "stem" version))
14513 (sha256
14514 (base32
14515 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
14516 (build-system python-build-system)
14517 (arguments
14518 `(#:phases
14519 (modify-phases %standard-phases
14520 (replace 'check
14521 (lambda _
14522 (invoke "./run_tests.py" "--unit")
14523 #t)))))
14524 (native-inputs
14525 `(("python-mock" ,python-mock)
14526 ("python-pycodestyle" ,python-pycodestyle)
14527 ("python-pyflakes" ,python-pyflakes)))
14528 (home-page "https://stem.torproject.org/")
14529 (synopsis
14530 "Python controller library that allows applications to interact with Tor")
14531 (description
14532 "Stem is a Python controller library for Tor. With it you can use Tor's
14533 control protocol to script against the Tor process and read descriptor data
14534 relays publish about themselves.")
14535 (license license:lgpl3)))
14536
14537 (define-public python-pyserial
14538 (package
14539 (name "python-pyserial")
14540 (version "3.5")
14541 (source
14542 (origin
14543 (method url-fetch)
14544 (uri (pypi-uri "pyserial" version))
14545 (sha256
14546 (base32
14547 "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw"))))
14548 (build-system python-build-system)
14549 (arguments
14550 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
14551 ;; #:phases
14552 ;; (modify-phases %standard-phases
14553 ;; (replace 'check
14554 ;; (lambda _
14555 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
14556 (home-page
14557 "https://github.com/pyserial/pyserial")
14558 (synopsis "Python Serial Port Bindings")
14559 (description "@code{pyserial} provide serial port bindings for Python. It
14560 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
14561 and/or Xon/Xoff. The port is accessed in RAW mode.")
14562 (license license:bsd-3)))
14563
14564 (define-public python2-pyserial
14565 (package-with-python2 python-pyserial))
14566
14567 (define-public python-kivy
14568 (package
14569 (name "python-kivy")
14570 (version "1.10.1")
14571 (source
14572 (origin
14573 (method url-fetch)
14574 (uri (pypi-uri "Kivy" version))
14575 (file-name (string-append name "-" version ".tar.gz"))
14576 (sha256
14577 (base32
14578 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
14579 (build-system python-build-system)
14580 (arguments
14581 `(#:tests? #f ; Tests require many optional packages
14582 #:phases
14583 (modify-phases %standard-phases
14584 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
14585 (lambda* (#:key inputs #:allow-other-keys)
14586 (setenv "KIVY_SDL2_PATH"
14587 (string-append (assoc-ref inputs "sdl-union")
14588 "/include/SDL2"))
14589 #t)))))
14590 (native-inputs
14591 `(("pkg-config" ,pkg-config)
14592 ("python-cython" ,python-cython)))
14593 (inputs
14594 `(("gstreamer" ,gstreamer)
14595 ("mesa" ,mesa)
14596 ("sdl-union"
14597 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
14598 (home-page "https://kivy.org")
14599 (synopsis
14600 "Multitouch application framework")
14601 (description
14602 "A software library for rapid development of
14603 hardware-accelerated multitouch applications.")
14604 (license license:expat)))
14605
14606 (define-public python2-kivy
14607 (package-with-python2 python-kivy))
14608
14609 (define-public python-binaryornot
14610 (package
14611 (name "python-binaryornot")
14612 (version "0.4.4")
14613 (source (origin
14614 (method url-fetch)
14615 (uri (pypi-uri "binaryornot" version))
14616 (sha256
14617 (base32
14618 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
14619 (build-system python-build-system)
14620 (arguments
14621 `(#:phases
14622 (modify-phases %standard-phases
14623 (add-after 'unpack 'patch-tests
14624 (lambda _
14625 ;; TypeError: binary() got an unexpected keyword argument
14626 ;; 'average_size'.
14627 (substitute* "tests/test_check.py"
14628 (("average_size=512") ""))
14629 #t)))))
14630 (propagated-inputs
14631 `(("python-chardet" ,python-chardet)
14632 ("python-hypothesis" ,python-hypothesis)))
14633 (home-page "https://github.com/audreyr/binaryornot")
14634 (synopsis "Package to check if a file is binary or text")
14635 (description "Ultra-lightweight pure Python package to check if a file is
14636 binary or text.")
14637 (license license:bsd-3)
14638 (properties `((python2-variant . ,(delay python2-binaryornot))))))
14639
14640 (define-public python2-binaryornot
14641 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
14642 (package/inherit base
14643 (propagated-inputs
14644 `(("python2-enum34" ,python2-enum34)
14645 ,@(package-propagated-inputs base))))))
14646
14647 (define-public python-binwalk
14648 (package
14649 (name "python-binwalk")
14650 (version "2.2.0")
14651 (source
14652 (origin
14653 (method git-fetch)
14654 (uri (git-reference
14655 (url "https://github.com/ReFirmLabs/binwalk")
14656 (commit (string-append "v" version))))
14657 (file-name (git-file-name name version))
14658 (sha256
14659 (base32
14660 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
14661 (build-system python-build-system)
14662 (arguments
14663 `(#:phases
14664 (modify-phases %standard-phases
14665 (add-before 'check 'set-pythonpath
14666 (lambda _
14667 (setenv "PYTHONPATH"
14668 (string-append
14669 (getcwd) "/src/"
14670 ":" (getenv "PYTHONPATH")))
14671 (setenv "HOME" "")
14672 #t)))))
14673 (native-inputs
14674 `(("python-coverage" ,python-coverage)
14675 ("python-nose" ,python-nose)))
14676 (home-page "https://github.com/ReFirmLabs/binwalk")
14677 (synopsis "Firmware analysis tool")
14678 (description "Binwalk is a tool for analyzing, reverse engineering, and
14679 extracting firmware images")
14680 (license license:expat)))
14681
14682 (define-public python-nltk
14683 (package
14684 (name "python-nltk")
14685 (version "3.2.1")
14686 (source (origin
14687 (method url-fetch)
14688 (uri (pypi-uri "nltk" version))
14689 (sha256
14690 (base32
14691 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
14692 (build-system python-build-system)
14693 (arguments
14694 '(;; The tests require some extra resources to be downloaded.
14695 ;; TODO Try packaging these resources.
14696 #:tests? #f))
14697 (home-page "http://nltk.org/")
14698 (synopsis "Natural Language Toolkit")
14699 (description "It provides interfaces to over 50 corpora and lexical
14700 resources such as WordNet, along with a suite of text processing libraries
14701 for classification, tokenization, stemming, tagging, parsing, and semantic
14702 reasoning, wrappers for natural language processing libraries.")
14703 (license license:asl2.0)))
14704
14705 (define-public python2-nltk
14706 (package-with-python2 python-nltk))
14707
14708 (define-public python-pymongo
14709 (package
14710 (name "python-pymongo")
14711 (version "3.7.2")
14712 (source (origin
14713 (method url-fetch)
14714 (uri (pypi-uri "pymongo" version))
14715 (sha256
14716 (base32
14717 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
14718 (build-system python-build-system)
14719 (propagated-inputs
14720 `(("python-certifi" ,python-certifi)))
14721 (home-page "https://github.com/mongodb/mongo-python-driver")
14722 (synopsis "Python driver for MongoDB")
14723 (description "Python driver for MongoDB.")
14724 (license license:asl2.0)))
14725
14726 (define-public python2-pymongo
14727 (package-with-python2 python-pymongo))
14728
14729 (define-public python-consul
14730 (package
14731 (name "python-consul")
14732 (version "0.6.1")
14733 (source
14734 (origin
14735 (method url-fetch)
14736 (uri (pypi-uri "python-consul" version))
14737 (sha256
14738 (base32
14739 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
14740 (build-system python-build-system)
14741 (arguments
14742 '(#:tests? #f)) ; The tests are not distributed
14743 (propagated-inputs
14744 `(("python-requests" ,python-requests)
14745 ("python-six" ,python-six)))
14746 (home-page "https://github.com/cablehead/python-consul")
14747 (synopsis "Python client for Consul")
14748 (description
14749 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
14750 discovery, monitoring and configuration.")
14751 (license license:expat)))
14752
14753 (define-public python2-consul
14754 (package-with-python2 python-consul))
14755
14756 (define-public python-schematics
14757 (package
14758 (name "python-schematics")
14759 (version "1.1.1")
14760 (source
14761 (origin
14762 (method git-fetch)
14763 (uri (git-reference
14764 (url "https://github.com/schematics/schematics")
14765 (commit (string-append "v" version))))
14766 (file-name (git-file-name name version))
14767 (sha256
14768 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
14769 (build-system python-build-system)
14770 (propagated-inputs
14771 `(("python-six" ,python-six)))
14772 (arguments
14773 ;; The tests require a bunch of not very nice packages with fixed
14774 ;; version requirements (e.g. python-coveralls).
14775 `(#:tests? #f))
14776 (home-page "https://github.com/schematics/schematics")
14777 (synopsis "Python Data Structures for Humans")
14778 (description "Python Data Structures for Humans.")
14779 (license license:bsd-3)))
14780
14781 (define-public python2-schematics
14782 (package-with-python2 python-schematics))
14783
14784 (define-public python-odfpy
14785 (package
14786 (name "python-odfpy")
14787 (version "1.4.1")
14788 (source (origin
14789 (method url-fetch)
14790 (uri (pypi-uri "odfpy" version))
14791 (sha256
14792 (base32
14793 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
14794 (arguments
14795 `(#:phases
14796 (modify-phases %standard-phases
14797 (replace 'check
14798 (lambda _
14799 (setenv "PYTHONPATH" (string-append "./build/lib:"
14800 (getenv "PYTHONPATH")))
14801 (invoke "pytest" "-vv"))))))
14802 (build-system python-build-system)
14803 (native-inputs
14804 `(("python-pytest" ,python-pytest)))
14805 (propagated-inputs
14806 `(("python-defusedxml" ,python-defusedxml)))
14807 (home-page "https://github.com/eea/odfpy")
14808 (synopsis "Python API and tools to manipulate OpenDocument files")
14809 (description "Collection of libraries and utility programs written in
14810 Python to manipulate OpenDocument 1.2 files.")
14811 (license
14812 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
14813 ;; number of files with other licenses.
14814 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
14815
14816 (define-public python2-odfpy
14817 (package-with-python2 python-odfpy))
14818
14819 (define-public python-natsort
14820 (package
14821 (name "python-natsort")
14822 (version "7.0.1")
14823 (source (origin
14824 (method url-fetch)
14825 (uri (pypi-uri "natsort" version))
14826 (sha256
14827 (base32
14828 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14829 (build-system python-build-system)
14830 (arguments
14831 `(#:modules ((guix build utils)
14832 (guix build python-build-system)
14833 (srfi srfi-1)
14834 (srfi srfi-26)
14835 (ice-9 ftw))
14836 #:phases
14837 (modify-phases %standard-phases
14838 (add-before 'check 'set-cachedir
14839 ;; Tests require write access to $HOME by default
14840 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14841 (replace 'check
14842 (lambda _
14843 (let ((cwd (getcwd)))
14844 (setenv "PYTHONPATH"
14845 (string-append
14846 cwd "/build/"
14847 (find (cut string-prefix? "lib" <>)
14848 (scandir (string-append cwd "/build")))
14849 ":"
14850 (getenv "PYTHONPATH")))
14851 (invoke "pytest" "-v")))))))
14852 (native-inputs
14853 `(("python-hypothesis" ,python-hypothesis)
14854 ("python-pytest-cov" ,python-pytest-cov)
14855 ("python-pytest-mock" ,python-pytest-mock)
14856 ("python-pytest" ,python-pytest)))
14857 (propagated-inputs ; TODO: Add python-fastnumbers.
14858 `(("python-pyicu" ,python-pyicu)))
14859 (home-page "https://github.com/SethMMorton/natsort")
14860 (synopsis "Natural sorting for python and shell")
14861 (description
14862 "Natsort lets you apply natural sorting on lists instead of
14863 lexicographical. If you use the built-in @code{sorted} method in python
14864 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14865 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14866 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14867 identifies numbers and sorts them separately from strings. It can also sort
14868 version numbers, real numbers, mixed types and more, and comes with a shell
14869 command @command{natsort} that exposes this functionality in the command line.")
14870 (license license:expat)
14871 (properties `((python2-variant . ,(delay python2-natsort))))))
14872
14873 ;; Natsort 6.x are the last versions with support for Python 2.
14874 (define-public python2-natsort
14875 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14876 (package (inherit base)
14877 (version "6.2.1")
14878 (source (origin
14879 (method url-fetch)
14880 (uri (pypi-uri "natsort" version))
14881 (sha256
14882 (base32
14883 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14884 (native-inputs
14885 `(("python2-pathlib" ,python2-pathlib)
14886 ,@(package-native-inputs base))))))
14887
14888 (define-public glances
14889 (package
14890 (name "glances")
14891 (version "3.1.6")
14892 (source
14893 (origin
14894 (method url-fetch)
14895 (uri (pypi-uri "Glances" version))
14896 (sha256
14897 (base32 "11xbm8jgcxha191ly7q76nab1ilabiz14mqf6i3y6aw5xvgg017c"))
14898 (modules '((guix build utils)))
14899 (snippet
14900 '(begin
14901 ;; Glances phones PyPI for weekly update checks by default.
14902 ;; Disable these. The user can re-enable them if desired.
14903 (substitute* "glances/outdated.py"
14904 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14905 (string-append indentation
14906 "self.args.disable_check_update = True\n"
14907 line)))
14908 #t))))
14909 (build-system python-build-system)
14910 (propagated-inputs
14911 `(("python-future" ,python-future)
14912 ("python-psutil" ,python-psutil)))
14913 (home-page "https://github.com/nicolargo/glances")
14914 (synopsis "Cross-platform curses-based monitoring tool")
14915 (description
14916 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14917 Glances uses the PsUtil library to get information from your system. It
14918 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14919 (license license:lgpl3+)))
14920
14921 (define-public python-glances
14922 (deprecated-package "python-glances" glances))
14923
14924 (define-public python-graphql-core
14925 (package
14926 (name "python-graphql-core")
14927 (version "3.1.2")
14928 (source
14929 (origin
14930 (method url-fetch)
14931 (uri (pypi-uri "graphql-core" version))
14932 (sha256
14933 (base32
14934 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
14935 (build-system python-build-system)
14936 (arguments
14937 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14938 #:phases
14939 (modify-phases %standard-phases
14940 (add-after 'unpack 'patch-hardcoded-version
14941 (lambda _ (substitute*
14942 "setup.py"
14943 (("'gevent==1.1rc1'") "'gevent'"))
14944 #t)))))
14945 (native-inputs
14946 `(("python-gevent" ,python-gevent)
14947 ("python-mock" ,python-mock)
14948 ("python-pytest-mock" ,python-pytest-mock)))
14949 (propagated-inputs
14950 `(("python-promise" ,python-promise)
14951 ("python-six" ,python-six)))
14952 (home-page "https://github.com/graphql-python/graphql-core")
14953 (synopsis "GraphQL implementation for Python")
14954 (description
14955 "GraphQL implementation for Python. GraphQL is a data query language and
14956 runtime designed and used to request and deliver data to mobile and web apps.
14957 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14958 to Python.")
14959 (license license:expat)))
14960
14961 (define-public python-graphql-relay
14962 (package
14963 (name "python-graphql-relay")
14964 (version "0.4.5")
14965 (source
14966 (origin
14967 (method url-fetch)
14968 (uri (pypi-uri "graphql-relay" version))
14969 (sha256
14970 (base32
14971 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14972 (build-system python-build-system)
14973 (arguments
14974 '(#:tests? #f)) ; The tests are not distributed
14975 (propagated-inputs
14976 `(("python-graphql-core" ,python-graphql-core)
14977 ("python-promise" ,python-promise)
14978 ("python-six" ,python-six)))
14979 (home-page "https://github.com/graphql-python/graphql-relay-py")
14980 (synopsis "Relay implementation for Python")
14981 (description
14982 "This is a library to allow the easy creation of Relay-compliant servers
14983 using the GraphQL Python reference implementation of a GraphQL server. It
14984 should be noted that the code is a exact port of the original
14985 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14986 from Facebook.")
14987 (license license:expat)))
14988
14989 (define-public python-graphene
14990 (package
14991 (name "python-graphene")
14992 (version "0.10.2")
14993 (source
14994 (origin
14995 (method url-fetch)
14996 (uri (pypi-uri "graphene" version))
14997 (sha256
14998 (base32
14999 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
15000 (build-system python-build-system)
15001 (propagated-inputs
15002 `(("python-graphql-core" ,python-graphql-core)
15003 ("python-graphql-relay" ,python-graphql-relay)
15004 ("python-iso8601" ,python-iso8601)
15005 ("python-promise" ,python-promise)
15006 ("python-six" ,python-six)))
15007 (arguments
15008 `(#:tests? #f)) ; no tests/ in the PyPI tarball
15009 (home-page "https://graphene-python.org/")
15010 (synopsis "GraphQL Framework for Python")
15011 (description
15012 "Graphene is a Python library for building GraphQL schemas/types.
15013 A GraphQL schema describes your data model, and provides a GraphQL server
15014 with an associated set of resolve methods that know how to fetch data.")
15015 (license license:expat)))
15016
15017 (define-public python-nautilus
15018 (package
15019 (name "python-nautilus")
15020 (version "0.4.9")
15021 (source
15022 (origin
15023 (method url-fetch)
15024 (uri (pypi-uri "nautilus" version))
15025 (sha256
15026 (base32
15027 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
15028 (build-system python-build-system)
15029 (arguments `(#:tests? #f)) ; fails to import test modules
15030 (propagated-inputs
15031 `(("python-bcrypt" ,python-bcrypt)
15032 ("python-click" ,python-click)
15033 ("python-consul" ,python-consul)
15034 ("python-graphene" ,python-graphene)
15035 ("python-jinja2" ,python-jinja2)
15036 ("python-peewee" ,python-peewee)
15037 ("python-pika" ,python-pika)
15038 ("python-tornado" ,python-tornado)
15039 ("python-wtforms" ,python-wtforms)))
15040 (native-inputs
15041 `(("python-nose2" ,python-nose2)))
15042 (home-page "https://github.com/AlecAivazis/nautilus")
15043 (synopsis "Library for creating microservice applications")
15044 (description
15045 "Nautilus is a framework for flux based microservices that looks to
15046 provide extendible implementations of common aspects of a cloud so that you can
15047 focus on building massively scalable web applications.")
15048 (license license:expat)))
15049
15050 (define-public python-random2
15051 (package
15052 (name "python-random2")
15053 (version "1.0.1")
15054 (source (origin
15055 (method url-fetch)
15056 (uri (pypi-uri "random2" version ".zip"))
15057 (sha256
15058 (base32
15059 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
15060 (build-system python-build-system)
15061 (native-inputs `(("unzip" ,unzip)))
15062 (home-page "http://pypi.python.org/pypi/random2")
15063 (synopsis "Python 3 version of the Python 2 @code{random} module")
15064 (description
15065 "This package provides a Python 3 ported version of Python 2.7’s
15066 @code{random} module. It has also been back-ported to work in Python 2.6.
15067
15068 In Python 3, the implementation of @code{randrange()} was changed, so that
15069 even with the same seed you get different sequences in Python 2 and 3.
15070
15071 This package closes that gap, allowing stable random number generation
15072 between the different Python versions.")
15073 (license license:psfl)))
15074
15075 (define-public python2-random2
15076 (package-with-python2 python-random2))
15077
15078 (define-public python-snowballstemmer
15079 (package
15080 (name "python-snowballstemmer")
15081 (version "2.0.0")
15082 (source (origin
15083 (method url-fetch)
15084 (uri (pypi-uri "snowballstemmer" version))
15085 (sha256
15086 (base32
15087 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
15088 (build-system python-build-system)
15089 (arguments
15090 `(;; No tests exist
15091 #:tests? #f))
15092 (home-page "https://github.com/shibukawa/snowball_py")
15093 (synopsis "Snowball stemming library collection for Python")
15094 (description "This package provides 16 word stemmer algorithms generated
15095 from Snowball algorithms. It includes the 15 original ones plus the Poerter
15096 English stemmer.")
15097 (license license:bsd-3)))
15098
15099 (define-public python2-snowballstemmer
15100 (package-with-python2 python-snowballstemmer))
15101
15102 (define-public python-setproctitle
15103 (package
15104 (name "python-setproctitle")
15105 (version "1.1.10")
15106 (source
15107 (origin
15108 (method url-fetch)
15109 (uri (pypi-uri "setproctitle" version))
15110 (sha256
15111 (base32
15112 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
15113 (build-system python-build-system)
15114 (arguments
15115 '(#:phases
15116 (modify-phases %standard-phases
15117 (add-before 'check 'patch-Makefile
15118 ;; Stricly this is only required for the python2 variant.
15119 ;; But adding a phase in an inherited package seems to be
15120 ;; cumbersum. So we patch even for python3.
15121 (lambda _
15122 (let ((nose (assoc-ref %build-inputs "python2-nose")))
15123 (when nose
15124 (substitute* "Makefile"
15125 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
15126 (string-append nose "/bin/nosetests "))))
15127 #t)))
15128 (replace 'check
15129 (lambda _
15130 (setenv "PYTHON" (or (which "python3") (which "python")))
15131 (setenv "PYCONFIG" (if (which "python3-config")
15132 "python3-config --embed"
15133 "python-config"))
15134 (setenv "CC" "gcc")
15135 ;; No need to extend PYTHONPATH to find the built package, since
15136 ;; the Makefile will build anyway
15137 (invoke "make" "check"))))))
15138 (native-inputs
15139 `(("procps" ,procps))) ; required for tests
15140 (home-page "https://github.com/dvarrazzo/py-setproctitle")
15141 (synopsis
15142 "Setproctitle implementation for Python to customize the process title")
15143 (description "The library allows a process to change its title (as displayed
15144 by system tools such as ps and top).
15145
15146 Changing the title is mostly useful in multi-process systems, for
15147 example when a master process is forked: changing the children's title
15148 allows identifying the task each process is busy with. The technique
15149 is used by PostgreSQL and the OpenSSH Server for example.")
15150 (license license:bsd-3)
15151 (properties `((python2-variant . ,(delay python2-setproctitle))))))
15152
15153 (define-public python2-setproctitle
15154 (let ((base (package-with-python2
15155 (strip-python2-variant python-setproctitle))))
15156 (package/inherit base
15157 (native-inputs `(("python2-nose" ,python2-nose)
15158 ,@(package-native-inputs base))))))
15159
15160 (define-public python-validictory
15161 (package
15162 (name "python-validictory")
15163 (version "1.0.1")
15164 (source
15165 (origin
15166 (method url-fetch)
15167 (uri (pypi-uri "validictory" version))
15168 (sha256
15169 (base32
15170 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
15171 (build-system python-build-system)
15172 (arguments
15173 '(#:phases
15174 (modify-phases %standard-phases
15175 (add-after 'unpack 'bootstrap
15176 ;; Move the tests out of the package directory to avoid
15177 ;; packaging them.
15178 (lambda* _
15179 (rename-file "validictory/tests" "tests")
15180 (delete-file "tests/__init__.py")))
15181 (replace 'check
15182 (lambda _
15183 ;; Extend PYTHONPATH so the built package will be found.
15184 (setenv "PYTHONPATH"
15185 (string-append (getcwd) "/build/lib:"
15186 (getenv "PYTHONPATH")))
15187 (invoke "py.test" "-vv" ))))))
15188 (native-inputs
15189 `(("python-pytest" ,python-pytest)))
15190 (home-page
15191 "https://github.com/jamesturk/validictory")
15192 (synopsis "General purpose Python data validator")
15193 (description "It allows validation of arbitrary Python data structures.
15194
15195 The schema format is based on the JSON Schema
15196 proposal (http://json-schema.org), so combined with json the library is also
15197 useful as a validator for JSON data.")
15198 (license license:expat)))
15199
15200 (define-public python2-validictory
15201 (package-with-python2 python-validictory))
15202
15203 (define-public python-pyelftools
15204 (package
15205 (name "python-pyelftools")
15206 (version "0.25")
15207 (source
15208 (origin
15209 (method url-fetch)
15210 (uri (pypi-uri "pyelftools" version))
15211 (sha256
15212 (base32
15213 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
15214 (build-system python-build-system)
15215 (arguments
15216 `(#:phases
15217 (modify-phases %standard-phases
15218 (add-before 'check 'set-pythonpath
15219 (lambda _
15220 (setenv "PYTHONPATH"
15221 (string-append
15222 (getcwd) "/test/"
15223 ":" (getenv "PYTHONPATH")))
15224 #t)))))
15225 (home-page
15226 "https://github.com/eliben/pyelftools")
15227 (synopsis
15228 "Analyze binary and library file information")
15229 (description "This Python library provides interfaces for parsing and
15230 analyzing two binary and library file formats; the Executable and Linking
15231 Format (ELF), and debugging information in the Debugging With Attributed
15232 Record Format (DWARF).")
15233 (license license:public-domain)))
15234
15235 (define-public python-pyev
15236 (package
15237 (name "python-pyev")
15238 (version "0.9.0")
15239 (source
15240 (origin
15241 (method url-fetch)
15242 (uri (pypi-uri "pyev" version))
15243 (sha256
15244 (base32
15245 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
15246 (build-system python-build-system)
15247 (arguments
15248 `(#:tests? #f ; no test suite
15249 #:phases
15250 (modify-phases %standard-phases
15251 (add-after 'unpack 'patch
15252 (lambda* (#:key inputs #:allow-other-keys)
15253 (let ((libev (string-append (assoc-ref inputs "libev")
15254 "/lib/libev.so.4")))
15255 (substitute* "setup.py"
15256 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
15257 (string-append "libev_dll_name = \"" libev "\"")))))))))
15258 (inputs
15259 `(("libev" ,libev)))
15260 (home-page "https://github.com/gabrielfalcao/pyev")
15261 (synopsis "Python libev interface")
15262 (description "Pyev provides a Python interface to libev.")
15263 (license license:gpl3)))
15264
15265 (define-public python2-pyev
15266 (package-with-python2 python-pyev))
15267
15268 (define-public python-imagesize
15269 (package
15270 (name "python-imagesize")
15271 (version "1.2.0")
15272 (source
15273 (origin
15274 (method url-fetch)
15275 (uri (pypi-uri "imagesize" version))
15276 (sha256
15277 (base32
15278 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
15279 (build-system python-build-system)
15280 (home-page "https://github.com/shibukawa/imagesize_py")
15281 (synopsis "Gets image size of files in various formats in Python")
15282 (description
15283 "This package allows determination of image size from
15284 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
15285 (license license:expat)))
15286
15287 (define-public python2-imagesize
15288 (package-with-python2 python-imagesize))
15289
15290 (define-public python-termstyle
15291 (package
15292 (name "python-termstyle")
15293 (version "0.1.11")
15294 (source
15295 (origin
15296 (method url-fetch)
15297 (uri (pypi-uri "termstyle" version))
15298 (sha256
15299 (base32
15300 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
15301 (build-system python-build-system)
15302 (arguments
15303 '(#:phases
15304 (modify-phases %standard-phases
15305 (replace 'check
15306 (lambda _
15307 (invoke "python" "test3.py"))))))
15308 (home-page "https://github.com/gfxmonk/termstyle")
15309 (synopsis "Console text coloring for Python")
15310 (description "This package provides console text coloring for Python.")
15311 (license license:bsd-3)))
15312
15313 (define-public python-argcomplete
15314 (package
15315 (name "python-argcomplete")
15316 (version "1.11.1")
15317 (source
15318 (origin
15319 (method url-fetch)
15320 (uri (pypi-uri "argcomplete" version))
15321 (sha256
15322 (base32
15323 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
15324 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
15325 (build-system python-build-system)
15326 (native-inputs
15327 `(("python-coverage" ,python-coverage)
15328 ("python-flake8" ,python-flake8)
15329 ("python-pexpect" ,python-pexpect)
15330 ("python-wheel" ,python-wheel)
15331 ("tcsh" ,tcsh)
15332 ("fish" ,fish)
15333 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
15334 (home-page "https://github.com/kislyuk/argcomplete")
15335 (synopsis "Shell tab completion for Python argparse")
15336 (description "argcomplete provides extensible command line tab completion
15337 of arguments and options for Python scripts using @code{argparse}. It's
15338 particularly useful for programs with many options or sub-parsers that can
15339 dynamically suggest completions; for example, when browsing resources over the
15340 network.")
15341 (license license:asl2.0)
15342 (properties `((python2-variant . ,(delay python2-argcomplete))))))
15343
15344 (define-public python2-argcomplete
15345 (let ((variant (package-with-python2
15346 (strip-python2-variant python-argcomplete))))
15347 (package/inherit variant
15348 (arguments
15349 (substitute-keyword-arguments (package-arguments variant)
15350 ((#:phases phases '%standard-phases)
15351 `(modify-phases ,phases
15352 (add-after 'unpack 'set-my-HOME
15353 (lambda _ (setenv "HOME" "/tmp")))))))
15354 (native-inputs
15355 `(("python2-importlib-metadata" ,python2-importlib-metadata)
15356 ,@(package-native-inputs variant))))))
15357
15358 (define-public python-csscompressor
15359 (package
15360 (name "python-csscompressor")
15361 (version "0.9.5")
15362 (source
15363 (origin
15364 (method url-fetch)
15365 (uri (pypi-uri "csscompressor" version))
15366 (sha256
15367 (base32
15368 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
15369 (build-system python-build-system)
15370 (arguments
15371 '(#:phases
15372 (modify-phases %standard-phases
15373 (replace 'check
15374 (lambda _
15375 (invoke "py.test"))))))
15376 (native-inputs
15377 `(("python-pytest" ,python-pytest)))
15378 (home-page "https://github.com/sprymix/csscompressor")
15379 (synopsis "Python port of YUI CSS Compressor")
15380 (description
15381 "This package provides a python port of YUI CSS Compressor.")
15382 (license license:bsd-3)))
15383
15384 (define-public python-rcssmin
15385 (package
15386 (name "python-rcssmin")
15387 (version "1.0.6")
15388 (source
15389 (origin
15390 (method url-fetch)
15391 (uri (pypi-uri "rcssmin" version))
15392 (sha256
15393 (base32
15394 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
15395 (build-system python-build-system)
15396 (arguments
15397 '(#:phases
15398 (modify-phases %standard-phases
15399 (replace 'check
15400 (lambda _
15401 (invoke "python" "run_tests.py" "tests"))))))
15402 (home-page "http://opensource.perlig.de/rcssmin/")
15403 (synopsis "CSS Minifier")
15404 (description "The minifier is based on the semantics of the YUI compressor,
15405 which itself is based on the rule list by Isaac Schlueter.")
15406 (license license:asl2.0)))
15407
15408 (define-public python-rjsmin
15409 (package
15410 (name "python-rjsmin")
15411 (version "1.1.0")
15412 (source
15413 (origin
15414 (method url-fetch)
15415 (uri (pypi-uri "rjsmin" version))
15416 (sha256
15417 (base32
15418 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
15419 (modules '((guix build utils)))
15420 (snippet
15421 '(begin
15422 (for-each delete-file (find-files "bench" "\\.js$"))
15423 #t))))
15424 (build-system python-build-system)
15425 (arguments
15426 '(#:tests? #f ; Not all test files included.
15427 #:phases
15428 (modify-phases %standard-phases
15429 (replace 'check
15430 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
15431 (add-installed-pythonpath inputs outputs)
15432 (if tests?
15433 (invoke "py.test" "-vv" "tests")
15434 #t))))))
15435 (native-inputs
15436 `(("python-pytest" ,python-pytest)))
15437 (home-page "http://opensource.perlig.de/rjsmin/")
15438 (synopsis "Javascript Minifier")
15439 (description "@code{rJSmin} is a javascript minifier written in Python. The
15440 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
15441 is a re-implementation aiming for speed, so it can be used at runtime (rather
15442 than during a preprocessing step).")
15443 (license license:asl2.0)))
15444
15445 (define-public python-xopen
15446 (package
15447 (name "python-xopen")
15448 (version "0.5.0")
15449 (source
15450 (origin
15451 (method url-fetch)
15452 (uri (pypi-uri "xopen" version))
15453 (sha256
15454 (base32
15455 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
15456 (build-system python-build-system)
15457 (propagated-inputs
15458 `(("python-setuptools-scm" ,python-setuptools-scm)))
15459 (home-page "https://github.com/marcelm/xopen/")
15460 (synopsis "Open compressed files transparently")
15461 (description "This module provides an @code{xopen} function that works like
15462 Python's built-in @code{open} function, but can also deal with compressed files.
15463 Supported compression formats are gzip, bzip2 and, xz, and are automatically
15464 recognized by their file extensions. The focus is on being as efficient as
15465 possible on all supported Python versions.")
15466 (license license:expat)))
15467
15468 (define-public python2-xopen
15469 (let ((base (package-with-python2
15470 (strip-python2-variant python-xopen))))
15471 (package/inherit base
15472 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
15473 ,@(package-propagated-inputs base))))))
15474
15475 (define-public python-cheetah
15476 (package
15477 (name "python-cheetah")
15478 (version "3.2.4")
15479 (source
15480 (origin
15481 (method url-fetch)
15482 (uri (pypi-uri "Cheetah3" version))
15483 (sha256
15484 (base32
15485 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
15486 (build-system python-build-system)
15487 (arguments
15488 `(#:modules ((guix build utils)
15489 (guix build python-build-system)
15490 (ice-9 ftw)
15491 (srfi srfi-1)
15492 (srfi srfi-26))
15493 #:phases (modify-phases %standard-phases
15494 (add-after 'unpack 'use-absolute-python
15495 (lambda _
15496 (substitute* "Cheetah/CheetahWrapper.py"
15497 (("#!/usr/bin/env python")
15498 (string-append "#!" (which "python"))))
15499 #t))
15500 (add-after 'unpack 'fix-tests
15501 (lambda _
15502 (substitute* "Cheetah/Tests/ImportHooks.py"
15503 (("os.path.dirname\\(__file__\\)")
15504 (string-append "'" (getcwd) "/Cheetah/Tests'")))
15505 #t))
15506 (replace 'check
15507 (lambda _
15508 (let ((cwd (getcwd)))
15509 (setenv "PYTHONPATH"
15510 (string-append
15511 cwd "/build/"
15512 (find (cut string-prefix? "lib" <>)
15513 (scandir (string-append cwd "/build")))
15514 ":" (getenv "PYTHONPATH")))
15515 (setenv "PATH"
15516 (string-append (getenv "PATH")
15517 ":" cwd "/bin"))
15518 (setenv "TMPDIR" "/tmp")
15519
15520 (substitute* "Cheetah/Tests/Test.py"
15521 (("unittest.TextTestRunner\\(\\)")
15522 "unittest.TextTestRunner(verbosity=2)"))
15523
15524 (invoke "python" "Cheetah/Tests/Test.py")))))))
15525 (propagated-inputs
15526 `(("python-markdown" ,python-markdown))) ;optional
15527 (home-page "https://cheetahtemplate.org/")
15528 (synopsis "Template engine")
15529 (description "Cheetah is a text-based template engine and Python code
15530 generator.
15531
15532 Cheetah can be used as a standalone templating utility or referenced as
15533 a library from other Python applications. It has many potential uses,
15534 but web developers looking for a viable alternative to ASP, JSP, PHP and
15535 PSP are expected to be its principle user group.
15536
15537 Features:
15538 @enumerate
15539 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
15540 text-based format.
15541 @item Cleanly separates content, graphic design, and program code.
15542 @item Blends the power and flexibility of Python with a simple template language
15543 that non-programmers can understand.
15544 @item Gives template writers full access to any Python data structure, module,
15545 function, object, or method in their templates.
15546 @item Makes code reuse easy by providing an object-orientated interface to
15547 templates that is accessible from Python code or other Cheetah templates.
15548 One template can subclass another and selectively reimplement sections of it.
15549 @item Provides a simple, yet powerful, caching mechanism that can dramatically
15550 improve the performance of a dynamic website.
15551 @item Compiles templates into optimized, yet readable, Python code.
15552 @end enumerate")
15553 (license (license:x11-style "file://LICENSE"))))
15554
15555 (define-public python2-cheetah
15556 (package-with-python2 python-cheetah))
15557
15558 (define-public python-dulwich
15559 (package
15560 (name "python-dulwich")
15561 (version "0.19.16")
15562 (source
15563 (origin
15564 (method url-fetch)
15565 (uri (list (string-append "https://www.dulwich.io/releases/"
15566 "dulwich-" version ".tar.gz")
15567 (pypi-uri "dulwich" version)))
15568 (sha256
15569 (base32
15570 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
15571 (build-system python-build-system)
15572 (arguments
15573 `(#:phases
15574 (modify-phases %standard-phases
15575 (add-before 'check 'fix-tests
15576 (lambda* (#:key inputs #:allow-other-keys)
15577 ;; The tests use Popen with a custom environment which doesn't
15578 ;; include PATH.
15579 (substitute* "dulwich/tests/compat/utils.py"
15580 (("'git'") (string-append "'"
15581 (which "git")
15582 "'")))
15583 (substitute* '("dulwich/tests/test_repository.py"
15584 "dulwich/tests/test_hooks.py")
15585 (("#!/bin/sh") (string-append "#!" (which "sh"))))
15586 (setenv "TEST_RUNNER" "unittest")
15587 (setenv "PYTHONHASHSEED" "random")
15588 #t)))))
15589 (propagated-inputs
15590 `(("python-fastimport" ,python-fastimport)
15591 ("python-urllib3" ,python-urllib3)))
15592 (native-inputs
15593 `(("python-mock" ,python-mock)
15594 ("python-geventhttpclient" ,python-geventhttpclient)
15595 ("git" ,git)))
15596 (home-page "https://www.dulwich.io/")
15597 (synopsis "Git implementation in Python")
15598 (description "Dulwich is an implementation of the Git file formats and
15599 protocols written in pure Python.")
15600 ;; Can be used with either license.
15601 (license (list license:asl2.0 license:gpl2+))))
15602
15603 (define-public python-pbkdf2
15604 (package
15605 (name "python-pbkdf2")
15606 (version "1.3")
15607 (source
15608 (origin
15609 (method url-fetch)
15610 (uri (pypi-uri "pbkdf2" version))
15611 (sha256
15612 (base32
15613 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
15614 (build-system python-build-system)
15615 (arguments
15616 '(#:phases
15617 (modify-phases %standard-phases
15618 (replace 'check
15619 (lambda _
15620 (setenv "PYTHONPATH"
15621 (string-append (getcwd) "/build/lib:"
15622 (getenv "PYTHONPATH")))
15623 (invoke "python" "test/test_pbkdf2.py"))))))
15624 (propagated-inputs
15625 `(("python-pycrypto" ,python-pycrypto))) ; optional
15626 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
15627 (synopsis "Password-based key derivation")
15628 (description "This module implements the password-based key derivation
15629 function, PBKDF2, specified in RSA PKCS#5 v2.0.
15630
15631 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
15632 is part of the RSA Public Key Cryptography Standards series. The provided
15633 implementation takes a password or a passphrase and a salt value (and
15634 optionally a iteration count, a digest module, and a MAC module) and provides
15635 a file-like object from which an arbitrarily-sized key can be read.")
15636 (license license:expat)))
15637
15638 (define-public python2-pbkdf2
15639 (package-with-python2 python-pbkdf2))
15640
15641 (define-public python-qrcode
15642 (package
15643 (name "python-qrcode")
15644 (version "6.1")
15645 (source
15646 (origin
15647 (method url-fetch)
15648 (uri (pypi-uri "qrcode" version))
15649 (sha256
15650 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
15651 (build-system python-build-system)
15652 (arguments
15653 ;; FIXME: Tests require packaging 'pymaging'.
15654 '(#:tests? #f))
15655 (propagated-inputs
15656 `(("python-lxml" ,python-lxml) ; for SVG output
15657 ("python-pillow" ,python-pillow) ; for PNG output
15658 ("python-six" ,python-six)))
15659 (home-page "https://github.com/lincolnloop/python-qrcode")
15660 (synopsis "QR Code image generator")
15661 (description "This package provides a pure Python QR Code generator
15662 module. It uses the Python Imaging Library (PIL) to allow for the generation
15663 of QR Codes.
15664
15665 In addition this package provides a command line tool to generate QR codes and
15666 either write these QR codes to a file or do the output as ascii art at the
15667 console.")
15668 (license license:bsd-3)))
15669
15670 (define-public python2-qrcode
15671 (package-with-python2 python-qrcode))
15672
15673 (define-public python-rst2ansi
15674 (package
15675 (name "python-rst2ansi")
15676 (version "0.1.5")
15677 (source
15678 (origin
15679 (method url-fetch)
15680 (uri (pypi-uri "rst2ansi" version))
15681 (sha256
15682 (base32
15683 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
15684 (build-system python-build-system)
15685 (propagated-inputs
15686 `(("python-docutils" ,python-docutils)))
15687 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
15688 (synopsis "Convert RST to ANSI-decorated console output")
15689 (description
15690 "Python module dedicated to rendering RST (reStructuredText) documents
15691 to ansi-escaped strings suitable for display in a terminal.")
15692 (license license:expat)))
15693
15694 (define-public python-ansi2html
15695 (package
15696 (name "python-ansi2html")
15697 (version "1.2.0")
15698 (source
15699 (origin
15700 (method url-fetch)
15701 (uri (pypi-uri "ansi2html" version))
15702 (sha256
15703 (base32
15704 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
15705 (build-system python-build-system)
15706 (native-inputs
15707 `(("python-mock" ,python-mock)
15708 ("python-nose" ,python-nose)))
15709 (propagated-inputs
15710 `(("python-six" ,python-six)))
15711 (home-page "https://github.com/ralphbean/ansi2html")
15712 (synopsis "Convert ANSI-decorated console output to HTML")
15713 (description
15714 "@command{ansi2html} is a Python library and command line utility for
15715 converting text with ANSI color codes to HTML or LaTeX.")
15716 (license license:gpl3+)))
15717
15718 (define-public python2-ansi2html
15719 (package-with-python2 python-ansi2html))
15720
15721 (define-public python-ddt
15722 (package
15723 (name "python-ddt")
15724 (version "1.4.1")
15725 (source
15726 (origin
15727 (method url-fetch)
15728 (uri (pypi-uri "ddt" version))
15729 (sha256
15730 (base32
15731 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
15732 (build-system python-build-system)
15733 (native-inputs
15734 `(("python-pytest" ,python-pytest)))
15735 (propagated-inputs
15736 `(("python-pyyaml" ,python-pyyaml)))
15737 (home-page "https://github.com/datadriventests/ddt")
15738 (synopsis "Data-Driven Tests")
15739 (description
15740 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
15741 running it with different test data, and make it appear as multiple test
15742 cases.")
15743 (license license:expat)))
15744
15745 (define-public python-pycountry
15746 (package
15747 (name "python-pycountry")
15748 (version "18.5.26")
15749 (source
15750 (origin
15751 (method url-fetch)
15752 (uri (pypi-uri "pycountry" version))
15753 (sha256
15754 (base32
15755 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
15756 (build-system python-build-system)
15757 (home-page "https://bitbucket.org/flyingcircus/pycountry")
15758 (synopsis "ISO databases for languages, countries, currencies, etc.")
15759 (description
15760 "@code{pycountry} provides the ISO databases for the standards:
15761 @enumerate
15762 @item 639-3 (Languages)
15763 @item 3166 (Countries)
15764 @item 3166-3 (Deleted Countries)
15765 @item 3166-2 (Subdivisions of countries)
15766 @item 4217 (Currencies)
15767 @item 15924 (Scripts)
15768 @end enumerate
15769 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
15770 through a Python API.")
15771 (license license:lgpl2.1+)))
15772
15773 (define-public python2-pycountry
15774 (package-with-python2 python-pycountry))
15775
15776 (define-public python-pycosat
15777 (package
15778 (name "python-pycosat")
15779 (version "0.6.3")
15780 (source
15781 (origin
15782 (method url-fetch)
15783 (uri (pypi-uri "pycosat" version ".zip"))
15784 (sha256
15785 (base32
15786 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
15787 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
15788 (build-system python-build-system)
15789 (native-inputs
15790 `(("unzip" ,unzip)))
15791 (home-page "https://github.com/ContinuumIO/pycosat")
15792 (synopsis "Bindings to picosat (a SAT solver)")
15793 (description
15794 "This package provides efficient Python bindings to @code{picosat} on
15795 the C level. When importing pycosat, the @code{picosat} solver becomes part
15796 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
15797 Problem} (SAT) solver.")
15798 (license license:expat)))
15799
15800 (define-public python2-pycosat
15801 (package-with-python2 python-pycosat))
15802
15803 (define-public python2-ruamel.ordereddict
15804 (package
15805 (name "python2-ruamel.ordereddict")
15806 (version "0.4.9")
15807 (source
15808 (origin
15809 (method url-fetch)
15810 (uri (pypi-uri "ruamel.ordereddict" version))
15811 (sha256
15812 (base32
15813 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
15814 (build-system python-build-system)
15815 (arguments
15816 `(#:python ,python-2
15817 #:phases
15818 (modify-phases %standard-phases
15819 (delete 'check)
15820 (add-after 'install 'check
15821 (lambda* (#:key inputs outputs #:allow-other-keys)
15822 (add-installed-pythonpath inputs outputs)
15823 (invoke "python" "test/testordereddict.py"))))))
15824 (home-page "https://bitbucket.org/ruamel/ordereddict")
15825 (synopsis "Version of dict that keeps keys in insertion order")
15826 (description
15827 "This is an implementation of an ordered dictionary with @dfn{Key
15828 Insertion Order} (KIO: updates of values do not affect the position of the
15829 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15830 removed and put at the back). The standard library module @code{OrderedDict},
15831 implemented later, implements a subset of @code{ordereddict} functionality.
15832 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15833 Order} (KSO, no sorting function can be specified, but a transform can be
15834 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15835 (license license:expat)))
15836
15837 (define-public python-pypeg2
15838 (package
15839 (name "python-pypeg2")
15840 (version "2.15.2")
15841 (source
15842 (origin
15843 (method url-fetch)
15844 (uri (pypi-uri "pyPEG2" version))
15845 (sha256
15846 (base32
15847 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15848 (build-system python-build-system)
15849 (propagated-inputs `(("python-lxml" ,python-lxml)))
15850 (arguments
15851 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15852 '(#:tests? #f))
15853 (home-page "https://fdik.org/pyPEG/")
15854 (synopsis "Parsing Expression Grammars in Python")
15855 (description "PyPEG is an intrinsic parser interpreter framework for
15856 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15857 parse many formal languages.")
15858 (license license:gpl2)))
15859
15860 (define-public python-incremental
15861 (package
15862 (name "python-incremental")
15863 (version "17.5.0")
15864 (source
15865 (origin
15866 (method url-fetch)
15867 (uri (pypi-uri "incremental" version))
15868 (sha256
15869 (base32
15870 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15871 (build-system python-build-system)
15872 (home-page "https://github.com/hawkowl/incremental")
15873 (synopsis "Library for versioning Python projects")
15874 (description "Incremental is a small library that versions your Python
15875 projects.")
15876 (license license:expat)))
15877
15878 (define-public python2-incremental
15879 (package-with-python2 python-incremental))
15880
15881 (define-public python-invoke
15882 (package
15883 (name "python-invoke")
15884 (home-page "https://www.pyinvoke.org/")
15885 (version "1.5.0")
15886 (source (origin
15887 (method url-fetch)
15888 (uri (pypi-uri "invoke" version))
15889 (sha256
15890 (base32
15891 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
15892 (build-system python-build-system)
15893 (arguments
15894 ;; XXX: Requires many dependencies that are not yet in Guix.
15895 `(#:tests? #f
15896 #:phases
15897 (modify-phases %standard-phases
15898 (add-after 'unpack 'fix-bash-path
15899 (lambda* (#:key inputs #:allow-other-keys)
15900 (let ((bash (assoc-ref inputs "bash")))
15901 (substitute* "invoke/config.py"
15902 (("shell = \"/bin/bash\"")
15903 (string-append "shell = \"" bash "/bin/bash\""))
15904 )
15905 #t))))))
15906 (inputs
15907 `(("bash" ,bash-minimal)))
15908 (synopsis "Pythonic task execution")
15909 (description
15910 "Invoke is a Python task execution tool and library, drawing inspiration
15911 from various sources to arrive at a powerful and clean feature set. It is
15912 evolved from the Fabric project, but focuses on local and abstract concerns
15913 instead of servers and network commands.")
15914 (license license:bsd-3)))
15915
15916 (define-public python2-invoke
15917 (package-with-python2 python-invoke))
15918
15919 (define-public python-automat
15920 (package
15921 (name "python-automat")
15922 (version "20.2.0")
15923 (source (origin
15924 (method url-fetch)
15925 (uri (pypi-uri "Automat" version))
15926 (sha256
15927 (base32
15928 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15929 (build-system python-build-system)
15930 ;; We disable the tests because they require python-twisted, while
15931 ;; python-twisted depends on python-automat. Twisted is optional, but the
15932 ;; tests fail if it is not available. Also see
15933 ;; <https://github.com/glyph/automat/issues/71>.
15934 (arguments '(#:tests? #f))
15935 (native-inputs
15936 `(("python-m2r" ,python-m2r)
15937 ("python-setuptools-scm" ,python-setuptools-scm)
15938 ("python-graphviz" ,python-graphviz)))
15939 (propagated-inputs
15940 `(("python-six" ,python-six)
15941 ("python-attrs" ,python-attrs)))
15942 (home-page "https://github.com/glyph/Automat")
15943 (synopsis "Self-service finite-state machines")
15944 (description "Automat is a library for concise, idiomatic Python
15945 expression of finite-state automata (particularly deterministic finite-state
15946 transducers).")
15947 (license license:expat)))
15948
15949 (define-public python2-automat
15950 (package-with-python2 python-automat))
15951
15952 (define-public python-m2r
15953 (package
15954 (name "python-m2r")
15955 (version "0.2.1")
15956 (source (origin
15957 (method url-fetch)
15958 (uri (pypi-uri "m2r" version))
15959 (sha256
15960 (base32
15961 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15962 (build-system python-build-system)
15963 (propagated-inputs
15964 `(("python-docutils" ,python-docutils)
15965 ("python-mistune" ,python-mistune)))
15966 (native-inputs
15967 `(("python-pygments" ,python-pygments)
15968 ("python-mock" ,python-mock)))
15969 (home-page "https://github.com/miyakogi/m2r")
15970 (synopsis "Markdown to reStructuredText converter")
15971 (description "M2R converts a markdown file including reST markups to valid
15972 reST format.")
15973 (license license:expat)))
15974
15975 (define-public python2-m2r
15976 (package-with-python2 python-m2r))
15977
15978 (define-public python-constantly
15979 (package
15980 (name "python-constantly")
15981 (version "15.1.0")
15982 (source (origin
15983 (method url-fetch)
15984 (uri (pypi-uri "constantly" version))
15985 (sha256
15986 (base32
15987 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15988 (build-system python-build-system)
15989 (home-page "https://github.com/twisted/constantly")
15990 (synopsis "Symbolic constants in Python")
15991 (description "Constantly is a Python library that provides symbolic
15992 constant support. It includes collections and constants with text, numeric,
15993 and bit flag values.")
15994 (license license:expat)))
15995
15996 (define-public python2-constantly
15997 (package-with-python2 python-constantly))
15998
15999 (define-public python-attrs
16000 (package
16001 (name "python-attrs")
16002 (version "19.3.0")
16003 (source (origin
16004 (method url-fetch)
16005 (uri (pypi-uri "attrs" version))
16006 (sha256
16007 (base32
16008 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
16009 (build-system python-build-system)
16010 (arguments
16011 `(#:modules ((guix build utils)
16012 (guix build python-build-system)
16013 (ice-9 ftw)
16014 (srfi srfi-1)
16015 (srfi srfi-26))
16016 #:phases (modify-phases %standard-phases
16017 (replace 'check
16018 (lambda _
16019 (let ((cwd (getcwd)))
16020 (setenv "PYTHONPATH"
16021 (string-append
16022 cwd "/build/"
16023 (find (cut string-prefix? "lib" <>)
16024 (scandir (string-append cwd "/build")))
16025 ":"
16026 (getenv "PYTHONPATH")))
16027 (invoke "python" "-m" "pytest")))))))
16028 (native-inputs
16029 `(("python-coverage" ,python-coverage)
16030 ("python-hypothesis" ,python-hypothesis)
16031 ("python-pympler" ,python-pympler)
16032 ("python-pytest" ,python-pytest)
16033 ("python-six" ,python-six)
16034 ("python-sphinx" ,python-sphinx)
16035 ("python-zope-interface" ,python-zope-interface)))
16036 (home-page "https://github.com/python-attrs/attrs/")
16037 (synopsis "Attributes without boilerplate")
16038 (description "@code{attrs} is a Python package with class decorators that
16039 ease the chores of implementing the most common attribute-related object
16040 protocols.")
16041 (license license:expat)))
16042
16043 (define-public python2-attrs
16044 (package-with-python2 python-attrs))
16045
16046 (define-public python-attrs-bootstrap
16047 (package
16048 (inherit python-attrs)
16049 (name "python-attrs-bootstrap")
16050 (native-inputs `())
16051 (arguments `(#:tests? #f))))
16052
16053 (define-public python2-attrs-bootstrap
16054 (package-with-python2 python-attrs-bootstrap))
16055
16056 (define-public python2-cliapp
16057 (package
16058 (name "python2-cliapp")
16059 (version "1.20180812.1")
16060 (source
16061 (origin
16062 (method url-fetch)
16063 (uri (string-append
16064 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
16065 version ".tar.gz"))
16066 (sha256
16067 (base32
16068 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
16069 (build-system python-build-system)
16070 (arguments
16071 `(#:python ,python-2
16072 #:phases
16073 (modify-phases %standard-phases
16074 ;; check phase needs to be run before the build phase. If not,
16075 ;; coverage-test-runner looks for tests for the built source files,
16076 ;; and fails.
16077 (delete 'check)
16078 (add-before 'build 'check
16079 (lambda _
16080 ;; Disable python3 tests
16081 (substitute* "check"
16082 (("python3") "# python3"))
16083 (invoke "./check"))))))
16084 (native-inputs
16085 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
16086 ("python2-pep8" ,python2-pep8)))
16087 (propagated-inputs
16088 `(("python2-pyaml" ,python2-pyaml)))
16089 (home-page "https://liw.fi/cliapp/")
16090 (synopsis "Python framework for command line programs")
16091 (description "@code{python2-cliapp} is a python framework for
16092 command line programs. It contains the typical stuff such programs
16093 need to do, such as parsing the command line for options, and
16094 iterating over input files.")
16095 (license license:gpl2+)))
16096
16097 (define-public python2-ttystatus
16098 (package
16099 (name "python2-ttystatus")
16100 (version "0.38")
16101 (source
16102 (origin
16103 (method git-fetch)
16104 (uri (git-reference
16105 (url "http://git.liw.fi/ttystatus")
16106 ;; There are no tags after ttystatus-0.36.
16107 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
16108 (sha256
16109 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
16110 (file-name (git-file-name name version))))
16111 (build-system python-build-system)
16112 (native-inputs
16113 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
16114 ("python2-pep8" ,python2-pep8)))
16115 (arguments
16116 `(#:python ,python-2
16117 #:phases
16118 (modify-phases %standard-phases
16119 ;; check phase needs to be run before the build phase. If not,
16120 ;; coverage-test-runner looks for tests for the built source files,
16121 ;; and fails.
16122 (delete 'check)
16123 (add-before 'build 'check
16124 (lambda _ (invoke "make" "check"))))))
16125 (home-page "https://liw.fi/ttystatus/")
16126 (synopsis "Python library for showing progress reporting and
16127 status updates on terminals")
16128 (description "@code{python2-ttystatus} is a python library for
16129 showing progress reporting and status updates on terminals, for
16130 command line programs. Output is automatically adapted to the width
16131 of the terminal: truncated if it does not fit, and resized if the
16132 terminal size changes.")
16133 (license license:gpl3+)))
16134
16135 (define-public python2-tracing
16136 (package
16137 (name "python2-tracing")
16138 (version "0.10")
16139 (source
16140 (origin
16141 (method url-fetch)
16142 (uri (string-append
16143 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
16144 version ".tar.gz"))
16145 (sha256
16146 (base32
16147 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
16148 (build-system python-build-system)
16149 (arguments
16150 `(#:python ,python-2))
16151 (home-page "https://liw.fi/tracing/")
16152 (synopsis "Python debug logging helper")
16153 (description "@code{python2-tracing} is a python library for
16154 logging debug messages. It provides a way to turn debugging messages
16155 on and off, based on the filename they occur in. It is much faster
16156 than using @code{logging.Filter} to accomplish the same thing, which
16157 matters when code is run in production mode. The actual logging still
16158 happens using the @code{logging} library.")
16159 (license license:gpl3+)))
16160
16161 (define-public python2-larch
16162 (package
16163 (name "python2-larch")
16164 (version "1.20151025")
16165 (source
16166 (origin
16167 (method url-fetch)
16168 (uri (string-append
16169 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
16170 version ".tar.gz"))
16171 (patches (search-patches
16172 "python2-larch-coverage-4.0a6-compatibility.patch"))
16173 (sha256
16174 (base32
16175 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
16176 (build-system python-build-system)
16177 (arguments
16178 `(#:python ,python-2
16179 #:phases
16180 (modify-phases %standard-phases
16181 ;; check phase needs to be run before the build phase. If not,
16182 ;; coverage-test-runner looks for tests for the built source files,
16183 ;; and fails.
16184 (delete 'check)
16185 (add-before 'build 'check
16186 (lambda _ (invoke "make" "check"))))))
16187 (native-inputs
16188 `(("cmdtest" ,cmdtest)
16189 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
16190 (propagated-inputs
16191 `(("python2-tracing" ,python2-tracing)))
16192 (home-page "https://liw.fi/larch/")
16193 (synopsis "Python copy-on-write B-tree library")
16194 (description "@code{python2-larch} is an implementation of
16195 particular kind of B-tree, based on research by Ohad Rodeh. See
16196 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
16197 on the data structure.
16198
16199 The distinctive feature of this B-tree is that a node is never
16200 (conceptually) modified. Instead, all updates are done by
16201 copy-on-write. This makes it easy to clone a tree, and modify only the
16202 clone, while other processes access the original tree.")
16203 (license license:gpl3+)))
16204
16205 (define-public python-astroid
16206 (package
16207 (name "python-astroid")
16208 (version "2.4.2")
16209 (source
16210 (origin
16211 (method url-fetch)
16212 (uri (pypi-uri "astroid" version))
16213 (sha256
16214 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
16215 (modules '((guix build utils)))
16216 (snippet
16217 '(begin
16218 ;; Check to see if the version pinning has been removed.
16219 (substitute* "astroid/__pkginfo__.py"
16220 (("==1\\.4\\.\\*") ">=1.4.0"))
16221 #t))))
16222 (build-system python-build-system)
16223 (propagated-inputs
16224 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
16225 ("python-six" ,python-six)
16226 ("python-wrapt" ,python-wrapt)))
16227 (native-inputs
16228 `(("python-dateutil" ,python-dateutil)
16229 ("python-pytest" ,python-pytest)
16230 ("python-pytest-runner" ,python-pytest-runner)))
16231 (home-page "https://github.com/PyCQA/astroid")
16232 (synopsis "Common base representation of python source code for pylint and
16233 other projects")
16234 (description "@code{python-astroid} provides a common base representation
16235 of python source code for projects such as pychecker, pyreverse, pylint, etc.
16236
16237 It provides a compatible representation which comes from the _ast module. It
16238 rebuilds the tree generated by the builtin _ast module by recursively walking
16239 down the AST and building an extended ast. The new node classes have
16240 additional methods and attributes for different usages. They include some
16241 support for static inference and local name scopes. Furthermore, astroid
16242 builds partial trees by inspecting living objects.")
16243 (license license:lgpl2.1+)
16244 (properties `((python2-variant . ,(delay python2-astroid))))))
16245
16246 (define-public python2-astroid
16247 (let ((base (package-with-python2
16248 (strip-python2-variant python-astroid))))
16249 (package (inherit base)
16250 ;; Version 2.x removes python2 support.
16251 (version "1.6.5")
16252 (source
16253 (origin
16254 (method url-fetch)
16255 (uri (pypi-uri "astroid" version))
16256 (sha256
16257 (base32
16258 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
16259 (arguments
16260 (substitute-keyword-arguments (package-arguments base)
16261 ((#:phases phases)
16262 `(modify-phases ,phases
16263 (add-after 'unpack 'remove-spurious-test
16264 (lambda _
16265 ;; https://github.com/PyCQA/astroid/issues/276
16266 (delete-file "astroid/tests/unittest_brain.py")
16267 #t))
16268 (replace 'check
16269 (lambda _
16270 (invoke"python" "-m" "unittest" "discover"
16271 "-p" "unittest*.py")))))))
16272 (native-inputs `())
16273 (propagated-inputs
16274 `(("python2-backports-functools-lru-cache"
16275 ,python2-backports-functools-lru-cache)
16276 ("python2-enum34" ,python2-enum34)
16277 ("python2-singledispatch" ,python2-singledispatch)
16278 ,@(alist-delete "python-typed-ast"
16279 (package-propagated-inputs base)))))))
16280
16281 (define-public python-isbnlib
16282 (package
16283 (name "python-isbnlib")
16284 (version "3.10.4")
16285 (source
16286 (origin
16287 (method url-fetch)
16288 (uri (pypi-uri "isbnlib" version))
16289 (sha256
16290 (base32
16291 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
16292 (build-system python-build-system)
16293 (arguments '(#:tests? #f)) ; No test
16294 (home-page "https://github.com/xlcnd/isbnlib")
16295 (synopsis "Python library to work with ISBN strings")
16296 (description "@code{python-isbnlib} is a (pure) python library that provides
16297 several useful methods and functions to validate, clean, transform, hyphenate and
16298 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
16299 version, is suitable to be include as a dependency in other projects.")
16300 (license license:lgpl3+)))
16301
16302 (define-public python-isort
16303 (package
16304 (name "python-isort")
16305 (version "4.3.4")
16306 (source
16307 (origin
16308 (method git-fetch)
16309 (uri (git-reference
16310 ;; Tests pass only from the Github sources
16311 (url "https://github.com/timothycrosley/isort")
16312 (commit version)))
16313 (file-name (git-file-name name version))
16314 (sha256
16315 (base32
16316 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
16317 (build-system python-build-system)
16318 (native-inputs
16319 `(("python-mock" ,python-mock)
16320 ("python-pytest" ,python-pytest)))
16321 (home-page "https://github.com/timothycrosley/isort")
16322 (synopsis "Python utility/library to sort python imports")
16323 (description "@code{python-isort} is a python utility/library to sort
16324 imports alphabetically, and automatically separated into sections. It
16325 provides a command line utility, a python library and plugins for various
16326 editors.")
16327 (license license:expat)
16328 (properties `((python2-variant . ,(delay python2-isort))))))
16329
16330 (define-public python2-isort
16331 (let ((base (package-with-python2
16332 (strip-python2-variant python-isort))))
16333 (package/inherit base
16334 (native-inputs
16335 `(("python2-futures" ,python2-futures)
16336 ,@(package-native-inputs base))))))
16337
16338 (define-public python2-backports-functools-lru-cache
16339 (package
16340 (name "python2-backports-functools-lru-cache")
16341 (version "1.6.1")
16342 (source
16343 (origin
16344 (method url-fetch)
16345 ;; only the pypi tarballs contain the necessary metadata
16346 (uri (pypi-uri "backports.functools_lru_cache" version))
16347 (sha256
16348 (base32
16349 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
16350 (build-system python-build-system)
16351 (native-inputs
16352 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
16353 (arguments
16354 `(#:python ,python-2))
16355 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
16356 (synopsis "Backport of functools.lru_cache from Python 3.3")
16357 (description "@code{python2-backports-functools-lru-cache} is a backport
16358 of @code{functools.lru_cache} from python 3.3.")
16359 (license license:expat)))
16360
16361 (define-public python-configparser
16362 (package
16363 (name "python-configparser")
16364 (version "4.0.2")
16365 (source
16366 (origin
16367 (method url-fetch)
16368 (uri (pypi-uri "configparser" version))
16369 (sha256
16370 (base32
16371 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
16372 (native-inputs
16373 `(("python-setuptools_scm" ,python-setuptools-scm)))
16374 (build-system python-build-system)
16375 (home-page "https://github.com/jaraco/configparser/")
16376 (synopsis "Backport of configparser from python 3.5")
16377 (description "@code{python-configparser} is a backport of
16378 @code{configparser} from Python 3.5 so that it can be used directly
16379 in other versions.")
16380 (license license:expat)))
16381
16382 (define-public python2-configparser
16383 (package-with-python2 python-configparser))
16384
16385 (define-public python-iniconfig
16386 (package
16387 (name "python-iniconfig")
16388 (version "1.1.1")
16389 (source
16390 (origin
16391 (method url-fetch)
16392 (uri (pypi-uri "iniconfig" version))
16393 (sha256
16394 (base32
16395 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
16396 (build-system python-build-system)
16397 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
16398 (synopsis "Simple INI-file parser")
16399 (description "The @code{iniconfig} package provides a small and simple
16400 INI-file parser module having a unique set of features; @code{iniconfig}
16401 @itemize
16402 @item maintains the order of sections and entries;
16403 @item supports multi-line values with or without line-continuations;
16404 @item supports \"#\" comments everywhere;
16405 @item raises errors with proper line-numbers;
16406 @item raises an error when two sections have the same name.
16407 @end itemize")
16408 (license license:expat)))
16409
16410 (define-public python-mamba
16411 (package
16412 (name "python-mamba")
16413 (version "0.11.2")
16414 (source (origin
16415 (method url-fetch)
16416 (uri (pypi-uri "mamba" version))
16417 (sha256
16418 (base32
16419 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
16420 (build-system python-build-system)
16421 (arguments `(#:tests? #f)) ; No test
16422 (propagated-inputs
16423 `(("python-clint" ,python-clint)
16424 ("python-coverage" ,python-coverage)))
16425 (home-page "https://nestorsalceda.com/mamba/")
16426 (synopsis "Test runner for Python")
16427 (description
16428 "Mamba is a Behaviour-Driven Development tool for Python developers.
16429 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
16430 (license license:expat)))
16431
16432 (define-public python-mando
16433 (package
16434 (name "python-mando")
16435 (version "0.6.4")
16436 (source (origin
16437 (method url-fetch)
16438 (uri (pypi-uri "mando" version))
16439 (sha256
16440 (base32
16441 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
16442 (build-system python-build-system)
16443 (propagated-inputs
16444 `(("python-rst2ansi" ,python-rst2ansi)
16445 ("python-six" ,python-six)))
16446 (native-inputs
16447 `(("python-pytest" ,python-pytest)))
16448 (home-page "https://mando.readthedocs.org/")
16449 (synopsis
16450 "Wrapper around argparse, allowing creation of complete CLI applications")
16451 (description
16452 "This package is a wrapper around argparse, allowing you to write complete CLI
16453 applications in seconds while maintaining all the flexibility.")
16454 (license license:expat)))
16455
16456 (define-public python2-mando
16457 (package-with-python2 python-mando))
16458
16459 (define-public python2-argparse
16460 (package
16461 (name "python2-argparse")
16462 (version "1.4.0")
16463 (source
16464 (origin
16465 (method url-fetch)
16466 (uri (pypi-uri "argparse" version))
16467 (sha256
16468 (base32
16469 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
16470 (build-system python-build-system)
16471 (arguments
16472 `(#:python ,python-2))
16473 (home-page "https://github.com/ThomasWaldmann/argparse/")
16474 (synopsis "Python command-line parsing library")
16475 (description
16476 "This package is mostly for people who want to have @code{argparse} on
16477 older Pythons because it was not part of the standard library back then.")
16478 (license license:psfl)))
16479
16480 (define-public python-fudge
16481 (package
16482 (name "python-fudge")
16483 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
16484 ;; package, which is currently the only use of this package.
16485 (version "0.9.6")
16486 (source
16487 (origin
16488 (method url-fetch)
16489 (uri (pypi-uri "fudge" version))
16490 (sha256
16491 (base32
16492 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
16493 (build-system python-build-system)
16494 (arguments
16495 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
16496 (home-page "https://github.com/fudge-py/fudge")
16497 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
16498 (description
16499 "Fudge is a Python module for using fake objects (mocks and stubs) to
16500 test real ones.
16501
16502 In readable Python code, you declare the methods available on your fake object
16503 and how they should be called. Then you inject that into your application and
16504 start testing. This declarative approach means you don’t have to record and
16505 playback actions and you don’t have to inspect your fakes after running code.
16506 If the fake object was used incorrectly then you’ll see an informative
16507 exception message with a traceback that points to the culprit.")
16508 (license license:expat)))
16509
16510 (define-public python2-fudge
16511 (package-with-python2 python-fudge))
16512
16513 (define-public python-mwclient
16514 (package
16515 (name "python-mwclient")
16516 (version "0.10.1")
16517 (source
16518 (origin
16519 (method git-fetch)
16520 ;; The PyPI version wouldn't contain tests.
16521 (uri (git-reference
16522 (url "https://github.com/mwclient/mwclient")
16523 (commit (string-append "v" version))))
16524 (file-name (git-file-name name version))
16525 (sha256
16526 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
16527 (build-system python-build-system)
16528 (propagated-inputs
16529 `(("python-requests-oauthlib" ,python-requests-oauthlib)
16530 ("python-six" ,python-six)))
16531 (native-inputs
16532 `(("python-mock" ,python-mock)
16533 ("python-pytest" ,python-pytest)
16534 ("python-pytest-cov" ,python-pytest-cov)
16535 ("python-pytest-runner" ,python-pytest-runner)
16536 ("python-responses" ,python-responses)))
16537 (home-page "https://github.com/btongminh/mwclient")
16538 (synopsis "MediaWiki API client")
16539 (description "This package provides a MediaWiki API client.")
16540 (license license:expat)))
16541
16542 (define-public python-utils
16543 (package
16544 (name "python-utils")
16545 (version "2.4.0")
16546 (source (origin
16547 (method url-fetch)
16548 (uri (pypi-uri "python-utils" version))
16549 (sha256
16550 (base32
16551 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
16552 (build-system python-build-system)
16553 (arguments
16554 `(#:phases
16555 (modify-phases %standard-phases
16556 (replace 'check
16557 (lambda* (#:key inputs outputs #:allow-other-keys)
16558 (add-installed-pythonpath inputs outputs)
16559 (delete-file "pytest.ini")
16560 (invoke "pytest" "-vv"))))))
16561 (native-inputs
16562 `(("pytest-runner" ,python-pytest-runner)
16563 ("pytest" ,python-pytest)
16564 ("six" ,python-six)))
16565 (home-page "https://github.com/WoLpH/python-utils")
16566 (synopsis "Convenient utilities not included with the standard Python install")
16567 (description
16568 "Python Utils is a collection of small Python functions and classes which
16569 make common patterns shorter and easier.")
16570 (license license:bsd-2)))
16571
16572 (define-public python-diff-match-patch
16573 (package
16574 (name "python-diff-match-patch")
16575 (version "20121119")
16576 (source
16577 (origin
16578 (method url-fetch)
16579 (uri (pypi-uri "diff-match-patch" version))
16580 (sha256
16581 (base32
16582 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
16583 (build-system python-build-system)
16584 (home-page "https://code.google.com/p/google-diff-match-patch")
16585 (synopsis "Synchronize plain text")
16586 (description "Diff Match and Patch libraries offer robust algorithms to
16587 perform the operations required for synchronizing plain text.")
16588 (license license:asl2.0)))
16589
16590 (define-public python2-diff-match-patch
16591 (package-with-python2 python-diff-match-patch))
16592
16593 (define-public python-dirsync
16594 (package
16595 (name "python-dirsync")
16596 (version "2.2.5")
16597 (source
16598 (origin
16599 (method url-fetch)
16600 (uri (pypi-uri "dirsync" version))
16601 (sha256
16602 (base32
16603 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
16604 (build-system python-build-system)
16605 (propagated-inputs
16606 `(("six" ,python-six)))
16607 (home-page "https://github.com/tkhyn/dirsync")
16608 (synopsis "Advanced directory tree synchronisation tool")
16609 (description "Advanced directory tree synchronisation tool.")
16610 (license license:expat)))
16611
16612 (define-public python2-dirsync
16613 (package-with-python2 python-dirsync))
16614
16615 (define-public python-levenshtein
16616 (package
16617 (name "python-levenshtein")
16618 (version "0.12.0")
16619 (source
16620 (origin
16621 (method url-fetch)
16622 (uri (pypi-uri "python-Levenshtein" version))
16623 (sha256
16624 (base32
16625 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
16626 (build-system python-build-system)
16627 (home-page "https://github.com/ztane/python-Levenshtein")
16628 (synopsis "Fast computation of Levenshtein distance and string similarity")
16629 (description
16630 "The Levenshtein Python C extension module contains functions for fast computation of
16631 @enumerate
16632 @item Levenshtein (edit) distance, and edit operations
16633 @item string similarity
16634 @item approximate median strings, and generally string averaging
16635 @item string sequence and set similarity
16636 @end enumerate
16637 It supports both normal and Unicode strings.")
16638 (license license:gpl2+)))
16639
16640 (define-public python2-levenshtein
16641 (package-with-python2 python-levenshtein))
16642
16643 (define-public python-scandir
16644 (package
16645 (name "python-scandir")
16646 (version "1.10.0")
16647 (source
16648 (origin
16649 (method url-fetch)
16650 (uri (pypi-uri "scandir" version))
16651 (sha256
16652 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
16653 (build-system python-build-system)
16654 (arguments
16655 `(#:phases (modify-phases %standard-phases
16656 (replace 'check
16657 (lambda _
16658 (invoke "python" "test/run_tests.py"))))))
16659 (home-page "https://github.com/benhoyt/scandir")
16660 (synopsis "Directory iteration function")
16661 (description
16662 "Directory iteration function like os.listdir(), except that instead of
16663 returning a list of bare filenames, it yields DirEntry objects that include
16664 file type and stat information along with the name. Using scandir() increases
16665 the speed of os.walk() by 2-20 times (depending on the platform and file
16666 system) by avoiding unnecessary calls to os.stat() in most cases.
16667
16668 This package is part of the Python standard library since version 3.5.")
16669 (license license:bsd-3)))
16670
16671 (define-public python2-scandir
16672 (package-with-python2 python-scandir))
16673
16674 (define-public python2-stemming
16675 (package
16676 (name "python2-stemming")
16677 (version "1.0.1")
16678 (source
16679 (origin
16680 (method url-fetch)
16681 (uri (pypi-uri "stemming" version))
16682 (sha256
16683 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
16684 (build-system python-build-system)
16685 (arguments
16686 `(#:python ,python-2))
16687 (home-page "https://bitbucket.org/mchaput/stemming/overview")
16688 (synopsis "Python implementations of various stemming algorithms")
16689 (description
16690 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
16691 stemming algorithms for English. These implementations are straightforward and
16692 efficient, unlike some Python versions of the same algorithms available on the
16693 Web. This package is an extraction of the stemming code included in the Whoosh
16694 search engine.")
16695 (license license:public-domain)))
16696
16697 (define-public python-factory-boy
16698 (package
16699 (name "python-factory-boy")
16700 (version "2.8.1")
16701 (source
16702 (origin
16703 (method url-fetch)
16704 (uri (pypi-uri "factory_boy" version))
16705 (sha256
16706 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
16707 (build-system python-build-system)
16708 (arguments
16709 ;; Tests are not included in the tarball.
16710 `(#:tests? #f))
16711 (propagated-inputs
16712 `(("faker" ,python-faker)))
16713 (home-page "https://github.com/benhoyt/scandir")
16714 (synopsis "Versatile test fixtures replacement")
16715 (description
16716 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
16717
16718 As a fixtures replacement tool, it aims to replace static, hard to maintain
16719 fixtures with easy-to-use factories for complex object.
16720
16721 Instead of building an exhaustive test setup with every possible combination
16722 of corner cases, factory_boy allows you to use objects customized for the
16723 current test, while only declaring the test-specific fields")
16724 (license license:expat)))
16725
16726 (define-public python2-factory-boy
16727 (package-with-python2 python-factory-boy))
16728
16729 (define-public python-translate-toolkit
16730 (package
16731 (name "python-translate-toolkit")
16732 (version "2.1.0")
16733 (source
16734 (origin
16735 (method url-fetch)
16736 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
16737 (sha256
16738 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
16739 (build-system python-build-system)
16740 (native-inputs
16741 `(("python-pytest" ,python-pytest)
16742 ("python-sphinx" ,python-sphinx)))
16743 (propagated-inputs
16744 `(("python-babel" ,python-babel)
16745 ("python-beautifulsoup4" ,python-beautifulsoup4)
16746 ("python-chardet" ,python-chardet)
16747 ("python-diff-match-patch" ,python-diff-match-patch)
16748 ("python-levenshtein" ,python-levenshtein)
16749 ("python-lxml" ,python-lxml)
16750 ("python-six" ,python-six)
16751 ("python-vobject" ,python-vobject)
16752 ("python-pyyaml" ,python-pyyaml)))
16753 (arguments
16754 ;; TODO: tests are not run, because they end with
16755 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
16756 ;; 'parse_funcs'
16757 ;; during test setup.
16758 `(#:tests? #f))
16759 (home-page "https://toolkit.translatehouse.org")
16760 (synopsis "Tools and API for translation and localization engineering")
16761 (description
16762 "Tools and API for translation and localization engineering. It contains
16763 several utilities, as well as an API for building localization tools.")
16764 (license license:gpl2+)))
16765
16766 (define-public python2-translate-toolkit
16767 (package-with-python2 python-translate-toolkit))
16768
16769 (define-public python-packaging
16770 (package
16771 (name "python-packaging")
16772 (version "20.0")
16773 (source
16774 (origin
16775 (method url-fetch)
16776 (uri (pypi-uri "packaging" version))
16777 ;; XXX: The URL in the patch file is wrong, it should be
16778 ;; <https://github.com/pypa/packaging/pull/256>.
16779 (patches (search-patches "python-packaging-test-arch.patch"))
16780 (sha256
16781 (base32
16782 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
16783 (build-system python-build-system)
16784 (arguments
16785 `(#:phases (modify-phases %standard-phases
16786 (replace 'check
16787 (lambda* (#:key tests? #:allow-other-keys)
16788 (if tests?
16789 (invoke "py.test" "-vv")
16790 (format #t "test suite not run~%"))
16791 #t)))))
16792 (native-inputs
16793 `(("python-pretend" ,python-pretend)
16794 ("python-pytest" ,python-pytest)))
16795 (propagated-inputs
16796 `(("python-pyparsing" ,python-pyparsing)
16797 ("python-six" ,python-six)))
16798 (home-page "https://github.com/pypa/packaging")
16799 (synopsis "Core utilities for Python packages")
16800 (description "Packaging is a Python module for dealing with Python packages.
16801 It offers an interface for working with package versions, names, and dependency
16802 information.")
16803 ;; From 'LICENSE': This software is made available under the terms of
16804 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
16805 ;; Contributions to this software is made under the terms of *both* these
16806 ;; licenses.
16807 (license (list license:asl2.0 license:bsd-2))))
16808
16809 (define-public python2-packaging
16810 (package-with-python2 python-packaging))
16811
16812 ;; Variants with minimal dependencies, for bootstrapping Pytest.
16813 (define-public python-packaging-bootstrap
16814 (hidden-package
16815 (package/inherit
16816 python-packaging
16817 (name "python-packaging-bootstrap")
16818 (native-inputs '())
16819 (propagated-inputs
16820 `(("python-pyparsing" ,python-pyparsing)))
16821 (arguments '(#:tests? #f)))))
16822
16823 (define-public python2-packaging-bootstrap
16824 (hidden-package
16825 (package/inherit
16826 python2-packaging
16827 (name "python2-packaging-bootstrap")
16828 (native-inputs '())
16829 (propagated-inputs
16830 `(("python-pyparsing" ,python2-pyparsing)))
16831 (arguments
16832 `(#:tests? #f
16833 ,@(package-arguments python2-packaging))))))
16834
16835 (define-public python-relatorio
16836 (package
16837 (name "python-relatorio")
16838 (version "0.8.0")
16839 (source
16840 (origin
16841 (method url-fetch)
16842 (uri (pypi-uri "relatorio" version))
16843 (sha256
16844 (base32
16845 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16846 (build-system python-build-system)
16847 (propagated-inputs
16848 `(("python-lxml" ,python-lxml)
16849 ("python-genshi" ,python-genshi)))
16850 (native-inputs
16851 `(("python-magic" ,python-magic)))
16852 (home-page "https://relatorio.tryton.org/")
16853 (synopsis "Templating library able to output ODT and PDF files")
16854 (description "Relatorio is a templating library which provides a way to
16855 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16856 for more filetypes can be easily added by creating plugins for them.")
16857 (license license:gpl3+)))
16858
16859 (define-public python2-relatorio
16860 (package-with-python2 python-relatorio))
16861
16862 (define-public python-radon
16863 (package
16864 (name "python-radon")
16865 (version "4.1.0")
16866 (source
16867 (origin
16868 (method url-fetch)
16869 (uri (pypi-uri "radon" version))
16870 (sha256
16871 (base32
16872 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
16873 (build-system python-build-system)
16874 (arguments
16875 `(#:phases (modify-phases %standard-phases
16876 (replace 'check
16877 (lambda _
16878 (invoke "python" "radon/tests/run.py"))))))
16879 (propagated-inputs
16880 `(("python-colorama" ,python-colorama)
16881 ("python-flake8-polyfill" ,python-flake8-polyfill)
16882 ("python-mando" ,python-mando)))
16883 (native-inputs
16884 `(("python-pytest" ,python-pytest)
16885 ("python-pytest-mock" ,python-pytest-mock)))
16886 (home-page "https://radon.readthedocs.org/")
16887 (synopsis "Code Metrics in Python")
16888 (description "Radon is a Python tool which computes various code metrics.
16889 Supported metrics are:
16890 @itemize @bullet
16891 @item raw metrics: SLOC, comment lines, blank lines, &c.
16892 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16893 @item Halstead metrics (all of them)
16894 @item the Maintainability Index (a Visual Studio metric)
16895 @end itemize")
16896 (properties `((python2-variant . ,(delay python2-radon))))
16897 (license license:expat)))
16898
16899 (define-public python2-radon
16900 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16901 (package/inherit base
16902 (propagated-inputs
16903 `(("python-configparser" ,python2-configparser)
16904 ("python-future" ,python2-future)
16905 ,@(package-propagated-inputs base))))))
16906
16907 (define-public python-sure
16908 (package
16909 (name "python-sure")
16910 (version "1.4.11")
16911 (source
16912 (origin
16913 (method url-fetch)
16914 (uri (pypi-uri "sure" version))
16915 (sha256
16916 (base32
16917 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16918 (build-system python-build-system)
16919 (propagated-inputs
16920 `(("python-mock" ,python-mock)
16921 ("python-six" ,python-six)))
16922 (native-inputs
16923 `(("python-nose" ,python-nose)))
16924 (home-page "https://github.com/gabrielfalcao/sure")
16925 (synopsis "Automated testing library in python for python")
16926 (description
16927 "Sure is a python library that leverages a DSL for writing assertions.
16928 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16929 (license license:gpl3+)))
16930
16931 (define-public python2-sure
16932 (package-with-python2 python-sure))
16933
16934 (define-public python2-couleur
16935 ;; This package does not seem to support python3 at all, hence,
16936 ;; only the python2 variant definition is provided.
16937 (package
16938 (name "python2-couleur")
16939 (version "0.6.2")
16940 (source
16941 (origin
16942 (method url-fetch)
16943 (uri (pypi-uri "couleur" version))
16944 (sha256
16945 (base32
16946 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16947 (build-system python-build-system)
16948 (arguments
16949 `(#:python ,python-2))
16950 (home-page "https://github.com/gabrielfalcao/couleur")
16951 (synopsis
16952 "ANSI terminal tool for python, colored shell and other handy fancy features")
16953 (description
16954 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16955 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16956 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16957 ;; https://github.com/gabrielfalcao/couleur/issues/11
16958 (license license:lgpl3+)))
16959
16960 (define-public python-misaka
16961 (package
16962 (name "python-misaka")
16963 (version "2.1.1")
16964 (source
16965 (origin
16966 (method url-fetch)
16967 (uri (pypi-uri "misaka" version))
16968 (sha256
16969 (base32
16970 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16971 (build-system python-build-system)
16972 (arguments
16973 `(;; Line 37 of setup.py calls self.run_command('develop')
16974 ;; in the 'check' phase. This command seems to be trying
16975 ;; to write to
16976 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16977 ;; for which it does not have the permission to write.
16978 #:tests? #f))
16979 (propagated-inputs
16980 `(("python-cffi" ,python-cffi)))
16981 (home-page "https://github.com/FSX/misaka")
16982 (synopsis "Python binding for Hoedown")
16983 (description
16984 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16985 library written in C. It features a fast HTML renderer and functionality to make custom
16986 renderers (e.g. man pages or LaTeX).")
16987 (license license:expat)))
16988
16989 (define-public python2-misaka
16990 (package-with-python2 python-misaka))
16991
16992 (define-public python2-steadymark
16993 ;; This is forced into being a python2 only variant
16994 ;; due to its dependence on couleur that has no support
16995 ;; for python3
16996 (package
16997 (name "python2-steadymark")
16998 (version "0.7.3")
16999 (source
17000 (origin
17001 (method url-fetch)
17002 (uri (pypi-uri "steadymark" version))
17003 (sha256
17004 (base32
17005 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
17006 (build-system python-build-system)
17007 (native-inputs
17008 `(("python-couleur" ,python2-couleur)
17009 ("python-sure" ,python2-sure)
17010 ("python-misaka" ,python2-misaka)))
17011 (arguments
17012 `(#:python ,python-2
17013 #:phases
17014 (modify-phases %standard-phases
17015 (add-before 'build 'patch-setup-py
17016 (lambda _
17017 ;; Update requirements from dependency==version
17018 ;; to dependency>=version
17019 (substitute* "setup.py"
17020 (("==") ">="))
17021 #t)))))
17022 (home-page "https://github.com/gabrielfalcao/steadymark")
17023 (synopsis "Markdown-based test runner for python")
17024 (description
17025 "@code{Steadymark} allows documentation to be written in github-flavoured
17026 markdown. The documentation may contain snippets of code surrounded by python
17027 code blocks and @code{Steadymark} will find these snippets and run them, making
17028 sure that there are no old malfunctional examples in the documentation examples.")
17029 (license license:expat)))
17030
17031 (define-public python-jsonpointer
17032 (package
17033 (name "python-jsonpointer")
17034 (version "1.10")
17035 (source
17036 (origin
17037 (method url-fetch)
17038 (uri (pypi-uri "jsonpointer" version))
17039 (sha256
17040 (base32
17041 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
17042 (build-system python-build-system)
17043 (home-page "https://github.com/stefankoegl/python-json-pointer")
17044 (synopsis "Identify specific nodes in a JSON document")
17045 (description "@code{jsonpointer} allows you to access specific nodes
17046 by path in a JSON document (see RFC 6901).")
17047 (license license:bsd-3)))
17048
17049 (define-public python2-jsonpointer
17050 (package-with-python2 python-jsonpointer))
17051
17052 (define-public python-jsonpatch
17053 (package
17054 (name "python-jsonpatch")
17055 (version "1.16")
17056 (source
17057 (origin
17058 (method git-fetch)
17059 ;; pypi version lacks tests.js
17060 (uri (git-reference
17061 (url "https://github.com/stefankoegl/python-json-patch")
17062 (commit (string-append "v" version))))
17063 (file-name (git-file-name name version))
17064 (sha256
17065 (base32
17066 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
17067 (build-system python-build-system)
17068 (propagated-inputs
17069 `(("python-jsonpointer" ,python-jsonpointer)))
17070 (home-page "https://github.com/stefankoegl/python-json-patch")
17071 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
17072 (description "@code{jsonpatch} is a library and program that allows
17073 applying JSON Patches according to RFC 6902.")
17074 (license license:bsd-3)))
17075
17076 (define-public python2-jsonpatch
17077 (package-with-python2 python-jsonpatch))
17078
17079 (define-public python-jsonpatch-0.4
17080 (package (inherit python-jsonpatch)
17081 (name "python-jsonpatch")
17082 (version "0.4")
17083 (source
17084 (origin
17085 (method git-fetch)
17086 (uri (git-reference
17087 (url "https://github.com/stefankoegl/python-json-patch")
17088 (commit (string-append "v" version))))
17089 (file-name (git-file-name name version))
17090 (sha256
17091 (base32
17092 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
17093
17094 (define-public python2-jsonpatch-0.4
17095 (package-with-python2 python-jsonpatch-0.4))
17096
17097 (define-public python-rfc3986
17098 (package
17099 (name "python-rfc3986")
17100 (version "1.4.0")
17101 (source (origin
17102 (method url-fetch)
17103 (uri (pypi-uri "rfc3986" version))
17104 (sha256
17105 (base32
17106 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
17107 (build-system python-build-system)
17108 (arguments
17109 `(#:modules ((guix build utils)
17110 (guix build python-build-system)
17111 (ice-9 ftw)
17112 (srfi srfi-1)
17113 (srfi srfi-26))
17114 #:phases
17115 (modify-phases %standard-phases
17116 (replace 'check
17117 (lambda _
17118 (let ((cwd (getcwd)))
17119 (setenv "PYTHONPATH"
17120 (string-append cwd "/build/"
17121 (find (cut string-prefix? "lib" <>)
17122 (scandir (string-append cwd "/build")))
17123 ":"
17124 (getenv "PYTHONPATH")))
17125 (invoke "pytest" "-v")))))))
17126 (native-inputs
17127 `(("python-pytest" ,python-pytest)))
17128 (home-page "https://rfc3986.readthedocs.io/")
17129 (synopsis "Parse and validate URI references")
17130 (description
17131 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
17132 validation and authority parsing. This module also supports RFC@tie{}6874
17133 which adds support for zone identifiers to IPv6 addresses.")
17134 (license license:asl2.0)))
17135
17136 (define-public python2-rfc3986
17137 (package-with-python2 python-rfc3986))
17138
17139 (define-public python-rfc3987
17140 (package
17141 (name "python-rfc3987")
17142 (version "1.3.7")
17143 (source
17144 (origin
17145 (method url-fetch)
17146 (uri (pypi-uri "rfc3987" version))
17147 (sha256
17148 (base32
17149 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
17150 (build-system python-build-system)
17151 (home-page "https://pypi.org/project/rfc3987/")
17152 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
17153 (description "@code{rfc3987} provides routines for parsing and
17154 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
17155 (license license:gpl3+)))
17156
17157 (define-public python2-rfc3987
17158 (package-with-python2 python-rfc3987))
17159
17160 ;; The latest commit contains fixes for building with both python3 and python2.
17161 (define-public python-rfc6555
17162 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
17163 (revision "1"))
17164 (package
17165 (name "python-rfc6555")
17166 (version (git-version "0.0.0" revision commit))
17167 (source (origin
17168 (method git-fetch)
17169 (uri (git-reference
17170 (url "https://github.com/sethmlarson/rfc6555")
17171 (commit commit)))
17172 (file-name (git-file-name name version))
17173 (sha256
17174 (base32
17175 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
17176 (build-system python-build-system)
17177 (arguments
17178 '(#:phases
17179 (modify-phases %standard-phases
17180 (replace 'check
17181 (lambda* (#:key tests? #:allow-other-keys)
17182 (if tests?
17183 ;; Other tests require network access.
17184 (invoke "pytest" "tests/test_ipv6.py")
17185 #t))))))
17186 (native-inputs
17187 `(("python-pytest" ,python-pytest)))
17188 (home-page "https://pypi.org/project/rfc6555/")
17189 (synopsis "Python implementation of RFC 6555")
17190 (description
17191 "Python implementation of the Happy Eyeballs Algorithm described in RFC
17192 6555. Provided with a single file and dead-simple API to allow easy vendoring
17193 and integration into other projects.")
17194 (properties `((python2-variant . ,(delay python2-rfc6555))))
17195 (license license:asl2.0))))
17196
17197 (define-public python2-rfc6555
17198 (let ((base (package-with-python2
17199 (strip-python2-variant python-rfc6555))))
17200 (package/inherit base
17201 (propagated-inputs
17202 `(("python2-selectors2" ,python2-selectors2))))))
17203
17204 (define-public python-bagit
17205 (package
17206 (name "python-bagit")
17207 (version "1.7.0")
17208 (source
17209 (origin
17210 (method url-fetch)
17211 (uri (pypi-uri "bagit" version))
17212 (sha256
17213 (base32
17214 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
17215 (build-system python-build-system)
17216 (native-inputs
17217 `(("python-setuptools-scm" ,python-setuptools-scm)
17218 ("python-coverage" ,python-coverage)
17219 ("python-mock" ,python-mock)))
17220 (home-page "https://libraryofcongress.github.io/bagit-python/")
17221 (synopsis "Create and validate BagIt packages")
17222 (description "Bagit is a Python library and command line utility for working
17223 with BagIt style packages. BagIt is a minimalist packaging format for digital
17224 preservation.")
17225 (license license:cc0)))
17226
17227 (define-public python-prov
17228 (package
17229 (name "python-prov")
17230 (version "2.0.0")
17231 (source
17232 (origin
17233 (method url-fetch)
17234 (uri (pypi-uri "prov" version))
17235 (sha256
17236 (base32
17237 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
17238 (build-system python-build-system)
17239 (propagated-inputs
17240 `(("python-dateutil" ,python-dateutil)
17241 ("python-lxml" ,python-lxml)
17242 ("python-networkx" ,python-networkx)
17243 ("python-rdflib" ,python-rdflib)))
17244 (native-inputs
17245 `(("graphviz" ,graphviz)
17246 ("python-pydot" ,python-pydot)))
17247 (home-page "https://github.com/trungdong/prov")
17248 (synopsis
17249 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
17250 (description
17251 "This package provides a library for W3C Provenance Data Model supporting
17252 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
17253 (license license:expat)))
17254
17255 (define-public python-arcp
17256 (package
17257 (name "python-arcp")
17258 (version "0.2.1")
17259 (source
17260 (origin
17261 (method url-fetch)
17262 (uri (pypi-uri "arcp" version))
17263 (sha256
17264 (base32
17265 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
17266 (build-system python-build-system)
17267 (native-inputs
17268 `(("python-pytest" ,python-pytest)))
17269 (home-page "http://arcp.readthedocs.io/")
17270 (synopsis
17271 "Archive and Package URI parser and generator")
17272 (description
17273 "@acronym{arcp, Archive and Package} provides functions for creating
17274 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
17275 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
17276 consume or reference hypermedia resources bundled inside a file archive or an
17277 application package, as well as to resolve URIs for archive resources within a
17278 programmatic framework. This URI scheme provides mechanisms to generate a
17279 unique base URI to represent the root of the archive, so that relative URI
17280 references in a bundled resource can be resolved within the archive without
17281 having to extract the archive content on the local file system. An arcp URI can
17282 be used for purposes of isolation (e.g. when consuming multiple archives),
17283 security constraints (avoiding \"climb out\" from the archive), or for
17284 externally identiyfing sub-resources referenced by hypermedia formats.")
17285 (license license:asl2.0)))
17286
17287 (define-public python-shellescape
17288 (package
17289 (name "python-shellescape")
17290 (version "3.8.1")
17291 (source
17292 (origin
17293 (method git-fetch)
17294 (uri (git-reference
17295 (url "https://github.com/chrissimpkins/shellescape")
17296 (commit (string-append "v" version))))
17297 (file-name (git-file-name name version))
17298 (sha256
17299 (base32
17300 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
17301 (build-system python-build-system)
17302 (arguments
17303 '(#:phases
17304 (modify-phases %standard-phases
17305 (replace 'check
17306 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
17307 (when tests?
17308 (add-installed-pythonpath inputs outputs)
17309 (invoke "python" "tests/test_shellescape.py"))
17310 #t)))))
17311 (native-inputs
17312 `(("python-pytest" ,python-pytest)))
17313 (home-page "https://github.com/chrissimpkins/shellescape")
17314 (synopsis
17315 "Shell escape a string to safely use it as a token in a shell command")
17316 (description
17317 "The shellescape Python module defines the @code{shellescape.quote()}
17318 function that returns a shell-escaped version of a Python string. This is a
17319 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
17320 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
17321 (license license:expat)))
17322
17323 (define-public python-validators
17324 (package
17325 (name "python-validators")
17326 (version "0.14.2")
17327 (source (origin
17328 (method url-fetch)
17329 (uri (pypi-uri "validators" version))
17330 (sha256
17331 (base32
17332 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
17333 (build-system python-build-system)
17334 (arguments
17335 '(#:phases (modify-phases %standard-phases
17336 (replace 'check
17337 (lambda _
17338 (invoke "pytest" "-vv"))))))
17339 (propagated-inputs
17340 `(("python-decorator" ,python-decorator)
17341 ("python-six" ,python-six)))
17342 (native-inputs
17343 `(("python-flake8" ,python-flake8)
17344 ("python-isort" ,python-isort)
17345 ("python-pytest" ,python-pytest)))
17346 (home-page "https://github.com/kvesteri/validators")
17347 (synopsis "Data validation library")
17348 (description
17349 "This package contains validators for different things such as email
17350 addresses, IP addresses, URLs, hashes and more. It has been designed to
17351 be easy to use and not require defining a schema or form just to validate
17352 some input.")
17353 (license license:expat)))
17354
17355 (define-public python2-validators
17356 (package-with-python2 python-validators))
17357
17358 (define-public python-validate-email
17359 (package
17360 (name "python-validate-email")
17361 (version "1.3")
17362 (source
17363 (origin
17364 (method url-fetch)
17365 (uri (pypi-uri "validate_email" version))
17366 (sha256
17367 (base32
17368 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
17369 (build-system python-build-system)
17370 (home-page "https://github.com/syrusakbary/validate_email")
17371 (synopsis "Verifies if an email address is valid and really exists")
17372 (description "@code{validate_email} can be used to verify if an email
17373 address is valid and really exists.")
17374 (license license:lgpl3+)))
17375
17376 (define-public python2-validate-email
17377 (package-with-python2 python-validate-email))
17378
17379 (define-public python-flex
17380 (package
17381 (name "python-flex")
17382 (version "6.10.0")
17383 (source
17384 (origin
17385 (method url-fetch)
17386 (uri (pypi-uri "flex" version))
17387 (sha256
17388 (base32
17389 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
17390 (build-system python-build-system)
17391 (propagated-inputs
17392 `(("python-click" ,python-click)
17393 ("python-iso8601" ,python-iso8601)
17394 ("python-jsonpointer" ,python-jsonpointer)
17395 ("python-pyyaml" ,python-pyyaml)
17396 ("python-requests" ,python-requests)
17397 ("python-rfc3987" ,python-rfc3987)
17398 ("python-six" ,python-six)
17399 ("python-validate-email" ,python-validate-email)))
17400 (home-page "https://github.com/pipermerriam/flex")
17401 (synopsis "Validates Swagger schemata")
17402 (description "@code{flex} can be used to validate Swagger schemata.")
17403 (license license:bsd-3)))
17404
17405 (define-public python2-flex
17406 (package-with-python2 python-flex))
17407
17408 (define-public python-marshmallow
17409 (package
17410 (name "python-marshmallow")
17411 (version "3.9.1")
17412 (source
17413 (origin
17414 (method url-fetch)
17415 (uri (pypi-uri "marshmallow" version))
17416 (sha256
17417 (base32
17418 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
17419 (build-system python-build-system)
17420 (propagated-inputs
17421 `(("python-dateutil" ,python-dateutil)
17422 ("python-simplejson" ,python-simplejson)))
17423 (native-inputs
17424 `(("python-pytest" ,python-pytest)
17425 ("python-pytz" ,python-pytz)))
17426 (home-page "https://github.com/marshmallow-code/marshmallow")
17427 (synopsis "Convert complex datatypes to and from native
17428 Python datatypes.")
17429 (description "@code{marshmallow} provides a library for converting
17430 complex datatypes to and from native Python datatypes.")
17431 (license license:expat)))
17432
17433 (define-public python-apispec
17434 (package
17435 (name "python-apispec")
17436 (version "4.0.0")
17437 (source
17438 (origin
17439 (method url-fetch)
17440 (uri (pypi-uri "apispec" version))
17441 (sha256
17442 (base32
17443 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
17444 (build-system python-build-system)
17445 (arguments
17446 '(#:phases (modify-phases %standard-phases
17447 (add-after 'unpack 'disable-prance-tests
17448 (lambda _
17449 ;; Disable validation tests since they require the
17450 ;; optional 'prance' library which is not yet in Guix.
17451 (substitute* "tests/test_ext_marshmallow_openapi.py"
17452 (("def test_openapi_tools_validate.*" all)
17453 (string-append "@pytest.mark.xfail\n" all)))))
17454 (replace 'check
17455 (lambda _
17456 (setenv "PYTHONPATH"
17457 (string-append "./build/lib:"
17458 (getenv "PYTHONPATH")))
17459 (invoke "pytest" "-vv"))))))
17460 (propagated-inputs
17461 `(("python-pyyaml" ,python-pyyaml)))
17462 (native-inputs
17463 `(("python-pytest" ,python-pytest)
17464 ("python-marshmallow" ,python-marshmallow)))
17465 (home-page "https://github.com/marshmallow-code/apispec")
17466 (synopsis "Swagger/OpenAPI specification generator")
17467 (description "@code{python-apispec} is a pluggable API specification
17468 generator. It currently supports the OpenAPI specification, formerly known
17469 as Swagger.")
17470 (license license:expat)))
17471
17472 (define-public python-flasgger
17473 (package
17474 (name "python-flasgger")
17475 (version "0.6.3")
17476 (source
17477 (origin
17478 (method git-fetch)
17479 (uri (git-reference
17480 (url "https://github.com/rochacbruno/flasgger")
17481 (commit version)))
17482 (file-name (git-file-name name version))
17483 (sha256
17484 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
17485 (build-system python-build-system)
17486 (arguments
17487 `(#:phases
17488 (modify-phases %standard-phases
17489 (replace 'check
17490 (lambda* (#:key inputs outputs #:allow-other-keys)
17491 (substitute* "Makefile"
17492 (("flake8 flasgger --ignore=F403")
17493 "flake8 flasgger --ignore=E731,F403"))
17494 (setenv "PYTHONPATH" (string-append (getcwd)
17495 ":"
17496 (getenv "PYTHONPATH")))
17497 (invoke "py.test"))))))
17498 (propagated-inputs
17499 `(("python-flask" ,python-flask)
17500 ("python-pyyaml" ,python-pyyaml)
17501 ("python-jsonschema" ,python-jsonschema)
17502 ("python-mistune" ,python-mistune)
17503 ("python-six" ,python-six)))
17504 (native-inputs
17505 `(("python-decorator" ,python-decorator)
17506 ("python-flake8" ,python-flake8)
17507 ("python-flask-restful" ,python-flask-restful)
17508 ("python-flex" ,python-flex)
17509 ("python-pytest" ,python-pytest)
17510 ("python-pytest-cov" ,python-pytest-cov)
17511 ("python-marshmallow" ,python-marshmallow)
17512 ("python-apispec" ,python-apispec)))
17513 (home-page "https://github.com/rochacbruno/flasgger/")
17514 (synopsis "Extract Swagger specs from your Flask project")
17515 (description "@code{python-flasgger} allows extracting Swagger specs
17516 from your Flask project. It is a fork of Flask-Swagger.")
17517 (license license:expat)))
17518
17519 (define-public python-swagger-spec-validator
17520 (package
17521 (name "python-swagger-spec-validator")
17522 (version "2.4.3")
17523 (source
17524 (origin
17525 (method url-fetch)
17526 (uri (pypi-uri "swagger-spec-validator" version))
17527 (sha256
17528 (base32
17529 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
17530 (build-system python-build-system)
17531 (propagated-inputs
17532 `(("python-jsonschema" ,python-jsonschema)
17533 ("python-pyyaml" ,python-pyyaml)
17534 ("python-six" ,python-six)))
17535 (home-page
17536 "https://github.com/Yelp/swagger_spec_validator")
17537 (synopsis "Validation of Swagger specifications")
17538 (description "@code{swagger_spec_validator} provides a library for
17539 validating Swagger API specifications.")
17540 (license license:asl2.0)))
17541
17542 (define-public python2-swagger-spec-validator
17543 (package-with-python2 python-swagger-spec-validator))
17544
17545 (define-public python-apache-libcloud
17546 (package
17547 (name "python-apache-libcloud")
17548 (version "3.1.0")
17549 (source
17550 (origin
17551 (method url-fetch)
17552 (uri (pypi-uri "apache-libcloud" version))
17553 (sha256
17554 (base32
17555 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
17556 (build-system python-build-system)
17557 (arguments
17558 `(#:phases
17559 (modify-phases %standard-phases
17560 (add-after 'unpack 'patch-ssh
17561 (lambda* (#:key inputs #:allow-other-keys)
17562 (substitute* "libcloud/compute/ssh.py"
17563 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
17564 "/bin/ssh" "'")))
17565 #t))
17566 (add-after 'unpack 'patch-tests
17567 (lambda _
17568 (substitute* "libcloud/test/compute/test_ssh_client.py"
17569 (("class ShellOutSSHClientTests")
17570 "@unittest.skip(\"Guix container doesn't have ssh service\")
17571 class ShellOutSSHClientTests"))
17572 #t))
17573 (add-before 'check 'copy-secret
17574 (lambda _
17575 (copy-file "libcloud/test/secrets.py-dist"
17576 "libcloud/test/secrets.py")
17577 #t)))))
17578 (inputs
17579 `(("openssh" ,openssh)))
17580 (propagated-inputs
17581 `(("python-paramiko" ,python-paramiko)
17582 ("python-requests" ,python-requests)))
17583 (native-inputs
17584 `(("python-lockfile" ,python-lockfile)
17585 ("python-mock" ,python-mock)
17586 ("python-pytest" ,python-pytest)
17587 ("python-pytest-runner" ,python-pytest-runner)
17588 ("python-requests-mock" ,python-requests-mock)))
17589 (home-page "https://libcloud.apache.org/")
17590 (synopsis "Unified Cloud API")
17591 (description "@code{libcloud} is a Python library for interacting with
17592 many of the popular cloud service providers using a unified API.")
17593 (license license:asl2.0)))
17594
17595 (define-public python-smmap
17596 (package
17597 (name "python-smmap")
17598 (version "3.0.1")
17599 (source
17600 (origin
17601 (method url-fetch)
17602 (uri (pypi-uri "smmap" version))
17603 (sha256
17604 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
17605 (build-system python-build-system)
17606 (native-inputs
17607 `(("python-nosexcover" ,python-nosexcover)))
17608 (home-page "https://github.com/Byron/smmap")
17609 (synopsis "Python sliding window memory map manager")
17610 (description "@code{smmap} is a pure Python implementation of a sliding
17611 window memory map manager.")
17612 (license license:bsd-3)))
17613
17614 (define-public python-smmap2
17615 (deprecated-package "python-smmap2" python-smmap))
17616
17617 (define-public python2-smmap
17618 (package-with-python2 python-smmap))
17619
17620 (define-public python2-smmap2
17621 (deprecated-package "python2-smmap2" python2-smmap))
17622
17623 (define-public python-regex
17624 (package
17625 (name "python-regex")
17626 (version "2020.6.8")
17627 (source (origin
17628 (method url-fetch)
17629 (uri (pypi-uri "regex" version))
17630 (sha256
17631 (base32
17632 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
17633 (build-system python-build-system)
17634 (arguments
17635 '(#:phases
17636 (modify-phases %standard-phases
17637 (replace 'check
17638 (lambda* (#:key inputs outputs #:allow-other-keys)
17639 (add-installed-pythonpath inputs outputs)
17640 (invoke "python" "-c"
17641 "from regex.test_regex import test_main; test_main()"))))))
17642 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
17643 (synopsis "Alternative regular expression module")
17644 (description "This regular expression implementation is backwards-
17645 compatible with the standard @code{re} module, but offers additional
17646 functionality like full case-folding for case-insensitive matches in Unicode.")
17647 (license license:psfl)))
17648
17649 (define-public python2-regex
17650 (package-with-python2 python-regex))
17651
17652 (define-public python-pyopengl
17653 (package
17654 (name "python-pyopengl")
17655 (version "3.1.5")
17656 (source
17657 (origin
17658 (method url-fetch)
17659 (uri (pypi-uri "PyOpenGL" version))
17660 (sha256
17661 (base32
17662 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
17663 (build-system python-build-system)
17664 (inputs
17665 `(("mesa" ,mesa)
17666 ("freeglut" ,freeglut)
17667 ("glu" ,glu)))
17668 (arguments
17669 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
17670 ;attribute 'OSMesa'
17671 #:phases
17672 (modify-phases %standard-phases
17673 (add-before 'build 'fix-paths
17674 (lambda* (#:key inputs outputs #:allow-other-keys)
17675 (substitute* '("OpenGL/platform/ctypesloader.py")
17676 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
17677 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
17678 (("'GL'")
17679 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
17680 (("'GLU'")
17681 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
17682 (("'glut',")
17683 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
17684 (("'GLESv1_CM'")
17685 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
17686 (("'GLESv2'")
17687 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
17688 ;; Not providing libgle. It seems to be very old.
17689 #t)))))
17690 (home-page "http://pyopengl.sourceforge.net")
17691 (synopsis "Standard OpenGL bindings for Python")
17692 (description
17693 "PyOpenGL is the most common cross platform Python binding to OpenGL and
17694 related APIs. The binding is created using the standard @code{ctypes}
17695 library.")
17696 (license license:bsd-3)))
17697
17698 (define-public python-pyopengl-accelerate
17699 (package
17700 (inherit python-pyopengl)
17701 (name "python-pyopengl-accelerate")
17702 (version "3.1.5")
17703 (source
17704 (origin
17705 (method url-fetch)
17706 (uri (pypi-uri "PyOpenGL-accelerate" version))
17707 (sha256
17708 (base32
17709 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
17710 (inputs
17711 `(("mesa" ,mesa)
17712 ("python-numpy" ,python-numpy))) ; for cython module
17713 ; numpy_formathandler, thus not propagated
17714 (arguments
17715 `(#:tests? #f
17716 #:phases
17717 (modify-phases %standard-phases
17718 (delete 'fix-paths))))
17719 (synopsis "Acceleration code for PyOpenGL")
17720 (description
17721 "This is the Cython-coded accelerator module for PyOpenGL.")))
17722
17723 (define-public python-rencode
17724 (package
17725 (name "python-rencode")
17726 (version "1.0.5")
17727 (source
17728 (origin
17729 (method url-fetch)
17730 (uri (pypi-uri "rencode" version))
17731 (sha256
17732 (base32
17733 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
17734 (build-system python-build-system)
17735 (arguments
17736 `(#:phases
17737 (modify-phases %standard-phases
17738 (add-before 'check 'delete-bogus-test
17739 ;; This test requires /home/aresch/Downloads, which is not provided by
17740 ;; the build environment.
17741 (lambda _
17742 (delete-file "rencode/t.py")
17743 #t)))))
17744 (native-inputs `(("pkg-config" ,pkg-config)
17745 ("python-cython" ,python-cython)))
17746 (home-page "https://github.com/aresch/rencode")
17747 (synopsis "Serialization of heterogeneous data structures")
17748 (description
17749 "The @code{rencode} module is a data structure serialization library,
17750 similar to @code{bencode} from the BitTorrent project. For complex,
17751 heterogeneous data structures with many small elements, r-encoding stake up
17752 significantly less space than b-encodings. This version of rencode is a
17753 complete rewrite in Cython to attempt to increase the performance over the
17754 pure Python module.")
17755 (license license:bsd-3)))
17756
17757 (define-public python2-rencode
17758 (package-with-python2 python-rencode))
17759
17760 (define-public python-xenon
17761 (package
17762 (name "python-xenon")
17763 (version "0.7.0")
17764 (source
17765 (origin
17766 (method url-fetch)
17767 (uri (pypi-uri "xenon" version))
17768 (sha256
17769 (base32
17770 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
17771 (build-system python-build-system)
17772 (native-inputs
17773 `(("python-pyyaml" ,python-pyyaml)
17774 ("python-radon" ,python-radon)
17775 ("python-requests" ,python-requests)
17776 ("python-flake8" ,python-flake8)
17777 ("python-tox" ,python-tox)))
17778 (arguments
17779 `(#:tests? #f ;test suite not shipped with the PyPI archive
17780 #:phases
17781 (modify-phases %standard-phases
17782 (add-before 'build 'patch-test-requirements
17783 (lambda _
17784 ;; Remove httpretty dependency for tests.
17785 (substitute* "setup.py"
17786 (("httpretty") ""))
17787 #t)))))
17788 (home-page "https://xenon.readthedocs.org/")
17789 (synopsis "Monitor code metrics for Python on your CI server")
17790 (description
17791 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
17792 Ideally, @code{xenon} is run every time code is committed. Through command
17793 line options, various thresholds can be set for the complexity of code. It
17794 will fail (i.e. it will exit with a non-zero exit code) when any of these
17795 requirements is not met.")
17796 (license license:expat)))
17797
17798 (define-public python-pysocks
17799 (package
17800 (name "python-pysocks")
17801 (version "1.7.1")
17802 (source
17803 (origin
17804 (method url-fetch)
17805 (uri (pypi-uri "PySocks" version))
17806 (sha256
17807 (base32
17808 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
17809 (build-system python-build-system)
17810 (arguments `(#:tests? #f))
17811 (home-page "https://github.com/Anorov/PySocks")
17812 (synopsis "SOCKS client module")
17813 (description "@code{pysocks} is an updated and semi-actively maintained
17814 version of @code{SocksiPy} with bug fixes and extra features.")
17815 (license license:bsd-3)))
17816
17817 (define-public python2-pysocks
17818 (package-with-python2 python-pysocks))
17819
17820 (define-public python-pydiff
17821 (package
17822 (name "python-pydiff")
17823 (version "0.2")
17824 (source
17825 (origin
17826 (method url-fetch)
17827 (uri (pypi-uri "pydiff" version))
17828 (sha256
17829 (base32
17830 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17831 (build-system python-build-system)
17832 (home-page "https://github.com/myint/pydiff")
17833 (synopsis "Library to diff two Python files at the bytecode level")
17834 (description
17835 "@code{pydiff} makes it easy to look for actual code changes while
17836 ignoring formatting changes.")
17837 (license license:expat)))
17838
17839 (define-public python2-pydiff
17840 (package-with-python2 python-pydiff))
17841
17842 (define-public python-pydub
17843 (package
17844 (name "python-pydub")
17845 (version "0.24.1")
17846 (source
17847 (origin
17848 (method url-fetch)
17849 (uri (pypi-uri "pydub" version))
17850 (sha256
17851 (base32
17852 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17853 (build-system python-build-system)
17854 (arguments
17855 `(#:phases
17856 (modify-phases %standard-phases
17857 (add-after 'unpack 'fix-ffmpeg-path
17858 (lambda* (#:key inputs #:allow-other-keys)
17859 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17860 (substitute* '("pydub/utils.py")
17861 (("return \"ffmpeg\"")
17862 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17863 (("return \"ffplay\"")
17864 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17865 (("return \"ffprobe\"")
17866 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17867 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17868 #t))))))
17869 (home-page "https://pydub.com")
17870 (inputs
17871 `(("ffmpeg" ,ffmpeg)))
17872 (propagated-inputs
17873 `(("python-scipy" ,python-scipy)))
17874 (synopsis "Manipulate audio with a high level interface in Python")
17875 (description
17876 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17877 @code{ffmpeg} to open various audio formats.")
17878 (license license:expat))) ; MIT license
17879
17880 (define-public python-tqdm
17881 (package
17882 (name "python-tqdm")
17883 (version "4.43.0")
17884 (source
17885 (origin
17886 (method url-fetch)
17887 (uri (pypi-uri "tqdm" version))
17888 (sha256
17889 (base32
17890 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17891 (build-system python-build-system)
17892 (arguments
17893 '(#:phases (modify-phases %standard-phases
17894 (replace 'check
17895 (lambda* (#:key inputs outputs #:allow-other-keys)
17896 (add-installed-pythonpath inputs outputs)
17897 ;; This invokation is taken from tox.ini.
17898 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17899 "-d" "-v" "tqdm/"))))))
17900 (native-inputs
17901 `(("python-nose" ,python-nose)))
17902 (home-page "https://github.com/tqdm/tqdm")
17903 (synopsis "Fast, extensible progress meter")
17904 (description
17905 "Make loops show a progress bar on the console by just wrapping any
17906 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17907 design and layout.")
17908 (license (list license:mpl2.0 license:expat))))
17909
17910 (define-public python2-tqdm
17911 (package-with-python2 python-tqdm))
17912
17913 (define-public python-pkginfo
17914 (package
17915 (name "python-pkginfo")
17916 (version "1.7.0")
17917 (source
17918 (origin
17919 (method url-fetch)
17920 (uri (pypi-uri "pkginfo" version))
17921 (sha256
17922 (base32
17923 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
17924 (build-system python-build-system)
17925 (arguments
17926 `(#:phases
17927 (modify-phases %standard-phases
17928 (add-before 'check 'patch-tests
17929 (lambda _
17930 (substitute* "pkginfo/tests/test_installed.py"
17931 (("test_ctor_w_package_no_PKG_INFO")
17932 "_test_ctor_w_package_no_PKG_INFO"))
17933 #t)))))
17934 (home-page
17935 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17936 (synopsis
17937 "Query metadatdata from sdists, bdists, and installed packages")
17938 (description
17939 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17940 source distriubtion (an sdist) or a binary distribution (e.g., created by
17941 running bdist_egg). It can also query the EGG-INFO directory of an installed
17942 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17943 created by running @code{python setup.py develop}).")
17944 (license license:expat)))
17945
17946 (define-public python2-pkginfo
17947 (package-with-python2 python-pkginfo))
17948
17949 (define-public python-twine
17950 (package
17951 (name "python-twine")
17952 (version "1.15.0")
17953 (source
17954 (origin
17955 (method url-fetch)
17956 (uri (pypi-uri "twine" version))
17957 (sha256
17958 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17959 (build-system python-build-system)
17960 (propagated-inputs
17961 `(("python-tqdm" ,python-tqdm)
17962 ("python-packaging" ,python-packaging)
17963 ("python-pkginfo" ,python-pkginfo)
17964 ("python-readme-renderer" ,python-readme-renderer)
17965 ("python-requests" ,python-requests)
17966 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17967 (home-page "https://github.com/pypa/twine")
17968 (synopsis "Collection of utilities for interacting with PyPI")
17969 (description
17970 "@code{twine} currently supports registering projects and uploading
17971 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17972 their files and supports any packaging format (including wheels).")
17973 (license license:asl2.0)))
17974
17975 (define-public python2-twine
17976 (package-with-python2 python-twine))
17977
17978 (define-public python-linecache2
17979 (package
17980 (name "python-linecache2")
17981 (version "1.0.0")
17982 (source
17983 (origin
17984 (method url-fetch)
17985 (uri (pypi-uri "linecache2" version))
17986 (sha256
17987 (base32
17988 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17989 (build-system python-build-system)
17990 (arguments
17991 `(;; The tests depend on unittest2, and our version is a bit too old.
17992 #:tests? #f))
17993 (native-inputs
17994 `(("python-pbr" ,python-pbr-minimal)))
17995 (home-page
17996 "https://github.com/testing-cabal/linecache2")
17997 (synopsis "Backports of the linecache module")
17998 (description
17999 "The linecache module allows one to get any line from any file, while
18000 attempting to optimize internally, using a cache, the common case where many
18001 lines are read from a single file.")
18002 (license license:psfl)))
18003
18004 (define-public python2-linecache2
18005 (package-with-python2 python-linecache2))
18006
18007 (define-public python-traceback2
18008 (package
18009 (name "python-traceback2")
18010 (version "1.4.0")
18011 (source
18012 (origin
18013 (method url-fetch)
18014 (uri (pypi-uri "traceback2" version))
18015 (sha256
18016 (base32
18017 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
18018 (build-system python-build-system)
18019 (arguments
18020 `(;; python-traceback2 and python-unittest2 depend on one another.
18021 #:tests? #f))
18022 (native-inputs
18023 `(("python-pbr" ,python-pbr-minimal)))
18024 (propagated-inputs
18025 `(("python-linecache2" ,python-linecache2)))
18026 (home-page
18027 "https://github.com/testing-cabal/traceback2")
18028 (synopsis "Backports of the traceback module")
18029 (description
18030 "This module provides a standard interface to extract, format and print
18031 stack traces of Python programs. It exactly mimics the behavior of the Python
18032 interpreter when it prints a stack trace.")
18033 (license license:psfl)))
18034
18035 (define-public python2-traceback2
18036 (package-with-python2 python-traceback2))
18037
18038 (define-public python-ratelimiter
18039 (package
18040 (name "python-ratelimiter")
18041 (version "1.2.0")
18042 (source
18043 (origin
18044 (method url-fetch)
18045 (uri (pypi-uri "ratelimiter" version))
18046 (sha256
18047 (base32
18048 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
18049 (build-system python-build-system)
18050 (arguments
18051 '(#:tests? #f)) ; There are no tests in the pypi archive.
18052 (home-page "https://github.com/RazerM/ratelimiter")
18053 (synopsis "Simple rate limiting object")
18054 (description
18055 "The @code{ratelimiter} module ensures that an operation will not be
18056 executed more than a given number of times during a given period.")
18057 (license license:asl2.0)))
18058
18059 (define-public python2-ratelimiter
18060 (package-with-python2 python-ratelimiter))
18061
18062 (define-public python-dukpy
18063 (package
18064 (name "python-dukpy")
18065 (version "0.3")
18066 (source
18067 (origin
18068 (method git-fetch)
18069 (uri (git-reference
18070 (url "https://github.com/kovidgoyal/dukpy")
18071 (commit (string-append "v" version))))
18072 (file-name (git-file-name name version))
18073 (sha256
18074 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
18075 (build-system python-build-system)
18076 (home-page "https://github.com/kovidgoyal/dukpy")
18077 (synopsis "Run JavaScript in python")
18078 (description
18079 "dukpy is a JavaScript runtime environment for Python using the duktape
18080 embeddable JavaScript engine.")
18081 ;; Dukpy is licensed under MIT like the embedded duktape library,
18082 ;; with 'errors.c' as GPL3.
18083 (license (list license:expat license:gpl3))))
18084
18085 (define-public python2-dukpy
18086 (package-with-python2 python-dukpy))
18087
18088 (define-public python-jsonrpclib-pelix
18089 (package
18090 (name "python-jsonrpclib-pelix")
18091 (version "0.3.2")
18092 (source
18093 (origin
18094 (method url-fetch)
18095 (uri (pypi-uri "jsonrpclib-pelix" version))
18096 (sha256
18097 (base32
18098 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
18099 (build-system python-build-system)
18100 (arguments
18101 `(#:tests? #f)) ; no tests in PyPI tarball
18102 (home-page "https://github.com/tcalmant/jsonrpclib/")
18103 (synopsis "JSON-RPC 2.0 client library for Python")
18104 (description
18105 "This library implements the JSON-RPC v2.0
18106 specification (backwards-compatible) as a client library for Python. This
18107 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
18108 services.")
18109 (license license:asl2.0)))
18110
18111 (define-public python2-jsonrpclib-pelix
18112 (package-with-python2 python-jsonrpclib-pelix))
18113
18114 (define-public python-setuptools-scm-git-archive
18115 (package
18116 (name "python-setuptools-scm-git-archive")
18117 (version "1.0")
18118 (source
18119 (origin
18120 (method url-fetch)
18121 (uri (pypi-uri "setuptools_scm_git_archive" version))
18122 (sha256
18123 (base32
18124 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
18125 (build-system python-build-system)
18126 (native-inputs
18127 `(("python-pytest" ,python-pytest)))
18128 (propagated-inputs
18129 `(("python-setuptools-scm" ,python-setuptools-scm)))
18130 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
18131 (synopsis "Setuptools_scm plugin for git archives")
18132 (description
18133 "The setuptools_scm_git_archive package is a plugin to
18134 setuptools_scm, which supports obtaining versions from git archives that
18135 belong to tagged versions.")
18136 (license license:expat)))
18137
18138 (define-public python2-setuptools-scm-git-archive
18139 (package-with-python2 python-setuptools-scm-git-archive))
18140
18141 (define-public python-setuptools-git
18142 (package
18143 (name "python-setuptools-git")
18144 (version "1.2")
18145 (source
18146 (origin
18147 (method url-fetch)
18148 (uri (pypi-uri "setuptools-git" version))
18149 (sha256
18150 (base32
18151 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
18152 (build-system python-build-system)
18153 (arguments
18154 `(#:phases
18155 (modify-phases %standard-phases
18156 ;; This is needed for tests.
18157 (add-after 'unpack 'configure-git
18158 (lambda _
18159 (setenv "HOME" "/tmp")
18160 (invoke "git" "config" "--global" "user.email" "guix")
18161 (invoke "git" "config" "--global" "user.name" "guix")
18162 #t)))))
18163 (native-inputs
18164 `(("git" ,git-minimal)))
18165 (home-page "https://github.com/msabramo/setuptools-git")
18166 (synopsis "Setuptools revision control system plugin for Git")
18167 (description
18168 "This package provides a plugin for Setuptools for revision control with
18169 Git.")
18170 (license license:bsd-3)))
18171
18172 (define-public python-pyclipper
18173 (package
18174 (name "python-pyclipper")
18175 (version "1.1.0.post3")
18176 (source
18177 (origin
18178 (method url-fetch)
18179 (uri (pypi-uri "pyclipper" version ".zip"))
18180 (sha256
18181 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
18182 (modules '((guix build utils)))
18183 (snippet
18184 '(begin
18185 ;; This file is generated by Cython.
18186 (delete-file "pyclipper/pyclipper.cpp") #t))))
18187 (build-system python-build-system)
18188 (arguments
18189 `(#:phases
18190 (modify-phases %standard-phases
18191 (add-before 'build 'cythonize-sources
18192 (lambda _
18193 (with-directory-excursion "pyclipper"
18194 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
18195 (propagated-inputs
18196 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
18197 (native-inputs
18198 `(("python-cython" ,python-cython)
18199 ("python-pytest" ,python-pytest)
18200 ("python-pytest-runner" ,python-pytest-runner)
18201 ("python-unittest2" ,python-unittest2)
18202 ("unzip" ,unzip)))
18203 (home-page "https://github.com/greginvm/pyclipper")
18204 (synopsis "Wrapper for Angus Johnson's Clipper library")
18205 (description
18206 "Pyclipper is a Cython wrapper for the C++ translation of the
18207 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
18208 (license license:expat)))
18209
18210 (define-public python2-pyclipper
18211 (package-with-python2 python-pyclipper))
18212
18213 (define-public python2-booleanoperations
18214 (package
18215 (name "python2-booleanoperations")
18216 (version "0.7.1")
18217 (source
18218 (origin
18219 (method url-fetch)
18220 (uri (pypi-uri "booleanOperations" version ".zip"))
18221 (sha256
18222 (base32
18223 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
18224 (build-system python-build-system)
18225 (arguments
18226 `(#:python ,python-2))
18227 (native-inputs
18228 `(("unzip" ,unzip)
18229 ("python2-pytest" ,python2-pytest)
18230 ("python2-pytest-runner" ,python2-pytest-runner)))
18231 (propagated-inputs
18232 `(("python-fonttools" ,python2-fonttools)
18233 ("python-pyclipper" ,python2-pyclipper)
18234 ("python-ufolib" ,python2-ufolib)))
18235 (home-page "https://github.com/typemytype/booleanOperations")
18236 (synopsis "Boolean operations on paths")
18237 (description
18238 "BooleanOperations provides a Python library that enables
18239 boolean operations on paths.")
18240 (license license:expat)))
18241
18242 (define-public python-tempdir
18243 (package
18244 (name "python-tempdir")
18245 (version "0.7.1")
18246 (source
18247 (origin
18248 (method url-fetch)
18249 (uri (pypi-uri "tempdir" version))
18250 (sha256
18251 (base32
18252 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
18253 (build-system python-build-system)
18254 (home-page "https://pypi.org/project/tempdir/")
18255 (arguments
18256 ;; the package has no tests
18257 '(#:tests? #f))
18258 (synopsis "Python library for managing temporary directories")
18259 (description
18260 "This library manages temporary directories that are automatically
18261 deleted with all their contents when they are no longer needed. It is
18262 particularly convenient for use in tests.")
18263 (license license:expat)))
18264
18265 (define-public python2-tempdir
18266 (package-with-python2 python-tempdir))
18267
18268 (define-public python-activepapers
18269 (package
18270 (name "python-activepapers")
18271 (version "0.2.2")
18272 (source
18273 (origin
18274 (method url-fetch)
18275 (uri (pypi-uri "ActivePapers.Py" version))
18276 (sha256
18277 (base32
18278 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
18279 (build-system python-build-system)
18280 (arguments
18281 `(#:modules ((ice-9 ftw)
18282 (srfi srfi-1)
18283 (guix build utils)
18284 (guix build python-build-system))
18285
18286 #:phases
18287 (modify-phases %standard-phases
18288 (add-after 'unpack 'delete-python2-code
18289 (lambda _
18290 (for-each delete-file
18291 '("lib/activepapers/builtins2.py"
18292 "lib/activepapers/standardlib2.py"
18293 "lib/activepapers/utility2.py"))))
18294 (replace 'check
18295 (lambda _
18296 ;; Deactivate the test cases that download files
18297 (setenv "NO_NETWORK_ACCESS" "1")
18298 ;; For some strange reason, some tests fail if nosetests runs all
18299 ;; test modules in a single execution. They pass if each test
18300 ;; module is run individually.
18301 (for-each (lambda (filename)
18302 (invoke "nosetests"
18303 (string-append "tests/" filename)))
18304 (scandir "tests"
18305 (lambda (filename)
18306 (string-suffix? ".py" filename)))))))))
18307 (native-inputs
18308 `(("python-tempdir" ,python-tempdir)
18309 ("python-nose" ,python-nose)))
18310 (propagated-inputs
18311 `(("python-h5py" ,python-h5py)))
18312 (home-page "https://www.activepapers.org/")
18313 (synopsis "Executable papers for scientific computing")
18314 (description
18315 "ActivePapers is a tool for working with executable papers, which
18316 combine data, code, and documentation in single-file packages,
18317 suitable for publication as supplementary material or on repositories
18318 such as figshare or Zenodo.")
18319 (properties `((python2-variant . ,(delay python2-activepapers))))
18320 (license license:bsd-3)))
18321
18322 (define-public python2-activepapers
18323 (let ((base (package-with-python2
18324 (strip-python2-variant python-activepapers))))
18325 (package/inherit base
18326 (arguments
18327 (substitute-keyword-arguments (package-arguments base)
18328 ((#:phases phases)
18329 `(modify-phases ,phases
18330 (delete 'delete-python2-code)
18331 (add-after 'unpack 'delete-python3-code
18332 (lambda _
18333 (for-each delete-file
18334 '("lib/activepapers/builtins3.py"
18335 "lib/activepapers/standardlib3.py"
18336 "lib/activepapers/utility3.py")))))))))))
18337
18338 (define-public python-semver
18339 (package
18340 (name "python-semver")
18341 (version "2.9.0")
18342 (source
18343 (origin
18344 (method url-fetch)
18345 (uri (pypi-uri "semver" version))
18346 (sha256
18347 (base32
18348 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
18349 (build-system python-build-system)
18350 (arguments
18351 `(#:phases (modify-phases %standard-phases
18352 (replace 'check
18353 (lambda _
18354 (delete-file "setup.cfg")
18355 (invoke "py.test"))))))
18356 (native-inputs
18357 `(("python-pytest" ,python-pytest)))
18358 (home-page "https://github.com/k-bx/python-semver")
18359 (synopsis "Python helper for Semantic Versioning")
18360 (description "This package provides a Python library for
18361 @url{Semantic Versioning, http://semver.org/}.")
18362 (license license:bsd-3)))
18363
18364 (define-public python2-semver
18365 (package-with-python2 python-semver))
18366
18367 (define-public python-pyro4
18368 (package
18369 (name "python-pyro4")
18370 (version "4.77")
18371 (source
18372 (origin
18373 (method url-fetch)
18374 (uri (pypi-uri "Pyro4" version))
18375 (sha256
18376 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
18377 (build-system python-build-system)
18378 (arguments
18379 '(#:tests? #f)) ;FIXME: Some tests require network access.
18380 (native-inputs
18381 `(("python-cloudpickle" ,python-cloudpickle)
18382 ("python-dill" ,python-dill)
18383 ("python-msgpack" ,python-msgpack)))
18384 (propagated-inputs
18385 `(("python-serpent" ,python-serpent)))
18386 (home-page "https://pyro4.readthedocs.io")
18387 (synopsis "Distributed object middleware for Python")
18388 (description
18389 "Pyro enables you to build applications in which objects can talk to each
18390 other over the network. You can just use normal Python method calls to call
18391 objects on other machines, also known as remote procedure calls (RPC).")
18392 (license license:expat)))
18393
18394 (define-public python2-pyro
18395 (package
18396 (name "python2-pyro")
18397 (version "3.16")
18398 (source
18399 (origin
18400 (method url-fetch)
18401 (uri (pypi-uri "Pyro" version))
18402 (file-name (string-append "Pyro-" version ".tar.gz"))
18403 (sha256
18404 (base32
18405 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
18406 (build-system python-build-system)
18407 (arguments
18408 ;; Pyro is not compatible with Python 3
18409 `(#:python ,python-2
18410 ;; Pyro has no test cases for automatic execution
18411 #:tests? #f))
18412 (home-page "https://pythonhosted.org/Pyro/")
18413 (synopsis "Distributed object manager for Python")
18414 (description "Pyro is a Distributed Object Technology system
18415 written in Python that is designed to be easy to use. It resembles
18416 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
18417 which is a system and language independent Distributed Object Technology
18418 and has much more to offer than Pyro or RMI. Pyro 3.x is no
18419 longer maintained. New projects should use Pyro4 instead, which
18420 is the new Pyro version that is actively developed.")
18421 (license license:expat)))
18422
18423 (define-public python2-scientific
18424 (package
18425 (name "python2-scientific")
18426 (version "2.9.4")
18427 (source
18428 (origin
18429 (method git-fetch)
18430 (uri (git-reference
18431 (url "https://github.com/khinsen/ScientificPython")
18432 (commit (string-append "rel" version))))
18433 (file-name (git-file-name name version))
18434 (sha256
18435 (base32
18436 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
18437 (build-system python-build-system)
18438 (inputs
18439 `(("netcdf" ,netcdf)))
18440 (propagated-inputs
18441 `(("python-numpy" ,python2-numpy-1.8)
18442 ("python-pyro" ,python2-pyro)))
18443 (arguments
18444 ;; ScientificPython is not compatible with Python 3
18445 `(#:python ,python-2
18446 #:tests? #f ; No test suite
18447 #:phases
18448 (modify-phases %standard-phases
18449 (replace 'build
18450 (lambda* (#:key inputs #:allow-other-keys)
18451 (invoke "python" "setup.py" "build"
18452 (string-append "--netcdf_prefix="
18453 (assoc-ref inputs "netcdf"))))))))
18454 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
18455 (synopsis "Python modules for scientific computing")
18456 (description "ScientificPython is a collection of Python modules that are
18457 useful for scientific computing. Most modules are rather general (Geometry,
18458 physical units, automatic derivatives, ...) whereas others are more
18459 domain-specific (e.g. netCDF and PDB support). The library is currently
18460 not actively maintained and works only with Python 2 and NumPy < 1.9.")
18461 (license license:cecill-c)))
18462
18463 (define-public python2-mmtk
18464 (package
18465 (name "python2-mmtk")
18466 (version "2.7.12")
18467 (source
18468 (origin
18469 (method git-fetch)
18470 (uri (git-reference
18471 (url "https://github.com/khinsen/MMTK")
18472 (commit (string-append "rel" version))))
18473 (file-name (git-file-name name version))
18474 (sha256
18475 (base32
18476 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
18477 (build-system python-build-system)
18478 (native-inputs
18479 `(("netcdf" ,netcdf)))
18480 (propagated-inputs
18481 `(("python-scientific" ,python2-scientific)
18482 ("python-tkinter" ,python-2 "tk")))
18483 (arguments
18484 `(#:python ,python-2
18485 #:tests? #f
18486 #:phases
18487 (modify-phases %standard-phases
18488 (add-before 'build 'includes-from-scientific
18489 (lambda* (#:key inputs #:allow-other-keys)
18490 (mkdir-p "Include/Scientific")
18491 (copy-recursively
18492 (string-append
18493 (assoc-ref inputs "python-scientific")
18494 "/include/python2.7/Scientific")
18495 "Include/Scientific"))))))
18496 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
18497 (synopsis "Python library for molecular simulation")
18498 (description "MMTK is a library for molecular simulations with an emphasis
18499 on biomolecules. It provides widely used methods such as Molecular Dynamics
18500 and normal mode analysis, but also basic routines for implementing new methods
18501 for simulation and analysis. The library is currently not actively maintained
18502 and works only with Python 2 and NumPy < 1.9.")
18503 (license license:cecill-c)))
18504
18505 (define-public python-phonenumbers
18506 (package
18507 (name "python-phonenumbers")
18508 (version "8.9.1")
18509 (source
18510 (origin
18511 (method url-fetch)
18512 (uri (pypi-uri "phonenumbers" version))
18513 (sha256
18514 (base32
18515 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
18516 (build-system python-build-system)
18517 (home-page
18518 "https://github.com/daviddrysdale/python-phonenumbers")
18519 (synopsis
18520 "Python library for dealing with international phone numbers")
18521 (description
18522 "This package provides a Python port of Google's libphonenumber library.")
18523 (license license:asl2.0)))
18524
18525 (define-public python2-phonenumbers
18526 (package-with-python2 python-phonenumbers))
18527
18528 (define-public python-send2trash
18529 (package
18530 (name "python-send2trash")
18531 (version "1.5.0")
18532 (source
18533 (origin (method git-fetch)
18534 ;; Source tarball on PyPI doesn't include tests.
18535 (uri (git-reference
18536 (url "https://github.com/hsoft/send2trash")
18537 (commit version)))
18538 (file-name (git-file-name name version))
18539 (sha256
18540 (base32
18541 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
18542 (build-system python-build-system)
18543 (arguments
18544 '(#:phases
18545 (modify-phases %standard-phases
18546 (add-before 'check 'pre-check
18547 (lambda _
18548 (mkdir-p "/tmp/foo")
18549 (setenv "HOME" "/tmp/foo")
18550 #t)))))
18551 (home-page "https://github.com/hsoft/send2trash")
18552 (synopsis "Send files to the user's @file{~/Trash} directory")
18553 (description "This package provides a Python library to send files to the
18554 user's @file{~/Trash} directory.")
18555 (properties `((python2-variant . ,(delay python2-send2trash))))
18556 (license license:bsd-3)))
18557
18558 (define-public python2-send2trash
18559 (let ((base (package-with-python2
18560 (strip-python2-variant python-send2trash))))
18561 (package/inherit base
18562 (arguments
18563 (substitute-keyword-arguments (package-arguments python-send2trash)
18564 ((#:phases phases)
18565 `(modify-phases ,phases
18566 (add-before 'check 'setenv
18567 (lambda _
18568 (setenv "PYTHONPATH"
18569 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18570 #t)))))))))
18571
18572 (define-public python-pyfavicon
18573 (package
18574 (name "python-pyfavicon")
18575 (version "0.1.1")
18576 (source
18577 (origin
18578 (method url-fetch)
18579 (uri (pypi-uri "pyfavicon" version))
18580 (sha256
18581 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
18582 (build-system python-build-system)
18583 (arguments
18584 ;; There are no tests in the PyPI tarball and the tests from the
18585 ;; repository require online data.
18586 '(#:tests? #f))
18587 (propagated-inputs
18588 `(("python-aiohttp" ,python-aiohttp)
18589 ("python-beautifulsoup4" ,python-beautifulsoup4)
18590 ("python-pillow" ,python-pillow)))
18591 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
18592 (synopsis "Async favicon fetcher")
18593 (description
18594 "@code{pyfavicon} is an async favicon fetcher.")
18595 (license license:expat)))
18596
18597 (define-public python-yamllint
18598 (package
18599 (name "python-yamllint")
18600 (version "1.26.1")
18601 (source
18602 (origin
18603 (method url-fetch)
18604 (uri (pypi-uri "yamllint" version))
18605 (sha256
18606 (base32 "090krlxj7az0d9yl8i20vjrqi66dfxx7y5xakjhxzsfp7qmldnc7"))))
18607 (build-system python-build-system)
18608 (propagated-inputs
18609 `(("python-pathspec" ,python-pathspec)
18610 ("python-pyyaml" ,python-pyyaml)
18611 ("python-setuptools" ,python-setuptools)))
18612 (home-page "https://github.com/adrienverge/yamllint")
18613 (synopsis "Linter for YAML files")
18614 (description
18615 "Yamllint is a linter for YAML files. yamllint does not only check for
18616 syntax validity, but for weirdnesses like key repetition and cosmetic problems
18617 such as lines length, trailing spaces, indentation, etc.")
18618 (license license:gpl3+)))
18619
18620 (define-public python-yapf
18621 (package
18622 (name "python-yapf")
18623 (version "0.29.0")
18624 (source
18625 (origin
18626 (method url-fetch)
18627 (uri (pypi-uri "yapf" version))
18628 (sha256
18629 (base32
18630 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
18631 (build-system python-build-system)
18632 (home-page "https://github.com/google/yapf")
18633 (synopsis "Formatter for Python code")
18634 (description "YAPF is a formatter for Python code. It's based off of
18635 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
18636 takes the code and reformats it to the best formatting that conforms to the
18637 style guide, even if the original code didn't violate the style guide.")
18638 (license license:asl2.0)))
18639
18640 (define-public python2-yapf
18641 (package-with-python2 python-yapf))
18642
18643 (define-public python-yq
18644 (package
18645 (name "python-yq")
18646 (version "2.11.1")
18647 (source
18648 (origin
18649 (method url-fetch)
18650 (uri (pypi-uri "yq" version))
18651 (sha256
18652 (base32
18653 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
18654 (build-system python-build-system)
18655 (arguments
18656 '(#:phases
18657 (modify-phases %standard-phases
18658 (add-after 'unpack 'patch
18659 (lambda* (#:key inputs #:allow-other-keys)
18660 (substitute* "yq/__init__.py"
18661 (("Popen\\(\\[\"jq")
18662 (string-append
18663 "Popen([\""
18664 (assoc-ref inputs "jq")
18665 "/bin/jq")))
18666 #t)))))
18667 (inputs
18668 `(("python-argcomplete" ,python-argcomplete)
18669 ("python-pyyaml" ,python-pyyaml)
18670 ("python-xmltodict" ,python-xmltodict)
18671 ("jq" ,jq)))
18672 (native-inputs
18673 `(("python-coverage" ,python-coverage)
18674 ("python-flake8" ,python-flake8)
18675 ("python-wheel" ,python-wheel)))
18676 (home-page "https://github.com/kislyuk/yq")
18677 (synopsis "Command-line YAML/XML processor")
18678 (description
18679 "This package provides @command{yq} and @command{xq} for processing YAML
18680 and XML respectively. The processing is done through @command{jq}, @command{jq}
18681 filters can be used to process the data as it passes through.")
18682 (license license:asl2.0)))
18683
18684 (define-public python-gyp
18685 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
18686 (revision "0"))
18687 (package
18688 (name "python-gyp")
18689 ;; Google does not release versions,
18690 ;; based on second most recent commit date.
18691 (version (git-version "0.0.0" revision commit))
18692 (source
18693 (origin
18694 ;; Google does not release tarballs,
18695 ;; git checkout is needed.
18696 (method git-fetch)
18697 (uri (git-reference
18698 (url "https://chromium.googlesource.com/external/gyp")
18699 (commit commit)))
18700 (file-name (git-file-name name version))
18701 (sha256
18702 (base32
18703 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
18704 (build-system python-build-system)
18705 (home-page "https://gyp.gsrc.io/")
18706 (synopsis "GYP is a Meta-Build system")
18707 (description
18708 "GYP builds build systems for large, cross platform applications.
18709 It can be used to generate XCode projects, Visual Studio projects, Ninja build
18710 files, and Makefiles.")
18711 (license license:bsd-3))))
18712
18713 (define-public python2-gyp
18714 (package-with-python2 python-gyp))
18715
18716 (define-public python-whatever
18717 (package
18718 (name "python-whatever")
18719 (version "0.6")
18720 (source
18721 (origin
18722 (method git-fetch)
18723 (uri (git-reference
18724 (url "https://github.com/Suor/whatever")
18725 (commit version)))
18726 (file-name (git-file-name name version))
18727 (sha256
18728 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
18729 (build-system python-build-system)
18730 (arguments
18731 `(#:phases
18732 (modify-phases %standard-phases
18733 (replace 'check
18734 (lambda _
18735 (invoke "py.test"))))))
18736 (native-inputs
18737 `(("python-pytest" ,python-pytest)))
18738 (home-page "https://github.com/Suor/whatever")
18739 (synopsis "Make anonymous functions by partial application of operators")
18740 (description "@code{whatever} provides an easy way to make anonymous
18741 functions by partial application of operators.")
18742 (license license:bsd-3)))
18743
18744 (define-public python2-whatever
18745 (package-with-python2 python-whatever))
18746
18747 (define-public python-funcy
18748 (package
18749 (name "python-funcy")
18750 (version "1.11")
18751 (source
18752 (origin
18753 (method git-fetch)
18754 (uri (git-reference
18755 (url "https://github.com/Suor/funcy")
18756 (commit version)))
18757 (sha256
18758 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
18759 (file-name (git-file-name name version))))
18760 (build-system python-build-system)
18761 (arguments
18762 `(#:phases
18763 (modify-phases %standard-phases
18764 (replace 'check
18765 (lambda _
18766 (invoke "py.test"))))))
18767 (native-inputs
18768 `(("python-pytest" ,python-pytest)
18769 ("python-whatever" ,python-whatever)))
18770 (home-page "https://github.com/Suor/funcy")
18771 (synopsis "Functional tools")
18772 (description "@code{funcy} is a library that provides functional tools.
18773 Examples are:
18774 @enumerate
18775 @item merge - Merges collections of the same type
18776 @item walk - Type-preserving map
18777 @item select - Selects a part of a collection
18778 @item take - Takes the first n items of a collection
18779 @item first - Takes the first item of a collection
18780 @item remove - Predicated-removes items of a collection
18781 @item concat - Concatenates two collections
18782 @item flatten - Flattens a collection with subcollections
18783 @item distinct - Returns only distinct items
18784 @item split - Predicated-splits a collection
18785 @item split_at - Splits a collection at a given item
18786 @item group_by - Groups items by group
18787 @item pairwise - Pairs off adjacent items
18788 @item partial - Partially-applies a function
18789 @item curry - Curries a function
18790 @item compose - Composes functions
18791 @item complement - Complements a predicate
18792 @item all_fn - \"all\" with predicate
18793 @end enumerate")
18794 (license license:bsd-3)))
18795
18796 (define-public python2-funcy
18797 (package-with-python2 python-funcy))
18798
18799 (define-public python-isoweek
18800 (package
18801 (name "python-isoweek")
18802 (version "1.3.3")
18803 (source
18804 (origin
18805 (method url-fetch)
18806 (uri (pypi-uri "isoweek" version))
18807 (sha256
18808 (base32
18809 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
18810 (build-system python-build-system)
18811 (home-page "https://github.com/gisle/isoweek")
18812 (synopsis "Objects representing a week")
18813 (description "The @code{isoweek} module provide the class Week that
18814 implements the week definition of ISO 8601. This standard also defines
18815 a notation for identifying weeks; yyyyWww (where the W is a literal).
18816 Week instances stringify to this form.")
18817 (license license:bsd-3)))
18818
18819 (define-public python2-isoweek
18820 (package-with-python2 python-isoweek))
18821
18822 (define-public python-pyzbar
18823 (package
18824 (name "python-pyzbar")
18825 (version "0.1.8")
18826 (source
18827 (origin
18828 ;; There's no source tarball on PyPI.
18829 (method git-fetch)
18830 (uri (git-reference
18831 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
18832 (commit (string-append "v" version))))
18833 (file-name (git-file-name name version))
18834 (sha256
18835 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
18836 (build-system python-build-system)
18837 (arguments
18838 `(#:phases
18839 (modify-phases %standard-phases
18840 (add-after 'unpack 'remove-failing-test
18841 (lambda _
18842 ;; This tests if find_library was called once, but we remove
18843 ;; the call in the stage below to make the library find libzbar.
18844 (delete-file "pyzbar/tests/test_zbar_library.py")
18845 #t))
18846 (add-before 'build 'set-library-file-name
18847 (lambda* (#:key inputs #:allow-other-keys)
18848 (let ((libzbar (assoc-ref inputs "zbar")))
18849 (substitute* "pyzbar/zbar_library.py"
18850 (("find_library\\('zbar'\\)")
18851 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18852 #t))))))
18853 (native-inputs
18854 `(("pkg-config" ,pkg-config)
18855 ("python-numpy" ,python-numpy)
18856 ("python-pillow" ,python-pillow)))
18857 (inputs
18858 `(("zbar" ,zbar)))
18859 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18860 (synopsis "Read one-dimensional barcodes and QR codes")
18861 (description
18862 "Read one-dimensional barcodes and QR codes using the zbar library.
18863
18864 Features:
18865
18866 @itemize
18867 @item Pure python
18868 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18869 @item Decodes locations of barcodes
18870 @item No dependencies, other than the zbar library itself
18871 @end itemize")
18872 (license license:expat)))
18873
18874 (define-public python-tokenize-rt
18875 (package
18876 (name "python-tokenize-rt")
18877 (version "2.0.1")
18878 (source
18879 (origin
18880 (method url-fetch)
18881 (uri (pypi-uri "tokenize-rt" version))
18882 (sha256
18883 (base32
18884 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
18885 (build-system python-build-system)
18886 (home-page "https://github.com/asottile/tokenize-rt")
18887 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
18888 (description
18889 "This Python library is a wrapper around @code{tokenize} from the Python
18890 standard library. It provides two additional tokens @code{ESCAPED_NL} and
18891 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
18892 and @code{tokens_to_src} to roundtrip.")
18893 (license license:expat)))
18894
18895 (define-public python-future-fstrings
18896 (package
18897 (name "python-future-fstrings")
18898 (version "0.4.1")
18899 (source
18900 (origin
18901 (method url-fetch)
18902 (uri (pypi-uri "future_fstrings" version))
18903 (sha256
18904 (base32
18905 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18906 (build-system python-build-system)
18907 (propagated-inputs
18908 `(("python-tokenize-rt" ,python-tokenize-rt)))
18909 (home-page "https://github.com/asottile/future-fstrings")
18910 (synopsis "Backport of fstrings to Python < 3.6")
18911 (description
18912 "This package provides a UTF-8 compatible encoding
18913 @code{future_fstrings}, which performs source manipulation. It decodes the
18914 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18915 @code{f} strings.")
18916 (license license:expat)))
18917
18918 (define-public python-typed-ast
18919 (package
18920 (name "python-typed-ast")
18921 (version "1.4.0")
18922 (source
18923 (origin
18924 (method git-fetch)
18925 (uri (git-reference
18926 (url "https://github.com/python/typed_ast")
18927 (commit version)))
18928 (sha256
18929 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18930 (file-name (git-file-name name version))))
18931 (build-system python-build-system)
18932 (arguments
18933 `(#:modules ((guix build utils)
18934 (guix build python-build-system)
18935 (ice-9 ftw)
18936 (srfi srfi-1)
18937 (srfi srfi-26))
18938 #:phases
18939 (modify-phases %standard-phases
18940 (replace 'check
18941 (lambda _
18942 (let ((cwd (getcwd)))
18943 (setenv "PYTHONPATH"
18944 (string-append cwd "/build/"
18945 (find (cut string-prefix? "lib" <>)
18946 (scandir (string-append cwd "/build")))
18947 ":"
18948 (getenv "PYTHONPATH"))))
18949 (invoke "pytest")
18950 #t)))))
18951 (native-inputs `(("python-pytest" ,python-pytest)))
18952 (home-page "https://github.com/python/typed_ast")
18953 (synopsis "Fork of Python @code{ast} modules with type comment support")
18954 (description "This package provides a parser similar to the standard
18955 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18956 include PEP 484 type comments and are independent of the version of Python
18957 under which they are run. The @code{typed_ast} parsers produce the standard
18958 Python AST (plus type comments), and are both fast and correct, as they are
18959 based on the CPython 2.7 and 3.7 parsers.")
18960 ;; See the file "LICENSE" for the details.
18961 (license (list license:psfl
18962 license:asl2.0
18963 license:expat)))) ;ast27/Parser/spark.py
18964
18965 (define-public python-typer
18966 (package
18967 (name "python-typer")
18968 (version "0.3.2")
18969 (source
18970 (origin
18971 ;; Building `python-typer` from the git repository requires the `flit-core`
18972 ;; Python package that is not installed by `python-flit`.
18973 (method url-fetch)
18974 (uri (pypi-uri "typer" version))
18975 (sha256
18976 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
18977 (build-system python-build-system)
18978 (arguments
18979 `(#:phases
18980 (modify-phases %standard-phases
18981 (add-before 'check 'disable-failing-tests
18982 (lambda _
18983 (substitute* "tests/test_completion/test_completion.py"
18984 (("def test_show_completion")
18985 "def _test_show_completion")
18986 (("def test_install_completion")
18987 "def _test_install_completion"))
18988 (substitute* "tests/test_completion/test_completion_install.py"
18989 (("def test_completion_install_bash")
18990 "def _test_completion_install_bash")
18991 (("def test_completion_install_zsh")
18992 "def _test_completion_install_zsh")
18993 (("def test_completion_install_fish")
18994 "def _test_completion_install_fish")
18995 (("def test_completion_install_powershell")
18996 "def _test_completion_install_powershell"))
18997 #t))
18998 (replace 'check
18999 (lambda _
19000 (setenv "PYTHONPATH"
19001 (string-append (getcwd) ":"
19002 (getenv "PYTHONPATH")))
19003 (invoke "python" "-m" "pytest" "tests/")
19004 #t)))))
19005 (propagated-inputs
19006 `(("python-click" ,python-click)))
19007 (native-inputs
19008 `(("python-coverage" ,python-coverage)
19009 ("python-pytest" ,python-pytest)
19010 ("python-shellingham" ,python-shellingham)))
19011 (home-page "https://github.com/tiangolo/typer")
19012 (synopsis
19013 "Typer builds CLI based on Python type hints")
19014 (description
19015 "Typer is a library for building CLI applications. It's based on
19016 Python 3.6+ type hints.")
19017 ;; MIT license
19018 (license license:expat)))
19019
19020 (define-public python-typing
19021 (package
19022 (name "python-typing")
19023 (version "3.7.4.3")
19024 (source
19025 (origin
19026 (method url-fetch)
19027 (uri (pypi-uri "typing" version))
19028 (sha256
19029 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
19030 (build-system python-build-system)
19031 (home-page "https://docs.python.org/3/library/typing.html")
19032 (synopsis "Type hints for Python")
19033 (description "This is a backport of the standard library @code{typing}
19034 module to Python versions older than 3.5. Typing defines a standard notation
19035 for Python function and variable type annotations. The notation can be used
19036 for documenting code in a concise, standard format, and it has been designed
19037 to also be used by static and runtime type checkers, static analyzers, IDEs
19038 and other tools.")
19039 (license license:psfl)))
19040
19041 (define-public python2-typing
19042 (package-with-python2 python-typing))
19043
19044 (define-public python-typing-extensions
19045 (package
19046 (name "python-typing-extensions")
19047 (version "3.7.4.3")
19048 (source
19049 (origin
19050 (method url-fetch)
19051 (uri (pypi-uri "typing_extensions" version))
19052 (sha256
19053 (base32
19054 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
19055 (build-system python-build-system)
19056 (home-page
19057 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
19058 (synopsis "Experimental type hints for Python")
19059 (description
19060 "The typing_extensions module contains additional @code{typing} hints not
19061 yet present in the of the @code{typing} standard library.
19062 Included are implementations of:
19063 @enumerate
19064 @item ClassVar
19065 @item ContextManager
19066 @item Counter
19067 @item DefaultDict
19068 @item Deque
19069 @item NewType
19070 @item NoReturn
19071 @item overload
19072 @item Protocol
19073 @item runtime
19074 @item Text
19075 @item Type
19076 @item TYPE_CHECKING
19077 @item AsyncGenerator
19078 @end enumerate\n")
19079 (license license:psfl)))
19080
19081 (define-public bpython
19082 (package
19083 (name "bpython")
19084 (version "0.20.1")
19085 (source
19086 (origin
19087 (method url-fetch)
19088 (uri (pypi-uri "bpython" version))
19089 (sha256
19090 (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
19091 (build-system python-build-system)
19092 (arguments
19093 `(#:phases
19094 (modify-phases %standard-phases
19095 (add-after 'unpack 'remove-failing-test
19096 (lambda _
19097 ;; Remove failing test. FIXME: make it pass
19098 (delete-file "bpython/test/test_args.py")
19099 #t))
19100 (add-after 'wrap 'add-aliases
19101 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
19102 (lambda* (#:key outputs #:allow-other-keys)
19103 (let ((out (assoc-ref outputs "out")))
19104 (for-each
19105 (lambda (old new)
19106 (symlink old (string-append out "/bin/" new)))
19107 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
19108 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
19109 #t)))))
19110 (propagated-inputs
19111 `(("python-pygments" ,python-pygments)
19112 ("python-requests" ,python-requests)
19113 ("python-curtsies" ,python-curtsies)
19114 ("python-greenlet" ,python-greenlet)
19115 ("python-six" ,python-six)
19116 ("python-wcwidth" ,python-wcwidth)
19117 ;; optional dependencies
19118 ("python-urwid" ,python-urwid) ; for bpython-urwid only
19119 ("python-watchdog" ,python-watchdog)
19120 ("python-jedi" ,python-jedi)))
19121 (native-inputs
19122 `(("python-sphinx" ,python-sphinx)
19123 ("python-mock" ,python-mock)))
19124 (home-page "https://bpython-interpreter.org/")
19125 (synopsis "Fancy interface to the Python interpreter")
19126 (description "Bpython is a fancy interface to the Python
19127 interpreter. bpython's main features are
19128
19129 @enumerate
19130 @item in-line syntax highlighting,
19131 @item readline-like autocomplete with suggestions displayed as you type,
19132 @item expected parameter list for any Python function,
19133 @item \"rewind\" function to pop the last line of code from memory and
19134 re-evaluate,
19135 @item send the code you've entered off to a pastebin,
19136 @item save the code you've entered to a file, and
19137 @item auto-indentation.
19138 @end enumerate")
19139 (license license:expat)))
19140
19141 (define-public python-pyinotify
19142 (package
19143 (name "python-pyinotify")
19144 (version "0.9.6")
19145 (source (origin
19146 (method url-fetch)
19147 (uri (pypi-uri "pyinotify" version))
19148 (sha256
19149 (base32
19150 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
19151 (build-system python-build-system)
19152 (arguments `(#:tests? #f)) ;no tests
19153 (home-page "https://github.com/seb-m/pyinotify")
19154 (synopsis "Python library for monitoring inotify events")
19155 (description
19156 "@code{pyinotify} provides a Python interface for monitoring
19157 file system events on Linux.")
19158 (license license:expat)))
19159
19160 (define-public python2-pyinotify
19161 (package-with-python2 python-pyinotify))
19162
19163 ;; Ada parser uses this version.
19164 (define-public python2-quex-0.67.3
19165 (package
19166 (name "python2-quex")
19167 (version "0.67.3")
19168 (source
19169 (origin
19170 (method url-fetch)
19171 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
19172 (version-major+minor version)
19173 "/quex-" version ".zip"))
19174 (sha256
19175 (base32
19176 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
19177 (build-system python-build-system)
19178 (native-inputs
19179 `(("unzip" ,unzip)))
19180 (arguments
19181 `(#:python ,python-2
19182 #:tests? #f
19183 #:phases
19184 (modify-phases %standard-phases
19185 (delete 'configure)
19186 (delete 'build)
19187 (replace 'install
19188 (lambda* (#:key outputs #:allow-other-keys)
19189 (let* ((out (assoc-ref outputs "out"))
19190 (share/quex (string-append out "/share/quex"))
19191 (bin (string-append out "/bin")))
19192 (copy-recursively "." share/quex)
19193 (mkdir-p bin)
19194 (symlink (string-append share/quex "/quex-exe.py")
19195 (string-append bin "/quex"))
19196 #t))))))
19197 (native-search-paths
19198 (list (search-path-specification
19199 (variable "QUEX_PATH")
19200 (files '("share/quex")))))
19201 (home-page "http://quex.sourceforge.net/")
19202 (synopsis "Lexical analyzer generator in Python")
19203 (description "@code{quex} is a lexical analyzer generator in Python.")
19204 (license license:lgpl2.1+))) ; Non-military
19205
19206 (define-public python2-quex
19207 (package (inherit python2-quex-0.67.3)
19208 (name "python2-quex")
19209 (version "0.68.1")
19210 (source
19211 (origin
19212 (method url-fetch)
19213 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
19214 (sha256
19215 (base32
19216 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
19217 (file-name (string-append name "-" version ".tar.gz"))))))
19218
19219 (define-public python-more-itertools
19220 (package
19221 (name "python-more-itertools")
19222 (version "8.2.0")
19223 (source
19224 (origin
19225 (method url-fetch)
19226 (uri (pypi-uri "more-itertools" version))
19227 (sha256
19228 (base32
19229 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
19230 (build-system python-build-system)
19231 (home-page "https://github.com/erikrose/more-itertools")
19232 (synopsis "More routines for operating on iterables, beyond itertools")
19233 (description "Python's built-in @code{itertools} module implements a
19234 number of iterator building blocks inspired by constructs from APL, Haskell,
19235 and SML. @code{more-itertools} includes additional building blocks for
19236 working with iterables.")
19237 (properties `((python2-variant . ,(delay python2-more-itertools))))
19238 (license license:expat)))
19239
19240 ;; The 5.x series are the last versions supporting Python 2.7.
19241 (define-public python2-more-itertools
19242 (package
19243 (inherit python-more-itertools)
19244 (name "python2-more-itertools")
19245 (version "5.0.0")
19246 (source (origin
19247 (method url-fetch)
19248 (uri (pypi-uri "more-itertools" version))
19249 (sha256
19250 (base32
19251 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
19252 (arguments
19253 `(#:python ,python-2))
19254 (propagated-inputs
19255 `(("python2-six" ,python2-six-bootstrap)))))
19256
19257 (define-public python-latexcodec
19258 (package
19259 (name "python-latexcodec")
19260 (version "1.0.7")
19261 (source
19262 (origin
19263 (method url-fetch)
19264 (uri (pypi-uri "latexcodec" version))
19265 (sha256
19266 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
19267 (build-system python-build-system)
19268 (inputs
19269 `(("python-six" ,python-six)))
19270 (home-page "https://readthedocs.org/projects/latexcodec/")
19271 (synopsis "Work with LaTeX code in Python")
19272 (description "Lexer and codec to work with LaTeX code in Python.")
19273 (license license:expat)))
19274
19275 (define-public python-pybtex
19276 (package
19277 (name "python-pybtex")
19278 (version "0.22.2")
19279 (source
19280 (origin
19281 (method url-fetch)
19282 (uri (pypi-uri "pybtex" version))
19283 (sha256
19284 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
19285 (build-system python-build-system)
19286 (native-inputs
19287 `(("python-nose" ,python-nose)))
19288 (inputs
19289 `(("python-latexcodec" ,python-latexcodec)
19290 ("python-pyyaml" ,python-pyyaml)
19291 ("python-six" ,python-six)))
19292 (arguments
19293 `(#:test-target "nosetests"))
19294 (home-page "https://pybtex.org/")
19295 (synopsis "BibTeX-compatible bibliography processor")
19296 (description "Pybtex is a BibTeX-compatible bibliography processor written
19297 in Python. You can simply type pybtex instead of bibtex.")
19298 (license license:expat)))
19299
19300 (define-public python-onetimepass
19301 (package
19302 (name "python-onetimepass")
19303 (version "1.0.1")
19304 (source
19305 (origin
19306 (method url-fetch)
19307 (uri (pypi-uri "onetimepass" version))
19308 (sha256
19309 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
19310 (build-system python-build-system)
19311 (propagated-inputs `(("python-six" ,python-six)))
19312 (home-page "https://github.com/tadeck/onetimepass/")
19313 (synopsis "One-time password library")
19314 (description "Python one-time password library for HMAC-based (HOTP) and
19315 time-based (TOTP) passwords.")
19316 (license license:expat)))
19317
19318 (define-public python-parso
19319 (package
19320 (name "python-parso")
19321 (version "0.7.1")
19322 (source
19323 (origin
19324 (method url-fetch)
19325 (uri (pypi-uri "parso" version))
19326 (sha256
19327 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
19328 (native-inputs
19329 `(("python-pytest" ,python-pytest)))
19330 (build-system python-build-system)
19331 (arguments
19332 `(#:phases (modify-phases %standard-phases
19333 (replace 'check
19334 (lambda _ (invoke "pytest" "-vv"))))))
19335 (home-page "https://github.com/davidhalter/parso")
19336 (synopsis "Python Parser")
19337 (description "Parso is a Python parser that supports error recovery and
19338 round-trip parsing for different Python versions (in multiple Python versions).
19339 Parso is also able to list multiple syntax errors in your Python file.")
19340 (license license:expat)))
19341
19342 (define-public python2-parso
19343 (package-with-python2 python-parso))
19344
19345 (define-public python-async-generator
19346 (package
19347 (name "python-async-generator")
19348 (version "1.10")
19349 (source
19350 (origin
19351 (method url-fetch)
19352 (uri (pypi-uri "async_generator" version))
19353 (sha256
19354 (base32
19355 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
19356 (build-system python-build-system)
19357 (native-inputs
19358 `(("python-pytest" ,python-pytest)))
19359 (home-page "https://github.com/python-trio/async_generator")
19360 (synopsis "Async generators and context managers for Python 3.5+")
19361 (description "@code{async_generator} back-ports Python 3.6's native async
19362 generators and Python 3.7's context managers into Python 3.5.")
19363 ;; Dual licensed.
19364 (license (list license:expat license:asl2.0))))
19365
19366 (define-public python-async-timeout
19367 (package
19368 (name "python-async-timeout")
19369 (version "3.0.1")
19370 (source
19371 (origin
19372 (method url-fetch)
19373 (uri (pypi-uri "async-timeout" version))
19374 (sha256
19375 (base32
19376 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
19377 (build-system python-build-system)
19378 (home-page "https://github.com/aio-libs/async_timeout/")
19379 (synopsis "Timeout context manager for asyncio programs")
19380 (description "@code{async-timeout} provides a timeout timeout context
19381 manager compatible with @code{asyncio}.")
19382 (license license:asl2.0)))
19383
19384 (define-public python-glob2
19385 (package
19386 (name "python-glob2")
19387 (version "0.7")
19388 (source
19389 (origin
19390 (method git-fetch)
19391 (uri (git-reference
19392 (url "https://github.com/miracle2k/python-glob2")
19393 (commit (string-append "v" version))))
19394 (file-name (git-file-name name version))
19395 (sha256
19396 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
19397 (build-system python-build-system)
19398 (home-page "https://github.com/miracle2k/python-glob2/")
19399 (synopsis "Extended Version of the python buildin glob module")
19400 (description "This is an extended version of the Python
19401 @url{http://docs.python.org/library/glob.html, built-in glob module} which
19402 adds:
19403
19404 @itemize
19405 @item The ability to capture the text matched by glob patterns, and return
19406 those matches alongside the file names.
19407 @item A recursive @code{**} globbing syntax, akin for example to the
19408 @code{globstar} option of Bash.
19409 @item The ability to replace the file system functions used, in order to glob
19410 on virtual file systems.
19411 @item Compatible with Python 2 and Python 3 (tested with 3.3).
19412 @end itemize
19413
19414 Glob2 currently based on the glob code from Python 3.3.1.")
19415 (license license:bsd-2)))
19416
19417 (define-public python2-glob2
19418 (package-with-python2 python-glob2))
19419
19420 (define-public python-gipc
19421 (package
19422 (name "python-gipc")
19423 (version "0.6.0")
19424 (source
19425 (origin
19426 (method url-fetch)
19427 (uri (pypi-uri "gipc" version ".zip"))
19428 (sha256
19429 (base32
19430 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
19431 (build-system python-build-system)
19432 (native-inputs
19433 `(("unzip" ,unzip)))
19434 (propagated-inputs
19435 `(("python-gevent" ,python-gevent)))
19436 (home-page "https://gehrcke.de/gipc/")
19437 (synopsis "Child process management in the context of gevent")
19438 (description "Usage of Python's multiprocessing package in a
19439 gevent-powered application may raise problems. With @code{gipc},
19440 process-based child processes can safely be created anywhere within a
19441 gevent-powered application.")
19442 (license license:expat)))
19443
19444 (define-public python-beautifultable
19445 (package
19446 (name "python-beautifultable")
19447 (version "1.0.0")
19448 (source
19449 (origin
19450 (method url-fetch)
19451 (uri (pypi-uri "beautifultable" version))
19452 (sha256
19453 (base32
19454 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
19455 (build-system python-build-system)
19456 (propagated-inputs
19457 `(("python-wcwidth" ,python-wcwidth)))
19458 (arguments
19459 `(#:phases
19460 (modify-phases %standard-phases
19461 (add-after 'unpack 'patch-setup.py
19462 (lambda _
19463 (substitute* "setup.py"
19464 (("setup\\(")
19465 "setup(\n test_suite=\"test\",")))))))
19466 (home-page "https://github.com/pri22296/beautifultable")
19467 (synopsis "Print ASCII tables for terminals")
19468 (description "@code{python-beautifultable} provides a class for easily
19469 printing tabular data in a visually appealing ASCII format to a terminal.
19470
19471 Features include, but are not limited to:
19472 @itemize
19473 @item Full customization of the look and feel of the table
19474 @item Row and column accessors.
19475 @item Full support for colors using ANSI sequences or any library.
19476 @item Plenty of predefined styles and option to create custom ones.
19477 @item Support for Unicode characters.
19478 @item Supports streaming table when data is slow to retrieve.
19479 @end itemize")
19480 (license license:expat)))
19481
19482 (define-public python-globber
19483 (package
19484 (name "python-globber")
19485 (version "0.2.1")
19486 (source
19487 (origin
19488 (method git-fetch)
19489 (uri (git-reference
19490 (url "https://github.com/asharov/globber")
19491 (commit version)))
19492 (file-name (git-file-name name version))
19493 (sha256
19494 (base32
19495 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
19496 (build-system python-build-system)
19497 (home-page "https://github.com/asharov/globber")
19498 (synopsis "Library for string matching with glob patterns")
19499 (description
19500 "Globber is a Python library for matching file names against glob patterns.
19501 In contrast to other glob-matching libraries, it matches arbitrary strings and
19502 doesn't require the matched names to be existing files. In addition, it
19503 supports the globstar @code{**} operator to match an arbitrary number of
19504 path components.")
19505 (license license:asl2.0)))
19506
19507 (define-public python-git-hammer
19508 (package
19509 (name "python-git-hammer")
19510 (version "0.3.1")
19511 (source
19512 (origin
19513 (method git-fetch)
19514 (uri (git-reference
19515 (url "https://github.com/asharov/git-hammer")
19516 (commit version)))
19517 (file-name (git-file-name name version))
19518 (sha256
19519 (base32
19520 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
19521 (build-system python-build-system)
19522 (arguments
19523 `(#:phases
19524 (modify-phases %standard-phases
19525 (add-after 'unpack 'patch-setup.py
19526 (lambda _
19527 (substitute* "setup.py"
19528 (("setup\\(")
19529 "setup(\n test_suite=\"test\",")))))))
19530 (propagated-inputs
19531 `(("python-beautifultable" ,python-beautifultable)
19532 ("python-dateutil" ,python-dateutil)
19533 ("python-gitpython" ,python-gitpython)
19534 ("python-globber" ,python-globber)
19535 ("python-matplotlib" ,python-matplotlib)
19536 ("python-sqlalchemy" ,python-sqlalchemy)
19537 ("python-sqlalchemy-utils"
19538 ,python-sqlalchemy-utils)))
19539 (home-page "https://github.com/asharov/git-hammer")
19540 (synopsis "Provide statistics for git repositories")
19541 (description
19542 "Git Hammer is a statistics tool for projects in git repositories.
19543 Its major feature is tracking the number of lines authored by each person for every
19544 commit, but it also includes some other useful statistics.")
19545 (license license:asl2.0)))
19546
19547 (define-public python-fusepy
19548 (package
19549 (name "python-fusepy")
19550 (version "2.0.4")
19551 (source
19552 (origin
19553 (method url-fetch)
19554 (uri (pypi-uri "fusepy" version))
19555 (sha256
19556 (base32
19557 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
19558 (build-system python-build-system)
19559 (arguments
19560 `(#:phases
19561 (modify-phases %standard-phases
19562 (add-before 'build 'set-library-file-name
19563 (lambda* (#:key inputs #:allow-other-keys)
19564 (let ((fuse (assoc-ref inputs "fuse")))
19565 (substitute* "fuse.py"
19566 (("find_library\\('fuse'\\)")
19567 (string-append "'" fuse "/lib/libfuse.so'")))
19568 #t))))))
19569 (propagated-inputs
19570 `(("fuse" ,fuse)))
19571 (home-page "https://github.com/fusepy/fusepy")
19572 (synopsis "Simple ctypes bindings for FUSE")
19573 (description "Python module that provides a simple interface to FUSE and
19574 MacFUSE. The binding is created using the standard @code{ctypes} library.")
19575 (license license:isc)))
19576
19577 (define-public python2-fusepy
19578 (package-with-python2 python-fusepy))
19579
19580 (define-public python-fusepyng
19581 (package
19582 (name "python-fusepyng")
19583 (version "1.0.7")
19584 (source
19585 (origin
19586 (method url-fetch)
19587 (uri (pypi-uri "fusepyng" version))
19588 (sha256
19589 (base32
19590 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
19591 (build-system python-build-system)
19592 (arguments
19593 '(#:phases
19594 (modify-phases %standard-phases
19595 (add-after 'unpack 'set-libfuse-path
19596 (lambda* (#:key inputs #:allow-other-keys)
19597 (let ((fuse (assoc-ref inputs "fuse")))
19598 (substitute* "fusepyng.py"
19599 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
19600 (string-append "\"" fuse "/lib/libfuse.so\""))))
19601 #t)))))
19602 (inputs
19603 `(("fuse" ,fuse)))
19604 (propagated-inputs
19605 `(("python-paramiko" ,python-paramiko)))
19606 (home-page "https://github.com/rianhunter/fusepyng")
19607 (synopsis "Simple ctypes bindings for FUSE")
19608 (description "@code{fusepyng} is a Python module that provides a simple
19609 interface to FUSE on various operating systems. It's just one file and is
19610 implemented using @code{ctypes}.")
19611 (license license:isc)))
19612
19613 (define-public python-userspacefs
19614 (package
19615 (name "python-userspacefs")
19616 (version "2.0.3")
19617 (source
19618 (origin
19619 (method url-fetch)
19620 (uri (pypi-uri "userspacefs" version))
19621 (sha256
19622 (base32
19623 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
19624 (build-system python-build-system)
19625 (propagated-inputs
19626 `(("python-fusepyng" ,python-fusepyng)))
19627 (home-page "https://github.com/rianhunter/userspacefs")
19628 (synopsis "User-space file systems for Python")
19629 (description
19630 "@code{userspacefs} is a library that allows you to easily write
19631 user-space file systems in Python.")
19632 (license license:gpl3+)))
19633
19634 (define-public python-stone
19635 (package
19636 (name "python-stone")
19637 (version "3.2.1")
19638 (source
19639 (origin
19640 (method url-fetch)
19641 (uri (pypi-uri "stone" version))
19642 (sha256
19643 (base32
19644 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
19645 (build-system python-build-system)
19646 (arguments
19647 `(#:phases
19648 (modify-phases %standard-phases
19649 (add-after 'unpack 'change-version-requirements
19650 (lambda _
19651 ;; Match the requirement in test/requirements.txt
19652 (substitute* "setup.py"
19653 (("pytest < 5") "pytest < 7"))
19654 ;; We don't care about a coverage report.
19655 (substitute* "test/requirements.txt"
19656 (("coverage.*") "coverage\n"))
19657 #t))
19658 (replace 'check
19659 (lambda* (#:key tests? #:allow-other-keys)
19660 (when tests?
19661 ;; These tests don't import currectly.
19662 (delete-file "test/test_js_client.py")
19663 (delete-file "test/test_tsd_types.py")
19664 (delete-file "test/test_python_gen.py")
19665 (setenv "PYTHONPATH"
19666 (string-append (getcwd) ":"
19667 (getenv "PYTHONPATH")))
19668 (invoke "pytest"))
19669 #t)))))
19670 (propagated-inputs
19671 `(("python-ply" ,python-ply)
19672 ("python-six" ,python-six)))
19673 (native-inputs
19674 `(("python-coverage" ,python-coverage)
19675 ("python-mock" ,python-mock)
19676 ("python-pytest" ,python-pytest)
19677 ("python-pytest-runner" ,python-pytest-runner)))
19678 (home-page "https://github.com/dropbox/stone")
19679 (synopsis "Official Api Spec Language for Dropbox")
19680 (description
19681 "Stone is an interface description language (IDL) for APIs.")
19682 (license license:expat)))
19683
19684 (define-public pybind11
19685 (package
19686 (name "pybind11")
19687 (version "2.6.1")
19688 (source (origin
19689 (method git-fetch)
19690 (uri (git-reference
19691 (url "https://github.com/pybind/pybind11")
19692 (commit (string-append "v" version))))
19693 (sha256
19694 (base32
19695 "1wh5b1xnywzxwxkyac2wvyqwzmy1qxs341jjk820r7b825wn6yad"))
19696 (file-name (git-file-name name version))))
19697 (build-system cmake-build-system)
19698 (native-inputs
19699 `(("python" ,python-wrapper)
19700
19701 ;; The following dependencies are used for tests.
19702 ("python-pytest" ,python-pytest)
19703 ("catch" ,catch-framework2-1)
19704 ("eigen" ,eigen)))
19705 (arguments
19706 `(#:configure-flags
19707 (list (string-append "-DCATCH_INCLUDE_DIR="
19708 (assoc-ref %build-inputs "catch")
19709 "/include/catch"))
19710
19711 #:phases (modify-phases %standard-phases
19712 (add-after 'install 'install-python
19713 (lambda* (#:key outputs #:allow-other-keys)
19714 (let ((out (assoc-ref outputs "out")))
19715 (with-directory-excursion "../source"
19716 (setenv "PYBIND11_USE_CMAKE" "yes")
19717 (invoke "python" "setup.py" "install"
19718 "--single-version-externally-managed"
19719 "--root=/"
19720 (string-append "--prefix=" out)))))))
19721
19722 #:test-target "check"))
19723 (home-page "https://github.com/pybind/pybind11/")
19724 (synopsis "Seamless operability between C++11 and Python")
19725 (description
19726 "@code{pybind11} is a lightweight header-only library that exposes C++
19727 types in Python and vice versa, mainly to create Python bindings of existing
19728 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
19729 library: to minimize boilerplate code in traditional extension modules by
19730 inferring type information using compile-time introspection.")
19731 (license license:bsd-3)))
19732
19733 (define-public python-pooch
19734 (package
19735 (name "python-pooch")
19736 (version "1.3.0")
19737 (source
19738 (origin
19739 (method url-fetch)
19740 (uri (pypi-uri "pooch" version))
19741 (sha256
19742 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
19743 (build-system python-build-system)
19744 (arguments
19745 `(#:tests? #f)) ;requires online data
19746 (propagated-inputs
19747 `(("python-appdirs" ,python-appdirs)
19748 ("python-packaging" ,python-packaging)
19749 ("python-requests" ,python-requests)))
19750 (home-page "https://github.com/fatiando/pooch")
19751 (synopsis "Manage your Python library's sample data files")
19752 (description
19753 "Pooch manages your Python library's sample data files: it automatically
19754 downloads and stores them in a local directory, with support for versioning
19755 and corruption checks.")
19756 (license license:bsd-3)))
19757
19758 (define-public python-fasteners
19759 (package
19760 (name "python-fasteners")
19761 (version "0.15")
19762 (source
19763 (origin
19764 (method url-fetch)
19765 (uri (pypi-uri "fasteners" version))
19766 (sha256
19767 (base32
19768 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
19769 (build-system python-build-system)
19770 (propagated-inputs
19771 `(("python-monotonic" ,python-monotonic)
19772 ("python-six" ,python-six)))
19773 (native-inputs
19774 `(("python-testtools" ,python-testtools)))
19775 (home-page "https://github.com/harlowja/fasteners")
19776 (synopsis "Python package that provides useful locks")
19777 (description
19778 "This package provides a Python program that provides following locks:
19779
19780 @itemize
19781 @item Locking decorator
19782 @item Reader-writer locks
19783 @item Inter-process locks
19784 @item Generic helpers
19785 @end itemize\n")
19786 (license license:asl2.0)))
19787
19788 (define-public python-requests-file
19789 (package
19790 (name "python-requests-file")
19791 (version "1.4.3")
19792 (source
19793 (origin
19794 (method url-fetch)
19795 (uri (pypi-uri "requests-file" version))
19796 (sha256
19797 (base32
19798 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
19799 (build-system python-build-system)
19800 (propagated-inputs
19801 `(("python-requests" ,python-requests)
19802 ("python-six" ,python-six)))
19803 (home-page
19804 "https://github.com/dashea/requests-file")
19805 (synopsis "File transport adapter for Requests")
19806 (description
19807 "Requests-File is a transport adapter for use with the Requests Python
19808 library to allow local file system access via @code{file://} URLs.")
19809 (license license:asl2.0)))
19810
19811 (define-public python2-requests-file
19812 (package-with-python2 python-requests-file))
19813
19814 (define-public python-identify
19815 (package
19816 (name "python-identify")
19817 (version "1.4.25")
19818 (source
19819 (origin
19820 ;; There are no tests in the PyPI tarball.
19821 (method git-fetch)
19822 (uri (git-reference
19823 (url "https://github.com/chriskuehl/identify")
19824 (commit (string-append "v" version))))
19825 (file-name (git-file-name name version))
19826 (sha256
19827 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
19828 (build-system python-build-system)
19829 (arguments
19830 `(#:phases
19831 (modify-phases %standard-phases
19832 (replace 'check
19833 (lambda _
19834 (invoke "pytest" "-vv"))))))
19835 (native-inputs
19836 `(("python-coverage" ,python-coverage)
19837 ("python-pytest" ,python-pytest)))
19838 (propagated-inputs
19839 `(("python-editdistance" ,python-editdistance)))
19840 (home-page "https://github.com/chriskuehl/identify")
19841 (synopsis "File identification library for Python")
19842 (description
19843 "@code{identify} is a file identification library for Python. Given
19844 a file (or some information about a file), return a set of standardized tags
19845 identifying what the file is.")
19846 (license license:expat)))
19847
19848 (define-public python-tldextract
19849 (package
19850 (name "python-tldextract")
19851 (version "2.2.0")
19852 (source
19853 (origin
19854 (method url-fetch)
19855 (uri (pypi-uri "tldextract" version))
19856 (sha256
19857 (base32
19858 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
19859 (build-system python-build-system)
19860 (native-inputs
19861 `(("python-pytest" ,python-pytest)
19862 ("python-responses" ,python-responses)))
19863 (propagated-inputs
19864 `(("python-idna" ,python-idna)
19865 ("python-requests" ,python-requests)
19866 ("python-requests-file" ,python-requests-file)))
19867 (home-page
19868 "https://github.com/john-kurkowski/tldextract")
19869 (synopsis
19870 "Separate the TLD from the registered domain and subdomains of a URL")
19871 (description
19872 "TLDExtract accurately separates the TLD from the registered domain and
19873 subdomains of a URL, using the Public Suffix List. By default, this includes
19874 the public ICANN TLDs and their exceptions. It can optionally support the
19875 Public Suffix List's private domains as well.")
19876 (license license:bsd-3)))
19877
19878 (define-public python2-tldextract
19879 (package-with-python2 python-tldextract))
19880
19881 (define-public python-nodeenv
19882 (package
19883 (name "python-nodeenv")
19884 (version "1.4.0")
19885 (source
19886 (origin
19887 ;; There's no tarball in PyPI.
19888 (method git-fetch)
19889 (uri (git-reference
19890 (url "https://github.com/ekalinin/nodeenv")
19891 (commit version)))
19892 (file-name (git-file-name name version))
19893 (sha256
19894 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
19895 (build-system python-build-system)
19896 (arguments
19897 `(#:phases
19898 (modify-phases %standard-phases
19899 (replace 'check
19900 (lambda _
19901 ;; This test fails. It tries to open a network socket.
19902 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
19903 (native-inputs
19904 `(("python-coverage" ,python-coverage)
19905 ("python-mock" ,python-mock)
19906 ("python-pytest" ,python-pytest)))
19907 (home-page "https://ekalinin.github.io/nodeenv/")
19908 (synopsis "Create isolated node.js environments")
19909 (description
19910 "Nodeenv (node.js virtual environment) is a tool to create isolated
19911 node.js environments. It creates an environment that has its own installation
19912 directories, that doesn't share libraries with other node.js virtual
19913 environments.")
19914 (license license:bsd-3)))
19915
19916 (define-public python-pynamecheap
19917 (package
19918 (name "python-pynamecheap")
19919 (version "0.0.3")
19920 (source
19921 (origin
19922 (method url-fetch)
19923 (uri (pypi-uri "PyNamecheap" version))
19924 (sha256
19925 (base32
19926 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
19927 (build-system python-build-system)
19928 (propagated-inputs
19929 `(("python-requests" ,python-requests)))
19930 (home-page
19931 "https://github.com/Bemmu/PyNamecheap")
19932 (synopsis
19933 "Namecheap API client in Python")
19934 (description
19935 "PyNamecheap is a Namecheap API client in Python.")
19936 (license license:expat)))
19937
19938 (define-public python2-pynamecheap
19939 (package-with-python2 python-pynamecheap))
19940
19941 (define-public python-dns-lexicon
19942 (package
19943 (name "python-dns-lexicon")
19944 (version "2.4.0")
19945 (source
19946 (origin
19947 (method url-fetch)
19948 (uri (pypi-uri "dns-lexicon" version))
19949 (sha256
19950 (base32
19951 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
19952 (build-system python-build-system)
19953 (arguments
19954 `(#:tests? #f)) ;requires internet access
19955 (propagated-inputs
19956 `(("python-future" ,python-future)
19957 ("python-pynamecheap" ,python-pynamecheap)
19958 ("python-requests" ,python-requests)
19959 ("python-tldextract" ,python-tldextract)
19960 ("python-urllib3" ,python-urllib3)))
19961 (home-page "https://github.com/AnalogJ/lexicon")
19962 (synopsis
19963 "Manipulate DNS records on various DNS providers")
19964 (description
19965 "Lexicon provides a way to manipulate DNS records on multiple DNS
19966 providers in a standardized way. It has a CLI but it can also be used as a
19967 Python library. It was designed to be used in automation, specifically with
19968 Let's Encrypt.")
19969 (license license:expat)))
19970
19971 (define-public python2-dns-lexicon
19972 (package-with-python2 python-dns-lexicon))
19973
19974 (define-public python-cfgv
19975 (package
19976 (name "python-cfgv")
19977 (version "3.1.0")
19978 (source
19979 (origin
19980 ;; There are no tests in the PyPI tarball.
19981 (method git-fetch)
19982 (uri (git-reference
19983 (url "https://github.com/asottile/cfgv")
19984 (commit (string-append "v" version))))
19985 (file-name (git-file-name name version))
19986 (sha256
19987 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19988 (build-system python-build-system)
19989 (arguments
19990 `(#:phases
19991 (modify-phases %standard-phases
19992 (replace 'check
19993 (lambda _
19994 (invoke "pytest" "-vv"))))))
19995 (native-inputs
19996 `(("python-covdefaults" ,python-covdefaults)
19997 ("python-coverage" ,python-coverage)
19998 ("python-pytest" ,python-pytest)))
19999 (home-page "https://github.com/asottile/cfgv")
20000 (synopsis "Configuration validation library")
20001 (description
20002 "This library helps to validate configuration files and produce human
20003 readable error messages.")
20004 (license license:expat)))
20005
20006 (define-public python-commandlines
20007 (package
20008 (name "python-commandlines")
20009 (version "0.4.1")
20010 (source
20011 (origin
20012 (method url-fetch)
20013 (uri (pypi-uri "commandlines" version))
20014 (sha256
20015 (base32
20016 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
20017 (build-system python-build-system)
20018 (home-page "https://github.com/chrissimpkins/commandlines")
20019 (synopsis "Command line argument to object parsing library")
20020 (description
20021 "@code{Commandlines} is a Python library for command line application
20022 development that supports command line argument parsing, command string
20023 validation testing and application logic.")
20024 (license license:expat)))
20025
20026 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
20027 ;; python-numba. They have a very unflexible relationship.
20028 (define-public python-numba
20029 (package
20030 (name "python-numba")
20031 (version "0.51.2")
20032 (source
20033 (origin
20034 (method url-fetch)
20035 (uri (pypi-uri "numba" version))
20036 (sha256
20037 (base32
20038 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
20039 (build-system python-build-system)
20040 (arguments
20041 `(#:phases
20042 (modify-phases %standard-phases
20043 (add-after 'unpack 'disable-proprietary-features
20044 (lambda _
20045 (setenv "NUMBA_DISABLE_HSA" "1")
20046 (setenv "NUMBA_DISABLE_CUDA" "1")
20047 #t))
20048 (replace 'check
20049 (lambda* (#:key inputs outputs #:allow-other-keys)
20050 (add-installed-pythonpath inputs outputs)
20051 ;; Something is wrong with the PYTHONPATH when running the
20052 ;; tests from the build directory, as it complains about not being
20053 ;; able to import certain modules.
20054 (with-directory-excursion "/tmp"
20055 (setenv "HOME" (getcwd))
20056 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
20057 (propagated-inputs
20058 `(("python-llvmlite" ,python-llvmlite)
20059 ("python-numpy" ,python-numpy)
20060 ("python-singledispatch" ,python-singledispatch)))
20061 (native-inputs ;for tests
20062 `(("python-jinja2" ,python-jinja2)
20063 ("python-pygments" ,python-pygments)))
20064 (home-page "https://numba.pydata.org")
20065 (synopsis "Compile Python code using LLVM")
20066 (description "Numba gives you the power to speed up your applications with
20067 high performance functions written directly in Python. With a few
20068 annotations, array-oriented and math-heavy Python code can be just-in-time
20069 compiled to native machine instructions, similar in performance to C, C++ and
20070 Fortran, without having to switch languages or Python interpreters.
20071
20072 Numba works by generating optimized machine code using the LLVM compiler
20073 infrastructure at import time, runtime, or statically (using the included pycc
20074 tool).")
20075 (license license:bsd-3)))
20076
20077 (define-public python-numcodecs
20078 (package
20079 (name "python-numcodecs")
20080 (version "0.6.4")
20081 (source
20082 (origin
20083 (method url-fetch)
20084 (uri (pypi-uri "numcodecs" version))
20085 (sha256
20086 (base32
20087 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
20088 (build-system python-build-system)
20089 (propagated-inputs
20090 `(("python-numpy" ,python-numpy)
20091 ("python-msgpack" ,python-msgpack)))
20092 (native-inputs
20093 `(("python-pytest" ,python-pytest)
20094 ("python-setuptools-scm" ,python-setuptools-scm)))
20095 (home-page "https://github.com/zarr-developers/numcodecs")
20096 (synopsis "Buffer compression and transformation codecs")
20097 (description
20098 "This Python package provides buffer compression and transformation
20099 codecs for use in data storage and communication applications.")
20100 (license license:expat)))
20101
20102 (define-public python-asciitree
20103 (package
20104 (name "python-asciitree")
20105 (version "0.3.3")
20106 (source
20107 (origin
20108 (method url-fetch)
20109 (uri (pypi-uri "asciitree" version))
20110 (sha256
20111 (base32
20112 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
20113 (build-system python-build-system)
20114 (home-page "https://github.com/mbr/asciitree")
20115 (synopsis "Draws ASCII trees")
20116 (description "This package draws tree structures using characters.")
20117 (license license:expat)))
20118
20119 (define-public python-zarr
20120 (package
20121 (name "python-zarr")
20122 (version "2.4.0")
20123 (source
20124 (origin
20125 (method url-fetch)
20126 (uri (pypi-uri "zarr" version))
20127 (sha256
20128 (base32
20129 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
20130 (build-system python-build-system)
20131 (arguments
20132 `(#:phases
20133 (modify-phases %standard-phases
20134 (add-after 'unpack 'disable-service-tests
20135 (lambda _
20136 (setenv "ZARR_TEST_ABS" "0")
20137 (setenv "ZARR_TEST_MONGO" "0")
20138 (setenv "ZARR_TEST_REDIS" "0")
20139 #t))
20140 (replace 'check
20141 (lambda _
20142 (invoke "pytest" "-vv" "-k" "not lmdb")
20143 #t)))))
20144 (propagated-inputs
20145 `(("python-asciitree" ,python-asciitree)
20146 ("python-fasteners" ,python-fasteners)
20147 ("python-numcodecs" ,python-numcodecs)
20148 ("python-numpy" ,python-numpy)))
20149 (native-inputs
20150 `(("python-pytest" ,python-pytest)
20151 ("python-setuptools-scm" ,python-setuptools-scm)))
20152 (home-page "https://github.com/zarr-developers/zarr-python")
20153 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
20154 (description
20155 "This package provides an implementation of chunked, compressed,
20156 N-dimensional arrays for Python.")
20157 (license license:expat)))
20158
20159 (define-public python-anndata
20160 (package
20161 (name "python-anndata")
20162 (version "0.7.1")
20163 (source
20164 (origin
20165 (method url-fetch)
20166 (uri (pypi-uri "anndata" version))
20167 (sha256
20168 (base32
20169 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
20170 (build-system python-build-system)
20171 (arguments
20172 `(#:phases
20173 (modify-phases %standard-phases
20174 (add-after 'unpack 'delete-inconvenient-tests
20175 (lambda _
20176 ;; This test depends on python-scikit-learn.
20177 (delete-file "anndata/tests/test_inplace_subset.py")
20178 #t))
20179 (delete 'check)
20180 (add-after 'install 'check
20181 (lambda* (#:key inputs outputs #:allow-other-keys)
20182 (add-installed-pythonpath inputs outputs)
20183 (invoke "pytest" "-vv"))))))
20184 (propagated-inputs
20185 `(("python-h5py" ,python-h5py)
20186 ("python-importlib-metadata" ,python-importlib-metadata)
20187 ("python-natsort" ,python-natsort)
20188 ("python-numcodecs" ,python-numcodecs)
20189 ("python-packaging" ,python-packaging)
20190 ("python-pandas" ,python-pandas)
20191 ("python-scipy" ,python-scipy)
20192 ("python-zarr" ,python-zarr)))
20193 (native-inputs
20194 `(("python-joblib" ,python-joblib)
20195 ("python-pytest" ,python-pytest)
20196 ("python-setuptools-scm" ,python-setuptools-scm)))
20197 (home-page "https://github.com/theislab/anndata")
20198 (synopsis "Annotated data for data analysis pipelines")
20199 (description "Anndata is a package for simple (functional) high-level APIs
20200 for data analysis pipelines. In this context, it provides an efficient,
20201 scalable way of keeping track of data together with learned annotations and
20202 reduces the code overhead typically encountered when using a mostly
20203 object-oriented library such as @code{scikit-learn}.")
20204 (license license:bsd-3)))
20205
20206 (define-public python-dill
20207 (package
20208 (name "python-dill")
20209 (version "0.3.1.1")
20210 (source
20211 (origin
20212 (method url-fetch)
20213 (uri (pypi-uri "dill" version))
20214 (sha256
20215 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
20216 (build-system python-build-system)
20217 (arguments
20218 `(#:phases
20219 (modify-phases %standard-phases
20220 (replace 'check
20221 (lambda _
20222 (with-directory-excursion "/tmp"
20223 (invoke "nosetests" "-v"))
20224 #t)))))
20225 (native-inputs
20226 `(("python-nose" ,python-nose)))
20227 (home-page "https://pypi.org/project/dill/")
20228 (synopsis "Serialize all of Python")
20229 (description "Dill extends Python's @code{pickle} module for serializing
20230 and de-serializing Python objects to the majority of the built-in Python
20231 types. Dill provides the user the same interface as the @code{pickle} module,
20232 and also includes some additional features. In addition to pickling Python
20233 objects, @code{dill} provides the ability to save the state of an interpreter
20234 session in a single command. Hence, it would be feasible to save a
20235 interpreter session, close the interpreter, ship the pickled file to another
20236 computer, open a new interpreter, unpickle the session and thus continue from
20237 the saved state of the original interpreter session.")
20238 (license license:bsd-3)))
20239
20240 (define-public python-multiprocess
20241 (package
20242 (name "python-multiprocess")
20243 (version "0.70.9")
20244 (source
20245 (origin
20246 (method url-fetch)
20247 (uri (pypi-uri "multiprocess" version))
20248 (sha256
20249 (base32
20250 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
20251 (build-system python-build-system)
20252 (arguments
20253 `(#:phases
20254 (modify-phases %standard-phases
20255 (add-after 'unpack 'disable-broken-tests
20256 (lambda _
20257 ;; This test is broken as there is no keyboard interrupt.
20258 (substitute* "py3.7/multiprocess/tests/__init__.py"
20259 (("^(.*)def test_wait_result"
20260 line indent)
20261 (string-append indent
20262 "@unittest.skip(\"Disabled by Guix\")\n"
20263 line)))
20264 #t))
20265 ;; Tests must be run after installation.
20266 (delete 'check)
20267 (add-after 'install 'check
20268 (lambda* (#:key inputs outputs #:allow-other-keys)
20269 (add-installed-pythonpath inputs outputs)
20270 (invoke "python" "-m" "multiprocess.tests")
20271 #t)))))
20272 (propagated-inputs
20273 `(("python-dill" ,python-dill)))
20274 (home-page "https://pypi.org/project/multiprocess/")
20275 (synopsis "Multiprocessing and multithreading in Python")
20276 (description
20277 "This package is a fork of the multiprocessing Python package, a package
20278 which supports the spawning of processes using the API of the standard
20279 library's @code{threading} module.")
20280 (license license:bsd-3)))
20281
20282 (define-public python-toolz
20283 (package
20284 (name "python-toolz")
20285 (version "0.9.0")
20286 (source
20287 (origin
20288 (method url-fetch)
20289 (uri (pypi-uri "toolz" version))
20290 (sha256
20291 (base32
20292 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
20293 (build-system python-build-system)
20294 ;; FIXME: tests cannot be computed: "Can't perform this operation for
20295 ;; unregistered loader type"
20296 (arguments '(#:tests? #f))
20297 (home-page "https://github.com/pytoolz/toolz/")
20298 (synopsis "List processing tools and functional utilities")
20299 (description
20300 "This package provides a set of utility functions for iterators,
20301 functions, and dictionaries.")
20302 (license license:bsd-3)))
20303
20304 (define-public python2-toolz
20305 (package-with-python2 python-toolz))
20306
20307 (define-public python-cytoolz
20308 (package
20309 (name "python-cytoolz")
20310 (version "0.9.0.1")
20311 (source
20312 (origin
20313 (method url-fetch)
20314 (uri (pypi-uri "cytoolz" version))
20315 (sha256
20316 (base32
20317 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
20318 (build-system python-build-system)
20319 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
20320 ;; 'exceptions'"
20321 (arguments '(#:tests? #f))
20322 (propagated-inputs
20323 `(("python-toolz" ,python-toolz)))
20324 (native-inputs
20325 `(("python-cython" ,python-cython)))
20326 (home-page "https://github.com/pytoolz/cytoolz")
20327 (synopsis "High performance functional utilities")
20328 (description
20329 "The cytoolz package implements the same API as provided by toolz. The
20330 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
20331 that is accessible to other projects developed in Cython.")
20332 (license license:bsd-3)))
20333
20334 (define-public python-sortedcollections
20335 (package
20336 (name "python-sortedcollections")
20337 (version "2.1.0")
20338 (source
20339 (origin
20340 (method url-fetch)
20341 (uri (pypi-uri "sortedcollections" version))
20342 (sha256
20343 (base32
20344 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
20345 (build-system python-build-system)
20346 (propagated-inputs
20347 `(("python-sortedcontainers" ,python-sortedcontainers)))
20348 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
20349 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
20350 (synopsis "Python Sorted Collections")
20351 (description "Sorted Collections is a Python sorted collections library.")
20352 (license license:asl2.0)))
20353
20354 (define-public python-sortedcontainers
20355 (package
20356 (name "python-sortedcontainers")
20357 (version "2.1.0")
20358 (source
20359 (origin
20360 (method url-fetch)
20361 (uri (pypi-uri "sortedcontainers" version))
20362 (sha256
20363 (base32
20364 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
20365 (build-system python-build-system)
20366 (arguments
20367 ;; FIXME: Tests require many extra dependencies, and would introduce
20368 ;; a circular dependency on hypothesis, which uses this package.
20369 '(#:tests? #f))
20370 (propagated-inputs
20371 `(("python-appdirs" ,python-appdirs)
20372 ("python-distlib" ,python-distlib)
20373 ("python-filelock" ,python-filelock)
20374 ("python-six" ,python-six-bootstrap)))
20375 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
20376 (synopsis "Sorted List, Sorted Dict, Sorted Set")
20377 (description
20378 "This package provides a sorted collections library, written in
20379 pure-Python.")
20380 (license license:asl2.0)))
20381
20382 (define-public python2-sortedcontainers
20383 (package-with-python2 python-sortedcontainers))
20384
20385 (define-public python-cloudpickle
20386 (package
20387 (name "python-cloudpickle")
20388 (version "1.3.0")
20389 (source
20390 (origin
20391 (method url-fetch)
20392 (uri (pypi-uri "cloudpickle" version))
20393 (sha256
20394 (base32
20395 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
20396 (build-system python-build-system)
20397 (arguments
20398 '(#:phases (modify-phases %standard-phases
20399 (add-before 'check 'do-not-override-PYTHONPATH
20400 (lambda _
20401 ;; Append to PYTHONPATH instead of overriding it so
20402 ;; that dependencies from Guix can be found.
20403 (substitute* "tests/testutils.py"
20404 (("env\\['PYTHONPATH'\\] = pythonpath")
20405 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
20406 #t))
20407 (replace 'check
20408 (lambda* (#:key tests? #:allow-other-keys)
20409 (if tests?
20410 (invoke "pytest" "-s" "-vv")
20411 (format #t "test suite not run~%"))
20412 #t)))))
20413 (native-inputs
20414 `(;; For tests.
20415 ("python-psutil" ,python-psutil)
20416 ("python-pytest" ,python-pytest)
20417 ("python-tornado" ,python-tornado)))
20418 (home-page "https://github.com/cloudpipe/cloudpickle")
20419 (synopsis "Extended pickling support for Python objects")
20420 (description
20421 "Cloudpickle makes it possible to serialize Python constructs not
20422 supported by the default pickle module from the Python standard library. It
20423 is especially useful for cluster computing where Python expressions are
20424 shipped over the network to execute on remote hosts, possibly close to the
20425 data.")
20426 (properties `((python2-variant . ,(delay python2-cloudpickle))))
20427 (license license:bsd-3)))
20428
20429 (define-public python2-cloudpickle
20430 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
20431 (package/inherit base
20432 (native-inputs
20433 `(("python-mock" ,python2-mock)
20434 ,@(package-native-inputs base)))
20435 (propagated-inputs
20436 `(("python-futures" ,python2-futures)
20437 ,@(package-propagated-inputs base))))))
20438
20439 (define-public python-locket
20440 (package
20441 (name "python-locket")
20442 (version "0.2.0")
20443 (source
20444 (origin
20445 (method url-fetch)
20446 (uri (pypi-uri "locket" version))
20447 (sha256
20448 (base32
20449 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
20450 (build-system python-build-system)
20451 (home-page "https://github.com/mwilliamson/locket.py")
20452 (synopsis "File-based locks for Python")
20453 (description
20454 "Locket implements a lock that can be used by multiple processes provided
20455 they use the same path.")
20456 (license license:bsd-2)))
20457
20458 (define-public python2-locket
20459 (package-with-python2 python-locket))
20460
20461 (define-public python-blosc
20462 (package
20463 (name "python-blosc")
20464 (version "1.5.1")
20465 (source
20466 (origin
20467 (method url-fetch)
20468 (uri (pypi-uri "blosc" version))
20469 (sha256
20470 (base32
20471 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
20472 (build-system python-build-system)
20473 ;; FIXME: all tests pass, but then this error is printed:
20474 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
20475 (arguments '(#:tests? #f))
20476 (propagated-inputs
20477 `(("python-numpy" ,python-numpy)))
20478 (home-page "https://github.com/blosc/python-blosc")
20479 (synopsis "Python wrapper for the Blosc data compressor library")
20480 (description "Blosc is a high performance compressor optimized for binary
20481 data. It has been designed to transmit data to the processor cache faster
20482 than the traditional, non-compressed, direct memory fetch approach via a
20483 @code{memcpy()} system call.
20484
20485 Blosc works well for compressing numerical arrays that contains data with
20486 relatively low entropy, like sparse data, time series, grids with
20487 regular-spaced values, etc.
20488
20489 This Python package wraps the Blosc library.")
20490 (license license:bsd-3)))
20491
20492 (define-public python2-blosc
20493 (package-with-python2 python-blosc))
20494
20495 (define-public python-partd
20496 (package
20497 (name "python-partd")
20498 (version "0.3.9")
20499 (source
20500 (origin
20501 (method url-fetch)
20502 (uri (pypi-uri "partd" version))
20503 (sha256
20504 (base32
20505 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
20506 (build-system python-build-system)
20507 (propagated-inputs
20508 `(("python-blosc" ,python-blosc)
20509 ("python-locket" ,python-locket)
20510 ("python-numpy" ,python-numpy)
20511 ("python-pandas" ,python-pandas)
20512 ("python-pyzmq" ,python-pyzmq)
20513 ("python-toolz" ,python-toolz)))
20514 (home-page "https://github.com/dask/partd/")
20515 (synopsis "Appendable key-value storage")
20516 (description "Partd stores key-value pairs. Values are raw bytes. We
20517 append on old values. Partd excels at shuffling operations.")
20518 (license license:bsd-3)))
20519
20520 (define-public python2-partd
20521 (package-with-python2 python-partd))
20522
20523 (define-public python-fsspec
20524 (package
20525 (name "python-fsspec")
20526 (version "0.6.1")
20527 (source
20528 (origin
20529 (method url-fetch)
20530 (uri (pypi-uri "fsspec" version))
20531 (sha256
20532 (base32
20533 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
20534 (build-system python-build-system)
20535 (arguments '(#:tests? #f)) ; there are none
20536 (home-page "https://github.com/intake/filesystem_spec")
20537 (synopsis "File-system specification")
20538 (description "The purpose of this package is to produce a template or
20539 specification for a file-system interface, that specific implementations
20540 should follow, so that applications making use of them can rely on a common
20541 behavior and not have to worry about the specific internal implementation
20542 decisions with any given backend.")
20543 (license license:bsd-3)))
20544
20545 (define-public python-dask
20546 (package
20547 (name "python-dask")
20548 (version "2.14.0")
20549 (source
20550 (origin
20551 (method url-fetch)
20552 (uri (pypi-uri "dask" version))
20553 (sha256
20554 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
20555 (build-system python-build-system)
20556 (arguments
20557 `(#:phases
20558 (modify-phases %standard-phases
20559 (add-after 'unpack 'disable-broken-tests
20560 (lambda _
20561 ;; This test is marked as xfail when pytest-xdist is used.
20562 (substitute* "dask/tests/test_threaded.py"
20563 (("def test_interrupt\\(\\)" m)
20564 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20565 m)))
20566 ;; This one fails with a type error:
20567 ;; TypeError: Already tz-aware, use tz_convert to convert.
20568 (substitute* "dask/dataframe/tests/test_shuffle.py"
20569 (("def test_set_index_timestamp\\(\\)" m)
20570 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20571 m)))
20572 #t))
20573 (replace 'check
20574 (lambda _ (invoke "pytest" "-vv"))))))
20575 (propagated-inputs
20576 `(("python-cloudpickle" ,python-cloudpickle)
20577 ("python-fsspec" ,python-fsspec)
20578 ("python-numpy" ,python-numpy)
20579 ("python-packaging" ,python-packaging)
20580 ("python-pandas" ,python-pandas)
20581 ("python-partd" ,python-partd)
20582 ("python-toolz" ,python-toolz)
20583 ("python-pyyaml" ,python-pyyaml)))
20584 (native-inputs
20585 `(("python-pytest" ,python-pytest)
20586 ("python-pytest-runner" ,python-pytest-runner)))
20587 (home-page "https://github.com/dask/dask/")
20588 (synopsis "Parallel computing with task scheduling")
20589 (description
20590 "Dask is a flexible parallel computing library for analytics. It
20591 consists of two components: dynamic task scheduling optimized for computation,
20592 and large data collections like parallel arrays, dataframes, and lists that
20593 extend common interfaces like NumPy, Pandas, or Python iterators to
20594 larger-than-memory or distributed environments. These parallel collections
20595 run on top of the dynamic task schedulers. ")
20596 (license license:bsd-3)))
20597
20598 (define-public python-ilinkedlist
20599 (package
20600 (name "python-ilinkedlist")
20601 (version "0.4.0")
20602 (source
20603 (origin
20604 (method url-fetch)
20605 (uri (pypi-uri "ilinkedlist" version))
20606 (sha256
20607 (base32
20608 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
20609 (build-system python-build-system)
20610 (native-inputs `(("python-pytest" ,python-pytest)))
20611 (inputs `(("python" ,python)))
20612 (home-page "https://github.com/luther9/ilinkedlist-py")
20613 (synopsis "Immutable linked list library")
20614 (description
20615 "This is a implementation of immutable linked lists for Python. It
20616 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
20617 Since a linked list is treated as immutable, it is hashable, and its length
20618 can be retrieved in constant time. Some of the terminology is inspired by
20619 LISP. It is possible to create an improper list by creating a @code{Pair}
20620 with a non-list @code{cdr}.")
20621 (license license:gpl3+)))
20622
20623 (define-public python-readlike
20624 (package
20625 (name "python-readlike")
20626 (version "0.1.3")
20627 (source
20628 (origin
20629 (method url-fetch)
20630 (uri (pypi-uri "readlike" version))
20631 (sha256
20632 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
20633 (build-system python-build-system)
20634 (home-page "https://github.com/jangler/readlike")
20635 (synopsis "GNU Readline-like line editing module")
20636 (description
20637 "This Python module provides line editing functions similar to the default
20638 Emacs-style ones of GNU Readline. Unlike the Python standard library's
20639 @code{readline} package, this one allows access to those capabilities in settings
20640 outside of a standard command-line interface. It is especially well-suited to
20641 interfacing with Urwid, due to a shared syntax for describing key inputs.
20642
20643 Currently, all stateless Readline commands are implemented. Yanking and history
20644 are not supported.")
20645 (license license:expat)))
20646
20647 (define-public python2-readlike
20648 (package-with-python2 python-readlike))
20649
20650 (define-public python-reparser
20651 (package
20652 (name "python-reparser")
20653 (version "1.4.3")
20654 (source
20655 (origin
20656 (method url-fetch)
20657 (uri (pypi-uri "ReParser" version))
20658 (sha256
20659 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
20660 (build-system python-build-system)
20661 (home-page "https://github.com/xmikos/reparser")
20662 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
20663 (description
20664 "This Python library provides a simple lexer/parser for inline markup based
20665 on regular expressions.")
20666 (license license:expat)))
20667
20668 (define-public python2-reparser
20669 (let ((reparser (package-with-python2
20670 (strip-python2-variant python-reparser))))
20671 (package/inherit reparser
20672 (propagated-inputs
20673 `(("python2-enum34" ,python2-enum34)
20674 ,@(package-propagated-inputs reparser))))))
20675
20676 (define-public python-retrying
20677 (package
20678 (name "python-retrying")
20679 (version "1.3.3")
20680 (source
20681 (origin
20682 (method git-fetch)
20683 (uri (git-reference
20684 (url "https://github.com/rholder/retrying")
20685 (commit (string-append "v" version))))
20686 (file-name (git-file-name name version))
20687 (sha256
20688 (base32
20689 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
20690 (build-system python-build-system)
20691 (propagated-inputs
20692 `(("python-six" ,python-six)))
20693 (home-page "https://github.com/rholder/retrying")
20694 (synopsis "Library for adding retry behavior")
20695 (description "Retrying is a general-purpose retrying library to simplify
20696 the task of adding retry behavior to just about anything.
20697
20698 Features:
20699
20700 @itemize
20701 @item Generic Decorator API.
20702 @item Specify stop condition (i.e. limit by number of attempts).
20703 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
20704 @item Customize retrying on Exceptions.
20705 @item Customize retrying on expected returned result.
20706 @end itemize")
20707 (license license:asl2.0)))
20708
20709 (define-public python-pre-commit
20710 (package
20711 (name "python-pre-commit")
20712 (version "2.10.0")
20713 (source
20714 (origin
20715 (method url-fetch)
20716 (uri (pypi-uri "pre_commit" version))
20717 (sha256
20718 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
20719 (build-system python-build-system)
20720 (arguments
20721 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
20722 ;; attribute 'empty_template_setup'".
20723 `(#:tests? #false))
20724 (propagated-inputs
20725 `(("python-cfgv" ,python-cfgv)
20726 ("python-identify" ,python-identify)
20727 ("python-importlib-metadata" ,python-importlib-metadata)
20728 ("python-importlib-resources" ,python-importlib-resources)
20729 ("python-nodeenv" ,python-nodeenv)
20730 ("python-pyyaml" ,python-pyyaml)
20731 ("python-toml" ,python-toml)
20732 ("python-virtualenv" ,python-virtualenv)))
20733 (home-page "https://github.com/pre-commit/pre-commit")
20734 (synopsis "Framework for managing multi-language pre-commit hooks")
20735 (description
20736 "This package provides a framework for managing and maintaining
20737 multi-language pre-commit hooks.")
20738 (license license:expat)))
20739
20740 (define-public python-precis-i18n
20741 (package
20742 (name "python-precis-i18n")
20743 (version "1.0.0")
20744 (source
20745 (origin
20746 (method url-fetch)
20747 (uri (pypi-uri "precis_i18n" version))
20748 (sha256
20749 (base32
20750 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
20751 (build-system python-build-system)
20752 (home-page "https://github.com/byllyfish/precis_i18n")
20753 (synopsis "Implementation of the PRECIS framework")
20754 (description
20755 "This module implements the PRECIS Framework as described in RFC 8264,
20756 RFC 8265 and RFC 8266.")
20757 (license license:expat)))
20758
20759 (define-public python-absl-py
20760 (package
20761 (name "python-absl-py")
20762 (version "0.6.1")
20763 (source
20764 (origin
20765 (method url-fetch)
20766 (uri (pypi-uri "absl-py" version))
20767 (sha256
20768 (base32
20769 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
20770 (build-system python-build-system)
20771 (propagated-inputs
20772 `(("python-six" ,python-six)))
20773 (home-page "https://github.com/abseil/abseil-py")
20774 (synopsis "Abseil Python common libraries")
20775 (description
20776 "This package provides the Abseil Python Common Libraries, a collection
20777 of Python libraries for building Python applications.")
20778 (license license:asl2.0)))
20779
20780 (define-public python-astor
20781 (package
20782 (name "python-astor")
20783 (version "0.8.1")
20784 (source
20785 (origin
20786 (method url-fetch)
20787 (uri (pypi-uri "astor" version))
20788 (sha256
20789 (base32
20790 "0ppscdzzvxpznclkmhhj53iz314x3pfv4yc7c6gwxqgljgdgyvka"))))
20791 (build-system python-build-system)
20792 ;; FIXME: There are two errors and two test failures.
20793 (arguments `(#:tests? #f))
20794 (home-page "https://github.com/berkerpeksag/astor")
20795 (synopsis "Read and write Python ASTs")
20796 (description "Astor is designed to allow easy manipulation of Python
20797 source via the Abstract Syntax Tree.")
20798 (license license:bsd-3)))
20799
20800 (define-public python2-astor
20801 (package-with-python2 python-astor))
20802
20803 (define-public python-astunparse
20804 (package
20805 (name "python-astunparse")
20806 (version "1.6.2")
20807 (source
20808 (origin
20809 (method url-fetch)
20810 (uri (pypi-uri "astunparse" version))
20811 (sha256
20812 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
20813 (build-system python-build-system)
20814 (arguments '(#:tests? #f)) ; there are none
20815 (propagated-inputs
20816 `(("python-six" ,python-six)
20817 ("python-wheel" ,python-wheel)))
20818 (home-page "https://github.com/simonpercivall/astunparse")
20819 (synopsis "AST unparser for Python")
20820 (description "This package provides an AST unparser for Python. It is a
20821 factored out version of @code{unparse} found in the Python source
20822 distribution.")
20823 (license license:bsd-3)))
20824
20825 (define-public python-gast
20826 (package
20827 (name "python-gast")
20828 (version "0.3.3")
20829 (source
20830 (origin
20831 (method url-fetch)
20832 (uri (pypi-uri "gast" version))
20833 (sha256
20834 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
20835 (build-system python-build-system)
20836 (propagated-inputs
20837 `(("python-astunparse" ,python-astunparse)))
20838 (home-page "https://pypi.org/project/gast/")
20839 (synopsis "Generic Python AST that abstracts the underlying Python version")
20840 (description
20841 "GAST provides a compatibility layer between the AST of various Python
20842 versions, as produced by @code{ast.parse} from the standard @code{ast}
20843 module.")
20844 (license license:bsd-3)))
20845
20846 (define-public python-wikidata
20847 (package
20848 (name "python-wikidata")
20849 (version "0.6.1")
20850 (source
20851 (origin
20852 (method url-fetch)
20853 (uri (pypi-uri "Wikidata" version))
20854 (sha256
20855 (base32
20856 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
20857 (build-system python-build-system)
20858 (propagated-inputs
20859 `(("python-babel" ,python-babel)))
20860 (home-page "https://github.com/dahlia/wikidata")
20861 (synopsis "Wikidata client library")
20862 (description
20863 "This package provides a Python interface to
20864 @url{https://www.wikidata.org/, Wikidata}.")
20865 (properties '((upstream-name . "Wikidata")))
20866 (license license:gpl3+)))
20867
20868 (define-public python-doctest-ignore-unicode
20869 (package
20870 (name "python-doctest-ignore-unicode")
20871 (version "0.1.2")
20872 (source
20873 (origin
20874 (method url-fetch)
20875 (uri (pypi-uri "doctest-ignore-unicode" version))
20876 (sha256
20877 (base32
20878 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
20879 (build-system python-build-system)
20880 (native-inputs
20881 `(("python-nose" ,python-nose)))
20882 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
20883 (synopsis "Ignore Unicode literal prefixes in doctests")
20884 (description
20885 "This package adds support for a flag to ignore Unicode literal prefixes
20886 in doctests.")
20887 (license license:asl2.0)))
20888
20889 (define-public python-attr
20890 (package
20891 (name "python-attr")
20892 (version "0.3.1")
20893 (source
20894 (origin
20895 (method url-fetch)
20896 (uri (pypi-uri "attr" version))
20897 (sha256
20898 (base32
20899 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
20900 (build-system python-build-system)
20901 (home-page "https://github.com/denis-ryzhkov/attr")
20902 (synopsis "Decorator for attributes of target function or class")
20903 (description "Simple decorator to set attributes of target function or
20904 class in a @acronym{DRY, Don't Repeat Yourself} way.")
20905 (license license:expat)))
20906
20907 (define-public python-construct
20908 (package
20909 (name "python-construct")
20910 (version "2.10.56")
20911 (source
20912 (origin
20913 (method url-fetch)
20914 (uri (pypi-uri "construct" version))
20915 (sha256
20916 (base32
20917 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
20918 (build-system python-build-system)
20919 (arguments
20920 `(#:tests? #f)) ; No tests exist.
20921 (propagated-inputs
20922 `(("python-extras" ,python-extras)
20923 ("python-arrow" ,python-arrow)
20924 ("python-numpy" ,python-numpy)
20925 ("python-ruamel.yaml" ,python-ruamel.yaml)))
20926 (home-page "https://construct.readthedocs.io")
20927 (synopsis "Declarative and symmetrical parser and builder for binary data")
20928 (description
20929 "This package provides both simple, atomic constructs (such as
20930 integers of various sizes), as well as composite ones which allow you
20931 form hierarchical and sequential structures of increasing complexity.
20932 It features bit and byte granularity, easy debugging and testing, an
20933 easy-to-extend subclass system, and lots of primitive constructs to
20934 make your work easier.")
20935 (license license:expat)))
20936
20937 (define-public python-outcome
20938 (package
20939 (name "python-outcome")
20940 (version "1.0.1")
20941 (source
20942 (origin
20943 (method url-fetch)
20944 (uri (pypi-uri "outcome" version))
20945 (sha256
20946 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
20947 (build-system python-build-system)
20948 (arguments
20949 `(#:phases
20950 (modify-phases %standard-phases
20951 (replace 'check
20952 (lambda* (#:key inputs outputs #:allow-other-keys)
20953 (add-installed-pythonpath inputs outputs)
20954 (invoke "pytest" "-vv"))))))
20955 (native-inputs
20956 `(("python-pytest" ,python-pytest)
20957 ("python-pytest-cov" ,python-pytest-cov)
20958 ("python-pytest-asyncio" ,python-pytest-asyncio)))
20959 (propagated-inputs
20960 `(("python-async-generator" ,python-async-generator)
20961 ("python-attrs" ,python-attrs)))
20962 (home-page "https://github.com/python-trio/outcome")
20963 (synopsis "Capture the outcome of Python function calls")
20964 (description
20965 "Capture the outcome of Python function calls. Extracted from the Trio
20966 project.")
20967 ;; Either license applies.
20968 (license (list license:expat license:asl2.0))))
20969
20970 (define-public python-trio
20971 (package
20972 (name "python-trio")
20973 (version "0.17.0")
20974 (source
20975 (origin
20976 (method url-fetch)
20977 (uri (pypi-uri "trio" version))
20978 (sha256
20979 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
20980 (build-system python-build-system)
20981 (arguments
20982 `(#:phases
20983 (modify-phases %standard-phases
20984 (add-before 'check 'change-home
20985 (lambda _
20986 ;; Tests require a writable home.
20987 (setenv "HOME" "/tmp")
20988 #t))
20989 (replace 'check
20990 (lambda _
20991 (invoke "pytest" "-vv" "-k"
20992 (string-append
20993 ;; This test times out.
20994 "not test_ki_protection_works"
20995 ;; Assertion errors.
20996 " and not test_guest_mode_ki"
20997 " and not test_run_in_trio_thread_ki"
20998 ;; These try to raise KeyboardInterrupt which does not work
20999 ;; in the build environment.
21000 " and not test_ki_self"
21001 " and not test_ki_wakes_us_up"
21002 ;; Failure in name resolution.
21003 " and not test_getnameinfo"
21004 " and not test_SocketType_resolve"
21005 ;; OSError: protocol not found.
21006 " and not test_getprotobyname")))))))
21007 (native-inputs
21008 `(("python-astor" ,python-astor)
21009 ("python-ipython" ,python-ipython)
21010 ("python-jedi" ,python-jedi)
21011 ("python-pylint" ,python-pylint)
21012 ("python-pyopenssl" ,python-pyopenssl)
21013 ("python-pytest" ,python-pytest)
21014 ("python-pytest-cov" ,python-pytest-cov)
21015 ("python-trustme" ,python-trustme)))
21016 (propagated-inputs
21017 `(("python-attrs" ,python-attrs)
21018 ("python-idna" ,python-idna)
21019 ("python-outcome" ,python-outcome)
21020 ("python-sniffio" ,python-sniffio)
21021 ("python-sortedcontainers"
21022 ,python-sortedcontainers)))
21023 (home-page "https://github.com/python-trio/trio")
21024 (synopsis "Friendly Python library for async concurrency and I/O")
21025 (description
21026 "Trio strives to be a production-quality, async/await-native I/O library
21027 for Python. Like all async libraries, its main purpose is to help you write
21028 programs that do multiple things at the same time with parallelized I/O.")
21029 ;; Either license applies.
21030 (license (list license:expat license:asl2.0))))
21031
21032 (define-public python-trio-typing
21033 (package
21034 (name "python-trio-typing")
21035 (version "0.5.0")
21036 (source
21037 (origin
21038 (method url-fetch)
21039 (uri (pypi-uri "trio-typing" version))
21040 (sha256
21041 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
21042 (build-system python-build-system)
21043 (arguments
21044 `(#:phases
21045 (modify-phases %standard-phases
21046 (replace 'check
21047 (lambda _
21048 (invoke "pytest" "-vv"))))))
21049 (native-inputs
21050 `(("python-attrs" ,python-attrs)
21051 ("python-pytest" ,python-pytest)))
21052 (propagated-inputs
21053 `(("python-mypy" ,python-mypy)
21054 ("python-mypy-extensions"
21055 ,python-mypy-extensions)
21056 ("python-trio" ,python-trio)
21057 ("python-typing-extensions"
21058 ,python-typing-extensions)))
21059 (home-page "https://github.com/python-trio/trio-typing")
21060 (synopsis "Static type checking support for Trio and related projects")
21061 (description
21062 "This package provides:
21063
21064 @itemize
21065 @item PEP 561 typing stubs packages for the Trio project packages:
21066
21067 @itemize
21068 @item trio (@code{trio-stubs})
21069 @item outcome (@code{outcome-stubs})
21070 @item async_generator (@code{async_generator-stubs})
21071 @end itemize
21072
21073 @item A package @code{trio_typing} containing types that Trio programs often
21074 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
21075 a mypy plugin that smooths over some limitations in the basic type hints.
21076 @end itemize")
21077 ;; Either license applies.
21078 (license (list license:expat license:asl2.0))))
21079
21080 (define-public python-humanize
21081 (package
21082 (name "python-humanize")
21083 (version "0.5.1")
21084 (source
21085 (origin
21086 (method url-fetch)
21087 (uri (pypi-uri "humanize" version))
21088 (sha256
21089 (base32
21090 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
21091 (arguments
21092 '(#:tests? #f)) ; tests not in pypi archive
21093 (build-system python-build-system)
21094 (home-page "https://github.com/jmoiron/humanize")
21095 (synopsis "Print numerical information in a human-readable form")
21096 (description "This package provides a Python module that displays numbers
21097 and dates in \"human readable\" forms. For example, it would display
21098 \"12345591313\" as \"12.3 billion\".")
21099 (license license:expat)))
21100
21101 (define-public python-txaio
21102 (package
21103 (name "python-txaio")
21104 (version "18.8.1")
21105 (source
21106 (origin
21107 (method url-fetch)
21108 (uri (pypi-uri "txaio" version))
21109 (sha256
21110 (base32
21111 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
21112 (build-system python-build-system)
21113 (propagated-inputs
21114 `(("python-twisted" ,python-twisted)
21115 ("python-six" ,python-six)))
21116 (home-page "https://github.com/crossbario/txaio")
21117 (synopsis "Compatibility layer between Python asyncio and Twisted")
21118 (description "Txaio provides a compatibility layer between the Python
21119 @code{asyncio} module and @code{Twisted}.")
21120 (license license:expat)))
21121
21122 (define-public python-toolshed
21123 (package
21124 (name "python-toolshed")
21125 (version "0.4.6")
21126 (source
21127 (origin
21128 (method url-fetch)
21129 (uri (pypi-uri "toolshed" version))
21130 (sha256
21131 (base32
21132 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
21133 (build-system python-build-system)
21134 (native-inputs
21135 `(("python-nose" ,python-nose)))
21136 (home-page "https://github.com/brentp/toolshed/")
21137 (synopsis "Collection of modules and functions for working with data")
21138 (description "This is a collection of well-tested, simple modules and
21139 functions that aim to reduce boilerplate when working with data.")
21140 (license license:bsd-2)))
21141
21142 (define-public python-annoy
21143 (package
21144 (name "python-annoy")
21145 (version "1.15.1")
21146 (source
21147 (origin
21148 (method url-fetch)
21149 (uri (pypi-uri "annoy" version))
21150 (sha256
21151 (base32
21152 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
21153 (build-system python-build-system)
21154 (native-inputs
21155 `(("python-nose" ,python-nose)))
21156 (home-page "https://github.com/spotify/annoy/")
21157 (synopsis "Approximate nearest neighbors library")
21158 (description
21159 "Annoy is a C++ library with Python bindings to search for points in
21160 space that are close to a given query point. It also creates large read-only
21161 file-based data structures that are @code{mmap}ped into memory so that many
21162 processes may share the same data.")
21163 (license license:asl2.0)))
21164
21165 (define-public python-croniter
21166 (package
21167 (name "python-croniter")
21168 (version "0.3.34")
21169 (source (origin
21170 (method url-fetch)
21171 (uri (pypi-uri "croniter" version))
21172 (sha256
21173 (base32
21174 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
21175 (build-system python-build-system)
21176 (propagated-inputs
21177 `(("python-dateutil" ,python-dateutil)
21178 ("python-natsort" ,python-natsort)))
21179 (home-page "https://github.com/kiorky/croniter")
21180 (synopsis "Iterate datetime objects with cron-like syntax")
21181 (description
21182 "@code{croniter} provides iteration for datetime object with cron-like
21183 format.")
21184 (license license:expat)))
21185
21186 (define-public python-pylzma
21187 (package
21188 (name "python-pylzma")
21189 (version "0.5.0")
21190 (source
21191 (origin
21192 (method url-fetch)
21193 (uri (pypi-uri "pylzma" version))
21194 (sha256
21195 (base32
21196 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
21197 (build-system python-build-system)
21198 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
21199 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
21200 (description "This package provides Python bindings for the LZMA library
21201 by Igor Pavlov.")
21202 (license license:lgpl2.1+)))
21203
21204 (define-public python2-pylzma
21205 (package-with-python2 python-pylzma))
21206
21207 (define-public python-ifaddr
21208 (package
21209 (name "python-ifaddr")
21210 (version "0.1.7")
21211 (source
21212 (origin
21213 (method url-fetch)
21214 (uri (pypi-uri "ifaddr" version))
21215 (sha256
21216 (base32
21217 "150sxdlicwrphmhnv03ykxplyd2jdrxz0mikgnivavgilrn8m7hz"))))
21218 (build-system python-build-system)
21219 (arguments
21220 `(#:phases
21221 (modify-phases %standard-phases
21222 (replace 'check
21223 (lambda _ (invoke "nosetests"))))))
21224 (native-inputs
21225 `(("python-nose" ,python-nose)))
21226 (home-page "https://github.com/pydron/ifaddr")
21227 (synopsis "Network interface and IP address enumeration library")
21228 (description "This package provides a network interface and IP address
21229 enumeration library in Python.")
21230 (license license:expat)))
21231
21232 (define-public python-zeroconf
21233 (package
21234 (name "python-zeroconf")
21235 (version "0.28.8")
21236 (source
21237 (origin
21238 (method url-fetch)
21239 (uri (pypi-uri "zeroconf" version))
21240 (sha256
21241 (base32
21242 "0narq8haa3b375vfblbyil77n8bw0wxqnanl91pl0wwwm884mqjb"))))
21243 (build-system python-build-system)
21244 (native-inputs
21245 `(("python-nose" ,python-nose)))
21246 (propagated-inputs
21247 `(("python-ifaddr" ,python-ifaddr)))
21248 (arguments
21249 `(#:phases
21250 (modify-phases %standard-phases
21251 (replace 'check
21252 (lambda _ ;; Networking isn't available for these tests.
21253 (invoke "nosetests" "-v"
21254 "--exclude" "test_integration_with_listener_ipv6"
21255 "--exclude" "test_launch_and_close_v6_only"
21256 "--exclude" "test_launch_and_close_v4_v6"
21257 "--exclude" "test_launch_and_close"))))))
21258 (home-page "https://github.com/jstasiak/python-zeroconf")
21259 (synopsis "Pure Python mDNS service discovery")
21260 (description
21261 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
21262 compatible).")
21263 (license license:lgpl2.1+)))
21264
21265 (define-public python2-zeroconf
21266 (package
21267 (name "python2-zeroconf")
21268
21269 ;; This is the last version that supports Python 2.x.
21270 (version "0.19.1")
21271 (source
21272 (origin
21273 (method url-fetch)
21274 (uri (pypi-uri "zeroconf" version))
21275 (sha256
21276 (base32
21277 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
21278 (build-system python-build-system)
21279 (arguments
21280 `(#:python ,python-2
21281 #:phases
21282 (modify-phases %standard-phases
21283 (add-after 'unpack 'patch-requires
21284 (lambda* (#:key inputs #:allow-other-keys)
21285 (substitute* "setup.py"
21286 (("enum-compat")
21287 "enum34"))
21288 #t)))))
21289 (native-inputs
21290 `(("python2-six" ,python2-six)
21291 ("python2-enum32" ,python2-enum34)
21292 ("python2-netifaces" ,python2-netifaces)
21293 ("python2-typing" ,python2-typing)))
21294 (home-page "https://github.com/jstasiak/python-zeroconf")
21295 (synopsis "Pure Python mDNS service discovery")
21296 (description
21297 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
21298 compatible).")
21299 (license license:lgpl2.1+)))
21300
21301 (define-public python-bsddb3
21302 (package
21303 (name "python-bsddb3")
21304 (version "6.2.6")
21305 (source
21306 (origin
21307 (method url-fetch)
21308 (uri (pypi-uri "bsddb3" version))
21309 (sha256
21310 (base32
21311 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
21312 (build-system python-build-system)
21313 (inputs
21314 `(("bdb" ,bdb)))
21315 (arguments
21316 '(#:phases
21317 (modify-phases %standard-phases
21318 (add-after 'unpack 'configure-locations
21319 (lambda* (#:key inputs #:allow-other-keys)
21320 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
21321 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
21322 #t))
21323 (replace 'check
21324 (lambda _
21325 (invoke "python3" "test3.py" "-v"))))))
21326 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
21327 (synopsis "Python bindings for Oracle Berkeley DB")
21328 (description
21329 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
21330 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
21331 Transaction objects, and each of these is exposed as a Python type in the
21332 bsddb3.db module. The database objects can use various access methods: btree,
21333 hash, recno, and queue. Complete support of Berkeley DB distributed
21334 transactions. Complete support for Berkeley DB Replication Manager.
21335 Complete support for Berkeley DB Base Replication. Support for RPC.")
21336 (license license:bsd-3)))
21337
21338 (define-public python-dbfread
21339 (package
21340 (name "python-dbfread")
21341 (version "2.0.7")
21342 (source (origin
21343 (method url-fetch)
21344 (uri (pypi-uri "dbfread" version))
21345 (sha256
21346 (base32
21347 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
21348 (build-system python-build-system)
21349 (native-inputs
21350 `(("python-pytest" ,python-pytest)))
21351 (home-page "https://dbfread.readthedocs.io")
21352 (synopsis "Read DBF Files with Python")
21353 (description
21354 "This library reads DBF files and returns the data as native Python data
21355 types for further processing. It is primarily intended for batch jobs and
21356 one-off scripts.")
21357 (license license:expat)))
21358
21359 (define-public python-cached-property
21360 (package
21361 (name "python-cached-property")
21362 (version "1.5.1")
21363 (source
21364 (origin
21365 (method url-fetch)
21366 (uri (pypi-uri "cached-property" version))
21367 (sha256
21368 (base32
21369 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
21370 (build-system python-build-system)
21371 (arguments
21372 `(#:phases
21373 (modify-phases %standard-phases
21374 ;; https://github.com/pydanny/cached-property/issues/131
21375 ;; recent versions of freezegun break one test
21376 (add-after 'unpack 'disable-broken-test
21377 (lambda _
21378 (substitute* "tests/test_cached_property.py"
21379 (("def test_threads_ttl_expiry\\(self\\)" m)
21380 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
21381 " " m)))
21382 #t)))))
21383 (native-inputs
21384 `(("python-freezegun" ,python-freezegun)))
21385 (home-page
21386 "https://github.com/pydanny/cached-property")
21387 (synopsis
21388 "Decorator for caching properties in classes")
21389 (description
21390 "This package provides a decorator which makes caching
21391 time-or-computationally-expensive properties quick and easy and works in Python
21392 2 or 3.")
21393 (license license:bsd-3)))
21394
21395 (define-public python-folium
21396 (package
21397 (name "python-folium")
21398 (version "0.12.1")
21399 (source
21400 (origin
21401 ;; PyPI has a ".whl" file but not a proper source release.
21402 ;; Thus, fetch code from Git.
21403 (method git-fetch)
21404 (uri (git-reference
21405 (url "https://github.com/python-visualization/folium")
21406 (commit (string-append "v" version))))
21407 (file-name (git-file-name name version))
21408 (sha256
21409 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
21410 (build-system python-build-system)
21411 (propagated-inputs
21412 `(("python-branca" ,python-branca)
21413 ("python-jinja2" ,python-jinja2)
21414 ("python-numpy" ,python-numpy)
21415 ("python-requests" ,python-requests)))
21416 (native-inputs
21417 `(("python-pytest" ,python-pytest)))
21418 (home-page "https://github.com/python-visualization/folium")
21419 (synopsis "Make beautiful maps with Leaflet.js & Python")
21420 (description "@code{folium} makes it easy to visualize data that’s been
21421 manipulated in Python on an interactive leaflet map. It enables both the
21422 binding of data to a map for @code{choropleth} visualizations as well as
21423 passing rich vector/raster/HTML visualizations as markers on the map.
21424
21425 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
21426 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
21427 supports Image, Video, GeoJSON and TopoJSON overlays.")
21428 (license license:expat)))
21429
21430 (define-public jube
21431 (package
21432 ;; This is a command-line tool, so no "python-" prefix.
21433 (name "jube")
21434 (version "2.2.2")
21435 (source (origin
21436 (method url-fetch)
21437 (uri (string-append
21438 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
21439 version))
21440 (sha256
21441 (base32
21442 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
21443 (file-name (string-append "jube-" version ".tar.gz"))))
21444 (build-system python-build-system)
21445 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
21446 (synopsis "Benchmarking environment")
21447 (description
21448 "JUBE helps perform and analyze benchmarks in a systematic way. For each
21449 benchmarked application, benchmark data is stored in a format that allows JUBE
21450 to deduct the desired information. This data can be parsed by automatic pre-
21451 and post-processing scripts that draw information and store it more densely
21452 for manual interpretation.")
21453 (license license:gpl3+)))
21454
21455 (define-public python-pyroutelib3
21456 (package
21457 (name "python-pyroutelib3")
21458 (version "1.3.post1")
21459 (source
21460 (origin
21461 (method url-fetch)
21462 (uri (pypi-uri "pyroutelib3" version))
21463 (sha256
21464 (base32
21465 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
21466 (build-system python-build-system)
21467 (propagated-inputs
21468 `(("python-dateutil" ,python-dateutil)))
21469 (home-page "https://github.com/MKuranowski/pyroutelib3")
21470 (synopsis "Library for simple routing on OSM data")
21471 (description "Library for simple routing on OSM data")
21472 (license license:gpl3+)))
21473
21474 (define-public python-bibtexparser
21475 (package
21476 (name "python-bibtexparser")
21477 (version "1.1.0")
21478 (source
21479 (origin
21480 (method url-fetch)
21481 (uri (pypi-uri "bibtexparser" version))
21482 (sha256
21483 (base32
21484 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
21485 (build-system python-build-system)
21486 (propagated-inputs
21487 `(("python-pyparsing" ,python-pyparsing)))
21488 (native-inputs
21489 `(("python-future" ,python-future)))
21490 (home-page "https://github.com/sciunto-org/python-bibtexparser")
21491 (synopsis "Python library to parse BibTeX files")
21492 (description "BibtexParser is a Python library to parse BibTeX files.")
21493 (license (list license:bsd-3 license:lgpl3))))
21494
21495 (define-public python-distro
21496 (package
21497 (name "python-distro")
21498 (version "1.4.0")
21499 (source
21500 (origin
21501 (method url-fetch)
21502 (uri (pypi-uri "distro" version))
21503 (sha256
21504 (base32
21505 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
21506 (build-system python-build-system)
21507 (native-inputs
21508 `(("python-pytest" ,python-pytest)))
21509 (home-page "https://github.com/nir0s/distro")
21510 (synopsis
21511 "OS platform information API")
21512 (description
21513 "@code{distro} provides information about the OS distribution it runs on,
21514 such as a reliable machine-readable ID, or version information.
21515
21516 It is the recommended replacement for Python's original
21517 `platform.linux_distribution` function (which will be removed in Python 3.8).
21518 @code{distro} also provides a command-line interface to output the platform
21519 information in various formats.")
21520 (license license:asl2.0)))
21521
21522 (define-public python-cairosvg
21523 (package
21524 (name "python-cairosvg")
21525 (version "2.5.0")
21526 (source
21527 (origin
21528 (method url-fetch)
21529 (uri (pypi-uri "CairoSVG" version))
21530 (sha256
21531 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
21532 (build-system python-build-system)
21533 (arguments
21534 `(#:phases
21535 (modify-phases %standard-phases
21536 (replace 'check
21537 (lambda _ (invoke "pytest"))))))
21538 (propagated-inputs
21539 `(("python-cairocffi" ,python-cairocffi)
21540 ("python-cssselect2" ,python-cssselect2)
21541 ("python-defusedxml" ,python-defusedxml)
21542 ("python-pillow" ,python-pillow)
21543 ("python-tinycss2" ,python-tinycss2)))
21544 (native-inputs
21545 `(("python-pytest-flake8" ,python-pytest-flake8)
21546 ("python-pytest-isort" ,python-pytest-isort)
21547 ("python-pytest-runner" ,python-pytest-runner)))
21548 (home-page "https://cairosvg.org/")
21549 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
21550 (description "CairoSVG is a SVG converter based on Cairo. It can export
21551 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
21552 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
21553 parsed, the result is drawn to a Cairo surface that can be exported to
21554 qvarious formats: PDF, PostScript, PNG and even SVG.")
21555 (license license:lgpl3+)))
21556
21557 (define-public python-pyphen
21558 (package
21559 (name "python-pyphen")
21560 (version "0.10.0")
21561 (source
21562 (origin
21563 (method url-fetch)
21564 (uri (pypi-uri "Pyphen" version))
21565 (sha256
21566 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
21567 (build-system python-build-system)
21568 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
21569 ;; embedded set provided by upstream - like Debian does.
21570 (home-page "https://github.com/Kozea/Pyphen")
21571 (synopsis "Pure Python module to hyphenate text")
21572 (description "Pyphen is a pure Python module to hyphenate text using
21573 existing Hunspell hyphenation dictionaries.")
21574 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
21575
21576 (define-public python-intelhex
21577 (package
21578 (name "python-intelhex")
21579 (version "2.2.1")
21580 (source
21581 (origin
21582 (method url-fetch)
21583 (uri (pypi-uri "intelhex" version))
21584 (sha256
21585 (base32
21586 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
21587 (build-system python-build-system)
21588 (arguments '(#:tests? #f)) ;issue with version
21589 (home-page "https://pypi.org/project/IntelHex/")
21590 (synopsis "Python library for Intel HEX files manipulations")
21591 (description "The Intel HEX file format is widely used in microprocessors
21592 and microcontrollers area (embedded systems etc.) as the de facto standard for
21593 representation of code to be programmed into microelectronic devices. This
21594 package provides an intelhex Python library to read, write, create from
21595 scratch and manipulate data from Intel HEX file format. It also includes
21596 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
21597 converters and more, those based on the library itself.")
21598 (license license:bsd-3)))
21599
21600 (define-public python-pykwalify
21601 (package
21602 (name "python-pykwalify")
21603 (version "1.7.0")
21604 (source
21605 (origin
21606 (method url-fetch)
21607 (uri (pypi-uri "pykwalify" version))
21608 (sha256
21609 (base32
21610 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
21611 (build-system python-build-system)
21612 (arguments '(#:tests? #f)) ;missing dependencies
21613 (propagated-inputs
21614 `(("python-dateutil" ,python-dateutil)
21615 ("python-docopt" ,python-docopt)
21616 ("python-pyyaml" ,python-pyyaml)))
21617 (home-page "https://github.com/grokzen/pykwalify")
21618 (synopsis
21619 "Python lib/cli for JSON/YAML schema validation")
21620 (description
21621 "This package provides a parser, schema validator, and data binding tool
21622 for YAML and JSON.")
21623 (license license:expat)))
21624
21625 (define-public python-dbusmock
21626 (package
21627 (name "python-dbusmock")
21628 (version "0.18.3")
21629 (source
21630 (origin
21631 (method url-fetch)
21632 (uri (pypi-uri "python-dbusmock" version))
21633 (sha256
21634 (base32
21635 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
21636 (build-system python-build-system)
21637 (arguments
21638 '(#:phases
21639 (modify-phases %standard-phases
21640 (add-after 'unpack 'patch-shell-path
21641 (lambda _
21642 (substitute* "tests/test_code.py"
21643 (("/bin/bash") (which "bash")))
21644 #t)))))
21645 (native-inputs
21646 `(;; For tests.
21647 ("dbus" ,dbus) ; for dbus-daemon
21648 ("python-nose" ,python-nose)
21649 ("which" ,which)))
21650 (propagated-inputs
21651 `(("python-dbus" ,python-dbus)
21652 ("python-pygobject" ,python-pygobject)))
21653 (home-page "https://github.com/martinpitt/python-dbusmock")
21654 (synopsis "Python library for mock D-Bus objects")
21655 (description "python-dbusmock allows for the easy creation of mock objects on
21656 D-Bus. This is useful for writing tests for software which talks to D-Bus
21657 services such as upower, systemd, logind, gnome-session or others, and it is
21658 hard (or impossible without root privileges) to set the state of the real
21659 services to what you expect in your tests.")
21660 (license license:lgpl3+)))
21661
21662 (define-public python-jsonplus
21663 (package
21664 (name "python-jsonplus")
21665 (version "0.8.0")
21666 (home-page "https://github.com/randomir/jsonplus")
21667 (source (origin
21668 (method url-fetch)
21669 (uri (pypi-uri "jsonplus" version))
21670 (sha256
21671 (base32
21672 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
21673 (build-system python-build-system)
21674 ;; XXX: No tests on PyPI, and the repository has no tags.
21675 (arguments '(#:tests? #f))
21676 (propagated-inputs
21677 `(("python-dateutil" ,python-dateutil)
21678 ("python-simplejson" ,python-simplejson)
21679 ("python-sortedcontainers" ,python-sortedcontainers)))
21680 (synopsis "Serialize Python types to/from JSON")
21681 (description
21682 "This package provides functionality to serialize arbitrary data types
21683 to and from JSON. Common data types are implemented and it is easy to
21684 register custom encoders and decoders.")
21685 (license license:expat)))
21686
21687 (define-public python-ujson
21688 (package
21689 (name "python-ujson")
21690 (version "4.0.2")
21691 (source
21692 (origin
21693 (method url-fetch)
21694 (uri (pypi-uri "ujson" version))
21695 (sha256
21696 (base32
21697 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
21698 (modules '((guix build utils)))
21699 (snippet
21700 '(begin (delete-file-recursively "deps") #t))))
21701 (build-system python-build-system)
21702 (arguments
21703 `(#:phases
21704 (modify-phases %standard-phases
21705 (add-after 'unpack 'link-to-system-double-conversion
21706 (lambda* (#:key inputs #:allow-other-keys)
21707 (let ((d-c (assoc-ref inputs "double-conversion")))
21708 (substitute* "setup.py"
21709 (("./deps/double-conversion/double-conversion\"")
21710 (string-append d-c "/include/double-conversion\""))
21711 (("-lstdc++" stdc)
21712 (string-append "-L" d-c "/lib\","
21713 " \"-ldouble-conversion\","
21714 " \"" stdc)))
21715 #t)))
21716 (replace 'check
21717 (lambda* (#:key inputs outputs #:allow-other-keys)
21718 (add-installed-pythonpath inputs outputs)
21719 (invoke "pytest"))))))
21720 (native-inputs
21721 `(("double-conversion" ,double-conversion)
21722 ("python-setuptools-scm" ,python-setuptools-scm)
21723 ("python-pytest" ,python-pytest)))
21724 (home-page "https://github.com/ultrajson/ultrajson")
21725 (synopsis "Ultra fast JSON encoder and decoder for Python")
21726 (description
21727 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
21728 bindings for Python 3.")
21729 (license license:bsd-3)))
21730
21731 (define-public python-iocapture
21732 ;; The latest release is more than a year older than this commit.
21733 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
21734 (revision "1"))
21735 (package
21736 (name "python-iocapture")
21737 (version "0.1.2")
21738 (source
21739 (origin
21740 (method git-fetch)
21741 (uri (git-reference
21742 (url "https://github.com/oinume/iocapture")
21743 (commit commit)))
21744 (file-name (git-file-name name version))
21745 (sha256
21746 (base32
21747 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
21748 (build-system python-build-system)
21749 (arguments
21750 `(#:phases
21751 (modify-phases %standard-phases
21752 (delete 'check)
21753 (add-after 'install 'check
21754 (lambda* (#:key inputs outputs #:allow-other-keys)
21755 (add-installed-pythonpath inputs outputs)
21756 (invoke "py.test" "-v" "tests")
21757 #t)))))
21758 (propagated-inputs
21759 `(("python-flexmock" ,python-flexmock)
21760 ("python-pytest" ,python-pytest)
21761 ("python-pytest-cov" ,python-pytest-cov)
21762 ("python-six" ,python-six)))
21763 (home-page "https://github.com/oinume/iocapture")
21764 (synopsis "Python capturing tool for stdout and stderr")
21765 (description
21766 "This package helps you to capture the standard out (stdout) and the
21767 standard error channel (stderr) in your program.")
21768 (license license:expat))))
21769
21770 (define-public python-argh
21771 ;; There are 21 commits since the latest release containing important
21772 ;; improvements.
21773 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
21774 (revision "1"))
21775 (package
21776 (name "python-argh")
21777 (version (git-version "0.26.2" revision commit))
21778 (source
21779 (origin
21780 (method git-fetch)
21781 (uri (git-reference
21782 (url "https://github.com/neithere/argh")
21783 (commit commit)))
21784 (file-name (git-file-name name version))
21785 (sha256
21786 (base32
21787 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
21788 (build-system python-build-system)
21789 (propagated-inputs
21790 `(("python-iocapture" ,python-iocapture)
21791 ("python-mock" ,python-mock)
21792 ("python-pytest" ,python-pytest)
21793 ("python-pytest-cov" ,python-pytest-cov)
21794 ("python-pytest-xdist" ,python-pytest-xdist)
21795 ("python-tox" ,python-tox)))
21796 (home-page "https://github.com/neithere/argh/")
21797 (synopsis "Argparse wrapper with natural syntax")
21798 (description
21799 "python-argh is a small library that provides several layers of
21800 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
21801 always possible to declare a command with the highest possible (and least
21802 flexible) layer and then tune the behaviour with any of the lower layers
21803 including the native API of @code{python-argparse}.")
21804 (license license:lgpl3+))))
21805
21806 (define-public python-ppft
21807 (package
21808 (name "python-ppft")
21809 (version "1.6.6.1")
21810 (source
21811 (origin
21812 (method url-fetch)
21813 (uri (pypi-uri "ppft" version))
21814 (sha256
21815 (base32
21816 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
21817 (build-system python-build-system)
21818 (arguments '(#:tests? #f)) ; there are none
21819 (propagated-inputs
21820 `(("python-six" ,python-six)))
21821 (home-page "https://pypi.org/project/ppft/")
21822 (synopsis "Fork of Parallel Python")
21823 (description
21824 "This package is a fork of Parallel Python. The Parallel Python
21825 module (@code{pp}) provides an easy and efficient way to create
21826 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
21827 computers and clusters. It features cross-platform portability and dynamic
21828 load balancing.")
21829 (license license:bsd-3)))
21830
21831 (define-public python-pox
21832 (package
21833 (name "python-pox")
21834 (version "0.2.7")
21835 (source
21836 (origin
21837 (method url-fetch)
21838 (uri (pypi-uri "pox" version))
21839 (sha256
21840 (base32
21841 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
21842 (build-system python-build-system)
21843 (arguments
21844 `(#:phases
21845 (modify-phases %standard-phases
21846 (replace 'check
21847 (lambda _
21848 (mkdir-p "/tmp/guix")
21849 (setenv "SHELL" "bash")
21850 (setenv "USERNAME" "guix")
21851 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
21852 (invoke "py.test" "-vv")
21853 #t)))))
21854 (native-inputs
21855 `(("python-pytest" ,python-pytest)
21856 ("which" ,which)))
21857 (home-page "https://pypi.org/project/pox/")
21858 (synopsis "Python utilities for file system exploration and automated builds")
21859 (description
21860 "Pox provides a collection of utilities for navigating and manipulating
21861 file systems. This module is designed to facilitate some of the low-level
21862 operating system interactions that are useful when exploring a file system on a
21863 remote host. Pox provides Python equivalents of several shell commands such
21864 as @command{which} and @command{find}. These commands allow automated
21865 discovery of what has been installed on an operating system, and where the
21866 essential tools are located.")
21867 (license license:bsd-3)))
21868
21869 (define-public python-pathos
21870 (package
21871 (name "python-pathos")
21872 (version "0.2.5")
21873 (source
21874 (origin
21875 (method url-fetch)
21876 (uri (pypi-uri "pathos" version))
21877 (sha256
21878 (base32
21879 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
21880 (build-system python-build-system)
21881 (arguments
21882 '(#:phases
21883 (modify-phases %standard-phases
21884 (replace 'check
21885 (lambda _
21886 (setenv "PYTHONPATH"
21887 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
21888 (invoke "python" "./tests/__main__.py"))))))
21889 (propagated-inputs
21890 `(("python-dill" ,python-dill)
21891 ("python-multiprocess" ,python-multiprocess)
21892 ("python-pox" ,python-pox)
21893 ("python-ppft" ,python-ppft)))
21894 (native-inputs
21895 `(("python-pytest" ,python-pytest)))
21896 (home-page "https://pypi.org/project/pathos/")
21897 (synopsis
21898 "Parallel graph management and execution in heterogeneous computing")
21899 (description
21900 "Python-pathos is a framework for heterogeneous computing. It provides a
21901 consistent high-level interface for configuring and launching parallel
21902 computations across heterogeneous resources. Python-pathos provides configurable
21903 launchers for parallel and distributed computing, where each launcher contains
21904 the syntactic logic to configure and launch jobs in an execution environment.")
21905 (license license:bsd-3)))
21906
21907 (define-public python-flit
21908 (package
21909 (name "python-flit")
21910 (version "3.2.0")
21911 ;; We fetch the sources via git because on pypi the package is split into
21912 ;; two parts: flit and flit_core; flit_core cannot be built without flit.
21913 (source (origin
21914 (method git-fetch)
21915 (uri (git-reference
21916 (url "https://github.com/takluyver/flit")
21917 (commit version)))
21918 (file-name (git-file-name name version))
21919 (sha256
21920 (base32
21921 "0fpqxpz5bv2xpv1akmc0c8yfss6sj09wdzxrlf3qw1lp1jhbzpyc"))))
21922 (build-system python-build-system)
21923 (arguments
21924 `(#:phases
21925 (modify-phases %standard-phases
21926 (add-before 'build 'bootstrap
21927 (lambda* (#:key inputs #:allow-other-keys)
21928 (let ((home (string-append (getcwd) "/home")))
21929 (mkdir-p home)
21930 (setenv "HOME" home))
21931 (for-each make-file-writable (find-files "."))
21932 (copy-recursively (assoc-ref inputs "python-testpath")
21933 (string-append (getcwd) "/testpath"))
21934 (substitute* "pyproject.toml"
21935 (("\"testpath\",") ""))
21936 (invoke "python" "bootstrap_dev.py")))
21937 (replace 'build
21938 (lambda _
21939 ;; A ZIP archive should be generated, but it fails with "ZIP does
21940 ;; not support timestamps before 1980". Luckily,
21941 ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
21942 ;; 1980.
21943 (setenv "SOURCE_DATE_EPOCH" "315532800")
21944 (for-each (lambda (toml)
21945 (invoke "python3" "-m" "flit"
21946 "--debug" "--ini-file" toml
21947 "build"))
21948 '("testpath/pyproject.toml"
21949 "pyproject.toml"))
21950 (with-directory-excursion "flit_core"
21951 (invoke "python" "build_dists.py"))))
21952 (replace 'install
21953 (lambda* (#:key inputs outputs #:allow-other-keys)
21954 (add-installed-pythonpath inputs outputs)
21955 (let ((out (assoc-ref outputs "out")))
21956 (delete-file-recursively "./home")
21957 (for-each (lambda (wheel)
21958 (format #true wheel)
21959 (invoke "python" "-m" "pip" "install"
21960 wheel (string-append "--prefix=" out)))
21961 (append
21962 (find-files "flit_core/dist" "\\.whl$")
21963 (find-files "dist" "\\.whl$")))))))
21964 #:tests? #f)) ; XXX: Check requires network access.
21965 (propagated-inputs
21966 `(("python-pytoml" ,python-pytoml)
21967 ("python-toml" ,python-toml)))
21968 (native-inputs
21969 `(("python-docutils" ,python-docutils)
21970 ("python-responses" ,python-responses)
21971 ("python-pygments-github-lexers" ,python-pygments-github-lexers)
21972 ("python-pytest" ,python-pytest)
21973 ("python-pytest-cov" ,python-pytest-cov)
21974 ("python-sphinx" ,python-sphinx)
21975 ("python-sphinxcontrib-github-alt" ,python-sphinxcontrib-github-alt)
21976 ;; This package needs testpath, but testpath also needs flit...
21977 ("python-testpath"
21978 ,(let ((name "python-testpath")
21979 (version "0.4.4"))
21980 (origin
21981 (method git-fetch)
21982 (uri (git-reference
21983 (url "https://github.com/jupyter/testpath")
21984 (commit version)))
21985 (file-name (git-file-name name version))
21986 (sha256
21987 (base32
21988 "1fwv4d3p54xx1x942s104irr35lszvv6jnr4nn1scsfvc0m1qmbk")))))))
21989 (home-page "https://flit.readthedocs.io/")
21990 (synopsis
21991 "Simple packaging tool for simple packages")
21992 (description
21993 "Flit is a simple way to put Python packages and modules on PyPI. Flit
21994 packages a single importable module or package at a time, using the import
21995 name as the name on PyPI. All subpackages and data files within a package
21996 are included automatically.")
21997 (license license:bsd-3)))
21998
21999 (define-public python-pathtools
22000 (package
22001 (name "python-pathtools")
22002 (version "0.1.2")
22003 (source
22004 (origin
22005 (method url-fetch)
22006 (uri (pypi-uri "pathtools" version))
22007 (sha256
22008 (base32
22009 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
22010 (build-system python-build-system)
22011 (home-page
22012 "https://github.com/gorakhargosh/pathtools")
22013 (synopsis "Path utilities for Python")
22014 (description "Pattern matching and various utilities for file systems
22015 paths.")
22016 (license license:expat)))
22017
22018 (define-public python-fastentrypoints
22019 (package
22020 (name "python-fastentrypoints")
22021 (version "0.12")
22022 (source
22023 (origin
22024 (method url-fetch)
22025 (uri (pypi-uri "fastentrypoints" version))
22026 (sha256
22027 (base32
22028 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
22029 (build-system python-build-system)
22030 (home-page
22031 "https://github.com/ninjaaron/fast-entry_points")
22032 (synopsis
22033 "Makes entry_points specified in setup.py load more quickly")
22034 (description
22035 "Using entry_points in your setup.py makes scripts that start really
22036 slowly because it imports pkg_resources. This package allows such setup
22037 scripts to load entry points more quickly.")
22038 (license license:bsd-3)))
22039
22040 (define-public python-funcparserlib
22041 (package
22042 (name "python-funcparserlib")
22043 (version "0.3.6")
22044 (source
22045 (origin
22046 (method url-fetch)
22047 (uri (pypi-uri "funcparserlib" version))
22048 (sha256
22049 (base32
22050 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
22051 (native-inputs
22052 `(("python-tox" ,python-tox)))
22053 (arguments
22054 `(#:phases
22055 (modify-phases %standard-phases
22056 (replace 'check
22057 (lambda _
22058 (invoke "tox"))))))
22059 (build-system python-build-system)
22060 (home-page
22061 "https://github.com/vlasovskikh/funcparserlib")
22062 (synopsis
22063 "Recursive descent parsing library based on functional combinators")
22064 (description
22065 "This package is a recursive descent parsing library for Python based on
22066 functional combinators. Parser combinators are just higher-order functions
22067 that take parsers as their arguments and return them as result values.")
22068 (license license:expat)))
22069
22070 (define-public python-speg
22071 (package
22072 (name "python-speg")
22073 (version "0.3")
22074 (source
22075 (origin
22076 (method url-fetch)
22077 (uri (pypi-uri "speg" version ".zip"))
22078 (sha256
22079 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
22080 (arguments
22081 `(#:tests? #f)) ;FIXME: tests fail, not sure why
22082 (native-inputs
22083 `(("unzip" ,unzip)))
22084 (build-system python-build-system)
22085 (home-page "https://github.com/avakar/speg")
22086 (synopsis "PEG-based parser interpreter with memoization")
22087 (description "This package is a PEG-based parser and interpreter with
22088 memoization.")
22089 (license license:expat)))
22090
22091 (define-public python-cson
22092 (package
22093 (name "python-cson")
22094 (version "0.8")
22095 (source
22096 (origin
22097 (method url-fetch)
22098 (uri (pypi-uri "cson" version))
22099 (sha256
22100 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
22101 (build-system python-build-system)
22102 (propagated-inputs
22103 `(("python-speg" ,python-speg)))
22104 (home-page "https://github.com/avakar/pycson")
22105 (synopsis "Parser for Coffeescript Object Notation (CSON)")
22106 (description "This package is a parser for Coffeescript Object
22107 Notation (CSON).")
22108 (license license:expat)))
22109
22110 (define-public python-asynctest
22111 (package
22112 (name "python-asynctest")
22113 (version "0.13.0")
22114 (source
22115 (origin
22116 (method url-fetch)
22117 (uri (pypi-uri "asynctest" version))
22118 (sha256
22119 (base32
22120 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
22121 (build-system python-build-system)
22122 (arguments
22123 '(#:phases
22124 (modify-phases %standard-phases
22125 (replace 'check
22126 (lambda _
22127 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
22128 (add-after 'unpack 'disable-tests
22129 (lambda* _
22130 ;; XXX: 7 tests fail out of 220. Disable them for now.
22131 (substitute* (list "test/test_selector.py"
22132 "test/test_mock.py")
22133 (("def test_events_watched_outside_test_are_ignored")
22134 "@unittest.skip('disabled by guix')
22135 def test_events_watched_outside_test_are_ignored")
22136 (("def test_awaited_from_autospec_mock.*" line)
22137 (string-append line " return True\n"))
22138 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
22139 (string-append line " return True\n"))
22140 (("def test_patch_coroutine_with_multiple_scopes.*" line)
22141 (string-append line " return True\n"))
22142 (("def test_multiple_patches_on_coroutine.*" line)
22143 (string-append line " return True\n"))
22144 (("def test_patch_coroutine_only_when_running.*" line)
22145 (string-append line " return True\n")))
22146 #t)))))
22147 (home-page "https://github.com/Martiusweb/asynctest")
22148 (synopsis "Extension of unittest for testing asyncio libraries")
22149 (description
22150 "The package asynctest is built on top of the standard unittest module
22151 and cuts down boilerplate code when testing libraries for asyncio.")
22152 (license license:asl2.0)))
22153
22154 (define-public python-aionotify
22155 (package
22156 (name "python-aionotify")
22157 (version "0.2.0")
22158 (source
22159 (origin
22160 ;; Source tarball on PyPi lacks tests
22161 (method git-fetch)
22162 (uri (git-reference
22163 (url "https://github.com/rbarrois/aionotify")
22164 (commit (string-append "v" version))))
22165 (file-name (git-file-name name version))
22166 (sha256
22167 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
22168 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
22169 (build-system python-build-system)
22170 (home-page "https://github.com/rbarrois/aionotify")
22171 (synopsis "Asyncio-powered inotify library")
22172 (description
22173 "@code{aionotify} is a simple, asyncio-based inotify library.")
22174 (license license:bsd-3)))
22175
22176 (define-public python-forbiddenfruit
22177 (package
22178 (name "python-forbiddenfruit")
22179 (version "0.1.3")
22180 (source
22181 (origin
22182 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
22183 (method git-fetch)
22184 (uri (git-reference
22185 (url "https://github.com/clarete/forbiddenfruit")
22186 (commit version)))
22187 (file-name (git-file-name name version))
22188 (sha256
22189 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
22190 (build-system python-build-system)
22191 (arguments
22192 '(#:phases
22193 (modify-phases %standard-phases
22194 (replace 'check
22195 (lambda _
22196 (invoke "make" "SKIP_DEPS=1"))))))
22197 (native-inputs
22198 `(("python-nose" ,python-nose)
22199 ("python-coverage" ,python-coverage)))
22200 (home-page "https://github.com/clarete/forbiddenfruit")
22201 (synopsis "Patch python built-in objects")
22202 (description "This project allows Python code to extend built-in types.")
22203 (license (list license:gpl3+ license:expat))))
22204
22205 (define-public python-k5test
22206 (package
22207 (name "python-k5test")
22208 (version "0.9.2")
22209 (source
22210 (origin
22211 (method url-fetch)
22212 (uri (pypi-uri "k5test" version))
22213 (sha256
22214 (base32
22215 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
22216 (build-system python-build-system)
22217 (propagated-inputs
22218 `(("python-six" ,python-six)
22219 ;; `which`, `kadmin.local` binaries called inside library
22220 ("which" ,which)
22221 ("mit-krb5" ,mit-krb5)))
22222 (native-inputs `(("mit-krb5" ,mit-krb5)))
22223 (arguments
22224 '(#:phases
22225 (modify-phases %standard-phases
22226 (add-after 'unpack 'patch-paths
22227 (lambda* _
22228 (substitute* "k5test/realm.py"
22229 (("'kadmin_local'") "'kadmin.local'")))))))
22230 (home-page "https://github.com/pythongssapi/k5test")
22231 (synopsis "Library for setting up self-contained Kerberos 5 environments")
22232 (description
22233 "@code{k5test} is a library for setting up self-contained Kerberos 5
22234 environments, and running Python unit tests inside those environments. It is
22235 based on the file of the same name found alongside the MIT Kerberos 5 unit
22236 tests.")
22237 (license license:isc)))
22238
22239 (define-public python-gssapi
22240 (package
22241 (name "python-gssapi")
22242 (version "1.6.12")
22243 (source
22244 (origin
22245 (method url-fetch)
22246 (uri (pypi-uri "gssapi" version))
22247 (sha256
22248 (base32
22249 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
22250 (build-system python-build-system)
22251 (propagated-inputs
22252 `(("python-decorator" ,python-decorator)
22253 ("python-six" ,python-six)))
22254 (inputs
22255 `(("mit-krb5" ,mit-krb5)))
22256 ;; for tests
22257 (native-inputs
22258 `(("python-parameterized" ,python-parameterized)
22259 ("python-k5test" ,python-k5test)
22260 ("python-nose" ,python-nose)))
22261 (home-page "https://github.com/pythongssapi/python-gssapi")
22262 (synopsis "Python GSSAPI Wrapper")
22263 (description
22264 "Python-GSSAPI provides both low-level and high level wrappers around the
22265 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
22266 also be usable with other GSSAPI mechanisms.")
22267 (license license:isc)))
22268
22269 (define-public python-check-manifest
22270 (package
22271 (name "python-check-manifest")
22272 (version "0.37")
22273 (source
22274 (origin
22275 (method url-fetch)
22276 (uri (pypi-uri "check-manifest" version))
22277 (sha256
22278 (base32
22279 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
22280 (build-system python-build-system)
22281 (native-inputs
22282 `(("python-mock" ,python-mock)
22283 ("git" ,git)))
22284 (home-page "https://github.com/mgedmin/check-manifest")
22285 (synopsis "Check MANIFEST.in in a Python source package for completeness")
22286 (description "Python package can include a MANIFEST.in file to help with
22287 sending package files to the Python Package Index. This package checks that
22288 file to ensure it completely and accurately describes your project.")
22289 (license license:expat)))
22290
22291 (define-public python-android-stringslib
22292 (package
22293 (name "python-android-stringslib")
22294 (version "0.1.2")
22295 (source
22296 (origin
22297 (method git-fetch)
22298 (uri (git-reference
22299 (url "https://framagit.org/tyreunom/python-android-strings-lib")
22300 (commit (string-append "v" version))))
22301 (file-name (git-file-name name version))
22302 (sha256
22303 (base32
22304 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
22305 (build-system python-build-system)
22306 (arguments
22307 `(#:tests? #f))
22308 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
22309 (synopsis "Android strings.xml support")
22310 (description "Android Strings Lib provides support for android's strings.xml
22311 files. These files are used to translate strings in android apps.")
22312 (license license:expat)))
22313
22314 (define-public python-watchdog
22315 (package
22316 (name "python-watchdog")
22317 (version "0.9.0")
22318 (source
22319 (origin
22320 (method url-fetch)
22321 (uri (pypi-uri "watchdog" version))
22322 (sha256
22323 (base32
22324 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
22325 (build-system python-build-system)
22326 (arguments
22327 `(#:phases
22328 (modify-phases %standard-phases
22329 (add-before 'check 'remove-failing
22330 (lambda _
22331 (delete-file "tests/test_inotify_buffer.py")
22332 (delete-file "tests/test_snapshot_diff.py")
22333 #t)))))
22334 (propagated-inputs
22335 `(("python-argh" ,python-argh)
22336 ("python-pathtools" ,python-pathtools)
22337 ("python-pyyaml" ,python-pyyaml)))
22338 (native-inputs
22339 `(("python-pytest-cov" ,python-pytest-cov)
22340 ("python-pytest-timeout" ,python-pytest-timeout)))
22341 (home-page "https://github.com/gorakhargosh/watchdog")
22342 (synopsis "File system events monitoring")
22343 (description "This package provides a way to monitor file system events
22344 such as a file modification and trigger an action. This is similar to inotify,
22345 but portable.")
22346 (license license:asl2.0)))
22347
22348 (define-public python-watchgod
22349 (package
22350 (name "python-watchgod")
22351 (version "0.6")
22352 (source
22353 (origin
22354 ;; There are no tests in the PyPI tarball.
22355 (method git-fetch)
22356 (uri (git-reference
22357 (url "https://github.com/samuelcolvin/watchgod")
22358 (commit (string-append "v" version))))
22359 (file-name (git-file-name name version))
22360 (sha256
22361 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
22362 (build-system python-build-system)
22363 (arguments
22364 `(#:phases
22365 (modify-phases %standard-phases
22366 (replace 'check
22367 (lambda _
22368 (invoke "pytest" "-vv"))))))
22369 (native-inputs
22370 `(("python-coverage" ,python-coverage)
22371 ("python-docutils" ,python-docutils)
22372 ("python-flake8" ,python-flake8)
22373 ("python-isort" ,python-isort)
22374 ("python-pycodestyle" ,python-pycodestyle)
22375 ("python-pyflakes" ,python-pyflakes)
22376 ("python-pygments" ,python-pygments)
22377 ("python-pytest" ,python-pytest)
22378 ("python-pytest-cov" ,python-pytest-cov)
22379 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
22380 ("python-pytest-mock" ,python-pytest-mock)
22381 ("python-pytest-sugar" ,python-pytest-sugar)
22382 ("python-pytest-toolbox" ,python-pytest-toolbox)))
22383 (home-page "https://github.com/samuelcolvin/watchgod")
22384 (synopsis "Simple, modern file watching and code reload in Python")
22385 (description
22386 "Simple, modern file watching and code reload in Python inspired by
22387 @code{watchdog}. Among the differences are a unified approach for each
22388 operating systems and an elegant approach to concurrency using threading.")
22389 (license license:expat)))
22390
22391 (define-public python-wget
22392 (package
22393 (name "python-wget")
22394 (version "3.2")
22395 (source
22396 (origin
22397 (method url-fetch)
22398 (uri (pypi-uri "wget" version ".zip"))
22399 (sha256
22400 (base32
22401 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
22402 (build-system python-build-system)
22403 (native-inputs `(("unzip" ,unzip)))
22404 (home-page "https://bitbucket.org/techtonik/python-wget/")
22405 (synopsis "Pure Python download utility")
22406 (description "The python-wget library provides an API to download files
22407 with features similar to the @command{wget} utility.")
22408 (license license:unlicense)))
22409
22410 (define-public offlate
22411 (package
22412 (name "offlate")
22413 (version "0.5")
22414 (source
22415 (origin
22416 (method git-fetch)
22417 (uri (git-reference
22418 (url "https://framagit.org/tyreunom/offlate")
22419 (commit version)))
22420 (file-name (git-file-name name version))
22421 (sha256
22422 (base32
22423 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
22424 (build-system python-build-system)
22425 (arguments
22426 ;; No tests
22427 `(#:tests? #f))
22428 (propagated-inputs
22429 `(("python-android-stringslib" ,python-android-stringslib)
22430 ("python-dateutil" ,python-dateutil)
22431 ("python-gitlab" ,python-gitlab)
22432 ("python-lxml" ,python-lxml)
22433 ("python-polib" ,python-polib)
22434 ("python-pyenchant" ,python-pyenchant)
22435 ("python-pygit2" ,python-pygit2)
22436 ("python-pygithub" ,python-pygithub)
22437 ("python-pyqt" ,python-pyqt)
22438 ("python-requests" ,python-requests)
22439 ("python-ruamel.yaml" ,python-ruamel.yaml)
22440 ("python-translation-finder" ,python-translation-finder)
22441 ("python-watchdog" ,python-watchdog)))
22442 (native-inputs
22443 `(("qttools" ,qttools)))
22444 (home-page "https://framagit.org/tyreunom/offlate")
22445 (synopsis "Offline translation interface for online translation tools")
22446 (description "Offlate offers a unified interface for different translation
22447 file formats, as well as many different online translation platforms. You can
22448 use it to get work from online platforms, specialized such as the Translation
22449 Project, or not such a gitlab instance when your upstream doesn't use any
22450 dedicated platform. The tool proposes a unified interface for any format and
22451 an upload option to send your work back to the platform.")
22452 (license license:gpl3+)))
22453
22454 (define-public python-titlecase
22455 (package
22456 (name "python-titlecase")
22457 (version "0.12.0")
22458 (source
22459 (origin
22460 (method url-fetch)
22461 (uri (pypi-uri "titlecase" version))
22462 (sha256
22463 (base32
22464 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
22465 (build-system python-build-system)
22466 (native-inputs
22467 `(("python-nose" ,python-nose)))
22468 (home-page "https://github.com/ppannuto/python-titlecase")
22469 (synopsis "Capitalize strings similar to book titles")
22470 (description
22471 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
22472 It capitalizes (predominantly English) strings in a way that is similar to
22473 book titles, using the New York Times Manual of Style to leave certain words
22474 lowercase.")
22475 (license license:expat)))
22476
22477 (define-public python-pypng
22478 (package
22479 (name "python-pypng")
22480 (version "0.0.20")
22481 (source
22482 (origin
22483 (method url-fetch)
22484 (uri (pypi-uri "pypng" version))
22485 (sha256
22486 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
22487 (build-system python-build-system)
22488 (home-page "https://github.com/drj11/pypng")
22489 (synopsis "Pure Python PNG image encoder/decoder")
22490 (description
22491 "The PyPNG module implements support for PNG images. It reads and writes
22492 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
22493 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
22494 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
22495 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
22496 A number of optional chunks can be specified (when writing) and
22497 understood (when reading): tRNS, bKGD, gAMA.
22498
22499 PyPNG is not a high level toolkit for image processing (like PIL) and does not
22500 aim at being a replacement or competitor. Its strength lies in fine-grained
22501 extensive support of PNG features. It can also read and write Netpbm PAM
22502 files, with a focus on its use as an intermediate format for implementing
22503 custom PNG processing.")
22504 (license license:expat)))
22505
22506 (define-public python-fuzzywuzzy
22507 (package
22508 (name "python-fuzzywuzzy")
22509 (version "0.18.0")
22510 (source
22511 (origin
22512 (method url-fetch)
22513 (uri (pypi-uri "fuzzywuzzy" version))
22514 (sha256
22515 (base32
22516 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
22517 (build-system python-build-system)
22518 (native-inputs
22519 `(("python-hypothesis" ,python-hypothesis)
22520 ("python-pycodestyle" ,python-pycodestyle)
22521 ("python-pytest" ,python-pytest)))
22522 (propagated-inputs
22523 `(("python-levenshtein" ,python-levenshtein)))
22524 (home-page "https://github.com/seatgeek/fuzzywuzzy")
22525 (synopsis "Fuzzy string matching in Python")
22526 (description "Approximate string matching using
22527 @emph{Levenshtein Distance} to calculate the differences between
22528 sequences.")
22529 (license license:gpl2)))
22530
22531 (define-public python2-fuzzywuzzy
22532 (package-with-python2 python-fuzzywuzzy))
22533
22534 (define-public python-block-tracing
22535 (package
22536 (name "python-block-tracing")
22537 (version "1.0.1")
22538 (source
22539 (origin
22540 (method url-fetch)
22541 (uri (pypi-uri "block_tracing" version))
22542 (sha256
22543 (base32
22544 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
22545 (build-system python-build-system)
22546 (arguments '(#:tests? #f)) ; no tests
22547 (home-page "https://github.com/rianhunter/block_tracing")
22548 (synopsis "Protect process memory")
22549 (description
22550 "@code{block_tracing} is a tiny Python library that can be used to
22551 prevent debuggers and other applications from inspecting the memory within
22552 your process.")
22553 (license license:expat)))
22554
22555 (define-public python-gcovr
22556 (package
22557 (name "python-gcovr")
22558 (version "4.2")
22559 (source
22560 (origin
22561 (method url-fetch)
22562 (uri (pypi-uri "gcovr" version))
22563 (sha256
22564 (base32
22565 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
22566 (build-system python-build-system)
22567 (propagated-inputs
22568 `(("python-lxml" ,python-lxml)
22569 ("python-jinja2" ,python-jinja2)))
22570 (home-page "https://gcovr.com/")
22571 (synopsis "Utility for generating code coverage results")
22572 (description
22573 "Gcovr provides a utility for managing the use of the GNU gcov
22574 utility and generating summarized code coverage results. It is inspired
22575 by the Python coverage.py package, which provides a similar utility for
22576 Python.")
22577 (license license:bsd-3)))
22578
22579 (define-public python-owslib
22580 (package
22581 (name "python-owslib")
22582 (version "0.19.2")
22583 (source
22584 (origin
22585 (method url-fetch)
22586 (uri (pypi-uri "OWSLib" version))
22587 (sha256
22588 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
22589 (build-system python-build-system)
22590 (arguments
22591 '(#:tests? #f)) ; TODO: package dependencies required for tests.
22592 (synopsis "Interface for Open Geospatial Consortium web service")
22593 (description
22594 "OWSLib is a Python package for client programming with Open Geospatial
22595 Consortium (OGC) web service (hence OWS) interface standards, and their related
22596 content models.")
22597 (home-page "https://geopython.github.io/OWSLib/")
22598 (license license:bsd-3)))
22599
22600 (define-public python-docusign-esign
22601 (package
22602 (name "python-docusign-esign")
22603 (version "3.1.0")
22604 (source (origin
22605 (method url-fetch)
22606 (uri (pypi-uri "docusign_esign" version))
22607 (sha256
22608 (base32
22609 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
22610 (build-system python-build-system)
22611 ;; Testing requires undocumented setup changes, and so testing is disabled here.
22612 (arguments `(#:tests? #f))
22613 (propagated-inputs
22614 `(("python-certifi" ,python-certifi)
22615 ("python-six" ,python-six)
22616 ("python-dateutil" ,python-dateutil)
22617 ("python-urllib3" ,python-urllib3)
22618 ("python-pyjwt" ,python-pyjwt)
22619 ("python-cryptography" ,python-cryptography)
22620 ("python-nose" ,python-nose)))
22621 (synopsis "DocuSign Python Client")
22622 (description "The Official DocuSign Python Client Library used to interact
22623 with the eSign REST API. Send, sign, and approve documents using this client.")
22624 (home-page "https://www.docusign.com/devcenter")
22625 (license license:expat)))
22626
22627 (define-public python-xattr
22628 (package
22629 (name "python-xattr")
22630 (version "0.9.7")
22631 (source
22632 (origin
22633 (method url-fetch)
22634 (uri (pypi-uri "xattr" version))
22635 (sha256
22636 (base32
22637 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
22638 (build-system python-build-system)
22639 (propagated-inputs
22640 `(("python-cffi" ,python-cffi)))
22641 (home-page "https://github.com/xattr/xattr")
22642 (synopsis
22643 "Python wrapper for extended file system attributes")
22644 (description "This package provides a Python wrapper for using extended
22645 file system attributes. Extended attributes extend the basic attributes of files
22646 and directories in the file system. They are stored as name:data pairs
22647 associated with file system objects (files, directories, symlinks, etc).")
22648 (license license:expat)))
22649
22650 (define-public python-json-logger
22651 (package
22652 (name "python-json-logger")
22653 (version "0.1.11")
22654 (source
22655 (origin
22656 (method url-fetch)
22657 (uri (pypi-uri "python-json-logger" version))
22658 (sha256
22659 (base32
22660 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
22661 (build-system python-build-system)
22662 (home-page
22663 "https://github.com/madzak/python-json-logger")
22664 (synopsis "JSON log formatter in Python")
22665 (description "This library allows standard Python logging to output log data
22666 as JSON objects. With JSON we can make our logs more readable by machines and
22667 we can stop writing custom parsers for syslog-type records.")
22668 (license license:bsd-3)))
22669
22670 (define-public python-daiquiri
22671 (package
22672 (name "python-daiquiri")
22673 (version "2.1.1")
22674 (source
22675 (origin
22676 (method url-fetch)
22677 (uri (pypi-uri "daiquiri" version))
22678 (sha256
22679 (base32
22680 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
22681 (build-system python-build-system)
22682 (propagated-inputs
22683 `(("python-json-logger" ,python-json-logger)))
22684 (native-inputs
22685 `(("python-mock" ,python-mock)
22686 ("python-pytest" ,python-pytest)
22687 ("python-setuptools-scm" ,python-setuptools-scm)
22688 ("python-six" ,python-six)))
22689 (home-page "https://github.com/jd/daiquiri")
22690 (synopsis
22691 "Library to configure Python logging easily")
22692 (description "The daiquiri library provides an easy way to configure
22693 logging in Python. It also provides some custom formatters and handlers.")
22694 (license license:asl2.0)))
22695
22696 (define-public python-pifpaf
22697 (package
22698 (name "python-pifpaf")
22699 (version "2.5.0")
22700 (source
22701 (origin
22702 (method url-fetch)
22703 (uri (pypi-uri "pifpaf" version))
22704 (sha256
22705 (base32
22706 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
22707 (build-system python-build-system)
22708 (arguments
22709 '(#:phases
22710 (modify-phases %standard-phases
22711 (replace 'check
22712 (lambda _
22713 (invoke "python" "setup.py" "testr" "--slowest"
22714 "--testr-args=until-failure"))))))
22715 (propagated-inputs
22716 `(("python-click" ,python-click)
22717 ("python-daiquiri" ,python-daiquiri)
22718 ("python-fixtures" ,python-fixtures)
22719 ("python-jinja2" ,python-jinja2)
22720 ("python-pbr" ,python-pbr)
22721 ("python-psutil" ,python-psutil)
22722 ("python-six" ,python-six)
22723 ("python-xattr" ,python-xattr)))
22724 (native-inputs
22725 `(("python-mock" ,python-mock)
22726 ("python-os-testr" ,python-os-testr)
22727 ("python-requests" ,python-requests)
22728 ("python-testrepository" ,python-testrepository)
22729 ("python-testtools" ,python-testtools)))
22730 (home-page "https://github.com/jd/pifpaf")
22731 (synopsis "Tools and fixtures to manage daemons for testing in Python")
22732 (description "Pifpaf is a suite of fixtures and a command-line tool that
22733 starts and stops daemons for a quick throw-away usage. This is typically
22734 useful when needing these daemons to run integration testing. It originally
22735 evolved from its precursor @code{overtest}.")
22736 (license license:asl2.0)))
22737
22738 (define-public python-pytest-check-links
22739 (package
22740 (name "python-pytest-check-links")
22741 (version "0.3.0")
22742 (source
22743 (origin
22744 (method url-fetch)
22745 ;; URI uses underscores
22746 (uri (pypi-uri "pytest_check_links" version))
22747 (sha256
22748 (base32
22749 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
22750 (build-system python-build-system)
22751 (propagated-inputs
22752 `(("python-docutils" ,python-docutils)
22753 ("python-html5lib" ,python-html5lib)
22754 ("python-nbconvert" ,python-nbconvert)
22755 ("python-nbformat" ,python-nbformat)
22756 ("python-pytest" ,python-pytest)
22757 ("python-six" ,python-six)))
22758 (native-inputs
22759 `(("python-pbr-minimal" ,python-pbr-minimal)))
22760 (home-page "https://github.com/minrk/pytest-check-links")
22761 (synopsis "Check links in files")
22762 (description "This package provides a pytest plugin that checks URLs for
22763 HTML-containing files.")
22764 (license license:bsd-3)))
22765
22766 (define-public python-json5
22767 (package
22768 (name "python-json5")
22769 (version "0.8.5")
22770 (source
22771 (origin
22772 ;; sample.json5 is missing from PyPi source tarball
22773 (method git-fetch)
22774 (uri (git-reference
22775 (url "https://github.com/dpranke/pyjson5")
22776 (commit (string-append "v" version))))
22777 (file-name (git-file-name name version))
22778 (sha256
22779 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
22780 (build-system python-build-system)
22781 (home-page "https://github.com/dpranke/pyjson5")
22782 (synopsis
22783 "Python implementation of the JSON5 data format")
22784 (description
22785 "JSON5 extends the JSON data interchange format to make it slightly more
22786 usable as a configuration language. This Python package implements parsing and
22787 dumping of JSON5 data structures.")
22788 (license license:asl2.0)))
22789
22790 (define-public python-frozendict
22791 (package
22792 (name "python-frozendict")
22793 (version "1.2")
22794 (source
22795 (origin
22796 (method url-fetch)
22797 (uri (pypi-uri "frozendict" version))
22798 (sha256
22799 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
22800 (build-system python-build-system)
22801 (home-page "https://github.com/slezica/python-frozendict")
22802 (synopsis "Simple immutable mapping for Python")
22803 (description
22804 "@dfn{frozendict} is an immutable wrapper around dictionaries that
22805 implements the complete mapping interface. It can be used as a drop-in
22806 replacement for dictionaries where immutability is desired.")
22807 (license license:expat)))
22808
22809 (define-public python-unpaddedbase64
22810 (package
22811 (name "python-unpaddedbase64")
22812 (version "1.1.0")
22813 (source
22814 (origin
22815 (method git-fetch)
22816 (uri (git-reference
22817 (url "https://github.com/matrix-org/python-unpaddedbase64")
22818 (commit (string-append "v" version))))
22819 (file-name (git-file-name name version))
22820 (sha256
22821 (base32
22822 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
22823 (build-system python-build-system)
22824 (home-page "https://pypi.org/project/unpaddedbase64/")
22825 (synopsis "Encode and decode Base64 without “=” padding")
22826 (description
22827 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
22828 using “=” characters. However this conveys no benefit so many protocols
22829 choose to use Base64 without the “=” padding.")
22830 (license license:asl2.0)))
22831
22832 (define-public python-py-cpuinfo
22833 (package
22834 (name "python-py-cpuinfo")
22835 (version "5.0.0")
22836 (source
22837 (origin
22838 (method url-fetch)
22839 (uri (pypi-uri "py-cpuinfo" version))
22840 (sha256
22841 (base32
22842 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
22843 (build-system python-build-system)
22844 (home-page "https://github.com/workhorsy/py-cpuinfo")
22845 (synopsis "Get CPU info with Python")
22846 (description
22847 "This Python module returns the CPU info by using the best sources of
22848 information for your operating system.")
22849 (license license:expat)))
22850
22851 (define-public python-canonicaljson
22852 (package
22853 (name "python-canonicaljson")
22854 (version "1.4.0")
22855 (source
22856 (origin
22857 (method url-fetch)
22858 (uri (pypi-uri "canonicaljson" version))
22859 (sha256
22860 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
22861 (build-system python-build-system)
22862 (propagated-inputs
22863 `(("python-six" ,python-six)
22864 ("python-frozendict" ,python-frozendict)
22865 ("python-simplejson" ,python-simplejson)))
22866 (home-page "https://github.com/matrix-org/python-canonicaljson")
22867 (synopsis "Canonical JSON")
22868 (description
22869 "Deterministically encode JSON.
22870
22871 @itemize
22872 @item Encodes objects and arrays as RFC 7159 JSON.
22873 @item Sorts object keys so that you get the same result each time.
22874 @item Has no insignificant whitespace to make the output as small as possible.
22875 @item Escapes only the characters that must be escaped, U+0000 to
22876 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
22877 @item Uses the shortest escape sequence for each escaped character.
22878 @item Encodes the JSON as UTF-8.
22879 @item Can encode frozendict immutable dictionaries.
22880 @end itemize")
22881 (license license:asl2.0)))
22882
22883 (define-public python-signedjson
22884 (package
22885 (name "python-signedjson")
22886 (version "1.1.1")
22887 (source
22888 (origin
22889 (method url-fetch)
22890 (uri (pypi-uri "signedjson" version))
22891 (sha256
22892 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
22893 (build-system python-build-system)
22894 (propagated-inputs
22895 `(("python-canonicaljson" ,python-canonicaljson)
22896 ("python-importlib-metadata" ,python-importlib-metadata)
22897 ("python-pynacl" ,python-pynacl)
22898 ("python-typing-extensions" ,python-typing-extensions)
22899 ("python-unpaddedbase64" ,python-unpaddedbase64)))
22900 (native-inputs
22901 `(("python-setuptools-scm" ,python-setuptools-scm)))
22902 (home-page "https://github.com/matrix-org/python-signedjson")
22903 (synopsis "Sign JSON objects with ED25519 signatures")
22904 (description
22905 "Sign JSON objects with ED25519 signatures.
22906
22907 @itemize
22908 @item More than one entity can sign the same object.
22909 @item Each entity can sign the object with more than one key making it easier to
22910 rotate keys
22911 @item ED25519 can be replaced with a different algorithm.
22912 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
22913 key.
22914 @end itemize")
22915 (license license:asl2.0)))
22916
22917 (define-public python-daemonize
22918 (package
22919 (name "python-daemonize")
22920 (version "2.5.0")
22921 (source
22922 (origin
22923 (method url-fetch)
22924 (uri (pypi-uri "daemonize" version))
22925 (sha256
22926 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
22927 (build-system python-build-system)
22928 (home-page "https://github.com/thesharp/daemonize")
22929 (synopsis "Library for writing system daemons in Python")
22930 (description "Daemonize is a library for writing system daemons in Python.")
22931 (license license:expat)))
22932
22933 (define-public python-pymacaroons
22934 (package
22935 (name "python-pymacaroons")
22936 (version "0.13.0")
22937 (source
22938 (origin
22939 (method url-fetch)
22940 (uri (pypi-uri "pymacaroons" version))
22941 (sha256
22942 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
22943 (build-system python-build-system)
22944 (propagated-inputs
22945 `(("python-six" ,python-six)
22946 ("python-pynacl" ,python-pynacl)))
22947 (home-page "https://github.com/ecordell/pymacaroons")
22948 (synopsis "Python Macaroon Library")
22949 (description
22950 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
22951 tokens, macaroons embed caveats that define specific authorization
22952 requirements for the target service, the service that issued the root macaroon
22953 and which is capable of verifying the integrity of macaroons it receives.
22954
22955 Macaroons allow for delegation and attenuation of authorization. They are
22956 simple and fast to verify, and decouple authorization policy from the
22957 enforcement of that policy.")
22958 (license license:expat)))
22959
22960 (define-public python-ldap3
22961 (package
22962 (name "python-ldap3")
22963 (version "2.7")
22964 (home-page "https://github.com/cannatag/ldap3")
22965 (source
22966 (origin
22967 (method git-fetch)
22968 (uri (git-reference (url home-page)
22969 (commit (string-append "v" version))))
22970 (file-name (git-file-name name version))
22971 (sha256
22972 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
22973 (build-system python-build-system)
22974 (arguments
22975 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
22976 #:phases (modify-phases %standard-phases
22977 (replace 'check
22978 (lambda* (#:key tests? #:allow-other-keys)
22979 (when tests?
22980 (invoke "nosetests" "-s" "test"))
22981 #t)))))
22982 (native-inputs
22983 `(("python-nose" ,python-nose)))
22984 (propagated-inputs
22985 `(("python-gssapi" ,python-gssapi)
22986 ("python-pyasn1" ,python-pyasn1)))
22987 (synopsis "Python LDAP client")
22988 (description
22989 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
22990 library.")
22991 (license license:lgpl3+)))
22992
22993 (define-public python-boltons
22994 (package
22995 (name "python-boltons")
22996 (version "20.0.0")
22997 (source
22998 (origin
22999 (method url-fetch)
23000 (uri (pypi-uri "boltons" version))
23001 (sha256
23002 (base32
23003 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
23004 (build-system python-build-system)
23005 (home-page "https://github.com/mahmoud/boltons")
23006 (synopsis "Extensions to the Python standard library")
23007 (description
23008 "Boltons is a set of over 230 pure-Python utilities in the same spirit
23009 as — and yet conspicuously missing from — the standard library, including:
23010
23011 @itemize
23012 @item Atomic file saving, bolted on with fileutils
23013 @item A highly-optimized OrderedMultiDict, in dictutils
23014 @item Two types of PriorityQueue, in queueutils
23015 @item Chunked and windowed iteration, in iterutils
23016 @item Recursive data structure iteration and merging, with iterutils.remap
23017 @item Exponential backoff functionality, including jitter, through
23018 iterutils.backoff
23019 @item A full-featured TracebackInfo type, for representing stack traces, in
23020 tbutils
23021 @end itemize")
23022 (license license:bsd-3)))
23023
23024 (define-public python-eliot
23025 (package
23026 (name "python-eliot")
23027 (version "1.12.0")
23028 (source
23029 (origin
23030 (method url-fetch)
23031 (uri (pypi-uri "eliot" version))
23032 (sha256
23033 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
23034 (build-system python-build-system)
23035 (arguments
23036 `(#:phases
23037 (modify-phases %standard-phases
23038 (add-after 'unpack 'remove-journald-support
23039 (lambda _
23040 (for-each delete-file
23041 '("eliot/tests/test_journald.py"
23042 "eliot/journald.py"))
23043 #t))
23044 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
23045 ;; remove command-line tool's tests. TODO eliot-prettyprint should
23046 ;; be installed and these tests should pass.
23047 (lambda _
23048 (delete-file "eliot/tests/test_prettyprint.py")
23049 #t)))))
23050 (propagated-inputs
23051 `(("python-boltons" ,python-boltons)
23052 ("python-pyrsistent" ,python-pyrsistent)
23053 ("python-six" ,python-six)
23054 ("python-zope-interface" ,python-zope-interface)))
23055 (native-inputs
23056 `(("python-black" ,python-black)
23057 ("python-coverage" ,python-coverage)
23058 ("python-dask" ,python-dask)
23059 ("python-flake8" ,python-flake8)
23060 ("python-hypothesis" ,python-hypothesis)
23061 ("python-pytest" ,python-pytest)
23062 ("python-setuptools" ,python-setuptools)
23063 ("python-sphinx" ,python-sphinx)
23064 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
23065 ("python-testtools" ,python-testtools)
23066 ("python-twine" ,python-twine)
23067 ("python-twisted" ,python-twisted)))
23068 (home-page "https://github.com/itamarst/eliot/")
23069 (synopsis "Eliot: the logging system that tells you why it happened")
23070 (description
23071 "@dfn{eliot} is a Python logging system that outputs causal chains of
23072 actions: actions can spawn other actions, and eventually they either succeed
23073 or fail. The resulting logs tell you the story of what your software did: what
23074 happened, and what caused it.")
23075 (license license:asl2.0)))
23076
23077 (define-public python-pem
23078 (package
23079 (name "python-pem")
23080 (version "20.1.0")
23081 (source
23082 (origin
23083 (method url-fetch)
23084 (uri (pypi-uri "pem" version))
23085 (sha256
23086 (base32
23087 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
23088 (build-system python-build-system)
23089 (native-inputs
23090 `(("python-certifi" ,python-certifi)
23091 ("python-coverage" ,python-coverage)
23092 ("python-pretend" ,python-pretend)
23093 ("python-pyopenssl" ,python-pyopenssl)
23094 ("python-pytest" ,python-pytest)
23095 ("python-sphinx" ,python-sphinx)
23096 ("python-twisted" ,python-twisted)))
23097 (home-page "https://pem.readthedocs.io/")
23098 (synopsis "Easy PEM file parsing in Python")
23099 (description
23100 "This package provides a Python module for parsing and splitting PEM files.")
23101 (license license:expat)))
23102
23103 (define-public python-txsni
23104 ;; We need a few commits on top of 0.1.9 for compatibility with newer
23105 ;; Python and OpenSSL.
23106 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
23107 (revision "0"))
23108 (package
23109 (name "python-txsni")
23110 (version (git-version "0.1.9" revision commit))
23111 (home-page "https://github.com/glyph/txsni")
23112 (source
23113 (origin
23114 (method git-fetch)
23115 (uri (git-reference (url home-page) (commit commit)))
23116 (file-name (git-file-name name version))
23117 (sha256
23118 (base32
23119 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
23120 (build-system python-build-system)
23121 (propagated-inputs
23122 `(("python-pyopenssl" ,python-pyopenssl)
23123 ("python-service-identity" ,python-service-identity)
23124 ("python-twisted" ,python-twisted)))
23125 (synopsis "Run TLS servers with Twisted")
23126 (description
23127 "This package provides an easy-to-use SNI endpoint for use
23128 with the Twisted web framework.")
23129 (license license:expat))))
23130
23131 (define-public python-txacme
23132 (package
23133 (name "python-txacme")
23134 (version "0.9.2")
23135 (source
23136 (origin
23137 (method url-fetch)
23138 (uri (pypi-uri "txacme" version))
23139 (sha256
23140 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
23141 (build-system python-build-system)
23142 (propagated-inputs
23143 `(("python-acme" ,python-acme)
23144 ("python-attrs" ,python-attrs)
23145 ("python-eliot" ,python-eliot)
23146 ("python-josepy" ,python-josepy)
23147 ("python-pem" ,python-pem)
23148 ("python-treq" ,python-treq)
23149 ("python-twisted" ,python-twisted)
23150 ("python-txsni" ,python-txsni)))
23151 (native-inputs
23152 `(("python-fixtures" ,python-fixtures)
23153 ("python-hypothesis" ,python-hypothesis)
23154 ("python-mock" ,python-mock)
23155 ("python-service-identity"
23156 ,python-service-identity)
23157 ("python-testrepository" ,python-testrepository)
23158 ("python-testscenarios" ,python-testscenarios)
23159 ("python-testtools" ,python-testtools)))
23160 (home-page "https://github.com/twisted/txacme")
23161 (synopsis "Twisted implexmentation of the ACME protocol")
23162 (description
23163 "ACME is Automatic Certificate Management Environment, a protocol that
23164 allows clients and certificate authorities to automate verification and
23165 certificate issuance. The ACME protocol is used by the free Let's Encrypt
23166 Certificate Authority.
23167
23168 txacme is an implementation of the protocol for Twisted, the event-driven
23169 networking engine for Python.")
23170 (license license:expat)))
23171
23172 (define-public python-pysaml2
23173 (package
23174 (name "python-pysaml2")
23175 (version "6.5.1")
23176 (source
23177 (origin
23178 (method url-fetch)
23179 (uri (pypi-uri "pysaml2" version))
23180 (sha256
23181 (base32
23182 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
23183 (build-system python-build-system)
23184 (propagated-inputs
23185 `(("python-cryptography" ,python-cryptography)
23186 ("python-dateutil" ,python-dateutil)
23187 ("python-defusedxml" ,python-defusedxml)
23188 ("python-importlib-resources"
23189 ,python-importlib-resources)
23190 ("python-pyopenssl" ,python-pyopenssl)
23191 ("python-pytz" ,python-pytz)
23192 ("python-requests" ,python-requests)
23193 ("python-six" ,python-six)
23194 ("python-xmlschema" ,python-xmlschema)))
23195 (home-page "https://idpy.org")
23196 (synopsis "Python implementation of SAML Version 2 Standard")
23197 (description
23198 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
23199 It contains all necessary pieces for building a SAML2 service provider or
23200 an identity provider. The distribution contains examples of both.
23201
23202 This package was originally written to work in a WSGI environment, but
23203 there are extensions that allow you to use it with other frameworks.")
23204 (license license:asl2.0)))
23205
23206 (define-public python-click-plugins
23207 (package
23208 (name "python-click-plugins")
23209 (version "1.1.1")
23210 (source
23211 (origin
23212 (method url-fetch)
23213 (uri (pypi-uri "click-plugins" version))
23214 (sha256
23215 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
23216 (build-system python-build-system)
23217 (native-inputs
23218 `(("python-pytest" ,python-pytest)))
23219 (propagated-inputs
23220 `(("python-click" ,python-click)))
23221 (synopsis "Extension for Click to register external CLI commands")
23222 (description "This package provides n extension module for Click to
23223 register external CLI commands via setuptools entry-points.")
23224 (home-page "https://github.com/click-contrib/click-plugins")
23225 (license license:bsd-3)))
23226
23227 (define-public python-diceware
23228 (package
23229 (name "python-diceware")
23230 (version "0.9.6")
23231 (source
23232 (origin
23233 (method url-fetch)
23234 (uri (pypi-uri "diceware" version))
23235 (sha256
23236 (base32
23237 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
23238 (build-system python-build-system)
23239 (native-inputs
23240 `(("python-coverage" ,python-coverage)
23241 ("python-pytest" ,python-pytest)
23242 ("python-pytest-runner" ,python-pytest-runner)))
23243 (home-page "https://github.com/ulif/diceware/")
23244 (synopsis "Generates memorable passphrases")
23245 (description "This package generates passphrases by concatenating words
23246 randomly picked from wordlists. It supports several sources of
23247 randomness (including real life dice) and different wordlists (including
23248 cryptographically signed ones).")
23249 (license license:gpl3+)))
23250
23251 (define-public python-dictdiffer
23252 (package
23253 (name "python-dictdiffer")
23254 (version "0.8.1")
23255 (source (origin
23256 (method url-fetch)
23257 (uri (pypi-uri "dictdiffer" version))
23258 (sha256
23259 (base32
23260 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
23261 (build-system python-build-system)
23262 (native-inputs
23263 `(("python-check-manifest" ,python-check-manifest)
23264 ("python-coverage" ,python-coverage)
23265 ("python-isort" ,python-isort)
23266 ("python-mock" ,python-mock)
23267 ("python-pydoctstyle" ,python-pydocstyle)
23268 ("python-pytest-cache" ,python-pytest-cache)
23269 ("python-pytest-cov" ,python-pytest-cov)
23270 ("python-pytest-pep8" ,python-pytest-pep8)
23271 ("python-pytest-runner" ,python-pytest-runner)
23272 ("python-pytest" ,python-pytest)
23273 ("python-setuptools-scm" ,python-setuptools-scm)
23274 ("python-tox" ,python-tox)))
23275 (home-page "https://github.com/inveniosoftware/dictdiffer")
23276 (synopsis "Diff and patch Python dictionary objects")
23277 (description
23278 "Dictdiffer is a Python module that helps you to diff and patch
23279 dictionaries.")
23280 (license license:expat)))
23281
23282 (define-public pyzo
23283 (package
23284 (name "pyzo")
23285 (version "4.11.2")
23286 (source
23287 (origin
23288 (method url-fetch)
23289 (uri (pypi-uri "pyzo" version))
23290 (sha256
23291 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
23292 (build-system python-build-system)
23293 (arguments
23294 `(#:phases
23295 (modify-phases %standard-phases
23296 (add-before 'check 'fix-home-directory
23297 (lambda _
23298 ;; Tests fail with "Permission denied: '/homeless-shelter'".
23299 (setenv "HOME" "/tmp")
23300 #t)))
23301 ;; Tests fail with "Uncaught Python exception: python: undefined
23302 ;; symbol: objc_getClass".
23303 #:tests? #f))
23304 (propagated-inputs
23305 `(("python-pyqt" ,python-pyqt)))
23306 (home-page "https://pyzo.org")
23307 (synopsis
23308 "Python IDE for scientific computing")
23309 (description
23310 "Pyzo is a Python IDE focused on interactivity and introspection,
23311 which makes it very suitable for scientific computing. Its practical
23312 design is aimed at simplicity and efficiency.
23313
23314 It consists of two main components, the editor and the shell, and uses
23315 a set of pluggable tools to help the programmer in various ways. Some
23316 example tools are source structure, project manager, interactive help,
23317 workspace...")
23318 (license license:bsd-2)))
23319
23320 (define-public python-osc
23321 (package
23322 (name "python-osc")
23323 (version "1.7.4")
23324 (source
23325 (origin
23326 (method url-fetch)
23327 (uri (pypi-uri "python-osc" version))
23328 (sha256
23329 (base32
23330 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
23331 (build-system python-build-system)
23332 (home-page "https://github.com/attwad/python-osc")
23333 (synopsis "Open Sound Control server and client implementations")
23334 (description
23335 "@code{python-osc} is a pure Python library with no external
23336 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
23337 Open Sound Control 1.0} specification.")
23338 (license license:unlicense)))
23339
23340 (define-public python-voluptuous
23341 (package
23342 (name "python-voluptuous")
23343 (version "0.11.7")
23344 (source
23345 (origin
23346 (method url-fetch)
23347 (uri (pypi-uri "voluptuous" version))
23348 (sha256
23349 (base32
23350 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
23351 (build-system python-build-system)
23352 (native-inputs
23353 `(("python-nose" ,python-nose)))
23354 (home-page "https://github.com/alecthomas/voluptuous")
23355 (synopsis "Python data validation library")
23356 (description
23357 "Voluptuous is a Python data validation library. It is primarily
23358 intended for validating data coming into Python as JSON, YAML, etc.")
23359 (license license:bsd-3)))
23360
23361 (define-public python-cmd2
23362 (package
23363 (name "python-cmd2")
23364 (version "1.0.2")
23365 (source
23366 (origin
23367 (method url-fetch)
23368 (uri (pypi-uri "cmd2" version))
23369 (sha256
23370 (base32
23371 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
23372 (build-system python-build-system)
23373 (propagated-inputs
23374 `(("python-attrs" ,python-attrs)
23375 ("python-colorama" ,python-colorama)
23376 ("python-pyperclip" ,python-pyperclip)
23377 ("python-wcwidth" ,python-wcwidth)))
23378 (native-inputs
23379 `(("python-codecov" ,python-codecov)
23380 ("python-coverage" ,python-coverage)
23381 ("python-doc8" ,python-doc8)
23382 ("python-flake8" ,python-flake8)
23383 ("python-invoke" ,python-invoke)
23384 ("python-mock" ,python-mock)
23385 ("python-pytest" ,python-pytest)
23386 ("python-pytest-cov" ,python-pytest-cov)
23387 ("python-pytest-mock" ,python-pytest-mock)
23388 ("python-setuptools-scm" ,python-setuptools-scm)
23389 ("python-sphinx" ,python-sphinx)
23390 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
23391 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
23392 ("python-tox" ,python-tox)
23393 ("python-twine" ,python-twine)
23394 ("which" ,which)))
23395 (home-page "https://github.com/python-cmd2/cmd2")
23396 (synopsis "Tool for building interactive command line applications")
23397 (description
23398 "Cmd2 is a tool for building interactive command line applications in
23399 Python. Its goal is to make it quick and easy for developers to build
23400 feature-rich and user-friendly interactive command line applications. It
23401 provides a simple API which is an extension of Python's built-in @code{cmd}
23402 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
23403 make your life easier and eliminates much of the boilerplate code which would
23404 be necessary when using @code{cmd}.")
23405 (license license:expat)))
23406
23407 (define-public python-pytidylib
23408 (package
23409 (name "python-pytidylib")
23410 (version "0.3.2")
23411 (source (origin
23412 (method url-fetch)
23413 (uri (pypi-uri "pytidylib" version))
23414 (sha256
23415 (base32
23416 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
23417 (build-system python-build-system)
23418 (arguments
23419 '(#:phases
23420 (modify-phases %standard-phases
23421 (add-before 'build 'qualify-libtidy
23422 (lambda* (#:key inputs #:allow-other-keys)
23423 (let ((libtidy (string-append (assoc-ref inputs "tidy")
23424 "/lib/libtidy.so")))
23425 (substitute* "tidylib/tidy.py"
23426 (("ctypes\\.util\\.find_library\\('tidy'\\)")
23427 (format #f "'~a'" libtidy)))
23428 #t))))))
23429 (inputs `(("tidy" ,tidy)))
23430 (home-page "https://github.com/countergram/pytidylib")
23431 (synopsis "Python wrapper for HTML Tidy library")
23432 (description
23433 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
23434 allows you, from Python code, to “fix” invalid (X)HTML markup.")
23435 (license license:expat)))
23436
23437 (define-public python2-pytidylib
23438 (package-with-python2 python-pytidylib))
23439
23440 (define-public python-mujson
23441 (package
23442 (name "python-mujson")
23443 (version "1.4")
23444 (source
23445 (origin
23446 (method url-fetch)
23447 (uri (pypi-uri "mujson" version))
23448 (sha256
23449 (base32
23450 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
23451 (build-system python-build-system)
23452 (home-page "https://github.com/mattgiles/mujson")
23453 (synopsis "Use the fastest JSON functions available at import time")
23454 (description "This package selects the fastest JSON functions available
23455 at import time.")
23456 (license license:expat)))
23457
23458 (define-public python-bashlex
23459 (package
23460 (name "python-bashlex")
23461 (version "0.14")
23462 (source
23463 (origin
23464 (method url-fetch)
23465 (uri (pypi-uri "bashlex" version))
23466 (sha256
23467 (base32
23468 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
23469 (build-system python-build-system)
23470 (arguments
23471 `(#:phases
23472 (modify-phases %standard-phases
23473 (add-before 'build 'pregenerate-yacc-tables
23474 (lambda _
23475 ;; parser.py caches tables, which attempts to write to site lib
23476 ;; see https://github.com/idank/bashlex/issues/51
23477 (invoke "python" "-c" "import bashlex"))))))
23478 (home-page
23479 "https://github.com/idank/bashlex")
23480 (synopsis "Python parser for bash")
23481 (description "@code{bashlex} is a Python port of the parser used
23482 internally by GNU bash.
23483
23484 For the most part it's transliterated from C, the major differences are:
23485
23486 @itemize
23487 @item it does not execute anything
23488 @item it is reentrant
23489 @item it generates a complete AST
23490 @end itemize
23491 ")
23492 (license license:gpl3+)))
23493
23494 (define-public python-jinxed
23495 (package
23496 (name "python-jinxed")
23497 (version "1.0.0")
23498 (source
23499 (origin
23500 (method url-fetch)
23501 (uri (pypi-uri "jinxed" version))
23502 (sha256
23503 (base32
23504 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
23505 (build-system python-build-system)
23506 (arguments
23507 '(#:phases
23508 (modify-phases %standard-phases
23509 (add-before 'check 'set-environment-variables
23510 (lambda* (#:key inputs #:allow-other-keys)
23511 (let ((ncurses (assoc-ref inputs "ncurses")))
23512 (setenv "TERM" "LINUX")
23513 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
23514 #t))))
23515 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
23516 (native-inputs
23517 `(("ncurses" ,ncurses)))
23518 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
23519 (synopsis "Jinxed Terminal Library")
23520 (description
23521 "Jinxed is an implementation of a subset of the Python curses library.")
23522 (license license:mpl2.0)))
23523
23524 (define-public python-blessed
23525 (package
23526 (name "python-blessed")
23527 (version "1.17.8")
23528 (source
23529 (origin
23530 (method url-fetch)
23531 (uri (pypi-uri "blessed" version))
23532 (sha256
23533 (base32
23534 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
23535 (modules '((guix build utils)))
23536 (snippet
23537 '(begin
23538 ;; Don't get hung up on Windows test failures.
23539 (delete-file "blessed/win_terminal.py") #t))))
23540 (build-system python-build-system)
23541 (propagated-inputs
23542 `(("python-jinxed" ,python-jinxed)
23543 ("python-six" ,python-six)
23544 ("python-wcwidth" ,python-wcwidth)))
23545 (native-inputs
23546 `(("python-mock" ,python-mock)
23547 ("python-pytest" ,python-pytest)))
23548 (home-page "https://github.com/jquast/blessed")
23549 (synopsis "Wrapper around terminal capabilities")
23550 (description
23551 "Blessed is a thin, practical wrapper around terminal styling, screen
23552 positioning, and keyboard input.")
23553 (license license:expat)))
23554
23555 (define-public python-readme-renderer
23556 (package
23557 (name "python-readme-renderer")
23558 (version "26.0")
23559 (source
23560 (origin
23561 (method url-fetch)
23562 (uri (pypi-uri "readme_renderer" version))
23563 (sha256
23564 (base32
23565 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
23566 (build-system python-build-system)
23567 (propagated-inputs
23568 `(("python-bleach" ,python-bleach)
23569 ("python-docutils" ,python-docutils)
23570 ("python-pygments" ,python-pygments)
23571 ("python-six" ,python-six)))
23572 (native-inputs
23573 `(("python-mock" ,python-mock)
23574 ("python-pytest" ,python-pytest)))
23575 (home-page "https://github.com/pypa/readme_renderer")
23576 (synopsis "Render README files in Warehouse")
23577 (description
23578 "Readme Renderer is a library that will safely render arbitrary README
23579 files into HTML. It is designed to be used in Warehouse to render the
23580 @code{long_description} for packages. It can handle Markdown, reStructuredText,
23581 and plain text.")
23582 (license license:asl2.0)))
23583
23584 (define-public python-lazr-delegates
23585 (package
23586 (name "python-lazr-delegates")
23587 (version "2.0.4")
23588 (source
23589 (origin
23590 (method url-fetch)
23591 (uri (pypi-uri "lazr.delegates" version))
23592 (sha256
23593 (base32
23594 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
23595 (build-system python-build-system)
23596 (arguments
23597 '(#:phases
23598 (modify-phases %standard-phases
23599 (replace 'check
23600 (lambda _
23601 (invoke "python" "setup.py" "nosetests"))))))
23602 (native-inputs
23603 `(("python-nose" ,python-nose)))
23604 (propagated-inputs
23605 `(("python-zope-interface" ,python-zope-interface)))
23606 (home-page "https://launchpad.net/lazr.delegates")
23607 (synopsis "Easily write objects that delegate behavior")
23608 (description
23609 "The @code{lazr.delegates} package makes it easy to write objects that
23610 delegate behavior to another object. The new object adds some property or
23611 behavior on to the other object, while still providing the underlying interface,
23612 and delegating behavior.")
23613 (license license:lgpl3)))
23614
23615 (define-public python-lazr-config
23616 (package
23617 (name "python-lazr-config")
23618 (version "2.2.2")
23619 (source
23620 (origin
23621 (method url-fetch)
23622 (uri (pypi-uri "lazr.config" version))
23623 (sha256
23624 (base32
23625 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
23626 (build-system python-build-system)
23627 (arguments
23628 '(#:phases
23629 (modify-phases %standard-phases
23630 (replace 'check
23631 (lambda _
23632 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
23633 (native-inputs
23634 `(("python-nose" ,python-nose)))
23635 (propagated-inputs
23636 `(("python-lazr-delegates" ,python-lazr-delegates)
23637 ("python-zope-interface" ,python-zope-interface)))
23638 (home-page "https://launchpad.net/lazr.config")
23639 (synopsis "Create configuration schemas and process and validate configurations")
23640 (description
23641 "The LAZR config system is typically used to manage process configuration.
23642 Process configuration is for saying how things change when we run systems on
23643 different machines, or under different circumstances. This system uses ini-like
23644 file format of section, keys, and values. The config file supports inheritance
23645 to minimize duplication of information across files. The format supports schema
23646 validation.")
23647 (license license:lgpl3)))
23648
23649 (define-public python-flufl-bounce
23650 (package
23651 (name "python-flufl-bounce")
23652 (version "3.0.1")
23653 (source
23654 (origin
23655 (method url-fetch)
23656 (uri (pypi-uri "flufl.bounce" version))
23657 (sha256
23658 (base32
23659 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
23660 (build-system python-build-system)
23661 (propagated-inputs
23662 `(("python-atpublic" ,python-atpublic)
23663 ("python-zope-interface" ,python-zope-interface)))
23664 (native-inputs
23665 `(("python-nose2" ,python-nose2)))
23666 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
23667 (synopsis "Email bounce detectors")
23668 (description "The @code{flufl.bounce} library provides a set of heuristics
23669 and an API for detecting the original bouncing email addresses from a bounce
23670 message. Many formats found in the wild are supported, as are VERP and
23671 RFC 3464.")
23672 (license (list license:asl2.0
23673 license:lgpl3)))) ; only for setup_headers.py
23674
23675 (define-public python-flufl-i18n
23676 (package
23677 (name "python-flufl-i18n")
23678 (version "3.0")
23679 (source
23680 (origin
23681 (method url-fetch)
23682 (uri (pypi-uri "flufl.i18n" version))
23683 (sha256
23684 (base32
23685 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
23686 (build-system python-build-system)
23687 (propagated-inputs
23688 `(("python-atpublic" ,python-atpublic)))
23689 (home-page "https://flufli18n.readthedocs.io")
23690 (synopsis "API for Python internationalization")
23691 (description
23692 "This package provides a high-level, convenient API for managing
23693 internationalization/translation contexts in Python applications. There is a
23694 simple API for single-context applications, such as command line scripts which
23695 only need to translate into one language during the entire course of their
23696 execution. There is a more flexible, but still convenient API for multi-context
23697 applications, such as servers, which may need to switch language contexts for
23698 different tasks.")
23699 (license license:asl2.0)))
23700
23701 (define-public python-flufl-lock
23702 (package
23703 (name "python-flufl-lock")
23704 (version "4.0")
23705 (source
23706 (origin
23707 (method url-fetch)
23708 (uri (pypi-uri "flufl.lock" version))
23709 (sha256
23710 (base32
23711 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
23712 (build-system python-build-system)
23713 (propagated-inputs
23714 `(("python-atpublic" ,python-atpublic)
23715 ("python-psutil" ,python-psutil)))
23716 (home-page "https://flufllock.readthedocs.io")
23717 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
23718 (description
23719 "The @dfn{flufl.lock} package provides NFS-safe file locking with
23720 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
23721 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
23722 and have a maximum lifetime built-in.")
23723 (license (list license:asl2.0
23724 license:lgpl3)))) ; only for setup_helpers.py
23725
23726 (define-public python-flufl-testing
23727 (package
23728 (name "python-flufl-testing")
23729 (version "0.8")
23730 (source
23731 (origin
23732 (method url-fetch)
23733 (uri (pypi-uri "flufl.testing" version))
23734 (sha256
23735 (base32
23736 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
23737 (build-system python-build-system)
23738 (native-inputs
23739 `(("python-nose2" ,python-nose2)))
23740 (home-page "https://gitlab.com/warsaw/flufl.testing")
23741 (synopsis "Collection of test tool plugins")
23742 (description
23743 "This package contains a small collection of test tool plugins for
23744 @code{nose2} and @code{flake8}.")
23745 (license license:asl2.0)))
23746
23747 (define-public python-devtools
23748 (package
23749 (name "python-devtools")
23750 (version "0.6")
23751 (source
23752 (origin
23753 (method git-fetch)
23754 (uri (git-reference
23755 (url "https://github.com/samuelcolvin/python-devtools")
23756 (commit (string-append "v" version))))
23757 (file-name (git-file-name name version))
23758 (sha256
23759 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
23760 (build-system python-build-system)
23761 (native-inputs
23762 `(("python-pytest" ,python-pytest)
23763 ("python-pytest-mock" ,python-pytest-mock)))
23764 (propagated-inputs
23765 `(("python-pygments" ,python-pygments)))
23766 (arguments
23767 `(#:phases (modify-phases %standard-phases
23768 (replace 'check
23769 (lambda _
23770 (invoke "pytest")
23771 #t)))))
23772 (home-page "https://github.com/samuelcolvin/python-devtools")
23773 (synopsis "Debug command and development tools")
23774 (description
23775 "This package provides a debug print command and other development tools.
23776 It adds a simple and readable way to print stuff during development.")
23777 (license license:expat)))
23778
23779 (define-public python-dateparser
23780 (package
23781 (name "python-dateparser")
23782 (version "0.7.6")
23783 (source
23784 (origin
23785 (method url-fetch)
23786 (uri (pypi-uri "dateparser" version))
23787 (sha256
23788 (base32
23789 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
23790 (build-system python-build-system)
23791 (propagated-inputs
23792 `(("python-dateutil" ,python-dateutil)
23793 ("python-pytz" ,python-pytz)
23794 ("python-regex" ,python-regex)
23795 ("python-ruamel.yaml" ,python-ruamel.yaml)
23796 ("python-tzlocal" ,python-tzlocal)))
23797 (native-inputs
23798 `(("python-mock" ,python-mock)
23799 ("python-parameterized" ,python-parameterized)
23800 ("tzdata" ,tzdata-for-tests)))
23801 (arguments
23802 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
23803 #:tests? #f
23804 #:phases
23805 (modify-phases %standard-phases
23806 (add-before 'check 'set-check-environment
23807 (lambda* (#:key inputs #:allow-other-keys)
23808 (setenv "TZ" "UTC")
23809 (setenv "TZDIR"
23810 (string-append (assoc-ref inputs "tzdata")
23811 "/share/zoneinfo"))
23812 #t)))))
23813 (home-page "https://github.com/scrapinghub/dateparser")
23814 (synopsis
23815 "Date parsing library designed to parse dates from HTML pages")
23816 (description
23817 "@code{python-dateparser} provides modules to easily parse localized
23818 dates in almost any string formats commonly found on web pages.")
23819 (license license:bsd-3)))
23820
23821 (define-public python-dparse
23822 (package
23823 (name "python-dparse")
23824 (version "0.5.1")
23825 (source
23826 (origin
23827 (method url-fetch)
23828 (uri (pypi-uri "dparse" version))
23829 (sha256
23830 (base32
23831 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
23832 (build-system python-build-system)
23833 (native-inputs
23834 `(("python-pytest" ,python-pytest)))
23835 (propagated-inputs
23836 `(("python-packaging" ,python-packaging)
23837 ("python-pyyaml" ,python-pyyaml)
23838 ("python-toml" ,python-toml)))
23839 (home-page "https://github.com/pyupio/dparse")
23840 (synopsis "Parser for Python dependency files")
23841 (description "This package provides a parser for Python dependency files.")
23842 (license license:expat)))
23843
23844 (define-public python-dpath
23845 (package
23846 (name "python-dpath")
23847 (version "2.0.1")
23848 (source
23849 (origin
23850 (method url-fetch)
23851 (uri (pypi-uri "dpath" version))
23852 (sha256
23853 (base32
23854 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
23855 (build-system python-build-system)
23856 (native-inputs
23857 `(("python-hypothesis" ,python-hypothesis)
23858 ("python-mock" ,python-mock)
23859 ("python-nose" ,python-nose)))
23860 (arguments
23861 '(#:phases
23862 (modify-phases %standard-phases
23863 (replace 'check
23864 (lambda* (#:key inputs outputs #:allow-other-keys)
23865 (add-installed-pythonpath inputs outputs)
23866 ;; This invokation is taken from tox.ini.
23867 (invoke "nosetests" "-d" "-v" "tests/"))))))
23868 (home-page "https://github.com/akesterson/dpath-python")
23869 (synopsis "File-system-like pathing and searching for dictionaries")
23870 (description
23871 "@code{python-dpath} is a library for accessing and searching
23872 dictionaries via /slashed/paths ala xpath.
23873
23874 Basically it lets you glob over a dictionary as if it were a file system. It
23875 allows you to specify globs (ala the bash eglob syntax, through some advanced
23876 fnmatch.fnmatch magic) to access dictionary elements, and provides some
23877 facility for filtering those results.")
23878 (license license:expat)))
23879
23880 (define-public python-safety
23881 (package
23882 (name "python-safety")
23883 (version "1.9.0")
23884 (source
23885 (origin
23886 (method url-fetch)
23887 (uri (pypi-uri "safety" version))
23888 (sha256
23889 (base32
23890 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
23891 (build-system python-build-system)
23892 (arguments
23893 `(#:phases
23894 (modify-phases %standard-phases
23895 (add-after 'unpack 'disable-tests
23896 (lambda _
23897 (substitute* "tests/test_safety.py"
23898 ;; requires network
23899 (("def test_check_live") "def _test_check_live"))
23900 #t)))))
23901 (propagated-inputs
23902 `(("python-click" ,python-click)
23903 ("python-dparse" ,python-dparse)
23904 ("python-packaging" ,python-packaging)
23905 ("python-requests" ,python-requests)))
23906 (home-page "https://github.com/pyupio/safety")
23907 (synopsis "Check installed dependencies for known vulnerabilities")
23908 (description "Safety checks installed dependencies for known vulnerabilities.
23909 By default it uses the open Python vulnerability database Safety DB.")
23910 (license license:expat)))
23911
23912 (define-public python-pypandoc
23913 (package
23914 (name "python-pypandoc")
23915 (version "1.5")
23916 (source
23917 (origin
23918 (method url-fetch)
23919 (uri (pypi-uri "pypandoc" version))
23920 (sha256
23921 (base32
23922 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
23923 (build-system python-build-system)
23924 (inputs
23925 `(("pandoc" ,pandoc)
23926 ("pandoc-citeproc" ,pandoc-citeproc)))
23927 (propagated-inputs
23928 `(("wheel" ,python-wheel)))
23929 (native-inputs
23930 `(("texlive" ,(texlive-union (list texlive-amsfonts
23931 texlive-fonts-ec
23932 texlive-latex-hyperref
23933 texlive-latex-oberdiek
23934 texlive-lm
23935 texlive-xcolor)))))
23936 (arguments
23937 `(#:phases
23938 (modify-phases %standard-phases
23939 (add-before 'check 'disable-tests
23940 (lambda _
23941 ;; Disable test requiring network access
23942 (substitute* "tests.py"
23943 (("test_basic_conversion_from_http_url")
23944 "skip_test_basic_conversion_from_http_url"))
23945 ;; Needed by texlive-union to generate fonts
23946 (setenv "HOME" "/tmp")
23947 #t)))))
23948 (home-page "https://github.com/bebraw/pypandoc")
23949 (synopsis "Python wrapper for pandoc")
23950 (description "pypandoc is a thin Python wrapper around pandoc
23951 and pandoc-citeproc.")
23952 (license license:expat)))
23953
23954 (define-public python-rnc2rng
23955 (package
23956 (name "python-rnc2rng")
23957 (version "2.6.4")
23958 (source
23959 (origin
23960 (method url-fetch)
23961 (uri (pypi-uri "rnc2rng" version))
23962 (sha256
23963 (base32
23964 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
23965 (build-system python-build-system)
23966 (propagated-inputs
23967 `(("python-rply" ,python-rply)))
23968 (arguments
23969 `(#:phases (modify-phases %standard-phases
23970 (replace 'check
23971 (lambda _
23972 (invoke "python" "test.py"))))))
23973 (home-page "https://github.com/djc/rnc2rng")
23974 (synopsis "Convert RELAX NG Compact to regular syntax")
23975 (description
23976 "This package provides the @command{rnc2rng} command-line tool as well as
23977 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
23978 equivalent schemata in the XML-based default RELAX NG syntax.")
23979 (license license:expat)))
23980
23981 (define-public python-telethon
23982 (package
23983 (name "python-telethon")
23984 (version "1.17.5")
23985 (source
23986 (origin
23987 (method git-fetch)
23988 (uri (git-reference
23989 (url "https://github.com/LonamiWebs/Telethon")
23990 (commit (string-append "v" version))))
23991 (file-name (git-file-name name version))
23992 (sha256
23993 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
23994 (build-system python-build-system)
23995 (arguments
23996 '(#:phases
23997 (modify-phases %standard-phases
23998 (replace 'check
23999 (lambda* (#:key tests? #:allow-other-keys)
24000 (when tests?
24001 (invoke "py.test" "-v"))
24002 #t)))))
24003 (propagated-inputs
24004 `(("python-rsa" ,python-rsa)
24005 ("python-pyaes" ,python-pyaes)))
24006 (native-inputs
24007 `(("python-pytest" ,python-pytest)
24008 ("python-pytest-asyncio" ,python-pytest-asyncio)
24009 ("python-pytest-trio" ,python-pytest-trio)))
24010 (home-page "https://docs.telethon.dev")
24011 (synopsis "Full-featured Telegram client library for Python 3")
24012 (description "This library is designed to make it easy to write Python
24013 programs that can interact with Telegram.")
24014 (license license:expat)))
24015
24016 (define-public python-citeproc-py
24017 (package
24018 (name "python-citeproc-py")
24019 (version "0.5.1")
24020 (source
24021 (origin
24022 (method url-fetch)
24023 (uri (pypi-uri "citeproc-py" version))
24024 (sha256
24025 (base32
24026 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
24027 (build-system python-build-system)
24028 (propagated-inputs
24029 `(("python-lxml" ,python-lxml)
24030 ("python-rnc2rng" ,python-rnc2rng)))
24031 (home-page
24032 "https://github.com/brechtm/citeproc-py")
24033 (synopsis "Citations and bibliography formatter")
24034 (description
24035 "Citeproc-py is a CSL processor for Python. It aims to implement the
24036 CSL 1.0.1 specification. citeproc-py can output styled citations and
24037 bibliographies in a number of different output formats. Currently supported
24038 are plain text, reStructuredText and HTML.")
24039 (license license:bsd-2)))
24040
24041 (define-public python-inform
24042 (package
24043 (name "python-inform")
24044 (version "1.23.0")
24045 (source
24046 (origin
24047 (method url-fetch)
24048 (uri (pypi-uri "inform" version))
24049 (sha256
24050 (base32
24051 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
24052 (build-system python-build-system)
24053 (arguments
24054 `(#:tests? #f)) ; PyPI tarball lacks tests
24055 (native-inputs
24056 `(("python-hypothesis" ,python-hypothesis)
24057 ("python-pytest-cov" ,python-pytest-cov)
24058 ("python-pytest-runner" ,python-pytest-runner)))
24059 (propagated-inputs
24060 `(("python-arrow" ,python-arrow)
24061 ("python-six" ,python-six)))
24062 (home-page "https://inform.readthedocs.io")
24063 (synopsis "Print & logging utilities for communicating with user")
24064 (description
24065 "Inform is designed to display messages from programs that are typically run from
24066 a console. It provides a collection of ‘print’ functions that allow you to simply and
24067 cleanly print different types of messages.")
24068 (license license:gpl3+)))
24069
24070 (define-public python-nestedtext
24071 (package
24072 (name "python-nestedtext")
24073 (version "1.0.0")
24074 (source
24075 (origin
24076 (method url-fetch)
24077 (uri (pypi-uri "nestedtext" version))
24078 (sha256
24079 (base32
24080 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
24081 (build-system python-build-system)
24082 (arguments
24083 `(#:tests? #f)) ; PyPI tarball lacks tests
24084 (propagated-inputs
24085 `(("python-inform" ,python-inform)))
24086 (home-page "https://nestedtext.org")
24087 (synopsis "Human readable and writable data interchange format")
24088 (description
24089 "NestedText is a file format for holding data that is to be entered, edited, or
24090 viewed by people. It allows data to be organized into a nested collection of
24091 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
24092 without the complexity and risk of YAML and without the syntactic clutter of JSON.
24093 NestedText is both simple and natural. Only a small number of concepts and rules must
24094 be kept in mind when creating it. It is easily created, modified, or viewed with
24095 a text editor and easily understood and used by both programmers and non-programmers.")
24096 (license license:expat))) ; MIT license
24097
24098 (define-public python-nest-asyncio
24099 (package
24100 (name "python-nest-asyncio")
24101 (version "1.5.1")
24102 (source
24103 (origin
24104 (method url-fetch)
24105 (uri (pypi-uri "nest_asyncio" version))
24106 (sha256
24107 (base32
24108 "1anha29fcijminn5bh2icnx8x7nk39lna9wkc72262i12p2s3idg"))))
24109 (build-system python-build-system)
24110 (home-page "https://github.com/erdewit/nest_asyncio")
24111 (synopsis "Patch asyncio to allow nested event loops")
24112 (description
24113 "By design @code{asyncio} does not allow its event loop to be nested.
24114 This presents a practical problem: when in an environment where the event loop
24115 is already running it's impossible to run tasks and wait for the result. This
24116 module patches @code{asyncio} to allow nested use of @code{asyncio.run} and
24117 @code{loop.run_until_complete}.")
24118 (license license:bsd-3)))
24119
24120 (define-public python-parallel
24121 (package
24122 (name "python-parallel")
24123 (version "1.6.4.4")
24124 (source
24125 (origin
24126 (method url-fetch)
24127 (uri (string-append
24128 "https://www.parallelpython.com/downloads/pp/pp-"
24129 version ".zip"))
24130 (sha256
24131 (base32
24132 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
24133 (native-inputs
24134 `(("unzip" ,unzip)))
24135 (build-system python-build-system)
24136 (arguments '(#:tests? #f)) ; No test suite.
24137 (home-page "https://www.parallelpython.com")
24138 (synopsis "Parallel and distributed programming for Python")
24139 (description "Parallel Python module (PP) provides an easy and efficient
24140 way to create parallel-enabled applications for SMP computers and clusters.
24141 PP module features cross-platform portability and dynamic load balancing.
24142 Thus applications written with PP will parallelize efficiently even on
24143 heterogeneous and multi-platform clusters (including clusters running other
24144 applications with variable CPU loads).")
24145 (license license:bsd-3)))
24146
24147 (define-public python2-parallel
24148 (package-with-python2 python-parallel))
24149
24150 (define-public python-djvulibre
24151 (package
24152 (name "python-djvulibre")
24153 (version "0.8.5")
24154 (source
24155 (origin
24156 (method url-fetch)
24157 (uri (pypi-uri "python-djvulibre" version))
24158 (sha256
24159 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
24160 (build-system python-build-system)
24161 (native-inputs
24162 `(("ghostscript" ,ghostscript)
24163 ("pkg-config" ,pkg-config)
24164 ("python-nose" ,python-nose)))
24165 (inputs
24166 `(("djvulibre" ,djvulibre)
24167 ("python-cython" ,python-cython)))
24168 (arguments
24169 `(#:phases
24170 (modify-phases %standard-phases
24171 (add-after 'unpack 'fix-tests
24172 (lambda _
24173 ;; Unit tests try to load the 'dllpath.py' and fail, because it
24174 ;; doesn't make sense on GNU/Linux.
24175 (delete-file "djvu/dllpath.py")
24176 #t)))))
24177 (synopsis "Python bindings for DjVuLibre")
24178 (description "This is a set of Python bindings for the DjVuLibre library.")
24179 (home-page "https://jwilk.net/software/python-djvulibre")
24180 (license license:gpl2)))
24181
24182 (define-public python2-djvulibre
24183 (package-with-python2 python-djvulibre))
24184
24185 (define-public python-versioneer
24186 (package
24187 (name "python-versioneer")
24188 (version "0.19")
24189 (source
24190 (origin
24191 (method url-fetch)
24192 (uri (pypi-uri "versioneer" version))
24193 (sha256
24194 (base32
24195 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
24196 (build-system python-build-system)
24197 (home-page
24198 "https://github.com/python-versioneer/python-versioneer")
24199 (synopsis
24200 "Version-string management for VCS-controlled trees")
24201 (description
24202 "@code{versioneer} is a tool for managing a recorded version number in
24203 distutils-based python projects. The goal is to remove the tedious and
24204 error-prone \"update the embedded version string\" step from your release
24205 process.")
24206 (license license:public-domain)))
24207
24208 (define-public python2-gamera
24209 (package
24210 (name "python2-gamera")
24211 (version "3.4.4")
24212 (source
24213 (origin
24214 (method url-fetch)
24215 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
24216 "gamera-" version ".tar.gz"))
24217 (sha256
24218 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
24219 (modules '((guix build utils)))
24220 (snippet
24221 '(begin
24222 ;; Remove bundled libraries.
24223 (for-each delete-file-recursively
24224 '("src/libpng-1.2.5"
24225 "src/libtiff"
24226 "src/zlib-1.2.8"))))))
24227 (build-system python-build-system)
24228 (inputs
24229 `(("libpng" ,libpng)
24230 ("libtiff" ,libtiff)
24231 ("python2-wxpython" ,python2-wxpython)
24232 ("zlib" ,zlib)))
24233 (arguments
24234 `(#:python ,python-2))
24235 (synopsis "Framework for building document analysis applications")
24236 (description
24237 "Gamera is a toolkit for building document image recognition systems.")
24238 (home-page "https://gamera.informatik.hsnr.de/")
24239 (license license:gpl2+)))
24240
24241 (define-public python-contextvars
24242 (package
24243 (name "python-contextvars")
24244 (version "2.4")
24245 (source
24246 (origin
24247 (method url-fetch)
24248 (uri (pypi-uri "contextvars" version))
24249 (sha256
24250 (base32
24251 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
24252 (build-system python-build-system)
24253 (propagated-inputs
24254 `(("python-immutables" ,python-immutables)))
24255 (home-page
24256 "https://github.com/MagicStack/contextvars")
24257 (synopsis "PEP 567 Backport")
24258 (description "This package implements a backport of Python 3.7
24259 @code{contextvars} module (see PEP 567) for Python 3.6.")
24260 (license license:asl2.0)))
24261
24262 (define-public python-aiofiles
24263 (package
24264 (name "python-aiofiles")
24265 (version "0.6.0")
24266 (source
24267 (origin
24268 (method url-fetch)
24269 (uri (pypi-uri "aiofiles" version))
24270 (sha256
24271 (base32
24272 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
24273 (build-system python-build-system)
24274 (home-page "https://github.com/Tinche/aiofiles")
24275 (synopsis "File support for @code{asyncio}")
24276 (description "@code{python-aiofiles} is a library for handling local
24277 disk files in asyncio applications.")
24278 (license license:asl2.0)))
24279
24280 (define-public python-pyre-extensions
24281 (package
24282 (name "python-pyre-extensions")
24283 (version "0.0.18")
24284 (source
24285 (origin
24286 (method url-fetch)
24287 (uri (pypi-uri "pyre-extensions" version))
24288 (sha256
24289 (base32
24290 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
24291 (build-system python-build-system)
24292 (propagated-inputs
24293 `(("python-typing-extensions"
24294 ,python-typing-extensions)
24295 ("python-typing-inspect" ,python-typing-inspect)))
24296 (home-page "https://pyre-check.org")
24297 (synopsis
24298 "Type system extensions for use with @code{python-pyre}")
24299 (description
24300 "@code{python-pyre-extensions} defines extensions to the standard
24301 @code{typing} module that are supported by the Pyre typechecker.")
24302 (license license:expat)))
24303
24304 (define-public python-dataclasses
24305 (package
24306 (name "python-dataclasses")
24307 (version "0.7")
24308 (source
24309 (origin
24310 (method url-fetch)
24311 (uri (pypi-uri "dataclasses" version))
24312 (sha256
24313 (base32
24314 "1rh8111fbws2vxyf2qy2zw3x6p6cq1jfz8pf904gig5qwg56sjj9"))))
24315 (build-system python-build-system)
24316 (home-page
24317 "https://github.com/ericvsmith/dataclasses")
24318 (synopsis
24319 "Backport of the @code{dataclasses} module for Python 3.6")
24320 (description
24321 "This is an implementation of PEP 557, Data Classes. It is a
24322 backport of the @code{dataclasses} module for Python 3.6.")
24323 (license license:asl2.0)))
24324
24325 (define-public python-pywatchman
24326 (package
24327 (name "python-pywatchman")
24328 (version "1.4.1")
24329 (source
24330 (origin
24331 (method url-fetch)
24332 (uri (pypi-uri "pywatchman" version))
24333 (sha256
24334 (base32
24335 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
24336 (build-system python-build-system)
24337 (arguments
24338 `(#:tests? #f)) ;there are none
24339 (home-page
24340 "https://facebook.github.io/watchman/")
24341 (synopsis "Watchman client for python")
24342 (description "@code{python-pywatchman} is a library to connect and
24343 query Watchman to discover file changes.")
24344 (license license:bsd-3)))
24345
24346 (define-public python-helpdev
24347 (package
24348 (name "python-helpdev")
24349 (version "0.7.1")
24350 (source
24351 (origin
24352 (method url-fetch)
24353 (uri (pypi-uri "helpdev" version))
24354 (sha256
24355 (base32
24356 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
24357 (build-system python-build-system)
24358 (arguments
24359 `(#:phases
24360 (modify-phases %standard-phases
24361 (replace 'check
24362 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
24363 (when tests?
24364 (add-installed-pythonpath inputs outputs)
24365 (invoke "pytest" "tests"))
24366 #t)))))
24367 (propagated-inputs
24368 `(("python-importlib-metadata" ,python-importlib-metadata)))
24369 (native-inputs
24370 `(("python-pytest" ,python-pytest)))
24371 (home-page "https://gitlab.com/dpizetta/helpdev")
24372 (synopsis
24373 "Extract information about the Python environment easily")
24374 (description
24375 "Helpdev is a library to easily extract information about the Python
24376 environment.")
24377 (license license:expat)))
24378
24379 (define-public python-qdarkstyle
24380 (package
24381 (name "python-qdarkstyle")
24382 (version "2.8.1")
24383 (source
24384 (origin
24385 (method url-fetch)
24386 (uri (pypi-uri "QDarkStyle" version))
24387 (sha256
24388 (base32
24389 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
24390 (build-system python-build-system)
24391 (arguments
24392 `(;; Fails unable to detect valid Qt bindings even when
24393 ;; added as native-inputs.
24394 #:tests? #f))
24395 (propagated-inputs
24396 `(("python-helpdev" ,python-helpdev)
24397 ("python-qtpy" ,python-qtpy)))
24398 (home-page
24399 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
24400 (synopsis
24401 "Complete dark stylesheet for Python and Qt applications")
24402 (description "QDarkStyle is the most complete dark stylesheet for Python and
24403 Qt applications.")
24404 (license license:expat)))
24405
24406 (define-public python-bitstring
24407 (package
24408 (name "python-bitstring")
24409 (version "3.1.7")
24410 (source
24411 (origin
24412 (method url-fetch)
24413 (uri (pypi-uri "bitstring" version))
24414 (sha256
24415 (base32
24416 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
24417 (build-system python-build-system)
24418 (arguments
24419 `(#:phases
24420 (modify-phases %standard-phases
24421 (replace 'check
24422 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
24423 (when tests?
24424 (add-installed-pythonpath inputs outputs)
24425 (with-directory-excursion "test"
24426 (invoke "pytest")))
24427 #t)))))
24428 (native-inputs
24429 `(("python-pytest" ,python-pytest)))
24430 (home-page "https://github.com/scott-griffiths/bitstring")
24431 (synopsis
24432 "Simple construction, analysis and modification of binary data")
24433 (description
24434 "Bitstring is a library for simple construction, analysis and modification
24435 of binary data.")
24436 (license license:expat)))
24437
24438 (define-public python-confuse
24439 (package
24440 (name "python-confuse")
24441 (version "1.4.0")
24442 (source
24443 (origin
24444 (method url-fetch)
24445 (uri (pypi-uri "confuse" version))
24446 (sha256
24447 (base32
24448 "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j"))))
24449 (build-system python-build-system)
24450 (propagated-inputs
24451 `(("python-pathlib" ,python-pathlib)
24452 ("python-pyyaml" ,python-pyyaml)))
24453 (home-page "https://github.com/beetbox/confuse")
24454 (synopsis "Painless YAML configuration.")
24455 (description "Confuse is a configuration library for Python that uses
24456 YAML. It takes care of defaults, overrides, type checking, command-line
24457 integration, human-readable errors, and standard OS-specific locations.")
24458 (license license:expat)))
24459
24460 (define-public python-reflink
24461 (package
24462 (name "python-reflink")
24463 (version "0.2.1")
24464 (source
24465 (origin
24466 (method url-fetch)
24467 (uri (pypi-uri "reflink" version))
24468 (sha256
24469 (base32
24470 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
24471 (build-system python-build-system)
24472 (arguments
24473 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
24474 (propagated-inputs
24475 `(("python-cffi" ,python-cffi)))
24476 (native-inputs
24477 `(("python-pytest" ,python-pytest)
24478 ("python-pytest-runner" ,python-pytest-runner)))
24479 (home-page "https://gitlab.com/rubdos/pyreflink")
24480 (synopsis "Python wrapper around reflink system call")
24481 (description
24482 "Python reflink wraps around platform specific @code{reflink}
24483 implementations.")
24484 (license license:expat)))
24485
24486 (define-public python-pivy
24487 (package
24488 (name "python-pivy")
24489 (version "0.6.5")
24490 (source
24491 (origin
24492 (method git-fetch)
24493 (uri (git-reference
24494 (url "https://github.com/coin3d/pivy")
24495 (commit version)))
24496 (file-name (git-file-name name version))
24497 (sha256
24498 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
24499 (build-system python-build-system)
24500 (arguments
24501 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
24502 #:tests? #f
24503 #:phases
24504 (modify-phases %standard-phases
24505 (add-after 'unpack 'patch-cmake-include-dirs
24506 (lambda _
24507 ;; Patch buildsystem to respect Coin3D include directory
24508 (substitute* "CMakeLists.txt"
24509 (("\\$\\{SoQt_INCLUDE_DIRS}")
24510 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
24511 #t)))))
24512 (native-inputs
24513 `(("cmake" ,cmake)
24514 ("swig" ,swig)))
24515 (inputs
24516 `(("python-wrapper" ,python-wrapper)
24517 ("qtbase" ,qtbase)
24518 ("libxi" ,libxi)
24519 ("libice" ,libice)
24520 ("soqt" ,soqt)
24521 ("glew" ,glew)
24522 ("coin3D" ,coin3D-4)))
24523 (home-page "https://github.com/coin3d/pivy")
24524 (synopsis "Python bindings to Coin3D")
24525 (description
24526 "Pivy provides python bindings for Coin, a 3D graphics library with an
24527 Application Programming Interface based on the Open Inventor 2.1 API.")
24528 (license license:isc)))
24529
24530 (define-public python-crayons
24531 (package
24532 (name "python-crayons")
24533 (version "0.4.0")
24534 (source
24535 (origin
24536 (method url-fetch)
24537 (uri (pypi-uri "crayons" version))
24538 (sha256
24539 (base32
24540 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
24541 (build-system python-build-system)
24542 (propagated-inputs
24543 `(("python-colorama" ,python-colorama)))
24544 (home-page "https://github.com/MasterOdin/crayons")
24545 (synopsis "TextUI colors for Python")
24546 (description "This package gives you colored strings for the terminal.
24547 Crayons automatically wraps a given string in the foreground color and
24548 restores the original state after the string is printed.")
24549 (license license:expat)))
24550
24551 (define-public python-sane
24552 (package
24553 (name "python-sane")
24554 (version "2.9.1")
24555 (source
24556 (origin
24557 (method url-fetch)
24558 (uri (pypi-uri name version))
24559 (sha256
24560 (base32
24561 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
24562 (build-system python-build-system)
24563 (native-inputs
24564 `(("python-pytest" ,python-pytest)))
24565 (inputs
24566 `(("sane-backends" ,sane-backends)))
24567 (home-page "https://github.com/python-pillow/Sane")
24568 (synopsis "Python interface to the SANE scanner")
24569 (description "This package provides Python interface to the SANE scanner
24570 and frame grabber interface.")
24571 (license (license:non-copyleft
24572 ;; Yet another variant of the X/MIT license.
24573 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
24574
24575 (define-public python-screenkey
24576 (package
24577 (name "python-screenkey")
24578 (version "1.4")
24579 (source
24580 (origin
24581 (method git-fetch)
24582 (uri (git-reference
24583 (url "https://gitlab.com/screenkey/screenkey")
24584 (commit (string-append "v" version))))
24585 (file-name (git-file-name name version))
24586 (sha256
24587 (base32
24588 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
24589 (build-system python-build-system)
24590 (arguments
24591 `(#:phases
24592 (modify-phases %standard-phases
24593 (add-after 'unpack 'fix-dlopen-paths
24594 (lambda* (#:key inputs outputs #:allow-other-keys)
24595 (let* ((x11 (assoc-ref inputs "libx11"))
24596 (xtst (assoc-ref inputs "libxtst")))
24597 (substitute* "Screenkey/xlib.py"
24598 (("libX11.so.6")
24599 (string-append x11 "/lib/libX11.so.6")))
24600 (substitute* "Screenkey/xlib.py"
24601 (("libXtst.so.6")
24602 (string-append xtst "/lib/libXtst.so.6")))
24603 #t)))
24604 (add-after 'install 'wrap-screenkey
24605 (lambda* (#:key outputs #:allow-other-keys)
24606 (wrap-program
24607 (string-append (assoc-ref outputs "out") "/bin/screenkey")
24608 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
24609 `("GI_TYPELIB_PATH"
24610 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
24611 #t)))))
24612 (inputs
24613 `(("python-distutils-extra" ,python-distutils-extra)
24614 ("python-tokenize-rt" ,python-tokenize-rt)
24615 ("libx11" ,libx11)
24616 ("libxtst" ,libxtst)
24617 ("gtk+" ,gtk+)
24618 ("python-pygobject" ,python-pygobject)
24619 ("python-pycairo" ,python-pycairo)
24620 ("python-setuptools-git" ,python-setuptools-git)
24621 ("python-babel" ,python-babel)))
24622 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
24623 (synopsis
24624 "Screencast tool to display pressed keys")
24625 (description
24626 "A screencast tool to display your keys inspired by Screenflick.")
24627 (license license:gpl3+)))
24628
24629 (define-public python-jinja2-cli
24630 (package
24631 (name "python-jinja2-cli")
24632 (version "0.7.0")
24633 (source
24634 (origin
24635 (method url-fetch)
24636 (uri (pypi-uri "jinja2-cli" version))
24637 (sha256
24638 (base32
24639 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
24640 (build-system python-build-system)
24641 (propagated-inputs
24642 `(("python-jinja2" ,python-jinja2)))
24643 (native-inputs
24644 `(("python-flake8" ,python-flake8)
24645 ("python-jinja2" ,python-jinja2)
24646 ("python-pytest" ,python-pytest)))
24647 (home-page "https://github.com/mattrobenolt/jinja2-cli")
24648 (synopsis "Command-line interface to Jinja2")
24649 (description
24650 "This package provides a command-line interface (CLI) to the Jinja2
24651 template engine.")
24652 (license license:bsd-3)))
24653
24654 (define-public python-readability
24655 (package
24656 (name "python-readability")
24657 (version "0.3.1")
24658 (source
24659 (origin
24660 (method url-fetch)
24661 (uri (pypi-uri "readability" version))
24662 (sha256
24663 (base32
24664 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
24665 (build-system python-build-system)
24666 (home-page
24667 "https://github.com/andreasvc/readability/")
24668 (synopsis
24669 "Measure the readability of a given text using surface
24670 characteristics")
24671 (description
24672 "This package provides a Python library that is an implementation of
24673 traditional readability measures based on simple surface
24674 characteristics. These measures are basically linear regressions based on the
24675 number of words, syllables, and sentences.")
24676 (license license:asl2.0)))
24677
24678 (define-public python-listparser
24679 (package
24680 (name "python-listparser")
24681 (version "0.18")
24682 (source
24683 (origin
24684 (method url-fetch)
24685 (uri (pypi-uri "listparser" version))
24686 (sha256
24687 (base32
24688 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
24689 (build-system python-build-system)
24690 (home-page
24691 "https://github.com/kurtmckee/listparser")
24692 (synopsis
24693 "Parse subscription lists in Python")
24694 (description
24695 "This package provides a Python library that can parse OPML, FOAF, and
24696 iGoogle subscription lists.")
24697 (license license:expat)))
24698
24699 (define-public python-smartypants
24700 (package
24701 (name "python-smartypants")
24702 (version "2.0.1")
24703 (source
24704 (origin
24705 ;; There's no source tarball for 2.0.1 on PyPI.
24706 (method git-fetch)
24707 (uri (git-reference
24708 (url "https://github.com/leohemsted/smartypants.py")
24709 (commit (string-append "v" version))))
24710 (file-name (git-file-name name version))
24711 (sha256
24712 (base32 "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"))))
24713 (build-system python-build-system)
24714 (arguments
24715 '(#:phases
24716 (modify-phases %standard-phases
24717 (replace 'check
24718 ;; Its `setup.py test` doesn't report failure with exit status, so
24719 ;; we use `nose` instead.
24720 (lambda _
24721 (invoke "nosetests" "-v" "--exclude=^load_tests$"))))))
24722 (native-inputs
24723 ;; For tests.
24724 `(("python-docutils" ,python-docutils)
24725 ("python-nose" ,python-nose)
24726 ("python-pygments" ,python-pygments)))
24727 (home-page "https://github.com/leohemsted/smartypants.py")
24728 (synopsis "Translate punctuation characters into smart quotes")
24729 (description
24730 "@command{smartpants} can perform the following transformations:
24731 @enumerate
24732 @item Straight quotes ( \" and ' ) into \"curly\" quote HTML entities
24733 @item Backticks-style quotes (``like this'') into \"curly\" quote HTML
24734 entities
24735 @item Dashes (-- and ---) into en- and em-dash entities
24736 @item Three consecutive dots (... or . . .) into an ellipsis entity
24737 @end enumerate")
24738 (license license:bsd-3)))
24739
24740 (define-public python-typogrify
24741 (package
24742 (name "python-typogrify")
24743 (version "2.0.7")
24744 (source (origin
24745 (method url-fetch)
24746 (uri (pypi-uri "typogrify" version))
24747 (sha256
24748 (base32
24749 "0f6b2gnnxjbx1fbmkcscc6qjr4hi78kwm1wx4b766ha3va66dr4b"))))
24750 (build-system python-build-system)
24751 (arguments
24752 '(#:phases
24753 (modify-phases %standard-phases
24754 (replace 'check
24755 (lambda _
24756 (invoke "nosetests" "-v"))))))
24757 (propagated-inputs
24758 `(("python-smartypants" ,python-smartypants)))
24759 (native-inputs
24760 ;; For tests.
24761 `(("python-nose" ,python-nose)))
24762 (home-page "https://github.com/mintchaos/typogrify")
24763 (synopsis "Filters to transform text into typographically-improved HTML")
24764 (description
24765 "@code{typogrify} provides a set of custom filters that automatically
24766 apply various transformations to plain text in order to yield
24767 typographically-improved HTML. While often used in conjunction with Jinja and
24768 Django template systems, the filters can be used in any environment.")
24769 (license license:bsd-3)))
24770
24771 (define-public python-ld
24772 (package
24773 (name "python-ld")
24774 (version "0.5.0")
24775 (source
24776 (origin
24777 (method url-fetch)
24778 (uri (pypi-uri "ld" version))
24779 (sha256
24780 (base32
24781 "1k4ydp5rgkv4985v459kcl06i1igjm1ywvh2vkbi9ck1zyyri1z5"))))
24782 (build-system python-build-system)
24783 (propagated-inputs
24784 `(("python-six" ,python-six)))
24785 (home-page "https://github.com/nir0s/ld")
24786 (synopsis "OS platform information API")
24787 (description
24788 "The ld package provides information about the GNU/Linux distribution it
24789 runs on, such as a reliable machine-readable ID, or version information.")
24790 (license license:asl2.0)))
24791
24792 (define-public python-quicktions
24793 (package
24794 (name "python-quicktions")
24795 (version "1.11")
24796 (source
24797 (origin
24798 (method url-fetch)
24799 (uri (pypi-uri "quicktions" version))
24800 (sha256
24801 (base32
24802 "1px21a6x527i1bsr2p6bbf3jziqpvd1vjkvvzh13gsy4iip0yvzn"))
24803 (modules '((guix build utils)))
24804 (snippet
24805 '(begin
24806 ;; This file is generated by Cython.
24807 (delete-file "src/quicktions.c") #t))))
24808 (build-system python-build-system)
24809 (arguments
24810 `(#:phases
24811 (modify-phases %standard-phases
24812 (add-before 'build 'cythonize-sources
24813 (lambda _
24814 (with-directory-excursion "src"
24815 (invoke "cython" "quicktions.pyx"))))
24816 (replace 'check
24817 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
24818 (when tests?
24819 (add-installed-pythonpath inputs outputs)
24820 (invoke "pytest"))
24821 #t)))))
24822 (native-inputs
24823 `(("python-cython" ,python-cython)
24824 ("python-pytest" ,python-pytest)))
24825 (home-page "https://github.com/scoder/quicktions")
24826 (synopsis "Fast fractions data type for rational numbers")
24827 (description
24828 "This package provides fast fractions data type for rational numbers. It
24829 is the cythonized version of @code{fractions.Fraction}.")
24830 (license license:psfl)))
24831
24832 (define-public python-pathvalidate
24833 (package
24834 (name "python-pathvalidate")
24835 (version "2.4.1")
24836 (source
24837 (origin
24838 (method url-fetch)
24839 (uri (pypi-uri "pathvalidate" version))
24840 (sha256
24841 (base32 "0s14ycjgb44lxr2wg8lrq3b7kybmmrbf7yqz47xrqgn2gr6dk6rw"))))
24842 (build-system python-build-system)
24843 (arguments
24844 '(#:tests? #f))
24845 ;; Tests disabled because of circular dependencies.
24846 ;; pathvalidate tests depend on pytest-md-report, which
24847 ;; depends on pathvalidate.
24848 (native-inputs
24849 `(("python-allpairspy" ,python-allpairspy)
24850 ("python-click" ,python-click)
24851 ("python-faker" ,python-faker)
24852 ("python-pytest" ,python-pytest)))
24853 (home-page "https://github.com/thombashi/pathvalidate")
24854 (synopsis "Sanitize strings representing paths")
24855 (description
24856 "@code{pathvalidate} is a Python library to sanitize/validate strings
24857 representing paths or filenames.")
24858 (license license:expat)))