gnu: python-pikepdf: Update to 2.8.0.post2.
[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 Eric Bavier <bavier@member.fsf.org>
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 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
32 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
33 ;;; Copyright © 2016, 2017, 2018, 2020, 2021 Julien Lepiller <julien@lepiller.eu>
34 ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
35 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
36 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
37 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
38 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
39 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
40 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
41 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
42 ;;; Copyright © 2017, 2020 Roel Janssen <roel@gnu.org>
43 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
45 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
46 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
47 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
48 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
49 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
50 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
51 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
52 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
53 ;;; Copyright © 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
54 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
55 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
56 ;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
57 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
58 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
59 ;;; Copyright © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
60 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
72 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
73 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
74 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
75 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
76 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
77 ;;; Copyright © 2020, 2021 Alexandros Theodotou <alex@zrythm.org>
78 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
79 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
80 ;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
81 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
82 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
83 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
84 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
85 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
86 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
87 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
88 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
89 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
90 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
91 ;;; Copyright © 2020 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.com>
92 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
93 ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
94 ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
95 ;;; Copyright © 2019 Kristian Trandem <kristian@devup.no>
96 ;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com>
97 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
98 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
99 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
100 ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
101 ;;;
102 ;;; This file is part of GNU Guix.
103 ;;;
104 ;;; GNU Guix is free software; you can redistribute it and/or modify it
105 ;;; under the terms of the GNU General Public License as published by
106 ;;; the Free Software Foundation; either version 3 of the License, or (at
107 ;;; your option) any later version.
108 ;;;
109 ;;; GNU Guix is distributed in the hope that it will be useful, but
110 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
111 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
112 ;;; GNU General Public License for more details.
113 ;;;
114 ;;; You should have received a copy of the GNU General Public License
115 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
116
117 (define-module (gnu packages python-xyz)
118 #:use-module ((guix licenses) #:prefix license:)
119 #:use-module (gnu packages)
120 #:use-module (gnu packages algebra)
121 #:use-module (gnu packages adns)
122 #:use-module (gnu packages aidc)
123 #:use-module (gnu packages attr)
124 #:use-module (gnu packages backup)
125 #:use-module (gnu packages bash)
126 #:use-module (gnu packages check)
127 #:use-module (gnu packages cmake)
128 #:use-module (gnu packages compression)
129 #:use-module (gnu packages crypto)
130 #:use-module (gnu packages databases)
131 #:use-module (gnu packages dbm)
132 #:use-module (gnu packages djvu)
133 #:use-module (gnu packages docker)
134 #:use-module (gnu packages enchant)
135 #:use-module (gnu packages file)
136 #:use-module (gnu packages fontutils)
137 #:use-module (gnu packages gcc)
138 #:use-module (gnu packages geo)
139 #:use-module (gnu packages ghostscript)
140 #:use-module (gnu packages gl)
141 #:use-module (gnu packages glib)
142 #:use-module (gnu packages gnome)
143 #:use-module (gnu packages gnupg)
144 #:use-module (gnu packages graphviz)
145 #:use-module (gnu packages graphics)
146 #:use-module (gnu packages gsasl)
147 #:use-module (gnu packages gstreamer)
148 #:use-module (gnu packages gtk)
149 #:use-module (gnu packages haskell-xyz)
150 #:use-module (gnu packages icu4c)
151 #:use-module (gnu packages image)
152 #:use-module (gnu packages imagemagick)
153 #:use-module (gnu packages kerberos)
154 #:use-module (gnu packages libevent)
155 #:use-module (gnu packages libffi)
156 #:use-module (gnu packages libidn)
157 #:use-module (gnu packages linux)
158 #:use-module (gnu packages llvm)
159 #:use-module (gnu packages man)
160 #:use-module (gnu packages markup)
161 #:use-module (gnu packages maths)
162 #:use-module (gnu packages monitoring)
163 #:use-module (gnu packages multiprecision)
164 #:use-module (gnu packages networking)
165 #:use-module (gnu packages ncurses)
166 #:use-module (gnu packages openstack)
167 #:use-module (gnu packages pcre)
168 #:use-module (gnu packages pdf)
169 #:use-module (gnu packages perl)
170 #:use-module (gnu packages photo)
171 #:use-module (gnu packages pkg-config)
172 #:use-module (gnu packages python)
173 #:use-module (gnu packages python-build)
174 #:use-module (gnu packages python-check)
175 #:use-module (gnu packages python-compression)
176 #:use-module (gnu packages python-crypto)
177 #:use-module (gnu packages python-science)
178 #:use-module (gnu packages python-web)
179 #:use-module (gnu packages qt)
180 #:use-module (gnu packages rdf)
181 #:use-module (gnu packages readline)
182 #:use-module (gnu packages sdl)
183 #:use-module (gnu packages search)
184 #:use-module (gnu packages scanner)
185 #:use-module (gnu packages shells)
186 #:use-module (gnu packages sphinx)
187 #:use-module (gnu packages ssh)
188 #:use-module (gnu packages swig)
189 #:use-module (gnu packages terminals)
190 #:use-module (gnu packages tex)
191 #:use-module (gnu packages texinfo)
192 #:use-module (gnu packages textutils)
193 #:use-module (gnu packages time)
194 #:use-module (gnu packages tls)
195 #:use-module (gnu packages version-control)
196 #:use-module (gnu packages video)
197 #:use-module (gnu packages web)
198 #:use-module (gnu packages wxwidgets)
199 #:use-module (gnu packages base)
200 #:use-module (gnu packages xml)
201 #:use-module (gnu packages xorg)
202 #:use-module (gnu packages xdisorg)
203 #:use-module (gnu packages tcl)
204 #:use-module (gnu packages bdw-gc)
205 #:use-module (gnu packages serialization)
206 #:use-module (guix packages)
207 #:use-module (guix download)
208 #:use-module (guix git-download)
209 #:use-module (guix hg-download)
210 #:use-module (guix utils)
211 #:use-module (guix build-system gnu)
212 #:use-module (guix build-system cmake)
213 #:use-module (guix build-system python)
214 #:use-module (guix build-system trivial)
215 #:use-module (srfi srfi-1)
216 #:use-module (srfi srfi-26))
217
218 (define-public python-slixmpp
219 (package
220 (name "python-slixmpp")
221 (version "1.5.2")
222 (source
223 (origin
224 (method git-fetch)
225 (uri
226 (git-reference
227 (url "https://lab.louiz.org/poezio/slixmpp.git")
228 (commit
229 (string-append "slix-" version))))
230 (file-name
231 (git-file-name name version))
232 (sha256
233 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
234 (build-system python-build-system)
235 (arguments
236 `(#:phases
237 (modify-phases %standard-phases
238 (add-after 'unpack 'patch
239 (lambda _
240 (substitute* "setup.py"
241 (("'CC', 'cc'")
242 "'CC', 'gcc'"))
243 #t)))))
244 (native-inputs
245 `(("cython" ,python-cython)
246 ("gnupg" ,gnupg)
247 ("pkg-config" ,pkg-config)))
248 (propagated-inputs
249 `(("python-aiodns" ,python-aiodns)
250 ("python-aiohttp" ,python-aiohttp)
251 ("python-pyasn1" ,python-pyasn1)
252 ("python-pyasn1-modules" ,python-pyasn1-modules)))
253 (inputs
254 `(("libidn" ,libidn)
255 ("python" ,python))) ; We are building a Python extension.
256 (synopsis "XMPP library without threads")
257 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
258 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
259 socket handling, the timers, the events dispatching) in order to remove all
260 threads.")
261 (home-page "https://lab.louiz.org/poezio/slixmpp")
262 (license license:expat)))
263
264 (define-public python-tenacity
265 (package
266 (name "python-tenacity")
267 (version "6.1.0")
268 (source (origin
269 (method url-fetch)
270 (uri (pypi-uri "tenacity" version))
271 (sha256
272 (base32
273 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
274 (build-system python-build-system)
275 (native-inputs
276 `(("python-setuptools-scm" ,python-setuptools-scm)
277 ("python-sphinx" ,python-sphinx)
278 ("python-tornado" ,python-tornado)
279 ("python-pytest" ,python-pytest)))
280 (propagated-inputs
281 `(("python-six" ,python-six)))
282 (arguments
283 `(#:phases (modify-phases %standard-phases
284 (replace 'check
285 (lambda _
286 (invoke "pytest")
287 #t)))))
288 (home-page "https://github.com/jd/tenacity")
289 (synopsis "Retrying library for python")
290 (description "Tenacity is a general-purpose python library to simplify the
291 task of adding retry behavior to just about anything.")
292 (license license:asl2.0)))
293
294 (define-public python-pytelegrambotapi
295 (package
296 (name "python-pytelegrambotapi")
297 (version "3.7.4")
298 (source
299 (origin
300 (method git-fetch)
301 (uri (git-reference
302 (url "https://github.com/eternnoir/pyTelegramBotAPI")
303 (commit version)))
304 (file-name (git-file-name name version))
305 (sha256
306 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
307 (build-system python-build-system)
308 (arguments
309 `(#:phases
310 (modify-phases %standard-phases
311 (replace 'check
312 (lambda* (#:key tests? #:allow-other-keys)
313 (when tests?
314 (with-directory-excursion "tests"
315 (invoke "py.test")))
316 #t)))))
317 (propagated-inputs
318 `(("python-requests" ,python-requests)))
319 (native-inputs
320 `(("python-pytest" ,python-pytest)))
321 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
322 (synopsis "Python Telegram bot api")
323 (description "This package provides a simple, but extensible Python
324 implementation for the Telegram Bot API.")
325 (license license:gpl2)))
326
327 (define-public python-colorlog
328 (package
329 (name "python-colorlog")
330 (version "4.1.0")
331 (source (origin
332 (method url-fetch)
333 (uri (pypi-uri "colorlog" version))
334 (sha256
335 (base32
336 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
337 (build-system python-build-system)
338 (native-inputs
339 `(("python-pytest" ,python-pytest)))
340 (arguments
341 `(#:phases (modify-phases %standard-phases
342 (replace 'check
343 (lambda _
344 ;; Extend PYTHONPATH so the built package will be found.
345 (setenv "PYTHONPATH"
346 (string-append (getcwd) "/build/lib:"
347 (getenv "PYTHONPATH")))
348 (invoke "pytest" "-p" "no:logging")
349 #t)))))
350 (home-page "https://github.com/borntyping/python-colorlog")
351 (synopsis "Log formatting with colors for python")
352 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
353 with Python's logging module that outputs records using terminal colors.")
354 (license license:expat)))
355
356 (define-public python-pyprind
357 (package
358 (name "python-pyprind")
359 (version "2.11.2")
360 (source (origin
361 (method url-fetch)
362 (uri (pypi-uri "PyPrind" version))
363 (sha256
364 (base32
365 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
366 (build-system python-build-system)
367 (propagated-inputs
368 `(("python-psutil" ,python-psutil)))
369 (home-page "https://github.com/rasbt/pyprind")
370 (synopsis "Python Progress Bar and Percent Indicator Utility")
371 (description "The PyPrind (Python Progress Indicator) module provides a
372 progress bar and a percentage indicator object that let you track the progress
373 of a loop structure or other iterative computation.")
374 (license license:bsd-3)))
375
376 (define-public python-gphoto2
377 (package
378 (name "python-gphoto2")
379 (version "2.2.1")
380 (source (origin
381 (method url-fetch)
382 (uri (pypi-uri "gphoto2" version))
383 (sha256
384 (base32
385 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
386 (build-system python-build-system)
387 (native-inputs
388 `(("pkg-config" ,pkg-config)))
389 (inputs
390 `(("libgphoto2" ,libgphoto2)))
391 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
392 (synopsis "Python interface to libgphoto2")
393 (description "@code{python-gphoto2} is a comprehensive Python interface
394 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
395 automatically generate the interface code.")
396 (license license:gpl3+)))
397
398 (define-public python-colour
399 (package
400 (name "python-colour")
401 (version "0.1.5")
402 (source (origin
403 (method url-fetch)
404 (uri (pypi-uri "colour" version))
405 (sha256
406 (base32
407 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
408 (build-system python-build-system)
409 (native-inputs
410 `(("python-d2to1" ,python-d2to1)))
411 (home-page "https://github.com/vaab/colour")
412 (synopsis "Convert and manipulate various color representations")
413 (description "Pythonic way to manipulate color representations (HSL, RVB,
414 web, X11, ...).")
415 (license license:expat)))
416
417 (define-public python-d2to1
418 (package
419 (name "python-d2to1")
420 (version "0.2.12.post1")
421 (source (origin
422 (method url-fetch)
423 (uri (pypi-uri "d2to1" version))
424 (sha256
425 (base32
426 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
427 (build-system python-build-system)
428 (native-inputs
429 `(("python-nose" ,python-nose)))
430 (home-page "https://github.com/embray/d2to1")
431 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
432 in python")
433 (description "The python package d2to1 (the d is for distutils) allows
434 using distutils2-like setup.cfg files for a package's metadata with a
435 distribute/setuptools setup.py script.")
436 (license license:bsd-2)))
437
438 (define-public python-rawkit
439 (package
440 (name "python-rawkit")
441 (version "0.6.0")
442 (source (origin
443 (method url-fetch)
444 (uri (pypi-uri "rawkit" version))
445 (sha256
446 (base32
447 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
448 (build-system python-build-system)
449 (native-inputs
450 `(("python-pytest" ,python-pytest)
451 ("python-mock" ,python-mock)))
452 (inputs
453 `(("libraw" ,libraw)))
454 (home-page "https://rawkit.readthedocs.io")
455 (synopsis "Ctypes-based LibRaw binding for Python")
456 (description "The rawkit package provides two modules: rawkit and libraw.
457 The rawkit module provides a high-level Pythonic interface for developing raw
458 photos, while the libraw module provides a CTypes based interface for
459 interacting with the low-level LibRaw C APIs.")
460 (license license:expat)))
461
462 (define-public python-easygui
463 (package
464 (name "python-easygui")
465 (version "0.98.1")
466 (source (origin
467 (method url-fetch)
468 (uri (pypi-uri "easygui" version))
469 (sha256
470 (base32
471 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
472 (build-system python-build-system)
473 (propagated-inputs
474 `(("python-tkinter" ,python "tk")))
475 (home-page "https://github.com/robertlugg/easygui")
476 (synopsis "GUI programming module for Python")
477 (description "EasyGUI is a module for very simple, very easy GUI
478 programming in Python. EasyGUI is different from other GUI generators in that
479 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
480 simple function calls.")
481 (license license:bsd-3)))
482
483 (define-public python-pymd4c
484 (package
485 (name "python-pymd4c")
486 (version "0.4.6.0b1")
487 (source
488 (origin
489 (method url-fetch)
490 (uri (pypi-uri "pymd4c" version))
491 (sha256
492 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
493 (build-system python-build-system)
494 (inputs
495 `(("md4c" ,md4c)))
496 (native-inputs
497 `(("python-flake8" ,python-flake8)
498 ("python-pkgconfig" ,python-pkgconfig)
499 ("pkg-config" ,pkg-config)))
500 (home-page "https://github.com/dominickpastore/pymd4c")
501 (synopsis "Python bindings for MD4C")
502 (description
503 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
504 to CommonMark.")
505 (license license:expat)))
506
507 (define-public python-pymediainfo
508 (package
509 (name "python-pymediainfo")
510 (version "4.1")
511 (source
512 (origin
513 (method url-fetch)
514 (uri (pypi-uri "pymediainfo" version))
515 (sha256
516 (base32
517 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
518 (build-system python-build-system)
519 (native-inputs
520 `(("python-setuptools-scm" ,python-setuptools-scm)
521 ("python-pytest" ,python-pytest)))
522 (inputs
523 `(("libmediainfo" ,libmediainfo)))
524 (arguments
525 `(#:phases
526 (modify-phases %standard-phases
527 (add-after 'unpack 'patch-libmediainfo
528 (lambda _
529 (substitute* "pymediainfo/__init__.py"
530 (("libmediainfo.so.0")
531 (string-append (assoc-ref %build-inputs "libmediainfo")
532 "/lib/libmediainfo.so.0")))
533 #t))
534 (replace 'check
535 (lambda _
536 ;; Extend PYTHONPATH so the built package will be found.
537 (setenv "PYTHONPATH"
538 (string-append (getcwd) "/build/lib:"
539 (getenv "PYTHONPATH")))
540 ;; Skip the only failing test "test_parse_url"
541 (invoke "pytest" "-vv" "-k" "not test_parse_url")
542 #t)))))
543 (home-page
544 "https://github.com/sbraz/pymediainfo")
545 (synopsis
546 "Python wrapper for the mediainfo library")
547 (description
548 "Python wrapper for the mediainfo library to access the technical and tag
549 data for video and audio files.")
550 (license license:expat)))
551
552 (define-public python-psutil
553 (package
554 (name "python-psutil")
555 (version "5.8.0")
556 (source
557 (origin
558 (method url-fetch)
559 (uri (pypi-uri "psutil" version))
560 (sha256
561 (base32 "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c"))))
562 (build-system python-build-system)
563 (arguments
564 ;; FIXME: some tests do not return and time out. Some tests fail because
565 ;; some processes survive kill().
566 '(#:tests? #f))
567 (home-page "https://github.com/giampaolo/psutil")
568 (synopsis "Library for retrieving information on running processes")
569 (description
570 "@code{psutil} (Python system and process utilities) is a library for
571 retrieving information on running processes and system utilization (CPU,
572 memory, disks, network) in Python. It is useful mainly for system monitoring,
573 profiling and limiting process resources and management of running processes.
574 It implements many functionalities offered by command line tools such as: ps,
575 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
576 iotop, uptime, pidof, tty, taskset, pmap.")
577 (properties `((python2-variant . ,(delay python2-psutil))))
578 (license license:bsd-3)))
579
580 (define-public python2-psutil
581 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
582 (package
583 (inherit base)
584 (propagated-inputs
585 `(("python2-enum34" ,python2-enum34) ;optional
586 ,@(package-propagated-inputs base))))))
587
588 (define-public python-shapely
589 (package
590 (name "python-shapely")
591 (version "1.7.1")
592 (source
593 (origin
594 (method url-fetch)
595 (uri (pypi-uri "Shapely" version))
596 (sha256
597 (base32
598 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
599 (modules '((guix build utils)))
600 (snippet
601 '(begin
602 (delete-file "shapely/speedups/_speedups.c")
603 (delete-file "shapely/vectorized/_vectorized.c")
604 #t))))
605 (build-system python-build-system)
606 (native-inputs
607 `(("python-cython" ,python-cython)
608 ("python-matplotlib" ,python-matplotlib)
609 ("python-pytest" ,python-pytest)
610 ("python-pytest-cov" ,python-pytest-cov)))
611 (inputs
612 `(("geos" ,geos)))
613 (propagated-inputs
614 `(("python-numpy" ,python-numpy)))
615 (arguments
616 `(#:phases
617 (modify-phases %standard-phases
618 (add-after 'unpack 'patch-geos-path
619 (lambda* (#:key inputs #:allow-other-keys)
620 (let ((geos (assoc-ref inputs "geos"))
621 (glibc (assoc-ref inputs ,(if (%current-target-system)
622 "cross-libc" "libc"))))
623 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
624 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
625 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
626 geos "/lib/libgeos_c.so'])"))
627 (("free = load_dll\\('c'\\)\\.free")
628 (string-append "free = load_dll('c', fallbacks=['"
629 glibc "/lib/libc.so.6']).free"))
630 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
631 (string-append "free = load_dll('c', fallbacks=['"
632 glibc "/lib/libc.so.6']).free"))))
633 #t)))))
634 (home-page "https://github.com/Toblerity/Shapely")
635 (synopsis "Library for the manipulation and analysis of geometric objects")
636 (description "Shapely is a Python package for manipulation and analysis of
637 planar geometric objects. It is based on the @code{GEOS} library.")
638 (license license:bsd-3)))
639
640 (define-public python-shortuuid
641 (package
642 (name "python-shortuuid")
643 (version "0.5.0")
644 (source
645 (origin
646 (method url-fetch)
647 (uri (pypi-uri "shortuuid" version))
648 (sha256
649 (base32
650 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
651 (build-system python-build-system)
652 (native-inputs
653 `(("python-pep8" ,python-pep8)))
654 (home-page "https://github.com/skorokithakis/shortuuid")
655 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
656 (description
657 "@code{shortuuid} is a Python library for generating concise, unambiguous
658 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
659 module and then similar looking characters are removed.")
660 (license license:bsd-3)))
661
662 (define-public python-logwrap
663 (package
664 (name "python-logwrap")
665 (version "8.2.0.post0")
666 (source
667 (origin
668 (method url-fetch)
669 (uri (pypi-uri "logwrap" version))
670 (sha256
671 (base32
672 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
673 (build-system python-build-system)
674 (arguments
675 `(#:tests? #f ; Tests not included in pypi release.
676 #:phases
677 (modify-phases %standard-phases
678 (replace 'check
679 (lambda* (#:key tests? #:allow-other-keys)
680 (when tests?
681 (invoke "pytest"))
682 #t)))))
683 (native-inputs
684 `(("python-cython" ,python-cython)
685 ("python-pytest" ,python-pytest)
686 ("python-setuptools-scm" ,python-setuptools-scm)
687 ("python-toml" ,python-toml)
688 ("python-wheel" ,python-wheel)))
689 (home-page "https://github.com/python-useful-helpers/logwrap")
690 (synopsis "Decorator for logging function arguments")
691 (description "This package provides a decorator to log function arguments
692 and function call return values in a human-readable way.")
693 (license license:asl2.0)))
694
695 (define-public python2-shapely
696 (package-with-python2 python-shapely))
697
698 (define-public python-clyent
699 (package
700 (name "python-clyent")
701 (version "1.2.1")
702 (source
703 (origin
704 (method url-fetch)
705 (uri (pypi-uri "clyent" version))
706 (sha256
707 (base32
708 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
709 (build-system python-build-system)
710 (native-inputs
711 `(("python-mock" ,python-mock)))
712 (home-page "https://github.com/Anaconda-Platform/clyent")
713 (synopsis "Command line client library")
714 (description "Clyent is a Python command line utility library. It is used
715 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
716 (license license:bsd-3)))
717
718 (define-public python2-clyent
719 (package-with-python2 python-clyent))
720
721 (define-public python-babel
722 (package
723 (name "python-babel")
724 (version "2.9.0")
725 (source
726 (origin
727 (method url-fetch)
728 (uri (pypi-uri "Babel" version))
729 (sha256
730 (base32
731 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
732 (build-system python-build-system)
733 (native-inputs
734 `(("python-freezegun" ,python-freezegun)
735 ("python-pytest" ,python-pytest)))
736 (propagated-inputs
737 `(("python-pytz" ,python-pytz)))
738 (arguments
739 `(#:phases (modify-phases %standard-phases
740 (replace 'check
741 (lambda _
742 (invoke "pytest" "-vv"))))))
743 (home-page "http://babel.pocoo.org/")
744 (synopsis
745 "Tools for internationalizing Python applications")
746 (description
747 "Babel is composed of two major parts:
748 - tools to build and work with gettext message catalogs
749 - a Python interface to the CLDR (Common Locale Data Repository), providing
750 access to various locale display names, localized number and date formatting,
751 etc. ")
752 (license license:bsd-3)))
753
754 (define-public python2-babel
755 (package-with-python2 python-babel))
756
757 (define-public python2-backport-ssl-match-hostname
758 (package
759 (name "python2-backport-ssl-match-hostname")
760 (version "3.5.0.1")
761 (source
762 (origin
763 (method url-fetch)
764 (uri (pypi-uri "backports.ssl_match_hostname" version))
765 (sha256
766 (base32
767 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
768 (build-system python-build-system)
769 (arguments
770 `(#:python ,python-2
771 #:tests? #f)) ; no test target
772 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
773 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
774 (description
775 "This backport brings the ssl.match_hostname() function to users of
776 earlier versions of Python. The function checks the hostname in the
777 certificate returned by the server to which a connection has been established,
778 and verifies that it matches the intended target hostname.")
779 (license license:psfl)))
780
781 (define-public python-bitarray
782 (package
783 (name "python-bitarray")
784 (version "1.4.0")
785 (source (origin
786 (method url-fetch)
787 (uri (pypi-uri "bitarray" version))
788 (sha256
789 (base32
790 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
791 (build-system python-build-system)
792 (home-page "https://github.com/ilanschnell/bitarray")
793 (synopsis "Efficient arrays of booleans")
794 (description "This package provides an object type which efficiently
795 represents an array of booleans. Bitarrays are sequence types and behave very
796 much like usual lists. Eight bits are represented by one byte in a contiguous
797 block of memory. The user can select between two representations:
798 little-endian and big-endian. All of the functionality is implemented in C.
799 Methods for accessing the machine representation are provided. This can be
800 useful when bit level access to binary files is required, such as portable
801 bitmap image files. Also, when dealing with compressed data which uses
802 variable bit length encoding, you may find this module useful.")
803 (license license:psfl)))
804
805 (define-public python-boolean.py
806 (package
807 (name "python-boolean.py")
808 (version "3.6")
809 (source
810 (origin
811 ;; There's no source tarball on PyPI.
812 (method git-fetch)
813 (uri (git-reference
814 (url "https://github.com/bastikr/boolean.py")
815 (commit (string-append "v" version))))
816 (file-name (git-file-name name version))
817 (sha256
818 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
819 (build-system python-build-system)
820 (home-page "https://github.com/bastikr/boolean.py")
821 (synopsis "Boolean algebra in one Python module")
822 (description
823 "This is a small Python library that implements boolean algebra.
824 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
825 @code{Symbol} class that can take on one of these two values. Calculations
826 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
827 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
828 Expressions are constructed from parsed strings or directly in Python.")
829 (license license:bsd-2)))
830
831 (define-public python-hdf4
832 (package
833 (name "python-hdf4")
834 (version "0.9")
835 (source
836 (origin
837 (method url-fetch)
838 (uri (pypi-uri name version))
839 (sha256
840 (base32
841 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
842 (build-system python-build-system)
843 (native-inputs `(("nose" ,python-nose)))
844 (propagated-inputs `(("numpy" ,python-numpy)))
845 (inputs
846 `(("hdf4" ,hdf4)
847 ("libjpeg" ,libjpeg-turbo)
848 ("zlib" ,zlib)))
849 (arguments
850 `(#:phases
851 (modify-phases %standard-phases
852 (replace 'check
853 (lambda _
854 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
855 ;; on to import numpy. Somehow this works on their CI system.
856 ;; Let's just manage PYTHONPATH here instead.
857 (substitute* "runexamples.sh"
858 (("export PYTHONPATH=.*") ""))
859 (setenv "PYTHONPATH"
860 (string-append (getcwd) ":"
861 (getenv "PYTHONPATH")))
862 (invoke "./runexamples.sh")
863 (invoke "nosetests" "-v"))))))
864 (home-page "https://github.com/fhs/python-hdf4")
865 (synopsis "Python interface to the NCSA HDF4 library")
866 (description
867 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
868 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
869 NetCDF files can also be read and modified. Python-HDF4 is a fork of
870 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
871 (license license:expat)))
872
873 (define-public python2-hdf4
874 (package-with-python2 python-hdf4))
875
876 (define-public python-h5py
877 (package
878 (name "python-h5py")
879 (version "2.10.0")
880 (source
881 (origin
882 (method url-fetch)
883 (uri (pypi-uri "h5py" version))
884 (sha256
885 (base32
886 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
887 (build-system python-build-system)
888 (arguments
889 `(#:tests? #f ; no test target
890 #:phases
891 (modify-phases %standard-phases
892 (add-after 'unpack 'fix-hdf5-paths
893 (lambda* (#:key inputs #:allow-other-keys)
894 (let ((prefix (assoc-ref inputs "hdf5")))
895 (substitute* "setup_build.py"
896 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
897 (string-append "['" prefix "/lib" "']"))
898 (("'/opt/local/include', '/usr/local/include'")
899 (string-append "'" prefix "/include" "'")))
900 (substitute* "setup_configure.py"
901 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
902 (string-append "['" prefix "/lib" "']")))
903 #t))))))
904 (propagated-inputs
905 `(("python-six" ,python-six)
906 ("python-numpy" ,python-numpy)))
907 (inputs
908 `(("hdf5" ,hdf5-1.10)))
909 (native-inputs
910 `(("python-cython" ,python-cython)
911 ("python-pkgconfig" ,python-pkgconfig)
912 ("pkg-config" ,pkg-config)))
913 (home-page "https://www.h5py.org/")
914 (synopsis "Read and write HDF5 files from Python")
915 (description
916 "The h5py package provides both a high- and low-level interface to the
917 HDF5 library from Python. The low-level interface is intended to be a
918 complete wrapping of the HDF5 API, while the high-level component supports
919 access to HDF5 files, datasets and groups using established Python and NumPy
920 concepts.")
921 (license license:bsd-3)))
922
923 (define-public python2-h5py
924 (package-with-python2 python-h5py))
925
926 (define-public python-sh
927 (package
928 (name "python-sh")
929 (version "1.12.14")
930 (source
931 (origin
932 (method url-fetch)
933 (uri (pypi-uri "sh" version))
934 (sha256
935 (base32
936 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
937 (build-system python-build-system)
938 (arguments
939 '(#:phases
940 (modify-phases %standard-phases
941 (replace 'check
942 (lambda _
943 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
944 (setenv "HOME" "/tmp")
945 (invoke "python" "sh.py" "test"))))))
946 (native-inputs
947 `(("python-coverage" ,python-coverage)))
948 (home-page "https://github.com/amoffat/sh")
949 (synopsis "Python subprocess replacement")
950 (description "This package provides a replacement for Python's
951 @code{subprocess} feature.")
952 (license license:expat)))
953
954 (define-public python2-sh
955 (package-with-python2 python-sh))
956
957 (define-public python-cftime
958 (package
959 (name "python-cftime")
960 (version "1.0.4.2")
961 (source
962 (origin
963 (method url-fetch)
964 (uri (pypi-uri "cftime" version))
965 (sha256
966 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
967 (build-system python-build-system)
968 (propagated-inputs
969 `(("python-numpy" ,python-numpy)))
970 (native-inputs
971 `(("python-coveralls" ,python-coveralls)
972 ("python-cython" ,python-cython)
973 ("python-pytest-cov" ,python-pytest-cov)))
974 (home-page "https://github.com/Unidata/cftime")
975 (synopsis "Library for time handling")
976 (description
977 "This package provides time-handling functionality that used to be part
978 of the netcdf4 package before.")
979 ;; This package claims to include code under the GPLv3 but is released
980 ;; under ISC.
981 (license (list license:isc license:gpl3+))))
982
983 (define-public python-netcdf4
984 (package
985 (name "python-netcdf4")
986 (version "1.5.3")
987 (source
988 (origin
989 (method url-fetch)
990 (uri (pypi-uri "netCDF4" version))
991 (sha256
992 (base32
993 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
994 (build-system python-build-system)
995 (arguments
996 '(#:phases
997 (modify-phases %standard-phases
998 (add-after 'unpack 'configure-locations
999 (lambda* (#:key inputs #:allow-other-keys)
1000 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1001 #t)))))
1002 (native-inputs
1003 `(("python-cython" ,python-cython)))
1004 (propagated-inputs
1005 `(("python-numpy" ,python-numpy)
1006 ("python-cftime" ,python-cftime)))
1007 (inputs
1008 `(("netcdf" ,netcdf)
1009 ("hdf4" ,hdf4)
1010 ("hdf5" ,hdf5)))
1011 (home-page "https://github.com/Unidata/netcdf4-python")
1012 (synopsis "Python/numpy interface to the netCDF library")
1013 (description "Netcdf4-python is a Python interface to the netCDF C
1014 library. netCDF version 4 has many features not found in earlier
1015 versions of the library and is implemented on top of HDF5. This module
1016 can read and write files in both the new netCDF 4 and the old netCDF 3
1017 format, and can create files that are readable by HDF5 clients. The
1018 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1019 to users of that module.")
1020 ;; The software is mainly ISC, but includes some files covered
1021 ;; by the Expat license.
1022 (license (list license:isc license:expat))))
1023
1024 (define-public python-license-expression
1025 (package
1026 (name "python-license-expression")
1027 (version "1.2")
1028 (source
1029 (origin
1030 (method url-fetch)
1031 (uri (pypi-uri "license-expression" version))
1032 (sha256
1033 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1034 (build-system python-build-system)
1035 (propagated-inputs
1036 `(("python-boolean.py" ,python-boolean.py)))
1037 (home-page "https://github.com/nexB/license-expression")
1038 (synopsis "Apply boolean logic to license expressions")
1039 (description
1040 "This Python module defines a tiny language to evaluate and compare
1041 license expressions using boolean logic. Logical combinations of licenses can
1042 be tested for equality, containment, and equivalence. They can be normalised
1043 and simplified. It supports SPDX license expressions as well as other naming
1044 conventions and aliases in the same expression.")
1045 (license license:gpl2+)))
1046
1047 (define-public python-lockfile
1048 (package
1049 (name "python-lockfile")
1050 (version "0.12.2")
1051 (source
1052 (origin
1053 (method url-fetch)
1054 (uri (pypi-uri "lockfile" version))
1055 (sha256
1056 (base32
1057 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1058 (build-system python-build-system)
1059 (arguments '(#:test-target "check"))
1060 (native-inputs
1061 `(("python-pbr" ,python-pbr)))
1062 (home-page "https://launchpad.net/pylockfile")
1063 (synopsis "Platform-independent file locking module")
1064 (description
1065 "The lockfile package exports a LockFile class which provides a simple
1066 API for locking files.")
1067 (license license:expat)))
1068
1069 (define-public python-filelock
1070 (package
1071 (name "python-filelock")
1072 (version "3.0.12")
1073 (source
1074 (origin
1075 (method url-fetch)
1076 (uri (pypi-uri "filelock" version))
1077 (sha256
1078 (base32
1079 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1080 (build-system python-build-system)
1081 (home-page
1082 "https://github.com/benediktschmitt/py-filelock")
1083 (synopsis "Platform independent file lock")
1084 (description "@code{filelock} contains a single module implementing
1085 a platform independent file lock in Python, which provides a simple way of
1086 inter-process communication.")
1087 (license license:unlicense)))
1088
1089 (define-public python-semantic-version
1090 (package
1091 (name "python-semantic-version")
1092 (version "2.8.5")
1093 (source
1094 (origin
1095 (method url-fetch)
1096 (uri (pypi-uri "semantic_version" version))
1097 (sha256
1098 (base32
1099 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1100 (build-system python-build-system)
1101 (home-page "https://github.com/rbarrois/python-semanticversion")
1102 (synopsis "Semantic versioning module for Python")
1103 (description
1104 "The @code{semantic_version} class is a small library for handling
1105 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1106
1107 It can compare versions, generate a new version that represents a bump in one of
1108 the version levels, and check whether any given string is a proper semantic
1109 version identifier.")
1110 (license license:bsd-3)))
1111
1112 (define-public python2-semantic-version
1113 (package-with-python2 python-semantic-version))
1114
1115 (define-public python-serpent
1116 (package
1117 (name "python-serpent")
1118 (version "1.28")
1119 (source
1120 (origin
1121 (method url-fetch)
1122 (uri (pypi-uri "serpent" version))
1123 (sha256
1124 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1125 (build-system python-build-system)
1126 (native-inputs
1127 `(("python-attrs" ,python-attrs)
1128 ("python-pytz" ,python-pytz)))
1129 (home-page "https://github.com/irmen/Serpent")
1130 (synopsis "Serializer for literal Python expressions")
1131 (description
1132 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1133 serialization. It serializes an object tree into bytes (an utf-8 encoded
1134 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1135 to rebuild the original object tree.
1136
1137 Because only safe literals are encoded, it is safe to send serpent data to
1138 other machines, such as over the network.")
1139 (properties `((python2-variant . ,(delay python2-serpent))))
1140 (license license:expat)))
1141
1142 (define-public python2-serpent
1143 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1144 (package
1145 (inherit base)
1146 (propagated-inputs
1147 `(("python-enum34" ,python2-enum34)
1148 ,@(package-propagated-inputs base))))))
1149
1150 (define-public python-setuptools
1151 (package
1152 (name "python-setuptools")
1153 (version "52.0.0")
1154 (source
1155 (origin
1156 (method url-fetch)
1157 (uri (pypi-uri "setuptools" version))
1158 (sha256
1159 (base32
1160 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1161 (modules '((guix build utils)))
1162 (snippet
1163 '(begin
1164 ;; Remove included binaries which are used to build self-extracting
1165 ;; installers for Windows.
1166 ;; TODO: Find some way to build them ourself so we can include them.
1167 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1168 #t))))
1169 (build-system python-build-system)
1170 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1171 ;; One could bootstrap with an internal untested setuptools.
1172 (arguments
1173 `(#:tests? #f))
1174 (home-page "https://pypi.org/project/setuptools/")
1175 (synopsis
1176 "Library designed to facilitate packaging Python projects")
1177 (description
1178 "Setuptools is a fully-featured, stable library designed to facilitate
1179 packaging Python projects, where packaging includes:
1180 Python package and module definitions,
1181 distribution package metadata,
1182 test hooks,
1183 project installation,
1184 platform-specific details,
1185 Python 3 support.")
1186 ;; TODO: setuptools now bundles the following libraries:
1187 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1188 (license (list license:psfl ; setuptools itself
1189 license:expat ; six, appdirs, pyparsing
1190 license:asl2.0 ; packaging is dual ASL2/BSD-2
1191 license:bsd-2))
1192 (properties `((python2-variant . ,(delay python2-setuptools))))))
1193
1194 ;; Newer versions of setuptools no longer support Python 2.
1195 (define-public python2-setuptools
1196 (package
1197 (name "python2-setuptools")
1198 (version "41.0.1")
1199 (source
1200 (origin
1201 (method url-fetch)
1202 (uri (pypi-uri "setuptools" version ".zip"))
1203 (sha256
1204 (base32
1205 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1206 (modules '((guix build utils)))
1207 (snippet
1208 '(begin
1209 ;; Remove included binaries which are used to build self-extracting
1210 ;; installers for Windows.
1211 ;; TODO: Find some way to build them ourself so we can include them.
1212 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1213 #t))))
1214 (build-system python-build-system)
1215 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1216 ;; One could bootstrap with an internal untested setuptools.
1217 (arguments
1218 `(#:tests? #f))
1219 (native-inputs
1220 `(("unzip" ,unzip)))
1221 (home-page "https://pypi.org/project/setuptools/")
1222 (synopsis
1223 "Library designed to facilitate packaging Python projects")
1224 (description
1225 "Setuptools is a fully-featured, stable library designed to facilitate
1226 packaging Python projects, where packaging includes:
1227 Python package and module definitions,
1228 distribution package metadata,
1229 test hooks,
1230 project installation,
1231 platform-specific details,
1232 Python 3 support.")
1233 ;; TODO: setuptools now bundles the following libraries:
1234 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1235 (license (list license:psfl ; setuptools itself
1236 license:expat ; six, appdirs, pyparsing
1237 license:asl2.0 ; packaging is dual ASL2/BSD-2
1238 license:bsd-2))))
1239
1240 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1241 (define-public python-setuptools-for-tensorflow
1242 (hidden-package
1243 (package
1244 (inherit python-setuptools)
1245 (version "39.1.0")
1246 (source (origin
1247 (inherit (package-source python-setuptools))
1248 (uri (pypi-uri "setuptools" version ".zip"))
1249 (sha256
1250 (base32
1251 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1252
1253 (define-public python-uniseg
1254 (package
1255 (name "python-uniseg")
1256 (version "0.7.1")
1257 (source
1258 (origin
1259 (method url-fetch)
1260 (uri (pypi-uri "uniseg" version ".zip"))
1261 (sha256
1262 (base32
1263 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1264 (build-system python-build-system)
1265 (arguments
1266 '(#:tests? #f)) ; The test suite requires network access.
1267 (native-inputs
1268 `(("unzip" ,unzip)))
1269 (home-page
1270 "https://bitbucket.org/emptypage/uniseg-python")
1271 (synopsis
1272 "Python library to determine Unicode text segmentations")
1273 (description
1274 "Uniseg is a Python package used to determine Unicode text segmentations.
1275 Supported segmentations include:
1276 @enumerate
1277 @item @dfn{Code point} (any value in the Unicode codespace)
1278 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1279 multiple Unicode code points, e.g. \"G\" + acute-accent)
1280 @item Word break
1281 @item Sentence break
1282 @item Line break
1283 @end enumerate")
1284 (license license:expat)))
1285
1286 (define-public python2-uniseg
1287 (package-with-python2 python-uniseg))
1288
1289 (define-public python-humanfriendly
1290 (package
1291 (name "python-humanfriendly")
1292 (version "8.2")
1293 (source
1294 (origin
1295 (method url-fetch)
1296 (uri (pypi-uri "humanfriendly" version))
1297 (sha256
1298 (base32
1299 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1300 (build-system python-build-system)
1301 (arguments
1302 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1303 #:tests? #f))
1304 (home-page "https://humanfriendly.readthedocs.io")
1305 (synopsis "Human-friendly input and output in Python")
1306 (description
1307 "The functions and classes in @code{humanfriendly} can be used to make
1308 text interfaces more user-friendly. It includes tools to parse and format
1309 numbers, file sizes, and timespans, timers for long-running operations, menus
1310 to allow the user to choose from a list of options, and terminal interaction
1311 helpers.")
1312 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1313 (license license:expat)))
1314
1315 (define-public python2-humanfriendly
1316 (let ((base (package-with-python2
1317 (strip-python2-variant python-humanfriendly))))
1318 (package (inherit base)
1319 (propagated-inputs
1320 `(("python2-monotonic" ,python2-monotonic)
1321 ,@(package-propagated-inputs base))))))
1322
1323 (define-public python-textparser
1324 (package
1325 (name "python-textparser")
1326 (version "0.23.0")
1327 (source
1328 (origin
1329 (method url-fetch)
1330 (uri (pypi-uri "textparser" version))
1331 (sha256
1332 (base32
1333 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1334 (build-system python-build-system)
1335 (home-page "https://github.com/eerimoq/textparser")
1336 (synopsis "Fast text parser for Python")
1337 (description "This library provides a text parser written in the Python
1338 language. It aims to be fast.")
1339 (license license:expat)))
1340
1341 (define-public python-aenum
1342 (package
1343 (name "python-aenum")
1344 (version "2.2.4")
1345 (source
1346 (origin
1347 (method url-fetch)
1348 (uri (pypi-uri "aenum" version))
1349 (sha256
1350 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1351 (build-system python-build-system)
1352 (arguments
1353 `(#:phases (modify-phases %standard-phases
1354 (replace 'check
1355 (lambda _
1356 (format #t "current working dir ~s~%" (getcwd))
1357 (setenv "PYTHONPATH"
1358 (string-append ".:" (getenv "PYTHONPATH")))
1359 ;; We must run the test suite module directly, as it
1360 ;; fails to define the 'tempdir' variable in scope for
1361 ;; the tests otherwise
1362 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1363 ;; issues/32/running-tests-with-python-setuppy-test).
1364 (invoke "python3" "aenum/test.py")
1365 ;; This one fails with "NameError: name
1366 ;; 'test_pickle_dump_load' is not defined" (see:
1367 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1368 ;; /error-running-the-test_v3py-test-suite).
1369 ;; (invoke "python3" "aenum/test_v3.py")
1370 #t)))))
1371 (home-page "https://bitbucket.org/stoneleaf/aenum")
1372 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1373 (description "The aenum library includes an @code{Enum} base class, a
1374 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1375 class.")
1376 (license license:bsd-3)))
1377
1378 (define-public python-can
1379 (package
1380 (name "python-can")
1381 (version "3.3.3")
1382 (source
1383 (origin
1384 (method url-fetch)
1385 (uri (pypi-uri "python-can" version))
1386 (sha256
1387 (base32
1388 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1389 (build-system python-build-system)
1390 (arguments
1391 `(#:phases (modify-phases %standard-phases
1392 (add-after 'unpack 'relax-version-requirements
1393 (lambda _
1394 (substitute* "setup.py"
1395 (("mock~=2\\.0") "mock")
1396 (("coverage<5") "coverage")
1397 (("pytest~=4\\.3") "pytest")
1398 (("hypothesis~=4\\.56") "hypothesis"))
1399 #t))
1400 (add-after 'unpack 'fix-broken-tests
1401 ;; The tests try to run two scripts it expects should be
1402 ;; in PATH, but they aren't at this time (see:
1403 ;; https://github.com/hardbyte/python-can/issues/805).
1404 (lambda _
1405 (substitute* "test/test_scripts.py"
1406 (("\"can_logger\\.py --help\"") "")
1407 (("\"can_player\\.py --help\"") ""))
1408 #t)))))
1409 (propagated-inputs
1410 `(("python-aenum" ,python-aenum)
1411 ("python-wrapt" ,python-wrapt)))
1412 (native-inputs
1413 `(("python-codecov" ,python-codecov)
1414 ("python-coverage" ,python-coverage)
1415 ("python-future" ,python-future)
1416 ("python-hypothesis" ,python-hypothesis)
1417 ("python-mock" ,python-mock)
1418 ("python-pyserial" ,python-pyserial)
1419 ("python-pytest" ,python-pytest)
1420 ("python-pytest-cov" ,python-pytest-cov)
1421 ("python-pytest-runner" ,python-pytest-runner)
1422 ("python-pytest-timeout" ,python-pytest-timeout)))
1423 (home-page "https://github.com/hardbyte/python-can")
1424 (synopsis "Controller Area Network (CAN) interface module for Python")
1425 (description "This package defines the @code{can} module, which provides
1426 controller area network (CAN) support for Python developers; providing common
1427 abstractions to different hardware devices, and a suite of utilities for
1428 sending and receiving messages on a CAN bus.")
1429 (license license:lgpl3+)))
1430
1431 (define-public python-caniusepython3
1432 (package
1433 (name "python-caniusepython3")
1434 (version "7.2.0")
1435 (source
1436 (origin
1437 (method url-fetch)
1438 (uri (pypi-uri "caniusepython3" version))
1439 (sha256
1440 (base32
1441 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1442 (build-system python-build-system)
1443 (arguments
1444 `(#:phases (modify-phases %standard-phases
1445 (add-after 'unpack 'relax-requirements
1446 (lambda _
1447 (substitute* "setup.py"
1448 ;; These are for compatibility with Python 2.
1449 ((".*'argparse', 'backports.functools_lru_cache',.*")
1450 ""))
1451 (substitute* "dev_requirements.txt"
1452 ((".*pylint.*") "")) ;not actually required
1453 #t))
1454 (replace 'check
1455 (lambda _
1456 (invoke "py.test" "-k" "not NetworkTests"))))))
1457 (propagated-inputs
1458 `(("python-distlib" ,python-distlib)
1459 ("python-packaging" ,python-packaging)
1460 ("python-requests" ,python-requests)))
1461 (native-inputs
1462 `(("python-mock" ,python-mock)
1463 ("python-pytest" ,python-pytest)))
1464 (home-page "https://github.com/brettcannon/caniusepython3")
1465 (synopsis "Check for Python 3-incompatible Python libraries")
1466 (description "The @command{caniusepython3} command scans your project and
1467 reports the Python 3-incompatible libraries it found. It can also be used as
1468 a library.")
1469 (license license:asl2.0)))
1470
1471 (define-public python-diskcache
1472 (package
1473 (name "python-diskcache")
1474 (version "4.1.0")
1475 (source
1476 (origin
1477 (method url-fetch)
1478 (uri (pypi-uri "diskcache" version))
1479 (sha256
1480 (base32
1481 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1482 (build-system python-build-system)
1483 (arguments
1484 `(#:tests? #f)) ;test suite not included in the release
1485 (home-page "http://www.grantjenks.com/docs/diskcache/")
1486 (synopsis "Disk and file backed cache library")
1487 (description "DiskCache is a disk and file backed persistent cache.")
1488 (license license:asl2.0)))
1489
1490 (define-public python-bitstruct
1491 (package
1492 (name "python-bitstruct")
1493 (version "8.9.0")
1494 (source
1495 (origin
1496 (method url-fetch)
1497 (uri (pypi-uri "bitstruct" version))
1498 (sha256
1499 (base32
1500 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1501 (build-system python-build-system)
1502 (home-page "https://github.com/eerimoq/bitstruct")
1503 (synopsis "Python values to and C bit field structs converter")
1504 (description "This module performs conversions between Python values and C
1505 bit field structs represented as Python byte strings. It is intended to have
1506 a similar interface as the @code{struct} module from Python, but working on
1507 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1508 (license license:expat)))
1509
1510 (define-public python-cantools
1511 (package
1512 (name "python-cantools")
1513 (version "33.1.1")
1514 (source
1515 (origin
1516 ;; We take the sources from the Git repository as the documentation is
1517 ;; not included with the PyPI archive.
1518 (method git-fetch)
1519 (uri (git-reference
1520 (url "https://github.com/eerimoq/cantools")
1521 (commit version)))
1522 (file-name (git-file-name name version))
1523 (sha256
1524 (base32
1525 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1526 (build-system python-build-system)
1527 (arguments
1528 `(#:phases
1529 (modify-phases %standard-phases
1530 (add-after 'build 'build-doc
1531 (lambda _
1532 ;; See: https://github.com/eerimoq/cantools/issues/190.
1533 (substitute* "README.rst"
1534 (("https://github.com/eerimoq/cantools/raw/master\
1535 /docs/monitor.png")
1536 "monitor.png"))
1537 (with-directory-excursion "docs"
1538 (invoke "make" "man" "info"))))
1539 (add-after 'install 'install-doc
1540 (lambda* (#:key outputs #:allow-other-keys)
1541 (let* ((out (assoc-ref outputs "out"))
1542 (info (string-append out "/share/info"))
1543 (man1 (string-append out "/share/man/man1")))
1544 (format #t "CWD: ~s~%" (getcwd))
1545 (install-file "docs/_build/texinfo/cantools.info" info)
1546 (install-file "docs/_build/man/cantools.1" man1)
1547 #t))))))
1548 (native-inputs
1549 `(("sphinx" ,python-sphinx)
1550 ("texinfo" ,texinfo)))
1551 (propagated-inputs
1552 `(("python-bitstruct" ,python-bitstruct)
1553 ("python-can" ,python-can)
1554 ("python-diskcache" ,python-diskcache)
1555 ("python-textparser" ,python-textparser)))
1556 (home-page "https://github.com/eerimoq/cantools")
1557 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1558 (description "This package includes Controller Area Network (CAN) related
1559 tools that can be used to:
1560 @itemize
1561 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1562 @item encode and decode CAN messages
1563 @item multiplex simple and extended signals
1564 @item diagnose DID encoding and decoding
1565 @item dump the CAN decoder output
1566 @item test CAN nodes
1567 @item generate C source code
1568 @item monitor the CAN bus
1569 @end itemize")
1570 (license license:expat)))
1571
1572 (define-public python-capturer
1573 (package
1574 (name "python-capturer")
1575 (version "2.4")
1576 (source
1577 (origin
1578 (method url-fetch)
1579 (uri (pypi-uri "capturer" version))
1580 (sha256
1581 (base32
1582 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1583 (build-system python-build-system)
1584 (arguments
1585 `(#:tests? #f))
1586 (propagated-inputs
1587 `(("python-humanfriendly" ,python-humanfriendly)))
1588 (home-page "https://capturer.readthedocs.io")
1589 (synopsis "Capture stdout and stderr streams of the current process")
1590 (description
1591 "The capturer package makes it easy to capture the stdout and stderr
1592 streams of the current process and subprocesses. Output can be relayed
1593 to the terminal in real time but is also available to the Python program
1594 for additional processing.")
1595 (license license:expat)))
1596
1597 (define-public python2-capturer
1598 (package-with-python2 python-capturer))
1599
1600 (define-public python-case
1601 (package
1602 (name "python-case")
1603 (version "1.5.3")
1604 (source
1605 (origin
1606 (method url-fetch)
1607 (uri (pypi-uri "case" version))
1608 (sha256
1609 (base32
1610 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1611 (build-system python-build-system)
1612 (propagated-inputs
1613 `(("python-mock" ,python-mock)
1614 ("python-nose" ,python-nose)
1615 ("python-six" ,python-six)
1616 ("python-unittest2" ,python-unittest2)))
1617 (native-inputs
1618 `(("python-coverage" ,python-coverage)))
1619 (home-page "https://github.com/celery/case")
1620 (synopsis "Unittest utilities and convenience methods")
1621 (description
1622 "The @code{case} package provides utilities on top of unittest, including
1623 some helpful Python 2 compatibility convenience methods.")
1624 (license license:bsd-3)))
1625
1626 (define-public python-verboselogs
1627 (package
1628 (name "python-verboselogs")
1629 (version "1.7")
1630 (source
1631 (origin
1632 (method url-fetch)
1633 (uri (pypi-uri "verboselogs" version))
1634 (sha256
1635 (base32
1636 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1637 (build-system python-build-system)
1638 (arguments
1639 `(#:phases
1640 (modify-phases %standard-phases
1641 (replace 'check
1642 (lambda _
1643 ;; Do not run pylint plugin test, as astroid is an old
1644 ;; unsupported version.
1645 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1646 "verboselogs/tests.py"))))))
1647 (native-inputs
1648 `(("python-mock" ,python-mock)
1649 ("python-pytest" ,python-pytest)))
1650 (home-page "https://verboselogs.readthedocs.io")
1651 (synopsis "Verbose logging level for Python's logging module")
1652 (description
1653 "The @code{verboselogs} package extends Python's @code{logging} module to
1654 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1655 (license license:expat)))
1656
1657 (define-public python2-verboselogs
1658 (package-with-python2 python-verboselogs))
1659
1660 (define-public python-coloredlogs
1661 (package
1662 (name "python-coloredlogs")
1663 (version "10.0")
1664 (source
1665 (origin
1666 (method url-fetch)
1667 (uri (pypi-uri "coloredlogs" version))
1668 (sha256
1669 (base32
1670 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1671 (build-system python-build-system)
1672 (arguments
1673 `(;Tests require some updated modules
1674 #:tests? #f))
1675 (propagated-inputs
1676 `(("python-capturer" ,python-capturer)))
1677 (home-page "https://coloredlogs.readthedocs.io")
1678 (synopsis "Colored stream handler for Python's logging module")
1679 (description
1680 "The @code{coloredlogs} package enables colored terminal output for
1681 Python's logging module. The @code{ColoredFormatter} class inherits from
1682 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1683 messages in color.")
1684 (license license:expat)))
1685
1686 (define-public python2-coloredlogs
1687 (package-with-python2 python-coloredlogs))
1688
1689 (define-public python-editorconfig
1690 (package
1691 (name "python-editorconfig")
1692 (version "0.12.2")
1693 (source
1694 (origin
1695 (method url-fetch)
1696 (uri (pypi-uri "EditorConfig" version))
1697 (sha256
1698 (base32
1699 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1700 (build-system python-build-system)
1701 (home-page "https://editorconfig.org/")
1702 (synopsis "EditorConfig bindings for python")
1703 (description "The EditorConfig project consists of a file format for
1704 defining coding styles and a collection of text editor plugins that enable
1705 editors to read the file format and adhere to defined styles. EditorConfig
1706 files are easily readable and they work nicely with version control systems.")
1707 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1708 (license (list license:bsd-2 license:psfl))))
1709
1710 (define-public dosage
1711 (package
1712 (name "dosage")
1713 (version "2.17")
1714 (source
1715 (origin
1716 (method url-fetch)
1717 (uri (pypi-uri "dosage" version))
1718 (sha256
1719 (base32
1720 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1721 (build-system python-build-system)
1722 (propagated-inputs
1723 `(("python2-backports-functools-lru-cache"
1724 ,python2-backports-functools-lru-cache)
1725 ("python2-backports-shutil-get-terminal-size"
1726 ,python2-backports-shutil-get-terminal-size)
1727 ("python-cached-property" ,python-cached-property)
1728 ("python-colorama" ,python-colorama)
1729 ("python-imagesize" ,python-imagesize)
1730 ("python-importlib-metadata" ,python-importlib-metadata)
1731 ("python-lxml" ,python-lxml)
1732 ("python-requests" ,python-requests)
1733 ("python-six" ,python-six)))
1734 (native-inputs
1735 `(("python-pytest-cov" ,python-pytest-cov)
1736 ("python-pytest-xdist" ,python-pytest-xdist)
1737 ("python-responses" ,python-responses)
1738 ("python-setuptools-scm" ,python-setuptools-scm)))
1739 (home-page "https://github.com/webcomics/dosage")
1740 (synopsis "Comic strip downloader and archiver")
1741 (description "Dosage is designed to keep a local copy of specific webcomics and other
1742 picture-based content such as Picture of the Day sites. With the @command{dosage}
1743 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1744 downloaded, or download a strip for a particular date or index, if possible.")
1745 (license license:expat)))
1746
1747 (define-public python-et-xmlfile
1748 (package
1749 (name "python-et-xmlfile")
1750 (version "1.0.1")
1751 (source
1752 (origin
1753 (method url-fetch)
1754 (uri (pypi-uri "et_xmlfile" version))
1755 (sha256
1756 (base32
1757 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1758 (build-system python-build-system)
1759 (arguments
1760 `(#:phases (modify-phases %standard-phases
1761 (replace 'check
1762 (lambda _
1763 (invoke "pytest"))))))
1764 (native-inputs
1765 `(("python-pytest" ,python-pytest)
1766 ("python-lxml" ,python-lxml))) ;used for the tests
1767 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1768 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1769 (description "This Python library is based upon the @code{xmlfile} module
1770 from @code{lxml}. It aims to provide a low memory, compatible implementation
1771 of @code{xmlfile}.")
1772 (license license:expat)))
1773
1774 (define-public python2-et-xmlfile
1775 (package-with-python2 python-et-xmlfile))
1776
1777 (define-public python-openpyxl
1778 (package
1779 (name "python-openpyxl")
1780 (version "3.0.5")
1781 (source
1782 (origin
1783 ;; We use the upstream repository, as the tests are not included in the
1784 ;; PyPI releases.
1785 (method hg-fetch)
1786 (uri (hg-reference
1787 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1788 (changeset version)))
1789 (file-name (string-append name "-" version "-checkout"))
1790 (sha256
1791 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1792 (build-system python-build-system)
1793 (arguments
1794 `(#:phases (modify-phases %standard-phases
1795 (replace 'check
1796 (lambda _
1797 (invoke "pytest"))))))
1798 (native-inputs
1799 ;; For the test suite.
1800 `(("python-lxml" ,python-lxml)
1801 ("python-pillow" ,python-pillow)
1802 ("python-pytest" ,python-pytest)))
1803 (propagated-inputs
1804 `(("python-et-xmlfile" ,python-et-xmlfile)
1805 ("python-jdcal" ,python-jdcal)))
1806 (home-page "https://openpyxl.readthedocs.io")
1807 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1808 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1809 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1810 standard.")
1811 (properties `((python2-variant . ,(delay python2-openpyxl))))
1812 (license license:expat)))
1813
1814 (define-public python2-openpyxl
1815 (let ((base (package-with-python2
1816 (strip-python2-variant python-openpyxl))))
1817 (package
1818 (inherit base)
1819 ;; This is the latest version that has python2 support
1820 (version "2.6.4")
1821 (source
1822 (origin
1823 (method url-fetch)
1824 (uri (pypi-uri "openpyxl" version))
1825 (sha256
1826 (base32
1827 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1828 (arguments '(#:tests? #f))))) ; No test suite.
1829
1830 (define-public python-eventlet
1831 (package
1832 (name "python-eventlet")
1833 (version "0.25.1")
1834 (source
1835 (origin
1836 (method url-fetch)
1837 (uri (pypi-uri "eventlet" version))
1838 (sha256
1839 (base32
1840 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1841 (build-system python-build-system)
1842 (propagated-inputs
1843 `(("python-greenlet" ,python-greenlet)))
1844 (arguments
1845 ;; TODO: Requires unpackaged 'enum-compat'.
1846 '(#:tests? #f))
1847 (home-page "https://eventlet.net")
1848 (synopsis "Concurrent networking library for Python")
1849 (description
1850 "Eventlet is a concurrent networking library for Python that
1851 allows you to change how you run your code, not how you write it.
1852 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1853 Coroutines ensure that the developer uses a blocking style of programming
1854 that is similar to threading, but provide the benefits of non-blocking I/O.
1855 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1856 from the Python interpreter, or as a small part of a larger application.")
1857 (license license:expat)))
1858
1859 (define-public python-six
1860 (package
1861 (name "python-six")
1862 (version "1.14.0")
1863 (source
1864 (origin
1865 (method url-fetch)
1866 (uri (pypi-uri "six" version))
1867 (sha256
1868 (base32
1869 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1870 (build-system python-build-system)
1871 (arguments
1872 `(#:phases
1873 (modify-phases %standard-phases
1874 (replace 'check
1875 (lambda _
1876 (invoke "py.test" "-v"))))))
1877 (native-inputs
1878 `(("python-pytest" ,python-pytest-bootstrap)))
1879 (home-page "https://pypi.org/project/six/")
1880 (synopsis "Python 2 and 3 compatibility utilities")
1881 (description
1882 "Six is a Python 2 and 3 compatibility library. It provides utility
1883 functions for smoothing over the differences between the Python versions with
1884 the goal of writing Python code that is compatible on both Python versions.
1885 Six supports every Python version since 2.5. It is contained in only one
1886 Python file, so it can be easily copied into your project.")
1887 (license license:x11)))
1888
1889 (define-public python2-six
1890 (package-with-python2 python-six))
1891
1892 (define-public python-six-bootstrap
1893 (package
1894 (inherit python-six)
1895 (name "python-six-bootstrap")
1896 (native-inputs `())
1897 (arguments `(#:tests? #f))))
1898
1899 (define-public python2-six-bootstrap
1900 (package-with-python2 python-six-bootstrap))
1901
1902 (define-public python-schedule
1903 (package
1904 (name "python-schedule")
1905 (version "0.4.3")
1906 (source
1907 (origin
1908 (method url-fetch)
1909 (uri (pypi-uri "schedule" version))
1910 (sha256
1911 (base32
1912 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1913 (build-system python-build-system)
1914 (native-inputs
1915 `(("python-pytest" ,python-pytest)
1916 ("python-mock" ,python-mock)))
1917 (home-page "https://github.com/dbader/schedule")
1918 (synopsis "Schedule periodic function calls in Python")
1919 (description
1920 "Schedule is an in-process scheduler for periodic jobs that uses the
1921 builder pattern for configuration. Schedule lets you run Python functions (or
1922 any other callable) periodically at pre-determined intervals using a simple,
1923 human-friendly syntax.")
1924 (license license:expat)))
1925
1926 (define-public python2-schedule
1927 (package-with-python2 python-schedule))
1928
1929 (define-public python-scour
1930 (package
1931 (name "python-scour")
1932 (version "038.1")
1933 (source
1934 (origin
1935 (method git-fetch)
1936 (uri
1937 (git-reference
1938 (url "https://github.com/scour-project/scour")
1939 (commit
1940 (string-append "v" version))))
1941 (file-name (git-file-name name version))
1942 (sha256
1943 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1944 (propagated-inputs
1945 `(("python-six" ,python-six)))
1946 (build-system python-build-system)
1947 (home-page "https://github.com/scour-project/scour")
1948 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1949 (description "The goal of Scour is to output a file that renderes
1950 identically at a fraction of the size by removing a lot of redundant
1951 information created by most SVG editors. Optimization options are typically
1952 lossless but can be tweaked for more aggressive cleaning.")
1953 (license license:asl2.0)))
1954
1955 (define-public python-mechanize
1956 (package
1957 (name "python-mechanize")
1958 (version "0.4.5")
1959 (source
1960 (origin
1961 (method url-fetch)
1962 (uri (pypi-uri "mechanize" version))
1963 (sha256
1964 (base32
1965 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
1966 (build-system python-build-system)
1967 (propagated-inputs
1968 `(("python-html5lib" ,python-html5lib)))
1969 (home-page "https://github.com/python-mechanize/mechanize")
1970 (synopsis
1971 "Stateful programmatic web browsing in Python")
1972 (description
1973 "Mechanize implements stateful programmatic web browsing in Python,
1974 after Andy Lester’s Perl module WWW::Mechanize.")
1975 (license license:bsd-3)))
1976
1977 (define-public python2-mechanize
1978 (package-with-python2 python-mechanize))
1979
1980 (define-public python-simpleaudio
1981 (package
1982 (name "python-simpleaudio")
1983 (version "1.0.4")
1984 (source
1985 (origin
1986 (method url-fetch)
1987 (uri (pypi-uri "simpleaudio" version))
1988 (sha256
1989 (base32
1990 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
1991 (build-system python-build-system)
1992 (arguments
1993 `(#:tests? #f))
1994 (inputs
1995 `(("alsa-lib" ,alsa-lib)))
1996 (home-page
1997 "https://github.com/hamiltron/py-simple-audio")
1998 (synopsis "Simple, asynchronous audio playback for Python 3")
1999 (description
2000 "The @code{simplaudio} package provides cross-platform, dependency-free
2001 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2002 (license license:expat))) ; MIT license
2003
2004 (define-public python-simplejson
2005 (package
2006 (name "python-simplejson")
2007 (version "3.17.0")
2008 (source
2009 (origin
2010 (method url-fetch)
2011 (uri (pypi-uri "simplejson" version))
2012 (sha256
2013 (base32
2014 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
2015 (build-system python-build-system)
2016 (home-page "http://simplejson.readthedocs.org/en/latest/")
2017 (synopsis
2018 "Json library for Python")
2019 (description
2020 "JSON (JavaScript Object Notation) is a subset of JavaScript
2021 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2022 format.
2023
2024 Simplejson exposes an API familiar to users of the standard library marshal
2025 and pickle modules. It is the externally maintained version of the json
2026 library contained in Python 2.6, but maintains compatibility with Python 2.5
2027 and (currently) has significant performance advantages, even without using
2028 the optional C extension for speedups. Simplejson is also supported on
2029 Python 3.3+.")
2030 (license license:x11)))
2031
2032 (define-public python2-simplejson
2033 (package-with-python2 python-simplejson))
2034
2035
2036 (define-public python-pyicu
2037 (package
2038 (name "python-pyicu")
2039 (version "2.4.3")
2040 (source
2041 (origin
2042 (method url-fetch)
2043 (uri (pypi-uri "PyICU" version))
2044 (sha256
2045 (base32
2046 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
2047 (build-system python-build-system)
2048 (inputs
2049 `(("icu4c" ,icu4c)))
2050 (native-inputs
2051 `(("python-pytest" ,python-pytest)
2052 ("python-six" ,python-six)))
2053 (home-page "https://github.com/ovalhub/pyicu")
2054 (synopsis "Python extension wrapping the ICU C++ API")
2055 (description
2056 "PyICU is a python extension wrapping the ICU C++ API.")
2057 (license license:x11)))
2058
2059 (define-public python2-pyicu
2060 (package-with-python2 python-pyicu))
2061
2062 (define-public python-dogtail
2063 (package
2064 (name "python-dogtail")
2065 (version "0.9.11")
2066 (source (origin
2067 (method url-fetch)
2068 (uri
2069 (string-append
2070 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2071 "dogtail-" version ".tar.gz"))
2072 (sha256
2073 (base32
2074 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2075 (build-system python-build-system)
2076 (arguments
2077 `(#:tests? #f ; TODO Launching dbus for the tests
2078 ; fails
2079 #:phases
2080 (modify-phases %standard-phases
2081 (replace 'check
2082 (lambda* (#:key tests? #:allow-other-keys)
2083 (when tests?
2084 (system "Xvfb :1 &")
2085 (setenv "DISPLAY" ":1")
2086 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2087 #t)))))
2088 (propagated-inputs
2089 `(("python-pygobject" ,python-pygobject)
2090 ("python-pycairo" ,python-pycairo)
2091 ("python-pyatspi" ,python-pyatspi)))
2092 (native-inputs
2093 `(("python-nose" ,python-nose)
2094 ("gtk+" ,gtk+)
2095 ("xvfb" ,xorg-server)
2096 ("dbus" ,dbus)
2097 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2098 ("gobject-introspection" ,gobject-introspection)))
2099 (home-page "https://gitlab.com/dogtail/dogtail/")
2100 (synopsis "GUI test tool and automation framework written in Python")
2101 (description
2102 "Dogtail is a GUI test tool and automation framework written in Python.
2103 It uses Accessibility (a11y) technologies to communicate with desktop
2104 applications. dogtail scripts are written in Python and executed like any
2105 other Python program.")
2106 (license license:gpl2+)))
2107
2108 (define-public python2-dogtail
2109 (package-with-python2 python-dogtail))
2110
2111 (define-public python-empy
2112 (package
2113 (name "python-empy")
2114 (version "3.3.3")
2115 (source (origin
2116 (method url-fetch)
2117 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2118 version ".tar.gz"))
2119 (sha256
2120 (base32
2121 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2122 (build-system python-build-system)
2123 (arguments
2124 `(#:tests? #f)) ; python2 only
2125 (home-page "http://www.alcyone.com/software/empy/")
2126 (synopsis "Templating system for Python")
2127 (description
2128 "EmPy is a system for embedding Python expressions and statements in
2129 template text; it takes an EmPy source file, processes it, and produces
2130 output. This is accomplished via expansions, which are special signals to the
2131 EmPy system and are set off by a special prefix (by default the at sign, @@).
2132 EmPy can expand arbitrary Python expressions and statements in this way, as
2133 well as a variety of special forms. Textual data not explicitly delimited in
2134 this way is sent unaffected to the output, allowing Python to be used in
2135 effect as a markup language. Also supported are callbacks via hooks,
2136 recording and playback via diversions, and dynamic, chainable filters. The
2137 system is highly configurable via command line options and embedded
2138 commands.")
2139 (license license:lgpl2.1+)))
2140
2141 (define-public python2-empy
2142 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2143 (package
2144 (inherit base)
2145 (arguments `(,@(package-arguments base)
2146 #:tests? #t)))))
2147
2148 (define-public python2-element-tree
2149 (package
2150 (name "python2-element-tree")
2151 (version "1.2.6")
2152 (source (origin
2153 (method url-fetch)
2154 (uri (string-append
2155 "http://effbot.org/media/downloads/elementtree-"
2156 version "-20050316.tar.gz"))
2157 (sha256
2158 (base32
2159 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2160 (build-system python-build-system)
2161 (arguments
2162 `(#:python ,python-2 ; seems to be part of Python 3
2163 #:tests? #f)) ; no 'test' sub-command
2164 (synopsis "Toolkit for XML processing in Python")
2165 (description
2166 "ElementTree is a Python library supporting lightweight XML processing.")
2167 (home-page "https://effbot.org/zone/element-index.htm")
2168 (license (license:x11-style
2169 "http://docs.python.org/2/license.html"
2170 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2171
2172 (define-public python2-pybugz
2173 (package
2174 (name "python2-pybugz")
2175 (version "0.6.11")
2176 (source (origin
2177 (method url-fetch)
2178 (uri (string-append
2179 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2180 version ".tar.gz"))
2181 (sha256
2182 (base32
2183 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2184 (patches (search-patches "pybugz-stty.patch"
2185 "pybugz-encode-error.patch"))))
2186 (build-system python-build-system)
2187 (arguments
2188 `(#:python ,python-2 ; SyntaxError with Python 3
2189 #:tests? #f)) ; no 'test' sub-command
2190 (propagated-inputs
2191 `(("element-tree" ,python2-element-tree)))
2192 (synopsis "Python and command-line interface to Bugzilla")
2193 (description
2194 "PyBugz is a Python library and command-line tool to query the Bugzilla
2195 bug tracking system. It is meant as an aid to speed up interaction with the
2196 bug tracker.")
2197 (home-page "http://www.liquidx.net/pybugz/")
2198 (license license:gpl2)))
2199
2200 (define-public python2-enum
2201 (package
2202 (name "python2-enum")
2203 (version "0.4.6")
2204 (source (origin
2205 (method url-fetch)
2206 (uri (pypi-uri "enum" version))
2207 (sha256
2208 (base32
2209 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2210 (build-system python-build-system)
2211 (arguments
2212 `(#:python ,python-2))
2213 (home-page "https://pypi.org/project/enum/")
2214 (synopsis "Robust enumerated type support in Python")
2215 (description
2216 "This provides a module for robust enumerations in Python. It has
2217 been superseded by the Python standard library and is provided only for
2218 compatibility.")
2219 ;; Choice of either license.
2220 (license (list license:gpl3+ license:psfl))))
2221
2222 (define-public python-enum34
2223 (package
2224 (name "python-enum34")
2225 (version "1.1.6")
2226 (source
2227 (origin
2228 (method url-fetch)
2229 (uri (pypi-uri "enum34" version))
2230 (sha256
2231 (base32
2232 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2233 (build-system python-build-system)
2234 (home-page "https://pypi.org/project/enum34/")
2235 (synopsis "Backported Python 3.4 Enum")
2236 (description
2237 "Enum34 is the new Python stdlib enum module available in Python 3.4
2238 backported for previous versions of Python from 2.4 to 3.3.")
2239 (license license:bsd-3)))
2240
2241 (define-public python2-enum34
2242 (package-with-python2 python-enum34))
2243
2244 (define-public python-parse-type
2245 (package
2246 (name "python-parse-type")
2247 (version "0.4.2")
2248 (source
2249 (origin
2250 (method url-fetch)
2251 (uri (pypi-uri "parse_type" version))
2252 (sha256
2253 (base32
2254 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2255 (build-system python-build-system)
2256 (propagated-inputs
2257 `(("python-six" ,python-six)
2258 ("python-parse" ,python-parse)))
2259 (native-inputs
2260 `(("python-pytest" ,python-pytest)
2261 ("python-pytest-runner" ,python-pytest-runner)))
2262 (home-page "https://github.com/jenisys/parse_type")
2263 (synopsis "Extended parse module")
2264 (description
2265 "Parse_type extends the python parse module.")
2266 (properties
2267 `((python2-variant . ,(delay python2-parse-type))))
2268 (license license:bsd-3)))
2269
2270 (define-public python2-parse-type
2271 (let ((base (package-with-python2
2272 (strip-python2-variant python-parse-type))))
2273 (package (inherit base)
2274 (propagated-inputs
2275 `(("python2-enum34" ,python2-enum34)
2276 ,@(package-propagated-inputs base))))))
2277
2278 (define-public python-parse
2279 (package
2280 (name "python-parse")
2281 (version "1.18.0")
2282 (source
2283 (origin
2284 (method url-fetch)
2285 (uri (pypi-uri "parse" version))
2286 (sha256
2287 (base32
2288 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2289 (build-system python-build-system)
2290 (arguments
2291 `(#:phases
2292 (modify-phases %standard-phases
2293 (replace 'check
2294 (lambda _ (invoke "python" "test_parse.py"))))))
2295 (home-page "https://github.com/r1chardj0n3s/parse")
2296 (synopsis "Parse strings")
2297 (description
2298 "Parse strings using a specification based on the Python @code{format()}
2299 syntax.")
2300 (license license:x11)))
2301
2302 (define-public python-polib
2303 (package
2304 (name "python-polib")
2305 (version "1.1.0")
2306 (source (origin
2307 (method url-fetch)
2308 (uri (pypi-uri "polib" version))
2309 (sha256
2310 (base32
2311 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2312 (build-system python-build-system)
2313 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2314 (synopsis "Manipulate, create and modify gettext files")
2315 (description "Polib can manipulate any gettext format (po, pot and mo)
2316 files. It can be used to create po files from scratch or to modify
2317 existing ones.")
2318 (license license:expat)))
2319
2320 (define-public python2-polib
2321 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2322 (package
2323 (inherit base)
2324 (arguments `(,@(package-arguments base)
2325 ;; Tests don't work with python2.
2326 #:tests? #f)))))
2327
2328 (define-public python-poyo
2329 (package
2330 (name "python-poyo")
2331 (version "0.5.0")
2332 (source
2333 (origin
2334 (method url-fetch)
2335 (uri (pypi-uri "poyo" version))
2336 (sha256
2337 (base32
2338 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2339 (build-system python-build-system)
2340 (home-page "https://github.com/hackebrot/poyo")
2341 (synopsis "Lightweight YAML Parser for Python")
2342 (description
2343 "This package provides a lightweight YAML Parser for Python. It supports
2344 only a chosen subset of the YAML format that is required to parse cookiecutter
2345 user configuration files. It does not have support for serializing into YAML
2346 and is not compatible with JSON.")
2347 (license license:expat)))
2348
2349 (define-public scons
2350 (package
2351 (name "scons")
2352 (version "3.0.4")
2353 (source (origin
2354 (method git-fetch)
2355 (uri (git-reference
2356 (url "https://github.com/SCons/scons")
2357 (commit version)))
2358 (file-name (git-file-name name version))
2359 (sha256
2360 (base32
2361 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2362 (build-system python-build-system)
2363 (arguments
2364 `(#:use-setuptools? #f ; still relies on distutils
2365 #:tests? #f ; no 'python setup.py test' command
2366 #:phases
2367 (modify-phases %standard-phases
2368 (add-before 'build 'bootstrap
2369 (lambda _
2370 (substitute* "src/engine/SCons/compat/__init__.py"
2371 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2372 "sys.modules[new] = __import__(old)"))
2373 (substitute* "src/engine/SCons/Platform/__init__.py"
2374 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2375 "mod = __import__(full_name)"))
2376 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2377 (chdir "build/scons")
2378 #t)))))
2379 (home-page "https://scons.org/")
2380 (synopsis "Software construction tool written in Python")
2381 (description
2382 "SCons is a software construction tool. Think of SCons as an improved,
2383 cross-platform substitute for the classic Make utility with integrated
2384 functionality similar to autoconf/automake and compiler caches such as ccache.
2385 In short, SCons is an easier, more reliable and faster way to build
2386 software.")
2387 (license license:x11)))
2388
2389 (define-public scons-python2
2390 (package
2391 (inherit (package-with-python2 scons))
2392 (name "scons-python2")))
2393
2394 (define-public python-extension-helpers
2395 (package
2396 (name "python-extension-helpers")
2397 (version "0.1")
2398 (source
2399 (origin
2400 (method url-fetch)
2401 (uri (pypi-uri "extension-helpers" version))
2402 (sha256
2403 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2404 (build-system python-build-system)
2405 (native-inputs
2406 `(("coverage" ,python-coverage)
2407 ("pytest" ,python-pytest-astropy)
2408 ("pytest-cov" ,python-pytest-cov)
2409 ("setuptools-scm" ,python-setuptools-scm)))
2410 (home-page "https://github.com/astropy/astropy-helpers")
2411 (synopsis
2412 "Utilities for building and installing packages in the Astropy ecosystem")
2413 (description
2414 "The extension-helpers package includes many build, installation, and
2415 documentation-related tools used by the Astropy project.")
2416 (license license:bsd-3)))
2417
2418 (define-public python-extras
2419 (package
2420 (name "python-extras")
2421 (version "1.0.0")
2422 (source
2423 (origin
2424 (method url-fetch)
2425 (uri (pypi-uri "extras" version))
2426 (sha256
2427 (base32
2428 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2429 (build-system python-build-system)
2430 (arguments
2431 ;; FIXME: Circular dependency on testtools.
2432 '(#:tests? #f))
2433 (home-page "https://github.com/testing-cabal/extras")
2434 (synopsis "Useful extensions to the Python standard library")
2435 (description
2436 "Extras is a set of extensions to the Python standard library.")
2437 (license license:expat)))
2438
2439 (define-public python2-extras
2440 (package-with-python2 python-extras))
2441
2442 (define-public python-mimeparse
2443 (package
2444 (name "python-mimeparse")
2445 (version "1.6.0")
2446 (source
2447 (origin
2448 (method url-fetch)
2449 (uri (pypi-uri "python-mimeparse" version))
2450 (sha256
2451 (base32
2452 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2453 (build-system python-build-system)
2454 (arguments
2455 '(#:phases
2456 (modify-phases %standard-phases
2457 (replace 'check
2458 (lambda _
2459 (invoke "./mimeparse_test.py"))))))
2460 (home-page
2461 "https://github.com/dbtsai/python-mimeparse")
2462 (synopsis "Python library for parsing MIME types")
2463 (description
2464 "Mimeparse provides basic functions for parsing MIME type names and
2465 matching them against a list of media-ranges.")
2466 (license license:expat)))
2467
2468 (define-public python2-mimeparse
2469 (package-with-python2 python-mimeparse))
2470
2471 (define-public python-miniboa
2472 (package
2473 (name "python-miniboa")
2474 (version "1.0.7")
2475 (source
2476 (origin
2477 (method url-fetch)
2478 (uri (pypi-uri "miniboa" version))
2479 (sha256
2480 (base32
2481 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2482 (build-system python-build-system)
2483 (home-page "https://github.com/shmup/miniboa")
2484 (synopsis "Simple, single-threaded Telnet server")
2485 (description
2486 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2487 server.")
2488 (license license:asl2.0)))
2489
2490 (define-public python2-miniboa
2491 (package-with-python2 python-miniboa))
2492
2493 (define-public python-pafy
2494 (package
2495 (name "python-pafy")
2496 (version "0.5.3.1")
2497 (source
2498 (origin
2499 (method url-fetch)
2500 (uri (pypi-uri "pafy" version))
2501 (sha256
2502 (base32
2503 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2504 (build-system python-build-system)
2505 (arguments
2506 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2507 (propagated-inputs
2508 ;; Youtube-dl is a python package which is imported in the file
2509 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2510 `(("youtube-dl" ,youtube-dl)))
2511 (home-page "https://np1.github.io/pafy/")
2512 (synopsis "Retrieve YouTube content and metadata")
2513 (description
2514 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2515 (license license:lgpl3+)))
2516
2517 (define-public python2-funcsigs
2518 (package
2519 (name "python2-funcsigs")
2520 (version "1.0.2")
2521 (source (origin
2522 (method url-fetch)
2523 (uri (pypi-uri "funcsigs" version))
2524 (sha256
2525 (base32
2526 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2527 (build-system python-build-system)
2528 (arguments
2529 `(#:python ,python-2))
2530 (native-inputs
2531 `(("python2-unittest2" ,python2-unittest2)))
2532 (home-page "http://funcsigs.readthedocs.org")
2533 (synopsis "Python function signatures from PEP362")
2534 (description
2535 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2536 (license license:asl2.0)))
2537
2538 (define-public python2-funcsigs-bootstrap
2539 (package
2540 (inherit python2-funcsigs)
2541 (name "python2-funcsigs-bootstrap")
2542 (native-inputs `())
2543 (arguments
2544 `(#:tests? #f
2545 ,@(package-arguments python2-funcsigs)))))
2546
2547 (define-public python-py
2548 (package
2549 (name "python-py")
2550 (version "1.8.1")
2551 (source
2552 (origin
2553 (method url-fetch)
2554 (uri (pypi-uri "py" version))
2555 (sha256
2556 (base32
2557 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2558 (build-system python-build-system)
2559 (arguments
2560 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2561 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2562 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2563 ;; Is this module globally installed?"
2564 '(#:tests? #f))
2565 (native-inputs
2566 `(("python-setuptools-scm" ,python-setuptools-scm)))
2567 (home-page "https://github.com/pytest-dev/py")
2568 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2569 (description
2570 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2571 code introspection, and logging.")
2572 (license license:expat)))
2573
2574 (define-public python-py-next
2575 (package
2576 (inherit python-py)
2577 (version "1.9.0")
2578 (source
2579 (origin
2580 (method url-fetch)
2581 (uri (pypi-uri "py" version))
2582 (sha256
2583 (base32
2584 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
2585
2586 (define-public python2-py
2587 (package-with-python2 python-py))
2588
2589 ;; Recent versions of python-fixtures and python-testrepository need
2590 ;; python-pbr for packaging, which itself needs these two packages for
2591 ;; testing.
2592 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2593 ;; same source, just without any test dependencies and with tests disabled.
2594 ;; python-pbr-minmal is then used to package python-fixtures and
2595 ;; python-testrepository.
2596 ;; Strictly speaking we currently could remove the test-requirements from the
2597 ;; normal python-pbr package (and save this package) since test are disabled
2598 ;; there anyway. But this may change in future.
2599 (define-public python-pbr-minimal
2600 (package
2601 (name "python-pbr-minimal")
2602 (version "3.0.1")
2603 (source
2604 (origin
2605 (method url-fetch)
2606 (uri (pypi-uri "pbr" version))
2607 (sha256
2608 (base32
2609 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2610 (build-system python-build-system)
2611 (arguments
2612 `(#:tests? #f))
2613 (home-page "https://docs.openstack.org/pbr/latest/")
2614 (synopsis "Minimal build of python-pbr used for bootstrapping")
2615 (description
2616 "Used only for bootstrapping python2-pbr, you should not need this.")
2617 (license license:asl2.0)))
2618
2619 (define-public python-pbr
2620 (package
2621 (inherit python-pbr-minimal)
2622 (name "python-pbr")
2623 (arguments
2624 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2625 (propagated-inputs
2626 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2627 (native-inputs
2628 `(("python-fixtures" ,python-fixtures-bootstrap)
2629 ;; discover, coverage, hacking, subunit
2630 ("python-mock" ,python-mock)
2631 ("python-six" ,python-six)
2632 ("python-sphinx" ,python-sphinx)
2633 ("python-testrepository" ,python-testrepository-bootstrap)
2634 ("python-testresources" ,python-testresources-bootstrap)
2635 ("python-testscenarios" ,python-testscenarios-bootstrap)
2636 ("python-testtools" ,python-testtools-bootstrap)
2637 ("python-virtualenv" ,python-virtualenv)))
2638 (synopsis "Enhance the default behavior of Python’s setuptools")
2639 (description
2640 "Python Build Reasonableness (PBR) is a library that injects some useful
2641 and sensible default behaviors into your setuptools run. It will set
2642 versions, process requirements files and generate AUTHORS and ChangeLog file
2643 from git information.
2644 ")))
2645
2646 (define-public python-pyrsistent
2647 (package
2648 (name "python-pyrsistent")
2649 (version "0.16.0")
2650 (home-page "https://github.com/tobgu/pyrsistent")
2651 (source (origin
2652 (method url-fetch)
2653 (uri (pypi-uri "pyrsistent" version))
2654 (sha256
2655 (base32
2656 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2657 (build-system python-build-system)
2658 (arguments
2659 '(#:phases (modify-phases %standard-phases
2660 ;; The package works fine with newer Pytest and Hypothesis, but
2661 ;; has pinned older versions to stay compatible with Python 2.
2662 (add-before 'check 'loosen-pytest-requirement
2663 (lambda _
2664 (substitute* "setup.py"
2665 (("pytest<5") "pytest")
2666 (("hypothesis<5") "hypothesis"))
2667 #t)))))
2668 (native-inputs
2669 `(("python-hypothesis" ,python-hypothesis)
2670 ("python-pytest" ,python-pytest)
2671 ("python-pytest-runner" ,python-pytest-runner)))
2672 (propagated-inputs
2673 `(("python-six" ,python-six)))
2674 (synopsis "Persistent data structures for Python")
2675 (description
2676 "Pyrsistent is a number of persistent collections (by some referred to as
2677 functional data structures). Persistent in the sense that they are immutable.
2678
2679 All methods on a data structure that would normally mutate it instead return a
2680 new copy of the structure containing the requested updates. The original
2681 structure is left untouched.")
2682 (license license:expat)))
2683
2684 (define-public python2-pyrsistent
2685 (package-with-python2 python-pyrsistent))
2686
2687 (define-public python-exif-read
2688 (package
2689 (name "python-exif-read")
2690 (version "2.1.2")
2691 (source (origin
2692 (method url-fetch)
2693 (uri (pypi-uri "ExifRead" version))
2694 (sha256
2695 (base32
2696 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2697 (build-system python-build-system)
2698 (arguments `(#:tests? #f)) ; no tests
2699 (home-page "https://github.com/ianare/exif-py")
2700 (synopsis "Python library to extract EXIF data from image files")
2701 (description
2702 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2703 files.")
2704 (license license:bsd-3)))
2705
2706 (define-public python2-exif-read
2707 (package-with-python2 python-exif-read))
2708
2709 (define-public python-pyld
2710 (package
2711 (name "python-pyld")
2712 (version "1.0.5")
2713 (source (origin
2714 (method url-fetch)
2715 (uri (pypi-uri "PyLD" version))
2716 (sha256
2717 (base32
2718 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2719 (build-system python-build-system)
2720 (home-page "https://github.com/digitalbazaar/pyld")
2721 (synopsis "Python implementation of the JSON-LD specification")
2722 (description
2723 "PyLD is an implementation of the JSON-LD specification.")
2724 (license license:bsd-3)))
2725
2726 (define-public python2-pyld
2727 (package-with-python2 python-pyld))
2728
2729 (define-public python-cli-helpers
2730 (package
2731 (name "python-cli-helpers")
2732 (version "2.0.1")
2733 (source
2734 (origin
2735 ;; There's no source tarball on PyPI.
2736 (method git-fetch)
2737 (uri (git-reference
2738 (url "https://github.com/dbcli/cli_helpers")
2739 (commit (string-append "v" version))))
2740 (file-name (git-file-name name version))
2741 (sha256
2742 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2743 (build-system python-build-system)
2744 (native-inputs
2745 `(("python-pytest" ,python-pytest)))
2746 (propagated-inputs
2747 `(("python-wcwidth" ,python-wcwidth)
2748 ("python-configobj" ,python-configobj)
2749 ("python-tabulate" ,python-tabulate)
2750 ("python-terminaltables" ,python-terminaltables)))
2751 (home-page "https://github.com/dbcli/cli_helpers")
2752 (synopsis "Helpers for building command-line apps")
2753 (description
2754 "CLI Helpers is a Python package that makes it easy to perform common
2755 tasks when building command-line apps. It's a helper library for command-line
2756 interfaces.")
2757 (license license:bsd-3)))
2758
2759 (define-public python-click
2760 (package
2761 (name "python-click")
2762 (version "7.1.2")
2763 (source
2764 (origin
2765 (method url-fetch)
2766 (uri (pypi-uri "click" version))
2767 (sha256
2768 (base32
2769 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2770 (build-system python-build-system)
2771 (arguments
2772 `(#:phases
2773 (modify-phases %standard-phases
2774 (add-after 'unpack 'fix-paths
2775 (lambda* (#:key inputs #:allow-other-keys)
2776 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2777 "cross-libc" "libc"))))
2778 (substitute* "src/click/_unicodefun.py"
2779 (("'locale'")
2780 (string-append "'" glibc "/bin/locale'"))))
2781 #t))
2782 (replace 'check
2783 (lambda _
2784 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2785 (invoke "python" "-m" "pytest"))))))
2786 (native-inputs
2787 `(("python-pytest" ,python-pytest)))
2788 (home-page "https://palletsprojects.com/p/click/")
2789 (synopsis "Command line library for Python")
2790 (description
2791 "Click is a Python package for creating command line interfaces in a
2792 composable way with as little code as necessary. Its name stands for
2793 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2794 with sensible defaults out of the box.")
2795 (license license:bsd-3)))
2796
2797 (define-public python2-click
2798 (package-with-python2 python-click))
2799
2800 (define-public python-click-5
2801 (package (inherit python-click)
2802 (name "python-click")
2803 (version "5.1")
2804 (source
2805 (origin
2806 (method url-fetch)
2807 (uri (pypi-uri "click" version))
2808 (sha256
2809 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2810 (arguments `())))
2811
2812 (define-public python-vcversioner
2813 (package
2814 (name "python-vcversioner")
2815 (version "2.16.0.0")
2816 (source
2817 (origin
2818 (method url-fetch)
2819 (uri (pypi-uri "vcversioner" version))
2820 (sha256
2821 (base32
2822 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2823 (build-system python-build-system)
2824 (synopsis "Python library for version number discovery")
2825 (description "Vcversioner is a Python library that inspects tagging
2826 information in a variety of version control systems in order to discover
2827 version numbers.")
2828 (home-page "https://github.com/habnabit/vcversioner")
2829 (license license:isc)))
2830
2831 (define-public python2-vcversioner
2832 (package-with-python2 python-vcversioner))
2833
2834 (define-public python-jdcal
2835 (package
2836 (name "python-jdcal")
2837 (version "1.4")
2838 (source
2839 (origin
2840 (method url-fetch)
2841 (uri (pypi-uri "jdcal" version))
2842 (sha256
2843 (base32
2844 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2845 (build-system python-build-system)
2846 (arguments
2847 `(#:phases (modify-phases %standard-phases
2848 (replace 'check
2849 (lambda _
2850 (invoke "pytest"))))))
2851 (native-inputs
2852 `(("python-pytest" ,python-pytest)))
2853 (home-page "https://github.com/phn/jdcal")
2854 (synopsis "Functions to convert between Julian dates Gregorian dates")
2855 (description "This Python library provides functions for converting
2856 between Julian dates and Gregorian dates.")
2857 (license license:bsd-2)))
2858
2859 (define-public python2-jdcal
2860 (package-with-python2 python-jdcal))
2861
2862 (define-public python-jsondiff
2863 (package
2864 (name "python-jsondiff")
2865 (version "1.2.0")
2866 (source
2867 (origin
2868 (method url-fetch)
2869 (uri (pypi-uri "jsondiff" version))
2870 (sha256
2871 (base32
2872 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2873 (build-system python-build-system)
2874 (native-inputs
2875 `(("python-nose" ,python-nose)
2876 ("python-nose-random" ,python-nose-random)))
2877 (home-page
2878 "https://github.com/fzumstein/jsondiff")
2879 (synopsis "Compare JSON and JSON-like structures in Python")
2880 (description "@code{jsondiff} is a Python library which lets you
2881 compare, diff, and patch JSON and JSON-like structures in Python.")
2882 (license license:expat)))
2883
2884 (define-public python-jsonschema
2885 (package
2886 (name "python-jsonschema")
2887 (version "3.2.0")
2888 (source (origin
2889 (method url-fetch)
2890 (uri (pypi-uri "jsonschema" version))
2891 (sha256
2892 (base32
2893 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2894 (build-system python-build-system)
2895 (arguments
2896 '(#:phases
2897 (modify-phases %standard-phases
2898 (replace 'check
2899 (lambda* (#:key inputs outputs #:allow-other-keys)
2900 (add-installed-pythonpath inputs outputs)
2901 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2902 (invoke "trial" "jsonschema"))))))
2903 (native-inputs
2904 `(("python-setuptools_scm" ,python-setuptools-scm)
2905 ("python-twisted" ,python-twisted)))
2906 (propagated-inputs
2907 `(("python-attrs" ,python-attrs)
2908 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2909 ("python-pyrsistent" ,python-pyrsistent)
2910 ("python-six" ,python-six)))
2911 (home-page "https://github.com/Julian/jsonschema")
2912 (synopsis "Implementation of JSON Schema for Python")
2913 (description
2914 "Jsonschema is an implementation of JSON Schema for Python.")
2915 (license license:expat)
2916 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2917
2918 (define-public python2-jsonschema
2919 (let ((jsonschema (package-with-python2
2920 (strip-python2-variant python-jsonschema))))
2921 (package (inherit jsonschema)
2922 (propagated-inputs
2923 `(("python2-functools32" ,python2-functools32)
2924 ,@(package-propagated-inputs jsonschema))))))
2925
2926 (define-public python-schema
2927 (package
2928 (name "python-schema")
2929 (version "0.6.6")
2930 (source
2931 (origin
2932 (method url-fetch)
2933 (uri (pypi-uri "schema" version))
2934 (sha256
2935 (base32
2936 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2937 (build-system python-build-system)
2938 (native-inputs
2939 `(("python-pytest" ,python-pytest)))
2940 (home-page "https://github.com/keleshev/schema")
2941 (synopsis "Simple data validation library")
2942 (description
2943 "@code{python-schema} is a library for validating Python data
2944 structures, such as those obtained from config-files, forms, external
2945 services or command-line parsing, converted from JSON/YAML (or
2946 something else) to Python data-types.")
2947 (license license:psfl)))
2948
2949 (define-public python2-schema
2950 (package-with-python2 python-schema))
2951
2952 (define-public python-schema-0.5
2953 (package (inherit python-schema)
2954 (version "0.5.0")
2955 (source
2956 (origin
2957 (method url-fetch)
2958 (uri (pypi-uri "schema" version))
2959 (sha256
2960 (base32
2961 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2962
2963 (define-public python2-schema-0.5
2964 (package-with-python2 python-schema-0.5))
2965
2966 (define-public python-kitchen
2967 (package
2968 (name "python-kitchen")
2969 (version "1.2.5")
2970 (source
2971 (origin
2972 (method url-fetch)
2973 (uri (pypi-uri "kitchen" version))
2974 (sha256
2975 (base32
2976 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2977 (build-system python-build-system)
2978 (propagated-inputs
2979 `(("python-chardet" ,python-chardet)))
2980 (home-page "https://github.com/fedora-infra/kitchen")
2981 (synopsis "Python API for snippets")
2982 (description "@code{kitchen} module provides a python API for all sorts of
2983 little useful snippets of code that everybody ends up writing for their projects
2984 but never seem big enough to build an independent release. Use kitchen and stop
2985 cutting and pasting that code over and over.")
2986 (license (list license:lgpl2.1+
2987 ;; subprocess.py, test_subprocess.py,
2988 ;; kitchen/pycompat25/defaultdict.py:
2989 license:psfl))))
2990
2991 (define-public python2-kitchen
2992 (package-with-python2 python-kitchen))
2993
2994 (define-public python-unidecode
2995 (package
2996 (name "python-unidecode")
2997 (version "1.1.1")
2998 (source (origin
2999 (method url-fetch)
3000 (uri (pypi-uri "Unidecode" version))
3001 (sha256
3002 (base32
3003 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3004 (build-system python-build-system)
3005 (home-page "https://pypi.org/project/Unidecode/")
3006 (synopsis "ASCII transliterations of Unicode text")
3007 (description
3008 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3009 useful when integrating with legacy code that doesn't support Unicode, or for
3010 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3011 machine identifiers from human-readable Unicode strings that should still be
3012 somewhat intelligible.")
3013 (license license:gpl2+)))
3014
3015 (define-public python2-unidecode
3016 (package-with-python2 python-unidecode))
3017
3018 (define-public python-text-unidecode
3019 (package
3020 (name "python-text-unidecode")
3021 (version "1.3")
3022 (source (origin
3023 (method url-fetch)
3024 (uri (pypi-uri "text-unidecode" version))
3025 (sha256
3026 (base32
3027 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3028 (build-system python-build-system)
3029 (arguments
3030 '(#:phases (modify-phases %standard-phases
3031 (replace 'check
3032 (lambda _
3033 (setenv "PYTHONPATH"
3034 (string-append "./build/lib:"
3035 (getenv "PYTHONPATH")))
3036 (invoke "pytest" "-vv"))))))
3037 (native-inputs
3038 `(("python-pytest" ,python-pytest)))
3039 (home-page "https://github.com/kmike/text-unidecode/")
3040 (synopsis "Decode Unicode data")
3041 (description
3042 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3043 Perl library. It can create ASCII representations of Unicode data. In general
3044 users should prefer the @code{python-unidecode} package which offers better
3045 memory usage and transliteration quality.")
3046 ;; The user can choose either license.
3047 (license (list license:clarified-artistic license:gpl2+))))
3048
3049 (define-public python2-text-unidecode
3050 (package-with-python2 python-text-unidecode))
3051
3052 (define-public python-pyjwt
3053 (package
3054 (name "python-pyjwt")
3055 (version "1.7.1")
3056 (source
3057 (origin
3058 (method url-fetch)
3059 (uri (pypi-uri "PyJWT" version))
3060 (sha256
3061 (base32
3062 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3063 (modules '((guix build utils)))
3064 (snippet
3065 '(begin
3066 (for-each delete-file-recursively
3067 (find-files "." "\\.pyc$"))
3068 #t))))
3069 (build-system python-build-system)
3070 (arguments
3071 '(#:phases (modify-phases %standard-phases
3072 (replace 'check
3073 (lambda _
3074 ;; Mimic upstream commit 3a20892442b34c7 to get
3075 ;; rid of dependency on pytest-runner < 5.0.
3076 ;; Remove substitution for PyJWT > 1.7.1.
3077 (substitute* "setup.py"
3078 ((".*pytest-runner.*")
3079 ""))
3080 (invoke "pytest" "-vv"))))))
3081 (native-inputs
3082 `(("python-pytest" ,python-pytest)
3083 ("python-pytest-cov" ,python-pytest-cov)))
3084 (home-page "https://github.com/progrium/pyjwt")
3085 (synopsis "JSON Web Token implementation in Python")
3086 (description
3087 "PyJWT is a JSON Web Token implementation written in Python.")
3088 (license license:expat)))
3089
3090 (define-public python2-pyjwt
3091 (package-with-python2 python-pyjwt))
3092
3093 (define-public python-pykka
3094 (package
3095 (name "python-pykka")
3096 (version "1.2.1")
3097 (source
3098 (origin
3099 (method url-fetch)
3100 (uri (pypi-uri "Pykka" version))
3101 (sha256
3102 (base32
3103 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
3104 (build-system python-build-system)
3105 (native-inputs
3106 `(("python-mock" ,python-mock)
3107 ("python-nose" ,python-nose)
3108 ("python-gevent" ,python-gevent)
3109 ("python-eventlet" ,python-eventlet)))
3110 (home-page "https://www.pykka.org/")
3111 (synopsis "Pykka is a Python implementation of the actor model")
3112 (description
3113 "Pykka is a Python implementation of the actor model.
3114 The actor model introduces some simple rules to control the sharing
3115 of state and cooperation between execution units, which makes it
3116 easier to build concurrent applications.")
3117 (license license:asl2.0)))
3118
3119 (define-public python-pymsgbox
3120 (package
3121 (name "python-pymsgbox")
3122 (version "1.0.6")
3123 (source
3124 (origin
3125 (method git-fetch)
3126 (uri (git-reference
3127 ;; LICENSE.txt is not present on pypi
3128 (url "https://github.com/asweigart/PyMsgBox")
3129 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3130 (file-name (git-file-name name version))
3131 (sha256
3132 (base32
3133 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3134 (arguments
3135 ;; Circular dependency to run tests:
3136 ;; Tests need pyautogui, which depends on pymsgbox.
3137 '(#:tests? #f))
3138 (build-system python-build-system)
3139 (home-page "https://github.com/asweigart/PyMsgBox")
3140 (synopsis "Python module for JavaScript-like message boxes")
3141 (description
3142 "PyMsgBox is a simple, cross-platform, pure Python module for
3143 JavaScript-like message boxes. Types of dialog boxes include:
3144 @enumerate
3145 @item alert
3146 @item confirm
3147 @item prompt
3148 @item password
3149 @end enumerate
3150 ")
3151 (license license:bsd-3)))
3152
3153 (define-public python-pympler
3154 (package
3155 (name "python-pympler")
3156 (home-page "https://pythonhosted.org/Pympler/")
3157 (version "0.8")
3158 (source (origin
3159 (method url-fetch)
3160 (uri (pypi-uri "Pympler" version))
3161 (sha256
3162 (base32
3163 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3164 (build-system python-build-system)
3165 (arguments
3166 `(#:phases (modify-phases %standard-phases
3167 (delete 'check)
3168 (add-after 'install 'check
3169 (lambda* (#:key inputs outputs #:allow-other-keys)
3170 (add-installed-pythonpath inputs outputs)
3171 (invoke "python" "setup.py" "test"))))))
3172 (synopsis "Measure, monitor and analyze memory behavior")
3173 (description
3174 "Pympler is a development tool to measure, monitor and analyze
3175 the memory behavior of Python objects in a running Python application.
3176
3177 By pympling a Python application, detailed insight in the size and the
3178 lifetime of Python objects can be obtained. Undesirable or unexpected
3179 runtime behavior like memory bloat and other @samp{pymples} can easily
3180 be identified.
3181
3182 A web profiling frontend exposes process statistics, garbage
3183 visualisation and class tracker statistics.")
3184 (license license:asl2.0)))
3185
3186 (define-public python2-pympler
3187 (package-with-python2 python-pympler))
3188
3189 (define-public python-itsdangerous
3190 (package
3191 (name "python-itsdangerous")
3192 (version "1.1.0")
3193 (source
3194 (origin
3195 (method url-fetch)
3196 (uri (pypi-uri "itsdangerous" version))
3197 (sha256
3198 (base32
3199 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3200 (build-system python-build-system)
3201 (home-page "https://palletsprojects.com/p/itsdangerous/")
3202 (synopsis "Python library for passing data to/from untrusted environments")
3203 (description
3204 "Itsdangerous provides various helpers to pass trusted data to untrusted
3205 environments and back.")
3206 (license license:bsd-3)))
3207
3208 (define-public python2-itsdangerous
3209 (package-with-python2 python-itsdangerous))
3210
3211 (define-public python-pyyaml
3212 (package
3213 (name "python-pyyaml")
3214 (version "5.3.1")
3215 (source
3216 (origin
3217 (method url-fetch)
3218 (uri (pypi-uri "PyYAML" version))
3219 (sha256
3220 (base32
3221 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3222 (build-system python-build-system)
3223 (inputs
3224 `(("libyaml" ,libyaml)))
3225 (home-page "https://pyyaml.org")
3226 (synopsis "YAML parser and emitter for Python")
3227 (description
3228 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3229 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3230 API, and sensible error messages. PyYAML supports standard YAML tags and
3231 provides Python-specific tags that represent an arbitrary Python object.")
3232 (license license:expat)))
3233
3234 (define-public python2-pyyaml
3235 (package-with-python2 python-pyyaml))
3236
3237 (define-public python-vine
3238 (package
3239 (name "python-vine")
3240 (version "1.1.4")
3241 (source
3242 (origin
3243 (method url-fetch)
3244 (uri (pypi-uri "vine" version))
3245 (sha256
3246 (base32
3247 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3248 (build-system python-build-system)
3249 (native-inputs
3250 `(("python-pytest" ,python-pytest)
3251 ("python-case" ,python-case)))
3252 (home-page "https://github.com/celery/vine")
3253 (synopsis "Promises for Python")
3254 (description
3255 "@code{vine} provides a special implementation of promises in that it can
3256 be used both for \"promise of a value\" and lazy evaluation. The biggest
3257 upside for this is that everything in a promise can also be a promise,
3258 e.g. filters, callbacks and errbacks can all be promises.")
3259 (license license:bsd-3)))
3260
3261 (define-public python-virtualenv
3262 (package
3263 (name "python-virtualenv")
3264 (version "20.2.1")
3265 (source
3266 (origin
3267 (method url-fetch)
3268 (uri (pypi-uri "virtualenv" version))
3269 (sha256
3270 (base32
3271 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3272 (build-system python-build-system)
3273 (native-inputs
3274 `(("python-mock" ,python-mock)
3275 ("python-pytest" ,python-pytest)
3276 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3277 ;; be an input at all". However, removing the input makes the build error:
3278 ;; File "setup.py", line 4, in <module>
3279 ;; raise RuntimeError("setuptools >= 41 required to build")
3280 ("python-setuptools" ,python-setuptools)
3281 ("python-setuptools-scm" ,python-setuptools-scm)))
3282 (propagated-inputs
3283 `(("python-appdirs" ,python-appdirs)
3284 ("python-distlib" ,python-distlib/next)
3285 ("python-filelock" ,python-filelock)
3286 ("python-six" ,python-six)
3287 ("python-importlib-metadata" ,python-importlib-metadata)))
3288 (home-page "https://virtualenv.pypa.io/")
3289 (synopsis "Virtual Python environment builder")
3290 (description
3291 "Virtualenv is a tool to create isolated Python environments.")
3292 (license license:expat)))
3293
3294 (define-public python-markupsafe
3295 (package
3296 (name "python-markupsafe")
3297 (version "1.1.1")
3298 (source
3299 (origin
3300 (method url-fetch)
3301 (uri (pypi-uri "MarkupSafe" version))
3302 (sha256
3303 (base32
3304 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3305 (build-system python-build-system)
3306 (arguments
3307 `(#:modules ((ice-9 ftw)
3308 (srfi srfi-1)
3309 (srfi srfi-26)
3310 (guix build utils)
3311 (guix build python-build-system))
3312 #:phases (modify-phases %standard-phases
3313 (replace 'check
3314 (lambda _
3315 (let ((cwd (getcwd))
3316 (libdir (find (cut string-prefix? "lib." <>)
3317 (scandir "build"))))
3318 (setenv "PYTHONPATH"
3319 (string-append cwd "/build/" libdir ":"
3320 (getenv "PYTHONPATH")))
3321 (invoke "pytest" "-vv")))))))
3322 (native-inputs
3323 `(("python-pytest" ,python-pytest)))
3324 (home-page "https://github.com/mitsuhiko/markupsafe")
3325 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3326 (description
3327 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3328 for Python.")
3329 (license license:bsd-3)))
3330
3331 (define-public python2-markupsafe
3332 (package-with-python2 python-markupsafe))
3333
3334 (define-public python-jinja2
3335 (package
3336 (name "python-jinja2")
3337 (version "2.11.2")
3338 (source
3339 (origin
3340 (method url-fetch)
3341 (uri (pypi-uri "Jinja2" version))
3342 (sha256
3343 (base32
3344 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3345 (build-system python-build-system)
3346 (arguments
3347 '(#:phases (modify-phases %standard-phases
3348 (replace 'check
3349 (lambda* (#:key tests? #:allow-other-keys)
3350 (if tests?
3351 (begin
3352 (setenv "PYTHONPATH"
3353 (string-append "./build/lib:"
3354 (getenv "PYTHONPATH")))
3355 (invoke "pytest" "-vv"))
3356 (format #t "test suite not run~%"))
3357 #t)))))
3358 (native-inputs
3359 `(("python-pytest" ,python-pytest)))
3360 (propagated-inputs
3361 `(("python-markupsafe" ,python-markupsafe)))
3362 (home-page "http://jinja.pocoo.org/")
3363 (synopsis "Python template engine")
3364 (description
3365 "Jinja2 is a small but fast and easy to use stand-alone template engine
3366 written in pure Python.")
3367 (license license:bsd-3)))
3368
3369 (define-public python2-jinja2
3370 (package-with-python2 python-jinja2))
3371
3372 (define-public python-jinja2-time
3373 (package
3374 (name "python-jinja2-time")
3375 (version "0.2.0")
3376 (source
3377 (origin
3378 (method url-fetch)
3379 (uri (pypi-uri "jinja2-time" version))
3380 (sha256
3381 (base32
3382 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3383 (build-system python-build-system)
3384 (propagated-inputs
3385 `(("python-arrow" ,python-arrow)
3386 ("python-jinja2" ,python-jinja2)))
3387 (home-page
3388 "https://github.com/hackebrot/jinja2-time")
3389 (synopsis "Jinja2 Extension for Dates and Times")
3390 (description
3391 "This package provides an extension for the template engine Jinja2. It
3392 adds a 'now' tag providing a convenient access to the arrow.now() API from
3393 templates. A format string can be provided to control the output.")
3394 (license license:expat)))
3395
3396 (define-public python-pystache
3397 (package
3398 (name "python-pystache")
3399 (version "0.5.4")
3400 (source (origin
3401 (method url-fetch)
3402 (uri (pypi-uri "pystache" version))
3403 (sha256
3404 (base32
3405 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3406 (build-system python-build-system)
3407 (arguments
3408 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3409 (home-page "http://defunkt.io/pystache/")
3410 (synopsis "Python logic-less template engine")
3411 (description
3412 "Pystache is a Python implementation of the framework agnostic,
3413 logic-free templating system Mustache.")
3414 (license license:expat)
3415 (properties `((python2-variant . ,(delay python2-pystache))))))
3416
3417 (define-public python2-pystache
3418 (package (inherit (package-with-python2
3419 (strip-python2-variant python-pystache)))
3420 (arguments
3421 `(#:python ,python-2
3422 #:phases
3423 (modify-phases %standard-phases
3424 (replace 'check
3425 (lambda _
3426 (invoke "python" "test_pystache.py"))))))))
3427
3428 (define-public python-joblib
3429 (package
3430 (name "python-joblib")
3431 (version "0.14.1")
3432 (source (origin
3433 (method url-fetch)
3434 (uri (pypi-uri "joblib" version))
3435 (sha256
3436 (base32
3437 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3438 (build-system python-build-system)
3439 (arguments
3440 `(#:phases
3441 (modify-phases %standard-phases
3442 (replace 'check
3443 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3444 (native-inputs
3445 `(("python-pytest" ,python-pytest)))
3446 (home-page "https://joblib.readthedocs.io/")
3447 (synopsis "Using Python functions as pipeline jobs")
3448 (description
3449 "Joblib is a set of tools to provide lightweight pipelining in Python.
3450 In particular, joblib offers: transparent disk-caching of the output values
3451 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3452 logging and tracing of the execution.")
3453 (license license:bsd-3)))
3454
3455 (define-public python2-joblib
3456 (package-with-python2 python-joblib))
3457
3458 (define-public python-daemon
3459 (package
3460 (name "python-daemon")
3461 (version "2.2.3")
3462 (source
3463 (origin
3464 (method url-fetch)
3465 (uri (pypi-uri "python-daemon" version))
3466 (sha256
3467 (base32
3468 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3469 (build-system python-build-system)
3470 (arguments
3471 `(#:phases
3472 (modify-phases %standard-phases
3473 (add-before 'check 'disable-tests
3474 (lambda _
3475 ;; FIXME: Determine why test fails
3476 (substitute* "test/test_daemon.py"
3477 (("test_detaches_process_context")
3478 "skip_test_detaches_process_context"))
3479 #t)))))
3480 (propagated-inputs
3481 `(("python-lockfile" ,python-lockfile)))
3482 (native-inputs
3483 `(("python-unittest2" ,python-unittest2)
3484 ("python-testtools" ,python-testtools)
3485 ("python-testscenarios" ,python-testscenarios)
3486 ("python-mock" ,python-mock)
3487 ("python-docutils" ,python-docutils)))
3488 (home-page "https://pagure.io/python-daemon/")
3489 (synopsis "Python library for making a Unix daemon process")
3490 (description "Python-daemon is a library that assists a Python program to
3491 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3492
3493 This library provides a @code{DaemonContext} class that manages the following
3494 important tasks for becoming a daemon process:
3495 @enumerate
3496 @item Detach the process into its own process group.
3497 @item Set process environment appropriate for running inside a chroot.
3498 @item Renounce suid and sgid privileges.
3499 @item Close all open file descriptors.
3500 @item Change the working directory, uid, gid, and umask.
3501 @item Set appropriate signal handlers.
3502 @item Open new file descriptors for stdin, stdout, and stderr.
3503 @item Manage a specified PID lock file.
3504 @item Register cleanup functions for at-exit processing.
3505 @end enumerate")
3506 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3507 (license (list license:asl2.0 license:gpl3+))))
3508
3509 (define-public python-anytree
3510 (package
3511 (name "python-anytree")
3512 (version "2.8.0")
3513 (source (origin
3514 (method url-fetch)
3515 (uri (pypi-uri "anytree" version))
3516 (sha256
3517 (base32
3518 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3519 (build-system python-build-system)
3520 (propagated-inputs
3521 `(("python-six" ,python-six)))
3522 (native-inputs
3523 `(;; For tests.
3524 ("graphviz" ,graphviz) ;for 'dot'
3525 ("python-nose" ,python-nose)))
3526 (home-page "https://github.com/c0fec0de/anytree")
3527 (synopsis "Lightweight tree data library")
3528 (description
3529 "@code{anytree} is a simple, lightweight, and extensible tree data
3530 structure for Python.")
3531 (license license:asl2.0)))
3532
3533 (define-public python-docutils
3534 (package
3535 (name "python-docutils")
3536 (version "0.16")
3537 (source
3538 (origin
3539 (method url-fetch)
3540 (uri (pypi-uri "docutils" version))
3541 (sha256
3542 (base32
3543 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3544 (build-system python-build-system)
3545 (arguments
3546 '(#:phases (modify-phases %standard-phases
3547 (replace 'check
3548 (lambda* (#:key tests? #:allow-other-keys)
3549 (if tests?
3550 (invoke "python" "test/alltests.py")
3551 (format #t "test suite not run~%"))
3552 #t)))))
3553 (home-page "http://docutils.sourceforge.net/")
3554 (synopsis "Python Documentation Utilities")
3555 (description
3556 "Docutils is a modular system for processing documentation into useful
3557 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3558 easy to use markup language, for input.
3559
3560 This package provides tools for converting @file{.rst} files to other formats
3561 via commands such as @command{rst2man}, as well as supporting Python code.")
3562 ;; Most of the source code is public domain, but some source files are
3563 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3564 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3565
3566 (define-public python2-docutils
3567 (package-with-python2 python-docutils))
3568
3569 ;; python2-sphinx fails its test suite with newer versions.
3570 (define-public python2-docutils-0.14
3571 (package
3572 (inherit python2-docutils)
3573 (version "0.14")
3574 (source (origin
3575 (method url-fetch)
3576 (uri (pypi-uri "docutils" version))
3577 (sha256
3578 (base32
3579 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3580
3581 (define-public python-restructuredtext-lint
3582 (package
3583 (name "python-restructuredtext-lint")
3584 (version "1.3.0")
3585 (source
3586 (origin
3587 (method url-fetch)
3588 (uri (pypi-uri "restructuredtext-lint" version))
3589 (sha256
3590 (base32
3591 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3592 (build-system python-build-system)
3593 (arguments
3594 `(#:phases
3595 (modify-phases %standard-phases
3596 (delete 'check)
3597 (add-after 'install 'check
3598 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3599 (when tests?
3600 (add-installed-pythonpath inputs outputs)
3601 (invoke "nosetests" "-v"))
3602 #t)))))
3603 (propagated-inputs
3604 `(("python-docutils" ,python-docutils)))
3605 (native-inputs
3606 `(("python-nose" ,python-nose)))
3607 (home-page "https://github.com/twolfson/restructuredtext-lint")
3608 (synopsis "reStructuredText linter")
3609 (description "This package provides a linter for the reStructuredText
3610 format.")
3611 (license license:unlicense)))
3612
3613 (define-public python-doc8
3614 (package
3615 (name "python-doc8")
3616 (version "0.8.0")
3617 (source
3618 (origin
3619 (method url-fetch)
3620 (uri (pypi-uri "doc8" version))
3621 (sha256
3622 (base32
3623 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3624 (build-system python-build-system)
3625 (arguments
3626 `(#:phases
3627 (modify-phases %standard-phases
3628 (delete 'check)
3629 (add-after 'install 'check
3630 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3631 (when tests?
3632 (add-installed-pythonpath inputs outputs)
3633 (invoke "pytest" "-v"))
3634 #t)))))
3635 (propagated-inputs
3636 `(("python-chardet" ,python-chardet)
3637 ("python-docutils" ,python-docutils)
3638 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3639 ("python-six" ,python-six)
3640 ("python-stevedore" ,python-stevedore)))
3641 (native-inputs
3642 `(("python-testtools" ,python-testtools)
3643 ("python-pytest" ,python-pytest)))
3644 (home-page "https://launchpad.net/doc8")
3645 (synopsis
3646 "Style checker for Sphinx (or other) RST documentation")
3647 (description
3648 "Doc8 is an opinionated style checker for reStructured Text and plain
3649 text styles of documentation.")
3650 (license license:asl2.0)))
3651
3652 (define-public python-pygments
3653 (package
3654 (name "python-pygments")
3655 (version "2.7.3")
3656 (source
3657 (origin
3658 (method url-fetch)
3659 (uri (pypi-uri "Pygments" version))
3660 (sha256
3661 (base32
3662 "05mps9r966r3dpqw6zrs1nlwjdf5y4960hl9m7abwb3qyfnarwyc"))))
3663 (build-system python-build-system)
3664 (arguments
3665 ;; FIXME: Tests require sphinx, which depends on this.
3666 '(#:tests? #f))
3667 (home-page "https://pygments.org/")
3668 (synopsis "Syntax highlighting")
3669 (description
3670 "Pygments is a syntax highlighting package written in Python.")
3671 (license license:bsd-2)
3672 (properties `((python2-variant . ,(delay python2-pygments))))))
3673
3674 ;; Pygments 2.6 and later does not support Python 2.
3675 (define-public python2-pygments
3676 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3677 (package
3678 (inherit base)
3679 (version "2.5.2")
3680 (source (origin
3681 (method url-fetch)
3682 (uri (pypi-uri "Pygments" version))
3683 (sha256
3684 (base32
3685 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3686
3687 (define-public python-bump2version
3688 (package
3689 (name "python-bump2version")
3690 (version "1.0.1")
3691 (source
3692 (origin
3693 (method url-fetch)
3694 (uri (pypi-uri "bump2version" version))
3695 (sha256
3696 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
3697 (build-system python-build-system)
3698 (arguments
3699 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
3700 ;; required: --new-version".
3701 `(#:tests? #false))
3702 (home-page "https://github.com/c4urself/bump2version")
3703 (synopsis "Version-bump your software with a single command!")
3704 (description
3705 "This package provides a small command line tool to simplify releasing
3706 software by updating all version strings in your source code by the correct
3707 increment. It also creates commits and tags.")
3708 (license license:expat)))
3709
3710 (define-public python-bumpversion
3711 (package
3712 (name "python-bumpversion")
3713 (version "0.5.3")
3714 (source
3715 (origin
3716 (method url-fetch)
3717 (uri (pypi-uri "bumpversion" version))
3718 (sha256
3719 (base32
3720 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3721 (build-system python-build-system)
3722 (home-page "https://github.com/peritus/bumpversion")
3723 (synopsis "Tool to bump software version")
3724 (description "This tool provides a command-line interface (CLI) to bump a
3725 software version simply.")
3726 (license license:expat)))
3727
3728 (define-public python-deprecated
3729 (package
3730 (name "python-deprecated")
3731 (version "1.2.5")
3732 (source
3733 (origin
3734 (method git-fetch)
3735 (uri (git-reference
3736 (url "https://github.com/tantale/deprecated")
3737 (commit (string-append "v" version))))
3738 (file-name (git-file-name name version))
3739 (sha256
3740 (base32
3741 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3742 (build-system python-build-system)
3743 (arguments
3744 `(#:phases (modify-phases %standard-phases
3745 (replace 'check
3746 (lambda _
3747 (invoke "pytest"))))))
3748 (propagated-inputs
3749 `(("python-wrapt" ,python-wrapt)))
3750 (native-inputs
3751 `(("python-bumpversion" ,python-bumpversion)
3752 ("python-pytest" ,python-pytest)
3753 ("python-pytest-cov" ,python-pytest-cov)
3754 ("python-sphinx" ,python-sphinx)
3755 ("python-tox" ,python-tox)))
3756 (home-page "https://github.com/tantale/deprecated")
3757 (synopsis "Python decorator to deprecate classes, functions or methods")
3758 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3759 to deprecate classes, functions or methods.")
3760 (license license:expat)))
3761
3762 (define-public python-pygithub
3763 (package
3764 (name "python-pygithub")
3765 (version "1.43.8")
3766 (source
3767 ;; We fetch from the Git repo because there are no tests in the PyPI
3768 ;; archive.
3769 (origin
3770 (method git-fetch)
3771 (uri (git-reference
3772 (url "https://github.com/PyGithub/PyGithub")
3773 (commit (string-append "v" version))))
3774 (file-name (git-file-name name version))
3775 (sha256
3776 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3777 (build-system python-build-system)
3778 (arguments
3779 `(#:phases (modify-phases %standard-phases
3780 ;; Some tests rely on the network.
3781 (add-after 'unpack 'disable-failing-tests
3782 (lambda _
3783 (substitute* "tests/Issue142.py"
3784 (("testDecodeJson") "disabled_testDecodeJson"))
3785 #t))
3786 (add-before 'check 'prepare-for-tests
3787 (lambda _
3788 (for-each (lambda (f)
3789 (chmod f #o666))
3790 (find-files "./tests"))
3791 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3792 (setenv "PYTHONPATH"
3793 (string-append "./tests:" (getenv "PYTHONPATH")))
3794 #t)))))
3795 (propagated-inputs
3796 `(("python-deprecated" ,python-deprecated)
3797 ("python-pyjwt" ,python-pyjwt)
3798 ("python-requests" ,python-requests)))
3799 (native-inputs `(("python-httpretty" ,python-httpretty)))
3800 (home-page "https://pygithub.readthedocs.io/en/latest/")
3801 (synopsis "Python library for the GitHub API")
3802 (description "This library allows managing GitHub resources such as
3803 repositories, user profiles, and organizations in your Python applications,
3804 using version 3 of the GitHub application programming interface (API).")
3805 (license license:lgpl3+)))
3806
3807 (define-public python-rellu
3808 (package
3809 (name "python-rellu")
3810 (version "0.7")
3811 (source
3812 (origin
3813 (method url-fetch)
3814 (uri (pypi-uri "rellu" version))
3815 (sha256
3816 (base32
3817 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3818 (build-system python-build-system)
3819 (propagated-inputs
3820 `(("python-invoke" ,python-invoke)
3821 ("python-pygithub" ,python-pygithub)))
3822 (home-page "https://github.com/robotframework/rellu")
3823 (synopsis "Utilities to create PyPI releases")
3824 (description "This collection of utilities contains tooling and templates
3825 to assist in creating releases on GitHub and publishing them on PyPI. It is
3826 designed to be used by Robot Framework and tools and libraries in its
3827 ecosystem, but can naturally be used also by other projects.")
3828 (license license:asl2.0)))
3829
3830 (define-public python-robotframework
3831 (package
3832 (name "python-robotframework")
3833 (version "3.2.2")
3834 ;; There are no tests in the PyPI archive.
3835 (source
3836 (origin
3837 (method git-fetch)
3838 (uri (git-reference
3839 (url "https://github.com/robotframework/robotframework")
3840 (commit (string-append "v" version))))
3841 (file-name (git-file-name name version))
3842 (sha256
3843 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3844 (patches (search-patches
3845 "python-robotframework-source-date-epoch.patch"))))
3846 (build-system python-build-system)
3847 (arguments
3848 `(#:phases (modify-phases %standard-phases
3849 (add-before 'build 'build-and-install-doc
3850 (lambda* (#:key outputs #:allow-other-keys)
3851 (let* ((doc-output (assoc-ref outputs "doc"))
3852 (doc (string-append doc-output "/share/"
3853 ,name "-" ,version "/")))
3854 (invoke "invoke" "library-docs" "all")
3855 (mkdir-p doc)
3856 (copy-recursively "doc/libraries"
3857 (string-append doc "/libraries"))
3858 #t)))
3859 (replace 'check
3860 (lambda* (#:key inputs #:allow-other-keys)
3861 ;; Some tests require timezone data. Otherwise, they
3862 ;; look up /etc/localtime, which doesn't exist, and fail
3863 ;; with:
3864 ;;
3865 ;; OverflowError: mktime argument out of range
3866 (setenv "TZDIR"
3867 (string-append (assoc-ref inputs "tzdata")
3868 "/share/zoneinfo"))
3869 (setenv "TZ" "Europe/Paris")
3870
3871 (invoke "python" "utest/run.py"))))))
3872 (native-inputs
3873 `(("python-invoke" ,python-invoke)
3874 ("python-rellu" ,python-rellu)
3875 ("python:tk" ,python "tk") ;used when building the HTML doc
3876 ("tzdata" ,tzdata-for-tests)))
3877 (outputs '("out" "doc"))
3878 (home-page "https://robotframework.org")
3879 (synopsis "Generic automation framework")
3880 (description "Robot Framework is a generic automation framework for
3881 acceptance testing, acceptance test driven development (ATDD), and robotic
3882 process automation (RPA).")
3883 (license license:asl2.0)))
3884
3885 (define-public python-robotframework-lint
3886 ;; There is no properly tagged release; the commit below seems to correspond
3887 ;; to the 0.9 stable release available from PyPI. The tests are not
3888 ;; included in the PyPI archive, so we fetch the sources from the upstream
3889 ;; Git repo.
3890 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3891 (revision "0"))
3892 (package
3893 (name "python-robotframework-lint")
3894 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3895 revision commit))
3896 (source
3897 (origin
3898 (method git-fetch)
3899 (uri (git-reference
3900 (url "https://github.com/boakley/robotframework-lint")
3901 (commit commit)))
3902 (file-name (git-file-name name version))
3903 (sha256
3904 (base32
3905 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3906 (build-system python-build-system)
3907 (arguments
3908 `(#:phases
3909 (modify-phases %standard-phases
3910 (replace 'check
3911 (lambda _
3912 (invoke "python" "-m" "robot" "-A"
3913 "tests/conf/default.args" "tests"))))))
3914 (propagated-inputs
3915 `(("python-robotframework" ,python-robotframework)))
3916 (home-page "https://github.com/boakley/robotframework-lint/")
3917 (synopsis "Static analysis tool (linter) for Robot Framework")
3918 (description "This package provides the @code{rflint} command-line
3919 utility, a static analysis tool (linter) for Robot Framework source files.")
3920 (license license:asl2.0))))
3921
3922 (define-public python-robotframework-sshlibrary
3923 (package
3924 (name "python-robotframework-sshlibrary")
3925 (version "3.3.0")
3926 ;; There are no tests in the PyPI archive.
3927 (source
3928 (origin
3929 (method git-fetch)
3930 (uri (git-reference
3931 (url "https://github.com/robotframework/SSHLibrary")
3932 (commit (string-append "v" version))))
3933 (file-name (git-file-name name version))
3934 (sha256
3935 (base32
3936 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3937 (build-system python-build-system)
3938 (arguments
3939 `(#:phases
3940 (modify-phases %standard-phases
3941 (add-before 'build 'build-and-install-doc
3942 (lambda* (#:key outputs #:allow-other-keys)
3943 (let* ((doc-output (assoc-ref outputs "doc"))
3944 (doc (string-append doc-output "/share/"
3945 ,name "-" ,version "/")))
3946 (invoke "chmod" "-R" "+w" "docs")
3947 (invoke "invoke" "kw-docs" "project-docs")
3948 (mkdir-p doc)
3949 (for-each delete-file (find-files "docs" "\\.rst"))
3950 (copy-recursively "docs" doc)
3951 #t)))
3952 (replace 'check
3953 (lambda _
3954 ;; Some tests require an SSH server; we remove them.
3955 (delete-file "utest/test_client_api.py")
3956 (delete-file "utest/test_scp.py")
3957 (invoke "python" "utest/run.py"))))))
3958 (propagated-inputs
3959 `(("python-robotframework" ,python-robotframework)
3960 ("python-paramiko" ,python-paramiko)
3961 ("python-scp" ,python-scp)))
3962 (native-inputs
3963 `(("openssh" ,openssh)
3964 ("which" ,which)
3965 ;; To generate the documentation
3966 ("python-docutils" ,python-docutils)
3967 ("python-invoke" ,python-invoke)
3968 ("python-pygments" ,python-pygments)
3969 ("python-rellu" ,python-rellu)))
3970 (outputs '("out" "doc"))
3971 (home-page "https://github.com/robotframework/SSHLibrary")
3972 (synopsis "Robot Framework library for SSH and SFTP")
3973 (description "SSHLibrary is a Robot Framework library providing support
3974 for SSH and SFTP. It has the following main usages:
3975 @itemize @bullet
3976 @item Executing commands on the remote machine, either blocking or non-blocking.
3977 @item Writing and reading in an interactive shell.
3978 @item Transferring files and directories over SFTP.
3979 @item Ensuring that files and directories exist on the remote machine.
3980 @end itemize")
3981 (license license:asl2.0)))
3982
3983 (define-public python-rstr
3984 (package
3985 (name "python-rstr")
3986 (version "2.2.6")
3987 (source
3988 (origin
3989 (method url-fetch)
3990 (uri (pypi-uri "rstr" version))
3991 (sha256
3992 (base32
3993 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3994 (build-system python-build-system)
3995 (home-page "https://github.com/leapfrogonline/rstr")
3996 (synopsis "Generate random strings in Python")
3997 (description "This package provides a python module for generating
3998 random strings of various types. It could be useful for fuzz testing,
3999 generating dummy data, or other applications. It has no dependencies
4000 outside the standard library.")
4001 (license license:bsd-3)))
4002
4003 (define-public python-scp
4004 (package
4005 (name "python-scp")
4006 (version "0.13.3")
4007 (source
4008 (origin
4009 (method url-fetch)
4010 (uri (pypi-uri "scp" version))
4011 (sha256
4012 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4013 (build-system python-build-system)
4014 (arguments
4015 '(#:tests? #f)) ;tests require an SSH server
4016 (propagated-inputs
4017 `(("python-paramiko" ,python-paramiko)))
4018 (home-page "https://github.com/jbardin/scp.py")
4019 (synopsis "SCP protocol module for Python and Paramiko")
4020 (description "The scp module extends the Paramiko library to send and
4021 receive files via the SCP1 protocol, as implemented by the OpenSSH
4022 @command{scp} program.")
4023 (license license:gpl2+)))
4024
4025 (define-public python-rst.linker
4026 (package
4027 (name "python-rst.linker")
4028 (version "1.11")
4029 (source
4030 (origin
4031 (method url-fetch)
4032 (uri (pypi-uri "rst.linker" version))
4033 (sha256
4034 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4035 (build-system python-build-system)
4036 (propagated-inputs
4037 `(("python-dateutil" ,python-dateutil)
4038 ("python-six" ,python-six)))
4039 (native-inputs
4040 `(("python-setuptools-scm" ,python-setuptools-scm)))
4041 ;; Test would require path.py, which would introduce a cyclic dependence.
4042 (arguments `(#:tests? #f))
4043 ;; Note: As of version 1.7 the documentation is not worth building.
4044 (home-page "https://github.com/jaraco/rst.linker")
4045 (synopsis "Sphinx plugin to add links and timestamps")
4046 (description "rst.linker automatically replaces text by a
4047 reStructuredText external reference or timestamps. It's primary purpose is to
4048 augment the changelog, but it can be used for other documents, too.")
4049 (license license:expat)))
4050
4051 (define-public python2-rst.linker
4052 (package-with-python2 python-rst.linker))
4053
4054 (define-public python-sshpubkeys
4055 (package
4056 (name "python-sshpubkeys")
4057 (version "3.1.0")
4058 (home-page "https://github.com/ojarva/python-sshpubkeys")
4059 (source (origin
4060 (method git-fetch)
4061 (uri (git-reference
4062 (url home-page)
4063 (commit (string-append "v" version))))
4064 (file-name (git-file-name name version))
4065 (sha256
4066 (base32
4067 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4068 (build-system python-build-system)
4069 (propagated-inputs
4070 `(("python-cryptography" ,python-cryptography)
4071 ("python-ecdsa" ,python-ecdsa)))
4072 (synopsis "OpenSSH public key parser")
4073 (description
4074 "This package provides a library for parsing and validating OpenSSH
4075 public key files.")
4076 (license license:bsd-3)))
4077
4078 (define-public python-feedgenerator
4079 (package
4080 (name "python-feedgenerator")
4081 (version "1.9")
4082 (source
4083 (origin
4084 (method url-fetch)
4085 (uri (pypi-uri "feedgenerator" version))
4086 (sha256
4087 (base32
4088 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4089 (modules '((guix build utils)))
4090 (snippet
4091 '(begin
4092 ;; Remove pre-compiled .pyc files from source.
4093 (for-each delete-file-recursively
4094 (find-files "." "__pycache__" #:directories? #t))
4095 (for-each delete-file (find-files "." "\\.pyc$"))
4096 #t))))
4097 (build-system python-build-system)
4098 (propagated-inputs
4099 `(("python-pytz" ,python-pytz)
4100 ("python-six" ,python-six)))
4101 (home-page "https://github.com/getpelican/feedgenerator")
4102 (synopsis
4103 "Standalone version of Django's Atom/RSS feed generator")
4104 (description
4105 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4106 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4107 (license license:bsd-3)))
4108
4109 (define-public python2-feedgenerator
4110 (package-with-python2 python-feedgenerator))
4111
4112 (define-public python-jsonrpc-server
4113 (package
4114 (name "python-jsonrpc-server")
4115 (version "0.4.0")
4116 (source
4117 (origin
4118 (method url-fetch)
4119 (uri (pypi-uri "python-jsonrpc-server" version))
4120 (sha256
4121 (base32
4122 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4123 (build-system python-build-system)
4124 (propagated-inputs
4125 `(("python-mock" ,python-mock)
4126 ("python-pytest" ,python-pytest)
4127 ("python-ujson" ,python-ujson)))
4128 (home-page
4129 "https://github.com/palantir/python-jsonrpc-server")
4130 (synopsis "JSON RPC 2.0 server library")
4131 (description
4132 "This package provides a JSON RPC 2.0 server library for Python.")
4133 (license license:expat)))
4134
4135 (define-public python-pydantic
4136 (package
4137 (name "python-pydantic")
4138 (version "1.6.1")
4139 (source
4140 (origin
4141 (method git-fetch)
4142 (uri (git-reference
4143 (url "https://github.com/samuelcolvin/pydantic")
4144 (commit (string-append "v" version))))
4145 (file-name (git-file-name name version))
4146 (sha256
4147 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4148 (build-system python-build-system)
4149 (arguments
4150 '(#:phases
4151 (modify-phases %standard-phases
4152 ;; Reported upstream:
4153 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4154 ;; Disable the faulty test as the fix is unclear.
4155 (add-before 'check 'disable-test
4156 (lambda _
4157 (substitute* "tests/test_validators.py"
4158 (("test_assert_raises_validation_error")
4159 "_test_assert_raises_validation_error"))
4160 #t))
4161 (replace 'check
4162 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4163 (native-inputs
4164 `(("python-pytest" ,python-pytest)))
4165 (home-page "https://github.com/samuelcolvin/pydantic")
4166 (synopsis "Python data validation and settings management")
4167 (description
4168 "Pydantic enforces type hints at runtime, and provides user friendly
4169 errors when data is invalid.")
4170 (license license:expat)))
4171
4172 (define-public python-pydocstyle
4173 (package
4174 (name "python-pydocstyle")
4175 (version "3.0.0")
4176 (source
4177 (origin
4178 (method url-fetch)
4179 (uri (pypi-uri "pydocstyle" version))
4180 (sha256
4181 (base32
4182 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4183 (build-system python-build-system)
4184 (propagated-inputs
4185 `(("python-six" ,python-six)
4186 ("python-snowballstemmer" ,python-snowballstemmer)))
4187 (home-page
4188 "https://github.com/PyCQA/pydocstyle/")
4189 (synopsis "Python docstring style checker")
4190 (description
4191 "This package provides a style checker for the Python Language
4192 Server (PLS).")
4193 (license license:expat)))
4194
4195 (define-public python-language-server
4196 (package
4197 (name "python-language-server")
4198 (version "0.36.2")
4199 (source
4200 (origin
4201 (method url-fetch)
4202 (uri (pypi-uri "python-language-server" version))
4203 (sha256
4204 (base32
4205 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4206 (build-system python-build-system)
4207 (propagated-inputs
4208 `(("python-autopep8" ,python-autopep8)
4209 ("python-configparser" ,python-configparser)
4210 ("python-pydocstyle" ,python-pydocstyle)
4211 ("python-future" ,python-future)
4212 ("python-jedi" ,python-jedi)
4213 ("python-jsonrpc-server" ,python-jsonrpc-server)
4214 ("python-pluggy" ,python-pluggy)
4215 ("python-pycodestyle" ,python-pycodestyle)
4216 ("python-pyflakes" ,python-pyflakes)
4217 ("python-rope" ,python-rope)
4218 ("python-ujson" ,python-ujson)
4219 ("python-yapf" ,python-yapf)))
4220 (native-inputs
4221 `(("python-coverage" ,python-coverage)
4222 ("python-flaky" ,python-flaky)
4223 ("python-matplotlib" ,python-matplotlib)
4224 ("python-mock" ,python-mock)
4225 ("python-numpy" ,python-numpy)
4226 ("python-pandas" ,python-pandas)
4227 ("python-pylint" ,python-pylint)
4228 ("python-pytest" ,python-pytest)
4229 ("python-pytest-cov" ,python-pytest-cov)
4230 ("python-versioneer" ,python-versioneer)))
4231 (home-page "https://github.com/palantir/python-language-server")
4232 (synopsis "Python implementation of the Language Server Protocol")
4233 (description
4234 "The Python Language Server (pyls) is an implementation of the Python 3
4235 language specification for the Language Server Protocol (LSP). This tool is
4236 used in text editing environments to provide a complete and integrated
4237 feature-set for programming Python effectively.")
4238 (license license:expat)))
4239
4240 (define-public python-pathspec
4241 (package
4242 (name "python-pathspec")
4243 (version "0.7.0")
4244 (source
4245 (origin
4246 (method url-fetch)
4247 (uri (pypi-uri "pathspec" version))
4248 (sha256
4249 (base32
4250 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4251 (build-system python-build-system)
4252 (home-page "https://github.com/cpburnz/python-path-specification")
4253 (synopsis "Utility library for gitignore style pattern matching of file paths")
4254 (description
4255 "This package provides a utility library for gitignore style pattern
4256 matching of file paths.")
4257 (license license:mpl2.0)))
4258
4259 (define-public python-black
4260 (package
4261 (name "python-black")
4262 (version "20.8b1")
4263 (source
4264 (origin
4265 (method url-fetch)
4266 (uri (pypi-uri "black" version))
4267 (sha256
4268 (base32
4269 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4270 (build-system python-build-system)
4271 (arguments
4272 `(#:phases
4273 (modify-phases %standard-phases
4274 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4275 (lambda _
4276 (let ((python3 (which "python3")))
4277 (substitute* '("tests/data/fmtonoff.py"
4278 "tests/data/string_prefixes.py"
4279 "tests/data/function.py"
4280 "tests/data/python37.py")
4281 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4282 (string-append "#!" python3 (if (string? minor-version)
4283 minor-version
4284 "")))))
4285 #t))
4286 (add-after 'unpack 'disable-broken-tests
4287 (lambda* (#:key outputs inputs #:allow-other-keys)
4288 ;; Make installed package available for running the tests
4289 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4290 ":" (getenv "PATH")))
4291
4292 ;; These tests are supposed to be skipped when the blackd
4293 ;; dependencies are missing, but this doesn't quite work.
4294 (substitute* "tests/test_black.py"
4295 (("( *)class BlackDTestCase.*" match indent)
4296 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4297 indent "class BlackDTestCase(unittest.TestCase):\n"))
4298 (("web.Application") "False")
4299 (("@unittest_run_loop") ""))
4300
4301 ;; Patching the above file breaks the self test
4302 (substitute* "tests/test_black.py"
4303 (("( *)def test_self" match indent)
4304 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4305
4306 (substitute* "tests/test_black.py"
4307 (("( *)def test_python38" match indent)
4308 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4309 #t)))))
4310 (propagated-inputs
4311 `(("python-click" ,python-click)
4312 ("python-attrs" ,python-attrs)
4313 ("python-appdirs" ,python-appdirs)
4314 ("python-pathspec" ,python-pathspec)
4315 ("python-mypy-extensions" ,python-mypy-extensions)
4316 ("python-regex" ,python-regex)
4317 ("python-toml" ,python-toml)
4318 ("python-typed-ast" ,python-typed-ast)
4319 ("python-typing-extensions" ,python-typing-extensions)))
4320 (native-inputs
4321 `(("python-setuptools-scm" ,python-setuptools-scm)))
4322 (home-page "https://github.com/ambv/black")
4323 (synopsis "The uncompromising code formatter")
4324 (description "Black is the uncompromising Python code formatter.")
4325 (license license:expat)))
4326
4327 (define-public python-black-macchiato
4328 (package
4329 (name "python-black-macchiato")
4330 (version "1.3.0")
4331 (source
4332 (origin
4333 (method url-fetch)
4334 (uri (pypi-uri "black-macchiato" version))
4335 (sha256
4336 (base32
4337 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4338 (build-system python-build-system)
4339 (propagated-inputs
4340 `(("python-black" ,python-black)))
4341 (home-page "https://github.com/wbolster/black-macchiato")
4342 (synopsis "Partial @code{python-black} formatting")
4343 (description
4344 "This package is built on top the @{python-black} code formatter to
4345 enable formatting of partial files.")
4346 (license license:bsd-3)))
4347
4348 (define-public python-blinker
4349 (package
4350 (name "python-blinker")
4351 (version "1.4")
4352 (source
4353 (origin
4354 (method url-fetch)
4355 (uri (pypi-uri "blinker" version))
4356 (sha256
4357 (base32
4358 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4359 (build-system python-build-system)
4360 (home-page "https://pythonhosted.org/blinker/")
4361 (synopsis "Fast, simple object-to-object and broadcast signaling")
4362 (description
4363 "Blinker provides a fast dispatching system that allows any number of
4364 interested parties to subscribe to events, or \"signals\".")
4365 (license license:expat)))
4366
4367 (define-public python2-blinker
4368 (package-with-python2 python-blinker))
4369
4370 (define-public pelican
4371 (package
4372 (name "pelican")
4373 (version "4.2.0")
4374 (source
4375 (origin
4376 (method url-fetch)
4377 (uri (pypi-uri "pelican" version))
4378 (sha256
4379 (base32
4380 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4381 (build-system python-build-system)
4382 (propagated-inputs
4383 `(("python-blinker" ,python-blinker)
4384 ("python-dateutil" ,python-dateutil)
4385 ("python-docutils" ,python-docutils)
4386 ("python-feedgenerator" ,python-feedgenerator)
4387 ("python-jinja2" ,python-jinja2)
4388 ("python-markdown" ,python-markdown)
4389 ("python-pygments" ,python-pygments)
4390 ("python-pytz" ,python-pytz)
4391 ("python-six" ,python-six)
4392 ("python-unidecode" ,python-unidecode)))
4393 (home-page "https://getpelican.com/")
4394 (arguments
4395 `(;; XXX Requires a lot more packages to do unit tests :P
4396 #:tests? #f))
4397 (synopsis "Python-based static site publishing system")
4398 (description
4399 "Pelican is a tool to generate a static blog from reStructuredText,
4400 Markdown input files, and more. Pelican uses Jinja2 for templating
4401 and is very extensible.")
4402 (license license:agpl3+)))
4403
4404 (define-public mallard-ducktype
4405 (package
4406 (name "mallard-ducktype")
4407 (version "1.0.2")
4408 (source
4409 (origin
4410 (method git-fetch)
4411 ;; git-reference because tests are not included in pypi source tarball
4412 ;; https://issues.guix.gnu.org/issue/36755#2
4413 (uri (git-reference
4414 (url "https://github.com/projectmallard/mallard-ducktype")
4415 (commit version)))
4416 (file-name (git-file-name name version))
4417 (sha256
4418 (base32
4419 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4420 (build-system python-build-system)
4421 (arguments
4422 '(#:phases
4423 (modify-phases %standard-phases
4424 (replace 'check
4425 (lambda _
4426 (with-directory-excursion "tests"
4427 (invoke "sh" "runtests")))))))
4428 (home-page "http://projectmallard.org")
4429 (synopsis "Convert Ducktype to Mallard documentation markup")
4430 (description
4431 "Ducktype is a lightweight syntax that can represent all the semantics
4432 of the Mallard XML documentation system. Ducktype files can be converted to
4433 Mallard using the @command{ducktype} tool. The yelp-tools package
4434 provides additional functionality on the produced Mallard documents.")
4435 (license license:expat)))
4436
4437 (define-public python-cython
4438 (package
4439 (name "python-cython")
4440 (version "0.29.21")
4441 (source
4442 (origin
4443 (method url-fetch)
4444 (uri (pypi-uri "Cython" version))
4445 (sha256
4446 (base32
4447 "1bcwpra7c6k30yvic3sw2v3rq2dr40ypc4zqif6kr52mpn4wnyp5"))))
4448 (build-system python-build-system)
4449 ;; we need the full python package and not just the python-wrapper
4450 ;; because we need libpython3.3m.so
4451 (inputs
4452 `(("python" ,python)))
4453 (arguments
4454 `(#:phases
4455 (modify-phases %standard-phases
4456 (add-before 'check 'set-HOME
4457 ;; some tests require access to "$HOME/.cython"
4458 (lambda _ (setenv "HOME" "/tmp") #t))
4459 (replace 'check
4460 (lambda _
4461 ;; Disable compiler optimizations to greatly reduce the running
4462 ;; time of the test suite.
4463 (setenv "CFLAGS" "-O0")
4464
4465 (invoke "python" "runtests.py" "-vv"
4466 "-j" (number->string (parallel-job-count))
4467 ;; XXX: On 32-bit architectures, running the parallel tests
4468 ;; fails on many-core systems, see
4469 ;; <https://github.com/cython/cython/issues/2807>.
4470 ,@(if (not (target-64bit?))
4471 '("-x" "run.parallel")
4472 '())))))))
4473 (home-page "https://cython.org/")
4474 (synopsis "C extensions for Python")
4475 (description "Cython is an optimising static compiler for both the Python
4476 programming language and the extended Cython programming language. It makes
4477 writing C extensions for Python as easy as Python itself.")
4478 (license license:asl2.0)
4479 (properties `((python2-variant . ,(delay python2-cython))))))
4480
4481 (define-public python2-cython
4482 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4483 (package
4484 (inherit base)
4485 (name "python2-cython")
4486 (inputs
4487 `(("python-2" ,python-2))) ;this is not automatically changed
4488 (arguments
4489 (substitute-keyword-arguments (package-arguments base)
4490 ((#:phases phases)
4491 `(modify-phases ,phases
4492 (add-before 'check 'adjust-test_embed
4493 (lambda _
4494 (substitute* "runtests.py"
4495 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4496 ;; so it can give the right -L flag to GCC when embedding static
4497 ;; builds of Python. It is unaware that the Python "config"
4498 ;; directory (where the static library lives) was renamed in
4499 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4500 ;; which works fine, because that is where the shared library is.
4501 ;;
4502 ;; It also appears to be unaware that the Makefile in Demos/embed
4503 ;; already unconditionally pass the static library location to GCC,
4504 ;; after checking sysconfig.get_config_var('LIBPL).
4505 ;;
4506 ;; The effect is that the linker is unable to resolve libexpat
4507 ;; symbols when building for Python 2, because neither the Python 2
4508 ;; shared library nor Expat is available. To fix it, we can either
4509 ;; add Expat as an input and make it visible to the linker, or just
4510 ;; prevent it from overriding the Python shared library location.
4511 ;; The end result is identical, so we take the easy route.
4512 ((" or libname not in os\\.listdir\\(libdir\\)")
4513 ""))
4514 #t)))))))))
4515
4516 ;; The RPython toolchain currently does not support Python 3.
4517 (define-public python2-rpython
4518 (package
4519 (name "python2-rpython")
4520 (version "0.2.1")
4521 (source
4522 (origin
4523 (method url-fetch)
4524 (uri (pypi-uri "rpython" version))
4525 (sha256
4526 (base32
4527 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4528 (build-system python-build-system)
4529 (arguments `(#:python ,python-2))
4530 (native-inputs
4531 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4532 (home-page "https://rpython.readthedocs.org")
4533 (synopsis "Framework for implementing interpreters and virtual machines")
4534 (description "RPython is a translation and support framework for
4535 producing implementations of dynamic languages, emphasizing a clean separation
4536 between language specification and implementation aspects.")
4537 (license license:expat)))
4538
4539 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4540 ;; python-scipy still build, as these three packages are often used together.
4541 (define-public python-numpy
4542 (package
4543 (name "python-numpy")
4544 (version "1.17.3")
4545 (source
4546 (origin
4547 (method url-fetch)
4548 (uri (string-append
4549 "https://github.com/numpy/numpy/releases/download/v"
4550 version "/numpy-" version ".tar.gz"))
4551 (sha256
4552 (base32
4553 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4554 (build-system python-build-system)
4555 (inputs
4556 `(("openblas" ,openblas)
4557 ("lapack" ,lapack)))
4558 (native-inputs
4559 `(("python-cython" ,python-cython)
4560 ("python-pytest" ,python-pytest)
4561 ("gfortran" ,gfortran)))
4562 (arguments
4563 `(#:phases
4564 (modify-phases %standard-phases
4565 (add-before 'build 'configure-blas-lapack
4566 (lambda* (#:key inputs #:allow-other-keys)
4567 (call-with-output-file "site.cfg"
4568 (lambda (port)
4569 (format port
4570 "[openblas]
4571 libraries = openblas
4572 library_dirs = ~a/lib
4573 include_dirs = ~a/include
4574
4575 # backslash-n to make emacs happy
4576 \n[lapack]
4577 lapack_libs = lapack
4578 library_dirs = ~a/lib
4579 include_dirs = ~a/include
4580 "
4581 (assoc-ref inputs "openblas")
4582 (assoc-ref inputs "openblas")
4583 (assoc-ref inputs "lapack")
4584 (assoc-ref inputs "lapack"))))
4585 #t))
4586 (add-before 'build 'fix-executable-paths
4587 (lambda* (#:key inputs #:allow-other-keys)
4588 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4589 ;; instead of /bin/sh.
4590 (substitute* "numpy/distutils/exec_command.py"
4591 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4592 (string-append match-start (assoc-ref inputs "bash") match-end)))
4593 ;; Use "gcc" executable, not "cc".
4594 (substitute* "numpy/distutils/system_info.py"
4595 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4596 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4597 #t))
4598 ;; Tests can only be run after the library has been installed and not
4599 ;; within the source directory.
4600 (delete 'check)
4601 (add-after 'install 'check
4602 (lambda* (#:key outputs inputs #:allow-other-keys)
4603 ;; Make installed package available for running the tests
4604 (add-installed-pythonpath inputs outputs)
4605 ;; Make sure "f2py" etc is found.
4606 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4607 ":" (getenv "PATH")))
4608 (with-directory-excursion "/tmp"
4609 (invoke "python" "-c"
4610 "import numpy; numpy.test(verbose=2)")))))))
4611 (home-page "https://numpy.org")
4612 (synopsis "Fundamental package for scientific computing with Python")
4613 (description "NumPy is the fundamental package for scientific computing
4614 with Python. It contains among other things: a powerful N-dimensional array
4615 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4616 and Fortran code, useful linear algebra, Fourier transform, and random number
4617 capabilities.")
4618 (properties `((python2-variant . ,(delay python2-numpy))))
4619 (license license:bsd-3)))
4620
4621 ;; Numpy 1.16.x are the last versions that support Python 2.
4622 (define-public python2-numpy
4623 (let ((numpy (package-with-python2
4624 (strip-python2-variant python-numpy))))
4625 (package/inherit
4626 numpy
4627 (version "1.16.5")
4628 (source (origin
4629 (method url-fetch)
4630 (uri (string-append
4631 "https://github.com/numpy/numpy/releases/download/v"
4632 version "/numpy-" version ".tar.gz"))
4633 (sha256
4634 (base32
4635 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4636
4637 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4638 ;; interest only for legacy code going back to NumPy's predecessor
4639 ;; Numeric.
4640 (define-public python2-numpy-1.8
4641 (package (inherit python2-numpy)
4642 (version "1.8.2")
4643 (source
4644 (origin
4645 (method git-fetch)
4646 (uri (git-reference
4647 (url "https://github.com/numpy/numpy")
4648 (commit (string-append "v" version))))
4649 (file-name (git-file-name "numpy" version))
4650 (sha256
4651 (base32
4652 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4653 (arguments
4654 (substitute-keyword-arguments (package-arguments python2-numpy)
4655 ((#:phases phases)
4656 `(modify-phases ,phases
4657 (replace 'configure-blas-lapack
4658 (lambda* (#:key inputs #:allow-other-keys)
4659 (call-with-output-file "site.cfg"
4660 (lambda (port)
4661 (format port
4662 "[openblas]
4663 libraries = openblas,lapack
4664 library_dirs = ~a/lib:~a/lib
4665 include_dirs = ~a/include:~a/include
4666 "
4667 (assoc-ref inputs "openblas")
4668 (assoc-ref inputs "lapack")
4669 (assoc-ref inputs "openblas")
4670 (assoc-ref inputs "lapack"))))
4671 #t))))))
4672 (native-inputs
4673 `(("python2-nose" ,python2-nose)))
4674 (description "NumPy is the fundamental package for scientific computing
4675 with Python. It contains among other things: a powerful N-dimensional array
4676 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4677 and Fortran code, useful linear algebra, Fourier transform, and random number
4678 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4679 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4680 Numeric.")
4681 (license license:bsd-3)))
4682
4683 (define-public python-munch
4684 (package
4685 (name "python-munch")
4686 (version "2.0.4")
4687 (source
4688 (origin
4689 (method url-fetch)
4690 (uri (pypi-uri "munch" version))
4691 (sha256
4692 (base32
4693 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4694 (build-system python-build-system)
4695 (home-page "https://github.com/Infinidat/munch")
4696 (synopsis "Dot-accessible dictionary")
4697 (description "Munch is a dot-accessible dictionary similar to JavaScript
4698 objects.")
4699 (license license:expat)))
4700
4701 (define-public python2-munch
4702 (package-with-python2 python-munch))
4703
4704 (define-public python-colormath
4705 (package
4706 (name "python-colormath")
4707 (version "3.0.0")
4708 (source
4709 (origin
4710 (method url-fetch)
4711 (uri (pypi-uri "colormath" version))
4712 (sha256
4713 (base32
4714 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4715 (build-system python-build-system)
4716 (propagated-inputs
4717 `(("python-networkx" ,python-networkx)
4718 ("python-numpy" ,python-numpy)))
4719 (home-page "https://github.com/gtaylor/python-colormath")
4720 (synopsis "Color math and conversion library")
4721 (description
4722 "This is a Python library for color math and conversions.")
4723 (license license:bsd-3)))
4724
4725 (define-public python2-colormath
4726 (package-with-python2 python-colormath))
4727
4728 (define-public python-spectra
4729 (package
4730 (name "python-spectra")
4731 (version "0.0.11")
4732 (source
4733 (origin
4734 (method url-fetch)
4735 (uri (pypi-uri "spectra" version))
4736 (sha256
4737 (base32
4738 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4739 (build-system python-build-system)
4740 (arguments
4741 `(#:phases
4742 (modify-phases %standard-phases
4743 (replace 'check
4744 (lambda _ (invoke "nosetests" "-v"))))))
4745 (propagated-inputs
4746 `(("python-colormath" ,python-colormath)))
4747 (native-inputs
4748 `(("python-nose" ,python-nose)))
4749 (home-page "https://github.com/jsvine/spectra")
4750 (synopsis "Color scales and color conversion")
4751 (description
4752 "This package provides a Python library intended to make color math,
4753 color scales, and color space conversion easy. It has support for:
4754
4755 @enumerate
4756 @item Color scales
4757 @item Color ranges
4758 @item Color blending
4759 @item Brightening/darkening colors
4760 @item Saturating/desaturating colors
4761 @item Conversion to/from multiple color spaces.
4762 @end enumerate\n")
4763 (license license:expat)))
4764
4765 (define-public python2-spectra
4766 (package-with-python2 python-spectra))
4767
4768 (define-public python-numpy-documentation
4769 (package
4770 (name "python-numpy-documentation")
4771 (version (package-version python-numpy))
4772 (source (package-source python-numpy))
4773 (build-system python-build-system)
4774 (native-inputs
4775 `(("python-matplotlib" ,python-matplotlib)
4776 ("python-numpy" ,python-numpy)
4777 ("pkg-config" ,pkg-config)
4778 ("python-sphinx" ,python-sphinx)
4779 ("python-numpydoc" ,python-numpydoc)
4780 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4781 texlive-fonts-ec
4782 texlive-generic-ifxetex
4783 texlive-generic-pdftex
4784 texlive-amsfonts
4785 texlive-latex-capt-of
4786 texlive-latex-cmap
4787 texlive-latex-environ
4788 texlive-latex-eqparbox
4789 texlive-latex-etoolbox
4790 texlive-latex-expdlist
4791 texlive-latex-fancyhdr
4792 texlive-latex-fancyvrb
4793 texlive-latex-fncychap
4794 texlive-latex-float
4795 texlive-latex-framed
4796 texlive-latex-geometry
4797 texlive-latex-graphics
4798 texlive-latex-hyperref
4799 texlive-latex-mdwtools
4800 texlive-latex-multirow
4801 texlive-latex-needspace
4802 texlive-latex-oberdiek
4803 texlive-latex-parskip
4804 texlive-latex-preview
4805 texlive-latex-tabulary
4806 texlive-latex-threeparttable
4807 texlive-latex-titlesec
4808 texlive-latex-trimspaces
4809 texlive-latex-ucs
4810 texlive-latex-upquote
4811 texlive-latex-url
4812 texlive-latex-varwidth
4813 texlive-latex-wrapfig)))
4814 ("texinfo" ,texinfo)
4815 ("perl" ,perl)
4816 ("scipy-sphinx-theme"
4817 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
4818 (origin ;the build script expects scipy-sphinx-theme as a git submodule
4819 (method git-fetch)
4820 (uri (git-reference
4821 (url "https://github.com/scipy/scipy-sphinx-theme")
4822 (commit commit)))
4823 (file-name (git-file-name "python-scipy-sphinx-theme"
4824 (string-take commit 7)))
4825 (sha256
4826 (base32
4827 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
4828 ,@(package-native-inputs python-numpy)))
4829 (arguments
4830 `(#:tests? #f ; we're only generating the documentation
4831 #:phases
4832 (modify-phases %standard-phases
4833 (delete 'build)
4834 (replace 'install
4835 (lambda* (#:key inputs outputs #:allow-other-keys)
4836 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4837 (doc (string-append
4838 data "/doc/" ,name "-"
4839 ,(package-version python-numpy)))
4840 (info-reader (string-append data "/info"))
4841 (html (string-append doc "/html"))
4842 (scipy-sphinx-theme "scipy-sphinx-theme")
4843 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4844 (pyver ,(string-append "PYVER=")))
4845
4846 ;; FIXME: this is needed to for texlive-union to generate
4847 ;; fonts, which are not found.
4848 (setenv "HOME" "/tmp")
4849
4850 (with-directory-excursion "doc"
4851 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4852 (mkdir-p html)
4853 (invoke "make" "html" pyver)
4854 (invoke "make" "latex" "PAPER=a4" pyver)
4855 (invoke "make" "-C" "build/latex"
4856 "all-pdf" "PAPER=a4" pyver)
4857 ;; FIXME: Generation of the info file fails.
4858 ;; (invoke "make" "info" pyver)
4859 ;; (mkdir-p info)
4860 ;; (copy-file "build/texinfo/numpy.info"
4861 ;; (string-append info "/numpy.info"))
4862 (for-each (lambda (file)
4863 (copy-file (string-append "build/latex" file)
4864 (string-append doc file)))
4865 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4866 (with-directory-excursion "build/html"
4867 (for-each (lambda (file)
4868 (let* ((dir (dirname file))
4869 (tgt-dir (string-append html "/" dir)))
4870 (unless (equal? "." dir)
4871 (mkdir-p tgt-dir))
4872 (install-file file html)))
4873 (find-files "." ".*")))))
4874 #t)))))
4875 (home-page (package-home-page python-numpy))
4876 (synopsis "Documentation for the python-numpy package")
4877 (description (package-description python-numpy))
4878 (license (package-license python-numpy))))
4879
4880 (define-public python2-numpy-documentation
4881 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4882 (package
4883 (inherit numpy-documentation)
4884 (native-inputs `(("python2-functools32" ,python2-functools32)
4885 ,@(package-native-inputs numpy-documentation))))))
4886
4887 (define-public python-pygit2
4888 (package
4889 (name "python-pygit2")
4890 (version "1.4.0")
4891 (source
4892 (origin
4893 (method url-fetch)
4894 (uri (pypi-uri "pygit2" version))
4895 (sha256
4896 (base32 "1j71iskvirkm8jzfmwdm79v69878m9iix8a8cn4xidgr3nmkisyb"))))
4897 (build-system python-build-system)
4898 (arguments
4899 '(#:tests? #f)) ; tests don't run correctly in our environment
4900 (propagated-inputs
4901 `(("python-cached-property" ,python-cached-property)
4902 ("python-cffi" ,python-cffi)
4903 ("libgit2" ,libgit2)))
4904 (native-inputs
4905 `(("python-pytest" ,python-pytest)))
4906 (home-page "https://github.com/libgit2/pygit2")
4907 (synopsis "Python bindings for libgit2")
4908 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4909 library, libgit2 implements Git plumbing.")
4910 ;; GPL2.0 only, with linking exception.
4911 (license license:gpl2)))
4912
4913 (define-public python-patiencediff
4914 (package
4915 (name "python-patiencediff")
4916 (version "0.2.0")
4917 (source
4918 (origin
4919 (method url-fetch)
4920 (uri (pypi-uri "patiencediff" version))
4921 (sha256
4922 (base32
4923 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4924 (build-system python-build-system)
4925 (home-page "https://www.breezy-vcs.org/")
4926 (synopsis "Python implementation of the patiencediff algorithm")
4927 (description
4928 "This package contains a Python implementation of the @code{patiencediff}
4929 algorithm. Patiencediff provides a good balance of performance, nice output for
4930 humans, and implementation simplicity.")
4931 (license license:gpl2)))
4932
4933 (define-public python-pdftotext
4934 (package
4935 (name "python-pdftotext")
4936 (version "2.1.5")
4937 (source
4938 (origin
4939 (method url-fetch)
4940 (uri (pypi-uri "pdftotext" version))
4941 (sha256
4942 (base32
4943 "19la1cw1hmkcr8big04gm2dd5fw0y0z97g930aiy29s1gaqbiblq"))))
4944 (build-system python-build-system)
4945 (inputs
4946 `(("poppler" ,poppler)))
4947 (home-page "https://github.com/jalan/pdftotext")
4948 (synopsis "Simple PDF text extraction")
4949 (description "Pdftotext is a Python library of PDF text extraction.")
4950 (license license:expat)))
4951
4952 (define-public python-pyparsing
4953 (package
4954 (name "python-pyparsing")
4955 (version "2.4.6")
4956 (source
4957 (origin
4958 (method url-fetch)
4959 (uri (pypi-uri "pyparsing" version))
4960 (sha256
4961 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4962 (build-system python-build-system)
4963 (outputs '("out" "doc"))
4964 (arguments
4965 `(#:tests? #f ; no test target
4966 #:phases
4967 (modify-phases %standard-phases
4968 (add-after 'install 'install-doc
4969 (lambda* (#:key outputs #:allow-other-keys)
4970 (let* ((doc (string-append (assoc-ref outputs "doc")
4971 "/share/doc/" ,name "-" ,version))
4972 (html-doc (string-append doc "/html"))
4973 (examples (string-append doc "/examples")))
4974 (mkdir-p html-doc)
4975 (mkdir-p examples)
4976 (for-each
4977 (lambda (dir tgt)
4978 (map (lambda (file)
4979 (install-file file tgt))
4980 (find-files dir ".*")))
4981 (list "docs" "htmldoc" "examples")
4982 (list doc html-doc examples))
4983 #t))))))
4984 (home-page "https://github.com/pyparsing/pyparsing")
4985 (synopsis "Python parsing class library")
4986 (description
4987 "The pyparsing module is an alternative approach to creating and
4988 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4989 of regular expressions. The pyparsing module provides a library of classes
4990 that client code uses to construct the grammar directly in Python code.")
4991 (license license:expat)))
4992
4993 (define-public python2-pyparsing
4994 (package-with-python2 python-pyparsing))
4995
4996 (define-public python-pyparsing-2.4.7
4997 (package
4998 (inherit python-pyparsing)
4999 (version "2.4.7")
5000 (source
5001 (origin
5002 (method url-fetch)
5003 (uri (pypi-uri "pyparsing" version))
5004 (sha256
5005 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5006
5007 (define-public python-numpydoc
5008 (package
5009 (name "python-numpydoc")
5010 (version "0.8.0")
5011 (source
5012 (origin
5013 (method url-fetch)
5014 (uri (pypi-uri "numpydoc" version))
5015 (sha256
5016 (base32
5017 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5018 (build-system python-build-system)
5019 (propagated-inputs
5020 `(("python-sphinx" ,python-sphinx)))
5021 (native-inputs
5022 `(("python-nose" ,python-nose)))
5023 (home-page "https://pypi.org/project/numpydoc/")
5024 (synopsis
5025 "Numpy's Sphinx extensions")
5026 (description
5027 "Sphinx extension to support docstrings in Numpy format.")
5028 (license license:bsd-2)
5029 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5030
5031 (define-public python2-numpydoc
5032 (let ((base (package-with-python2
5033 (strip-python2-variant python-numpydoc))))
5034 (package
5035 (inherit base)
5036 (propagated-inputs
5037 `(("python2-jinja2" ,python2-jinja2)
5038 ,@(package-propagated-inputs base))))))
5039
5040 (define-public python-numexpr
5041 (package
5042 (name "python-numexpr")
5043 (version "2.6.5")
5044 (source
5045 (origin
5046 (method url-fetch)
5047 (uri (pypi-uri "numexpr" version))
5048 (sha256
5049 (base32
5050 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
5051 (build-system python-build-system)
5052 (arguments `(#:tests? #f)) ; no tests included
5053 (propagated-inputs
5054 `(("python-numpy" ,python-numpy)))
5055 (home-page "https://github.com/pydata/numexpr")
5056 (synopsis "Fast numerical expression evaluator for NumPy")
5057 (description
5058 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5059 expressions that operate on arrays are accelerated and use less memory than
5060 doing the same calculation in Python. In addition, its multi-threaded
5061 capabilities can make use of all your cores, which may accelerate
5062 computations, most specially if they are not memory-bounded (e.g. those using
5063 transcendental functions).")
5064 (license license:expat)))
5065
5066 (define-public python2-numexpr
5067 (package-with-python2 python-numexpr))
5068
5069 (define-public python-cycler
5070 (package
5071 (name "python-cycler")
5072 (version "0.10.0")
5073 (source (origin
5074 (method url-fetch)
5075 (uri (pypi-uri "cycler" version))
5076 (sha256
5077 (base32
5078 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5079 (build-system python-build-system)
5080 (arguments
5081 ;; XXX: The current version requires 'coveralls' which we don't have.
5082 ;; Enable this for the next release which uses 'python-pytest'.
5083 '(#:tests? #f))
5084 (propagated-inputs
5085 `(("python-six" ,python-six)))
5086 (home-page "https://matplotlib.org/cycler/")
5087 (synopsis "Composable keyword argument iterator")
5088 (description
5089 "When using @code{matplotlib} and plotting more than one line, it is
5090 common to want to be able to want to be able to cycle over one or more artist
5091 styles; but the plotting logic can quickly become involved.
5092 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5093 @code{Cycler} class was developed.")
5094 (license license:bsd-3)))
5095
5096 (define-public python2-cycler
5097 (package-with-python2 python-cycler))
5098
5099 (define-public python-colorspacious
5100 (package
5101 (name "python-colorspacious")
5102 (version "1.1.2")
5103 (source
5104 (origin
5105 (method git-fetch)
5106 (uri (git-reference
5107 (url "https://github.com/njsmith/colorspacious")
5108 (commit (string-append "v" version))))
5109 (file-name (git-file-name name version))
5110 (sha256
5111 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5112 (build-system python-build-system)
5113 (propagated-inputs
5114 `(("python-numpy" ,python-numpy)))
5115 (native-inputs
5116 `(("python-nose" ,python-nose)))
5117 (arguments
5118 `(#:phases
5119 (modify-phases %standard-phases
5120 (replace 'check
5121 (lambda _
5122 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5123 (home-page "https://github.com/njsmith/colorspacious")
5124 (synopsis "Python library for colorspace conversions")
5125 (description "@code{colorspacious} is a Python library that lets you
5126 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5127 (license license:expat)))
5128
5129 (define-public python2-colorspacious
5130 (package-with-python2 python-colorspacious))
5131
5132 (define-public python-matplotlib
5133 (package
5134 (name "python-matplotlib")
5135 (version "3.1.2")
5136 (source
5137 (origin
5138 (method url-fetch)
5139 (uri (pypi-uri "matplotlib" version))
5140 (sha256
5141 (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
5142 (patches
5143 (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
5144 (build-system python-build-system)
5145 (propagated-inputs ; the following packages are all needed at run time
5146 `(("python-cycler" ,python-cycler)
5147 ("python-kiwisolver" ,python-kiwisolver)
5148 ("python-pyparsing" ,python-pyparsing)
5149 ("python-pygobject" ,python-pygobject)
5150 ("gobject-introspection" ,gobject-introspection)
5151 ("python-tkinter" ,python "tk")
5152 ("python-dateutil" ,python-dateutil)
5153 ("python-numpy" ,python-numpy)
5154 ("python-pillow" ,python-pillow)
5155 ("python-pytz" ,python-pytz)
5156 ("python-six" ,python-six)
5157 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5158 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5159 ;; object. For this reason we need to import both libraries.
5160 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5161 ("python-pycairo" ,python-pycairo)
5162 ("python-cairocffi" ,python-cairocffi)))
5163 (inputs
5164 `(("libpng" ,libpng)
5165 ("freetype" ,freetype)
5166 ("cairo" ,cairo)
5167 ("glib" ,glib)
5168 ;; FIXME: Add backends when available.
5169 ;("python-wxpython" ,python-wxpython)
5170 ("tcl" ,tcl)
5171 ("tk" ,tk)))
5172 (native-inputs
5173 `(("pkg-config" ,pkg-config)
5174 ("python-pytest" ,python-pytest)
5175 ("python-mock" ,python-mock)
5176 ("unzip" ,unzip)
5177 ("jquery-ui"
5178 ,(origin
5179 (method url-fetch)
5180 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5181 (sha256
5182 (base32
5183 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5184 (arguments
5185 `(#:phases
5186 (modify-phases %standard-phases
5187 ;; XXX We disable all image comparison tests because we're using a
5188 ;; newer version of FreeType than matplotlib expects. This leads to
5189 ;; minor differences throughout the tests.
5190 (add-after 'unpack 'fix-and-disable-failing-tests
5191 (lambda _
5192 (substitute* (append (find-files "lib/matplotlib/tests/"
5193 "test_.*\\.py$")
5194 (find-files "lib/mpl_toolkits/tests"
5195 "test_.*\\.py$"))
5196 (("^from matplotlib" match)
5197 (string-append "import pytest\n" match))
5198 (("( *)@image_comparison" match indent)
5199 (string-append indent
5200 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5201 match)))
5202 (substitute* "lib/matplotlib/tests/test_animation.py"
5203 (("/bin/sh") (which "sh")))
5204 (for-each delete-file
5205 ;; test_normal_axes, test_get_tightbbox_polar
5206 '("lib/matplotlib/tests/test_axes.py"
5207 ;; We don't use the webagg backend and this test forces it.
5208 "lib/matplotlib/tests/test_backend_webagg.py"
5209 ;; test_outward_ticks
5210 "lib/matplotlib/tests/test_tightlayout.py"
5211 ;; test_hidden_axes fails with minor extent
5212 ;; differences, possibly due to the use of a
5213 ;; different version of FreeType.
5214 "lib/matplotlib/tests/test_constrainedlayout.py"
5215 ;; Fontconfig returns no fonts.
5216 "lib/matplotlib/tests/test_font_manager.py"))
5217 #t))
5218 (add-before 'install 'install-jquery-ui
5219 (lambda* (#:key outputs inputs #:allow-other-keys)
5220 (let ((dir (string-append (assoc-ref outputs "out")
5221 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5222 (mkdir-p dir)
5223 (invoke "unzip"
5224 (assoc-ref inputs "jquery-ui")
5225 "-d" dir))
5226 #t))
5227 (replace 'check
5228 (lambda* (#:key outputs inputs #:allow-other-keys)
5229 (add-installed-pythonpath inputs outputs)
5230 (invoke "python" "tests.py" "-v"
5231 "-m" "not network and not webagg")))
5232 (add-before 'build 'configure-environment
5233 (lambda* (#:key outputs inputs #:allow-other-keys)
5234 (let ((cairo (assoc-ref inputs "cairo")))
5235 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5236 ;; has not effect.
5237 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5238 (setenv "HOME" (getcwd))
5239 ;; Fix rounding errors when using the x87 FPU.
5240 (when (string-prefix? "i686" ,(%current-system))
5241 (setenv "CFLAGS" "-ffloat-store"))
5242 (call-with-output-file "setup.cfg"
5243 (lambda (port)
5244 (format port "[directories]~%
5245 basedirlist = ~a,~a~%
5246 [packages]~%
5247 tests = True~%"
5248 (assoc-ref inputs "tcl")
5249 (assoc-ref inputs "tk")))))
5250 #t)))))
5251 (home-page "https://matplotlib.org/")
5252 (synopsis "2D plotting library for Python")
5253 (description
5254 "Matplotlib is a Python 2D plotting library which produces publication
5255 quality figures in a variety of hardcopy formats and interactive environments
5256 across platforms. Matplotlib can be used in Python scripts, the python and
5257 ipython shell, web application servers, and six graphical user interface
5258 toolkits.")
5259 (license license:psfl)
5260 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5261
5262 (define-public python2-matplotlib
5263 (let ((matplotlib (package-with-python2
5264 (strip-python2-variant python-matplotlib))))
5265 (package (inherit matplotlib)
5266 (version "2.2.4")
5267 (source
5268 (origin
5269 (method url-fetch)
5270 (uri (pypi-uri "matplotlib" version))
5271 (sha256
5272 (base32
5273 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5274 (arguments
5275 (substitute-keyword-arguments (package-arguments matplotlib)
5276 ((#:phases phases)
5277 `(modify-phases ,phases
5278 (replace 'install-jquery-ui
5279 (lambda* (#:key outputs inputs #:allow-other-keys)
5280 (let ((dir (string-append (assoc-ref outputs "out")
5281 "/lib/python2.7/site-packages/"
5282 "matplotlib/backends/web_backend/")))
5283 (mkdir-p dir)
5284 (invoke "unzip"
5285 (assoc-ref inputs "jquery-ui")
5286 "-d" dir))
5287 #t))
5288 (delete 'fix-and-disable-failing-tests)
5289 (delete 'check))))) ; These tests weren't run the the past.
5290 ;; Make sure to use special packages for Python 2 instead
5291 ;; of those automatically rewritten by package-with-python2.
5292 (propagated-inputs
5293 `(("python2-pycairo" ,python2-pycairo)
5294 ("python2-backports-functools-lru-cache"
5295 ,python2-backports-functools-lru-cache)
5296 ("python2-functools32" ,python2-functools32)
5297 ("python2-pygobject-2" ,python2-pygobject-2)
5298 ("python2-subprocess32" ,python2-subprocess32)
5299 ("python2-tkinter" ,python-2 "tk")
5300 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5301 '("python-cairocffi"
5302 "python-pycairo"
5303 "python-pygobject"
5304 "python-tkinter")))))))
5305
5306 (define-public python-matplotlib-documentation
5307 (package
5308 (name "python-matplotlib-documentation")
5309 (version (package-version python-matplotlib))
5310 (source (package-source python-matplotlib))
5311 (build-system python-build-system)
5312 (native-inputs
5313 `(("python-matplotlib" ,python-matplotlib)
5314 ("python-colorspacious" ,python-colorspacious)
5315 ("python-sphinx" ,python-sphinx)
5316 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5317 ("python-sphinx-gallery" ,python-sphinx-gallery)
5318 ("python-numpydoc" ,python-numpydoc)
5319 ("python-ipython" ,python-ipython)
5320 ("python-ipykernel" ,python-ipykernel)
5321 ("python-mock" ,python-mock)
5322 ("graphviz" ,graphviz)
5323 ("texlive" ,(texlive-union (list texlive-amsfonts
5324 texlive-latex-amsmath
5325 texlive-latex-enumitem
5326 texlive-latex-expdlist
5327 texlive-latex-geometry
5328 texlive-latex-preview
5329 texlive-latex-type1cm
5330 texlive-latex-ucs
5331
5332 texlive-generic-pdftex
5333
5334 texlive-fonts-ec
5335 texlive-fonts-adobe-times
5336 texlive-fonts-txfonts)))
5337 ("texinfo" ,texinfo)
5338 ,@(package-native-inputs python-matplotlib)))
5339 (arguments
5340 `(#:tests? #f ; we're only generating documentation
5341 #:phases
5342 (modify-phases %standard-phases
5343 ;; The tests in python-matplotlib are run after the install phase, so
5344 ;; we need to delete the extra phase here.
5345 (delete 'check)
5346 (replace 'build
5347 (lambda _
5348 (chdir "doc")
5349 (setenv "PYTHONPATH"
5350 (string-append (getenv "PYTHONPATH")
5351 ":" (getcwd) "/../examples/units"))
5352 (substitute* "conf.py"
5353 ;; Don't use git.
5354 (("^SHA = check_output.*")
5355 (string-append "SHA = \"" ,version "\"\n"))
5356 ;; Don't fetch intersphinx files from the Internet
5357 (("^explicit_order_folders" m)
5358 (string-append "intersphinx_mapping = {}\n" m))
5359 (("'sphinx.ext.intersphinx',") "")
5360 ;; Disable URL embedding which requires internet access.
5361 (("'https://docs.scipy.org/doc/numpy'") "None")
5362 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5363 (invoke "make"
5364 "SPHINXBUILD=sphinx-build"
5365 "SPHINXOPTS=" ; don't abort on warnings
5366 "html" "texinfo")))
5367 (replace 'install
5368 (lambda* (#:key inputs outputs #:allow-other-keys)
5369 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5370 (doc (string-append data "/doc/python-matplotlib-" ,version))
5371 (info (string-append data "/info"))
5372 (html (string-append doc "/html")))
5373 (mkdir-p html)
5374 (mkdir-p info)
5375 (copy-recursively "build/html" html)
5376 (symlink (string-append html "/_images")
5377 (string-append info "/matplotlib-figures"))
5378 (with-directory-excursion "build/texinfo"
5379 (substitute* "matplotlib.texi"
5380 (("@image\\{([^,]*)" all file)
5381 (string-append "@image{matplotlib-figures/" file)))
5382 (symlink (string-append html "/_images")
5383 "./matplotlib-figures")
5384 (invoke "makeinfo" "--no-split"
5385 "-o" "matplotlib.info" "matplotlib.texi"))
5386 (install-file "build/texinfo/matplotlib.info" info))
5387 #t)))))
5388 (home-page (package-home-page python-matplotlib))
5389 (synopsis "Documentation for the python-matplotlib package")
5390 (description (package-description python-matplotlib))
5391 (license (package-license python-matplotlib))))
5392
5393 (define-public python2-matplotlib-documentation
5394 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5395 (package
5396 (inherit parent)
5397 (native-inputs
5398 (alist-delete "python-sphinx-copybutton"
5399 (package-native-inputs parent))))))
5400
5401 (define-public python-matplotlib-venn
5402 (package
5403 (name "python-matplotlib-venn")
5404 (version "0.11.5")
5405 (source
5406 (origin
5407 (method url-fetch)
5408 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5409 (sha256
5410 (base32
5411 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5412 (build-system python-build-system)
5413 (arguments '(#:tests? #f)) ; tests are not included
5414 (propagated-inputs
5415 `(("python-matplotlib" ,python-matplotlib)
5416 ("python-numpy" ,python-numpy)
5417 ("python-scipy" ,python-scipy)))
5418 (native-inputs
5419 `(("unzip" ,unzip)))
5420 (home-page "https://github.com/konstantint/matplotlib-venn")
5421 (synopsis "Plot area-proportional Venn diagrams")
5422 (description
5423 "This package provides tools for plotting area-proportional two- and
5424 three-way Venn diagrams in @code{matplotlib}.")
5425 (license license:expat)))
5426
5427 (define-public python-pysnptools
5428 (package
5429 (name "python-pysnptools")
5430 (version "0.4.11")
5431 (source
5432 (origin
5433 (method url-fetch)
5434 (uri (pypi-uri "pysnptools" version))
5435 (sha256
5436 (base32
5437 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5438 (build-system python-build-system)
5439 (arguments
5440 `(#:tests? #f ; no test data are included
5441 #:phases
5442 (modify-phases %standard-phases
5443 (replace 'check
5444 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5445 (if tests?
5446 (begin
5447 (add-installed-pythonpath inputs outputs)
5448 (invoke "python3" "pysnptools/test.py"))
5449 #t))))))
5450 (propagated-inputs
5451 `(("python-dill" ,python-dill)
5452 ("python-h5py" ,python-h5py)
5453 ("python-numpy" ,python-numpy)
5454 ("python-pandas" ,python-pandas)
5455 ("python-psutil" ,python-psutil)
5456 ("python-scipy" ,python-scipy)))
5457 (native-inputs
5458 `(("python-cython" ,python-cython)))
5459 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5460 (synopsis "Library for reading and manipulating genetic data")
5461 (description
5462 "PySnpTools is a library for reading and manipulating genetic data. It
5463 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5464 those files. It can also efficiently manipulate ranges of integers using set
5465 operators such as union, intersection, and difference.")
5466 (license license:asl2.0)))
5467
5468 (define-public python2-pysnptools
5469 (package-with-python2 python-pysnptools))
5470
5471 (define-public python-wurlitzer
5472 (package
5473 (name "python-wurlitzer")
5474 (version "2.0.1")
5475 (source
5476 (origin
5477 (method url-fetch)
5478 (uri (pypi-uri "wurlitzer" version))
5479 (sha256
5480 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5481 (build-system python-build-system)
5482 (arguments
5483 '(#:phases
5484 (modify-phases %standard-phases
5485 (replace 'check
5486 (lambda _
5487 (invoke "pytest" "-vv" "test.py"))))))
5488 (native-inputs
5489 `(("python-mock" ,python-mock)
5490 ("python-pytest" ,python-pytest)))
5491 (home-page "https://github.com/minrk/wurlitzer")
5492 (synopsis "Capture C-level output in context managers")
5493 (description
5494 "This library helps to redirect @code{sys.stdout} to a stream or a file
5495 while executing some piece of code, including C code running within a Python
5496 process.")
5497 (license license:expat)))
5498
5499 (define-public python-socksipy-branch
5500 (package
5501 (name "python-socksipy-branch")
5502 (version "1.01")
5503 (source
5504 (origin
5505 (method url-fetch)
5506 (uri (pypi-uri "SocksiPy-branch" version))
5507 (sha256
5508 (base32
5509 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5510 (build-system python-build-system)
5511 (arguments
5512 `(#:tests? #f)) ; There are no tests
5513 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5514 (synopsis "Python SOCKS module")
5515 (description
5516 "SocksiPy - A Python SOCKS client module. It provides a
5517 socket-like interface that supports connections to any TCP
5518 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5519 The original version was developed by Dan Haim, this is a
5520 branch created by Mario Vilas to address some open issues,
5521 as the original project seems to have been abandoned circa 2007.")
5522 (license license:bsd-3)))
5523
5524 (define-public python2-socksipy-branch
5525 (package-with-python2 python-socksipy-branch))
5526
5527 (define-public python-socksipychain
5528 (package
5529 (name "python-socksipychain")
5530 (version "2.1.2")
5531 (source
5532 (origin
5533 (method git-fetch)
5534 (uri (git-reference
5535 (url "https://github.com/pagekite/PySocksipyChain")
5536 (commit (string-append "v" version))))
5537 (file-name (git-file-name name version))
5538 (sha256
5539 (base32
5540 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5541 (build-system python-build-system)
5542 (arguments
5543 `(#:tests? #f)) ; Tests try to access the network.
5544 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5545 (synopsis "Python SOCKS module with chained proxies support")
5546 (description
5547 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5548 adds support for arbitrary chaining of proxy servers and various modes of
5549 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5550 a simple netcat replacement with chaining support.")
5551 (license license:bsd-3)))
5552
5553 (define-public python-pycodestyle
5554 (package
5555 (name "python-pycodestyle")
5556 (version "2.6.0")
5557 (source
5558 (origin
5559 (method url-fetch)
5560 (uri (pypi-uri "pycodestyle" version))
5561 (sha256
5562 (base32
5563 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5564 (build-system python-build-system)
5565 (arguments
5566 `(#:phases
5567 (modify-phases %standard-phases
5568 (replace 'check
5569 (lambda _
5570 (invoke "pytest" "-vv"))))))
5571 (native-inputs
5572 `(("python-pytest" ,python-pytest)))
5573 (home-page "https://pycodestyle.readthedocs.io/")
5574 (synopsis "Python style guide checker")
5575 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5576 Python code against some of the style conventions in
5577 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5578 (license license:expat)))
5579
5580 (define-public python2-pycodestyle
5581 (package-with-python2 python-pycodestyle))
5582
5583 (define-public python-multidict
5584 (package
5585 (name "python-multidict")
5586 (version "4.7.5")
5587 (source
5588 (origin
5589 (method url-fetch)
5590 (uri (pypi-uri "multidict" version))
5591 (sha256
5592 (base32
5593 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5594 (build-system python-build-system)
5595 (arguments
5596 '(#:modules ((ice-9 ftw)
5597 (srfi srfi-1)
5598 (srfi srfi-26)
5599 (guix build utils)
5600 (guix build python-build-system))
5601 #:phases (modify-phases %standard-phases
5602 (replace 'check
5603 (lambda* (#:key tests? #:allow-other-keys)
5604 (if tests?
5605 (begin
5606 (let ((libdir (find (cut string-prefix? "lib." <>)
5607 (scandir "build"))))
5608 (setenv "PYTHONPATH"
5609 (string-append "./build/" libdir ":"
5610 (getenv "PYTHONPATH")))
5611 (invoke "pytest" "-vv")))
5612 (format #t "test suite not run~%"))
5613 #t)))))
5614 (native-inputs
5615 `(("python-pytest" ,python-pytest)
5616 ("python-pytest-cov" ,python-pytest-cov)))
5617 (home-page "https://github.com/aio-libs/multidict/")
5618 (synopsis "Multidict implementation")
5619 (description "Multidict is dict-like collection of key-value pairs
5620 where key might be occurred more than once in the container.")
5621 (license license:asl2.0)))
5622
5623 (define-public python-orderedmultidict
5624 (package
5625 (name "python-orderedmultidict")
5626 (version "1.0")
5627 (source
5628 (origin
5629 (method url-fetch)
5630 (uri (pypi-uri "orderedmultidict" version))
5631 (sha256
5632 (base32
5633 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5634 (build-system python-build-system)
5635 (arguments
5636 `(#:phases
5637 (modify-phases %standard-phases
5638 (add-after 'unpack 'fix-tests
5639 (lambda _
5640 ;; The package uses nosetest for running the tests.
5641 ;; Adding this initfile allows to run the test suite
5642 ;; without requiring nosetest.
5643 (with-output-to-file "tests/__init__.py" newline)
5644 #t)))))
5645 (propagated-inputs
5646 `(("python-six" ,python-six)))
5647 (native-inputs
5648 `(("python-pycodestyle" ,python-pycodestyle)))
5649 (home-page "https://github.com/gruns/orderedmultidict")
5650 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5651 (description "This package contains a library for ordered multivalue
5652 dictionaries. A multivalue dictionary is a dictionary that can store
5653 multiple values for the same key. An ordered multivalue dictionary is a
5654 multivalue dictionary that retains the order of insertions and deletions.")
5655 (license license:unlicense)))
5656
5657 (define-public python2-orderedmultidict
5658 (package-with-python2 python-orderedmultidict))
5659
5660 (define-public python-autopep8
5661 (package
5662 (name "python-autopep8")
5663 (version "1.5.3")
5664 (source
5665 (origin
5666 (method url-fetch)
5667 (uri (pypi-uri "autopep8" version))
5668 (sha256
5669 (base32
5670 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5671 (build-system python-build-system)
5672 (propagated-inputs
5673 `(("python-pycodestyle" ,python-pycodestyle)
5674 ("python-toml" ,python-toml)))
5675 (home-page "https://github.com/hhatto/autopep8")
5676 (synopsis "Format Python code according to the PEP 8 style guide")
5677 (description
5678 "@code{autopep8} automatically formats Python code to conform to
5679 the PEP 8 style guide. It uses the pycodestyle utility to determine
5680 what parts of the code needs to be formatted. @code{autopep8} is
5681 capable of fixing most of the formatting issues that can be reported
5682 by pycodestyle.")
5683 (license (license:non-copyleft
5684 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5685
5686 (define-public python2-autopep8
5687 (package-with-python2 python-autopep8))
5688
5689 (define-public python-distlib
5690 (package
5691 (name "python-distlib")
5692 (version "0.3.0")
5693 (source
5694 (origin
5695 (method url-fetch)
5696 (uri (pypi-uri "distlib" version ".zip"))
5697 (sha256
5698 (base32
5699 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5700 (build-system python-build-system)
5701 (arguments
5702 `(#:phases
5703 (modify-phases %standard-phases
5704 (add-before 'build 'no-/bin/sh
5705 (lambda _
5706 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5707 (("/bin/sh") (which "sh")))
5708 #t))
5709 (add-before 'check 'prepare-test-env
5710 (lambda _
5711 (setenv "HOME" "/tmp")
5712 ;; NOTE: Any value works, the variable just has to be present.
5713 (setenv "SKIP_ONLINE" "1")
5714 #t)))))
5715 (native-inputs `(("unzip" ,unzip)))
5716 (home-page "https://bitbucket.org/pypa/distlib")
5717 (synopsis "Distribution utilities")
5718 (description "Distlib is a library which implements low-level functions that
5719 relate to packaging and distribution of Python software. It is intended to be
5720 used as the basis for third-party packaging tools.")
5721 (license license:psfl)))
5722
5723 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
5724 (define-public python-distlib/next
5725 (package
5726 (inherit python-distlib)
5727 (version "0.3.1")
5728 (source
5729 (origin
5730 (method url-fetch)
5731 (uri (pypi-uri "distlib" version ".zip"))
5732 (sha256
5733 (base32
5734 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
5735
5736 (define-public python-distutils-extra
5737 (package
5738 (name "python-distutils-extra")
5739 (version "2.38")
5740 (source
5741 (origin
5742 (method url-fetch)
5743 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5744 version "/+download/python-distutils-extra-"
5745 version ".tar.gz"))
5746 (sha256
5747 (base32
5748 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5749 (build-system python-build-system)
5750 (home-page "https://launchpad.net/python-distutils-extra/")
5751 (synopsis "Enhancements to Python's distutils")
5752 (description
5753 "The python-distutils-extra module enables you to easily integrate
5754 gettext support, themed icons, and scrollkeeper-based documentation into
5755 Python's distutils.")
5756 (license license:gpl2)))
5757
5758 (define-public python2-distutils-extra
5759 (package-with-python2 python-distutils-extra))
5760
5761 (define-public python2-elib.intl
5762 (package
5763 (name "python2-elib.intl")
5764 (version "0.0.3")
5765 (source
5766 (origin
5767 ;; This project doesn't tag releases or publish tarballs, so we take
5768 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5769 (method git-fetch)
5770 (uri (git-reference
5771 (url "https://github.com/dieterv/elib.intl")
5772 (commit "d09997cfef")))
5773 (file-name (string-append name "-" version "-checkout"))
5774 (sha256
5775 (base32
5776 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5777 (build-system python-build-system)
5778 (arguments
5779 ;; incompatible with Python 3 (exception syntax)
5780 `(#:python ,python-2
5781 #:tests? #f))
5782 (home-page "https://github.com/dieterv/elib.intl")
5783 (synopsis "Enhanced internationalization for Python")
5784 (description
5785 "The elib.intl module provides enhanced internationalization (I18N)
5786 services for your Python modules and applications.")
5787 (license license:lgpl3+)))
5788
5789 (define-public python-olefile
5790 (package
5791 (name "python-olefile")
5792 (version "0.46")
5793 (source
5794 (origin
5795 (method url-fetch)
5796 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5797 "download/v" version "/olefile-" version ".tar.gz"))
5798 (file-name (string-append name "-" version ".tar.gz"))
5799 (sha256
5800 (base32
5801 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5802 (build-system python-build-system)
5803 (home-page "https://www.decalage.info/python/olefileio")
5804 (synopsis "Read and write Microsoft OLE2 files.")
5805 (description
5806 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5807 Storage or Compound Document, Microsoft Office). It is an improved version of
5808 the OleFileIO module from PIL, the Python Image Library.")
5809 (license license:bsd-3)))
5810
5811 (define-public python2-olefile
5812 (package-with-python2 python-olefile))
5813
5814 (define-public python-pikepdf
5815 (package
5816 (name "python-pikepdf")
5817 (version "2.8.0.post2")
5818 (source
5819 (origin
5820 (method url-fetch)
5821 (uri (pypi-uri "pikepdf" version))
5822 (sha256
5823 (base32 "0ya9bir41bz61y2njlcr5ni8l6cjsy0h5vg9ayxhw7dzgcibj0yp"))))
5824 (build-system python-build-system)
5825 (arguments
5826 `(#:tests? #false)) ;require python-xmp-toolkit
5827 (native-inputs
5828 `(("pybind11" ,pybind11)
5829 ("python-setuptools" ,python-setuptools)
5830 ("python-setuptools-scm" ,python-setuptools-scm/next)
5831 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
5832 ("python-toml" ,python-toml)
5833 ("python-wheel" ,python-wheel)))
5834 (inputs
5835 `(("qpdf" ,qpdf)))
5836 (propagated-inputs
5837 `(("python-lxml" ,python-lxml)
5838 ("python-pillow" ,python-pillow)))
5839 (home-page "https://github.com/pikepdf/pikepdf")
5840 (synopsis "Read and write PDFs with Python")
5841 (description
5842 "pikepdf is a Python library for reading and writing PDF files.")
5843 (license license:mpl2.0)))
5844
5845 (define-public python-pillow
5846 (package
5847 (name "python-pillow")
5848 (version "8.1.1")
5849 (source
5850 (origin
5851 (method url-fetch)
5852 (uri (pypi-uri "Pillow" version))
5853 (sha256
5854 (base32
5855 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
5856 (build-system python-build-system)
5857 (native-inputs
5858 `(("python-pytest" ,python-pytest)))
5859 (inputs
5860 `(("freetype" ,freetype)
5861 ("lcms" ,lcms)
5862 ("libjpeg" ,libjpeg-turbo)
5863 ("libtiff" ,libtiff)
5864 ("libwebp" ,libwebp)
5865 ("openjpeg" ,openjpeg)
5866 ("zlib" ,zlib)))
5867 (propagated-inputs
5868 `(("python-olefile" ,python-olefile)))
5869 (arguments
5870 `(#:phases
5871 (modify-phases %standard-phases
5872 (add-after 'unpack 'patch-ldconfig
5873 (lambda _
5874 (substitute* "setup.py"
5875 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5876 (replace 'check
5877 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5878 (if tests?
5879 (begin
5880 (setenv "HOME" (getcwd))
5881 ;; Make installed package available for running the tests.
5882 (add-installed-pythonpath inputs outputs)
5883 (invoke "python" "selftest.py" "--installed")
5884 (invoke "python" "-m" "pytest" "-vv"))
5885 #t))))))
5886 (home-page "https://python-pillow.org")
5887 (synopsis "Fork of the Python Imaging Library")
5888 (description
5889 "The Python Imaging Library adds image processing capabilities to your
5890 Python interpreter. This library provides extensive file format support, an
5891 efficient internal representation, and fairly powerful image processing
5892 capabilities. The core image library is designed for fast access to data
5893 stored in a few basic pixel formats. It should provide a solid foundation for
5894 a general image processing tool.")
5895 (properties `((python2-variant . ,(delay python2-pillow))))
5896 (license (license:x11-style
5897 "http://www.pythonware.com/products/pil/license.htm"
5898 "The PIL Software License"))))
5899
5900 (define-public python2-pillow
5901 (package-with-python2
5902 (package
5903 (inherit (strip-python2-variant python-pillow))
5904 ;; Version 6 is the last series with Python 2 support.
5905 (version "6.2.2")
5906 (source
5907 (origin
5908 (method url-fetch)
5909 (uri (pypi-uri "Pillow" version))
5910 (sha256
5911 (base32
5912 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
5913
5914 (define-public python-pillow-2.9
5915 (package
5916 (inherit python-pillow)
5917 (version "2.9.0")
5918 (source
5919 (origin
5920 (method url-fetch)
5921 (uri (pypi-uri "Pillow" version))
5922 (sha256
5923 (base32
5924 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5925 (arguments
5926 (substitute-keyword-arguments (package-arguments python-pillow)
5927 ((#:tests? _ #f) #f)))
5928 (properties '((hidden? #t)))))
5929
5930 (define-public python-pillow-simd
5931 (package
5932 (inherit python-pillow)
5933 (name "python-pillow-simd")
5934 (version "7.1.2")
5935 ;; The PyPI tarball does not include test files.
5936 (source
5937 (origin
5938 (method git-fetch)
5939 (uri (git-reference
5940 (url "https://github.com/uploadcare/pillow-simd")
5941 (commit version)))
5942 (file-name (git-file-name name version))
5943 (sha256
5944 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
5945 (arguments
5946 (substitute-keyword-arguments
5947 (package-arguments python-pillow)
5948 ((#:phases phases)
5949 `(modify-phases ,phases
5950 (add-after 'unpack 'make-tests-writable
5951 (lambda _
5952 (for-each make-file-writable (find-files "Tests"))
5953 #t))))))
5954 (inputs
5955 `(("libraqm" ,libraqm)
5956 ("libimagequant" ,libimagequant)
5957 ,@(package-inputs python-pillow)))
5958 (home-page "https://github.com/uploadcare/pillow-simd")
5959 (synopsis "Fork of the Python Imaging Library (Pillow)")
5960 (description "This package is a fork of Pillow which adds support for SIMD
5961 parallelism.")))
5962
5963 (define-public python-roifile
5964 (package
5965 (name "python-roifile")
5966 (version "2020.5.28")
5967 (source
5968 (origin
5969 (method url-fetch)
5970 (uri (pypi-uri "roifile" version))
5971 (sha256
5972 (base32
5973 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5974 (build-system python-build-system)
5975 (arguments `(#:tests? #f)) ; there are none
5976 (propagated-inputs
5977 `(("python-numpy" ,python-numpy)))
5978 (home-page "https://www.lfd.uci.edu/~gohlke/")
5979 (synopsis "Read and write ImageJ ROI format")
5980 (description "Roifile is a Python library to read, write, create, and plot
5981 ImageJ ROIs, an undocumented and ImageJ application specific format to store
5982 regions of interest, geometric shapes, paths, text, etc for image overlays.")
5983 (license license:bsd-3)))
5984
5985 (define-public python-tifffile
5986 (package
5987 (name "python-tifffile")
5988 (version "2020.6.3")
5989 (source
5990 (origin
5991 (method url-fetch)
5992 (uri (pypi-uri "tifffile" version))
5993 (sha256
5994 (base32
5995 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5996 (build-system python-build-system)
5997 ;; Tests require lfdfiles, which depends on tifffile
5998 (arguments `(#:tests? #f))
5999 (propagated-inputs
6000 `(("python-numpy" ,python-numpy)
6001 ;;("python-lfdfiles" ,python-lfdfiles)
6002 ("python-roifile" ,python-roifile)))
6003 (home-page "https://www.lfd.uci.edu/~gohlke/")
6004 (synopsis "Read and write TIFF(r) files")
6005 (description "This package lets you read image and metadata from many
6006 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6007 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6008 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6009 (license license:bsd-3)))
6010
6011 (define-public python-lfdfiles
6012 (package
6013 (name "python-lfdfiles")
6014 (version "2020.1.1")
6015 (source
6016 (origin
6017 (method url-fetch)
6018 (uri (pypi-uri "lfdfiles" version))
6019 (sha256
6020 (base32
6021 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
6022 (build-system python-build-system)
6023 (propagated-inputs
6024 `(("python-click" ,python-click)
6025 ("python-numpy" ,python-numpy)
6026 ("python-tifffile" ,python-tifffile)))
6027 (home-page "https://www.lfd.uci.edu/~gohlke/")
6028 (synopsis "Work with LFD data files")
6029 (description
6030 "Lfdfiles is a Python library and console script for reading, writing,
6031 converting, and viewing many of the proprietary file formats used to store
6032 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6033 (license license:bsd-3)))
6034
6035 (define-public python-imageio
6036 (package
6037 (name "python-imageio")
6038 (version "2.8.0")
6039 (source
6040 (origin
6041 (method url-fetch)
6042 (uri (pypi-uri "imageio" version))
6043 (sha256
6044 (base32
6045 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6046 (build-system python-build-system)
6047 (arguments
6048 `(#:tests? #f ; many tests require online data
6049 #:phases
6050 (modify-phases %standard-phases
6051 (replace 'check
6052 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6053 (if tests?
6054 (begin
6055 ;; Make installed package available for running the tests.
6056 (add-installed-pythonpath inputs outputs)
6057 (invoke "pytest" "-vv"))
6058 #t))))))
6059 (propagated-inputs
6060 `(("python-numpy" ,python-numpy)
6061 ("python-pillow" ,python-pillow)
6062 ("python-psutil" ,python-psutil)))
6063 (native-inputs
6064 `(("python-pytest" ,python-pytest)))
6065 (home-page "https://imageio.github.io/")
6066 (synopsis "Library for reading and writing a wide range of image data")
6067 (description
6068 "Imageio is a Python library that provides an easy interface to read and
6069 write a wide range of image data, including animated images, video, volumetric
6070 data, and scientific formats.")
6071 (license license:bsd-2)))
6072
6073 (define-public python-pycparser
6074 (package
6075 (name "python-pycparser")
6076 (version "2.20")
6077 (source
6078 (origin
6079 (method url-fetch)
6080 (uri (pypi-uri "pycparser" version))
6081 (sha256
6082 (base32
6083 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6084 (outputs '("out" "doc"))
6085 (build-system python-build-system)
6086 (native-inputs
6087 `(("pkg-config" ,pkg-config)))
6088 (arguments
6089 `(#:phases
6090 (modify-phases %standard-phases
6091 (replace 'check
6092 (lambda _
6093 (with-directory-excursion "tests"
6094 (invoke "python" "all_tests.py"))
6095 #t))
6096 (add-after 'install 'install-doc
6097 (lambda* (#:key outputs #:allow-other-keys)
6098 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6099 (doc (string-append data "/doc/" ,name "-" ,version))
6100 (examples (string-append doc "/examples")))
6101 (mkdir-p examples)
6102 (for-each (lambda (file)
6103 (copy-file (string-append "." file)
6104 (string-append doc file)))
6105 '("/README.rst" "/CHANGES" "/LICENSE"))
6106 (copy-recursively "examples" examples)
6107 #t))))))
6108 (home-page "https://github.com/eliben/pycparser")
6109 (synopsis "C parser in Python")
6110 (description
6111 "Pycparser is a complete parser of the C language, written in pure Python
6112 using the PLY parsing library. It parses C code into an AST and can serve as
6113 a front-end for C compilers or analysis tools.")
6114 (license license:bsd-3)))
6115
6116 (define-public python2-pycparser
6117 (package-with-python2 python-pycparser))
6118
6119 (define-public python-xlsxwriter
6120 (package
6121 (name "python-xlsxwriter")
6122 (version "1.3.7")
6123 (source
6124 (origin
6125 ;; There are no tests in the PyPI tarball.
6126 (method git-fetch)
6127 (uri (git-reference
6128 (url "https://github.com/jmcnamara/XlsxWriter")
6129 (commit (string-append "RELEASE_" version))))
6130 (file-name (git-file-name name version))
6131 (sha256
6132 (base32 "1qg40r2mwrqfmhaxnary1cfgi0dwwazp5qga7c9p2cdji2v0x5rm"))))
6133 (build-system python-build-system)
6134 (home-page "https://github.com/jmcnamara/XlsxWriter")
6135 (synopsis "Python module for creating Excel XLSX files")
6136 (description
6137 "XlsxWriter is a Python module that can be used to write text, numbers,
6138 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
6139 (license license:bsd-2)))
6140
6141 (define-public python-pywavelets
6142 (package
6143 (name "python-pywavelets")
6144 (version "1.1.1")
6145 (home-page "https://github.com/PyWavelets/pywt")
6146 (source (origin
6147 (method url-fetch)
6148 (uri (pypi-uri "PyWavelets" version))
6149 (sha256
6150 (base32
6151 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6152 (build-system python-build-system)
6153 (arguments
6154 '(#:modules ((ice-9 ftw)
6155 (srfi srfi-1)
6156 (srfi srfi-26)
6157 (guix build utils)
6158 (guix build python-build-system))
6159 #:phases
6160 (modify-phases %standard-phases
6161 (replace 'check
6162 (lambda _
6163 (let ((cwd (getcwd))
6164 (libdir (find (cut string-prefix? "lib." <>)
6165 (scandir "build"))))
6166 (with-directory-excursion (string-append cwd "/build/" libdir)
6167 (invoke "pytest" "-vv"))))))))
6168 (native-inputs
6169 `(("python-matplotlib" ,python-matplotlib) ;for tests
6170 ("python-pytest" ,python-pytest)))
6171 (propagated-inputs
6172 `(("python-numpy" ,python-numpy)))
6173 (synopsis "Wavelet transforms in Python")
6174 (description
6175 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6176 mathematical basis functions that are localized in both time and frequency.
6177 Wavelet transforms are time-frequency transforms employing wavelets. They are
6178 similar to Fourier transforms, the difference being that Fourier transforms are
6179 localized only in frequency instead of in time and frequency.")
6180 (license license:expat)))
6181
6182 (define-public python-pywal
6183 (package
6184 (name "python-pywal")
6185 (version "3.3.0")
6186 (source
6187 (origin
6188 (method git-fetch)
6189 (uri (git-reference
6190 (url "https://github.com/dylanaraps/pywal")
6191 (commit version)))
6192 (file-name (git-file-name name version))
6193 (sha256
6194 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
6195 (build-system python-build-system)
6196 (arguments
6197 `(#:phases
6198 (modify-phases %standard-phases
6199 (add-before 'check 'fix-home-directory
6200 (lambda _
6201 ;; Tests fail with "Permission denied: '/homeless-shelter'".
6202 (setenv "HOME" "/tmp")
6203 #t)))))
6204 (inputs
6205 `(("imagemagick" ,imagemagick)))
6206 (home-page "https://github.com/dylanaraps/pywal")
6207 (synopsis "Color palette generator and applicator")
6208 (description
6209 "Pywal is a tool that generates a color palette from the dominant colors
6210 in an image. It then applies the colors system-wide and on-the-fly in all of
6211 your favourite programs.")
6212 (license license:expat)))
6213
6214 (define-public python-pywinrm
6215 (package
6216 (name "python-pywinrm")
6217 (version "0.4.1")
6218 (source
6219 (origin
6220 (method url-fetch)
6221 (uri (pypi-uri "pywinrm" version))
6222 (sha256
6223 (base32
6224 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6225 (build-system python-build-system)
6226 (propagated-inputs
6227 `(("python-six" ,python-six)
6228 ("python-requests_ntlm" ,python-requests_ntlm)
6229 ("python-xmltodict" ,python-xmltodict)
6230 ("python-kerberos" ,python-kerberos)))
6231 (native-inputs
6232 `(("python-mock" ,python-mock)
6233 ("python-pytest" ,python-pytest)))
6234 (home-page "https://github.com/diyan/pywinrm/")
6235 (synopsis
6236 "Python library for Windows Remote Management (WinRM)")
6237 (description
6238 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6239 service. It allows you to invoke commands on target Windows machines from
6240 any machine that can run Python.")
6241 (license license:expat)))
6242
6243 (define-public python-xcffib
6244 (package
6245 (name "python-xcffib")
6246 (version "0.6.0")
6247 (source
6248 (origin
6249 (method url-fetch)
6250 (uri (pypi-uri "xcffib" version))
6251 (sha256
6252 (base32
6253 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6254 (build-system python-build-system)
6255 (inputs
6256 `(("libxcb" ,libxcb)))
6257 (propagated-inputs
6258 `(("python-cffi" ,python-cffi) ; used at run time
6259 ("python-six" ,python-six)))
6260 (arguments
6261 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6262 #:tests? #f
6263 #:phases
6264 (modify-phases %standard-phases
6265 (add-after 'unpack 'fix-libxcb-path
6266 (lambda* (#:key inputs #:allow-other-keys)
6267 (let ((libxcb (assoc-ref inputs "libxcb")))
6268 (substitute* '("xcffib/__init__.py")
6269 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6270 #t)))
6271 (add-after 'install 'install-doc
6272 (lambda* (#:key outputs #:allow-other-keys)
6273 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6274 "/doc/" ,name "-" ,version)))
6275 (mkdir-p doc)
6276 (copy-file "README.md"
6277 (string-append doc "/README.md"))
6278 #t))))))
6279 (home-page "https://github.com/tych0/xcffib")
6280 (synopsis "XCB Python bindings")
6281 (description
6282 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6283 support for Python 3 and PyPy. It is based on cffi.")
6284 (license license:expat)))
6285
6286 (define-public python2-xcffib
6287 (package-with-python2 python-xcffib))
6288
6289 (define-public python-cairocffi
6290 (package
6291 (name "python-cairocffi")
6292 (version "1.2.0")
6293 (source
6294 (origin
6295 ;; The PyPI archive does not include the documentation, so use Git.
6296 (method git-fetch)
6297 (uri (git-reference
6298 (url "https://github.com/Kozea/cairocffi")
6299 (commit (string-append "v" version))))
6300 (file-name (git-file-name name version))
6301 (sha256
6302 (base32
6303 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6304 (build-system python-build-system)
6305 (outputs '("out" "doc"))
6306 (inputs
6307 `(("glib" ,glib)
6308 ("gtk+" ,gtk+)
6309 ("gdk-pixbuf" ,gdk-pixbuf)
6310 ("cairo" ,cairo)))
6311 (native-inputs
6312 `(("python-numpy" ,python-numpy)
6313 ("python-pytest" ,python-pytest)
6314 ("python-pytest-cov" ,python-pytest-cov)
6315 ("python-pytest-runner" ,python-pytest-runner)
6316 ("python-sphinx" ,python-sphinx)
6317 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6318 (propagated-inputs
6319 `(("python-xcffib" ,python-xcffib))) ; used at run time
6320 (arguments
6321 `(#:phases
6322 (modify-phases %standard-phases
6323 (add-after 'unpack 'patch-paths
6324 (lambda* (#:key inputs #:allow-other-keys)
6325 (substitute* "cairocffi/__init__.py"
6326 ;; Hack the dynamic library loading mechanism.
6327 (("find_library\\(library_name\\)")
6328 "\"found\"")
6329 (("filenames = \\(library_filename,\\) \\+ filenames")
6330 "pass")
6331 (("libcairo.so.2")
6332 (string-append (assoc-ref inputs "cairo")
6333 "/lib/libcairo.so.2")))
6334 (substitute* "cairocffi/pixbuf.py"
6335 (("libgdk_pixbuf-2.0.so.0")
6336 (string-append (assoc-ref inputs "gdk-pixbuf")
6337 "/lib/libgdk_pixbuf-2.0.so.0"))
6338 (("libgobject-2.0.so.0")
6339 (string-append (assoc-ref inputs "glib")
6340 "/lib/libgobject-2.0.so.0"))
6341 (("libglib-2.0.so.0")
6342 (string-append (assoc-ref inputs "glib")
6343 "/lib/libglib-2.0.so.0"))
6344 (("libgdk-3.so.0")
6345 (string-append (assoc-ref inputs "gtk+")
6346 "/lib/libgdk-3.so.0")))
6347 #t))
6348 (add-after 'unpack 'disable-linters
6349 ;; Their check fails; none of our business.
6350 (lambda _
6351 (substitute* "setup.cfg"
6352 ((".*pytest-flake8.*") "")
6353 ((".*pytest-isort.*") "")
6354 (("--flake8") "")
6355 (("--isort") ""))
6356 #t))
6357 (add-after 'install 'install-doc
6358 (lambda* (#:key inputs outputs #:allow-other-keys)
6359 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6360 (doc (string-append data "/doc/" ,name "-" ,version))
6361 (html (string-append doc "/html")))
6362 (setenv "LD_LIBRARY_PATH"
6363 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6364 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6365 (setenv "LANG" "en_US.UTF-8")
6366 (mkdir-p html)
6367 (for-each (lambda (file)
6368 (copy-file (string-append "." file)
6369 (string-append doc file)))
6370 '("/README.rst" "/NEWS.rst"))
6371 (system* "python" "setup.py" "build_sphinx")
6372 (copy-recursively "docs/_build/html" html)
6373 #t))))))
6374 (home-page "https://github.com/Kozea/cairocffi")
6375 (synopsis "Python bindings and object-oriented API for Cairo")
6376 (description
6377 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6378 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6379 graphics library with support for multiple backends including image buffers,
6380 PNG, PostScript, PDF, and SVG file output.")
6381 (license license:bsd-3)))
6382
6383 (define-public python2-cairocffi
6384 (package-with-python2 python-cairocffi))
6385
6386 (define-public python-decorator
6387 (package
6388 (name "python-decorator")
6389 (version "4.3.0")
6390 (source
6391 (origin
6392 (method url-fetch)
6393 (uri (pypi-uri "decorator" version))
6394 (sha256
6395 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6396 (build-system python-build-system)
6397 (home-page "https://pypi.org/project/decorator/")
6398 (synopsis "Python module to simplify usage of decorators")
6399 (description
6400 "The aim of the decorator module is to simplify the usage of decorators
6401 for the average programmer, and to popularize decorators usage giving examples
6402 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6403 etc. The core of this module is a decorator factory.")
6404 (license license:expat)))
6405
6406 (define-public python2-decorator
6407 (package-with-python2 python-decorator))
6408
6409 (define-public python-drmaa
6410 (package
6411 (name "python-drmaa")
6412 (version "0.7.7")
6413 (source
6414 (origin
6415 (method url-fetch)
6416 (uri (pypi-uri "drmaa" version))
6417 (sha256
6418 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6419 (build-system python-build-system)
6420 ;; The test suite requires libdrmaa which is provided by the cluster
6421 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6422 ;; should be set to the path of the libdrmaa library.
6423 (arguments '(#:tests? #f))
6424 (native-inputs
6425 `(("python-nose" ,python-nose)))
6426 (home-page "https://pypi.org/project/drmaa/")
6427 (synopsis "Python bindings for the DRMAA library")
6428 (description
6429 "A Python package for Distributed Resource Management (DRM) job
6430 submission and control. This package is an implementation of the DRMAA 1.0
6431 Python language binding specification.")
6432 (license license:bsd-3)))
6433
6434 (define-public python2-drmaa
6435 (package-with-python2 python-drmaa))
6436
6437 (define-public python-grako
6438 (package
6439 (name "python-grako")
6440 (version "3.99.9")
6441 (source
6442 (origin
6443 (method url-fetch)
6444 (uri
6445 (pypi-uri "grako" version ".zip"))
6446 (sha256
6447 (base32
6448 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6449 (build-system python-build-system)
6450 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6451 (native-inputs
6452 `(("unzip" ,unzip)
6453 ("python-pytest" ,python-pytest)
6454 ("python-pytest-runner" ,python-pytest-runner)))
6455 (home-page "https://bitbucket.org/neogeny/grako")
6456 (synopsis "EBNF parser generator")
6457 (description
6458 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6459 memoizing PEG/Packrat parser in Python.")
6460 (license license:bsd-3)))
6461
6462 (define-public python2-grako
6463 (package-with-python2 python-grako))
6464
6465 (define-public python-grandalf
6466 (package
6467 (name "python-grandalf")
6468 (version "0.7")
6469 (source
6470 (origin
6471 ;; There's no source tarball on PyPI.
6472 (method git-fetch)
6473 (uri (git-reference
6474 (url "https://github.com/bdcht/grandalf")
6475 (commit (string-append "v" version))))
6476 (file-name (git-file-name name version))
6477 (sha256
6478 (base32
6479 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6480 (build-system python-build-system)
6481 (arguments
6482 '(#:phases
6483 (modify-phases %standard-phases
6484 (replace 'check
6485 (lambda _
6486 (invoke "python" "setup.py" "pytest"))))))
6487 (native-inputs
6488 `(("python-pytest" ,python-pytest)
6489 ("python-pytest-runner" ,python-pytest-runner)))
6490 (propagated-inputs
6491 `(("python-numpy" ,python-numpy)
6492 ("python-ply" ,python-ply)))
6493 (home-page "https://github.com/bdcht/grandalf")
6494 (synopsis "Graph and drawing algorithms framework")
6495 (description
6496 "Grandalf is a Python package made for experimentations with graphs
6497 drawing algorithms. It is written in pure Python, and currently implements
6498 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6499 minimization approach. While not as fast or featured as graphviz or other
6500 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6501 than thousands of nodes, while keeping the source code simple enough to tweak
6502 and hack any part of it for experimental purpose. With a total of about 1500
6503 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6504 in less than 600 lines. The energy minimization approach is comprised of only
6505 250 lines!
6506
6507 Grandalf does only 2 not-so-simple things:
6508 @itemize
6509 @item computing the nodes (x,y) coordinates (based on provided nodes
6510 dimensions, and a chosen layout)
6511 @item routing the edges with lines or nurbs
6512 @end itemize
6513
6514 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6515 will help you find where to draw things like nodes and edges, but it’s up to
6516 you to actually draw things with your favorite toolkit.")
6517 ;; The user can choose either license.
6518 (license (list license:gpl2 license:epl1.0))))
6519
6520 (define-public python-gridmap
6521 (package
6522 (name "python-gridmap")
6523 (version "0.14.0")
6524 (source
6525 (origin
6526 (method git-fetch)
6527 (uri (git-reference
6528 (url "https://github.com/pygridtools/gridmap")
6529 (commit (string-append "v" version))))
6530 (file-name (git-file-name name version))
6531 (sha256
6532 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6533 (build-system python-build-system)
6534 (arguments
6535 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6536 (propagated-inputs
6537 `(("python-psutil" ,python-psutil)
6538 ("python-drmaa" ,python-drmaa)
6539 ("python-pyzmq" ,python-pyzmq)))
6540 (home-page "https://github.com/pygridtools/gridmap")
6541 (synopsis "Create jobs on a cluster directly from Python")
6542 (description
6543 "Gridmap is a Python package to allow you to easily create jobs on the
6544 cluster directly from Python. You can directly map Python functions onto the
6545 cluster without needing to write any wrapper code yourself.")
6546 (license license:gpl3+)))
6547
6548 (define-public python2-gridmap
6549 (package-with-python2 python-gridmap))
6550
6551 (define-public python-honcho
6552 (package
6553 (name "python-honcho")
6554 (version "1.0.1")
6555 (source
6556 (origin
6557 (method git-fetch)
6558 (uri (git-reference
6559 (url "https://github.com/nickstenning/honcho")
6560 (commit (string-append "v" version))))
6561 (file-name (git-file-name name version))
6562 (sha256
6563 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6564 (build-system python-build-system)
6565 (native-inputs
6566 `(("python-pytest" ,python-pytest)
6567 ("python-mock" ,python-mock)
6568 ("python-tox" ,python-tox)
6569 ("which" ,which))) ;for tests
6570 (propagated-inputs
6571 `(("python-jinja2" ,python-jinja2)))
6572 (arguments
6573 `(#:phases
6574 (modify-phases %standard-phases
6575 (delete 'check)
6576 (add-after 'install 'check
6577 (lambda* (#:key outputs inputs #:allow-other-keys)
6578 ;; fix honcho path in testsuite
6579 (substitute* "tests/conftest.py"
6580 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6581 "/bin/honcho" "'")))
6582 ;; It's easier to run tests after install.
6583 ;; Make installed package available for running the tests
6584 (add-installed-pythonpath inputs outputs)
6585 (invoke "py.test" "-v"))))))
6586 (home-page "https://github.com/nickstenning/honcho")
6587 (synopsis "Manage Procfile-based applications")
6588 (description
6589 "A Procfile is a file which describes how to run an application
6590 consisting of several processes. honcho starts all listed processes.
6591 The output of all running processes is collected by honcho and
6592 displayed.")
6593 (license license:expat)))
6594
6595 (define-public python-pexpect
6596 (package
6597 (name "python-pexpect")
6598 (version "4.8.0")
6599 (source
6600 (origin
6601 (method url-fetch)
6602 (uri (pypi-uri "pexpect" version))
6603 (sha256
6604 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6605 (build-system python-build-system)
6606 (arguments
6607 `(#:phases
6608 (modify-phases %standard-phases
6609 (add-before 'check 'prepare-tests
6610 (lambda _
6611 (substitute* (find-files "tests")
6612 (("/bin/ls") (which "ls"))
6613 (("/bin/echo") (which "echo"))
6614 (("/bin/which") (which "which"))
6615 ;; Many tests try to use the /bin directory which
6616 ;; is not present in the build environment.
6617 ;; Use one that's non-empty and unlikely to change.
6618 (("/bin'") "/dev'")
6619 ;; Disable failing test. See upstream bug report
6620 ;; https://github.com/pexpect/pexpect/issues/568
6621 (("def test_bash") "def _test_bash"))
6622 ;; XXX: Socket connection test gets "Connection reset by peer".
6623 ;; Why does it not work? Delete for now.
6624 (delete-file "tests/test_socket.py")
6625 #t))
6626 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6627 (native-inputs
6628 `(("python-nose" ,python-nose)
6629 ("python-pytest" ,python-pytest)
6630 ("man-db" ,man-db)
6631 ("which" ,which)
6632 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6633 (propagated-inputs
6634 `(("python-ptyprocess" ,python-ptyprocess)))
6635 (home-page "http://pexpect.readthedocs.org/")
6636 (synopsis "Controlling interactive console applications")
6637 (description
6638 "Pexpect is a pure Python module for spawning child applications;
6639 controlling them; and responding to expected patterns in their output.
6640 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6641 child application and control it as if a human were typing commands.")
6642 (license license:isc)))
6643
6644 (define-public python2-pexpect
6645 (package-with-python2 python-pexpect))
6646
6647 (define-public python-setuptools-scm
6648 (package
6649 (name "python-setuptools-scm")
6650 (version "3.4.3")
6651 (source (origin
6652 (method url-fetch)
6653 (uri (pypi-uri "setuptools_scm" version))
6654 (sha256
6655 (base32
6656 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6657 (build-system python-build-system)
6658 (home-page "https://github.com/pypa/setuptools_scm/")
6659 (synopsis "Manage Python package versions in SCM metadata")
6660 (description
6661 "Setuptools_scm handles managing your Python package versions in
6662 @dfn{software configuration management} (SCM) metadata instead of declaring
6663 them as the version argument or in a SCM managed file.")
6664 (license license:expat)))
6665
6666 ;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
6667 (define-public python-setuptools-scm/next
6668 (package
6669 (inherit python-setuptools-scm)
6670 (version "5.0.1")
6671 (source
6672 (origin
6673 (method url-fetch)
6674 (uri (pypi-uri "setuptools_scm" version))
6675 (sha256
6676 (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
6677
6678 (define-public python2-setuptools-scm
6679 (package-with-python2 python-setuptools-scm))
6680
6681 (define-public python-sexpdata
6682 (package
6683 (name "python-sexpdata")
6684 (version "0.0.3")
6685 (source
6686 (origin
6687 (method url-fetch)
6688 (uri (pypi-uri "sexpdata" version))
6689 (sha256
6690 (base32
6691 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6692 (build-system python-build-system)
6693 (home-page "https://github.com/jd-boyd/sexpdata")
6694 (synopsis "S-expression parser for Python")
6695 (description
6696 "Sexpdata is an S-expression parser/serializer. It has load and dump
6697 functions like pickle, json or PyYAML module.")
6698 (license license:bsd-3)))
6699
6700 (define-public python-pathlib2
6701 (package
6702 (name "python-pathlib2")
6703 (version "2.3.3")
6704 (source
6705 (origin
6706 (method url-fetch)
6707 (uri (pypi-uri "pathlib2" version))
6708 (sha256
6709 (base32
6710 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6711 (build-system python-build-system)
6712 (propagated-inputs
6713 `(("python-scandir" ,python-scandir)
6714 ("python-six" ,python-six)))
6715 (home-page "https://pypi.org/project/pathlib2/")
6716 (synopsis "Object-oriented file system paths")
6717 (description "The goal of pathlib2 is to provide a backport of the
6718 standard @code{pathlib} module which tracks the standard library module, so
6719 all the newest features of the standard @code{pathlib} can be used also on
6720 older Python versions.")
6721 (license license:expat)))
6722
6723 (define-public python-importlib-resources
6724 (package
6725 (name "python-importlib-resources")
6726 (version "3.0.0")
6727 (source
6728 (origin
6729 (method url-fetch)
6730 (uri (pypi-uri "importlib_resources" version))
6731 (sha256
6732 (base32
6733 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6734 (build-system python-build-system)
6735 (native-inputs
6736 `(("python-setuptools-scm" ,python-setuptools-scm)
6737 ("python-toml" ,python-toml)))
6738 (home-page "http://importlib-resources.readthedocs.io/")
6739 (synopsis "Read resources from Python packages")
6740 (description
6741 "@code{importlib_resources} is a backport of Python 3's standard library
6742 @code{importlib.resources} module for Python 2.7, and Python 3.")
6743 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6744 (license license:asl2.0)))
6745
6746 (define-public python2-importlib-resources
6747 (package
6748 (name "python2-importlib-resources")
6749 (version "1.0.2")
6750 (source (origin
6751 (method url-fetch)
6752 (uri (pypi-uri "importlib_resources" version))
6753 (sha256
6754 (base32
6755 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6756 (build-system python-build-system)
6757 (arguments
6758 `(#:python ,python-2
6759 #:phases (modify-phases %standard-phases
6760 ;; The build system tests for python-wheel, but it is
6761 ;; not required for Guix nor the test suite. Just drop
6762 ;; it to make bootstrapping pytest easier.
6763 (add-after 'unpack 'drop-wheel-dependency
6764 (lambda _
6765 (substitute* "setup.cfg"
6766 (("^[[:blank:]]+wheel")
6767 ""))
6768 #t)))))
6769 (propagated-inputs
6770 `(("python-pathlib2" ,python2-pathlib2)
6771 ("python-typing" ,python2-typing)))
6772 (home-page "https://gitlab.com/python-devs/importlib_resources")
6773 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6774 (description
6775 "This package provides an implementation of @code{importlib.resources}
6776 for older versions of Python.")
6777 (license license:asl2.0)))
6778
6779 ;; For importlib-metadata-bootstrap below.
6780 (define-public python2-importlib-resources-bootstrap
6781 (hidden-package
6782 (package/inherit
6783 python2-importlib-resources
6784 (name "python2-importlib-resources-bootstrap")
6785 (propagated-inputs
6786 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6787 ("python-typing" ,python2-typing))))))
6788
6789 (define-public python-importlib-metadata
6790 (package
6791 (name "python-importlib-metadata")
6792 (version "1.5.0")
6793 (source
6794 (origin
6795 (method url-fetch)
6796 (uri (pypi-uri "importlib_metadata" version))
6797 (sha256
6798 (base32
6799 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6800 (build-system python-build-system)
6801 (propagated-inputs
6802 `(("python-zipp" ,python-zipp)))
6803 (native-inputs
6804 `(("python-setuptools-scm" ,python-setuptools-scm)
6805 ("python-pyfakefs" ,python-pyfakefs)
6806 ("python-packaging" ,python-packaging)))
6807 (home-page "https://importlib-metadata.readthedocs.io/")
6808 (synopsis "Read metadata from Python packages")
6809 (description
6810 "@code{importlib_metadata} is a library which provides an API for
6811 accessing an installed Python package's metadata, such as its entry points or
6812 its top-level name. This functionality intends to replace most uses of
6813 @code{pkg_resources} entry point API and metadata API. Along with
6814 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6815 need to use the older and less efficient @code{pkg_resources} package.")
6816 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6817 (license license:asl2.0)))
6818
6819 (define-public python2-importlib-metadata
6820 (let ((base (package-with-python2 (strip-python2-variant
6821 python-importlib-metadata))))
6822 (package/inherit
6823 base
6824 (name "python2-importlib-metadata")
6825 (native-inputs
6826 `(("python-setuptools-scm" ,python2-setuptools-scm)
6827 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6828 ("python-packaging" ,python2-packaging-bootstrap)))
6829 (propagated-inputs
6830 `(("python-configparser" ,python2-configparser)
6831 ("python-contextlib2" ,python2-contextlib2)
6832 ("python-importlib-resources" ,python2-importlib-resources)
6833 ("python-pathlib2" ,python2-pathlib2)
6834 ,@(package-propagated-inputs base))))))
6835
6836 ;; This package is used by python2-pytest, and thus must not depend on it.
6837 (define-public python2-importlib-metadata-bootstrap
6838 (hidden-package
6839 (package/inherit
6840 python2-importlib-metadata
6841 (name "python2-importlib-metadata-bootstrap")
6842 (arguments
6843 `(#:tests? #f
6844 ,@(package-arguments python2-importlib-metadata)))
6845 (propagated-inputs
6846 `(("python-zipp" ,python2-zipp-bootstrap)
6847 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6848 ("python-configparser" ,python2-configparser)
6849 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6850 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6851
6852 (define-public python-importmagic
6853 (package
6854 (name "python-importmagic")
6855 (version "0.1.7")
6856 (source
6857 (origin
6858 (method url-fetch)
6859 (uri (pypi-uri "importmagic" version))
6860 (sha256
6861 (base32
6862 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6863 (build-system python-build-system)
6864 (home-page "https://github.com/alecthomas/importmagic")
6865 (synopsis "Library for adding, removing and managing Python imports")
6866 (description
6867 "Importmagic is a Python library for automatically managing imports by
6868 finding unresolved symbols in Python code and their corresponding imports.")
6869 (license license:bsd-3)))
6870
6871 (define-public python-inotify-simple
6872 (package
6873 (name "python-inotify-simple")
6874 (version "1.3.5")
6875 (source
6876 (origin
6877 (method git-fetch)
6878 (uri (git-reference
6879 (url "https://github.com/chrisjbillington/inotify_simple")
6880 (commit version)))
6881 (file-name (git-file-name name version))
6882 (sha256
6883 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
6884 (build-system python-build-system)
6885 (home-page
6886 "https://github.com/chrisjbillington/inotify_simple")
6887 (synopsis "Simple wrapper around inotify library")
6888 (description
6889 "@code{inotify-simple} is a simple wrapper around inotify library.")
6890 (license license:bsd-3)))
6891
6892 (define-public python-jaraco-packaging
6893 (package
6894 (name "python-jaraco-packaging")
6895 (version "6.1")
6896 (source
6897 (origin
6898 (method url-fetch)
6899 (uri (pypi-uri "jaraco.packaging" version))
6900 (sha256
6901 (base32
6902 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6903 (build-system python-build-system)
6904 (propagated-inputs
6905 `(("python-pytest" ,python-pytest)
6906 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6907 ("python-pytest-flake8" ,python-pytest-flake8)
6908 ("python-rst.linker" ,python-rst.linker)
6909 ("python-setuptools" ,python-setuptools)
6910 ("python-setuptools-scm" ,python-setuptools-scm)
6911 ("python-six" ,python-six)
6912 ("python-sphinx" ,python-sphinx)))
6913 (home-page "https://github.com/jaraco/jaraco.packaging")
6914 (synopsis "Tools to supplement packaging Python releases")
6915 (description
6916 "This package provides various tools to supplement packaging Python
6917 releases.")
6918 (license license:expat)))
6919
6920 (define-public python-pathpy
6921 (package
6922 (name "python-pathpy")
6923 (version "11.5.1")
6924 (source
6925 (origin
6926 (method url-fetch)
6927 (uri (pypi-uri "path.py" version))
6928 (sha256
6929 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6930 (outputs '("out" "doc"))
6931 (build-system python-build-system)
6932 (propagated-inputs
6933 `(("python-appdirs" ,python-appdirs)
6934 ("python-importlib-metadata" ,python-importlib-metadata)))
6935 (native-inputs
6936 `(("python-setuptools-scm" ,python-setuptools-scm)
6937 ("python-sphinx" ,python-sphinx)
6938 ("python-rst.linker" ,python-rst.linker)
6939 ("python-pytest" ,python-pytest)
6940 ("python-pytest-runner" ,python-pytest-runner)
6941 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6942 (arguments
6943 `(#:phases
6944 (modify-phases %standard-phases
6945 (add-after 'build 'build-doc
6946 (lambda _
6947 (setenv "LANG" "en_US.UTF-8")
6948 (invoke "python" "setup.py" "build_sphinx")))
6949 (add-after 'install 'install-doc
6950 (lambda* (#:key outputs #:allow-other-keys)
6951 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6952 (doc (string-append data "/doc/" ,name "-" ,version))
6953 (html (string-append doc "/html")))
6954 (mkdir-p html)
6955 (for-each (lambda (file)
6956 (copy-file file (string-append doc "/" file)))
6957 '("README.rst" "CHANGES.rst"))
6958 (copy-recursively "build/sphinx/html" html)
6959 #t)))
6960 (replace 'check
6961 (lambda _
6962 ;; The import time test aborts if an import takes longer than
6963 ;; 100ms. It may very well take a little longer than that.
6964 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6965 (home-page "https://github.com/jaraco/path.py")
6966 (synopsis "Python module wrapper for built-in os.path")
6967 (description
6968 "@code{path.py} implements path objects as first-class entities, allowing
6969 common operations on files to be invoked on those path objects directly.")
6970 (license license:expat)))
6971
6972 (define-public python-simplegeneric
6973 (package
6974 (name "python-simplegeneric")
6975 (version "0.8.1")
6976 (source
6977 (origin
6978 (method url-fetch)
6979 (uri (pypi-uri "simplegeneric" version ".zip"))
6980 (sha256
6981 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6982 (build-system python-build-system)
6983 (native-inputs
6984 `(("unzip" ,unzip)))
6985 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6986 (synopsis "Python module for simple generic functions")
6987 (description
6988 "The simplegeneric module lets you define simple single-dispatch generic
6989 functions, akin to Python’s built-in generic functions like @code{len()},
6990 @code{iter()} and so on. However, instead of using specially-named methods,
6991 these generic functions use simple lookup tables, akin to those used by
6992 e.g. @code{pickle.dump()} and other generic functions found in the Python
6993 standard library.")
6994 (license license:zpl2.1)))
6995
6996 (define-public python2-simplegeneric
6997 (package-with-python2 python-simplegeneric))
6998
6999 (define-public python-ipython-genutils
7000 ;; TODO: This package is retired, check if can be removed, see description.
7001 (package
7002 (name "python-ipython-genutils")
7003 (version "0.1.0")
7004 (source
7005 (origin
7006 (method url-fetch)
7007 (uri (pypi-uri "ipython_genutils" version))
7008 (sha256
7009 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7010 (build-system python-build-system)
7011 (arguments `(#:tests? #f)) ; no tests
7012 (home-page "https://ipython.org")
7013 (synopsis "Vestigial utilities from IPython")
7014 (description
7015 "This package provides retired utilities from IPython. No packages
7016 outside IPython/Jupyter should depend on it.
7017
7018 This package shouldn't exist. It contains some common utilities shared by
7019 Jupyter and IPython projects during The Big Split. As soon as possible, those
7020 packages will remove their dependency on this, and this package will go
7021 away.")
7022 (license license:bsd-3)))
7023
7024 (define-public python2-ipython-genutils
7025 (package-with-python2 python-ipython-genutils))
7026
7027 (define-public python-ipyparallel
7028 (package
7029 (name "python-ipyparallel")
7030 (version "6.2.4")
7031 (source
7032 (origin
7033 (method url-fetch)
7034 (uri (pypi-uri "ipyparallel" version))
7035 (sha256
7036 (base32
7037 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7038 (build-system python-build-system)
7039 (arguments
7040 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7041 #:phases
7042 (modify-phases %standard-phases
7043 (add-before 'check 'prepare-for-tests
7044 (lambda _
7045 (setenv "HOME" (getcwd))
7046 #t)))))
7047 (propagated-inputs
7048 `(("python-dateutil" ,python-dateutil)
7049 ("python-decorator" ,python-decorator)
7050 ("python-ipykernel" ,python-ipykernel)
7051 ("python-ipython" ,python-ipython)
7052 ("python-ipython-genutils" ,python-ipython-genutils)
7053 ("python-jupyter-client" ,python-jupyter-client)
7054 ("python-pyzmq" ,python-pyzmq)
7055 ("python-tornado" ,python-tornado)
7056 ("python-traitlets" ,python-traitlets)))
7057 (native-inputs
7058 `(("python-ipython" ,python-ipython)
7059 ("python-mock" ,python-mock)
7060 ("python-nose" ,python-nose)
7061 ("python-pytest" ,python-pytest)
7062 ("python-pytest-cov" ,python-pytest-cov)
7063 ("python-testpath" ,python-testpath)))
7064 (home-page "https://ipython.org/")
7065 (synopsis "Interactive Parallel Computing with IPython")
7066 (description
7067 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7068 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7069 CLI scripts:
7070 @enumerate
7071 @item ipcluster - start/stop a cluster
7072 @item ipcontroller - start a scheduler
7073 @item ipengine - start an engine
7074 @end enumerate")
7075 (license license:bsd-3)))
7076
7077 (define-public python2-ipyparallel
7078 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
7079 (package
7080 (inherit ipyparallel)
7081 (propagated-inputs
7082 `(("python2-futures" ,python2-futures)
7083 ,@(package-propagated-inputs ipyparallel))))))
7084
7085 (define-public python-ipython-cluster-helper
7086 (package
7087 (name "python-ipython-cluster-helper")
7088 (version "0.6.4")
7089 (source
7090 (origin
7091 (method url-fetch)
7092 (uri (pypi-uri "ipython-cluster-helper" version))
7093 (sha256
7094 (base32
7095 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
7096 (modules '((guix build utils)))
7097 (snippet
7098 '(begin (substitute* "requirements.txt"
7099 (("ipython.*") "ipython\n"))
7100 #t))))
7101 (build-system python-build-system)
7102 (arguments
7103 `(#:tests? #f ; Test suite can't find IPython.
7104 #:phases
7105 (modify-phases %standard-phases
7106 (replace 'check
7107 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7108 (if tests?
7109 (begin
7110 (setenv "HOME" (getcwd))
7111 (add-installed-pythonpath inputs outputs)
7112 (invoke "python" "example/example.py" "--local"))
7113 #t))))))
7114 (propagated-inputs
7115 `(("python-ipyparallel" ,python-ipyparallel)
7116 ("python-ipython" ,python-ipython)
7117 ("python-netifaces" ,python-netifaces)
7118 ("python-pyzmq" ,python-pyzmq)
7119 ("python-setuptools" ,python-setuptools)
7120 ("python-six" ,python-six)))
7121 (home-page "https://github.com/roryk/ipython-cluster-helper")
7122 (synopsis
7123 "Simplify IPython cluster start up and use for multiple schedulers")
7124 (description
7125 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
7126 profile, launches a cluster and returns a view. On program exit it shuts the
7127 cluster down and deletes the throwaway profile.")
7128 (license license:expat)))
7129
7130 (define-public python2-ipython-cluster-helper
7131 (package-with-python2 python-ipython-cluster-helper))
7132
7133 (define-public python-traitlets
7134 (package
7135 (name "python-traitlets")
7136 (version "4.3.3")
7137 (source
7138 (origin
7139 (method url-fetch)
7140 (uri (pypi-uri "traitlets" version))
7141 (sha256
7142 (base32
7143 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
7144 (build-system python-build-system)
7145 (arguments
7146 `(#:phases
7147 (modify-phases %standard-phases
7148 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
7149 (propagated-inputs
7150 `(("python-ipython-genutils" ,python-ipython-genutils)
7151 ("python-decorator" ,python-decorator)))
7152 (native-inputs
7153 `(("python-pytest" ,python-pytest)))
7154 (properties `((python2-variant . ,(delay python2-traitlets))))
7155 (home-page "https://ipython.org")
7156 (synopsis "Configuration system for Python applications")
7157 (description
7158 "Traitlets is a framework that lets Python classes have attributes with
7159 type checking, dynamically calculated default values, and ‘on change’
7160 callbacks. The package also includes a mechanism to use traitlets for
7161 configuration, loading values from files or from command line arguments. This
7162 is a distinct layer on top of traitlets, so you can use traitlets in your code
7163 without using the configuration machinery.")
7164 (license license:bsd-3)))
7165
7166 (define-public python2-traitlets
7167 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
7168 (package
7169 (inherit traitlets)
7170 (propagated-inputs
7171 `(("python2-enum34" ,python2-enum34)
7172 ,@(package-propagated-inputs traitlets))))))
7173
7174 (define-public python-jupyter-core
7175 (package
7176 (name "python-jupyter-core")
7177 (version "4.4.0")
7178 (source
7179 (origin
7180 (method url-fetch)
7181 (uri (string-append (pypi-uri "jupyter_core" version)))
7182 (sha256
7183 (base32
7184 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
7185 (build-system python-build-system)
7186 ;; FIXME: not sure how to run the tests
7187 (arguments `(#:tests? #f))
7188 (propagated-inputs
7189 `(("python-traitlets" ,python-traitlets)))
7190 (home-page "https://jupyter.org/")
7191 (synopsis "Jupyter base package")
7192 (description
7193 "Jupyter core is the base package on which Jupyter projects rely.")
7194 (license license:bsd-3)))
7195
7196 (define-public python2-jupyter-core
7197 (package-with-python2 python-jupyter-core))
7198
7199 (define-public python-jupyter-client
7200 (package
7201 (name "python-jupyter-client")
7202 (version "5.2.4")
7203 (source
7204 (origin
7205 (method url-fetch)
7206 (uri (pypi-uri "jupyter_client" version))
7207 (sha256
7208 (base32
7209 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
7210 (build-system python-build-system)
7211 ;; Tests fail because of missing native python kernel which I assume is
7212 ;; provided by the ipython package, which we cannot use because it would
7213 ;; cause a dependency cycle.
7214 (arguments
7215 `(#:tests? #f
7216
7217 #:phases (modify-phases %standard-phases
7218 (add-after 'unpack 'set-tool-file-names
7219 (lambda* (#:key inputs #:allow-other-keys)
7220 (let ((iproute (assoc-ref inputs "iproute")))
7221 (substitute* "jupyter_client/localinterfaces.py"
7222 (("'ip'")
7223 (string-append "'" iproute "/sbin/ip'")))
7224 #t))))))
7225 (inputs
7226 `(("iproute" ,iproute)))
7227 (propagated-inputs
7228 `(("python-pyzmq" ,python-pyzmq)
7229 ("python-traitlets" ,python-traitlets)
7230 ("python-jupyter-core" ,python-jupyter-core)))
7231 (home-page "https://jupyter.org/")
7232 (synopsis "Jupyter protocol implementation and client libraries")
7233 (description
7234 "The @code{jupyter_client} package contains the reference implementation
7235 of the Jupyter protocol. It also provides client and kernel management APIs
7236 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7237 installing @code{kernelspec}s for use with Jupyter frontends.")
7238 (license license:bsd-3)))
7239
7240 (define-public python2-jupyter-client
7241 (package-with-python2 python-jupyter-client))
7242
7243 (define-public python-ipykernel
7244 (package
7245 (name "python-ipykernel")
7246 (version "5.1.3")
7247 (source
7248 (origin
7249 (method url-fetch)
7250 (uri (pypi-uri "ipykernel" version))
7251 (sha256
7252 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
7253 (build-system python-build-system)
7254 (arguments
7255 `(#:phases
7256 (modify-phases %standard-phases
7257 (replace 'check
7258 (lambda _
7259 (setenv "HOME" "/tmp")
7260 (invoke "pytest" "-v")
7261 #t))
7262 (add-after 'install 'set-python-file-name
7263 (lambda* (#:key outputs #:allow-other-keys)
7264 ;; Record the absolute file name of the 'python' executable in
7265 ;; 'kernel.json'.
7266 (let ((out (assoc-ref outputs "out")))
7267 (substitute* (string-append out "/share/jupyter"
7268 "/kernels/python3/kernel.json")
7269 (("\"python\"")
7270 (string-append "\"" (which "python") "\"")))
7271 #t))))))
7272 (propagated-inputs
7273 `(("python-ipython" ,python-ipython)
7274 ;; imported at runtime during connect
7275 ("python-jupyter-client" ,python-jupyter-client)))
7276 (native-inputs
7277 `(("python-flaky" ,python-flaky)
7278 ("python-nose" ,python-nose)
7279 ("python-pytest" ,python-pytest)))
7280 (home-page "https://ipython.org")
7281 (synopsis "IPython Kernel for Jupyter")
7282 (description
7283 "This package provides the IPython kernel for Jupyter.")
7284 (properties `((python2-variant . ,(delay python2-ipykernel))))
7285 (license license:bsd-3)))
7286
7287 ;; Version 5.x and above no longer support Python 2.
7288 (define-public python2-ipykernel
7289 (package
7290 (name "python2-ipykernel")
7291 (version "4.10.1")
7292 (source
7293 (origin
7294 (method url-fetch)
7295 (uri (pypi-uri "ipykernel" version))
7296 (sha256
7297 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
7298 (build-system python-build-system)
7299 (arguments
7300 `(#:python ,python-2))
7301 (propagated-inputs
7302 `(("python2-ipython" ,python2-ipython)
7303 ;; imported at runtime during connect
7304 ("python2-jupyter-client" ,python2-jupyter-client)
7305 ("python2-tornado" ,python2-tornado)
7306 ("python2-traitlets" ,python2-traitlets)))
7307 (native-inputs
7308 `(("python2-mock" ,python2-mock)
7309 ("python2-nose" ,python2-nose)
7310 ("python2-pytest" ,python2-pytest)
7311 ("python2-pytest-cov" ,python2-pytest-cov)))
7312 (home-page "https://ipython.org")
7313 (synopsis "IPython Kernel for Jupyter")
7314 (description
7315 "This package provides the IPython kernel for Jupyter.")
7316 (license license:bsd-3)))
7317
7318 (define-public python-pari-jupyter
7319 (package
7320 (name "python-pari-jupyter")
7321 (version "1.3.2")
7322 (source
7323 (origin
7324 (method url-fetch)
7325 (uri (pypi-uri "pari_jupyter" version))
7326 (sha256
7327 (base32
7328 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7329 (build-system python-build-system)
7330 (propagated-inputs
7331 `(("python-ipykernel" ,python-ipykernel)))
7332 (inputs
7333 `(("pari-gp" ,pari-gp)
7334 ("readline" ,readline)))
7335 (arguments
7336 `(#:tests? #f)) ; no test suite
7337 (home-page
7338 "https://github.com/jdemeyer/pari_jupyter")
7339 (synopsis "A Jupyter kernel for PARI/GP")
7340 (description "The package provides a PARI/GP kernel for Jupyter.")
7341 (license license:gpl3+)))
7342
7343 (define-public python-backcall
7344 (package
7345 (name "python-backcall")
7346 (version "0.1.0")
7347 (source
7348 (origin
7349 (method url-fetch)
7350 (uri (pypi-uri "backcall" version))
7351 (sha256
7352 (base32
7353 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
7354 (build-system python-build-system)
7355 (home-page "https://github.com/takluyver/backcall/")
7356 (synopsis "Specifications for callback functions passed in to an API")
7357 (description
7358 "If your code lets other people supply callback functions, it's important
7359 to specify the function signature you expect, and check that functions support
7360 that. Adding extra parameters later would break other peoples code unless
7361 you're careful. The @code{backcall} package provides a way of specifying the
7362 callback signature using a prototype function.")
7363 (license license:bsd-3)))
7364
7365 (define-public python-ipython
7366 (package
7367 (name "python-ipython")
7368 (version "7.9.0")
7369 (source
7370 (origin
7371 (method url-fetch)
7372 (uri (pypi-uri "ipython" version ".tar.gz"))
7373 (sha256
7374 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7375 (build-system python-build-system)
7376 (propagated-inputs
7377 `(("python-backcall" ,python-backcall)
7378 ("python-pyzmq" ,python-pyzmq)
7379 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7380 ("python-terminado" ,python-terminado)
7381 ("python-matplotlib" ,python-matplotlib)
7382 ("python-numpy" ,python-numpy)
7383 ("python-numpydoc" ,python-numpydoc)
7384 ("python-jedi" ,python-jedi)
7385 ("python-jinja2" ,python-jinja2)
7386 ("python-mistune" ,python-mistune)
7387 ("python-pexpect" ,python-pexpect)
7388 ("python-pickleshare" ,python-pickleshare)
7389 ("python-simplegeneric" ,python-simplegeneric)
7390 ("python-jsonschema" ,python-jsonschema)
7391 ("python-traitlets" ,python-traitlets)
7392 ("python-nbformat" ,python-nbformat)
7393 ("python-pygments" ,python-pygments)))
7394 (inputs
7395 `(("readline" ,readline)
7396 ("which" ,which)))
7397 (native-inputs
7398 `(("graphviz" ,graphviz)
7399 ("pkg-config" ,pkg-config)
7400 ("python-requests" ,python-requests) ;; for tests
7401 ("python-testpath" ,python-testpath)
7402 ("python-nose" ,python-nose)))
7403 (arguments
7404 `(#:phases
7405 (modify-phases %standard-phases
7406 (add-after 'unpack 'make-docs-reproducible
7407 (lambda _
7408 (substitute* "IPython/sphinxext/ipython_directive.py"
7409 ((".*import datetime") "")
7410 ((".*datetime.datetime.now\\(\\)") "")
7411 (("%timeit") "# %timeit"))
7412 #t))
7413 ;; Tests can only be run after the library has been installed and not
7414 ;; within the source directory.
7415 (delete 'check)
7416 (add-after 'install 'check
7417 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7418 (if tests?
7419 (begin
7420 ;; Make installed package available for running the tests
7421 (add-installed-pythonpath inputs outputs)
7422 (setenv "HOME" "/tmp/") ;; required by a test
7423 ;; We only test the core because one of the other tests
7424 ;; tries to import ipykernel.
7425 (invoke "python" "IPython/testing/iptest.py"
7426 "-v" "IPython/core/tests"))
7427 #t)))
7428 (add-before 'check 'fix-tests
7429 (lambda* (#:key inputs #:allow-other-keys)
7430 (substitute* "./IPython/utils/_process_posix.py"
7431 (("/usr/bin/env', 'which") (which "which")))
7432 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7433 (("#!/usr/bin/env python")
7434 (string-append "#!" (which "python"))))
7435 ;; This test introduces a circular dependency on ipykernel
7436 ;; (which depends on ipython).
7437 (delete-file "IPython/core/tests/test_display.py")
7438 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7439 (delete-file "IPython/core/tests/test_interactiveshell.py")
7440 #t)))))
7441 (home-page "https://ipython.org")
7442 (synopsis "IPython is a tool for interactive computing in Python")
7443 (description
7444 "IPython provides a rich architecture for interactive computing with:
7445 Powerful interactive shells, a browser-based notebook, support for interactive
7446 data visualization, embeddable interpreters and tools for parallel
7447 computing.")
7448 (properties `((python2-variant . ,(delay python2-ipython))))
7449 (license license:bsd-3)))
7450
7451 ;; This is the latest release of the LTS version of ipython with support for
7452 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7453 ;; dropped support for Python 2.7.
7454 (define-public python2-ipython
7455 (package
7456 (name "python2-ipython")
7457 (version "5.8.0")
7458 (source
7459 (origin
7460 (method url-fetch)
7461 (uri (pypi-uri "ipython" version ".tar.gz"))
7462 (sha256
7463 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7464 (build-system python-build-system)
7465 (propagated-inputs
7466 `(("python2-backports-shutil-get-terminal-size"
7467 ,python2-backports-shutil-get-terminal-size)
7468 ("python2-pathlib2" ,python2-pathlib2)
7469 ("python2-pyzmq" ,python2-pyzmq)
7470 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7471 ("python2-terminado" ,python2-terminado)
7472 ("python2-matplotlib" ,python2-matplotlib)
7473 ("python2-numpy" ,python2-numpy)
7474 ("python2-numpydoc" ,python2-numpydoc)
7475 ("python2-jinja2" ,python2-jinja2)
7476 ("python2-mistune" ,python2-mistune)
7477 ("python2-pexpect" ,python2-pexpect)
7478 ("python2-pickleshare" ,python2-pickleshare)
7479 ("python2-simplegeneric" ,python2-simplegeneric)
7480 ("python2-jsonschema" ,python2-jsonschema)
7481 ("python2-traitlets" ,python2-traitlets)
7482 ("python2-nbformat" ,python2-nbformat)
7483 ("python2-pygments" ,python2-pygments)))
7484 (inputs
7485 `(("readline" ,readline)
7486 ("which" ,which)))
7487 (native-inputs
7488 `(("graphviz" ,graphviz)
7489 ("pkg-config" ,pkg-config)
7490 ("python2-requests" ,python2-requests) ;; for tests
7491 ("python2-testpath" ,python2-testpath)
7492 ("python2-mock" ,python2-mock)
7493 ("python2-nose" ,python2-nose)))
7494 (arguments
7495 `(#:python ,python-2
7496 #:phases
7497 (modify-phases %standard-phases
7498 (add-before 'check 'delete-broken-tests
7499 (lambda* (#:key inputs #:allow-other-keys)
7500 ;; These tests throw errors for unknown reasons.
7501 (delete-file "IPython/core/tests/test_displayhook.py")
7502 (delete-file "IPython/core/tests/test_magic_terminal.py")
7503 (delete-file "IPython/core/tests/test_profile.py")
7504 #t)))))
7505 (home-page "https://ipython.org")
7506 (synopsis "IPython is a tool for interactive computing in Python")
7507 (description
7508 "IPython provides a rich architecture for interactive computing with:
7509 Powerful interactive shells, a browser-based notebook, support for interactive
7510 data visualization, embeddable interpreters and tools for parallel
7511 computing.")
7512 (license license:bsd-3)))
7513
7514 (define-public python-ipython-documentation
7515 (package
7516 (inherit python-ipython)
7517 (name "python-ipython-documentation")
7518 (version (package-version python-ipython))
7519 (arguments
7520 `(#:phases
7521 (modify-phases %standard-phases
7522 (delete 'build)
7523 (delete 'check)
7524 (replace 'install
7525 (lambda* (#:key outputs #:allow-other-keys)
7526 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7527 (doc (string-append data "/doc/" ,name "-" ,version))
7528 (html (string-append doc "/html"))
7529 (man1 (string-append data "/man/man1"))
7530 (info (string-append data "/info"))
7531 (examples (string-append doc "/examples"))
7532 (python-arg (string-append "PYTHON=" (which "python"))))
7533 (setenv "LANG" "en_US.utf8")
7534 (with-directory-excursion "docs"
7535 ;; FIXME: pdf fails to build
7536 ;;(system* "make" "pdf" "PAPER=a4")
7537 (system* "make" python-arg "html")
7538 ;; FIXME: the generated texi file contains ^@^@, which trips
7539 ;; up the parser.
7540 ;; (system* "make" python-arg "info")
7541 )
7542 (copy-recursively "docs/man" man1)
7543 (copy-recursively "examples" examples)
7544 (copy-recursively "docs/build/html" html)
7545 ;; (copy-file "docs/build/latex/ipython.pdf"
7546 ;; (string-append doc "/ipython.pdf"))
7547 (mkdir-p info)
7548 ;; (copy-file "docs/build/texinfo/ipython.info"
7549 ;; (string-append info "/ipython.info"))
7550 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7551 #t)))))
7552 (inputs
7553 `(("python-ipython" ,python-ipython)
7554 ("python-ipykernel" ,python-ipykernel)))
7555 (native-inputs
7556 `(("python-sphinx" ,python-sphinx)
7557 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7558 ;; FIXME: It's possible that a smaller union would work just as well.
7559 ("texlive" ,(texlive-union (list texlive-amsfonts
7560 texlive-fonts-ec
7561 texlive-generic-ifxetex
7562 texlive-generic-pdftex
7563 texlive-latex-capt-of
7564 texlive-latex-cmap
7565 texlive-latex-environ
7566 texlive-latex-eqparbox
7567 texlive-latex-etoolbox
7568 texlive-latex-expdlist
7569 texlive-latex-fancyhdr
7570 texlive-latex-fancyvrb
7571 texlive-latex-fncychap
7572 texlive-latex-float
7573 texlive-latex-framed
7574 texlive-latex-geometry
7575 texlive-latex-graphics
7576 texlive-latex-hyperref
7577 texlive-latex-mdwtools
7578 texlive-latex-multirow
7579 texlive-latex-needspace
7580 texlive-latex-oberdiek
7581 texlive-latex-parskip
7582 texlive-latex-preview
7583 texlive-latex-tabulary
7584 texlive-latex-threeparttable
7585 texlive-latex-titlesec
7586 texlive-latex-trimspaces
7587 texlive-latex-ucs
7588 texlive-latex-upquote
7589 texlive-latex-url
7590 texlive-latex-varwidth
7591 texlive-latex-wrapfig)))
7592 ("texinfo" ,texinfo)))))
7593
7594 (define-public python-urwid
7595 (package
7596 (name "python-urwid")
7597 (version "2.1.0")
7598 (source
7599 (origin
7600 (method url-fetch)
7601 (uri (pypi-uri "urwid" version))
7602 (sha256
7603 (base32
7604 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7605 (build-system python-build-system)
7606 (home-page "http://urwid.org")
7607 (synopsis "Console user interface library for Python")
7608 (description
7609 "Urwid is a curses-based UI/widget library for Python. It includes many
7610 features useful for text console applications.")
7611 (license license:lgpl2.1+)))
7612
7613 (define-public python2-urwid
7614 (package-with-python2 python-urwid))
7615
7616 (define-public python-urwidtrees
7617 (package
7618 (name "python-urwidtrees")
7619 (version "1.0.2")
7620 (source
7621 (origin
7622 (method git-fetch)
7623 ;; package author intends on distributing via github rather than pypi:
7624 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7625 (uri (git-reference
7626 (url "https://github.com/pazz/urwidtrees")
7627 (commit version)))
7628 (file-name (git-file-name name version))
7629 (sha256
7630 (base32
7631 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7632 (build-system python-build-system)
7633 (arguments
7634 '(#:use-setuptools? #f
7635 #:tests? #f)) ; no tests
7636 (propagated-inputs `(("python-urwid" ,python-urwid)))
7637 (home-page "https://github.com/pazz/urwidtrees")
7638 (synopsis "Tree widgets for urwid")
7639 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7640 toolkit. Use it to build trees of widgets.")
7641 (license license:gpl3+)))
7642
7643 (define-public python2-urwidtrees
7644 (package-with-python2 python-urwidtrees))
7645
7646 (define-public python-ua-parser
7647 (package
7648 (name "python-ua-parser")
7649 (version "0.8.0")
7650 (source
7651 (origin
7652 (method url-fetch)
7653 (uri (pypi-uri "ua-parser" version))
7654 (sha256
7655 (base32
7656 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7657 (build-system python-build-system)
7658 (arguments
7659 `(#:tests? #f)) ;no test suite in release
7660 (native-inputs
7661 `(("python-pyyaml" ,python-pyyaml)))
7662 (home-page "https://github.com/ua-parser/uap-python")
7663 (synopsis "User agent parser")
7664 (description
7665 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7666 (license license:asl2.0)))
7667
7668 (define-public python2-ua-parser
7669 (package-with-python2 python-ua-parser))
7670
7671 (define-public python-user-agents
7672 (package
7673 (name "python-user-agents")
7674 (version "1.1.0")
7675 (source
7676 (origin
7677 (method url-fetch)
7678 (uri (pypi-uri "user-agents" version))
7679 (sha256
7680 (base32
7681 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7682 (build-system python-build-system)
7683 (arguments
7684 `(#:tests? #f)) ;missing devices.json test file in release
7685 (propagated-inputs
7686 `(("python-ua-parser" ,python-ua-parser)))
7687 (home-page "https://github.com/selwin/python-user-agents")
7688 (synopsis "User Agent strings parsing library")
7689 (description
7690 "A library to identify devices (phones, tablets) and their capabilities by
7691 parsing (browser/HTTP) user agent strings.")
7692 (license license:expat)))
7693
7694 (define-public python2-user-agents
7695 (package-with-python2 python-user-agents))
7696
7697 (define-public python-dbus
7698 (package
7699 (name "python-dbus")
7700 (version "1.2.16")
7701 (source
7702 (origin
7703 (method url-fetch)
7704 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7705 "dbus-python-" version ".tar.gz"))
7706 (sha256
7707 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7708 (build-system gnu-build-system)
7709 (native-inputs
7710 `(("pkg-config" ,pkg-config)))
7711 (inputs
7712 `(("python" ,python-wrapper)
7713 ("dbus-glib" ,dbus-glib)))
7714 (synopsis "Python bindings for D-bus")
7715 (description "python-dbus provides bindings for libdbus, the reference
7716 implementation of D-Bus.")
7717 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7718 (license license:expat)))
7719
7720 (define-public python2-dbus
7721 (package (inherit python-dbus)
7722 (name "python2-dbus")
7723 (inputs `(("python" ,python-2)
7724 ,@(alist-delete "python"
7725 (package-inputs python-dbus)
7726 equal?)))))
7727
7728 (define-public python-notify2
7729 (package
7730 (name "python-notify2")
7731 (version "0.3.1")
7732 (source
7733 (origin
7734 (method url-fetch)
7735 (uri (pypi-uri "notify2" version))
7736 (sha256
7737 (base32
7738 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7739 (build-system python-build-system)
7740 (arguments `(#:tests? #f)) ; tests depend on system state
7741 (native-inputs
7742 `(("python-dbus" ,python-dbus)))
7743 (home-page "https://bitbucket.org/takluyver/pynotify2")
7744 (synopsis "Python interface to D-Bus notifications")
7745 (description
7746 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7747 It is a reimplementation of pynotify in pure Python, and an alternative to
7748 the GObject Introspection bindings to libnotify for non-GTK applications.")
7749 (license (list license:bsd-2
7750 license:lgpl2.1+))))
7751
7752 (define-public python2-notify2
7753 (package-with-python2 python-notify2))
7754
7755 ;; beautifulsoup4 has a totally different namespace than 3.x,
7756 ;; and pypi seems to put it under its own name, so I guess we should too
7757 (define-public python-beautifulsoup4
7758 (package
7759 (name "python-beautifulsoup4")
7760 (version "4.9.1")
7761 (source
7762 (origin
7763 (method url-fetch)
7764 (uri (pypi-uri "beautifulsoup4" version))
7765 (sha256
7766 (base32
7767 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7768 (build-system python-build-system)
7769 (arguments
7770 `(#:phases
7771 (modify-phases %standard-phases
7772 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7773 ;; must use this conversion script when building with Python 3. The
7774 ;; conversion script also runs the tests.
7775 ;; For more information, see the file 'convert-py3k' in the source
7776 ;; distribution.
7777 (replace 'check
7778 (lambda _ (invoke "./convert-py3k"))))))
7779 (propagated-inputs
7780 `(("python-soupsieve" ,python-soupsieve)))
7781 (home-page
7782 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7783 (synopsis
7784 "Python screen-scraping library")
7785 (description
7786 "Beautiful Soup is a Python library designed for rapidly setting up
7787 screen-scraping projects. It offers Pythonic idioms for navigating,
7788 searching, and modifying a parse tree, providing a toolkit for
7789 dissecting a document and extracting what you need. It automatically
7790 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7791 (license license:expat)
7792 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7793
7794 (define-public python2-beautifulsoup4
7795 (package
7796 (inherit (package-with-python2
7797 (strip-python2-variant python-beautifulsoup4)))
7798 (arguments `(#:python ,python-2))))
7799
7800 (define-public python-soupsieve
7801 (package
7802 (name "python-soupsieve")
7803 (version "2.0.1")
7804 (source
7805 (origin
7806 (method url-fetch)
7807 (uri (pypi-uri "soupsieve" version))
7808 (sha256
7809 (base32
7810 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7811 (build-system python-build-system)
7812 (arguments `(#:tests? #f))
7813 ;;XXX: 2 tests fail currently despite claming they were to be
7814 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7815 ;;don't want to create a circular dependency.
7816 (home-page "https://github.com/facelessuser/soupsieve")
7817 (synopsis "CSS selector library")
7818 (description
7819 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7820 Soup 4. It aims to provide selecting, matching, and filtering using modern
7821 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7822 specifications up through the latest CSS level 4 drafts and beyond (though
7823 some are not yet implemented).")
7824 (properties `((python2-variant . ,(delay python2-soupsieve))))
7825 (license license:expat)))
7826
7827 ;; This is the last version that supports python-2
7828 (define-public python2-soupsieve
7829 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7830 (package
7831 (inherit base)
7832 (version "1.9.6")
7833 (source
7834 (origin
7835 (method url-fetch)
7836 (uri (pypi-uri "soupsieve" version))
7837 (sha256
7838 (base32
7839 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7840 (propagated-inputs
7841 `(("python2-backports-functools-lru-cache"
7842 ,python2-backports-functools-lru-cache)
7843 ,@(package-propagated-inputs base))))))
7844
7845 (define-public python-netifaces
7846 (package
7847 (name "python-netifaces")
7848 (version "0.10.9")
7849 (source
7850 (origin
7851 (method url-fetch)
7852 (uri (pypi-uri "netifaces" version))
7853 (sha256
7854 (base32
7855 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7856 (build-system python-build-system)
7857 (home-page "https://github.com/al45tair/netifaces")
7858 (synopsis
7859 "Python module for portable network interface information")
7860 (description
7861 "Netifaces is a Python module providing information on network
7862 interfaces in an easy and portable manner.")
7863 (license license:expat)))
7864
7865 (define-public python2-netifaces
7866 (package-with-python2 python-netifaces))
7867
7868 (define-public python-networkx
7869 (package
7870 (name "python-networkx")
7871 (version "2.5")
7872 (source
7873 (origin
7874 (method url-fetch)
7875 (uri (pypi-uri "networkx" version))
7876 (sha256
7877 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7878 (build-system python-build-system)
7879 (arguments
7880 '(#:phases (modify-phases %standard-phases
7881 (replace 'check
7882 (lambda* (#:key tests? #:allow-other-keys)
7883 (if tests?
7884 (invoke "pytest" "-vv" "--pyargs" "networkx")
7885 (format #t "test suite not run~%"))
7886 #t)))))
7887 ;; python-decorator is needed at runtime.
7888 (propagated-inputs
7889 `(("python-decorator" ,python-decorator)))
7890 (native-inputs
7891 `(("python-pytest" ,python-pytest)))
7892 (home-page "https://networkx.github.io/")
7893 (synopsis "Python module for creating and manipulating graphs and networks")
7894 (description
7895 "NetworkX is a Python package for the creation, manipulation, and study
7896 of the structure, dynamics, and functions of complex networks.")
7897 (properties `((python2-variant . ,(delay python2-networkx))))
7898 (license license:bsd-3)))
7899
7900 ;; NetworkX 2.2 is the last version with support for Python 2.
7901 (define-public python2-networkx
7902 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7903 (package
7904 (inherit base)
7905 (version "2.2")
7906 (source (origin
7907 (method url-fetch)
7908 (uri (pypi-uri "networkx" version ".zip"))
7909 (sha256
7910 (base32
7911 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7912 (arguments
7913 `(#:python ,python-2))
7914 (native-inputs
7915 `(("python-nose" ,python2-nose)
7916 ("unzip" ,unzip))))))
7917
7918 (define-public python-datrie
7919 (package
7920 (name "python-datrie")
7921 (version "0.8.2")
7922 (source
7923 (origin
7924 (method url-fetch)
7925 (uri (pypi-uri "datrie" version))
7926 (sha256
7927 (base32
7928 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7929 (build-system python-build-system)
7930 (native-inputs
7931 `(("python-cython" ,python-cython)
7932 ("python-hypothesis" ,python-hypothesis)
7933 ("python-pytest" ,python-pytest)
7934 ("python-pytest-runner" ,python-pytest-runner)))
7935 (home-page "https://github.com/kmike/datrie")
7936 (synopsis "Fast, efficiently stored trie for Python")
7937 (description
7938 "This package provides a fast, efficiently stored trie implementation for
7939 Python.")
7940 (license license:lgpl2.1+)))
7941
7942 (define-public snakemake
7943 (package
7944 (name "snakemake")
7945 (version "5.7.1")
7946 (source
7947 (origin
7948 (method url-fetch)
7949 (uri (pypi-uri "snakemake" version))
7950 (sha256
7951 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7952 (build-system python-build-system)
7953 (arguments
7954 ;; TODO: Package missing test dependencies.
7955 '(#:tests? #f
7956 #:phases
7957 (modify-phases %standard-phases
7958 ;; For cluster execution Snakemake will call Python. Since there is
7959 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7960 ;; this by calling the snakemake wrapper instead.
7961 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7962 (lambda* (#:key outputs #:allow-other-keys)
7963 (substitute* "snakemake/executors.py"
7964 (("\\{sys.executable\\} -m snakemake")
7965 (string-append (assoc-ref outputs "out")
7966 "/bin/snakemake")))
7967 #t)))))
7968 (propagated-inputs
7969 `(("python-appdirs" ,python-appdirs)
7970 ("python-configargparse" ,python-configargparse)
7971 ("python-datrie" ,python-datrie)
7972 ("python-docutils" ,python-docutils)
7973 ("python-gitpython" ,python-gitpython)
7974 ("python-jinja2" ,python-jinja2)
7975 ("python-jsonschema" ,python-jsonschema)
7976 ("python-networkx" ,python-networkx)
7977 ("python-psutil" ,python-psutil)
7978 ("python-pyyaml" ,python-pyyaml)
7979 ("python-ratelimiter" ,python-ratelimiter)
7980 ("python-requests" ,python-requests)
7981 ("python-wrapt" ,python-wrapt)))
7982 (home-page "https://snakemake.readthedocs.io")
7983 (synopsis "Python-based execution environment for make-like workflows")
7984 (description
7985 "Snakemake aims to reduce the complexity of creating workflows by
7986 providing a clean and modern domain specific specification language (DSL) in
7987 Python style, together with a fast and comfortable execution environment.")
7988 (license license:expat)))
7989
7990 (define-public python-pyqrcode
7991 (package
7992 (name "python-pyqrcode")
7993 (version "1.2.1")
7994 (source
7995 (origin
7996 (method url-fetch)
7997 (uri (pypi-uri "PyQRCode" version))
7998 (sha256
7999 (base32
8000 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8001 (build-system python-build-system)
8002 (home-page
8003 "https://github.com/mnooner256/pyqrcode")
8004 (synopsis "QR code generator")
8005 (description
8006 "Pyqrcode is a QR code generator written purely in Python with
8007 SVG, EPS, PNG and terminal output.")
8008 (license license:bsd-3)))
8009
8010 (define-public python-seaborn
8011 (package
8012 (name "python-seaborn")
8013 (version "0.10.0")
8014 (source
8015 (origin
8016 (method url-fetch)
8017 (uri (pypi-uri "seaborn" version))
8018 (sha256
8019 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
8020 (build-system python-build-system)
8021 (arguments
8022 `(#:phases
8023 (modify-phases %standard-phases
8024 (add-before 'check 'start-xserver
8025 (lambda* (#:key inputs #:allow-other-keys)
8026 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8027 ;; There must be a running X server and make check doesn't
8028 ;; start one. Therefore we must do it.
8029 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8030 (setenv "DISPLAY" ":1")
8031 #t)))
8032 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
8033 (propagated-inputs
8034 `(("python-pandas" ,python-pandas)
8035 ("python-matplotlib" ,python-matplotlib)
8036 ("python-numpy" ,python-numpy)
8037 ("python-scipy" ,python-scipy)))
8038 (native-inputs
8039 `(("python-pytest" ,python-pytest)
8040 ("xorg-server" ,xorg-server-for-tests)))
8041 (home-page "https://seaborn.pydata.org/")
8042 (synopsis "Statistical data visualization")
8043 (description
8044 "Seaborn is a library for making attractive and informative statistical
8045 graphics in Python. It is built on top of matplotlib and tightly integrated
8046 with the PyData stack, including support for numpy and pandas data structures
8047 and statistical routines from scipy and statsmodels.")
8048 (properties `((python2-variant . ,(delay python2-seaborn))))
8049 (license license:bsd-3)))
8050
8051 ;; 0.9.1 is the last release with support for Python 2.
8052 (define-public python2-seaborn
8053 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8054 (package
8055 (inherit base)
8056 (version "0.9.1")
8057 (source (origin
8058 (method url-fetch)
8059 (uri (pypi-uri "seaborn" version))
8060 (sha256
8061 (base32
8062 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8063
8064 (define-public python-mpmath
8065 (package
8066 (name "python-mpmath")
8067 (version "1.1.0")
8068 (source (origin
8069 (method url-fetch)
8070 (uri (pypi-uri "mpmath" version))
8071 (file-name (git-file-name name version))
8072 (sha256
8073 (base32
8074 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8075 (build-system python-build-system)
8076 (native-inputs
8077 `(("python-pytest" ,python-pytest)))
8078 (arguments
8079 '(#:phases
8080 (modify-phases %standard-phases
8081 (replace 'check
8082 (lambda _
8083 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8084 (home-page "https://mpmath.org")
8085 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8086 (description
8087 "@code{mpmath} can be used as an arbitrary-precision substitute for
8088 Python's float/complex types and math/cmath modules, but also does much
8089 more advanced mathematics.")
8090 (license license:bsd-3)))
8091
8092 (define-public python2-mpmath
8093 (package-with-python2 python-mpmath))
8094
8095 (define-public python-bigfloat
8096 (package
8097 (name "python-bigfloat")
8098 (version "0.3.0")
8099 (source
8100 (origin
8101 (method url-fetch)
8102 (uri (pypi-uri "bigfloat" version))
8103 (sha256
8104 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8105 (build-system python-build-system)
8106 (inputs
8107 `(("mpfr" ,mpfr)))
8108 (home-page "https://github.com/mdickinson/bigfloat")
8109 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8110 (description
8111 "This package provides a Python interface to the MPFR library for
8112 multiprecision arithmetic.")
8113 (license license:lgpl3+)))
8114
8115 (define-public python2-bigfloat
8116 (package-with-python2 python-bigfloat))
8117
8118 (define-public python-sympy
8119 (package
8120 (name "python-sympy")
8121 (version "1.7.1")
8122 (source
8123 (origin
8124 (method url-fetch)
8125 (uri (pypi-uri "sympy" version))
8126 (sha256
8127 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8128 (build-system python-build-system)
8129 (arguments
8130 `(#:phases
8131 (modify-phases %standard-phases
8132 (replace 'check
8133 (lambda* (#:key outputs #:allow-other-keys)
8134 (invoke
8135 (or (which "python3") (which "python"))
8136 "-c" "import sympy; sympy.test(\"/core\")"))))))
8137 (propagated-inputs
8138 `(("python-mpmath" ,python-mpmath)))
8139 (home-page "https://www.sympy.org/")
8140 (synopsis "Python library for symbolic mathematics")
8141 (description
8142 "SymPy is a Python library for symbolic mathematics. It aims to become a
8143 full-featured computer algebra system (CAS) while keeping the code as simple
8144 as possible in order to be comprehensible and easily extensible.")
8145 (license license:bsd-3)))
8146
8147 (define-public python2-sympy
8148 (package
8149 (inherit (package-with-python2 python-sympy))
8150 (version "1.5.1") ; last release for python2
8151 (source
8152 (origin
8153 (method url-fetch)
8154 (uri (pypi-uri "sympy" version))
8155 (sha256
8156 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8157
8158 (define-public python-q
8159 (package
8160 (name "python-q")
8161 (version "2.6")
8162 (source
8163 (origin
8164 (method url-fetch)
8165 (uri (pypi-uri "q" version))
8166 (sha256
8167 (base32
8168 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
8169 (build-system python-build-system)
8170 (home-page "https://github.com/zestyping/q")
8171 (synopsis "Quick-and-dirty debugging output for tired programmers")
8172 (description
8173 "q is a Python module for \"print\" style of debugging Python code. It
8174 provides convenient short API for print out of values, tracebacks, and
8175 falling into the Python interpreter.")
8176 (license license:asl2.0)))
8177
8178 (define-public python2-q
8179 (package-with-python2 python-q))
8180
8181 (define-public python-xlib
8182 (package
8183 (name "python-xlib")
8184 (version "0.29")
8185 (source
8186 (origin
8187 (method git-fetch)
8188 (uri (git-reference
8189 (url "https://github.com/python-xlib/python-xlib")
8190 (commit version)))
8191 (file-name (git-file-name name version))
8192 (sha256
8193 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
8194 (build-system python-build-system)
8195 (arguments
8196 `(#:phases
8197 (modify-phases %standard-phases
8198 (add-before 'check 'start-xserver
8199 (lambda* (#:key inputs #:allow-other-keys)
8200 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8201 ;; There must be a running X server and make check doesn't
8202 ;; start one. Therefore we must do it.
8203 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8204 (setenv "DISPLAY" ":1")
8205 #t))))))
8206 (native-inputs
8207 `(("python-mock" ,python-mock)
8208 ("python-setuptools-scm" ,python-setuptools-scm)
8209 ("xorg-server" ,xorg-server)))
8210 (propagated-inputs
8211 `(("python-six" ,python-six)))
8212 (home-page "https://github.com/python-xlib/python-xlib")
8213 (synopsis "Python X11 client library")
8214 (description
8215 "The Python X Library is intended to be a fully functional
8216 X client library for Python programs. It is useful to implement
8217 low-level X clients. It is written entirely in Python.")
8218 (license license:gpl2+)))
8219
8220 (define-public python2-xlib
8221 (package-with-python2 python-xlib))
8222
8223 (define-public python-singledispatch
8224 (package
8225 (name "python-singledispatch")
8226 (version "3.4.0.3")
8227 (source
8228 (origin
8229 (method url-fetch)
8230 (uri (pypi-uri "singledispatch" version))
8231 (sha256
8232 (base32
8233 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8234 (build-system python-build-system)
8235 (native-inputs
8236 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8237 (home-page
8238 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8239 (synopsis "Backport of singledispatch feature from Python 3.4")
8240 (description
8241 "This library brings functools.singledispatch from Python 3.4 to Python
8242 2.6-3.3.")
8243 (license license:expat)))
8244
8245 (define-public python2-singledispatch
8246 (package-with-python2 python-singledispatch))
8247
8248 ;; the python- version can be removed with python-3.5
8249 (define-public python-backports-abc
8250 (package
8251 (name "python-backports-abc")
8252 (version "0.5")
8253 (source
8254 (origin
8255 (method url-fetch)
8256 (uri (pypi-uri "backports_abc" version))
8257 (sha256
8258 (base32
8259 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
8260 (build-system python-build-system)
8261 (home-page "https://github.com/cython/backports_abc")
8262 (synopsis "Backport of additions to the 'collections.abc' module")
8263 (description
8264 "Python-backports-abc provides a backport of additions to the
8265 @code{collections.abc} module in Python-3.5.")
8266 (license license:psfl)))
8267
8268 (define-public python2-backports-abc
8269 (package-with-python2 python-backports-abc))
8270
8271 (define-public python-backports-csv
8272 (package
8273 (name "python-backports-csv")
8274 (version "1.0.7")
8275 (source
8276 (origin
8277 (method url-fetch)
8278 (uri (pypi-uri "backports.csv" version))
8279 (sha256
8280 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8281 (build-system python-build-system)
8282 (home-page "https://github.com/ryanhiebert/backports.csv")
8283 (synopsis "Backport of Python 3's csv module for Python 2")
8284 (description
8285 "Provides a backport of Python 3's @code{csv} module for parsing
8286 comma separated values. The API of the @code{csv} module in Python 2
8287 is drastically different from the @code{csv} module in Python 3.
8288 This is due, for the most part, to the difference between str in
8289 Python 2 and Python 3.")
8290 (license license:psfl)))
8291
8292 (define-public python2-backports-csv
8293 (package-with-python2 python-backports-csv))
8294
8295 (define-public python2-backports-shutil-get-terminal-size
8296 (package
8297 (name "python2-backports-shutil-get-terminal-size")
8298 (version "1.0.0")
8299 (source
8300 (origin
8301 (method url-fetch)
8302 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8303 (sha256
8304 (base32
8305 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8306 (build-system python-build-system)
8307 (arguments
8308 `(#:python ,python-2
8309 #:phases
8310 (modify-phases %standard-phases
8311 (replace 'check
8312 (lambda _
8313 (setenv "PYTHONPATH" (string-append "./build/lib:"
8314 (getenv "PYTHONPATH")))
8315 (invoke "py.test" "-v"))))))
8316 (native-inputs
8317 `(("python2-pytest" ,python2-pytest)))
8318 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8319 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8320 (description
8321 "This package provides a backport of the @code{get_terminal_size
8322 function} from Python 3.3's @code{shutil}.
8323 Unlike the original version it is written in pure Python rather than C,
8324 so it might be a tiny bit slower.")
8325 (license license:expat)))
8326
8327 (define-public python-waf
8328 (package
8329 (name "python-waf")
8330 (version "2.0.19")
8331 (source (origin
8332 (method url-fetch)
8333 (uri (string-append "https://waf.io/"
8334 "waf-" version ".tar.bz2"))
8335 (sha256
8336 (base32
8337 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8338 (build-system python-build-system)
8339 (arguments
8340 '(#:phases
8341 (modify-phases %standard-phases
8342 (replace 'build
8343 (lambda _
8344 ;; XXX: Find a way to add all extra tools.
8345 (let ((tools '("gccdeps"
8346 "clang_compilation_database")))
8347 (invoke "python" "waf-light" "configure" "build"
8348 (string-append "--tools="
8349 (string-join tools ","))))))
8350 (replace 'check
8351 (lambda _
8352 (invoke "python" "waf" "--version")))
8353 (replace 'install
8354 (lambda* (#:key outputs #:allow-other-keys)
8355 (let ((out (assoc-ref outputs "out")))
8356 (install-file "waf" (string-append out "/bin")))
8357 #t))
8358 ;; waf breaks when it is wrapped.
8359 (delete 'wrap))))
8360 (home-page "https://waf.io/")
8361 (synopsis "Python-based build system")
8362 (description
8363 "Waf is a Python-based framework for configuring, compiling and installing
8364 applications.")
8365 (license license:bsd-3)))
8366
8367 (define-public python2-waf
8368 (package-with-python2 python-waf))
8369
8370 (define-public python-pyzmq
8371 (package
8372 (name "python-pyzmq")
8373 (version "17.1.2")
8374 (source
8375 (origin
8376 (method url-fetch)
8377 (uri (pypi-uri "pyzmq" version))
8378 (sha256
8379 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8380 (build-system python-build-system)
8381 (arguments
8382 `(#:configure-flags
8383 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8384 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8385 ;; --inplace' for 'python setup.py test' to work.
8386 #:tests? #f))
8387 (inputs
8388 `(("zeromq" ,zeromq)))
8389 (native-inputs
8390 `(("pkg-config" ,pkg-config)
8391 ("python-nose" ,python-nose)))
8392 (home-page "https://github.com/zeromq/pyzmq")
8393 (synopsis "Python bindings for 0MQ")
8394 (description
8395 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8396 (license license:bsd-4)))
8397
8398 (define-public python2-pyzmq
8399 (package-with-python2 python-pyzmq))
8400
8401 (define-public python-pep8
8402 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8403 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8404 ;; some dependents' test suites, and nothing more.
8405 (package
8406 (name "python-pep8")
8407 (version "1.7.0")
8408 (source
8409 (origin
8410 (method url-fetch)
8411 (uri (pypi-uri "pep8" version))
8412 (sha256
8413 (base32
8414 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8415 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8416 (build-system python-build-system)
8417 (home-page "https://pep8.readthedocs.org/")
8418 (synopsis "Python style guide checker")
8419 (description
8420 "This tools checks Python code against some of the style conventions in
8421 PEP 8.")
8422 (license license:expat)))
8423
8424 (define-public python2-pep8
8425 (package-with-python2 python-pep8))
8426
8427 (define-public python-pep517
8428 (package
8429 (inherit python-pep517-bootstrap)
8430 (name "python-pep517")
8431 (arguments
8432 '(#:phases
8433 (modify-phases %standard-phases
8434 (replace 'check
8435 (lambda* (#:key tests? #:allow-other-keys)
8436 (delete-file "pytest.ini")
8437 ;; This test tries to connect to the internet
8438 (delete-file "tests/test_meta.py")
8439 (if tests?
8440 (invoke "pytest")
8441 #t))))))
8442 (native-inputs
8443 `(("python-mock" ,python-mock)
8444 ("python-pytest" ,python-pytest)
8445 ("python-testpath" ,python-testpath)))
8446 (properties `((python2-variant . ,(delay python2-pep517))))))
8447
8448 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8449 (define-public python2-pep517
8450 (let ((base (package-with-python2
8451 (strip-python2-variant python-pep517))))
8452 (package
8453 (inherit base)
8454 (name "python2-pep517")
8455 (arguments
8456 `(#:tests? #f
8457 ,@(package-arguments base)))
8458 (native-inputs `()))))
8459
8460 (define-public python-pyflakes
8461 (package
8462 (name "python-pyflakes")
8463 (version "2.2.0")
8464 (source
8465 (origin
8466 (method url-fetch)
8467 (uri (pypi-uri "pyflakes" version))
8468 (sha256
8469 (base32
8470 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8471 (build-system python-build-system)
8472 (home-page
8473 "https://github.com/pyflakes/pyflakes")
8474 (synopsis "Passive checker of Python programs")
8475 (description
8476 "Pyflakes statically checks Python source code for common errors.")
8477 (license license:expat)))
8478
8479 (define-public python2-pyflakes
8480 (package-with-python2 python-pyflakes))
8481
8482 (define-public python-mccabe
8483 (package
8484 (name "python-mccabe")
8485 (version "0.6.1")
8486 (source
8487 (origin
8488 (method url-fetch)
8489 (uri (pypi-uri "mccabe" version))
8490 (sha256
8491 (base32
8492 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8493 (build-system python-build-system)
8494 (native-inputs
8495 `(("python-pytest" ,python-pytest-bootstrap)
8496 ("python-pytest-runner" ,python-pytest-runner)))
8497 (home-page "https://github.com/flintwork/mccabe")
8498 (synopsis "McCabe checker, plugin for flake8")
8499 (description
8500 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8501 complexity of Python source code.")
8502 (license license:expat)))
8503
8504 (define-public python2-mccabe
8505 (package-with-python2 python-mccabe))
8506
8507 (define-public python-flake8
8508 (package
8509 (name "python-flake8")
8510 (version "3.8.4")
8511 (source (origin
8512 (method url-fetch)
8513 (uri (pypi-uri "flake8" version))
8514 (sha256
8515 (base32
8516 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8517 (build-system python-build-system)
8518 (arguments
8519 `(#:phases
8520 (modify-phases %standard-phases
8521 (delete 'check)
8522 (add-after 'install 'check
8523 (lambda* (#:key inputs outputs #:allow-other-keys)
8524 (add-installed-pythonpath inputs outputs)
8525 (invoke "pytest" "-v")
8526 #t)))))
8527 (propagated-inputs
8528 `(("python-pycodestyle" ,python-pycodestyle)
8529 ("python-entrypoints" ,python-entrypoints)
8530 ("python-pyflakes" ,python-pyflakes)
8531 ("python-mccabe" ,python-mccabe)))
8532 (native-inputs
8533 `(("python-mock" ,python-mock)
8534 ("python-pytest" ,python-pytest-bootstrap)))
8535 (home-page "https://gitlab.com/pycqa/flake8")
8536 (synopsis
8537 "The modular source code checker: pep8, pyflakes and co")
8538 (description
8539 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8540 (properties `((python2-variant . ,(delay python2-flake8))))
8541 (license license:expat)))
8542
8543 (define-public python2-flake8
8544 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8545 (package (inherit base)
8546 (propagated-inputs
8547 `(("python2-configparser" ,python2-configparser)
8548 ("python2-enum34" ,python2-enum34)
8549 ("python2-functools32" ,python2-functools32)
8550 ("python2-typing" ,python2-typing)
8551 ,@(package-propagated-inputs base))))))
8552
8553 (define-public python-flake8-bugbear
8554 (package
8555 (name "python-flake8-bugbear")
8556 (version "20.1.4")
8557 (source
8558 (origin
8559 (method url-fetch)
8560 (uri (pypi-uri "flake8-bugbear" version))
8561 (sha256
8562 (base32
8563 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8564 (build-system python-build-system)
8565 (arguments
8566 '(#:phases
8567 (modify-phases %standard-phases
8568 (add-before 'check 'disable-test
8569 (lambda _
8570 ;; This test fails on slow computers.
8571 (substitute* "tests/test_bugbear.py"
8572 (("def test_does_not_crash_on_any_valid_code")
8573 "def _test_does_not_crash_on_any_valid_code")))))))
8574 (native-inputs
8575 `(("python-hypothesis" ,python-hypothesis)
8576 ("python-hypothesmith" ,python-hypothesmith)))
8577 (propagated-inputs
8578 `(("python-attrs" ,python-attrs)
8579 ("python-flake8" ,python-flake8)))
8580 (home-page "https://github.com/PyCQA/flake8-bugbear")
8581 (synopsis
8582 "Flake8 plugin for finding likely bugs and design problems in your program")
8583 (description
8584 "This package contains a plugin for Flake8 finding likely bugs and
8585 design problems in your program. It contains warnings that don't belong
8586 in pyflakes and pycodestyle.")
8587 (license license:expat)))
8588
8589 (define-public python-flake8-implicit-str-concat
8590 (package
8591 (name "python-flake8-implicit-str-concat")
8592 (version "0.2.0")
8593 (source
8594 (origin
8595 (method url-fetch)
8596 (uri (pypi-uri "flake8_implicit_str_concat" version))
8597 (sha256
8598 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
8599 (build-system python-build-system)
8600 (propagated-inputs
8601 `(("python-attrs" ,python-attrs)
8602 ("python-more-itertools" ,python-more-itertools)))
8603 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
8604 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
8605 (description
8606 "This is a plugin for the Python code checking tool Flake8 to encourage
8607 correct string literal concatenation.
8608
8609 It looks for style problems like implicitly concatenated string literals on
8610 the same line (which can be introduced by the code formating tool Black), or
8611 unnecessary plus operators for explicit string literal concatenation.")
8612 (license license:expat)))
8613
8614 (define-public python-flake8-polyfill
8615 (package
8616 (name "python-flake8-polyfill")
8617 (version "1.0.2")
8618 (source
8619 (origin
8620 (method url-fetch)
8621 (uri (pypi-uri "flake8-polyfill" version))
8622 (sha256
8623 (base32
8624 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8625 (build-system python-build-system)
8626 (arguments
8627 '(#:phases
8628 (modify-phases %standard-phases
8629 (replace 'check
8630 (lambda _
8631 ;; Be compatible with Pytest 4:
8632 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8633 (substitute* "setup.cfg"
8634 (("\\[pytest\\]")
8635 "[tool:pytest]"))
8636
8637 (setenv "PYTHONPATH"
8638 (string-append (getcwd) "/build/lib:"
8639 (getenv "PYTHONPATH")))
8640 (invoke "py.test" "-v"))))))
8641 (native-inputs
8642 `(("python-flake8" ,python-flake8)
8643 ("python-mock" ,python-mock)
8644 ("python-pep8" ,python-pep8)
8645 ("python-pycodestyle" ,python-pycodestyle)
8646 ("python-pytest" ,python-pytest)))
8647 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8648 (synopsis "Polyfill package for Flake8 plugins")
8649 (description
8650 "This package that provides some compatibility helpers for Flake8
8651 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8652 (license license:expat)))
8653
8654 (define-public python2-flake8-polyfill
8655 (package-with-python2 python-flake8-polyfill))
8656
8657 (define-public python-flake8-print
8658 (package
8659 (name "python-flake8-print")
8660 (version "4.0.0")
8661 (source
8662 (origin
8663 (method url-fetch)
8664 (uri (pypi-uri "flake8-print" version))
8665 (sha256
8666 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
8667 (build-system python-build-system)
8668 (propagated-inputs
8669 `(("python-flake8" ,python-flake8)
8670 ("python-pycodestyle" ,python-pycodestyle)
8671 ("python-six" ,python-six)))
8672 (home-page "https://github.com/jbkahn/flake8-print")
8673 (synopsis "Print statement checker plugin for Flake8")
8674 (description
8675 "This plugin for Flake8 checks for @code{print} statements in Python
8676 files.")
8677 (license license:expat)))
8678
8679 (define-public python-flake8-pyi
8680 (package
8681 (name "python-flake8-pyi")
8682 (version "20.5.0")
8683 (source
8684 (origin
8685 (method url-fetch)
8686 (uri (pypi-uri "flake8-pyi" version))
8687 (sha256
8688 (base32
8689 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8690 (build-system python-build-system)
8691 (propagated-inputs
8692 `(("python-attrs" ,python-attrs)
8693 ("python-flake8" ,python-flake8)
8694 ("python-pyflakes" ,python-pyflakes)))
8695 (home-page "https://github.com/ambv/flake8-pyi")
8696 (synopsis
8697 "Flake8 plugin that provides specializations for type hinting stub files")
8698 (description
8699 "This package contains a plugin that provides specializations for
8700 type hinting stub files, especially interesting for linting typeshed. It
8701 adds the @file{.pyi} extension to the default value of the @code{--filename}
8702 command-line argument to Flake8. This means stubs are linted by default with
8703 this plugin enabled, without needing to explicitly list every file. It
8704 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8705 expressions after the entire file has been read. This enables support for
8706 first-class forward references that stub files use.")
8707 (license license:expat)))
8708
8709 (define-public python-flake8-pie
8710 (package
8711 (name "python-flake8-pie")
8712 (version "0.5.0")
8713 (source
8714 (origin
8715 (method url-fetch)
8716 (uri (pypi-uri "flake8-pie" version))
8717 (sha256
8718 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8719 (build-system python-build-system)
8720 (home-page "https://github.com/sbdchd/flake8-pie")
8721 (synopsis "Flake8 extension that implements lints")
8722 (description
8723 "This package provides a flake8 extension that implements miscellaneous
8724 lints.")
8725 (license license:bsd-2)))
8726
8727 (define-public python-autoflake
8728 (package
8729 (name "python-autoflake")
8730 (version "1.3.1")
8731 (source
8732 (origin
8733 (method url-fetch)
8734 (uri (pypi-uri "autoflake" version))
8735 (sha256
8736 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8737 (build-system python-build-system)
8738 (propagated-inputs
8739 `(("python-pyflakes" ,python-pyflakes)))
8740 (home-page "https://github.com/myint/autoflake")
8741 (synopsis "Removes unused imports and unused variables")
8742 (description
8743 "@code{autoflake} removes unused imports and unused variables from Python
8744 code as reported by @code{pyflakes}.
8745
8746 By default, it only removes unused imports for modules that are part of the
8747 standard library. Removal of unused variables is also disabled by default.
8748 It also removes useless @code{pass} statements.")
8749 (license license:expat)))
8750
8751 (define-public python-mistune
8752 (package
8753 (name "python-mistune")
8754 (version "0.8.4")
8755 (source
8756 (origin
8757 (method url-fetch)
8758 (uri (pypi-uri "mistune" version))
8759 (sha256
8760 (base32
8761 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8762 (build-system python-build-system)
8763 (native-inputs
8764 `(("python-nose" ,python-nose)
8765 ("python-cython" ,python-cython)))
8766 (home-page "https://github.com/lepture/mistune")
8767 (synopsis "Markdown parser in pure Python")
8768 (description "This package provides a fast markdown parser in pure
8769 Python.")
8770 (license license:bsd-3)))
8771
8772 (define-public python2-mistune
8773 (package-with-python2 python-mistune))
8774
8775 (define-public python-markdown
8776 (package
8777 (name "python-markdown")
8778 (version "3.2.1")
8779 (source
8780 (origin
8781 (method url-fetch)
8782 (uri (pypi-uri "Markdown" version))
8783 (sha256
8784 (base32
8785 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8786 (build-system python-build-system)
8787 (native-inputs
8788 `(("python-nose" ,python-nose)
8789 ("python-pyyaml" ,python-pyyaml)))
8790 (home-page "https://python-markdown.github.io/")
8791 (synopsis "Python implementation of Markdown")
8792 (description
8793 "This package provides a Python implementation of John Gruber's
8794 Markdown. The library features international input, various Markdown
8795 extensions, and several HTML output formats. A command line wrapper
8796 markdown_py is also provided to convert Markdown files to HTML.")
8797 (properties `((python2-variant . ,(delay python2-markdown))))
8798 (license license:bsd-3)))
8799
8800 ;; Markdown 3.2 dropped support for Python 2.
8801 (define-public python2-markdown
8802 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8803 (package/inherit
8804 base
8805 (version "3.1.1")
8806 (source (origin
8807 (method url-fetch)
8808 (uri (pypi-uri "Markdown" version))
8809 (sha256
8810 (base32
8811 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8812
8813 (define-public python-ptyprocess
8814 (package
8815 (name "python-ptyprocess")
8816 (version "0.5.2")
8817 (source
8818 (origin
8819 (method url-fetch)
8820 (uri (pypi-uri "ptyprocess" version))
8821 (sha256
8822 (base32
8823 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8824 (build-system python-build-system)
8825 (native-inputs
8826 `(("python-nose" ,python-nose)))
8827 (arguments
8828 `(#:phases
8829 (modify-phases %standard-phases
8830 (replace 'check
8831 (lambda _ (invoke "nosetests"))))))
8832 (home-page "https://github.com/pexpect/ptyprocess")
8833 (synopsis "Run a subprocess in a pseudo terminal")
8834 (description
8835 "This package provides a Python library used to launch a subprocess in a
8836 pseudo terminal (pty), and interact with both the process and its pty.")
8837 (license license:isc)))
8838
8839 (define-public python2-ptyprocess
8840 (package-with-python2 python-ptyprocess))
8841
8842 (define-public python-cram
8843 (package
8844 (name "python-cram")
8845 (version "0.7")
8846 (home-page "https://bitheap.org/cram/")
8847 (source (origin
8848 (method url-fetch)
8849 (uri (list (string-append home-page "cram-"
8850 version ".tar.gz")
8851 (pypi-uri "cram" version)))
8852 (sha256
8853 (base32
8854 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8855 (arguments
8856 '(#:phases
8857 (modify-phases %standard-phases
8858 (add-after 'unpack 'patch-source
8859 (lambda _
8860 (substitute* (find-files "cram" ".*\\.py$")
8861 ;; Replace default shell path.
8862 (("/bin/sh") (which "sh")))
8863 (substitute* (find-files "tests" ".*\\.t$")
8864 (("md5") "md5sum")
8865 (("/bin/bash") (which "bash"))
8866 (("/bin/sh") (which "sh")))
8867 (substitute* "cram/_test.py"
8868 ;; This hack works around a bug triggered by substituting
8869 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8870 ;; "cram -h", which breaks the output at 80 characters. This
8871 ;; causes the line showing the default shell to break into two
8872 ;; lines, but the test expects a single line...
8873 (("env\\['COLUMNS'\\] = '80'")
8874 "env['COLUMNS'] = '160'"))
8875
8876 (substitute* "Makefile"
8877 ;; Recent versions of python-coverage have caused the test
8878 ;; coverage to decrease (as of version 0.7). Allow that.
8879 (("--fail-under=100")
8880 "--fail-under=90"))
8881
8882 #t))
8883 (replace 'check
8884 ;; The test phase uses the built library and executable.
8885 (lambda* (#:key inputs outputs #:allow-other-keys)
8886 (add-installed-pythonpath inputs outputs)
8887 (setenv "PATH" (string-append (getenv "PATH") ":"
8888 (assoc-ref outputs "out") "/bin"))
8889 (invoke "make" "test"))))))
8890 (build-system python-build-system)
8891 (native-inputs
8892 `(("python-coverage" ,python-coverage)
8893 ("which" ,which)))
8894 (synopsis "Simple testing framework for command line applications")
8895 (description
8896 "Cram is a functional testing framework for command line applications.
8897 Cram tests look like snippets of interactive shell sessions. Cram runs each
8898 command and compares the command output in the test with the command’s actual
8899 output.")
8900 (license license:gpl2+)))
8901
8902 (define-public python2-cram
8903 (package-with-python2 python-cram))
8904
8905 (define-public python-crashtest
8906 (package
8907 (name "python-crashtest")
8908 (version "0.3.1")
8909 (source
8910 (origin
8911 (method url-fetch)
8912 (uri (pypi-uri "crashtest" version))
8913 (sha256
8914 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8915 (build-system python-build-system)
8916 (home-page "https://github.com/sdispater/crashtest")
8917 (synopsis "Manage Python errors with ease")
8918 (description
8919 "Python library that makes exceptions handling and inspection easier.")
8920 (license license:expat)))
8921
8922 (define-public python-straight-plugin
8923 (package
8924 (name "python-straight-plugin")
8925 (version "1.4.1")
8926 (source
8927 (origin
8928 (method url-fetch)
8929 (uri (pypi-uri "straight.plugin" version))
8930 (sha256
8931 (base32
8932 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
8933 (build-system python-build-system)
8934 (home-page "https://github.com/ironfroggy/straight.plugin")
8935 (synopsis "Simple namespaced plugin facility")
8936 (description "Straight Plugin provides a type of plugin you can create from
8937 almost any existing Python modules, and an easy way for outside developers to
8938 add functionality and customization to your projects with their own plugins.")
8939 (license license:expat)))
8940
8941 (define-public python2-straight-plugin
8942 (package-with-python2 python-straight-plugin))
8943
8944 (define-public python-fonttools
8945 (package
8946 (name "python-fonttools")
8947 (version "4.6.0")
8948 (source (origin
8949 (method url-fetch)
8950 (uri (pypi-uri "fonttools" version ".zip"))
8951 (sha256
8952 (base32
8953 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8954 (build-system python-build-system)
8955 (native-inputs
8956 `(("unzip" ,unzip)
8957 ("python-pytest" ,python-pytest)
8958 ("python-pytest-runner" ,python-pytest-runner)))
8959 (home-page "https://github.com/fonttools/fonttools")
8960 (synopsis "Tools to manipulate font files")
8961 (description
8962 "FontTools/TTX is a library to manipulate font files from Python. It
8963 supports reading and writing of TrueType/OpenType fonts, reading and writing
8964 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8965 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8966 from an XML-based format.")
8967 (license license:expat)))
8968
8969 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8970 (define-public python2-fonttools
8971 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8972 (package/inherit
8973 base
8974 (version "3.44.0")
8975 (source (origin
8976 (method url-fetch)
8977 (uri (pypi-uri "fonttools" version ".zip"))
8978 (sha256
8979 (base32
8980 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8981
8982 (define-public python-ly
8983 (package
8984 (name "python-ly")
8985 (version "0.9.5")
8986 (source
8987 (origin
8988 (method url-fetch)
8989 (uri (pypi-uri name version))
8990 (sha256
8991 (base32
8992 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8993 (build-system python-build-system)
8994 (arguments
8995 ;; FIXME: Some tests need network access.
8996 '(#:tests? #f))
8997 (synopsis "Tool and library for manipulating LilyPond files")
8998 (description "This package provides a Python library to parse, manipulate
8999 or create documents in LilyPond format. A command line program ly is also
9000 provided that can be used to do various manipulations with LilyPond files.")
9001 (home-page "https://pypi.org/project/python-ly/")
9002 (license license:gpl2+)))
9003
9004 (define-public python-appdirs
9005 (package
9006 (name "python-appdirs")
9007 (version "1.4.3")
9008 (source
9009 (origin
9010 (method url-fetch)
9011 (uri (pypi-uri "appdirs" version))
9012 (sha256
9013 (base32
9014 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9015 (build-system python-build-system)
9016 (home-page "https://github.com/ActiveState/appdirs")
9017 (synopsis
9018 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9019 (description
9020 "This module provides a portable way of finding out where user data
9021 should be stored on various operating systems.")
9022 (license license:expat)))
9023
9024 (define-public python2-appdirs
9025 (package-with-python2 python-appdirs))
9026
9027 (define-public python-gorilla
9028 (package
9029 (name "python-gorilla")
9030 (version "0.3.0")
9031 (source (origin
9032 (method url-fetch)
9033 (uri (pypi-uri "gorilla" version))
9034 (sha256
9035 (base32
9036 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9037 (build-system python-build-system)
9038 (home-page "https://github.com/christophercrouzet/gorilla")
9039 (synopsis "Convenient monkey patching with Python")
9040 (description
9041 "Gorilla is a Python library that provides a convenient approach to
9042 monkey patching. Monkey patching is the process of modifying module and
9043 class attributes at runtime with the purpose of replacing or extending
9044 third-party code.")
9045 (license license:expat)))
9046
9047 (define-public python-llfuse
9048 (package
9049 (name "python-llfuse")
9050 (version "1.3.8")
9051 (source (origin
9052 (method url-fetch)
9053 (uri (pypi-uri "llfuse" version))
9054 (sha256
9055 (base32
9056 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9057 (build-system python-build-system)
9058 (inputs
9059 `(("fuse" ,fuse)
9060 ("attr" ,attr)))
9061 (native-inputs
9062 `(("pkg-config" ,pkg-config)))
9063 (synopsis "Python bindings for FUSE")
9064 (description
9065 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9066 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9067 (license license:lgpl2.0+)
9068 (properties `((python2-variant . ,(delay python2-llfuse))))))
9069
9070 (define-public python2-llfuse
9071 (package (inherit (package-with-python2
9072 (strip-python2-variant python-llfuse)))
9073 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
9074
9075 (define-public python-msgpack
9076 (package
9077 (name "python-msgpack")
9078 (version "1.0.0")
9079 (source (origin
9080 (method url-fetch)
9081 (uri (pypi-uri "msgpack" version))
9082 (sha256
9083 (base32
9084 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
9085 (build-system python-build-system)
9086 (arguments
9087 `(#:modules ((guix build utils)
9088 (guix build python-build-system)
9089 (ice-9 ftw)
9090 (srfi srfi-1)
9091 (srfi srfi-26))
9092 #:phases
9093 (modify-phases %standard-phases
9094 (replace 'check
9095 (lambda _
9096 (let ((cwd (getcwd)))
9097 (setenv "PYTHONPATH"
9098 (string-append cwd "/build/"
9099 (find (cut string-prefix? "lib" <>)
9100 (scandir (string-append cwd "/build")))
9101 ":"
9102 (getenv "PYTHONPATH")))
9103 (invoke "pytest" "-v" "test")))))))
9104 (native-inputs
9105 `(("python-pytest" ,python-pytest)))
9106 (synopsis "MessagePack (de)serializer")
9107 (description "MessagePack is a fast, compact binary serialization format,
9108 suitable for similar data to JSON. This package provides CPython bindings for
9109 reading and writing MessagePack data.")
9110 (home-page "https://pypi.org/project/msgpack/")
9111 (license license:asl2.0)))
9112
9113 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
9114 ;; release 0.5. Some packages like borg still call it by the old name for now.
9115 ;; <https://bugs.gnu.org/30662>
9116 (define-public python-msgpack-transitional
9117 (package
9118 (inherit python-msgpack)
9119 (name "python-msgpack-transitional")
9120 (version "0.5.6")
9121 (source (origin
9122 (method url-fetch)
9123 (uri (pypi-uri "msgpack" version))
9124 (sha256
9125 (base32
9126 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
9127 (arguments
9128 (substitute-keyword-arguments (package-arguments python-msgpack)
9129 ((#:phases phases)
9130 `(modify-phases ,phases
9131 (add-after 'unpack 'configure-transitional
9132 (lambda _
9133 ;; Keep using the old name.
9134 (substitute* "setup.py"
9135 (("TRANSITIONAL = False")
9136 "TRANSITIONAL = 1"))
9137 #t))))))))
9138
9139 (define-public python2-msgpack
9140 (package-with-python2 python-msgpack))
9141
9142 (define-public python-netaddr
9143 (package
9144 (name "python-netaddr")
9145 (version "0.7.19")
9146 (source
9147 (origin
9148 (method url-fetch)
9149 (uri (pypi-uri "netaddr" version))
9150 (sha256
9151 (base32
9152 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
9153 (build-system python-build-system)
9154 (arguments `(#:tests? #f)) ;; No tests.
9155 (home-page "https://github.com/drkjam/netaddr/")
9156 (synopsis "Pythonic manipulation of network addresses")
9157 (description
9158 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
9159 and MAC network addresses.")
9160 (license license:bsd-3)))
9161
9162 (define-public python2-netaddr
9163 (package-with-python2 python-netaddr))
9164
9165 (define-public python2-pyroute2
9166 (package
9167 (name "python2-pyroute2")
9168 (version "0.5.6")
9169 (source
9170 (origin
9171 (method url-fetch)
9172 (uri (pypi-uri "pyroute2" version))
9173 (sha256
9174 (base32
9175 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
9176 (build-system python-build-system)
9177 (arguments
9178 `(#:python ,python-2)) ;Python 3.x is not supported
9179 (home-page "https://github.com/svinota/pyroute2")
9180 (synopsis "Python netlink library")
9181 (description
9182 "Pyroute2 is a pure Python netlink library with minimal dependencies.
9183 Supported netlink families and protocols include:
9184 @itemize
9185 @item rtnl, network settings - addresses, routes, traffic controls
9186 @item nfnetlink - netfilter API: ipset, nftables, ...
9187 @item ipq - simplest userspace packet filtering, iptables QUEUE target
9188 @item devlink - manage and monitor devlink-enabled hardware
9189 @item generic - generic netlink families
9190 @itemize
9191 @item nl80211 - wireless functions API (basic support)
9192 @item taskstats - extended process statistics
9193 @item acpi_events - ACPI events monitoring
9194 @item thermal_events - thermal events monitoring
9195 @item VFS_DQUOT - disk quota events monitoring
9196 @end itemize
9197 @end itemize")
9198 (license license:gpl2+)))
9199
9200 (define-public python-wrapt
9201 (package
9202 (name "python-wrapt")
9203 (version "1.11.2")
9204 (source
9205 (origin
9206 (method url-fetch)
9207 (uri (pypi-uri "wrapt" version))
9208 (sha256
9209 (base32
9210 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
9211 (build-system python-build-system)
9212 (arguments
9213 ;; Tests are not included in the tarball, they are only available in the
9214 ;; git repository.
9215 `(#:tests? #f))
9216 (home-page "https://github.com/GrahamDumpleton/wrapt")
9217 (synopsis "Module for decorators, wrappers and monkey patching")
9218 (description
9219 "The aim of the wrapt module is to provide a transparent object proxy for
9220 Python, which can be used as the basis for the construction of function
9221 wrappers and decorator functions.")
9222 (license license:bsd-2)))
9223
9224 (define-public python2-wrapt
9225 (package-with-python2 python-wrapt))
9226
9227 (define-public python-commonmark
9228 (package
9229 (name "python-commonmark")
9230 (version "0.9.1")
9231 (source
9232 (origin
9233 (method url-fetch)
9234 (uri (pypi-uri "commonmark" version))
9235 (sha256
9236 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
9237 (build-system python-build-system)
9238 (arguments
9239 `(#:phases
9240 (modify-phases %standard-phases
9241 (replace 'check
9242 (lambda* (#:key inputs outputs #:allow-other-keys)
9243 (add-installed-pythonpath inputs outputs)
9244 (invoke "python" "setup.py" "test"))))))
9245 (home-page "https://github.com/readthedocs/commonmark.py")
9246 (synopsis "Python parser for the CommonMark Markdown spec")
9247 (description
9248 "This module is a pure Python port of jgm's @code{commonmark.js}, a
9249 Markdown parser and renderer for the CommonMark specification, using only
9250 native modules.")
9251 (license license:bsd-3)))
9252
9253 (define-public python-xlrd
9254 (package
9255 (name "python-xlrd")
9256 (version "1.2.0")
9257 (source (origin
9258 (method url-fetch)
9259 (uri (pypi-uri "xlrd" version))
9260 (sha256
9261 (base32
9262 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
9263 (build-system python-build-system)
9264 (arguments
9265 `(#:phases
9266 (modify-phases %standard-phases
9267 ;; Some tests depend on writing a temporary file to the user's home
9268 ;; directory.
9269 (add-after 'unpack 'fix-tests
9270 (lambda _
9271 (delete-file "tests/test_open_workbook.py")
9272 #t)))))
9273 (home-page "http://www.python-excel.org/")
9274 (synopsis "Library for extracting data from Excel files")
9275 (description "This package provides a library to extract data from
9276 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
9277 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
9278 Unicode-aware. It is not intended as an end-user tool.")
9279 (license license:bsd-3)))
9280
9281 (define-public python2-xlrd
9282 (package-with-python2 python-xlrd))
9283
9284 (define-public python-immutables
9285 (package
9286 (name "python-immutables")
9287 (version "0.14")
9288 (source
9289 (origin
9290 (method url-fetch)
9291 (uri (pypi-uri "immutables" version))
9292 (sha256
9293 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9294 (build-system python-build-system)
9295 (home-page "https://github.com/MagicStack/immutables")
9296 (synopsis "High-performance immutable mapping type for Python")
9297 (description
9298 "An immutable mapping type for Python. The underlying datastructure is a
9299 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9300 functional languages.")
9301 (license license:asl2.0)))
9302
9303 (define-public python-prettytable
9304 (package
9305 (name "python-prettytable")
9306 (version "0.7.2")
9307 (source
9308 (origin
9309 (method url-fetch)
9310 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9311 (sha256
9312 (base32
9313 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9314 (build-system python-build-system)
9315 (home-page "https://code.google.com/archive/p/prettytable/")
9316 (synopsis "Display tabular data in an ASCII table format")
9317 (description
9318 "A library designed to represent tabular data in visually appealing ASCII
9319 tables. PrettyTable allows for selection of which columns are to be printed,
9320 independent alignment of columns (left or right justified or centred) and
9321 printing of sub-tables by specifying a row range.")
9322 (license license:bsd-3)))
9323
9324 (define-public python2-prettytable
9325 (package-with-python2 python-prettytable))
9326
9327 (define-public python-curio
9328 (package
9329 (name "python-curio")
9330 (version "1.2")
9331 (source
9332 (origin
9333 (method url-fetch)
9334 (uri (pypi-uri "curio" version))
9335 (sha256
9336 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9337 (build-system python-build-system)
9338 (arguments
9339 `(#:phases
9340 (modify-phases %standard-phases
9341 (replace 'check
9342 (lambda* (#:key inputs outputs #:allow-other-keys)
9343 (add-installed-pythonpath inputs outputs)
9344 (invoke "pytest" "-vv" "-k"
9345 ;; Tries to open an outgoing connection.
9346 "not test_ssl_outgoing"))))))
9347 (native-inputs
9348 `(("python-pytest" ,python-pytest)))
9349 (home-page "https://github.com/dabeaz/curio")
9350 (synopsis "Coroutine-based library for concurrent Python")
9351 (description
9352 "Curio is a coroutine-based library for concurrent Python systems
9353 programming. It provides standard programming abstractions such as as
9354 tasks, sockets, files, locks, and queues.")
9355 (license license:bsd-3)))
9356
9357 (define-public python-tables
9358 (package
9359 (name "python-tables")
9360 (version "3.6.1")
9361 (source
9362 (origin
9363 (method url-fetch)
9364 (uri (pypi-uri "tables" version))
9365 (sha256
9366 (base32
9367 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9368 (modules '((guix build utils)))
9369 (snippet
9370 '(begin
9371 ;; Remove pre-compiled .pyc files from source.
9372 (for-each delete-file-recursively
9373 (find-files "." "__pycache__" #:directories? #t))
9374 (for-each delete-file (find-files "." "\\.pyc$"))
9375 #t))))
9376 (build-system python-build-system)
9377 (arguments
9378 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9379 ;; or "check", so we must override the build and check phases.
9380 #:phases
9381 (modify-phases %standard-phases
9382 (add-after 'unpack 'use-gcc
9383 (lambda _
9384 (substitute* "setup.py"
9385 (("^( +)compiler = new_compiler\\(\\)" line indent)
9386 (string-append line
9387 "\n"
9388 indent
9389 "compiler.set_executables(compiler='gcc',"
9390 "compiler_so='gcc',"
9391 "linker_exe='gcc',"
9392 "linker_so='gcc -shared')")))
9393 #t))
9394 (add-after 'unpack 'disable-tuning
9395 (lambda _
9396 (substitute* "setup.py"
9397 (("cpu_flags = .*")
9398 "cpu_flags = ['sse2']\n"))
9399 #t))
9400 (replace 'build
9401 (lambda* (#:key inputs #:allow-other-keys)
9402 (invoke "python" "setup.py" "build"
9403 (string-append "--hdf5="
9404 (assoc-ref inputs "hdf5")))))
9405 (replace 'check
9406 (lambda* (#:key inputs #:allow-other-keys)
9407 (invoke "python" "setup.py" "check"
9408 (string-append "--hdf5="
9409 (assoc-ref inputs "hdf5"))))))))
9410 (propagated-inputs
9411 `(("python-numexpr" ,python-numexpr)
9412 ("python-numpy" ,python-numpy)))
9413 (native-inputs
9414 `(("python-cython" ,python-cython)
9415 ("pkg-config" ,pkg-config)))
9416 (inputs
9417 `(("hdf5" ,hdf5-1.10)
9418 ("bzip2" ,bzip2)
9419 ("zlib" ,zlib)))
9420 (home-page "https://www.pytables.org/")
9421 (synopsis "Hierarchical datasets for Python")
9422 (description "PyTables is a package for managing hierarchical datasets and
9423 designed to efficiently cope with extremely large amounts of data.")
9424 (license license:bsd-3)))
9425
9426 (define-public python2-tables
9427 (package-with-python2 python-tables))
9428
9429 (define-public python-sniffio
9430 (package
9431 (name "python-sniffio")
9432 (version "1.1.0")
9433 (source
9434 (origin
9435 (method url-fetch)
9436 (uri (pypi-uri "sniffio" version))
9437 (sha256
9438 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9439 (build-system python-build-system)
9440 (arguments
9441 `(#:phases
9442 (modify-phases %standard-phases
9443 (replace 'check
9444 (lambda _
9445 (invoke "pytest" "-vv"))))))
9446 (native-inputs
9447 `(("python-curio" ,python-curio)
9448 ("python-pytest" ,python-pytest)
9449 ("python-pytest-cov" ,python-pytest-cov)))
9450 (home-page "https://github.com/python-trio/sniffio")
9451 (synopsis "Detect which async library a program is running under")
9452 (description "This package detects which async library a program is
9453 running under. It supports multiple async I/O packages, like Trio, and
9454 asyncio.")
9455 ;; Either license applies.
9456 (license (list license:expat license:asl2.0))))
9457
9458 (define-public python-pytest-black
9459 (package
9460 (name "python-pytest-black")
9461 (version "0.3.8")
9462 (source
9463 (origin
9464 (method url-fetch)
9465 (uri (pypi-uri "pytest-black" version))
9466 (sha256
9467 (base32
9468 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9469 (build-system python-build-system)
9470 (propagated-inputs
9471 `(("python-pytest" ,python-pytest)
9472 ("python-black" ,python-black)
9473 ("python-toml" ,python-toml)))
9474 (native-inputs
9475 `(("python-setuptools-scm" ,python-setuptools-scm)))
9476 (home-page "https://github.com/shopkeep/pytest-black")
9477 (synopsis "Pytest plugin to enable format checking with black")
9478 (description
9479 "This package provides a pytest plugin to enable format checking with the
9480 Python code formatter \"black\".")
9481 (license license:expat)))
9482
9483 (define-public python-get-version
9484 (package
9485 (name "python-get-version")
9486 (version "2.1")
9487 (source
9488 (origin
9489 (method url-fetch)
9490 (uri (pypi-uri "get_version" version))
9491 (sha256
9492 (base32
9493 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9494 (build-system python-build-system)
9495 (propagated-inputs
9496 `(("python-pygments" ,python-pygments)
9497 ("python-pytest" ,python-pytest)
9498 ("python-pytest-black" ,python-pytest-black)
9499 ("python-pytest-cov" ,python-pytest-cov)
9500 ("python-setuptools" ,python-setuptools)
9501 ("python-testpath" ,python-testpath)))
9502 (home-page "https://github.com/flying-sheep/get_version")
9503 (synopsis "Version helper in the spirit of versioneer")
9504 (description
9505 "This package provides a version helper that lets you automatically use
9506 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9507 also supports getting the version from Python source distributions or, once
9508 your package is installed, via @code{pkg_resources} (part of
9509 @code{setuptools}).")
9510 (license license:gpl3+)))
9511
9512 (define-public python-legacy-api-wrap
9513 (package
9514 (name "python-legacy-api-wrap")
9515 (version "1.2")
9516 (source
9517 (origin
9518 (method url-fetch)
9519 (uri (pypi-uri "legacy-api-wrap" version))
9520 (sha256
9521 (base32
9522 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9523 (build-system python-build-system)
9524 (propagated-inputs
9525 `(("python-get-version" ,python-get-version)
9526 ("python-pytest" ,python-pytest)
9527 ("python-pytest-black" ,python-pytest-black)
9528 ("python-pytest-cov" ,python-pytest-cov)
9529 ("python-setuptools" ,python-setuptools)))
9530 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9531 (synopsis "Legacy API wrapper")
9532 (description "This module defines a decorator to wrap legacy APIs. The
9533 primary use case is APIs defined before keyword-only parameters existed.")
9534 (license license:gpl3+)))
9535
9536 (define-public python-pyasn1
9537 (package
9538 (name "python-pyasn1")
9539 (version "0.4.8")
9540 (source
9541 (origin
9542 (method url-fetch)
9543 (uri (pypi-uri "pyasn1" version))
9544 (sha256
9545 (base32
9546 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9547 (build-system python-build-system)
9548 (home-page "http://pyasn1.sourceforge.net/")
9549 (synopsis "ASN.1 types and codecs")
9550 (description
9551 "This is an implementation of ASN.1 types and codecs in Python. It is
9552 suitable for a wide range of protocols based on the ASN.1 specification.")
9553 (license license:bsd-2)))
9554
9555 (define-public python2-pyasn1
9556 (package-with-python2 python-pyasn1))
9557
9558 (define-public python-pyasn1-modules
9559 (package
9560 (name "python-pyasn1-modules")
9561 (version "0.2.2")
9562 (source
9563 (origin
9564 (method url-fetch)
9565 (uri (pypi-uri "pyasn1-modules" version))
9566 (sha256
9567 (base32
9568 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9569 (build-system python-build-system)
9570 (propagated-inputs
9571 `(("python-pyasn1" ,python-pyasn1)))
9572 (home-page "https://sourceforge.net/projects/pyasn1/")
9573 (synopsis "ASN.1 codec implementations")
9574 (description
9575 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9576 implementations of ASN.1-based codecs and protocols.")
9577 (license license:bsd-3)))
9578
9579 (define-public python2-pyasn1-modules
9580 (package-with-python2 python-pyasn1-modules))
9581
9582 (define-public python-ipaddress
9583 (package
9584 (name "python-ipaddress")
9585 (version "1.0.22")
9586 (source (origin
9587 (method url-fetch)
9588 (uri (pypi-uri "ipaddress" version))
9589 (sha256
9590 (base32
9591 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9592 (build-system python-build-system)
9593 (home-page "https://github.com/phihag/ipaddress")
9594 (synopsis "IP address manipulation library")
9595 (description
9596 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9597 in Python. This library is used to create, poke at, and manipulate IPv4 and
9598 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9599 module to older versions of Python.")
9600 (license license:psfl)))
9601
9602 (define-public python2-ipaddress
9603 (package-with-python2 python-ipaddress))
9604
9605 (define-public python2-ipaddr
9606 (package
9607 (name "python2-ipaddr")
9608 (version "2.1.11")
9609 (source
9610 (origin
9611 (method url-fetch)
9612 (uri (pypi-uri "ipaddr" version))
9613 (sha256
9614 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9615 (build-system python-build-system)
9616 (arguments
9617 `(#:python ,python-2 ;version 2 only
9618 #:phases
9619 (modify-phases %standard-phases
9620 (replace 'check
9621 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9622 (home-page "https://github.com/google/ipaddr-py")
9623 (synopsis "IP address manipulation library")
9624 (description
9625 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9626 IPv6 addresses and networks.
9627
9628 For new implementations you may prefer to use the standard module
9629 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9630 versions of Python.")
9631 (license license:asl2.0)))
9632
9633 (define-public python-idna
9634 (package
9635 (name "python-idna")
9636 (version "2.10")
9637 (source
9638 (origin
9639 (method url-fetch)
9640 (uri (pypi-uri "idna" version))
9641 (sha256
9642 (base32
9643 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9644 (build-system python-build-system)
9645 (home-page "https://github.com/kjd/idna")
9646 (synopsis "Internationalized domain names in applications")
9647 (description
9648 "This is a library to support the Internationalised Domain Names in
9649 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9650 protocol is often referred to as “IDNA2008” and can produce different results
9651 from the earlier standard from 2003. The library is also intended to act as a
9652 suitable drop-in replacement for the “encodings.idna” module that comes with
9653 the Python standard library but currently only supports the older 2003
9654 specification.")
9655 (license license:bsd-4)))
9656
9657 (define-public python-idna-2.7
9658 (package (inherit python-idna)
9659 (version "2.7")
9660 (source (origin
9661 (method url-fetch)
9662 (uri (pypi-uri "idna" version))
9663 (sha256
9664 (base32
9665 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9666
9667
9668 (define-public python2-idna
9669 (package-with-python2 python-idna))
9670
9671 (define-public python-libsass
9672 (package
9673 (name "python-libsass")
9674 (version "0.20.1")
9675 (source
9676 (origin
9677 ;; PyPI tarball is missing some test files.
9678 (method git-fetch)
9679 (uri (git-reference
9680 (url "https://github.com/sass/libsass-python")
9681 (commit version)))
9682 (file-name (git-file-name name version))
9683 (sha256
9684 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9685 (build-system python-build-system)
9686 (arguments
9687 `(#:phases
9688 (modify-phases %standard-phases
9689 ;; Use Guix package of libsass instead of compiling from a checkout.
9690 (add-before 'build 'set-libsass
9691 (lambda _
9692 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9693 #t))
9694 (replace 'check
9695 (lambda* (#:key inputs outputs #:allow-other-keys)
9696 (add-installed-pythonpath inputs outputs)
9697 (invoke "pytest" "sasstests.py"))))))
9698 (native-inputs
9699 `(("python-pytest" ,python-pytest)
9700 ("python-werkzeug" ,python-werkzeug)))
9701 (inputs
9702 `(("libsass" ,libsass)))
9703 (propagated-inputs
9704 `(("python-six" ,python-six)))
9705 (home-page "https://sass.github.io/libsass-python/")
9706 (synopsis "Straightforward binding of libsass for Python")
9707 (description
9708 "This package provides a simple Python extension module @code{sass} which
9709 is binding LibSass.")
9710 (license license:expat)))
9711
9712 (define-public python-idna-ssl
9713 (package
9714 (name "python-idna-ssl")
9715 (version "1.0.1")
9716 (source
9717 (origin
9718 (method url-fetch)
9719 (uri (pypi-uri "idna-ssl" version))
9720 (sha256
9721 (base32
9722 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9723 (build-system python-build-system)
9724 (arguments
9725 `(#:tests? #f)) ;circular dependency with python-aiohttp
9726 (home-page "https://github.com/aio-libs/idna-ssl")
9727 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9728 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9729 domains support.")
9730 (license license:expat)))
9731
9732 (define-public python-pretend
9733 (package
9734 (name "python-pretend")
9735 (version "1.0.9")
9736 (source
9737 (origin
9738 (method url-fetch)
9739 (uri (pypi-uri "pretend" version))
9740 (sha256
9741 (base32
9742 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9743 (build-system python-build-system)
9744 (home-page "https://github.com/alex/pretend")
9745 (synopsis "Library for stubbing in Python")
9746 (description
9747 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9748 technique for writing tests. You may hear the term mixed up with mocks,
9749 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9750 responses, rather than doing any computation.")
9751 (license license:bsd-3)))
9752
9753 (define-public python2-pretend
9754 (package-with-python2 python-pretend))
9755
9756 (define-public python-pip
9757 (package
9758 (name "python-pip")
9759 (version "20.2.4")
9760 (source
9761 (origin
9762 (method url-fetch)
9763 (uri (pypi-uri "pip" version))
9764 (sha256
9765 (base32
9766 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
9767 (build-system python-build-system)
9768 (arguments
9769 '(#:tests? #f)) ; there are no tests in the pypi archive.
9770 (home-page "https://pip.pypa.io/")
9771 (synopsis "Package manager for Python software")
9772 (description
9773 "Pip is a package manager for Python software, that finds packages on the
9774 Python Package Index (PyPI).")
9775 (license license:expat)))
9776
9777 (define-public python2-pip
9778 (package-with-python2 python-pip))
9779
9780 (define-public python-tlsh
9781 (package
9782 (name "python-tlsh")
9783 (version "3.4.5")
9784 (home-page "https://github.com/trendmicro/tlsh")
9785 (source
9786 (origin
9787 (method git-fetch)
9788 (uri (git-reference
9789 (url "https://github.com/trendmicro/tlsh")
9790 (commit (string-append "v" version))))
9791 (file-name (git-file-name name version))
9792 (sha256
9793 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9794 (build-system cmake-build-system)
9795 (arguments
9796 '(#:out-of-source? #f
9797 #:phases (modify-phases %standard-phases
9798 (replace
9799 'install
9800 (lambda* (#:key outputs #:allow-other-keys)
9801 ;; Build and install the Python bindings. The underlying
9802 ;; C++ library is apparently not meant to be installed.
9803 (let ((out (assoc-ref outputs "out")))
9804 (with-directory-excursion "py_ext"
9805 (and (system* "python" "setup.py" "build")
9806 (system* "python" "setup.py" "install"
9807 (string-append "--prefix=" out))))))))))
9808 (inputs `(("python" ,python-wrapper))) ;for the bindings
9809 (synopsis "Fuzzy matching library for Python")
9810 (description
9811 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9812 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9813 value which can be used for similarity comparisons. Similar objects have
9814 similar hash values, which allows for the detection of similar objects by
9815 comparing their hash values. The byte stream should have a sufficient amount
9816 of complexity; for example, a byte stream of identical bytes will not generate
9817 a hash value.")
9818 (license license:asl2.0)))
9819
9820 (define-public python2-tlsh
9821 (package
9822 (inherit python-tlsh)
9823 (name "python2-tlsh")
9824 (inputs `(("python" ,python-2)))))
9825
9826 (define-public python-termcolor
9827 (package
9828 (name "python-termcolor")
9829 (version "1.1.0")
9830 (source
9831 (origin
9832 (method url-fetch)
9833 (uri (pypi-uri "termcolor" version))
9834 (sha256
9835 (base32
9836 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9837 (build-system python-build-system)
9838 (arguments
9839 ;; There are no tests.
9840 `(#:tests? #f))
9841 (home-page "https://pypi.org/project/termcolor/")
9842 (synopsis "ANSII Color formatting for terminal output")
9843 (description
9844 "This package provides ANSII Color formatting for output in terminals.")
9845 (license license:expat)))
9846
9847 (define-public python2-termcolor
9848 (package-with-python2 python-termcolor))
9849
9850 (define-public python-terminaltables
9851 (package
9852 (name "python-terminaltables")
9853 (version "3.1.0")
9854 (source
9855 (origin
9856 (method url-fetch)
9857 (uri (pypi-uri "terminaltables" version))
9858 (sha256
9859 (base32
9860 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9861 (build-system python-build-system)
9862 (home-page "https://github.com/Robpol86/terminaltables")
9863 (synopsis
9864 "Generate simple tables in terminals from a nested list of strings")
9865 (description
9866 "This package makes it easy to draw tables in terminal/console
9867 applications from a list of lists of strings. It supports multi-line rows.")
9868 (license license:expat)))
9869
9870 (define-public python-libarchive-c
9871 (package
9872 (name "python-libarchive-c")
9873 (version "2.9")
9874 (source (origin
9875 (method url-fetch)
9876 (uri (pypi-uri "libarchive-c" version))
9877 (sha256
9878 (base32
9879 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9880 (build-system python-build-system)
9881 (arguments
9882 '(#:phases (modify-phases %standard-phases
9883 (add-before
9884 'build 'reference-libarchive
9885 (lambda* (#:key inputs #:allow-other-keys)
9886 ;; Retain the absolute file name of libarchive.so.
9887 (let ((libarchive (assoc-ref inputs "libarchive")))
9888 (substitute* "libarchive/ffi.py"
9889 (("find_library\\('archive'\\)")
9890 (string-append "'" libarchive
9891 "/lib/libarchive.so'"))))))
9892 (replace 'check
9893 (lambda _ (invoke "pytest" "-vv"))))))
9894 (native-inputs
9895 `(("python-mock" ,python-mock)
9896 ("python-pytest" ,python-pytest)))
9897 (inputs
9898 `(("libarchive" ,libarchive)))
9899 (home-page "https://github.com/Changaco/python-libarchive-c")
9900 (synopsis "Python interface to libarchive")
9901 (description
9902 "This package provides Python bindings to libarchive, a C library to
9903 access possibly compressed archives in many different formats. It uses
9904 Python's @code{ctypes} foreign function interface (FFI).")
9905 (license license:lgpl2.0+)))
9906
9907 (define-public python2-libarchive-c
9908 (package-with-python2 python-libarchive-c))
9909
9910 (define-public python-file
9911 (package
9912 (inherit file)
9913 (name "python-file")
9914 (build-system python-build-system)
9915 (arguments
9916 '(#:tests? #f ;no tests
9917 #:configure-flags '("--single-version-externally-managed" "--root=/")
9918 #:phases (modify-phases %standard-phases
9919 (add-before 'build 'change-directory
9920 (lambda _
9921 (chdir "python")
9922 #t))
9923 (add-before 'build 'set-library-file-name
9924 (lambda* (#:key inputs #:allow-other-keys)
9925 (let ((file (assoc-ref inputs "file")))
9926 (substitute* "magic.py"
9927 (("find_library\\('magic'\\)")
9928 (string-append "'" file "/lib/libmagic.so'")))
9929 #t))))))
9930 (inputs `(("file" ,file)))
9931 (native-inputs (if (%current-target-system)
9932 `(("self" ,this-package))
9933 '()))
9934 (synopsis "Python bindings to the libmagic file type guesser")
9935 (description "This package provides Python bindings to the libmagic file
9936 type guesser.
9937
9938 Note that this module and the @code{python-magic} module both provide a
9939 @file{magic.py} file; these two modules, which are different and were
9940 developed separately, both serve the same purpose: provide Python bindings for
9941 libmagic.")))
9942
9943 (define-public python2-file
9944 (package-with-python2 python-file))
9945
9946 (define-public python-debian
9947 (package
9948 (name "python-debian")
9949 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9950 (version "0.1.36")
9951 (source
9952 (origin
9953 ;; Use git-fetch, as pypi doesn't include test suite.
9954 (method git-fetch)
9955 (uri (git-reference
9956 (url home-page)
9957 (commit version)))
9958 (file-name (git-file-name name version))
9959 (sha256
9960 (base32
9961 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9962 (build-system python-build-system)
9963 (arguments
9964 `(#:phases (modify-phases %standard-phases
9965 (add-after 'unpack 'remove-debian-specific-tests
9966 ;; python-apt, apt and dpkg are not yet available in guix,
9967 ;; and these tests heavily depend on them.
9968 (lambda _
9969 (delete-file "lib/debian/tests/test_deb822.py")
9970 (delete-file "lib/debian/tests/test_debfile.py")
9971 #t)))))
9972 (propagated-inputs
9973 `(("python-six" ,python-six)
9974 ("python-chardet" ,python-chardet)))
9975 (synopsis "Debian package related modules")
9976 (description
9977 ;; XXX: Use @enumerate instead of @itemize to work around
9978 ;; <http://bugs.gnu.org/21772>.
9979 "This package provides Python modules that abstract many formats of
9980 Debian-related files, such as:
9981
9982 @enumerate
9983 @item Debtags information;
9984 @item @file{debian/changelog} files;
9985 @item packages files, pdiffs;
9986 @item control files of single or multiple RFC822-style paragraphs---e.g.
9987 @file{debian/control}, @file{.changes}, @file{.dsc};
9988 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
9989 contained files and meta-information.
9990 @end enumerate\n")
9991
9992 ;; Modules are either GPLv2+ or GPLv3+.
9993 (license license:gpl3+)))
9994
9995 (define-public python-nbformat
9996 (package
9997 (name "python-nbformat")
9998 (version "4.4.0")
9999 (source
10000 (origin
10001 (method url-fetch)
10002 (uri (pypi-uri "nbformat" version))
10003 (sha256
10004 (base32
10005 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
10006 (build-system python-build-system)
10007 (arguments `(#:tests? #f)) ; no test target
10008 (propagated-inputs
10009 `(("python-ipython-genutils" ,python-ipython-genutils)
10010 ("python-jsonschema" ,python-jsonschema)
10011 ("python-jupyter-core" ,python-jupyter-core)
10012 ("python-traitlets" ,python-traitlets)))
10013 (home-page "https://jupyter.org")
10014 (synopsis "Jupyter Notebook format")
10015 (description "This package provides the reference implementation of the
10016 Jupyter Notebook format and Python APIs for working with notebooks.")
10017 (license license:bsd-3)))
10018
10019 (define-public python2-nbformat
10020 (package-with-python2 python-nbformat))
10021
10022 (define-public python-bleach
10023 (package
10024 (name "python-bleach")
10025 (version "3.1.5")
10026 (source
10027 (origin
10028 (method url-fetch)
10029 (uri (pypi-uri "bleach" version))
10030 (sha256
10031 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
10032 (build-system python-build-system)
10033 (propagated-inputs
10034 `(("python-webencodings" ,python-webencodings)
10035 ("python-six" ,python-six)))
10036 (native-inputs
10037 `(("python-datrie" ,python-datrie)
10038 ("python-genshi" ,python-genshi)
10039 ("python-lxml" ,python-lxml)
10040 ("python-pytest" ,python-pytest)))
10041 (home-page "https://github.com/mozilla/bleach")
10042 (synopsis "Whitelist-based HTML-sanitizing tool")
10043 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
10044 (license license:asl2.0)))
10045
10046 (define-public python2-bleach
10047 (package-with-python2 python-bleach))
10048
10049 (define-public python-entrypoints
10050 (package
10051 (name "python-entrypoints")
10052 (version "0.3")
10053 (source
10054 (origin
10055 (method url-fetch)
10056 (uri (pypi-uri "entrypoints" version))
10057 (sha256
10058 (base32
10059 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
10060 (build-system python-build-system)
10061 ;; The package does not come with a setup.py file, so we have to generate
10062 ;; one ourselves.
10063 (arguments
10064 `(#:tests? #f
10065 #:phases
10066 (modify-phases %standard-phases
10067 (add-after 'unpack 'create-setup.py
10068 (lambda _
10069 (call-with-output-file "setup.py"
10070 (lambda (port)
10071 (format port "\
10072 from setuptools import setup
10073 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
10074 " ,version))))))))
10075 (home-page "https://github.com/takluyver/entrypoints")
10076 (synopsis "Discover and load entry points from installed Python packages")
10077 (description "Entry points are a way for Python packages to advertise
10078 objects with some common interface. The most common examples are
10079 @code{console_scripts} entry points, which define shell commands by
10080 identifying a Python function to run. The @code{entrypoints} module contains
10081 functions to find and load entry points.")
10082 (license license:expat)))
10083
10084 (define-public python2-entrypoints
10085 (package-with-python2 python-entrypoints))
10086
10087 (define-public python-epc
10088 (package
10089 (name "python-epc")
10090 (version "0.0.5")
10091 (source
10092 (origin
10093 (method url-fetch)
10094 (uri (pypi-uri "epc" version))
10095 (sha256
10096 (base32
10097 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
10098 (build-system python-build-system)
10099 (propagated-inputs
10100 `(("python-sexpdata" ,python-sexpdata)))
10101 (native-inputs
10102 `(("python-nose" ,python-nose)))
10103 (home-page "https://github.com/tkf/python-epc")
10104 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
10105 (description
10106 "Python-EPC can call elisp functions from Python and Python functions
10107 from elisp.")
10108 (license license:gpl3)))
10109
10110 (define-public python-forex-python
10111 (package
10112 (name "python-forex-python")
10113 (version "1.5")
10114 (source
10115 (origin
10116 (method url-fetch)
10117 (uri (pypi-uri "forex-python" version))
10118 (sha256
10119 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
10120 (build-system python-build-system)
10121 (arguments
10122 ;; Tests are not included in the PyPI tarball. Also, the tests in the
10123 ;; repository require online data.
10124 `(#:tests? #f))
10125 (propagated-inputs
10126 `(("python-requests" ,python-requests)
10127 ("python-simplejson" ,python-simplejson)))
10128 (home-page "https://github.com/MicroPyramid/forex-python")
10129 (synopsis "Foreign exchange rates and currency conversion")
10130 (description
10131 "@code{python-forex-python} can be used to manipulate foreign
10132 exchange rates and to operate currency conversions.
10133
10134 Features:
10135 @itemize
10136 @item List all currency rates.
10137 @item BitCoin price for all currencies.
10138 @item Converting amount to BitCoins.
10139 @item Get historical rates for any day since 1999.
10140 @item Conversion rate for one currency(ex; USD to INR).
10141 @item Convert amount from one currency to other.('USD 10$' to INR).
10142 @item Currency symbols.
10143 @item Currency names.
10144 @end itemize")
10145 (license license:expat)))
10146
10147 (define-public python-simpleeval
10148 (package
10149 (name "python-simpleeval")
10150 (version "0.9.10")
10151 (source
10152 (origin
10153 (method url-fetch)
10154 (uri (pypi-uri "simpleeval" version))
10155 (sha256
10156 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
10157 (build-system python-build-system)
10158 (home-page "https://github.com/danthedeckie/simpleeval")
10159 (synopsis "Simple, safe single expression evaluator library")
10160 (description
10161 "This package provides a quick single file library for easily adding
10162 evaluatable expressions into python projects. Say you want to allow a user
10163 to set an alarm volume, which could depend on the time of day, alarm level,
10164 how many previous alarms had gone off, and if there is music playing at the
10165 time.")
10166 (license license:expat)))
10167
10168 (define-public python-nbconvert
10169 (package
10170 (name "python-nbconvert")
10171 (version "5.0.0b1")
10172 (source
10173 (origin
10174 (method url-fetch)
10175 (uri (pypi-uri "nbconvert" version))
10176 (sha256
10177 (base32
10178 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
10179 (build-system python-build-system)
10180 (arguments
10181 `(;; The "bdist_egg" target is disabled by default, causing the installation
10182 ;; to fail.
10183 #:configure-flags (list "bdist_egg")
10184 ;; FIXME: 5 failures, 40 errors.
10185 #:tests? #f))
10186 ;; #:phases
10187 ;; (modify-phases %standard-phases
10188 ;; (replace 'check
10189 ;; (lambda _
10190 ;; (zero? (system* "py.test" "-v")))))
10191 (native-inputs
10192 `(("python-pytest" ,python-pytest)))
10193 (propagated-inputs
10194 `(("python-bleach" ,python-bleach)
10195 ("python-entrypoints" ,python-entrypoints)
10196 ("python-jinja2" ,python-jinja2)
10197 ("python-jupyter-core" ,python-jupyter-core)
10198 ("python-mistune" ,python-mistune)
10199 ("python-nbformat" ,python-nbformat)
10200 ("python-pygments" ,python-pygments)
10201 ("python-traitlets" ,python-traitlets)))
10202 (home-page "https://jupyter.org")
10203 (synopsis "Converting Jupyter Notebooks")
10204 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
10205 notebooks to various other formats via Jinja templates. It allows you to
10206 convert an @code{.ipynb} notebook file into various static formats including:
10207
10208 @enumerate
10209 @item HTML
10210 @item LaTeX
10211 @item PDF
10212 @item Reveal JS
10213 @item Markdown (md)
10214 @item ReStructured Text (rst)
10215 @item executable script
10216 @end enumerate\n")
10217 (license license:bsd-3)))
10218
10219 (define-public python2-nbconvert
10220 (package-with-python2 python-nbconvert))
10221
10222 (define-public python-notebook
10223 (package
10224 (name "python-notebook")
10225 (version "5.7.4")
10226 (source (origin
10227 (method url-fetch)
10228 (uri (pypi-uri "notebook" version))
10229 (sha256
10230 (base32
10231 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
10232 (build-system python-build-system)
10233 (arguments
10234 `(#:phases
10235 (modify-phases %standard-phases
10236 (replace 'check
10237 (lambda _
10238 ;; These tests require a browser
10239 (delete-file-recursively "notebook/tests/selenium")
10240 ;; Some tests need HOME
10241 (setenv "HOME" "/tmp")
10242 ;; This file contains "warningfilters", which are not supported
10243 ;; by this version of nose.
10244 (delete-file "setup.cfg")
10245 (with-directory-excursion "/tmp"
10246 (invoke "nosetests" "-v"))
10247 #t)))))
10248 (propagated-inputs
10249 `(("python-jupyter-core" ,python-jupyter-core)
10250 ("python-nbformat" ,python-nbformat)
10251 ("python-nbconvert" ,python-nbconvert)
10252 ("python-prometheus-client" ,python-prometheus-client)
10253 ("python-send2trash" ,python-send2trash)
10254 ("python-terminado" ,python-terminado)))
10255 (native-inputs
10256 `(("python-nose" ,python-nose)
10257 ("python-sphinx" ,python-sphinx)
10258 ("python-requests" ,python-requests)))
10259 (home-page "https://jupyter.org/")
10260 (synopsis "Web-based notebook environment for interactive computing")
10261 (description
10262 "The Jupyter HTML notebook is a web-based notebook environment for
10263 interactive computing.")
10264 (properties `((python2-variant . ,(delay python2-notebook))))
10265 (license license:bsd-3)))
10266
10267 (define-public python2-notebook
10268 (let ((base (package-with-python2
10269 (strip-python2-variant python-notebook))))
10270 (package (inherit base)
10271 (native-inputs
10272 `(("python2-mock" ,python2-mock)
10273 ,@(package-native-inputs base)))
10274 (arguments
10275 (substitute-keyword-arguments (package-arguments base)
10276 ((#:phases phases)
10277 `(modify-phases ,phases
10278 (add-before 'check 'disable-test-case
10279 ;; The test requires network access to localhost. Curiously it
10280 ;; fails with Python 2 only. Simply make the test-case return
10281 ;; immediately.
10282 (lambda _
10283 (substitute*
10284 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
10285 (("formats = self.nbconvert_api") "return #")))))))))))
10286
10287 (define-public python-widgetsnbextension
10288 (package
10289 (name "python-widgetsnbextension")
10290 (version "3.5.1")
10291 (source
10292 (origin
10293 (method url-fetch)
10294 (uri (pypi-uri "widgetsnbextension" version))
10295 (sha256
10296 (base32
10297 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10298 (build-system python-build-system)
10299 (propagated-inputs
10300 `(("python-ipykernel" ,python-ipykernel)
10301 ("python-notebook" ,python-notebook)))
10302 (native-inputs
10303 `(("python-certifi" ,python-certifi)
10304 ("python-nose" ,python-nose)))
10305 (home-page "https://ipython.org")
10306 (synopsis "IPython HTML widgets for Jupyter")
10307 (description "This package provides interactive HTML widgets for Jupyter
10308 notebooks.")
10309 (license license:bsd-3)))
10310
10311 (define-public python2-widgetsnbextension
10312 (package-with-python2 python-widgetsnbextension))
10313
10314 (define-public python-ipywidgets
10315 (package
10316 (name "python-ipywidgets")
10317 (version "7.5.1")
10318 (source
10319 (origin
10320 (method url-fetch)
10321 (uri (pypi-uri "ipywidgets" version))
10322 (sha256
10323 (base32
10324 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10325 (build-system python-build-system)
10326 (propagated-inputs
10327 `(("python-ipython" ,python-ipython)
10328 ("python-traitlets" ,python-traitlets)
10329 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10330 (native-inputs
10331 `(("python-nose" ,python-nose)
10332 ("python-pytest" ,python-pytest)))
10333 (home-page "https://ipython.org")
10334 (synopsis "IPython HTML widgets for Jupyter")
10335 (description "Ipywidgets are interactive HTML widgets for Jupyter
10336 notebooks and the IPython kernel. Notebooks come alive when interactive
10337 widgets are used. Users gain control of their data and can visualize changes
10338 in the data.")
10339 (license license:bsd-3)))
10340
10341 (define-public python2-ipywidgets
10342 (package-with-python2 python-ipywidgets))
10343
10344 (define-public python-jupyter-console
10345 (package
10346 (name "python-jupyter-console")
10347 (version "6.1.0")
10348 (source
10349 (origin
10350 (method url-fetch)
10351 (uri (pypi-uri "jupyter_console" version))
10352 (sha256
10353 (base32
10354 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10355 (build-system python-build-system)
10356 (propagated-inputs
10357 `(("python-ipykernel" ,python-ipykernel)
10358 ("python-jupyter-client" ,python-jupyter-client)
10359 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10360 ("python-pygments" ,python-pygments)))
10361 (native-inputs
10362 `(("python-nose" ,python-nose)))
10363 (home-page "https://jupyter.org")
10364 (synopsis "Jupyter terminal console")
10365 (description "This package provides a terminal-based console frontend for
10366 Jupyter kernels. It also allows for console-based interaction with non-Python
10367 Jupyter kernels such as IJulia and IRKernel.")
10368 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10369 (license license:bsd-3)))
10370
10371 (define-public python2-jupyter-console
10372 (package
10373 (name "python2-jupyter-console")
10374 (version "5.2.0")
10375 (source
10376 (origin
10377 (method url-fetch)
10378 (uri (pypi-uri "jupyter_console" version))
10379 (sha256
10380 (base32
10381 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10382 (build-system python-build-system)
10383 (arguments
10384 `(#:python ,python-2
10385 #:tests? #f)) ; Tests only run in a TTY.
10386 (propagated-inputs
10387 `(("python2-ipykernel" ,python2-ipykernel)
10388 ("python2-jupyter-client" ,python2-jupyter-client)
10389 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10390 ("python2-pygments" ,python2-pygments)))
10391 (native-inputs
10392 `(("python2-nose" ,python2-nose)))
10393 (home-page "https://jupyter.org")
10394 (synopsis "Jupyter terminal console")
10395 (description "This package provides a terminal-based console frontend for
10396 Jupyter kernels. It also allows for console-based interaction with non-Python
10397 Jupyter kernels such as IJulia and IRKernel.")
10398 (license license:bsd-3)))
10399
10400 ;; The python-ipython and python-jupyter-console require each other. To get
10401 ;; the functionality in both packages working, strip down the
10402 ;; python-jupyter-console package when using it as an input to python-ipython.
10403 (define python-jupyter-console-minimal
10404 (package
10405 (inherit python-jupyter-console)
10406 (name "python-jupyter-console-minimal")
10407 (arguments
10408 (substitute-keyword-arguments
10409 (package-arguments python-jupyter-console)
10410 ((#:phases phases)
10411 `(modify-phases ,phases
10412 (add-after 'install 'delete-bin
10413 (lambda* (#:key outputs #:allow-other-keys)
10414 ;; Delete the bin files, to avoid conflicts in profiles
10415 ;; where python-ipython and python-jupyter-console are
10416 ;; both present.
10417 (delete-file-recursively
10418 (string-append
10419 (assoc-ref outputs "out") "/bin"))))))))
10420 ;; Remove the python-ipython propagated input, to avoid the cycle
10421 (propagated-inputs
10422 (alist-delete
10423 "python-ipython"
10424 (package-propagated-inputs python-jupyter-console)))))
10425
10426 (define-public python-qtconsole
10427 (package
10428 (name "python-qtconsole")
10429 (version "4.4.3")
10430 (source
10431 (origin
10432 (method url-fetch)
10433 (uri (pypi-uri "qtconsole" version))
10434 (sha256
10435 (base32
10436 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10437 (build-system python-build-system)
10438 (arguments
10439 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10440 ;; but we only have the LTS version 5.x. This means that there might be
10441 ;; runtime errors, but since this is a dependency of the Jupyter package,
10442 ;; and Jupyter can be used without the qtconsole we can overlook this for
10443 ;; now.
10444 `(#:tests? #f
10445 #:phases
10446 (modify-phases %standard-phases
10447 (add-before 'check 'pre-check
10448 (lambda _
10449 (setenv "QT_QPA_PLATFORM" "offscreen")
10450 #t)))))
10451 (propagated-inputs
10452 `(("python-ipykernel" ,python-ipykernel)
10453 ("python-ipython" ,python-ipython)))
10454 (native-inputs
10455 `(("python-pytest" ,python-pytest)))
10456 (home-page "https://jupyter.org")
10457 (synopsis "Jupyter Qt console")
10458 (description "This package provides a Qt-based console for Jupyter with
10459 support for rich media output.")
10460 (license license:bsd-3)))
10461
10462 (define-public python-jsbeautifier
10463 (package
10464 (name "python-jsbeautifier")
10465 (version "1.10.2")
10466 (home-page "https://github.com/beautify-web/js-beautify")
10467 (source (origin
10468 (method git-fetch)
10469 (uri (git-reference
10470 (url home-page)
10471 (commit (string-append "v" version))))
10472 (file-name (git-file-name name version))
10473 (sha256
10474 (base32
10475 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10476 (build-system python-build-system)
10477 (arguments
10478 `(#:phases (modify-phases %standard-phases
10479 (add-after 'unpack 'chdir
10480 (lambda _
10481 ;; The upstream Git repository contains all the code,
10482 ;; but this package only builds the python code.
10483 (chdir "python")
10484 #t))
10485 (add-after 'unpack 'patch-python-six-requirements
10486 (lambda _
10487 (substitute* "python/setup.py"
10488 (("six>=1.12.0")
10489 "six>=1.11.0"))
10490 #t)))))
10491 (propagated-inputs
10492 `(("python-editorconfig" ,python-editorconfig)
10493 ("python-six" ,python-six)))
10494 (native-inputs
10495 `(("python-pytest" ,python-pytest)))
10496 (synopsis "JavaScript unobfuscator and beautifier")
10497 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10498 popular online obfuscators.")
10499 (license license:expat)))
10500
10501 (define-public jupyter
10502 (package
10503 (name "jupyter")
10504 (version "1.0.0")
10505 (source
10506 (origin
10507 (method url-fetch)
10508 (uri (pypi-uri "jupyter" version))
10509 (sha256
10510 (base32
10511 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10512 (build-system python-build-system)
10513 (arguments '(#:tests? #f)) ; there are none.
10514 (propagated-inputs
10515 `(("python-ipykernel" ,python-ipykernel)
10516 ("python-ipywidgets" ,python-ipywidgets)
10517 ("python-jupyter-console" ,python-jupyter-console)
10518 ("python-nbconvert" ,python-nbconvert)
10519 ("python-notebook" ,python-notebook)
10520 ("python-qtconsole" ,python-qtconsole)))
10521 (native-search-paths
10522 (list (search-path-specification
10523 (variable "JUPYTER_PATH")
10524 (files '("share/jupyter")))))
10525 (home-page "https://jupyter.org")
10526 (synopsis "Web application for interactive documents")
10527 (description
10528 "The Jupyter Notebook is a web application that allows you to create and
10529 share documents that contain live code, equations, visualizations and
10530 explanatory text. Uses include: data cleaning and transformation, numerical
10531 simulation, statistical modeling, machine learning and much more.")
10532 (license license:bsd-3)))
10533
10534 (define-public python-chardet
10535 (package
10536 (name "python-chardet")
10537 (version "3.0.4")
10538 (source
10539 (origin
10540 (method url-fetch)
10541 (uri (pypi-uri "chardet" version))
10542 (sha256
10543 (base32
10544 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10545 (native-inputs
10546 `(("python-hypothesis" ,python-hypothesis)
10547 ("python-pytest" ,python-pytest)
10548 ("python-pytest-runner" ,python-pytest-runner)))
10549 (build-system python-build-system)
10550 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10551 (arguments `(#:tests? #f))
10552 (home-page "https://github.com/chardet/chardet")
10553 (synopsis "Universal encoding detector for Python 2 and 3")
10554 (description
10555 "This package provides @code{chardet}, a Python module that can
10556 automatically detect a wide range of file encodings.")
10557 (license license:lgpl2.1+)))
10558
10559 (define-public python2-chardet
10560 (package-with-python2 python-chardet))
10561
10562 (define-public python-docopt
10563 (package
10564 (name "python-docopt")
10565 (version "0.6.2")
10566 (source
10567 (origin
10568 (method git-fetch)
10569 ;; The release on PyPI does not include tests.
10570 (uri (git-reference
10571 (url "https://github.com/docopt/docopt")
10572 (commit version)))
10573 (file-name (git-file-name name version))
10574 (sha256
10575 (base32
10576 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10577 (build-system python-build-system)
10578 (native-inputs
10579 `(("python-pytest" ,python-pytest)))
10580 (arguments
10581 `(#:phases
10582 (modify-phases %standard-phases
10583 (replace 'check
10584 (lambda _ (invoke "py.test"))))))
10585 (home-page "http://docopt.org")
10586 (synopsis "Command-line interface description language for Python")
10587 (description "This library allows the user to define a command-line
10588 interface from a program's help message rather than specifying it
10589 programmatically with command-line parsers like @code{getopt} and
10590 @code{argparse}.")
10591 (license license:expat)))
10592
10593 (define-public python2-docopt
10594 (package-with-python2 python-docopt))
10595
10596 (define-public python-pythondialog
10597 (package
10598 (name "python-pythondialog")
10599 (version "3.4.0")
10600 (source
10601 (origin
10602 (method url-fetch)
10603 (uri (pypi-uri "pythondialog" version))
10604 (sha256
10605 (base32
10606 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10607 (build-system python-build-system)
10608 (arguments
10609 `(#:phases
10610 (modify-phases %standard-phases
10611 (add-after 'unpack 'patch-path
10612 (lambda* (#:key inputs #:allow-other-keys)
10613 (let* ((dialog (assoc-ref inputs "dialog")))
10614 ;; Since this library really wants to grovel the search path, we
10615 ;; must hardcode dialog's store path into it.
10616 (substitute* "dialog.py"
10617 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10618 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10619 #t))))
10620 #:tests? #f)) ; no test suite
10621 (propagated-inputs
10622 `(("dialog" ,dialog)))
10623 (home-page "http://pythondialog.sourceforge.net/")
10624 (synopsis "Python interface to the UNIX dialog utility")
10625 (description "A Python wrapper for the dialog utility. Its purpose is to
10626 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10627 This allows one to make simple text-mode user interfaces on Unix-like systems")
10628 (license license:lgpl2.1)
10629 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10630
10631 (define-public python2-pythondialog
10632 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10633 (package
10634 (inherit base)
10635 (version (package-version python-pythondialog))
10636 (source (origin
10637 (method url-fetch)
10638 (uri (pypi-uri "python2-pythondialog" version))
10639 (sha256
10640 (base32
10641 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10642
10643 (define-public python-configobj
10644 (package
10645 (name "python-configobj")
10646 (version "5.0.6")
10647 (source (origin
10648 (method url-fetch)
10649 (uri (pypi-uri "configobj" version))
10650 (sha256
10651 (base32
10652 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10653 ;; Patch setup.py so it looks for python-setuptools, which is
10654 ;; required to parse the keyword 'install_requires' in setup.py.
10655 (patches (search-patches "python-configobj-setuptools.patch"))))
10656 (build-system python-build-system)
10657 (propagated-inputs
10658 `(("python-six" ,python-six)))
10659 (synopsis "Config file reading, writing and validation")
10660 (description "ConfigObj is a simple but powerful config file reader and
10661 writer: an ini file round tripper. Its main feature is that it is very easy to
10662 use, with a straightforward programmer’s interface and a simple syntax for
10663 config files.")
10664 (home-page "https://github.com/DiffSK/configobj")
10665 (license license:bsd-3)))
10666
10667 (define-public python2-configobj
10668 (package-with-python2 python-configobj))
10669
10670 (define-public python-configargparse
10671 (package
10672 (name "python-configargparse")
10673 (version "1.2.3")
10674 (source (origin
10675 (method url-fetch)
10676 (uri (pypi-uri "ConfigArgParse" version))
10677 (sha256
10678 (base32
10679 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
10680 (build-system python-build-system)
10681 (native-inputs
10682 `(("python-pyyaml" ,python-pyyaml)))
10683 (arguments
10684 `(#:phases
10685 (modify-phases %standard-phases
10686 (replace 'check
10687 (lambda _
10688 ;; Bypass setuptools-shim because one test relies on "setup.py"
10689 ;; being the first argument passed to the python call.
10690 ;;
10691 ;; NOTE: Many tests do not run because they rely on Python's
10692 ;; built-in test.test_argparse, but we remove the unit tests from
10693 ;; our Python installation.
10694 (invoke "python" "setup.py" "test"))))))
10695 (synopsis "Replacement for argparse")
10696 (description "A drop-in replacement for argparse that allows options to also
10697 be set via config files and/or environment variables.")
10698 (home-page "https://github.com/bw2/ConfigArgParse")
10699 (license license:expat)))
10700
10701 (define-public python-argparse-manpage
10702 (package
10703 (name "python-argparse-manpage")
10704 (version "1.1")
10705 (source
10706 (origin
10707 (method url-fetch)
10708 (uri (pypi-uri "argparse-manpage" version))
10709 (sha256
10710 (base32
10711 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10712 (build-system python-build-system)
10713 (home-page "https://github.com/praiskup/argparse-manpage")
10714 (synopsis "Build manual page from Python's ArgumentParser object")
10715 (description
10716 "This package provides tools to build manual pages from Python's
10717 @code{ArgumentParser} object.")
10718 (license license:asl2.0)))
10719
10720 (define-public python-contextlib2
10721 (package
10722 (name "python-contextlib2")
10723 (version "0.6.0.post1")
10724 (source
10725 (origin
10726 (method url-fetch)
10727 (uri (pypi-uri "contextlib2" version))
10728 (sha256
10729 (base32
10730 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10731 (build-system python-build-system)
10732 (home-page "https://contextlib2.readthedocs.org/")
10733 (synopsis "Tools for decorators and context managers")
10734 (description "This module is primarily a backport of the Python
10735 3.2 contextlib to earlier Python versions. Like contextlib, it
10736 provides utilities for common tasks involving decorators and context
10737 managers. It also contains additional features that are not part of
10738 the standard library.")
10739 (properties `((python2-variant . ,(delay python2-contextlib2))))
10740 (license license:psfl)))
10741
10742 (define-public python2-contextlib2
10743 (let ((base (package-with-python2
10744 (strip-python2-variant python-contextlib2))))
10745 (package
10746 (inherit base)
10747 (arguments
10748 (substitute-keyword-arguments (package-arguments base)
10749 ((#:phases phases)
10750 `(modify-phases ,phases
10751 (replace 'check
10752 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10753 (native-inputs
10754 `(("python2-unittest2" ,python2-unittest2))))))
10755
10756 ;; This package is used by python2-pytest via python2-importlib-metadata,
10757 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10758 (define-public python2-contextlib2-bootstrap
10759 (hidden-package
10760 (package/inherit
10761 python2-contextlib2
10762 (name "python2-contextlib2-bootstrap")
10763 (arguments
10764 `(#:tests? #f
10765 ,@(package-arguments python2-contextlib2)))
10766 (native-inputs '()))))
10767
10768 (define-public python-texttable
10769 (package
10770 (name "python-texttable")
10771 (version "1.6.2")
10772 (source
10773 (origin
10774 (method url-fetch)
10775 (uri (pypi-uri "texttable" version))
10776 (sha256
10777 (base32
10778 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10779 (build-system python-build-system)
10780 (arguments
10781 `(#:phases
10782 (modify-phases %standard-phases
10783 (replace 'check
10784 (lambda _ (invoke "pytest" "tests.py"))))))
10785 (native-inputs
10786 `(("python-pytest" ,python-pytest)))
10787 (home-page "https://github.com/foutaise/texttable/")
10788 (synopsis "Python module for creating simple ASCII tables")
10789 (description "Texttable is a Python module for creating simple ASCII
10790 tables.")
10791 (license license:expat)))
10792
10793 (define-public python2-texttable
10794 (package-with-python2 python-texttable))
10795
10796 (define-public python-atomicwrites
10797 (package
10798 (name "python-atomicwrites")
10799 (version "1.3.0")
10800 (source (origin
10801 (method url-fetch)
10802 (uri (pypi-uri "atomicwrites" version))
10803 (sha256
10804 (base32
10805 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10806 (build-system python-build-system)
10807 (synopsis "Atomic file writes in Python")
10808 (description "Library for atomic file writes using platform dependent tools
10809 for atomic file system operations.")
10810 (home-page "https://github.com/untitaker/python-atomicwrites")
10811 (license license:expat)))
10812
10813 (define-public python2-atomicwrites
10814 (package-with-python2 python-atomicwrites))
10815
10816 (define-public python-click-threading
10817 (package
10818 (name "python-click-threading")
10819 (version "0.4.4")
10820 (source (origin
10821 (method url-fetch)
10822 (uri (pypi-uri "click-threading" version))
10823 (sha256
10824 (base32
10825 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10826 (build-system python-build-system)
10827 (propagated-inputs
10828 `(("python-click" ,python-click)))
10829 (synopsis "Utilities for multithreading in Click")
10830 (description "This package provides utilities for multithreading in Click
10831 applications.")
10832 (home-page "https://github.com/click-contrib/click-threading")
10833 (license license:expat)))
10834
10835 (define-public python-click-log
10836 (package
10837 (name "python-click-log")
10838 (version "0.3.2")
10839 (source (origin
10840 (method url-fetch)
10841 (uri (pypi-uri "click-log" version))
10842 (sha256
10843 (base32
10844 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10845 (build-system python-build-system)
10846 (propagated-inputs
10847 `(("python-click" ,python-click)))
10848 (synopsis "Logging for click applications")
10849 (description "This package provides a Python library for logging Click
10850 applications.")
10851 (home-page "https://github.com/click-contrib/click-log")
10852 (license license:expat)))
10853
10854 (define-public python-structlog
10855 (package
10856 (name "python-structlog")
10857 (version "20.2.0")
10858 (source
10859 (origin
10860 (method url-fetch)
10861 (uri (pypi-uri "structlog" version))
10862 (sha256
10863 (base32
10864 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
10865 (build-system python-build-system)
10866 (arguments
10867 `(#:phases
10868 (modify-phases %standard-phases
10869 (replace 'check
10870 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10871 (when tests?
10872 (add-installed-pythonpath inputs outputs)
10873 (invoke "pytest"))
10874 #t)))))
10875 (native-inputs
10876 `(("python-coverage" ,python-coverage)
10877 ("python-freezegun" ,python-freezegun)
10878 ("python-pretend" ,python-pretend)
10879 ("python-pytest" ,python-pytest)
10880 ("python-pytest-asyncio" ,python-pytest-asyncio)
10881 ("python-simplejson" ,python-simplejson)
10882 ("python-twisted" ,python-twisted)))
10883 (home-page "https://www.structlog.org/")
10884 (synopsis "Structured Logging for Python")
10885 (description "@code{structlog} changes logging in Python by adding structure
10886 to your log entries.")
10887 (license (list license:asl2.0 license:expat))))
10888
10889 (define-public python-apipkg
10890 (package
10891 (name "python-apipkg")
10892 (version "1.5")
10893 (source (origin
10894 (method url-fetch)
10895 (uri (pypi-uri "apipkg" version))
10896 (sha256
10897 (base32
10898 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10899 (build-system python-build-system)
10900 (native-inputs
10901 `(("python-pytest" ,python-pytest)
10902 ("python-setuptools-scm" ,python-setuptools-scm)))
10903 (synopsis "Namespace control and lazy-import mechanism")
10904 (description "With apipkg you can control the exported namespace of a Python
10905 package and greatly reduce the number of imports for your users. It is a small
10906 pure Python module that works on virtually all Python versions.")
10907 (home-page "https://github.com/pytest-dev/apipkg")
10908 (license license:expat)))
10909
10910 (define-public python-execnet
10911 (package
10912 (name "python-execnet")
10913 (version "1.4.1")
10914 (source (origin
10915 (method url-fetch)
10916 (uri (pypi-uri "execnet" version))
10917 (sha256
10918 (base32
10919 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10920 (build-system python-build-system)
10921 (arguments
10922 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
10923 ;; The two test failures are caused by the lack of an `ssh` executable.
10924 ;; The test suite can be run with pytest after the 'install' phase.
10925 #:tests? #f))
10926 (native-inputs
10927 `(("python-pytest" ,python-pytest)
10928 ("python-setuptools-scm" ,python-setuptools-scm)))
10929 (propagated-inputs
10930 `(("python-apipkg" ,python-apipkg)))
10931 (synopsis "Rapid multi-Python deployment")
10932 (description "Execnet provides a share-nothing model with
10933 channel-send/receive communication for distributing execution across many
10934 Python interpreters across version, platform and network barriers. It has a
10935 minimal and fast API targeting the following uses:
10936 @enumerate
10937 @item distribute tasks to (many) local or remote CPUs
10938 @item write and deploy hybrid multi-process applications
10939 @item write scripts to administer multiple environments
10940 @end enumerate")
10941 (home-page "https://codespeak.net/execnet/")
10942 (license license:expat)))
10943
10944 (define-public python2-execnet
10945 (package-with-python2 python-execnet))
10946
10947 (define-public python-icalendar
10948 (package
10949 (name "python-icalendar")
10950 (version "4.0.5")
10951 (source (origin
10952 (method url-fetch)
10953 (uri (pypi-uri "icalendar" version))
10954 (sha256
10955 (base32
10956 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10957 (build-system python-build-system)
10958 (propagated-inputs
10959 `(("python-dateutil" ,python-dateutil)
10960 ("python-pytz" ,python-pytz)))
10961 (synopsis "Python library for parsing iCalendar files")
10962 (description "The icalendar package is a parser/generator of iCalendar
10963 files for use with Python.")
10964 (home-page "https://github.com/collective/icalendar")
10965 (license license:bsd-2)))
10966
10967 (define-public python-args
10968 (package
10969 (name "python-args")
10970 (version "0.1.0")
10971 (source (origin
10972 (method url-fetch)
10973 (uri (pypi-uri "args" version))
10974 (sha256
10975 (base32
10976 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10977 (build-system python-build-system)
10978 (home-page "https://github.com/kennethreitz/args")
10979 (synopsis "Command-line argument parser")
10980 (description
10981 "This library provides a Python module to parse command-line arguments.")
10982 (license license:bsd-3)))
10983
10984 (define-public python2-args
10985 (package-with-python2 python-args))
10986
10987 (define-public python-clint
10988 (package
10989 (name "python-clint")
10990 (version "0.5.1")
10991 (source (origin
10992 (method url-fetch)
10993 (uri (pypi-uri "clint" version))
10994 (sha256
10995 (base32
10996 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
10997 (build-system python-build-system)
10998 (arguments
10999 '(#:phases
11000 (modify-phases %standard-phases
11001 (replace 'check
11002 (lambda _ (invoke "py.test" "-v"))))))
11003 (native-inputs
11004 `(("python-pytest" ,python-pytest)))
11005 (propagated-inputs
11006 `(("python-args" ,python-args)))
11007 (home-page "https://github.com/kennethreitz/clint")
11008 (synopsis "Command-line interface tools")
11009 (description
11010 "Clint is a Python module filled with a set of tools for developing
11011 command-line applications, including tools for colored and indented
11012 output, progress bar display, and pipes.")
11013 (license license:isc)))
11014
11015 (define-public python2-clint
11016 (package-with-python2 python-clint))
11017
11018 (define-public python-rply
11019 (package
11020 (name "python-rply")
11021 (version "0.7.5")
11022 (source (origin
11023 (method url-fetch)
11024 (uri (pypi-uri "rply" version))
11025 (sha256
11026 (base32
11027 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
11028 (build-system python-build-system)
11029 (propagated-inputs
11030 `(("python-appdirs" ,python-appdirs)))
11031 (home-page "https://github.com/alex/rply")
11032 (synopsis "Parser generator for Python")
11033 (description
11034 "This package provides a pure Python based parser generator, that also
11035 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
11036 with a new public API, and RPython support.")
11037 (license license:bsd-3)))
11038
11039 (define-public python2-rply
11040 (package-with-python2 python-rply))
11041
11042 (define-public python-hy
11043 (package
11044 (name "python-hy")
11045 (version "0.18.0")
11046 (source (origin
11047 (method url-fetch)
11048 (uri (pypi-uri "hy" version))
11049 (sha256
11050 (base32
11051 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
11052 (build-system python-build-system)
11053 (arguments
11054 '(#:phases
11055 (modify-phases %standard-phases
11056 (add-before 'install 'set-HOME
11057 (lambda _
11058 (setenv "HOME" "/tmp") #t))
11059 (replace 'check
11060 (lambda _
11061 ;; Tests require write access to HOME.
11062 (setenv "HOME" "/tmp")
11063 (invoke "nosetests"))))))
11064 (native-inputs
11065 `(("python-coverage" ,python-coverage)
11066 ("python-nose" ,python-nose)))
11067 (propagated-inputs
11068 `(("python-astor" ,python-astor)
11069 ("python-colorama" ,python-colorama)
11070 ("python-rply" ,python-rply)
11071 ("python-funcparserlib"
11072 ,python-funcparserlib)))
11073 (home-page "http://hylang.org/")
11074 (synopsis "Lisp frontend to Python")
11075 (description
11076 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
11077 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
11078 Python at your fingertips, in Lisp form.")
11079 (license license:expat)))
11080
11081 (define-public python2-functools32
11082 (package
11083 (name "python2-functools32")
11084 (version "3.2.3-2")
11085 (source
11086 (origin
11087 (method url-fetch)
11088 (uri (pypi-uri "functools32" version))
11089 (sha256
11090 (base32
11091 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
11092 (build-system python-build-system)
11093 (arguments
11094 `(#:python ,python-2
11095 #:tests? #f)) ; no test target
11096 (home-page "https://github.com/MiCHiLU/python-functools32")
11097 (synopsis
11098 "Backport of the functools module from Python 3.2.3")
11099 (description
11100 "This package is a backport of the @code{functools} module from Python
11101 3.2.3 for use with older versions of Python and PyPy.")
11102 (license license:expat)))
11103
11104 (define-public python2-subprocess32
11105 (package
11106 (name "python2-subprocess32")
11107 (version "3.2.7")
11108 (source (origin
11109 (method url-fetch)
11110 (uri (pypi-uri "subprocess32" version))
11111 (sha256
11112 (base32
11113 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
11114 (patches
11115 (search-patches "python2-subprocess32-disable-input-test.patch"))))
11116 (build-system python-build-system)
11117 (arguments
11118 `(#:python ,python-2
11119 ;; The test suite fails with Python > 2.7.13:
11120 ;; import test.support
11121 ;; ImportError: No module named support
11122 #:tests? #f
11123 #:phases
11124 (modify-phases %standard-phases
11125 (add-after 'unpack 'patch-/bin/sh
11126 (lambda _
11127 (substitute* '("subprocess32.py"
11128 "test_subprocess32.py")
11129 (("/bin/sh") (which "sh")))
11130 #t)))))
11131 (home-page "https://github.com/google/python-subprocess32")
11132 (synopsis "Backport of the subprocess module from Python 3.2")
11133 (description
11134 "This is a backport of the @code{subprocess} standard library module
11135 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
11136 new features. On POSIX systems it is guaranteed to be reliable when used
11137 in threaded applications. It includes timeout support from Python 3.3 but
11138 otherwise matches 3.2’s API.")
11139 (license license:psfl)))
11140
11141 (define-public python2-futures
11142 (package
11143 (name "python2-futures")
11144 (version "3.2.0")
11145 (source
11146 (origin
11147 (method url-fetch)
11148 (uri (pypi-uri "futures" version))
11149 (sha256
11150 (base32
11151 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
11152 (build-system python-build-system)
11153 (arguments
11154 `(#:python ,python-2
11155 #:phases
11156 (modify-phases %standard-phases
11157 (replace 'check
11158 (lambda _
11159 (invoke "python" "test_futures.py")
11160 #t)))))
11161 (home-page "https://github.com/agronholm/pythonfutures")
11162 (synopsis
11163 "Backport of the concurrent.futures package from Python 3.2")
11164 (description
11165 "The concurrent.futures module provides a high-level interface for
11166 asynchronously executing callables. This package backports the
11167 concurrent.futures package from Python 3.2")
11168 (license license:bsd-3)))
11169
11170 (define-public python-promise
11171 (package
11172 (name "python-promise")
11173 (version "0.4.2")
11174 (source
11175 (origin
11176 (method url-fetch)
11177 (uri (pypi-uri "promise" version))
11178 (sha256
11179 (base32
11180 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
11181 (build-system python-build-system)
11182 ;; Tests wants python-futures, which is a python2 only program, and
11183 ;; can't be found by python-promise at test time.
11184 (arguments `(#:tests? #f))
11185 (home-page "https://github.com/syrusakbary/promise")
11186 (synopsis "Promises/A+ implementation for Python")
11187 (description
11188 "Promises/A+ implementation for Python")
11189 (properties `((python2-variant . ,(delay python2-promise))))
11190 (license license:expat)))
11191
11192 (define-public python2-promise
11193 (let ((promise (package-with-python2
11194 (strip-python2-variant python-promise))))
11195 (package (inherit promise)
11196 (arguments (substitute-keyword-arguments (package-arguments promise)
11197 ((#:tests? _) #t)))
11198 (native-inputs
11199 `(("python2-futures" ,python2-futures)
11200 ("python2-pytest" ,python2-pytest)
11201 ,@(package-native-inputs promise))))))
11202
11203 (define-public python-progressbar2
11204 (package
11205 (name "python-progressbar2")
11206 (version "3.51.3")
11207 (source
11208 (origin
11209 (method url-fetch)
11210 (uri (pypi-uri "progressbar2" version))
11211 (sha256
11212 (base32
11213 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
11214 (build-system python-build-system)
11215 (propagated-inputs
11216 `(("python-six" ,python-six)
11217 ("python-utils" ,python-utils)))
11218 (native-inputs
11219 `(("python-flake8" ,python-flake8)
11220 ("python-freezegun" ,python-freezegun)
11221 ("python-pycodestyle" ,python-pycodestyle)
11222 ("python-pytest" ,python-pytest)
11223 ("python-pytest-cache" ,python-pytest-cache)
11224 ("python-pytest-cov" ,python-pytest-cov)
11225 ("python-pytest-flakes" ,python-pytest-flakes)
11226 ("python-pytest-pep8" ,python-pytest-pep8)
11227 ("python-sphinx" ,python-sphinx)))
11228 (home-page "https://github.com/WoLpH/python-progressbar")
11229 (synopsis "Text progress bar library for Python")
11230 (description
11231 "This package provides a Python progressbar library to provide
11232 visual (yet text based) progress to long running operations.")
11233 (license license:bsd-3)))
11234
11235 (define-public python-progressbar33
11236 (package
11237 (name "python-progressbar33")
11238 (version "2.4")
11239 (source
11240 (origin
11241 (method url-fetch)
11242 (uri (pypi-uri "progressbar33" version))
11243 (sha256
11244 (base32
11245 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
11246 (build-system python-build-system)
11247 (home-page "https://github.com/germangh/python-progressbar")
11248 (synopsis "Text progress bar library for Python")
11249 (description
11250 "This package provides a text progress bar library for Python. This
11251 version only differs from the original @code{progressbar} package in that it
11252 uses relative package imports instead of absolute imports, which is necessary
11253 for the module to work under Python 3.3.")
11254 ;; Either or both of these licenses may be selected.
11255 (license (list license:lgpl2.1+ license:bsd-3))))
11256
11257 (define-public python-colorama
11258 (package
11259 (name "python-colorama")
11260 (version "0.4.4")
11261 (source
11262 (origin
11263 (method url-fetch)
11264 (uri (pypi-uri "colorama" version))
11265 (sha256
11266 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
11267 (build-system python-build-system)
11268 (synopsis "Colored terminal text rendering for Python")
11269 (description "Colorama is a Python library for rendering colored terminal
11270 text.")
11271 (home-page "https://pypi.org/project/colorama/")
11272 (license license:bsd-3)))
11273
11274 (define-public python2-colorama
11275 (package-with-python2 python-colorama))
11276
11277 (define-public python-moto
11278 (package
11279 (name "python-moto")
11280 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
11281 (version "1.3.16.dev134")
11282 (source (origin
11283 (method url-fetch)
11284 (uri (pypi-uri "moto" version))
11285 (sha256
11286 (base32
11287 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
11288 (build-system python-build-system)
11289 (arguments
11290 `(#:phases (modify-phases %standard-phases
11291 (add-after 'unpack 'patch-hardcoded-executable-names
11292 (lambda _
11293 (substitute* "moto/batch/models.py"
11294 (("/bin/sh")
11295 (which "sh")))
11296 (substitute* (find-files "tests" "\\.py$")
11297 (("#!/bin/bash")
11298 (string-append "#!" (which "bash"))))
11299 #t))
11300 (replace 'check
11301 (lambda _
11302 (setenv "PYTHONPATH" (string-append "./build/lib:"
11303 (getenv "PYTHONPATH")))
11304 (invoke "pytest" "-vv" "-m" "not network"
11305 ;; These tests require Docker.
11306 "-k" "not test_terminate_job \
11307 and not test_invoke_function_from_sqs_exception"))))))
11308 (native-inputs
11309 `(("python-flask" ,python-flask)
11310 ("python-flask-cors" ,python-flask-cors)
11311 ("python-freezegun" ,python-freezegun)
11312 ("python-parameterized" ,python-parameterized)
11313 ("python-pytest" ,python-pytest)
11314 ("python-sure" ,python-sure)))
11315 (propagated-inputs
11316 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
11317 ("python-boto" ,python-boto)
11318 ("python-boto3" ,python-boto3)
11319 ("python-botocore" ,python-botocore)
11320 ("python-cfn-lint" ,python-cfn-lint)
11321 ("python-cryptography" ,python-cryptography)
11322 ("python-dateutil" ,python-dateutil)
11323 ("python-docker" ,python-docker)
11324 ("python-idna" ,python-idna)
11325 ("python-jinja2" ,python-jinja2)
11326 ("python-jose" ,python-jose)
11327 ("python-jsondiff" ,python-jsondiff)
11328 ("python-mock" ,python-mock)
11329 ("python-pytz" ,python-pytz)
11330 ("python-pyyaml" ,python-pyyaml)
11331 ("python-requests" ,python-requests)
11332 ("python-responses" ,python-responses)
11333 ("python-six" ,python-six)
11334 ("python-sshpubkeys" ,python-sshpubkeys)
11335 ("python-werkzeug" ,python-werkzeug)
11336 ("python-xmltodict" ,python-xmltodict)))
11337 (home-page "https://github.com/spulec/moto")
11338 (synopsis "Mock out the boto library")
11339 (description
11340 "@code{moto} is a library designed to easily mock out the
11341 @code{boto} library.")
11342 (license license:asl2.0)))
11343
11344 (define-public python-rsa
11345 (package
11346 (name "python-rsa")
11347 (version "3.4.2")
11348 (source
11349 (origin
11350 (method url-fetch)
11351 (uri (pypi-uri "rsa" version))
11352 (sha256
11353 (base32
11354 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11355 (build-system python-build-system)
11356 (propagated-inputs
11357 `(("python-pyasn1" ,python-pyasn1)))
11358 (synopsis "Pure-Python RSA implementation")
11359 (description "Python-RSA is a pure-Python RSA implementation. It supports
11360 encryption and decryption, signing and verifying signatures, and key
11361 generation according to PKCS#1 version 1.5. It can be used as a Python
11362 library as well as on the command line.")
11363 (home-page "https://stuvel.eu/rsa")
11364 (license license:asl2.0)))
11365
11366 (define-public python2-rsa
11367 (package-with-python2 python-rsa))
11368
11369 (define-public python-pluggy
11370 (package
11371 (name "python-pluggy")
11372 (version "0.13.1")
11373 (source
11374 (origin
11375 (method url-fetch)
11376 (uri (pypi-uri "pluggy" version))
11377 (sha256
11378 (base32
11379 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11380 (build-system python-build-system)
11381 (native-inputs
11382 `(("python-setuptools-scm" ,python-setuptools-scm)))
11383 (synopsis "Plugin and hook calling mechanism for Python")
11384 (description "Pluggy is an extraction of the plugin manager as used by
11385 Pytest but stripped of Pytest specific details.")
11386 (home-page "https://pypi.org/project/pluggy/")
11387 (properties `((python2-variant . ,(delay python2-pluggy))))
11388 (license license:expat)))
11389
11390 (define-public python2-pluggy
11391 (let ((base (package-with-python2 (strip-python2-variant
11392 python-pluggy))))
11393 (package/inherit
11394 base
11395 (propagated-inputs
11396 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11397
11398 ;; This package requires python2-importlib-metadata, but that package
11399 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11400 ;; variant to solve the circular dependency.
11401 (define-public python2-pluggy-bootstrap
11402 (hidden-package
11403 (package/inherit
11404 python2-pluggy
11405 (name "python2-pluggy-bootstrap")
11406 (arguments
11407 `(#:tests? #f
11408 ,@(package-arguments python2-pluggy)))
11409 (propagated-inputs
11410 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11411
11412 (define-public python-tox
11413 (package
11414 (name "python-tox")
11415 (version "3.20.0")
11416 (source
11417 (origin
11418 (method url-fetch)
11419 (uri (pypi-uri "tox" version))
11420 (sha256
11421 (base32
11422 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11423 (build-system python-build-system)
11424 (arguments
11425 ;; FIXME: Tests require pytest-timeout, which itself requires
11426 ;; pytest>=2.8.0 for installation.
11427 '(#:tests? #f))
11428 (propagated-inputs
11429 `(("python-filelock" ,python-filelock)
11430 ("python-packaging" ,python-packaging)
11431 ("python-pluggy" ,python-pluggy)
11432 ("python-py" ,python-py)
11433 ("python-six" ,python-six)
11434 ("python-toml" ,python-toml)
11435 ("python-virtualenv" ,python-virtualenv)))
11436 (native-inputs
11437 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11438 ("python-pytest" ,python-pytest) ; >= 2.3.5
11439 ("python-setuptools-scm" ,python-setuptools-scm)))
11440 (home-page "https://tox.readthedocs.io")
11441 (synopsis "Virtualenv-based automation of test activities")
11442 (description "Tox is a generic virtualenv management and test command line
11443 tool. It can be used to check that a package installs correctly with
11444 different Python versions and interpreters, or run tests in each type of
11445 supported environment, or act as a frontend to continuous integration
11446 servers.")
11447 (license license:expat)))
11448
11449 (define-public python-jmespath
11450 (package
11451 (name "python-jmespath")
11452 (version "0.9.4")
11453 (source
11454 (origin
11455 (method url-fetch)
11456 (uri (pypi-uri "jmespath" version))
11457 (sha256
11458 (base32
11459 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11460 (build-system python-build-system)
11461 (native-inputs
11462 `(("python-nose" ,python-nose)))
11463 (synopsis "JSON Matching Expressions")
11464 (description "JMESPath (pronounced “james path”) is a Python library that
11465 allows one to declaratively specify how to extract elements from a JSON
11466 document.")
11467 (home-page "https://github.com/jmespath/jmespath.py")
11468 (license license:expat)))
11469
11470 (define-public python2-jmespath
11471 (package-with-python2 python-jmespath))
11472
11473 (define-public python-symengine
11474 (package
11475 (name "python-symengine")
11476 (version "0.6.1")
11477 (source
11478 (origin
11479 (method url-fetch)
11480 (uri (pypi-uri "symengine" version))
11481 (sha256
11482 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11483 (build-system python-build-system)
11484 (native-inputs
11485 `(("cmake" ,cmake)
11486 ("python-cython" ,python-cython)))
11487 (inputs
11488 `(("symengine" ,symengine)))
11489 (home-page "https://github.com/symengine/symengine.py")
11490 (synopsis "Python library providing wrappers to SymEngine")
11491 (description
11492 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11493 manipulation library.")
11494 (license license:expat)))
11495
11496 (define-public python-boto
11497 (package
11498 (name "python-boto")
11499 (version "2.49.0")
11500 (source (origin
11501 (method url-fetch)
11502 (uri (pypi-uri "boto" version))
11503 (sha256
11504 (base32
11505 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
11506 (build-system python-build-system)
11507 (arguments
11508 ;; XXX: This package is unmaintained and has problems with newer versions
11509 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
11510 ;; subset of this library, so keep it around for now, but disable tests.
11511 '(#:tests? #f))
11512 (propagated-inputs
11513 `(("python-paramiko" ,python-paramiko)
11514 ("python-requests" ,python-requests)))
11515 (home-page "https://github.com/boto/boto")
11516 (synopsis "Python interfaces for Amazon Web Services")
11517 (description
11518 "This package provides various facilities for interacting with Amazon
11519 Web Services through Python.
11520
11521 This software is unmaintained, and new projects should use @code{boto3} instead.")
11522 (license license:expat)))
11523
11524 (define-public python-botocore
11525 ;; Note: When updating botocore, also make sure that boto3 and awscli
11526 ;; are compatible.
11527 (package
11528 (name "python-botocore")
11529 (version "1.19.22")
11530 (source
11531 (origin
11532 (method url-fetch)
11533 (uri (pypi-uri "botocore" version))
11534 (sha256
11535 (base32
11536 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
11537 (build-system python-build-system)
11538 (arguments
11539 ;; FIXME: Many tests are failing.
11540 '(#:tests? #f))
11541 (propagated-inputs
11542 `(("python-dateutil" ,python-dateutil)
11543 ("python-jmespath" ,python-jmespath)
11544 ("python-urllib3" ,python-urllib3)))
11545 (home-page "https://github.com/boto/botocore")
11546 (synopsis "Low-level interface to AWS")
11547 (description "Botocore is a Python library that provides a low-level
11548 interface to the Amazon Web Services (AWS) API.")
11549 (license license:asl2.0)))
11550
11551 (define-public python2-botocore
11552 (package-with-python2 python-botocore))
11553
11554 (define-public python-boto3
11555 (package
11556 (name "python-boto3")
11557 (version "1.16.22")
11558 (home-page "https://github.com/boto/boto3")
11559 (source (origin
11560 (method git-fetch)
11561 (uri (git-reference (url home-page) (commit version)))
11562 (file-name (git-file-name name version))
11563 (sha256
11564 (base32
11565 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
11566 (arguments
11567 `(#:phases
11568 (modify-phases %standard-phases
11569 (add-after 'unpack 'delete-network-tests
11570 ;; Deleting integration tests because they are trying to connect to AWS.
11571 (lambda _
11572 (delete-file-recursively "tests/integration")
11573 #t)))))
11574 (build-system python-build-system)
11575 (native-inputs
11576 `(("python-nose" ,python-nose)
11577 ("python-mock" ,python-mock)))
11578 (propagated-inputs
11579 `(("python-botocore" ,python-botocore)
11580 ("python-jmespath" ,python-jmespath)
11581 ("python-s3transfer" ,python-s3transfer)))
11582 (synopsis "AWS SDK for Python")
11583 (description
11584 "Boto3 is a Python library for writing programs that interact with
11585 @acronym{AWS,Amazon Web Services}.")
11586 (license license:asl2.0)))
11587
11588 (define-public python-pyfiglet
11589 (package
11590 (name "python-pyfiglet")
11591 (version "0.8.post1")
11592 (source
11593 (origin
11594 (method url-fetch)
11595 (uri (pypi-uri "pyfiglet" version))
11596 (sha256
11597 (base32
11598 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11599 (build-system python-build-system)
11600 (home-page "https://github.com/pwaller/pyfiglet")
11601 (synopsis "Draw ASCII art big letters in Python")
11602 (description "This module lets you draw large letter from ordinary characters
11603 in pure Python.")
11604 (license license:expat)))
11605
11606 (define-public python-xdo
11607 (package
11608 (name "python-xdo")
11609 (version "0.3")
11610 (source (origin
11611 (method url-fetch)
11612 (uri (string-append
11613 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11614 "python-xdo_" version ".orig.tar.gz"))
11615 (sha256
11616 (base32
11617 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11618 (build-system python-build-system)
11619 (arguments
11620 '(#:phases
11621 (modify-phases %standard-phases
11622 (add-before 'install 'patch-libxdo-path
11623 ;; Hardcode the path of dynamically loaded libxdo library.
11624 (lambda* (#:key inputs #:allow-other-keys)
11625 (let ((libxdo (string-append
11626 (assoc-ref inputs "xdotool")
11627 "/lib/libxdo.so")))
11628 (substitute* "xdo/_xdo.py"
11629 (("find_library\\(\"xdo\"\\)")
11630 (simple-format #f "\"~a\"" libxdo)))
11631 #t))))
11632 #:tests? #f)) ; no tests provided
11633 (propagated-inputs
11634 `(("python-six" ,python-six)))
11635 (inputs
11636 `(("xdotool" ,xdotool)
11637 ("libX11" ,libx11)))
11638 (home-page "https://tracker.debian.org/pkg/python-xdo")
11639 (synopsis "Python library for simulating X11 keyboard/mouse input")
11640 (description "Provides bindings to libxdo for manipulating X11 via simulated
11641 input. (Note that this is mostly a legacy library; you may wish to look at
11642 python-xdo for newer bindings.)")
11643 (license license:bsd-3)))
11644
11645 (define-public python2-xdo
11646 (package-with-python2 python-xdo))
11647
11648 (define-public python-mako
11649 (package
11650 (name "python-mako")
11651 (version "1.1.3")
11652 (source
11653 (origin
11654 (method url-fetch)
11655 (uri (pypi-uri "Mako" version))
11656 (sha256
11657 (base32
11658 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11659 (build-system python-build-system)
11660 (arguments
11661 `(#:phases (modify-phases %standard-phases
11662 (replace 'check
11663 (lambda* (#:key tests? #:allow-other-keys)
11664 (if tests?
11665 (invoke "nosetests" "-v")
11666 (format #t "test suite not run~%"))
11667 #t)))))
11668 (propagated-inputs
11669 `(("python-markupsafe" ,python-markupsafe)))
11670 (native-inputs
11671 `(("python-mock" ,python-mock)
11672 ("python-nose" ,python-nose)))
11673 (home-page "https://www.makotemplates.org/")
11674 (synopsis "Templating language for Python")
11675 (description "Mako is a templating language for Python that compiles
11676 templates into Python modules.")
11677 (license license:expat)))
11678
11679 (define-public python2-mako
11680 (package-with-python2 python-mako))
11681
11682 (define-public python-waitress
11683 (package
11684 (name "python-waitress")
11685 (version "1.1.0")
11686 (source
11687 (origin
11688 (method url-fetch)
11689 (uri (pypi-uri "waitress" version))
11690 (patches (search-patches "python-waitress-fix-tests.patch"))
11691 (sha256
11692 (base32
11693 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11694 (build-system python-build-system)
11695 (home-page "https://github.com/Pylons/waitress")
11696 (synopsis "Waitress WSGI server")
11697 (description "Waitress is meant to be a production-quality pure-Python WSGI
11698 server with very acceptable performance.")
11699 (license license:zpl2.1)))
11700
11701 (define-public python2-waitress
11702 (package-with-python2 python-waitress))
11703
11704 (define-public python-whichcraft
11705 (package
11706 (name "python-whichcraft")
11707 (version "0.6.1")
11708 (source
11709 (origin
11710 (method url-fetch)
11711 (uri (pypi-uri "whichcraft" version))
11712 (sha256
11713 (base32
11714 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11715 (build-system python-build-system)
11716 (native-inputs
11717 `(("python-pytest" ,python-pytest)))
11718 (home-page "https://github.com/pydanny/whichcraft")
11719 (synopsis "Cross-platform cross-python shutil.which functionality")
11720 (description
11721 "This package provides a shim of the shutil.which function that's
11722 designed to work across multiple versions of Python.")
11723 (license license:bsd-3)))
11724
11725 (define-public python-cookiecutter
11726 (package
11727 (name "python-cookiecutter")
11728 (version "1.7.2")
11729 (source
11730 (origin
11731 (method url-fetch)
11732 (uri (pypi-uri "cookiecutter" version))
11733 (sha256
11734 (base32
11735 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11736 (build-system python-build-system)
11737 (native-inputs
11738 `(("python-freezegun" ,python-freezegun)
11739 ("python-pytest" ,python-pytest)
11740 ("python-pytest-catchlog" ,python-pytest-catchlog)
11741 ("python-pytest-cov" ,python-pytest-cov)
11742 ("python-pytest-mock" ,python-pytest-mock)))
11743 (propagated-inputs
11744 `(("python-binaryornot" ,python-binaryornot)
11745 ("python-click" ,python-click)
11746 ("python-future" ,python-future)
11747 ("python-jinja2" ,python-jinja2)
11748 ("python-jinja2-time" ,python-jinja2-time)
11749 ("python-poyo" ,python-poyo)
11750 ("python-requests" ,python-requests)
11751 ("python-slugify" ,python-slugify)
11752 ("python-text-unidecode" ,python-text-unidecode)
11753 ("python-whichcraft" ,python-whichcraft)))
11754 (home-page "https://github.com/cookiecutter/cookiecutter")
11755 (synopsis
11756 "Command-line utility that creates projects from project templates")
11757 (description
11758 "This package provides a command-line utility that creates projects from
11759 project templates, e.g. creating a Python package project from a Python package
11760 project template.")
11761 (license license:bsd-3)))
11762
11763 (define-public python-pyquery
11764 (package
11765 (name "python-pyquery")
11766 (version "1.2.17")
11767 (source
11768 (origin
11769 (method url-fetch)
11770 (uri (pypi-uri "pyquery" version))
11771 (sha256
11772 (base32
11773 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11774 (build-system python-build-system)
11775 (native-inputs
11776 `(("python-webob" ,python-webob)
11777 ("python-webtest" ,python-webtest)))
11778 (propagated-inputs
11779 `(("python-lxml" ,python-lxml)
11780 ("python-cssselect" ,python-cssselect)))
11781 (home-page "https://github.com/gawel/pyquery")
11782 (synopsis "Make jQuery-like queries on xml documents")
11783 (description "pyquery allows you to make jQuery queries on xml documents.
11784 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11785 fast xml and html manipulation.")
11786 (license license:bsd-3)))
11787
11788 (define-public python-anyjson
11789 (package
11790 (name "python-anyjson")
11791 (version "0.3.3")
11792 (source
11793 (origin
11794 (method url-fetch)
11795 (uri (pypi-uri "anyjson" version))
11796 (sha256
11797 (base32
11798 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11799 (build-system python-build-system)
11800 (arguments
11801 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
11802 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
11803 ;; whatever) so this transformation needs to be done before the tests
11804 ;; can be run. Maybe we could add a build step to transform beforehand
11805 ;; but it could be annoying/difficult.
11806 ;; We can enable tests for the Python 2 version, though, and do below.
11807 #:tests? #f))
11808 (home-page "https://bitbucket.org/runeh/anyjson/")
11809 (synopsis
11810 "Wraps best available JSON implementation in a common interface")
11811 (description
11812 "Anyjson loads whichever is the fastest JSON module installed
11813 and provides a uniform API regardless of which JSON implementation is used.")
11814 (license license:bsd-3)
11815 (properties `((python2-variant . ,(delay python2-anyjson))))))
11816
11817 (define-public python2-anyjson
11818 (let ((anyjson (package-with-python2
11819 (strip-python2-variant python-anyjson))))
11820 (package
11821 (inherit anyjson)
11822 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
11823 #:tests? #t
11824 ,@(package-arguments anyjson)))
11825 (native-inputs `(("python2-nose" ,python2-nose))))))
11826
11827 (define-public python-amqp
11828 (package
11829 (name "python-amqp")
11830 (version "2.3.2")
11831 (source
11832 (origin
11833 (method url-fetch)
11834 (uri (pypi-uri "amqp" version))
11835 (sha256
11836 (base32
11837 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
11838 (build-system python-build-system)
11839 (native-inputs
11840 `(("python-case" ,python-case)
11841 ("python-pytest-sugar" ,python-pytest-sugar)
11842 ("python-mock" ,python-mock)))
11843 (propagated-inputs
11844 `(("python-vine" ,python-vine)))
11845 (home-page "https://github.com/celery/py-amqp")
11846 (synopsis
11847 "Low-level AMQP client for Python (fork of amqplib)")
11848 (description
11849 "This is a fork of amqplib which was originally written by Barry Pederson.
11850 It is maintained by the Celery project, and used by kombu as a pure python
11851 alternative when librabbitmq is not available.")
11852 (license license:lgpl2.1+)
11853 (properties `((python2-variant . ,(delay python2-amqp))))))
11854
11855 (define-public python2-amqp
11856 (let ((amqp (package-with-python2
11857 (strip-python2-variant python-amqp))))
11858 (package
11859 (inherit amqp)
11860 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11861 ;; unmaintained. Weirdly, does not do this on the python 3
11862 ;; version?
11863 #:tests? #f
11864 ,@(package-arguments amqp))))))
11865
11866 (define-public python-txamqp
11867 (package
11868 (name "python-txamqp")
11869 (version "0.8.2")
11870 (source
11871 (origin
11872 (method url-fetch)
11873 (uri (pypi-uri "txAMQP" version))
11874 (sha256
11875 (base32
11876 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11877 (build-system python-build-system)
11878 (propagated-inputs
11879 `(("python-six" ,python-six)
11880 ("python-twisted" ,python-twisted)))
11881 (home-page "https://github.com/txamqp/txamqp")
11882 (synopsis "Communicate with AMQP peers and brokers using Twisted")
11883 (description
11884 "This package provides a Python library for communicating with AMQP peers
11885 and brokers using the asynchronous networking framework Twisted. It contains
11886 all the necessary code to connect, send and receive messages to/from an
11887 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
11888 also includes support for using Thrift RPC over AMQP in Twisted
11889 applications.")
11890 (license license:asl2.0)))
11891
11892 (define-public python2-txamqp
11893 (package-with-python2 python-txamqp))
11894
11895 (define-public python-kombu
11896 (package
11897 (name "python-kombu")
11898 (version "4.2.2")
11899 (source
11900 (origin
11901 (method url-fetch)
11902 (uri (pypi-uri "kombu" version))
11903 (sha256
11904 (base32
11905 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11906 (build-system python-build-system)
11907 (native-inputs
11908 `(("python-mock" ,python-mock)
11909 ("python-case" ,python-case)
11910 ("python-pyro4" ,python-pyro4)
11911 ("python-pytest-sugar" ,python-pytest-sugar)
11912 ("python-pytz" ,python-pytz)))
11913 (propagated-inputs
11914 `(("python-anyjson" ,python-anyjson)
11915 ("python-amqp" ,python-amqp)
11916 ("python-redis" ,python-redis)))
11917 (home-page "https://kombu.readthedocs.io")
11918 (synopsis "Message passing library for Python")
11919 (description "The aim of Kombu is to make messaging in Python as easy as
11920 possible by providing an idiomatic high-level interface for the AMQ protocol,
11921 and also provide proven and tested solutions to common messaging problems.
11922 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
11923 message orientation, queuing, routing, reliability and security, for which the
11924 RabbitMQ messaging server is the most popular implementation.")
11925 (license license:bsd-3)
11926 (properties `((python2-variant . ,(delay python2-kombu))))))
11927
11928 (define-public python2-kombu
11929 (let ((kombu (package-with-python2
11930 (strip-python2-variant python-kombu))))
11931 (package
11932 (inherit kombu)
11933 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11934 ;; It works fine on the python3 variant.
11935 #:tests? #f
11936 ,@(package-arguments kombu)))
11937 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11938 ,@(package-native-inputs kombu))))))
11939
11940 (define-public python-billiard
11941 (package
11942 (name "python-billiard")
11943 (version "3.5.0.5")
11944 (source
11945 (origin
11946 (method url-fetch)
11947 (uri (pypi-uri "billiard" version))
11948 (sha256
11949 (base32
11950 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11951 (build-system python-build-system)
11952 (native-inputs
11953 `(("python-case" ,python-case)
11954 ("python-pytest" ,python-pytest)))
11955 (home-page "https://github.com/celery/billiard")
11956 (synopsis
11957 "Python multiprocessing fork with improvements and bugfixes")
11958 (description
11959 "Billiard is a fork of the Python 2.7 multiprocessing package. The
11960 multiprocessing package itself is a renamed and updated version of R Oudkerk's
11961 pyprocessing package. This standalone variant is intended to be compatible with
11962 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
11963 (license license:bsd-3)
11964 (properties `((python2-variant . ,(delay python2-billiard))))))
11965
11966 (define-public python2-billiard
11967 (let ((billiard (package-with-python2
11968 (strip-python2-variant python-billiard))))
11969 (package
11970 (inherit billiard)
11971 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11972 ("python2-mock" ,python2-mock)
11973 ,@(package-native-inputs billiard))))))
11974
11975 (define-public python-celery
11976 (package
11977 (name "python-celery")
11978 (version "4.2.1")
11979 (source
11980 (origin
11981 (method url-fetch)
11982 (uri (pypi-uri "celery" version))
11983 (sha256
11984 (base32
11985 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
11986 (build-system python-build-system)
11987 (arguments
11988 '(;; TODO The tests fail with Python 3.7
11989 ;; https://github.com/celery/celery/issues/4849
11990 #:tests? #f
11991 #:phases
11992 (modify-phases %standard-phases
11993 (add-after 'unpack 'patch-requirements
11994 (lambda _
11995 (substitute* "requirements/test.txt"
11996 (("pytest>=3\\.0,<3\\.3")
11997 "pytest>=3.0"))
11998 #t)))))
11999 (native-inputs
12000 `(("python-case" ,python-case)
12001 ("python-pytest" ,python-pytest)))
12002 (propagated-inputs
12003 `(("python-pytz" ,python-pytz)
12004 ("python-billiard" ,python-billiard)
12005 ("python-kombu" ,python-kombu)))
12006 (home-page "https://celeryproject.org")
12007 (synopsis "Distributed Task Queue")
12008 (description "Celery is an asynchronous task queue/job queue based on
12009 distributed message passing. It is focused on real-time operation, but
12010 supports scheduling as well. The execution units, called tasks, are executed
12011 concurrently on a single or more worker servers using multiprocessing,
12012 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
12013 synchronously (wait until ready).")
12014 (license license:bsd-3)
12015 (properties `((python2-variant . ,(delay python2-celery))))))
12016
12017 (define-public python2-celery
12018 (let ((celery (package-with-python2
12019 (strip-python2-variant python-celery))))
12020 (package
12021 (inherit celery)
12022 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12023 ("python2-mock" ,python2-mock)
12024 ,@(package-native-inputs celery))))))
12025
12026 (define-public python-translitcodec
12027 (package
12028 (name "python-translitcodec")
12029 (version "0.4.0")
12030 (source
12031 (origin
12032 (method url-fetch)
12033 (uri (pypi-uri "translitcodec" version))
12034 (sha256
12035 (base32
12036 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
12037 (build-system python-build-system)
12038 (arguments
12039 `(#:tests? #f)) ; no tests provided
12040 (home-page
12041 "https://github.com/claudep/translitcodec")
12042 (synopsis
12043 "Unicode to 8-bit charset transliteration codec")
12044 (description
12045 "This package contains codecs for transliterating ISO 10646 texts into
12046 best-effort representations using smaller coded character sets (ASCII,
12047 ISO 8859, etc.).")
12048 (license license:expat)))
12049
12050 (define-public python2-translitcodec
12051 (package-with-python2 python-translitcodec))
12052
12053 (define-public python-editor
12054 (package
12055 (name "python-editor")
12056 (version "1.0.4")
12057 (source
12058 (origin
12059 (method url-fetch)
12060 (uri (pypi-uri "python-editor" version))
12061 (sha256
12062 (base32
12063 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
12064 (build-system python-build-system)
12065 (arguments
12066 '(#:tests? #f)) ;XXX: needs a TTY and an editor
12067 (home-page "https://github.com/fmoo/python-editor")
12068 (synopsis "Programmatically open an editor, capture the result")
12069 (description
12070 "python-editor is a library that provides the editor module for
12071 programmatically interfacing with your system's $EDITOR.")
12072 (license license:asl2.0)))
12073
12074 (define-public python2-editor
12075 (package-with-python2 python-editor))
12076
12077 (define-public python-multiprocessing-logging
12078 (package
12079 (name "python-multiprocessing-logging")
12080 (version "0.3.1")
12081 (home-page "https://github.com/jruere/multiprocessing-logging")
12082 (source (origin
12083 (method git-fetch)
12084 (uri (git-reference
12085 (url home-page)
12086 (commit (string-append "v" version))))
12087 (file-name (git-file-name name version))
12088 (sha256
12089 (base32
12090 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
12091 (build-system python-build-system)
12092 (synopsis "Manage logs from multiple processes")
12093 (description
12094 "This Python module implements a multiprocessing-aware @code{Handler}
12095 that, when set on the root @code{Logger}, will tunnel log records to the
12096 main process so that they are handled correctly.")
12097 (license license:lgpl3+)))
12098
12099 (define-public python-vobject
12100 (package
12101 (name "python-vobject")
12102 (version "0.9.6.1")
12103 (source (origin
12104 (method url-fetch)
12105 (uri (pypi-uri "vobject" version))
12106 (sha256
12107 (base32
12108 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
12109 (build-system python-build-system)
12110 (arguments
12111 '(;; The test suite relies on some non-portable Windows interfaces.
12112 #:tests? #f))
12113 (propagated-inputs
12114 `(("python-dateutil" ,python-dateutil)
12115 ("python-pyicu" ,python-pyicu)))
12116 (synopsis "Parse and generate vCard and vCalendar files")
12117 (description "Vobject is intended to be a full featured Python package for
12118 parsing and generating vCard and vCalendar files. Currently, iCalendar files
12119 are supported and well tested. vCard 3.0 files are supported, and all data
12120 should be imported, but only a few components are understood in a sophisticated
12121 way.")
12122 (home-page "https://eventable.github.io/vobject/")
12123 (license license:asl2.0)))
12124
12125 (define-public python2-vobject
12126 (package-with-python2 python-vobject))
12127
12128 (define-public python-munkres
12129 (package
12130 (name "python-munkres")
12131 (version "1.0.8")
12132 (source (origin
12133 (method url-fetch)
12134 (uri (pypi-uri "munkres" version))
12135 (sha256
12136 (base32
12137 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
12138 (build-system python-build-system)
12139 (arguments
12140 '(#:tests? #f)) ; no test suite
12141 (home-page "https://software.clapper.org/munkres/")
12142 (synopsis "Implementation of the Munkres algorithm")
12143 (description "The Munkres module provides an implementation of the Munkres
12144 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
12145 useful for solving the Assignment Problem.")
12146 (license license:bsd-3)))
12147
12148 (define-public python2-munkres
12149 (package-with-python2 python-munkres))
12150
12151 (define-public python-whoosh
12152 (package
12153 (name "python-whoosh")
12154 (version "2.7.4")
12155 (source
12156 (origin
12157 (method url-fetch)
12158 (uri (pypi-uri "Whoosh" version))
12159 (sha256
12160 (base32
12161 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
12162 (build-system python-build-system)
12163 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
12164 (native-inputs
12165 `(("python-pytest" ,python-pytest)))
12166 (home-page "https://bitbucket.org/mchaput/whoosh")
12167 (synopsis "Full text indexing, search, and spell checking library")
12168 (description
12169 "Whoosh is a fast, pure-Python full text indexing, search, and spell
12170 checking library.")
12171 (license license:bsd-2)))
12172
12173 (define-public python2-whoosh
12174 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
12175 (package (inherit whoosh)
12176 (propagated-inputs
12177 `(("python2-backport-ssl-match-hostname"
12178 ,python2-backport-ssl-match-hostname)
12179 ,@(package-propagated-inputs whoosh))))))
12180
12181 (define-public python-pathlib
12182 (package
12183 (name "python-pathlib")
12184 (version "1.0.1")
12185 (source (origin
12186 (method url-fetch)
12187 (uri (pypi-uri "pathlib" version))
12188 (sha256
12189 (base32
12190 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
12191 (build-system python-build-system)
12192 ;; The tests depend on the internal "test" module, which does not provide
12193 ;; a stable interface.
12194 (arguments `(#:tests? #f))
12195 (home-page "https://pathlib.readthedocs.org/")
12196 (synopsis "Object-oriented file system paths")
12197 (description "Pathlib offers a set of classes to handle file system paths.
12198 It offers the following advantages over using string objects:
12199
12200 @enumerate
12201 @item No more cumbersome use of os and os.path functions. Everything can
12202 be done easily through operators, attribute accesses, and method calls.
12203 @item Embodies the semantics of different path types. For example,
12204 comparing Windows paths ignores casing.
12205 @item Well-defined semantics, eliminating any inconsistencies or
12206 ambiguities (forward vs. backward slashes, etc.).
12207 @end enumerate
12208
12209 Note: In Python 3.4, pathlib is now part of the standard library. For other
12210 Python versions please consider python-pathlib2 instead, which tracks the
12211 standard library module. This module (python-pathlib) isn't maintained
12212 anymore.")
12213 (license license:expat)))
12214
12215 (define-public python2-pathlib
12216 (package-with-python2 python-pathlib))
12217
12218 (define-public python2-pathlib2
12219 (package
12220 (name "python2-pathlib2")
12221 (version "2.3.5")
12222 (source (origin
12223 (method url-fetch)
12224 (uri (pypi-uri "pathlib2" version))
12225 (sha256
12226 (base32
12227 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
12228 (build-system python-build-system)
12229 ;; We only need the the Python 2 variant, since for Python 3 our minimum
12230 ;; version is 3.4 which already includes this package as part of the
12231 ;; standard library.
12232 (arguments
12233 `(#:python ,python-2))
12234 (propagated-inputs
12235 `(("python2-scandir" ,python2-scandir)
12236 ("python2-six" ,python2-six)))
12237 (home-page "https://pypi.org/project/pathlib2/")
12238 (synopsis "Object-oriented file system paths - backport of standard
12239 pathlib module")
12240 (description "The goal of pathlib2 is to provide a backport of standard
12241 pathlib module which tracks the standard library module, so all the newest
12242 features of the standard pathlib can be used also on older Python versions.
12243
12244 Pathlib offers a set of classes to handle file system paths. It offers the
12245 following advantages over using string objects:
12246
12247 @enumerate
12248 @item No more cumbersome use of os and os.path functions. Everything can
12249 be done easily through operators, attribute accesses, and method calls.
12250 @item Embodies the semantics of different path types. For example,
12251 comparing Windows paths ignores casing.
12252 @item Well-defined semantics, eliminating any inconsistencies or
12253 ambiguities (forward vs. backward slashes, etc.).
12254 @end enumerate")
12255 (license license:expat)))
12256
12257 (define-public python2-pathlib2-bootstrap
12258 (hidden-package
12259 (package
12260 (inherit python2-pathlib2)
12261 (name "python2-pathlib2-bootstrap")
12262 (propagated-inputs
12263 `(("python2-scandir" ,python2-scandir)
12264 ("python2-six" ,python2-six-bootstrap))))))
12265
12266 (define-public python-jellyfish
12267 (package
12268 (name "python-jellyfish")
12269 (version "0.5.6")
12270 (source (origin
12271 (method url-fetch)
12272 (uri (pypi-uri "jellyfish" version))
12273 (sha256
12274 (base32
12275 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
12276 (build-system python-build-system)
12277 (native-inputs
12278 `(("python-pytest" ,python-pytest)))
12279 (home-page "https://github.com/jamesturk/jellyfish")
12280 (synopsis "Approximate and phonetic matching of strings")
12281 (description "Jellyfish uses a variety of string comparison and phonetic
12282 encoding algorithms to do fuzzy string matching.")
12283 (license license:bsd-2)
12284 (properties `((python2-variant . ,(delay python2-jellyfish))))))
12285
12286 (define-public python2-jellyfish
12287 (let ((jellyfish (package-with-python2
12288 (strip-python2-variant python-jellyfish))))
12289 (package (inherit jellyfish)
12290 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
12291 ,@(package-native-inputs jellyfish))))))
12292
12293 (define-public python2-unicodecsv
12294 (package
12295 (name "python2-unicodecsv")
12296 (version "0.14.1")
12297 (source (origin
12298 (method git-fetch)
12299 ;; The test suite is not included in the PyPi release.
12300 ;; https://github.com/jdunck/python-unicodecsv/issues/19
12301 (uri (git-reference
12302 (url "https://github.com/jdunck/python-unicodecsv")
12303 (commit version)))
12304 (file-name (git-file-name name version))
12305 (sha256
12306 (base32
12307 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
12308 (build-system python-build-system)
12309 (arguments
12310 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
12311 #:python ,python-2))
12312 (native-inputs
12313 `(("python2-unittest2" ,python2-unittest2)))
12314 (home-page "https://github.com/jdunck/python-unicodecsv")
12315 (synopsis "Unicode CSV module for Python 2")
12316 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
12317 module, adding support for Unicode strings.")
12318 (license license:bsd-2)))
12319
12320 (define-public python-pdfminer-six
12321 (package
12322 (name "python-pdfminer-six")
12323 (version "20201018")
12324 ;; There are no tests in the PyPI tarball.
12325 (source
12326 (origin
12327 (method git-fetch)
12328 (uri (git-reference
12329 (url "https://github.com/pdfminer/pdfminer.six")
12330 (commit version)))
12331 (file-name (git-file-name name version))
12332 (sha256
12333 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
12334 (build-system python-build-system)
12335 (arguments
12336 `(#:phases
12337 (modify-phases %standard-phases
12338 ;; Tests write to the source tree.
12339 (add-after 'unpack 'make-git-checkout-writable
12340 (lambda _
12341 (for-each make-file-writable (find-files "."))
12342 #t))
12343 (replace 'check
12344 (lambda _
12345 (invoke "make" "test")))
12346 (add-before 'reset-gzip-timestamps 'make-files-writable
12347 (lambda* (#:key outputs #:allow-other-keys)
12348 (let ((out (assoc-ref outputs "out")))
12349 (for-each make-file-writable
12350 (find-files out "\\.gz$"))
12351 #t))))))
12352 (propagated-inputs
12353 `(("python-chardet" ,python-chardet)
12354 ("python-cryptography" ,python-cryptography)
12355 ("python-sortedcontainers" ,python-sortedcontainers)))
12356 (native-inputs
12357 `(("python-nose" ,python-nose)
12358 ("python-tox" ,python-tox)))
12359 (home-page "https://github.com/pdfminer/pdfminer.six")
12360 (synopsis "PDF parser and analyzer")
12361 (description "@code{pdfminer.six} is a community maintained fork of
12362 the original PDFMiner. It is a tool for extracting information from PDF
12363 documents. It focuses on getting and analyzing text data. Pdfminer.six
12364 extracts the text from a page directly from the sourcecode of the PDF. It
12365 can also be used to get the exact location, font or color of the text.")
12366 (license license:expat)))
12367
12368 (define-public python-rarfile
12369 (package
12370 (name "python-rarfile")
12371 (version "2.8")
12372 (source (origin
12373 (method url-fetch)
12374 (uri (pypi-uri "rarfile" version))
12375 (sha256
12376 (base32
12377 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
12378 (build-system python-build-system)
12379 (arguments
12380 '(#:phases
12381 (modify-phases %standard-phases
12382 (replace 'check
12383 ;; Many tests fail, but the installation proceeds.
12384 (lambda _ (invoke "make" "-C" "test" "test"))))))
12385 (native-inputs
12386 `(("which" ,which))) ; required for tests
12387 (propagated-inputs
12388 `(("libarchive" ,libarchive)))
12389 (home-page "https://github.com/markokr/rarfile")
12390 (synopsis "RAR archive reader for Python")
12391 (description "This is Python module for RAR archive reading. The interface
12392 is made as zipfile like as possible.")
12393 (license license:isc)))
12394
12395 (define-public python2-rarfile
12396 (package-with-python2 python-rarfile))
12397
12398 (define-public python-magic
12399 (package
12400 (name "python-magic")
12401 (version "0.4.15")
12402 (source
12403 (origin
12404 (method url-fetch)
12405 (uri (pypi-uri "python-magic" version))
12406 (sha256
12407 (base32
12408 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
12409 (file-name (string-append name "-" version "-checkout"))))
12410 (build-system python-build-system)
12411 (arguments
12412 ;; The tests are unreliable, so don't run them. The tests fail
12413 ;; under Python3 because they were written for Python2 and
12414 ;; contain import statements that do not work in Python3. One of
12415 ;; the tests fails under Python2 because its assertions are
12416 ;; overly stringent; it relies on comparing output strings which
12417 ;; are brittle and can change depending on the version of
12418 ;; libmagic being used and the system on which the test is
12419 ;; running. In my case, under GuixSD 0.10.0, only one test
12420 ;; failed, and it seems to have failed only because the version
12421 ;; of libmagic that is packaged in Guix outputs a slightly
12422 ;; different (but not wrong) string than the one that the test
12423 ;; expected.
12424 '(#:tests? #f
12425 #:phases (modify-phases %standard-phases
12426 ;; Replace a specific method call with a hard-coded
12427 ;; path to the necessary libmagic.so file in the
12428 ;; store. If we don't do this, then the method call
12429 ;; will fail to find the libmagic.so file, which in
12430 ;; turn will cause any application using
12431 ;; python-magic to fail.
12432 (add-before 'build 'hard-code-path-to-libmagic
12433 (lambda* (#:key inputs #:allow-other-keys)
12434 (let ((file (assoc-ref inputs "file")))
12435 (substitute* "magic.py"
12436 (("ctypes.util.find_library\\('magic'\\)")
12437 (string-append "'" file "/lib/libmagic.so'")))
12438 #t)))
12439 (add-before 'install 'disable-egg-compression
12440 (lambda _
12441 (let ((port (open-file "setup.cfg" "a")))
12442 (display "\n[easy_install]\nzip_ok = 0\n"
12443 port)
12444 (close-port port)
12445 #t))))))
12446 (inputs
12447 ;; python-magic needs to be able to find libmagic.so.
12448 `(("file" ,file)))
12449 (home-page
12450 "https://github.com/ahupp/python-magic")
12451 (synopsis
12452 "File type identification using libmagic")
12453 (description
12454 "This module uses ctypes to access the libmagic file type
12455 identification library. It makes use of the local magic database and
12456 supports both textual and MIME-type output. Note that this module and
12457 the python-file module both provide a \"magic.py\" file; these two
12458 modules, which are different and were developed separately, both serve
12459 the same purpose: to provide Python bindings for libmagic.")
12460 (license license:expat)))
12461
12462 (define-public python2-magic
12463 (package-with-python2 python-magic))
12464
12465 (define-public python2-s3cmd
12466 (package
12467 (name "python2-s3cmd")
12468 (version "1.6.1")
12469 (source
12470 (origin
12471 (method url-fetch)
12472 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12473 "s3cmd-" version ".tar.gz"))
12474 (sha256
12475 (base32
12476 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12477 (build-system python-build-system)
12478 (arguments
12479 ;; s3cmd is written for python2 only and contains no tests.
12480 `(#:python ,python-2
12481 #:tests? #f))
12482 (propagated-inputs
12483 `(("python2-dateutil" ,python2-dateutil)
12484 ;; The python-file package also provides a magic.py module.
12485 ;; This is an unfortunate state of affairs; however, s3cmd
12486 ;; fails to install if it cannot find specifically the
12487 ;; python-magic package. Thus we include it, instead of using
12488 ;; python-file. Ironically, s3cmd sometimes works better
12489 ;; without libmagic bindings at all:
12490 ;; https://github.com/s3tools/s3cmd/issues/198
12491 ("python2-magic" ,python2-magic)))
12492 (home-page "https://s3tools.org/s3cmd")
12493 (synopsis "Command line tool for S3-compatible storage services")
12494 (description
12495 "S3cmd is a command line tool for uploading, retrieving and managing data
12496 in storage services that are compatible with the Amazon Simple Storage
12497 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12498 GnuPG encryption, and more. It also supports management of Amazon's
12499 CloudFront content delivery network.")
12500 (license license:gpl2+)))
12501
12502 (define-public python-pkgconfig
12503 (package
12504 (name "python-pkgconfig")
12505 (version "1.3.1")
12506 (source
12507 (origin
12508 (method url-fetch)
12509 (uri (pypi-uri "pkgconfig" version))
12510 (sha256
12511 (base32
12512 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
12513 (build-system python-build-system)
12514 (native-inputs
12515 `(("python-nose" ,python-nose)))
12516 (inputs
12517 `(("pkg-config" ,pkg-config)))
12518 (arguments
12519 `(#:phases
12520 (modify-phases %standard-phases
12521 (add-before 'build 'patch
12522 ;; Hard-code the path to pkg-config.
12523 (lambda _
12524 (substitute* "pkgconfig/pkgconfig.py"
12525 (("cmd = 'pkg-config")
12526 (string-append "cmd = '" (which "pkg-config"))))
12527 #t))
12528 (replace 'check
12529 (lambda _
12530 (invoke "nosetests" "test.py"))))))
12531 (home-page "https://github.com/matze/pkgconfig")
12532 (synopsis "Python interface for pkg-config")
12533 (description "This module provides a Python interface to pkg-config. It
12534 can be used to find all pkg-config packages, check if a package exists,
12535 check if a package meets certain version requirements, query CFLAGS and
12536 LDFLAGS and parse the output to build extensions with setup.py.")
12537 (license license:expat)))
12538
12539 (define-public python2-pkgconfig
12540 (package-with-python2 python-pkgconfig))
12541
12542 (define-public python-bz2file
12543 (package
12544 (name "python-bz2file")
12545 (version "0.98")
12546 (source
12547 (origin
12548 (method url-fetch)
12549 (uri (pypi-uri "bz2file" version))
12550 (sha256
12551 (base32
12552 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12553 (build-system python-build-system)
12554 (arguments
12555 `(#:tests? #f)) ; Tests use deprecated python modules.
12556 (home-page "https://github.com/nvawda/bz2file")
12557 (synopsis "Read and write bzip2-compressed files")
12558 (description
12559 "Bz2file is a Python library for reading and writing bzip2-compressed
12560 files. It contains a drop-in replacement for the I/O interface in the
12561 standard library's @code{bz2} module, including features from the latest
12562 development version of CPython that are not available in older releases.")
12563 (license license:asl2.0)))
12564
12565 (define-public python2-bz2file
12566 (package-with-python2 python-bz2file))
12567
12568 (define-public python-future
12569 (package
12570 (name "python-future")
12571 (version "0.17.1")
12572 (source
12573 (origin
12574 (method url-fetch)
12575 (uri (pypi-uri "future" version))
12576 (sha256
12577 (base32
12578 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12579 (build-system python-build-system)
12580 ;; Many tests connect to the network or are otherwise flawed.
12581 ;; https://github.com/PythonCharmers/python-future/issues/210
12582 (arguments
12583 `(#:tests? #f))
12584 (home-page "https://python-future.org")
12585 (synopsis "Single-source support for Python 3 and 2")
12586 (description
12587 "@code{python-future} is the missing compatibility layer between Python 2 and
12588 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12589 to support both Python 2 and Python 3 with minimal overhead.")
12590 (license license:expat)))
12591
12592 (define-public python2-future
12593 (package-with-python2 python-future))
12594
12595 (define-public python-cysignals
12596 (package
12597 (name "python-cysignals")
12598 (version "1.9.0")
12599 (source
12600 (origin
12601 (method url-fetch)
12602 (uri (pypi-uri "cysignals" version))
12603 (sha256
12604 (base32
12605 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12606 (build-system python-build-system)
12607 (native-inputs
12608 `(("python-cython" ,python-cython)
12609 ("python-sphinx" ,python-sphinx)))
12610 (inputs
12611 `(("pari-gp" ,pari-gp)))
12612 (arguments
12613 `(#:modules ((guix build python-build-system)
12614 ((guix build gnu-build-system) #:prefix gnu:)
12615 (guix build utils))
12616 ;; FIXME: Tests are executed after installation and currently fail
12617 ;; when not installing into standard locations; the author is working
12618 ;; on a fix.
12619 #:tests? #f
12620 #:phases
12621 (modify-phases %standard-phases
12622 (add-before
12623 'build 'configure
12624 (assoc-ref gnu:%standard-phases 'configure)))))
12625 (home-page
12626 "https://github.com/sagemath/cysignals")
12627 (synopsis
12628 "Handling of interrupts and signals for Cython")
12629 (description
12630 "The cysignals package provides mechanisms to handle interrupts (and
12631 other signals and errors) in Cython code, using two related approaches,
12632 for mixed Cython/Python code or external C libraries and pure Cython code,
12633 respectively.")
12634 (license license:lgpl3+)))
12635
12636 (define-public python2-cysignals
12637 (package-with-python2 python-cysignals))
12638
12639 (define-public python2-shedskin
12640 (package
12641 (name "python2-shedskin")
12642 (version "0.9.4")
12643 (source
12644 (origin
12645 (method url-fetch)
12646 (uri (string-append "https://github.com/shedskin/shedskin/"
12647 "releases/download/v" version
12648 "/shedskin-" version ".tgz"))
12649 (sha256
12650 (base32
12651 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12652 (build-system python-build-system)
12653 (arguments
12654 `(#:python ,python-2
12655 #:phases (modify-phases %standard-phases
12656 (add-after 'unpack 'fix-resulting-include-libs
12657 (lambda* (#:key inputs #:allow-other-keys)
12658 (let ((libgc (assoc-ref inputs "libgc"))
12659 (pcre (assoc-ref inputs "pcre")))
12660 (substitute* "shedskin/makefile.py"
12661 (("variable == 'CCFLAGS':[ ]*")
12662 (string-append "variable == 'CCFLAGS':\n"
12663 " line += ' -I " pcre "/include"
12664 " -I " libgc "/include'"))
12665 (("variable == 'LFLAGS':[ ]*")
12666 (string-append "variable == 'LFLAGS':\n"
12667 " line += ' -L" pcre "/lib"
12668 " -L " libgc "/lib'")))
12669 #t))))))
12670 (inputs `(("pcre" ,pcre)
12671 ("libgc" ,libgc)))
12672 (home-page "https://shedskin.github.io/")
12673 (synopsis "Experimental Python-2 to C++ Compiler")
12674 (description (string-append "This is an experimental compiler for a subset of
12675 Python. It generates C++ code and a Makefile."))
12676 (license (list license:gpl3 license:bsd-3 license:expat))))
12677
12678 (define-public python2-rope
12679 (package
12680 (name "python2-rope")
12681 (version "0.11.0")
12682 (source
12683 (origin
12684 (method url-fetch)
12685 (uri (pypi-uri "rope" version))
12686 (sha256
12687 (base32
12688 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12689 (arguments
12690 ;; Rope has only partial python3 support, see `python-rope'
12691 `(#:python ,python-2))
12692 (build-system python-build-system)
12693 (native-inputs
12694 `(("python2-unittest2" ,python2-unittest2)))
12695 (home-page "https://github.com/python-rope/rope")
12696 (synopsis "Refactoring library for Python")
12697 (description "Rope is a refactoring library for Python. It facilitates
12698 the renaming, moving and extracting of attributes, functions, modules, fields
12699 and parameters in Python 2 source code. These refactorings can also be applied
12700 to occurrences in strings and comments.")
12701 (license license:gpl2)))
12702
12703 (define-public python-rope
12704 (package
12705 (inherit python2-rope)
12706 (name "python-rope")
12707 (arguments `(#:python ,python-wrapper
12708 ;; XXX: Only partial python3 support, results in some failing
12709 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12710 #:tests? #f))
12711 (properties `((python2-variant . ,(delay python2-rope))))))
12712
12713 (define-public python-py3status
12714 (package
12715 (name "python-py3status")
12716 (version "3.21")
12717 (source
12718 (origin
12719 (method url-fetch)
12720 (uri (pypi-uri "py3status" version))
12721 (sha256
12722 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12723 (build-system python-build-system)
12724 (inputs
12725 `(("file" ,file)))
12726 (arguments
12727 '(#:phases
12728 (modify-phases %standard-phases
12729 ;; 'file' is used for detection of configuration file encoding
12730 ;; let's make link the dependency to particular input
12731 (add-before 'build 'patch-file-path
12732 (lambda* (#:key inputs #:allow-other-keys)
12733 (let ((file-path (assoc-ref inputs "file")))
12734 (substitute* "py3status/parse_config.py"
12735 (("\\[\"file\", \"-b\"")
12736 (string-append "['" file-path "/bin/file', '-b'")))
12737 #t))))
12738 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12739 (home-page "https://github.com/ultrabug/py3status")
12740 (synopsis "Extensible i3status wrapper written in Python")
12741 (description "py3status is an i3status wrapper which extends i3status
12742 functionality in a modular way, allowing you to extend your panel with your
12743 own code, responding to click events and updating clock every second.")
12744 (license license:bsd-3)))
12745
12746 (define-public python2-selectors2
12747 (package
12748 (name "python2-selectors2")
12749 (version "2.0.1")
12750 (source (origin
12751 (method url-fetch)
12752 (uri (pypi-uri "selectors2" version))
12753 (sha256
12754 (base32
12755 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12756 (build-system python-build-system)
12757 (arguments
12758 `(#:python ,python-2))
12759 (native-inputs
12760 `(("python2-mock" ,python2-mock)
12761 ("python2-psutil" ,python2-psutil)))
12762 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12763 (synopsis "Backport of the selectors module from Python 3.5+")
12764 (description
12765 "This package provides a drop-in replacement for the @code{selectors}
12766 module in Python 3.5 and later.")
12767 (license license:expat)))
12768
12769 (define-public python-tblib
12770 (package
12771 (name "python-tblib")
12772 (version "1.6.0")
12773 (source (origin
12774 (method url-fetch)
12775 (uri (pypi-uri "tblib" version))
12776 (sha256
12777 (base32
12778 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12779 (build-system python-build-system)
12780 (arguments
12781 `(#:phases
12782 (modify-phases %standard-phases
12783 (replace 'check
12784 (lambda _
12785 ;; Upstream runs tests after installation and the package itself
12786 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12787 ;; found.
12788 (setenv "PYTHONPATH"
12789 (string-append (getcwd) "/build/lib:"
12790 (getenv "PYTHONPATH")))
12791 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12792 (native-inputs
12793 `(("python-pytest" ,python-pytest)
12794 ("python-six" ,python-six)))
12795 (home-page "https://github.com/ionelmc/python-tblib")
12796 (synopsis "Traceback serialization library")
12797 (description
12798 "Traceback serialization allows you to:
12799
12800 @enumerate
12801 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
12802 different processes. This allows better error handling when running code over
12803 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12804
12805 @item Parse traceback strings and raise with the parsed tracebacks.
12806 @end enumerate\n")
12807 (license license:bsd-3)))
12808
12809 (define-public python2-tblib
12810 (package-with-python2 python-tblib))
12811
12812 (define-public python-greenlet
12813 (package
12814 (name "python-greenlet")
12815 (version "1.0.0")
12816 (source (origin
12817 (method url-fetch)
12818 (uri (pypi-uri "greenlet" version))
12819 (sha256
12820 (base32
12821 "1y6wbg9yhm9dw6m768n4yslp56h85pnxkk3drz6icn15g6f1d7ki"))))
12822 (build-system python-build-system)
12823 (home-page "https://greenlet.readthedocs.io/")
12824 (synopsis "Lightweight in-process concurrent programming")
12825 (description
12826 "Greenlet package is a spin-off of Stackless, a version of CPython
12827 that supports micro-threads called \"tasklets\". Tasklets run
12828 pseudo-concurrently (typically in a single or a few OS-level threads) and
12829 are synchronized with data exchanges on \"channels\".")
12830 (license (list license:psfl license:expat))))
12831
12832 (define-public python-objgraph
12833 (package
12834 (name "python-objgraph")
12835 (version "3.4.1")
12836 (source
12837 (origin
12838 (method url-fetch)
12839 (uri (pypi-uri "objgraph" version))
12840 (sha256
12841 (base32
12842 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
12843 (build-system python-build-system)
12844 (propagated-inputs
12845 `(("python-graphviz" ,python-graphviz)))
12846 (native-inputs
12847 `(("python-mock" ,python-mock)
12848 ("graphviz" ,graphviz)))
12849 (home-page "https://mg.pov.lt/objgraph/")
12850 (synopsis "Draw Python object reference graphs with graphviz")
12851 (description
12852 "This package provides tools to draw Python object reference graphs with
12853 graphviz.")
12854 (license license:expat)))
12855
12856 (define-public python2-objgraph
12857 (package-with-python2 python-objgraph))
12858
12859 (define-public python-gevent
12860 (package
12861 (name "python-gevent")
12862 (version "21.1.2")
12863 (source (origin
12864 (method url-fetch)
12865 (uri (pypi-uri "gevent" version))
12866 (sha256
12867 (base32
12868 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
12869 (modules '((guix build utils)))
12870 (snippet
12871 '(begin
12872 ;; unbunding libev and c-ares
12873 (delete-file-recursively "deps")))))
12874 (build-system python-build-system)
12875 (arguments
12876 `(#:modules ((ice-9 ftw)
12877 (ice-9 match)
12878 (srfi srfi-26)
12879 (guix build utils)
12880 (guix build python-build-system))
12881 #:phases (modify-phases %standard-phases
12882 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
12883 (lambda _
12884 (substitute* "src/gevent/subprocess.py"
12885 (("/bin/sh") (which "sh")))
12886 (for-each (lambda (file)
12887 (substitute* file
12888 (("/bin/sh") (which "sh"))
12889 (("/bin/true") (which "true"))))
12890 (find-files "src/greentest" "\\.py$"))))
12891 (add-before 'build 'do-not-use-bundled-sources
12892 (lambda _
12893 (setenv "GEVENTSETUP_EMBED" "0")
12894
12895 ;; Prevent building bundled libev.
12896 (substitute* "setup.py"
12897 (("run_make=_BUILDING")
12898 "run_make=False"))))
12899 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
12900 (lambda* (#:key inputs #:allow-other-keys)
12901 (let ((greenlet (string-append
12902 (assoc-ref inputs "python-greenlet")
12903 "/include")))
12904 (match (scandir greenlet
12905 (lambda (item)
12906 (string-prefix? "python" item)))
12907 ((python)
12908 (setenv "C_INCLUDE_PATH"
12909 (string-append greenlet "/" python ":"
12910 (or (getenv "C_INCLUDE_PATH")
12911 ""))))))))
12912 (add-before 'check 'pretend-to-be-CI
12913 (lambda _
12914 ;; A few tests are skipped due to network constraints or
12915 ;; get longer timeouts when running in a CI environment.
12916 ;; Piggy-back on that, as we need the same adjustments.
12917 (setenv "TRAVIS" "1")
12918 (setenv "APPVEYOR" "1")))
12919 (add-before 'check 'adjust-tests
12920 (lambda _
12921 (let ((disabled-tests
12922 '(;; These tests relies on networking which is
12923 ;; not available in the build container.
12924 "test__getaddrinfo_import.py"
12925 "test__server_pywsgi.py"
12926 ;; XXX: These tests borrow functionality from the
12927 ;; Python builtin 'test' module, but it is not
12928 ;; installed with the Guix Python distribution.
12929 "test_smtpd.py"
12930 "test_wsgiref.py"
12931 "test_urllib2.py"
12932 "test_thread.py"
12933 "test_threading.py"
12934 "test__threading_2.py"
12935 ;; These tests rely on KeyboardInterrupts which do not
12936 ;; work inside the build container for some reason
12937 ;; (lack of controlling terminal?).
12938 "test_subprocess.py"
12939 "test__issues461_471.py"
12940 ;; TODO: Patch out the tests that use getprotobyname, etc
12941 ;; instead of disabling all the tests from these files.
12942 "test__resolver_dnspython.py"
12943 "test__doctests.py"
12944 "test__all__.py"
12945 "test___config.py"
12946 "test__execmodules.py")))
12947 (call-with-output-file "skipped_tests.txt"
12948 (lambda (port)
12949 (format port "~a~%"
12950 (string-join disabled-tests "\n")))))))
12951 (replace 'check
12952 (lambda _
12953 ;; Make sure the build directory is on PYTHONPATH.
12954 (setenv "PYTHONPATH"
12955 (string-append
12956 (getenv "PYTHONPATH") ":"
12957 (getcwd) "/build/"
12958 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12959
12960 ;; Use the build daemons configured number of workers.
12961 (setenv "NWORKERS" (number->string (parallel-job-count)))
12962
12963 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
12964 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12965 (propagated-inputs
12966 `(("python-greenlet" ,python-greenlet)
12967 ("python-objgraph" ,python-objgraph)
12968 ("python-zope.event" ,python-zope-event)
12969 ("python-zope.interface" ,python-zope-interface)))
12970 (native-inputs
12971 `(("python-six" ,python-six)
12972
12973 ;; For tests.
12974 ("python-dnspython" ,python-dnspython)
12975 ("python-psutil" ,python-psutil)))
12976 (inputs
12977 `(("c-ares" ,c-ares)
12978 ("libev" ,libev)))
12979 (home-page "https://www.gevent.org/")
12980 (synopsis "Coroutine-based network library")
12981 (description
12982 "@code{gevent} is a coroutine-based Python networking library that uses
12983 @code{greenlet} to provide a high-level synchronous API on top of the
12984 @code{libev} event loop.")
12985 (license license:expat)))
12986
12987 (define-public python-fastimport
12988 (package
12989 (name "python-fastimport")
12990 (version "0.9.8")
12991 (source
12992 (origin
12993 (method url-fetch)
12994 (uri (pypi-uri "fastimport" version))
12995 (sha256
12996 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
12997 (build-system python-build-system)
12998 (home-page "https://github.com/jelmer/python-fastimport")
12999 (synopsis "VCS fastimport parser and generator in Python")
13000 (description "This package provides a parser for and generator of the Git
13001 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
13002 format.")
13003 (license license:gpl2+)))
13004
13005 (define-public python2-fastimport
13006 (package-with-python2 python-fastimport))
13007
13008 (define-public python-twisted
13009 (package
13010 (name "python-twisted")
13011 (version "19.7.0")
13012 (source (origin
13013 (method url-fetch)
13014 (uri (pypi-uri "Twisted" version ".tar.bz2"))
13015 (sha256
13016 (base32
13017 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
13018 (build-system python-build-system)
13019 (arguments
13020 '(#:tests? #f)) ; FIXME: some tests fail
13021 (propagated-inputs
13022 `(("python-zope-interface" ,python-zope-interface)
13023 ("python-pyhamcrest" ,python-pyhamcrest)
13024 ("python-incremental" ,python-incremental)
13025 ("python-hyperlink" ,python-hyperlink)
13026 ("python-constantly" ,python-constantly)
13027 ("python-automat" ,python-automat)))
13028 (home-page "https://twistedmatrix.com/")
13029 (synopsis "Asynchronous networking framework written in Python")
13030 (description
13031 "Twisted is an extensible framework for Python programming, with special
13032 focus on event-based network programming and multiprotocol integration.")
13033 (license license:expat)))
13034
13035 (define-public python2-twisted
13036 (package-with-python2 python-twisted))
13037
13038 (define-public python-pika
13039 (package
13040 (name "python-pika")
13041 (version "0.12.0")
13042 (source
13043 (origin
13044 (method url-fetch)
13045 (uri (pypi-uri "pika" version))
13046 (sha256
13047 (base32
13048 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
13049 (build-system python-build-system)
13050 (native-inputs
13051 `(("python-pyev" ,python-pyev)
13052 ("python-tornado" ,python-tornado)
13053 ("python-twisted" ,python-twisted)))
13054 (home-page "https://pika.readthedocs.org")
13055 (synopsis "Pure Python AMQP Client Library")
13056 (description
13057 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
13058 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
13059 network support library.")
13060 (license license:bsd-3)))
13061
13062 (define-public python2-pika
13063 (package-with-python2 python-pika))
13064
13065 (define-public python-ply
13066 (package
13067 (name "python-ply")
13068 (version "3.11")
13069 (source
13070 (origin
13071 (method url-fetch)
13072 (uri (pypi-uri "ply" version))
13073 (sha256
13074 (base32
13075 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
13076 (build-system python-build-system)
13077 (home-page "http://www.dabeaz.com/ply/")
13078 (synopsis "Python Lex & Yacc")
13079 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
13080 It uses LR parsing and does extensive error checking.")
13081 (license license:bsd-3)))
13082
13083 (define-public python-tabulate
13084 (package
13085 (name "python-tabulate")
13086 (version "0.8.7")
13087 (source (origin
13088 (method url-fetch)
13089 (uri (pypi-uri "tabulate" version))
13090 (sha256
13091 (base32
13092 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
13093 (build-system python-build-system)
13094 (arguments
13095 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
13096 ;; and the latest release is not tagged in the upstream repository.
13097 '(#:tests? #f))
13098 (home-page "https://bitbucket.org/astanin/python-tabulate")
13099 (synopsis "Pretty-print tabular data")
13100 (description
13101 "Tabulate is a library and command-line utility to pretty-print tabular
13102 data in Python.")
13103 (license license:expat)))
13104
13105 (define-public python2-tabulate
13106 (package-with-python2 python-tabulate))
13107
13108 (define-public python-kazoo
13109 (package
13110 (name "python-kazoo")
13111 (version "2.4.0")
13112 (source
13113 (origin
13114 (method url-fetch)
13115 (uri (pypi-uri "kazoo" version))
13116 (sha256
13117 (base32
13118 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
13119 (build-system python-build-system)
13120 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
13121 (propagated-inputs
13122 `(("python-six" ,python-six)))
13123 (home-page "https://kazoo.readthedocs.org")
13124 (synopsis "High-level Zookeeper client library")
13125 (description
13126 "Kazoo is a Python client library for the Apache Zookeeper distributed
13127 application service. It is designed to be easy to use and to avoid common
13128 programming errors.")
13129 (license license:asl2.0)))
13130
13131 (define-public python2-kazoo
13132 (package-with-python2 python-kazoo))
13133
13134 (define-public python-pykafka
13135 (package
13136 (name "python-pykafka")
13137 (version "2.4.0")
13138 (source (origin
13139 (method url-fetch)
13140 (uri (pypi-uri "pykafka" version))
13141 (sha256
13142 (base32
13143 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
13144 (build-system python-build-system)
13145 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
13146 (propagated-inputs
13147 `(("python-gevent" ,python-gevent)
13148 ("python-kazoo" ,python-kazoo)
13149 ("python-tabulate" ,python-tabulate)))
13150 (inputs
13151 `(("librdkafka" ,librdkafka)))
13152 (home-page "https://pykafka.readthedocs.io/")
13153 (synopsis "Apache Kafka client for Python")
13154 (description
13155 "PyKafka is a client for the Apache Kafka distributed messaging system.
13156 It includes Python implementations of Kafka producers and consumers, which
13157 are optionally backed by a C extension built on librdkafka.")
13158 (license license:asl2.0)))
13159
13160 (define-public python-wcwidth
13161 (package
13162 (name "python-wcwidth")
13163 (version "0.1.8")
13164 (source (origin
13165 (method url-fetch)
13166 (uri (pypi-uri "wcwidth" version))
13167 (sha256
13168 (base32
13169 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
13170 (build-system python-build-system)
13171 (home-page "https://github.com/jquast/wcwidth")
13172 (synopsis "Measure number of terminal column cells of wide-character codes")
13173 (description "Wcwidth measures the number of terminal column cells of
13174 wide-character codes. It is useful for those implementing a terminal emulator,
13175 or programs that carefully produce output to be interpreted by one. It is a
13176 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
13177 specified in POSIX.1-2001 and POSIX.1-2008.")
13178 (license license:expat)))
13179
13180 (define-public python2-wcwidth
13181 (package-with-python2 python-wcwidth))
13182
13183 (define-public python2-jsonrpclib
13184 (package
13185 (name "python2-jsonrpclib")
13186 (version "0.1.7")
13187 (source (origin
13188 (method url-fetch)
13189 (uri (pypi-uri "jsonrpclib" version))
13190 (sha256
13191 (base32
13192 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
13193 (build-system python-build-system)
13194 (arguments
13195 `(#:tests? #f
13196 #:python ,python-2))
13197 (home-page "https://github.com/joshmarshall/jsonrpclib/")
13198 (synopsis "Implementation of JSON-RPC specification for Python")
13199 (description
13200 "This library is an implementation of the JSON-RPC specification.
13201 It supports both the original 1.0 specification, as well as the
13202 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
13203 etc.")
13204 (license license:asl2.0)))
13205
13206 (define-public python-chai
13207 (package
13208 (name "python-chai")
13209 (version "1.1.2")
13210 (source (origin
13211 (method url-fetch)
13212 (uri (pypi-uri "chai" version))
13213 (sha256
13214 (base32
13215 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
13216 (build-system python-build-system)
13217 (home-page "https://github.com/agoragames/chai")
13218 (synopsis "Mocking framework for Python")
13219 (description
13220 "Chai provides an api for mocking, stubbing and spying your python
13221 objects, patterned after the Mocha library for Ruby.")
13222 (license license:bsd-3)))
13223
13224 (define-public python2-chai
13225 (package-with-python2 python-chai))
13226
13227 (define-public python-inflection
13228 (package
13229 (name "python-inflection")
13230 (version "0.3.1")
13231 (source
13232 (origin (method url-fetch)
13233 (uri (pypi-uri "inflection" version))
13234 (sha256
13235 (base32
13236 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
13237 (build-system python-build-system)
13238 (native-inputs
13239 `(("python-pytest" ,python-pytest)))
13240 (home-page "https://github.com/jpvanhal/inflection")
13241 (synopsis "Python string transformation library")
13242 (description
13243 "Inflection is a string transformation library. It singularizes
13244 and pluralizes English words, and transforms strings from CamelCase to
13245 underscored string.")
13246 (license license:expat)))
13247
13248 (define-public python2-inflection
13249 (package-with-python2 python-inflection))
13250
13251 (define-public python-pylev
13252 (package
13253 (name "python-pylev")
13254 (version "1.3.0")
13255 (source (origin
13256 (method url-fetch)
13257 (uri (pypi-uri "pylev" version))
13258 (sha256
13259 (base32
13260 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
13261 (build-system python-build-system)
13262 (home-page "https://github.com/toastdriven/pylev")
13263 (synopsis "Levenshtein distance implementation in Python")
13264 (description "Pure Python Levenshtein implementation, based off the
13265 Wikipedia code samples at
13266 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
13267 (license license:bsd-3)))
13268
13269 (define-public python2-pylev
13270 (package-with-python2 python-pylev))
13271
13272 (define-public python-cleo
13273 (package
13274 (name "python-cleo")
13275 (version "0.8.1")
13276 (source (origin
13277 (method url-fetch)
13278 (uri (pypi-uri "cleo" version))
13279 (sha256
13280 (base32
13281 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
13282 (build-system python-build-system)
13283 (native-inputs
13284 `( ;; For testing
13285 ("python-mock" ,python-mock)
13286 ("python-pytest-mock" ,python-pytest-mock)
13287 ("python-pytest" ,python-pytest)))
13288 (propagated-inputs
13289 `(("python-backpack" ,python-backpack)
13290 ("python-clikit" ,python-clikit)
13291 ("python-pastel" ,python-pastel)
13292 ("python-pylev" ,python-pylev)))
13293 (home-page "https://github.com/sdispater/cleo")
13294 (synopsis "Command-line arguments library for Python")
13295 (description
13296 "Cleo allows you to create command-line commands with signature in
13297 docstring and colored output.")
13298 (license license:expat)))
13299
13300 (define-public python2-cleo
13301 (package-with-python2 python-cleo))
13302
13303 (define-public python-tomlkit
13304 (package
13305 (name "python-tomlkit")
13306 (version "0.7.0")
13307 (source
13308 (origin
13309 (method url-fetch)
13310 (uri (pypi-uri "tomlkit" version))
13311 (sha256
13312 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
13313 (build-system python-build-system)
13314 (native-inputs
13315 `(("python-pytest" ,python-pytest)
13316 ("python-pyyaml" ,python-pyyaml)))
13317 (home-page "https://github.com/sdispater/tomlkit")
13318 (synopsis "Style-preserving TOML library")
13319 (description
13320 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
13321 preserves all comments, indentations, whitespace and internal element ordering,
13322 and makes them accessible and editable via an intuitive API. It can also
13323 create new TOML documents from scratch using the provided helpers. Part of the
13324 implementation has been adapted, improved, and fixed from Molten.")
13325 (license license:expat)))
13326
13327 (define-public python-shellingham
13328 (package
13329 (name "python-shellingham")
13330 (version "1.3.2")
13331 (source
13332 (origin
13333 (method url-fetch)
13334 (uri (pypi-uri "shellingham" version))
13335 (sha256
13336 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
13337 (build-system python-build-system)
13338 (arguments
13339 `(#:phases
13340 (modify-phases %standard-phases
13341 (add-after 'unpack 'restore-setup.py
13342 ;; setup.py will return in the next release.
13343 ;; <https://github.com/sarugaku/shellingham/issues/33>
13344 (lambda _
13345 (with-output-to-file "setup.py"
13346 (lambda _
13347 (display "from setuptools import setup\nsetup()\n")))
13348 #t)))))
13349 (home-page "https://github.com/sarugaku/shellingham")
13350 (synopsis "Tool to detect surrounding shell")
13351 (description
13352 "Shellingham detects what shell the current Python executable is
13353 running in.")
13354 (license license:isc)))
13355
13356 (define-public python-memcached
13357 (package
13358 (name "python-memcached")
13359 (version "1.59")
13360 (source
13361 (origin
13362 (method url-fetch)
13363 (uri (pypi-uri "python-memcached" version))
13364 (sha256
13365 (base32
13366 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13367 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13368 (build-system python-build-system)
13369 (propagated-inputs `(("python-six" ,python-six)))
13370 (home-page
13371 "https://github.com/linsomniac/python-memcached")
13372 (synopsis "Pure python memcached client")
13373 (description
13374 "This software is a pure Python interface to the memcached memory cache
13375 daemon. It is the client side software which allows storing values in one or
13376 more, possibly remote, memcached servers.")
13377 (license license:psfl)))
13378
13379 (define-public python-clikit
13380 (package
13381 (name "python-clikit")
13382 (version "0.6.2")
13383 (source
13384 (origin
13385 (method url-fetch)
13386 (uri (pypi-uri "clikit" version))
13387 (sha256
13388 (base32
13389 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13390 (build-system python-build-system)
13391 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13392 (propagated-inputs
13393 `(("python-crashtest" ,python-crashtest)
13394 ("python-pastel" ,python-pastel)
13395 ("python-pylev" ,python-pylev)))
13396 (home-page "https://github.com/sdispater/clikit")
13397 (synopsis "Group of utilities to build command line interfaces")
13398 (description
13399 "CliKit is a group of utilities to build testable command line
13400 interfaces.")
13401 (properties `((python2-variant . ,(delay python2-clikit))))
13402 (license license:expat)))
13403
13404 (define-public python2-clikit
13405 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13406 (package/inherit
13407 base
13408 (propagated-inputs
13409 `(("python-enum34" ,python2-enum34)
13410 ("python-typing" ,python2-typing)
13411 ,@(package-propagated-inputs base))))))
13412
13413 (define-public python-msgpack-python
13414 (package
13415 (name "python-msgpack-python")
13416 (version "0.5.6")
13417 (source
13418 (origin
13419 (method url-fetch)
13420 (uri (pypi-uri "msgpack-python" version))
13421 (sha256
13422 (base32
13423 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13424 (build-system python-build-system)
13425 (home-page "https://msgpack.org/")
13426 (synopsis "Package to deserialize messages in MessagePack binary format")
13427 (description
13428 "MessagePack is an efficient binary serialization format. It lets you
13429 exchange data among multiple languages like JSON. But it's faster and
13430 smaller. Small integers are encoded into a single byte, and typical short
13431 strings require only one extra byte in addition to the strings themselves.")
13432 (license license:asl2.0)))
13433
13434 (define-public python-cachy
13435 (package
13436 (name "python-cachy")
13437 (version "0.3.0")
13438 (source
13439 (origin
13440 (method url-fetch)
13441 (uri (pypi-uri "cachy" version))
13442 (sha256
13443 (base32
13444 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13445 (build-system python-build-system)
13446 (arguments
13447 '(#:phases
13448 (modify-phases %standard-phases
13449 (replace 'check
13450 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13451 "pytest"))))))
13452 (native-inputs
13453 `(("memcached" ,memcached)
13454 ("python-fakeredis" ,python-fakeredis)
13455 ("python-flexmock" ,python-flexmock)
13456 ("python-pifpaf" ,python-pifpaf)
13457 ("python-pytest" ,python-pytest)))
13458 (propagated-inputs
13459 `(("python-memcached" ,python-memcached)
13460 ("python-msgpack-python" ,python-msgpack-python)
13461 ("python-redis" ,python-redis)))
13462 (home-page "https://github.com/sdispater/cachy")
13463 (synopsis "Simple yet effective caching library")
13464 (description
13465 "Cachy provides a simple yet effective caching library. A simple but
13466 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13467 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13468 (license license:expat)))
13469
13470 (define-public poetry
13471 (package
13472 (name "poetry")
13473 (version "1.1.4")
13474 ;; Poetry can only be built from source with Poetry.
13475 (source
13476 (origin
13477 (method url-fetch)
13478 (uri (pypi-uri "poetry" version))
13479 (sha256
13480 (base32
13481 "1a2kgfiw66fvxhlqk5qc83s6l38czfh5hcsrbiy7qq5yfc8mlsll"))))
13482 (build-system python-build-system)
13483 (arguments
13484 `(#:tests? #f ;; Pypi does not have tests.
13485 #:phases
13486 (modify-phases %standard-phases
13487 (add-before 'build 'patch-setup-py
13488 (lambda _
13489 (substitute* "setup.py"
13490 ;; Allow newer versions of python-keyring.
13491 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
13492 ;; TODO: remove after the next release cycle,
13493 ;; when packaging has been updated.
13494 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
13495 #t)))))
13496 (propagated-inputs
13497 `(("python-cachecontrol" ,python-cachecontrol)
13498 ("python-cachy" ,python-cachy)
13499 ("python-cleo" ,python-cleo)
13500 ("python-clikit" ,python-clikit)
13501 ("python-html5lib" ,python-html5lib)
13502 ("python-keyring" ,python-keyring)
13503 ("python-msgpack-transitional" ,python-msgpack-transitional)
13504 ("python-packaging" ,python-packaging)
13505 ("python-pexpect" ,python-pexpect)
13506 ("python-pip" ,python-pip)
13507 ("python-pkginfo" ,python-pkginfo)
13508 ("python-poetry-core" ,python-poetry-core)
13509 ("python-requests" ,python-requests)
13510 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
13511 ("python-shellingham" ,python-shellingham)
13512 ("python-tomlkit" ,python-tomlkit)
13513 ("python-virtualenv" ,python-virtualenv)))
13514 (home-page "https://python-poetry.org")
13515 (synopsis "Python dependency management and packaging made easy")
13516 (description "Poetry is a tool for dependency management and packaging
13517 in Python. It allows you to declare the libraries your project depends on and
13518 it will manage (install/update) them for you.")
13519 (license license:expat)))
13520
13521 (define-public python-lark-parser
13522 (package
13523 (name "python-lark-parser")
13524 (version "0.9.0")
13525 (source (origin
13526 (method url-fetch)
13527 (uri (pypi-uri "lark-parser" version))
13528 (sha256
13529 (base32
13530 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13531 (build-system python-build-system)
13532 (home-page "https://github.com/lark-parser/lark")
13533 (synopsis "Multi-language parser for Python")
13534 (description
13535 "Lark is a parser built with a focus on ergonomics, performance and
13536 resilience. Lark can parse all context-free languages. That means it is
13537 capable of parsing almost any programming language out there, and to
13538 some degree most natural languages too.")
13539 (license license:expat)))
13540
13541 (define-public python-libcst
13542 (package
13543 (name "python-libcst")
13544 (version "0.3.8")
13545 (source (origin
13546 (method url-fetch)
13547 (uri (pypi-uri "libcst" version))
13548 (sha256
13549 (base32
13550 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13551 (build-system python-build-system)
13552 (arguments
13553 `(#:phases
13554 (modify-phases %standard-phases
13555 (add-after 'unpack 'remove-failing-tests
13556 (lambda _
13557 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13558 (delete-file "libcst/tests/test_fuzz.py")
13559 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13560 (delete-file "libcst/tests/test_pyre_integration.py")
13561 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13562 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13563 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13564 #t))
13565 (add-before 'check 'generate-test-data
13566 (lambda _
13567 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13568 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13569 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13570 (replace 'check
13571 (lambda _
13572 (invoke "python" "-m" "unittest")
13573 #t)))))
13574 (native-inputs
13575 `(("python-black" ,python-black)
13576 ("python-isort" ,python-isort)))
13577 (propagated-inputs
13578 `(("python-typing-extensions" ,python-typing-extensions)
13579 ("python-typing-inspect" ,python-typing-inspect)
13580 ("python-pyyaml" ,python-pyyaml)))
13581 (home-page "https://github.com/Instagram/LibCST")
13582 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13583 (description
13584 "LibCST parses Python source code as a CST tree that keeps all
13585 formatting details (comments, whitespaces, parentheses, etc). It's useful
13586 for building automated refactoring (codemod) applications and linters.
13587 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13588 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13589 naming node types and fields, LibCST creates a lossless CST that looks and
13590 feels like an AST.")
13591 (license (list license:expat
13592 ;; Some files unde libcst/_parser/ are under Python Software
13593 ;; Foundation license (see LICENSE file for details)
13594 license:psfl
13595 ;; libcst/_add_slots.py
13596 license:asl2.0))))
13597
13598 (define-public python-typing-inspect
13599 (package
13600 (name "python-typing-inspect")
13601 (version "0.6.0")
13602 (source (origin
13603 (method url-fetch)
13604 (uri (pypi-uri "typing_inspect" version))
13605 (sha256
13606 (base32
13607 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13608 (build-system python-build-system)
13609 (propagated-inputs
13610 `(("python-mypy-extensions" ,python-mypy-extensions)
13611 ("python-typing-extensions" ,python-typing-extensions)))
13612 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13613 (synopsis "API for inspection of types in the Python @code{typing} module")
13614 (description
13615 "The @code{typing_inspect} module defines experimental API for runtime
13616 inspection of types defined in the Python standard typing module.")
13617 (license license:expat)))
13618
13619 (define-public python-lazy-object-proxy
13620 (package
13621 (name "python-lazy-object-proxy")
13622 (version "1.5.1")
13623 (source (origin
13624 (method url-fetch)
13625 (uri (pypi-uri "lazy-object-proxy" version))
13626 (sha256
13627 (base32
13628 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13629 (native-inputs
13630 `(("python-setuptools-scm" ,python-setuptools-scm)))
13631 (build-system python-build-system)
13632 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13633 (synopsis "Lazy object proxy for python")
13634 (description
13635 "Lazy object proxy is an object that wraps a callable but defers the call
13636 until the object is actually required, and caches the result of said call.")
13637 (license license:bsd-2)))
13638
13639 (define-public python2-lazy-object-proxy
13640 (package-with-python2 python-lazy-object-proxy))
13641
13642 (define-public python-dnspython
13643 (package
13644 (name "python-dnspython")
13645 (version "2.0.0")
13646 (source (origin
13647 (method url-fetch)
13648 (uri (pypi-uri "dnspython" version ".zip"))
13649 (sha256
13650 (base32
13651 "1dyip5ygqqhrgcaiy7qzjpndl9xciip186paxqwkm726fj9z0jh4"))))
13652 (build-system python-build-system)
13653 (native-inputs `(("unzip" ,unzip)))
13654 (arguments '(#:tests? #f)) ; XXX: requires internet access
13655 (home-page "https://www.dnspython.org")
13656 (synopsis "DNS toolkit for Python")
13657 (description
13658 "dnspython is a DNS toolkit for Python. It supports almost all record
13659 types. It can be used for queries, zone transfers, and dynamic updates.
13660 It supports TSIG authenticated messages and EDNS0.")
13661 (license license:expat)))
13662
13663 (define-public python-dnspython-1.16
13664 (package
13665 (inherit python-dnspython)
13666 (version "1.16.0")
13667 (source (origin
13668 (method url-fetch)
13669 (uri (string-append "http://www.dnspython.org/kits/"
13670 version "/dnspython-" version ".tar.gz"))
13671 (sha256
13672 (base32
13673 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13674 (native-inputs '())))
13675
13676 (define-public python2-dnspython-1.16
13677 (package-with-python2 python-dnspython-1.16))
13678
13679 (define-public python-py3dns
13680 (package
13681 (name "python-py3dns")
13682 (version "3.2.1")
13683 (source
13684 (origin
13685 (method url-fetch)
13686 (uri (pypi-uri "py3dns" version))
13687 (sha256
13688 (base32
13689 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13690 (build-system python-build-system)
13691 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13692 ;; removing functionality so we copy from Nix and "just don't build it".
13693 (arguments
13694 `(#:phases
13695 (modify-phases %standard-phases
13696 (add-after 'unpack 'patch-source
13697 (lambda _
13698 (substitute* "setup.py"
13699 (("import DNS") "")
13700 (("DNS.__version__") (string-append "\"" ,version "\"")))
13701 #t)))
13702 #:tests? #f)) ; Also skip the tests.
13703 (home-page "https://launchpad.net/py3dns")
13704 (synopsis "Python 3 DNS library")
13705 (description "This Python 3 module provides a DNS API for looking up DNS
13706 entries from within Python 3 modules and applications. This module is a
13707 simple, lightweight implementation.")
13708 (license license:psfl)))
13709
13710 (define-public python-email-validator
13711 (package
13712 (name "python-email-validator")
13713 (version "1.0.2")
13714 (source
13715 (origin (method url-fetch)
13716 (uri (pypi-uri "email_validator" version))
13717 (sha256
13718 (base32
13719 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13720 (build-system python-build-system)
13721 (arguments
13722 '(#:phases
13723 (modify-phases %standard-phases
13724 (add-before 'build 'use-dnspython
13725 (lambda _
13726 (substitute* "setup.py"
13727 (("dnspython3") "dnspython"))
13728 #t)))))
13729 (propagated-inputs
13730 `(("python-dnspython" ,python-dnspython)
13731 ("python-idna" ,python-idna)))
13732 (home-page "https://github.com/JoshData/python-email-validator")
13733 (synopsis "Email address validation library for Python")
13734 (description
13735 "This library validates email address syntax and deliverability.")
13736 (license license:cc0)))
13737
13738 (define-public python2-email-validator
13739 (package-with-python2 python-email-validator))
13740
13741 (define-public python-ukpostcodeparser
13742 (package
13743 (name "python-ukpostcodeparser")
13744 (version "1.0.3")
13745 (source (origin
13746 (method url-fetch)
13747 (uri (pypi-uri "UkPostcodeParser" version))
13748 (sha256
13749 (base32
13750 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13751 (build-system python-build-system)
13752 (home-page "https://github.com/hamstah/ukpostcodeparser")
13753 (synopsis "UK Postcode parser for Python")
13754 (description
13755 "This library provides the @code{parse_uk_postcode} function for
13756 parsing UK postcodes.")
13757 (license license:expat)))
13758
13759 (define-public python2-ukpostcodeparser
13760 (package-with-python2 python-ukpostcodeparser))
13761
13762 (define-public python-faker
13763 (package
13764 (name "python-faker")
13765 (version "4.0.2")
13766 (source (origin
13767 (method url-fetch)
13768 (uri (pypi-uri "Faker" version))
13769 (sha256
13770 (base32
13771 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13772 (build-system python-build-system)
13773 (arguments
13774 '(#:phases
13775 (modify-phases %standard-phases
13776 (replace 'check
13777 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13778 (native-inputs
13779 `(;; For testing
13780 ("python-freezegun" ,python-freezegun)
13781 ("python-pytest" ,python-pytest)
13782 ("python-random2" ,python-random2)
13783 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13784 ("python-validators" ,python-validators)))
13785 (propagated-inputs
13786 `(("python-dateutil" ,python-dateutil)
13787 ("python-text-unidecode" ,python-text-unidecode)))
13788 (home-page "https://github.com/joke2k/faker")
13789 (synopsis "Python package that generates fake data")
13790 (description
13791 "Faker is a Python package that generates fake data such as names,
13792 addresses, and phone numbers.")
13793 (license license:expat)
13794 (properties `((python2-variant . ,(delay python2-faker))))))
13795
13796 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13797 (define-public python2-faker
13798 (let ((base (package-with-python2 (strip-python2-variant
13799 python-faker))))
13800 (package
13801 (inherit base)
13802 (version "3.0.1")
13803 (source (origin
13804 (method url-fetch)
13805 (uri (pypi-uri "Faker" version))
13806 (sha256
13807 (base32
13808 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13809 (native-inputs
13810 `(("python-mock" ,python2-mock)
13811 ,@(package-native-inputs base)))
13812 (propagated-inputs
13813 `(("python2-ipaddress" ,python2-ipaddress)
13814 ("python2-six" ,python2-six)
13815 ,@(package-propagated-inputs base))))))
13816
13817 (define-public python-pyaml
13818 (package
13819 (name "python-pyaml")
13820 (version "18.11.0")
13821 (source (origin
13822 (method url-fetch)
13823 (uri (pypi-uri "pyaml" version))
13824 (sha256
13825 (base32
13826 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13827 (build-system python-build-system)
13828 (native-inputs
13829 `(("python-unidecode" ,python-unidecode)))
13830 (propagated-inputs
13831 `(("python-pyyaml" ,python-pyyaml)))
13832 (home-page "https://github.com/mk-fg/pretty-yaml")
13833 (synopsis "YAML pretty-print library for Python")
13834 (description
13835 "pyaml is a PyYAML based python module to produce pretty and readable
13836 YAML-serialized data.")
13837 (license license:wtfpl2)))
13838
13839 (define-public python2-pyaml
13840 (package-with-python2 python-pyaml))
13841
13842 (define-public python-backpack
13843 (package
13844 (name "python-backpack")
13845 (version "0.1")
13846 (source
13847 (origin
13848 (method url-fetch)
13849 (uri (pypi-uri "backpack" version))
13850 (sha256
13851 (base32
13852 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13853 (build-system python-build-system)
13854 (native-inputs
13855 `(("python-pytest" ,python-pytest)
13856 ("python-nose" ,python-nose)))
13857 (propagated-inputs
13858 `(("python-simplejson" ,python-simplejson)))
13859 (home-page "https://github.com/sdispater/backpack")
13860 (synopsis "Utilities for working with Python collections")
13861 (description "Backpack provides some useful utilities for working with
13862 collections of data.")
13863 (license license:expat)))
13864
13865 (define-public python2-backpack
13866 (package-with-python2 python-backpack))
13867
13868 (define-public python-prompt-toolkit
13869 (package
13870 (name "python-prompt-toolkit")
13871 (version "3.0.9")
13872 (source
13873 (origin
13874 (method url-fetch)
13875 (uri (pypi-uri "prompt_toolkit" version))
13876 (sha256
13877 (base32 "0bvjp62cs6aj9lrh7njzxdjgg8pjfw3qgmr551243d9ivmcapvn5"))))
13878 (build-system python-build-system)
13879 (arguments
13880 `(#:phases
13881 (modify-phases %standard-phases
13882 (delete 'check)
13883 (add-after 'install 'post-install-check
13884 (lambda* (#:key inputs outputs #:allow-other-keys)
13885 ;; HOME is needed for the test
13886 ;; "test_pathcompleter_can_expanduser".
13887 (setenv "HOME" "/tmp")
13888 (add-installed-pythonpath inputs outputs)
13889 (invoke "py.test"))))))
13890 (propagated-inputs
13891 `(("python-wcwidth" ,python-wcwidth)))
13892 (native-inputs
13893 `(("python-pytest" ,python-pytest)))
13894 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
13895 (synopsis "Library for building command line interfaces in Python")
13896 (description
13897 "Prompt-Toolkit is a library for building interactive command line
13898 interfaces in Python. It's like GNU Readline but it also features syntax
13899 highlighting while typing, out-of-the-box multi-line input editing, advanced
13900 code completion, incremental search, support for Chinese double-width
13901 characters, mouse support, and auto suggestions.")
13902 (license license:bsd-3)
13903 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
13904
13905 (define-public python-prompt-toolkit-2
13906 (package (inherit python-prompt-toolkit)
13907 (name "python-prompt-toolkit")
13908 (version "2.0.7")
13909 (source
13910 (origin
13911 (method url-fetch)
13912 (uri (pypi-uri "prompt_toolkit" version))
13913 (sha256
13914 (base32
13915 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13916 (propagated-inputs
13917 `(("python-wcwidth" ,python-wcwidth)
13918 ("python-six" ,python-six)
13919 ("python-pygments" ,python-pygments)))
13920 (properties '())))
13921
13922 (define-public python2-prompt-toolkit
13923 (package-with-python2 python-prompt-toolkit-2))
13924
13925 (define-public python-prompt-toolkit-1
13926 (package (inherit python-prompt-toolkit-2)
13927 (version "1.0.15")
13928 (source
13929 (origin
13930 (method url-fetch)
13931 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13932 (sha256
13933 (base32
13934 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13935
13936 (define-public python2-prompt-toolkit-1
13937 (package-with-python2 python-prompt-toolkit-1))
13938
13939 (define-public python-jedi
13940 (package
13941 (name "python-jedi")
13942 (version "0.17.2")
13943 (source
13944 (origin
13945 (method url-fetch)
13946 (uri (pypi-uri "jedi" version))
13947 (sha256
13948 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13949 (build-system python-build-system)
13950 (arguments
13951 `(#:phases
13952 (modify-phases %standard-phases
13953 (replace 'check
13954 (lambda* (#:key tests? #:allow-other-keys)
13955 (when tests?
13956 (setenv "HOME" "/tmp")
13957 (invoke "python" "-m" "pytest" "-vv"))
13958 #t)))))
13959 (native-inputs
13960 `(("python-pytest" ,python-pytest)
13961 ("python-docopt" ,python-docopt)))
13962 (propagated-inputs
13963 `(("python-parso" ,python-parso)))
13964 (home-page "https://github.com/davidhalter/jedi")
13965 (synopsis "Autocompletion and static analysis library for Python")
13966 (description
13967 "Jedi is a static analysis tool for Python that can be used in Integrated
13968 Development Environments (@dfn{IDE}s) and text editors. It understands Python
13969 on a deeper level than many other static analysis frameworks for Python.
13970
13971 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13972 well.")
13973 (license license:expat)))
13974
13975 (define-public python2-jedi
13976 (package-with-python2 python-jedi))
13977
13978 (define-public ptpython
13979 (package
13980 (name "ptpython")
13981 (version "3.0.5")
13982 (source (origin
13983 (method url-fetch)
13984 (uri (pypi-uri "ptpython" version))
13985 (sha256
13986 (base32
13987 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
13988 (build-system python-build-system)
13989 (arguments
13990 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13991 (propagated-inputs
13992 `(("python-appdirs" ,python-appdirs)
13993 ("python-jedi" ,python-jedi)
13994 ("python-prompt-toolkit" ,python-prompt-toolkit)
13995 ("python-pygments" ,python-pygments)))
13996 (home-page "https://github.com/jonathanslenders/ptpython")
13997 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
13998 (description
13999 "ptpython is a Python read-eval-print loop with IDE-like features.
14000 It supports syntax highlighting, multiline editing, autocompletion, mouse,
14001 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
14002 etc.")
14003 (license license:bsd-3)
14004 (properties `((python2-variant . ,(delay ptpython-2))))))
14005
14006 (define-public ptpython-2
14007 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
14008 (package
14009 (inherit base)
14010 (name "ptpython2"))))
14011
14012 (define-public python-stem
14013 (package
14014 (name "python-stem")
14015 (version "1.8.0")
14016 (source
14017 (origin
14018 (method url-fetch)
14019 (uri (pypi-uri "stem" version))
14020 (sha256
14021 (base32
14022 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
14023 (build-system python-build-system)
14024 (arguments
14025 `(#:phases
14026 (modify-phases %standard-phases
14027 (replace 'check
14028 (lambda _
14029 (invoke "./run_tests.py" "--unit")
14030 #t)))))
14031 (native-inputs
14032 `(("python-mock" ,python-mock)
14033 ("python-pycodestyle" ,python-pycodestyle)
14034 ("python-pyflakes" ,python-pyflakes)))
14035 (home-page "https://stem.torproject.org/")
14036 (synopsis
14037 "Python controller library that allows applications to interact with Tor")
14038 (description
14039 "Stem is a Python controller library for Tor. With it you can use Tor's
14040 control protocol to script against the Tor process and read descriptor data
14041 relays publish about themselves.")
14042 (license license:lgpl3)))
14043
14044 (define-public python2-stem
14045 (package-with-python2 python-stem))
14046
14047 (define-public python-pyserial
14048 (package
14049 (name "python-pyserial")
14050 (version "3.4")
14051 (source
14052 (origin
14053 (method url-fetch)
14054 (uri (pypi-uri "pyserial" version))
14055 (sha256
14056 (base32
14057 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
14058 (build-system python-build-system)
14059 (arguments
14060 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
14061 ;; #:phases
14062 ;; (modify-phases %standard-phases
14063 ;; (replace 'check
14064 ;; (lambda _
14065 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
14066 (home-page
14067 "https://github.com/pyserial/pyserial")
14068 (synopsis "Python Serial Port Bindings")
14069 (description "@code{pyserial} provide serial port bindings for Python. It
14070 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
14071 and/or Xon/Xoff. The port is accessed in RAW mode.")
14072 (license license:bsd-3)))
14073
14074 (define-public python2-pyserial
14075 (package-with-python2 python-pyserial))
14076
14077 (define-public python-kivy
14078 (package
14079 (name "python-kivy")
14080 (version "1.10.1")
14081 (source
14082 (origin
14083 (method url-fetch)
14084 (uri (pypi-uri "Kivy" version))
14085 (file-name (string-append name "-" version ".tar.gz"))
14086 (sha256
14087 (base32
14088 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
14089 (build-system python-build-system)
14090 (arguments
14091 `(#:tests? #f ; Tests require many optional packages
14092 #:phases
14093 (modify-phases %standard-phases
14094 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
14095 (lambda* (#:key inputs #:allow-other-keys)
14096 (setenv "KIVY_SDL2_PATH"
14097 (string-append (assoc-ref inputs "sdl-union")
14098 "/include/SDL2"))
14099 #t)))))
14100 (native-inputs
14101 `(("pkg-config" ,pkg-config)
14102 ("python-cython" ,python-cython)))
14103 (inputs
14104 `(("gstreamer" ,gstreamer)
14105 ("mesa" ,mesa)
14106 ("sdl-union"
14107 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
14108 (home-page "https://kivy.org")
14109 (synopsis
14110 "Multitouch application framework")
14111 (description
14112 "A software library for rapid development of
14113 hardware-accelerated multitouch applications.")
14114 (license license:expat)))
14115
14116 (define-public python2-kivy
14117 (package-with-python2 python-kivy))
14118
14119 (define-public python-binaryornot
14120 (package
14121 (name "python-binaryornot")
14122 (version "0.4.4")
14123 (source (origin
14124 (method url-fetch)
14125 (uri (pypi-uri "binaryornot" version))
14126 (sha256
14127 (base32
14128 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
14129 (build-system python-build-system)
14130 (arguments
14131 `(#:phases
14132 (modify-phases %standard-phases
14133 (add-after 'unpack 'patch-tests
14134 (lambda _
14135 ;; TypeError: binary() got an unexpected keyword argument
14136 ;; 'average_size'.
14137 (substitute* "tests/test_check.py"
14138 (("average_size=512") ""))
14139 #t)))))
14140 (propagated-inputs
14141 `(("python-chardet" ,python-chardet)
14142 ("python-hypothesis" ,python-hypothesis)))
14143 (home-page "https://github.com/audreyr/binaryornot")
14144 (synopsis "Package to check if a file is binary or text")
14145 (description "Ultra-lightweight pure Python package to check if a file is
14146 binary or text.")
14147 (license license:bsd-3)
14148 (properties `((python2-variant . ,(delay python2-binaryornot))))))
14149
14150 (define-public python2-binaryornot
14151 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
14152 (package (inherit base)
14153 (propagated-inputs
14154 `(("python2-enum34" ,python2-enum34)
14155 ,@(package-propagated-inputs base))))))
14156
14157 (define-public python-binwalk
14158 (package
14159 (name "python-binwalk")
14160 (version "2.2.0")
14161 (source
14162 (origin
14163 (method git-fetch)
14164 (uri (git-reference
14165 (url "https://github.com/ReFirmLabs/binwalk")
14166 (commit (string-append "v" version))))
14167 (file-name (git-file-name name version))
14168 (sha256
14169 (base32
14170 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
14171 (build-system python-build-system)
14172 (arguments
14173 `(#:phases
14174 (modify-phases %standard-phases
14175 (add-before 'check 'set-pythonpath
14176 (lambda _
14177 (setenv "PYTHONPATH"
14178 (string-append
14179 (getcwd) "/src/"
14180 ":" (getenv "PYTHONPATH")))
14181 (setenv "HOME" "")
14182 #t)))))
14183 (native-inputs
14184 `(("python-coverage" ,python-coverage)
14185 ("python-nose" ,python-nose)))
14186 (home-page "https://github.com/ReFirmLabs/binwalk")
14187 (synopsis "Firmware analysis tool")
14188 (description "Binwalk is a tool for analyzing, reverse engineering, and
14189 extracting firmware images")
14190 (license license:expat)))
14191
14192 (define-public python-nltk
14193 (package
14194 (name "python-nltk")
14195 (version "3.2.1")
14196 (source (origin
14197 (method url-fetch)
14198 (uri (pypi-uri "nltk" version))
14199 (sha256
14200 (base32
14201 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
14202 (build-system python-build-system)
14203 (arguments
14204 '(;; The tests require some extra resources to be downloaded.
14205 ;; TODO Try packaging these resources.
14206 #:tests? #f))
14207 (home-page "http://nltk.org/")
14208 (synopsis "Natural Language Toolkit")
14209 (description "It provides interfaces to over 50 corpora and lexical
14210 resources such as WordNet, along with a suite of text processing libraries
14211 for classification, tokenization, stemming, tagging, parsing, and semantic
14212 reasoning, wrappers for natural language processing libraries.")
14213 (license license:asl2.0)))
14214
14215 (define-public python2-nltk
14216 (package-with-python2 python-nltk))
14217
14218 (define-public python-pymongo
14219 (package
14220 (name "python-pymongo")
14221 (version "3.7.2")
14222 (source (origin
14223 (method url-fetch)
14224 (uri (pypi-uri "pymongo" version))
14225 (sha256
14226 (base32
14227 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
14228 (build-system python-build-system)
14229 (propagated-inputs
14230 `(("python-certifi" ,python-certifi)))
14231 (home-page "https://github.com/mongodb/mongo-python-driver")
14232 (synopsis "Python driver for MongoDB")
14233 (description "Python driver for MongoDB.")
14234 (license license:asl2.0)))
14235
14236 (define-public python2-pymongo
14237 (package-with-python2 python-pymongo))
14238
14239 (define-public python-consul
14240 (package
14241 (name "python-consul")
14242 (version "0.6.1")
14243 (source
14244 (origin
14245 (method url-fetch)
14246 (uri (pypi-uri "python-consul" version))
14247 (sha256
14248 (base32
14249 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
14250 (build-system python-build-system)
14251 (arguments
14252 '(#:tests? #f)) ; The tests are not distributed
14253 (propagated-inputs
14254 `(("python-requests" ,python-requests)
14255 ("python-six" ,python-six)))
14256 (home-page "https://github.com/cablehead/python-consul")
14257 (synopsis "Python client for Consul")
14258 (description
14259 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
14260 discovery, monitoring and configuration.")
14261 (license license:expat)))
14262
14263 (define-public python2-consul
14264 (package-with-python2 python-consul))
14265
14266 (define-public python-schematics
14267 (package
14268 (name "python-schematics")
14269 (version "1.1.1")
14270 (source
14271 (origin
14272 (method git-fetch)
14273 (uri (git-reference
14274 (url "https://github.com/schematics/schematics")
14275 (commit (string-append "v" version))))
14276 (file-name (git-file-name name version))
14277 (sha256
14278 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
14279 (build-system python-build-system)
14280 (propagated-inputs
14281 `(("python-six" ,python-six)))
14282 (arguments
14283 ;; The tests require a bunch of not very nice packages with fixed
14284 ;; version requirements (e.g. python-coveralls).
14285 `(#:tests? #f))
14286 (home-page "https://github.com/schematics/schematics")
14287 (synopsis "Python Data Structures for Humans")
14288 (description "Python Data Structures for Humans.")
14289 (license license:bsd-3)))
14290
14291 (define-public python2-schematics
14292 (package-with-python2 python-schematics))
14293
14294 (define-public python-odfpy
14295 (package
14296 (name "python-odfpy")
14297 (version "1.4.1")
14298 (source (origin
14299 (method url-fetch)
14300 (uri (pypi-uri "odfpy" version))
14301 (sha256
14302 (base32
14303 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
14304 (arguments
14305 `(#:phases
14306 (modify-phases %standard-phases
14307 (replace 'check
14308 (lambda _
14309 (setenv "PYTHONPATH" (string-append "./build/lib:"
14310 (getenv "PYTHONPATH")))
14311 (invoke "pytest" "-vv"))))))
14312 (build-system python-build-system)
14313 (native-inputs
14314 `(("python-pytest" ,python-pytest)))
14315 (propagated-inputs
14316 `(("python-defusedxml" ,python-defusedxml)))
14317 (home-page "https://github.com/eea/odfpy")
14318 (synopsis "Python API and tools to manipulate OpenDocument files")
14319 (description "Collection of libraries and utility programs written in
14320 Python to manipulate OpenDocument 1.2 files.")
14321 (license
14322 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
14323 ;; number of files with other licenses.
14324 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
14325
14326 (define-public python2-odfpy
14327 (package-with-python2 python-odfpy))
14328
14329 (define-public python-natsort
14330 (package
14331 (name "python-natsort")
14332 (version "7.0.1")
14333 (source (origin
14334 (method url-fetch)
14335 (uri (pypi-uri "natsort" version))
14336 (sha256
14337 (base32
14338 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14339 (build-system python-build-system)
14340 (arguments
14341 `(#:modules ((guix build utils)
14342 (guix build python-build-system)
14343 (srfi srfi-1)
14344 (srfi srfi-26)
14345 (ice-9 ftw))
14346 #:phases
14347 (modify-phases %standard-phases
14348 (add-before 'check 'set-cachedir
14349 ;; Tests require write access to $HOME by default
14350 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14351 (replace 'check
14352 (lambda _
14353 (let ((cwd (getcwd)))
14354 (setenv "PYTHONPATH"
14355 (string-append
14356 cwd "/build/"
14357 (find (cut string-prefix? "lib" <>)
14358 (scandir (string-append cwd "/build")))
14359 ":"
14360 (getenv "PYTHONPATH")))
14361 (invoke "pytest" "-v")))))))
14362 (native-inputs
14363 `(("python-hypothesis" ,python-hypothesis)
14364 ("python-pytest-cov" ,python-pytest-cov)
14365 ("python-pytest-mock" ,python-pytest-mock)
14366 ("python-pytest" ,python-pytest)))
14367 (propagated-inputs ; TODO: Add python-fastnumbers.
14368 `(("python-pyicu" ,python-pyicu)))
14369 (home-page "https://github.com/SethMMorton/natsort")
14370 (synopsis "Natural sorting for python and shell")
14371 (description
14372 "Natsort lets you apply natural sorting on lists instead of
14373 lexicographical. If you use the built-in @code{sorted} method in python
14374 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14375 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14376 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14377 identifies numbers and sorts them separately from strings. It can also sort
14378 version numbers, real numbers, mixed types and more, and comes with a shell
14379 command @command{natsort} that exposes this functionality in the command line.")
14380 (license license:expat)
14381 (properties `((python2-variant . ,(delay python2-natsort))))))
14382
14383 ;; Natsort 6.x are the last versions with support for Python 2.
14384 (define-public python2-natsort
14385 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14386 (package (inherit base)
14387 (version "6.2.1")
14388 (source (origin
14389 (method url-fetch)
14390 (uri (pypi-uri "natsort" version))
14391 (sha256
14392 (base32
14393 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14394 (native-inputs
14395 `(("python2-pathlib" ,python2-pathlib)
14396 ,@(package-native-inputs base))))))
14397
14398 (define-public glances
14399 (package
14400 (name "glances")
14401 (version "3.1.4")
14402 (source
14403 (origin
14404 (method url-fetch)
14405 (uri (pypi-uri "Glances" version))
14406 (sha256
14407 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
14408 (modules '((guix build utils)))
14409 (snippet
14410 '(begin
14411 ;; Glances phones PyPI for weekly update checks by default.
14412 ;; Disable these. The user can re-enable them if desired.
14413 (substitute* "glances/outdated.py"
14414 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14415 (string-append indentation
14416 "self.args.disable_check_update = True\n"
14417 line)))
14418 #t))))
14419 (build-system python-build-system)
14420 (propagated-inputs
14421 `(("python-future" ,python-future)
14422 ("python-psutil" ,python-psutil)))
14423 (home-page "https://github.com/nicolargo/glances")
14424 (synopsis "Cross-platform curses-based monitoring tool")
14425 (description
14426 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14427 Glances uses the PsUtil library to get information from your system. It
14428 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14429 (license license:lgpl3+)))
14430
14431 (define-public python-glances
14432 (deprecated-package "python-glances" glances))
14433
14434 (define-public python-graphql-core
14435 (package
14436 (name "python-graphql-core")
14437 (version "3.1.2")
14438 (source
14439 (origin
14440 (method url-fetch)
14441 (uri (pypi-uri "graphql-core" version))
14442 (sha256
14443 (base32
14444 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
14445 (build-system python-build-system)
14446 (arguments
14447 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14448 #:phases
14449 (modify-phases %standard-phases
14450 (add-after 'unpack 'patch-hardcoded-version
14451 (lambda _ (substitute*
14452 "setup.py"
14453 (("'gevent==1.1rc1'") "'gevent'"))
14454 #t)))))
14455 (native-inputs
14456 `(("python-gevent" ,python-gevent)
14457 ("python-mock" ,python-mock)
14458 ("python-pytest-mock" ,python-pytest-mock)))
14459 (propagated-inputs
14460 `(("python-promise" ,python-promise)
14461 ("python-six" ,python-six)))
14462 (home-page "https://github.com/graphql-python/graphql-core")
14463 (synopsis "GraphQL implementation for Python")
14464 (description
14465 "GraphQL implementation for Python. GraphQL is a data query language and
14466 runtime designed and used to request and deliver data to mobile and web apps.
14467 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14468 to Python.")
14469 (license license:expat)))
14470
14471 (define-public python2-graphql-core
14472 (package-with-python2 python-graphql-core))
14473
14474 (define-public python-graphql-relay
14475 (package
14476 (name "python-graphql-relay")
14477 (version "0.4.5")
14478 (source
14479 (origin
14480 (method url-fetch)
14481 (uri (pypi-uri "graphql-relay" version))
14482 (sha256
14483 (base32
14484 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14485 (build-system python-build-system)
14486 (arguments
14487 '(#:tests? #f)) ; The tests are not distributed
14488 (propagated-inputs
14489 `(("python-graphql-core" ,python-graphql-core)
14490 ("python-promise" ,python-promise)
14491 ("python-six" ,python-six)))
14492 (home-page "https://github.com/graphql-python/graphql-relay-py")
14493 (synopsis "Relay implementation for Python")
14494 (description
14495 "This is a library to allow the easy creation of Relay-compliant servers
14496 using the GraphQL Python reference implementation of a GraphQL server. It
14497 should be noted that the code is a exact port of the original
14498 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14499 from Facebook.")
14500 (license license:expat)))
14501
14502 (define-public python-graphene
14503 (package
14504 (name "python-graphene")
14505 (version "0.10.2")
14506 (source
14507 (origin
14508 (method url-fetch)
14509 (uri (pypi-uri "graphene" version))
14510 (sha256
14511 (base32
14512 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14513 (build-system python-build-system)
14514 (propagated-inputs
14515 `(("python-graphql-core" ,python-graphql-core)
14516 ("python-graphql-relay" ,python-graphql-relay)
14517 ("python-iso8601" ,python-iso8601)
14518 ("python-promise" ,python-promise)
14519 ("python-six" ,python-six)))
14520 (arguments
14521 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14522 (home-page "https://graphene-python.org/")
14523 (synopsis "GraphQL Framework for Python")
14524 (description
14525 "Graphene is a Python library for building GraphQL schemas/types.
14526 A GraphQL schema describes your data model, and provides a GraphQL server
14527 with an associated set of resolve methods that know how to fetch data.")
14528 (license license:expat)))
14529
14530 (define-public python-nautilus
14531 (package
14532 (name "python-nautilus")
14533 (version "0.4.9")
14534 (source
14535 (origin
14536 (method url-fetch)
14537 (uri (pypi-uri "nautilus" version))
14538 (sha256
14539 (base32
14540 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14541 (build-system python-build-system)
14542 (arguments `(#:tests? #f)) ; fails to import test modules
14543 (propagated-inputs
14544 `(("python-bcrypt" ,python-bcrypt)
14545 ("python-click" ,python-click)
14546 ("python-consul" ,python-consul)
14547 ("python-graphene" ,python-graphene)
14548 ("python-jinja2" ,python-jinja2)
14549 ("python-peewee" ,python-peewee)
14550 ("python-pika" ,python-pika)
14551 ("python-tornado" ,python-tornado)
14552 ("python-wtforms" ,python-wtforms)))
14553 (native-inputs
14554 `(("python-nose2" ,python-nose2)))
14555 (home-page "https://github.com/AlecAivazis/nautilus")
14556 (synopsis "Library for creating microservice applications")
14557 (description
14558 "Nautilus is a framework for flux based microservices that looks to
14559 provide extendible implementations of common aspects of a cloud so that you can
14560 focus on building massively scalable web applications.")
14561 (license license:expat)))
14562
14563 (define-public python-random2
14564 (package
14565 (name "python-random2")
14566 (version "1.0.1")
14567 (source (origin
14568 (method url-fetch)
14569 (uri (pypi-uri "random2" version ".zip"))
14570 (sha256
14571 (base32
14572 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14573 (build-system python-build-system)
14574 (native-inputs `(("unzip" ,unzip)))
14575 (home-page "http://pypi.python.org/pypi/random2")
14576 (synopsis "Python 3 version of the Python 2 @code{random} module")
14577 (description
14578 "This package provides a Python 3 ported version of Python 2.7’s
14579 @code{random} module. It has also been back-ported to work in Python 2.6.
14580
14581 In Python 3, the implementation of @code{randrange()} was changed, so that
14582 even with the same seed you get different sequences in Python 2 and 3.
14583
14584 This package closes that gap, allowing stable random number generation
14585 between the different Python versions.")
14586 (license license:psfl)))
14587
14588 (define-public python2-random2
14589 (package-with-python2 python-random2))
14590
14591 (define-public python-snowballstemmer
14592 (package
14593 (name "python-snowballstemmer")
14594 (version "2.0.0")
14595 (source (origin
14596 (method url-fetch)
14597 (uri (pypi-uri "snowballstemmer" version))
14598 (sha256
14599 (base32
14600 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14601 (build-system python-build-system)
14602 (arguments
14603 `(;; No tests exist
14604 #:tests? #f))
14605 (home-page "https://github.com/shibukawa/snowball_py")
14606 (synopsis "Snowball stemming library collection for Python")
14607 (description "This package provides 16 word stemmer algorithms generated
14608 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14609 English stemmer.")
14610 (license license:bsd-3)))
14611
14612 (define-public python2-snowballstemmer
14613 (package-with-python2 python-snowballstemmer))
14614
14615 (define-public python-setproctitle
14616 (package
14617 (name "python-setproctitle")
14618 (version "1.1.10")
14619 (source
14620 (origin
14621 (method url-fetch)
14622 (uri (pypi-uri "setproctitle" version))
14623 (sha256
14624 (base32
14625 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14626 (build-system python-build-system)
14627 (arguments
14628 '(#:phases
14629 (modify-phases %standard-phases
14630 (add-before 'check 'patch-Makefile
14631 ;; Stricly this is only required for the python2 variant.
14632 ;; But adding a phase in an inherited package seems to be
14633 ;; cumbersum. So we patch even for python3.
14634 (lambda _
14635 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14636 (when nose
14637 (substitute* "Makefile"
14638 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14639 (string-append nose "/bin/nosetests "))))
14640 #t)))
14641 (replace 'check
14642 (lambda _
14643 (setenv "PYTHON" (or (which "python3") (which "python")))
14644 (setenv "PYCONFIG" (if (which "python3-config")
14645 "python3-config --embed"
14646 "python-config"))
14647 (setenv "CC" "gcc")
14648 ;; No need to extend PYTHONPATH to find the built package, since
14649 ;; the Makefile will build anyway
14650 (invoke "make" "check"))))))
14651 (native-inputs
14652 `(("procps" ,procps))) ; required for tests
14653 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14654 (synopsis
14655 "Setproctitle implementation for Python to customize the process title")
14656 (description "The library allows a process to change its title (as displayed
14657 by system tools such as ps and top).
14658
14659 Changing the title is mostly useful in multi-process systems, for
14660 example when a master process is forked: changing the children's title
14661 allows identifying the task each process is busy with. The technique
14662 is used by PostgreSQL and the OpenSSH Server for example.")
14663 (license license:bsd-3)
14664 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14665
14666 (define-public python2-setproctitle
14667 (let ((base (package-with-python2
14668 (strip-python2-variant python-setproctitle))))
14669 (package
14670 (inherit base)
14671 (native-inputs `(("python2-nose" ,python2-nose)
14672 ,@(package-native-inputs base))))))
14673
14674 (define-public python-validictory
14675 (package
14676 (name "python-validictory")
14677 (version "1.0.1")
14678 (source
14679 (origin
14680 (method url-fetch)
14681 (uri (pypi-uri "validictory" version))
14682 (sha256
14683 (base32
14684 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14685 (build-system python-build-system)
14686 (arguments
14687 '(#:phases
14688 (modify-phases %standard-phases
14689 (add-after 'unpack 'bootstrap
14690 ;; Move the tests out of the package directory to avoid
14691 ;; packaging them.
14692 (lambda* _
14693 (rename-file "validictory/tests" "tests")
14694 (delete-file "tests/__init__.py")))
14695 (replace 'check
14696 (lambda _
14697 ;; Extend PYTHONPATH so the built package will be found.
14698 (setenv "PYTHONPATH"
14699 (string-append (getcwd) "/build/lib:"
14700 (getenv "PYTHONPATH")))
14701 (invoke "py.test" "-vv" ))))))
14702 (native-inputs
14703 `(("python-pytest" ,python-pytest)))
14704 (home-page
14705 "https://github.com/jamesturk/validictory")
14706 (synopsis "General purpose Python data validator")
14707 (description "It allows validation of arbitrary Python data structures.
14708
14709 The schema format is based on the JSON Schema
14710 proposal (http://json-schema.org), so combined with json the library is also
14711 useful as a validator for JSON data.")
14712 (license license:expat)))
14713
14714 (define-public python2-validictory
14715 (package-with-python2 python-validictory))
14716
14717 (define-public python-pyelftools
14718 (package
14719 (name "python-pyelftools")
14720 (version "0.25")
14721 (source
14722 (origin
14723 (method url-fetch)
14724 (uri (pypi-uri "pyelftools" version))
14725 (sha256
14726 (base32
14727 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14728 (build-system python-build-system)
14729 (arguments
14730 `(#:phases
14731 (modify-phases %standard-phases
14732 (add-before 'check 'set-pythonpath
14733 (lambda _
14734 (setenv "PYTHONPATH"
14735 (string-append
14736 (getcwd) "/test/"
14737 ":" (getenv "PYTHONPATH")))
14738 #t)))))
14739 (home-page
14740 "https://github.com/eliben/pyelftools")
14741 (synopsis
14742 "Analyze binary and library file information")
14743 (description "This Python library provides interfaces for parsing and
14744 analyzing two binary and library file formats; the Executable and Linking
14745 Format (ELF), and debugging information in the Debugging With Attributed
14746 Record Format (DWARF).")
14747 (license license:public-domain)))
14748
14749 (define-public python-pyev
14750 (package
14751 (name "python-pyev")
14752 (version "0.9.0")
14753 (source
14754 (origin
14755 (method url-fetch)
14756 (uri (pypi-uri "pyev" version))
14757 (sha256
14758 (base32
14759 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14760 (build-system python-build-system)
14761 (arguments
14762 `(#:tests? #f ; no test suite
14763 #:phases
14764 (modify-phases %standard-phases
14765 (add-after 'unpack 'patch
14766 (lambda* (#:key inputs #:allow-other-keys)
14767 (let ((libev (string-append (assoc-ref inputs "libev")
14768 "/lib/libev.so.4")))
14769 (substitute* "setup.py"
14770 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14771 (string-append "libev_dll_name = \"" libev "\"")))))))))
14772 (inputs
14773 `(("libev" ,libev)))
14774 (home-page "https://github.com/gabrielfalcao/pyev")
14775 (synopsis "Python libev interface")
14776 (description "Pyev provides a Python interface to libev.")
14777 (license license:gpl3)))
14778
14779 (define-public python2-pyev
14780 (package-with-python2 python-pyev))
14781
14782 (define-public python-imagesize
14783 (package
14784 (name "python-imagesize")
14785 (version "1.2.0")
14786 (source
14787 (origin
14788 (method url-fetch)
14789 (uri (pypi-uri "imagesize" version))
14790 (sha256
14791 (base32
14792 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14793 (build-system python-build-system)
14794 (home-page "https://github.com/shibukawa/imagesize_py")
14795 (synopsis "Gets image size of files in various formats in Python")
14796 (description
14797 "This package allows determination of image size from
14798 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14799 (license license:expat)))
14800
14801 (define-public python2-imagesize
14802 (package-with-python2 python-imagesize))
14803
14804 (define-public python-termstyle
14805 (package
14806 (name "python-termstyle")
14807 (version "0.1.11")
14808 (source
14809 (origin
14810 (method url-fetch)
14811 (uri (pypi-uri "termstyle" version))
14812 (sha256
14813 (base32
14814 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14815 (build-system python-build-system)
14816 (arguments
14817 '(#:phases
14818 (modify-phases %standard-phases
14819 (replace 'check
14820 (lambda _
14821 (invoke "python" "test3.py"))))))
14822 (home-page "https://github.com/gfxmonk/termstyle")
14823 (synopsis "Console text coloring for Python")
14824 (description "This package provides console text coloring for Python.")
14825 (license license:bsd-3)))
14826
14827 (define-public python-argcomplete
14828 (package
14829 (name "python-argcomplete")
14830 (version "1.11.1")
14831 (source
14832 (origin
14833 (method url-fetch)
14834 (uri (pypi-uri "argcomplete" version))
14835 (sha256
14836 (base32
14837 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14838 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14839 (build-system python-build-system)
14840 (native-inputs
14841 `(("python-coverage" ,python-coverage)
14842 ("python-flake8" ,python-flake8)
14843 ("python-pexpect" ,python-pexpect)
14844 ("python-wheel" ,python-wheel)
14845 ("tcsh" ,tcsh)
14846 ("fish" ,fish)
14847 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14848 (home-page "https://github.com/kislyuk/argcomplete")
14849 (synopsis "Shell tab completion for Python argparse")
14850 (description "argcomplete provides extensible command line tab completion
14851 of arguments and options for Python scripts using @code{argparse}. It's
14852 particularly useful for programs with many options or sub-parsers that can
14853 dynamically suggest completions; for example, when browsing resources over the
14854 network.")
14855 (license license:asl2.0)
14856 (properties `((python2-variant . ,(delay python2-argcomplete))))))
14857
14858 (define-public python2-argcomplete
14859 (let ((variant (package-with-python2
14860 (strip-python2-variant python-argcomplete))))
14861 (package
14862 (inherit variant)
14863 (arguments
14864 (substitute-keyword-arguments (package-arguments variant)
14865 ((#:phases phases '%standard-phases)
14866 `(modify-phases ,phases
14867 (add-after 'unpack 'set-my-HOME
14868 (lambda _ (setenv "HOME" "/tmp")))))))
14869 (native-inputs
14870 `(("python2-importlib-metadata" ,python2-importlib-metadata)
14871 ,@(package-native-inputs variant))))))
14872
14873 (define-public python-csscompressor
14874 (package
14875 (name "python-csscompressor")
14876 (version "0.9.5")
14877 (source
14878 (origin
14879 (method url-fetch)
14880 (uri (pypi-uri "csscompressor" version))
14881 (sha256
14882 (base32
14883 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14884 (build-system python-build-system)
14885 (arguments
14886 '(#:phases
14887 (modify-phases %standard-phases
14888 (replace 'check
14889 (lambda _
14890 (invoke "py.test"))))))
14891 (native-inputs
14892 `(("python-pytest" ,python-pytest)))
14893 (home-page "https://github.com/sprymix/csscompressor")
14894 (synopsis "Python port of YUI CSS Compressor")
14895 (description
14896 "This package provides a python port of YUI CSS Compressor.")
14897 (license license:bsd-3)))
14898
14899 (define-public python-rcssmin
14900 (package
14901 (name "python-rcssmin")
14902 (version "1.0.6")
14903 (source
14904 (origin
14905 (method url-fetch)
14906 (uri (pypi-uri "rcssmin" version))
14907 (sha256
14908 (base32
14909 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14910 (build-system python-build-system)
14911 (arguments
14912 '(#:phases
14913 (modify-phases %standard-phases
14914 (replace 'check
14915 (lambda _
14916 (invoke "python" "run_tests.py" "tests"))))))
14917 (home-page "http://opensource.perlig.de/rcssmin/")
14918 (synopsis "CSS Minifier")
14919 (description "The minifier is based on the semantics of the YUI compressor,
14920 which itself is based on the rule list by Isaac Schlueter.")
14921 (license license:asl2.0)))
14922
14923 (define-public python-rjsmin
14924 (package
14925 (name "python-rjsmin")
14926 (version "1.1.0")
14927 (source
14928 (origin
14929 (method url-fetch)
14930 (uri (pypi-uri "rjsmin" version))
14931 (sha256
14932 (base32
14933 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14934 (modules '((guix build utils)))
14935 (snippet
14936 '(begin
14937 (for-each delete-file (find-files "bench" "\\.js$"))
14938 #t))))
14939 (build-system python-build-system)
14940 (arguments
14941 '(#:tests? #f ; Not all test files included.
14942 #:phases
14943 (modify-phases %standard-phases
14944 (replace 'check
14945 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14946 (add-installed-pythonpath inputs outputs)
14947 (if tests?
14948 (invoke "py.test" "-vv" "tests")
14949 #t))))))
14950 (native-inputs
14951 `(("python-pytest" ,python-pytest)))
14952 (home-page "http://opensource.perlig.de/rjsmin/")
14953 (synopsis "Javascript Minifier")
14954 (description "@code{rJSmin} is a javascript minifier written in Python. The
14955 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14956 is a re-implementation aiming for speed, so it can be used at runtime (rather
14957 than during a preprocessing step).")
14958 (license license:asl2.0)))
14959
14960 (define-public python-xopen
14961 (package
14962 (name "python-xopen")
14963 (version "0.5.0")
14964 (source
14965 (origin
14966 (method url-fetch)
14967 (uri (pypi-uri "xopen" version))
14968 (sha256
14969 (base32
14970 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14971 (build-system python-build-system)
14972 (propagated-inputs
14973 `(("python-setuptools-scm" ,python-setuptools-scm)))
14974 (home-page "https://github.com/marcelm/xopen/")
14975 (synopsis "Open compressed files transparently")
14976 (description "This module provides an @code{xopen} function that works like
14977 Python's built-in @code{open} function, but can also deal with compressed files.
14978 Supported compression formats are gzip, bzip2 and, xz, and are automatically
14979 recognized by their file extensions. The focus is on being as efficient as
14980 possible on all supported Python versions.")
14981 (license license:expat)))
14982
14983 (define-public python2-xopen
14984 (let ((base (package-with-python2
14985 (strip-python2-variant python-xopen))))
14986 (package
14987 (inherit base)
14988 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14989 ,@(package-propagated-inputs base))))))
14990
14991 (define-public python-cheetah
14992 (package
14993 (name "python-cheetah")
14994 (version "3.2.4")
14995 (source
14996 (origin
14997 (method url-fetch)
14998 (uri (pypi-uri "Cheetah3" version))
14999 (sha256
15000 (base32
15001 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
15002 (build-system python-build-system)
15003 (arguments
15004 `(#:modules ((guix build utils)
15005 (guix build python-build-system)
15006 (ice-9 ftw)
15007 (srfi srfi-1)
15008 (srfi srfi-26))
15009 #:phases (modify-phases %standard-phases
15010 (add-after 'unpack 'use-absolute-python
15011 (lambda _
15012 (substitute* "Cheetah/CheetahWrapper.py"
15013 (("#!/usr/bin/env python")
15014 (string-append "#!" (which "python"))))
15015 #t))
15016 (add-after 'unpack 'fix-tests
15017 (lambda _
15018 (substitute* "Cheetah/Tests/ImportHooks.py"
15019 (("os.path.dirname\\(__file__\\)")
15020 (string-append "'" (getcwd) "/Cheetah/Tests'")))
15021 #t))
15022 (replace 'check
15023 (lambda _
15024 (let ((cwd (getcwd)))
15025 (setenv "PYTHONPATH"
15026 (string-append
15027 cwd "/build/"
15028 (find (cut string-prefix? "lib" <>)
15029 (scandir (string-append cwd "/build")))
15030 ":" (getenv "PYTHONPATH")))
15031 (setenv "PATH"
15032 (string-append (getenv "PATH")
15033 ":" cwd "/bin"))
15034 (setenv "TMPDIR" "/tmp")
15035
15036 (substitute* "Cheetah/Tests/Test.py"
15037 (("unittest.TextTestRunner\\(\\)")
15038 "unittest.TextTestRunner(verbosity=2)"))
15039
15040 (invoke "python" "Cheetah/Tests/Test.py")))))))
15041 (propagated-inputs
15042 `(("python-markdown" ,python-markdown))) ;optional
15043 (home-page "https://cheetahtemplate.org/")
15044 (synopsis "Template engine")
15045 (description "Cheetah is a text-based template engine and Python code
15046 generator.
15047
15048 Cheetah can be used as a standalone templating utility or referenced as
15049 a library from other Python applications. It has many potential uses,
15050 but web developers looking for a viable alternative to ASP, JSP, PHP and
15051 PSP are expected to be its principle user group.
15052
15053 Features:
15054 @enumerate
15055 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
15056 text-based format.
15057 @item Cleanly separates content, graphic design, and program code.
15058 @item Blends the power and flexibility of Python with a simple template language
15059 that non-programmers can understand.
15060 @item Gives template writers full access to any Python data structure, module,
15061 function, object, or method in their templates.
15062 @item Makes code reuse easy by providing an object-orientated interface to
15063 templates that is accessible from Python code or other Cheetah templates.
15064 One template can subclass another and selectively reimplement sections of it.
15065 @item Provides a simple, yet powerful, caching mechanism that can dramatically
15066 improve the performance of a dynamic website.
15067 @item Compiles templates into optimized, yet readable, Python code.
15068 @end enumerate")
15069 (license (license:x11-style "file://LICENSE"))))
15070
15071 (define-public python2-cheetah
15072 (package-with-python2 python-cheetah))
15073
15074 (define-public python-dulwich
15075 (package
15076 (name "python-dulwich")
15077 (version "0.19.16")
15078 (source
15079 (origin
15080 (method url-fetch)
15081 (uri (list (string-append "https://www.dulwich.io/releases/"
15082 "dulwich-" version ".tar.gz")
15083 (pypi-uri "dulwich" version)))
15084 (sha256
15085 (base32
15086 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
15087 (build-system python-build-system)
15088 (arguments
15089 `(#:phases
15090 (modify-phases %standard-phases
15091 (add-before 'check 'fix-tests
15092 (lambda* (#:key inputs #:allow-other-keys)
15093 ;; The tests use Popen with a custom environment which doesn't
15094 ;; include PATH.
15095 (substitute* "dulwich/tests/compat/utils.py"
15096 (("'git'") (string-append "'"
15097 (which "git")
15098 "'")))
15099 (substitute* '("dulwich/tests/test_repository.py"
15100 "dulwich/tests/test_hooks.py")
15101 (("#!/bin/sh") (string-append "#!" (which "sh"))))
15102 (setenv "TEST_RUNNER" "unittest")
15103 (setenv "PYTHONHASHSEED" "random")
15104 #t)))))
15105 (propagated-inputs
15106 `(("python-fastimport" ,python-fastimport)
15107 ("python-urllib3" ,python-urllib3)))
15108 (native-inputs
15109 `(("python-mock" ,python-mock)
15110 ("python-geventhttpclient" ,python-geventhttpclient)
15111 ("git" ,git)))
15112 (home-page "https://www.dulwich.io/")
15113 (synopsis "Git implementation in Python")
15114 (description "Dulwich is an implementation of the Git file formats and
15115 protocols written in pure Python.")
15116 ;; Can be used with either license.
15117 (license (list license:asl2.0 license:gpl2+))))
15118
15119 (define-public python2-dulwich
15120 (package-with-python2 python-dulwich))
15121
15122 (define-public python-pbkdf2
15123 (package
15124 (name "python-pbkdf2")
15125 (version "1.3")
15126 (source
15127 (origin
15128 (method url-fetch)
15129 (uri (pypi-uri "pbkdf2" version))
15130 (sha256
15131 (base32
15132 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
15133 (build-system python-build-system)
15134 (arguments
15135 '(#:phases
15136 (modify-phases %standard-phases
15137 (replace 'check
15138 (lambda _
15139 (setenv "PYTHONPATH"
15140 (string-append (getcwd) "/build/lib:"
15141 (getenv "PYTHONPATH")))
15142 (invoke "python" "test/test_pbkdf2.py"))))))
15143 (propagated-inputs
15144 `(("python-pycrypto" ,python-pycrypto))) ; optional
15145 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
15146 (synopsis "Password-based key derivation")
15147 (description "This module implements the password-based key derivation
15148 function, PBKDF2, specified in RSA PKCS#5 v2.0.
15149
15150 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
15151 is part of the RSA Public Key Cryptography Standards series. The provided
15152 implementation takes a password or a passphrase and a salt value (and
15153 optionally a iteration count, a digest module, and a MAC module) and provides
15154 a file-like object from which an arbitrarily-sized key can be read.")
15155 (license license:expat)))
15156
15157 (define-public python2-pbkdf2
15158 (package-with-python2 python-pbkdf2))
15159
15160 (define-public python-qrcode
15161 (package
15162 (name "python-qrcode")
15163 (version "6.1")
15164 (source
15165 (origin
15166 (method url-fetch)
15167 (uri (pypi-uri "qrcode" version))
15168 (sha256
15169 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
15170 (build-system python-build-system)
15171 (arguments
15172 ;; FIXME: Tests require packaging 'pymaging'.
15173 '(#:tests? #f))
15174 (propagated-inputs
15175 `(("python-lxml" ,python-lxml) ; for SVG output
15176 ("python-pillow" ,python-pillow) ; for PNG output
15177 ("python-six" ,python-six)))
15178 (home-page "https://github.com/lincolnloop/python-qrcode")
15179 (synopsis "QR Code image generator")
15180 (description "This package provides a pure Python QR Code generator
15181 module. It uses the Python Imaging Library (PIL) to allow for the generation
15182 of QR Codes.
15183
15184 In addition this package provides a command line tool to generate QR codes and
15185 either write these QR codes to a file or do the output as ascii art at the
15186 console.")
15187 (license license:bsd-3)))
15188
15189 (define-public python2-qrcode
15190 (package-with-python2 python-qrcode))
15191
15192 (define-public python-rst2ansi
15193 (package
15194 (name "python-rst2ansi")
15195 (version "0.1.5")
15196 (source
15197 (origin
15198 (method url-fetch)
15199 (uri (pypi-uri "rst2ansi" version))
15200 (sha256
15201 (base32
15202 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
15203 (build-system python-build-system)
15204 (propagated-inputs
15205 `(("python-docutils" ,python-docutils)))
15206 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
15207 (synopsis "Convert RST to ANSI-decorated console output")
15208 (description
15209 "Python module dedicated to rendering RST (reStructuredText) documents
15210 to ansi-escaped strings suitable for display in a terminal.")
15211 (license license:expat)))
15212
15213 (define-public python-ansi2html
15214 (package
15215 (name "python-ansi2html")
15216 (version "1.2.0")
15217 (source
15218 (origin
15219 (method url-fetch)
15220 (uri (pypi-uri "ansi2html" version))
15221 (sha256
15222 (base32
15223 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
15224 (build-system python-build-system)
15225 (native-inputs
15226 `(("python-mock" ,python-mock)
15227 ("python-nose" ,python-nose)))
15228 (propagated-inputs
15229 `(("python-six" ,python-six)))
15230 (home-page "https://github.com/ralphbean/ansi2html")
15231 (synopsis "Convert ANSI-decorated console output to HTML")
15232 (description
15233 "@command{ansi2html} is a Python library and command line utility for
15234 converting text with ANSI color codes to HTML or LaTeX.")
15235 (license license:gpl3+)))
15236
15237 (define-public python2-ansi2html
15238 (package-with-python2 python-ansi2html))
15239
15240 (define-public python-ddt
15241 (package
15242 (name "python-ddt")
15243 (version "1.4.1")
15244 (source
15245 (origin
15246 (method url-fetch)
15247 (uri (pypi-uri "ddt" version))
15248 (sha256
15249 (base32
15250 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
15251 (build-system python-build-system)
15252 (native-inputs
15253 `(("python-pytest" ,python-pytest)))
15254 (propagated-inputs
15255 `(("python-pyyaml" ,python-pyyaml)))
15256 (home-page "https://github.com/datadriventests/ddt")
15257 (synopsis "Data-Driven Tests")
15258 (description
15259 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
15260 running it with different test data, and make it appear as multiple test
15261 cases.")
15262 (license license:expat)))
15263
15264 (define-public python-pycountry
15265 (package
15266 (name "python-pycountry")
15267 (version "18.5.26")
15268 (source
15269 (origin
15270 (method url-fetch)
15271 (uri (pypi-uri "pycountry" version))
15272 (sha256
15273 (base32
15274 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
15275 (build-system python-build-system)
15276 (home-page "https://bitbucket.org/flyingcircus/pycountry")
15277 (synopsis "ISO databases for languages, countries, currencies, etc.")
15278 (description
15279 "@code{pycountry} provides the ISO databases for the standards:
15280 @enumerate
15281 @item 639-3 (Languages)
15282 @item 3166 (Countries)
15283 @item 3166-3 (Deleted Countries)
15284 @item 3166-2 (Subdivisions of countries)
15285 @item 4217 (Currencies)
15286 @item 15924 (Scripts)
15287 @end enumerate
15288 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
15289 through a Python API.")
15290 (license license:lgpl2.1+)))
15291
15292 (define-public python2-pycountry
15293 (package-with-python2 python-pycountry))
15294
15295 (define-public python-pycosat
15296 (package
15297 (name "python-pycosat")
15298 (version "0.6.3")
15299 (source
15300 (origin
15301 (method url-fetch)
15302 (uri (pypi-uri "pycosat" version ".zip"))
15303 (sha256
15304 (base32
15305 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
15306 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
15307 (build-system python-build-system)
15308 (native-inputs
15309 `(("unzip" ,unzip)))
15310 (home-page "https://github.com/ContinuumIO/pycosat")
15311 (synopsis "Bindings to picosat (a SAT solver)")
15312 (description
15313 "This package provides efficient Python bindings to @code{picosat} on
15314 the C level. When importing pycosat, the @code{picosat} solver becomes part
15315 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
15316 Problem} (SAT) solver.")
15317 (license license:expat)))
15318
15319 (define-public python2-pycosat
15320 (package-with-python2 python-pycosat))
15321
15322 (define-public python2-ruamel.ordereddict
15323 (package
15324 (name "python2-ruamel.ordereddict")
15325 (version "0.4.9")
15326 (source
15327 (origin
15328 (method url-fetch)
15329 (uri (pypi-uri "ruamel.ordereddict" version))
15330 (sha256
15331 (base32
15332 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
15333 (build-system python-build-system)
15334 (arguments
15335 `(#:python ,python-2
15336 #:phases
15337 (modify-phases %standard-phases
15338 (delete 'check)
15339 (add-after 'install 'check
15340 (lambda* (#:key inputs outputs #:allow-other-keys)
15341 (add-installed-pythonpath inputs outputs)
15342 (invoke "python" "test/testordereddict.py"))))))
15343 (home-page "https://bitbucket.org/ruamel/ordereddict")
15344 (synopsis "Version of dict that keeps keys in insertion order")
15345 (description
15346 "This is an implementation of an ordered dictionary with @dfn{Key
15347 Insertion Order} (KIO: updates of values do not affect the position of the
15348 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15349 removed and put at the back). The standard library module @code{OrderedDict},
15350 implemented later, implements a subset of @code{ordereddict} functionality.
15351 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15352 Order} (KSO, no sorting function can be specified, but a transform can be
15353 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15354 (license license:expat)))
15355
15356 (define-public python-pypeg2
15357 (package
15358 (name "python-pypeg2")
15359 (version "2.15.2")
15360 (source
15361 (origin
15362 (method url-fetch)
15363 (uri (pypi-uri "pyPEG2" version))
15364 (sha256
15365 (base32
15366 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15367 (build-system python-build-system)
15368 (propagated-inputs `(("python-lxml" ,python-lxml)))
15369 (arguments
15370 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15371 '(#:tests? #f))
15372 (home-page "https://fdik.org/pyPEG/")
15373 (synopsis "Parsering Expression Grammars in Python")
15374 (description "PyPEG is an intrinsic parser interpreter framework for
15375 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15376 parse many formal languages.")
15377 (license license:gpl2)))
15378
15379 (define-public python-incremental
15380 (package
15381 (name "python-incremental")
15382 (version "17.5.0")
15383 (source
15384 (origin
15385 (method url-fetch)
15386 (uri (pypi-uri "incremental" version))
15387 (sha256
15388 (base32
15389 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15390 (build-system python-build-system)
15391 (home-page "https://github.com/hawkowl/incremental")
15392 (synopsis "Library for versioning Python projects")
15393 (description "Incremental is a small library that versions your Python
15394 projects.")
15395 (license license:expat)))
15396
15397 (define-public python2-incremental
15398 (package-with-python2 python-incremental))
15399
15400 (define-public python-invoke
15401 (package
15402 (name "python-invoke")
15403 (home-page "https://www.pyinvoke.org/")
15404 (version "1.5.0")
15405 (source (origin
15406 (method url-fetch)
15407 (uri (pypi-uri "invoke" version))
15408 (sha256
15409 (base32
15410 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
15411 (build-system python-build-system)
15412 (arguments
15413 ;; XXX: Requires many dependencies that are not yet in Guix.
15414 `(#:tests? #f
15415 #:phases
15416 (modify-phases %standard-phases
15417 (add-after 'unpack 'fix-bash-path
15418 (lambda* (#:key inputs #:allow-other-keys)
15419 (let ((bash (assoc-ref inputs "bash")))
15420 (substitute* "invoke/config.py"
15421 (("shell = \"/bin/bash\"")
15422 (string-append "shell = \"" bash "/bin/bash\""))
15423 )
15424 #t))))))
15425 (inputs
15426 `(("bash" ,bash-minimal)))
15427 (synopsis "Pythonic task execution")
15428 (description
15429 "Invoke is a Python task execution tool and library, drawing inspiration
15430 from various sources to arrive at a powerful and clean feature set. It is
15431 evolved from the Fabric project, but focuses on local and abstract concerns
15432 instead of servers and network commands.")
15433 (license license:bsd-3)))
15434
15435 (define-public python2-invoke
15436 (package-with-python2 python-invoke))
15437
15438 (define-public python-automat
15439 (package
15440 (name "python-automat")
15441 (version "20.2.0")
15442 (source (origin
15443 (method url-fetch)
15444 (uri (pypi-uri "Automat" version))
15445 (sha256
15446 (base32
15447 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15448 (build-system python-build-system)
15449 ;; We disable the tests because they require python-twisted, while
15450 ;; python-twisted depends on python-automat. Twisted is optional, but the
15451 ;; tests fail if it is not available. Also see
15452 ;; <https://github.com/glyph/automat/issues/71>.
15453 (arguments '(#:tests? #f))
15454 (native-inputs
15455 `(("python-m2r" ,python-m2r)
15456 ("python-setuptools-scm" ,python-setuptools-scm)
15457 ("python-graphviz" ,python-graphviz)))
15458 (propagated-inputs
15459 `(("python-six" ,python-six)
15460 ("python-attrs" ,python-attrs)))
15461 (home-page "https://github.com/glyph/Automat")
15462 (synopsis "Self-service finite-state machines")
15463 (description "Automat is a library for concise, idiomatic Python
15464 expression of finite-state automata (particularly deterministic finite-state
15465 transducers).")
15466 (license license:expat)))
15467
15468 (define-public python2-automat
15469 (package-with-python2 python-automat))
15470
15471 (define-public python-m2r
15472 (package
15473 (name "python-m2r")
15474 (version "0.2.1")
15475 (source (origin
15476 (method url-fetch)
15477 (uri (pypi-uri "m2r" version))
15478 (sha256
15479 (base32
15480 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15481 (build-system python-build-system)
15482 (propagated-inputs
15483 `(("python-docutils" ,python-docutils)
15484 ("python-mistune" ,python-mistune)))
15485 (native-inputs
15486 `(("python-pygments" ,python-pygments)
15487 ("python-mock" ,python-mock)))
15488 (home-page "https://github.com/miyakogi/m2r")
15489 (synopsis "Markdown to reStructuredText converter")
15490 (description "M2R converts a markdown file including reST markups to valid
15491 reST format.")
15492 (license license:expat)))
15493
15494 (define-public python2-m2r
15495 (package-with-python2 python-m2r))
15496
15497 (define-public python-constantly
15498 (package
15499 (name "python-constantly")
15500 (version "15.1.0")
15501 (source (origin
15502 (method url-fetch)
15503 (uri (pypi-uri "constantly" version))
15504 (sha256
15505 (base32
15506 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15507 (build-system python-build-system)
15508 (home-page "https://github.com/twisted/constantly")
15509 (synopsis "Symbolic constants in Python")
15510 (description "Constantly is a Python library that provides symbolic
15511 constant support. It includes collections and constants with text, numeric,
15512 and bit flag values.")
15513 (license license:expat)))
15514
15515 (define-public python2-constantly
15516 (package-with-python2 python-constantly))
15517
15518 (define-public python-attrs
15519 (package
15520 (name "python-attrs")
15521 (version "19.3.0")
15522 (source (origin
15523 (method url-fetch)
15524 (uri (pypi-uri "attrs" version))
15525 (sha256
15526 (base32
15527 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15528 (build-system python-build-system)
15529 (arguments
15530 `(#:modules ((guix build utils)
15531 (guix build python-build-system)
15532 (ice-9 ftw)
15533 (srfi srfi-1)
15534 (srfi srfi-26))
15535 #:phases (modify-phases %standard-phases
15536 (replace 'check
15537 (lambda _
15538 (let ((cwd (getcwd)))
15539 (setenv "PYTHONPATH"
15540 (string-append
15541 cwd "/build/"
15542 (find (cut string-prefix? "lib" <>)
15543 (scandir (string-append cwd "/build")))
15544 ":"
15545 (getenv "PYTHONPATH")))
15546 (invoke "python" "-m" "pytest")))))))
15547 (native-inputs
15548 `(("python-coverage" ,python-coverage)
15549 ("python-hypothesis" ,python-hypothesis)
15550 ("python-pympler" ,python-pympler)
15551 ("python-pytest" ,python-pytest)
15552 ("python-six" ,python-six)
15553 ("python-sphinx" ,python-sphinx)
15554 ("python-zope-interface" ,python-zope-interface)))
15555 (home-page "https://github.com/python-attrs/attrs/")
15556 (synopsis "Attributes without boilerplate")
15557 (description "@code{attrs} is a Python package with class decorators that
15558 ease the chores of implementing the most common attribute-related object
15559 protocols.")
15560 (license license:expat)))
15561
15562 (define-public python2-attrs
15563 (package-with-python2 python-attrs))
15564
15565 (define-public python-attrs-bootstrap
15566 (package
15567 (inherit python-attrs)
15568 (name "python-attrs-bootstrap")
15569 (native-inputs `())
15570 (arguments `(#:tests? #f))))
15571
15572 (define-public python2-attrs-bootstrap
15573 (package-with-python2 python-attrs-bootstrap))
15574
15575 (define-public python2-cliapp
15576 (package
15577 (name "python2-cliapp")
15578 (version "1.20180812.1")
15579 (source
15580 (origin
15581 (method url-fetch)
15582 (uri (string-append
15583 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15584 version ".tar.gz"))
15585 (sha256
15586 (base32
15587 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15588 (build-system python-build-system)
15589 (arguments
15590 `(#:python ,python-2
15591 #:phases
15592 (modify-phases %standard-phases
15593 ;; check phase needs to be run before the build phase. If not,
15594 ;; coverage-test-runner looks for tests for the built source files,
15595 ;; and fails.
15596 (delete 'check)
15597 (add-before 'build 'check
15598 (lambda _
15599 ;; Disable python3 tests
15600 (substitute* "check"
15601 (("python3") "# python3"))
15602 (invoke "./check"))))))
15603 (native-inputs
15604 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15605 ("python2-pep8" ,python2-pep8)))
15606 (propagated-inputs
15607 `(("python2-pyaml" ,python2-pyaml)))
15608 (home-page "https://liw.fi/cliapp/")
15609 (synopsis "Python framework for command line programs")
15610 (description "@code{python2-cliapp} is a python framework for
15611 command line programs. It contains the typical stuff such programs
15612 need to do, such as parsing the command line for options, and
15613 iterating over input files.")
15614 (license license:gpl2+)))
15615
15616 (define-public python2-ttystatus
15617 (package
15618 (name "python2-ttystatus")
15619 (version "0.38")
15620 (source
15621 (origin
15622 (method git-fetch)
15623 (uri (git-reference
15624 (url "http://git.liw.fi/ttystatus")
15625 ;; There are no tags after ttystatus-0.36.
15626 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15627 (sha256
15628 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15629 (file-name (git-file-name name version))))
15630 (build-system python-build-system)
15631 (native-inputs
15632 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15633 ("python2-pep8" ,python2-pep8)))
15634 (arguments
15635 `(#:python ,python-2
15636 #:phases
15637 (modify-phases %standard-phases
15638 ;; check phase needs to be run before the build phase. If not,
15639 ;; coverage-test-runner looks for tests for the built source files,
15640 ;; and fails.
15641 (delete 'check)
15642 (add-before 'build 'check
15643 (lambda _ (invoke "make" "check"))))))
15644 (home-page "https://liw.fi/ttystatus/")
15645 (synopsis "Python library for showing progress reporting and
15646 status updates on terminals")
15647 (description "@code{python2-ttystatus} is a python library for
15648 showing progress reporting and status updates on terminals, for
15649 command line programs. Output is automatically adapted to the width
15650 of the terminal: truncated if it does not fit, and resized if the
15651 terminal size changes.")
15652 (license license:gpl3+)))
15653
15654 (define-public python2-tracing
15655 (package
15656 (name "python2-tracing")
15657 (version "0.10")
15658 (source
15659 (origin
15660 (method url-fetch)
15661 (uri (string-append
15662 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15663 version ".tar.gz"))
15664 (sha256
15665 (base32
15666 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15667 (build-system python-build-system)
15668 (arguments
15669 `(#:python ,python-2))
15670 (home-page "https://liw.fi/tracing/")
15671 (synopsis "Python debug logging helper")
15672 (description "@code{python2-tracing} is a python library for
15673 logging debug messages. It provides a way to turn debugging messages
15674 on and off, based on the filename they occur in. It is much faster
15675 than using @code{logging.Filter} to accomplish the same thing, which
15676 matters when code is run in production mode. The actual logging still
15677 happens using the @code{logging} library.")
15678 (license license:gpl3+)))
15679
15680 (define-public python2-larch
15681 (package
15682 (name "python2-larch")
15683 (version "1.20151025")
15684 (source
15685 (origin
15686 (method url-fetch)
15687 (uri (string-append
15688 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15689 version ".tar.gz"))
15690 (patches (search-patches
15691 "python2-larch-coverage-4.0a6-compatibility.patch"))
15692 (sha256
15693 (base32
15694 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15695 (build-system python-build-system)
15696 (arguments
15697 `(#:python ,python-2
15698 #:phases
15699 (modify-phases %standard-phases
15700 ;; check phase needs to be run before the build phase. If not,
15701 ;; coverage-test-runner looks for tests for the built source files,
15702 ;; and fails.
15703 (delete 'check)
15704 (add-before 'build 'check
15705 (lambda _ (invoke "make" "check"))))))
15706 (native-inputs
15707 `(("cmdtest" ,cmdtest)
15708 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15709 (propagated-inputs
15710 `(("python2-tracing" ,python2-tracing)))
15711 (home-page "https://liw.fi/larch/")
15712 (synopsis "Python copy-on-write B-tree library")
15713 (description "@code{python2-larch} is an implementation of
15714 particular kind of B-tree, based on research by Ohad Rodeh. See
15715 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15716 on the data structure.
15717
15718 The distinctive feature of this B-tree is that a node is never
15719 (conceptually) modified. Instead, all updates are done by
15720 copy-on-write. This makes it easy to clone a tree, and modify only the
15721 clone, while other processes access the original tree.")
15722 (license license:gpl3+)))
15723
15724 (define-public python-astroid
15725 (package
15726 (name "python-astroid")
15727 (version "2.4.2")
15728 (source
15729 (origin
15730 (method url-fetch)
15731 (uri (pypi-uri "astroid" version))
15732 (sha256
15733 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15734 (modules '((guix build utils)))
15735 (snippet
15736 '(begin
15737 ;; Check to see if the version pinning has been removed.
15738 (substitute* "astroid/__pkginfo__.py"
15739 (("==1\\.4\\.\\*") ">=1.4.0"))
15740 #t))))
15741 (build-system python-build-system)
15742 (propagated-inputs
15743 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15744 ("python-six" ,python-six)
15745 ("python-wrapt" ,python-wrapt)))
15746 (native-inputs
15747 `(("python-dateutil" ,python-dateutil)
15748 ("python-pytest" ,python-pytest)
15749 ("python-pytest-runner" ,python-pytest-runner)))
15750 (home-page "https://github.com/PyCQA/astroid")
15751 (synopsis "Common base representation of python source code for pylint and
15752 other projects")
15753 (description "@code{python-astroid} provides a common base representation
15754 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15755
15756 It provides a compatible representation which comes from the _ast module. It
15757 rebuilds the tree generated by the builtin _ast module by recursively walking
15758 down the AST and building an extended ast. The new node classes have
15759 additional methods and attributes for different usages. They include some
15760 support for static inference and local name scopes. Furthermore, astroid
15761 builds partial trees by inspecting living objects.")
15762 (license license:lgpl2.1+)
15763 (properties `((python2-variant . ,(delay python2-astroid))))))
15764
15765 (define-public python2-astroid
15766 (let ((base (package-with-python2
15767 (strip-python2-variant python-astroid))))
15768 (package (inherit base)
15769 ;; Version 2.x removes python2 support.
15770 (version "1.6.5")
15771 (source
15772 (origin
15773 (method url-fetch)
15774 (uri (pypi-uri "astroid" version))
15775 (sha256
15776 (base32
15777 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15778 (arguments
15779 (substitute-keyword-arguments (package-arguments base)
15780 ((#:phases phases)
15781 `(modify-phases ,phases
15782 (add-after 'unpack 'remove-spurious-test
15783 (lambda _
15784 ;; https://github.com/PyCQA/astroid/issues/276
15785 (delete-file "astroid/tests/unittest_brain.py")
15786 #t))
15787 (replace 'check
15788 (lambda _
15789 (invoke"python" "-m" "unittest" "discover"
15790 "-p" "unittest*.py")))))))
15791 (native-inputs `())
15792 (propagated-inputs
15793 `(("python2-backports-functools-lru-cache"
15794 ,python2-backports-functools-lru-cache)
15795 ("python2-enum34" ,python2-enum34)
15796 ("python2-singledispatch" ,python2-singledispatch)
15797 ,@(alist-delete "python-typed-ast"
15798 (package-propagated-inputs base)))))))
15799
15800 (define-public python-isbnlib
15801 (package
15802 (name "python-isbnlib")
15803 (version "3.10.4")
15804 (source
15805 (origin
15806 (method url-fetch)
15807 (uri (pypi-uri "isbnlib" version))
15808 (sha256
15809 (base32
15810 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
15811 (build-system python-build-system)
15812 (arguments '(#:tests? #f)) ; No test
15813 (home-page "https://github.com/xlcnd/isbnlib")
15814 (synopsis "Python library to work with ISBN strings")
15815 (description "@code{python-isbnlib} is a (pure) python library that provides
15816 several useful methods and functions to validate, clean, transform, hyphenate and
15817 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
15818 version, is suitable to be include as a dependency in other projects.")
15819 (license license:lgpl3+)))
15820
15821 (define-public python-isort
15822 (package
15823 (name "python-isort")
15824 (version "4.3.4")
15825 (source
15826 (origin
15827 (method git-fetch)
15828 (uri (git-reference
15829 ;; Tests pass only from the Github sources
15830 (url "https://github.com/timothycrosley/isort")
15831 (commit version)))
15832 (file-name (git-file-name name version))
15833 (sha256
15834 (base32
15835 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15836 (build-system python-build-system)
15837 (native-inputs
15838 `(("python-mock" ,python-mock)
15839 ("python-pytest" ,python-pytest)))
15840 (home-page "https://github.com/timothycrosley/isort")
15841 (synopsis "Python utility/library to sort python imports")
15842 (description "@code{python-isort} is a python utility/library to sort
15843 imports alphabetically, and automatically separated into sections. It
15844 provides a command line utility, a python library and plugins for various
15845 editors.")
15846 (license license:expat)
15847 (properties `((python2-variant . ,(delay python2-isort))))))
15848
15849 (define-public python2-isort
15850 (let ((base (package-with-python2
15851 (strip-python2-variant python-isort))))
15852 (package (inherit base)
15853 (native-inputs
15854 `(("python2-futures" ,python2-futures)
15855 ,@(package-native-inputs base))))))
15856
15857 (define-public python2-backports-functools-lru-cache
15858 (package
15859 (name "python2-backports-functools-lru-cache")
15860 (version "1.6.1")
15861 (source
15862 (origin
15863 (method url-fetch)
15864 ;; only the pypi tarballs contain the necessary metadata
15865 (uri (pypi-uri "backports.functools_lru_cache" version))
15866 (sha256
15867 (base32
15868 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15869 (build-system python-build-system)
15870 (native-inputs
15871 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15872 (arguments
15873 `(#:python ,python-2))
15874 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
15875 (synopsis "Backport of functools.lru_cache from Python 3.3")
15876 (description "@code{python2-backports-functools-lru-cache} is a backport
15877 of @code{functools.lru_cache} from python 3.3.")
15878 (license license:expat)))
15879
15880 (define-public python-configparser
15881 (package
15882 (name "python-configparser")
15883 (version "4.0.2")
15884 (source
15885 (origin
15886 (method url-fetch)
15887 (uri (pypi-uri "configparser" version))
15888 (sha256
15889 (base32
15890 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15891 (native-inputs
15892 `(("python-setuptools_scm" ,python-setuptools-scm)))
15893 (build-system python-build-system)
15894 (home-page "https://github.com/jaraco/configparser/")
15895 (synopsis "Backport of configparser from python 3.5")
15896 (description "@code{python-configparser} is a backport of
15897 @code{configparser} from Python 3.5 so that it can be used directly
15898 in other versions.")
15899 (license license:expat)))
15900
15901 (define-public python2-configparser
15902 (package-with-python2 python-configparser))
15903
15904 (define-public python-iniconfig
15905 (package
15906 (name "python-iniconfig")
15907 (version "1.1.1")
15908 (source
15909 (origin
15910 (method url-fetch)
15911 (uri (pypi-uri "iniconfig" version))
15912 (sha256
15913 (base32
15914 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
15915 (build-system python-build-system)
15916 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
15917 (synopsis "Simple INI-file parser")
15918 (description "The @code{iniconfig} package provides a small and simple
15919 INI-file parser module having a unique set of features; @code{iniconfig}
15920 @itemize
15921 @item maintains the order of sections and entries;
15922 @item supports multi-line values with or without line-continuations;
15923 @item supports \"#\" comments everywhere;
15924 @item raises errors with proper line-numbers;
15925 @item raises an error when two sections have the same name.
15926 @end itemize")
15927 (license license:expat)))
15928
15929 (define-public python-mamba
15930 (package
15931 (name "python-mamba")
15932 (version "0.11.2")
15933 (source (origin
15934 (method url-fetch)
15935 (uri (pypi-uri "mamba" version))
15936 (sha256
15937 (base32
15938 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
15939 (build-system python-build-system)
15940 (arguments `(#:tests? #f)) ; No test
15941 (propagated-inputs
15942 `(("python-clint" ,python-clint)
15943 ("python-coverage" ,python-coverage)))
15944 (home-page "https://nestorsalceda.com/mamba/")
15945 (synopsis "Test runner for Python")
15946 (description
15947 "Mamba is a Behaviour-Driven Development tool for Python developers.
15948 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15949 (license license:expat)))
15950
15951 (define-public python-mando
15952 (package
15953 (name "python-mando")
15954 (version "0.6.4")
15955 (source (origin
15956 (method url-fetch)
15957 (uri (pypi-uri "mando" version))
15958 (sha256
15959 (base32
15960 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15961 (build-system python-build-system)
15962 (propagated-inputs
15963 `(("python-rst2ansi" ,python-rst2ansi)
15964 ("python-six" ,python-six)))
15965 (native-inputs
15966 `(("python-pytest" ,python-pytest)))
15967 (home-page "https://mando.readthedocs.org/")
15968 (synopsis
15969 "Wrapper around argparse, allowing creation of complete CLI applications")
15970 (description
15971 "This package is a wrapper around argparse, allowing you to write complete CLI
15972 applications in seconds while maintaining all the flexibility.")
15973 (license license:expat)))
15974
15975 (define-public python2-mando
15976 (package-with-python2 python-mando))
15977
15978 (define-public python2-argparse
15979 (package
15980 (name "python2-argparse")
15981 (version "1.4.0")
15982 (source
15983 (origin
15984 (method url-fetch)
15985 (uri (pypi-uri "argparse" version))
15986 (sha256
15987 (base32
15988 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15989 (build-system python-build-system)
15990 (arguments
15991 `(#:python ,python-2))
15992 (home-page "https://github.com/ThomasWaldmann/argparse/")
15993 (synopsis "Python command-line parsing library")
15994 (description
15995 "This package is mostly for people who want to have @code{argparse} on
15996 older Pythons because it was not part of the standard library back then.")
15997 (license license:psfl)))
15998
15999 (define-public python-fudge
16000 (package
16001 (name "python-fudge")
16002 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
16003 ;; package, which is currently the only use of this package.
16004 (version "0.9.6")
16005 (source
16006 (origin
16007 (method url-fetch)
16008 (uri (pypi-uri "fudge" version))
16009 (sha256
16010 (base32
16011 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
16012 (build-system python-build-system)
16013 (arguments
16014 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
16015 (home-page "https://github.com/fudge-py/fudge")
16016 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
16017 (description
16018 "Fudge is a Python module for using fake objects (mocks and stubs) to
16019 test real ones.
16020
16021 In readable Python code, you declare the methods available on your fake object
16022 and how they should be called. Then you inject that into your application and
16023 start testing. This declarative approach means you don’t have to record and
16024 playback actions and you don’t have to inspect your fakes after running code.
16025 If the fake object was used incorrectly then you’ll see an informative
16026 exception message with a traceback that points to the culprit.")
16027 (license license:expat)))
16028
16029 (define-public python2-fudge
16030 (package-with-python2 python-fudge))
16031
16032 (define-public python-mwclient
16033 (package
16034 (name "python-mwclient")
16035 (version "0.10.1")
16036 (source
16037 (origin
16038 (method git-fetch)
16039 ;; The PyPI version wouldn't contain tests.
16040 (uri (git-reference
16041 (url "https://github.com/mwclient/mwclient")
16042 (commit (string-append "v" version))))
16043 (file-name (git-file-name name version))
16044 (sha256
16045 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
16046 (build-system python-build-system)
16047 (propagated-inputs
16048 `(("python-requests-oauthlib" ,python-requests-oauthlib)
16049 ("python-six" ,python-six)))
16050 (native-inputs
16051 `(("python-mock" ,python-mock)
16052 ("python-pytest" ,python-pytest)
16053 ("python-pytest-cov" ,python-pytest-cov)
16054 ("python-pytest-runner" ,python-pytest-runner)
16055 ("python-responses" ,python-responses)))
16056 (home-page "https://github.com/btongminh/mwclient")
16057 (synopsis "MediaWiki API client")
16058 (description "This package provides a MediaWiki API client.")
16059 (license license:expat)))
16060
16061 (define-public python-utils
16062 (package
16063 (name "python-utils")
16064 (version "2.4.0")
16065 (source (origin
16066 (method url-fetch)
16067 (uri (pypi-uri "python-utils" version))
16068 (sha256
16069 (base32
16070 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
16071 (build-system python-build-system)
16072 (arguments
16073 `(#:phases
16074 (modify-phases %standard-phases
16075 (replace 'check
16076 (lambda* (#:key inputs outputs #:allow-other-keys)
16077 (add-installed-pythonpath inputs outputs)
16078 (delete-file "pytest.ini")
16079 (invoke "pytest" "-vv"))))))
16080 (native-inputs
16081 `(("pytest-runner" ,python-pytest-runner)
16082 ("pytest" ,python-pytest)
16083 ("six" ,python-six)))
16084 (home-page "https://github.com/WoLpH/python-utils")
16085 (synopsis "Convenient utilities not included with the standard Python install")
16086 (description
16087 "Python Utils is a collection of small Python functions and classes which
16088 make common patterns shorter and easier.")
16089 (license license:bsd-2)))
16090
16091 (define-public python2-utils
16092 (package-with-python2 python-utils))
16093
16094 (define-public python-diff-match-patch
16095 (package
16096 (name "python-diff-match-patch")
16097 (version "20121119")
16098 (source
16099 (origin
16100 (method url-fetch)
16101 (uri (pypi-uri "diff-match-patch" version))
16102 (sha256
16103 (base32
16104 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
16105 (build-system python-build-system)
16106 (home-page "https://code.google.com/p/google-diff-match-patch")
16107 (synopsis "Synchronize plain text")
16108 (description "Diff Match and Patch libraries offer robust algorithms to
16109 perform the operations required for synchronizing plain text.")
16110 (license license:asl2.0)))
16111
16112 (define-public python2-diff-match-patch
16113 (package-with-python2 python-diff-match-patch))
16114
16115 (define-public python-dirsync
16116 (package
16117 (name "python-dirsync")
16118 (version "2.2.5")
16119 (source
16120 (origin
16121 (method url-fetch)
16122 (uri (pypi-uri "dirsync" version))
16123 (sha256
16124 (base32
16125 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
16126 (build-system python-build-system)
16127 (propagated-inputs
16128 `(("six" ,python-six)))
16129 (home-page "https://github.com/tkhyn/dirsync")
16130 (synopsis "Advanced directory tree synchronisation tool")
16131 (description "Advanced directory tree synchronisation tool.")
16132 (license license:expat)))
16133
16134 (define-public python2-dirsync
16135 (package-with-python2 python-dirsync))
16136
16137 (define-public python-levenshtein
16138 (package
16139 (name "python-levenshtein")
16140 (version "0.12.0")
16141 (source
16142 (origin
16143 (method url-fetch)
16144 (uri (pypi-uri "python-Levenshtein" version))
16145 (sha256
16146 (base32
16147 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
16148 (build-system python-build-system)
16149 (home-page "https://github.com/ztane/python-Levenshtein")
16150 (synopsis "Fast computation of Levenshtein distance and string similarity")
16151 (description
16152 "The Levenshtein Python C extension module contains functions for fast computation of
16153 @enumerate
16154 @item Levenshtein (edit) distance, and edit operations
16155 @item string similarity
16156 @item approximate median strings, and generally string averaging
16157 @item string sequence and set similarity
16158 @end enumerate
16159 It supports both normal and Unicode strings.")
16160 (license license:gpl2+)))
16161
16162 (define-public python2-levenshtein
16163 (package-with-python2 python-levenshtein))
16164
16165 (define-public python-scandir
16166 (package
16167 (name "python-scandir")
16168 (version "1.10.0")
16169 (source
16170 (origin
16171 (method url-fetch)
16172 (uri (pypi-uri "scandir" version))
16173 (sha256
16174 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
16175 (build-system python-build-system)
16176 (arguments
16177 `(#:phases (modify-phases %standard-phases
16178 (replace 'check
16179 (lambda _
16180 (invoke "python" "test/run_tests.py"))))))
16181 (home-page "https://github.com/benhoyt/scandir")
16182 (synopsis "Directory iteration function")
16183 (description
16184 "Directory iteration function like os.listdir(), except that instead of
16185 returning a list of bare filenames, it yields DirEntry objects that include
16186 file type and stat information along with the name. Using scandir() increases
16187 the speed of os.walk() by 2-20 times (depending on the platform and file
16188 system) by avoiding unnecessary calls to os.stat() in most cases.
16189
16190 This package is part of the Python standard library since version 3.5.")
16191 (license license:bsd-3)))
16192
16193 (define-public python2-scandir
16194 (package-with-python2 python-scandir))
16195
16196 (define-public python2-stemming
16197 (package
16198 (name "python2-stemming")
16199 (version "1.0.1")
16200 (source
16201 (origin
16202 (method url-fetch)
16203 (uri (pypi-uri "stemming" version))
16204 (sha256
16205 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
16206 (build-system python-build-system)
16207 (arguments
16208 `(#:python ,python-2))
16209 (home-page "https://bitbucket.org/mchaput/stemming/overview")
16210 (synopsis "Python implementations of various stemming algorithms")
16211 (description
16212 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
16213 stemming algorithms for English. These implementations are straightforward and
16214 efficient, unlike some Python versions of the same algorithms available on the
16215 Web. This package is an extraction of the stemming code included in the Whoosh
16216 search engine.")
16217 (license license:public-domain)))
16218
16219 (define-public python-factory-boy
16220 (package
16221 (name "python-factory-boy")
16222 (version "2.8.1")
16223 (source
16224 (origin
16225 (method url-fetch)
16226 (uri (pypi-uri "factory_boy" version))
16227 (sha256
16228 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
16229 (build-system python-build-system)
16230 (arguments
16231 ;; Tests are not included in the tarball.
16232 `(#:tests? #f))
16233 (propagated-inputs
16234 `(("faker" ,python-faker)))
16235 (home-page "https://github.com/benhoyt/scandir")
16236 (synopsis "Versatile test fixtures replacement")
16237 (description
16238 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
16239
16240 As a fixtures replacement tool, it aims to replace static, hard to maintain
16241 fixtures with easy-to-use factories for complex object.
16242
16243 Instead of building an exhaustive test setup with every possible combination
16244 of corner cases, factory_boy allows you to use objects customized for the
16245 current test, while only declaring the test-specific fields")
16246 (license license:expat)))
16247
16248 (define-public python2-factory-boy
16249 (package-with-python2 python-factory-boy))
16250
16251 (define-public python-translate-toolkit
16252 (package
16253 (name "python-translate-toolkit")
16254 (version "2.1.0")
16255 (source
16256 (origin
16257 (method url-fetch)
16258 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
16259 (sha256
16260 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
16261 (build-system python-build-system)
16262 (native-inputs
16263 `(("python-pytest" ,python-pytest)
16264 ("python-sphinx" ,python-sphinx)))
16265 (propagated-inputs
16266 `(("python-babel" ,python-babel)
16267 ("python-beautifulsoup4" ,python-beautifulsoup4)
16268 ("python-chardet" ,python-chardet)
16269 ("python-diff-match-patch" ,python-diff-match-patch)
16270 ("python-levenshtein" ,python-levenshtein)
16271 ("python-lxml" ,python-lxml)
16272 ("python-six" ,python-six)
16273 ("python-vobject" ,python-vobject)
16274 ("python-pyyaml" ,python-pyyaml)))
16275 (arguments
16276 ;; TODO: tests are not run, because they end with
16277 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
16278 ;; 'parse_funcs'
16279 ;; during test setup.
16280 `(#:tests? #f))
16281 (home-page "https://toolkit.translatehouse.org")
16282 (synopsis "Tools and API for translation and localization engineering")
16283 (description
16284 "Tools and API for translation and localization engineering. It contains
16285 several utilities, as well as an API for building localization tools.")
16286 (license license:gpl2+)))
16287
16288 (define-public python2-translate-toolkit
16289 (package-with-python2 python-translate-toolkit))
16290
16291 (define-public python-packaging
16292 (package
16293 (name "python-packaging")
16294 (version "20.0")
16295 (source
16296 (origin
16297 (method url-fetch)
16298 (uri (pypi-uri "packaging" version))
16299 ;; XXX: The URL in the patch file is wrong, it should be
16300 ;; <https://github.com/pypa/packaging/pull/256>.
16301 (patches (search-patches "python-packaging-test-arch.patch"))
16302 (sha256
16303 (base32
16304 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
16305 (build-system python-build-system)
16306 (arguments
16307 `(#:phases (modify-phases %standard-phases
16308 (replace 'check
16309 (lambda* (#:key tests? #:allow-other-keys)
16310 (if tests?
16311 (invoke "py.test" "-vv")
16312 (format #t "test suite not run~%"))
16313 #t)))))
16314 (native-inputs
16315 `(("python-pretend" ,python-pretend)
16316 ("python-pytest" ,python-pytest)))
16317 (propagated-inputs
16318 `(("python-pyparsing" ,python-pyparsing)
16319 ("python-six" ,python-six)))
16320 (home-page "https://github.com/pypa/packaging")
16321 (synopsis "Core utilities for Python packages")
16322 (description "Packaging is a Python module for dealing with Python packages.
16323 It offers an interface for working with package versions, names, and dependency
16324 information.")
16325 ;; From 'LICENSE': This software is made available under the terms of
16326 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
16327 ;; Contributions to this software is made under the terms of *both* these
16328 ;; licenses.
16329 (license (list license:asl2.0 license:bsd-2))))
16330
16331 (define-public python2-packaging
16332 (package-with-python2 python-packaging))
16333
16334 ;; Variants with minimal dependencies, for bootstrapping Pytest.
16335 (define-public python-packaging-bootstrap
16336 (hidden-package
16337 (package/inherit
16338 python-packaging
16339 (name "python-packaging-bootstrap")
16340 (native-inputs '())
16341 (propagated-inputs
16342 `(("python-pyparsing" ,python-pyparsing)))
16343 (arguments '(#:tests? #f)))))
16344
16345 (define-public python2-packaging-bootstrap
16346 (hidden-package
16347 (package/inherit
16348 python2-packaging
16349 (name "python2-packaging-bootstrap")
16350 (native-inputs '())
16351 (propagated-inputs
16352 `(("python-pyparsing" ,python2-pyparsing)))
16353 (arguments
16354 `(#:tests? #f
16355 ,@(package-arguments python2-packaging))))))
16356
16357 (define-public python-relatorio
16358 (package
16359 (name "python-relatorio")
16360 (version "0.8.0")
16361 (source
16362 (origin
16363 (method url-fetch)
16364 (uri (pypi-uri "relatorio" version))
16365 (sha256
16366 (base32
16367 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16368 (build-system python-build-system)
16369 (propagated-inputs
16370 `(("python-lxml" ,python-lxml)
16371 ("python-genshi" ,python-genshi)))
16372 (native-inputs
16373 `(("python-magic" ,python-magic)))
16374 (home-page "https://relatorio.tryton.org/")
16375 (synopsis "Templating library able to output ODT and PDF files")
16376 (description "Relatorio is a templating library which provides a way to
16377 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16378 for more filetypes can be easily added by creating plugins for them.")
16379 (license license:gpl3+)))
16380
16381 (define-public python2-relatorio
16382 (package-with-python2 python-relatorio))
16383
16384 (define-public python-radon
16385 (package
16386 (name "python-radon")
16387 (version "4.1.0")
16388 (source
16389 (origin
16390 (method url-fetch)
16391 (uri (pypi-uri "radon" version))
16392 (sha256
16393 (base32
16394 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
16395 (build-system python-build-system)
16396 (arguments
16397 `(#:phases (modify-phases %standard-phases
16398 (replace 'check
16399 (lambda _
16400 (invoke "python" "radon/tests/run.py"))))))
16401 (propagated-inputs
16402 `(("python-colorama" ,python-colorama)
16403 ("python-flake8-polyfill" ,python-flake8-polyfill)
16404 ("python-mando" ,python-mando)))
16405 (native-inputs
16406 `(("python-pytest" ,python-pytest)
16407 ("python-pytest-mock" ,python-pytest-mock)))
16408 (home-page "https://radon.readthedocs.org/")
16409 (synopsis "Code Metrics in Python")
16410 (description "Radon is a Python tool which computes various code metrics.
16411 Supported metrics are:
16412 @itemize @bullet
16413 @item raw metrics: SLOC, comment lines, blank lines, &c.
16414 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16415 @item Halstead metrics (all of them)
16416 @item the Maintainability Index (a Visual Studio metric)
16417 @end itemize")
16418 (properties `((python2-variant . ,(delay python2-radon))))
16419 (license license:expat)))
16420
16421 (define-public python2-radon
16422 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16423 (package
16424 (inherit base)
16425 (propagated-inputs
16426 `(("python-configparser" ,python2-configparser)
16427 ("python-future" ,python2-future)
16428 ,@(package-propagated-inputs base))))))
16429
16430 (define-public python-sure
16431 (package
16432 (name "python-sure")
16433 (version "1.4.11")
16434 (source
16435 (origin
16436 (method url-fetch)
16437 (uri (pypi-uri "sure" version))
16438 (sha256
16439 (base32
16440 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16441 (build-system python-build-system)
16442 (propagated-inputs
16443 `(("python-mock" ,python-mock)
16444 ("python-six" ,python-six)))
16445 (native-inputs
16446 `(("python-nose" ,python-nose)))
16447 (home-page "https://github.com/gabrielfalcao/sure")
16448 (synopsis "Automated testing library in python for python")
16449 (description
16450 "Sure is a python library that leverages a DSL for writing assertions.
16451 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16452 (license license:gpl3+)))
16453
16454 (define-public python2-sure
16455 (package-with-python2 python-sure))
16456
16457 (define-public python2-couleur
16458 ;; This package does not seem to support python3 at all, hence,
16459 ;; only the python2 variant definition is provided.
16460 (package
16461 (name "python2-couleur")
16462 (version "0.6.2")
16463 (source
16464 (origin
16465 (method url-fetch)
16466 (uri (pypi-uri "couleur" version))
16467 (sha256
16468 (base32
16469 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16470 (build-system python-build-system)
16471 (arguments
16472 `(#:python ,python-2))
16473 (home-page "https://github.com/gabrielfalcao/couleur")
16474 (synopsis
16475 "ANSI terminal tool for python, colored shell and other handy fancy features")
16476 (description
16477 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16478 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16479 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16480 ;; https://github.com/gabrielfalcao/couleur/issues/11
16481 (license license:lgpl3+)))
16482
16483 (define-public python-misaka
16484 (package
16485 (name "python-misaka")
16486 (version "2.1.1")
16487 (source
16488 (origin
16489 (method url-fetch)
16490 (uri (pypi-uri "misaka" version))
16491 (sha256
16492 (base32
16493 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16494 (build-system python-build-system)
16495 (arguments
16496 `(;; Line 37 of setup.py calls self.run_command('develop')
16497 ;; in the 'check' phase. This command seems to be trying
16498 ;; to write to
16499 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16500 ;; for which it does not have the permission to write.
16501 #:tests? #f))
16502 (propagated-inputs
16503 `(("python-cffi" ,python-cffi)))
16504 (home-page "https://github.com/FSX/misaka")
16505 (synopsis "Python binding for Hoedown")
16506 (description
16507 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16508 library written in C. It features a fast HTML renderer and functionality to make custom
16509 renderers (e.g. man pages or LaTeX).")
16510 (license license:expat)))
16511
16512 (define-public python2-misaka
16513 (package-with-python2 python-misaka))
16514
16515 (define-public python2-steadymark
16516 ;; This is forced into being a python2 only variant
16517 ;; due to its dependence on couleur that has no support
16518 ;; for python3
16519 (package
16520 (name "python2-steadymark")
16521 (version "0.7.3")
16522 (source
16523 (origin
16524 (method url-fetch)
16525 (uri (pypi-uri "steadymark" version))
16526 (sha256
16527 (base32
16528 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16529 (build-system python-build-system)
16530 (native-inputs
16531 `(("python-couleur" ,python2-couleur)
16532 ("python-sure" ,python2-sure)
16533 ("python-misaka" ,python2-misaka)))
16534 (arguments
16535 `(#:python ,python-2
16536 #:phases
16537 (modify-phases %standard-phases
16538 (add-before 'build 'patch-setup-py
16539 (lambda _
16540 ;; Update requirements from dependency==version
16541 ;; to dependency>=version
16542 (substitute* "setup.py"
16543 (("==") ">="))
16544 #t)))))
16545 (home-page "https://github.com/gabrielfalcao/steadymark")
16546 (synopsis "Markdown-based test runner for python")
16547 (description
16548 "@code{Steadymark} allows documentation to be written in github-flavoured
16549 markdown. The documentation may contain snippets of code surrounded by python
16550 code blocks and @code{Steadymark} will find these snippets and run them, making
16551 sure that there are no old malfunctional examples in the documentation examples.")
16552 (license license:expat)))
16553
16554 (define-public python-jsonpointer
16555 (package
16556 (name "python-jsonpointer")
16557 (version "1.10")
16558 (source
16559 (origin
16560 (method url-fetch)
16561 (uri (pypi-uri "jsonpointer" version))
16562 (sha256
16563 (base32
16564 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16565 (build-system python-build-system)
16566 (home-page "https://github.com/stefankoegl/python-json-pointer")
16567 (synopsis "Identify specific nodes in a JSON document")
16568 (description "@code{jsonpointer} allows you to access specific nodes
16569 by path in a JSON document (see RFC 6901).")
16570 (license license:bsd-3)))
16571
16572 (define-public python2-jsonpointer
16573 (package-with-python2 python-jsonpointer))
16574
16575 (define-public python-jsonpatch
16576 (package
16577 (name "python-jsonpatch")
16578 (version "1.16")
16579 (source
16580 (origin
16581 (method git-fetch)
16582 ;; pypi version lacks tests.js
16583 (uri (git-reference
16584 (url "https://github.com/stefankoegl/python-json-patch")
16585 (commit (string-append "v" version))))
16586 (file-name (git-file-name name version))
16587 (sha256
16588 (base32
16589 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16590 (build-system python-build-system)
16591 (propagated-inputs
16592 `(("python-jsonpointer" ,python-jsonpointer)))
16593 (home-page "https://github.com/stefankoegl/python-json-patch")
16594 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16595 (description "@code{jsonpatch} is a library and program that allows
16596 applying JSON Patches according to RFC 6902.")
16597 (license license:bsd-3)))
16598
16599 (define-public python2-jsonpatch
16600 (package-with-python2 python-jsonpatch))
16601
16602 (define-public python-jsonpatch-0.4
16603 (package (inherit python-jsonpatch)
16604 (name "python-jsonpatch")
16605 (version "0.4")
16606 (source
16607 (origin
16608 (method git-fetch)
16609 (uri (git-reference
16610 (url "https://github.com/stefankoegl/python-json-patch")
16611 (commit (string-append "v" version))))
16612 (file-name (git-file-name name version))
16613 (sha256
16614 (base32
16615 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16616
16617 (define-public python2-jsonpatch-0.4
16618 (package-with-python2 python-jsonpatch-0.4))
16619
16620 (define-public python-rfc3986
16621 (package
16622 (name "python-rfc3986")
16623 (version "1.4.0")
16624 (source (origin
16625 (method url-fetch)
16626 (uri (pypi-uri "rfc3986" version))
16627 (sha256
16628 (base32
16629 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16630 (build-system python-build-system)
16631 (arguments
16632 `(#:modules ((guix build utils)
16633 (guix build python-build-system)
16634 (ice-9 ftw)
16635 (srfi srfi-1)
16636 (srfi srfi-26))
16637 #:phases
16638 (modify-phases %standard-phases
16639 (replace 'check
16640 (lambda _
16641 (let ((cwd (getcwd)))
16642 (setenv "PYTHONPATH"
16643 (string-append cwd "/build/"
16644 (find (cut string-prefix? "lib" <>)
16645 (scandir (string-append cwd "/build")))
16646 ":"
16647 (getenv "PYTHONPATH")))
16648 (invoke "pytest" "-v")))))))
16649 (native-inputs
16650 `(("python-pytest" ,python-pytest)))
16651 (home-page "https://rfc3986.readthedocs.io/")
16652 (synopsis "Parse and validate URI references")
16653 (description
16654 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16655 validation and authority parsing. This module also supports RFC@tie{}6874
16656 which adds support for zone identifiers to IPv6 addresses.")
16657 (license license:asl2.0)))
16658
16659 (define-public python2-rfc3986
16660 (package-with-python2 python-rfc3986))
16661
16662 (define-public python-rfc3987
16663 (package
16664 (name "python-rfc3987")
16665 (version "1.3.7")
16666 (source
16667 (origin
16668 (method url-fetch)
16669 (uri (pypi-uri "rfc3987" version))
16670 (sha256
16671 (base32
16672 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16673 (build-system python-build-system)
16674 (home-page "https://pypi.org/project/rfc3987/")
16675 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16676 (description "@code{rfc3987} provides routines for parsing and
16677 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16678 (license license:gpl3+)))
16679
16680 (define-public python2-rfc3987
16681 (package-with-python2 python-rfc3987))
16682
16683 ;; The latest commit contains fixes for building with both python3 and python2.
16684 (define-public python-rfc6555
16685 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16686 (revision "1"))
16687 (package
16688 (name "python-rfc6555")
16689 (version (git-version "0.0.0" revision commit))
16690 (source (origin
16691 (method git-fetch)
16692 (uri (git-reference
16693 (url "https://github.com/sethmlarson/rfc6555")
16694 (commit commit)))
16695 (file-name (git-file-name name version))
16696 (sha256
16697 (base32
16698 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16699 (build-system python-build-system)
16700 (arguments
16701 '(#:phases
16702 (modify-phases %standard-phases
16703 (replace 'check
16704 (lambda* (#:key tests? #:allow-other-keys)
16705 (if tests?
16706 ;; Other tests require network access.
16707 (invoke "pytest" "tests/test_ipv6.py")
16708 #t))))))
16709 (native-inputs
16710 `(("python-pytest" ,python-pytest)))
16711 (home-page "https://pypi.org/project/rfc6555/")
16712 (synopsis "Python implementation of RFC 6555")
16713 (description
16714 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16715 6555. Provided with a single file and dead-simple API to allow easy vendoring
16716 and integration into other projects.")
16717 (properties `((python2-variant . ,(delay python2-rfc6555))))
16718 (license license:asl2.0))))
16719
16720 (define-public python2-rfc6555
16721 (let ((base (package-with-python2
16722 (strip-python2-variant python-rfc6555))))
16723 (package
16724 (inherit base)
16725 (propagated-inputs
16726 `(("python2-selectors2" ,python2-selectors2))))))
16727
16728 (define-public python-bagit
16729 (package
16730 (name "python-bagit")
16731 (version "1.7.0")
16732 (source
16733 (origin
16734 (method url-fetch)
16735 (uri (pypi-uri "bagit" version))
16736 (sha256
16737 (base32
16738 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
16739 (build-system python-build-system)
16740 (native-inputs
16741 `(("python-setuptools-scm" ,python-setuptools-scm)
16742 ("python-coverage" ,python-coverage)
16743 ("python-mock" ,python-mock)))
16744 (home-page "https://libraryofcongress.github.io/bagit-python/")
16745 (synopsis "Create and validate BagIt packages")
16746 (description "Bagit is a Python library and command line utility for working
16747 with BagIt style packages. BagIt is a minimalist packaging format for digital
16748 preservation.")
16749 (license license:cc0)))
16750
16751 (define-public python-prov
16752 (package
16753 (name "python-prov")
16754 (version "2.0.0")
16755 (source
16756 (origin
16757 (method url-fetch)
16758 (uri (pypi-uri "prov" version))
16759 (sha256
16760 (base32
16761 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
16762 (build-system python-build-system)
16763 (propagated-inputs
16764 `(("python-dateutil" ,python-dateutil)
16765 ("python-lxml" ,python-lxml)
16766 ("python-networkx" ,python-networkx)
16767 ("python-rdflib" ,python-rdflib)))
16768 (native-inputs
16769 `(("graphviz" ,graphviz)
16770 ("python-pydot" ,python-pydot)))
16771 (home-page "https://github.com/trungdong/prov")
16772 (synopsis
16773 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
16774 (description
16775 "This package provides a library for W3C Provenance Data Model supporting
16776 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
16777 (license license:expat)))
16778
16779 (define-public python-arcp
16780 (package
16781 (name "python-arcp")
16782 (version "0.2.1")
16783 (source
16784 (origin
16785 (method url-fetch)
16786 (uri (pypi-uri "arcp" version))
16787 (sha256
16788 (base32
16789 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
16790 (build-system python-build-system)
16791 (native-inputs
16792 `(("python-pytest" ,python-pytest)))
16793 (home-page "http://arcp.readthedocs.io/")
16794 (synopsis
16795 "Archive and Package URI parser and generator")
16796 (description
16797 "@acronym{arcp, Archive and Package} provides functions for creating
16798 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
16799 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
16800 consume or reference hypermedia resources bundled inside a file archive or an
16801 application package, as well as to resolve URIs for archive resources within a
16802 programmatic framework. This URI scheme provides mechanisms to generate a
16803 unique base URI to represent the root of the archive, so that relative URI
16804 references in a bundled resource can be resolved within the archive without
16805 having to extract the archive content on the local file system. An arcp URI can
16806 be used for purposes of isolation (e.g. when consuming multiple archives),
16807 security constraints (avoiding \"climb out\" from the archive), or for
16808 externally identiyfing sub-resources referenced by hypermedia formats.")
16809 (license license:asl2.0)))
16810
16811 (define-public python-shellescape
16812 (package
16813 (name "python-shellescape")
16814 (version "3.8.1")
16815 (source
16816 (origin
16817 (method git-fetch)
16818 (uri (git-reference
16819 (url "https://github.com/chrissimpkins/shellescape")
16820 (commit (string-append "v" version))))
16821 (file-name (git-file-name name version))
16822 (sha256
16823 (base32
16824 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
16825 (build-system python-build-system)
16826 (arguments
16827 '(#:phases
16828 (modify-phases %standard-phases
16829 (replace 'check
16830 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
16831 (when tests?
16832 (add-installed-pythonpath inputs outputs)
16833 (invoke "python" "tests/test_shellescape.py"))
16834 #t)))))
16835 (native-inputs
16836 `(("python-pytest" ,python-pytest)))
16837 (home-page "https://github.com/chrissimpkins/shellescape")
16838 (synopsis
16839 "Shell escape a string to safely use it as a token in a shell command")
16840 (description
16841 "The shellescape Python module defines the @code{shellescape.quote()}
16842 function that returns a shell-escaped version of a Python string. This is a
16843 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
16844 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
16845 (license license:expat)))
16846
16847 (define-public python-validators
16848 (package
16849 (name "python-validators")
16850 (version "0.14.2")
16851 (source (origin
16852 (method url-fetch)
16853 (uri (pypi-uri "validators" version))
16854 (sha256
16855 (base32
16856 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
16857 (build-system python-build-system)
16858 (arguments
16859 '(#:phases (modify-phases %standard-phases
16860 (replace 'check
16861 (lambda _
16862 (invoke "pytest" "-vv"))))))
16863 (propagated-inputs
16864 `(("python-decorator" ,python-decorator)
16865 ("python-six" ,python-six)))
16866 (native-inputs
16867 `(("python-flake8" ,python-flake8)
16868 ("python-isort" ,python-isort)
16869 ("python-pytest" ,python-pytest)))
16870 (home-page "https://github.com/kvesteri/validators")
16871 (synopsis "Data validation library")
16872 (description
16873 "This package contains validators for different things such as email
16874 addresses, IP addresses, URLs, hashes and more. It has been designed to
16875 be easy to use and not require defining a schema or form just to validate
16876 some input.")
16877 (license license:expat)))
16878
16879 (define-public python2-validators
16880 (package-with-python2 python-validators))
16881
16882 (define-public python-validate-email
16883 (package
16884 (name "python-validate-email")
16885 (version "1.3")
16886 (source
16887 (origin
16888 (method url-fetch)
16889 (uri (pypi-uri "validate_email" version))
16890 (sha256
16891 (base32
16892 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16893 (build-system python-build-system)
16894 (home-page "https://github.com/syrusakbary/validate_email")
16895 (synopsis "Verifies if an email address is valid and really exists")
16896 (description "@code{validate_email} can be used to verify if an email
16897 address is valid and really exists.")
16898 (license license:lgpl3+)))
16899
16900 (define-public python2-validate-email
16901 (package-with-python2 python-validate-email))
16902
16903 (define-public python-flex
16904 (package
16905 (name "python-flex")
16906 (version "6.10.0")
16907 (source
16908 (origin
16909 (method url-fetch)
16910 (uri (pypi-uri "flex" version))
16911 (sha256
16912 (base32
16913 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16914 (build-system python-build-system)
16915 (propagated-inputs
16916 `(("python-click" ,python-click)
16917 ("python-iso8601" ,python-iso8601)
16918 ("python-jsonpointer" ,python-jsonpointer)
16919 ("python-pyyaml" ,python-pyyaml)
16920 ("python-requests" ,python-requests)
16921 ("python-rfc3987" ,python-rfc3987)
16922 ("python-six" ,python-six)
16923 ("python-validate-email" ,python-validate-email)))
16924 (home-page "https://github.com/pipermerriam/flex")
16925 (synopsis "Validates Swagger schemata")
16926 (description "@code{flex} can be used to validate Swagger schemata.")
16927 (license license:bsd-3)))
16928
16929 (define-public python2-flex
16930 (package-with-python2 python-flex))
16931
16932 (define-public python-marshmallow
16933 (package
16934 (name "python-marshmallow")
16935 (version "3.9.1")
16936 (source
16937 (origin
16938 (method url-fetch)
16939 (uri (pypi-uri "marshmallow" version))
16940 (sha256
16941 (base32
16942 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
16943 (build-system python-build-system)
16944 (propagated-inputs
16945 `(("python-dateutil" ,python-dateutil)
16946 ("python-simplejson" ,python-simplejson)))
16947 (native-inputs
16948 `(("python-pytest" ,python-pytest)
16949 ("python-pytz" ,python-pytz)))
16950 (home-page "https://github.com/marshmallow-code/marshmallow")
16951 (synopsis "Convert complex datatypes to and from native
16952 Python datatypes.")
16953 (description "@code{marshmallow} provides a library for converting
16954 complex datatypes to and from native Python datatypes.")
16955 (license license:expat)))
16956
16957 (define-public python-apispec
16958 (package
16959 (name "python-apispec")
16960 (version "4.0.0")
16961 (source
16962 (origin
16963 (method url-fetch)
16964 (uri (pypi-uri "apispec" version))
16965 (sha256
16966 (base32
16967 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
16968 (build-system python-build-system)
16969 (arguments
16970 '(#:phases (modify-phases %standard-phases
16971 (add-after 'unpack 'disable-prance-tests
16972 (lambda _
16973 ;; Disable validation tests since they require the
16974 ;; optional 'prance' library which is not yet in Guix.
16975 (substitute* "tests/test_ext_marshmallow_openapi.py"
16976 (("def test_openapi_tools_validate.*" all)
16977 (string-append "@pytest.mark.xfail\n" all)))))
16978 (replace 'check
16979 (lambda _
16980 (setenv "PYTHONPATH"
16981 (string-append "./build/lib:"
16982 (getenv "PYTHONPATH")))
16983 (invoke "pytest" "-vv"))))))
16984 (propagated-inputs
16985 `(("python-pyyaml" ,python-pyyaml)))
16986 (native-inputs
16987 `(("python-pytest" ,python-pytest)
16988 ("python-marshmallow" ,python-marshmallow)))
16989 (home-page "https://github.com/marshmallow-code/apispec")
16990 (synopsis "Swagger/OpenAPI specification generator")
16991 (description "@code{python-apispec} is a pluggable API specification
16992 generator. It currently supports the OpenAPI specification, formerly known
16993 as Swagger.")
16994 (license license:expat)))
16995
16996 (define-public python-flasgger
16997 (package
16998 (name "python-flasgger")
16999 (version "0.6.3")
17000 (source
17001 (origin
17002 (method git-fetch)
17003 (uri (git-reference
17004 (url "https://github.com/rochacbruno/flasgger")
17005 (commit version)))
17006 (file-name (git-file-name name version))
17007 (sha256
17008 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
17009 (build-system python-build-system)
17010 (arguments
17011 `(#:phases
17012 (modify-phases %standard-phases
17013 (replace 'check
17014 (lambda* (#:key inputs outputs #:allow-other-keys)
17015 (substitute* "Makefile"
17016 (("flake8 flasgger --ignore=F403")
17017 "flake8 flasgger --ignore=E731,F403"))
17018 (setenv "PYTHONPATH" (string-append (getcwd)
17019 ":"
17020 (getenv "PYTHONPATH")))
17021 (invoke "py.test"))))))
17022 (propagated-inputs
17023 `(("python-flask" ,python-flask)
17024 ("python-pyyaml" ,python-pyyaml)
17025 ("python-jsonschema" ,python-jsonschema)
17026 ("python-mistune" ,python-mistune)
17027 ("python-six" ,python-six)))
17028 (native-inputs
17029 `(("python-decorator" ,python-decorator)
17030 ("python-flake8" ,python-flake8)
17031 ("python-flask-restful" ,python-flask-restful)
17032 ("python-flex" ,python-flex)
17033 ("python-pytest" ,python-pytest)
17034 ("python-pytest-cov" ,python-pytest-cov)
17035 ("python-marshmallow" ,python-marshmallow)
17036 ("python-apispec" ,python-apispec)))
17037 (home-page "https://github.com/rochacbruno/flasgger/")
17038 (synopsis "Extract Swagger specs from your Flask project")
17039 (description "@code{python-flasgger} allows extracting Swagger specs
17040 from your Flask project. It is a fork of Flask-Swagger.")
17041 (license license:expat)))
17042
17043 (define-public python-swagger-spec-validator
17044 (package
17045 (name "python-swagger-spec-validator")
17046 (version "2.4.3")
17047 (source
17048 (origin
17049 (method url-fetch)
17050 (uri (pypi-uri "swagger-spec-validator" version))
17051 (sha256
17052 (base32
17053 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
17054 (build-system python-build-system)
17055 (propagated-inputs
17056 `(("python-jsonschema" ,python-jsonschema)
17057 ("python-pyyaml" ,python-pyyaml)
17058 ("python-six" ,python-six)))
17059 (home-page
17060 "https://github.com/Yelp/swagger_spec_validator")
17061 (synopsis "Validation of Swagger specifications")
17062 (description "@code{swagger_spec_validator} provides a library for
17063 validating Swagger API specifications.")
17064 (license license:asl2.0)))
17065
17066 (define-public python2-swagger-spec-validator
17067 (package-with-python2 python-swagger-spec-validator))
17068
17069 (define-public python-apache-libcloud
17070 (package
17071 (name "python-apache-libcloud")
17072 (version "3.1.0")
17073 (source
17074 (origin
17075 (method url-fetch)
17076 (uri (pypi-uri "apache-libcloud" version))
17077 (sha256
17078 (base32
17079 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
17080 (build-system python-build-system)
17081 (arguments
17082 `(#:phases
17083 (modify-phases %standard-phases
17084 (add-after 'unpack 'patch-ssh
17085 (lambda* (#:key inputs #:allow-other-keys)
17086 (substitute* "libcloud/compute/ssh.py"
17087 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
17088 "/bin/ssh" "'")))
17089 #t))
17090 (add-after 'unpack 'patch-tests
17091 (lambda _
17092 (substitute* "libcloud/test/compute/test_ssh_client.py"
17093 (("class ShellOutSSHClientTests")
17094 "@unittest.skip(\"Guix container doesn't have ssh service\")
17095 class ShellOutSSHClientTests"))
17096 #t))
17097 (add-before 'check 'copy-secret
17098 (lambda _
17099 (copy-file "libcloud/test/secrets.py-dist"
17100 "libcloud/test/secrets.py")
17101 #t)))))
17102 (inputs
17103 `(("openssh" ,openssh)))
17104 (propagated-inputs
17105 `(("python-paramiko" ,python-paramiko)
17106 ("python-requests" ,python-requests)))
17107 (native-inputs
17108 `(("python-lockfile" ,python-lockfile)
17109 ("python-mock" ,python-mock)
17110 ("python-pytest" ,python-pytest)
17111 ("python-pytest-runner" ,python-pytest-runner)
17112 ("python-requests-mock" ,python-requests-mock)))
17113 (home-page "https://libcloud.apache.org/")
17114 (synopsis "Unified Cloud API")
17115 (description "@code{libcloud} is a Python library for interacting with
17116 many of the popular cloud service providers using a unified API.")
17117 (license license:asl2.0)))
17118
17119 (define-public python-smmap
17120 (package
17121 (name "python-smmap")
17122 (version "3.0.1")
17123 (source
17124 (origin
17125 (method url-fetch)
17126 (uri (pypi-uri "smmap" version))
17127 (sha256
17128 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
17129 (build-system python-build-system)
17130 (native-inputs
17131 `(("python-nosexcover" ,python-nosexcover)))
17132 (home-page "https://github.com/Byron/smmap")
17133 (synopsis "Python sliding window memory map manager")
17134 (description "@code{smmap} is a pure Python implementation of a sliding
17135 window memory map manager.")
17136 (license license:bsd-3)))
17137
17138 (define-public python-smmap2
17139 (deprecated-package "python-smmap2" python-smmap))
17140
17141 (define-public python2-smmap
17142 (package-with-python2 python-smmap))
17143
17144 (define-public python2-smmap2
17145 (deprecated-package "python2-smmap2" python2-smmap))
17146
17147 (define-public python-regex
17148 (package
17149 (name "python-regex")
17150 (version "2020.6.8")
17151 (source (origin
17152 (method url-fetch)
17153 (uri (pypi-uri "regex" version))
17154 (sha256
17155 (base32
17156 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
17157 (build-system python-build-system)
17158 (arguments
17159 '(#:phases
17160 (modify-phases %standard-phases
17161 (replace 'check
17162 (lambda* (#:key inputs outputs #:allow-other-keys)
17163 (add-installed-pythonpath inputs outputs)
17164 (invoke "python" "-c"
17165 "from regex.test_regex import test_main; test_main()"))))))
17166 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
17167 (synopsis "Alternative regular expression module")
17168 (description "This regular expression implementation is backwards-
17169 compatible with the standard @code{re} module, but offers additional
17170 functionality like full case-folding for case-insensitive matches in Unicode.")
17171 (license license:psfl)))
17172
17173 (define-public python2-regex
17174 (package-with-python2 python-regex))
17175
17176 (define-public python-pyopengl
17177 (package
17178 (name "python-pyopengl")
17179 (version "3.1.5")
17180 (source
17181 (origin
17182 (method url-fetch)
17183 (uri (pypi-uri "PyOpenGL" version))
17184 (sha256
17185 (base32
17186 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
17187 (build-system python-build-system)
17188 (inputs
17189 `(("mesa" ,mesa)
17190 ("freeglut" ,freeglut)
17191 ("glu" ,glu)))
17192 (arguments
17193 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
17194 ;attribute 'OSMesa'
17195 #:phases
17196 (modify-phases %standard-phases
17197 (add-before 'build 'fix-paths
17198 (lambda* (#:key inputs outputs #:allow-other-keys)
17199 (substitute* '("OpenGL/platform/ctypesloader.py")
17200 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
17201 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
17202 (("'GL'")
17203 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
17204 (("'GLU'")
17205 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
17206 (("'glut',")
17207 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
17208 (("'GLESv1_CM'")
17209 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
17210 (("'GLESv2'")
17211 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
17212 ;; Not providing libgle. It seems to be very old.
17213 #t)))))
17214 (home-page "http://pyopengl.sourceforge.net")
17215 (synopsis "Standard OpenGL bindings for Python")
17216 (description
17217 "PyOpenGL is the most common cross platform Python binding to OpenGL and
17218 related APIs. The binding is created using the standard @code{ctypes}
17219 library.")
17220 (license license:bsd-3)))
17221
17222 (define-public python-pyopengl-accelerate
17223 (package
17224 (inherit python-pyopengl)
17225 (name "python-pyopengl-accelerate")
17226 (version "3.1.5")
17227 (source
17228 (origin
17229 (method url-fetch)
17230 (uri (pypi-uri "PyOpenGL-accelerate" version))
17231 (sha256
17232 (base32
17233 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
17234 (inputs
17235 `(("mesa" ,mesa)
17236 ("python-numpy" ,python-numpy))) ; for cython module
17237 ; numpy_formathandler, thus not propagated
17238 (arguments
17239 `(#:tests? #f
17240 #:phases
17241 (modify-phases %standard-phases
17242 (delete 'fix-paths))))
17243 (synopsis "Acceleration code for PyOpenGL")
17244 (description
17245 "This is the Cython-coded accelerator module for PyOpenGL.")))
17246
17247 (define-public python-rencode
17248 (package
17249 (name "python-rencode")
17250 (version "1.0.5")
17251 (source
17252 (origin
17253 (method url-fetch)
17254 (uri (pypi-uri "rencode" version))
17255 (sha256
17256 (base32
17257 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
17258 (build-system python-build-system)
17259 (arguments
17260 `(#:phases
17261 (modify-phases %standard-phases
17262 (add-before 'check 'delete-bogus-test
17263 ;; This test requires /home/aresch/Downloads, which is not provided by
17264 ;; the build environment.
17265 (lambda _
17266 (delete-file "rencode/t.py")
17267 #t)))))
17268 (native-inputs `(("pkg-config" ,pkg-config)
17269 ("python-cython" ,python-cython)))
17270 (home-page "https://github.com/aresch/rencode")
17271 (synopsis "Serialization of heterogeneous data structures")
17272 (description
17273 "The @code{rencode} module is a data structure serialization library,
17274 similar to @code{bencode} from the BitTorrent project. For complex,
17275 heterogeneous data structures with many small elements, r-encoding stake up
17276 significantly less space than b-encodings. This version of rencode is a
17277 complete rewrite in Cython to attempt to increase the performance over the
17278 pure Python module.")
17279 (license license:bsd-3)))
17280
17281 (define-public python2-rencode
17282 (package-with-python2 python-rencode))
17283
17284 (define-public python-xenon
17285 (package
17286 (name "python-xenon")
17287 (version "0.7.0")
17288 (source
17289 (origin
17290 (method url-fetch)
17291 (uri (pypi-uri "xenon" version))
17292 (sha256
17293 (base32
17294 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
17295 (build-system python-build-system)
17296 (native-inputs
17297 `(("python-pyyaml" ,python-pyyaml)
17298 ("python-radon" ,python-radon)
17299 ("python-requests" ,python-requests)
17300 ("python-flake8" ,python-flake8)
17301 ("python-tox" ,python-tox)))
17302 (arguments
17303 `(#:tests? #f ;test suite not shipped with the PyPI archive
17304 #:phases
17305 (modify-phases %standard-phases
17306 (add-before 'build 'patch-test-requirements
17307 (lambda _
17308 ;; Remove httpretty dependency for tests.
17309 (substitute* "setup.py"
17310 (("httpretty") ""))
17311 #t)))))
17312 (home-page "https://xenon.readthedocs.org/")
17313 (synopsis "Monitor code metrics for Python on your CI server")
17314 (description
17315 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
17316 Ideally, @code{xenon} is run every time code is committed. Through command
17317 line options, various thresholds can be set for the complexity of code. It
17318 will fail (i.e. it will exit with a non-zero exit code) when any of these
17319 requirements is not met.")
17320 (license license:expat)))
17321
17322 (define-public python-pysocks
17323 (package
17324 (name "python-pysocks")
17325 (version "1.7.1")
17326 (source
17327 (origin
17328 (method url-fetch)
17329 (uri (pypi-uri "PySocks" version))
17330 (sha256
17331 (base32
17332 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
17333 (build-system python-build-system)
17334 (arguments `(#:tests? #f))
17335 (home-page "https://github.com/Anorov/PySocks")
17336 (synopsis "SOCKS client module")
17337 (description "@code{pysocks} is an updated and semi-actively maintained
17338 version of @code{SocksiPy} with bug fixes and extra features.")
17339 (license license:bsd-3)))
17340
17341 (define-public python2-pysocks
17342 (package-with-python2 python-pysocks))
17343
17344 (define-public python-pydiff
17345 (package
17346 (name "python-pydiff")
17347 (version "0.2")
17348 (source
17349 (origin
17350 (method url-fetch)
17351 (uri (pypi-uri "pydiff" version))
17352 (sha256
17353 (base32
17354 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17355 (build-system python-build-system)
17356 (home-page "https://github.com/myint/pydiff")
17357 (synopsis "Library to diff two Python files at the bytecode level")
17358 (description
17359 "@code{pydiff} makes it easy to look for actual code changes while
17360 ignoring formatting changes.")
17361 (license license:expat)))
17362
17363 (define-public python2-pydiff
17364 (package-with-python2 python-pydiff))
17365
17366 (define-public python-pydub
17367 (package
17368 (name "python-pydub")
17369 (version "0.24.1")
17370 (source
17371 (origin
17372 (method url-fetch)
17373 (uri (pypi-uri "pydub" version))
17374 (sha256
17375 (base32
17376 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17377 (build-system python-build-system)
17378 (arguments
17379 `(#:phases
17380 (modify-phases %standard-phases
17381 (add-after 'unpack 'fix-ffmpeg-path
17382 (lambda* (#:key inputs #:allow-other-keys)
17383 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17384 (substitute* '("pydub/utils.py")
17385 (("return \"ffmpeg\"")
17386 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17387 (("return \"ffplay\"")
17388 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17389 (("return \"ffprobe\"")
17390 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17391 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17392 #t))))))
17393 (home-page "https://pydub.com")
17394 (inputs
17395 `(("ffmpeg" ,ffmpeg)))
17396 (propagated-inputs
17397 `(("python-scipy" ,python-scipy)))
17398 (synopsis "Manipulate audio with a high level interface in Python")
17399 (description
17400 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17401 @code{ffmpeg} to open various audio formats.")
17402 (license license:expat))) ; MIT license
17403
17404 (define-public python-tqdm
17405 (package
17406 (name "python-tqdm")
17407 (version "4.43.0")
17408 (source
17409 (origin
17410 (method url-fetch)
17411 (uri (pypi-uri "tqdm" version))
17412 (sha256
17413 (base32
17414 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17415 (build-system python-build-system)
17416 (arguments
17417 '(#:phases (modify-phases %standard-phases
17418 (replace 'check
17419 (lambda* (#:key inputs outputs #:allow-other-keys)
17420 (add-installed-pythonpath inputs outputs)
17421 ;; This invokation is taken from tox.ini.
17422 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17423 "-d" "-v" "tqdm/"))))))
17424 (native-inputs
17425 `(("python-nose" ,python-nose)))
17426 (home-page "https://github.com/tqdm/tqdm")
17427 (synopsis "Fast, extensible progress meter")
17428 (description
17429 "Make loops show a progress bar on the console by just wrapping any
17430 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17431 design and layout.")
17432 (license (list license:mpl2.0 license:expat))))
17433
17434 (define-public python2-tqdm
17435 (package-with-python2 python-tqdm))
17436
17437 (define-public python-pkginfo
17438 (package
17439 (name "python-pkginfo")
17440 (version "1.7.0")
17441 (source
17442 (origin
17443 (method url-fetch)
17444 (uri (pypi-uri "pkginfo" version))
17445 (sha256
17446 (base32
17447 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
17448 (build-system python-build-system)
17449 (arguments
17450 `(#:phases
17451 (modify-phases %standard-phases
17452 (add-before 'check 'patch-tests
17453 (lambda _
17454 (substitute* "pkginfo/tests/test_installed.py"
17455 (("test_ctor_w_package_no_PKG_INFO")
17456 "_test_ctor_w_package_no_PKG_INFO"))
17457 #t)))))
17458 (home-page
17459 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17460 (synopsis
17461 "Query metadatdata from sdists, bdists, and installed packages")
17462 (description
17463 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17464 source distriubtion (an sdist) or a binary distribution (e.g., created by
17465 running bdist_egg). It can also query the EGG-INFO directory of an installed
17466 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17467 created by running @code{python setup.py develop}).")
17468 (license license:expat)))
17469
17470 (define-public python2-pkginfo
17471 (package-with-python2 python-pkginfo))
17472
17473 (define-public python-twine
17474 (package
17475 (name "python-twine")
17476 (version "1.15.0")
17477 (source
17478 (origin
17479 (method url-fetch)
17480 (uri (pypi-uri "twine" version))
17481 (sha256
17482 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17483 (build-system python-build-system)
17484 (propagated-inputs
17485 `(("python-tqdm" ,python-tqdm)
17486 ("python-packaging" ,python-packaging)
17487 ("python-pkginfo" ,python-pkginfo)
17488 ("python-readme-renderer" ,python-readme-renderer)
17489 ("python-requests" ,python-requests)
17490 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17491 (home-page "https://github.com/pypa/twine")
17492 (synopsis "Collection of utilities for interacting with PyPI")
17493 (description
17494 "@code{twine} currently supports registering projects and uploading
17495 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17496 their files and supports any packaging format (including wheels).")
17497 (license license:asl2.0)))
17498
17499 (define-public python2-twine
17500 (package-with-python2 python-twine))
17501
17502 (define-public python-linecache2
17503 (package
17504 (name "python-linecache2")
17505 (version "1.0.0")
17506 (source
17507 (origin
17508 (method url-fetch)
17509 (uri (pypi-uri "linecache2" version))
17510 (sha256
17511 (base32
17512 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17513 (build-system python-build-system)
17514 (arguments
17515 `(;; The tests depend on unittest2, and our version is a bit too old.
17516 #:tests? #f))
17517 (native-inputs
17518 `(("python-pbr" ,python-pbr-minimal)))
17519 (home-page
17520 "https://github.com/testing-cabal/linecache2")
17521 (synopsis "Backports of the linecache module")
17522 (description
17523 "The linecache module allows one to get any line from any file, while
17524 attempting to optimize internally, using a cache, the common case where many
17525 lines are read from a single file.")
17526 (license license:psfl)))
17527
17528 (define-public python2-linecache2
17529 (package-with-python2 python-linecache2))
17530
17531 (define-public python-traceback2
17532 (package
17533 (name "python-traceback2")
17534 (version "1.4.0")
17535 (source
17536 (origin
17537 (method url-fetch)
17538 (uri (pypi-uri "traceback2" version))
17539 (sha256
17540 (base32
17541 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17542 (build-system python-build-system)
17543 (arguments
17544 `(;; python-traceback2 and python-unittest2 depend on one another.
17545 #:tests? #f))
17546 (native-inputs
17547 `(("python-pbr" ,python-pbr-minimal)))
17548 (propagated-inputs
17549 `(("python-linecache2" ,python-linecache2)))
17550 (home-page
17551 "https://github.com/testing-cabal/traceback2")
17552 (synopsis "Backports of the traceback module")
17553 (description
17554 "This module provides a standard interface to extract, format and print
17555 stack traces of Python programs. It exactly mimics the behavior of the Python
17556 interpreter when it prints a stack trace.")
17557 (license license:psfl)))
17558
17559 (define-public python2-traceback2
17560 (package-with-python2 python-traceback2))
17561
17562 (define-public python-ratelimiter
17563 (package
17564 (name "python-ratelimiter")
17565 (version "1.2.0")
17566 (source
17567 (origin
17568 (method url-fetch)
17569 (uri (pypi-uri "ratelimiter" version))
17570 (sha256
17571 (base32
17572 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17573 (build-system python-build-system)
17574 (arguments
17575 '(#:tests? #f)) ; There are no tests in the pypi archive.
17576 (home-page "https://github.com/RazerM/ratelimiter")
17577 (synopsis "Simple rate limiting object")
17578 (description
17579 "The @code{ratelimiter} module ensures that an operation will not be
17580 executed more than a given number of times during a given period.")
17581 (license license:asl2.0)))
17582
17583 (define-public python2-ratelimiter
17584 (package-with-python2 python-ratelimiter))
17585
17586 (define-public python-dukpy
17587 (package
17588 (name "python-dukpy")
17589 (version "0.3")
17590 (source
17591 (origin
17592 (method git-fetch)
17593 (uri (git-reference
17594 (url "https://github.com/kovidgoyal/dukpy")
17595 (commit (string-append "v" version))))
17596 (file-name (git-file-name name version))
17597 (sha256
17598 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17599 (build-system python-build-system)
17600 (home-page "https://github.com/kovidgoyal/dukpy")
17601 (synopsis "Run JavaScript in python")
17602 (description
17603 "dukpy is a JavaScript runtime environment for Python using the duktape
17604 embeddable JavaScript engine.")
17605 ;; Dukpy is licensed under MIT like the embedded duktape library,
17606 ;; with 'errors.c' as GPL3.
17607 (license (list license:expat license:gpl3))))
17608
17609 (define-public python2-dukpy
17610 (package-with-python2 python-dukpy))
17611
17612 (define-public python-jsonrpclib-pelix
17613 (package
17614 (name "python-jsonrpclib-pelix")
17615 (version "0.3.2")
17616 (source
17617 (origin
17618 (method url-fetch)
17619 (uri (pypi-uri "jsonrpclib-pelix" version))
17620 (sha256
17621 (base32
17622 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17623 (build-system python-build-system)
17624 (arguments
17625 `(#:tests? #f)) ; no tests in PyPI tarball
17626 (home-page "https://github.com/tcalmant/jsonrpclib/")
17627 (synopsis "JSON-RPC 2.0 client library for Python")
17628 (description
17629 "This library implements the JSON-RPC v2.0
17630 specification (backwards-compatible) as a client library for Python. This
17631 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17632 services.")
17633 (license license:asl2.0)))
17634
17635 (define-public python2-jsonrpclib-pelix
17636 (package-with-python2 python-jsonrpclib-pelix))
17637
17638 (define-public python-setuptools-scm-git-archive
17639 (package
17640 (name "python-setuptools-scm-git-archive")
17641 (version "1.0")
17642 (source
17643 (origin
17644 (method url-fetch)
17645 (uri (pypi-uri "setuptools_scm_git_archive" version))
17646 (sha256
17647 (base32
17648 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17649 (build-system python-build-system)
17650 (native-inputs
17651 `(("python-pytest" ,python-pytest)))
17652 (propagated-inputs
17653 `(("python-setuptools-scm" ,python-setuptools-scm)))
17654 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17655 (synopsis "Setuptools_scm plugin for git archives")
17656 (description
17657 "The setuptools_scm_git_archive package is a plugin to
17658 setuptools_scm, which supports obtaining versions from git archives that
17659 belong to tagged versions.")
17660 (license license:expat)))
17661
17662 (define-public python2-setuptools-scm-git-archive
17663 (package-with-python2 python-setuptools-scm-git-archive))
17664
17665 (define-public python-setuptools-git
17666 (package
17667 (name "python-setuptools-git")
17668 (version "1.2")
17669 (source
17670 (origin
17671 (method url-fetch)
17672 (uri (pypi-uri "setuptools-git" version))
17673 (sha256
17674 (base32
17675 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17676 (build-system python-build-system)
17677 (arguments
17678 `(#:phases
17679 (modify-phases %standard-phases
17680 ;; This is needed for tests.
17681 (add-after 'unpack 'configure-git
17682 (lambda _
17683 (setenv "HOME" "/tmp")
17684 (invoke "git" "config" "--global" "user.email" "guix")
17685 (invoke "git" "config" "--global" "user.name" "guix")
17686 #t)))))
17687 (native-inputs
17688 `(("git" ,git-minimal)))
17689 (home-page "https://github.com/msabramo/setuptools-git")
17690 (synopsis "Setuptools revision control system plugin for Git")
17691 (description
17692 "This package provides a plugin for Setuptools for revision control with
17693 Git.")
17694 (license license:bsd-3)))
17695
17696 (define-public python-pyclipper
17697 (package
17698 (name "python-pyclipper")
17699 (version "1.1.0.post3")
17700 (source
17701 (origin
17702 (method url-fetch)
17703 (uri (pypi-uri "pyclipper" version ".zip"))
17704 (sha256
17705 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17706 (modules '((guix build utils)))
17707 (snippet
17708 '(begin
17709 ;; This file is generated by Cython.
17710 (delete-file "pyclipper/pyclipper.cpp") #t))))
17711 (build-system python-build-system)
17712 (arguments
17713 `(#:phases
17714 (modify-phases %standard-phases
17715 (add-before 'build 'cythonize-sources
17716 (lambda _
17717 (with-directory-excursion "pyclipper"
17718 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17719 (propagated-inputs
17720 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17721 (native-inputs
17722 `(("python-cython" ,python-cython)
17723 ("python-pytest" ,python-pytest)
17724 ("python-pytest-runner" ,python-pytest-runner)
17725 ("python-unittest2" ,python-unittest2)
17726 ("unzip" ,unzip)))
17727 (home-page "https://github.com/greginvm/pyclipper")
17728 (synopsis "Wrapper for Angus Johnson's Clipper library")
17729 (description
17730 "Pyclipper is a Cython wrapper for the C++ translation of the
17731 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17732 (license license:expat)))
17733
17734 (define-public python2-pyclipper
17735 (package-with-python2 python-pyclipper))
17736
17737 (define-public python2-booleanoperations
17738 (package
17739 (name "python2-booleanoperations")
17740 (version "0.7.1")
17741 (source
17742 (origin
17743 (method url-fetch)
17744 (uri (pypi-uri "booleanOperations" version ".zip"))
17745 (sha256
17746 (base32
17747 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17748 (build-system python-build-system)
17749 (arguments
17750 `(#:python ,python-2))
17751 (native-inputs
17752 `(("unzip" ,unzip)
17753 ("python2-pytest" ,python2-pytest)
17754 ("python2-pytest-runner" ,python2-pytest-runner)))
17755 (propagated-inputs
17756 `(("python-fonttools" ,python2-fonttools)
17757 ("python-pyclipper" ,python2-pyclipper)
17758 ("python-ufolib" ,python2-ufolib)))
17759 (home-page "https://github.com/typemytype/booleanOperations")
17760 (synopsis "Boolean operations on paths")
17761 (description
17762 "BooleanOperations provides a Python library that enables
17763 boolean operations on paths.")
17764 (license license:expat)))
17765
17766 (define-public python-tempdir
17767 (package
17768 (name "python-tempdir")
17769 (version "0.7.1")
17770 (source
17771 (origin
17772 (method url-fetch)
17773 (uri (pypi-uri "tempdir" version))
17774 (sha256
17775 (base32
17776 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17777 (build-system python-build-system)
17778 (home-page "https://pypi.org/project/tempdir/")
17779 (arguments
17780 ;; the package has no tests
17781 '(#:tests? #f))
17782 (synopsis "Python library for managing temporary directories")
17783 (description
17784 "This library manages temporary directories that are automatically
17785 deleted with all their contents when they are no longer needed. It is
17786 particularly convenient for use in tests.")
17787 (license license:expat)))
17788
17789 (define-public python2-tempdir
17790 (package-with-python2 python-tempdir))
17791
17792 (define-public python-activepapers
17793 (package
17794 (name "python-activepapers")
17795 (version "0.2.2")
17796 (source
17797 (origin
17798 (method url-fetch)
17799 (uri (pypi-uri "ActivePapers.Py" version))
17800 (sha256
17801 (base32
17802 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17803 (build-system python-build-system)
17804 (arguments
17805 `(#:modules ((ice-9 ftw)
17806 (srfi srfi-1)
17807 (guix build utils)
17808 (guix build python-build-system))
17809
17810 #:phases
17811 (modify-phases %standard-phases
17812 (add-after 'unpack 'delete-python2-code
17813 (lambda _
17814 (for-each delete-file
17815 '("lib/activepapers/builtins2.py"
17816 "lib/activepapers/standardlib2.py"
17817 "lib/activepapers/utility2.py"))))
17818 (replace 'check
17819 (lambda _
17820 ;; Deactivate the test cases that download files
17821 (setenv "NO_NETWORK_ACCESS" "1")
17822 ;; For some strange reason, some tests fail if nosetests runs all
17823 ;; test modules in a single execution. They pass if each test
17824 ;; module is run individually.
17825 (for-each (lambda (filename)
17826 (invoke "nosetests"
17827 (string-append "tests/" filename)))
17828 (scandir "tests"
17829 (lambda (filename)
17830 (string-suffix? ".py" filename)))))))))
17831 (native-inputs
17832 `(("python-tempdir" ,python-tempdir)
17833 ("python-nose" ,python-nose)))
17834 (propagated-inputs
17835 `(("python-h5py" ,python-h5py)))
17836 (home-page "https://www.activepapers.org/")
17837 (synopsis "Executable papers for scientific computing")
17838 (description
17839 "ActivePapers is a tool for working with executable papers, which
17840 combine data, code, and documentation in single-file packages,
17841 suitable for publication as supplementary material or on repositories
17842 such as figshare or Zenodo.")
17843 (properties `((python2-variant . ,(delay python2-activepapers))))
17844 (license license:bsd-3)))
17845
17846 (define-public python2-activepapers
17847 (let ((base (package-with-python2
17848 (strip-python2-variant python-activepapers))))
17849 (package
17850 (inherit base)
17851 (arguments
17852 (substitute-keyword-arguments (package-arguments base)
17853 ((#:phases phases)
17854 `(modify-phases ,phases
17855 (delete 'delete-python2-code)
17856 (add-after 'unpack 'delete-python3-code
17857 (lambda _
17858 (for-each delete-file
17859 '("lib/activepapers/builtins3.py"
17860 "lib/activepapers/standardlib3.py"
17861 "lib/activepapers/utility3.py")))))))))))
17862
17863 (define-public python-semver
17864 (package
17865 (name "python-semver")
17866 (version "2.9.0")
17867 (source
17868 (origin
17869 (method url-fetch)
17870 (uri (pypi-uri "semver" version))
17871 (sha256
17872 (base32
17873 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
17874 (build-system python-build-system)
17875 (arguments
17876 `(#:phases (modify-phases %standard-phases
17877 (replace 'check
17878 (lambda _
17879 (delete-file "setup.cfg")
17880 (invoke "py.test"))))))
17881 (native-inputs
17882 `(("python-pytest" ,python-pytest)))
17883 (home-page "https://github.com/k-bx/python-semver")
17884 (synopsis "Python helper for Semantic Versioning")
17885 (description "This package provides a Python library for
17886 @url{Semantic Versioning, http://semver.org/}.")
17887 (license license:bsd-3)))
17888
17889 (define-public python2-semver
17890 (package-with-python2 python-semver))
17891
17892 (define-public python-pyro4
17893 (package
17894 (name "python-pyro4")
17895 (version "4.77")
17896 (source
17897 (origin
17898 (method url-fetch)
17899 (uri (pypi-uri "Pyro4" version))
17900 (sha256
17901 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
17902 (build-system python-build-system)
17903 (arguments
17904 '(#:tests? #f)) ;FIXME: Some tests require network access.
17905 (native-inputs
17906 `(("python-cloudpickle" ,python-cloudpickle)
17907 ("python-dill" ,python-dill)
17908 ("python-msgpack" ,python-msgpack)))
17909 (propagated-inputs
17910 `(("python-serpent" ,python-serpent)))
17911 (home-page "https://pyro4.readthedocs.io")
17912 (synopsis "Distributed object middleware for Python")
17913 (description
17914 "Pyro enables you to build applications in which objects can talk to each
17915 other over the network. You can just use normal Python method calls to call
17916 objects on other machines, also known as remote procedure calls (RPC).")
17917 (license license:expat)))
17918
17919 (define-public python2-pyro
17920 (package
17921 (name "python2-pyro")
17922 (version "3.16")
17923 (source
17924 (origin
17925 (method url-fetch)
17926 (uri (pypi-uri "Pyro" version))
17927 (file-name (string-append "Pyro-" version ".tar.gz"))
17928 (sha256
17929 (base32
17930 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
17931 (build-system python-build-system)
17932 (arguments
17933 ;; Pyro is not compatible with Python 3
17934 `(#:python ,python-2
17935 ;; Pyro has no test cases for automatic execution
17936 #:tests? #f))
17937 (home-page "https://pythonhosted.org/Pyro/")
17938 (synopsis "Distributed object manager for Python")
17939 (description "Pyro is a Distributed Object Technology system
17940 written in Python that is designed to be easy to use. It resembles
17941 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
17942 which is a system and language independent Distributed Object Technology
17943 and has much more to offer than Pyro or RMI. Pyro 3.x is no
17944 longer maintained. New projects should use Pyro4 instead, which
17945 is the new Pyro version that is actively developed.")
17946 (license license:expat)))
17947
17948 (define-public python2-scientific
17949 (package
17950 (name "python2-scientific")
17951 (version "2.9.4")
17952 (source
17953 (origin
17954 (method git-fetch)
17955 (uri (git-reference
17956 (url "https://github.com/khinsen/ScientificPython")
17957 (commit (string-append "rel" version))))
17958 (file-name (git-file-name name version))
17959 (sha256
17960 (base32
17961 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17962 (build-system python-build-system)
17963 (inputs
17964 `(("netcdf" ,netcdf)))
17965 (propagated-inputs
17966 `(("python-numpy" ,python2-numpy-1.8)
17967 ("python-pyro" ,python2-pyro)))
17968 (arguments
17969 ;; ScientificPython is not compatible with Python 3
17970 `(#:python ,python-2
17971 #:tests? #f ; No test suite
17972 #:phases
17973 (modify-phases %standard-phases
17974 (replace 'build
17975 (lambda* (#:key inputs #:allow-other-keys)
17976 (invoke "python" "setup.py" "build"
17977 (string-append "--netcdf_prefix="
17978 (assoc-ref inputs "netcdf"))))))))
17979 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
17980 (synopsis "Python modules for scientific computing")
17981 (description "ScientificPython is a collection of Python modules that are
17982 useful for scientific computing. Most modules are rather general (Geometry,
17983 physical units, automatic derivatives, ...) whereas others are more
17984 domain-specific (e.g. netCDF and PDB support). The library is currently
17985 not actively maintained and works only with Python 2 and NumPy < 1.9.")
17986 (license license:cecill-c)))
17987
17988 (define-public python2-mmtk
17989 (package
17990 (name "python2-mmtk")
17991 (version "2.7.12")
17992 (source
17993 (origin
17994 (method git-fetch)
17995 (uri (git-reference
17996 (url "https://github.com/khinsen/MMTK")
17997 (commit (string-append "rel" version))))
17998 (file-name (git-file-name name version))
17999 (sha256
18000 (base32
18001 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
18002 (build-system python-build-system)
18003 (native-inputs
18004 `(("netcdf" ,netcdf)))
18005 (propagated-inputs
18006 `(("python-scientific" ,python2-scientific)
18007 ("python-tkinter" ,python-2 "tk")))
18008 (arguments
18009 `(#:python ,python-2
18010 #:tests? #f
18011 #:phases
18012 (modify-phases %standard-phases
18013 (add-before 'build 'includes-from-scientific
18014 (lambda* (#:key inputs #:allow-other-keys)
18015 (mkdir-p "Include/Scientific")
18016 (copy-recursively
18017 (string-append
18018 (assoc-ref inputs "python-scientific")
18019 "/include/python2.7/Scientific")
18020 "Include/Scientific"))))))
18021 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
18022 (synopsis "Python library for molecular simulation")
18023 (description "MMTK is a library for molecular simulations with an emphasis
18024 on biomolecules. It provides widely used methods such as Molecular Dynamics
18025 and normal mode analysis, but also basic routines for implementing new methods
18026 for simulation and analysis. The library is currently not actively maintained
18027 and works only with Python 2 and NumPy < 1.9.")
18028 (license license:cecill-c)))
18029
18030 (define-public python-phonenumbers
18031 (package
18032 (name "python-phonenumbers")
18033 (version "8.9.1")
18034 (source
18035 (origin
18036 (method url-fetch)
18037 (uri (pypi-uri "phonenumbers" version))
18038 (sha256
18039 (base32
18040 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
18041 (build-system python-build-system)
18042 (home-page
18043 "https://github.com/daviddrysdale/python-phonenumbers")
18044 (synopsis
18045 "Python library for dealing with international phone numbers")
18046 (description
18047 "This package provides a Python port of Google's libphonenumber library.")
18048 (license license:asl2.0)))
18049
18050 (define-public python2-phonenumbers
18051 (package-with-python2 python-phonenumbers))
18052
18053 (define-public python-send2trash
18054 (package
18055 (name "python-send2trash")
18056 (version "1.5.0")
18057 (source
18058 (origin (method git-fetch)
18059 ;; Source tarball on PyPI doesn't include tests.
18060 (uri (git-reference
18061 (url "https://github.com/hsoft/send2trash")
18062 (commit version)))
18063 (file-name (git-file-name name version))
18064 (sha256
18065 (base32
18066 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
18067 (build-system python-build-system)
18068 (arguments
18069 '(#:phases
18070 (modify-phases %standard-phases
18071 (add-before 'check 'pre-check
18072 (lambda _
18073 (mkdir-p "/tmp/foo")
18074 (setenv "HOME" "/tmp/foo")
18075 #t)))))
18076 (home-page "https://github.com/hsoft/send2trash")
18077 (synopsis "Send files to the user's @file{~/Trash} directory")
18078 (description "This package provides a Python library to send files to the
18079 user's @file{~/Trash} directory.")
18080 (properties `((python2-variant . ,(delay python2-send2trash))))
18081 (license license:bsd-3)))
18082
18083 (define-public python2-send2trash
18084 (package
18085 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
18086 (arguments
18087 (substitute-keyword-arguments (package-arguments python-send2trash)
18088 ((#:phases phases)
18089 `(modify-phases ,phases
18090 (add-before 'check 'setenv
18091 (lambda _
18092 (setenv "PYTHONPATH"
18093 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18094 #t))))))))
18095
18096 (define-public python-pyfavicon
18097 (package
18098 (name "python-pyfavicon")
18099 (version "0.1.1")
18100 (source
18101 (origin
18102 (method url-fetch)
18103 (uri (pypi-uri "pyfavicon" version))
18104 (sha256
18105 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
18106 (build-system python-build-system)
18107 (arguments
18108 ;; There are no tests in the PyPI tarball and the tests from the
18109 ;; repository require online data.
18110 '(#:tests? #f))
18111 (propagated-inputs
18112 `(("python-aiohttp" ,python-aiohttp)
18113 ("python-beautifulsoup4" ,python-beautifulsoup4)
18114 ("python-pillow" ,python-pillow)))
18115 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
18116 (synopsis "Async favicon fetcher")
18117 (description
18118 "@code{pyfavicon} is an async favicon fetcher.")
18119 (license license:expat)))
18120
18121 (define-public python-yamllint
18122 (package
18123 (name "python-yamllint")
18124 (version "1.26.0")
18125 (source
18126 (origin
18127 (method url-fetch)
18128 (uri (pypi-uri "yamllint" version))
18129 (sha256
18130 (base32 "11qhs1jk9pwvyk5k3q5blh9sq42dh1ywdf1f3i2zixf7hncwir5h"))))
18131 (build-system python-build-system)
18132 (propagated-inputs
18133 `(("python-pathspec" ,python-pathspec)
18134 ("python-pyyaml" ,python-pyyaml)
18135 ("python-setuptools" ,python-setuptools)))
18136 (home-page "https://github.com/adrienverge/yamllint")
18137 (synopsis "Linter for YAML files")
18138 (description
18139 "Yamllint is a linter for YAML files. yamllint does not only check for
18140 syntax validity, but for weirdnesses like key repetition and cosmetic problems
18141 such as lines length, trailing spaces, indentation, etc.")
18142 (license license:gpl3+)))
18143
18144 (define-public python-yapf
18145 (package
18146 (name "python-yapf")
18147 (version "0.29.0")
18148 (source
18149 (origin
18150 (method url-fetch)
18151 (uri (pypi-uri "yapf" version))
18152 (sha256
18153 (base32
18154 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
18155 (build-system python-build-system)
18156 (home-page "https://github.com/google/yapf")
18157 (synopsis "Formatter for Python code")
18158 (description "YAPF is a formatter for Python code. It's based off of
18159 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
18160 takes the code and reformats it to the best formatting that conforms to the
18161 style guide, even if the original code didn't violate the style guide.")
18162 (license license:asl2.0)))
18163
18164 (define-public python2-yapf
18165 (package-with-python2 python-yapf))
18166
18167 (define-public python-yq
18168 (package
18169 (name "python-yq")
18170 (version "2.11.1")
18171 (source
18172 (origin
18173 (method url-fetch)
18174 (uri (pypi-uri "yq" version))
18175 (sha256
18176 (base32
18177 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
18178 (build-system python-build-system)
18179 (arguments
18180 '(#:phases
18181 (modify-phases %standard-phases
18182 (add-after 'unpack 'patch
18183 (lambda* (#:key inputs #:allow-other-keys)
18184 (substitute* "yq/__init__.py"
18185 (("Popen\\(\\[\"jq")
18186 (string-append
18187 "Popen([\""
18188 (assoc-ref inputs "jq")
18189 "/bin/jq")))
18190 #t)))))
18191 (inputs
18192 `(("python-argcomplete" ,python-argcomplete)
18193 ("python-pyyaml" ,python-pyyaml)
18194 ("python-xmltodict" ,python-xmltodict)
18195 ("jq" ,jq)))
18196 (native-inputs
18197 `(("python-coverage" ,python-coverage)
18198 ("python-flake8" ,python-flake8)
18199 ("python-wheel" ,python-wheel)))
18200 (home-page "https://github.com/kislyuk/yq")
18201 (synopsis "Command-line YAML/XML processor")
18202 (description
18203 "This package provides @command{yq} and @command{xq} for processing YAML
18204 and XML respectively. The processing is done through @command{jq}, @command{jq}
18205 filters can be used to process the data as it passes through.")
18206 (license license:asl2.0)))
18207
18208 (define-public python-gyp
18209 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
18210 (revision "0"))
18211 (package
18212 (name "python-gyp")
18213 ;; Google does not release versions,
18214 ;; based on second most recent commit date.
18215 (version (git-version "0.0.0" revision commit))
18216 (source
18217 (origin
18218 ;; Google does not release tarballs,
18219 ;; git checkout is needed.
18220 (method git-fetch)
18221 (uri (git-reference
18222 (url "https://chromium.googlesource.com/external/gyp")
18223 (commit commit)))
18224 (file-name (git-file-name name version))
18225 (sha256
18226 (base32
18227 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
18228 (build-system python-build-system)
18229 (home-page "https://gyp.gsrc.io/")
18230 (synopsis "GYP is a Meta-Build system")
18231 (description
18232 "GYP builds build systems for large, cross platform applications.
18233 It can be used to generate XCode projects, Visual Studio projects, Ninja build
18234 files, and Makefiles.")
18235 (license license:bsd-3))))
18236
18237 (define-public python2-gyp
18238 (package-with-python2 python-gyp))
18239
18240 (define-public python-whatever
18241 (package
18242 (name "python-whatever")
18243 (version "0.6")
18244 (source
18245 (origin
18246 (method git-fetch)
18247 (uri (git-reference
18248 (url "https://github.com/Suor/whatever")
18249 (commit version)))
18250 (file-name (git-file-name name version))
18251 (sha256
18252 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
18253 (build-system python-build-system)
18254 (arguments
18255 `(#:phases
18256 (modify-phases %standard-phases
18257 (replace 'check
18258 (lambda _
18259 (invoke "py.test"))))))
18260 (native-inputs
18261 `(("python-pytest" ,python-pytest)))
18262 (home-page "https://github.com/Suor/whatever")
18263 (synopsis "Make anonymous functions by partial application of operators")
18264 (description "@code{whatever} provides an easy way to make anonymous
18265 functions by partial application of operators.")
18266 (license license:bsd-3)))
18267
18268 (define-public python2-whatever
18269 (package-with-python2 python-whatever))
18270
18271 (define-public python-funcy
18272 (package
18273 (name "python-funcy")
18274 (version "1.11")
18275 (source
18276 (origin
18277 (method git-fetch)
18278 (uri (git-reference
18279 (url "https://github.com/Suor/funcy")
18280 (commit version)))
18281 (sha256
18282 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
18283 (file-name (git-file-name name version))))
18284 (build-system python-build-system)
18285 (arguments
18286 `(#:phases
18287 (modify-phases %standard-phases
18288 (replace 'check
18289 (lambda _
18290 (invoke "py.test"))))))
18291 (native-inputs
18292 `(("python-pytest" ,python-pytest)
18293 ("python-whatever" ,python-whatever)))
18294 (home-page "https://github.com/Suor/funcy")
18295 (synopsis "Functional tools")
18296 (description "@code{funcy} is a library that provides functional tools.
18297 Examples are:
18298 @enumerate
18299 @item merge - Merges collections of the same type
18300 @item walk - Type-preserving map
18301 @item select - Selects a part of a collection
18302 @item take - Takes the first n items of a collection
18303 @item first - Takes the first item of a collection
18304 @item remove - Predicated-removes items of a collection
18305 @item concat - Concatenates two collections
18306 @item flatten - Flattens a collection with subcollections
18307 @item distinct - Returns only distinct items
18308 @item split - Predicated-splits a collection
18309 @item split_at - Splits a collection at a given item
18310 @item group_by - Groups items by group
18311 @item pairwise - Pairs off adjacent items
18312 @item partial - Partially-applies a function
18313 @item curry - Curries a function
18314 @item compose - Composes functions
18315 @item complement - Complements a predicate
18316 @item all_fn - \"all\" with predicate
18317 @end enumerate")
18318 (license license:bsd-3)))
18319
18320 (define-public python2-funcy
18321 (package-with-python2 python-funcy))
18322
18323 (define-public python-isoweek
18324 (package
18325 (name "python-isoweek")
18326 (version "1.3.3")
18327 (source
18328 (origin
18329 (method url-fetch)
18330 (uri (pypi-uri "isoweek" version))
18331 (sha256
18332 (base32
18333 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
18334 (build-system python-build-system)
18335 (home-page "https://github.com/gisle/isoweek")
18336 (synopsis "Objects representing a week")
18337 (description "The @code{isoweek} module provide the class Week that
18338 implements the week definition of ISO 8601. This standard also defines
18339 a notation for identifying weeks; yyyyWww (where the W is a literal).
18340 Week instances stringify to this form.")
18341 (license license:bsd-3)))
18342
18343 (define-public python2-isoweek
18344 (package-with-python2 python-isoweek))
18345
18346 (define-public python-pyzbar
18347 (package
18348 (name "python-pyzbar")
18349 (version "0.1.8")
18350 (source
18351 (origin
18352 ;; There's no source tarball on PyPI.
18353 (method git-fetch)
18354 (uri (git-reference
18355 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
18356 (commit (string-append "v" version))))
18357 (file-name (git-file-name name version))
18358 (sha256
18359 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
18360 (build-system python-build-system)
18361 (arguments
18362 `(#:phases
18363 (modify-phases %standard-phases
18364 (add-after 'unpack 'remove-failing-test
18365 (lambda _
18366 ;; This tests if find_library was called once, but we remove
18367 ;; the call in the stage below to make the library find libzbar.
18368 (delete-file "pyzbar/tests/test_zbar_library.py")
18369 #t))
18370 (add-before 'build 'set-library-file-name
18371 (lambda* (#:key inputs #:allow-other-keys)
18372 (let ((libzbar (assoc-ref inputs "zbar")))
18373 (substitute* "pyzbar/zbar_library.py"
18374 (("find_library\\('zbar'\\)")
18375 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18376 #t))))))
18377 (native-inputs
18378 `(("pkg-config" ,pkg-config)
18379 ("python-numpy" ,python-numpy)
18380 ("python-pillow" ,python-pillow)))
18381 (inputs
18382 `(("zbar" ,zbar)))
18383 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18384 (synopsis "Read one-dimensional barcodes and QR codes")
18385 (description
18386 "Read one-dimensional barcodes and QR codes using the zbar library.
18387
18388 Features:
18389
18390 @itemize
18391 @item Pure python
18392 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18393 @item Decodes locations of barcodes
18394 @item No dependencies, other than the zbar library itself
18395 @end itemize")
18396 (license license:expat)))
18397
18398 (define-public python-tokenize-rt
18399 (package
18400 (name "python-tokenize-rt")
18401 (version "2.0.1")
18402 (source
18403 (origin
18404 (method url-fetch)
18405 (uri (pypi-uri "tokenize-rt" version))
18406 (sha256
18407 (base32
18408 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
18409 (build-system python-build-system)
18410 (home-page "https://github.com/asottile/tokenize-rt")
18411 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
18412 (description
18413 "This Python library is a wrapper around @code{tokenize} from the Python
18414 standard library. It provides two additional tokens @code{ESCAPED_NL} and
18415 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
18416 and @code{tokens_to_src} to roundtrip.")
18417 (license license:expat)))
18418
18419 (define-public python-future-fstrings
18420 (package
18421 (name "python-future-fstrings")
18422 (version "0.4.1")
18423 (source
18424 (origin
18425 (method url-fetch)
18426 (uri (pypi-uri "future_fstrings" version))
18427 (sha256
18428 (base32
18429 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18430 (build-system python-build-system)
18431 (propagated-inputs
18432 `(("python-tokenize-rt" ,python-tokenize-rt)))
18433 (home-page "https://github.com/asottile/future-fstrings")
18434 (synopsis "Backport of fstrings to Python < 3.6")
18435 (description
18436 "This package provides a UTF-8 compatible encoding
18437 @code{future_fstrings}, which performs source manipulation. It decodes the
18438 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18439 @code{f} strings.")
18440 (license license:expat)))
18441
18442 (define-public python-typed-ast
18443 (package
18444 (name "python-typed-ast")
18445 (version "1.4.0")
18446 (source
18447 (origin
18448 (method git-fetch)
18449 (uri (git-reference
18450 (url "https://github.com/python/typed_ast")
18451 (commit version)))
18452 (sha256
18453 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18454 (file-name (git-file-name name version))))
18455 (build-system python-build-system)
18456 (arguments
18457 `(#:modules ((guix build utils)
18458 (guix build python-build-system)
18459 (ice-9 ftw)
18460 (srfi srfi-1)
18461 (srfi srfi-26))
18462 #:phases
18463 (modify-phases %standard-phases
18464 (replace 'check
18465 (lambda _
18466 (let ((cwd (getcwd)))
18467 (setenv "PYTHONPATH"
18468 (string-append cwd "/build/"
18469 (find (cut string-prefix? "lib" <>)
18470 (scandir (string-append cwd "/build")))
18471 ":"
18472 (getenv "PYTHONPATH"))))
18473 (invoke "pytest")
18474 #t)))))
18475 (native-inputs `(("python-pytest" ,python-pytest)))
18476 (home-page "https://github.com/python/typed_ast")
18477 (synopsis "Fork of Python @code{ast} modules with type comment support")
18478 (description "This package provides a parser similar to the standard
18479 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18480 include PEP 484 type comments and are independent of the version of Python
18481 under which they are run. The @code{typed_ast} parsers produce the standard
18482 Python AST (plus type comments), and are both fast and correct, as they are
18483 based on the CPython 2.7 and 3.7 parsers.")
18484 ;; See the file "LICENSE" for the details.
18485 (license (list license:psfl
18486 license:asl2.0
18487 license:expat)))) ;ast27/Parser/spark.py
18488
18489 (define-public python-typer
18490 (package
18491 (name "python-typer")
18492 (version "0.3.2")
18493 (source
18494 (origin
18495 ;; Building `python-typer` from the git repository requires the `flit-core`
18496 ;; Python package that is not installed by `python-flit`.
18497 (method url-fetch)
18498 (uri (pypi-uri "typer" version))
18499 (sha256
18500 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
18501 (build-system python-build-system)
18502 (arguments
18503 `(#:phases
18504 (modify-phases %standard-phases
18505 (add-before 'check 'disable-failing-tests
18506 (lambda _
18507 (substitute* "tests/test_completion/test_completion.py"
18508 (("def test_show_completion")
18509 "def _test_show_completion")
18510 (("def test_install_completion")
18511 "def _test_install_completion"))
18512 (substitute* "tests/test_completion/test_completion_install.py"
18513 (("def test_completion_install_bash")
18514 "def _test_completion_install_bash")
18515 (("def test_completion_install_zsh")
18516 "def _test_completion_install_zsh")
18517 (("def test_completion_install_fish")
18518 "def _test_completion_install_fish")
18519 (("def test_completion_install_powershell")
18520 "def _test_completion_install_powershell"))
18521 #t))
18522 (replace 'check
18523 (lambda _
18524 (setenv "PYTHONPATH"
18525 (string-append (getcwd) ":"
18526 (getenv "PYTHONPATH")))
18527 (invoke "python" "-m" "pytest" "tests/")
18528 #t)))))
18529 (propagated-inputs
18530 `(("python-click" ,python-click)))
18531 (native-inputs
18532 `(("python-coverage" ,python-coverage)
18533 ("python-pytest" ,python-pytest)
18534 ("python-shellingham" ,python-shellingham)))
18535 (home-page "https://github.com/tiangolo/typer")
18536 (synopsis
18537 "Typer builds CLI based on Python type hints")
18538 (description
18539 "Typer is a library for building CLI applications. It's based on
18540 Python 3.6+ type hints.")
18541 ;; MIT license
18542 (license license:expat)))
18543
18544 (define-public python-typing
18545 (package
18546 (name "python-typing")
18547 (version "3.7.4.3")
18548 (source
18549 (origin
18550 (method url-fetch)
18551 (uri (pypi-uri "typing" version))
18552 (sha256
18553 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18554 (build-system python-build-system)
18555 (home-page "https://docs.python.org/3/library/typing.html")
18556 (synopsis "Type hints for Python")
18557 (description "This is a backport of the standard library @code{typing}
18558 module to Python versions older than 3.5. Typing defines a standard notation
18559 for Python function and variable type annotations. The notation can be used
18560 for documenting code in a concise, standard format, and it has been designed
18561 to also be used by static and runtime type checkers, static analyzers, IDEs
18562 and other tools.")
18563 (license license:psfl)))
18564
18565 (define-public python2-typing
18566 (package-with-python2 python-typing))
18567
18568 (define-public python-typing-extensions
18569 (package
18570 (name "python-typing-extensions")
18571 (version "3.7.4.3")
18572 (source
18573 (origin
18574 (method url-fetch)
18575 (uri (pypi-uri "typing_extensions" version))
18576 (sha256
18577 (base32
18578 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
18579 (build-system python-build-system)
18580 (home-page
18581 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18582 (synopsis "Experimental type hints for Python")
18583 (description
18584 "The typing_extensions module contains additional @code{typing} hints not
18585 yet present in the of the @code{typing} standard library.
18586 Included are implementations of:
18587 @enumerate
18588 @item ClassVar
18589 @item ContextManager
18590 @item Counter
18591 @item DefaultDict
18592 @item Deque
18593 @item NewType
18594 @item NoReturn
18595 @item overload
18596 @item Protocol
18597 @item runtime
18598 @item Text
18599 @item Type
18600 @item TYPE_CHECKING
18601 @item AsyncGenerator
18602 @end enumerate\n")
18603 (license license:psfl)))
18604
18605 (define-public bpython
18606 (package
18607 (name "bpython")
18608 (version "0.20.1")
18609 (source
18610 (origin
18611 (method url-fetch)
18612 (uri (pypi-uri "bpython" version))
18613 (sha256
18614 (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
18615 (build-system python-build-system)
18616 (arguments
18617 `(#:phases
18618 (modify-phases %standard-phases
18619 (add-after 'unpack 'remove-failing-test
18620 (lambda _
18621 ;; Remove failing test. FIXME: make it pass
18622 (delete-file "bpython/test/test_args.py")
18623 #t))
18624 (add-after 'wrap 'add-aliases
18625 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18626 (lambda* (#:key outputs #:allow-other-keys)
18627 (let ((out (assoc-ref outputs "out")))
18628 (for-each
18629 (lambda (old new)
18630 (symlink old (string-append out "/bin/" new)))
18631 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18632 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18633 #t)))))
18634 (propagated-inputs
18635 `(("python-pygments" ,python-pygments)
18636 ("python-requests" ,python-requests)
18637 ("python-curtsies" ,python-curtsies)
18638 ("python-greenlet" ,python-greenlet)
18639 ("python-six" ,python-six)
18640 ("python-wcwidth" ,python-wcwidth)
18641 ;; optional dependencies
18642 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18643 ("python-watchdog" ,python-watchdog)
18644 ("python-jedi" ,python-jedi)))
18645 (native-inputs
18646 `(("python-sphinx" ,python-sphinx)
18647 ("python-mock" ,python-mock)))
18648 (home-page "https://bpython-interpreter.org/")
18649 (synopsis "Fancy interface to the Python interpreter")
18650 (description "Bpython is a fancy interface to the Python
18651 interpreter. bpython's main features are
18652
18653 @enumerate
18654 @item in-line syntax highlighting,
18655 @item readline-like autocomplete with suggestions displayed as you type,
18656 @item expected parameter list for any Python function,
18657 @item \"rewind\" function to pop the last line of code from memory and
18658 re-evaluate,
18659 @item send the code you've entered off to a pastebin,
18660 @item save the code you've entered to a file, and
18661 @item auto-indentation.
18662 @end enumerate")
18663 (license license:expat)))
18664
18665 (define-public python-pyinotify
18666 (package
18667 (name "python-pyinotify")
18668 (version "0.9.6")
18669 (source (origin
18670 (method url-fetch)
18671 (uri (pypi-uri "pyinotify" version))
18672 (sha256
18673 (base32
18674 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18675 (build-system python-build-system)
18676 (arguments `(#:tests? #f)) ;no tests
18677 (home-page "https://github.com/seb-m/pyinotify")
18678 (synopsis "Python library for monitoring inotify events")
18679 (description
18680 "@code{pyinotify} provides a Python interface for monitoring
18681 file system events on Linux.")
18682 (license license:expat)))
18683
18684 (define-public python2-pyinotify
18685 (package-with-python2 python-pyinotify))
18686
18687 ;; Ada parser uses this version.
18688 (define-public python2-quex-0.67.3
18689 (package
18690 (name "python2-quex")
18691 (version "0.67.3")
18692 (source
18693 (origin
18694 (method url-fetch)
18695 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18696 (version-major+minor version)
18697 "/quex-" version ".zip"))
18698 (sha256
18699 (base32
18700 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18701 (build-system python-build-system)
18702 (native-inputs
18703 `(("unzip" ,unzip)))
18704 (arguments
18705 `(#:python ,python-2
18706 #:tests? #f
18707 #:phases
18708 (modify-phases %standard-phases
18709 (delete 'configure)
18710 (delete 'build)
18711 (replace 'install
18712 (lambda* (#:key outputs #:allow-other-keys)
18713 (let* ((out (assoc-ref outputs "out"))
18714 (share/quex (string-append out "/share/quex"))
18715 (bin (string-append out "/bin")))
18716 (copy-recursively "." share/quex)
18717 (mkdir-p bin)
18718 (symlink (string-append share/quex "/quex-exe.py")
18719 (string-append bin "/quex"))
18720 #t))))))
18721 (native-search-paths
18722 (list (search-path-specification
18723 (variable "QUEX_PATH")
18724 (files '("share/quex")))))
18725 (home-page "http://quex.sourceforge.net/")
18726 (synopsis "Lexical analyzer generator in Python")
18727 (description "@code{quex} is a lexical analyzer generator in Python.")
18728 (license license:lgpl2.1+))) ; Non-military
18729
18730 (define-public python2-quex
18731 (package (inherit python2-quex-0.67.3)
18732 (name "python2-quex")
18733 (version "0.68.1")
18734 (source
18735 (origin
18736 (method url-fetch)
18737 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18738 (sha256
18739 (base32
18740 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18741 (file-name (string-append name "-" version ".tar.gz"))))))
18742
18743 (define-public python-more-itertools
18744 (package
18745 (name "python-more-itertools")
18746 (version "8.2.0")
18747 (source
18748 (origin
18749 (method url-fetch)
18750 (uri (pypi-uri "more-itertools" version))
18751 (sha256
18752 (base32
18753 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18754 (build-system python-build-system)
18755 (home-page "https://github.com/erikrose/more-itertools")
18756 (synopsis "More routines for operating on iterables, beyond itertools")
18757 (description "Python's built-in @code{itertools} module implements a
18758 number of iterator building blocks inspired by constructs from APL, Haskell,
18759 and SML. @code{more-itertools} includes additional building blocks for
18760 working with iterables.")
18761 (properties `((python2-variant . ,(delay python2-more-itertools))))
18762 (license license:expat)))
18763
18764 ;; The 5.x series are the last versions supporting Python 2.7.
18765 (define-public python2-more-itertools
18766 (package
18767 (inherit python-more-itertools)
18768 (name "python2-more-itertools")
18769 (version "5.0.0")
18770 (source (origin
18771 (method url-fetch)
18772 (uri (pypi-uri "more-itertools" version))
18773 (sha256
18774 (base32
18775 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18776 (arguments
18777 `(#:python ,python-2))
18778 (propagated-inputs
18779 `(("python2-six" ,python2-six-bootstrap)))))
18780
18781 (define-public python-latexcodec
18782 (package
18783 (name "python-latexcodec")
18784 (version "1.0.7")
18785 (source
18786 (origin
18787 (method url-fetch)
18788 (uri (pypi-uri "latexcodec" version))
18789 (sha256
18790 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18791 (build-system python-build-system)
18792 (inputs
18793 `(("python-six" ,python-six)))
18794 (home-page "https://readthedocs.org/projects/latexcodec/")
18795 (synopsis "Work with LaTeX code in Python")
18796 (description "Lexer and codec to work with LaTeX code in Python.")
18797 (license license:expat)))
18798
18799 (define-public python-pybtex
18800 (package
18801 (name "python-pybtex")
18802 (version "0.22.2")
18803 (source
18804 (origin
18805 (method url-fetch)
18806 (uri (pypi-uri "pybtex" version))
18807 (sha256
18808 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18809 (build-system python-build-system)
18810 (native-inputs
18811 `(("python-nose" ,python-nose)))
18812 (inputs
18813 `(("python-latexcodec" ,python-latexcodec)
18814 ("python-pyyaml" ,python-pyyaml)
18815 ("python-six" ,python-six)))
18816 (arguments
18817 `(#:test-target "nosetests"))
18818 (home-page "https://pybtex.org/")
18819 (synopsis "BibTeX-compatible bibliography processor")
18820 (description "Pybtex is a BibTeX-compatible bibliography processor written
18821 in Python. You can simply type pybtex instead of bibtex.")
18822 (license license:expat)))
18823
18824 (define-public python-onetimepass
18825 (package
18826 (name "python-onetimepass")
18827 (version "1.0.1")
18828 (source
18829 (origin
18830 (method url-fetch)
18831 (uri (pypi-uri "onetimepass" version))
18832 (sha256
18833 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
18834 (build-system python-build-system)
18835 (propagated-inputs `(("python-six" ,python-six)))
18836 (home-page "https://github.com/tadeck/onetimepass/")
18837 (synopsis "One-time password library")
18838 (description "Python one-time password library for HMAC-based (HOTP) and
18839 time-based (TOTP) passwords.")
18840 (license license:expat)))
18841
18842 (define-public python-parso
18843 (package
18844 (name "python-parso")
18845 (version "0.7.1")
18846 (source
18847 (origin
18848 (method url-fetch)
18849 (uri (pypi-uri "parso" version))
18850 (sha256
18851 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
18852 (native-inputs
18853 `(("python-pytest" ,python-pytest)))
18854 (build-system python-build-system)
18855 (arguments
18856 `(#:phases (modify-phases %standard-phases
18857 (replace 'check
18858 (lambda _ (invoke "pytest" "-vv"))))))
18859 (home-page "https://github.com/davidhalter/parso")
18860 (synopsis "Python Parser")
18861 (description "Parso is a Python parser that supports error recovery and
18862 round-trip parsing for different Python versions (in multiple Python versions).
18863 Parso is also able to list multiple syntax errors in your Python file.")
18864 (license license:expat)))
18865
18866 (define-public python2-parso
18867 (package-with-python2 python-parso))
18868
18869 (define-public python-async-generator
18870 (package
18871 (name "python-async-generator")
18872 (version "1.10")
18873 (source
18874 (origin
18875 (method url-fetch)
18876 (uri (pypi-uri "async_generator" version))
18877 (sha256
18878 (base32
18879 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
18880 (build-system python-build-system)
18881 (native-inputs
18882 `(("python-pytest" ,python-pytest)))
18883 (home-page "https://github.com/python-trio/async_generator")
18884 (synopsis "Async generators and context managers for Python 3.5+")
18885 (description "@code{async_generator} back-ports Python 3.6's native async
18886 generators and Python 3.7's context managers into Python 3.5.")
18887 ;; Dual licensed.
18888 (license (list license:expat license:asl2.0))))
18889
18890 (define-public python-async-timeout
18891 (package
18892 (name "python-async-timeout")
18893 (version "3.0.1")
18894 (source
18895 (origin
18896 (method url-fetch)
18897 (uri (pypi-uri "async-timeout" version))
18898 (sha256
18899 (base32
18900 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
18901 (build-system python-build-system)
18902 (home-page "https://github.com/aio-libs/async_timeout/")
18903 (synopsis "Timeout context manager for asyncio programs")
18904 (description "@code{async-timeout} provides a timeout timeout context
18905 manager compatible with @code{asyncio}.")
18906 (license license:asl2.0)))
18907
18908 (define-public python-glob2
18909 (package
18910 (name "python-glob2")
18911 (version "0.7")
18912 (source
18913 (origin
18914 (method git-fetch)
18915 (uri (git-reference
18916 (url "https://github.com/miracle2k/python-glob2")
18917 (commit (string-append "v" version))))
18918 (file-name (git-file-name name version))
18919 (sha256
18920 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
18921 (build-system python-build-system)
18922 (home-page "https://github.com/miracle2k/python-glob2/")
18923 (synopsis "Extended Version of the python buildin glob module")
18924 (description "This is an extended version of the Python
18925 @url{http://docs.python.org/library/glob.html, built-in glob module} which
18926 adds:
18927
18928 @itemize
18929 @item The ability to capture the text matched by glob patterns, and return
18930 those matches alongside the file names.
18931 @item A recursive @code{**} globbing syntax, akin for example to the
18932 @code{globstar} option of Bash.
18933 @item The ability to replace the file system functions used, in order to glob
18934 on virtual file systems.
18935 @item Compatible with Python 2 and Python 3 (tested with 3.3).
18936 @end itemize
18937
18938 Glob2 currently based on the glob code from Python 3.3.1.")
18939 (license license:bsd-2)))
18940
18941 (define-public python2-glob2
18942 (package-with-python2 python-glob2))
18943
18944 (define-public python-gipc
18945 (package
18946 (name "python-gipc")
18947 (version "0.6.0")
18948 (source
18949 (origin
18950 (method url-fetch)
18951 (uri (pypi-uri "gipc" version ".zip"))
18952 (sha256
18953 (base32
18954 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
18955 (build-system python-build-system)
18956 (native-inputs
18957 `(("unzip" ,unzip)))
18958 (propagated-inputs
18959 `(("python-gevent" ,python-gevent)))
18960 (home-page "https://gehrcke.de/gipc/")
18961 (synopsis "Child process management in the context of gevent")
18962 (description "Usage of Python's multiprocessing package in a
18963 gevent-powered application may raise problems. With @code{gipc},
18964 process-based child processes can safely be created anywhere within a
18965 gevent-powered application.")
18966 (license license:expat)))
18967
18968 (define-public python-beautifultable
18969 (package
18970 (name "python-beautifultable")
18971 (version "1.0.0")
18972 (source
18973 (origin
18974 (method url-fetch)
18975 (uri (pypi-uri "beautifultable" version))
18976 (sha256
18977 (base32
18978 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
18979 (build-system python-build-system)
18980 (propagated-inputs
18981 `(("python-wcwidth" ,python-wcwidth)))
18982 (arguments
18983 `(#:phases
18984 (modify-phases %standard-phases
18985 (add-after 'unpack 'patch-setup.py
18986 (lambda _
18987 (substitute* "setup.py"
18988 (("setup\\(")
18989 "setup(\n test_suite=\"test\",")))))))
18990 (home-page "https://github.com/pri22296/beautifultable")
18991 (synopsis "Print ASCII tables for terminals")
18992 (description "@code{python-beautifultable} provides a class for easily
18993 printing tabular data in a visually appealing ASCII format to a terminal.
18994
18995 Features include, but are not limited to:
18996 @itemize
18997 @item Full customization of the look and feel of the table
18998 @item Row and column accessors.
18999 @item Full support for colors using ANSI sequences or any library.
19000 @item Plenty of predefined styles and option to create custom ones.
19001 @item Support for Unicode characters.
19002 @item Supports streaming table when data is slow to retrieve.
19003 @end itemize")
19004 (license license:expat)))
19005
19006 (define-public python-globber
19007 (package
19008 (name "python-globber")
19009 (version "0.2.1")
19010 (source
19011 (origin
19012 (method git-fetch)
19013 (uri (git-reference
19014 (url "https://github.com/asharov/globber")
19015 (commit version)))
19016 (file-name (git-file-name name version))
19017 (sha256
19018 (base32
19019 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
19020 (build-system python-build-system)
19021 (home-page "https://github.com/asharov/globber")
19022 (synopsis "Library for string matching with glob patterns")
19023 (description
19024 "Globber is a Python library for matching file names against glob patterns.
19025 In contrast to other glob-matching libraries, it matches arbitrary strings and
19026 doesn't require the matched names to be existing files. In addition, it
19027 supports the globstar @code{**} operator to match an arbitrary number of
19028 path components.")
19029 (license license:asl2.0)))
19030
19031 (define-public python-git-hammer
19032 (package
19033 (name "python-git-hammer")
19034 (version "0.3.1")
19035 (source
19036 (origin
19037 (method git-fetch)
19038 (uri (git-reference
19039 (url "https://github.com/asharov/git-hammer")
19040 (commit version)))
19041 (file-name (git-file-name name version))
19042 (sha256
19043 (base32
19044 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
19045 (build-system python-build-system)
19046 (arguments
19047 `(#:phases
19048 (modify-phases %standard-phases
19049 (add-after 'unpack 'patch-setup.py
19050 (lambda _
19051 (substitute* "setup.py"
19052 (("setup\\(")
19053 "setup(\n test_suite=\"test\",")))))))
19054 (propagated-inputs
19055 `(("python-beautifultable" ,python-beautifultable)
19056 ("python-dateutil" ,python-dateutil)
19057 ("python-gitpython" ,python-gitpython)
19058 ("python-globber" ,python-globber)
19059 ("python-matplotlib" ,python-matplotlib)
19060 ("python-sqlalchemy" ,python-sqlalchemy)
19061 ("python-sqlalchemy-utils"
19062 ,python-sqlalchemy-utils)))
19063 (home-page "https://github.com/asharov/git-hammer")
19064 (synopsis "Provide statistics for git repositories")
19065 (description
19066 "Git Hammer is a statistics tool for projects in git repositories.
19067 Its major feature is tracking the number of lines authored by each person for every
19068 commit, but it also includes some other useful statistics.")
19069 (license license:asl2.0)))
19070
19071 (define-public python-fusepy
19072 (package
19073 (name "python-fusepy")
19074 (version "2.0.4")
19075 (source
19076 (origin
19077 (method url-fetch)
19078 (uri (pypi-uri "fusepy" version))
19079 (sha256
19080 (base32
19081 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
19082 (build-system python-build-system)
19083 (arguments
19084 `(#:phases
19085 (modify-phases %standard-phases
19086 (add-before 'build 'set-library-file-name
19087 (lambda* (#:key inputs #:allow-other-keys)
19088 (let ((fuse (assoc-ref inputs "fuse")))
19089 (substitute* "fuse.py"
19090 (("find_library\\('fuse'\\)")
19091 (string-append "'" fuse "/lib/libfuse.so'")))
19092 #t))))))
19093 (propagated-inputs
19094 `(("fuse" ,fuse)))
19095 (home-page "https://github.com/fusepy/fusepy")
19096 (synopsis "Simple ctypes bindings for FUSE")
19097 (description "Python module that provides a simple interface to FUSE and
19098 MacFUSE. The binding is created using the standard @code{ctypes} library.")
19099 (license license:isc)))
19100
19101 (define-public python2-fusepy
19102 (package-with-python2 python-fusepy))
19103
19104 (define-public python-fusepyng
19105 (package
19106 (name "python-fusepyng")
19107 (version "1.0.7")
19108 (source
19109 (origin
19110 (method url-fetch)
19111 (uri (pypi-uri "fusepyng" version))
19112 (sha256
19113 (base32
19114 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
19115 (build-system python-build-system)
19116 (arguments
19117 '(#:phases
19118 (modify-phases %standard-phases
19119 (add-after 'unpack 'set-libfuse-path
19120 (lambda* (#:key inputs #:allow-other-keys)
19121 (let ((fuse (assoc-ref inputs "fuse")))
19122 (substitute* "fusepyng.py"
19123 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
19124 (string-append "\"" fuse "/lib/libfuse.so\""))))
19125 #t)))))
19126 (inputs
19127 `(("fuse" ,fuse)))
19128 (propagated-inputs
19129 `(("python-paramiko" ,python-paramiko)))
19130 (home-page "https://github.com/rianhunter/fusepyng")
19131 (synopsis "Simple ctypes bindings for FUSE")
19132 (description "@code{fusepyng} is a Python module that provides a simple
19133 interface to FUSE on various operating systems. It's just one file and is
19134 implemented using @code{ctypes}.")
19135 (license license:isc)))
19136
19137 (define-public python-userspacefs
19138 (package
19139 (name "python-userspacefs")
19140 (version "2.0.3")
19141 (source
19142 (origin
19143 (method url-fetch)
19144 (uri (pypi-uri "userspacefs" version))
19145 (sha256
19146 (base32
19147 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
19148 (build-system python-build-system)
19149 (propagated-inputs
19150 `(("python-fusepyng" ,python-fusepyng)))
19151 (home-page "https://github.com/rianhunter/userspacefs")
19152 (synopsis "User-space file systems for Python")
19153 (description
19154 "@code{userspacefs} is a library that allows you to easily write
19155 user-space file systems in Python.")
19156 (license license:gpl3+)))
19157
19158 (define-public python-stone
19159 (package
19160 (name "python-stone")
19161 (version "3.2.1")
19162 (source
19163 (origin
19164 (method url-fetch)
19165 (uri (pypi-uri "stone" version))
19166 (sha256
19167 (base32
19168 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
19169 (build-system python-build-system)
19170 (arguments
19171 `(#:phases
19172 (modify-phases %standard-phases
19173 (add-after 'unpack 'change-version-requirements
19174 (lambda _
19175 ;; Match the requirement in test/requirements.txt
19176 (substitute* "setup.py"
19177 (("pytest < 5") "pytest < 7"))
19178 ;; We don't care about a coverage report.
19179 (substitute* "test/requirements.txt"
19180 (("coverage.*") "coverage\n"))
19181 #t))
19182 (replace 'check
19183 (lambda* (#:key tests? #:allow-other-keys)
19184 (when tests?
19185 ;; These tests don't import currectly.
19186 (delete-file "test/test_js_client.py")
19187 (delete-file "test/test_tsd_types.py")
19188 (delete-file "test/test_python_gen.py")
19189 (setenv "PYTHONPATH"
19190 (string-append (getcwd) ":"
19191 (getenv "PYTHONPATH")))
19192 (invoke "pytest"))
19193 #t)))))
19194 (propagated-inputs
19195 `(("python-ply" ,python-ply)
19196 ("python-six" ,python-six)))
19197 (native-inputs
19198 `(("python-coverage" ,python-coverage)
19199 ("python-mock" ,python-mock)
19200 ("python-pytest" ,python-pytest)
19201 ("python-pytest-runner" ,python-pytest-runner)))
19202 (home-page "https://github.com/dropbox/stone")
19203 (synopsis "Official Api Spec Language for Dropbox")
19204 (description
19205 "Stone is an interface description language (IDL) for APIs.")
19206 (license license:expat)))
19207
19208 (define-public pybind11
19209 (package
19210 (name "pybind11")
19211 (version "2.6.1")
19212 (source (origin
19213 (method git-fetch)
19214 (uri (git-reference
19215 (url "https://github.com/pybind/pybind11")
19216 (commit (string-append "v" version))))
19217 (sha256
19218 (base32
19219 "1wh5b1xnywzxwxkyac2wvyqwzmy1qxs341jjk820r7b825wn6yad"))
19220 (file-name (git-file-name name version))))
19221 (build-system cmake-build-system)
19222 (native-inputs
19223 `(("python" ,python-wrapper)
19224
19225 ;; The following dependencies are used for tests.
19226 ("python-pytest" ,python-pytest)
19227 ("catch" ,catch-framework2-1)
19228 ("eigen" ,eigen)))
19229 (arguments
19230 `(#:configure-flags
19231 (list (string-append "-DCATCH_INCLUDE_DIR="
19232 (assoc-ref %build-inputs "catch")
19233 "/include/catch"))
19234
19235 #:phases (modify-phases %standard-phases
19236 (add-after 'install 'install-python
19237 (lambda* (#:key outputs #:allow-other-keys)
19238 (let ((out (assoc-ref outputs "out")))
19239 (with-directory-excursion "../source"
19240 (setenv "PYBIND11_USE_CMAKE" "yes")
19241 (invoke "python" "setup.py" "install"
19242 "--single-version-externally-managed"
19243 "--root=/"
19244 (string-append "--prefix=" out)))))))
19245
19246 #:test-target "check"))
19247 (home-page "https://github.com/pybind/pybind11/")
19248 (synopsis "Seamless operability between C++11 and Python")
19249 (description
19250 "@code{pybind11} is a lightweight header-only library that exposes C++
19251 types in Python and vice versa, mainly to create Python bindings of existing
19252 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
19253 library: to minimize boilerplate code in traditional extension modules by
19254 inferring type information using compile-time introspection.")
19255 (license license:bsd-3)))
19256
19257 (define-public python-fasteners
19258 (package
19259 (name "python-fasteners")
19260 (version "0.15")
19261 (source
19262 (origin
19263 (method url-fetch)
19264 (uri (pypi-uri "fasteners" version))
19265 (sha256
19266 (base32
19267 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
19268 (build-system python-build-system)
19269 (propagated-inputs
19270 `(("python-monotonic" ,python-monotonic)
19271 ("python-six" ,python-six)))
19272 (native-inputs
19273 `(("python-testtools" ,python-testtools)))
19274 (home-page "https://github.com/harlowja/fasteners")
19275 (synopsis "Python package that provides useful locks")
19276 (description
19277 "This package provides a Python program that provides following locks:
19278
19279 @itemize
19280 @item Locking decorator
19281 @item Reader-writer locks
19282 @item Inter-process locks
19283 @item Generic helpers
19284 @end itemize\n")
19285 (license license:asl2.0)))
19286
19287 (define-public python-requests-file
19288 (package
19289 (name "python-requests-file")
19290 (version "1.4.3")
19291 (source
19292 (origin
19293 (method url-fetch)
19294 (uri (pypi-uri "requests-file" version))
19295 (sha256
19296 (base32
19297 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
19298 (build-system python-build-system)
19299 (propagated-inputs
19300 `(("python-requests" ,python-requests)
19301 ("python-six" ,python-six)))
19302 (home-page
19303 "https://github.com/dashea/requests-file")
19304 (synopsis "File transport adapter for Requests")
19305 (description
19306 "Requests-File is a transport adapter for use with the Requests Python
19307 library to allow local file system access via @code{file://} URLs.")
19308 (license license:asl2.0)))
19309
19310 (define-public python2-requests-file
19311 (package-with-python2 python-requests-file))
19312
19313 (define-public python-identify
19314 (package
19315 (name "python-identify")
19316 (version "1.4.25")
19317 (source
19318 (origin
19319 ;; There are no tests in the PyPI tarball.
19320 (method git-fetch)
19321 (uri (git-reference
19322 (url "https://github.com/chriskuehl/identify")
19323 (commit (string-append "v" version))))
19324 (file-name (git-file-name name version))
19325 (sha256
19326 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
19327 (build-system python-build-system)
19328 (arguments
19329 `(#:phases
19330 (modify-phases %standard-phases
19331 (replace 'check
19332 (lambda _
19333 (invoke "pytest" "-vv"))))))
19334 (native-inputs
19335 `(("python-coverage" ,python-coverage)
19336 ("python-pytest" ,python-pytest)))
19337 (propagated-inputs
19338 `(("python-editdistance" ,python-editdistance)))
19339 (home-page "https://github.com/chriskuehl/identify")
19340 (synopsis "File identification library for Python")
19341 (description
19342 "@code{identify} is a file identification library for Python. Given
19343 a file (or some information about a file), return a set of standardized tags
19344 identifying what the file is.")
19345 (license license:expat)))
19346
19347 (define-public python-tldextract
19348 (package
19349 (name "python-tldextract")
19350 (version "2.2.0")
19351 (source
19352 (origin
19353 (method url-fetch)
19354 (uri (pypi-uri "tldextract" version))
19355 (sha256
19356 (base32
19357 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
19358 (build-system python-build-system)
19359 (native-inputs
19360 `(("python-pytest" ,python-pytest)
19361 ("python-responses" ,python-responses)))
19362 (propagated-inputs
19363 `(("python-idna" ,python-idna)
19364 ("python-requests" ,python-requests)
19365 ("python-requests-file" ,python-requests-file)))
19366 (home-page
19367 "https://github.com/john-kurkowski/tldextract")
19368 (synopsis
19369 "Separate the TLD from the registered domain and subdomains of a URL")
19370 (description
19371 "TLDExtract accurately separates the TLD from the registered domain and
19372 subdomains of a URL, using the Public Suffix List. By default, this includes
19373 the public ICANN TLDs and their exceptions. It can optionally support the
19374 Public Suffix List's private domains as well.")
19375 (license license:bsd-3)))
19376
19377 (define-public python2-tldextract
19378 (package-with-python2 python-tldextract))
19379
19380 (define-public python-nodeenv
19381 (package
19382 (name "python-nodeenv")
19383 (version "1.4.0")
19384 (source
19385 (origin
19386 ;; There's no tarball in PyPI.
19387 (method git-fetch)
19388 (uri (git-reference
19389 (url "https://github.com/ekalinin/nodeenv")
19390 (commit version)))
19391 (file-name (git-file-name name version))
19392 (sha256
19393 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
19394 (build-system python-build-system)
19395 (arguments
19396 `(#:phases
19397 (modify-phases %standard-phases
19398 (replace 'check
19399 (lambda _
19400 ;; This test fails. It tries to open a network socket.
19401 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
19402 (native-inputs
19403 `(("python-coverage" ,python-coverage)
19404 ("python-mock" ,python-mock)
19405 ("python-pytest" ,python-pytest)))
19406 (home-page "https://ekalinin.github.io/nodeenv/")
19407 (synopsis "Create isolated node.js environments")
19408 (description
19409 "Nodeenv (node.js virtual environment) is a tool to create isolated
19410 node.js environments. It creates an environment that has its own installation
19411 directories, that doesn't share libraries with other node.js virtual
19412 environments.")
19413 (license license:bsd-3)))
19414
19415 (define-public python-pynamecheap
19416 (package
19417 (name "python-pynamecheap")
19418 (version "0.0.3")
19419 (source
19420 (origin
19421 (method url-fetch)
19422 (uri (pypi-uri "PyNamecheap" version))
19423 (sha256
19424 (base32
19425 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
19426 (build-system python-build-system)
19427 (propagated-inputs
19428 `(("python-requests" ,python-requests)))
19429 (home-page
19430 "https://github.com/Bemmu/PyNamecheap")
19431 (synopsis
19432 "Namecheap API client in Python")
19433 (description
19434 "PyNamecheap is a Namecheap API client in Python.")
19435 (license license:expat)))
19436
19437 (define-public python2-pynamecheap
19438 (package-with-python2 python-pynamecheap))
19439
19440 (define-public python-dns-lexicon
19441 (package
19442 (name "python-dns-lexicon")
19443 (version "2.4.0")
19444 (source
19445 (origin
19446 (method url-fetch)
19447 (uri (pypi-uri "dns-lexicon" version))
19448 (sha256
19449 (base32
19450 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
19451 (build-system python-build-system)
19452 (arguments
19453 `(#:tests? #f)) ;requires internet access
19454 (propagated-inputs
19455 `(("python-future" ,python-future)
19456 ("python-pynamecheap" ,python-pynamecheap)
19457 ("python-requests" ,python-requests)
19458 ("python-tldextract" ,python-tldextract)
19459 ("python-urllib3" ,python-urllib3)))
19460 (home-page "https://github.com/AnalogJ/lexicon")
19461 (synopsis
19462 "Manipulate DNS records on various DNS providers")
19463 (description
19464 "Lexicon provides a way to manipulate DNS records on multiple DNS
19465 providers in a standardized way. It has a CLI but it can also be used as a
19466 Python library. It was designed to be used in automation, specifically with
19467 Let's Encrypt.")
19468 (license license:expat)))
19469
19470 (define-public python2-dns-lexicon
19471 (package-with-python2 python-dns-lexicon))
19472
19473 (define-public python-cfgv
19474 (package
19475 (name "python-cfgv")
19476 (version "3.1.0")
19477 (source
19478 (origin
19479 ;; There are no tests in the PyPI tarball.
19480 (method git-fetch)
19481 (uri (git-reference
19482 (url "https://github.com/asottile/cfgv")
19483 (commit (string-append "v" version))))
19484 (file-name (git-file-name name version))
19485 (sha256
19486 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19487 (build-system python-build-system)
19488 (arguments
19489 `(#:phases
19490 (modify-phases %standard-phases
19491 (replace 'check
19492 (lambda _
19493 (invoke "pytest" "-vv"))))))
19494 (native-inputs
19495 `(("python-covdefaults" ,python-covdefaults)
19496 ("python-coverage" ,python-coverage)
19497 ("python-pytest" ,python-pytest)))
19498 (home-page "https://github.com/asottile/cfgv")
19499 (synopsis "Configuration validation library")
19500 (description
19501 "This library helps to validate configuration files and produce human
19502 readable error messages.")
19503 (license license:expat)))
19504
19505 (define-public python-commandlines
19506 (package
19507 (name "python-commandlines")
19508 (version "0.4.1")
19509 (source
19510 (origin
19511 (method url-fetch)
19512 (uri (pypi-uri "commandlines" version))
19513 (sha256
19514 (base32
19515 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
19516 (build-system python-build-system)
19517 (home-page "https://github.com/chrissimpkins/commandlines")
19518 (synopsis "Command line argument to object parsing library")
19519 (description
19520 "@code{Commandlines} is a Python library for command line application
19521 development that supports command line argument parsing, command string
19522 validation testing and application logic.")
19523 (license license:expat)))
19524
19525 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19526 ;; python-numba. They have a very unflexible relationship.
19527 (define-public python-numba
19528 (package
19529 (name "python-numba")
19530 (version "0.51.2")
19531 (source
19532 (origin
19533 (method url-fetch)
19534 (uri (pypi-uri "numba" version))
19535 (sha256
19536 (base32
19537 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19538 (build-system python-build-system)
19539 (arguments
19540 `(#:phases
19541 (modify-phases %standard-phases
19542 (add-after 'unpack 'disable-proprietary-features
19543 (lambda _
19544 (setenv "NUMBA_DISABLE_HSA" "1")
19545 (setenv "NUMBA_DISABLE_CUDA" "1")
19546 #t))
19547 (replace 'check
19548 (lambda* (#:key inputs outputs #:allow-other-keys)
19549 (add-installed-pythonpath inputs outputs)
19550 ;; Something is wrong with the PYTHONPATH when running the
19551 ;; tests from the build directory, as it complains about not being
19552 ;; able to import certain modules.
19553 (with-directory-excursion "/tmp"
19554 (setenv "HOME" (getcwd))
19555 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19556 (propagated-inputs
19557 `(("python-llvmlite" ,python-llvmlite)
19558 ("python-numpy" ,python-numpy)
19559 ("python-singledispatch" ,python-singledispatch)))
19560 (native-inputs ;for tests
19561 `(("python-jinja2" ,python-jinja2)
19562 ("python-pygments" ,python-pygments)))
19563 (home-page "https://numba.pydata.org")
19564 (synopsis "Compile Python code using LLVM")
19565 (description "Numba gives you the power to speed up your applications with
19566 high performance functions written directly in Python. With a few
19567 annotations, array-oriented and math-heavy Python code can be just-in-time
19568 compiled to native machine instructions, similar in performance to C, C++ and
19569 Fortran, without having to switch languages or Python interpreters.
19570
19571 Numba works by generating optimized machine code using the LLVM compiler
19572 infrastructure at import time, runtime, or statically (using the included pycc
19573 tool).")
19574 (license license:bsd-3)))
19575
19576 (define-public python-numcodecs
19577 (package
19578 (name "python-numcodecs")
19579 (version "0.6.4")
19580 (source
19581 (origin
19582 (method url-fetch)
19583 (uri (pypi-uri "numcodecs" version))
19584 (sha256
19585 (base32
19586 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19587 (build-system python-build-system)
19588 (propagated-inputs
19589 `(("python-numpy" ,python-numpy)
19590 ("python-msgpack" ,python-msgpack)))
19591 (native-inputs
19592 `(("python-pytest" ,python-pytest)
19593 ("python-setuptools-scm" ,python-setuptools-scm)))
19594 (home-page "https://github.com/zarr-developers/numcodecs")
19595 (synopsis "Buffer compression and transformation codecs")
19596 (description
19597 "This Python package provides buffer compression and transformation
19598 codecs for use in data storage and communication applications.")
19599 (license license:expat)))
19600
19601 (define-public python-asciitree
19602 (package
19603 (name "python-asciitree")
19604 (version "0.3.3")
19605 (source
19606 (origin
19607 (method url-fetch)
19608 (uri (pypi-uri "asciitree" version))
19609 (sha256
19610 (base32
19611 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19612 (build-system python-build-system)
19613 (home-page "https://github.com/mbr/asciitree")
19614 (synopsis "Draws ASCII trees")
19615 (description "This package draws tree structures using characters.")
19616 (license license:expat)))
19617
19618 (define-public python-zarr
19619 (package
19620 (name "python-zarr")
19621 (version "2.4.0")
19622 (source
19623 (origin
19624 (method url-fetch)
19625 (uri (pypi-uri "zarr" version))
19626 (sha256
19627 (base32
19628 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19629 (build-system python-build-system)
19630 (arguments
19631 `(#:phases
19632 (modify-phases %standard-phases
19633 (add-after 'unpack 'disable-service-tests
19634 (lambda _
19635 (setenv "ZARR_TEST_ABS" "0")
19636 (setenv "ZARR_TEST_MONGO" "0")
19637 (setenv "ZARR_TEST_REDIS" "0")
19638 #t))
19639 (replace 'check
19640 (lambda _
19641 (invoke "pytest" "-vv" "-k" "not lmdb")
19642 #t)))))
19643 (propagated-inputs
19644 `(("python-asciitree" ,python-asciitree)
19645 ("python-fasteners" ,python-fasteners)
19646 ("python-numcodecs" ,python-numcodecs)
19647 ("python-numpy" ,python-numpy)))
19648 (native-inputs
19649 `(("python-pytest" ,python-pytest)
19650 ("python-setuptools-scm" ,python-setuptools-scm)))
19651 (home-page "https://github.com/zarr-developers/zarr-python")
19652 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19653 (description
19654 "This package provides an implementation of chunked, compressed,
19655 N-dimensional arrays for Python.")
19656 (license license:expat)))
19657
19658 (define-public python-anndata
19659 (package
19660 (name "python-anndata")
19661 (version "0.7.1")
19662 (source
19663 (origin
19664 (method url-fetch)
19665 (uri (pypi-uri "anndata" version))
19666 (sha256
19667 (base32
19668 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19669 (build-system python-build-system)
19670 (arguments
19671 `(#:phases
19672 (modify-phases %standard-phases
19673 (add-after 'unpack 'delete-inconvenient-tests
19674 (lambda _
19675 ;; This test depends on python-scikit-learn.
19676 (delete-file "anndata/tests/test_inplace_subset.py")
19677 #t))
19678 (delete 'check)
19679 (add-after 'install 'check
19680 (lambda* (#:key inputs outputs #:allow-other-keys)
19681 (add-installed-pythonpath inputs outputs)
19682 (invoke "pytest" "-vv"))))))
19683 (propagated-inputs
19684 `(("python-h5py" ,python-h5py)
19685 ("python-importlib-metadata" ,python-importlib-metadata)
19686 ("python-natsort" ,python-natsort)
19687 ("python-numcodecs" ,python-numcodecs)
19688 ("python-packaging" ,python-packaging)
19689 ("python-pandas" ,python-pandas)
19690 ("python-scipy" ,python-scipy)
19691 ("python-zarr" ,python-zarr)))
19692 (native-inputs
19693 `(("python-joblib" ,python-joblib)
19694 ("python-pytest" ,python-pytest)
19695 ("python-setuptools-scm" ,python-setuptools-scm)))
19696 (home-page "https://github.com/theislab/anndata")
19697 (synopsis "Annotated data for data analysis pipelines")
19698 (description "Anndata is a package for simple (functional) high-level APIs
19699 for data analysis pipelines. In this context, it provides an efficient,
19700 scalable way of keeping track of data together with learned annotations and
19701 reduces the code overhead typically encountered when using a mostly
19702 object-oriented library such as @code{scikit-learn}.")
19703 (license license:bsd-3)))
19704
19705 (define-public python-dill
19706 (package
19707 (name "python-dill")
19708 (version "0.3.1.1")
19709 (source
19710 (origin
19711 (method url-fetch)
19712 (uri (pypi-uri "dill" version))
19713 (sha256
19714 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
19715 (build-system python-build-system)
19716 (arguments
19717 `(#:phases
19718 (modify-phases %standard-phases
19719 (replace 'check
19720 (lambda _
19721 (with-directory-excursion "/tmp"
19722 (invoke "nosetests" "-v"))
19723 #t)))))
19724 (native-inputs
19725 `(("python-nose" ,python-nose)))
19726 (home-page "https://pypi.org/project/dill/")
19727 (synopsis "Serialize all of Python")
19728 (description "Dill extends Python's @code{pickle} module for serializing
19729 and de-serializing Python objects to the majority of the built-in Python
19730 types. Dill provides the user the same interface as the @code{pickle} module,
19731 and also includes some additional features. In addition to pickling Python
19732 objects, @code{dill} provides the ability to save the state of an interpreter
19733 session in a single command. Hence, it would be feasible to save a
19734 interpreter session, close the interpreter, ship the pickled file to another
19735 computer, open a new interpreter, unpickle the session and thus continue from
19736 the saved state of the original interpreter session.")
19737 (license license:bsd-3)))
19738
19739 (define-public python-multiprocess
19740 (package
19741 (name "python-multiprocess")
19742 (version "0.70.9")
19743 (source
19744 (origin
19745 (method url-fetch)
19746 (uri (pypi-uri "multiprocess" version))
19747 (sha256
19748 (base32
19749 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
19750 (build-system python-build-system)
19751 (arguments
19752 `(#:phases
19753 (modify-phases %standard-phases
19754 (add-after 'unpack 'disable-broken-tests
19755 (lambda _
19756 ;; This test is broken as there is no keyboard interrupt.
19757 (substitute* "py3.7/multiprocess/tests/__init__.py"
19758 (("^(.*)def test_wait_result"
19759 line indent)
19760 (string-append indent
19761 "@unittest.skip(\"Disabled by Guix\")\n"
19762 line)))
19763 #t))
19764 ;; Tests must be run after installation.
19765 (delete 'check)
19766 (add-after 'install 'check
19767 (lambda* (#:key inputs outputs #:allow-other-keys)
19768 (add-installed-pythonpath inputs outputs)
19769 (invoke "python" "-m" "multiprocess.tests")
19770 #t)))))
19771 (propagated-inputs
19772 `(("python-dill" ,python-dill)))
19773 (home-page "https://pypi.org/project/multiprocess/")
19774 (synopsis "Multiprocessing and multithreading in Python")
19775 (description
19776 "This package is a fork of the multiprocessing Python package, a package
19777 which supports the spawning of processes using the API of the standard
19778 library's @code{threading} module.")
19779 (license license:bsd-3)))
19780
19781 (define-public python-toolz
19782 (package
19783 (name "python-toolz")
19784 (version "0.9.0")
19785 (source
19786 (origin
19787 (method url-fetch)
19788 (uri (pypi-uri "toolz" version))
19789 (sha256
19790 (base32
19791 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
19792 (build-system python-build-system)
19793 ;; FIXME: tests cannot be computed: "Can't perform this operation for
19794 ;; unregistered loader type"
19795 (arguments '(#:tests? #f))
19796 (home-page "https://github.com/pytoolz/toolz/")
19797 (synopsis "List processing tools and functional utilities")
19798 (description
19799 "This package provides a set of utility functions for iterators,
19800 functions, and dictionaries.")
19801 (license license:bsd-3)))
19802
19803 (define-public python2-toolz
19804 (package-with-python2 python-toolz))
19805
19806 (define-public python-cytoolz
19807 (package
19808 (name "python-cytoolz")
19809 (version "0.9.0.1")
19810 (source
19811 (origin
19812 (method url-fetch)
19813 (uri (pypi-uri "cytoolz" version))
19814 (sha256
19815 (base32
19816 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
19817 (build-system python-build-system)
19818 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
19819 ;; 'exceptions'"
19820 (arguments '(#:tests? #f))
19821 (propagated-inputs
19822 `(("python-toolz" ,python-toolz)))
19823 (native-inputs
19824 `(("python-cython" ,python-cython)))
19825 (home-page "https://github.com/pytoolz/cytoolz")
19826 (synopsis "High performance functional utilities")
19827 (description
19828 "The cytoolz package implements the same API as provided by toolz. The
19829 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
19830 that is accessible to other projects developed in Cython.")
19831 (license license:bsd-3)))
19832
19833 (define-public python-sortedcontainers
19834 (package
19835 (name "python-sortedcontainers")
19836 (version "2.1.0")
19837 (source
19838 (origin
19839 (method url-fetch)
19840 (uri (pypi-uri "sortedcontainers" version))
19841 (sha256
19842 (base32
19843 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
19844 (build-system python-build-system)
19845 (arguments
19846 ;; FIXME: Tests require many extra dependencies, and would introduce
19847 ;; a circular dependency on hypothesis, which uses this package.
19848 '(#:tests? #f))
19849 (propagated-inputs
19850 `(("python-appdirs" ,python-appdirs)
19851 ("python-distlib" ,python-distlib)
19852 ("python-filelock" ,python-filelock)
19853 ("python-six" ,python-six-bootstrap)))
19854 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
19855 (synopsis "Sorted List, Sorted Dict, Sorted Set")
19856 (description
19857 "This package provides a sorted collections library, written in
19858 pure-Python.")
19859 (license license:asl2.0)))
19860
19861 (define-public python2-sortedcontainers
19862 (package-with-python2 python-sortedcontainers))
19863
19864 (define-public python-cloudpickle
19865 (package
19866 (name "python-cloudpickle")
19867 (version "1.3.0")
19868 (source
19869 (origin
19870 (method url-fetch)
19871 (uri (pypi-uri "cloudpickle" version))
19872 (sha256
19873 (base32
19874 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
19875 (build-system python-build-system)
19876 (arguments
19877 '(#:phases (modify-phases %standard-phases
19878 (add-before 'check 'do-not-override-PYTHONPATH
19879 (lambda _
19880 ;; Append to PYTHONPATH instead of overriding it so
19881 ;; that dependencies from Guix can be found.
19882 (substitute* "tests/testutils.py"
19883 (("env\\['PYTHONPATH'\\] = pythonpath")
19884 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
19885 #t))
19886 (replace 'check
19887 (lambda* (#:key tests? #:allow-other-keys)
19888 (if tests?
19889 (invoke "pytest" "-s" "-vv")
19890 (format #t "test suite not run~%"))
19891 #t)))))
19892 (native-inputs
19893 `(;; For tests.
19894 ("python-psutil" ,python-psutil)
19895 ("python-pytest" ,python-pytest)
19896 ("python-tornado" ,python-tornado)))
19897 (home-page "https://github.com/cloudpipe/cloudpickle")
19898 (synopsis "Extended pickling support for Python objects")
19899 (description
19900 "Cloudpickle makes it possible to serialize Python constructs not
19901 supported by the default pickle module from the Python standard library. It
19902 is especially useful for cluster computing where Python expressions are
19903 shipped over the network to execute on remote hosts, possibly close to the
19904 data.")
19905 (properties `((python2-variant . ,(delay python2-cloudpickle))))
19906 (license license:bsd-3)))
19907
19908 (define-public python2-cloudpickle
19909 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
19910 (package
19911 (inherit base)
19912 (native-inputs
19913 `(("python-mock" ,python2-mock)
19914 ,@(package-native-inputs base)))
19915 (propagated-inputs
19916 `(("python-futures" ,python2-futures)
19917 ,@(package-propagated-inputs base))))))
19918
19919 (define-public python-locket
19920 (package
19921 (name "python-locket")
19922 (version "0.2.0")
19923 (source
19924 (origin
19925 (method url-fetch)
19926 (uri (pypi-uri "locket" version))
19927 (sha256
19928 (base32
19929 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
19930 (build-system python-build-system)
19931 (home-page "https://github.com/mwilliamson/locket.py")
19932 (synopsis "File-based locks for Python")
19933 (description
19934 "Locket implements a lock that can be used by multiple processes provided
19935 they use the same path.")
19936 (license license:bsd-2)))
19937
19938 (define-public python2-locket
19939 (package-with-python2 python-locket))
19940
19941 (define-public python-blosc
19942 (package
19943 (name "python-blosc")
19944 (version "1.5.1")
19945 (source
19946 (origin
19947 (method url-fetch)
19948 (uri (pypi-uri "blosc" version))
19949 (sha256
19950 (base32
19951 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
19952 (build-system python-build-system)
19953 ;; FIXME: all tests pass, but then this error is printed:
19954 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
19955 (arguments '(#:tests? #f))
19956 (propagated-inputs
19957 `(("python-numpy" ,python-numpy)))
19958 (home-page "https://github.com/blosc/python-blosc")
19959 (synopsis "Python wrapper for the Blosc data compressor library")
19960 (description "Blosc is a high performance compressor optimized for binary
19961 data. It has been designed to transmit data to the processor cache faster
19962 than the traditional, non-compressed, direct memory fetch approach via a
19963 @code{memcpy()} system call.
19964
19965 Blosc works well for compressing numerical arrays that contains data with
19966 relatively low entropy, like sparse data, time series, grids with
19967 regular-spaced values, etc.
19968
19969 This Python package wraps the Blosc library.")
19970 (license license:bsd-3)))
19971
19972 (define-public python2-blosc
19973 (package-with-python2 python-blosc))
19974
19975 (define-public python-partd
19976 (package
19977 (name "python-partd")
19978 (version "0.3.9")
19979 (source
19980 (origin
19981 (method url-fetch)
19982 (uri (pypi-uri "partd" version))
19983 (sha256
19984 (base32
19985 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
19986 (build-system python-build-system)
19987 (propagated-inputs
19988 `(("python-blosc" ,python-blosc)
19989 ("python-locket" ,python-locket)
19990 ("python-numpy" ,python-numpy)
19991 ("python-pandas" ,python-pandas)
19992 ("python-pyzmq" ,python-pyzmq)
19993 ("python-toolz" ,python-toolz)))
19994 (home-page "https://github.com/dask/partd/")
19995 (synopsis "Appendable key-value storage")
19996 (description "Partd stores key-value pairs. Values are raw bytes. We
19997 append on old values. Partd excels at shuffling operations.")
19998 (license license:bsd-3)))
19999
20000 (define-public python2-partd
20001 (package-with-python2 python-partd))
20002
20003 (define-public python-fsspec
20004 (package
20005 (name "python-fsspec")
20006 (version "0.6.1")
20007 (source
20008 (origin
20009 (method url-fetch)
20010 (uri (pypi-uri "fsspec" version))
20011 (sha256
20012 (base32
20013 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
20014 (build-system python-build-system)
20015 (arguments '(#:tests? #f)) ; there are none
20016 (home-page "https://github.com/intake/filesystem_spec")
20017 (synopsis "File-system specification")
20018 (description "The purpose of this package is to produce a template or
20019 specification for a file-system interface, that specific implementations
20020 should follow, so that applications making use of them can rely on a common
20021 behavior and not have to worry about the specific internal implementation
20022 decisions with any given backend.")
20023 (license license:bsd-3)))
20024
20025 (define-public python-dask
20026 (package
20027 (name "python-dask")
20028 (version "2.14.0")
20029 (source
20030 (origin
20031 (method url-fetch)
20032 (uri (pypi-uri "dask" version))
20033 (sha256
20034 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
20035 (build-system python-build-system)
20036 (arguments
20037 `(#:phases
20038 (modify-phases %standard-phases
20039 (add-after 'unpack 'disable-broken-tests
20040 (lambda _
20041 ;; This test is marked as xfail when pytest-xdist is used.
20042 (substitute* "dask/tests/test_threaded.py"
20043 (("def test_interrupt\\(\\)" m)
20044 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20045 m)))
20046 ;; This one fails with a type error:
20047 ;; TypeError: Already tz-aware, use tz_convert to convert.
20048 (substitute* "dask/dataframe/tests/test_shuffle.py"
20049 (("def test_set_index_timestamp\\(\\)" m)
20050 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20051 m)))
20052 #t))
20053 (replace 'check
20054 (lambda _ (invoke "pytest" "-vv"))))))
20055 (propagated-inputs
20056 `(("python-cloudpickle" ,python-cloudpickle)
20057 ("python-fsspec" ,python-fsspec)
20058 ("python-numpy" ,python-numpy)
20059 ("python-packaging" ,python-packaging)
20060 ("python-pandas" ,python-pandas)
20061 ("python-partd" ,python-partd)
20062 ("python-toolz" ,python-toolz)
20063 ("python-pyyaml" ,python-pyyaml)))
20064 (native-inputs
20065 `(("python-pytest" ,python-pytest)
20066 ("python-pytest-runner" ,python-pytest-runner)))
20067 (home-page "https://github.com/dask/dask/")
20068 (synopsis "Parallel computing with task scheduling")
20069 (description
20070 "Dask is a flexible parallel computing library for analytics. It
20071 consists of two components: dynamic task scheduling optimized for computation,
20072 and large data collections like parallel arrays, dataframes, and lists that
20073 extend common interfaces like NumPy, Pandas, or Python iterators to
20074 larger-than-memory or distributed environments. These parallel collections
20075 run on top of the dynamic task schedulers. ")
20076 (license license:bsd-3)))
20077
20078 (define-public python-ilinkedlist
20079 (package
20080 (name "python-ilinkedlist")
20081 (version "0.4.0")
20082 (source
20083 (origin
20084 (method url-fetch)
20085 (uri (pypi-uri "ilinkedlist" version))
20086 (sha256
20087 (base32
20088 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
20089 (build-system python-build-system)
20090 (native-inputs `(("python-pytest" ,python-pytest)))
20091 (inputs `(("python" ,python)))
20092 (home-page "https://github.com/luther9/ilinkedlist-py")
20093 (synopsis "Immutable linked list library")
20094 (description
20095 "This is a implementation of immutable linked lists for Python. It
20096 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
20097 Since a linked list is treated as immutable, it is hashable, and its length
20098 can be retrieved in constant time. Some of the terminology is inspired by
20099 LISP. It is possible to create an improper list by creating a @code{Pair}
20100 with a non-list @code{cdr}.")
20101 (license license:gpl3+)))
20102
20103 (define-public python-readlike
20104 (package
20105 (name "python-readlike")
20106 (version "0.1.3")
20107 (source
20108 (origin
20109 (method url-fetch)
20110 (uri (pypi-uri "readlike" version))
20111 (sha256
20112 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
20113 (build-system python-build-system)
20114 (home-page "https://github.com/jangler/readlike")
20115 (synopsis "GNU Readline-like line editing module")
20116 (description
20117 "This Python module provides line editing functions similar to the default
20118 Emacs-style ones of GNU Readline. Unlike the Python standard library's
20119 @code{readline} package, this one allows access to those capabilities in settings
20120 outside of a standard command-line interface. It is especially well-suited to
20121 interfacing with Urwid, due to a shared syntax for describing key inputs.
20122
20123 Currently, all stateless Readline commands are implemented. Yanking and history
20124 are not supported.")
20125 (license license:expat)))
20126
20127 (define-public python2-readlike
20128 (package-with-python2 python-readlike))
20129
20130 (define-public python-reparser
20131 (package
20132 (name "python-reparser")
20133 (version "1.4.3")
20134 (source
20135 (origin
20136 (method url-fetch)
20137 (uri (pypi-uri "ReParser" version))
20138 (sha256
20139 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
20140 (build-system python-build-system)
20141 (home-page "https://github.com/xmikos/reparser")
20142 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
20143 (description
20144 "This Python library provides a simple lexer/parser for inline markup based
20145 on regular expressions.")
20146 (license license:expat)))
20147
20148 (define-public python2-reparser
20149 (let ((reparser (package-with-python2
20150 (strip-python2-variant python-reparser))))
20151 (package (inherit reparser)
20152 (propagated-inputs
20153 `(("python2-enum34" ,python2-enum34)
20154 ,@(package-propagated-inputs reparser))))))
20155
20156 (define-public python-retrying
20157 (package
20158 (name "python-retrying")
20159 (version "1.3.3")
20160 (source
20161 (origin
20162 (method git-fetch)
20163 (uri (git-reference
20164 (url "https://github.com/rholder/retrying")
20165 (commit (string-append "v" version))))
20166 (file-name (git-file-name name version))
20167 (sha256
20168 (base32
20169 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
20170 (build-system python-build-system)
20171 (propagated-inputs
20172 `(("python-six" ,python-six)))
20173 (home-page "https://github.com/rholder/retrying")
20174 (synopsis "Library for adding retry behavior")
20175 (description "Retrying is a general-purpose retrying library to simplify
20176 the task of adding retry behavior to just about anything.
20177
20178 Features:
20179
20180 @itemize
20181 @item Generic Decorator API.
20182 @item Specify stop condition (i.e. limit by number of attempts).
20183 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
20184 @item Customize retrying on Exceptions.
20185 @item Customize retrying on expected returned result.
20186 @end itemize")
20187 (license license:asl2.0)))
20188
20189 (define-public python-pre-commit
20190 (package
20191 (name "python-pre-commit")
20192 (version "2.10.0")
20193 (source
20194 (origin
20195 (method url-fetch)
20196 (uri (pypi-uri "pre_commit" version))
20197 (sha256
20198 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
20199 (build-system python-build-system)
20200 (arguments
20201 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
20202 ;; attribute 'empty_template_setup'".
20203 `(#:tests? #false))
20204 (propagated-inputs
20205 `(("python-cfgv" ,python-cfgv)
20206 ("python-identify" ,python-identify)
20207 ("python-importlib-metadata" ,python-importlib-metadata)
20208 ("python-importlib-resources" ,python-importlib-resources)
20209 ("python-nodeenv" ,python-nodeenv)
20210 ("python-pyyaml" ,python-pyyaml)
20211 ("python-toml" ,python-toml)
20212 ("python-virtualenv" ,python-virtualenv)))
20213 (home-page "https://github.com/pre-commit/pre-commit")
20214 (synopsis "Framework for managing multi-language pre-commit hooks")
20215 (description
20216 "This package provides a framework for managing and maintaining
20217 multi-language pre-commit hooks.")
20218 (license license:expat)))
20219
20220 (define-public python-precis-i18n
20221 (package
20222 (name "python-precis-i18n")
20223 (version "1.0.0")
20224 (source
20225 (origin
20226 (method url-fetch)
20227 (uri (pypi-uri "precis_i18n" version))
20228 (sha256
20229 (base32
20230 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
20231 (build-system python-build-system)
20232 (home-page "https://github.com/byllyfish/precis_i18n")
20233 (synopsis "Implementation of the PRECIS framework")
20234 (description
20235 "This module implements the PRECIS Framework as described in RFC 8264,
20236 RFC 8265 and RFC 8266.")
20237 (license license:expat)))
20238
20239 (define-public python-absl-py
20240 (package
20241 (name "python-absl-py")
20242 (version "0.6.1")
20243 (source
20244 (origin
20245 (method url-fetch)
20246 (uri (pypi-uri "absl-py" version))
20247 (sha256
20248 (base32
20249 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
20250 (build-system python-build-system)
20251 (propagated-inputs
20252 `(("python-six" ,python-six)))
20253 (home-page "https://github.com/abseil/abseil-py")
20254 (synopsis "Abseil Python common libraries")
20255 (description
20256 "This package provides the Abseil Python Common Libraries, a collection
20257 of Python libraries for building Python applications.")
20258 (license license:asl2.0)))
20259
20260 (define-public python-astor
20261 (package
20262 (name "python-astor")
20263 (version "0.7.1")
20264 (source
20265 (origin
20266 (method url-fetch)
20267 (uri (pypi-uri "astor" version))
20268 (sha256
20269 (base32
20270 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
20271 (build-system python-build-system)
20272 ;; FIXME: There are two errors and two test failures.
20273 (arguments `(#:tests? #f))
20274 (home-page "https://github.com/berkerpeksag/astor")
20275 (synopsis "Read and write Python ASTs")
20276 (description "Astor is designed to allow easy manipulation of Python
20277 source via the Abstract Syntax Tree.")
20278 (license license:bsd-3)))
20279
20280 (define-public python2-astor
20281 (package-with-python2 python-astor))
20282
20283 (define-public python-astunparse
20284 (package
20285 (name "python-astunparse")
20286 (version "1.6.2")
20287 (source
20288 (origin
20289 (method url-fetch)
20290 (uri (pypi-uri "astunparse" version))
20291 (sha256
20292 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
20293 (build-system python-build-system)
20294 (arguments '(#:tests? #f)) ; there are none
20295 (propagated-inputs
20296 `(("python-six" ,python-six)
20297 ("python-wheel" ,python-wheel)))
20298 (home-page "https://github.com/simonpercivall/astunparse")
20299 (synopsis "AST unparser for Python")
20300 (description "This package provides an AST unparser for Python. It is a
20301 factored out version of @code{unparse} found in the Python source
20302 distribution.")
20303 (license license:bsd-3)))
20304
20305 (define-public python-gast
20306 (package
20307 (name "python-gast")
20308 (version "0.3.3")
20309 (source
20310 (origin
20311 (method url-fetch)
20312 (uri (pypi-uri "gast" version))
20313 (sha256
20314 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
20315 (build-system python-build-system)
20316 (propagated-inputs
20317 `(("python-astunparse" ,python-astunparse)))
20318 (home-page "https://pypi.org/project/gast/")
20319 (synopsis "Generic Python AST that abstracts the underlying Python version")
20320 (description
20321 "GAST provides a compatibility layer between the AST of various Python
20322 versions, as produced by @code{ast.parse} from the standard @code{ast}
20323 module.")
20324 (license license:bsd-3)))
20325
20326 (define-public python-wikidata
20327 (package
20328 (name "python-wikidata")
20329 (version "0.6.1")
20330 (source
20331 (origin
20332 (method url-fetch)
20333 (uri (pypi-uri "Wikidata" version))
20334 (sha256
20335 (base32
20336 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
20337 (build-system python-build-system)
20338 (propagated-inputs
20339 `(("python-babel" ,python-babel)))
20340 (home-page "https://github.com/dahlia/wikidata")
20341 (synopsis "Wikidata client library")
20342 (description
20343 "This package provides a Python interface to
20344 @url{https://www.wikidata.org/, Wikidata}.")
20345 (properties '((upstream-name . "Wikidata")))
20346 (license license:gpl3+)))
20347
20348 (define-public python-doctest-ignore-unicode
20349 (package
20350 (name "python-doctest-ignore-unicode")
20351 (version "0.1.2")
20352 (source
20353 (origin
20354 (method url-fetch)
20355 (uri (pypi-uri "doctest-ignore-unicode" version))
20356 (sha256
20357 (base32
20358 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
20359 (build-system python-build-system)
20360 (native-inputs
20361 `(("python-nose" ,python-nose)))
20362 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
20363 (synopsis "Ignore Unicode literal prefixes in doctests")
20364 (description
20365 "This package adds support for a flag to ignore Unicode literal prefixes
20366 in doctests.")
20367 (license license:asl2.0)))
20368
20369 (define-public python-attr
20370 (package
20371 (name "python-attr")
20372 (version "0.3.1")
20373 (source
20374 (origin
20375 (method url-fetch)
20376 (uri (pypi-uri "attr" version))
20377 (sha256
20378 (base32
20379 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
20380 (build-system python-build-system)
20381 (home-page "https://github.com/denis-ryzhkov/attr")
20382 (synopsis "Decorator for attributes of target function or class")
20383 (description "Simple decorator to set attributes of target function or
20384 class in a @acronym{DRY, Don't Repeat Yourself} way.")
20385 (license license:expat)))
20386
20387 (define-public python-construct
20388 (package
20389 (name "python-construct")
20390 (version "2.10.56")
20391 (source
20392 (origin
20393 (method url-fetch)
20394 (uri (pypi-uri "construct" version))
20395 (sha256
20396 (base32
20397 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
20398 (build-system python-build-system)
20399 (arguments
20400 `(#:tests? #f)) ; No tests exist.
20401 (propagated-inputs
20402 `(("python-extras" ,python-extras)
20403 ("python-arrow" ,python-arrow)
20404 ("python-numpy" ,python-numpy)
20405 ("python-ruamel.yaml" ,python-ruamel.yaml)))
20406 (home-page "https://construct.readthedocs.io")
20407 (synopsis "Declarative and symmetrical parser and builder for binary data")
20408 (description
20409 "This package provides both simple, atomic constructs (such as
20410 integers of various sizes), as well as composite ones which allow you
20411 form hierarchical and sequential structures of increasing complexity.
20412 It features bit and byte granularity, easy debugging and testing, an
20413 easy-to-extend subclass system, and lots of primitive constructs to
20414 make your work easier.")
20415 (license license:expat)))
20416
20417 (define-public python-outcome
20418 (package
20419 (name "python-outcome")
20420 (version "1.0.1")
20421 (source
20422 (origin
20423 (method url-fetch)
20424 (uri (pypi-uri "outcome" version))
20425 (sha256
20426 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
20427 (build-system python-build-system)
20428 (arguments
20429 `(#:phases
20430 (modify-phases %standard-phases
20431 (replace 'check
20432 (lambda* (#:key inputs outputs #:allow-other-keys)
20433 (add-installed-pythonpath inputs outputs)
20434 (invoke "pytest" "-vv"))))))
20435 (native-inputs
20436 `(("python-pytest" ,python-pytest)
20437 ("python-pytest-cov" ,python-pytest-cov)
20438 ("python-pytest-asyncio" ,python-pytest-asyncio)))
20439 (propagated-inputs
20440 `(("python-async-generator" ,python-async-generator)
20441 ("python-attrs" ,python-attrs)))
20442 (home-page "https://github.com/python-trio/outcome")
20443 (synopsis "Capture the outcome of Python function calls")
20444 (description
20445 "Capture the outcome of Python function calls. Extracted from the Trio
20446 project.")
20447 ;; Either license applies.
20448 (license (list license:expat license:asl2.0))))
20449
20450 (define-public python-trio
20451 (package
20452 (name "python-trio")
20453 (version "0.17.0")
20454 (source
20455 (origin
20456 (method url-fetch)
20457 (uri (pypi-uri "trio" version))
20458 (sha256
20459 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
20460 (build-system python-build-system)
20461 (arguments
20462 `(#:phases
20463 (modify-phases %standard-phases
20464 (add-before 'check 'change-home
20465 (lambda _
20466 ;; Tests require a writable home.
20467 (setenv "HOME" "/tmp")
20468 #t))
20469 (replace 'check
20470 (lambda _
20471 (invoke "pytest" "-vv" "-k"
20472 (string-append
20473 ;; This test times out.
20474 "not test_ki_protection_works"
20475 ;; Assertion errors.
20476 " and not test_guest_mode_ki"
20477 " and not test_run_in_trio_thread_ki"
20478 ;; These try to raise KeyboardInterrupt which does not work
20479 ;; in the build environment.
20480 " and not test_ki_self"
20481 " and not test_ki_wakes_us_up"
20482 ;; Failure in name resolution.
20483 " and not test_getnameinfo"
20484 " and not test_SocketType_resolve"
20485 ;; OSError: protocol not found.
20486 " and not test_getprotobyname")))))))
20487 (native-inputs
20488 `(("python-astor" ,python-astor)
20489 ("python-ipython" ,python-ipython)
20490 ("python-jedi" ,python-jedi)
20491 ("python-pylint" ,python-pylint)
20492 ("python-pyopenssl" ,python-pyopenssl)
20493 ("python-pytest" ,python-pytest)
20494 ("python-pytest-cov" ,python-pytest-cov)
20495 ("python-trustme" ,python-trustme)))
20496 (propagated-inputs
20497 `(("python-attrs" ,python-attrs)
20498 ("python-idna" ,python-idna)
20499 ("python-outcome" ,python-outcome)
20500 ("python-sniffio" ,python-sniffio)
20501 ("python-sortedcontainers"
20502 ,python-sortedcontainers)))
20503 (home-page "https://github.com/python-trio/trio")
20504 (synopsis "Friendly Python library for async concurrency and I/O")
20505 (description
20506 "Trio strives to be a production-quality, async/await-native I/O library
20507 for Python. Like all async libraries, its main purpose is to help you write
20508 programs that do multiple things at the same time with parallelized I/O.")
20509 ;; Either license applies.
20510 (license (list license:expat license:asl2.0))))
20511
20512 (define-public python-trio-typing
20513 (package
20514 (name "python-trio-typing")
20515 (version "0.5.0")
20516 (source
20517 (origin
20518 (method url-fetch)
20519 (uri (pypi-uri "trio-typing" version))
20520 (sha256
20521 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
20522 (build-system python-build-system)
20523 (arguments
20524 `(#:phases
20525 (modify-phases %standard-phases
20526 (replace 'check
20527 (lambda _
20528 (invoke "pytest" "-vv"))))))
20529 (native-inputs
20530 `(("python-attrs" ,python-attrs)
20531 ("python-pytest" ,python-pytest)))
20532 (propagated-inputs
20533 `(("python-mypy" ,python-mypy)
20534 ("python-mypy-extensions"
20535 ,python-mypy-extensions)
20536 ("python-trio" ,python-trio)
20537 ("python-typing-extensions"
20538 ,python-typing-extensions)))
20539 (home-page "https://github.com/python-trio/trio-typing")
20540 (synopsis "Static type checking support for Trio and related projects")
20541 (description
20542 "This package provides:
20543
20544 @itemize
20545 @item PEP 561 typing stubs packages for the Trio project packages:
20546
20547 @itemize
20548 @item trio (@code{trio-stubs})
20549 @item outcome (@code{outcome-stubs})
20550 @item async_generator (@code{async_generator-stubs})
20551 @end itemize
20552
20553 @item A package @code{trio_typing} containing types that Trio programs often
20554 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20555 a mypy plugin that smooths over some limitations in the basic type hints.
20556 @end itemize")
20557 ;; Either license applies.
20558 (license (list license:expat license:asl2.0))))
20559
20560 (define-public python-humanize
20561 (package
20562 (name "python-humanize")
20563 (version "0.5.1")
20564 (source
20565 (origin
20566 (method url-fetch)
20567 (uri (pypi-uri "humanize" version))
20568 (sha256
20569 (base32
20570 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20571 (arguments
20572 '(#:tests? #f)) ; tests not in pypi archive
20573 (build-system python-build-system)
20574 (home-page "https://github.com/jmoiron/humanize")
20575 (synopsis "Print numerical information in a human-readable form")
20576 (description "This package provides a Python module that displays numbers
20577 and dates in \"human readable\" forms. For example, it would display
20578 \"12345591313\" as \"12.3 billion\".")
20579 (license license:expat)))
20580
20581 (define-public python-txaio
20582 (package
20583 (name "python-txaio")
20584 (version "18.8.1")
20585 (source
20586 (origin
20587 (method url-fetch)
20588 (uri (pypi-uri "txaio" version))
20589 (sha256
20590 (base32
20591 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20592 (build-system python-build-system)
20593 (propagated-inputs
20594 `(("python-twisted" ,python-twisted)
20595 ("python-six" ,python-six)))
20596 (home-page "https://github.com/crossbario/txaio")
20597 (synopsis "Compatibility layer between Python asyncio and Twisted")
20598 (description "Txaio provides a compatibility layer between the Python
20599 @code{asyncio} module and @code{Twisted}.")
20600 (license license:expat)))
20601
20602 (define-public python-toolshed
20603 (package
20604 (name "python-toolshed")
20605 (version "0.4.6")
20606 (source
20607 (origin
20608 (method url-fetch)
20609 (uri (pypi-uri "toolshed" version))
20610 (sha256
20611 (base32
20612 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20613 (build-system python-build-system)
20614 (native-inputs
20615 `(("python-nose" ,python-nose)))
20616 (home-page "https://github.com/brentp/toolshed/")
20617 (synopsis "Collection of modules and functions for working with data")
20618 (description "This is a collection of well-tested, simple modules and
20619 functions that aim to reduce boilerplate when working with data.")
20620 (license license:bsd-2)))
20621
20622 (define-public python-annoy
20623 (package
20624 (name "python-annoy")
20625 (version "1.15.1")
20626 (source
20627 (origin
20628 (method url-fetch)
20629 (uri (pypi-uri "annoy" version))
20630 (sha256
20631 (base32
20632 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20633 (build-system python-build-system)
20634 (native-inputs
20635 `(("python-nose" ,python-nose)))
20636 (home-page "https://github.com/spotify/annoy/")
20637 (synopsis "Approximate nearest neighbors library")
20638 (description
20639 "Annoy is a C++ library with Python bindings to search for points in
20640 space that are close to a given query point. It also creates large read-only
20641 file-based data structures that are @code{mmap}ped into memory so that many
20642 processes may share the same data.")
20643 (license license:asl2.0)))
20644
20645 (define-public python-croniter
20646 (package
20647 (name "python-croniter")
20648 (version "0.3.34")
20649 (source (origin
20650 (method url-fetch)
20651 (uri (pypi-uri "croniter" version))
20652 (sha256
20653 (base32
20654 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20655 (build-system python-build-system)
20656 (propagated-inputs
20657 `(("python-dateutil" ,python-dateutil)
20658 ("python-natsort" ,python-natsort)))
20659 (home-page "https://github.com/kiorky/croniter")
20660 (synopsis "Iterate datetime objects with cron-like syntax")
20661 (description
20662 "@code{croniter} provides iteration for datetime object with cron-like
20663 format.")
20664 (license license:expat)))
20665
20666 (define-public python-pylzma
20667 (package
20668 (name "python-pylzma")
20669 (version "0.5.0")
20670 (source
20671 (origin
20672 (method url-fetch)
20673 (uri (pypi-uri "pylzma" version))
20674 (sha256
20675 (base32
20676 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
20677 (build-system python-build-system)
20678 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
20679 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
20680 (description "This package provides Python bindings for the LZMA library
20681 by Igor Pavlov.")
20682 (license license:lgpl2.1+)))
20683
20684 (define-public python2-pylzma
20685 (package-with-python2 python-pylzma))
20686
20687 (define-public python2-zeroconf
20688 (package
20689 (name "python2-zeroconf")
20690
20691 ;; This is the last version that supports Python 2.x.
20692 (version "0.19.1")
20693 (source
20694 (origin
20695 (method url-fetch)
20696 (uri (pypi-uri "zeroconf" version))
20697 (sha256
20698 (base32
20699 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
20700 (build-system python-build-system)
20701 (arguments
20702 `(#:python ,python-2
20703 #:phases
20704 (modify-phases %standard-phases
20705 (add-after 'unpack 'patch-requires
20706 (lambda* (#:key inputs #:allow-other-keys)
20707 (substitute* "setup.py"
20708 (("enum-compat")
20709 "enum34"))
20710 #t)))))
20711 (native-inputs
20712 `(("python2-six" ,python2-six)
20713 ("python2-enum32" ,python2-enum34)
20714 ("python2-netifaces" ,python2-netifaces)
20715 ("python2-typing" ,python2-typing)))
20716 (home-page "https://github.com/jstasiak/python-zeroconf")
20717 (synopsis "Pure Python mDNS service discovery")
20718 (description
20719 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
20720 compatible).")
20721 (license license:lgpl2.1+)))
20722
20723 (define-public python-bsddb3
20724 (package
20725 (name "python-bsddb3")
20726 (version "6.2.6")
20727 (source
20728 (origin
20729 (method url-fetch)
20730 (uri (pypi-uri "bsddb3" version))
20731 (sha256
20732 (base32
20733 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
20734 (build-system python-build-system)
20735 (inputs
20736 `(("bdb" ,bdb)))
20737 (arguments
20738 '(#:phases
20739 (modify-phases %standard-phases
20740 (add-after 'unpack 'configure-locations
20741 (lambda* (#:key inputs #:allow-other-keys)
20742 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
20743 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
20744 #t))
20745 (replace 'check
20746 (lambda _
20747 (invoke "python3" "test3.py" "-v"))))))
20748 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
20749 (synopsis "Python bindings for Oracle Berkeley DB")
20750 (description
20751 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
20752 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
20753 Transaction objects, and each of these is exposed as a Python type in the
20754 bsddb3.db module. The database objects can use various access methods: btree,
20755 hash, recno, and queue. Complete support of Berkeley DB distributed
20756 transactions. Complete support for Berkeley DB Replication Manager.
20757 Complete support for Berkeley DB Base Replication. Support for RPC.")
20758 (license license:bsd-3)))
20759
20760 (define-public python-dbfread
20761 (package
20762 (name "python-dbfread")
20763 (version "2.0.7")
20764 (source (origin
20765 (method url-fetch)
20766 (uri (pypi-uri "dbfread" version))
20767 (sha256
20768 (base32
20769 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
20770 (build-system python-build-system)
20771 (native-inputs
20772 `(("python-pytest" ,python-pytest)))
20773 (home-page "https://dbfread.readthedocs.io")
20774 (synopsis "Read DBF Files with Python")
20775 (description
20776 "This library reads DBF files and returns the data as native Python data
20777 types for further processing. It is primarily intended for batch jobs and
20778 one-off scripts.")
20779 (license license:expat)))
20780
20781 (define-public python-cached-property
20782 (package
20783 (name "python-cached-property")
20784 (version "1.5.1")
20785 (source
20786 (origin
20787 (method url-fetch)
20788 (uri (pypi-uri "cached-property" version))
20789 (sha256
20790 (base32
20791 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
20792 (build-system python-build-system)
20793 (arguments
20794 `(#:phases
20795 (modify-phases %standard-phases
20796 ;; https://github.com/pydanny/cached-property/issues/131
20797 ;; recent versions of freezegun break one test
20798 (add-after 'unpack 'disable-broken-test
20799 (lambda _
20800 (substitute* "tests/test_cached_property.py"
20801 (("def test_threads_ttl_expiry\\(self\\)" m)
20802 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
20803 " " m)))
20804 #t)))))
20805 (native-inputs
20806 `(("python-freezegun" ,python-freezegun)))
20807 (home-page
20808 "https://github.com/pydanny/cached-property")
20809 (synopsis
20810 "Decorator for caching properties in classes")
20811 (description
20812 "This package provides a decorator which makes caching
20813 time-or-computationally-expensive properties quick and easy and works in Python
20814 2 or 3.")
20815 (license license:bsd-3)))
20816
20817 (define-public python-folium
20818 (package
20819 (name "python-folium")
20820 (version "0.12.1")
20821 (source
20822 (origin
20823 ;; PyPI has a ".whl" file but not a proper source release.
20824 ;; Thus, fetch code from Git.
20825 (method git-fetch)
20826 (uri (git-reference
20827 (url "https://github.com/python-visualization/folium")
20828 (commit (string-append "v" version))))
20829 (file-name (git-file-name name version))
20830 (sha256
20831 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
20832 (build-system python-build-system)
20833 (propagated-inputs
20834 `(("python-branca" ,python-branca)
20835 ("python-jinja2" ,python-jinja2)
20836 ("python-numpy" ,python-numpy)
20837 ("python-requests" ,python-requests)))
20838 (native-inputs
20839 `(("python-pytest" ,python-pytest)))
20840 (home-page "https://github.com/python-visualization/folium")
20841 (synopsis "Make beautiful maps with Leaflet.js & Python")
20842 (description "@code{folium} makes it easy to visualize data that’s been
20843 manipulated in Python on an interactive leaflet map. It enables both the
20844 binding of data to a map for @code{choropleth} visualizations as well as
20845 passing rich vector/raster/HTML visualizations as markers on the map.
20846
20847 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
20848 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
20849 supports Image, Video, GeoJSON and TopoJSON overlays.")
20850 (license license:expat)))
20851
20852 (define-public jube
20853 (package
20854 ;; This is a command-line tool, so no "python-" prefix.
20855 (name "jube")
20856 (version "2.2.2")
20857 (source (origin
20858 (method url-fetch)
20859 (uri (string-append
20860 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
20861 version))
20862 (sha256
20863 (base32
20864 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
20865 (file-name (string-append "jube-" version ".tar.gz"))))
20866 (build-system python-build-system)
20867 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
20868 (synopsis "Benchmarking environment")
20869 (description
20870 "JUBE helps perform and analyze benchmarks in a systematic way. For each
20871 benchmarked application, benchmark data is stored in a format that allows JUBE
20872 to deduct the desired information. This data can be parsed by automatic pre-
20873 and post-processing scripts that draw information and store it more densely
20874 for manual interpretation.")
20875 (license license:gpl3+)))
20876
20877 (define-public python-pyroutelib3
20878 (package
20879 (name "python-pyroutelib3")
20880 (version "1.3.post1")
20881 (source
20882 (origin
20883 (method url-fetch)
20884 (uri (pypi-uri "pyroutelib3" version))
20885 (sha256
20886 (base32
20887 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
20888 (build-system python-build-system)
20889 (propagated-inputs
20890 `(("python-dateutil" ,python-dateutil)))
20891 (home-page "https://github.com/MKuranowski/pyroutelib3")
20892 (synopsis "Library for simple routing on OSM data")
20893 (description "Library for simple routing on OSM data")
20894 (license license:gpl3+)))
20895
20896 (define-public python-bibtexparser
20897 (package
20898 (name "python-bibtexparser")
20899 (version "1.1.0")
20900 (source
20901 (origin
20902 (method url-fetch)
20903 (uri (pypi-uri "bibtexparser" version))
20904 (sha256
20905 (base32
20906 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
20907 (build-system python-build-system)
20908 (propagated-inputs
20909 `(("python-pyparsing" ,python-pyparsing)))
20910 (native-inputs
20911 `(("python-future" ,python-future)))
20912 (home-page "https://github.com/sciunto-org/python-bibtexparser")
20913 (synopsis "Python library to parse BibTeX files")
20914 (description "BibtexParser is a Python library to parse BibTeX files.")
20915 (license (list license:bsd-3 license:lgpl3))))
20916
20917 (define-public python-distro
20918 (package
20919 (name "python-distro")
20920 (version "1.4.0")
20921 (source
20922 (origin
20923 (method url-fetch)
20924 (uri (pypi-uri "distro" version))
20925 (sha256
20926 (base32
20927 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
20928 (build-system python-build-system)
20929 (native-inputs
20930 `(("python-pytest" ,python-pytest)))
20931 (home-page "https://github.com/nir0s/distro")
20932 (synopsis
20933 "OS platform information API")
20934 (description
20935 "@code{distro} provides information about the OS distribution it runs on,
20936 such as a reliable machine-readable ID, or version information.
20937
20938 It is the recommended replacement for Python's original
20939 `platform.linux_distribution` function (which will be removed in Python 3.8).
20940 @code{distro} also provides a command-line interface to output the platform
20941 information in various formats.")
20942 (license license:asl2.0)))
20943
20944 (define-public python-cairosvg
20945 (package
20946 (name "python-cairosvg")
20947 (version "2.5.0")
20948 (source
20949 (origin
20950 (method url-fetch)
20951 (uri (pypi-uri "CairoSVG" version))
20952 (sha256
20953 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
20954 (build-system python-build-system)
20955 (arguments
20956 `(#:phases
20957 (modify-phases %standard-phases
20958 (replace 'check
20959 (lambda _ (invoke "pytest"))))))
20960 (propagated-inputs
20961 `(("python-cairocffi" ,python-cairocffi)
20962 ("python-cssselect2" ,python-cssselect2)
20963 ("python-defusedxml" ,python-defusedxml)
20964 ("python-pillow" ,python-pillow)
20965 ("python-tinycss2" ,python-tinycss2)))
20966 (native-inputs
20967 `(("python-pytest-flake8" ,python-pytest-flake8)
20968 ("python-pytest-isort" ,python-pytest-isort)
20969 ("python-pytest-runner" ,python-pytest-runner)))
20970 (home-page "https://cairosvg.org/")
20971 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
20972 (description "CairoSVG is a SVG converter based on Cairo. It can export
20973 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
20974 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
20975 parsed, the result is drawn to a Cairo surface that can be exported to
20976 qvarious formats: PDF, PostScript, PNG and even SVG.")
20977 (license license:lgpl3+)))
20978
20979 (define-public python-pyphen
20980 (package
20981 (name "python-pyphen")
20982 (version "0.10.0")
20983 (source
20984 (origin
20985 (method url-fetch)
20986 (uri (pypi-uri "Pyphen" version))
20987 (sha256
20988 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
20989 (build-system python-build-system)
20990 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
20991 ;; embedded set provided by upstream - like Debian does.
20992 (home-page "https://github.com/Kozea/Pyphen")
20993 (synopsis "Pure Python module to hyphenate text")
20994 (description "Pyphen is a pure Python module to hyphenate text using
20995 existing Hunspell hyphenation dictionaries.")
20996 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
20997
20998 (define-public python-intelhex
20999 (package
21000 (name "python-intelhex")
21001 (version "2.2.1")
21002 (source
21003 (origin
21004 (method url-fetch)
21005 (uri (pypi-uri "intelhex" version))
21006 (sha256
21007 (base32
21008 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
21009 (build-system python-build-system)
21010 (arguments '(#:tests? #f)) ;issue with version
21011 (home-page "https://pypi.org/project/IntelHex/")
21012 (synopsis "Python library for Intel HEX files manipulations")
21013 (description "The Intel HEX file format is widely used in microprocessors
21014 and microcontrollers area (embedded systems etc.) as the de facto standard for
21015 representation of code to be programmed into microelectronic devices. This
21016 package provides an intelhex Python library to read, write, create from
21017 scratch and manipulate data from Intel HEX file format. It also includes
21018 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
21019 converters and more, those based on the library itself.")
21020 (license license:bsd-3)))
21021
21022 (define-public python-pykwalify
21023 (package
21024 (name "python-pykwalify")
21025 (version "1.7.0")
21026 (source
21027 (origin
21028 (method url-fetch)
21029 (uri (pypi-uri "pykwalify" version))
21030 (sha256
21031 (base32
21032 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
21033 (build-system python-build-system)
21034 (arguments '(#:tests? #f)) ;missing dependencies
21035 (propagated-inputs
21036 `(("python-dateutil" ,python-dateutil)
21037 ("python-docopt" ,python-docopt)
21038 ("python-pyyaml" ,python-pyyaml)))
21039 (home-page "https://github.com/grokzen/pykwalify")
21040 (synopsis
21041 "Python lib/cli for JSON/YAML schema validation")
21042 (description
21043 "This package provides a parser, schema validator, and data binding tool
21044 for YAML and JSON.")
21045 (license license:expat)))
21046
21047 (define-public python-dbusmock
21048 (package
21049 (name "python-dbusmock")
21050 (version "0.18.3")
21051 (source
21052 (origin
21053 (method url-fetch)
21054 (uri (pypi-uri "python-dbusmock" version))
21055 (sha256
21056 (base32
21057 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
21058 (build-system python-build-system)
21059 (arguments
21060 '(#:phases
21061 (modify-phases %standard-phases
21062 (add-after 'unpack 'patch-shell-path
21063 (lambda _
21064 (substitute* "tests/test_code.py"
21065 (("/bin/bash") (which "bash")))
21066 #t)))))
21067 (native-inputs
21068 `(;; For tests.
21069 ("dbus" ,dbus) ; for dbus-daemon
21070 ("python-nose" ,python-nose)
21071 ("which" ,which)))
21072 (propagated-inputs
21073 `(("python-dbus" ,python-dbus)
21074 ("python-pygobject" ,python-pygobject)))
21075 (home-page "https://github.com/martinpitt/python-dbusmock")
21076 (synopsis "Python library for mock D-Bus objects")
21077 (description "python-dbusmock allows for the easy creation of mock objects on
21078 D-Bus. This is useful for writing tests for software which talks to D-Bus
21079 services such as upower, systemd, logind, gnome-session or others, and it is
21080 hard (or impossible without root privileges) to set the state of the real
21081 services to what you expect in your tests.")
21082 (license license:lgpl3+)))
21083
21084 (define-public python-jsonplus
21085 (package
21086 (name "python-jsonplus")
21087 (version "0.8.0")
21088 (home-page "https://github.com/randomir/jsonplus")
21089 (source (origin
21090 (method url-fetch)
21091 (uri (pypi-uri "jsonplus" version))
21092 (sha256
21093 (base32
21094 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
21095 (build-system python-build-system)
21096 ;; XXX: No tests on PyPI, and the repository has no tags.
21097 (arguments '(#:tests? #f))
21098 (propagated-inputs
21099 `(("python-dateutil" ,python-dateutil)
21100 ("python-simplejson" ,python-simplejson)
21101 ("python-sortedcontainers" ,python-sortedcontainers)))
21102 (synopsis "Serialize Python types to/from JSON")
21103 (description
21104 "This package provides functionality to serialize arbitrary data types
21105 to and from JSON. Common data types are implemented and it is easy to
21106 register custom encoders and decoders.")
21107 (license license:expat)))
21108
21109 (define-public python-ujson
21110 (package
21111 (name "python-ujson")
21112 (version "4.0.2")
21113 (source
21114 (origin
21115 (method url-fetch)
21116 (uri (pypi-uri "ujson" version))
21117 (sha256
21118 (base32
21119 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
21120 (modules '((guix build utils)))
21121 (snippet
21122 '(begin (delete-file-recursively "deps") #t))))
21123 (build-system python-build-system)
21124 (arguments
21125 `(#:phases
21126 (modify-phases %standard-phases
21127 (add-after 'unpack 'link-to-system-double-conversion
21128 (lambda* (#:key inputs #:allow-other-keys)
21129 (let ((d-c (assoc-ref inputs "double-conversion")))
21130 (substitute* "setup.py"
21131 (("./deps/double-conversion/double-conversion\"")
21132 (string-append d-c "/include/double-conversion\""))
21133 (("-lstdc++" stdc)
21134 (string-append "-L" d-c "/lib\","
21135 " \"-ldouble-conversion\","
21136 " \"" stdc)))
21137 #t)))
21138 (replace 'check
21139 (lambda* (#:key inputs outputs #:allow-other-keys)
21140 (add-installed-pythonpath inputs outputs)
21141 (invoke "pytest"))))))
21142 (native-inputs
21143 `(("double-conversion" ,double-conversion)
21144 ("python-setuptools-scm" ,python-setuptools-scm)
21145 ("python-pytest" ,python-pytest)))
21146 (home-page "https://github.com/ultrajson/ultrajson")
21147 (synopsis "Ultra fast JSON encoder and decoder for Python")
21148 (description
21149 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
21150 bindings for Python 3.")
21151 (license license:bsd-3)))
21152
21153 (define-public python-iocapture
21154 ;; The latest release is more than a year older than this commit.
21155 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
21156 (revision "1"))
21157 (package
21158 (name "python-iocapture")
21159 (version "0.1.2")
21160 (source
21161 (origin
21162 (method git-fetch)
21163 (uri (git-reference
21164 (url "https://github.com/oinume/iocapture")
21165 (commit commit)))
21166 (file-name (git-file-name name version))
21167 (sha256
21168 (base32
21169 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
21170 (build-system python-build-system)
21171 (arguments
21172 `(#:phases
21173 (modify-phases %standard-phases
21174 (delete 'check)
21175 (add-after 'install 'check
21176 (lambda* (#:key inputs outputs #:allow-other-keys)
21177 (add-installed-pythonpath inputs outputs)
21178 (invoke "py.test" "-v" "tests")
21179 #t)))))
21180 (propagated-inputs
21181 `(("python-flexmock" ,python-flexmock)
21182 ("python-pytest" ,python-pytest)
21183 ("python-pytest-cov" ,python-pytest-cov)
21184 ("python-six" ,python-six)))
21185 (home-page "https://github.com/oinume/iocapture")
21186 (synopsis "Python capturing tool for stdout and stderr")
21187 (description
21188 "This package helps you to capture the standard out (stdout) and the
21189 standard error channel (stderr) in your program.")
21190 (license license:expat))))
21191
21192 (define-public python-argh
21193 ;; There are 21 commits since the latest release containing important
21194 ;; improvements.
21195 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
21196 (revision "1"))
21197 (package
21198 (name "python-argh")
21199 (version (git-version "0.26.2" revision commit))
21200 (source
21201 (origin
21202 (method git-fetch)
21203 (uri (git-reference
21204 (url "https://github.com/neithere/argh")
21205 (commit commit)))
21206 (file-name (git-file-name name version))
21207 (sha256
21208 (base32
21209 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
21210 (build-system python-build-system)
21211 (propagated-inputs
21212 `(("python-iocapture" ,python-iocapture)
21213 ("python-mock" ,python-mock)
21214 ("python-pytest" ,python-pytest)
21215 ("python-pytest-cov" ,python-pytest-cov)
21216 ("python-pytest-xdist" ,python-pytest-xdist)
21217 ("python-tox" ,python-tox)))
21218 (home-page "https://github.com/neithere/argh/")
21219 (synopsis "Argparse wrapper with natural syntax")
21220 (description
21221 "python-argh is a small library that provides several layers of
21222 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
21223 always possible to declare a command with the highest possible (and least
21224 flexible) layer and then tune the behaviour with any of the lower layers
21225 including the native API of @code{python-argparse}.")
21226 (license license:lgpl3+))))
21227
21228 (define-public python-ppft
21229 (package
21230 (name "python-ppft")
21231 (version "1.6.6.1")
21232 (source
21233 (origin
21234 (method url-fetch)
21235 (uri (pypi-uri "ppft" version))
21236 (sha256
21237 (base32
21238 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
21239 (build-system python-build-system)
21240 (arguments '(#:tests? #f)) ; there are none
21241 (propagated-inputs
21242 `(("python-six" ,python-six)))
21243 (home-page "https://pypi.org/project/ppft/")
21244 (synopsis "Fork of Parallel Python")
21245 (description
21246 "This package is a fork of Parallel Python. The Parallel Python
21247 module (@code{pp}) provides an easy and efficient way to create
21248 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
21249 computers and clusters. It features cross-platform portability and dynamic
21250 load balancing.")
21251 (license license:bsd-3)))
21252
21253 (define-public python-pox
21254 (package
21255 (name "python-pox")
21256 (version "0.2.7")
21257 (source
21258 (origin
21259 (method url-fetch)
21260 (uri (pypi-uri "pox" version))
21261 (sha256
21262 (base32
21263 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
21264 (build-system python-build-system)
21265 (arguments
21266 `(#:phases
21267 (modify-phases %standard-phases
21268 (replace 'check
21269 (lambda _
21270 (mkdir-p "/tmp/guix")
21271 (setenv "SHELL" "bash")
21272 (setenv "USERNAME" "guix")
21273 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
21274 (invoke "py.test" "-vv")
21275 #t)))))
21276 (native-inputs
21277 `(("python-pytest" ,python-pytest)
21278 ("which" ,which)))
21279 (home-page "https://pypi.org/project/pox/")
21280 (synopsis "Python utilities for file system exploration and automated builds")
21281 (description
21282 "Pox provides a collection of utilities for navigating and manipulating
21283 file systems. This module is designed to facilitate some of the low-level
21284 operating system interactions that are useful when exploring a file system on a
21285 remote host. Pox provides Python equivalents of several shell commands such
21286 as @command{which} and @command{find}. These commands allow automated
21287 discovery of what has been installed on an operating system, and where the
21288 essential tools are located.")
21289 (license license:bsd-3)))
21290
21291 (define-public python-pathos
21292 (package
21293 (name "python-pathos")
21294 (version "0.2.5")
21295 (source
21296 (origin
21297 (method url-fetch)
21298 (uri (pypi-uri "pathos" version))
21299 (sha256
21300 (base32
21301 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
21302 (build-system python-build-system)
21303 (arguments
21304 '(#:phases
21305 (modify-phases %standard-phases
21306 (replace 'check
21307 (lambda _
21308 (setenv "PYTHONPATH"
21309 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
21310 (invoke "python" "./tests/__main__.py"))))))
21311 (propagated-inputs
21312 `(("python-dill" ,python-dill)
21313 ("python-multiprocess" ,python-multiprocess)
21314 ("python-pox" ,python-pox)
21315 ("python-ppft" ,python-ppft)))
21316 (native-inputs
21317 `(("python-pytest" ,python-pytest)))
21318 (home-page "https://pypi.org/project/pathos/")
21319 (synopsis
21320 "Parallel graph management and execution in heterogeneous computing")
21321 (description
21322 "Python-pathos is a framework for heterogeneous computing. It provides a
21323 consistent high-level interface for configuring and launching parallel
21324 computations across heterogeneous resources. Python-pathos provides configurable
21325 launchers for parallel and distributed computing, where each launcher contains
21326 the syntactic logic to configure and launch jobs in an execution environment.")
21327 (license license:bsd-3)))
21328
21329 (define-public python-flit
21330 (package
21331 (name "python-flit")
21332 (version "3.0.0")
21333 (source
21334 (origin
21335 (method url-fetch)
21336 (uri (pypi-uri "flit" version))
21337 (sha256
21338 (base32
21339 "14q8qa48bli2mniznc8b54qkwvhbik4kw99y01fi5gzzl620zzml"))))
21340 (build-system python-build-system)
21341 (arguments
21342 `(#:tests? #f)) ; XXX: Check requires network access.
21343 (home-page "https://flit.readthedocs.io/")
21344 (synopsis
21345 "Simple packaging tool for simple packages")
21346 (description
21347 "Flit is a simple way to put Python packages and modules on PyPI. Flit
21348 packages a single importable module or package at a time, using the import
21349 name as the name on PyPI. All subpackages and data files within a package
21350 are included automatically.")
21351 (license license:bsd-3)))
21352
21353 (define-public python-pathtools
21354 (package
21355 (name "python-pathtools")
21356 (version "0.1.2")
21357 (source
21358 (origin
21359 (method url-fetch)
21360 (uri (pypi-uri "pathtools" version))
21361 (sha256
21362 (base32
21363 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
21364 (build-system python-build-system)
21365 (home-page
21366 "https://github.com/gorakhargosh/pathtools")
21367 (synopsis "Path utilities for Python")
21368 (description "Pattern matching and various utilities for file systems
21369 paths.")
21370 (license license:expat)))
21371
21372 (define-public python-fastentrypoints
21373 (package
21374 (name "python-fastentrypoints")
21375 (version "0.12")
21376 (source
21377 (origin
21378 (method url-fetch)
21379 (uri (pypi-uri "fastentrypoints" version))
21380 (sha256
21381 (base32
21382 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
21383 (build-system python-build-system)
21384 (home-page
21385 "https://github.com/ninjaaron/fast-entry_points")
21386 (synopsis
21387 "Makes entry_points specified in setup.py load more quickly")
21388 (description
21389 "Using entry_points in your setup.py makes scripts that start really
21390 slowly because it imports pkg_resources. This package allows such setup
21391 scripts to load entry points more quickly.")
21392 (license license:bsd-3)))
21393
21394 (define-public python-funcparserlib
21395 (package
21396 (name "python-funcparserlib")
21397 (version "0.3.6")
21398 (source
21399 (origin
21400 (method url-fetch)
21401 (uri (pypi-uri "funcparserlib" version))
21402 (sha256
21403 (base32
21404 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
21405 (native-inputs
21406 `(("python-tox" ,python-tox)))
21407 (arguments
21408 `(#:phases
21409 (modify-phases %standard-phases
21410 (replace 'check
21411 (lambda _
21412 (invoke "tox"))))))
21413 (build-system python-build-system)
21414 (home-page
21415 "https://github.com/vlasovskikh/funcparserlib")
21416 (synopsis
21417 "Recursive descent parsing library based on functional combinators")
21418 (description
21419 "This package is a recursive descent parsing library for Python based on
21420 functional combinators. Parser combinators are just higher-order functions
21421 that take parsers as their arguments and return them as result values.")
21422 (license license:expat)))
21423
21424 (define-public python-speg
21425 (package
21426 (name "python-speg")
21427 (version "0.3")
21428 (source
21429 (origin
21430 (method url-fetch)
21431 (uri (pypi-uri "speg" version ".zip"))
21432 (sha256
21433 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
21434 (arguments
21435 `(#:tests? #f)) ;FIXME: tests fail, not sure why
21436 (native-inputs
21437 `(("unzip" ,unzip)))
21438 (build-system python-build-system)
21439 (home-page "https://github.com/avakar/speg")
21440 (synopsis "PEG-based parser interpreter with memoization")
21441 (description "This package is a PEG-based parser and interpreter with
21442 memoization.")
21443 (license license:expat)))
21444
21445 (define-public python-cson
21446 (package
21447 (name "python-cson")
21448 (version "0.8")
21449 (source
21450 (origin
21451 (method url-fetch)
21452 (uri (pypi-uri "cson" version))
21453 (sha256
21454 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
21455 (build-system python-build-system)
21456 (propagated-inputs
21457 `(("python-speg" ,python-speg)))
21458 (home-page "https://github.com/avakar/pycson")
21459 (synopsis "Parser for Coffeescript Object Notation (CSON)")
21460 (description "This package is a parser for Coffeescript Object
21461 Notation (CSON).")
21462 (license license:expat)))
21463
21464 (define-public python-asynctest
21465 (package
21466 (name "python-asynctest")
21467 (version "0.13.0")
21468 (source
21469 (origin
21470 (method url-fetch)
21471 (uri (pypi-uri "asynctest" version))
21472 (sha256
21473 (base32
21474 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
21475 (build-system python-build-system)
21476 (arguments
21477 '(#:phases
21478 (modify-phases %standard-phases
21479 (replace 'check
21480 (lambda _
21481 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
21482 (add-after 'unpack 'disable-tests
21483 (lambda* _
21484 ;; XXX: 7 tests fail out of 220. Disable them for now.
21485 (substitute* (list "test/test_selector.py"
21486 "test/test_mock.py")
21487 (("def test_events_watched_outside_test_are_ignored")
21488 "@unittest.skip('disabled by guix')
21489 def test_events_watched_outside_test_are_ignored")
21490 (("def test_awaited_from_autospec_mock.*" line)
21491 (string-append line " return True\n"))
21492 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
21493 (string-append line " return True\n"))
21494 (("def test_patch_coroutine_with_multiple_scopes.*" line)
21495 (string-append line " return True\n"))
21496 (("def test_multiple_patches_on_coroutine.*" line)
21497 (string-append line " return True\n"))
21498 (("def test_patch_coroutine_only_when_running.*" line)
21499 (string-append line " return True\n")))
21500 #t)))))
21501 (home-page "https://github.com/Martiusweb/asynctest")
21502 (synopsis "Extension of unittest for testing asyncio libraries")
21503 (description
21504 "The package asynctest is built on top of the standard unittest module
21505 and cuts down boilerplate code when testing libraries for asyncio.")
21506 (license license:asl2.0)))
21507
21508 (define-public python-aionotify
21509 (package
21510 (name "python-aionotify")
21511 (version "0.2.0")
21512 (source
21513 (origin
21514 ;; Source tarball on PyPi lacks tests
21515 (method git-fetch)
21516 (uri (git-reference
21517 (url "https://github.com/rbarrois/aionotify")
21518 (commit (string-append "v" version))))
21519 (file-name (git-file-name name version))
21520 (sha256
21521 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
21522 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
21523 (build-system python-build-system)
21524 (home-page "https://github.com/rbarrois/aionotify")
21525 (synopsis "Asyncio-powered inotify library")
21526 (description
21527 "@code{aionotify} is a simple, asyncio-based inotify library.")
21528 (license license:bsd-3)))
21529
21530 (define-public python-forbiddenfruit
21531 (package
21532 (name "python-forbiddenfruit")
21533 (version "0.1.3")
21534 (source
21535 (origin
21536 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21537 (method git-fetch)
21538 (uri (git-reference
21539 (url "https://github.com/clarete/forbiddenfruit")
21540 (commit version)))
21541 (file-name (git-file-name name version))
21542 (sha256
21543 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21544 (build-system python-build-system)
21545 (arguments
21546 '(#:phases
21547 (modify-phases %standard-phases
21548 (replace 'check
21549 (lambda _
21550 (invoke "make" "SKIP_DEPS=1"))))))
21551 (native-inputs
21552 `(("python-nose" ,python-nose)
21553 ("python-coverage" ,python-coverage)))
21554 (home-page "https://github.com/clarete/forbiddenfruit")
21555 (synopsis "Patch python built-in objects")
21556 (description "This project allows Python code to extend built-in types.")
21557 (license (list license:gpl3+ license:expat))))
21558
21559 (define-public python-k5test
21560 (package
21561 (name "python-k5test")
21562 (version "0.9.2")
21563 (source
21564 (origin
21565 (method url-fetch)
21566 (uri (pypi-uri "k5test" version))
21567 (sha256
21568 (base32
21569 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21570 (build-system python-build-system)
21571 (propagated-inputs
21572 `(("python-six" ,python-six)
21573 ;; `which`, `kadmin.local` binaries called inside library
21574 ("which" ,which)
21575 ("mit-krb5" ,mit-krb5)))
21576 (native-inputs `(("mit-krb5" ,mit-krb5)))
21577 (arguments
21578 '(#:phases
21579 (modify-phases %standard-phases
21580 (add-after 'unpack 'patch-paths
21581 (lambda* _
21582 (substitute* "k5test/realm.py"
21583 (("'kadmin_local'") "'kadmin.local'")))))))
21584 (home-page "https://github.com/pythongssapi/k5test")
21585 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21586 (description
21587 "@code{k5test} is a library for setting up self-contained Kerberos 5
21588 environments, and running Python unit tests inside those environments. It is
21589 based on the file of the same name found alongside the MIT Kerberos 5 unit
21590 tests.")
21591 (license license:isc)))
21592
21593 (define-public python-gssapi
21594 (package
21595 (name "python-gssapi")
21596 (version "1.6.12")
21597 (source
21598 (origin
21599 (method url-fetch)
21600 (uri (pypi-uri "gssapi" version))
21601 (sha256
21602 (base32
21603 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
21604 (build-system python-build-system)
21605 (propagated-inputs
21606 `(("python-decorator" ,python-decorator)
21607 ("python-six" ,python-six)))
21608 (inputs
21609 `(("mit-krb5" ,mit-krb5)))
21610 ;; for tests
21611 (native-inputs
21612 `(("python-parameterized" ,python-parameterized)
21613 ("python-k5test" ,python-k5test)
21614 ("python-nose" ,python-nose)))
21615 (home-page "https://github.com/pythongssapi/python-gssapi")
21616 (synopsis "Python GSSAPI Wrapper")
21617 (description
21618 "Python-GSSAPI provides both low-level and high level wrappers around the
21619 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
21620 also be usable with other GSSAPI mechanisms.")
21621 (license license:isc)))
21622
21623 (define-public python-check-manifest
21624 (package
21625 (name "python-check-manifest")
21626 (version "0.37")
21627 (source
21628 (origin
21629 (method url-fetch)
21630 (uri (pypi-uri "check-manifest" version))
21631 (sha256
21632 (base32
21633 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
21634 (build-system python-build-system)
21635 (native-inputs
21636 `(("python-mock" ,python-mock)
21637 ("git" ,git)))
21638 (home-page "https://github.com/mgedmin/check-manifest")
21639 (synopsis "Check MANIFEST.in in a Python source package for completeness")
21640 (description "Python package can include a MANIFEST.in file to help with
21641 sending package files to the Python Package Index. This package checks that
21642 file to ensure it completely and accurately describes your project.")
21643 (license license:expat)))
21644
21645 (define-public python-android-stringslib
21646 (package
21647 (name "python-android-stringslib")
21648 (version "0.1.2")
21649 (source
21650 (origin
21651 (method git-fetch)
21652 (uri (git-reference
21653 (url "https://framagit.org/tyreunom/python-android-strings-lib")
21654 (commit (string-append "v" version))))
21655 (file-name (git-file-name name version))
21656 (sha256
21657 (base32
21658 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
21659 (build-system python-build-system)
21660 (arguments
21661 `(#:tests? #f))
21662 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
21663 (synopsis "Android strings.xml support")
21664 (description "Android Strings Lib provides support for android's strings.xml
21665 files. These files are used to translate strings in android apps.")
21666 (license license:expat)))
21667
21668 (define-public python-watchdog
21669 (package
21670 (name "python-watchdog")
21671 (version "0.9.0")
21672 (source
21673 (origin
21674 (method url-fetch)
21675 (uri (pypi-uri "watchdog" version))
21676 (sha256
21677 (base32
21678 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
21679 (build-system python-build-system)
21680 (arguments
21681 `(#:phases
21682 (modify-phases %standard-phases
21683 (add-before 'check 'remove-failing
21684 (lambda _
21685 (delete-file "tests/test_inotify_buffer.py")
21686 (delete-file "tests/test_snapshot_diff.py")
21687 #t)))))
21688 (propagated-inputs
21689 `(("python-argh" ,python-argh)
21690 ("python-pathtools" ,python-pathtools)
21691 ("python-pyyaml" ,python-pyyaml)))
21692 (native-inputs
21693 `(("python-pytest-cov" ,python-pytest-cov)
21694 ("python-pytest-timeout" ,python-pytest-timeout)))
21695 (home-page "https://github.com/gorakhargosh/watchdog")
21696 (synopsis "File system events monitoring")
21697 (description "This package provides a way to monitor file system events
21698 such as a file modification and trigger an action. This is similar to inotify,
21699 but portable.")
21700 (license license:asl2.0)))
21701
21702 (define-public python-watchgod
21703 (package
21704 (name "python-watchgod")
21705 (version "0.6")
21706 (source
21707 (origin
21708 ;; There are no tests in the PyPI tarball.
21709 (method git-fetch)
21710 (uri (git-reference
21711 (url "https://github.com/samuelcolvin/watchgod")
21712 (commit (string-append "v" version))))
21713 (file-name (git-file-name name version))
21714 (sha256
21715 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
21716 (build-system python-build-system)
21717 (arguments
21718 `(#:phases
21719 (modify-phases %standard-phases
21720 (replace 'check
21721 (lambda _
21722 (invoke "pytest" "-vv"))))))
21723 (native-inputs
21724 `(("python-coverage" ,python-coverage)
21725 ("python-docutils" ,python-docutils)
21726 ("python-flake8" ,python-flake8)
21727 ("python-isort" ,python-isort)
21728 ("python-pycodestyle" ,python-pycodestyle)
21729 ("python-pyflakes" ,python-pyflakes)
21730 ("python-pygments" ,python-pygments)
21731 ("python-pytest" ,python-pytest)
21732 ("python-pytest-cov" ,python-pytest-cov)
21733 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
21734 ("python-pytest-mock" ,python-pytest-mock)
21735 ("python-pytest-sugar" ,python-pytest-sugar)
21736 ("python-pytest-toolbox" ,python-pytest-toolbox)))
21737 (home-page "https://github.com/samuelcolvin/watchgod")
21738 (synopsis "Simple, modern file watching and code reload in Python")
21739 (description
21740 "Simple, modern file watching and code reload in Python inspired by
21741 @code{watchdog}. Among the differences are a unified approach for each
21742 operating systems and an elegant approach to concurrency using threading.")
21743 (license license:expat)))
21744
21745 (define-public python-wget
21746 (package
21747 (name "python-wget")
21748 (version "3.2")
21749 (source
21750 (origin
21751 (method url-fetch)
21752 (uri (pypi-uri "wget" version ".zip"))
21753 (sha256
21754 (base32
21755 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
21756 (build-system python-build-system)
21757 (native-inputs `(("unzip" ,unzip)))
21758 (home-page "https://bitbucket.org/techtonik/python-wget/")
21759 (synopsis "Pure Python download utility")
21760 (description "The python-wget library provides an API to download files
21761 with features similar to the @command{wget} utility.")
21762 (license license:unlicense)))
21763
21764 (define-public offlate
21765 (package
21766 (name "offlate")
21767 (version "0.5")
21768 (source
21769 (origin
21770 (method git-fetch)
21771 (uri (git-reference
21772 (url "https://framagit.org/tyreunom/offlate")
21773 (commit version)))
21774 (file-name (git-file-name name version))
21775 (sha256
21776 (base32
21777 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
21778 (build-system python-build-system)
21779 (arguments
21780 ;; No tests
21781 `(#:tests? #f))
21782 (propagated-inputs
21783 `(("python-android-stringslib" ,python-android-stringslib)
21784 ("python-dateutil" ,python-dateutil)
21785 ("python-gitlab" ,python-gitlab)
21786 ("python-lxml" ,python-lxml)
21787 ("python-polib" ,python-polib)
21788 ("python-pyenchant" ,python-pyenchant)
21789 ("python-pygit2" ,python-pygit2)
21790 ("python-pygithub" ,python-pygithub)
21791 ("python-pyqt" ,python-pyqt)
21792 ("python-requests" ,python-requests)
21793 ("python-ruamel.yaml" ,python-ruamel.yaml)
21794 ("python-translation-finder" ,python-translation-finder)
21795 ("python-watchdog" ,python-watchdog)))
21796 (native-inputs
21797 `(("qttools" ,qttools)))
21798 (home-page "https://framagit.org/tyreunom/offlate")
21799 (synopsis "Offline translation interface for online translation tools")
21800 (description "Offlate offers a unified interface for different translation
21801 file formats, as well as many different online translation platforms. You can
21802 use it to get work from online platforms, specialized such as the Translation
21803 Project, or not such a gitlab instance when your upstream doesn't use any
21804 dedicated platform. The tool proposes a unified interface for any format and
21805 an upload option to send your work back to the platform.")
21806 (license license:gpl3+)))
21807
21808 (define-public python-titlecase
21809 (package
21810 (name "python-titlecase")
21811 (version "0.12.0")
21812 (source
21813 (origin
21814 (method url-fetch)
21815 (uri (pypi-uri "titlecase" version))
21816 (sha256
21817 (base32
21818 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
21819 (build-system python-build-system)
21820 (native-inputs
21821 `(("python-nose" ,python-nose)))
21822 (home-page "https://github.com/ppannuto/python-titlecase")
21823 (synopsis "Capitalize strings similar to book titles")
21824 (description
21825 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
21826 It capitalizes (predominantly English) strings in a way that is similar to
21827 book titles, using the New York Times Manual of Style to leave certain words
21828 lowercase.")
21829 (license license:expat)))
21830
21831 (define-public python-pypng
21832 (package
21833 (name "python-pypng")
21834 (version "0.0.20")
21835 (source
21836 (origin
21837 (method url-fetch)
21838 (uri (pypi-uri "pypng" version))
21839 (sha256
21840 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
21841 (build-system python-build-system)
21842 (home-page "https://github.com/drj11/pypng")
21843 (synopsis "Pure Python PNG image encoder/decoder")
21844 (description
21845 "The PyPNG module implements support for PNG images. It reads and writes
21846 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
21847 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
21848 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
21849 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
21850 A number of optional chunks can be specified (when writing) and
21851 understood (when reading): tRNS, bKGD, gAMA.
21852
21853 PyPNG is not a high level toolkit for image processing (like PIL) and does not
21854 aim at being a replacement or competitor. Its strength lies in fine-grained
21855 extensive support of PNG features. It can also read and write Netpbm PAM
21856 files, with a focus on its use as an intermediate format for implementing
21857 custom PNG processing.")
21858 (license license:expat)))
21859
21860 (define-public python-fuzzywuzzy
21861 (package
21862 (name "python-fuzzywuzzy")
21863 (version "0.18.0")
21864 (source
21865 (origin
21866 (method url-fetch)
21867 (uri (pypi-uri "fuzzywuzzy" version))
21868 (sha256
21869 (base32
21870 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
21871 (build-system python-build-system)
21872 (native-inputs
21873 `(("python-hypothesis" ,python-hypothesis)
21874 ("python-pycodestyle" ,python-pycodestyle)
21875 ("python-pytest" ,python-pytest)))
21876 (propagated-inputs
21877 `(("python-levenshtein" ,python-levenshtein)))
21878 (home-page "https://github.com/seatgeek/fuzzywuzzy")
21879 (synopsis "Fuzzy string matching in Python")
21880 (description "Approximate string matching using
21881 @emph{Levenshtein Distance} to calculate the differences between
21882 sequences.")
21883 (license license:gpl2)))
21884
21885 (define-public python2-fuzzywuzzy
21886 (package-with-python2 python-fuzzywuzzy))
21887
21888 (define-public python-block-tracing
21889 (package
21890 (name "python-block-tracing")
21891 (version "1.0.1")
21892 (source
21893 (origin
21894 (method url-fetch)
21895 (uri (pypi-uri "block_tracing" version))
21896 (sha256
21897 (base32
21898 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
21899 (build-system python-build-system)
21900 (arguments '(#:tests? #f)) ; no tests
21901 (home-page "https://github.com/rianhunter/block_tracing")
21902 (synopsis "Protect process memory")
21903 (description
21904 "@code{block_tracing} is a tiny Python library that can be used to
21905 prevent debuggers and other applications from inspecting the memory within
21906 your process.")
21907 (license license:expat)))
21908
21909 (define-public python-gcovr
21910 (package
21911 (name "python-gcovr")
21912 (version "4.2")
21913 (source
21914 (origin
21915 (method url-fetch)
21916 (uri (pypi-uri "gcovr" version))
21917 (sha256
21918 (base32
21919 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
21920 (build-system python-build-system)
21921 (propagated-inputs
21922 `(("python-lxml" ,python-lxml)
21923 ("python-jinja2" ,python-jinja2)))
21924 (home-page "https://gcovr.com/")
21925 (synopsis "Utility for generating code coverage results")
21926 (description
21927 "Gcovr provides a utility for managing the use of the GNU gcov
21928 utility and generating summarized code coverage results. It is inspired
21929 by the Python coverage.py package, which provides a similar utility for
21930 Python.")
21931 (license license:bsd-3)))
21932
21933 (define-public python-owslib
21934 (package
21935 (name "python-owslib")
21936 (version "0.19.2")
21937 (source
21938 (origin
21939 (method url-fetch)
21940 (uri (pypi-uri "OWSLib" version))
21941 (sha256
21942 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
21943 (build-system python-build-system)
21944 (arguments
21945 '(#:tests? #f)) ; TODO: package dependencies required for tests.
21946 (synopsis "Interface for Open Geospatial Consortium web service")
21947 (description
21948 "OWSLib is a Python package for client programming with Open Geospatial
21949 Consortium (OGC) web service (hence OWS) interface standards, and their related
21950 content models.")
21951 (home-page "https://geopython.github.io/OWSLib/")
21952 (license license:bsd-3)))
21953
21954 (define-public python-docusign-esign
21955 (package
21956 (name "python-docusign-esign")
21957 (version "3.1.0")
21958 (source (origin
21959 (method url-fetch)
21960 (uri (pypi-uri "docusign_esign" version))
21961 (sha256
21962 (base32
21963 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
21964 (build-system python-build-system)
21965 ;; Testing requires undocumented setup changes, and so testing is disabled here.
21966 (arguments `(#:tests? #f))
21967 (propagated-inputs
21968 `(("python-certifi" ,python-certifi)
21969 ("python-six" ,python-six)
21970 ("python-dateutil" ,python-dateutil)
21971 ("python-urllib3" ,python-urllib3)
21972 ("python-pyjwt" ,python-pyjwt)
21973 ("python-cryptography" ,python-cryptography)
21974 ("python-nose" ,python-nose)))
21975 (synopsis "DocuSign Python Client")
21976 (description "The Official DocuSign Python Client Library used to interact
21977 with the eSign REST API. Send, sign, and approve documents using this client.")
21978 (home-page "https://www.docusign.com/devcenter")
21979 (license license:expat)))
21980
21981 (define-public python-xattr
21982 (package
21983 (name "python-xattr")
21984 (version "0.9.7")
21985 (source
21986 (origin
21987 (method url-fetch)
21988 (uri (pypi-uri "xattr" version))
21989 (sha256
21990 (base32
21991 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
21992 (build-system python-build-system)
21993 (propagated-inputs
21994 `(("python-cffi" ,python-cffi)))
21995 (home-page "https://github.com/xattr/xattr")
21996 (synopsis
21997 "Python wrapper for extended file system attributes")
21998 (description "This package provides a Python wrapper for using extended
21999 file system attributes. Extended attributes extend the basic attributes of files
22000 and directories in the file system. They are stored as name:data pairs
22001 associated with file system objects (files, directories, symlinks, etc).")
22002 (license license:expat)))
22003
22004 (define-public python-json-logger
22005 (package
22006 (name "python-json-logger")
22007 (version "0.1.11")
22008 (source
22009 (origin
22010 (method url-fetch)
22011 (uri (pypi-uri "python-json-logger" version))
22012 (sha256
22013 (base32
22014 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
22015 (build-system python-build-system)
22016 (home-page
22017 "https://github.com/madzak/python-json-logger")
22018 (synopsis "JSON log formatter in Python")
22019 (description "This library allows standard Python logging to output log data
22020 as JSON objects. With JSON we can make our logs more readable by machines and
22021 we can stop writing custom parsers for syslog-type records.")
22022 (license license:bsd-3)))
22023
22024 (define-public python-daiquiri
22025 (package
22026 (name "python-daiquiri")
22027 (version "2.1.1")
22028 (source
22029 (origin
22030 (method url-fetch)
22031 (uri (pypi-uri "daiquiri" version))
22032 (sha256
22033 (base32
22034 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
22035 (build-system python-build-system)
22036 (propagated-inputs
22037 `(("python-json-logger" ,python-json-logger)))
22038 (native-inputs
22039 `(("python-mock" ,python-mock)
22040 ("python-pytest" ,python-pytest)
22041 ("python-setuptools-scm" ,python-setuptools-scm)
22042 ("python-six" ,python-six)))
22043 (home-page "https://github.com/jd/daiquiri")
22044 (synopsis
22045 "Library to configure Python logging easily")
22046 (description "The daiquiri library provides an easy way to configure
22047 logging in Python. It also provides some custom formatters and handlers.")
22048 (license license:asl2.0)))
22049
22050 (define-public python-pifpaf
22051 (package
22052 (name "python-pifpaf")
22053 (version "2.5.0")
22054 (source
22055 (origin
22056 (method url-fetch)
22057 (uri (pypi-uri "pifpaf" version))
22058 (sha256
22059 (base32
22060 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
22061 (build-system python-build-system)
22062 (arguments
22063 '(#:phases
22064 (modify-phases %standard-phases
22065 (replace 'check
22066 (lambda _
22067 (invoke "python" "setup.py" "testr" "--slowest"
22068 "--testr-args=until-failure"))))))
22069 (propagated-inputs
22070 `(("python-click" ,python-click)
22071 ("python-daiquiri" ,python-daiquiri)
22072 ("python-fixtures" ,python-fixtures)
22073 ("python-jinja2" ,python-jinja2)
22074 ("python-pbr" ,python-pbr)
22075 ("python-psutil" ,python-psutil)
22076 ("python-six" ,python-six)
22077 ("python-xattr" ,python-xattr)))
22078 (native-inputs
22079 `(("python-mock" ,python-mock)
22080 ("python-os-testr" ,python-os-testr)
22081 ("python-requests" ,python-requests)
22082 ("python-testrepository" ,python-testrepository)
22083 ("python-testtools" ,python-testtools)))
22084 (home-page "https://github.com/jd/pifpaf")
22085 (synopsis "Tools and fixtures to manage daemons for testing in Python")
22086 (description "Pifpaf is a suite of fixtures and a command-line tool that
22087 starts and stops daemons for a quick throw-away usage. This is typically
22088 useful when needing these daemons to run integration testing. It originally
22089 evolved from its precursor @code{overtest}.")
22090 (license license:asl2.0)))
22091
22092 (define-public python-pytest-check-links
22093 (package
22094 (name "python-pytest-check-links")
22095 (version "0.3.0")
22096 (source
22097 (origin
22098 (method url-fetch)
22099 ;; URI uses underscores
22100 (uri (pypi-uri "pytest_check_links" version))
22101 (sha256
22102 (base32
22103 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
22104 (build-system python-build-system)
22105 (propagated-inputs
22106 `(("python-docutils" ,python-docutils)
22107 ("python-html5lib" ,python-html5lib)
22108 ("python-nbconvert" ,python-nbconvert)
22109 ("python-nbformat" ,python-nbformat)
22110 ("python-pytest" ,python-pytest)
22111 ("python-six" ,python-six)))
22112 (native-inputs
22113 `(("python-pbr-minimal" ,python-pbr-minimal)))
22114 (home-page "https://github.com/minrk/pytest-check-links")
22115 (synopsis "Check links in files")
22116 (description "This package provides a pytest plugin that checks URLs for
22117 HTML-containing files.")
22118 (license license:bsd-3)))
22119
22120 (define-public python-json5
22121 (package
22122 (name "python-json5")
22123 (version "0.8.5")
22124 (source
22125 (origin
22126 ;; sample.json5 is missing from PyPi source tarball
22127 (method git-fetch)
22128 (uri (git-reference
22129 (url "https://github.com/dpranke/pyjson5")
22130 (commit (string-append "v" version))))
22131 (file-name (git-file-name name version))
22132 (sha256
22133 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
22134 (build-system python-build-system)
22135 (home-page "https://github.com/dpranke/pyjson5")
22136 (synopsis
22137 "Python implementation of the JSON5 data format")
22138 (description
22139 "JSON5 extends the JSON data interchange format to make it slightly more
22140 usable as a configuration language. This Python package implements parsing and
22141 dumping of JSON5 data structures.")
22142 (license license:asl2.0)))
22143
22144 (define-public python-frozendict
22145 (package
22146 (name "python-frozendict")
22147 (version "1.2")
22148 (source
22149 (origin
22150 (method url-fetch)
22151 (uri (pypi-uri "frozendict" version))
22152 (sha256
22153 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
22154 (build-system python-build-system)
22155 (home-page "https://github.com/slezica/python-frozendict")
22156 (synopsis "Simple immutable mapping for Python")
22157 (description
22158 "@dfn{frozendict} is an immutable wrapper around dictionaries that
22159 implements the complete mapping interface. It can be used as a drop-in
22160 replacement for dictionaries where immutability is desired.")
22161 (license license:expat)))
22162
22163 (define-public python-unpaddedbase64
22164 (package
22165 (name "python-unpaddedbase64")
22166 (version "1.1.0")
22167 (source
22168 (origin
22169 (method git-fetch)
22170 (uri (git-reference
22171 (url "https://github.com/matrix-org/python-unpaddedbase64")
22172 (commit (string-append "v" version))))
22173 (file-name (git-file-name name version))
22174 (sha256
22175 (base32
22176 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
22177 (build-system python-build-system)
22178 (home-page "https://pypi.org/project/unpaddedbase64/")
22179 (synopsis "Encode and decode Base64 without “=” padding")
22180 (description
22181 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
22182 using “=” characters. However this conveys no benefit so many protocols
22183 choose to use Base64 without the “=” padding.")
22184 (license license:asl2.0)))
22185
22186 (define-public python-py-cpuinfo
22187 (package
22188 (name "python-py-cpuinfo")
22189 (version "5.0.0")
22190 (source
22191 (origin
22192 (method url-fetch)
22193 (uri (pypi-uri "py-cpuinfo" version))
22194 (sha256
22195 (base32
22196 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
22197 (build-system python-build-system)
22198 (home-page "https://github.com/workhorsy/py-cpuinfo")
22199 (synopsis "Get CPU info with Python")
22200 (description
22201 "This Python module returns the CPU info by using the best sources of
22202 information for your operating system.")
22203 (license license:expat)))
22204
22205 (define-public python-canonicaljson
22206 (package
22207 (name "python-canonicaljson")
22208 (version "1.4.0")
22209 (source
22210 (origin
22211 (method url-fetch)
22212 (uri (pypi-uri "canonicaljson" version))
22213 (sha256
22214 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
22215 (build-system python-build-system)
22216 (propagated-inputs
22217 `(("python-six" ,python-six)
22218 ("python-frozendict" ,python-frozendict)
22219 ("python-simplejson" ,python-simplejson)))
22220 (home-page "https://github.com/matrix-org/python-canonicaljson")
22221 (synopsis "Canonical JSON")
22222 (description
22223 "Deterministically encode JSON.
22224
22225 @itemize
22226 @item Encodes objects and arrays as RFC 7159 JSON.
22227 @item Sorts object keys so that you get the same result each time.
22228 @item Has no insignificant whitespace to make the output as small as possible.
22229 @item Escapes only the characters that must be escaped, U+0000 to
22230 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
22231 @item Uses the shortest escape sequence for each escaped character.
22232 @item Encodes the JSON as UTF-8.
22233 @item Can encode frozendict immutable dictionaries.
22234 @end itemize")
22235 (license license:asl2.0)))
22236
22237 (define-public python-signedjson
22238 (package
22239 (name "python-signedjson")
22240 (version "1.1.1")
22241 (source
22242 (origin
22243 (method url-fetch)
22244 (uri (pypi-uri "signedjson" version))
22245 (sha256
22246 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
22247 (build-system python-build-system)
22248 (propagated-inputs
22249 `(("python-canonicaljson" ,python-canonicaljson)
22250 ("python-importlib-metadata" ,python-importlib-metadata)
22251 ("python-pynacl" ,python-pynacl)
22252 ("python-typing-extensions" ,python-typing-extensions)
22253 ("python-unpaddedbase64" ,python-unpaddedbase64)))
22254 (native-inputs
22255 `(("python-setuptools-scm" ,python-setuptools-scm)))
22256 (home-page "https://github.com/matrix-org/python-signedjson")
22257 (synopsis "Sign JSON objects with ED25519 signatures")
22258 (description
22259 "Sign JSON objects with ED25519 signatures.
22260
22261 @itemize
22262 @item More than one entity can sign the same object.
22263 @item Each entity can sign the object with more than one key making it easier to
22264 rotate keys
22265 @item ED25519 can be replaced with a different algorithm.
22266 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
22267 key.
22268 @end itemize")
22269 (license license:asl2.0)))
22270
22271 (define-public python-daemonize
22272 (package
22273 (name "python-daemonize")
22274 (version "2.5.0")
22275 (source
22276 (origin
22277 (method url-fetch)
22278 (uri (pypi-uri "daemonize" version))
22279 (sha256
22280 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
22281 (build-system python-build-system)
22282 (home-page "https://github.com/thesharp/daemonize")
22283 (synopsis "Library for writing system daemons in Python")
22284 (description "Daemonize is a library for writing system daemons in Python.")
22285 (license license:expat)))
22286
22287 (define-public python-pymacaroons
22288 (package
22289 (name "python-pymacaroons")
22290 (version "0.13.0")
22291 (source
22292 (origin
22293 (method url-fetch)
22294 (uri (pypi-uri "pymacaroons" version))
22295 (sha256
22296 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
22297 (build-system python-build-system)
22298 (propagated-inputs
22299 `(("python-six" ,python-six)
22300 ("python-pynacl" ,python-pynacl)))
22301 (home-page "https://github.com/ecordell/pymacaroons")
22302 (synopsis "Python Macaroon Library")
22303 (description
22304 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
22305 tokens, macaroons embed caveats that define specific authorization
22306 requirements for the target service, the service that issued the root macaroon
22307 and which is capable of verifying the integrity of macaroons it receives.
22308
22309 Macaroons allow for delegation and attenuation of authorization. They are
22310 simple and fast to verify, and decouple authorization policy from the
22311 enforcement of that policy.")
22312 (license license:expat)))
22313
22314 (define-public python-ldap3
22315 (package
22316 (name "python-ldap3")
22317 (version "2.7")
22318 (home-page "https://github.com/cannatag/ldap3")
22319 (source
22320 (origin
22321 (method git-fetch)
22322 (uri (git-reference (url home-page)
22323 (commit (string-append "v" version))))
22324 (file-name (git-file-name name version))
22325 (sha256
22326 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
22327 (build-system python-build-system)
22328 (arguments
22329 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
22330 #:phases (modify-phases %standard-phases
22331 (replace 'check
22332 (lambda* (#:key tests? #:allow-other-keys)
22333 (when tests?
22334 (invoke "nosetests" "-s" "test"))
22335 #t)))))
22336 (native-inputs
22337 `(("python-nose" ,python-nose)))
22338 (propagated-inputs
22339 `(("python-gssapi" ,python-gssapi)
22340 ("python-pyasn1" ,python-pyasn1)))
22341 (synopsis "Python LDAP client")
22342 (description
22343 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
22344 library.")
22345 (license license:lgpl3+)))
22346
22347 (define-public python-boltons
22348 (package
22349 (name "python-boltons")
22350 (version "20.0.0")
22351 (source
22352 (origin
22353 (method url-fetch)
22354 (uri (pypi-uri "boltons" version))
22355 (sha256
22356 (base32
22357 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
22358 (build-system python-build-system)
22359 (home-page "https://github.com/mahmoud/boltons")
22360 (synopsis "Extensions to the Python standard library")
22361 (description
22362 "Boltons is a set of over 230 pure-Python utilities in the same spirit
22363 as — and yet conspicuously missing from — the standard library, including:
22364
22365 @itemize
22366 @item Atomic file saving, bolted on with fileutils
22367 @item A highly-optimized OrderedMultiDict, in dictutils
22368 @item Two types of PriorityQueue, in queueutils
22369 @item Chunked and windowed iteration, in iterutils
22370 @item Recursive data structure iteration and merging, with iterutils.remap
22371 @item Exponential backoff functionality, including jitter, through
22372 iterutils.backoff
22373 @item A full-featured TracebackInfo type, for representing stack traces, in
22374 tbutils
22375 @end itemize")
22376 (license license:bsd-3)))
22377
22378 (define-public python-eliot
22379 (package
22380 (name "python-eliot")
22381 (version "1.12.0")
22382 (source
22383 (origin
22384 (method url-fetch)
22385 (uri (pypi-uri "eliot" version))
22386 (sha256
22387 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
22388 (build-system python-build-system)
22389 (arguments
22390 `(#:phases
22391 (modify-phases %standard-phases
22392 (add-after 'unpack 'remove-journald-support
22393 (lambda _
22394 (for-each delete-file
22395 '("eliot/tests/test_journald.py"
22396 "eliot/journald.py"))
22397 #t))
22398 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
22399 ;; remove command-line tool's tests. TODO eliot-prettyprint should
22400 ;; be installed and these tests should pass.
22401 (lambda _
22402 (delete-file "eliot/tests/test_prettyprint.py")
22403 #t)))))
22404 (propagated-inputs
22405 `(("python-boltons" ,python-boltons)
22406 ("python-pyrsistent" ,python-pyrsistent)
22407 ("python-six" ,python-six)
22408 ("python-zope-interface" ,python-zope-interface)))
22409 (native-inputs
22410 `(("python-black" ,python-black)
22411 ("python-coverage" ,python-coverage)
22412 ("python-dask" ,python-dask)
22413 ("python-flake8" ,python-flake8)
22414 ("python-hypothesis" ,python-hypothesis)
22415 ("python-pytest" ,python-pytest)
22416 ("python-setuptools" ,python-setuptools)
22417 ("python-sphinx" ,python-sphinx)
22418 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22419 ("python-testtools" ,python-testtools)
22420 ("python-twine" ,python-twine)
22421 ("python-twisted" ,python-twisted)))
22422 (home-page "https://github.com/itamarst/eliot/")
22423 (synopsis "Eliot: the logging system that tells you why it happened")
22424 (description
22425 "@dfn{eliot} is a Python logging system that outputs causal chains of
22426 actions: actions can spawn other actions, and eventually they either succeed
22427 or fail. The resulting logs tell you the story of what your software did: what
22428 happened, and what caused it.")
22429 (license license:asl2.0)))
22430
22431 (define-public python-pem
22432 (package
22433 (name "python-pem")
22434 (version "20.1.0")
22435 (source
22436 (origin
22437 (method url-fetch)
22438 (uri (pypi-uri "pem" version))
22439 (sha256
22440 (base32
22441 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
22442 (build-system python-build-system)
22443 (native-inputs
22444 `(("python-certifi" ,python-certifi)
22445 ("python-coverage" ,python-coverage)
22446 ("python-pretend" ,python-pretend)
22447 ("python-pyopenssl" ,python-pyopenssl)
22448 ("python-pytest" ,python-pytest)
22449 ("python-sphinx" ,python-sphinx)
22450 ("python-twisted" ,python-twisted)))
22451 (home-page "https://pem.readthedocs.io/")
22452 (synopsis "Easy PEM file parsing in Python")
22453 (description
22454 "This package provides a Python module for parsing and splitting PEM files.")
22455 (license license:expat)))
22456
22457 (define-public python-txsni
22458 ;; We need a few commits on top of 0.1.9 for compatibility with newer
22459 ;; Python and OpenSSL.
22460 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
22461 (revision "0"))
22462 (package
22463 (name "python-txsni")
22464 (version (git-version "0.1.9" revision commit))
22465 (home-page "https://github.com/glyph/txsni")
22466 (source
22467 (origin
22468 (method git-fetch)
22469 (uri (git-reference (url home-page) (commit commit)))
22470 (file-name (git-file-name name version))
22471 (sha256
22472 (base32
22473 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
22474 (build-system python-build-system)
22475 (propagated-inputs
22476 `(("python-pyopenssl" ,python-pyopenssl)
22477 ("python-service-identity" ,python-service-identity)
22478 ("python-twisted" ,python-twisted)))
22479 (synopsis "Run TLS servers with Twisted")
22480 (description
22481 "This package provides an easy-to-use SNI endpoint for use
22482 with the Twisted web framework.")
22483 (license license:expat))))
22484
22485 (define-public python-txacme
22486 (package
22487 (name "python-txacme")
22488 (version "0.9.2")
22489 (source
22490 (origin
22491 (method url-fetch)
22492 (uri (pypi-uri "txacme" version))
22493 (sha256
22494 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22495 (build-system python-build-system)
22496 (propagated-inputs
22497 `(("python-acme" ,python-acme)
22498 ("python-attrs" ,python-attrs)
22499 ("python-eliot" ,python-eliot)
22500 ("python-josepy" ,python-josepy)
22501 ("python-pem" ,python-pem)
22502 ("python-treq" ,python-treq)
22503 ("python-twisted" ,python-twisted)
22504 ("python-txsni" ,python-txsni)))
22505 (native-inputs
22506 `(("python-fixtures" ,python-fixtures)
22507 ("python-hypothesis" ,python-hypothesis)
22508 ("python-mock" ,python-mock)
22509 ("python-service-identity"
22510 ,python-service-identity)
22511 ("python-testrepository" ,python-testrepository)
22512 ("python-testscenarios" ,python-testscenarios)
22513 ("python-testtools" ,python-testtools)))
22514 (home-page "https://github.com/twisted/txacme")
22515 (synopsis "Twisted implexmentation of the ACME protocol")
22516 (description
22517 "ACME is Automatic Certificate Management Environment, a protocol that
22518 allows clients and certificate authorities to automate verification and
22519 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22520 Certificate Authority.
22521
22522 txacme is an implementation of the protocol for Twisted, the event-driven
22523 networking engine for Python.")
22524 (license license:expat)))
22525
22526 (define-public python-pysaml2
22527 (package
22528 (name "python-pysaml2")
22529 (version "6.5.1")
22530 (source
22531 (origin
22532 (method url-fetch)
22533 (uri (pypi-uri "pysaml2" version))
22534 (sha256
22535 (base32
22536 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
22537 (build-system python-build-system)
22538 (propagated-inputs
22539 `(("python-cryptography" ,python-cryptography)
22540 ("python-dateutil" ,python-dateutil)
22541 ("python-defusedxml" ,python-defusedxml)
22542 ("python-importlib-resources"
22543 ,python-importlib-resources)
22544 ("python-pyopenssl" ,python-pyopenssl)
22545 ("python-pytz" ,python-pytz)
22546 ("python-requests" ,python-requests)
22547 ("python-six" ,python-six)
22548 ("python-xmlschema" ,python-xmlschema)))
22549 (home-page "https://idpy.org")
22550 (synopsis "Python implementation of SAML Version 2 Standard")
22551 (description
22552 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22553 It contains all necessary pieces for building a SAML2 service provider or
22554 an identity provider. The distribution contains examples of both.
22555
22556 This package was originally written to work in a WSGI environment, but
22557 there are extensions that allow you to use it with other frameworks.")
22558 (license license:asl2.0)))
22559
22560 (define-public python-click-plugins
22561 (package
22562 (name "python-click-plugins")
22563 (version "1.1.1")
22564 (source
22565 (origin
22566 (method url-fetch)
22567 (uri (pypi-uri "click-plugins" version))
22568 (sha256
22569 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22570 (build-system python-build-system)
22571 (native-inputs
22572 `(("python-pytest" ,python-pytest)))
22573 (propagated-inputs
22574 `(("python-click" ,python-click)))
22575 (synopsis "Extension for Click to register external CLI commands")
22576 (description "This package provides n extension module for Click to
22577 register external CLI commands via setuptools entry-points.")
22578 (home-page "https://github.com/click-contrib/click-plugins")
22579 (license license:bsd-3)))
22580
22581 (define-public python-diceware
22582 (package
22583 (name "python-diceware")
22584 (version "0.9.6")
22585 (source
22586 (origin
22587 (method url-fetch)
22588 (uri (pypi-uri "diceware" version))
22589 (sha256
22590 (base32
22591 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22592 (build-system python-build-system)
22593 (native-inputs
22594 `(("python-coverage" ,python-coverage)
22595 ("python-pytest" ,python-pytest)
22596 ("python-pytest-runner" ,python-pytest-runner)))
22597 (home-page "https://github.com/ulif/diceware/")
22598 (synopsis "Generates memorable passphrases")
22599 (description "This package generates passphrases by concatenating words
22600 randomly picked from wordlists. It supports several sources of
22601 randomness (including real life dice) and different wordlists (including
22602 cryptographically signed ones).")
22603 (license license:gpl3+)))
22604
22605 (define-public python-dictdiffer
22606 (package
22607 (name "python-dictdiffer")
22608 (version "0.8.1")
22609 (source (origin
22610 (method url-fetch)
22611 (uri (pypi-uri "dictdiffer" version))
22612 (sha256
22613 (base32
22614 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
22615 (build-system python-build-system)
22616 (native-inputs
22617 `(("python-check-manifest" ,python-check-manifest)
22618 ("python-coverage" ,python-coverage)
22619 ("python-isort" ,python-isort)
22620 ("python-mock" ,python-mock)
22621 ("python-pydoctstyle" ,python-pydocstyle)
22622 ("python-pytest-cache" ,python-pytest-cache)
22623 ("python-pytest-cov" ,python-pytest-cov)
22624 ("python-pytest-pep8" ,python-pytest-pep8)
22625 ("python-pytest-runner" ,python-pytest-runner)
22626 ("python-pytest" ,python-pytest)
22627 ("python-setuptools-scm" ,python-setuptools-scm)
22628 ("python-tox" ,python-tox)))
22629 (home-page "https://github.com/inveniosoftware/dictdiffer")
22630 (synopsis "Diff and patch Python dictionary objects")
22631 (description
22632 "Dictdiffer is a Python module that helps you to diff and patch
22633 dictionaries.")
22634 (license license:expat)))
22635
22636 (define-public pyzo
22637 (package
22638 (name "pyzo")
22639 (version "4.11.2")
22640 (source
22641 (origin
22642 (method url-fetch)
22643 (uri (pypi-uri "pyzo" version))
22644 (sha256
22645 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
22646 (build-system python-build-system)
22647 (arguments
22648 `(#:phases
22649 (modify-phases %standard-phases
22650 (add-before 'check 'fix-home-directory
22651 (lambda _
22652 ;; Tests fail with "Permission denied: '/homeless-shelter'".
22653 (setenv "HOME" "/tmp")
22654 #t)))
22655 ;; Tests fail with "Uncaught Python exception: python: undefined
22656 ;; symbol: objc_getClass".
22657 #:tests? #f))
22658 (propagated-inputs
22659 `(("python-pyqt" ,python-pyqt)))
22660 (home-page "https://pyzo.org")
22661 (synopsis
22662 "Python IDE for scientific computing")
22663 (description
22664 "Pyzo is a Python IDE focused on interactivity and introspection,
22665 which makes it very suitable for scientific computing. Its practical
22666 design is aimed at simplicity and efficiency.
22667
22668 It consists of two main components, the editor and the shell, and uses
22669 a set of pluggable tools to help the programmer in various ways. Some
22670 example tools are source structure, project manager, interactive help,
22671 workspace...")
22672 (license license:bsd-2)))
22673
22674 (define-public python-osc
22675 (package
22676 (name "python-osc")
22677 (version "1.7.4")
22678 (source
22679 (origin
22680 (method url-fetch)
22681 (uri (pypi-uri "python-osc" version))
22682 (sha256
22683 (base32
22684 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
22685 (build-system python-build-system)
22686 (home-page "https://github.com/attwad/python-osc")
22687 (synopsis "Open Sound Control server and client implementations")
22688 (description
22689 "@code{python-osc} is a pure Python library with no external
22690 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
22691 Open Sound Control 1.0} specification.")
22692 (license license:unlicense)))
22693
22694 (define-public python-voluptuous
22695 (package
22696 (name "python-voluptuous")
22697 (version "0.11.7")
22698 (source
22699 (origin
22700 (method url-fetch)
22701 (uri (pypi-uri "voluptuous" version))
22702 (sha256
22703 (base32
22704 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
22705 (build-system python-build-system)
22706 (native-inputs
22707 `(("python-nose" ,python-nose)))
22708 (home-page "https://github.com/alecthomas/voluptuous")
22709 (synopsis "Python data validation library")
22710 (description
22711 "Voluptuous is a Python data validation library. It is primarily
22712 intended for validating data coming into Python as JSON, YAML, etc.")
22713 (license license:bsd-3)))
22714
22715 (define-public python-cmd2
22716 (package
22717 (name "python-cmd2")
22718 (version "1.0.2")
22719 (source
22720 (origin
22721 (method url-fetch)
22722 (uri (pypi-uri "cmd2" version))
22723 (sha256
22724 (base32
22725 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
22726 (build-system python-build-system)
22727 (propagated-inputs
22728 `(("python-attrs" ,python-attrs)
22729 ("python-colorama" ,python-colorama)
22730 ("python-pyperclip" ,python-pyperclip)
22731 ("python-wcwidth" ,python-wcwidth)))
22732 (native-inputs
22733 `(("python-codecov" ,python-codecov)
22734 ("python-coverage" ,python-coverage)
22735 ("python-doc8" ,python-doc8)
22736 ("python-flake8" ,python-flake8)
22737 ("python-invoke" ,python-invoke)
22738 ("python-mock" ,python-mock)
22739 ("python-pytest" ,python-pytest)
22740 ("python-pytest-cov" ,python-pytest-cov)
22741 ("python-pytest-mock" ,python-pytest-mock)
22742 ("python-setuptools-scm" ,python-setuptools-scm)
22743 ("python-sphinx" ,python-sphinx)
22744 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
22745 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22746 ("python-tox" ,python-tox)
22747 ("python-twine" ,python-twine)
22748 ("which" ,which)))
22749 (home-page "https://github.com/python-cmd2/cmd2")
22750 (synopsis "Tool for building interactive command line applications")
22751 (description
22752 "Cmd2 is a tool for building interactive command line applications in
22753 Python. Its goal is to make it quick and easy for developers to build
22754 feature-rich and user-friendly interactive command line applications. It
22755 provides a simple API which is an extension of Python's built-in @code{cmd}
22756 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
22757 make your life easier and eliminates much of the boilerplate code which would
22758 be necessary when using @code{cmd}.")
22759 (license license:expat)))
22760
22761 (define-public python-pytidylib
22762 (package
22763 (name "python-pytidylib")
22764 (version "0.3.2")
22765 (source (origin
22766 (method url-fetch)
22767 (uri (pypi-uri "pytidylib" version))
22768 (sha256
22769 (base32
22770 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
22771 (build-system python-build-system)
22772 (arguments
22773 '(#:phases
22774 (modify-phases %standard-phases
22775 (add-before 'build 'qualify-libtidy
22776 (lambda* (#:key inputs #:allow-other-keys)
22777 (let ((libtidy (string-append (assoc-ref inputs "tidy")
22778 "/lib/libtidy.so")))
22779 (substitute* "tidylib/tidy.py"
22780 (("ctypes\\.util\\.find_library\\('tidy'\\)")
22781 (format #f "'~a'" libtidy)))
22782 #t))))))
22783 (inputs `(("tidy" ,tidy)))
22784 (home-page "https://github.com/countergram/pytidylib")
22785 (synopsis "Python wrapper for HTML Tidy library")
22786 (description
22787 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
22788 allows you, from Python code, to “fix” invalid (X)HTML markup.")
22789 (license license:expat)))
22790
22791 (define-public python2-pytidylib
22792 (package-with-python2 python-pytidylib))
22793
22794 (define-public python-mujson
22795 (package
22796 (name "python-mujson")
22797 (version "1.4")
22798 (source
22799 (origin
22800 (method url-fetch)
22801 (uri (pypi-uri "mujson" version))
22802 (sha256
22803 (base32
22804 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
22805 (build-system python-build-system)
22806 (home-page "https://github.com/mattgiles/mujson")
22807 (synopsis "Use the fastest JSON functions available at import time")
22808 (description "This package selects the fastest JSON functions available
22809 at import time.")
22810 (license license:expat)))
22811
22812 (define-public python-bashlex
22813 (package
22814 (name "python-bashlex")
22815 (version "0.14")
22816 (source
22817 (origin
22818 (method url-fetch)
22819 (uri (pypi-uri "bashlex" version))
22820 (sha256
22821 (base32
22822 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
22823 (build-system python-build-system)
22824 (arguments
22825 `(#:phases
22826 (modify-phases %standard-phases
22827 (add-before 'build 'pregenerate-yacc-tables
22828 (lambda _
22829 ;; parser.py caches tables, which attempts to write to site lib
22830 ;; see https://github.com/idank/bashlex/issues/51
22831 (invoke "python" "-c" "import bashlex"))))))
22832 (home-page
22833 "https://github.com/idank/bashlex")
22834 (synopsis "Python parser for bash")
22835 (description "@code{bashlex} is a Python port of the parser used
22836 internally by GNU bash.
22837
22838 For the most part it's transliterated from C, the major differences are:
22839
22840 @itemize
22841 @item it does not execute anything
22842 @item it is reentrant
22843 @item it generates a complete AST
22844 @end itemize
22845 ")
22846 (license license:gpl3+)))
22847
22848 (define-public python-jinxed
22849 (package
22850 (name "python-jinxed")
22851 (version "1.0.0")
22852 (source
22853 (origin
22854 (method url-fetch)
22855 (uri (pypi-uri "jinxed" version))
22856 (sha256
22857 (base32
22858 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
22859 (build-system python-build-system)
22860 (arguments
22861 '(#:phases
22862 (modify-phases %standard-phases
22863 (add-before 'check 'set-environment-variables
22864 (lambda* (#:key inputs #:allow-other-keys)
22865 (let ((ncurses (assoc-ref inputs "ncurses")))
22866 (setenv "TERM" "LINUX")
22867 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
22868 #t))))
22869 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
22870 (native-inputs
22871 `(("ncurses" ,ncurses)))
22872 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
22873 (synopsis "Jinxed Terminal Library")
22874 (description
22875 "Jinxed is an implementation of a subset of the Python curses library.")
22876 (license license:mpl2.0)))
22877
22878 (define-public python-blessed
22879 (package
22880 (name "python-blessed")
22881 (version "1.17.8")
22882 (source
22883 (origin
22884 (method url-fetch)
22885 (uri (pypi-uri "blessed" version))
22886 (sha256
22887 (base32
22888 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
22889 (modules '((guix build utils)))
22890 (snippet
22891 '(begin
22892 ;; Don't get hung up on Windows test failures.
22893 (delete-file "blessed/win_terminal.py") #t))))
22894 (build-system python-build-system)
22895 (propagated-inputs
22896 `(("python-jinxed" ,python-jinxed)
22897 ("python-six" ,python-six)
22898 ("python-wcwidth" ,python-wcwidth)))
22899 (native-inputs
22900 `(("python-mock" ,python-mock)
22901 ("python-pytest" ,python-pytest)))
22902 (home-page "https://github.com/jquast/blessed")
22903 (synopsis "Wrapper around terminal capabilities")
22904 (description
22905 "Blessed is a thin, practical wrapper around terminal styling, screen
22906 positioning, and keyboard input.")
22907 (license license:expat)))
22908
22909 (define-public python-readme-renderer
22910 (package
22911 (name "python-readme-renderer")
22912 (version "26.0")
22913 (source
22914 (origin
22915 (method url-fetch)
22916 (uri (pypi-uri "readme_renderer" version))
22917 (sha256
22918 (base32
22919 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
22920 (build-system python-build-system)
22921 (propagated-inputs
22922 `(("python-bleach" ,python-bleach)
22923 ("python-docutils" ,python-docutils)
22924 ("python-pygments" ,python-pygments)
22925 ("python-six" ,python-six)))
22926 (native-inputs
22927 `(("python-mock" ,python-mock)
22928 ("python-pytest" ,python-pytest)))
22929 (home-page "https://github.com/pypa/readme_renderer")
22930 (synopsis "Render README files in Warehouse")
22931 (description
22932 "Readme Renderer is a library that will safely render arbitrary README
22933 files into HTML. It is designed to be used in Warehouse to render the
22934 @code{long_description} for packages. It can handle Markdown, reStructuredText,
22935 and plain text.")
22936 (license license:asl2.0)))
22937
22938 (define-public python-lazr-delegates
22939 (package
22940 (name "python-lazr-delegates")
22941 (version "2.0.4")
22942 (source
22943 (origin
22944 (method url-fetch)
22945 (uri (pypi-uri "lazr.delegates" version))
22946 (sha256
22947 (base32
22948 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
22949 (build-system python-build-system)
22950 (arguments
22951 '(#:phases
22952 (modify-phases %standard-phases
22953 (replace 'check
22954 (lambda _
22955 (invoke "python" "setup.py" "nosetests"))))))
22956 (native-inputs
22957 `(("python-nose" ,python-nose)))
22958 (propagated-inputs
22959 `(("python-zope-interface" ,python-zope-interface)))
22960 (home-page "https://launchpad.net/lazr.delegates")
22961 (synopsis "Easily write objects that delegate behavior")
22962 (description
22963 "The @code{lazr.delegates} package makes it easy to write objects that
22964 delegate behavior to another object. The new object adds some property or
22965 behavior on to the other object, while still providing the underlying interface,
22966 and delegating behavior.")
22967 (license license:lgpl3)))
22968
22969 (define-public python-lazr-config
22970 (package
22971 (name "python-lazr-config")
22972 (version "2.2.2")
22973 (source
22974 (origin
22975 (method url-fetch)
22976 (uri (pypi-uri "lazr.config" version))
22977 (sha256
22978 (base32
22979 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
22980 (build-system python-build-system)
22981 (arguments
22982 '(#:phases
22983 (modify-phases %standard-phases
22984 (replace 'check
22985 (lambda _
22986 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
22987 (native-inputs
22988 `(("python-nose" ,python-nose)))
22989 (propagated-inputs
22990 `(("python-lazr-delegates" ,python-lazr-delegates)
22991 ("python-zope-interface" ,python-zope-interface)))
22992 (home-page "https://launchpad.net/lazr.config")
22993 (synopsis "Create configuration schemas and process and validate configurations")
22994 (description
22995 "The LAZR config system is typically used to manage process configuration.
22996 Process configuration is for saying how things change when we run systems on
22997 different machines, or under different circumstances. This system uses ini-like
22998 file format of section, keys, and values. The config file supports inheritance
22999 to minimize duplication of information across files. The format supports schema
23000 validation.")
23001 (license license:lgpl3)))
23002
23003 (define-public python-flufl-bounce
23004 (package
23005 (name "python-flufl-bounce")
23006 (version "3.0.1")
23007 (source
23008 (origin
23009 (method url-fetch)
23010 (uri (pypi-uri "flufl.bounce" version))
23011 (sha256
23012 (base32
23013 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
23014 (build-system python-build-system)
23015 (propagated-inputs
23016 `(("python-atpublic" ,python-atpublic)
23017 ("python-zope-interface" ,python-zope-interface)))
23018 (native-inputs
23019 `(("python-nose2" ,python-nose2)))
23020 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
23021 (synopsis "Email bounce detectors")
23022 (description "The @code{flufl.bounce} library provides a set of heuristics
23023 and an API for detecting the original bouncing email addresses from a bounce
23024 message. Many formats found in the wild are supported, as are VERP and
23025 RFC 3464.")
23026 (license (list license:asl2.0
23027 license:lgpl3)))) ; only for setup_headers.py
23028
23029 (define-public python-flufl-i18n
23030 (package
23031 (name "python-flufl-i18n")
23032 (version "3.0")
23033 (source
23034 (origin
23035 (method url-fetch)
23036 (uri (pypi-uri "flufl.i18n" version))
23037 (sha256
23038 (base32
23039 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
23040 (build-system python-build-system)
23041 (propagated-inputs
23042 `(("python-atpublic" ,python-atpublic)))
23043 (home-page "https://flufli18n.readthedocs.io")
23044 (synopsis "API for Python internationalization")
23045 (description
23046 "This package provides a high-level, convenient API for managing
23047 internationalization/translation contexts in Python applications. There is a
23048 simple API for single-context applications, such as command line scripts which
23049 only need to translate into one language during the entire course of their
23050 execution. There is a more flexible, but still convenient API for multi-context
23051 applications, such as servers, which may need to switch language contexts for
23052 different tasks.")
23053 (license license:asl2.0)))
23054
23055 (define-public python-flufl-lock
23056 (package
23057 (name "python-flufl-lock")
23058 (version "4.0")
23059 (source
23060 (origin
23061 (method url-fetch)
23062 (uri (pypi-uri "flufl.lock" version))
23063 (sha256
23064 (base32
23065 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
23066 (build-system python-build-system)
23067 (propagated-inputs
23068 `(("python-atpublic" ,python-atpublic)
23069 ("python-psutil" ,python-psutil)))
23070 (home-page "https://flufllock.readthedocs.io")
23071 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
23072 (description
23073 "The @dfn{flufl.lock} package provides NFS-safe file locking with
23074 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
23075 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
23076 and have a maximum lifetime built-in.")
23077 (license (list license:asl2.0
23078 license:lgpl3)))) ; only for setup_helpers.py
23079
23080 (define-public python-flufl-testing
23081 (package
23082 (name "python-flufl-testing")
23083 (version "0.8")
23084 (source
23085 (origin
23086 (method url-fetch)
23087 (uri (pypi-uri "flufl.testing" version))
23088 (sha256
23089 (base32
23090 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
23091 (build-system python-build-system)
23092 (native-inputs
23093 `(("python-nose2" ,python-nose2)))
23094 (home-page "https://gitlab.com/warsaw/flufl.testing")
23095 (synopsis "Collection of test tool plugins")
23096 (description
23097 "This package contains a small collection of test tool plugins for
23098 @code{nose2} and @code{flake8}.")
23099 (license license:asl2.0)))
23100
23101 (define-public python-devtools
23102 (package
23103 (name "python-devtools")
23104 (version "0.6")
23105 (source
23106 (origin
23107 (method git-fetch)
23108 (uri (git-reference
23109 (url "https://github.com/samuelcolvin/python-devtools")
23110 (commit (string-append "v" version))))
23111 (file-name (git-file-name name version))
23112 (sha256
23113 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
23114 (build-system python-build-system)
23115 (native-inputs
23116 `(("python-pytest" ,python-pytest)
23117 ("python-pytest-mock" ,python-pytest-mock)))
23118 (propagated-inputs
23119 `(("python-pygments" ,python-pygments)))
23120 (arguments
23121 `(#:phases (modify-phases %standard-phases
23122 (replace 'check
23123 (lambda _
23124 (invoke "pytest")
23125 #t)))))
23126 (home-page "https://github.com/samuelcolvin/python-devtools")
23127 (synopsis "Debug command and development tools")
23128 (description
23129 "This package provides a debug print command and other development tools.
23130 It adds a simple and readable way to print stuff during development.")
23131 (license license:expat)))
23132
23133 (define-public python-dateparser
23134 (package
23135 (name "python-dateparser")
23136 (version "0.7.6")
23137 (source
23138 (origin
23139 (method url-fetch)
23140 (uri (pypi-uri "dateparser" version))
23141 (sha256
23142 (base32
23143 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
23144 (build-system python-build-system)
23145 (propagated-inputs
23146 `(("python-dateutil" ,python-dateutil)
23147 ("python-pytz" ,python-pytz)
23148 ("python-regex" ,python-regex)
23149 ("python-ruamel.yaml" ,python-ruamel.yaml)
23150 ("python-tzlocal" ,python-tzlocal)))
23151 (native-inputs
23152 `(("python-mock" ,python-mock)
23153 ("python-parameterized" ,python-parameterized)
23154 ("tzdata" ,tzdata-for-tests)))
23155 (arguments
23156 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
23157 #:tests? #f
23158 #:phases
23159 (modify-phases %standard-phases
23160 (add-before 'check 'set-check-environment
23161 (lambda* (#:key inputs #:allow-other-keys)
23162 (setenv "TZ" "UTC")
23163 (setenv "TZDIR"
23164 (string-append (assoc-ref inputs "tzdata")
23165 "/share/zoneinfo"))
23166 #t)))))
23167 (home-page "https://github.com/scrapinghub/dateparser")
23168 (synopsis
23169 "Date parsing library designed to parse dates from HTML pages")
23170 (description
23171 "@code{python-dateparser} provides modules to easily parse localized
23172 dates in almost any string formats commonly found on web pages.")
23173 (license license:bsd-3)))
23174
23175 (define-public python-dparse
23176 (package
23177 (name "python-dparse")
23178 (version "0.5.1")
23179 (source
23180 (origin
23181 (method url-fetch)
23182 (uri (pypi-uri "dparse" version))
23183 (sha256
23184 (base32
23185 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
23186 (build-system python-build-system)
23187 (native-inputs
23188 `(("python-pytest" ,python-pytest)))
23189 (propagated-inputs
23190 `(("python-packaging" ,python-packaging)
23191 ("python-pyyaml" ,python-pyyaml)
23192 ("python-toml" ,python-toml)))
23193 (home-page "https://github.com/pyupio/dparse")
23194 (synopsis "Parser for Python dependency files")
23195 (description "This package provides a parser for Python dependency files.")
23196 (license license:expat)))
23197
23198 (define-public python-dpath
23199 (package
23200 (name "python-dpath")
23201 (version "2.0.1")
23202 (source
23203 (origin
23204 (method url-fetch)
23205 (uri (pypi-uri "dpath" version))
23206 (sha256
23207 (base32
23208 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
23209 (build-system python-build-system)
23210 (native-inputs
23211 `(("python-hypothesis" ,python-hypothesis)
23212 ("python-mock" ,python-mock)
23213 ("python-nose" ,python-nose)))
23214 (arguments
23215 '(#:phases
23216 (modify-phases %standard-phases
23217 (replace 'check
23218 (lambda* (#:key inputs outputs #:allow-other-keys)
23219 (add-installed-pythonpath inputs outputs)
23220 ;; This invokation is taken from tox.ini.
23221 (invoke "nosetests" "-d" "-v" "tests/"))))))
23222 (home-page "https://github.com/akesterson/dpath-python")
23223 (synopsis "Filesystem-like pathing and searching for dictionaries")
23224 (description
23225 "@code{python-dpath} is a library for accessing and searching
23226 dictionaries via /slashed/paths ala xpath.
23227
23228 Basically it lets you glob over a dictionary as if it were a filesystem. It
23229 allows you to specify globs (ala the bash eglob syntax, through some advanced
23230 fnmatch.fnmatch magic) to access dictionary elements, and provides some
23231 facility for filtering those results.")
23232 (license license:expat)))
23233
23234 (define-public python-safety
23235 (package
23236 (name "python-safety")
23237 (version "1.9.0")
23238 (source
23239 (origin
23240 (method url-fetch)
23241 (uri (pypi-uri "safety" version))
23242 (sha256
23243 (base32
23244 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
23245 (build-system python-build-system)
23246 (arguments
23247 `(#:phases
23248 (modify-phases %standard-phases
23249 (add-after 'unpack 'disable-tests
23250 (lambda _
23251 (substitute* "tests/test_safety.py"
23252 ;; requires network
23253 (("def test_check_live") "def _test_check_live"))
23254 #t)))))
23255 (propagated-inputs
23256 `(("python-click" ,python-click)
23257 ("python-dparse" ,python-dparse)
23258 ("python-packaging" ,python-packaging)
23259 ("python-requests" ,python-requests)))
23260 (home-page "https://github.com/pyupio/safety")
23261 (synopsis "Check installed dependencies for known vulnerabilities")
23262 (description "Safety checks installed dependencies for known vulnerabilities.
23263 By default it uses the open Python vulnerability database Safety DB.")
23264 (license license:expat)))
23265
23266 (define-public python-pypandoc
23267 (package
23268 (name "python-pypandoc")
23269 (version "1.5")
23270 (source
23271 (origin
23272 (method url-fetch)
23273 (uri (pypi-uri "pypandoc" version))
23274 (sha256
23275 (base32
23276 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
23277 (build-system python-build-system)
23278 (inputs
23279 `(("pandoc" ,pandoc)
23280 ("pandoc-citeproc" ,pandoc-citeproc)))
23281 (propagated-inputs
23282 `(("wheel" ,python-wheel)))
23283 (native-inputs
23284 `(("texlive" ,(texlive-union (list texlive-amsfonts
23285 texlive-fonts-ec
23286 texlive-latex-hyperref
23287 texlive-latex-oberdiek
23288 texlive-lm
23289 texlive-xcolor)))))
23290 (arguments
23291 `(#:phases
23292 (modify-phases %standard-phases
23293 (add-before 'check 'disable-tests
23294 (lambda _
23295 ;; Disable test requiring network access
23296 (substitute* "tests.py"
23297 (("test_basic_conversion_from_http_url")
23298 "skip_test_basic_conversion_from_http_url"))
23299 ;; Needed by texlive-union to generate fonts
23300 (setenv "HOME" "/tmp")
23301 #t)))))
23302 (home-page "https://github.com/bebraw/pypandoc")
23303 (synopsis "Python wrapper for pandoc")
23304 (description "pypandoc is a thin Python wrapper around pandoc
23305 and pandoc-citeproc.")
23306 (license license:expat)))
23307
23308 (define-public python-rnc2rng
23309 (package
23310 (name "python-rnc2rng")
23311 (version "2.6.4")
23312 (source
23313 (origin
23314 (method url-fetch)
23315 (uri (pypi-uri "rnc2rng" version))
23316 (sha256
23317 (base32
23318 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
23319 (build-system python-build-system)
23320 (propagated-inputs
23321 `(("python-rply" ,python-rply)))
23322 (arguments
23323 `(#:phases (modify-phases %standard-phases
23324 (replace 'check
23325 (lambda _
23326 (invoke "python" "test.py"))))))
23327 (home-page "https://github.com/djc/rnc2rng")
23328 (synopsis "Convert RELAX NG Compact to regular syntax")
23329 (description
23330 "This package provides the @command{rnc2rng} command-line tool as well as
23331 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
23332 equivalent schemata in the XML-based default RELAX NG syntax.")
23333 (license license:expat)))
23334
23335 (define-public python-telethon
23336 (package
23337 (name "python-telethon")
23338 (version "1.17.5")
23339 (source
23340 (origin
23341 (method git-fetch)
23342 (uri (git-reference
23343 (url "https://github.com/LonamiWebs/Telethon")
23344 (commit (string-append "v" version))))
23345 (file-name (git-file-name name version))
23346 (sha256
23347 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
23348 (build-system python-build-system)
23349 (arguments
23350 '(#:phases
23351 (modify-phases %standard-phases
23352 (replace 'check
23353 (lambda* (#:key tests? #:allow-other-keys)
23354 (when tests?
23355 (invoke "py.test" "-v"))
23356 #t)))))
23357 (propagated-inputs
23358 `(("python-rsa" ,python-rsa)
23359 ("python-pyaes" ,python-pyaes)))
23360 (native-inputs
23361 `(("python-pytest" ,python-pytest)
23362 ("python-pytest-asyncio" ,python-pytest-asyncio)
23363 ("python-pytest-trio" ,python-pytest-trio)))
23364 (home-page "https://docs.telethon.dev")
23365 (synopsis "Full-featured Telegram client library for Python 3")
23366 (description "This library is designed to make it easy to write Python
23367 programs that can interact with Telegram.")
23368 (license license:expat)))
23369
23370 (define-public python-citeproc-py
23371 (package
23372 (name "python-citeproc-py")
23373 (version "0.5.1")
23374 (source
23375 (origin
23376 (method url-fetch)
23377 (uri (pypi-uri "citeproc-py" version))
23378 (sha256
23379 (base32
23380 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
23381 (build-system python-build-system)
23382 (propagated-inputs
23383 `(("python-lxml" ,python-lxml)
23384 ("python-rnc2rng" ,python-rnc2rng)))
23385 (home-page
23386 "https://github.com/brechtm/citeproc-py")
23387 (synopsis "Citations and bibliography formatter")
23388 (description
23389 "Citeproc-py is a CSL processor for Python. It aims to implement the
23390 CSL 1.0.1 specification. citeproc-py can output styled citations and
23391 bibliographies in a number of different output formats. Currently supported
23392 are plain text, reStructuredText and HTML.")
23393 (license license:bsd-2)))
23394
23395 (define-public python-inform
23396 (package
23397 (name "python-inform")
23398 (version "1.23.0")
23399 (source
23400 (origin
23401 (method url-fetch)
23402 (uri (pypi-uri "inform" version))
23403 (sha256
23404 (base32
23405 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
23406 (build-system python-build-system)
23407 (arguments
23408 `(#:tests? #f)) ; PyPI tarball lacks tests
23409 (native-inputs
23410 `(("python-hypothesis" ,python-hypothesis)
23411 ("python-pytest-cov" ,python-pytest-cov)
23412 ("python-pytest-runner" ,python-pytest-runner)))
23413 (propagated-inputs
23414 `(("python-arrow" ,python-arrow)
23415 ("python-six" ,python-six)))
23416 (home-page "https://inform.readthedocs.io")
23417 (synopsis "Print & logging utilities for communicating with user")
23418 (description
23419 "Inform is designed to display messages from programs that are typically run from
23420 a console. It provides a collection of ‘print’ functions that allow you to simply and
23421 cleanly print different types of messages.")
23422 (license license:gpl3+)))
23423
23424 (define-public python-nestedtext
23425 (package
23426 (name "python-nestedtext")
23427 (version "1.0.0")
23428 (source
23429 (origin
23430 (method url-fetch)
23431 (uri (pypi-uri "nestedtext" version))
23432 (sha256
23433 (base32
23434 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
23435 (build-system python-build-system)
23436 (arguments
23437 `(#:tests? #f)) ; PyPI tarball lacks tests
23438 (propagated-inputs
23439 `(("python-inform" ,python-inform)))
23440 (home-page "https://nestedtext.org")
23441 (synopsis "Human readable and writable data interchange format")
23442 (description
23443 "NestedText is a file format for holding data that is to be entered, edited, or
23444 viewed by people. It allows data to be organized into a nested collection of
23445 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
23446 without the complexity and risk of YAML and without the syntatic clutter of JSON.
23447 NestedText is both simple and natural. Only a small number of concepts and rules must
23448 be kept in mind when creating it. It is easily created, modified, or viewed with
23449 a text editor and easily understood and used by both programmers and non-programmers.")
23450 (license license:expat))) ; MIT license
23451
23452 (define-public python-parallel
23453 (package
23454 (name "python-parallel")
23455 (version "1.6.4.4")
23456 (source
23457 (origin
23458 (method url-fetch)
23459 (uri (string-append
23460 "https://www.parallelpython.com/downloads/pp/pp-"
23461 version ".zip"))
23462 (sha256
23463 (base32
23464 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
23465 (native-inputs
23466 `(("unzip" ,unzip)))
23467 (build-system python-build-system)
23468 (arguments '(#:tests? #f)) ; No test suite.
23469 (home-page "https://www.parallelpython.com")
23470 (synopsis "Parallel and distributed programming for Python")
23471 (description "Parallel Python module (PP) provides an easy and efficient
23472 way to create parallel-enabled applications for SMP computers and clusters.
23473 PP module features cross-platform portability and dynamic load balancing.
23474 Thus applications written with PP will parallelize efficiently even on
23475 heterogeneous and multi-platform clusters (including clusters running other
23476 applications with variable CPU loads).")
23477 (license license:bsd-3)))
23478
23479 (define-public python2-parallel
23480 (package-with-python2 python-parallel))
23481
23482 (define-public python-djvulibre
23483 (package
23484 (name "python-djvulibre")
23485 (version "0.8.5")
23486 (source
23487 (origin
23488 (method url-fetch)
23489 (uri (pypi-uri "python-djvulibre" version))
23490 (sha256
23491 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
23492 (build-system python-build-system)
23493 (native-inputs
23494 `(("ghostscript" ,ghostscript)
23495 ("pkg-config" ,pkg-config)
23496 ("python-nose" ,python-nose)))
23497 (inputs
23498 `(("djvulibre" ,djvulibre)
23499 ("python-cython" ,python-cython)))
23500 (arguments
23501 `(#:phases
23502 (modify-phases %standard-phases
23503 (add-after 'unpack 'fix-tests
23504 (lambda _
23505 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23506 ;; doesn't make sense on GNU/Linux.
23507 (delete-file "djvu/dllpath.py")
23508 #t)))))
23509 (synopsis "Python bindings for DjVuLibre")
23510 (description "This is a set of Python bindings for the DjVuLibre library.")
23511 (home-page "https://jwilk.net/software/python-djvulibre")
23512 (license license:gpl2)))
23513
23514 (define-public python2-djvulibre
23515 (package-with-python2 python-djvulibre))
23516
23517 (define-public python-versioneer
23518 (package
23519 (name "python-versioneer")
23520 (version "0.19")
23521 (source
23522 (origin
23523 (method url-fetch)
23524 (uri (pypi-uri "versioneer" version))
23525 (sha256
23526 (base32
23527 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
23528 (build-system python-build-system)
23529 (home-page
23530 "https://github.com/python-versioneer/python-versioneer")
23531 (synopsis
23532 "Version-string management for VCS-controlled trees")
23533 (description
23534 "@code{versioneer} is a tool for managing a recorded version number in
23535 distutils-based python projects. The goal is to remove the tedious and
23536 error-prone \"update the embedded version string\" step from your release
23537 process.")
23538 (license license:public-domain)))
23539
23540 (define-public python2-gamera
23541 (package
23542 (name "python2-gamera")
23543 (version "3.4.4")
23544 (source
23545 (origin
23546 (method url-fetch)
23547 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
23548 "gamera-" version ".tar.gz"))
23549 (sha256
23550 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
23551 (modules '((guix build utils)))
23552 (snippet
23553 '(begin
23554 ;; Remove bundled libraries.
23555 (for-each delete-file-recursively
23556 '("src/libpng-1.2.5"
23557 "src/libtiff"
23558 "src/zlib-1.2.8"))))))
23559 (build-system python-build-system)
23560 (inputs
23561 `(("libpng" ,libpng)
23562 ("libtiff" ,libtiff)
23563 ("python2-wxpython" ,python2-wxpython)
23564 ("zlib" ,zlib)))
23565 (arguments
23566 `(#:python ,python-2))
23567 (synopsis "Framework for building document analysis applications")
23568 (description
23569 "Gamera is a toolkit for building document image recognition systems.")
23570 (home-page "https://gamera.informatik.hsnr.de/")
23571 (license license:gpl2+)))
23572
23573 (define-public python-contextvars
23574 (package
23575 (name "python-contextvars")
23576 (version "2.4")
23577 (source
23578 (origin
23579 (method url-fetch)
23580 (uri (pypi-uri "contextvars" version))
23581 (sha256
23582 (base32
23583 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
23584 (build-system python-build-system)
23585 (propagated-inputs
23586 `(("python-immutables" ,python-immutables)))
23587 (home-page
23588 "https://github.com/MagicStack/contextvars")
23589 (synopsis "PEP 567 Backport")
23590 (description "This package implements a backport of Python 3.7
23591 @code{contextvars} module (see PEP 567) for Python 3.6.")
23592 (license license:asl2.0)))
23593
23594 (define-public python-aiofiles
23595 (package
23596 (name "python-aiofiles")
23597 (version "0.6.0")
23598 (source
23599 (origin
23600 (method url-fetch)
23601 (uri (pypi-uri "aiofiles" version))
23602 (sha256
23603 (base32
23604 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
23605 (build-system python-build-system)
23606 (home-page "https://github.com/Tinche/aiofiles")
23607 (synopsis "File support for @code{asyncio}")
23608 (description "@code{python-aiofiles} is a library for handling local
23609 disk files in asyncio applications.")
23610 (license license:asl2.0)))
23611
23612 (define-public python-pyre-extensions
23613 (package
23614 (name "python-pyre-extensions")
23615 (version "0.0.18")
23616 (source
23617 (origin
23618 (method url-fetch)
23619 (uri (pypi-uri "pyre-extensions" version))
23620 (sha256
23621 (base32
23622 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
23623 (build-system python-build-system)
23624 (propagated-inputs
23625 `(("python-typing-extensions"
23626 ,python-typing-extensions)
23627 ("python-typing-inspect" ,python-typing-inspect)))
23628 (home-page "https://pyre-check.org")
23629 (synopsis
23630 "Type system extensions for use with @code{python-pyre}")
23631 (description
23632 "@code{python-pyre-extensions} defines extensions to the standard
23633 @code{typing} module that are supported by the Pyre typechecker.")
23634 (license license:expat)))
23635
23636 (define-public python-dataclasses
23637 (package
23638 (name "python-dataclasses")
23639 (version "0.7")
23640 (source
23641 (origin
23642 (method url-fetch)
23643 (uri (pypi-uri "dataclasses" version))
23644 (sha256
23645 (base32
23646 "1rh8111fbws2vxyf2qy2zw3x6p6cq1jfz8pf904gig5qwg56sjj9"))))
23647 (build-system python-build-system)
23648 (home-page
23649 "https://github.com/ericvsmith/dataclasses")
23650 (synopsis
23651 "Backport of the @code{dataclasses} module for Python 3.6")
23652 (description
23653 "This is an implementation of PEP 557, Data Classes. It is a
23654 backport of the @code{dataclasses} module for Python 3.6.")
23655 (license license:asl2.0)))
23656
23657 (define-public python-pywatchman
23658 (package
23659 (name "python-pywatchman")
23660 (version "1.4.1")
23661 (source
23662 (origin
23663 (method url-fetch)
23664 (uri (pypi-uri "pywatchman" version))
23665 (sha256
23666 (base32
23667 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
23668 (build-system python-build-system)
23669 (arguments
23670 `(#:tests? #f)) ;there are none
23671 (home-page
23672 "https://facebook.github.io/watchman/")
23673 (synopsis "Watchman client for python")
23674 (description "@code{python-pywatchman} is a library to connect and
23675 query Watchman to discover file changes.")
23676 (license license:bsd-3)))
23677
23678 (define-public python-helpdev
23679 (package
23680 (name "python-helpdev")
23681 (version "0.7.1")
23682 (source
23683 (origin
23684 (method url-fetch)
23685 (uri (pypi-uri "helpdev" version))
23686 (sha256
23687 (base32
23688 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
23689 (build-system python-build-system)
23690 (arguments
23691 `(#:phases
23692 (modify-phases %standard-phases
23693 (replace 'check
23694 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
23695 (when tests?
23696 (add-installed-pythonpath inputs outputs)
23697 (invoke "pytest" "tests"))
23698 #t)))))
23699 (propagated-inputs
23700 `(("python-importlib-metadata" ,python-importlib-metadata)))
23701 (native-inputs
23702 `(("python-pytest" ,python-pytest)))
23703 (home-page "https://gitlab.com/dpizetta/helpdev")
23704 (synopsis
23705 "Extract information about the Python environment easily")
23706 (description
23707 "Helpdev is a library to easily extract information about the Python
23708 environment.")
23709 (license license:expat)))
23710
23711 (define-public python-qdarkstyle
23712 (package
23713 (name "python-qdarkstyle")
23714 (version "2.8.1")
23715 (source
23716 (origin
23717 (method url-fetch)
23718 (uri (pypi-uri "QDarkStyle" version))
23719 (sha256
23720 (base32
23721 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
23722 (build-system python-build-system)
23723 (arguments
23724 `(;; Fails unable to detect valid Qt bindings even when
23725 ;; added as native-inputs.
23726 #:tests? #f))
23727 (propagated-inputs
23728 `(("python-helpdev" ,python-helpdev)
23729 ("python-qtpy" ,python-qtpy)))
23730 (home-page
23731 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
23732 (synopsis
23733 "Complete dark stylesheet for Python and Qt applications")
23734 (description "QDarkStyle is the most complete dark stylesheet for Python and
23735 Qt applications.")
23736 (license license:expat)))
23737
23738 (define-public python-bitstring
23739 (package
23740 (name "python-bitstring")
23741 (version "3.1.7")
23742 (source
23743 (origin
23744 (method url-fetch)
23745 (uri (pypi-uri "bitstring" version))
23746 (sha256
23747 (base32
23748 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
23749 (build-system python-build-system)
23750 (arguments
23751 `(#:phases
23752 (modify-phases %standard-phases
23753 (replace 'check
23754 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
23755 (when tests?
23756 (add-installed-pythonpath inputs outputs)
23757 (with-directory-excursion "test"
23758 (invoke "pytest")))
23759 #t)))))
23760 (native-inputs
23761 `(("python-pytest" ,python-pytest)))
23762 (home-page "https://github.com/scott-griffiths/bitstring")
23763 (synopsis
23764 "Simple construction, analysis and modification of binary data")
23765 (description
23766 "Bitstring is a library for simple construction, analysis and modification
23767 of binary data.")
23768 (license license:expat)))
23769
23770 (define-public python-confuse
23771 (package
23772 (name "python-confuse")
23773 (version "1.4.0")
23774 (source
23775 (origin
23776 (method url-fetch)
23777 (uri (pypi-uri "confuse" version))
23778 (sha256
23779 (base32
23780 "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j"))))
23781 (build-system python-build-system)
23782 (propagated-inputs
23783 `(("python-pathlib" ,python-pathlib)
23784 ("python-pyyaml" ,python-pyyaml)))
23785 (home-page "https://github.com/beetbox/confuse")
23786 (synopsis "Painless YAML configuration.")
23787 (description "Confuse is a configuration library for Python that uses
23788 YAML. It takes care of defaults, overrides, type checking, command-line
23789 integration, human-readable errors, and standard OS-specific locations.")
23790 (license license:expat)))
23791
23792 (define-public python-reflink
23793 (package
23794 (name "python-reflink")
23795 (version "0.2.1")
23796 (source
23797 (origin
23798 (method url-fetch)
23799 (uri (pypi-uri "reflink" version))
23800 (sha256
23801 (base32
23802 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
23803 (build-system python-build-system)
23804 (arguments
23805 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
23806 (propagated-inputs
23807 `(("python-cffi" ,python-cffi)))
23808 (native-inputs
23809 `(("python-pytest" ,python-pytest)
23810 ("python-pytest-runner" ,python-pytest-runner)))
23811 (home-page "https://gitlab.com/rubdos/pyreflink")
23812 (synopsis "Python wrapper around reflink system call")
23813 (description
23814 "Python reflink wraps around platform specific @code{reflink}
23815 implementations.")
23816 (license license:expat)))
23817
23818 (define-public python-pivy
23819 (package
23820 (name "python-pivy")
23821 (version "0.6.5")
23822 (source
23823 (origin
23824 (method git-fetch)
23825 (uri (git-reference
23826 (url "https://github.com/coin3d/pivy")
23827 (commit version)))
23828 (file-name (git-file-name name version))
23829 (sha256
23830 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
23831 (build-system python-build-system)
23832 (arguments
23833 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
23834 #:tests? #f
23835 #:phases
23836 (modify-phases %standard-phases
23837 (add-after 'unpack 'patch-cmake-include-dirs
23838 (lambda _
23839 ;; Patch buildsystem to respect Coin3D include directory
23840 (substitute* "CMakeLists.txt"
23841 (("\\$\\{SoQt_INCLUDE_DIRS}")
23842 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
23843 #t)))))
23844 (native-inputs
23845 `(("cmake" ,cmake)
23846 ("swig" ,swig)))
23847 (inputs
23848 `(("python-wrapper" ,python-wrapper)
23849 ("qtbase" ,qtbase)
23850 ("libxi" ,libxi)
23851 ("libice" ,libice)
23852 ("soqt" ,soqt)
23853 ("glew" ,glew)
23854 ("coin3D" ,coin3D-4)))
23855 (home-page "https://github.com/coin3d/pivy")
23856 (synopsis "Python bindings to Coin3D")
23857 (description
23858 "Pivy provides python bindings for Coin, a 3D graphics library with an
23859 Application Programming Interface based on the Open Inventor 2.1 API.")
23860 (license license:isc)))
23861
23862 (define-public python-crayons
23863 (package
23864 (name "python-crayons")
23865 (version "0.4.0")
23866 (source
23867 (origin
23868 (method url-fetch)
23869 (uri (pypi-uri "crayons" version))
23870 (sha256
23871 (base32
23872 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
23873 (build-system python-build-system)
23874 (propagated-inputs
23875 `(("python-colorama" ,python-colorama)))
23876 (home-page "https://github.com/MasterOdin/crayons")
23877 (synopsis "TextUI colors for Python")
23878 (description "This package gives you colored strings for the terminal.
23879 Crayons automatically wraps a given string in the foreground color and
23880 restores the original state after the string is printed.")
23881 (license license:expat)))
23882
23883 (define-public python-sane
23884 (package
23885 (name "python-sane")
23886 (version "2.9.1")
23887 (source
23888 (origin
23889 (method url-fetch)
23890 (uri (pypi-uri name version))
23891 (sha256
23892 (base32
23893 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
23894 (build-system python-build-system)
23895 (native-inputs
23896 `(("python-pytest" ,python-pytest)))
23897 (inputs
23898 `(("sane-backends" ,sane-backends)))
23899 (home-page "https://github.com/python-pillow/Sane")
23900 (synopsis "Python interface to the SANE scanner")
23901 (description "This package provides Python interface to the SANE scanner
23902 and frame grabber interface.")
23903 (license (license:non-copyleft
23904 ;; Yet another variant of the X/MIT license.
23905 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
23906
23907 (define-public python-screenkey
23908 (package
23909 (name "python-screenkey")
23910 (version "1.4")
23911 (source
23912 (origin
23913 (method git-fetch)
23914 (uri (git-reference
23915 (url "https://gitlab.com/screenkey/screenkey")
23916 (commit (string-append "v" version))))
23917 (file-name (git-file-name name version))
23918 (sha256
23919 (base32
23920 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
23921 (build-system python-build-system)
23922 (arguments
23923 `(#:phases
23924 (modify-phases %standard-phases
23925 (add-after 'unpack 'fix-dlopen-paths
23926 (lambda* (#:key inputs outputs #:allow-other-keys)
23927 (let* ((x11 (assoc-ref inputs "libx11"))
23928 (xtst (assoc-ref inputs "libxtst")))
23929 (substitute* "Screenkey/xlib.py"
23930 (("libX11.so.6")
23931 (string-append x11 "/lib/libX11.so.6")))
23932 (substitute* "Screenkey/xlib.py"
23933 (("libXtst.so.6")
23934 (string-append xtst "/lib/libXtst.so.6")))
23935 #t)))
23936 (add-after 'install 'wrap-screenkey
23937 (lambda* (#:key outputs #:allow-other-keys)
23938 (wrap-program
23939 (string-append (assoc-ref outputs "out") "/bin/screenkey")
23940 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
23941 `("GI_TYPELIB_PATH"
23942 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
23943 #t)))))
23944 (inputs
23945 `(("python-distutils-extra" ,python-distutils-extra)
23946 ("python-tokenize-rt" ,python-tokenize-rt)
23947 ("libx11" ,libx11)
23948 ("libxtst" ,libxtst)
23949 ("gtk+" ,gtk+)
23950 ("python-pygobject" ,python-pygobject)
23951 ("python-pycairo" ,python-pycairo)
23952 ("python-setuptools-git" ,python-setuptools-git)
23953 ("python-babel" ,python-babel)))
23954 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
23955 (synopsis
23956 "Screencast tool to display pressed keys")
23957 (description
23958 "A screencast tool to display your keys inspired by Screenflick.")
23959 (license license:gpl3+)))
23960
23961 (define-public python-jinja2-cli
23962 (package
23963 (name "python-jinja2-cli")
23964 (version "0.7.0")
23965 (source
23966 (origin
23967 (method url-fetch)
23968 (uri (pypi-uri "jinja2-cli" version))
23969 (sha256
23970 (base32
23971 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
23972 (build-system python-build-system)
23973 (propagated-inputs
23974 `(("python-jinja2" ,python-jinja2)))
23975 (native-inputs
23976 `(("python-flake8" ,python-flake8)
23977 ("python-jinja2" ,python-jinja2)
23978 ("python-pytest" ,python-pytest)))
23979 (home-page "https://github.com/mattrobenolt/jinja2-cli")
23980 (synopsis "Command-line interface to Jinja2")
23981 (description
23982 "This package provides a command-line interface (CLI) to the Jinja2
23983 template engine.")
23984 (license license:bsd-3)))
23985
23986 (define-public python-readability
23987 (package
23988 (name "python-readability")
23989 (version "0.3.1")
23990 (source
23991 (origin
23992 (method url-fetch)
23993 (uri (pypi-uri "readability" version))
23994 (sha256
23995 (base32
23996 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
23997 (build-system python-build-system)
23998 (home-page
23999 "https://github.com/andreasvc/readability/")
24000 (synopsis
24001 "Measure the readability of a given text using surface
24002 characteristics")
24003 (description
24004 "This package provides a Python library that is an implementation of
24005 traditional readability measures based on simple surface
24006 characteristics. These measures are basically linear regressions based on the
24007 number of words, syllables, and sentences.")
24008 (license license:asl2.0)))
24009
24010 (define-public python-listparser
24011 (package
24012 (name "python-listparser")
24013 (version "0.18")
24014 (source
24015 (origin
24016 (method url-fetch)
24017 (uri (pypi-uri "listparser" version))
24018 (sha256
24019 (base32
24020 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
24021 (build-system python-build-system)
24022 (home-page
24023 "https://github.com/kurtmckee/listparser")
24024 (synopsis
24025 "Parse subscription lists in Python")
24026 (description
24027 "This package provides a Python library that can parse OPML, FOAF, and
24028 iGoogle subscription lists.")
24029 (license license:expat)))