gnu: Add python-frozendict.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
ae8db9ce 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
fa8ffaa0 4;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
44d10b1f
RW
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>
02422b3b 10;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
44d10b1f
RW
11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
b742c006 14;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
44d10b1f
RW
15;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
11e46326 17;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
44d10b1f
RW
18;;; Copyright © 2015, 2017 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>
58363ee5 22;;; Copyright © 2016, 2018, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
44d10b1f
RW
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>
47956fa0 26;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
44d10b1f
RW
27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28;;; Copyright © 2016 David Craven <david@craven.ch>
fd5c264a 29;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
44d10b1f 30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
e746d1c3 31;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
44d10b1f 32;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
7261bdca 33;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller <julien@lepiller.eu>
783d1d40 34;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
44d10b1f
RW
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>
a0b2accf 40;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
44d10b1f
RW
41;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
42;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
e2ebbbcc 43;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44d10b1f
RW
44;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
45;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
dcfa0acd 46;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
44d10b1f
RW
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>
a2548a3b 53;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
44d10b1f 54;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
85cfb0e9 55;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
bd137055 56;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
44d10b1f
RW
57;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
58;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
046dd621 59;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
a91f4eba 60;;; Copyright © 2019 Sam <smbaines8@gmail.com>
8c141421 61;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
efcb0508 62;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
27d8b9d9 63;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
edeb04bf 64;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
e308b4f0 65;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
30e7c03a 66;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
c1bbef69 67;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
97b1366d 68;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
dbcef44a 69;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
479f4013 70;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
da8ca4c3 71;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
244a527d 72;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
591faabd 73;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
b14c234c 74;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
9b0c95cc 75;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
01d5f2c5 76;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
3094c0ae 77;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
44d10b1f
RW
78;;;
79;;; This file is part of GNU Guix.
80;;;
81;;; GNU Guix is free software; you can redistribute it and/or modify it
82;;; under the terms of the GNU General Public License as published by
83;;; the Free Software Foundation; either version 3 of the License, or (at
84;;; your option) any later version.
85;;;
86;;; GNU Guix is distributed in the hope that it will be useful, but
87;;; WITHOUT ANY WARRANTY; without even the implied warranty of
88;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
89;;; GNU General Public License for more details.
90;;;
91;;; You should have received a copy of the GNU General Public License
92;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
93
94(define-module (gnu packages python-xyz)
95 #:use-module ((guix licenses) #:prefix license:)
96 #:use-module (gnu packages)
97 #:use-module (gnu packages algebra)
98 #:use-module (gnu packages adns)
99 #:use-module (gnu packages attr)
100 #:use-module (gnu packages backup)
101 #:use-module (gnu packages bash)
102 #:use-module (gnu packages check)
103 #:use-module (gnu packages compression)
104 #:use-module (gnu packages crypto)
105 #:use-module (gnu packages databases)
f825e605 106 #:use-module (gnu packages dbm)
2cbede59 107 #:use-module (gnu packages enchant)
44d10b1f
RW
108 #:use-module (gnu packages file)
109 #:use-module (gnu packages fontutils)
110 #:use-module (gnu packages gcc)
111 #:use-module (gnu packages geo)
112 #:use-module (gnu packages ghostscript)
113 #:use-module (gnu packages gl)
114 #:use-module (gnu packages glib)
e2ebbbcc 115 #:use-module (gnu packages gnome)
44d10b1f
RW
116 #:use-module (gnu packages graphviz)
117 #:use-module (gnu packages graphics)
9b0c95cc 118 #:use-module (gnu packages gsasl)
44d10b1f
RW
119 #:use-module (gnu packages gstreamer)
120 #:use-module (gnu packages gtk)
121 #:use-module (gnu packages icu4c)
122 #:use-module (gnu packages image)
123 #:use-module (gnu packages imagemagick)
72c2478a 124 #:use-module (gnu packages kerberos)
44d10b1f
RW
125 #:use-module (gnu packages libevent)
126 #:use-module (gnu packages libffi)
127 #:use-module (gnu packages linux)
128 #:use-module (gnu packages llvm)
129 #:use-module (gnu packages man)
130 #:use-module (gnu packages maths)
42f0b0c2 131 #:use-module (gnu packages monitoring)
44d10b1f
RW
132 #:use-module (gnu packages multiprecision)
133 #:use-module (gnu packages networking)
134 #:use-module (gnu packages ncurses)
135 #:use-module (gnu packages openstack)
136 #:use-module (gnu packages pcre)
137 #:use-module (gnu packages perl)
a5e76112 138 #:use-module (gnu packages photo)
44d10b1f
RW
139 #:use-module (gnu packages pkg-config)
140 #:use-module (gnu packages python)
d362b11d 141 #:use-module (gnu packages python-check)
15b65617 142 #:use-module (gnu packages python-compression)
44d10b1f 143 #:use-module (gnu packages python-crypto)
ca7c3653 144 #:use-module (gnu packages python-science)
44d10b1f
RW
145 #:use-module (gnu packages python-web)
146 #:use-module (gnu packages qt)
147 #:use-module (gnu packages readline)
148 #:use-module (gnu packages sdl)
149 #:use-module (gnu packages search)
150 #:use-module (gnu packages shells)
9d0c291e 151 #:use-module (gnu packages sphinx)
44d10b1f
RW
152 #:use-module (gnu packages ssh)
153 #:use-module (gnu packages terminals)
154 #:use-module (gnu packages tex)
155 #:use-module (gnu packages texinfo)
156 #:use-module (gnu packages time)
157 #:use-module (gnu packages tls)
158 #:use-module (gnu packages version-control)
159 #:use-module (gnu packages video)
160 #:use-module (gnu packages web)
161 #:use-module (gnu packages base)
162 #:use-module (gnu packages xml)
163 #:use-module (gnu packages xorg)
164 #:use-module (gnu packages xdisorg)
165 #:use-module (gnu packages tcl)
166 #:use-module (gnu packages bdw-gc)
f98232a3 167 #:use-module (gnu packages serialization)
44d10b1f
RW
168 #:use-module (guix packages)
169 #:use-module (guix download)
170 #:use-module (guix git-download)
a042d348 171 #:use-module (guix hg-download)
44d10b1f
RW
172 #:use-module (guix utils)
173 #:use-module (guix build-system gnu)
174 #:use-module (guix build-system cmake)
175 #:use-module (guix build-system python)
176 #:use-module (guix build-system trivial)
177 #:use-module (srfi srfi-1)
178 #:use-module (srfi srfi-26))
179
2f12e660
SS
180(define-public python-tenacity
181 (package
182 (name "python-tenacity")
183 (version "6.1.0")
184 (source (origin
185 (method url-fetch)
186 (uri (pypi-uri "tenacity" version))
187 (sha256
188 (base32
189 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
190 (build-system python-build-system)
191 (native-inputs
192 `(("python-setuptools-scm" ,python-setuptools-scm)
193 ("python-sphinx" ,python-sphinx)
194 ("python-tornado" ,python-tornado)
195 ("python-pytest" ,python-pytest)))
196 (propagated-inputs
197 `(("python-six" ,python-six)))
198 (arguments
199 `(#:phases (modify-phases %standard-phases
200 (replace 'check
201 (lambda _
202 (invoke "pytest")
203 #t)))))
204 (home-page "https://github.com/jd/tenacity")
205 (synopsis "Retrying library for python")
206 (description "Tenacity is a general-purpose python library to simplify the
207task of adding retry behavior to just about anything.")
208 (license license:asl2.0)))
209
dcf95329
SS
210(define-public python-colorlog
211 (package
212 (name "python-colorlog")
213 (version "4.1.0")
214 (source (origin
215 (method url-fetch)
216 (uri (pypi-uri "colorlog" version))
217 (sha256
218 (base32
219 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
220 (build-system python-build-system)
221 (native-inputs
222 `(("python-pytest" ,python-pytest)))
223 (arguments
224 `(#:phases (modify-phases %standard-phases
225 (replace 'check
226 (lambda _
227 ;; Extend PYTHONPATH so the built package will be found.
228 (setenv "PYTHONPATH"
229 (string-append (getcwd) "/build/lib:"
230 (getenv "PYTHONPATH")))
231 (invoke "pytest" "-p" "no:logging")
232 #t)))))
233 (home-page "https://github.com/borntyping/python-colorlog")
234 (synopsis "Log formatting with colors for python")
235 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
236with Python's logging module that outputs records using terminal colors.")
237 (license license:expat)))
238
23fde56b
SS
239(define-public python-pyprind
240 (package
241 (name "python-pyprind")
242 (version "2.11.2")
243 (source (origin
244 (method url-fetch)
245 (uri (pypi-uri "PyPrind" version))
246 (sha256
247 (base32
248 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
249 (build-system python-build-system)
250 (propagated-inputs
251 `(("python-psutil" ,python-psutil)))
252 (home-page "https://github.com/rasbt/pyprind")
253 (synopsis "Python Progress Bar and Percent Indicator Utility")
254 (description "The PyPrind (Python Progress Indicator) module provides a
255progress bar and a percentage indicator object that let you track the progress
256of a loop structure or other iterative computation.")
257 (license license:bsd-3)))
258
f3465dee
SS
259(define-public python-gphoto2
260 (package
261 (name "python-gphoto2")
262 (version "2.2.1")
263 (source (origin
264 (method url-fetch)
265 (uri (pypi-uri "gphoto2" version))
266 (sha256
267 (base32
268 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
269 (build-system python-build-system)
270 (native-inputs
271 `(("pkg-config" ,pkg-config)))
272 (inputs
273 `(("libgphoto2" ,libgphoto2)))
274 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
275 (synopsis "Python interface to libgphoto2")
276 (description "@code{python-gphoto2} is a comprehensive Python interface
277(or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
278automatically generate the interface code.")
279 (license license:gpl3+)))
280
2763f0de
SS
281(define-public python-colour
282 (package
283 (name "python-colour")
284 (version "0.1.5")
285 (source (origin
286 (method url-fetch)
287 (uri (pypi-uri "colour" version))
288 (sha256
289 (base32
290 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
291 (build-system python-build-system)
292 (native-inputs
293 `(("python-d2to1" ,python-d2to1)))
294 (home-page "https://github.com/vaab/colour")
295 (synopsis "Convert and manipulate various color representations")
296 (description "Pythonic way to manipulate color representations (HSL, RVB,
297web, X11, ...).")
298 (license license:expat)))
299
5164a92e
SS
300(define-public python-d2to1
301 (package
302 (name "python-d2to1")
303 (version "0.2.12.post1")
304 (source (origin
305 (method url-fetch)
306 (uri (pypi-uri "d2to1" version))
307 (sha256
308 (base32
309 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
310 (build-system python-build-system)
311 (native-inputs
312 `(("python-nose" ,python-nose)))
313 (home-page "https://github.com/embray/d2to1")
314 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
315in python")
316 (description "The python package d2to1 (the d is for distutils) allows
317using distutils2-like setup.cfg files for a package's metadata with a
318distribute/setuptools setup.py script.")
319 (license license:bsd-2)))
320
a5e76112
SS
321(define-public python-rawkit
322 (package
323 (name "python-rawkit")
324 (version "0.6.0")
325 (source (origin
326 (method url-fetch)
327 (uri (pypi-uri "rawkit" version))
328 (sha256
329 (base32
330 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
331 (build-system python-build-system)
332 (native-inputs
333 `(("python-pytest" ,python-pytest)
334 ("python-mock" ,python-mock)))
335 (inputs
336 `(("libraw" ,libraw)))
337 (home-page "https://rawkit.readthedocs.io")
338 (synopsis "Ctypes-based LibRaw binding for Python")
339 (description "The rawkit package provides two modules: rawkit and libraw.
340The rawkit module provides a high-level Pythonic interface for developing raw
341photos, while the libraw module provides a CTypes based interface for
342interacting with the low-level LibRaw C APIs.")
343 (license license:expat)))
344
1b9c1fdb
SS
345(define-public python-easygui
346 (package
347 (name "python-easygui")
348 (version "0.98.1")
349 (source (origin
350 (method url-fetch)
351 (uri (pypi-uri "easygui" version))
352 (sha256
353 (base32
354 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
355 (build-system python-build-system)
356 (propagated-inputs
357 `(("python-tkinter" ,python "tk")))
358 (home-page "https://github.com/robertlugg/easygui")
359 (synopsis "GUI programming module for Python")
360 (description "EasyGUI is a module for very simple, very easy GUI
361programming in Python. EasyGUI is different from other GUI generators in that
362EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
363simple function calls.")
364 (license license:bsd-3)))
365
244a527d
SS
366(define-public python-pymediainfo
367 (package
368 (name "python-pymediainfo")
369 (version "4.1")
370 (source
371 (origin
372 (method url-fetch)
373 (uri (pypi-uri "pymediainfo" version))
374 (sha256
375 (base32
376 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
377 (build-system python-build-system)
378 (native-inputs
379 `(("python-setuptools-scm" ,python-setuptools-scm)
380 ("python-pytest" ,python-pytest)))
381 (inputs
382 `(("libmediainfo" ,libmediainfo)))
383 (arguments
384 `(#:phases
385 (modify-phases %standard-phases
386 (add-after 'unpack 'patch-libmediainfo
387 (lambda _
388 (substitute* "pymediainfo/__init__.py"
389 (("libmediainfo.so.0")
390 (string-append (assoc-ref %build-inputs "libmediainfo")
391 "/lib/libmediainfo.so.0")))
392 #t))
393 (replace 'check
394 (lambda _
395 ;; Extend PYTHONPATH so the built package will be found.
396 (setenv "PYTHONPATH"
397 (string-append (getcwd) "/build/lib:"
398 (getenv "PYTHONPATH")))
399 ;; Skip the only failing test "test_parse_url"
400 (invoke "pytest" "-vv" "-k" "not test_parse_url")
401 #t)))))
402 (home-page
403 "https://github.com/sbraz/pymediainfo")
404 (synopsis
405 "Python wrapper for the mediainfo library")
406 (description
407 "Python wrapper for the mediainfo library to access the technical and tag
408data for video and audio files.")
409 (license license:expat)))
410
44d10b1f
RW
411(define-public python-psutil
412 (package
413 (name "python-psutil")
e9119ac1 414 (version "5.6.5")
44d10b1f
RW
415 (source
416 (origin
417 (method url-fetch)
418 (uri (pypi-uri "psutil" version))
419 (sha256
e9119ac1 420 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
44d10b1f
RW
421 (build-system python-build-system)
422 (arguments
423 ;; FIXME: some tests does not return and times out.
424 '(#:tests? #f))
425 (home-page "https://www.github.com/giampaolo/psutil")
426 (synopsis "Library for retrieving information on running processes")
427 (description
428 "psutil (Python system and process utilities) is a library for retrieving
429information on running processes and system utilization (CPU, memory, disks,
430network) in Python. It is useful mainly for system monitoring, profiling and
431limiting process resources and management of running processes. It implements
432many functionalities offered by command line tools such as: ps, top, lsof,
433netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
434pidof, tty, taskset, pmap.")
435 (properties `((python2-variant . ,(delay python2-psutil))))
436 (license license:bsd-3)))
437
438(define-public python2-psutil
439 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
440 (package
441 (inherit base)
442 (propagated-inputs
443 `(("python2-enum34" ,python2-enum34) ;optional
444 ,@(package-propagated-inputs base))))))
445
446(define-public python-shapely
447 (package
448 (name "python-shapely")
6d94465b 449 (version "1.6.4.post2")
44d10b1f
RW
450 (source
451 (origin
452 (method url-fetch)
453 (uri (pypi-uri "Shapely" version))
454 (sha256
455 (base32
6d94465b 456 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
457 (build-system python-build-system)
458 (native-inputs
459 `(("python-cython" ,python-cython)
460 ("python-matplotlib" ,python-matplotlib)
461 ("python-pytest" ,python-pytest)
462 ("python-pytest-cov" ,python-pytest-cov)))
463 (inputs
464 `(("geos" ,geos)))
465 (propagated-inputs
466 `(("python-numpy" ,python-numpy)))
467 (arguments
468 `(#:phases
469 (modify-phases %standard-phases
470 (add-after 'unpack 'patch-geos-path
471 (lambda* (#:key inputs #:allow-other-keys)
472 (let ((geos (assoc-ref inputs "geos"))
473 (glibc (assoc-ref inputs ,(if (%current-target-system)
474 "cross-libc" "libc"))))
475 (substitute* "shapely/geos.py"
476 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
477 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
478 geos "/lib/libgeos_c.so'])"))
479 (("free = load_dll\\('c'\\)\\.free")
480 (string-append "free = load_dll('c', fallbacks=['"
481 glibc "/lib/libc.so.6']).free"))))
482 #t)))))
483 (home-page "https://github.com/Toblerity/Shapely")
484 (synopsis "Library for the manipulation and analysis of geometric objects")
485 (description "Shapely is a Python package for manipulation and analysis of
486planar geometric objects. It is based on the @code{GEOS} library.")
487 (license license:bsd-3)))
488
a91f4eba
S
489(define-public python-shortuuid
490 (package
491 (name "python-shortuuid")
492 (version "0.5.0")
493 (source
494 (origin
495 (method url-fetch)
496 (uri (pypi-uri "shortuuid" version))
497 (sha256
498 (base32
499 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
500 (build-system python-build-system)
501 (native-inputs
502 `(("python-pep8" ,python-pep8)))
503 (home-page "https://github.com/skorokithakis/shortuuid")
504 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
505 (description
506 "@code{shortuuid} is a Python library for generating concise, unambiguous
507and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
508module and then similar looking characters are removed.")
509 (license license:bsd-3)))
510
44d10b1f
RW
511(define-public python-logwrap
512 (package
513 (name "python-logwrap")
514 (version "3.2.1")
515 (source
516 (origin
517 (method url-fetch)
518 (uri (pypi-uri "logwrap" version ".zip"))
519 (sha256
520 (base32
521 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
522 (build-system python-build-system)
523 (propagated-inputs
524 `(("python-six" ,python-six)
525 ("python-typing" ,python-typing)))
526 (native-inputs
527 `(("unzip" ,unzip)
528 ("python-cython" ,python-cython)
529 ("python-pytest" ,python-pytest)
530 ("python-pytest-cov" ,python-pytest-cov)
531 ("python-pytest-runner" ,python-pytest-runner)))
532 (home-page "https://github.com/penguinolog/logwrap")
533 (synopsis "Decorator for logging function arguments")
534 (description "This package provides a decorator to log function arguments
535and function call return values in a human-readable way.")
536 (license license:asl2.0)))
537
538(define-public python2-shapely
539 (package-with-python2 python-shapely))
540
541(define-public python-clyent
542 (package
543 (name "python-clyent")
544 (version "1.2.1")
545 (source
546 (origin
547 (method url-fetch)
548 (uri (pypi-uri "clyent" version))
549 (sha256
550 (base32
551 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
552 (build-system python-build-system)
553 (native-inputs
554 `(("python-mock" ,python-mock)))
555 (home-page "https://github.com/binstar/clyent")
556 (synopsis "Command line client library")
557 (description "Clyent is a Python command line utiliy library. It is used
558by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
559 (license license:bsd-3)))
560
561(define-public python2-clyent
562 (package-with-python2 python-clyent))
563
564(define-public python-babel
565 (package
566 (name "python-babel")
dab3c841 567 (version "2.8.0")
44d10b1f
RW
568 (source
569 (origin
570 (method url-fetch)
571 (uri (pypi-uri "Babel" version))
572 (sha256
573 (base32
dab3c841 574 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
44d10b1f
RW
575 (build-system python-build-system)
576 (native-inputs
577 `(("python-freezegun" ,python-freezegun)
578 ("python-pytest" ,python-pytest)))
579 (propagated-inputs
580 `(("python-pytz" ,python-pytz)))
581 (arguments
582 `(#:phases (modify-phases %standard-phases
583 (replace 'check
8acd1e90
MB
584 (lambda _
585 (invoke "pytest" "-vv" "-k"
586 (string-append
587 ;; XXX: These tests fail when using Pytest 4.x and
588 ;; Babel 2.6.0. Try removing this for later versions.
589 "not test_no_inherit_metazone_marker_never_in_output"
590 " and not test_smoke_dates"
591 " and not test_smoke_numbers")))))))
44d10b1f
RW
592 (home-page "http://babel.pocoo.org/")
593 (synopsis
594 "Tools for internationalizing Python applications")
595 (description
596 "Babel is composed of two major parts:
597- tools to build and work with gettext message catalogs
598- a Python interface to the CLDR (Common Locale Data Repository), providing
599access to various locale display names, localized number and date formatting,
600etc. ")
601 (license license:bsd-3)))
602
603(define-public python2-babel
604 (package-with-python2 python-babel))
605
93253411
MB
606;; Sphinx < 2.0 requires this version. Remove once no longer needed.
607(define-public python2-babel-2.6
608 (package
609 (inherit python2-babel)
610 (version "2.6.0")
611 (source (origin
612 (method url-fetch)
613 (uri (pypi-uri "Babel" version))
614 (sha256
615 (base32
616 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
617
44d10b1f
RW
618(define-public python2-backport-ssl-match-hostname
619 (package
620 (name "python2-backport-ssl-match-hostname")
621 (version "3.5.0.1")
622 (source
623 (origin
624 (method url-fetch)
2c1f0d09 625 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
626 (sha256
627 (base32
628 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
629 (build-system python-build-system)
630 (arguments
631 `(#:python ,python-2
632 #:tests? #f)) ; no test target
633 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
634 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
635 (description
636 "This backport brings the ssl.match_hostname() function to users of
637earlier versions of Python. The function checks the hostname in the
638certificate returned by the server to which a connection has been established,
639and verifies that it matches the intended target hostname.")
640 (license license:psfl)))
641
dc827867
TGR
642(define-public python-boolean.py
643 (package
644 (name "python-boolean.py")
645 (version "3.6")
646 (source
647 (origin
648 ;; There's no source tarball on PyPI.
649 (method git-fetch)
650 (uri (git-reference
651 (url "https://github.com/bastikr/boolean.py")
652 (commit (string-append "v" version))))
653 (file-name (git-file-name name version))
654 (sha256
655 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
656 (build-system python-build-system)
657 (home-page "https://github.com/bastikr/boolean.py")
658 (synopsis "Boolean algebra in one Python module")
659 (description
660 "This is a small Python library that implements boolean algebra.
661It defines two base elements, @code{TRUE} and @code{FALSE}, and a
662@code{Symbol} class that can take on one of these two values. Calculations
663are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
664compositions like @code{XOR} and @code{NAND} are emulated on top of them.
665Expressions are constructed from parsed strings or directly in Python.")
666 (license license:bsd-2)))
667
44d10b1f
RW
668(define-public python-hdf4
669 (package
670 (name "python-hdf4")
671 (version "0.9")
672 (source
673 (origin
674 (method url-fetch)
675 (uri (pypi-uri name version))
676 (sha256
677 (base32
678 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
679 (build-system python-build-system)
680 (native-inputs `(("nose" ,python-nose)))
681 (propagated-inputs `(("numpy" ,python-numpy)))
682 (inputs
683 `(("hdf4" ,hdf4)
684 ("libjpeg" ,libjpeg)
685 ("zlib" ,zlib)))
686 (arguments
687 `(#:phases
688 (modify-phases %standard-phases
689 (replace 'check
690 (lambda _
691 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
692 ;; on to import numpy. Somehow this works on their CI system.
693 ;; Let's just manage PYTHONPATH here instead.
694 (substitute* "runexamples.sh"
695 (("export PYTHONPATH=.*") ""))
696 (setenv "PYTHONPATH"
697 (string-append (getcwd) ":"
698 (getenv "PYTHONPATH")))
699 (invoke "./runexamples.sh")
700 (invoke "nosetests" "-v"))))))
701 (home-page "https://github.com/fhs/python-hdf4")
702 (synopsis "Python interface to the NCSA HDF4 library")
703 (description
704 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
705which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
706NetCDF files can also be read and modified. Python-HDF4 is a fork of
707@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
708 (license license:expat)))
709
710(define-public python2-hdf4
711 (package-with-python2 python-hdf4))
712
713(define-public python-h5py
714 (package
715 (name "python-h5py")
24ce6421 716 (version "2.10.0")
44d10b1f
RW
717 (source
718 (origin
719 (method url-fetch)
720 (uri (pypi-uri "h5py" version))
721 (sha256
722 (base32
24ce6421 723 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
44d10b1f
RW
724 (build-system python-build-system)
725 (arguments
726 `(#:tests? #f ; no test target
727 #:phases
728 (modify-phases %standard-phases
729 (add-after 'unpack 'fix-hdf5-paths
730 (lambda* (#:key inputs #:allow-other-keys)
731 (let ((prefix (assoc-ref inputs "hdf5")))
732 (substitute* "setup_build.py"
733 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
734 (string-append "['" prefix "/lib" "']"))
735 (("'/opt/local/include', '/usr/local/include'")
736 (string-append "'" prefix "/include" "'")))
737 (substitute* "setup_configure.py"
738 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
739 (string-append "['" prefix "/lib" "']")))
740 #t))))))
741 (propagated-inputs
742 `(("python-six" ,python-six)
743 ("python-numpy" ,python-numpy)))
744 (inputs
24ce6421 745 `(("hdf5" ,hdf5-1.10)))
44d10b1f
RW
746 (native-inputs
747 `(("python-cython" ,python-cython)
24ce6421
RW
748 ("python-pkgconfig" ,python-pkgconfig)
749 ("pkg-config" ,pkg-config)))
efc0a587 750 (home-page "https://www.h5py.org/")
44d10b1f
RW
751 (synopsis "Read and write HDF5 files from Python")
752 (description
753 "The h5py package provides both a high- and low-level interface to the
754HDF5 library from Python. The low-level interface is intended to be a
755complete wrapping of the HDF5 API, while the high-level component supports
756access to HDF5 files, datasets and groups using established Python and NumPy
757concepts.")
758 (license license:bsd-3)))
759
760(define-public python2-h5py
761 (package-with-python2 python-h5py))
762
8b89dedc
RW
763(define-public python-sh
764 (package
765 (name "python-sh")
766 (version "1.12.14")
767 (source
768 (origin
769 (method url-fetch)
770 (uri (pypi-uri "sh" version))
771 (sha256
772 (base32
773 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
774 (build-system python-build-system)
fd3638d8
EF
775 (arguments
776 '(#:phases
777 (modify-phases %standard-phases
778 (replace 'check
779 (lambda _
ca983a2f
NG
780 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
781 (setenv "HOME" "/tmp")
fd3638d8
EF
782 (invoke "python" "sh.py" "test"))))))
783 (native-inputs
784 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
785 (home-page "https://github.com/amoffat/sh")
786 (synopsis "Python subprocess replacement")
787 (description "This package provides a replacement for Python's
788@code{subprocess} feature.")
789 (license license:expat)))
790
3869effd
RW
791(define-public python2-sh
792 (package-with-python2 python-sh))
793
d362b11d
RW
794(define-public python-cftime
795 (package
796 (name "python-cftime")
da107cf5 797 (version "1.0.4.2")
d362b11d
RW
798 (source
799 (origin
800 (method url-fetch)
801 (uri (pypi-uri "cftime" version))
802 (sha256
da107cf5 803 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
d362b11d
RW
804 (build-system python-build-system)
805 (propagated-inputs
806 `(("python-numpy" ,python-numpy)))
807 (native-inputs
808 `(("python-coveralls" ,python-coveralls)
809 ("python-cython" ,python-cython)
810 ("python-pytest-cov" ,python-pytest-cov)))
811 (home-page "https://github.com/Unidata/cftime")
812 (synopsis "Library for time handling")
813 (description
814 "This package provides time-handling functionality that used to be part
815of the netcdf4 package before.")
816 ;; This package claims to include code under the GPLv3 but is released
817 ;; under ISC.
818 (license (list license:isc license:gpl3+))))
819
44d10b1f
RW
820(define-public python-netcdf4
821 (package
822 (name "python-netcdf4")
93e7b209 823 (version "1.4.2")
44d10b1f
RW
824 (source
825 (origin
826 (method url-fetch)
827 (uri (pypi-uri "netCDF4" version))
828 (sha256
829 (base32
93e7b209 830 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 831 (build-system python-build-system)
93e7b209
RW
832 (arguments
833 '(#:phases
834 (modify-phases %standard-phases
835 (add-after 'unpack 'configure-locations
836 (lambda* (#:key inputs #:allow-other-keys)
837 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
838 #t)))))
44d10b1f
RW
839 (native-inputs
840 `(("python-cython" ,python-cython)))
841 (propagated-inputs
93e7b209
RW
842 `(("python-numpy" ,python-numpy)
843 ("python-cftime" ,python-cftime)))
44d10b1f
RW
844 (inputs
845 `(("netcdf" ,netcdf)
846 ("hdf4" ,hdf4)
847 ("hdf5" ,hdf5)))
93e7b209 848 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
849 (synopsis "Python/numpy interface to the netCDF library")
850 (description "Netcdf4-python is a Python interface to the netCDF C
851library. netCDF version 4 has many features not found in earlier
852versions of the library and is implemented on top of HDF5. This module
853can read and write files in both the new netCDF 4 and the old netCDF 3
854format, and can create files that are readable by HDF5 clients. The
855API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
856to users of that module.")
857 ;; The software is mainly ISC, but includes some files covered
858 ;; by the Expat license.
859 (license (list license:isc license:expat))))
860
861(define-public python2-netcdf4
862 (package-with-python2 python-netcdf4))
863
d6803445
TGR
864(define-public python-license-expression
865 (package
866 (name "python-license-expression")
867 (version "0.999")
868 (source
869 (origin
870 (method url-fetch)
871 (uri (pypi-uri "license-expression" version))
872 (sha256
873 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
874 (build-system python-build-system)
875 (propagated-inputs
876 `(("python-boolean.py" ,python-boolean.py)))
877 (home-page "https://github.com/nexB/license-expression")
878 (synopsis "Apply boolean logic to license expressions")
879 (description
880 "This Python module defines a tiny language to evaluate and compare
881license expressions using boolean logic. Logical combinations of licenses can
882be tested for equality, containment, and equivalence. They can be normalised
883and simplified. It supports SPDX license expressions as well as other naming
884conventions and aliases in the same expression.")
885 (license license:gpl2+)))
886
44d10b1f
RW
887(define-public python-lockfile
888 (package
889 (name "python-lockfile")
890 (version "0.12.2")
891 (source
892 (origin
893 (method url-fetch)
8318bf07 894 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
895 (sha256
896 (base32
897 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
898 (build-system python-build-system)
899 (arguments '(#:test-target "check"))
900 (native-inputs
901 `(("python-pbr" ,python-pbr)))
902 (home-page "https://launchpad.net/pylockfile")
903 (synopsis "Platform-independent file locking module")
904 (description
905 "The lockfile package exports a LockFile class which provides a simple
906API for locking files.")
907 (license license:expat)))
908
909(define-public python2-lockfile
910 (package-with-python2 python-lockfile))
911
6e792089
JK
912(define-public python-filelock
913 (package
914 (name "python-filelock")
915 (version "3.0.12")
916 (source
917 (origin
918 (method url-fetch)
919 (uri (pypi-uri "filelock" version))
920 (sha256
921 (base32
922 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
923 (build-system python-build-system)
924 (home-page
925 "https://github.com/benediktschmitt/py-filelock")
926 (synopsis "Platform independent file lock")
927 (description "@code{filelock} contains a single module implementing
928a platform independent file lock in Python, which provides a simple way of
929inter-process communication.")
930 (license license:unlicense)))
931
44d10b1f
RW
932(define-public python-semantic-version
933 (package
934 (name "python-semantic-version")
935 (version "2.6.0")
936 (source
937 (origin
938 (method url-fetch)
939 (uri (pypi-uri "semantic_version" version))
940 (sha256
941 (base32
942 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
943 (build-system python-build-system)
944 (arguments
945 `(#:tests? #f)) ; PyPI tarball lacks tests
946 (home-page "https://github.com/rbarrois/python-semanticversion")
947 (synopsis "Semantic versioning module for Python")
948 (description
949 "The @code{semantic_version} class is a small library for handling
950@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
951
952It can compare versions, generate a new version that represents a bump in one of
953the version levels, and check whether any given string is a proper semantic
954version identifier.")
955 (license license:bsd-3)))
956
957(define-public python2-semantic-version
958 (package-with-python2 python-semantic-version))
959
960(define-public python-serpent
961 (package
962 (name "python-serpent")
fa9d14ac 963 (version "1.28")
44d10b1f
RW
964 (source
965 (origin
966 (method url-fetch)
967 (uri (pypi-uri "serpent" version))
968 (sha256
fa9d14ac 969 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 970 (build-system python-build-system)
fa9d14ac
TGR
971 (native-inputs
972 `(("python-attrs" ,python-attrs)
973 ("python-pytz" ,python-pytz)))
44d10b1f
RW
974 (home-page "https://github.com/irmen/Serpent")
975 (synopsis "Serializer for literal Python expressions")
976 (description
1d3c7803
TGR
977 "Serpent provides @code{ast.literal_eval()}-compatible object tree
978serialization. It serializes an object tree into bytes (an utf-8 encoded
979string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
980to rebuild the original object tree.
981
982Because only safe literals are encoded, it is safe to send serpent data to
983other machines, such as over the network.")
44d10b1f
RW
984 (license license:expat)))
985
986(define-public python-setuptools
987 (package
988 (name "python-setuptools")
e39d4933 989 (version "41.0.1")
44d10b1f
RW
990 (source
991 (origin
992 (method url-fetch)
993 (uri (pypi-uri "setuptools" version ".zip"))
994 (sha256
995 (base32
e39d4933 996 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
997 (modules '((guix build utils)))
998 (snippet
999 '(begin
1000 ;; Remove included binaries which are used to build self-extracting
1001 ;; installers for Windows.
1002 ;; TODO: Find some way to build them ourself so we can include them.
1003 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1004 #t))))
1005 (build-system python-build-system)
1006 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1007 ;; One could bootstrap with an internal untested setuptools.
1008 (arguments
1009 `(#:tests? #f))
e85af137 1010 (home-page "https://pypi.org/project/setuptools/")
44d10b1f
RW
1011 (synopsis
1012 "Library designed to facilitate packaging Python projects")
1013 (description
1014 "Setuptools is a fully-featured, stable library designed to facilitate
1015packaging Python projects, where packaging includes:
1016Python package and module definitions,
1017distribution package metadata,
1018test hooks,
1019project installation,
1020platform-specific details,
1021Python 3 support.")
1022 ;; TODO: setuptools now bundles the following libraries:
1023 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1024 (license (list license:psfl ; setuptools itself
1025 license:expat ; six, appdirs, pyparsing
1026 license:asl2.0 ; packaging is dual ASL2/BSD-2
1027 license:bsd-2))))
1028
1029(define-public python2-setuptools
1030 (package-with-python2 python-setuptools))
1031
0fdec2a3
MB
1032;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1033(define-public python-setuptools-for-tensorflow
1034 (hidden-package
1035 (package
1036 (inherit python-setuptools)
1037 (version "39.1.0")
1038 (source (origin
1039 (inherit (package-source python-setuptools))
1040 (uri (pypi-uri "setuptools" version ".zip"))
1041 (sha256
1042 (base32
1043 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1044
44d10b1f
RW
1045(define-public python-uniseg
1046 (package
1047 (name "python-uniseg")
1048 (version "0.7.1")
1049 (source
1050 (origin
1051 (method url-fetch)
1052 (uri (pypi-uri "uniseg" version ".zip"))
1053 (sha256
1054 (base32
1055 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1056 (build-system python-build-system)
1057 (arguments
1058 '(#:tests? #f)) ; The test suite requires network access.
1059 (native-inputs
1060 `(("unzip" ,unzip)))
1061 (home-page
1062 "https://bitbucket.org/emptypage/uniseg-python")
1063 (synopsis
1064 "Python library to determine Unicode text segmentations")
1065 (description
1066 "Uniseg is a Python package used to determine Unicode text segmentations.
1067Supported segmentations include:
1068@enumerate
1069@item @dfn{Code point} (any value in the Unicode codespace)
1070@item @dfn{Grapheme cluster} (user-perceived character made of a single or
1071multiple Unicode code points, e.g. \"G\" + acute-accent)
1072@item Word break
1073@item Sentence break
1074@item Line break
1075@end enumerate")
1076 (license license:expat)))
1077
1078(define-public python2-uniseg
1079 (package-with-python2 python-uniseg))
1080
1081(define-public python-humanfriendly
1082 (package
1083 (name "python-humanfriendly")
1084 (version "4.4.1")
1085 (source
1086 (origin
1087 (method url-fetch)
1088 (uri (pypi-uri "humanfriendly" version))
1089 (sha256
1090 (base32
1091 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
1092 (build-system python-build-system)
1093 (arguments
1094 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1095 #:tests? #f))
1096 (propagated-inputs
1097 `(("python-monotonic" ,python-monotonic)))
1098 (home-page "https://humanfriendly.readthedocs.io")
1099 (synopsis "Human-friendly input and output in Python")
1100 (description
1101 "The functions and classes in @code{humanfriendly} can be used to make
1102text interfaces more user-friendly. It includes tools to parse and format
1103numbers, file sizes, and timespans, timers for long-running operations, menus
1104to allow the user to choose from a list of options, and terminal interaction
1105helpers.")
1106 (license license:expat)))
1107
1108(define-public python2-humanfriendly
1109 (package-with-python2 python-humanfriendly))
1110
1111(define-public python-capturer
1112 (package
1113 (name "python-capturer")
1114 (version "2.4")
1115 (source
1116 (origin
1117 (method url-fetch)
1118 (uri (pypi-uri "capturer" version))
1119 (sha256
1120 (base32
1121 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1122 (build-system python-build-system)
1123 (arguments
1124 `(#:tests? #f))
1125 (propagated-inputs
1126 `(("python-humanfriendly" ,python-humanfriendly)))
1127 (home-page "https://capturer.readthedocs.io")
1128 (synopsis "Capture stdout and stderr streams of the current process")
1129 (description
1130 "The capturer package makes it easy to capture the stdout and stderr
1131streams of the current process and subprocesses. Output can be relayed
1132to the terminal in real time but is also available to the Python program
1133for additional processing.")
1134 (license license:expat)))
1135
1136(define-public python2-capturer
1137 (package-with-python2 python-capturer))
1138
1139(define-public python-case
1140 (package
1141 (name "python-case")
1142 (version "1.5.3")
1143 (source
1144 (origin
1145 (method url-fetch)
1146 (uri (pypi-uri "case" version))
1147 (sha256
1148 (base32
1149 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1150 (build-system python-build-system)
1151 (propagated-inputs
1152 `(("python-mock" ,python-mock)
1153 ("python-nose" ,python-nose)
1154 ("python-six" ,python-six)
1155 ("python-unittest2" ,python-unittest2)))
1156 (native-inputs
1157 `(("python-coverage" ,python-coverage)))
1158 (home-page "https://github.com/celery/case")
1159 (synopsis "Unittest utilities and convenience methods")
1160 (description
1161 "The @code{case} package provides utilities on top of unittest, including
1162some helpful Python 2 compatibility convenience methods.")
1163 (license license:bsd-3)))
1164
1165(define-public python-verboselogs
1166 (package
1167 (name "python-verboselogs")
1168 (version "1.7")
1169 (source
1170 (origin
1171 (method url-fetch)
1172 (uri (pypi-uri "verboselogs" version))
1173 (sha256
1174 (base32
1175 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1176 (build-system python-build-system)
1760c970
MO
1177 (arguments
1178 `(#:phases
1179 (modify-phases %standard-phases
1180 (replace 'check
1181 (lambda _
1182 ;; Do not run pylint plugin test, as astroid is an old
1183 ;; unsupported version.
1184 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1185 "verboselogs/tests.py"))))))
44d10b1f
RW
1186 (native-inputs
1187 `(("python-mock" ,python-mock)
1760c970 1188 ("python-pytest" ,python-pytest)))
44d10b1f
RW
1189 (home-page "https://verboselogs.readthedocs.io")
1190 (synopsis "Verbose logging level for Python's logging module")
1191 (description
1192 "The @code{verboselogs} package extends Python's @code{logging} module to
1193add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1194 (license license:expat)))
1195
1196(define-public python2-verboselogs
1197 (package-with-python2 python-verboselogs))
1198
1199(define-public python-coloredlogs
1200 (package
1201 (name "python-coloredlogs")
b2b8a39c 1202 (version "10.0")
44d10b1f
RW
1203 (source
1204 (origin
1205 (method url-fetch)
1206 (uri (pypi-uri "coloredlogs" version))
1207 (sha256
1208 (base32
b2b8a39c 1209 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
44d10b1f
RW
1210 (build-system python-build-system)
1211 (arguments
1212 `(;Tests require some updated modules
1213 #:tests? #f))
1214 (propagated-inputs
1215 `(("python-capturer" ,python-capturer)))
1216 (home-page "https://coloredlogs.readthedocs.io")
1217 (synopsis "Colored stream handler for Python's logging module")
1218 (description
1219 "The @code{coloredlogs} package enables colored terminal output for
1220Python's logging module. The @code{ColoredFormatter} class inherits from
1221@code{logging.Formatter} and uses ANSI escape sequences to render your logging
1222messages in color.")
1223 (license license:expat)))
1224
1225(define-public python2-coloredlogs
1226 (package-with-python2 python-coloredlogs))
1227
af760990
VC
1228(define-public python-editorconfig
1229 (package
1230 (name "python-editorconfig")
1231 (version "0.12.2")
1232 (source
1233 (origin
1234 (method url-fetch)
1235 (uri (pypi-uri "EditorConfig" version))
1236 (sha256
1237 (base32
1238 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1239 (build-system python-build-system)
1240 (home-page "https://editorconfig.org/")
1241 (synopsis "EditorConfig bindings for python")
1242 (description "The EditorConfig project consists of a file format for
1243defining coding styles and a collection of text editor plugins that enable
1244editors to read the file format and adhere to defined styles. EditorConfig
1245files are easily readable and they work nicely with version control systems.")
1246 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1247 (license (list license:bsd-2 license:psfl))))
1248
4caf37b0
MC
1249(define-public python-et-xmlfile
1250 (package
1251 (name "python-et-xmlfile")
1252 (version "1.0.1")
1253 (source
1254 (origin
1255 (method url-fetch)
1256 (uri (pypi-uri "et_xmlfile" version))
1257 (sha256
1258 (base32
1259 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1260 (build-system python-build-system)
1261 (arguments
1262 `(#:phases (modify-phases %standard-phases
1263 (replace 'check
1264 (lambda _
1265 (invoke "pytest"))))))
1266 (native-inputs
1267 `(("python-pytest" ,python-pytest)
1268 ("python-lxml" ,python-lxml))) ;used for the tests
1269 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1270 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1271 (description "This Python library is based upon the @code{xmlfile} module
1272from @code{lxml}. It aims to provide a low memory, compatible implementation
1273of @code{xmlfile}.")
1274 (license license:expat)))
1275
1276(define-public python2-et-xmlfile
1277 (package-with-python2 python-et-xmlfile))
1278
a042d348
MC
1279(define-public python-openpyxl
1280 (package
1281 (name "python-openpyxl")
441e6d93 1282 (version "2.6.2")
a042d348
MC
1283 (source
1284 (origin
1285 ;; We use the upstream repository, as the tests are not included in the
1286 ;; PyPI releases.
1287 (method hg-fetch)
1288 (uri (hg-reference
1289 (url "https://bitbucket.org/openpyxl/openpyxl")
1290 (changeset version)))
1291 (file-name (string-append name "-" version "-checkout"))
1292 (sha256
441e6d93 1293 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1294 (build-system python-build-system)
1295 (arguments
1296 `(#:phases (modify-phases %standard-phases
1297 (replace 'check
1298 (lambda _
1299 (invoke "pytest"))))))
1300 (native-inputs
1301 ;; For the test suite.
1302 `(("python-lxml" ,python-lxml)
1303 ("python-pillow" ,python-pillow)
1304 ("python-pytest" ,python-pytest)))
1305 (propagated-inputs
1306 `(("python-et-xmlfile" ,python-et-xmlfile)
1307 ("python-jdcal" ,python-jdcal)))
1308 (home-page "https://openpyxl.readthedocs.io")
1309 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1310 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1311XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1312standard.")
1313 (license license:expat)))
1314
44d10b1f
RW
1315(define-public python-eventlet
1316 (package
1317 (name "python-eventlet")
c9876c9b 1318 (version "0.25.1")
44d10b1f
RW
1319 (source
1320 (origin
1321 (method url-fetch)
1322 (uri (pypi-uri "eventlet" version))
1323 (sha256
1324 (base32
c9876c9b 1325 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
44d10b1f
RW
1326 (build-system python-build-system)
1327 (propagated-inputs
1328 `(("python-greenlet" ,python-greenlet)))
1329 (arguments
1330 ;; TODO: Requires unpackaged 'enum-compat'.
1331 '(#:tests? #f))
bff36617 1332 (home-page "https://eventlet.net")
44d10b1f
RW
1333 (synopsis "Concurrent networking library for Python")
1334 (description
1335 "Eventlet is a concurrent networking library for Python that
1336allows you to change how you run your code, not how you write it.
1337It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1338Coroutines ensure that the developer uses a blocking style of programming
1339that is similar to threading, but provide the benefits of non-blocking I/O.
1340The event dispatch is implicit, which means you can easily use @code{Eventlet}
1341from the Python interpreter, or as a small part of a larger application.")
1342 (license license:expat)))
1343
1344(define-public python2-eventlet
1345 (let ((base (package-with-python2
1346 (strip-python2-variant python-eventlet))))
1347 (package (inherit base)
1348 (propagated-inputs
1349 `(("python2-enum34" ,python2-enum34)
1350 ,@(package-propagated-inputs base))))))
1351
1352(define-public python-six
1353 (package
1354 (name "python-six")
6c58a06e 1355 (version "1.12.0")
44d10b1f
RW
1356 (source
1357 (origin
1358 (method url-fetch)
1359 (uri (pypi-uri "six" version))
1360 (sha256
1361 (base32
6c58a06e 1362 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1363 (build-system python-build-system)
1364 (arguments
1365 `(#:phases
1366 (modify-phases %standard-phases
1367 (replace 'check
1368 (lambda _
1369 (invoke "py.test" "-v"))))))
1370 (native-inputs
1371 `(("python-py" ,python-py)
1372 ("python-pytest" ,python-pytest-bootstrap)))
e85af137 1373 (home-page "https://pypi.org/project/six/")
44d10b1f
RW
1374 (synopsis "Python 2 and 3 compatibility utilities")
1375 (description
1376 "Six is a Python 2 and 3 compatibility library. It provides utility
1377functions for smoothing over the differences between the Python versions with
1378the goal of writing Python code that is compatible on both Python versions.
1379Six supports every Python version since 2.5. It is contained in only one
1380Python file, so it can be easily copied into your project.")
1381 (license license:x11)))
1382
1383(define-public python2-six
1384 (package-with-python2 python-six))
1385
1386(define-public python-six-bootstrap
1387 (package
1388 (inherit python-six)
1389 (name "python-six-bootstrap")
1390 (native-inputs `())
1391 (arguments `(#:tests? #f))))
1392
1393(define-public python2-six-bootstrap
1394 (package-with-python2 python-six-bootstrap))
1395
1396(define-public python-schedule
1397 (package
1398 (name "python-schedule")
1399 (version "0.4.3")
1400 (source
1401 (origin
1402 (method url-fetch)
1403 (uri (pypi-uri "schedule" version))
1404 (sha256
1405 (base32
1406 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1407 (build-system python-build-system)
1408 (native-inputs
1409 `(("python-pytest" ,python-pytest)
1410 ("python-mock" ,python-mock)))
1411 (home-page "https://github.com/dbader/schedule")
1412 (synopsis "Schedule periodic function calls in Python")
1413 (description
1414 "Schedule is an in-process scheduler for periodic jobs that uses the
1415builder pattern for configuration. Schedule lets you run Python functions (or
1416any other callable) periodically at pre-determined intervals using a simple,
1417human-friendly syntax.")
1418 (license license:expat)))
1419
1420(define-public python2-schedule
1421 (package-with-python2 python-schedule))
1422
44d10b1f
RW
1423(define-public python2-mechanize
1424 (package
1425 (name "python2-mechanize")
1426 (version "0.2.5")
1427 (source
1428 (origin
1429 (method url-fetch)
1cc184e6 1430 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1431 (sha256
1432 (base32
1433 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1434 (build-system python-build-system)
1435 (arguments
1436 `(#:python ,python-2 ; apparently incompatible with Python 3
1437 #:tests? #f))
1438 ;; test fails with message
1439 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1440 ;; (python-3.3.2) or
1441 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1442 ;; (python-2.7.5).
1443 ;; The source code is from March 2011 and probably not up-to-date
1444 ;; with respect to python unit tests.
1445 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1446 (synopsis
1447 "Stateful programmatic web browsing in Python")
1448 (description
1449 "Mechanize implements stateful programmatic web browsing in Python,
1450after Andy Lester’s Perl module WWW::Mechanize.")
1451 (license (license:non-copyleft
1452 "file://COPYING"
1453 "See COPYING in the distribution."))))
1454
1455
1456(define-public python-simplejson
1457 (package
1458 (name "python-simplejson")
1459 (version "3.14.0")
1460 (source
1461 (origin
1462 (method url-fetch)
1463 (uri (pypi-uri "simplejson" version))
1464 (sha256
1465 (base32
1466 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1467 (build-system python-build-system)
1468 (home-page "http://simplejson.readthedocs.org/en/latest/")
1469 (synopsis
1470 "Json library for Python")
1471 (description
1472 "JSON (JavaScript Object Notation) is a subset of JavaScript
1473syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1474format.
1475
1476Simplejson exposes an API familiar to users of the standard library marshal
1477and pickle modules. It is the externally maintained version of the json
1478library contained in Python 2.6, but maintains compatibility with Python 2.5
1479and (currently) has significant performance advantages, even without using
1480the optional C extension for speedups. Simplejson is also supported on
1481Python 3.3+.")
1482 (license license:x11)))
1483
1484(define-public python2-simplejson
1485 (package-with-python2 python-simplejson))
1486
1487
1488(define-public python-pyicu
1489 (package
1490 (name "python-pyicu")
dc23bb45 1491 (version "2.3.1")
44d10b1f
RW
1492 (source
1493 (origin
1494 (method url-fetch)
1495 (uri (pypi-uri "PyICU" version))
1496 (sha256
1497 (base32
dc23bb45 1498 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1499 (build-system python-build-system)
1500 (inputs
1501 `(("icu4c" ,icu4c)))
1502 (native-inputs
1503 `(("python-pytest" ,python-pytest)
1504 ("python-six" ,python-six)))
1505 (home-page "https://github.com/ovalhub/pyicu")
1506 (synopsis "Python extension wrapping the ICU C++ API")
1507 (description
1508 "PyICU is a python extension wrapping the ICU C++ API.")
1509 (properties `((python2-variant . ,(delay python2-pyicu))))
1510 (license license:x11)))
1511
1512(define-public python2-pyicu
1513 (let ((base (package-with-python2
1514 (strip-python2-variant python-pyicu))))
1515 (package
1516 (inherit base)
1517 (arguments
1518 `(,@(package-arguments base)
1519 #:phases
1520 (modify-phases %standard-phases
1521 (add-before 'check 'delete-failing-test
1522 (λ _
1523 ;; XXX: This fails due to Unicode issues unique to Python 2,
1524 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1525 (delete-file "test/test_Script.py")
1526 #t))))))))
1527
1528(define-public python2-dogtail
1529 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1530 ;; spaces in indentation" with Python 3.
1531 (package
1532 (name "python2-dogtail")
1533 (version "0.9.9")
1534 (source (origin
1535 (method url-fetch)
1536 (uri (pypi-uri "dogtail" version))
1537 (sha256
1538 (base32
1539 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1540 (build-system python-build-system)
1541 (arguments `(#:python ,python-2
1542 #:tests? #f)) ; invalid command "test"
1543 ;; Currently no offical homepage.
e85af137 1544 (home-page "https://pypi.org/project/dogtail/")
44d10b1f
RW
1545 (synopsis "GUI test tool and automation framework written in Python")
1546 (description
1547 "Dogtail is a GUI test tool and automation framework written in Python.
1548It uses Accessibility (a11y) technologies to communicate with desktop
1549applications. dogtail scripts are written in Python and executed like any
1550other Python program.")
1551 (license license:gpl2+)))
1552
1553(define-public python-empy
1554 (package
1555 (name "python-empy")
0f6d5115 1556 (version "3.3.3")
44d10b1f
RW
1557 (source (origin
1558 (method url-fetch)
1559 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1560 version ".tar.gz"))
1561 (sha256
1562 (base32
0f6d5115 1563 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1564 (build-system python-build-system)
1565 (arguments
0f6d5115 1566 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1567 (home-page "http://www.alcyone.com/software/empy/")
1568 (synopsis "Templating system for Python")
1569 (description
1570 "EmPy is a system for embedding Python expressions and statements in
1571template text; it takes an EmPy source file, processes it, and produces
1572output. This is accomplished via expansions, which are special signals to the
1573EmPy system and are set off by a special prefix (by default the at sign, @@).
1574EmPy can expand arbitrary Python expressions and statements in this way, as
1575well as a variety of special forms. Textual data not explicitly delimited in
1576this way is sent unaffected to the output, allowing Python to be used in
1577effect as a markup language. Also supported are callbacks via hooks,
1578recording and playback via diversions, and dynamic, chainable filters. The
1579system is highly configurable via command line options and embedded
1580commands.")
1581 (license license:lgpl2.1+)))
1582
1583(define-public python2-empy
0f064242
TGR
1584 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1585 (package
1586 (inherit base)
1587 (arguments `(,@(package-arguments base)
1588 #:tests? #t)))))
44d10b1f
RW
1589
1590(define-public python2-element-tree
1591 (package
1592 (name "python2-element-tree")
1593 (version "1.2.6")
1594 (source (origin
1595 (method url-fetch)
1596 (uri (string-append
1597 "http://effbot.org/media/downloads/elementtree-"
1598 version "-20050316.tar.gz"))
1599 (sha256
1600 (base32
1601 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1602 (build-system python-build-system)
1603 (arguments
1604 `(#:python ,python-2 ; seems to be part of Python 3
1605 #:tests? #f)) ; no 'test' sub-command
1606 (synopsis "Toolkit for XML processing in Python")
1607 (description
1608 "ElementTree is a Python library supporting lightweight XML processing.")
8c9b6f32 1609 (home-page "https://effbot.org/zone/element-index.htm")
44d10b1f
RW
1610 (license (license:x11-style
1611 "http://docs.python.org/2/license.html"
1612 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1613
1614(define-public python2-pybugz
1615 (package
1616 (name "python2-pybugz")
1617 (version "0.6.11")
1618 (source (origin
1619 (method url-fetch)
1620 (uri (string-append
1621 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1622 version ".tar.gz"))
1623 (sha256
1624 (base32
1625 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1626 (patches (search-patches "pybugz-stty.patch"
1627 "pybugz-encode-error.patch"))))
1628 (build-system python-build-system)
1629 (arguments
1630 `(#:python ,python-2 ; SyntaxError with Python 3
1631 #:tests? #f)) ; no 'test' sub-command
1632 (propagated-inputs
1633 `(("element-tree" ,python2-element-tree)))
1634 (synopsis "Python and command-line interface to Bugzilla")
1635 (description
1636 "PyBugz is a Python library and command-line tool to query the Bugzilla
1637bug tracking system. It is meant as an aid to speed up interaction with the
1638bug tracker.")
1639 (home-page "http://www.liquidx.net/pybugz/")
1640 (license license:gpl2)))
1641
1642(define-public python2-enum
1643 (package
1644 (name "python2-enum")
1645 (version "0.4.6")
1646 (source (origin
1647 (method url-fetch)
1648 (uri (pypi-uri "enum" version))
1649 (sha256
1650 (base32
1651 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1652 (build-system python-build-system)
1653 (arguments
1654 `(#:python ,python-2))
e85af137 1655 (home-page "https://pypi.org/project/enum/")
44d10b1f
RW
1656 (synopsis "Robust enumerated type support in Python")
1657 (description
1658 "This provides a module for robust enumerations in Python. It has
1659been superseded by the Python standard library and is provided only for
1660compatibility.")
1661 ;; Choice of either license.
1662 (license (list license:gpl3+ license:psfl))))
1663
1664(define-public python-enum34
1665 (package
1666 (name "python-enum34")
1667 (version "1.1.6")
1668 (source
1669 (origin
1670 (method url-fetch)
1671 (uri (pypi-uri "enum34" version))
1672 (sha256
1673 (base32
1674 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1675 (build-system python-build-system)
e85af137 1676 (home-page "https://pypi.org/project/enum34/")
44d10b1f
RW
1677 (synopsis "Backported Python 3.4 Enum")
1678 (description
1679 "Enum34 is the new Python stdlib enum module available in Python 3.4
1680backported for previous versions of Python from 2.4 to 3.3.")
1681 (license license:bsd-3)))
1682
1683(define-public python2-enum34
1684 (package-with-python2 python-enum34))
1685
1686(define-public python-parse-type
1687 (package
1688 (name "python-parse-type")
1689 (version "0.4.2")
1690 (source
1691 (origin
1692 (method url-fetch)
1693 (uri (pypi-uri "parse_type" version))
1694 (sha256
1695 (base32
1696 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1697 (build-system python-build-system)
1698 (propagated-inputs
1699 `(("python-six" ,python-six)
1700 ("python-parse" ,python-parse)))
1701 (native-inputs
1702 `(("python-pytest" ,python-pytest)
1703 ("python-pytest-runner" ,python-pytest-runner)))
1704 (home-page "https://github.com/jenisys/parse_type")
1705 (synopsis "Extended parse module")
1706 (description
1707 "Parse_type extends the python parse module.")
1708 (properties
1709 `((python2-variant . ,(delay python2-parse-type))))
1710 (license license:bsd-3)))
1711
1712(define-public python2-parse-type
1713 (let ((base (package-with-python2
1714 (strip-python2-variant python-parse-type))))
1715 (package (inherit base)
1716 (propagated-inputs
1717 `(("python2-enum34" ,python2-enum34)
1718 ,@(package-propagated-inputs base))))))
1719
1720(define-public python-parse
1721 (package
1722 (name "python-parse")
1723 (version "1.8.4")
1724 (source
1725 (origin
1726 (method url-fetch)
1727 (uri (pypi-uri "parse" version))
1728 (sha256
1729 (base32
1730 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1731 (build-system python-build-system)
1732 (arguments
1733 `(#:phases
1734 (modify-phases %standard-phases
1735 (replace 'check
1736 (lambda _ (invoke "python" "test_parse.py"))))))
1737 (home-page "https://github.com/r1chardj0n3s/parse")
1738 (synopsis "Parse strings")
1739 (description
1740 "Parse strings using a specification based on the Python @code{format()}
1741syntax.")
1742 (license license:x11)))
1743
1744(define-public python-polib
1745 (package
1746 (name "python-polib")
1747 (version "1.0.8")
1748 (source (origin
1749 (method url-fetch)
1750 (uri (pypi-uri "polib" version))
1751 (sha256
1752 (base32
1753 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1754 (build-system python-build-system)
1755 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1756 (synopsis "Manipulate, create and modify gettext files")
1757 (description "Polib can manipulate any gettext format (po, pot and mo)
1758files. It can be used to create po files from scratch or to modify
1759existing ones.")
1760 (license license:expat)))
1761
1762(define-public python2-polib
1763 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1764 (package
1765 (inherit base)
1766 (arguments `(,@(package-arguments base)
1767 ;; Tests don't work with python2.
1768 #:tests? #f)))))
1769
6830120e
TLC
1770(define-public python-poyo
1771 (package
1772 (name "python-poyo")
1773 (version "0.5.0")
1774 (source
1775 (origin
1776 (method url-fetch)
1777 (uri (pypi-uri "poyo" version))
1778 (sha256
1779 (base32
1780 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1781 (build-system python-build-system)
1782 (home-page "https://github.com/hackebrot/poyo")
1783 (synopsis "Lightweight YAML Parser for Python")
1784 (description
1785 "This package provides a lightweight YAML Parser for Python. It supports
1786only a chosen subset of the YAML format that is required to parse cookiecutter
1787user configuration files. It does not have support for serializing into YAML
1788and is not compatible with JSON.")
1789 (license license:expat)))
1790
44d10b1f
RW
1791(define-public scons
1792 (package
1793 (name "scons")
05487ed8 1794 (version "3.0.4")
44d10b1f 1795 (source (origin
ad34338d
RW
1796 (method git-fetch)
1797 (uri (git-reference
1798 (url "https://github.com/SCons/scons.git")
1799 (commit version)))
1800 (file-name (git-file-name name version))
44d10b1f
RW
1801 (sha256
1802 (base32
05487ed8 1803 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1804 (build-system python-build-system)
1805 (arguments
1806 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1807 #:tests? #f ; no 'python setup.py test' command
1808 #:phases
1809 (modify-phases %standard-phases
1810 (add-before 'build 'bootstrap
1811 (lambda _
1812 (substitute* "src/engine/SCons/compat/__init__.py"
1813 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1814 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1815 (substitute* "src/engine/SCons/Platform/__init__.py"
1816 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1817 "mod = __import__(full_name)"))
ad34338d
RW
1818 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1819 (chdir "build/scons")
1820 #t)))))
3602de33 1821 (home-page "https://scons.org/")
44d10b1f
RW
1822 (synopsis "Software construction tool written in Python")
1823 (description
1824 "SCons is a software construction tool. Think of SCons as an improved,
1825cross-platform substitute for the classic Make utility with integrated
1826functionality similar to autoconf/automake and compiler caches such as ccache.
1827In short, SCons is an easier, more reliable and faster way to build
1828software.")
1829 (license license:x11)))
1830
1831(define-public scons-python2
1832 (package
1833 (inherit (package-with-python2 scons))
1834 (name "scons-python2")))
1835
1836(define-public python-extras
1837 (package
1838 (name "python-extras")
1839 (version "1.0.0")
1840 (source
1841 (origin
1842 (method url-fetch)
1843 (uri (pypi-uri "extras" version))
1844 (sha256
1845 (base32
1846 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1847 (build-system python-build-system)
1848 (arguments
1849 ;; FIXME: Circular dependency on testtools.
1850 '(#:tests? #f))
1851 (home-page "https://github.com/testing-cabal/extras")
1852 (synopsis "Useful extensions to the Python standard library")
1853 (description
1854 "Extras is a set of extensions to the Python standard library.")
1855 (license license:expat)))
1856
1857(define-public python2-extras
1858 (package-with-python2 python-extras))
1859
1860(define-public python-mimeparse
1861 (package
1862 (name "python-mimeparse")
1863 (version "1.6.0")
1864 (source
1865 (origin
1866 (method url-fetch)
89bf667c 1867 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1868 (sha256
1869 (base32
1870 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1871 (build-system python-build-system)
1872 (arguments
1873 '(#:phases
1874 (modify-phases %standard-phases
1875 (replace 'check
1876 (lambda _
1877 (invoke "./mimeparse_test.py"))))))
1878 (home-page
1879 "https://github.com/dbtsai/python-mimeparse")
1880 (synopsis "Python library for parsing MIME types")
1881 (description
1882 "Mimeparse provides basic functions for parsing MIME type names and
1883matching them against a list of media-ranges.")
1884 (license license:expat)))
1885
1886(define-public python2-mimeparse
1887 (package-with-python2 python-mimeparse))
1888
1889(define-public python-miniboa
1890 (package
1891 (name "python-miniboa")
1892 (version "1.0.7")
1893 (source
1894 (origin
1895 (method url-fetch)
1896 (uri (pypi-uri "miniboa" version))
1897 (sha256
1898 (base32
1899 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1900 (build-system python-build-system)
1901 (home-page "https://github.com/shmup/miniboa")
1902 (synopsis "Simple, single-threaded Telnet server")
1903 (description
1904 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1905server.")
1906 (license license:asl2.0)))
1907
1908(define-public python2-miniboa
1909 (package-with-python2 python-miniboa))
1910
1911(define-public python-pafy
1912 (package
1913 (name "python-pafy")
1914 (version "0.5.3.1")
1915 (source
1916 (origin
1917 (method url-fetch)
1918 (uri (pypi-uri "pafy" version))
1919 (sha256
1920 (base32
1921 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1922 (build-system python-build-system)
1923 (arguments
1924 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1925 (propagated-inputs
1926 ;; Youtube-dl is a python package which is imported in the file
1927 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1928 `(("youtube-dl" ,youtube-dl)))
1929 (home-page "https://np1.github.io/pafy/")
1930 (synopsis "Retrieve YouTube content and metadata")
1931 (description
1932 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1933 (license license:lgpl3+)))
1934
1935(define-public python2-funcsigs
1936 (package
1937 (name "python2-funcsigs")
1938 (version "1.0.2")
1939 (source (origin
1940 (method url-fetch)
1941 (uri (pypi-uri "funcsigs" version))
1942 (sha256
1943 (base32
1944 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1945 (build-system python-build-system)
1946 (arguments
1947 `(#:python ,python-2))
1948 (native-inputs
1949 `(("python2-unittest2" ,python2-unittest2)))
1950 (home-page "http://funcsigs.readthedocs.org")
1951 (synopsis "Python function signatures from PEP362")
1952 (description
1953 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1954 (license license:asl2.0)))
1955
1956(define-public python2-funcsigs-bootstrap
1957 (package
1958 (inherit python2-funcsigs)
1959 (name "python2-funcsigs-bootstrap")
1960 (native-inputs `())
1961 (arguments
1962 `(#:tests? #f
1963 ,@(package-arguments python2-funcsigs)))))
1964
1965(define-public python-py
1966 (package
1967 (name "python-py")
08eba545 1968 (version "1.8.0")
44d10b1f
RW
1969 (source
1970 (origin
1971 (method url-fetch)
1972 (uri (pypi-uri "py" version))
1973 (sha256
1974 (base32
08eba545 1975 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1976 (build-system python-build-system)
1977 (arguments
1978 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1979 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1980 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1981 ;; Is this module globally installed?"
1982 '(#:tests? #f))
1983 (native-inputs
1984 `(("python-setuptools-scm" ,python-setuptools-scm)))
1985 (home-page "https://github.com/pytest-dev/py")
1986 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1987 (description
1988 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1989code introspection, and logging.")
1990 (license license:expat)))
1991
1992(define-public python2-py
1993 (package-with-python2 python-py))
1994
1995;; Recent versions of python-fixtures and python-testrepository need
1996;; python-pbr for packaging, which itself needs these two packages for
1997;; testing.
1998;; To fix this circular dependency, we use a build of python-pbr, based on the
1999;; same source, just without any test dependencies and with tests disabled.
2000;; python-pbr-minmal is then used to package python-fixtures and
2001;; python-testrepository.
2002;; Strictly speaking we currently could remove the test-requirements from the
2003;; normal python-pbr package (and save this package) since test are disabled
2004;; there anyway. But this may change in future.
2005(define-public python-pbr-minimal
2006 (package
2007 (name "python-pbr-minimal")
2008 (version "3.0.1")
2009 (source
2010 (origin
2011 (method url-fetch)
2012 (uri (pypi-uri "pbr" version))
2013 (sha256
2014 (base32
2015 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2016 (build-system python-build-system)
2017 (arguments
2018 `(#:tests? #f))
58d4e949 2019 (home-page "https://docs.openstack.org/pbr/latest/")
44d10b1f
RW
2020 (synopsis "Minimal build of python-pbr used for bootstrapping")
2021 (description
2022 "Used only for bootstrapping python2-pbr, you should not need this.")
2023 (license license:asl2.0)))
2024
2025(define-public python2-pbr-minimal
2026 (package-with-python2 python-pbr-minimal))
2027
2028(define-public python-pbr
2029 (package
2030 (inherit python-pbr-minimal)
2031 (name "python-pbr")
2032 (arguments
2033 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2034 (propagated-inputs
2035 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2036 (native-inputs
2037 `(("python-fixtures" ,python-fixtures-bootstrap)
2038 ;; discover, coverage, hacking, subunit
2039 ("python-mock" ,python-mock)
2040 ("python-six" ,python-six)
2041 ("python-sphinx" ,python-sphinx)
2042 ("python-testrepository" ,python-testrepository-bootstrap)
2043 ("python-testresources" ,python-testresources-bootstrap)
2044 ("python-testscenarios" ,python-testscenarios-bootstrap)
2045 ("python-testtools" ,python-testtools-bootstrap)
2046 ("python-virtualenv" ,python-virtualenv)))
2047 (synopsis "Enhance the default behavior of Python’s setuptools")
2048 (description
2049 "Python Build Reasonableness (PBR) is a library that injects some useful
2050and sensible default behaviors into your setuptools run. It will set
2051versions, process requirements files and generate AUTHORS and ChangeLog file
2052from git information.
2053")))
2054
2055(define-public python2-pbr
2056 (package-with-python2 python-pbr))
2057
ea43f0d5
MB
2058(define-public python-pyrsistent
2059 (package
2060 (name "python-pyrsistent")
c19930dc 2061 (version "0.15.7")
ea43f0d5
MB
2062 (home-page "https://github.com/tobgu/pyrsistent")
2063 (source (origin
2064 (method url-fetch)
2065 (uri (pypi-uri "pyrsistent" version))
2066 (sha256
2067 (base32
c19930dc 2068 "103j63g6lb5dfspph96zxjdpnq9h991kazd4f09ddgkpxpivbiyd"))))
ea43f0d5
MB
2069 (build-system python-build-system)
2070 (native-inputs
2071 `(("python-hypothesis" ,python-hypothesis)
2072 ("python-pytest" ,python-pytest)
2073 ("python-pytest-runner" ,python-pytest-runner)))
2074 (propagated-inputs
2075 `(("python-six" ,python-six)))
2076 (synopsis "Persistent data structures for Python")
2077 (description
2078 "Pyrsistent is a number of persistent collections (by some referred to as
2079functional data structures). Persistent in the sense that they are immutable.
2080
2081All methods on a data structure that would normally mutate it instead return a
2082new copy of the structure containing the requested updates. The original
2083structure is left untouched.")
2084 (license license:expat)))
2085
2086(define-public python2-pyrsistent
2087 (package-with-python2 python-pyrsistent))
2088
44d10b1f
RW
2089(define-public python-exif-read
2090 (package
2091 (name "python-exif-read")
2092 (version "2.1.2")
2093 (source (origin
2094 (method url-fetch)
2095 (uri (pypi-uri "ExifRead" version))
2096 (sha256
2097 (base32
2098 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2099 (build-system python-build-system)
2100 (arguments `(#:tests? #f)) ; no tests
2101 (home-page "https://github.com/ianare/exif-py")
2102 (synopsis "Python library to extract EXIF data from image files")
2103 (description
2104 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2105files.")
2106 (license license:bsd-3)))
2107
2108(define-public python2-exif-read
2109 (package-with-python2 python-exif-read))
2110
2111(define-public python-pyld
2112 (package
2113 (name "python-pyld")
6d4ed78d 2114 (version "1.0.5")
44d10b1f
RW
2115 (source (origin
2116 (method url-fetch)
2117 (uri (pypi-uri "PyLD" version))
2118 (sha256
2119 (base32
6d4ed78d 2120 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
44d10b1f
RW
2121 (build-system python-build-system)
2122 (home-page "https://github.com/digitalbazaar/pyld")
2123 (synopsis "Python implementation of the JSON-LD specification")
2124 (description
2125 "PyLD is an implementation of the JSON-LD specification.")
2126 (license license:bsd-3)))
2127
2128(define-public python2-pyld
2129 (package-with-python2 python-pyld))
2130
2131(define-public python-click
2132 (package
2133 (name "python-click")
61984855 2134 (version "7.0")
44d10b1f
RW
2135 (source
2136 (origin
2137 (method url-fetch)
2138 (uri (pypi-uri "click" version))
2139 (sha256
2140 (base32
61984855 2141 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
2142 (build-system python-build-system)
2143 (arguments
8d7e7ca6 2144 `(#:phases
44d10b1f
RW
2145 (modify-phases %standard-phases
2146 (add-after 'unpack 'fix-paths
2147 (lambda* (#:key inputs #:allow-other-keys)
2148 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2149 "cross-libc" "libc"))))
2150 (substitute* "click/_unicodefun.py"
2151 (("'locale'")
2152 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
2153 #t))
2154 (replace 'check
2155 (lambda _
2156 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
2157 (native-inputs
2158 `(("python-pytest" ,python-pytest)))
61984855 2159 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
2160 (synopsis "Command line library for Python")
2161 (description
2162 "Click is a Python package for creating command line interfaces in a
2163composable way with as little code as necessary. Its name stands for
2164\"Command Line Interface Creation Kit\". It's highly configurable but comes
2165with sensible defaults out of the box.")
2166 (license license:bsd-3)))
2167
2168(define-public python2-click
2169 (package-with-python2 python-click))
2170
2171(define-public python-wheel
2172 (package
2173 (name "python-wheel")
8f137daf 2174 (version "0.33.6")
44d10b1f
RW
2175 (source
2176 (origin
2177 (method url-fetch)
2178 (uri (pypi-uri "wheel" version))
2179 (sha256
2180 (base32
8f137daf 2181 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
44d10b1f 2182 (build-system python-build-system)
8f137daf
MB
2183 (arguments
2184 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2185 ;; fails to find the newly-built bdist_wheel library, even though it is
2186 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2187 '(#:tests? #f))
44d10b1f
RW
2188 (home-page "https://bitbucket.org/pypa/wheel/")
2189 (synopsis "Format for built Python packages")
2190 (description
2191 "A wheel is a ZIP-format archive with a specially formatted filename and
2192the @code{.whl} extension. It is designed to contain all the files for a PEP
2193376 compatible install in a way that is very close to the on-disk format. Many
2194packages will be properly installed with only the @code{Unpack} step and the
2195unpacked archive preserves enough information to @code{Spread} (copy data and
2196scripts to their final locations) at any later time. Wheel files can be
2197installed with a newer @code{pip} or with wheel's own command line utility.")
8f137daf 2198 (license license:expat)))
44d10b1f
RW
2199
2200(define-public python2-wheel
8f137daf 2201 (package-with-python2 python-wheel))
44d10b1f
RW
2202
2203(define-public python-vcversioner
2204 (package
2205 (name "python-vcversioner")
2206 (version "2.16.0.0")
2207 (source
2208 (origin
2209 (method url-fetch)
2210 (uri (pypi-uri "vcversioner" version))
2211 (sha256
2212 (base32
2213 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2214 (build-system python-build-system)
2215 (synopsis "Python library for version number discovery")
2216 (description "Vcversioner is a Python library that inspects tagging
2217information in a variety of version control systems in order to discover
2218version numbers.")
2219 (home-page "https://github.com/habnabit/vcversioner")
2220 (license license:isc)))
2221
2222(define-public python2-vcversioner
2223 (package-with-python2 python-vcversioner))
2224
5591fc4f
MC
2225(define-public python-jdcal
2226 (package
2227 (name "python-jdcal")
2228 (version "1.4")
2229 (source
2230 (origin
2231 (method url-fetch)
2232 (uri (pypi-uri "jdcal" version))
2233 (sha256
2234 (base32
2235 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2236 (build-system python-build-system)
2237 (arguments
2238 `(#:phases (modify-phases %standard-phases
2239 (replace 'check
2240 (lambda _
2241 (invoke "pytest"))))))
2242 (native-inputs
2243 `(("python-pytest" ,python-pytest)))
2244 (home-page "https://github.com/phn/jdcal")
2245 (synopsis "Functions to convert between Julian dates Gregorian dates")
2246 (description "This Python library provides functions for converting
2247between Julian dates and Gregorian dates.")
2248 (license license:bsd-2)))
2249
2250(define-public python2-jdcal
2251 (package-with-python2 python-jdcal))
2252
06d41d8d
VC
2253(define-public python-jsondiff
2254 (package
2255 (name "python-jsondiff")
2256 (version "1.2.0")
2257 (source
2258 (origin
2259 (method url-fetch)
2260 (uri (pypi-uri "jsondiff" version))
2261 (sha256
2262 (base32
2263 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2264 (build-system python-build-system)
2265 (native-inputs
2266 `(("python-nose" ,python-nose)
2267 ("python-nose-random" ,python-nose-random)))
2268 (home-page
2269 "https://github.com/fzumstein/jsondiff")
2270 (synopsis "Compare JSON and JSON-like structures in Python")
2271 (description "@code{jsondiff} is a Python library which lets you
2272compare, diff, and patch JSON and JSON-like structures in Python.")
2273 (license license:expat)))
2274
44d10b1f
RW
2275(define-public python-jsonschema
2276 (package
2277 (name "python-jsonschema")
a356d1b6 2278 (version "3.2.0")
44d10b1f
RW
2279 (source (origin
2280 (method url-fetch)
786ccb87 2281 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
2282 (sha256
2283 (base32
a356d1b6 2284 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
44d10b1f
RW
2285 (build-system python-build-system)
2286 (arguments
2287 '(#:phases
2288 (modify-phases %standard-phases
1adde06e 2289 (replace 'check
a356d1b6
TLC
2290 (lambda* (#:key inputs outputs #:allow-other-keys)
2291 (add-installed-pythonpath inputs outputs)
1adde06e
MB
2292 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2293 (invoke "trial" "jsonschema"))))))
44d10b1f 2294 (native-inputs
1adde06e
MB
2295 `(("python-setuptools_scm" ,python-setuptools-scm)
2296 ("python-twisted" ,python-twisted)))
2297 (propagated-inputs
2298 `(("python-attrs" ,python-attrs)
a356d1b6 2299 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
1adde06e
MB
2300 ("python-pyrsistent" ,python-pyrsistent)
2301 ("python-six" ,python-six)))
44d10b1f
RW
2302 (home-page "https://github.com/Julian/jsonschema")
2303 (synopsis "Implementation of JSON Schema for Python")
2304 (description
2305 "Jsonschema is an implementation of JSON Schema for Python.")
2306 (license license:expat)
2307 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2308
2309(define-public python2-jsonschema
2310 (let ((jsonschema (package-with-python2
2311 (strip-python2-variant python-jsonschema))))
2312 (package (inherit jsonschema)
44d10b1f 2313 (propagated-inputs
1adde06e
MB
2314 `(("python2-functools32" ,python2-functools32)
2315 ,@(package-propagated-inputs jsonschema))))))
44d10b1f
RW
2316
2317(define-public python-schema
2318 (package
2319 (name "python-schema")
2320 (version "0.6.6")
2321 (source
2322 (origin
2323 (method url-fetch)
2324 (uri (pypi-uri "schema" version))
2325 (sha256
2326 (base32
2327 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2328 (build-system python-build-system)
2329 (native-inputs
2330 `(("python-pytest" ,python-pytest)))
2331 (home-page "https://github.com/keleshev/schema")
2332 (synopsis "Simple data validation library")
2333 (description
2334 "@code{python-schema} is a library for validating Python data
2335structures, such as those obtained from config-files, forms, external
2336services or command-line parsing, converted from JSON/YAML (or
2337something else) to Python data-types.")
2338 (license license:psfl)))
2339
2340(define-public python2-schema
2341 (package-with-python2 python-schema))
2342
2343(define-public python-schema-0.5
2344 (package (inherit python-schema)
2345 (version "0.5.0")
2346 (source
2347 (origin
2348 (method url-fetch)
2349 (uri (pypi-uri "schema" version))
2350 (sha256
2351 (base32
2352 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2353
2354(define-public python2-schema-0.5
2355 (package-with-python2 python-schema-0.5))
2356
2357(define-public python-kitchen
2358 (package
2359 (name "python-kitchen")
2360 (version "1.2.5")
2361 (source
2362 (origin
2363 (method url-fetch)
2364 (uri (pypi-uri "kitchen" version))
2365 (sha256
2366 (base32
2367 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2368 (build-system python-build-system)
2369 (propagated-inputs
2370 `(("python-chardet" ,python-chardet)))
2371 (home-page "https://github.com/fedora-infra/kitchen")
2372 (synopsis "Python API for snippets")
2373 (description "@code{kitchen} module provides a python API for all sorts of
2374little useful snippets of code that everybody ends up writing for their projects
2375but never seem big enough to build an independent release. Use kitchen and stop
2376cutting and pasting that code over and over.")
2377 (license (list license:lgpl2.1+
2378 ;; subprocess.py, test_subprocess.py,
2379 ;; kitchen/pycompat25/defaultdict.py:
2380 license:psfl))))
2381
2382(define-public python2-kitchen
2383 (package-with-python2 python-kitchen))
2384
2385(define-public python-unidecode
2386 (package
2387 (name "python-unidecode")
eb80a300 2388 (version "1.1.1")
44d10b1f
RW
2389 (source (origin
2390 (method url-fetch)
2391 (uri (pypi-uri "Unidecode" version))
2392 (sha256
2393 (base32
eb80a300 2394 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
44d10b1f 2395 (build-system python-build-system)
e85af137 2396 (home-page "https://pypi.org/project/Unidecode/")
44d10b1f
RW
2397 (synopsis "ASCII transliterations of Unicode text")
2398 (description
2399 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2400useful when integrating with legacy code that doesn't support Unicode, or for
2401ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2402machine identifiers from human-readable Unicode strings that should still be
2403somewhat intelligible.")
2404 (license license:gpl2+)))
2405
2406(define-public python2-unidecode
2407 (package-with-python2 python-unidecode))
2408
9f933527
MB
2409(define-public python-text-unidecode
2410 (package
2411 (name "python-text-unidecode")
2412 (version "1.3")
2413 (source (origin
2414 (method url-fetch)
2415 (uri (pypi-uri "text-unidecode" version))
2416 (sha256
2417 (base32
2418 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2419 (build-system python-build-system)
2420 (arguments
2421 '(#:phases (modify-phases %standard-phases
2422 (replace 'check
2423 (lambda _
2424 (setenv "PYTHONPATH"
2425 (string-append "./build/lib:"
2426 (getenv "PYTHONPATH")))
2427 (invoke "pytest" "-vv"))))))
2428 (native-inputs
2429 `(("python-pytest" ,python-pytest)))
2430 (home-page "https://github.com/kmike/text-unidecode/")
2431 (synopsis "Decode Unicode data")
2432 (description
2433 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2434Perl library. It can create ASCII representations of Unicode data. In general
2435users should prefer the @code{python-unidecode} package which offers better
2436memory usage and transliteration quality.")
2437 ;; The user can choose either license.
2438 (license (list license:clarified-artistic license:gpl2+))))
2439
2440(define-public python2-text-unidecode
2441 (package-with-python2 python-text-unidecode))
2442
44d10b1f
RW
2443(define-public python-pyjwt
2444 (package
2445 (name "python-pyjwt")
be6f2f56 2446 (version "1.7.1")
44d10b1f
RW
2447 (source
2448 (origin
2449 (method url-fetch)
2450 (uri (pypi-uri "PyJWT" version))
2451 (sha256
2452 (base32
be6f2f56 2453 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
44d10b1f
RW
2454 (modules '((guix build utils)))
2455 (snippet
2456 '(begin
2457 (for-each delete-file-recursively
2458 (find-files "." "\\.pyc$"))
2459 #t))))
2460 (build-system python-build-system)
2461 (native-inputs
2462 `(("python-pytest" ,python-pytest)
2463 ("python-pytest-cov" ,python-pytest-cov)
2464 ("python-pytest-runner" ,python-pytest-runner)))
2465 (home-page "https://github.com/progrium/pyjwt")
2466 (synopsis "JSON Web Token implementation in Python")
2467 (description
2468 "PyJWT is a JSON Web Token implementation written in Python.")
2469 (license license:expat)))
2470
2471(define-public python2-pyjwt
2472 (package-with-python2 python-pyjwt))
2473
2474(define-public python-pykka
2475 (package
2476 (name "python-pykka")
2477 (version "1.2.1")
2478 (source
2479 (origin
2480 (method url-fetch)
2481 (uri (pypi-uri "Pykka" version))
2482 (sha256
2483 (base32
2484 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2485 (build-system python-build-system)
2486 (native-inputs
2487 `(("python-mock" ,python-mock)
2488 ("python-nose" ,python-nose)
2489 ("python-gevent" ,python-gevent)
2490 ("python-eventlet" ,python-eventlet)))
2491 (home-page "https://www.pykka.org/")
2492 (synopsis "Pykka is a Python implementation of the actor model")
2493 (description
2494 "Pykka is a Python implementation of the actor model.
2495The actor model introduces some simple rules to control the sharing
2496of state and cooperation between execution units, which makes it
2497easier to build concurrent applications.")
2498 (license license:asl2.0)))
2499
2500(define-public python2-pykka
2501 (package-with-python2 python-pykka))
2502
8d22f7e3
VC
2503(define-public python-pymsgbox
2504 (package
2505 (name "python-pymsgbox")
2506 (version "1.0.6")
2507 (source
2508 (origin
2509 (method git-fetch)
2510 (uri (git-reference
2511 ;; LICENSE.txt is not present on pypi
2512 (url "https://github.com/asweigart/PyMsgBox")
2513 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2514 (file-name (git-file-name name version))
2515 (sha256
2516 (base32
2517 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2518 (arguments
2519 ;; Circular dependency to run tests:
2520 ;; Tests need pyautogui, which depends on pymsgbox.
2521 '(#:tests? #f))
2522 (build-system python-build-system)
2523 (home-page "https://github.com/asweigart/PyMsgBox")
2524 (synopsis "Python module for JavaScript-like message boxes")
2525 (description
2526 "PyMsgBox is a simple, cross-platform, pure Python module for
2527JavaScript-like message boxes. Types of dialog boxes include:
2528@enumerate
2529@item alert
2530@item confirm
2531@item prompt
2532@item password
2533@end enumerate
2534")
2535 (license license:bsd-3)))
2536
44d10b1f
RW
2537(define-public python-pympler
2538 (package
2539 (name "python-pympler")
2540 (home-page "https://pythonhosted.org/Pympler/")
6469af6f 2541 (version "0.8")
44d10b1f
RW
2542 (source (origin
2543 (method url-fetch)
2544 (uri (pypi-uri "Pympler" version))
2545 (sha256
2546 (base32
6469af6f 2547 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
44d10b1f
RW
2548 (build-system python-build-system)
2549 (arguments
2550 `(#:phases (modify-phases %standard-phases
2551 (delete 'check)
2552 (add-after 'install 'check
2553 (lambda* (#:key inputs outputs #:allow-other-keys)
2554 (add-installed-pythonpath inputs outputs)
2555 (invoke "python" "setup.py" "test"))))))
2556 (synopsis "Measure, monitor and analyze memory behavior")
2557 (description
2558 "Pympler is a development tool to measure, monitor and analyze
2559the memory behavior of Python objects in a running Python application.
2560
2561By pympling a Python application, detailed insight in the size and the
2562lifetime of Python objects can be obtained. Undesirable or unexpected
2563runtime behavior like memory bloat and other @samp{pymples} can easily
2564be identified.
2565
2566A web profiling frontend exposes process statistics, garbage
2567visualisation and class tracker statistics.")
2568 (license license:asl2.0)))
2569
2570(define-public python2-pympler
2571 (package-with-python2 python-pympler))
2572
2573(define-public python-itsdangerous
2574 (package
2575 (name "python-itsdangerous")
acfcf2ed 2576 (version "1.1.0")
44d10b1f
RW
2577 (source
2578 (origin
2579 (method url-fetch)
acfcf2ed 2580 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2581 (sha256
2582 (base32
acfcf2ed 2583 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2584 (build-system python-build-system)
acfcf2ed 2585 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2586 (synopsis "Python library for passing data to/from untrusted environments")
2587 (description
2588 "Itsdangerous provides various helpers to pass trusted data to untrusted
2589environments and back.")
2590 (license license:bsd-3)))
2591
2592(define-public python2-itsdangerous
2593 (package-with-python2 python-itsdangerous))
2594
2595(define-public python-pyyaml
2596 (package
2597 (name "python-pyyaml")
2206805c 2598 (version "5.3.1")
44d10b1f
RW
2599 (source
2600 (origin
2601 (method url-fetch)
2602 (uri (pypi-uri "PyYAML" version))
2603 (sha256
2604 (base32
2206805c 2605 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
44d10b1f
RW
2606 (build-system python-build-system)
2607 (inputs
2608 `(("libyaml" ,libyaml)))
7509f34f 2609 (home-page "https://pyyaml.org")
44d10b1f
RW
2610 (synopsis "YAML parser and emitter for Python")
2611 (description
2612 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2613complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2614API, and sensible error messages. PyYAML supports standard YAML tags and
2615provides Python-specific tags that allow to represent an arbitrary Python
2616object.")
2617 (license license:expat)))
2618
2619(define-public python2-pyyaml
2620 (package-with-python2 python-pyyaml))
2621
2622(define-public python-vine
2623 (package
2624 (name "python-vine")
2625 (version "1.1.4")
2626 (source
2627 (origin
2628 (method url-fetch)
2629 (uri (pypi-uri "vine" version))
2630 (sha256
2631 (base32
2632 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2633 (build-system python-build-system)
2634 (native-inputs
2635 `(("python-pytest" ,python-pytest)
2636 ("python-case" ,python-case)))
2637 (home-page "https://github.com/celery/vine")
2638 (synopsis "Promises for Python")
2639 (description
2640 "@code{vine} provides a special implementation of promises in that it can
2641be used both for \"promise of a value\" and lazy evaluation. The biggest
2642upside for this is that everything in a promise can also be a promise,
2643e.g. filters, callbacks and errbacks can all be promises.")
2644 (license license:bsd-3)))
2645
2646(define-public python-virtualenv
2647 (package
2648 (name "python-virtualenv")
60067279 2649 (version "20.0.10")
44d10b1f
RW
2650 (source
2651 (origin
2652 (method url-fetch)
2653 (uri (pypi-uri "virtualenv" version))
2654 (sha256
2655 (base32
60067279 2656 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
44d10b1f 2657 (build-system python-build-system)
44d10b1f
RW
2658 (native-inputs
2659 `(("python-mock" ,python-mock)
94d57ba3
JK
2660 ("python-pytest" ,python-pytest)
2661 ;; NOTE: guix lint remarks that "python-setuptools should probably not
2662 ;; be an input at all". However, removing the input makes the build error:
2663 ;; File "setup.py", line 4, in <module>
2664 ;; raise RuntimeError("setuptools >= 41 required to build")
2665 ("python-setuptools" ,python-setuptools)
2666 ("python-setuptools-scm" ,python-setuptools-scm)))
828996bb 2667 (propagated-inputs
94d57ba3
JK
2668 `(("python-appdirs" ,python-appdirs)
2669 ("python-distlib" ,python-distlib)
2670 ("python-filelock" ,python-filelock)
2671 ("python-six" ,python-six)
2672 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
2673 (home-page "https://virtualenv.pypa.io/")
2674 (synopsis "Virtual Python environment builder")
2675 (description
2676 "Virtualenv is a tool to create isolated Python environments.")
7815afc9 2677 (properties `((python2-variant . ,(delay python2-virtualenv))))
44d10b1f
RW
2678 (license license:expat)))
2679
2680(define-public python2-virtualenv
7815afc9
MB
2681 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
2682 (package
2683 (inherit base)
2684 (arguments
2685 `(#:python ,python-2
2686 #:phases
2687 (modify-phases %standard-phases
2688 (add-after 'set-paths 'adjust-PYTHONPATH
2689 (lambda* (#:key inputs #:allow-other-keys)
2690 (let* ((python (assoc-ref inputs "python"))
2691 (python-sitedir (string-append python "/lib/python2.7"
2692 "/site-packages")))
2693 ;; XXX: 'python2' always comes first on PYTHONPATH
2694 ;; and shadows the 'setuptools' input. Move python2
2695 ;; last: this should be fixed in python-build-system
2696 ;; in a future rebuild cycle.
2697 (setenv "PYTHONPATH"
2698 (string-append (string-join (delete python-sitedir
2699 (string-split
2700 (getenv "PYTHONPATH")
2701 #\:))
2702 ":")
2703 ":" python-sitedir))
2704 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
2705 (getenv "PYTHONPATH"))
2706 #t))))))
2707 (propagated-inputs
2708 `(("python-contextlib2" ,python2-contextlib2)
2709 ,@(package-propagated-inputs base))))))
44d10b1f
RW
2710
2711(define-public python-markupsafe
2712 (package
2713 (name "python-markupsafe")
753eb411 2714 (version "1.1.1")
44d10b1f
RW
2715 (source
2716 (origin
2717 (method url-fetch)
5182927c 2718 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2719 (sha256
2720 (base32
753eb411 2721 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2722 (build-system python-build-system)
753eb411
MB
2723 (arguments
2724 `(#:modules ((ice-9 ftw)
2725 (srfi srfi-1)
2726 (srfi srfi-26)
2727 (guix build utils)
2728 (guix build python-build-system))
2729 #:phases (modify-phases %standard-phases
2730 (replace 'check
2731 (lambda _
2732 (let ((cwd (getcwd))
2733 (libdir (find (cut string-prefix? "lib." <>)
2734 (scandir "build"))))
2735 (setenv "PYTHONPATH"
2736 (string-append cwd "/build/" libdir ":"
2737 (getenv "PYTHONPATH")))
2738 (invoke "pytest" "-vv")))))))
2739 (native-inputs
2740 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2741 (home-page "https://github.com/mitsuhiko/markupsafe")
2742 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2743 (description
2744 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2745for Python.")
2746 (license license:bsd-3)))
2747
2748(define-public python2-markupsafe
2749 (package-with-python2 python-markupsafe))
2750
2751(define-public python-jinja2
2752 (package
2753 (name "python-jinja2")
3c8ad087 2754 (version "2.11.1")
44d10b1f
RW
2755 (source
2756 (origin
2757 (method url-fetch)
2758 (uri (pypi-uri "Jinja2" version))
2759 (sha256
2760 (base32
3c8ad087 2761 "0l72c11n959yzb8d3ankckb6yhjhm6x729zm7rkpk040qzxpy64k"))))
44d10b1f 2762 (build-system python-build-system)
dce9b8b5
MB
2763 (arguments
2764 '(#:phases (modify-phases %standard-phases
2765 (replace 'check
2766 (lambda* (#:key tests? #:allow-other-keys)
2767 (if tests?
2768 (begin
2769 (setenv "PYTHONPATH"
2770 (string-append "./build/lib:"
2771 (getenv "PYTHONPATH")))
2772 (invoke "pytest" "-vv"))
2773 (format #t "test suite not run~%"))
2774 #t)))))
2775 (native-inputs
2776 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2777 (propagated-inputs
2778 `(("python-markupsafe" ,python-markupsafe)))
2779 (home-page "http://jinja.pocoo.org/")
2780 (synopsis "Python template engine")
2781 (description
2782 "Jinja2 is a small but fast and easy to use stand-alone template engine
2783written in pure Python.")
2784 (license license:bsd-3)))
2785
2786(define-public python2-jinja2
2787 (package-with-python2 python-jinja2))
2788
ba42a6bf
TLC
2789(define-public python-jinja2-time
2790 (package
2791 (name "python-jinja2-time")
2792 (version "0.2.0")
2793 (source
2794 (origin
2795 (method url-fetch)
2796 (uri (pypi-uri "jinja2-time" version))
2797 (sha256
2798 (base32
2799 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2800 (build-system python-build-system)
2801 (propagated-inputs
2802 `(("python-arrow" ,python-arrow)
2803 ("python-jinja2" ,python-jinja2)))
2804 (home-page
2805 "https://github.com/hackebrot/jinja2-time")
2806 (synopsis "Jinja2 Extension for Dates and Times")
2807 (description
2808 "This package provides an extension for the template engine Jinja2. It
2809adds a 'now' tag providing a convenient access to the arrow.now() API from
2810templates. A format string can be provided to control the output.")
2811 (license license:expat)))
2812
44d10b1f
RW
2813(define-public python-pystache
2814 (package
2815 (name "python-pystache")
2816 (version "0.5.4")
2817 (source (origin
2818 (method url-fetch)
2819 (uri (pypi-uri "pystache" version))
2820 (sha256
2821 (base32
2822 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2823 (build-system python-build-system)
2824 (arguments
2825 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2826 (home-page "http://defunkt.io/pystache/")
2827 (synopsis "Python logic-less template engine")
2828 (description
2829 "Pystache is a Python implementation of the framework agnostic,
2830logic-free templating system Mustache.")
2831 (license license:expat)
2832 (properties `((python2-variant . ,(delay python2-pystache))))))
2833
2834(define-public python2-pystache
2835 (package (inherit (package-with-python2
2836 (strip-python2-variant python-pystache)))
2837 (arguments
2838 `(#:python ,python-2
2839 #:phases
2840 (modify-phases %standard-phases
2841 (replace 'check
2842 (lambda _
dfafc29b 2843 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2844
2845(define-public python-joblib
2846 (package
2847 (name "python-joblib")
23bc9a35 2848 (version "0.14.1")
44d10b1f
RW
2849 (source (origin
2850 (method url-fetch)
2851 (uri (pypi-uri "joblib" version))
2852 (sha256
2853 (base32
23bc9a35 2854 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
44d10b1f
RW
2855 (build-system python-build-system)
2856 (arguments
2857 `(#:phases
2858 (modify-phases %standard-phases
2859 (replace 'check
2860 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2861 (native-inputs
2862 `(("python-pytest" ,python-pytest)))
2863 (home-page "https://joblib.readthedocs.io/")
2864 (synopsis "Using Python functions as pipeline jobs")
2865 (description
2866 "Joblib is a set of tools to provide lightweight pipelining in Python.
2867In particular, joblib offers: transparent disk-caching of the output values
2868and lazy re-evaluation (memoize pattern), easy simple parallel computing
2869logging and tracing of the execution.")
2870 (license license:bsd-3)))
2871
2872(define-public python2-joblib
2873 (package-with-python2 python-joblib))
2874
a3363341
VC
2875(define-public python-daemon
2876 (package
2877 (name "python-daemon")
2878 (version "2.2.3")
2879 (source
2880 (origin
2881 (method url-fetch)
2882 (uri (pypi-uri "python-daemon" version))
2883 (sha256
2884 (base32
2885 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2886 (build-system python-build-system)
2887 (arguments
2888 `(#:phases
2889 (modify-phases %standard-phases
2890 (add-before 'check 'disable-tests
2891 (lambda _
2892 ;; FIXME: Determine why test fails
2893 (substitute* "test/test_daemon.py"
2894 (("test_detaches_process_context")
2895 "skip_test_detaches_process_context"))
2896 #t)))))
2897 (propagated-inputs
2898 `(("python-lockfile" ,python-lockfile)))
2899 (native-inputs
2900 `(("python-unittest2" ,python-unittest2)
2901 ("python-testtools" ,python-testtools)
2902 ("python-testscenarios" ,python-testscenarios)
2903 ("python-mock" ,python-mock)
2904 ("python-docutils" ,python-docutils)))
2905 (home-page "https://pagure.io/python-daemon/")
2906 (synopsis "Python library for making a Unix daemon process")
2907 (description "Python-daemon is a library that assists a Python program to
2908turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2909
2910This library provides a @code{DaemonContext} class that manages the following
2911important tasks for becoming a daemon process:
2912@enumerate
2913@item Detach the process into its own process group.
2914@item Set process environment appropriate for running inside a chroot.
2915@item Renounce suid and sgid privileges.
2916@item Close all open file descriptors.
2917@item Change the working directory, uid, gid, and umask.
2918@item Set appropriate signal handlers.
2919@item Open new file descriptors for stdin, stdout, and stderr.
2920@item Manage a specified PID lock file.
2921@item Register cleanup functions for at-exit processing.
2922@end enumerate")
2923 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2924 (license (list license:asl2.0 license:gpl3+))))
2925
544ea9c2
MB
2926(define-public python-anytree
2927 (package
2928 (name "python-anytree")
2929 (version "2.8.0")
2930 (source (origin
2931 (method url-fetch)
2932 (uri (pypi-uri "anytree" version))
2933 (sha256
2934 (base32
2935 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2936 (build-system python-build-system)
2937 (propagated-inputs
2938 `(("python-six" ,python-six)))
2939 (native-inputs
2940 `(;; For tests.
2941 ("graphviz" ,graphviz) ;for 'dot'
2942 ("python-nose" ,python-nose)))
2943 (home-page "https://github.com/c0fec0de/anytree")
2944 (synopsis "Lightweight tree data library")
2945 (description
2946 "@code{anytree} is a simple, lightweight, and extensible tree data
2947structure for Python.")
2948 (license license:asl2.0)))
2949
44d10b1f
RW
2950(define-public python-docutils
2951 (package
2952 (name "python-docutils")
da8e8dc6 2953 (version "0.16")
44d10b1f
RW
2954 (source
2955 (origin
2956 (method url-fetch)
2957 (uri (pypi-uri "docutils" version))
2958 (sha256
2959 (base32
da8e8dc6 2960 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
44d10b1f
RW
2961 (build-system python-build-system)
2962 (arguments
8cf5c9fa
MB
2963 '(#:phases (modify-phases %standard-phases
2964 (replace 'check
2965 (lambda* (#:key tests? #:allow-other-keys)
2966 (if tests?
2967 (invoke "python" "test/alltests.py")
2968 (format #t "test suite not run~%"))
2969 #t)))))
44d10b1f
RW
2970 (home-page "http://docutils.sourceforge.net/")
2971 (synopsis "Python Documentation Utilities")
2972 (description
2973 "Docutils is a modular system for processing documentation into useful
2974formats, such as HTML, XML, and LaTeX. For input Docutils supports
2975reStructuredText.")
2976 ;; Most of the source code is public domain, but some source files are
2977 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2978 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2979
2980(define-public python2-docutils
2981 (package-with-python2 python-docutils))
2982
4510aeb9
MB
2983;; python2-sphinx fails its test suite with newer versions.
2984(define-public python2-docutils-0.14
2985 (package
2986 (inherit python2-docutils)
2987 (version "0.14")
2988 (source (origin
2989 (method url-fetch)
2990 (uri (pypi-uri "docutils" version))
2991 (sha256
2992 (base32
2993 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
2994
44d10b1f
RW
2995(define-public python-pygments
2996 (package
2997 (name "python-pygments")
69002b21 2998 (version "2.5.2")
44d10b1f
RW
2999 (source
3000 (origin
3001 (method url-fetch)
3002 (uri (pypi-uri "Pygments" version))
3003 (sha256
3004 (base32
69002b21 3005 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
44d10b1f
RW
3006 (build-system python-build-system)
3007 (arguments
3008 ;; FIXME: Tests require sphinx, which depends on this.
3009 '(#:tests? #f))
69002b21 3010 (home-page "https://pygments.org/")
44d10b1f
RW
3011 (synopsis "Syntax highlighting")
3012 (description
3013 "Pygments is a syntax highlighting package written in Python.")
3014 (license license:bsd-2)))
3015
3016(define-public python2-pygments
3017 (package-with-python2 python-pygments))
3018
0f0a5ef9
MC
3019(define-public python-bumpversion
3020 (package
3021 (name "python-bumpversion")
3022 (version "0.5.3")
3023 (source
3024 (origin
3025 (method url-fetch)
3026 (uri (pypi-uri "bumpversion" version))
3027 (sha256
3028 (base32
3029 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3030 (build-system python-build-system)
3031 (home-page "https://github.com/peritus/bumpversion")
3032 (synopsis "Tool to bump software version")
3033 (description "This tool provides a command-line interface (CLI) to bump a
3034software version simply.")
3035 (license license:expat)))
3036
b24fd2c2
MC
3037(define-public python-deprecated
3038 (package
3039 (name "python-deprecated")
3040 (version "1.2.5")
3041 (source
3042 (origin
3043 (method git-fetch)
3044 (uri (git-reference
3045 (url "https://github.com/tantale/deprecated.git")
3046 (commit (string-append "v" version))))
3047 (file-name (git-file-name name version))
3048 (sha256
3049 (base32
3050 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3051 (build-system python-build-system)
3052 (arguments
3053 `(#:phases (modify-phases %standard-phases
3054 (replace 'check
3055 (lambda _
3056 (invoke "pytest"))))))
3057 (propagated-inputs
3058 `(("python-wrapt" ,python-wrapt)))
3059 (native-inputs
3060 `(("python-bumpversion" ,python-bumpversion)
3061 ("python-pytest" ,python-pytest)
3062 ("python-pytest-cov" ,python-pytest-cov)
3063 ("python-sphinx" ,python-sphinx)
3064 ("python-tox" ,python-tox)))
3065 (home-page "https://github.com/tantale/deprecated")
3066 (synopsis "Python decorator to deprecate classes, functions or methods")
3067 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3068to deprecate classes, functions or methods.")
3069 (license license:expat)))
3070
d5a998fa
MC
3071(define-public python-pygithub
3072 (package
3073 (name "python-pygithub")
749e38d7 3074 (version "1.43.8")
d5a998fa
MC
3075 (source
3076 ;; We fetch from the Git repo because there are no tests in the PyPI
3077 ;; archive.
3078 (origin
3079 (method git-fetch)
3080 (uri (git-reference
3081 (url "https://github.com/PyGithub/PyGithub.git")
3082 (commit (string-append "v" version))))
3083 (file-name (git-file-name name version))
3084 (sha256
749e38d7 3085 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
3086 (build-system python-build-system)
3087 (arguments
3088 `(#:phases (modify-phases %standard-phases
3089 ;; Some tests rely on the network.
3090 (add-after 'unpack 'disable-failing-tests
3091 (lambda _
3092 (substitute* "tests/Issue142.py"
3093 (("testDecodeJson") "disabled_testDecodeJson"))
3094 #t))
3095 (add-before 'check 'prepare-for-tests
3096 (lambda _
3097 (for-each (lambda (f)
3098 (chmod f #o666))
3099 (find-files "./tests"))
3100 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3101 (setenv "PYTHONPATH"
3102 (string-append "./tests:" (getenv "PYTHONPATH")))
3103 #t)))))
3104 (propagated-inputs
3105 `(("python-deprecated" ,python-deprecated)
3106 ("python-pyjwt" ,python-pyjwt)
3107 ("python-requests" ,python-requests)))
3108 (native-inputs `(("python-httpretty" ,python-httpretty)))
3109 (home-page "https://pygithub.readthedocs.io/en/latest/")
3110 (synopsis "Python library for the GitHub API")
3111 (description "This library allows managing GitHub resources such as
3112repositories, user profiles, and organizations in your Python applications,
3113using version 3 of the GitHub application programming interface (API).")
3114 (license license:lgpl3+)))
3115
c0c0bb38
MC
3116(define-public python-rellu
3117 (package
3118 (name "python-rellu")
3119 (version "0.7")
3120 (source
3121 (origin
3122 (method url-fetch)
3123 (uri (pypi-uri "rellu" version))
3124 (sha256
3125 (base32
3126 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3127 (build-system python-build-system)
3128 (propagated-inputs
3129 `(("python-invoke" ,python-invoke)
3130 ("python-pygithub" ,python-pygithub)))
3131 (home-page "https://github.com/robotframework/rellu")
3132 (synopsis "Utilities to create PyPI releases")
3133 (description "This collection of utilities contains tooling and templates
3134to assist in creating releases on GitHub and publishing them on PyPI. It is
3135designed to be used by Robot Framework and tools and libraries in its
3136ecosystem, but can naturally be used also by other projects.")
3137 (license license:asl2.0)))
3138
b9790285
MC
3139(define-public python-robotframework
3140 (package
3141 (name "python-robotframework")
1710b8f8 3142 (version "3.1.2")
b9790285
MC
3143 ;; There are no tests in the PyPI archive.
3144 (source
3145 (origin
3146 (method git-fetch)
3147 (uri (git-reference
3148 (url "https://github.com/robotframework/robotframework.git")
3149 (commit (string-append "v" version))))
3150 (file-name (git-file-name name version))
3151 (sha256
1710b8f8 3152 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
3153 (patches (search-patches
3154 "python-robotframework-honor-source-date-epoch.patch"))))
3155 (build-system python-build-system)
3156 (arguments
3157 `(#:phases (modify-phases %standard-phases
3158 (add-before 'build 'build-and-install-doc
3159 (lambda* (#:key outputs #:allow-other-keys)
3160 (let* ((doc-output (assoc-ref outputs "doc"))
3161 (doc (string-append doc-output "/share/"
3162 ,name "-" ,version "/")))
3163 (invoke "invoke" "library-docs" "all")
3164 (mkdir-p doc)
3165 (copy-recursively "doc/libraries"
3166 (string-append doc "/libraries"))
3167 #t)))
3168 (replace 'check
3169 (lambda _
3170 (invoke "python" "utest/run.py"))))))
3171 (native-inputs
3172 `(("python-invoke" ,python-invoke)
3173 ("python-rellu" ,python-rellu)
3174 ("python:tk" ,python "tk"))) ;used when building the HTML doc
3175 (outputs '("out" "doc"))
3176 (home-page "https://robotframework.org")
3177 (synopsis "Generic automation framework")
3178 (description "Robot Framework is a generic automation framework for
3179acceptance testing, acceptance test driven development (ATDD), and robotic
3180process automation (RPA).")
3181 (license license:asl2.0)))
3182
5b84c120
MC
3183(define-public python-robotframework-lint
3184 ;; There is no properly tagged release; the commit below seems to correspond
3185 ;; to the 0.9 stable release available from PyPI. The tests are not
3186 ;; included in the PyPI archive, so we fetch the sources from the upstream
3187 ;; Git repo.
3188 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
3189 (revision "1"))
3190 (package
3191 (name "python-robotframework-lint")
3192 (version (git-version "0.9.0" revision commit))
3193 (source
3194 (origin
3195 (method git-fetch)
3196 (uri (git-reference
3197 (url "https://github.com/boakley/robotframework-lint.git")
3198 (commit commit)))
3199 (file-name (git-file-name name version))
3200 (sha256
3201 (base32
3202 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
3203 (build-system python-build-system)
3204 (arguments
3205 `(#:phases
3206 (modify-phases %standard-phases
3207 (replace 'check
3208 (lambda _
3209 (invoke "python" "-m" "robot" "-A"
3210 "tests/conf/default.args" "tests"))))))
3211 (propagated-inputs
3212 `(("python-robotframework" ,python-robotframework)))
3213 (home-page "https://github.com/boakley/robotframework-lint/")
3214 (synopsis "Static analysis tool (linter) for Robot Framework")
3215 (description "This package provides the @code{rflint} command-line
3216utility, a static analysis tool (linter) for Robot Framework source files.")
3217 (license license:asl2.0))))
3218
c0c64f17
MC
3219(define-public python-robotframework-sshlibrary
3220 (package
3221 (name "python-robotframework-sshlibrary")
3222 (version "3.3.0")
3223 ;; There are no tests in the PyPI archive.
3224 (source
3225 (origin
3226 (method git-fetch)
3227 (uri (git-reference
3228 (url "https://github.com/robotframework/SSHLibrary.git")
3229 (commit (string-append "v" version))))
3230 (file-name (git-file-name name version))
3231 (sha256
3232 (base32
3233 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3234 (build-system python-build-system)
3235 (arguments
3236 `(#:phases
3237 (modify-phases %standard-phases
3238 (add-before 'build 'build-and-install-doc
3239 (lambda* (#:key outputs #:allow-other-keys)
3240 (let* ((doc-output (assoc-ref outputs "doc"))
3241 (doc (string-append doc-output "/share/"
3242 ,name "-" ,version "/")))
3243 (invoke "chmod" "-R" "+w" "docs")
3244 (invoke "invoke" "kw-docs" "project-docs")
3245 (mkdir-p doc)
3246 (for-each delete-file (find-files "docs" "\\.rst"))
3247 (copy-recursively "docs" doc)
3248 #t)))
3249 (replace 'check
3250 (lambda _
3251 ;; Some tests require an SSH server; we remove them.
3252 (delete-file "utest/test_client_api.py")
3253 (delete-file "utest/test_scp.py")
3254 (invoke "python" "utest/run.py"))))))
3255 (propagated-inputs
3256 `(("python-robotframework" ,python-robotframework)
3257 ("python-paramiko" ,python-paramiko)
3258 ("python-scp" ,python-scp)))
3259 (native-inputs
3260 `(("openssh" ,openssh)
3261 ("which" ,which)
3262 ;; To generate the documentation
3263 ("python-docutils" ,python-docutils)
3264 ("python-invoke" ,python-invoke)
3265 ("python-pygments" ,python-pygments)
3266 ("python-rellu" ,python-rellu)))
3267 (outputs '("out" "doc"))
3268 (home-page "https://github.com/robotframework/SSHLibrary")
3269 (synopsis "Robot Framework library for SSH and SFTP")
3270 (description "SSHLibrary is a Robot Framework library providing support
3271for SSH and SFTP. It has the following main usages:
3272@itemize @bullet
3273@item Executing commands on the remote machine, either blocking or non-blocking.
3274@item Writing and reading in an interactive shell.
3275@item Transferring files and directories over SFTP.
3276@item Ensuring that files and directories exist on the remote machine.
3277@end itemize")
3278 (license license:asl2.0)))
3279
b1daba94
VC
3280(define-public python-rstr
3281 (package
3282 (name "python-rstr")
3283 (version "2.2.6")
3284 (source
3285 (origin
3286 (method url-fetch)
3287 (uri (pypi-uri "rstr" version))
3288 (sha256
3289 (base32
3290 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3291 (build-system python-build-system)
3292 (home-page
3293 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3294 (synopsis "Generate random strings in Python")
3295 (description "This package provides a python module for generating
3296random strings of various types. It could be useful for fuzz testing,
3297generating dummy data, or other applications. It has no dependencies
3298outside the standard library.")
3299 (license license:bsd-3)))
3300
13d825fc
MC
3301(define-public python-scp
3302 (package
3303 (name "python-scp")
3304 (version "0.13.2")
3305 (source
3306 (origin
3307 (method url-fetch)
3308 (uri (pypi-uri "scp" version))
3309 (sha256
3310 (base32
3311 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3312 (build-system python-build-system)
3313 (arguments
3314 '(#:tests? #f)) ;tests require an SSH server
3315 (propagated-inputs
3316 `(("python-paramiko" ,python-paramiko)))
3317 (home-page "https://github.com/jbardin/scp.py")
3318 (synopsis "SCP protocol module for Python and Paramiko")
3319 (description "The scp module extends the Paramiko library to send and
3320receive files via the SCP1 protocol, as implemented by the OpenSSH
3321@command{scp} program.")
3322 (license license:gpl2+)))
3323
44d10b1f
RW
3324(define-public python-rst.linker
3325 (package
3326 (name "python-rst.linker")
d37e8e53 3327 (version "1.11")
44d10b1f
RW
3328 (source
3329 (origin
3330 (method url-fetch)
3331 (uri (pypi-uri "rst.linker" version))
3332 (sha256
d37e8e53 3333 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
3334 (build-system python-build-system)
3335 (propagated-inputs
3336 `(("python-dateutil" ,python-dateutil)
3337 ("python-six" ,python-six)))
3338 (native-inputs
3339 `(("python-setuptools-scm" ,python-setuptools-scm)))
3340 ;; Test would require path.py, which would introduce a cyclic dependence.
3341 (arguments `(#:tests? #f))
3342 ;; Note: As of version 1.7 the documentation is not worth building.
3343 (home-page "https://github.com/jaraco/rst.linker")
3344 (synopsis "Sphinx plugin to add links and timestamps")
3345 (description "rst.linker allows to automatically replace text by a
3346reStructuredText external reference or timestamps. It's primary purpose is to
3347augment the changelog, but it can be used for other documents, too.")
3348 (license license:expat)))
3349
3350(define-public python2-rst.linker
3351 (package-with-python2 python-rst.linker))
3352
3353(define-public python-feedgenerator
3354 (package
3355 (name "python-feedgenerator")
3356 (version "1.9")
3357 (source
3358 (origin
3359 (method url-fetch)
3360 (uri (pypi-uri "feedgenerator" version))
3361 (sha256
3362 (base32
3363 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3364 (modules '((guix build utils)))
3365 (snippet
3366 '(begin
3367 ;; Remove pre-compiled .pyc files from source.
3368 (for-each delete-file-recursively
3369 (find-files "." "__pycache__" #:directories? #t))
3370 (for-each delete-file (find-files "." "\\.pyc$"))
3371 #t))))
3372 (build-system python-build-system)
3373 (propagated-inputs
3374 `(("python-pytz" ,python-pytz)
3375 ("python-six" ,python-six)))
3376 (home-page "https://github.com/getpelican/feedgenerator")
3377 (synopsis
3378 "Standalone version of Django's Atom/RSS feed generator")
3379 (description
3380 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3381which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3382 (license license:bsd-3)))
3383
3384(define-public python2-feedgenerator
3385 (package-with-python2 python-feedgenerator))
3386
3387(define-public python-toml
3388 (package
3389 (name "python-toml")
3390 (version "0.9.4")
3391 (source
3392 (origin
3393 (method url-fetch)
3394 (uri (pypi-uri "toml" version))
3395 (sha256
3396 (base32
3397 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3398 (build-system python-build-system)
3399 (arguments
3400 `(#:tests? #f)) ;no tests suite in release
3401 (home-page "https://github.com/uiri/toml")
3402 (synopsis "Library for TOML")
3403 (description
3404 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3405Language (TOML) configuration files.")
3406 (license license:expat)))
3407
346c8752
BG
3408(define-public python-jsonrpc-server
3409 (package
3410 (name "python-jsonrpc-server")
d6cf4c6e 3411 (version "0.3.2")
346c8752
BG
3412 (source
3413 (origin
3414 (method url-fetch)
3415 (uri (pypi-uri "python-jsonrpc-server" version))
3416 (sha256
3417 (base32
d6cf4c6e 3418 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
346c8752
BG
3419 (build-system python-build-system)
3420 (propagated-inputs
3421 `(("python-future" ,python-future)
3422 ("python-mock" ,python-mock)
d6cf4c6e
BG
3423 ("python-pytest" ,python-pytest)
3424 ("python-ujson" ,python-ujson)))
346c8752
BG
3425 (home-page
3426 "https://github.com/palantir/python-jsonrpc-server")
3427 (synopsis "JSON RPC 2.0 server library")
3428 (description
1df5407c 3429 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3430 (license license:expat)))
3431
56f4ad47
BG
3432(define-public python-pydocstyle
3433 (package
3434 (name "python-pydocstyle")
3435 (version "3.0.0")
3436 (source
3437 (origin
3438 (method url-fetch)
3439 (uri (pypi-uri "pydocstyle" version))
3440 (sha256
3441 (base32
3442 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3443 (build-system python-build-system)
3444 (propagated-inputs
3445 `(("python-six" ,python-six)
3446 ("python-snowballstemmer" ,python-snowballstemmer)))
3447 (home-page
3448 "https://github.com/PyCQA/pydocstyle/")
3449 (synopsis "Python docstring style checker")
3450 (description
3451 "This package provides a style checker for the Python Language
3452Server (PLS).")
3453 (license license:expat)))
3454
be4d840c 3455(define-public python-language-server
808dd2d0
BL
3456 (package
3457 (name "python-language-server")
a42f1420 3458 (version "0.31.7")
808dd2d0
BL
3459 (source
3460 (origin
3461 (method url-fetch)
3462 (uri (pypi-uri "python-language-server" version))
3463 (sha256
3464 (base32
a42f1420 3465 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
808dd2d0
BL
3466 (build-system python-build-system)
3467 (propagated-inputs
3468 `(("python-pluggy" ,python-pluggy)
3469 ("python-jsonrpc-server" ,python-jsonrpc-server)
dcff9bda
MB
3470 ;; Note: Remove the special versions of Jedi and Parso when updating
3471 ;; this package.
3472 ("python-jedi" ,python-jedi-0.15)
808dd2d0
BL
3473 ("python-yapf" ,python-yapf)
3474 ("python-pyflakes" ,python-pyflakes)
3475 ("python-pydocstyle" ,python-pydocstyle)
3476 ("python-pycodestyle" ,python-pycodestyle)
3477 ("python-mccabe" ,python-mccabe)
3478 ("python-rope" ,python-rope)
3479 ("python-autopep8" ,python-autopep8)
3480 ("python-flake8" ,python-flake8)
3481 ("python-pylint" ,python-pylint)))
3482 (home-page "https://github.com/palantir/python-language-server")
3483 (synopsis "Python implementation of the Language Server Protocol")
3484 (description
3485 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3486language specification for the Language Server Protocol (LSP). This tool is
3487used in text editing environments to provide a complete and integrated
3488feature-set for programming Python effectively.")
808dd2d0 3489 (license license:expat)))
be4d840c 3490
c777ecb3
RW
3491(define-public python-pathspec
3492 (package
3493 (name "python-pathspec")
3494 (version "0.7.0")
3495 (source
3496 (origin
3497 (method url-fetch)
3498 (uri (pypi-uri "pathspec" version))
3499 (sha256
3500 (base32
3501 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
3502 (build-system python-build-system)
3503 (home-page "https://github.com/cpburnz/python-path-specification")
3504 (synopsis "Utility library for gitignore style pattern matching of file paths")
3505 (description
3506 "This package provides a utility library for gitignore style pattern
3507matching of file paths.")
3508 (license license:mpl2.0)))
3509
44d10b1f
RW
3510(define-public python-black
3511 (package
3512 (name "python-black")
5f603fab 3513 (version "19.10b0")
44d10b1f
RW
3514 (source
3515 (origin
3516 (method url-fetch)
3517 (uri (pypi-uri "black" version))
3518 (sha256
3519 (base32
5f603fab 3520 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
44d10b1f
RW
3521 (build-system python-build-system)
3522 (arguments
3523 `(#:phases
3524 (modify-phases %standard-phases
3525 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3526 (lambda _
3527 (let ((python3 (which "python3")))
3528 (substitute* '("tests/data/fmtonoff.py"
3529 "tests/data/string_prefixes.py"
5f603fab
RW
3530 "tests/data/function.py"
3531 "tests/data/python37.py")
44d10b1f
RW
3532 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3533 (string-append "#!" python3 (if (string? minor-version)
3534 minor-version
5f603fab
RW
3535 "")))))
3536 #t))
3537 (add-after 'unpack 'disable-broken-tests
3538 (lambda _
3539 ;; These tests are supposed to be skipped when the blackd
3540 ;; dependencies are missing, but this doesn't quite work.
3541 (substitute* "tests/test_black.py"
3542 (("( *)class BlackDTestCase.*" match indent)
3543 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
3544 indent "class BlackDTestCase(unittest.TestCase):\n"))
3545 (("web.Application") "False")
3546 (("@unittest_run_loop") ""))
3547
3548 ;; Patching the above file breaks the self test
3549 (substitute* "tests/test_black.py"
3550 (("( *)def test_self" match indent)
3551 (string-append indent "@unittest.skip(\"guix\")\n" match)))
3552 #t)))))
44d10b1f
RW
3553 (propagated-inputs
3554 `(("python-click" ,python-click)
3555 ("python-attrs" ,python-attrs)
3556 ("python-appdirs" ,python-appdirs)
5f603fab
RW
3557 ("python-pathspec" ,python-pathspec)
3558 ("python-regex" ,python-regex)
3559 ("python-toml" ,python-toml)
3560 ("python-typed-ast" ,python-typed-ast)))
3561 (native-inputs
3562 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
3563 (home-page "https://github.com/ambv/black")
3564 (synopsis "The uncompromising code formatter")
3565 (description "Black is the uncompromising Python code formatter.")
3566 (license license:expat)))
3567
3568(define-public python-blinker
3569 (package
3570 (name "python-blinker")
3571 (version "1.4")
3572 (source
3573 (origin
3574 (method url-fetch)
3575 (uri (pypi-uri "blinker" version))
3576 (sha256
3577 (base32
3578 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3579 (build-system python-build-system)
d46646d9 3580 (home-page "https://pythonhosted.org/blinker/")
44d10b1f
RW
3581 (synopsis "Fast, simple object-to-object and broadcast signaling")
3582 (description
3583 "Blinker provides a fast dispatching system that allows any number of
3584interested parties to subscribe to events, or \"signals\".")
3585 (license license:expat)))
3586
3587(define-public python2-blinker
3588 (package-with-python2 python-blinker))
3589
3590(define-public pelican
3591 (package
3592 (name "pelican")
fa9e3b5e 3593 (version "4.2.0")
44d10b1f
RW
3594 (source
3595 (origin
3596 (method url-fetch)
3597 (uri (pypi-uri "pelican" version))
3598 (sha256
3599 (base32
fa9e3b5e 3600 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
44d10b1f
RW
3601 (build-system python-build-system)
3602 (propagated-inputs
fa9e3b5e
VC
3603 `(("python-blinker" ,python-blinker)
3604 ("python-dateutil" ,python-dateutil)
3605 ("python-docutils" ,python-docutils)
3606 ("python-feedgenerator" ,python-feedgenerator)
44d10b1f 3607 ("python-jinja2" ,python-jinja2)
fa9e3b5e 3608 ("python-markdown" ,python-markdown)
44d10b1f 3609 ("python-pygments" ,python-pygments)
44d10b1f 3610 ("python-pytz" ,python-pytz)
44d10b1f 3611 ("python-six" ,python-six)
fa9e3b5e 3612 ("python-unidecode" ,python-unidecode)))
44d10b1f
RW
3613 (home-page "https://getpelican.com/")
3614 (arguments
3615 `(;; XXX Requires a lot more packages to do unit tests :P
fa9e3b5e 3616 #:tests? #f))
44d10b1f
RW
3617 (synopsis "Python-based static site publishing system")
3618 (description
3619 "Pelican is a tool to generate a static blog from reStructuredText,
3620Markdown input files, and more. Pelican uses Jinja2 for templating
3621and is very extensible.")
3622 (license license:agpl3+)))
3623
8c141421
JH
3624(define-public mallard-ducktype
3625 (package
3626 (name "mallard-ducktype")
12cc3da5 3627 (version "1.0.2")
8c141421
JH
3628 (source
3629 (origin
3630 (method git-fetch)
12cc3da5
JH
3631 ;; git-reference because tests are not included in pypi source tarball
3632 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3633 (uri (git-reference
3634 (url "https://github.com/projectmallard/mallard-ducktype.git")
3635 (commit version)))
3636 (file-name (git-file-name name version))
3637 (sha256
3638 (base32
12cc3da5 3639 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3640 (build-system python-build-system)
5246655f
EF
3641 (arguments
3642 '(#:phases
3643 (modify-phases %standard-phases
3644 (replace 'check
3645 (lambda _
3646 (with-directory-excursion "tests"
3647 (invoke "sh" "runtests")))))))
8c141421
JH
3648 (home-page "http://projectmallard.org")
3649 (synopsis "Convert Ducktype to Mallard documentation markup")
3650 (description
3651 "Ducktype is a lightweight syntax that can represent all the semantics
3652of the Mallard XML documentation system. Ducktype files can be converted to
3653Mallard using the @command{ducktype} tool. The yelp-tools package
3654provides additional functionality on the produced Mallard documents.")
3655 (license license:expat)))
3656
44d10b1f
RW
3657(define-public python-cython
3658 (package
3659 (name "python-cython")
3220e44f 3660 (version "0.29.15")
44d10b1f
RW
3661 (source
3662 (origin
3663 (method url-fetch)
3664 (uri (pypi-uri "Cython" version))
3665 (sha256
6fd27a71 3666 (base32
3220e44f 3667 "0c5cjyxfvba6c0vih1fvhywp8bpz30vwvbjqdm1q1k55xzhmkn30"))))
44d10b1f
RW
3668 (build-system python-build-system)
3669 ;; we need the full python package and not just the python-wrapper
3670 ;; because we need libpython3.3m.so
3671 (inputs
3672 `(("python" ,python)))
3673 (arguments
3674 `(#:phases
3675 (modify-phases %standard-phases
3676 (add-before 'check 'set-HOME
3677 ;; some tests require access to "$HOME/.cython"
3678 (lambda _ (setenv "HOME" "/tmp") #t))
44d10b1f
RW
3679 (replace 'check
3680 (lambda _
e9194eb0
MB
3681 ;; Disable compiler optimizations to greatly reduce the running
3682 ;; time of the test suite.
3683 (setenv "CFLAGS" "-O0")
3684
3685 (invoke "python" "runtests.py" "-vv"
3686 "-j" (number->string (parallel-job-count))))))))
f319409b 3687 (home-page "https://cython.org/")
44d10b1f
RW
3688 (synopsis "C extensions for Python")
3689 (description "Cython is an optimising static compiler for both the Python
3690programming language and the extended Cython programming language. It makes
3691writing C extensions for Python as easy as Python itself.")
3692 (license license:asl2.0)
3693 (properties `((python2-variant . ,(delay python2-cython))))))
3694
3695(define-public python2-cython
da460865
MB
3696 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3697 (package
3698 (inherit base)
3699 (name "python2-cython")
3700 (inputs
3701 `(("python-2" ,python-2))) ;this is not automatically changed
3702 (arguments
3703 (substitute-keyword-arguments (package-arguments base)
3704 ((#:phases phases)
3705 `(modify-phases ,phases
baab9eef
MB
3706 ;; XXX: On i686-linux, running the parallel tests fails on many-core
3707 ;; systems, see <https://github.com/cython/cython/issues/2807>.
3708 ;; TODO: Move this logic to the regular check phase in a future
3709 ;; rebuild cycle.
3710 ,@(if (string-prefix? "i686" (%current-system))
3711 '((replace 'check
3712 (lambda _
3713 (setenv "CFLAGS" "-O0")
3714 (invoke "python" "runtests.py" "-vv"
3715 "-j" (number->string (parallel-job-count))
3716 "-x" "run.parallel"))))
3717 '())
da460865
MB
3718 (add-before 'check 'adjust-test_embed
3719 (lambda _
3720 (substitute* "runtests.py"
3721 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3722 ;; so it can give the right -L flag to GCC when embedding static
3723 ;; builds of Python. It is unaware that the Python "config"
3724 ;; directory (where the static library lives) was renamed in
3725 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3726 ;; which works fine, because that is where the shared library is.
3727 ;;
3728 ;; It also appears to be unaware that the Makefile in Demos/embed
3729 ;; already unconditionally pass the static library location to GCC,
3730 ;; after checking sysconfig.get_config_var('LIBPL).
3731 ;;
3732 ;; The effect is that the linker is unable to resolve libexpat
3733 ;; symbols when building for Python 2, because neither the Python 2
3734 ;; shared library nor Expat is available. To fix it, we can either
3735 ;; add Expat as an input and make it visible to the linker, or just
3736 ;; prevent it from overriding the Python shared library location.
3737 ;; The end result is identical, so we take the easy route.
3738 ((" or libname not in os\\.listdir\\(libdir\\)")
3739 ""))
3740 #t)))))))))
44d10b1f
RW
3741
3742;; The RPython toolchain currently does not support Python 3.
3743(define-public python2-rpython
3744 (package
3745 (name "python2-rpython")
3746 (version "0.2.1")
3747 (source
3748 (origin
3749 (method url-fetch)
3750 (uri (pypi-uri "rpython" version))
3751 (sha256
3752 (base32
3753 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3754 (build-system python-build-system)
3755 (arguments `(#:python ,python-2))
3756 (native-inputs
3757 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3758 (home-page "https://rpython.readthedocs.org")
3759 (synopsis "Framework for implementing interpreters and virtual machines")
3760 (description "RPython is a translation and support framework for
3761producing implementations of dynamic languages, emphasizing a clean separation
3762between language specification and implementation aspects.")
3763 (license license:expat)))
3764
3765;; NOTE: when upgrading numpy please make sure that python-pandas and
3766;; python-scipy still build, as these three packages are often used together.
3767(define-public python-numpy
3768 (package
3769 (name "python-numpy")
8e5fbd5d 3770 (version "1.17.3")
44d10b1f
RW
3771 (source
3772 (origin
3773 (method url-fetch)
3774 (uri (string-append
3775 "https://github.com/numpy/numpy/releases/download/v"
3776 version "/numpy-" version ".tar.gz"))
3777 (sha256
3778 (base32
8e5fbd5d 3779 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3780 (build-system python-build-system)
3781 (inputs
3782 `(("openblas" ,openblas)
3783 ("lapack" ,lapack)))
3784 (native-inputs
3785 `(("python-cython" ,python-cython)
3786 ("python-pytest" ,python-pytest)
3787 ("gfortran" ,gfortran)))
3788 (arguments
3789 `(#:phases
3790 (modify-phases %standard-phases
3791 (add-before 'build 'configure-blas-lapack
3792 (lambda* (#:key inputs #:allow-other-keys)
3793 (call-with-output-file "site.cfg"
3794 (lambda (port)
3795 (format port
3796 "[openblas]
3797libraries = openblas
3798library_dirs = ~a/lib
3799include_dirs = ~a/include
3800
3801# backslash-n to make emacs happy
3802\n[lapack]
3803lapack_libs = lapack
3804library_dirs = ~a/lib
3805include_dirs = ~a/include
3806"
3807 (assoc-ref inputs "openblas")
3808 (assoc-ref inputs "openblas")
3809 (assoc-ref inputs "lapack")
3810 (assoc-ref inputs "lapack"))))
3811 #t))
3812 (add-before 'build 'fix-executable-paths
3813 (lambda* (#:key inputs #:allow-other-keys)
3814 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3815 ;; instead of /bin/sh.
3816 (substitute* "numpy/distutils/exec_command.py"
3817 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3818 (string-append match-start (assoc-ref inputs "bash") match-end)))
3819 ;; Use "gcc" executable, not "cc".
3820 (substitute* "numpy/distutils/system_info.py"
3821 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3822 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3823 #t))
3824 ;; Tests can only be run after the library has been installed and not
3825 ;; within the source directory.
3826 (delete 'check)
3827 (add-after 'install 'check
3828 (lambda* (#:key outputs inputs #:allow-other-keys)
3829 ;; Make installed package available for running the tests
3830 (add-installed-pythonpath inputs outputs)
3831 ;; Make sure "f2py" etc is found.
3832 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3833 ":" (getenv "PATH")))
3834 (with-directory-excursion "/tmp"
3835 (invoke "python" "-c"
3836 "import numpy; numpy.test(verbose=2)")))))))
28191bdc 3837 (home-page "https://numpy.org")
44d10b1f
RW
3838 (synopsis "Fundamental package for scientific computing with Python")
3839 (description "NumPy is the fundamental package for scientific computing
3840with Python. It contains among other things: a powerful N-dimensional array
3841object, sophisticated (broadcasting) functions, tools for integrating C/C++
3842and Fortran code, useful linear algebra, Fourier transform, and random number
3843capabilities.")
adb396ea 3844 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3845 (license license:bsd-3)))
3846
adb396ea 3847;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3848(define-public python2-numpy
adb396ea
MB
3849 (let ((numpy (package-with-python2
3850 (strip-python2-variant python-numpy))))
3851 (package/inherit
3852 numpy
3853 (version "1.16.5")
3854 (source (origin
3855 (method url-fetch)
3856 (uri (string-append
3857 "https://github.com/numpy/numpy/releases/download/v"
3858 version "/numpy-" version ".tar.gz"))
3859 (sha256
3860 (base32
3861 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3862
3863;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3864;; interest only for legacy code going back to NumPy's predecessor
3865;; Numeric.
3866(define-public python2-numpy-1.8
3867 (package (inherit python2-numpy)
3868 (version "1.8.2")
3869 (source
3870 (origin
6b61fc47
EF
3871 (method git-fetch)
3872 (uri (git-reference
3873 (url "https://github.com/numpy/numpy")
3874 (commit (string-append "v" version))))
3875 (file-name (git-file-name "numpy" version))
44d10b1f
RW
3876 (sha256
3877 (base32
6b61fc47 3878 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
44d10b1f
RW
3879 (arguments
3880 (substitute-keyword-arguments (package-arguments python2-numpy)
3881 ((#:phases phases)
3882 `(modify-phases ,phases
3883 (replace 'configure-blas-lapack
3884 (lambda* (#:key inputs #:allow-other-keys)
3885 (call-with-output-file "site.cfg"
3886 (lambda (port)
3887 (format port
3888 "[openblas]
3889libraries = openblas,lapack
3890library_dirs = ~a/lib:~a/lib
3891include_dirs = ~a/include:~a/include
3892"
3893 (assoc-ref inputs "openblas")
3894 (assoc-ref inputs "lapack")
3895 (assoc-ref inputs "openblas")
3896 (assoc-ref inputs "lapack"))))
3897 #t))))))
3898 (native-inputs
3899 `(("python2-nose" ,python2-nose)))
3900 (description "NumPy is the fundamental package for scientific computing
3901with Python. It contains among other things: a powerful N-dimensional array
3902object, sophisticated (broadcasting) functions, tools for integrating C/C++
3903and Fortran code, useful linear algebra, Fourier transform, and random number
3904capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3905that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3906Numeric.")
3907 (license license:bsd-3)))
3908
3909(define-public python-munch
3910 (package
3911 (name "python-munch")
3912 (version "2.0.4")
3913 (source
3914 (origin
3915 (method url-fetch)
3916 (uri (pypi-uri "munch" version))
3917 (sha256
3918 (base32
3919 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3920 (build-system python-build-system)
3921 (home-page "https://github.com/Infinidat/munch")
3922 (synopsis "Dot-accessible dictionary")
3923 (description "Munch is a dot-accessible dictionary similar to JavaScript
3924objects.")
3925 (license license:expat)))
3926
3927(define-public python2-munch
3928 (package-with-python2 python-munch))
3929
3930(define-public python-colormath
3931 (package
3932 (name "python-colormath")
3933 (version "3.0.0")
3934 (source
3935 (origin
3936 (method url-fetch)
3937 (uri (pypi-uri "colormath" version))
3938 (sha256
3939 (base32
3940 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3941 (build-system python-build-system)
3942 (propagated-inputs
3943 `(("python-networkx" ,python-networkx)
3944 ("python-numpy" ,python-numpy)))
3945 (home-page "https://github.com/gtaylor/python-colormath")
3946 (synopsis "Color math and conversion library")
3947 (description
3948 "This is a Python library for color math and conversions.")
3949 (license license:bsd-3)))
3950
3951(define-public python2-colormath
3952 (package-with-python2 python-colormath))
3953
3954(define-public python-spectra
3955 (package
3956 (name "python-spectra")
3957 (version "0.0.11")
3958 (source
3959 (origin
3960 (method url-fetch)
3961 (uri (pypi-uri "spectra" version))
3962 (sha256
3963 (base32
3964 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3965 (build-system python-build-system)
3966 (arguments
3967 `(#:phases
3968 (modify-phases %standard-phases
3969 (replace 'check
38ec0f6a 3970 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3971 (propagated-inputs
3972 `(("python-colormath" ,python-colormath)))
3973 (native-inputs
3974 `(("python-nose" ,python-nose)))
3975 (home-page "https://github.com/jsvine/spectra")
3976 (synopsis "Color scales and color conversion")
3977 (description
3978 "This package provides a Python library intended to make color math,
3979color scales, and color space conversion easy. It has support for:
3980
3981@enumerate
3982@item Color scales
3983@item Color ranges
3984@item Color blending
3985@item Brightening/darkening colors
3986@item Saturating/desaturating colors
3987@item Conversion to/from multiple color spaces.
3988@end enumerate\n")
3989 (license license:expat)))
3990
3991(define-public python2-spectra
3992 (package-with-python2 python-spectra))
3993
3994(define-public python-numpy-documentation
3995 (package
3996 (name "python-numpy-documentation")
3997 (version (package-version python-numpy))
3998 (source (package-source python-numpy))
3999 (build-system python-build-system)
4000 (native-inputs
4001 `(("python-matplotlib" ,python-matplotlib)
4002 ("python-numpy" ,python-numpy)
4003 ("pkg-config" ,pkg-config)
4004 ("python-sphinx" ,python-sphinx)
4005 ("python-numpydoc" ,python-numpydoc)
f75aa97f 4006 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
4007 texlive-fonts-ec
4008 texlive-generic-ifxetex
4009 texlive-generic-pdftex
f75aa97f 4010 texlive-amsfonts
44d10b1f
RW
4011 texlive-latex-capt-of
4012 texlive-latex-cmap
4013 texlive-latex-environ
4014 texlive-latex-eqparbox
4015 texlive-latex-etoolbox
4016 texlive-latex-expdlist
4017 texlive-latex-fancyhdr
4018 texlive-latex-fancyvrb
4019 texlive-latex-fncychap
4020 texlive-latex-float
4021 texlive-latex-framed
4022 texlive-latex-geometry
4023 texlive-latex-graphics
4024 texlive-latex-hyperref
4025 texlive-latex-mdwtools
4026 texlive-latex-multirow
4027 texlive-latex-needspace
4028 texlive-latex-oberdiek
4029 texlive-latex-parskip
4030 texlive-latex-preview
4031 texlive-latex-tabulary
4032 texlive-latex-threeparttable
4033 texlive-latex-titlesec
4034 texlive-latex-trimspaces
4035 texlive-latex-ucs
4036 texlive-latex-upquote
4037 texlive-latex-url
4038 texlive-latex-varwidth
4039 texlive-latex-wrapfig)))
4040 ("texinfo" ,texinfo)
4041 ("perl" ,perl)
4042 ("scipy-sphinx-theme"
4043 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4044 (method git-fetch)
4045 (uri (git-reference
4046 (url "https://github.com/scipy/scipy-sphinx-theme.git")
4047 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4048 (sha256
4049 (base32
4050 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4051 ,@(package-native-inputs python-numpy)))
4052 (arguments
4053 `(#:tests? #f ; we're only generating the documentation
4054 #:phases
4055 (modify-phases %standard-phases
4056 (delete 'build)
4057 (replace 'install
4058 (lambda* (#:key inputs outputs #:allow-other-keys)
4059 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4060 (doc (string-append
4061 data "/doc/" ,name "-"
4062 ,(package-version python-numpy)))
4063 (info-reader (string-append data "/info"))
4064 (html (string-append doc "/html"))
4065 (scipy-sphinx-theme "scipy-sphinx-theme")
4066 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4067 (pyver ,(string-append "PYVER=")))
4068
4069 ;; FIXME: this is needed to for texlive-union to generate
4070 ;; fonts, which are not found.
4071 (setenv "HOME" "/tmp")
4072
4073 (with-directory-excursion "doc"
4074 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4075 (mkdir-p html)
4fc898da
RW
4076 (invoke "make" "html" pyver)
4077 (invoke "make" "latex" "PAPER=a4" pyver)
4078 (invoke "make" "-C" "build/latex"
44d10b1f
RW
4079 "all-pdf" "PAPER=a4" pyver)
4080 ;; FIXME: Generation of the info file fails.
4fc898da 4081 ;; (invoke "make" "info" pyver)
44d10b1f
RW
4082 ;; (mkdir-p info)
4083 ;; (copy-file "build/texinfo/numpy.info"
4084 ;; (string-append info "/numpy.info"))
4085 (for-each (lambda (file)
4086 (copy-file (string-append "build/latex" file)
4087 (string-append doc file)))
4088 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4089 (with-directory-excursion "build/html"
4090 (for-each (lambda (file)
4091 (let* ((dir (dirname file))
4092 (tgt-dir (string-append html "/" dir)))
4093 (unless (equal? "." dir)
4094 (mkdir-p tgt-dir))
4095 (install-file file html)))
4096 (find-files "." ".*")))))
4097 #t)))))
4098 (home-page (package-home-page python-numpy))
4099 (synopsis "Documentation for the python-numpy package")
4100 (description (package-description python-numpy))
4101 (license (package-license python-numpy))))
4102
4103(define-public python2-numpy-documentation
4104 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4105 (package
4106 (inherit numpy-documentation)
4107 (native-inputs `(("python2-functools32" ,python2-functools32)
4108 ,@(package-native-inputs numpy-documentation))))))
4109
4110(define-public python-pygit2
4111 (package
4112 (name "python-pygit2")
7154f5ef 4113 (version "1.1.0")
44d10b1f
RW
4114 (source
4115 (origin
4116 (method url-fetch)
4117 (uri (pypi-uri "pygit2" version))
4118 (sha256
7154f5ef 4119 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
44d10b1f
RW
4120 (build-system python-build-system)
4121 (arguments
c3ecab0d 4122 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f 4123 (propagated-inputs
7154f5ef 4124 `(("python-cached-property" ,python-cached-property)
44d10b1f 4125 ("python-cffi" ,python-cffi)
7154f5ef 4126 ("libgit2" ,libgit2)))
44d10b1f
RW
4127 (native-inputs
4128 `(("python-pytest" ,python-pytest)))
4129 (home-page "https://github.com/libgit2/pygit2")
4130 (synopsis "Python bindings for libgit2")
4131 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4132library, libgit2 implements Git plumbing.")
4133 ;; GPL2.0 only, with linking exception.
4134 (license license:gpl2)))
4135
44d10b1f
RW
4136(define-public python-pyparsing
4137 (package
4138 (name "python-pyparsing")
6d3cff5a 4139 (version "2.3.1")
44d10b1f
RW
4140 (source
4141 (origin
4142 (method url-fetch)
4143 (uri (pypi-uri "pyparsing" version))
4144 (sha256
6d3cff5a 4145 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
4146 (build-system python-build-system)
4147 (outputs '("out" "doc"))
4148 (arguments
4149 `(#:tests? #f ; no test target
4150 #:phases
4151 (modify-phases %standard-phases
4152 (add-after 'install 'install-doc
4153 (lambda* (#:key outputs #:allow-other-keys)
4154 (let* ((doc (string-append (assoc-ref outputs "doc")
4155 "/share/doc/" ,name "-" ,version))
4156 (html-doc (string-append doc "/html"))
4157 (examples (string-append doc "/examples")))
4158 (mkdir-p html-doc)
4159 (mkdir-p examples)
4160 (for-each
4161 (lambda (dir tgt)
4162 (map (lambda (file)
4163 (install-file file tgt))
4164 (find-files dir ".*")))
4165 (list "docs" "htmldoc" "examples")
4166 (list doc html-doc examples))
4167 #t))))))
4168 (home-page "https://github.com/pyparsing/pyparsing")
4169 (synopsis "Python parsing class library")
4170 (description
4171 "The pyparsing module is an alternative approach to creating and
4172executing simple grammars, vs. the traditional lex/yacc approach, or the use
4173of regular expressions. The pyparsing module provides a library of classes
4174that client code uses to construct the grammar directly in Python code.")
4175 (license license:expat)))
4176
4177(define-public python2-pyparsing
4178 (package-with-python2 python-pyparsing))
4179
4180(define-public python-numpydoc
4181 (package
4182 (name "python-numpydoc")
4183 (version "0.8.0")
4184 (source
4185 (origin
4186 (method url-fetch)
4187 (uri (pypi-uri "numpydoc" version))
4188 (sha256
4189 (base32
4190 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4191 (build-system python-build-system)
4192 (propagated-inputs
4193 `(("python-sphinx" ,python-sphinx)))
4194 (native-inputs
4195 `(("python-nose" ,python-nose)))
e85af137 4196 (home-page "https://pypi.org/project/numpydoc/")
44d10b1f
RW
4197 (synopsis
4198 "Numpy's Sphinx extensions")
4199 (description
4200 "Sphinx extension to support docstrings in Numpy format.")
4201 (license license:bsd-2)))
4202
4203(define-public python2-numpydoc
4204 (package-with-python2 python-numpydoc))
4205
4206(define-public python-numexpr
4207 (package
4208 (name "python-numexpr")
4209 (version "2.6.5")
4210 (source
4211 (origin
4212 (method url-fetch)
4213 (uri (pypi-uri "numexpr" version))
4214 (sha256
4215 (base32
4216 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4217 (build-system python-build-system)
4218 (arguments `(#:tests? #f)) ; no tests included
4219 (propagated-inputs
4220 `(("python-numpy" ,python-numpy)))
4221 (home-page "https://github.com/pydata/numexpr")
4222 (synopsis "Fast numerical expression evaluator for NumPy")
4223 (description
4224 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4225expressions that operate on arrays are accelerated and use less memory than
4226doing the same calculation in Python. In addition, its multi-threaded
4227capabilities can make use of all your cores, which may accelerate
4228computations, most specially if they are not memory-bounded (e.g. those using
4229transcendental functions).")
4230 (license license:expat)))
4231
4232(define-public python2-numexpr
4233 (package-with-python2 python-numexpr))
4234
4235(define-public python-cycler
4236 (package
4237 (name "python-cycler")
4238 (version "0.10.0")
4239 (source (origin
4240 (method url-fetch)
4241 (uri (pypi-uri "cycler" version))
4242 (sha256
4243 (base32
4244 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4245 (build-system python-build-system)
4246 (arguments
4247 ;; XXX: The current version requires 'coveralls' which we don't have.
4248 ;; Enable this for the next release which uses 'python-pytest'.
4249 '(#:tests? #f))
4250 (propagated-inputs
4251 `(("python-six" ,python-six)))
4252 (home-page "http://matplotlib.org/cycler/")
4253 (synopsis "Composable keyword argument iterator")
4254 (description
4255 "When using @code{matplotlib} and plotting more than one line, it is
4256common to want to be able to want to be able to cycle over one or more artist
4257styles; but the plotting logic can quickly become involved.
4258To address this and enable easy cycling over arbitrary @code{kwargs}, the
4259@code{Cycler} class was developed.")
4260 (license license:bsd-3)))
4261
4262(define-public python2-cycler
4263 (package-with-python2 python-cycler))
4264
4265(define-public python-colorspacious
4266 (package
4267 (name "python-colorspacious")
53a3ebed 4268 (version "1.1.2")
44d10b1f 4269 (source
dee92e65
TGR
4270 (origin
4271 (method git-fetch)
4272 (uri (git-reference
4273 (url "https://github.com/njsmith/colorspacious.git")
4274 (commit (string-append "v" version))))
4275 (file-name (git-file-name name version))
4276 (sha256
53a3ebed 4277 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
4278 (build-system python-build-system)
4279 (propagated-inputs
4280 `(("python-numpy" ,python-numpy)))
4281 (native-inputs
4282 `(("python-nose" ,python-nose)))
4283 (arguments
4284 `(#:phases
4285 (modify-phases %standard-phases
4286 (replace 'check
4287 (lambda _
c988afda 4288 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
4289 (home-page "https://github.com/njsmith/colorspacious")
4290 (synopsis "Python library for colorspace conversions")
4291 (description "@code{colorspacious} is a Python library that lets you
4292convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4293 (license license:expat)))
4294
4295(define-public python2-colorspacious
4296 (package-with-python2 python-colorspacious))
4297
4298(define-public python-matplotlib
4299 (package
4300 (name "python-matplotlib")
9e7cb2f1 4301 (version "3.1.2")
44d10b1f
RW
4302 (source
4303 (origin
4304 (method url-fetch)
4305 (uri (pypi-uri "matplotlib" version))
4306 (sha256
4307 (base32
9e7cb2f1 4308 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
4309 (build-system python-build-system)
4310 (propagated-inputs ; the following packages are all needed at run time
4311 `(("python-cycler" ,python-cycler)
4312 ("python-kiwisolver" ,python-kiwisolver)
4313 ("python-pyparsing" ,python-pyparsing)
4314 ("python-pygobject" ,python-pygobject)
4315 ("gobject-introspection" ,gobject-introspection)
4316 ("python-tkinter" ,python "tk")
4317 ("python-dateutil" ,python-dateutil)
4318 ("python-numpy" ,python-numpy)
4319 ("python-pillow" ,python-pillow)
4320 ("python-pytz" ,python-pytz)
4321 ("python-six" ,python-six)
44d10b1f
RW
4322 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4323 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4324 ;; object. For this reason we need to import both libraries.
5ea654cf 4325 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 4326 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
4327 ("python-cairocffi" ,python-cairocffi)))
4328 (inputs
4329 `(("libpng" ,libpng)
4330 ("imagemagick" ,imagemagick)
4331 ("freetype" ,freetype)
4332 ("cairo" ,cairo)
4333 ("glib" ,glib)
4334 ;; FIXME: Add backends when available.
4335 ;("python-wxpython" ,python-wxpython)
4336 ("tcl" ,tcl)
4337 ("tk" ,tk)))
4338 (native-inputs
4339 `(("pkg-config" ,pkg-config)
5ea654cf
RW
4340 ("python-pytest" ,python-pytest)
4341 ("python-mock" ,python-mock)
4342 ("unzip" ,unzip)
4343 ("jquery-ui"
4344 ,(origin
4345 (method url-fetch)
4346 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4347 (sha256
4348 (base32
4349 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
4350 (arguments
4351 `(#:phases
4352 (modify-phases %standard-phases
5ea654cf
RW
4353 ;; XXX We disable all image comparison tests because we're using a
4354 ;; newer version of FreeType than matplotlib expects. This leads to
4355 ;; minor differences throughout the tests.
4356 (add-after 'unpack 'fix-and-disable-failing-tests
4357 (lambda _
4358 (substitute* (append (find-files "lib/matplotlib/tests/"
4359 "test_.*\\.py$")
4360 (find-files "lib/mpl_toolkits/tests"
4361 "test_.*\\.py$"))
4362 (("^from matplotlib" match)
4363 (string-append "import pytest\n" match))
4364 (("( *)@image_comparison" match indent)
4365 (string-append indent
4366 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4367 match)))
4368 (substitute* "lib/matplotlib/tests/test_animation.py"
4369 (("/bin/sh") (which "sh")))
4370 (for-each delete-file
4371 ;; test_normal_axes, test_get_tightbbox_polar
4372 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
4373 ;; We don't use the webagg backend and this test forces it.
4374 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
4375 ;; test_outward_ticks
4376 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
4377 ;; test_hidden_axes fails with minor extent
4378 ;; differences, possibly due to the use of a
4379 ;; different version of FreeType.
4380 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
4381 ;; Fontconfig returns no fonts.
4382 "lib/matplotlib/tests/test_font_manager.py"))
4383 #t))
4384 (add-before 'install 'install-jquery-ui
4385 (lambda* (#:key outputs inputs #:allow-other-keys)
4386 (let ((dir (string-append (assoc-ref outputs "out")
4387 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4388 (mkdir-p dir)
4389 (invoke "unzip"
4390 (assoc-ref inputs "jquery-ui")
4391 "-d" dir))
4392 #t))
c09f598d 4393 (replace 'check
5ea654cf
RW
4394 (lambda* (#:key outputs inputs #:allow-other-keys)
4395 (add-installed-pythonpath inputs outputs)
4396 (invoke "python" "tests.py" "-v"
9e7cb2f1 4397 "-m" "not network and not webagg")))
44d10b1f
RW
4398 (add-before 'build 'configure-environment
4399 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
4400 (let ((cairo (assoc-ref inputs "cairo")))
4401 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 4402 ;; has not effect.
34c2a16b 4403 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
4404 (setenv "HOME" (getcwd))
4405 (call-with-output-file "setup.cfg"
4406 (lambda (port)
4407 (format port "[directories]~%
4408basedirlist = ~a,~a~%
5ea654cf
RW
4409[packages]~%
4410tests = True~%"
44d10b1f
RW
4411 (assoc-ref inputs "tcl")
4412 (assoc-ref inputs "tk")))))
4413 #t)))))
339b5828 4414 (home-page "https://matplotlib.org/")
44d10b1f
RW
4415 (synopsis "2D plotting library for Python")
4416 (description
4417 "Matplotlib is a Python 2D plotting library which produces publication
4418quality figures in a variety of hardcopy formats and interactive environments
4419across platforms. Matplotlib can be used in Python scripts, the python and
4420ipython shell, web application servers, and six graphical user interface
4421toolkits.")
4422 (license license:psfl)
4423 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4424
4425(define-public python2-matplotlib
4426 (let ((matplotlib (package-with-python2
4427 (strip-python2-variant python-matplotlib))))
4428 (package (inherit matplotlib)
7380df73 4429 (version "2.2.4")
5ea654cf
RW
4430 (source
4431 (origin
4432 (method url-fetch)
4433 (uri (pypi-uri "matplotlib" version))
4434 (sha256
4435 (base32
7380df73 4436 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4437 (arguments
4438 (substitute-keyword-arguments (package-arguments matplotlib)
4439 ((#:phases phases)
4440 `(modify-phases ,phases
66a3c2db
EF
4441 (replace 'install-jquery-ui
4442 (lambda* (#:key outputs inputs #:allow-other-keys)
4443 (let ((dir (string-append (assoc-ref outputs "out")
4444 "/lib/python2.7/site-packages/"
4445 "matplotlib/backends/web_backend/")))
4446 (mkdir-p dir)
4447 (invoke "unzip"
4448 (assoc-ref inputs "jquery-ui")
4449 "-d" dir))
4450 #t))
38a404d5 4451 (delete 'fix-and-disable-failing-tests)
5d484f42 4452 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4453 ;; Make sure to use special packages for Python 2 instead
4454 ;; of those automatically rewritten by package-with-python2.
4455 (propagated-inputs
4456 `(("python2-pycairo" ,python2-pycairo)
4457 ("python2-backports-functools-lru-cache"
4458 ,python2-backports-functools-lru-cache)
4459 ("python2-functools32" ,python2-functools32)
4460 ("python2-pygobject-2" ,python2-pygobject-2)
4461 ("python2-subprocess32" ,python2-subprocess32)
4462 ("python2-tkinter" ,python-2 "tk")
4463 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4464 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4465
4466(define-public python-matplotlib-documentation
4467 (package
4468 (name "python-matplotlib-documentation")
4469 (version (package-version python-matplotlib))
4470 (source (package-source python-matplotlib))
4471 (build-system python-build-system)
4472 (native-inputs
4473 `(("python-matplotlib" ,python-matplotlib)
4474 ("python-colorspacious" ,python-colorspacious)
4475 ("python-sphinx" ,python-sphinx)
5ad0a452 4476 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4477 ("python-sphinx-gallery" ,python-sphinx-gallery)
4478 ("python-numpydoc" ,python-numpydoc)
4479 ("python-ipython" ,python-ipython)
e7a53914 4480 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4481 ("python-mock" ,python-mock)
4482 ("graphviz" ,graphviz)
f75aa97f 4483 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4484 texlive-latex-amsmath
4485 texlive-latex-enumitem
4486 texlive-latex-expdlist
4487 texlive-latex-geometry
4488 texlive-latex-preview
4489 texlive-latex-type1cm
4490 texlive-latex-ucs
4491
4492 texlive-generic-pdftex
4493
e7a53914
RW
4494 texlive-fonts-ec
4495 texlive-fonts-adobe-times
4496 texlive-fonts-txfonts)))
44d10b1f
RW
4497 ("texinfo" ,texinfo)
4498 ,@(package-native-inputs python-matplotlib)))
4499 (arguments
4500 `(#:tests? #f ; we're only generating documentation
4501 #:phases
4502 (modify-phases %standard-phases
5ea654cf
RW
4503 ;; The tests in python-matplotlib are run after the install phase, so
4504 ;; we need to delete the extra phase here.
4505 (delete 'check)
44d10b1f
RW
4506 (replace 'build
4507 (lambda _
4508 (chdir "doc")
e7a53914
RW
4509 (setenv "PYTHONPATH"
4510 (string-append (getenv "PYTHONPATH")
4511 ":" (getcwd) "/../examples/units"))
44d10b1f 4512 (substitute* "conf.py"
e7a53914
RW
4513 ;; Don't use git.
4514 (("^SHA = check_output.*")
4515 (string-append "SHA = \"" ,version "\"\n"))
4516 ;; Don't fetch intersphinx files from the Internet
4517 (("^explicit_order_folders" m)
4518 (string-append "intersphinx_mapping = {}\n" m))
4519 (("'sphinx.ext.intersphinx',") "")
4520 ;; Disable URL embedding which requires internet access.
4521 (("'https://docs.scipy.org/doc/numpy'") "None")
4522 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4523 (invoke "make"
4524 "SPHINXBUILD=sphinx-build"
4525 "SPHINXOPTS=" ; don't abort on warnings
4526 "html" "texinfo")))
44d10b1f
RW
4527 (replace 'install
4528 (lambda* (#:key inputs outputs #:allow-other-keys)
4529 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4530 (doc (string-append data "/doc/python-matplotlib-" ,version))
4531 (info (string-append data "/info"))
4532 (html (string-append doc "/html")))
4533 (mkdir-p html)
4534 (mkdir-p info)
4535 (copy-recursively "build/html" html)
4536 (symlink (string-append html "/_images")
4537 (string-append info "/matplotlib-figures"))
4538 (with-directory-excursion "build/texinfo"
4539 (substitute* "matplotlib.texi"
4540 (("@image\\{([^,]*)" all file)
4541 (string-append "@image{matplotlib-figures/" file)))
4542 (symlink (string-append html "/_images")
4543 "./matplotlib-figures")
e7a53914
RW
4544 (invoke "makeinfo" "--no-split"
4545 "-o" "matplotlib.info" "matplotlib.texi"))
4546 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4547 #t)))))
4548 (home-page (package-home-page python-matplotlib))
4549 (synopsis "Documentation for the python-matplotlib package")
4550 (description (package-description python-matplotlib))
4551 (license (package-license python-matplotlib))))
4552
4553(define-public python2-matplotlib-documentation
5ad0a452
RW
4554 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4555 (package
4556 (inherit parent)
4557 (native-inputs
4558 (alist-delete "python-sphinx-copybutton"
4559 (package-native-inputs parent))))))
44d10b1f 4560
55dae98f
RW
4561(define-public python-matplotlib-venn
4562 (package
4563 (name "python-matplotlib-venn")
4564 (version "0.11.5")
4565 (source
4566 (origin
4567 (method url-fetch)
4568 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4569 (sha256
4570 (base32
4571 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4572 (build-system python-build-system)
4573 (arguments '(#:tests? #f)) ; tests are not included
4574 (propagated-inputs
4575 `(("python-matplotlib" ,python-matplotlib)
4576 ("python-numpy" ,python-numpy)
4577 ("python-scipy" ,python-scipy)))
4578 (native-inputs
4579 `(("unzip" ,unzip)))
4580 (home-page "https://github.com/konstantint/matplotlib-venn")
4581 (synopsis "Plot area-proportional Venn diagrams")
4582 (description
4583 "This package provides tools for plotting area-proportional two- and
4584three-way Venn diagrams in @code{matplotlib}.")
4585 (license license:expat)))
4586
44d10b1f
RW
4587(define-public python2-pysnptools
4588 (package
4589 (name "python2-pysnptools")
5d1ade85 4590 (version "0.3.13")
44d10b1f
RW
4591 (source
4592 (origin
4593 (method url-fetch)
5d1ade85 4594 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4595 (sha256
4596 (base32
5d1ade85 4597 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4598 (build-system python-build-system)
4599 (arguments
5d1ade85
RW
4600 `(#:python ,python-2 ; only Python 2.7 is supported
4601 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4602 (propagated-inputs
4603 `(("python2-numpy" ,python2-numpy)
4604 ("python2-scipy" ,python2-scipy)
4605 ("python2-pandas" ,python2-pandas)))
44d10b1f 4606 (native-inputs
5d1ade85 4607 `(("python2-cython" ,python2-cython)))
1b66989b 4608 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4609 (synopsis "Library for reading and manipulating genetic data")
4610 (description
4611 "PySnpTools is a library for reading and manipulating genetic data. It
4612can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4613those files. It can also efficiently manipulate ranges of integers using set
4614operators such as union, intersection, and difference.")
4615 (license license:asl2.0)))
4616
44d10b1f
RW
4617(define-public python-socksipy-branch
4618 (package
4619 (name "python-socksipy-branch")
4620 (version "1.01")
4621 (source
4622 (origin
4623 (method url-fetch)
4624 (uri (pypi-uri "SocksiPy-branch" version))
4625 (sha256
4626 (base32
4627 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4628 (build-system python-build-system)
4629 (arguments
4630 `(#:tests? #f)) ; There are no tests
4631 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4632 (synopsis "Python SOCKS module")
4633 (description
4634 "SocksiPy - A Python SOCKS client module. It provides a
4635socket-like interface that supports connections to any TCP
4636service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4637The original version was developed by Dan Haim, this is a
4638branch created by Mario Vilas to address some open issues,
4639as the original project seems to have been abandoned circa 2007.")
4640 (license license:bsd-3)))
4641
4642(define-public python2-socksipy-branch
4643 (package-with-python2 python-socksipy-branch))
4644
6fcceb23 4645(define-public python-socksipychain
27d8b9d9
AG
4646 (let ((commit "eb5ee8741ce006ac0c5c3e2e83204062c348c155")
4647 (revision "1")
4648 (version "2.1.1"))
4649 (package
4650 (name "python-socksipychain")
4651 (version (git-version version revision commit))
4652 (source
4653 (origin
4654 (method git-fetch)
4655 (uri (git-reference
4656 (url "https://github.com/pagekite/PySocksipyChain.git")
4657 (commit commit)))
4658 (file-name (git-file-name name version))
4659 (sha256
4660 (base32
4661 "0fpphn6xnpm7qk8a914s4abycsbq9w6qkci07my632v0fylnm5n7"))))
4662 (build-system python-build-system)
4663 (arguments
4664 `(#:tests? #f)) ; Tests try to access the network.
4665 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4666 (synopsis "Python SOCKS module with chained proxies support")
4667 (description
4668 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
6fcceb23
AG
4669adds support for arbitrary chaining of proxy servers and various modes of
4670TLS/SSL encryption. It was developed for use in PageKite, and also includes
4671a simple netcat replacement with chaining support.")
27d8b9d9 4672 (license license:bsd-3))))
6fcceb23 4673
44d10b1f
RW
4674(define-public python-pycodestyle
4675 (package
4676 (name "python-pycodestyle")
d16ef28b 4677 (version "2.5.0")
44d10b1f 4678 (source
ba88eea2
RW
4679 (origin
4680 (method url-fetch)
4681 (uri (pypi-uri "pycodestyle" version))
4682 (sha256
4683 (base32
d16ef28b 4684 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4685 (build-system python-build-system)
4686 (home-page "https://pycodestyle.readthedocs.io/")
4687 (synopsis "Python style guide checker")
4688 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4689Python code against some of the style conventions in
4690@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4691 (license license:expat)))
4692
4693(define-public python2-pycodestyle
4694 (package-with-python2 python-pycodestyle))
4695
4696(define-public python-multidict
4697 (package
4698 (name "python-multidict")
1ed3b845 4699 (version "4.7.5")
44d10b1f
RW
4700 (source
4701 (origin
4702 (method url-fetch)
4703 (uri (pypi-uri "multidict" version))
4704 (sha256
4705 (base32
1ed3b845 4706 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
44d10b1f 4707 (build-system python-build-system)
1ed3b845
MB
4708 (arguments
4709 '(#:modules ((ice-9 ftw)
4710 (srfi srfi-1)
4711 (srfi srfi-26)
4712 (guix build utils)
4713 (guix build python-build-system))
4714 #:phases (modify-phases %standard-phases
4715 (replace 'check
4716 (lambda* (#:key tests? #:allow-other-keys)
4717 (if tests?
4718 (begin
4719 (let ((libdir (find (cut string-prefix? "lib." <>)
4720 (scandir "build"))))
4721 (setenv "PYTHONPATH"
4722 (string-append "./build/" libdir ":"
4723 (getenv "PYTHONPATH")))
4724 (invoke "pytest" "-vv")))
4725 (format #t "test suite not run~%"))
4726 #t)))))
44d10b1f
RW
4727 (native-inputs
4728 `(("python-pytest" ,python-pytest)
1ed3b845 4729 ("python-pytest-cov" ,python-pytest-cov)))
44d10b1f
RW
4730 (home-page "https://github.com/aio-libs/multidict/")
4731 (synopsis "Multidict implementation")
4732 (description "Multidict is dict-like collection of key-value pairs
4733where key might be occurred more than once in the container.")
4734 (license license:asl2.0)))
4735
4736(define-public python-orderedmultidict
4737 (package
4738 (name "python-orderedmultidict")
4739 (version "0.7.11")
4740 (source
4741 (origin
4742 (method url-fetch)
4743 (uri (pypi-uri "orderedmultidict" version))
4744 (sha256
4745 (base32
4746 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4747 (build-system python-build-system)
4748 (arguments
4749 `(#:phases
4750 (modify-phases %standard-phases
4751 (add-after 'unpack 'fix-tests
4752 (lambda _
4753 ;; The package uses nosetest for running the tests.
4754 ;; Adding this initfile allows to run the test suite
4755 ;; without requiring nosetest.
d1c4f329
RW
4756 (with-output-to-file "tests/__init__.py" newline)
4757 #t)))))
44d10b1f
RW
4758 (propagated-inputs
4759 `(("python-six" ,python-six)))
4760 (native-inputs
4761 `(("python-pycodestyle" ,python-pycodestyle)))
4762 (home-page "https://github.com/gruns/orderedmultidict")
4763 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4764 (description "This package contains a library for ordered multivalue
4765dictionaries. A multivalue dictionary is a dictionary that can store
4766multiple values for the same key. An ordered multivalue dictionary is a
4767multivalue dictionary that retains the order of insertions and deletions.")
4768 (license license:unlicense)))
4769
4770(define-public python2-orderedmultidict
4771 (package-with-python2 python-orderedmultidict))
4772
4773(define-public python-autopep8
4774 (package
4775 (name "python-autopep8")
4776 (version "1.3.5")
4777 (source
4778 (origin
4779 (method url-fetch)
4780 (uri (pypi-uri "autopep8" version))
4781 (sha256
4782 (base32
4783 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4784 (build-system python-build-system)
4785 (propagated-inputs
4786 `(("python-pycodestyle" ,python-pycodestyle)))
4787 (home-page "https://github.com/hhatto/autopep8")
4788 (synopsis "Format Python code according to the PEP 8 style guide")
4789 (description
4790 "@code{autopep8} automatically formats Python code to conform to
4791the PEP 8 style guide. It uses the pycodestyle utility to determine
4792what parts of the code needs to be formatted. @code{autopep8} is
4793capable of fixing most of the formatting issues that can be reported
4794by pycodestyle.")
4795 (license (license:non-copyleft
4796 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4797
4798(define-public python2-autopep8
4799 (package-with-python2 python-autopep8))
4800
f2a64830
JK
4801(define-public python-distlib
4802 (package
4803 (name "python-distlib")
4804 (version "0.3.0")
4805 (source
4806 (origin
4807 (method url-fetch)
4808 (uri (pypi-uri "distlib" version ".zip"))
4809 (sha256
4810 (base32
4811 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
4812 (build-system python-build-system)
4813 (arguments
4814 `(#:phases
4815 (modify-phases %standard-phases
4816 (add-before 'build 'no-/bin/sh
4817 (lambda _
4818 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
4819 (("/bin/sh") (which "sh")))
4820 #t))
4821 (add-before 'check 'prepare-test-env
4822 (lambda _
4823 (setenv "HOME" "/tmp")
4824 ;; NOTE: Any value works, the variable just has to be present.
4825 (setenv "SKIP_ONLINE" "1")
4826 #t)))))
4827 (native-inputs `(("unzip" ,unzip)))
4828 (home-page "https://bitbucket.org/pypa/distlib")
4829 (synopsis "Distribution utilities")
4830 (description "Distlib is a library which implements low-level functions that
4831relate to packaging and distribution of Python software. It is intended to be
4832used as the basis for third-party packaging tools.")
4833 (license license:psfl)))
4834
44d10b1f
RW
4835(define-public python-distutils-extra
4836 (package
4837 (name "python-distutils-extra")
4838 (version "2.38")
4839 (source
4840 (origin
4841 (method url-fetch)
4842 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4843 version "/+download/python-distutils-extra-"
4844 version ".tar.gz"))
4845 (sha256
4846 (base32
4847 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4848 (build-system python-build-system)
4849 (home-page "https://launchpad.net/python-distutils-extra/")
4850 (synopsis "Enhancements to Python's distutils")
4851 (description
4852 "The python-distutils-extra module enables you to easily integrate
4853gettext support, themed icons, and scrollkeeper-based documentation into
4854Python's distutils.")
4855 (license license:gpl2)))
4856
4857(define-public python2-distutils-extra
4858 (package-with-python2 python-distutils-extra))
4859
4860(define-public python2-elib.intl
4861 (package
4862 (name "python2-elib.intl")
4863 (version "0.0.3")
4864 (source
4865 (origin
4866 ;; This project doesn't tag releases or publish tarballs, so we take
4867 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4868 (method git-fetch)
4869 (uri (git-reference
4870 (url "https://github.com/dieterv/elib.intl.git")
4871 (commit "d09997cfef")))
4872 (file-name (string-append name "-" version "-checkout"))
4873 (sha256
4874 (base32
4875 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4876 (build-system python-build-system)
4877 (arguments
4878 ;; incompatible with Python 3 (exception syntax)
4879 `(#:python ,python-2
4880 #:tests? #f))
4881 (home-page "https://github.com/dieterv/elib.intl")
4882 (synopsis "Enhanced internationalization for Python")
4883 (description
4884 "The elib.intl module provides enhanced internationalization (I18N)
4885services for your Python modules and applications.")
4886 (license license:lgpl3+)))
4887
4888(define-public python-olefile
4889 (package
4890 (name "python-olefile")
5bef0f10 4891 (version "0.46")
44d10b1f
RW
4892 (source
4893 (origin
4894 (method url-fetch)
5bef0f10
MB
4895 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4896 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4897 (file-name (string-append name "-" version ".tar.gz"))
4898 (sha256
4899 (base32
5bef0f10 4900 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4901 (build-system python-build-system)
5bef0f10 4902 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4903 (synopsis "Read and write Microsoft OLE2 files.")
4904 (description
4905 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4906Storage or Compound Document, Microsoft Office). It is an improved version of
4907the OleFileIO module from PIL, the Python Image Library.")
4908 (license license:bsd-3)))
4909
4910(define-public python2-olefile
4911 (package-with-python2 python-olefile))
4912
4913(define-public python-pillow
4914 (package
4915 (name "python-pillow")
5fbdd917 4916 (version "6.2.1")
44d10b1f
RW
4917 (source
4918 (origin
4919 (method url-fetch)
4920 (uri (pypi-uri "Pillow" version))
4921 (sha256
4922 (base32
5fbdd917 4923 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
44d10b1f
RW
4924 (build-system python-build-system)
4925 (native-inputs
4926 `(("python-pytest" ,python-pytest)))
4927 (inputs
4928 `(("freetype" ,freetype)
4929 ("lcms" ,lcms)
44d10b1f 4930 ("libjpeg" ,libjpeg)
44d10b1f 4931 ("libtiff" ,libtiff)
0c4e1c5f
EF
4932 ("libwebp" ,libwebp)
4933 ("openjpeg" ,openjpeg)
4934 ("zlib" ,zlib)))
44d10b1f
RW
4935 (propagated-inputs
4936 `(("python-olefile" ,python-olefile)))
4937 (arguments
4938 `(#:phases
4939 (modify-phases %standard-phases
4940 (add-after 'unpack 'patch-ldconfig
4941 (lambda _
4942 (substitute* "setup.py"
4943 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
61b77ff3 4944 (replace 'check
979d8464
EF
4945 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4946 (if tests?
4947 (begin
4948 (setenv "HOME" (getcwd))
4949 ;; Make installed package available for running the tests.
4950 (add-installed-pythonpath inputs outputs)
4951 (invoke "python" "selftest.py" "--installed")
4952 (invoke "python" "-m" "pytest" "-vv"))
4953 #t))))))
44d10b1f
RW
4954 (home-page "https://python-pillow.org")
4955 (synopsis "Fork of the Python Imaging Library")
4956 (description
4957 "The Python Imaging Library adds image processing capabilities to your
4958Python interpreter. This library provides extensive file format support, an
4959efficient internal representation, and fairly powerful image processing
4960capabilities. The core image library is designed for fast access to data
4961stored in a few basic pixel formats. It should provide a solid foundation for
4962a general image processing tool.")
4963 (license (license:x11-style
4964 "http://www.pythonware.com/products/pil/license.htm"
4965 "The PIL Software License"))))
4966
4967(define-public python2-pillow
4968 (package-with-python2 python-pillow))
4969
4970(define-public python-pycparser
4971 (package
4972 (name "python-pycparser")
c6c0940e 4973 (version "2.19")
44d10b1f
RW
4974 (source
4975 (origin
4976 (method url-fetch)
4977 (uri (pypi-uri "pycparser" version))
4978 (sha256
4979 (base32
c6c0940e 4980 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4981 (outputs '("out" "doc"))
4982 (build-system python-build-system)
4983 (native-inputs
4984 `(("pkg-config" ,pkg-config)))
4985 (arguments
4986 `(#:phases
4987 (modify-phases %standard-phases
4988 (replace 'check
4989 (lambda _
4990 (with-directory-excursion "tests"
acb75c03
RW
4991 (invoke "python" "all_tests.py"))
4992 #t))
44d10b1f
RW
4993 (add-after 'install 'install-doc
4994 (lambda* (#:key outputs #:allow-other-keys)
4995 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4996 (doc (string-append data "/doc/" ,name "-" ,version))
4997 (examples (string-append doc "/examples")))
4998 (mkdir-p examples)
4999 (for-each (lambda (file)
5000 (copy-file (string-append "." file)
5001 (string-append doc file)))
5002 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
5003 (copy-recursively "examples" examples)
5004 #t))))))
44d10b1f
RW
5005 (home-page "https://github.com/eliben/pycparser")
5006 (synopsis "C parser in Python")
5007 (description
5008 "Pycparser is a complete parser of the C language, written in pure Python
5009using the PLY parsing library. It parses C code into an AST and can serve as
5010a front-end for C compilers or analysis tools.")
5011 (license license:bsd-3)))
5012
5013(define-public python2-pycparser
5014 (package-with-python2 python-pycparser))
5015
5016(define-public python-pywavelets
5017 (package
5018 (name "python-pywavelets")
5019 (version "1.0.1")
5020 (home-page "https://github.com/PyWavelets/pywt")
5021 (source (origin
5022 (method url-fetch)
5023 (uri (pypi-uri "PyWavelets" version))
5024 (sha256
5025 (base32
5026 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
5027 (build-system python-build-system)
5028 (arguments
5029 '(#:modules ((ice-9 ftw)
5030 (srfi srfi-1)
5031 (srfi srfi-26)
5032 (guix build utils)
5033 (guix build python-build-system))
5034 #:phases (modify-phases %standard-phases
5035 (replace 'check
5036 (lambda _
5037 (let ((cwd (getcwd))
5038 (libdir (find (cut string-prefix? "lib." <>)
5039 (scandir "build"))))
5040 (with-directory-excursion (string-append cwd "/build/" libdir)
5041 (invoke "nosetests" "-v" "."))))))))
5042 (native-inputs
5043 `(("python-matplotlib" ,python-matplotlib) ;for tests
5044 ("python-nose" ,python-nose)))
5045 (propagated-inputs
5046 `(("python-numpy" ,python-numpy)))
5047 (synopsis "Wavelet transforms in Python")
5048 (description
5049 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5050mathematical basis functions that are localized in both time and frequency.
5051Wavelet transforms are time-frequency transforms employing wavelets. They are
5052similar to Fourier transforms, the difference being that Fourier transforms are
5053localized only in frequency instead of in time and frequency.")
5054 (license license:expat)))
5055
5056(define-public python2-pywavelets
5057 (package-with-python2 python-pywavelets))
5058
9b0c95cc
AT
5059(define-public python-pywinrm
5060 (package
5061 (name "python-pywinrm")
5062 (version "0.4.1")
5063 (source
5064 (origin
5065 (method url-fetch)
5066 (uri (pypi-uri "pywinrm" version))
5067 (sha256
5068 (base32
5069 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
5070 (build-system python-build-system)
5071 (propagated-inputs
5072 `(("python-six" ,python-six)
5073 ("python-requests_ntlm" ,python-requests_ntlm)
5074 ("python-xmltodict" ,python-xmltodict)
5075 ("python-kerberos" ,python-kerberos)))
5076 (native-inputs
5077 `(("python-mock" ,python-mock)
5078 ("python-pytest" ,python-pytest)))
5079 (home-page "https://github.com/diyan/pywinrm/")
5080 (synopsis
5081 "Python library for Windows Remote Management (WinRM)")
5082 (description
5083 "pywinrm is a Python client for the Windows Remote Management (WinRM)
5084service. It allows you to invoke commands on target Windows machines from
5085any machine that can run Python.")
5086 (license license:expat)))
5087
44d10b1f
RW
5088(define-public python-xcffib
5089 (package
5090 (name "python-xcffib")
5091 (version "0.6.0")
5092 (source
5093 (origin
5094 (method url-fetch)
5095 (uri (pypi-uri "xcffib" version))
5096 (sha256
5097 (base32
5098 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5099 (build-system python-build-system)
5100 (inputs
5101 `(("libxcb" ,libxcb)))
5102 (propagated-inputs
5103 `(("python-cffi" ,python-cffi) ; used at run time
5104 ("python-six" ,python-six)))
5105 (arguments
5106 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5107 #:tests? #f
5108 #:phases
5109 (modify-phases %standard-phases
5110 (add-after 'unpack 'fix-libxcb-path
5111 (lambda* (#:key inputs #:allow-other-keys)
5112 (let ((libxcb (assoc-ref inputs "libxcb")))
5113 (substitute* '("xcffib/__init__.py")
5114 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5115 #t)))
5116 (add-after 'install 'install-doc
5117 (lambda* (#:key outputs #:allow-other-keys)
5118 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5119 "/doc/" ,name "-" ,version)))
5120 (mkdir-p doc)
5121 (copy-file "README.md"
5122 (string-append doc "/README.md"))
5123 #t))))))
5124 (home-page "https://github.com/tych0/xcffib")
5125 (synopsis "XCB Python bindings")
5126 (description
5127 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5128support for Python 3 and PyPy. It is based on cffi.")
5129 (license license:expat)))
5130
5131(define-public python2-xcffib
5132 (package-with-python2 python-xcffib))
5133
5134(define-public python-cairocffi
5135 (package
5136 (name "python-cairocffi")
5137 (version "0.9.0")
5138 (source
5139 (origin
5140 (method url-fetch)
5141 (uri (pypi-uri "cairocffi" version))
5142 (sha256
5143 (base32
5144 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5145 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5146 (build-system python-build-system)
5147 (outputs '("out" "doc"))
5148 (inputs
5149 `(("glib" ,glib)
5150 ("gtk+" ,gtk+)
5151 ("gdk-pixbuf" ,gdk-pixbuf)
5152 ("cairo" ,cairo)
5153 ("pango" ,pango)))
5154 (native-inputs
5155 `(("pkg-config" ,pkg-config)
5156 ("python-pytest" ,python-pytest)
5157 ("python-pytest-cov" ,python-pytest-cov)
5158 ("python-pytest-runner" ,python-pytest-runner)
5159 ("python-sphinx" ,python-sphinx)
5160 ("python-docutils" ,python-docutils)))
5161 (propagated-inputs
5162 `(("python-xcffib" ,python-xcffib))) ; used at run time
5163 (arguments
5164 `(#:phases
5165 (modify-phases %standard-phases
5166 (add-after 'unpack 'patch-paths
5167 (lambda* (#:key inputs outputs #:allow-other-keys)
5168 (substitute* (find-files "." "\\.py$")
5169 (("dlopen\\(ffi, 'cairo'")
5170 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
5171 "/lib/libcairo.so.2'"))
5172 (("dlopen\\(ffi, 'gdk-3'")
5173 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
5174 "/lib/libgtk-3.so.0'"))
5175 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
5176 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
5177 "/lib/libgdk_pixbuf-2.0.so.0'"))
5178 (("dlopen\\(ffi, 'glib-2.0'")
5179 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5180 "/lib/libglib-2.0.so.0'"))
5181 (("dlopen\\(ffi, 'gobject-2.0'")
5182 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5183 "/lib/libgobject-2.0.so.0'"))
5184 (("dlopen\\(ffi, 'pangocairo-1.0'")
5185 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5186 "/lib/libpangocairo-1.0.so.0'"))
5187 (("dlopen\\(ffi, 'pango-1.0'")
5188 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5189 "/lib/libpango-1.0.so.0'")))
5190 #t))
5191 (add-after 'install 'install-doc
5192 (lambda* (#:key inputs outputs #:allow-other-keys)
5193 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5194 (doc (string-append data "/doc/" ,name "-" ,version))
5195 (html (string-append doc "/html")))
5196 (setenv "LD_LIBRARY_PATH"
5197 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5198 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5199 (setenv "LANG" "en_US.UTF-8")
5200 (mkdir-p html)
5201 (for-each (lambda (file)
5202 (copy-file (string-append "." file)
5203 (string-append doc file)))
5204 '("/README.rst" "/CHANGES" "/LICENSE"))
5205 (system* "python" "setup.py" "build_sphinx")
5206 (copy-recursively "docs/_build/html" html)
5207 #t))))))
5208 (home-page "https://github.com/Kozea/cairocffi")
5209 (synopsis "Python bindings and object-oriented API for Cairo")
5210 (description
5211 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5212Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5213graphics library with support for multiple backends including image buffers,
5214PNG, PostScript, PDF, and SVG file output.")
5215 (license license:bsd-3)))
5216
5217(define-public python2-cairocffi
5218 (package-with-python2 python-cairocffi))
5219
5220(define-public python-decorator
5221 (package
5222 (name "python-decorator")
5223 (version "4.3.0")
5224 (source
5225 (origin
5226 (method url-fetch)
5227 (uri (pypi-uri "decorator" version))
5228 (sha256
5229 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
5230 (build-system python-build-system)
e85af137 5231 (home-page "https://pypi.org/project/decorator/")
44d10b1f
RW
5232 (synopsis "Python module to simplify usage of decorators")
5233 (description
5234 "The aim of the decorator module is to simplify the usage of decorators
5235for the average programmer, and to popularize decorators usage giving examples
5236of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5237etc. The core of this module is a decorator factory.")
5238 (license license:expat)))
5239
5240(define-public python2-decorator
5241 (package-with-python2 python-decorator))
5242
5243(define-public python-drmaa
5244 (package
5245 (name "python-drmaa")
5246 (version "0.7.7")
5247 (source
5248 (origin
5249 (method url-fetch)
5250 (uri (pypi-uri "drmaa" version))
5251 (sha256
5252 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5253 (build-system python-build-system)
5254 ;; The test suite requires libdrmaa which is provided by the cluster
5255 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5256 ;; should be set to the path of the libdrmaa library.
5257 (arguments '(#:tests? #f))
5258 (native-inputs
5259 `(("python-nose" ,python-nose)))
e85af137 5260 (home-page "https://pypi.org/project/drmaa/")
44d10b1f
RW
5261 (synopsis "Python bindings for the DRMAA library")
5262 (description
5263 "A Python package for Distributed Resource Management (DRM) job
5264submission and control. This package is an implementation of the DRMAA 1.0
5265Python language binding specification.")
5266 (license license:bsd-3)))
5267
5268(define-public python2-drmaa
5269 (package-with-python2 python-drmaa))
5270
5271(define-public python-grako
5272 (package
5273 (name "python-grako")
5274 (version "3.99.9")
5275 (source
5276 (origin
5277 (method url-fetch)
5278 (uri
5279 (pypi-uri "grako" version ".zip"))
5280 (sha256
5281 (base32
5282 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5283 (build-system python-build-system)
5284 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5285 (native-inputs
5286 `(("unzip" ,unzip)
5287 ("python-pytest" ,python-pytest)
5288 ("python-pytest-runner" ,python-pytest-runner)))
5289 (home-page "https://bitbucket.org/neogeny/grako")
5290 (synopsis "EBNF parser generator")
5291 (description
5292 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5293memoizing PEG/Packrat parser in Python.")
5294 (license license:bsd-3)))
5295
5296(define-public python2-grako
5297 (package-with-python2 python-grako))
5298
5299(define-public python-gridmap
5300 (package
5301 (name "python-gridmap")
5302 (version "0.13.0")
5303 (source
5304 (origin
768fea0f
TGR
5305 (method git-fetch)
5306 (uri (git-reference
5307 (url "https://github.com/pygridtools/gridmap.git")
5308 (commit (string-append "v" version))))
5309 (file-name (git-file-name name version))
44d10b1f 5310 (sha256
768fea0f 5311 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
5312 (build-system python-build-system)
5313 (arguments
5314 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5315 (propagated-inputs
5316 `(("python-psutil" ,python-psutil)
5317 ("python-drmaa" ,python-drmaa)
5318 ("python-pyzmq" ,python-pyzmq)))
5319 (home-page "https://github.com/pygridtools/gridmap")
5320 (synopsis "Create jobs on a cluster directly from Python")
5321 (description
5322 "Gridmap is a Python package to allow you to easily create jobs on the
5323cluster directly from Python. You can directly map Python functions onto the
5324cluster without needing to write any wrapper code yourself.")
5325 (license license:gpl3+)))
5326
5327(define-public python2-gridmap
5328 (package-with-python2 python-gridmap))
5329
5330(define-public python-honcho
5331 (package
5332 (name "python-honcho")
5333 (version "1.0.1")
5334 (source
5335 (origin
8524d130
TGR
5336 (method git-fetch)
5337 (uri (git-reference
5338 (url "https://github.com/nickstenning/honcho.git")
5339 (commit (string-append "v" version))))
5340 (file-name (git-file-name name version))
44d10b1f 5341 (sha256
8524d130 5342 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
5343 (build-system python-build-system)
5344 (native-inputs
5345 `(("python-pytest" ,python-pytest)
5346 ("python-mock" ,python-mock)
5347 ("python-tox" ,python-tox)
5348 ("which" ,which))) ;for tests
5349 (propagated-inputs
5350 `(("python-jinja2" ,python-jinja2)))
5351 (arguments
5352 `(#:phases
5353 (modify-phases %standard-phases
5354 (delete 'check)
5355 (add-after 'install 'check
5356 (lambda* (#:key outputs inputs #:allow-other-keys)
5357 ;; fix honcho path in testsuite
5358 (substitute* "tests/conftest.py"
5359 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5360 "/bin/honcho" "'")))
5361 ;; It's easier to run tests after install.
5362 ;; Make installed package available for running the tests
5363 (add-installed-pythonpath inputs outputs)
95b707fb 5364 (invoke "py.test" "-v"))))))
44d10b1f
RW
5365 (home-page "https://github.com/nickstenning/honcho")
5366 (synopsis "Manage Procfile-based applications")
5367 (description
5368 "A Procfile is a file which describes how to run an application
50fceab0 5369consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
5370The output of all running processes is collected by honcho and
5371displayed.")
5372 (license license:expat)))
5373
5374(define-public python2-honcho
5375 (package-with-python2 python-honcho))
5376
5377(define-public python-pexpect
5378 (package
5379 (name "python-pexpect")
2c15cb58 5380 (version "4.8.0")
44d10b1f
RW
5381 (source
5382 (origin
5383 (method url-fetch)
5384 (uri (pypi-uri "pexpect" version))
5385 (sha256
2c15cb58 5386 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
44d10b1f
RW
5387 (build-system python-build-system)
5388 (arguments
5389 `(#:phases
5390 (modify-phases %standard-phases
5391 (add-before 'check 'prepare-tests
5392 (lambda _
5393 (substitute* (find-files "tests")
5394 (("/bin/ls") (which "ls"))
5395 (("/bin/echo") (which "echo"))
5396 (("/bin/which") (which "which"))
5397 ;; Many tests try to use the /bin directory which
5398 ;; is not present in the build environment.
5399 ;; Use one that's non-empty and unlikely to change.
2c15cb58
TLC
5400 (("/bin'") "/dev'")
5401 ;; Disable failing test. See upstream bug report
5402 ;; https://github.com/pexpect/pexpect/issues/568
5403 (("def test_bash") "def _test_bash"))
44d10b1f
RW
5404 ;; XXX: Socket connection test gets "Connection reset by peer".
5405 ;; Why does it not work? Delete for now.
5406 (delete-file "tests/test_socket.py")
5407 #t))
5408 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5409 (native-inputs
5410 `(("python-nose" ,python-nose)
5411 ("python-pytest" ,python-pytest)
5412 ("man-db" ,man-db)
5413 ("which" ,which)
5414 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5415 (propagated-inputs
5416 `(("python-ptyprocess" ,python-ptyprocess)))
5417 (home-page "http://pexpect.readthedocs.org/")
5418 (synopsis "Controlling interactive console applications")
5419 (description
5420 "Pexpect is a pure Python module for spawning child applications;
5421controlling them; and responding to expected patterns in their output.
5422Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5423child application and control it as if a human were typing commands.")
5424 (license license:isc)))
5425
5426(define-public python2-pexpect
5427 (package-with-python2 python-pexpect))
5428
5429(define-public python-setuptools-scm
5430 (package
5431 (name "python-setuptools-scm")
85092643 5432 (version "3.2.0")
44d10b1f
RW
5433 (source (origin
5434 (method url-fetch)
5435 (uri (pypi-uri "setuptools_scm" version))
5436 (sha256
5437 (base32
85092643 5438 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
5439 (build-system python-build-system)
5440 (home-page "https://github.com/pypa/setuptools_scm/")
5441 (synopsis "Manage Python package versions in SCM metadata")
5442 (description
5443 "Setuptools_scm handles managing your Python package versions in
5444@dfn{software configuration management} (SCM) metadata instead of declaring
5445them as the version argument or in a SCM managed file.")
5446 (license license:expat)))
5447
a0b2accf
MO
5448;; Needed by python-lazy-object-proxy, remove on next update cycle.
5449(define-public python-setuptools-scm-3.3
5450 (package
5451 (inherit python-setuptools-scm)
5452 (version "3.3.3")
5453 (source (origin
5454 (method url-fetch)
5455 (uri (pypi-uri "setuptools_scm" version))
5456 (sha256
5457 (base32
5458 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5459
44d10b1f
RW
5460(define-public python2-setuptools-scm
5461 (package-with-python2 python-setuptools-scm))
5462
bb74ea09
RW
5463(define-public python-pathlib2
5464 (package
5465 (name "python-pathlib2")
5466 (version "2.3.3")
5467 (source
5468 (origin
5469 (method url-fetch)
5470 (uri (pypi-uri "pathlib2" version))
5471 (sha256
5472 (base32
5473 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5474 (build-system python-build-system)
5475 (propagated-inputs
5476 `(("python-scandir" ,python-scandir)
5477 ("python-six" ,python-six)))
e85af137 5478 (home-page "https://pypi.org/project/pathlib2/")
746d3384 5479 (synopsis "Object-oriented file system paths")
bb74ea09
RW
5480 (description "The goal of pathlib2 is to provide a backport of the
5481standard @code{pathlib} module which tracks the standard library module, so
5482all the newest features of the standard @code{pathlib} can be used also on
5483older Python versions.")
5484 (license license:expat)))
5485
fd5c264a
MB
5486(define-public python2-importlib-resources
5487 (package
5488 (name "python2-importlib-resources")
5489 (version "1.0.2")
5490 (source (origin
5491 (method url-fetch)
5492 (uri (pypi-uri "importlib_resources" version))
5493 (sha256
5494 (base32
5495 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5496 (build-system python-build-system)
5497 (arguments
5498 `(#:python ,python-2))
5499 (native-inputs
5500 `(("python-wheel" ,python2-wheel)))
5501 (propagated-inputs
5502 `(("python-pathlib2" ,python2-pathlib2)
5503 ("python-typing" ,python2-typing)))
5504 (home-page "https://gitlab.com/python-devs/importlib_resources")
5505 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5506 (description
5507 "This package provides an implementation of @code{importlib.resources}
5508for older versions of Python.")
5509 (license license:asl2.0)))
5510
15b65617
RW
5511(define-public python-importlib-metadata
5512 (package
5513 (name "python-importlib-metadata")
4dc04d11 5514 (version "1.4.0")
15b65617
RW
5515 (source
5516 (origin
5517 (method url-fetch)
5518 (uri (pypi-uri "importlib_metadata" version))
5519 (sha256
4dc04d11 5520 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
15b65617
RW
5521 (build-system python-build-system)
5522 (propagated-inputs
4dc04d11 5523 `(("python-zipp" ,python-zipp)))
15b65617
RW
5524 (native-inputs
5525 `(("python-setuptools-scm" ,python-setuptools-scm)
4dc04d11 5526 ("python-packaging" ,python-packaging)))
15b65617
RW
5527 (home-page "https://importlib-metadata.readthedocs.io/")
5528 (synopsis "Read metadata from Python packages")
5529 (description
5530 "@code{importlib_metadata} is a library which provides an API for
5531accessing an installed Python package's metadata, such as its entry points or
5532its top-level name. This functionality intends to replace most uses of
5533@code{pkg_resources} entry point API and metadata API. Along with
5534@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5535need to use the older and less efficient @code{pkg_resources} package.")
3dfb3d44 5536 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
15b65617
RW
5537 (license license:asl2.0)))
5538
5efa04dd
MB
5539(define-public python2-importlib-metadata
5540 (let ((base (package-with-python2 (strip-python2-variant
5541 python-importlib-metadata))))
5542 (package/inherit
5543 base
5544 (name "python2-importlib-metadata")
5545 (propagated-inputs
5546 `(("python-configparser" ,python2-configparser)
5547 ("python-contextlib2" ,python2-contextlib2)
5548 ("python-importlib-resources" ,python2-importlib-resources)
5549 ("python-pathlib2" ,python2-pathlib2)
5550 ,@(package-propagated-inputs base))))))
5551
37c173d1
RW
5552(define-public python-jaraco-packaging
5553 (package
5554 (name "python-jaraco-packaging")
5555 (version "6.1")
5556 (source
5557 (origin
5558 (method url-fetch)
5559 (uri (pypi-uri "jaraco.packaging" version))
5560 (sha256
5561 (base32
5562 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5563 (build-system python-build-system)
5564 (propagated-inputs
5565 `(("python-pytest" ,python-pytest)
5566 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5567 ("python-pytest-flake8" ,python-pytest-flake8)
5568 ("python-rst.linker" ,python-rst.linker)
5569 ("python-setuptools" ,python-setuptools)
5570 ("python-setuptools-scm" ,python-setuptools-scm)
5571 ("python-six" ,python-six)
5572 ("python-sphinx" ,python-sphinx)))
5573 (home-page "https://github.com/jaraco/jaraco.packaging")
5574 (synopsis "Tools to supplement packaging Python releases")
5575 (description
5576 "This package provides various tools to supplement packaging Python
5577releases.")
5578 (license license:expat)))
5579
44d10b1f
RW
5580(define-public python-pathpy
5581 (package
5582 (name "python-pathpy")
a3dd8871 5583 (version "11.5.1")
44d10b1f
RW
5584 (source
5585 (origin
5586 (method url-fetch)
5587 (uri (pypi-uri "path.py" version))
5588 (sha256
a3dd8871 5589 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5590 (outputs '("out" "doc"))
44d10b1f
RW
5591 (build-system python-build-system)
5592 (propagated-inputs
01a53e0b
MC
5593 `(("python-appdirs" ,python-appdirs)
5594 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5595 (native-inputs
5596 `(("python-setuptools-scm" ,python-setuptools-scm)
5597 ("python-sphinx" ,python-sphinx)
5598 ("python-rst.linker" ,python-rst.linker)
5599 ("python-pytest" ,python-pytest)
49ad11e9
RW
5600 ("python-pytest-runner" ,python-pytest-runner)
5601 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5602 (arguments
49ad11e9
RW
5603 `(#:phases
5604 (modify-phases %standard-phases
5605 (add-after 'build 'build-doc
5606 (lambda _
5607 (setenv "LANG" "en_US.UTF-8")
5608 (invoke "python" "setup.py" "build_sphinx")))
5609 (add-after 'install 'install-doc
5610 (lambda* (#:key outputs #:allow-other-keys)
5611 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5612 (doc (string-append data "/doc/" ,name "-" ,version))
5613 (html (string-append doc "/html")))
5614 (mkdir-p html)
5615 (for-each (lambda (file)
5616 (copy-file file (string-append doc "/" file)))
5617 '("README.rst" "CHANGES.rst"))
5618 (copy-recursively "build/sphinx/html" html)
5619 #t)))
5620 (replace 'check
5621 (lambda _
5622 ;; The import time test aborts if an import takes longer than
5623 ;; 100ms. It may very well take a little longer than that.
5624 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5625 (home-page "https://github.com/jaraco/path.py")
5626 (synopsis "Python module wrapper for built-in os.path")
5627 (description
5628 "@code{path.py} implements path objects as first-class entities, allowing
5629common operations on files to be invoked on those path objects directly.")
5630 (license license:expat)))
5631
5632(define-public python2-pathpy
5633 (package-with-python2 python-pathpy))
5634
5635(define-public python-simplegeneric
5636 (package
5637 (name "python-simplegeneric")
5638 (version "0.8.1")
5639 (source
5640 (origin
5641 (method url-fetch)
6c8c3980 5642 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5643 (sha256
5644 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5645 (build-system python-build-system)
5646 (native-inputs
5647 `(("unzip" ,unzip)))
5648 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5649 (synopsis "Python module for simple generic functions")
5650 (description
5651 "The simplegeneric module lets you define simple single-dispatch generic
5652functions, akin to Python’s built-in generic functions like @code{len()},
5653@code{iter()} and so on. However, instead of using specially-named methods,
5654these generic functions use simple lookup tables, akin to those used by
5655e.g. @code{pickle.dump()} and other generic functions found in the Python
5656standard library.")
5657 (license license:zpl2.1)))
5658
5659(define-public python2-simplegeneric
5660 (package-with-python2 python-simplegeneric))
5661
5662(define-public python-ipython-genutils
5663 ;; TODO: This package is retired, check if can be removed, see description.
5664 (package
5665 (name "python-ipython-genutils")
5666 (version "0.1.0")
5667 (source
5668 (origin
5669 (method url-fetch)
c9671d4b 5670 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5671 (sha256
5672 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5673 (build-system python-build-system)
5674 (arguments `(#:tests? #f)) ; no tests
5675 (home-page "https://ipython.org")
5676 (synopsis "Vestigial utilities from IPython")
5677 (description
5678 "This package provides retired utilities from IPython. No packages
5679outside IPython/Jupyter should depend on it.
5680
5681This package shouldn't exist. It contains some common utilities shared by
5682Jupyter and IPython projects during The Big Split. As soon as possible, those
5683packages will remove their dependency on this, and this package will go
5684away.")
5685 (license license:bsd-3)))
5686
5687(define-public python2-ipython-genutils
5688 (package-with-python2 python-ipython-genutils))
5689
5690(define-public python-traitlets
5691 (package
5692 (name "python-traitlets")
ac5e205a 5693 (version "4.3.3")
44d10b1f
RW
5694 (source
5695 (origin
5696 (method url-fetch)
5697 (uri (pypi-uri "traitlets" version))
5698 (sha256
5699 (base32
ac5e205a 5700 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5701 (build-system python-build-system)
5702 (arguments
5703 `(#:phases
5704 (modify-phases %standard-phases
5705 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5706 (propagated-inputs
5707 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5708 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5709 (native-inputs
5710 `(("python-pytest" ,python-pytest)))
5711 (properties `((python2-variant . ,(delay python2-traitlets))))
5712 (home-page "https://ipython.org")
5713 (synopsis "Configuration system for Python applications")
5714 (description
5715 "Traitlets is a framework that lets Python classes have attributes with
5716type checking, dynamically calculated default values, and ‘on change’
5717callbacks. The package also includes a mechanism to use traitlets for
5718configuration, loading values from files or from command line arguments. This
5719is a distinct layer on top of traitlets, so you can use traitlets in your code
5720without using the configuration machinery.")
5721 (license license:bsd-3)))
5722
5723(define-public python2-traitlets
5724 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5725 (package
5726 (inherit traitlets)
5727 (propagated-inputs
5728 `(("python2-enum34" ,python2-enum34)
5729 ,@(package-propagated-inputs traitlets))))))
5730
5731(define-public python-jupyter-core
5732 (package
5733 (name "python-jupyter-core")
5734 (version "4.4.0")
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (string-append (pypi-uri "jupyter_core" version)))
5739 (sha256
5740 (base32
5741 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5742 (build-system python-build-system)
5743 ;; FIXME: not sure how to run the tests
5744 (arguments `(#:tests? #f))
5745 (propagated-inputs
5746 `(("python-traitlets" ,python-traitlets)))
5747 (home-page "http://jupyter.org/")
5748 (synopsis "Jupyter base package")
5749 (description
5750 "Jupyter core is the base package on which Jupyter projects rely.")
5751 (license license:bsd-3)))
5752
5753(define-public python2-jupyter-core
5754 (package-with-python2 python-jupyter-core))
5755
5756(define-public python-jupyter-client
5757 (package
5758 (name "python-jupyter-client")
5759 (version "5.2.4")
5760 (source
5761 (origin
5762 (method url-fetch)
5763 (uri (pypi-uri "jupyter_client" version))
5764 (sha256
5765 (base32
5766 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5767 (build-system python-build-system)
5768 ;; Tests fail because of missing native python kernel which I assume is
5769 ;; provided by the ipython package, which we cannot use because it would
5770 ;; cause a dependency cycle.
ddc586ea
LC
5771 (arguments
5772 `(#:tests? #f
5773
5774 #:phases (modify-phases %standard-phases
5775 (add-after 'unpack 'set-tool-file-names
5776 (lambda* (#:key inputs #:allow-other-keys)
5777 (let ((iproute (assoc-ref inputs "iproute")))
5778 (substitute* "jupyter_client/localinterfaces.py"
5779 (("'ip'")
5780 (string-append "'" iproute "/sbin/ip'")))
5781 #t))))))
5782 (inputs
5783 `(("iproute" ,iproute)))
44d10b1f
RW
5784 (propagated-inputs
5785 `(("python-pyzmq" ,python-pyzmq)
5786 ("python-traitlets" ,python-traitlets)
5787 ("python-jupyter-core" ,python-jupyter-core)))
5788 (home-page "http://jupyter.org/")
5789 (synopsis "Jupyter protocol implementation and client libraries")
5790 (description
5791 "The @code{jupyter_client} package contains the reference implementation
5792of the Jupyter protocol. It also provides client and kernel management APIs
5793for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5794installing @code{kernelspec}s for use with Jupyter frontends.")
5795 (license license:bsd-3)))
5796
5797(define-public python2-jupyter-client
5798 (package-with-python2 python-jupyter-client))
5799
5800(define-public python-ipykernel
5801 (package
5802 (name "python-ipykernel")
08d0a355 5803 (version "5.1.3")
44d10b1f
RW
5804 (source
5805 (origin
5806 (method url-fetch)
5807 (uri (pypi-uri "ipykernel" version))
5808 (sha256
08d0a355 5809 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5810 (build-system python-build-system)
5811 (arguments
5812 `(#:phases
5813 (modify-phases %standard-phases
5814 (replace 'check
5815 (lambda _
5816 (setenv "HOME" "/tmp")
5817 (invoke "pytest" "-v")
aa856d02
LC
5818 #t))
5819 (add-after 'install 'set-python-file-name
5820 (lambda* (#:key outputs #:allow-other-keys)
5821 ;; Record the absolute file name of the 'python' executable in
5822 ;; 'kernel.json'.
5823 (let ((out (assoc-ref outputs "out")))
5824 (substitute* (string-append out "/share/jupyter"
5825 "/kernels/python3/kernel.json")
5826 (("\"python\"")
5827 (string-append "\"" (which "python") "\"")))
5828 #t))))))
44d10b1f
RW
5829 (propagated-inputs
5830 `(("python-ipython" ,python-ipython)
5831 ;; imported at runtime during connect
5832 ("python-jupyter-client" ,python-jupyter-client)))
5833 (native-inputs
08d0a355
TGR
5834 `(("python-flaky" ,python-flaky)
5835 ("python-nose" ,python-nose)
5836 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5837 (home-page "https://ipython.org")
5838 (synopsis "IPython Kernel for Jupyter")
5839 (description
5840 "This package provides the IPython kernel for Jupyter.")
578e4cf4 5841 (properties `((python2-variant . ,(delay python2-ipykernel))))
44d10b1f
RW
5842 (license license:bsd-3)))
5843
578e4cf4 5844;; Version 5.x and above no longer support Python 2.
44d10b1f 5845(define-public python2-ipykernel
0f378947
RW
5846 (package
5847 (name "python2-ipykernel")
578e4cf4 5848 (version "4.10.1")
0f378947
RW
5849 (source
5850 (origin
5851 (method url-fetch)
5852 (uri (pypi-uri "ipykernel" version))
5853 (sha256
578e4cf4 5854 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
0f378947
RW
5855 (build-system python-build-system)
5856 (arguments
578e4cf4 5857 `(#:python ,python-2))
0f378947
RW
5858 (propagated-inputs
5859 `(("python2-ipython" ,python2-ipython)
5860 ;; imported at runtime during connect
578e4cf4
EF
5861 ("python2-jupyter-client" ,python2-jupyter-client)
5862 ("python2-tornado" ,python2-tornado)
5863 ("python2-traitlets" ,python2-traitlets)))
0f378947 5864 (native-inputs
578e4cf4
EF
5865 `(("python2-mock" ,python2-mock)
5866 ("python2-nose" ,python2-nose)
5867 ("python2-pytest" ,python2-pytest)
5868 ("python2-pytest-cov" ,python2-pytest-cov)))
0f378947
RW
5869 (home-page "https://ipython.org")
5870 (synopsis "IPython Kernel for Jupyter")
5871 (description
5872 "This package provides the IPython kernel for Jupyter.")
5873 (license license:bsd-3)))
44d10b1f 5874
966aa714
AE
5875(define-public python-pari-jupyter
5876 (package
5877 (name "python-pari-jupyter")
5878 (version "1.3.2")
5879 (source
5880 (origin
5881 (method url-fetch)
5882 (uri (pypi-uri "pari_jupyter" version))
5883 (sha256
5884 (base32
5885 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5886 (build-system python-build-system)
5887 (propagated-inputs
5888 `(("python-ipykernel" ,python-ipykernel)))
5889 (inputs
5890 `(("pari-gp" ,pari-gp)
5891 ("readline" ,readline)))
5892 (arguments
5893 `(#:tests? #f)) ; no test suite
5894 (home-page
5895 "https://github.com/jdemeyer/pari_jupyter")
5896 (synopsis "A Jupyter kernel for PARI/GP")
5897 (description "The package provides a PARI/GP kernel for Jupyter.")
5898 (license license:gpl3+)))
5899
dede052a
RW
5900(define-public python-backcall
5901 (package
5902 (name "python-backcall")
5903 (version "0.1.0")
5904 (source
5905 (origin
5906 (method url-fetch)
5907 (uri (pypi-uri "backcall" version))
5908 (sha256
5909 (base32
5910 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5911 (build-system python-build-system)
5912 (home-page "https://github.com/takluyver/backcall/")
5913 (synopsis "Specifications for callback functions passed in to an API")
5914 (description
5915 "If your code lets other people supply callback functions, it's important
5916to specify the function signature you expect, and check that functions support
5917that. Adding extra parameters later would break other peoples code unless
5918you're careful. The @code{backcall} package provides a way of specifying the
5919callback signature using a prototype function.")
5920 (license license:bsd-3)))
5921
8b5f756c
RW
5922(define-public python-ipython
5923 (package
5924 (name "python-ipython")
ee515773 5925 (version "7.9.0")
8b5f756c
RW
5926 (source
5927 (origin
5928 (method url-fetch)
5929 (uri (pypi-uri "ipython" version ".tar.gz"))
5930 (sha256
ee515773 5931 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5932 (build-system python-build-system)
5933 (propagated-inputs
5934 `(("python-backcall" ,python-backcall)
5935 ("python-pyzmq" ,python-pyzmq)
5936 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5937 ("python-terminado" ,python-terminado)
5938 ("python-matplotlib" ,python-matplotlib)
5939 ("python-numpy" ,python-numpy)
5940 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5941 ("python-jedi" ,python-jedi)
44d10b1f
RW
5942 ("python-jinja2" ,python-jinja2)
5943 ("python-mistune" ,python-mistune)
5944 ("python-pexpect" ,python-pexpect)
5945 ("python-pickleshare" ,python-pickleshare)
5946 ("python-simplegeneric" ,python-simplegeneric)
5947 ("python-jsonschema" ,python-jsonschema)
5948 ("python-traitlets" ,python-traitlets)
5949 ("python-nbformat" ,python-nbformat)
5950 ("python-pygments" ,python-pygments)))
5951 (inputs
5952 `(("readline" ,readline)
5953 ("which" ,which)))
5954 (native-inputs
5955 `(("graphviz" ,graphviz)
5956 ("pkg-config" ,pkg-config)
5957 ("python-requests" ,python-requests) ;; for tests
5958 ("python-testpath" ,python-testpath)
8b5f756c 5959 ("python-nose" ,python-nose)))
44d10b1f
RW
5960 (arguments
5961 `(#:phases
5962 (modify-phases %standard-phases
0f272518
RW
5963 (add-after 'unpack 'make-docs-reproducible
5964 (lambda _
5965 (substitute* "IPython/sphinxext/ipython_directive.py"
5966 ((".*import datetime") "")
5967 ((".*datetime.datetime.now\\(\\)") "")
5968 (("%timeit") "# %timeit"))
5969 #t))
44d10b1f
RW
5970 ;; Tests can only be run after the library has been installed and not
5971 ;; within the source directory.
5972 (delete 'check)
5973 (add-after 'install 'check
5974 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5975 (if tests?
5976 (begin
5977 ;; Make installed package available for running the tests
5978 (add-installed-pythonpath inputs outputs)
5979 (setenv "HOME" "/tmp/") ;; required by a test
5980 ;; We only test the core because one of the other tests
5981 ;; tries to import ipykernel.
5982 (invoke "python" "IPython/testing/iptest.py"
5983 "-v" "IPython/core/tests"))
5984 #t)))
5985 (add-before 'check 'fix-tests
5986 (lambda* (#:key inputs #:allow-other-keys)
5987 (substitute* "./IPython/utils/_process_posix.py"
5988 (("/usr/bin/env', 'which") (which "which")))
5989 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5990 (("#!/usr/bin/env python")
5991 (string-append "#!" (which "python"))))
44d10b1f
RW
5992 ;; This test introduces a circular dependency on ipykernel
5993 ;; (which depends on ipython).
5994 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5995 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5996 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5997 #t)))))
5998 (home-page "https://ipython.org")
5999 (synopsis "IPython is a tool for interactive computing in Python")
6000 (description
6001 "IPython provides a rich architecture for interactive computing with:
6002Powerful interactive shells, a browser-based notebook, support for interactive
6003data visualization, embeddable interpreters and tools for parallel
2bc5d5d5
EF
6004computing.")
6005 (properties `((python2-variant . ,(delay python2-ipython))))
6006 (license license:bsd-3)))
6007
6008;; This is the latest release of the LTS version of ipython with support for
6009;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
6010;; dropped support for Python 2.7.
6011(define-public python2-ipython
6012 (package
6013 (name "python2-ipython")
6014 (version "5.8.0")
6015 (source
6016 (origin
6017 (method url-fetch)
6018 (uri (pypi-uri "ipython" version ".tar.gz"))
6019 (sha256
6020 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
6021 (build-system python-build-system)
6022 (propagated-inputs
6023 `(("python2-backports-shutil-get-terminal-size"
6024 ,python2-backports-shutil-get-terminal-size)
6025 ("python2-pathlib2" ,python2-pathlib2)
6026 ("python2-pyzmq" ,python2-pyzmq)
6027 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
6028 ("python2-terminado" ,python2-terminado)
6029 ("python2-matplotlib" ,python2-matplotlib)
6030 ("python2-numpy" ,python2-numpy)
6031 ("python2-numpydoc" ,python2-numpydoc)
6032 ("python2-jinja2" ,python2-jinja2)
6033 ("python2-mistune" ,python2-mistune)
6034 ("python2-pexpect" ,python2-pexpect)
6035 ("python2-pickleshare" ,python2-pickleshare)
6036 ("python2-simplegeneric" ,python2-simplegeneric)
6037 ("python2-jsonschema" ,python2-jsonschema)
6038 ("python2-traitlets" ,python2-traitlets)
6039 ("python2-nbformat" ,python2-nbformat)
6040 ("python2-pygments" ,python2-pygments)))
6041 (inputs
6042 `(("readline" ,readline)
6043 ("which" ,which)))
6044 (native-inputs
6045 `(("graphviz" ,graphviz)
6046 ("pkg-config" ,pkg-config)
6047 ("python2-requests" ,python2-requests) ;; for tests
6048 ("python2-testpath" ,python2-testpath)
6049 ("python2-mock" ,python2-mock)
6050 ("python2-nose" ,python2-nose)))
6051 (arguments
6052 `(#:python ,python-2
6053 #:phases
6054 (modify-phases %standard-phases
6055 (add-before 'check 'delete-broken-tests
6056 (lambda* (#:key inputs #:allow-other-keys)
6057 ;; These tests throw errors for unknown reasons.
d8ba1135
EF
6058 (delete-file "IPython/core/tests/test_displayhook.py")
6059 (delete-file "IPython/core/tests/test_magic_terminal.py")
2bc5d5d5 6060 (delete-file "IPython/core/tests/test_profile.py")
2bc5d5d5
EF
6061 #t)))))
6062 (home-page "https://ipython.org")
6063 (synopsis "IPython is a tool for interactive computing in Python")
6064 (description
6065 "IPython provides a rich architecture for interactive computing with:
6066Powerful interactive shells, a browser-based notebook, support for interactive
6067data visualization, embeddable interpreters and tools for parallel
44d10b1f 6068computing.")
8b5f756c 6069 (license license:bsd-3)))
44d10b1f 6070
8b5f756c
RW
6071(define-public python-ipython-documentation
6072 (package
6073 (inherit python-ipython)
6074 (name "python-ipython-documentation")
6075 (version (package-version python-ipython))
6076 (arguments
6077 `(#:phases
6078 (modify-phases %standard-phases
6079 (delete 'build)
6080 (delete 'check)
6081 (replace 'install
6082 (lambda* (#:key outputs #:allow-other-keys)
6083 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
6084 (doc (string-append data "/doc/" ,name "-" ,version))
6085 (html (string-append doc "/html"))
6086 (man1 (string-append data "/man/man1"))
6087 (info (string-append data "/info"))
6088 (examples (string-append doc "/examples"))
6089 (python-arg (string-append "PYTHON=" (which "python"))))
6090 (setenv "LANG" "en_US.utf8")
6091 (with-directory-excursion "docs"
6092 ;; FIXME: pdf fails to build
6093 ;;(system* "make" "pdf" "PAPER=a4")
6094 (system* "make" python-arg "html")
6095 ;; FIXME: the generated texi file contains ^@^@, which trips
6096 ;; up the parser.
6097 ;; (system* "make" python-arg "info")
6098 )
6099 (copy-recursively "docs/man" man1)
6100 (copy-recursively "examples" examples)
6101 (copy-recursively "docs/build/html" html)
6102 ;; (copy-file "docs/build/latex/ipython.pdf"
6103 ;; (string-append doc "/ipython.pdf"))
6104 (mkdir-p info)
6105 ;; (copy-file "docs/build/texinfo/ipython.info"
6106 ;; (string-append info "/ipython.info"))
6107 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
6108 #t)))))
6109 (inputs
6110 `(("python-ipython" ,python-ipython)
6111 ("python-ipykernel" ,python-ipykernel)))
6112 (native-inputs
6113 `(("python-sphinx" ,python-sphinx)
6114 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
6115 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 6116 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
6117 texlive-fonts-ec
6118 texlive-generic-ifxetex
6119 texlive-generic-pdftex
8b5f756c
RW
6120 texlive-latex-capt-of
6121 texlive-latex-cmap
6122 texlive-latex-environ
6123 texlive-latex-eqparbox
6124 texlive-latex-etoolbox
6125 texlive-latex-expdlist
6126 texlive-latex-fancyhdr
6127 texlive-latex-fancyvrb
6128 texlive-latex-fncychap
6129 texlive-latex-float
6130 texlive-latex-framed
6131 texlive-latex-geometry
6132 texlive-latex-graphics
6133 texlive-latex-hyperref
6134 texlive-latex-mdwtools
6135 texlive-latex-multirow
6136 texlive-latex-needspace
6137 texlive-latex-oberdiek
6138 texlive-latex-parskip
6139 texlive-latex-preview
6140 texlive-latex-tabulary
6141 texlive-latex-threeparttable
6142 texlive-latex-titlesec
6143 texlive-latex-trimspaces
6144 texlive-latex-ucs
6145 texlive-latex-upquote
6146 texlive-latex-url
6147 texlive-latex-varwidth
6148 texlive-latex-wrapfig)))
6149 ("texinfo" ,texinfo)))))
44d10b1f
RW
6150
6151(define-public python-urwid
6152 (package
6153 (name "python-urwid")
6154 (version "2.0.1")
6155 (source
6156 (origin
6157 (method url-fetch)
6158 (uri (pypi-uri "urwid" version))
6159 (sha256
6160 (base32
6161 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
6162 (build-system python-build-system)
6163 (home-page "http://urwid.org")
6164 (synopsis "Console user interface library for Python")
6165 (description
6166 "Urwid is a curses-based UI/widget library for Python. It includes many
6167features useful for text console applications.")
6168 (license license:lgpl2.1+)))
6169
6170(define-public python2-urwid
6171 (package-with-python2 python-urwid))
6172
6173(define-public python-urwidtrees
6174 (package
6175 (name "python-urwidtrees")
6176 (version "1.0.2")
6177 (source
6178 (origin
c8364072 6179 (method git-fetch)
44d10b1f
RW
6180 ;; package author intends on distributing via github rather than pypi:
6181 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
c8364072
EF
6182 (uri (git-reference
6183 (url "https://github.com/pazz/urwidtrees")
6184 (commit version)))
6185 (file-name (git-file-name name version))
44d10b1f
RW
6186 (sha256
6187 (base32
c8364072 6188 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
44d10b1f
RW
6189 (build-system python-build-system)
6190 (arguments
26bb7fc6
EF
6191 '(#:use-setuptools? #f
6192 #:tests? #f)) ; no tests
44d10b1f
RW
6193 (propagated-inputs `(("python-urwid" ,python-urwid)))
6194 (home-page "https://github.com/pazz/urwidtrees")
6195 (synopsis "Tree widgets for urwid")
6196 (description "Urwidtrees is a Widget Container API for the @code{urwid}
6197toolkit. Use it to build trees of widgets.")
6198 (license license:gpl3+)))
6199
6200(define-public python2-urwidtrees
6201 (package-with-python2 python-urwidtrees))
6202
6203(define-public python-ua-parser
6204 (package
6205 (name "python-ua-parser")
6206 (version "0.8.0")
6207 (source
6208 (origin
6209 (method url-fetch)
6210 (uri (pypi-uri "ua-parser" version))
6211 (sha256
6212 (base32
6213 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
6214 (build-system python-build-system)
6215 (arguments
6216 `(#:tests? #f)) ;no test suite in release
6217 (native-inputs
6218 `(("python-pyyaml" ,python-pyyaml)))
6219 (home-page "https://github.com/ua-parser/uap-python")
6220 (synopsis "User agent parser")
6221 (description
6222 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
6223 (license license:asl2.0)))
6224
6225(define-public python2-ua-parser
6226 (package-with-python2 python-ua-parser))
6227
6228(define-public python-user-agents
6229 (package
6230 (name "python-user-agents")
6231 (version "1.1.0")
6232 (source
6233 (origin
6234 (method url-fetch)
6235 (uri (pypi-uri "user-agents" version))
6236 (sha256
6237 (base32
6238 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
6239 (build-system python-build-system)
6240 (arguments
6241 `(#:tests? #f)) ;missing devices.json test file in release
6242 (propagated-inputs
6243 `(("python-ua-parser" ,python-ua-parser)))
6244 (home-page "https://github.com/selwin/python-user-agents")
6245 (synopsis "User Agent strings parsing library")
6246 (description
6247 "A library to identify devices (phones, tablets) and their capabilities by
6248parsing (browser/HTTP) user agent strings.")
6249 (license license:expat)))
6250
6251(define-public python2-user-agents
6252 (package-with-python2 python-user-agents))
6253
6254(define-public python-dbus
6255 (package
6256 (name "python-dbus")
ba5ef999 6257 (version "1.2.14")
44d10b1f
RW
6258 (source
6259 (origin
6260 (method url-fetch)
6261 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
6262 "dbus-python-" version ".tar.gz"))
6263 (sha256
ba5ef999 6264 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 6265 (build-system gnu-build-system)
44d10b1f
RW
6266 (native-inputs
6267 `(("pkg-config" ,pkg-config)))
6268 (inputs
6269 `(("python" ,python-wrapper)
6270 ("dbus-glib" ,dbus-glib)))
6271 (synopsis "Python bindings for D-bus")
6272 (description "python-dbus provides bindings for libdbus, the reference
6273implementation of D-Bus.")
6274 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
6275 (license license:expat)))
6276
6277(define-public python2-dbus
6278 (package (inherit python-dbus)
6279 (name "python2-dbus")
6280 (inputs `(("python" ,python-2)
6281 ,@(alist-delete "python"
6282 (package-inputs python-dbus)
ba5ef999 6283 equal?)))))
44d10b1f 6284
fb236fdd
AG
6285(define-public python-notify2
6286 (package
6287 (name "python-notify2")
6288 (version "0.3.1")
6289 (source
6290 (origin
6291 (method url-fetch)
6292 (uri (pypi-uri "notify2" version))
6293 (sha256
6294 (base32
6295 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
6296 (build-system python-build-system)
6297 (arguments `(#:tests? #f)) ; tests depend on system state
6298 (native-inputs
6299 `(("python-dbus" ,python-dbus)))
6300 (home-page "https://bitbucket.org/takluyver/pynotify2")
6301 (synopsis "Python interface to D-Bus notifications")
6302 (description
6303 "Pynotify2 provides a Python interface for sending D-Bus notifications.
6304It is a reimplementation of pynotify in pure Python, and an alternative to
6305the GObject Introspection bindings to libnotify for non-GTK applications.")
6306 (license (list license:bsd-2
6307 license:lgpl2.1+))))
6308
6309(define-public python2-notify2
6310 (package-with-python2 python-notify2))
6311
44d10b1f
RW
6312;; beautifulsoup4 has a totally different namespace than 3.x,
6313;; and pypi seems to put it under its own name, so I guess we should too
6314(define-public python-beautifulsoup4
6315 (package
6316 (name "python-beautifulsoup4")
abb53e6f 6317 (version "4.7.1")
44d10b1f
RW
6318 (source
6319 (origin
6320 (method url-fetch)
6321 (uri (pypi-uri "beautifulsoup4" version))
6322 (sha256
6323 (base32
abb53e6f 6324 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
6325 (build-system python-build-system)
6326 (arguments
6327 `(#:phases
6328 (modify-phases %standard-phases
6329 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6330 ;; must use this conversion script when building with Python 3. The
6331 ;; conversion script also runs the tests.
6332 ;; For more information, see the file 'convert-py3k' in the source
6333 ;; distribution.
6334 (replace 'check
dff0197e 6335 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 6336 (propagated-inputs
abb53e6f 6337 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
6338 (home-page
6339 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6340 (synopsis
6341 "Python screen-scraping library")
6342 (description
6343 "Beautiful Soup is a Python library designed for rapidly setting up
6344screen-scraping projects. It offers Pythonic idioms for navigating,
6345searching, and modifying a parse tree, providing a toolkit for
6346dissecting a document and extracting what you need. It automatically
6347converts incoming documents to Unicode and outgoing documents to UTF-8.")
6348 (license license:expat)
6349 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6350
6351(define-public python2-beautifulsoup4
6352 (package
6353 (inherit (package-with-python2
6354 (strip-python2-variant python-beautifulsoup4)))
6355 (arguments `(#:python ,python-2))))
6356
ad74978a
BT
6357(define-public python-soupsieve
6358 (package
6359 (name "python-soupsieve")
3367df31 6360 (version "1.9.5")
ad74978a
BT
6361 (source
6362 (origin
6363 (method url-fetch)
6364 (uri (pypi-uri "soupsieve" version))
6365 (sha256
6366 (base32
3367df31 6367 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
6368 (build-system python-build-system)
6369 (arguments `(#:tests? #f))
6370 ;;XXX: 2 tests fail currently despite claming they were to be
6371 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6372 ;;don't want to create a circular dependency.
6373 (home-page "https://github.com/facelessuser/soupsieve")
6374 (synopsis "CSS selector library")
6375 (description
6376 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6377Soup 4. It aims to provide selecting, matching, and filtering using modern
6378CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6379specifications up through the latest CSS level 4 drafts and beyond (though
6380some are not yet implemented).")
d00b83fb 6381 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
6382 (license license:expat)))
6383
6384(define-public python2-soupsieve
d00b83fb 6385 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
6386 (package
6387 (inherit base)
6388 (propagated-inputs
d00b83fb
MB
6389 `(("python2-backports-functools-lru-cache"
6390 ,python2-backports-functools-lru-cache)
6391 ,@(package-propagated-inputs base))))))
ad74978a 6392
44d10b1f
RW
6393(define-public python-netifaces
6394 (package
6395 (name "python-netifaces")
6396 (version "0.10.7")
6397 (source
6398 (origin
6399 (method url-fetch)
6400 (uri (pypi-uri "netifaces" version))
6401 (sha256
6402 (base32
6403 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6404 (build-system python-build-system)
6405 (home-page "https://github.com/al45tair/netifaces")
6406 (synopsis
6407 "Python module for portable network interface information")
6408 (description
6409 "Netifaces is a Python module providing information on network
6410interfaces in an easy and portable manner.")
6411 (license license:expat)))
6412
6413(define-public python2-netifaces
6414 (package-with-python2 python-netifaces))
6415
6416(define-public python-networkx
6417 (package
6418 (name "python-networkx")
5a9980d5 6419 (version "2.4")
44d10b1f
RW
6420 (source
6421 (origin
6422 (method url-fetch)
5a9980d5 6423 (uri (pypi-uri "networkx" version))
44d10b1f 6424 (sha256
5a9980d5 6425 (base32 "0r2wr7aqay9fwjrgk35fkjzk8lvvb4i4df7ndaqzkr4ndw5zzx7q"))))
44d10b1f 6426 (build-system python-build-system)
5a9980d5
MB
6427 (arguments
6428 '(#:phases (modify-phases %standard-phases
6429 (replace 'check
6430 (lambda* (#:key tests? #:allow-other-keys)
6431 (if tests?
6432 (invoke "pytest" "-vv" "--pyargs" "networkx")
6433 (format #t "test suite not run~%"))
6434 #t)))))
44d10b1f
RW
6435 ;; python-decorator is needed at runtime.
6436 (propagated-inputs
6437 `(("python-decorator" ,python-decorator)))
6438 (native-inputs
5a9980d5 6439 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
6440 (home-page "https://networkx.github.io/")
6441 (synopsis "Python module for creating and manipulating graphs and networks")
6442 (description
6443 "NetworkX is a Python package for the creation, manipulation, and study
6444of the structure, dynamics, and functions of complex networks.")
5a9980d5 6445 (properties `((python2-variant . ,(delay python2-networkx))))
44d10b1f
RW
6446 (license license:bsd-3)))
6447
5a9980d5 6448;; NetworkX 2.2 is the last version with support for Python 2.
44d10b1f 6449(define-public python2-networkx
5a9980d5
MB
6450 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
6451 (package
6452 (inherit base)
6453 (version "2.2")
6454 (source (origin
6455 (method url-fetch)
6456 (uri (pypi-uri "networkx" version ".zip"))
6457 (sha256
6458 (base32
6459 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6460 (arguments
6461 `(#:python ,python-2))
6462 (native-inputs
6463 `(("python-nose" ,python2-nose)
6464 ("unzip" ,unzip))))))
44d10b1f
RW
6465
6466(define-public python-datrie
6467 (package
6468 (name "python-datrie")
0b58cb42 6469 (version "0.8")
44d10b1f
RW
6470 (source
6471 (origin
6472 (method url-fetch)
6473 (uri (pypi-uri "datrie" version))
6474 (sha256
6475 (base32
0b58cb42 6476 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 6477 (build-system python-build-system)
44d10b1f
RW
6478 (native-inputs
6479 `(("python-cython" ,python-cython)
6480 ("python-hypothesis" ,python-hypothesis)
6481 ("python-pytest" ,python-pytest)
6482 ("python-pytest-runner" ,python-pytest-runner)))
6483 (home-page "https://github.com/kmike/datrie")
6484 (synopsis "Fast, efficiently stored trie for Python")
6485 (description
6486 "This package provides a fast, efficiently stored trie implementation for
6487Python.")
6488 (license license:lgpl2.1+)))
6489
6490(define-public snakemake
6491 (package
6492 (name "snakemake")
93803c6b 6493 (version "5.7.1")
44d10b1f
RW
6494 (source
6495 (origin
6496 (method url-fetch)
6497 (uri (pypi-uri "snakemake" version))
6498 (sha256
93803c6b 6499 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
6500 (build-system python-build-system)
6501 (arguments
6502 ;; TODO: Package missing test dependencies.
6503 '(#:tests? #f
6504 #:phases
6505 (modify-phases %standard-phases
6506 ;; For cluster execution Snakemake will call Python. Since there is
6507 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6508 ;; this by calling the snakemake wrapper instead.
6509 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6510 (lambda* (#:key outputs #:allow-other-keys)
6511 (substitute* "snakemake/executors.py"
6512 (("\\{sys.executable\\} -m snakemake")
6513 (string-append (assoc-ref outputs "out")
6514 "/bin/snakemake")))
6515 #t)))))
6516 (propagated-inputs
8994ae34 6517 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
6518 ("python-configargparse" ,python-configargparse)
6519 ("python-datrie" ,python-datrie)
6520 ("python-docutils" ,python-docutils)
8994ae34 6521 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
6522 ("python-jinja2" ,python-jinja2)
6523 ("python-jsonschema" ,python-jsonschema)
6524 ("python-networkx" ,python-networkx)
93803c6b 6525 ("python-psutil" ,python-psutil)
44d10b1f 6526 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
6527 ("python-ratelimiter" ,python-ratelimiter)
6528 ("python-requests" ,python-requests)
6529 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
6530 (home-page "https://snakemake.readthedocs.io")
6531 (synopsis "Python-based execution environment for make-like workflows")
6532 (description
6533 "Snakemake aims to reduce the complexity of creating workflows by
6534providing a clean and modern domain specific specification language (DSL) in
6535Python style, together with a fast and comfortable execution environment.")
6536 (license license:expat)))
6537
44d10b1f
RW
6538(define-public python-pyqrcode
6539 (package
6540 (name "python-pyqrcode")
6541 (version "1.2.1")
6542 (source
6543 (origin
6544 (method url-fetch)
6545 (uri (pypi-uri "PyQRCode" version))
6546 (sha256
6547 (base32
6548 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6549 (build-system python-build-system)
6550 (home-page
6551 "https://github.com/mnooner256/pyqrcode")
6552 (synopsis "QR code generator")
6553 (description
6554 "Pyqrcode is a QR code generator written purely in Python with
6555SVG, EPS, PNG and terminal output.")
6556 (license license:bsd-3)))
6557
6558(define-public python-seaborn
6559 (package
6560 (name "python-seaborn")
0731f943 6561 (version "0.10.0")
44d10b1f
RW
6562 (source
6563 (origin
6564 (method url-fetch)
6565 (uri (pypi-uri "seaborn" version))
6566 (sha256
0731f943 6567 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
44d10b1f
RW
6568 (build-system python-build-system)
6569 (arguments
6570 `(#:phases
6571 (modify-phases %standard-phases
6572 (add-before 'check 'start-xserver
6573 (lambda* (#:key inputs #:allow-other-keys)
6574 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6575 ;; There must be a running X server and make check doesn't
6576 ;; start one. Therefore we must do it.
6577 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6578 (setenv "DISPLAY" ":1")
6579 #t)))
6580 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6581 (propagated-inputs
6582 `(("python-pandas" ,python-pandas)
6583 ("python-matplotlib" ,python-matplotlib)
6584 ("python-numpy" ,python-numpy)
6585 ("python-scipy" ,python-scipy)))
6586 (native-inputs
6587 `(("python-pytest" ,python-pytest)
ff337525 6588 ("xorg-server" ,xorg-server-for-tests)))
d3d73bd6 6589 (home-page "https://seaborn.pydata.org/")
44d10b1f
RW
6590 (synopsis "Statistical data visualization")
6591 (description
6592 "Seaborn is a library for making attractive and informative statistical
6593graphics in Python. It is built on top of matplotlib and tightly integrated
6594with the PyData stack, including support for numpy and pandas data structures
6595and statistical routines from scipy and statsmodels.")
0731f943 6596 (properties `((python2-variant . ,(delay python2-seaborn))))
44d10b1f
RW
6597 (license license:bsd-3)))
6598
0731f943 6599;; 0.9.1 is the last release with support for Python 2.
44d10b1f 6600(define-public python2-seaborn
0731f943
MB
6601 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6602 (package
6603 (inherit base)
6604 (version "0.9.1")
6605 (source (origin
6606 (method url-fetch)
6607 (uri (pypi-uri "seaborn" version))
6608 (sha256
6609 (base32
6610 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
44d10b1f
RW
6611
6612(define-public python-mpmath
6613 (package
6614 (name "python-mpmath")
6615 (version "0.19")
6616 (source (origin
6617 (method url-fetch)
6618 (uri (string-append "http://mpmath.org/files/mpmath-"
6619 version ".tar.gz"))
6620 (sha256
6621 (base32
6622 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6623 (build-system python-build-system)
6624 (arguments
6625 '(#:phases
6626 (modify-phases %standard-phases
6627 (replace 'check
6628 (lambda _
5d7a6f1c 6629 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6630 (home-page "http://mpmath.org")
6631 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6632 (description
6633 "@code{mpmath} can be used as an arbitrary-precision substitute for
6634Python's float/complex types and math/cmath modules, but also does much
6635more advanced mathematics.")
6636 (license license:bsd-3)))
6637
6638(define-public python2-mpmath
6639 (package-with-python2 python-mpmath))
6640
6641(define-public python-bigfloat
6642 (package
6643 (name "python-bigfloat")
6644 (version "0.3.0")
6645 (source
6646 (origin
6647 (method url-fetch)
6648 (uri (pypi-uri "bigfloat" version))
6649 (sha256
6650 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6651 (build-system python-build-system)
6652 (inputs
6653 `(("mpfr" ,mpfr)))
6654 (home-page "https://github.com/mdickinson/bigfloat")
6655 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6656 (description
e36de31b 6657 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6658multiprecision arithmetic.")
6659 (license license:lgpl3+)))
6660
6661(define-public python2-bigfloat
6662 (package-with-python2 python-bigfloat))
6663
6664(define-public python-sympy
6665 (package
6666 (name "python-sympy")
6667 (version "1.1.1")
6668 (source
6669 (origin
6670 (method url-fetch)
6671 (uri (string-append
6672 "https://github.com/sympy/sympy/releases/download/sympy-"
6673 version "/sympy-" version ".tar.gz"))
6674 (sha256
6675 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6676 (build-system python-build-system)
6677 (arguments
6678 `(#:phases
6679 (modify-phases %standard-phases
6680 ;; Run the core tests after installation. By default it would run
6681 ;; *all* tests, which take a very long time to complete and are known
6682 ;; to be flaky.
6683 (delete 'check)
6684 (add-after 'install 'check
6685 (lambda* (#:key outputs #:allow-other-keys)
6686 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6687 #t)))))
6688 (propagated-inputs
6689 `(("python-mpmath" ,python-mpmath)))
2f35985c 6690 (home-page "https://www.sympy.org/")
44d10b1f
RW
6691 (synopsis "Python library for symbolic mathematics")
6692 (description
6693 "SymPy is a Python library for symbolic mathematics. It aims to become a
6694full-featured computer algebra system (CAS) while keeping the code as simple
6695as possible in order to be comprehensible and easily extensible.")
6696 (license license:bsd-3)))
6697
6698(define-public python2-sympy
6699 (package
6700 (inherit (package-with-python2 python-sympy))
6701 (arguments
6702 `(#:phases
6703 (modify-phases %standard-phases
6704 ;; Run the core tests after installation. By default it would run
6705 ;; *all* tests, which take a very long time to complete and are known
6706 ;; to be flaky.
6707 (delete 'check)
6708 (add-after 'install 'check
6709 (lambda* (#:key outputs #:allow-other-keys)
6710 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6711 #t)))))))
6712
6713(define-public python-q
6714 (package
6715 (name "python-q")
6716 (version "2.6")
6717 (source
6718 (origin
6719 (method url-fetch)
6720 (uri (pypi-uri "q" version))
6721 (sha256
6722 (base32
6723 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6724 (build-system python-build-system)
6725 (home-page "https://github.com/zestyping/q")
6726 (synopsis "Quick-and-dirty debugging output for tired programmers")
6727 (description
6728 "q is a Python module for \"print\" style of debugging Python code. It
6729provides convenient short API for print out of values, tracebacks, and
6730falling into the Python interpreter.")
6731 (license license:asl2.0)))
6732
6733(define-public python2-q
6734 (package-with-python2 python-q))
6735
6736(define-public python2-xlib
6737 (package
6738 (name "python2-xlib")
6739 (version "0.14")
6740 (source (origin
6741 (method url-fetch)
6742 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6743 "/" version "/"
6744 "python-xlib-" version ".tar.gz"))
6745 (sha256
6746 (base32
6747 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6748 (build-system python-build-system)
6749 (arguments
6750 `(#:python ,python-2 ;Python 2 only
6751 #:tests? #f)) ;no tests
6752 (home-page "http://python-xlib.sourceforge.net/")
6753 (synopsis "Python X11 client library")
6754 (description
6755 "The Python X Library is intended to be a fully functional X client
6756library for Python programs. It is useful to implement low-level X clients.
6757It is written entirely in Python.")
6758 (license license:gpl2+)))
6759
6760(define-public python-singledispatch
6761 (package
6762 (name "python-singledispatch")
6763 (version "3.4.0.3")
6764 (source
6765 (origin
6766 (method url-fetch)
6767 (uri (pypi-uri "singledispatch" version))
6768 (sha256
6769 (base32
6770 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6771 (build-system python-build-system)
6772 (native-inputs
6773 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6774 (home-page
8680eff3 6775 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
44d10b1f
RW
6776 (synopsis "Backport of singledispatch feature from Python 3.4")
6777 (description
6778 "This library brings functools.singledispatch from Python 3.4 to Python
67792.6-3.3.")
6780 (license license:expat)))
6781
6782(define-public python2-singledispatch
6783 (package-with-python2 python-singledispatch))
6784
6785;; the python- version can be removed with python-3.5
6786(define-public python-backports-abc
6787 (package
6788 (name "python-backports-abc")
6789 (version "0.5")
6790 (source
6791 (origin
6792 (method url-fetch)
6793 (uri (pypi-uri "backports_abc" version))
6794 (sha256
6795 (base32
6796 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6797 (build-system python-build-system)
6798 (home-page "https://github.com/cython/backports_abc")
6799 (synopsis "Backport of additions to the 'collections.abc' module")
6800 (description
6801 "Python-backports-abc provides a backport of additions to the
36a4366d 6802@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6803 (license license:psfl)))
6804
6805(define-public python2-backports-abc
6806 (package-with-python2 python-backports-abc))
6807
6808(define-public python-backports-csv
6809 (package
6810 (name "python-backports-csv")
6811 (version "1.0.5")
6812 (source
6813 (origin
6814 (method url-fetch)
6815 (uri (pypi-uri "backports.csv" version))
6816 (sha256
6817 (base32
6818 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6819 (build-system python-build-system)
6820 (home-page "https://github.com/ryanhiebert/backports.csv")
6821 (synopsis "Backport of Python 3's csv module for Python 2")
6822 (description
6823 "Provides a backport of Python 3's @code{csv} module for parsing
6824comma separated values. The API of the @code{csv} module in Python 2
6825is drastically different from the @code{csv} module in Python 3.
6826This is due, for the most part, to the difference between str in
6827Python 2 and Python 3.")
6828 (license license:psfl)))
6829
6830(define-public python2-backports-csv
6831 (package-with-python2 python-backports-csv))
6832
6833(define-public python2-backports-shutil-get-terminal-size
6834 (package
6835 (name "python2-backports-shutil-get-terminal-size")
6836 (version "1.0.0")
6837 (source
6838 (origin
6839 (method url-fetch)
6840 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6841 (sha256
6842 (base32
6843 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6844 (build-system python-build-system)
6845 (arguments
6846 `(#:python ,python-2
6847 #:phases
6848 (modify-phases %standard-phases
6849 (replace 'check
6850 (lambda _
4a4a7d9a 6851 (invoke "py.test" "-v"))))))
44d10b1f
RW
6852 (native-inputs
6853 `(("python2-pytest" ,python2-pytest)))
6854 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6855 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6856 (description
6857 "This package provides a backport of the @code{get_terminal_size
6858function} from Python 3.3's @code{shutil}.
6859Unlike the original version it is written in pure Python rather than C,
6860so it might be a tiny bit slower.")
6861 (license license:expat)))
6862
6863(define-public python-waf
6864 (package
6865 (name "python-waf")
6c2c11fa 6866 (version "2.0.19")
44d10b1f
RW
6867 (source (origin
6868 (method url-fetch)
6869 (uri (string-append "https://waf.io/"
6870 "waf-" version ".tar.bz2"))
6871 (sha256
6872 (base32
6c2c11fa 6873 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
44d10b1f
RW
6874 (build-system python-build-system)
6875 (arguments
6876 '(#:phases
6877 (modify-phases %standard-phases
6878 (replace 'build
6879 (lambda _
633c8b71
MO
6880 ;; XXX: Find a way to add all extra tools.
6881 (let ((tools '("gccdeps"
6882 "clang_compilation_database")))
6883 (invoke "python" "waf-light" "configure" "build"
6884 (string-append "--tools="
6885 (string-join tools ","))))))
44d10b1f
RW
6886 (replace 'check
6887 (lambda _
6888 (invoke "python" "waf" "--version")))
6889 (replace 'install
6890 (lambda* (#:key outputs #:allow-other-keys)
6891 (let ((out (assoc-ref outputs "out")))
6892 (install-file "waf" (string-append out "/bin")))
6893 #t))
6894 ;; waf breaks when it is wrapped.
6895 (delete 'wrap))))
6896 (home-page "https://waf.io/")
6897 (synopsis "Python-based build system")
6898 (description
6899 "Waf is a Python-based framework for configuring, compiling and installing
6900applications.")
6901 (license license:bsd-3)))
6902
6903(define-public python2-waf
6904 (package-with-python2 python-waf))
6905
6906(define-public python-pyzmq
6907 (package
6908 (name "python-pyzmq")
6909 (version "17.1.2")
6910 (source
6911 (origin
6912 (method url-fetch)
6913 (uri (pypi-uri "pyzmq" version))
6914 (sha256
6915 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6916 (build-system python-build-system)
6917 (arguments
6918 `(#:configure-flags
6919 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6920 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6921 ;; --inplace' for 'python setup.py test' to work.
6922 #:tests? #f))
6923 (inputs
6924 `(("zeromq" ,zeromq)))
6925 (native-inputs
6926 `(("pkg-config" ,pkg-config)
6927 ("python-nose" ,python-nose)))
6928 (home-page "https://github.com/zeromq/pyzmq")
6929 (synopsis "Python bindings for 0MQ")
6930 (description
6931 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6932 (license license:bsd-4)))
6933
6934(define-public python2-pyzmq
6935 (package-with-python2 python-pyzmq))
6936
6937(define-public python-pep8
6938 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6939 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6940 ;; some dependents' test suites, and nothing more.
6941 (package
6942 (name "python-pep8")
6943 (version "1.7.0")
6944 (source
6945 (origin
6946 (method url-fetch)
6947 (uri (pypi-uri "pep8" version))
6948 (sha256
6949 (base32
2be878d8
CB
6950 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6951 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6952 (build-system python-build-system)
6953 (home-page "https://pep8.readthedocs.org/")
6954 (synopsis "Python style guide checker")
6955 (description
6956 "This tools checks Python code against some of the style conventions in
6957PEP 8.")
6958 (license license:expat)))
6959
6960(define-public python2-pep8
6961 (package-with-python2 python-pep8))
6962
6963(define-public python-pyflakes
6964 (package
6965 (name "python-pyflakes")
d0cba11b 6966 (version "2.1.1")
44d10b1f
RW
6967 (source
6968 (origin
6969 (method url-fetch)
6970 (uri (pypi-uri "pyflakes" version))
6971 (sha256
6972 (base32
d0cba11b 6973 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6974 (build-system python-build-system)
6975 (home-page
6976 "https://github.com/pyflakes/pyflakes")
6977 (synopsis "Passive checker of Python programs")
6978 (description
6979 "Pyflakes statically checks Python source code for common errors.")
6980 (license license:expat)))
6981
6982(define-public python2-pyflakes
6983 (package-with-python2 python-pyflakes))
6984
6985(define-public python-mccabe
6986 (package
6987 (name "python-mccabe")
6988 (version "0.6.1")
6989 (source
6990 (origin
6991 (method url-fetch)
6992 (uri (pypi-uri "mccabe" version))
6993 (sha256
6994 (base32
6995 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6996 (build-system python-build-system)
6997 (native-inputs
6998 `(("python-pytest" ,python-pytest-bootstrap)
6999 ("python-pytest-runner" ,python-pytest-runner)))
7000 (home-page "https://github.com/flintwork/mccabe")
7001 (synopsis "McCabe checker, plugin for flake8")
7002 (description
7003 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
7004complexity of Python source code.")
7005 (license license:expat)))
7006
7007(define-public python2-mccabe
7008 (package-with-python2 python-mccabe))
7009
7010(define-public python-mccabe-0.2.1
7011 (package (inherit python-mccabe)
7012 (version "0.2.1")
7013 (source
7014 (origin
7015 (method url-fetch)
7016 (uri (pypi-uri "mccabe" version))
7017 (sha256
7018 (base32
7019 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7020
7021(define-public python2-mccabe-0.2.1
7022 (package-with-python2 python-mccabe-0.2.1))
7023
7024;; Flake8 2.4.1 requires an older version of pep8.
7025;; This should be removed ASAP.
7026(define-public python-pep8-1.5.7
7027 (package (inherit python-pep8)
7028 (version "1.5.7")
7029 (source
f3576970
RW
7030 (origin
7031 (method url-fetch)
7032 (uri (pypi-uri "pep8" version))
7033 (sha256
7034 (base32
7035 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
7036 (arguments
7037 ;; XXX Tests not compatible with Python 3.5.
7038 '(#:tests? #f))))
7039
7040(define-public python2-pep8-1.5.7
7041 (package-with-python2 python-pep8-1.5.7))
7042
7043;; Flake8 2.4.1 requires an older version of pyflakes.
7044;; This should be removed ASAP.
7045(define-public python-pyflakes-0.8.1
7046 (package (inherit python-pyflakes)
7047 (version "0.8.1")
7048 (source
8c4dffb5
RW
7049 (origin
7050 (method url-fetch)
7051 (uri (pypi-uri "pyflakes" version))
7052 (sha256
7053 (base32
7054 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
7055 (arguments
7056 ;; XXX Tests not compatible with Python 3.5.
7057 '(#:tests? #f))))
7058
7059(define-public python2-pyflakes-0.8.1
7060 (package-with-python2 python-pyflakes-0.8.1))
7061
ac63cf0a 7062(define-public python-flake8
44d10b1f
RW
7063 (package
7064 (name "python-flake8")
beaff4a8 7065 (version "3.7.7")
ac63cf0a
MB
7066 (source (origin
7067 (method url-fetch)
7068 (uri (pypi-uri "flake8" version))
7069 (sha256
7070 (base32
beaff4a8 7071 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
7072 (build-system python-build-system)
7073 (arguments
7074 `(#:phases
7075 (modify-phases %standard-phases
44d10b1f
RW
7076 (delete 'check)
7077 (add-after 'install 'check
7078 (lambda* (#:key inputs outputs #:allow-other-keys)
7079 (add-installed-pythonpath inputs outputs)
7080 (invoke "pytest" "-v")
7081 #t)))))
7082 (propagated-inputs
7083 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 7084 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
7085 ("python-pyflakes" ,python-pyflakes)
7086 ("python-mccabe" ,python-mccabe)))
7087 (native-inputs
7088 `(("python-mock" ,python-mock)
7089 ("python-pytest" ,python-pytest-bootstrap)
7090 ("python-pytest-runner" ,python-pytest-runner)))
7091 (home-page "https://gitlab.com/pycqa/flake8")
7092 (synopsis
7093 "The modular source code checker: pep8, pyflakes and co")
7094 (description
7095 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 7096 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
7097 (license license:expat)))
7098
ac63cf0a
MB
7099(define-public python2-flake8
7100 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
7101 (package (inherit base)
7102 (propagated-inputs
7103 `(("python2-configparser" ,python2-configparser)
7104 ("python2-enum34" ,python2-enum34)
f8205d9a 7105 ("python2-functools32" ,python2-functools32)
beaff4a8 7106 ("python2-typing" ,python2-typing)
44d10b1f
RW
7107 ,@(package-propagated-inputs base))))))
7108
44d10b1f
RW
7109;; python-hacking requires flake8 <2.6.0.
7110(define-public python-flake8-2.5
7111 (package
7112 (inherit python-flake8)
7113 (version "2.5.5")
7114 (source (origin
7115 (method url-fetch)
7116 (uri (pypi-uri "flake8" version))
7117 (sha256
7118 (base32
7119 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
7120 (propagated-inputs
7121 `(("python-pep8" ,python-pep8)
7122 ,@(package-propagated-inputs python-flake8)))
7123 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
7124
7125(define-public python2-flake8-2.5
7126 (package
7127 (inherit python2-flake8)
7128 (version (package-version python-flake8-2.5))
7129 (source (origin
7130 (inherit (package-source python-flake8-2.5))))
7131 (propagated-inputs
7132 `(("python2-pep8" ,python2-pep8)
7133 ,@(package-propagated-inputs python2-flake8)))))
7134
7135(define-public python-flake8-polyfill
7136 (package
7137 (name "python-flake8-polyfill")
7138 (version "1.0.2")
7139 (source
7140 (origin
7141 (method url-fetch)
7142 (uri (pypi-uri "flake8-polyfill" version))
7143 (sha256
7144 (base32
7145 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
7146 (build-system python-build-system)
7147 (arguments
7148 '(#:phases
7149 (modify-phases %standard-phases
7150 (replace 'check
7151 (lambda _
40a7153d
MB
7152 ;; Be compatible with Pytest 4:
7153 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
7154 (substitute* "setup.cfg"
7155 (("\\[pytest\\]")
7156 "[tool:pytest]"))
7157
44d10b1f
RW
7158 (setenv "PYTHONPATH"
7159 (string-append (getcwd) "/build/lib:"
7160 (getenv "PYTHONPATH")))
4f0a0894 7161 (invoke "py.test" "-v"))))))
44d10b1f
RW
7162 (native-inputs
7163 `(("python-flake8" ,python-flake8)
7164 ("python-mock" ,python-mock)
7165 ("python-pep8" ,python-pep8)
7166 ("python-pycodestyle" ,python-pycodestyle)
7167 ("python-pytest" ,python-pytest)))
7168 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7169 (synopsis "Polyfill package for Flake8 plugins")
7170 (description
7171 "This package that provides some compatibility helpers for Flake8
7172plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7173 (license license:expat)))
7174
7175(define-public python2-flake8-polyfill
7176 (package-with-python2 python-flake8-polyfill))
7177
7178(define-public python-mistune
7179 (package
7180 (name "python-mistune")
7181 (version "0.8.4")
7182 (source
7183 (origin
7184 (method url-fetch)
7185 (uri (pypi-uri "mistune" version))
7186 (sha256
7187 (base32
7188 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
7189 (build-system python-build-system)
7190 (native-inputs
7191 `(("python-nose" ,python-nose)
7192 ("python-cython" ,python-cython)))
7193 (home-page "https://github.com/lepture/mistune")
7194 (synopsis "Markdown parser in pure Python")
7195 (description "This package provides a fast markdown parser in pure
7196Python.")
7197 (license license:bsd-3)))
7198
7199(define-public python2-mistune
7200 (package-with-python2 python-mistune))
7201
7202(define-public python-markdown
7203 (package
7204 (name "python-markdown")
0d1d0a6e 7205 (version "3.2.1")
44d10b1f
RW
7206 (source
7207 (origin
7208 (method url-fetch)
7209 (uri (pypi-uri "Markdown" version))
7210 (sha256
7211 (base32
0d1d0a6e 7212 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
44d10b1f
RW
7213 (build-system python-build-system)
7214 (native-inputs
7215 `(("python-nose" ,python-nose)
7216 ("python-pyyaml" ,python-pyyaml)))
7217 (home-page "https://python-markdown.github.io/")
7218 (synopsis "Python implementation of Markdown")
7219 (description
7220 "This package provides a Python implementation of John Gruber's
7221Markdown. The library features international input, various Markdown
7222extensions, and several HTML output formats. A command line wrapper
7223markdown_py is also provided to convert Markdown files to HTML.")
2537ce68 7224 (properties `((python2-variant . ,(delay python2-markdown))))
44d10b1f
RW
7225 (license license:bsd-3)))
7226
2537ce68 7227;; Markdown 3.2 dropped support for Python 2.
44d10b1f 7228(define-public python2-markdown
2537ce68
MB
7229 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
7230 (package/inherit
7231 base
7232 (version "3.1.1")
7233 (source (origin
7234 (method url-fetch)
7235 (uri (pypi-uri "Markdown" version))
7236 (sha256
7237 (base32
7238 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
44d10b1f
RW
7239
7240(define-public python-ptyprocess
7241 (package
7242 (name "python-ptyprocess")
7243 (version "0.5.2")
7244 (source
7245 (origin
7246 (method url-fetch)
7247 (uri (pypi-uri "ptyprocess" version))
7248 (sha256
7249 (base32
7250 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
7251 (build-system python-build-system)
7252 (native-inputs
7253 `(("python-nose" ,python-nose)))
7254 (arguments
7255 `(#:phases
7256 (modify-phases %standard-phases
7257 (replace 'check
7904d6fa 7258 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
7259 (home-page "https://github.com/pexpect/ptyprocess")
7260 (synopsis "Run a subprocess in a pseudo terminal")
7261 (description
7262 "This package provides a Python library used to launch a subprocess in a
7263pseudo terminal (pty), and interact with both the process and its pty.")
7264 (license license:isc)))
7265
7266(define-public python2-ptyprocess
7267 (package-with-python2 python-ptyprocess))
7268
7269(define-public python-cram
7270 (package
7271 (name "python-cram")
7272 (version "0.7")
7273 (home-page "https://bitheap.org/cram/")
7274 (source (origin
7275 (method url-fetch)
7276 (uri (list (string-append home-page "cram-"
7277 version ".tar.gz")
7278 (pypi-uri "cram" version)))
7279 (sha256
7280 (base32
7281 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7282 (arguments
7283 '(#:phases
7284 (modify-phases %standard-phases
7285 (add-after 'unpack 'patch-source
7286 (lambda _
7287 (substitute* (find-files "cram" ".*\\.py$")
7288 ;; Replace default shell path.
7289 (("/bin/sh") (which "sh")))
7290 (substitute* (find-files "tests" ".*\\.t$")
7291 (("md5") "md5sum")
7292 (("/bin/bash") (which "bash"))
7293 (("/bin/sh") (which "sh")))
7294 (substitute* "cram/_test.py"
7295 ;; This hack works around a bug triggered by substituting
7296 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7297 ;; "cram -h", which breaks the output at 80 characters. This
7298 ;; causes the line showing the default shell to break into two
7299 ;; lines, but the test expects a single line...
7300 (("env\\['COLUMNS'\\] = '80'")
7301 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
7302
7303 (substitute* "Makefile"
7304 ;; Recent versions of python-coverage have caused the test
7305 ;; coverage to decrease (as of version 0.7). Allow that.
7306 (("--fail-under=100")
7307 "--fail-under=90"))
7308
44d10b1f 7309 #t))
ff1e80d7 7310 (replace 'check
44d10b1f 7311 ;; The test phase uses the built library and executable.
44d10b1f
RW
7312 (lambda* (#:key inputs outputs #:allow-other-keys)
7313 (add-installed-pythonpath inputs outputs)
7314 (setenv "PATH" (string-append (getenv "PATH") ":"
7315 (assoc-ref outputs "out") "/bin"))
2d7db192 7316 (invoke "make" "test"))))))
44d10b1f
RW
7317 (build-system python-build-system)
7318 (native-inputs
7319 `(("python-coverage" ,python-coverage)
7320 ("which" ,which)))
7321 (synopsis "Simple testing framework for command line applications")
7322 (description
7323 "Cram is a functional testing framework for command line applications.
7324Cram tests look like snippets of interactive shell sessions. Cram runs each
7325command and compares the command output in the test with the command’s actual
7326output.")
7327 (license license:gpl2+)))
7328
7329(define-public python2-cram
7330 (package-with-python2 python-cram))
7331
7332(define-public python-straight-plugin
7333 (package
7334 (name "python-straight-plugin")
7335 (version "1.4.1")
7336 (source
7337 (origin
7338 (method url-fetch)
7339 (uri (pypi-uri "straight.plugin" version))
7340 (sha256
7341 (base32
7342 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7343 (build-system python-build-system)
7344 (home-page "https://github.com/ironfroggy/straight.plugin")
7345 (synopsis "Simple namespaced plugin facility")
7346 (description "Straight Plugin provides a type of plugin you can create from
7347almost any existing Python modules, and an easy way for outside developers to
7348add functionality and customization to your projects with their own plugins.")
7349 (license license:expat)))
7350
7351(define-public python2-straight-plugin
7352 (package-with-python2 python-straight-plugin))
7353
7354(define-public python-fonttools
7355 (package
7356 (name "python-fonttools")
1a4bb420 7357 (version "3.38.0")
44d10b1f
RW
7358 (source (origin
7359 (method url-fetch)
7360 (uri (pypi-uri "fonttools" version ".zip"))
7361 (sha256
7362 (base32
1a4bb420 7363 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
7364 (build-system python-build-system)
7365 (native-inputs
7366 `(("unzip" ,unzip)
7367 ("python-pytest" ,python-pytest)
7368 ("python-pytest-runner" ,python-pytest-runner)))
9d25a454 7369 (home-page "https://github.com/fonttools/fonttools")
44d10b1f
RW
7370 (synopsis "Tools to manipulate font files")
7371 (description
7372 "FontTools/TTX is a library to manipulate font files from Python. It
7373supports reading and writing of TrueType/OpenType fonts, reading and writing
7374of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7375also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7376from an XML-based format.")
7377 (license license:expat)))
7378
7379(define-public python2-fonttools
7380 (package-with-python2 python-fonttools))
7381
7382(define-public python-ly
7383 (package
7384 (name "python-ly")
7385 (version "0.9.5")
7386 (source
7387 (origin
7388 (method url-fetch)
7389 (uri (pypi-uri name version))
7390 (sha256
7391 (base32
7392 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7393 (build-system python-build-system)
7394 (arguments
7395 ;; FIXME: Some tests need network access.
7396 '(#:tests? #f))
7397 (synopsis "Tool and library for manipulating LilyPond files")
7398 (description "This package provides a Python library to parse, manipulate
7399or create documents in LilyPond format. A command line program ly is also
7400provided that can be used to do various manipulations with LilyPond files.")
e85af137 7401 (home-page "https://pypi.org/project/python-ly/")
44d10b1f
RW
7402 (license license:gpl2+)))
7403
7404(define-public python-appdirs
7405 (package
7406 (name "python-appdirs")
7407 (version "1.4.3")
7408 (source
7409 (origin
7410 (method url-fetch)
7411 (uri (pypi-uri "appdirs" version))
7412 (sha256
7413 (base32
7414 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7415 (build-system python-build-system)
7416 (home-page "https://github.com/ActiveState/appdirs")
7417 (synopsis
7418 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7419 (description
7420 "This module provides a portable way of finding out where user data
7421should be stored on various operating systems.")
7422 (license license:expat)))
7423
7424(define-public python2-appdirs
7425 (package-with-python2 python-appdirs))
7426
7427(define-public python-llfuse
7428 (package
7429 (name "python-llfuse")
7430 (version "1.3.5")
7431 (source (origin
7432 (method url-fetch)
7433 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7434 (sha256
7435 (base32
7436 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7437 (build-system python-build-system)
7438 (inputs
7439 `(("fuse" ,fuse)
7440 ("attr" ,attr)))
7441 (native-inputs
7442 `(("pkg-config" ,pkg-config)))
7443 (synopsis "Python bindings for FUSE")
7444 (description
7445 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7446 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7447 (license license:lgpl2.0+)
7448 (properties `((python2-variant . ,(delay python2-llfuse))))))
7449
7450(define-public python2-llfuse
7451 (package (inherit (package-with-python2
7452 (strip-python2-variant python-llfuse)))
7453 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7454
7455;; For attic-0.16
7456(define-public python-llfuse-0.41
7457 (package (inherit python-llfuse)
7458 (version "0.41.1")
7459 (source (origin
7460 (method url-fetch)
7461 (uri (string-append
7462 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7463 "llfuse-" version ".tar.bz2"))
7464 (sha256
7465 (base32
7466 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7467 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7468 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7469 (license (list license:expat license:lgpl2.0+))))
7470
7471(define-public python-msgpack
7472 (package
7473 (name "python-msgpack")
66ab2f5e 7474 (version "1.0.0")
44d10b1f
RW
7475 (source (origin
7476 (method url-fetch)
7477 (uri (pypi-uri "msgpack" version))
7478 (sha256
7479 (base32
66ab2f5e 7480 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
44d10b1f
RW
7481 (build-system python-build-system)
7482 (arguments
7483 `(#:modules ((guix build utils)
7484 (guix build python-build-system)
7485 (ice-9 ftw)
7486 (srfi srfi-1)
7487 (srfi srfi-26))
7488 #:phases
7489 (modify-phases %standard-phases
7490 (replace 'check
7491 (lambda _
7492 (let ((cwd (getcwd)))
7493 (setenv "PYTHONPATH"
7494 (string-append cwd "/build/"
7495 (find (cut string-prefix? "lib" <>)
7496 (scandir (string-append cwd "/build")))
7497 ":"
7498 (getenv "PYTHONPATH")))
7499 (invoke "pytest" "-v" "test")))))))
7500 (native-inputs
7501 `(("python-pytest" ,python-pytest)))
7502 (synopsis "MessagePack (de)serializer")
7503 (description "MessagePack is a fast, compact binary serialization format,
7504suitable for similar data to JSON. This package provides CPython bindings for
7505reading and writing MessagePack data.")
e85af137 7506 (home-page "https://pypi.org/project/msgpack/")
44d10b1f
RW
7507 (license license:asl2.0)))
7508
7509;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7510;; release 0.5. Some packages like borg still call it by the old name for now.
7511;; <https://bugs.gnu.org/30662>
7512(define-public python-msgpack-transitional
7513 (package
7514 (inherit python-msgpack)
7515 (name "python-msgpack-transitional")
66ab2f5e
TLC
7516 (version "0.5.6")
7517 (source (origin
7518 (method url-fetch)
7519 (uri (pypi-uri "msgpack" version))
7520 (sha256
7521 (base32
7522 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
44d10b1f
RW
7523 (arguments
7524 (substitute-keyword-arguments (package-arguments python-msgpack)
7525 ((#:phases phases)
7526 `(modify-phases ,phases
7527 (add-after 'unpack 'configure-transitional
7528 (lambda _
7529 ;; Keep using the old name.
7530 (substitute* "setup.py"
7531 (("TRANSITIONAL = False")
7532 "TRANSITIONAL = 1"))
7533 #t))))))))
7534
7535(define-public python2-msgpack
7536 (package-with-python2 python-msgpack))
7537
7538(define-public python-netaddr
7539 (package
7540 (name "python-netaddr")
7541 (version "0.7.19")
7542 (source
7543 (origin
7544 (method url-fetch)
7545 (uri (pypi-uri "netaddr" version))
7546 (sha256
7547 (base32
7548 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7549 (build-system python-build-system)
7550 (arguments `(#:tests? #f)) ;; No tests.
7551 (home-page "https://github.com/drkjam/netaddr/")
7552 (synopsis "Pythonic manipulation of network addresses")
7553 (description
7554 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7555and MAC network addresses.")
7556 (license license:bsd-3)))
7557
7558(define-public python2-netaddr
7559 (package-with-python2 python-netaddr))
7560
dd85eca0
AG
7561(define-public python2-pyroute2
7562 (package
7563 (name "python2-pyroute2")
7564 (version "0.5.6")
7565 (source
7566 (origin
7567 (method url-fetch)
7568 (uri (pypi-uri "pyroute2" version))
7569 (sha256
7570 (base32
7571 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7572 (build-system python-build-system)
7573 (arguments
7574 `(#:python ,python-2)) ;Python 3.x is not supported
7575 (home-page "https://github.com/svinota/pyroute2")
7576 (synopsis "Python netlink library")
7577 (description
7578 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7579Supported netlink families and protocols include:
7580@itemize
7581@item rtnl, network settings - addresses, routes, traffic controls
7582@item nfnetlink - netfilter API: ipset, nftables, ...
7583@item ipq - simplest userspace packet filtering, iptables QUEUE target
7584@item devlink - manage and monitor devlink-enabled hardware
7585@item generic - generic netlink families
7586 @itemize
7587 @item nl80211 - wireless functions API (basic support)
7588 @item taskstats - extended process statistics
7589 @item acpi_events - ACPI events monitoring
7590 @item thermal_events - thermal events monitoring
7591 @item VFS_DQUOT - disk quota events monitoring
7592 @end itemize
7593@end itemize")
7594 (license license:gpl2+)))
7595
44d10b1f
RW
7596(define-public python-wrapt
7597 (package
7598 (name "python-wrapt")
2271a1dc 7599 (version "1.11.2")
44d10b1f 7600 (source
2271a1dc
MB
7601 (origin
7602 (method url-fetch)
7603 (uri (pypi-uri "wrapt" version))
7604 (sha256
7605 (base32
7606 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7607 (build-system python-build-system)
7608 (arguments
7609 ;; Tests are not included in the tarball, they are only available in the
7610 ;; git repository.
7611 `(#:tests? #f))
7612 (home-page "https://github.com/GrahamDumpleton/wrapt")
7613 (synopsis "Module for decorators, wrappers and monkey patching")
7614 (description
2271a1dc 7615 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7616 Python, which can be used as the basis for the construction of function
7617 wrappers and decorator functions.")
7618 (license license:bsd-2)))
7619
7620(define-public python2-wrapt
7621 (package-with-python2 python-wrapt))
7622
7623(define-public python-xlrd
7624 (package
7625 (name "python-xlrd")
3a2b1a3c 7626 (version "1.2.0")
44d10b1f
RW
7627 (source (origin
7628 (method url-fetch)
7629 (uri (pypi-uri "xlrd" version))
7630 (sha256
7631 (base32
3a2b1a3c 7632 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7633 (build-system python-build-system)
7634 (arguments
7635 `(#:phases
7636 (modify-phases %standard-phases
3ccdd3a5
MO
7637 ;; Some tests depend on writing a temporary file to the user's home
7638 ;; directory.
3a2b1a3c
GL
7639 (add-after 'unpack 'fix-tests
7640 (lambda _
7641 (delete-file "tests/test_open_workbook.py")
7642 #t)))))
44d10b1f
RW
7643 (home-page "http://www.python-excel.org/")
7644 (synopsis "Library for extracting data from Excel files")
a0909286 7645 (description "This package provides a library to extract data from
44d10b1f
RW
7646spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7647@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7648Unicode-aware. It is not intended as an end-user tool.")
7649 (license license:bsd-3)))
7650
7651(define-public python2-xlrd
7652 (package-with-python2 python-xlrd))
7653
7654(define-public python-prettytable
7655 (package
7656 (name "python-prettytable")
7657 (version "0.7.2")
7658 (source
7659 (origin
7660 (method url-fetch)
337c3a1e 7661 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7662 (sha256
7663 (base32
7664 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7665 (build-system python-build-system)
8be58b48 7666 (home-page "https://code.google.com/archive/p/prettytable/")
44d10b1f
RW
7667 (synopsis "Display tabular data in an ASCII table format")
7668 (description
7669 "A library designed to represent tabular data in visually appealing ASCII
7670tables. PrettyTable allows for selection of which columns are to be printed,
7671independent alignment of columns (left or right justified or centred) and
7672printing of sub-tables by specifying a row range.")
7673 (license license:bsd-3)))
7674
7675(define-public python2-prettytable
7676 (package-with-python2 python-prettytable))
7677
7678(define-public python-tables
7679 (package
7680 (name "python-tables")
7681 (version "3.4.4")
7682 (source
7683 (origin
7684 (method url-fetch)
7685 (uri (pypi-uri "tables" version))
7686 (sha256
7687 (base32
7688 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7689 (modules '((guix build utils)))
7690 (snippet
7691 '(begin
7692 ;; Remove pre-compiled .pyc files from source.
7693 (for-each delete-file-recursively
7694 (find-files "." "__pycache__" #:directories? #t))
7695 (for-each delete-file (find-files "." "\\.pyc$"))
7696 #t))))
7697 (build-system python-build-system)
7698 (arguments
7699 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7700 ;; or "check", so we must override the build and check phases.
7701 #:phases
7702 (modify-phases %standard-phases
7703 (add-after 'unpack 'use-gcc
7704 (lambda _
7705 (substitute* "setup.py"
7706 (("compiler = new_compiler\\(\\)" line)
7707 (string-append line
7708 "\ncompiler.set_executables(compiler='gcc',"
7709 "compiler_so='gcc',"
7710 "linker_exe='gcc',"
7711 "linker_so='gcc -shared')")))
7712 #t))
70b74663
RW
7713 (add-after 'unpack 'disable-tuning
7714 (lambda _
7715 (substitute* "setup.py"
7716 (("cpu_flags = .*")
7717 "cpu_flags = ['sse2']\n"))
7718 #t))
44d10b1f
RW
7719 (replace 'build
7720 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7721 (invoke "python" "setup.py" "build"
7722 (string-append "--hdf5="
7723 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7724 (replace 'check
7725 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7726 (invoke "python" "setup.py" "check"
7727 (string-append "--hdf5="
7728 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7729 (propagated-inputs
7730 `(("python-numexpr" ,python-numexpr)
7731 ("python-numpy" ,python-numpy)))
7732 (native-inputs
7733 `(("python-cython" ,python-cython)
7734 ("pkg-config" ,pkg-config)))
7735 (inputs
538c1a02 7736 `(("hdf5" ,hdf5-1.10)
44d10b1f
RW
7737 ("bzip2" ,bzip2)
7738 ("zlib" ,zlib)))
d7ee58cc 7739 (home-page "https://www.pytables.org/")
44d10b1f
RW
7740 (synopsis "Hierarchical datasets for Python")
7741 (description "PyTables is a package for managing hierarchical datasets and
7742designed to efficiently cope with extremely large amounts of data.")
7743 (license license:bsd-3)))
7744
7745(define-public python2-tables
7746 (package-with-python2 python-tables))
7747
cc2c2850
RW
7748(define-public python-pytest-black
7749 (package
7750 (name "python-pytest-black")
7751 (version "0.3.8")
7752 (source
7753 (origin
7754 (method url-fetch)
7755 (uri (pypi-uri "pytest-black" version))
7756 (sha256
7757 (base32
7758 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
7759 (build-system python-build-system)
7760 (propagated-inputs
7761 `(("python-pytest" ,python-pytest)
7762 ("python-black" ,python-black)
7763 ("python-toml" ,python-toml)))
7764 (native-inputs
7765 `(("python-setuptools-scm" ,python-setuptools-scm)))
7766 (home-page "https://github.com/shopkeep/pytest-black")
7767 (synopsis "Pytest plugin to enable format checking with black")
7768 (description
7769 "This package provides a pytest plugin to enable format checking with the
7770Python code formatter \"black\".")
7771 (license license:expat)))
7772
2ceff35f
RW
7773(define-public python-get-version
7774 (package
7775 (name "python-get-version")
7776 (version "2.1")
7777 (source
7778 (origin
7779 (method url-fetch)
7780 (uri (pypi-uri "get_version" version))
7781 (sha256
7782 (base32
7783 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
7784 (build-system python-build-system)
7785 (propagated-inputs
7786 `(("python-pygments" ,python-pygments)
7787 ("python-pytest" ,python-pytest)
7788 ("python-pytest-black" ,python-pytest-black)
7789 ("python-pytest-cov" ,python-pytest-cov)
7790 ("python-setuptools" ,python-setuptools)
7791 ("python-testpath" ,python-testpath)))
7792 (home-page "https://github.com/flying-sheep/get_version")
7793 (synopsis "Version helper in the spirit of versioneer")
7794 (description
7795 "This package provides a version helper that lets you automatically use
7796the latest @code{vX.X.X} Git tag as the version in your Python package. It
7797also supports getting the version from Python source distributions or, once
7798your package is installed, via @code{pkg_resources} (part of
7799@code{setuptools}).")
7800 (license license:gpl3+)))
7801
053ab825
RW
7802(define-public python-legacy-api-wrap
7803 (package
7804 (name "python-legacy-api-wrap")
7805 (version "1.2")
7806 (source
7807 (origin
7808 (method url-fetch)
7809 (uri (pypi-uri "legacy-api-wrap" version))
7810 (sha256
7811 (base32
7812 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
7813 (build-system python-build-system)
7814 (propagated-inputs
7815 `(("python-get-version" ,python-get-version)
7816 ("python-pytest" ,python-pytest)
7817 ("python-pytest-black" ,python-pytest-black)
7818 ("python-pytest-cov" ,python-pytest-cov)
7819 ("python-setuptools" ,python-setuptools)))
7820 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
7821 (synopsis "Legacy API wrapper")
7822 (description "This module defines a decorator to wrap legacy APIs. The
7823primary use case is APIs defined before keyword-only parameters existed.")
7824 (license license:gpl3+)))
7825
44d10b1f
RW
7826(define-public python-pyasn1
7827 (package
7828 (name "python-pyasn1")
3ccfa404 7829 (version "0.4.8")
44d10b1f
RW
7830 (source
7831 (origin
7832 (method url-fetch)
7833 (uri (pypi-uri "pyasn1" version))
7834 (sha256
7835 (base32
3ccfa404 7836 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
44d10b1f
RW
7837 (build-system python-build-system)
7838 (home-page "http://pyasn1.sourceforge.net/")
7839 (synopsis "ASN.1 types and codecs")
7840 (description
7841 "This is an implementation of ASN.1 types and codecs in Python. It is
7842suitable for a wide range of protocols based on the ASN.1 specification.")
7843 (license license:bsd-2)))
7844
7845(define-public python2-pyasn1
7846 (package-with-python2 python-pyasn1))
7847
7848(define-public python-pyasn1-modules
7849 (package
7850 (name "python-pyasn1-modules")
7851 (version "0.2.2")
7852 (source
7853 (origin
7854 (method url-fetch)
7855 (uri (pypi-uri "pyasn1-modules" version))
7856 (sha256
7857 (base32
7858 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7859 (build-system python-build-system)
7860 (propagated-inputs
7861 `(("python-pyasn1" ,python-pyasn1)))
7862 (home-page "https://sourceforge.net/projects/pyasn1/")
7863 (synopsis "ASN.1 codec implementations")
7864 (description
7865 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7866implementations of ASN.1-based codecs and protocols.")
7867 (license license:bsd-3)))
7868
7869(define-public python2-pyasn1-modules
7870 (package-with-python2 python-pyasn1-modules))
7871
7872(define-public python-ipaddress
7873 (package
7874 (name "python-ipaddress")
7875 (version "1.0.22")
7876 (source (origin
7877 (method url-fetch)
7878 (uri (pypi-uri "ipaddress" version))
7879 (sha256
7880 (base32
7881 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7882 (build-system python-build-system)
7883 (home-page "https://github.com/phihag/ipaddress")
7884 (synopsis "IP address manipulation library")
7885 (description
7886 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7887 in Python. This library is used to create, poke at, and manipulate IPv4 and
7888 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7889 module to older versions of Python.")
7890 (license license:psfl)))
7891
7892(define-public python2-ipaddress
7893 (package-with-python2 python-ipaddress))
7894
7895(define-public python2-ipaddr
7896 (package
7897 (name "python2-ipaddr")
7898 (version "2.1.11")
7899 (source
7900 (origin
7901 (method url-fetch)
7902 (uri (pypi-uri "ipaddr" version))
7903 (sha256
7904 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7905 (build-system python-build-system)
7906 (arguments
7907 `(#:python ,python-2 ;version 2 only
7908 #:phases
7909 (modify-phases %standard-phases
7910 (replace 'check
40b8c4e3 7911 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7912 (home-page "https://github.com/google/ipaddr-py")
7913 (synopsis "IP address manipulation library")
7914 (description
7915 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7916IPv6 addresses and networks.
7917
7918For new implementations you may prefer to use the standard module
7919@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7920versions of Python.")
7921 (license license:asl2.0)))
7922
7923(define-public python-idna
7924 (package
7925 (name "python-idna")
e95c9837 7926 (version "2.8")
44d10b1f
RW
7927 (source
7928 (origin
7929 (method url-fetch)
7930 (uri (pypi-uri "idna" version))
7931 (sha256
7932 (base32
e95c9837 7933 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7934 (build-system python-build-system)
7935 (home-page "https://github.com/kjd/idna")
7936 (synopsis "Internationalized domain names in applications")
7937 (description
7938 "This is a library to support the Internationalised Domain Names in
7939Applications (IDNA) protocol as specified in RFC 5891. This version of the
7940protocol is often referred to as “IDNA2008” and can produce different results
7941from the earlier standard from 2003. The library is also intended to act as a
7942suitable drop-in replacement for the “encodings.idna” module that comes with
7943the Python standard library but currently only supports the older 2003
7944specification.")
7945 (license license:bsd-4)))
7946
a76e6a69
JM
7947(define-public python-idna-2.7
7948 (package (inherit python-idna)
7949 (version "2.7")
7950 (source (origin
7951 (method url-fetch)
7952 (uri (pypi-uri "idna" version))
7953 (sha256
7954 (base32
7955 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7956
7957
44d10b1f
RW
7958(define-public python2-idna
7959 (package-with-python2 python-idna))
7960
7961(define-public python-idna-ssl
7962 (package
7963 (name "python-idna-ssl")
7964 (version "1.0.1")
7965 (source
7966 (origin
7967 (method url-fetch)
7968 (uri (pypi-uri "idna-ssl" version))
7969 (sha256
7970 (base32
7971 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7972 (build-system python-build-system)
7973 (arguments
7974 `(#:tests? #f)) ;circular dependency with python-aiohttp
7975 (home-page "https://github.com/aio-libs/idna-ssl")
7976 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7977 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7978domains support.")
7979 (license license:expat)))
7980
7981(define-public python-pretend
7982 (package
7983 (name "python-pretend")
7984 (version "1.0.9")
7985 (source
7986 (origin
7987 (method url-fetch)
9f1f22ee 7988 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7989 (sha256
7990 (base32
7991 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7992 (build-system python-build-system)
7993 (home-page "https://github.com/alex/pretend")
7994 (synopsis "Library for stubbing in Python")
7995 (description
7996 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7997technique for writing tests. You may hear the term mixed up with mocks,
7998fakes, or doubles. Basically, a stub is an object that returns pre-canned
7999responses, rather than doing any computation.")
8000 (license license:bsd-3)))
8001
8002(define-public python2-pretend
8003 (package-with-python2 python-pretend))
8004
8005(define-public python-pip
8006 (package
8007 (name "python-pip")
0a193d32 8008 (version "20.0.2")
44d10b1f
RW
8009 (source
8010 (origin
8011 (method url-fetch)
8012 (uri (pypi-uri "pip" version))
8013 (sha256
8014 (base32
0a193d32 8015 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
44d10b1f
RW
8016 (build-system python-build-system)
8017 (arguments
8018 '(#:tests? #f)) ; there are no tests in the pypi archive.
8019 (home-page "https://pip.pypa.io/")
8020 (synopsis "Package manager for Python software")
8021 (description
8022 "Pip is a package manager for Python software, that finds packages on the
8023Python Package Index (PyPI).")
8024 (license license:expat)))
8025
8026(define-public python2-pip
8027 (package-with-python2 python-pip))
8028
8029(define-public python-tlsh
8030 (package
8031 (name "python-tlsh")
8032 (version "3.4.5")
8033 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
8034 (source
8035 (origin
8036 (method git-fetch)
8037 (uri (git-reference
8038 (url "https://github.com/trendmicro/tlsh.git")
8039 (commit (string-append "v" version))))
8040 (file-name (git-file-name name version))
8041 (sha256
8042 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
8043 (build-system cmake-build-system)
8044 (arguments
8045 '(#:out-of-source? #f
8046 #:phases (modify-phases %standard-phases
8047 (replace
8048 'install
8049 (lambda* (#:key outputs #:allow-other-keys)
8050 ;; Build and install the Python bindings. The underlying
8051 ;; C++ library is apparently not meant to be installed.
8052 (let ((out (assoc-ref outputs "out")))
8053 (with-directory-excursion "py_ext"
8054 (and (system* "python" "setup.py" "build")
8055 (system* "python" "setup.py" "install"
8056 (string-append "--prefix=" out))))))))))
8057 (inputs `(("python" ,python-wrapper))) ;for the bindings
8058 (synopsis "Fuzzy matching library for Python")
8059 (description
8060 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
8061Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
8062value which can be used for similarity comparisons. Similar objects have
8063similar hash values, which allows for the detection of similar objects by
8064comparing their hash values. The byte stream should have a sufficient amount
8065of complexity; for example, a byte stream of identical bytes will not generate
8066a hash value.")
8067 (license license:asl2.0)))
8068
8069(define-public python2-tlsh
8070 (package
8071 (inherit python-tlsh)
8072 (name "python2-tlsh")
8073 (inputs `(("python" ,python-2)))))
8074
8075(define-public python-termcolor
8076 (package
8077 (name "python-termcolor")
8078 (version "1.1.0")
8079 (source
8080 (origin
8081 (method url-fetch)
8082 (uri (pypi-uri "termcolor" version))
8083 (sha256
8084 (base32
8085 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8086 (build-system python-build-system)
8087 (arguments
8088 ;; There are no tests.
8089 `(#:tests? #f))
e85af137 8090 (home-page "https://pypi.org/project/termcolor/")
44d10b1f
RW
8091 (synopsis "ANSII Color formatting for terminal output")
8092 (description
8093 "This package provides ANSII Color formatting for output in terminals.")
8094 (license license:expat)))
8095
8096(define-public python2-termcolor
8097 (package-with-python2 python-termcolor))
8098
8099(define-public python-libarchive-c
8100 (package
8101 (name "python-libarchive-c")
f2774824 8102 (version "2.9")
44d10b1f
RW
8103 (source (origin
8104 (method url-fetch)
8105 (uri (pypi-uri "libarchive-c" version))
8106 (sha256
8107 (base32
f2774824 8108 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
44d10b1f
RW
8109 (build-system python-build-system)
8110 (arguments
8111 '(#:phases (modify-phases %standard-phases
8112 (add-before
8113 'build 'reference-libarchive
8114 (lambda* (#:key inputs #:allow-other-keys)
8115 ;; Retain the absolute file name of libarchive.so.
8116 (let ((libarchive (assoc-ref inputs "libarchive")))
8117 (substitute* "libarchive/ffi.py"
8118 (("find_library\\('archive'\\)")
8119 (string-append "'" libarchive
8120 "/lib/libarchive.so'"))))))
8121 (replace 'check
8122 (lambda _ (invoke "pytest" "-vv"))))))
8123 (native-inputs
8124 `(("python-mock" ,python-mock)
8125 ("python-pytest" ,python-pytest)))
8126 (inputs
8127 `(("libarchive" ,libarchive)))
8128 (home-page "https://github.com/Changaco/python-libarchive-c")
8129 (synopsis "Python interface to libarchive")
8130 (description
8131 "This package provides Python bindings to libarchive, a C library to
8132access possibly compressed archives in many different formats. It uses
8133Python's @code{ctypes} foreign function interface (FFI).")
8134 (license license:lgpl2.0+)))
8135
8136(define-public python2-libarchive-c
8137 (package-with-python2 python-libarchive-c))
8138
8139(define-public python-file
8140 (package
8141 (inherit file)
8142 (name "python-file")
8143 (build-system python-build-system)
8144 (arguments
8145 '(#:tests? #f ;no tests
8146 #:configure-flags '("--single-version-externally-managed" "--root=/")
8147 #:phases (modify-phases %standard-phases
8148 (add-before 'build 'change-directory
8149 (lambda _
8150 (chdir "python")
8151 #t))
8152 (add-before 'build 'set-library-file-name
8153 (lambda* (#:key inputs #:allow-other-keys)
8154 (let ((file (assoc-ref inputs "file")))
8155 (substitute* "magic.py"
8156 (("find_library\\('magic'\\)")
8157 (string-append "'" file "/lib/libmagic.so'")))
8158 #t))))))
8159 (inputs `(("file" ,file)))
528ea990
LC
8160 (native-inputs (if (%current-target-system)
8161 `(("self" ,this-package))
8162 '()))
44d10b1f
RW
8163 (synopsis "Python bindings to the libmagic file type guesser. Note that
8164this module and the python-magic module both provide a \"magic.py\" file;
8165these two modules, which are different and were developed separately, both
8166serve the same purpose: provide Python bindings for libmagic.")))
8167
8168(define-public python2-file
8169 (package-with-python2 python-file))
8170
8171(define-public python-debian
8172 (package
8173 (name "python-debian")
8174 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 8175 (version "0.1.36")
44d10b1f
RW
8176 (source
8177 (origin
9f74bd31
VC
8178 ;; Use git-fetch, as pypi doesn't include test suite.
8179 (method git-fetch)
8180 (uri (git-reference
8181 (url home-page)
8182 (commit version)))
8183 (file-name (git-file-name name version))
44d10b1f
RW
8184 (sha256
8185 (base32
9f74bd31 8186 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 8187 (build-system python-build-system)
9f74bd31
VC
8188 (arguments
8189 `(#:phases (modify-phases %standard-phases
8190 (add-after 'unpack 'remove-debian-specific-tests
8191 ;; python-apt, apt and dpkg are not yet available in guix,
8192 ;; and these tests heavily depend on them.
8193 (lambda _
8194 (delete-file "lib/debian/tests/test_deb822.py")
8195 (delete-file "lib/debian/tests/test_debfile.py")
8196 #t)))))
44d10b1f 8197 (propagated-inputs
9f74bd31
VC
8198 `(("python-six" ,python-six)
8199 ("python-chardet" ,python-chardet)))
44d10b1f
RW
8200 (synopsis "Debian package related modules")
8201 (description
8202 ;; XXX: Use @enumerate instead of @itemize to work around
8203 ;; <http://bugs.gnu.org/21772>.
8204 "This package provides Python modules that abstract many formats of
8205Debian-related files, such as:
8206
8207@enumerate
8208@item Debtags information;
8209@item @file{debian/changelog} files;
8210@item packages files, pdiffs;
8211@item control files of single or multiple RFC822-style paragraphs---e.g.
8212 @file{debian/control}, @file{.changes}, @file{.dsc};
8213@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8214 contained files and meta-information.
8215@end enumerate\n")
8216
8217 ;; Modules are either GPLv2+ or GPLv3+.
8218 (license license:gpl3+)))
8219
44d10b1f
RW
8220(define-public python-nbformat
8221 (package
8222 (name "python-nbformat")
8223 (version "4.4.0")
8224 (source
8225 (origin
8226 (method url-fetch)
8227 (uri (pypi-uri "nbformat" version))
8228 (sha256
8229 (base32
8230 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
8231 (build-system python-build-system)
8232 (arguments `(#:tests? #f)) ; no test target
8233 (propagated-inputs
8234 `(("python-ipython-genutils" ,python-ipython-genutils)
8235 ("python-jsonschema" ,python-jsonschema)
8236 ("python-jupyter-core" ,python-jupyter-core)
8237 ("python-traitlets" ,python-traitlets)))
8238 (home-page "http://jupyter.org")
8239 (synopsis "Jupyter Notebook format")
8240 (description "This package provides the reference implementation of the
8241Jupyter Notebook format and Python APIs for working with notebooks.")
8242 (license license:bsd-3)))
8243
8244(define-public python2-nbformat
8245 (package-with-python2 python-nbformat))
8246
8247(define-public python-bleach
8248 (package
8249 (name "python-bleach")
e64ea843 8250 (version "3.1.3")
44d10b1f
RW
8251 (source
8252 (origin
8253 (method url-fetch)
8254 (uri (pypi-uri "bleach" version))
8255 (sha256
8256 (base32
e64ea843 8257 "0al437aw4p2xp83az5hhlrp913nsf0cg6kg4qj3fjhv4wakxipzq"))))
44d10b1f
RW
8258 (build-system python-build-system)
8259 (propagated-inputs
ff0efc8f 8260 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
8261 ("python-six" ,python-six)))
8262 (native-inputs
e64ea843
EF
8263 `(("python-datrie" ,python-datrie)
8264 ("python-genshi" ,python-genshi)
8265 ("python-lxml" ,python-lxml)
8266 ("python-pytest" ,python-pytest)))
8267 (home-page "https://github.com/mozilla/bleach")
44d10b1f
RW
8268 (synopsis "Whitelist-based HTML-sanitizing tool")
8269 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8270 (license license:asl2.0)))
8271
8272(define-public python2-bleach
8273 (package-with-python2 python-bleach))
8274
8275(define-public python-entrypoints
8276 (package
8277 (name "python-entrypoints")
a7f1b718 8278 (version "0.3")
44d10b1f
RW
8279 (source
8280 (origin
8281 (method url-fetch)
a7f1b718 8282 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
8283 (sha256
8284 (base32
a7f1b718 8285 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
8286 (build-system python-build-system)
8287 ;; The package does not come with a setup.py file, so we have to generate
8288 ;; one ourselves.
8289 (arguments
8290 `(#:tests? #f
8291 #:phases
8292 (modify-phases %standard-phases
8293 (add-after 'unpack 'create-setup.py
8294 (lambda _
8295 (call-with-output-file "setup.py"
8296 (lambda (port)
8297 (format port "\
8298from setuptools import setup
8299setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8300" ,version))))))))
8301 (home-page "https://github.com/takluyver/entrypoints")
8302 (synopsis "Discover and load entry points from installed Python packages")
8303 (description "Entry points are a way for Python packages to advertise
8304objects with some common interface. The most common examples are
8305@code{console_scripts} entry points, which define shell commands by
8306identifying a Python function to run. The @code{entrypoints} module contains
8307functions to find and load entry points.")
8308 (license license:expat)))
8309
8310(define-public python2-entrypoints
8311 (package-with-python2 python-entrypoints))
8312
8313(define-public python-nbconvert
8314 (package
8315 (name "python-nbconvert")
8316 (version "5.0.0b1")
8317 (source
8318 (origin
8319 (method url-fetch)
8320 (uri (pypi-uri "nbconvert" version))
8321 (sha256
8322 (base32
8323 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8324 (build-system python-build-system)
8325 (arguments
8326 `(;; The "bdist_egg" target is disabled by default, causing the installation
8327 ;; to fail.
8328 #:configure-flags (list "bdist_egg")
8329 ;; FIXME: 5 failures, 40 errors.
8330 #:tests? #f))
8331 ;; #:phases
8332 ;; (modify-phases %standard-phases
8333 ;; (replace 'check
8334 ;; (lambda _
8335 ;; (zero? (system* "py.test" "-v")))))
8336 (native-inputs
8337 `(("python-pytest" ,python-pytest)))
8338 (propagated-inputs
8339 `(("python-bleach" ,python-bleach)
8340 ("python-entrypoints" ,python-entrypoints)
8341 ("python-jinja2" ,python-jinja2)
8342 ("python-jupyter-core" ,python-jupyter-core)
8343 ("python-mistune" ,python-mistune)
8344 ("python-nbformat" ,python-nbformat)
8345 ("python-pygments" ,python-pygments)
8346 ("python-traitlets" ,python-traitlets)))
8347 (home-page "http://jupyter.org")
8348 (synopsis "Converting Jupyter Notebooks")
8349 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8350notebooks to various other formats via Jinja templates. It allows you to
8351convert an @code{.ipynb} notebook file into various static formats including:
8352
8353@enumerate
8354@item HTML
8355@item LaTeX
8356@item PDF
8357@item Reveal JS
8358@item Markdown (md)
8359@item ReStructured Text (rst)
8360@item executable script
8361@end enumerate\n")
8362 (license license:bsd-3)))
8363
8364(define-public python2-nbconvert
8365 (package-with-python2 python-nbconvert))
8366
44d10b1f
RW
8367(define-public python-notebook
8368 (package
8369 (name "python-notebook")
8370 (version "5.7.4")
8371 (source (origin
8372 (method url-fetch)
8373 (uri (pypi-uri "notebook" version))
8374 (sha256
8375 (base32
8376 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
8377 (build-system python-build-system)
8378 (arguments
8379 `(#:phases
8380 (modify-phases %standard-phases
8381 (replace 'check
8382 (lambda _
8383 ;; These tests require a browser
8384 (delete-file-recursively "notebook/tests/selenium")
8385 ;; Some tests need HOME
8386 (setenv "HOME" "/tmp")
8387 ;; This file contains "warningfilters", which are not supported
8388 ;; by this version of nose.
8389 (delete-file "setup.cfg")
8390 (with-directory-excursion "/tmp"
8391 (invoke "nosetests" "-v"))
8392 #t)))))
8393 (propagated-inputs
8394 `(("python-jupyter-core" ,python-jupyter-core)
8395 ("python-nbformat" ,python-nbformat)
8396 ("python-nbconvert" ,python-nbconvert)
8397 ("python-prometheus-client" ,python-prometheus-client)
8398 ("python-send2trash" ,python-send2trash)
8399 ("python-terminado" ,python-terminado)))
8400 (native-inputs
8401 `(("python-nose" ,python-nose)
8402 ("python-sphinx" ,python-sphinx)
8403 ("python-requests" ,python-requests)))
8404 (home-page "http://jupyter.org/")
8405 (synopsis "Web-based notebook environment for interactive computing")
8406 (description
8407 "The Jupyter HTML notebook is a web-based notebook environment for
8408interactive computing.")
8409 (properties `((python2-variant . ,(delay python2-notebook))))
8410 (license license:bsd-3)))
8411
8412(define-public python2-notebook
8413 (let ((base (package-with-python2
8414 (strip-python2-variant python-notebook))))
8415 (package (inherit base)
8416 (native-inputs
8417 `(("python2-mock" ,python2-mock)
8418 ,@(package-native-inputs base)))
8419 (arguments
8420 (substitute-keyword-arguments (package-arguments base)
8421 ((#:phases phases)
8422 `(modify-phases ,phases
8423 (add-before 'check 'disable-test-case
8424 ;; The test requires network access to localhost. Curiously it
8425 ;; fails with Python 2 only. Simply make the test-case return
8426 ;; immediately.
8427 (lambda _
8428 (substitute*
8429 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8430 (("formats = self.nbconvert_api") "return #")))))))))))
8431
8432(define-public python-widgetsnbextension
8433 (package
8434 (name "python-widgetsnbextension")
8435 (version "3.4.2")
8436 (source
8437 (origin
8438 (method url-fetch)
8439 (uri (pypi-uri "widgetsnbextension" version))
8440 (sha256
8441 (base32
8442 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
8443 (build-system python-build-system)
8444 (propagated-inputs
8445 `(("python-ipykernel" ,python-ipykernel)
8446 ("python-notebook" ,python-notebook)))
8447 (native-inputs
8448 `(("python-certifi" ,python-certifi)
8449 ("python-nose" ,python-nose)))
8450 (home-page "https://ipython.org")
8451 (synopsis "IPython HTML widgets for Jupyter")
8452 (description "This package provides interactive HTML widgets for Jupyter
8453notebooks.")
8454 (license license:bsd-3)))
8455
8456(define-public python2-widgetsnbextension
8457 (package-with-python2 python-widgetsnbextension))
8458
8459(define-public python-ipywidgets
8460 (package
8461 (name "python-ipywidgets")
8462 (version "5.2.2")
8463 (source
8464 (origin
8465 (method url-fetch)
8466 (uri (pypi-uri "ipywidgets" version))
8467 (sha256
8468 (base32
8469 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8470 (build-system python-build-system)
8471 (propagated-inputs
8472 `(("python-ipython" ,python-ipython)
8473 ("python-traitlets" ,python-traitlets)
8474 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8475 (native-inputs
8476 `(("python-nose" ,python-nose)
8477 ("python-pytest" ,python-pytest)))
8478 (home-page "https://ipython.org")
8479 (synopsis "IPython HTML widgets for Jupyter")
8480 (description "Ipywidgets are interactive HTML widgets for Jupyter
8481notebooks and the IPython kernel. Notebooks come alive when interactive
8482widgets are used. Users gain control of their data and can visualize changes
8483in the data.")
8484 (license license:bsd-3)))
8485
8486(define-public python2-ipywidgets
8487 (package-with-python2 python-ipywidgets))
8488
8489(define-public python-jupyter-console
8490 (package
8491 (name "python-jupyter-console")
becb9cbf 8492 (version "6.0.0")
44d10b1f
RW
8493 (source
8494 (origin
8495 (method url-fetch)
8496 (uri (pypi-uri "jupyter_console" version))
8497 (sha256
8498 (base32
becb9cbf 8499 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 8500 (build-system python-build-system)
44d10b1f
RW
8501 (propagated-inputs
8502 `(("python-ipykernel" ,python-ipykernel)
8503 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 8504 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
8505 ("python-pygments" ,python-pygments)))
8506 (native-inputs
8507 `(("python-nose" ,python-nose)))
8508 (home-page "https://jupyter.org")
8509 (synopsis "Jupyter terminal console")
8510 (description "This package provides a terminal-based console frontend for
8511Jupyter kernels. It also allows for console-based interaction with non-Python
8512Jupyter kernels such as IJulia and IRKernel.")
e8588a78 8513 (properties `((python2-variant . ,(delay python2-jupyter-console))))
44d10b1f
RW
8514 (license license:bsd-3)))
8515
8516(define-public python2-jupyter-console
8e590c81
RW
8517 (package
8518 (name "python2-jupyter-console")
8519 (version "5.2.0")
8520 (source
8521 (origin
8522 (method url-fetch)
8523 (uri (pypi-uri "jupyter_console" version))
8524 (sha256
8525 (base32
8526 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8527 (build-system python-build-system)
b0aa58d8
EF
8528 (arguments
8529 `(#:python ,python-2
8530 #:tests? #f)) ; Tests only run in a TTY.
8e590c81
RW
8531 (propagated-inputs
8532 `(("python2-ipykernel" ,python2-ipykernel)
8533 ("python2-jupyter-client" ,python2-jupyter-client)
8534 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8535 ("python2-pygments" ,python2-pygments)))
8536 (native-inputs
8537 `(("python2-nose" ,python2-nose)))
8538 (home-page "https://jupyter.org")
8539 (synopsis "Jupyter terminal console")
8540 (description "This package provides a terminal-based console frontend for
8541Jupyter kernels. It also allows for console-based interaction with non-Python
8542Jupyter kernels such as IJulia and IRKernel.")
8543 (license license:bsd-3)))
44d10b1f
RW
8544
8545;; The python-ipython and python-jupyter-console require each other. To get
8546;; the functionality in both packages working, strip down the
8547;; python-jupyter-console package when using it as an input to python-ipython.
8548(define python-jupyter-console-minimal
8549 (package
8550 (inherit python-jupyter-console)
8551 (name "python-jupyter-console-minimal")
8552 (arguments
8553 (substitute-keyword-arguments
8554 (package-arguments python-jupyter-console)
8555 ((#:phases phases)
8556 `(modify-phases ,phases
8557 (add-after 'install 'delete-bin
8558 (lambda* (#:key outputs #:allow-other-keys)
8559 ;; Delete the bin files, to avoid conflicts in profiles
8560 ;; where python-ipython and python-jupyter-console are
8561 ;; both present.
8562 (delete-file-recursively
8563 (string-append
8564 (assoc-ref outputs "out") "/bin"))))))))
8565 ;; Remove the python-ipython propagated input, to avoid the cycle
8566 (propagated-inputs
8567 (alist-delete
8568 "python-ipython"
8569 (package-propagated-inputs python-jupyter-console)))))
8570
8571(define-public python-qtconsole
8572 (package
8573 (name "python-qtconsole")
8574 (version "4.4.3")
8575 (source
8576 (origin
8577 (method url-fetch)
8578 (uri (pypi-uri "qtconsole" version))
8579 (sha256
8580 (base32
8581 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8582 (build-system python-build-system)
8583 (arguments
8584 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8585 ;; but we only have the LTS version 5.x. This means that there might be
8586 ;; runtime errors, but since this is a dependency of the Jupyter package,
8587 ;; and Jupyter can be used without the qtconsole we can overlook this for
8588 ;; now.
8589 `(#:tests? #f
8590 #:phases
8591 (modify-phases %standard-phases
8592 (add-before 'check 'pre-check
8593 (lambda _
8594 (setenv "QT_QPA_PLATFORM" "offscreen")
8595 #t)))))
8596 (propagated-inputs
8597 `(("python-ipykernel" ,python-ipykernel)
8598 ("python-ipython" ,python-ipython)))
8599 (native-inputs
8600 `(("python-pytest" ,python-pytest)))
8601 (home-page "http://jupyter.org")
8602 (synopsis "Jupyter Qt console")
8603 (description "This package provides a Qt-based console for Jupyter with
8604support for rich media output.")
8605 (license license:bsd-3)))
8606
6ec87223
VC
8607(define-public python-jsbeautifier
8608 (package
8609 (name "python-jsbeautifier")
8610 (version "1.10.2")
8611 (home-page "https://github.com/beautify-web/js-beautify")
8612 (source (origin
8613 (method git-fetch)
8614 (uri (git-reference
8615 (url home-page)
8616 (commit (string-append "v" version))))
8617 (file-name (git-file-name name version))
8618 (sha256
8619 (base32
8620 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8621 (build-system python-build-system)
8622 (arguments
8623 `(#:phases (modify-phases %standard-phases
8624 (add-after 'unpack 'chdir
8625 (lambda _
8626 ;; The upstream Git repository contains all the code,
8627 ;; but this package only builds the python code.
8628 (chdir "python")
8629 #t))
8630 (add-after 'unpack 'patch-python-six-requirements
8631 (lambda _
8632 (substitute* "python/setup.py"
8633 (("six>=1.12.0")
8634 "six>=1.11.0"))
8635 #t)))))
8636 (propagated-inputs
8637 `(("python-editorconfig" ,python-editorconfig)
8638 ("python-six" ,python-six)))
8639 (native-inputs
8640 `(("python-pytest" ,python-pytest)))
8641 (synopsis "JavaScript unobfuscator and beautifier")
8642 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8643popular online obfuscators.")
8644 (license license:expat)))
8645
44d10b1f
RW
8646(define-public jupyter
8647 (package
8648 (name "jupyter")
8649 (version "1.0.0")
8650 (source
8651 (origin
8652 (method url-fetch)
8653 (uri (pypi-uri "jupyter" version))
8654 (sha256
8655 (base32
8656 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8657 (build-system python-build-system)
8658 (arguments '(#:tests? #f)) ; there are none.
8659 (propagated-inputs
8660 `(("python-ipykernel" ,python-ipykernel)
8661 ("python-ipywidgets" ,python-ipywidgets)
8662 ("python-jupyter-console" ,python-jupyter-console)
8663 ("python-nbconvert" ,python-nbconvert)
8664 ("python-notebook" ,python-notebook)
8665 ("python-qtconsole" ,python-qtconsole)))
8666 (native-search-paths
8667 (list (search-path-specification
8668 (variable "JUPYTER_PATH")
8669 (files '("share/jupyter")))))
8670 (home-page "https://jupyter.org")
8671 (synopsis "Web application for interactive documents")
8672 (description
8673 "The Jupyter Notebook is a web application that allows you to create and
8674share documents that contain live code, equations, visualizations and
8675explanatory text. Uses include: data cleaning and transformation, numerical
8676simulation, statistical modeling, machine learning and much more.")
8677 (license license:bsd-3)))
8678
8679(define-public python-chardet
8680 (package
8681 (name "python-chardet")
8682 (version "3.0.4")
8683 (source
8684 (origin
8685 (method url-fetch)
8686 (uri (pypi-uri "chardet" version))
8687 (sha256
8688 (base32
8689 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8690 (native-inputs
8691 `(("python-hypothesis" ,python-hypothesis)
8692 ("python-pytest" ,python-pytest)
8693 ("python-pytest-runner" ,python-pytest-runner)))
8694 (build-system python-build-system)
3d369407
MB
8695 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8696 (arguments `(#:tests? #f))
44d10b1f
RW
8697 (home-page "https://github.com/chardet/chardet")
8698 (synopsis "Universal encoding detector for Python 2 and 3")
8699 (description
8700 "This package provides @code{chardet}, a Python module that can
8701automatically detect a wide range of file encodings.")
8702 (license license:lgpl2.1+)))
8703
8704(define-public python2-chardet
8705 (package-with-python2 python-chardet))
8706
8707(define-public python-docopt
8708 (package
8709 (name "python-docopt")
8710 (version "0.6.2")
8711 (source
8712 (origin
11e46326 8713 (method git-fetch)
44d10b1f 8714 ;; The release on PyPI does not include tests.
11e46326
EF
8715 (uri (git-reference
8716 (url "https://github.com/docopt/docopt")
8717 (commit version)))
8718 (file-name (git-file-name name version))
44d10b1f
RW
8719 (sha256
8720 (base32
11e46326 8721 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
44d10b1f
RW
8722 (build-system python-build-system)
8723 (native-inputs
8724 `(("python-pytest" ,python-pytest)))
8725 (arguments
8726 `(#:phases
8727 (modify-phases %standard-phases
8728 (replace 'check
8729 (lambda _ (invoke "py.test"))))))
8730 (home-page "http://docopt.org")
8731 (synopsis "Command-line interface description language for Python")
8732 (description "This library allows the user to define a command-line
8733interface from a program's help message rather than specifying it
4ca7207b 8734programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8735@code{argparse}.")
8736 (license license:expat)))
8737
8738(define-public python2-docopt
8739 (package-with-python2 python-docopt))
8740
8741(define-public python-pythondialog
8742 (package
8743 (name "python-pythondialog")
8744 (version "3.4.0")
8745 (source
8746 (origin
8747 (method url-fetch)
8748 (uri (pypi-uri "pythondialog" version))
8749 (sha256
8750 (base32
8751 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8752 (build-system python-build-system)
8753 (arguments
8754 `(#:phases
8755 (modify-phases %standard-phases
8756 (add-after 'unpack 'patch-path
8757 (lambda* (#:key inputs #:allow-other-keys)
8758 (let* ((dialog (assoc-ref inputs "dialog")))
8759 ;; Since this library really wants to grovel the search path, we
8760 ;; must hardcode dialog's store path into it.
8761 (substitute* "dialog.py"
8762 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8763 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8764 #t))))
8765 #:tests? #f)) ; no test suite
8766 (propagated-inputs
8767 `(("dialog" ,dialog)))
8768 (home-page "http://pythondialog.sourceforge.net/")
8769 (synopsis "Python interface to the UNIX dialog utility")
8770 (description "A Python wrapper for the dialog utility. Its purpose is to
8771provide an easy to use, pythonic and comprehensive Python interface to dialog.
8772This allows one to make simple text-mode user interfaces on Unix-like systems")
8773 (license license:lgpl2.1)
8774 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8775
8776(define-public python2-pythondialog
8777 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8778 (package
8779 (inherit base)
8780 (version (package-version python-pythondialog))
8781 (source (origin
8782 (method url-fetch)
8783 (uri (pypi-uri "python2-pythondialog" version))
8784 (sha256
8785 (base32
8786 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8787
8788(define-public python-configobj
8789 (package
8790 (name "python-configobj")
8791 (version "5.0.6")
8792 (source (origin
8793 (method url-fetch)
b0758fbb 8794 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8795 (sha256
8796 (base32
8797 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8798 ;; Patch setup.py so it looks for python-setuptools, which is
8799 ;; required to parse the keyword 'install_requires' in setup.py.
8800 (patches (search-patches "python-configobj-setuptools.patch"))))
8801 (build-system python-build-system)
8802 (propagated-inputs
8803 `(("python-six" ,python-six)))
8804 (synopsis "Config file reading, writing and validation")
8805 (description "ConfigObj is a simple but powerful config file reader and
8806writer: an ini file round tripper. Its main feature is that it is very easy to
8807use, with a straightforward programmer’s interface and a simple syntax for
8808config files.")
8809 (home-page "https://github.com/DiffSK/configobj")
8810 (license license:bsd-3)))
8811
8812(define-public python2-configobj
8813 (package-with-python2 python-configobj))
8814
8815(define-public python-configargparse
8816 (package
8817 (name "python-configargparse")
86ae491f 8818 (version "0.14.0")
44d10b1f
RW
8819 (source (origin
8820 (method url-fetch)
8821 (uri (pypi-uri "ConfigArgParse" version))
8822 (sha256
8823 (base32
86ae491f 8824 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8825 (build-system python-build-system)
8826 (native-inputs
8827 `(("python-pyyaml" ,python-pyyaml)))
8828 (arguments
8829 `(#:phases
8830 (modify-phases %standard-phases
8831 (replace 'check
8832 (lambda _
8833 ;; Bypass setuptools-shim because one test relies on "setup.py"
8834 ;; being the first argument passed to the python call.
8835 ;;
8836 ;; NOTE: Many tests do not run because they rely on Python's
8837 ;; built-in test.test_argparse, but we remove the unit tests from
8838 ;; our Python installation.
8839 (invoke "python" "setup.py" "test"))))))
8840 (synopsis "Replacement for argparse")
8841 (description "A drop-in replacement for argparse that allows options to also
8842be set via config files and/or environment variables.")
8843 (home-page "https://github.com/bw2/ConfigArgParse")
8844 (license license:expat)))
8845
8846(define-public python2-configargparse
8847 (package-with-python2 python-configargparse))
8848
8849(define-public python-argparse-manpage
8850 (package
8851 (name "python-argparse-manpage")
8852 (version "1.1")
8853 (source
8854 (origin
8855 (method url-fetch)
8856 (uri (pypi-uri "argparse-manpage" version))
8857 (sha256
8858 (base32
8859 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8860 (build-system python-build-system)
8861 (home-page "https://github.com/praiskup/argparse-manpage")
8862 (synopsis "Build manual page from Python's ArgumentParser object")
8863 (description
8864 "This package provides tools to build manual pages from Python's
8865@code{ArgumentParser} object.")
8866 (license license:asl2.0)))
8867
3e8f76d8
RW
8868(define-public python-contextlib2
8869 (package
8870 (name "python-contextlib2")
ebd4c251 8871 (version "0.6.0.post1")
3e8f76d8
RW
8872 (source
8873 (origin
8874 (method url-fetch)
8875 (uri (pypi-uri "contextlib2" version))
8876 (sha256
8877 (base32
ebd4c251 8878 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
3e8f76d8 8879 (build-system python-build-system)
a0fdade2 8880 (home-page "https://contextlib2.readthedocs.org/")
3e8f76d8
RW
8881 (synopsis "Tools for decorators and context managers")
8882 (description "This module is primarily a backport of the Python
88833.2 contextlib to earlier Python versions. Like contextlib, it
8884provides utilities for common tasks involving decorators and context
8885managers. It also contains additional features that are not part of
8886the standard library.")
1e158ba1 8887 (properties `((python2-variant . ,(delay python2-contextlib2))))
3e8f76d8
RW
8888 (license license:psfl)))
8889
44d10b1f 8890(define-public python2-contextlib2
1e158ba1
EF
8891 (let ((base (package-with-python2
8892 (strip-python2-variant python-contextlib2))))
8893 (package
8894 (inherit base)
8895 (arguments
8896 (substitute-keyword-arguments (package-arguments base)
8897 ((#:phases phases)
8898 `(modify-phases ,phases
8899 (replace 'check
8900 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8901 (native-inputs
8902 `(("python2-unittest2" ,python2-unittest2))))))
44d10b1f
RW
8903
8904(define-public python-texttable
8905 (package
8906 (name "python-texttable")
02422b3b 8907 (version "1.6.2")
44d10b1f
RW
8908 (source
8909 (origin
8910 (method url-fetch)
8911 (uri (pypi-uri "texttable" version))
8912 (sha256
8913 (base32
02422b3b 8914 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
44d10b1f 8915 (build-system python-build-system)
02422b3b
RW
8916 (arguments
8917 `(#:phases
8918 (modify-phases %standard-phases
8919 (replace 'check
8920 (lambda _ (invoke "pytest" "tests.py"))))))
8921 (native-inputs
8922 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
8923 (home-page "https://github.com/foutaise/texttable/")
8924 (synopsis "Python module for creating simple ASCII tables")
8925 (description "Texttable is a Python module for creating simple ASCII
8926tables.")
02422b3b 8927 (license license:expat)))
44d10b1f
RW
8928
8929(define-public python2-texttable
8930 (package-with-python2 python-texttable))
8931
8932(define-public python-atomicwrites
8933 (package
8934 (name "python-atomicwrites")
14f10479 8935 (version "1.3.0")
44d10b1f
RW
8936 (source (origin
8937 (method url-fetch)
8938 (uri (pypi-uri "atomicwrites" version))
8939 (sha256
8940 (base32
14f10479 8941 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8942 (build-system python-build-system)
8943 (synopsis "Atomic file writes in Python")
8944 (description "Library for atomic file writes using platform dependent tools
8945for atomic file system operations.")
8946 (home-page "https://github.com/untitaker/python-atomicwrites")
8947 (license license:expat)))
8948
8949(define-public python2-atomicwrites
8950 (package-with-python2 python-atomicwrites))
8951
8952(define-public python-click-threading
8953 (package
8954 (name "python-click-threading")
8955 (version "0.4.4")
8956 (source (origin
8957 (method url-fetch)
8958 (uri (pypi-uri "click-threading" version))
8959 (sha256
8960 (base32
8961 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8962 (build-system python-build-system)
8963 (propagated-inputs
8964 `(("python-click" ,python-click)))
8965 (synopsis "Utilities for multithreading in Click")
8966 (description "This package provides utilities for multithreading in Click
8967applications.")
8968 (home-page "https://github.com/click-contrib/click-threading")
8969 (license license:expat)))
8970
8971(define-public python-click-log
8972 (package
8973 (name "python-click-log")
8974 (version "0.3.2")
8975 (source (origin
8976 (method url-fetch)
8977 (uri (pypi-uri "click-log" version))
8978 (sha256
8979 (base32
8980 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8981 (build-system python-build-system)
8982 (propagated-inputs
8983 `(("python-click" ,python-click)))
8984 (synopsis "Logging for click applications")
8985 (description "This package provides a Python library for logging Click
8986applications.")
8987 (home-page "https://github.com/click-contrib/click-log")
8988 (license license:expat)))
8989
8990(define-public python-apipkg
8991 (package
8992 (name "python-apipkg")
8993 (version "1.4")
8994 (source (origin
8995 (method url-fetch)
8996 (uri (pypi-uri "apipkg" version))
8997 (sha256
8998 (base32
8999 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
9000 (build-system python-build-system)
9001 (native-inputs
9002 `(("python-pytest" ,python-pytest)))
9003 (synopsis "Namespace control and lazy-import mechanism")
9004 (description "With apipkg you can control the exported namespace of a Python
9005package and greatly reduce the number of imports for your users. It is a small
9006pure Python module that works on virtually all Python versions.")
9007 (home-page "https://github.com/pytest-dev/apipkg")
9008 (license license:expat)))
9009
9010(define-public python2-apipkg
9011 (package-with-python2 python-apipkg))
9012
9013(define-public python-execnet
9014 (package
9015 (name "python-execnet")
9016 (version "1.4.1")
9017 (source (origin
9018 (method url-fetch)
9019 (uri (pypi-uri "execnet" version))
9020 (sha256
9021 (base32
9022 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
9023 (build-system python-build-system)
9024 (arguments
9025 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
9026 ;; The two test failures are caused by the lack of an `ssh` executable.
9027 ;; The test suite can be run with pytest after the 'install' phase.
9028 #:tests? #f))
9029 (native-inputs
9030 `(("python-pytest" ,python-pytest)
9031 ("python-setuptools-scm" ,python-setuptools-scm)))
9032 (propagated-inputs
9033 `(("python-apipkg" ,python-apipkg)))
9034 (synopsis "Rapid multi-Python deployment")
9035 (description "Execnet provides a share-nothing model with
9036channel-send/receive communication for distributing execution across many
9037Python interpreters across version, platform and network barriers. It has a
9038minimal and fast API targeting the following uses:
9039@enumerate
9040@item distribute tasks to (many) local or remote CPUs
9041@item write and deploy hybrid multi-process applications
9042@item write scripts to administer multiple environments
9043@end enumerate")
14a5146f 9044 (home-page "https://codespeak.net/execnet/")
44d10b1f
RW
9045 (license license:expat)))
9046
9047(define-public python2-execnet
9048 (package-with-python2 python-execnet))
9049
9050(define-public python-icalendar
9051 (package
9052 (name "python-icalendar")
43ae8f79 9053 (version "4.0.4")
44d10b1f
RW
9054 (source (origin
9055 (method url-fetch)
9056 (uri (pypi-uri "icalendar" version))
9057 (sha256
9058 (base32
43ae8f79 9059 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
44d10b1f
RW
9060 (build-system python-build-system)
9061 (propagated-inputs
9062 `(("python-dateutil" ,python-dateutil)
9063 ("python-pytz" ,python-pytz)))
9064 (synopsis "Python library for parsing iCalendar files")
9065 (description "The icalendar package is a parser/generator of iCalendar
9066files for use with Python.")
9067 (home-page "https://github.com/collective/icalendar")
9068 (license license:bsd-2)))
9069
44d10b1f
RW
9070(define-public python-args
9071 (package
9072 (name "python-args")
9073 (version "0.1.0")
9074 (source (origin
9075 (method url-fetch)
9076 (uri (pypi-uri "args" version))
9077 (sha256
9078 (base32
9079 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9080 (build-system python-build-system)
9081 (home-page "https://github.com/kennethreitz/args")
9082 (synopsis "Command-line argument parser")
9083 (description
9084 "This library provides a Python module to parse command-line arguments.")
9085 (license license:bsd-3)))
9086
9087(define-public python2-args
9088 (package-with-python2 python-args))
9089
9090(define-public python-clint
9091 (package
9092 (name "python-clint")
9093 (version "0.5.1")
9094 (source (origin
9095 (method url-fetch)
9096 (uri (pypi-uri "clint" version))
9097 (sha256
9098 (base32
9099 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9100 (build-system python-build-system)
9101 (arguments
9102 '(#:phases
9103 (modify-phases %standard-phases
9104 (replace 'check
9105 (lambda _ (invoke "py.test" "-v"))))))
9106 (native-inputs
9107 `(("python-pytest" ,python-pytest)))
9108 (propagated-inputs
9109 `(("python-args" ,python-args)))
9110 (home-page "https://github.com/kennethreitz/clint")
9111 (synopsis "Command-line interface tools")
9112 (description
9113 "Clint is a Python module filled with a set of tools for developing
9114command-line applications, including tools for colored and indented
9115output, progress bar display, and pipes.")
9116 (license license:isc)))
9117
9118(define-public python2-clint
9119 (package-with-python2 python-clint))
9120
44d10b1f
RW
9121(define-public python-rply
9122 (package
9123 (name "python-rply")
9124 (version "0.7.5")
9125 (source (origin
9126 (method url-fetch)
9127 (uri (pypi-uri "rply" version))
9128 (sha256
9129 (base32
9130 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
9131 (build-system python-build-system)
9132 (propagated-inputs
9133 `(("python-appdirs" ,python-appdirs)))
9134 (home-page "https://github.com/alex/rply")
9135 (synopsis "Parser generator for Python")
9136 (description
9137 "This package provides a pure Python based parser generator, that also
9138works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9139with a new public API, and RPython support.")
9140 (license license:bsd-3)))
9141
9142(define-public python2-rply
9143 (package-with-python2 python-rply))
9144
9145(define-public python-hy
9146 (package
9147 (name "python-hy")
c215051d 9148 (version "0.17.0")
44d10b1f
RW
9149 (source (origin
9150 (method url-fetch)
9151 (uri (pypi-uri "hy" version))
9152 (sha256
9153 (base32
c215051d 9154 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
44d10b1f
RW
9155 (build-system python-build-system)
9156 (arguments
9157 '(#:phases
9158 (modify-phases %standard-phases
6ba6a1c1
JG
9159 (add-before 'install 'set-HOME
9160 (lambda _
9161 (setenv "HOME" "/tmp")))
44d10b1f
RW
9162 (replace 'check
9163 (lambda _
9164 ;; Tests require write access to HOME.
9165 (setenv "HOME" "/tmp")
9166 (invoke "nosetests"))))))
9167 (native-inputs
9168 `(("python-coverage" ,python-coverage)
9169 ("python-nose" ,python-nose)))
9170 (propagated-inputs
9171 `(("python-astor" ,python-astor)
9172 ("python-clint" ,python-clint)
c215051d
JG
9173 ("python-rply" ,python-rply)
9174 ("python-fastentrypoints"
9175 ,python-fastentrypoints)
9176 ("python-funcparserlib"
9177 ,python-funcparserlib)))
44d10b1f
RW
9178 (home-page "http://hylang.org/")
9179 (synopsis "Lisp frontend to Python")
9180 (description
9181 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9182its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9183Python at your fingertips, in Lisp form.")
9184 (license license:expat)))
9185
9186(define-public python2-hy
9187 (package-with-python2 python-hy))
9188
9189(define-public python2-functools32
9190 (package
9191 (name "python2-functools32")
9192 (version "3.2.3-2")
9193 (source
9194 (origin
9195 (method url-fetch)
9196 (uri (pypi-uri "functools32" version))
9197 (sha256
9198 (base32
9199 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9200 (build-system python-build-system)
9201 (arguments
9202 `(#:python ,python-2
9203 #:tests? #f)) ; no test target
9204 (home-page "https://github.com/MiCHiLU/python-functools32")
9205 (synopsis
9206 "Backport of the functools module from Python 3.2.3")
9207 (description
9208 "This package is a backport of the @code{functools} module from Python
92093.2.3 for use with older versions of Python and PyPy.")
9210 (license license:expat)))
9211
9212(define-public python2-subprocess32
9213 (package
9214 (name "python2-subprocess32")
9215 (version "3.2.7")
9216 (source (origin
9217 (method url-fetch)
9218 (uri (pypi-uri "subprocess32" version))
9219 (sha256
9220 (base32
9221 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9222 (patches
9223 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9224 (build-system python-build-system)
9225 (arguments
9226 `(#:python ,python-2
9227 ;; The test suite fails with Python > 2.7.13:
9228 ;; import test.support
9229 ;; ImportError: No module named support
9230 #:tests? #f
9231 #:phases
9232 (modify-phases %standard-phases
9233 (add-after 'unpack 'patch-/bin/sh
9234 (lambda _
9235 (substitute* '("subprocess32.py"
9236 "test_subprocess32.py")
9237 (("/bin/sh") (which "sh")))
9238 #t)))))
9239 (home-page "https://github.com/google/python-subprocess32")
9240 (synopsis "Backport of the subprocess module from Python 3.2")
9241 (description
9242 "This is a backport of the @code{subprocess} standard library module
9243from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9244new features. On POSIX systems it is guaranteed to be reliable when used
9245in threaded applications. It includes timeout support from Python 3.3 but
9246otherwise matches 3.2’s API.")
9247 (license license:psfl)))
9248
9249(define-public python2-futures
9250 (package
9251 (name "python2-futures")
9252 (version "3.2.0")
9253 (source
9254 (origin
9255 (method url-fetch)
9256 (uri (pypi-uri "futures" version))
9257 (sha256
9258 (base32
9259 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
9260 (build-system python-build-system)
ba88eea2
RW
9261 (arguments
9262 `(#:python ,python-2
9263 #:phases
9264 (modify-phases %standard-phases
9265 (replace 'check
9266 (lambda _
9267 (invoke "python" "test_futures.py")
9268 #t)))))
44d10b1f
RW
9269 (home-page "https://github.com/agronholm/pythonfutures")
9270 (synopsis
9271 "Backport of the concurrent.futures package from Python 3.2")
9272 (description
9273 "The concurrent.futures module provides a high-level interface for
9274asynchronously executing callables. This package backports the
9275concurrent.futures package from Python 3.2")
9276 (license license:bsd-3)))
9277
9278(define-public python-promise
9279 (package
9280 (name "python-promise")
9281 (version "0.4.2")
9282 (source
9283 (origin
9284 (method url-fetch)
9285 (uri (pypi-uri "promise" version))
9286 (sha256
9287 (base32
9288 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9289 (build-system python-build-system)
9290 ;; Tests wants python-futures, which is a python2 only program, and
9291 ;; can't be found by python-promise at test time.
9292 (arguments `(#:tests? #f))
9293 (home-page "https://github.com/syrusakbary/promise")
9294 (synopsis "Promises/A+ implementation for Python")
9295 (description
9296 "Promises/A+ implementation for Python")
9297 (properties `((python2-variant . ,(delay python2-promise))))
9298 (license license:expat)))
9299
9300(define-public python2-promise
9301 (let ((promise (package-with-python2
9302 (strip-python2-variant python-promise))))
9303 (package (inherit promise)
9304 (arguments (substitute-keyword-arguments (package-arguments promise)
9305 ((#:tests? _) #t)))
9306 (native-inputs
9307 `(("python2-futures" ,python2-futures)
9308 ("python2-pytest" ,python2-pytest)
9309 ,@(package-native-inputs promise))))))
9310
d71d85cd
RW
9311(define-public python-progressbar33
9312 (package
9313 (name "python-progressbar33")
9314 (version "2.4")
9315 (source
9316 (origin
9317 (method url-fetch)
9318 (uri (pypi-uri "progressbar33" version))
9319 (sha256
9320 (base32
9321 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
9322 (build-system python-build-system)
9323 (home-page "http://github.com/germangh/python-progressbar")
9324 (synopsis "Text progress bar library for Python")
9325 (description
9326 "This package provides a text progress bar library for Python. This
9327version only differs from the original @code{progressbar} package in that it
9328uses relative package imports instead of absolute imports, which is necessary
9329for the module to work under Python 3.3.")
9330 ;; Either or both of these licenses may be selected.
9331 (license (list license:lgpl2.1+ license:bsd-3))))
9332
44d10b1f
RW
9333(define-public python-colorama
9334 (package
9335 (name "python-colorama")
bd137055 9336 (version "0.4.3")
44d10b1f
RW
9337 (source
9338 (origin
9339 (method url-fetch)
9340 (uri (pypi-uri "colorama" version))
9341 (sha256
9342 (base32
bd137055 9343 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
44d10b1f
RW
9344 (build-system python-build-system)
9345 (synopsis "Colored terminal text rendering for Python")
9346 (description "Colorama is a Python library for rendering colored terminal
9347text.")
e85af137 9348 (home-page "https://pypi.org/project/colorama/")
44d10b1f
RW
9349 (license license:bsd-3)))
9350
9351(define-public python2-colorama
9352 (package-with-python2 python-colorama))
9353
9354(define-public python-rsa
9355 (package
9356 (name "python-rsa")
9357 (version "3.4.2")
9358 (source
9359 (origin
9360 (method url-fetch)
9361 (uri (pypi-uri "rsa" version))
9362 (sha256
9363 (base32
9364 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9365 (build-system python-build-system)
9366 (propagated-inputs
9367 `(("python-pyasn1" ,python-pyasn1)))
9368 (synopsis "Pure-Python RSA implementation")
9369 (description "Python-RSA is a pure-Python RSA implementation. It supports
9370encryption and decryption, signing and verifying signatures, and key
9371generation according to PKCS#1 version 1.5. It can be used as a Python
9372library as well as on the command line.")
9373 (home-page "https://stuvel.eu/rsa")
9374 (license license:asl2.0)))
9375
9376(define-public python2-rsa
9377 (package-with-python2 python-rsa))
9378
9379(define-public python-pluggy
9380 (package
9381 (name "python-pluggy")
e5731c03 9382 (version "0.11.0")
44d10b1f
RW
9383 (source
9384 (origin
9385 (method url-fetch)
9386 (uri (pypi-uri "pluggy" version))
9387 (sha256
9388 (base32
e5731c03 9389 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
9390 (build-system python-build-system)
9391 (native-inputs
9392 `(("python-setuptools-scm" ,python-setuptools-scm)))
9393 (synopsis "Plugin and hook calling mechanism for Python")
9394 (description "Pluggy is an extraction of the plugin manager as used by
9395Pytest but stripped of Pytest specific details.")
e85af137 9396 (home-page "https://pypi.org/project/pluggy/")
44d10b1f
RW
9397 (license license:expat)))
9398
9399(define-public python2-pluggy
9400 (package-with-python2 python-pluggy))
9401
9402(define-public python-tox
9403 (package
9404 (name "python-tox")
9405 (version "2.8.1")
9406 (source
9407 (origin
9408 (method url-fetch)
9409 (uri (pypi-uri "tox" version))
9410 (sha256
9411 (base32
9412 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
9413 (build-system python-build-system)
9414 (arguments
9415 ;; FIXME: Tests require pytest-timeout, which itself requires
9416 ;; pytest>=2.8.0 for installation.
9417 '(#:tests? #f))
9418 (propagated-inputs
9419 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9420 ("python-py" ,python-py)
9421 ("python-virtualenv" ,python-virtualenv)))
9422 (native-inputs
9423 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9424 ("python-pytest" ,python-pytest) ; >= 2.3.5
9425 ("python-setuptools-scm" ,python-setuptools-scm)))
d81fb2ae 9426 (home-page "https://tox.readthedocs.io")
44d10b1f
RW
9427 (synopsis "Virtualenv-based automation of test activities")
9428 (description "Tox is a generic virtualenv management and test command line
9429tool. It can be used to check that a package installs correctly with
9430different Python versions and interpreters, or run tests in each type of
9431supported environment, or act as a frontend to continuous integration
9432servers.")
9433 (license license:expat)))
9434
9435(define-public python2-tox
9436 (package-with-python2 python-tox))
9437
9438(define-public python-jmespath
9439 (package
9440 (name "python-jmespath")
27fb781f 9441 (version "0.9.4")
44d10b1f
RW
9442 (source
9443 (origin
9444 (method url-fetch)
9445 (uri (pypi-uri "jmespath" version))
9446 (sha256
9447 (base32
27fb781f 9448 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
9449 (build-system python-build-system)
9450 (native-inputs
9451 `(("python-nose" ,python-nose)))
9452 (synopsis "JSON Matching Expressions")
9453 (description "JMESPath (pronounced “james path”) is a Python library that
9454allows one to declaratively specify how to extract elements from a JSON
9455document.")
9456 (home-page "https://github.com/jmespath/jmespath.py")
9457 (license license:expat)))
9458
9459(define-public python2-jmespath
9460 (package-with-python2 python-jmespath))
9461
9462(define-public python-botocore
9463 (package
7bcf827c 9464 (name "python-botocore")
6b8c390f 9465 (version "1.15.26")
7bcf827c
RW
9466 (source
9467 (origin
9468 (method url-fetch)
9469 (uri (pypi-uri "botocore" version))
9470 (sha256
9471 (base32
6b8c390f 9472 "1a87pbwkk5vlwz92hy1wizfnpiwn11bhaicr6bmji1i5ybwdhnr8"))))
7bcf827c
RW
9473 (build-system python-build-system)
9474 (arguments
9475 ;; FIXME: Many tests are failing.
9476 '(#:tests? #f))
9477 (propagated-inputs
9478 `(("python-dateutil" ,python-dateutil)
9479 ("python-docutils" ,python-docutils)
9480 ("python-jmespath" ,python-jmespath)))
9481 (native-inputs
9482 `(("python-mock" ,python-mock)
9483 ("python-nose" ,python-nose)
9484 ("behave" ,behave)
9485 ("python-tox" ,python-tox)
9486 ("python-urllib3" ,python-urllib3)
9487 ("python-wheel" ,python-wheel)))
9488 (home-page "https://github.com/boto/botocore")
9489 (synopsis "Low-level interface to AWS")
9490 (description "Botocore is a Python library that provides a low-level
44d10b1f 9491interface to the Amazon Web Services (AWS) API.")
7bcf827c 9492 (license license:asl2.0)))
44d10b1f
RW
9493
9494(define-public python2-botocore
9495 (package-with-python2 python-botocore))
9496
9497(define-public python-xdo
9498 (package
9499 (name "python-xdo")
9500 (version "0.3")
9501 (source (origin
9502 (method url-fetch)
9503 (uri (string-append
9504 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9505 "python-xdo_" version ".orig.tar.gz"))
9506 (sha256
9507 (base32
9508 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9509 (build-system python-build-system)
9510 (arguments
9511 '(#:phases
9512 (modify-phases %standard-phases
9513 (add-before 'install 'patch-libxdo-path
9514 ;; Hardcode the path of dynamically loaded libxdo library.
9515 (lambda* (#:key inputs #:allow-other-keys)
9516 (let ((libxdo (string-append
9517 (assoc-ref inputs "xdotool")
9518 "/lib/libxdo.so")))
9519 (substitute* "xdo/_xdo.py"
9520 (("find_library\\(\"xdo\"\\)")
9521 (simple-format #f "\"~a\"" libxdo)))
9522 #t))))
9523 #:tests? #f)) ; no tests provided
9524 (propagated-inputs
9525 `(("python-six" ,python-six)))
9526 (inputs
9527 `(("xdotool" ,xdotool)
9528 ("libX11" ,libx11)))
9529 (home-page "https://tracker.debian.org/pkg/python-xdo")
9530 (synopsis "Python library for simulating X11 keyboard/mouse input")
9531 (description "Provides bindings to libxdo for manipulating X11 via simulated
9532input. (Note that this is mostly a legacy library; you may wish to look at
9533python-xdo for newer bindings.)")
9534 (license license:bsd-3)))
9535
9536(define-public python2-xdo
9537 (package-with-python2 python-xdo))
9538
9539(define-public python-mako
9540 (package
9541 (name "python-mako")
4d3c2cb7 9542 (version "1.1.1")
44d10b1f
RW
9543 (source
9544 (origin
9545 (method url-fetch)
9546 (uri (pypi-uri "Mako" version))
9547 (sha256
9548 (base32
4d3c2cb7 9549 "193mds7lv91pphnvn6c1n55rhjkgq94asdzgrsb2fiqx7rrsd119"))))
44d10b1f 9550 (build-system python-build-system)
6bf53ad5
MB
9551 (arguments
9552 `(#:phases (modify-phases %standard-phases
9553 (replace 'check
9554 (lambda _
9555 (invoke "pytest" "-vv"))))))
44d10b1f
RW
9556 (propagated-inputs
9557 `(("python-markupsafe" ,python-markupsafe)))
9558 (native-inputs
9559 `(("python-mock" ,python-mock)
44d10b1f 9560 ("python-pytest" ,python-pytest)))
7016e620 9561 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
9562 (synopsis "Templating language for Python")
9563 (description "Mako is a templating language for Python that compiles
9564templates into Python modules.")
9565 (license license:expat)))
9566
9567(define-public python2-mako
9568 (package-with-python2 python-mako))
9569
9570(define-public python-waitress
9571 (package
9572 (name "python-waitress")
9573 (version "1.1.0")
9574 (source
9575 (origin
9576 (method url-fetch)
9577 (uri (pypi-uri "waitress" version))
9578 (patches (search-patches "python-waitress-fix-tests.patch"))
9579 (sha256
9580 (base32
9581 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9582 (build-system python-build-system)
9583 (home-page "https://github.com/Pylons/waitress")
9584 (synopsis "Waitress WSGI server")
9585 (description "Waitress is meant to be a production-quality pure-Python WSGI
9586server with very acceptable performance.")
9587 (license license:zpl2.1)))
9588
9589(define-public python2-waitress
9590 (package-with-python2 python-waitress))
9591
b2b23d12
TLC
9592(define-public python-whichcraft
9593 (package
9594 (name "python-whichcraft")
9595 (version "0.6.1")
9596 (source
9597 (origin
9598 (method url-fetch)
9599 (uri (pypi-uri "whichcraft" version))
9600 (sha256
9601 (base32
9602 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9603 (build-system python-build-system)
9604 (native-inputs
9605 `(("python-pytest" ,python-pytest)))
9606 (home-page "https://github.com/pydanny/whichcraft")
9607 (synopsis "Cross-platform cross-python shutil.which functionality")
9608 (description
9609 "This package provides a shim of the shutil.which function that's
9610designed to work across multiple versions of Python.")
9611 (license license:bsd-3)))
9612
1133ca44
TLC
9613(define-public python-cookiecutter
9614 (package
9615 (name "python-cookiecutter")
9616 (version "1.6.0")
9617 (source
9618 (origin
9619 (method url-fetch)
9620 (uri (pypi-uri "cookiecutter" version))
9621 (sha256
9622 (base32
9623 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9624 (build-system python-build-system)
9625 (native-inputs
9626 `(("python-freezegun" ,python-freezegun)
9627 ("python-pytest" ,python-pytest)
9628 ("python-pytest-catchlog" ,python-pytest-catchlog)
9629 ("python-pytest-cov" ,python-pytest-cov)
9630 ("python-pytest-mock" ,python-pytest-mock)))
9631 (propagated-inputs
9632 `(("python-binaryornot" ,python-binaryornot)
9633 ("python-click" ,python-click)
9634 ("python-future" ,python-future)
9635 ("python-jinja2" ,python-jinja2)
9636 ("python-jinja2-time" ,python-jinja2-time)
9637 ("python-poyo" ,python-poyo)
9638 ("python-requests" ,python-requests)
9639 ("python-whichcraft" ,python-whichcraft)))
9640 (home-page "https://github.com/audreyr/cookiecutter")
9641 (synopsis
9642 "Command-line utility that creates projects from project templates")
9643 (description
9644 "This package provides a command-line utility that creates projects from
9645project templates, e.g. creating a Python package project from a Python package
9646project template.")
9647 (license license:bsd-3)))
9648
44d10b1f
RW
9649(define-public python-pyquery
9650 (package
9651 (name "python-pyquery")
9652 (version "1.2.17")
9653 (source
9654 (origin
9655 (method url-fetch)
9656 (uri (pypi-uri "pyquery" version))
9657 (sha256
9658 (base32
9659 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9660 (build-system python-build-system)
9661 (native-inputs
9662 `(("python-webob" ,python-webob)
9663 ("python-webtest" ,python-webtest)))
9664 (propagated-inputs
9665 `(("python-lxml" ,python-lxml)
9666 ("python-cssselect" ,python-cssselect)))
9667 (home-page "https://github.com/gawel/pyquery")
9668 (synopsis "Make jQuery-like queries on xml documents")
9669 (description "pyquery allows you to make jQuery queries on xml documents.
9670The API is as much as possible the similar to jQuery. pyquery uses lxml for
9671fast xml and html manipulation.")
9672 (license license:bsd-3)))
9673
44d10b1f
RW
9674(define-public python-anyjson
9675 (package
9676 (name "python-anyjson")
9677 (version "0.3.3")
9678 (source
9679 (origin
9680 (method url-fetch)
9681 (uri (pypi-uri "anyjson" version))
9682 (sha256
9683 (base32
9684 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9685 (build-system python-build-system)
9686 (arguments
9687 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9688 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9689 ;; whatever) so this transformation needs to be done before the tests
9690 ;; can be run. Maybe we could add a build step to transform beforehand
9691 ;; but it could be annoying/difficult.
9692 ;; We can enable tests for the Python 2 version, though, and do below.
9693 #:tests? #f))
9694 (home-page "https://bitbucket.org/runeh/anyjson/")
9695 (synopsis
9696 "Wraps best available JSON implementation in a common interface")
9697 (description
9698 "Anyjson loads whichever is the fastest JSON module installed
9699and provides a uniform API regardless of which JSON implementation is used.")
9700 (license license:bsd-3)
9701 (properties `((python2-variant . ,(delay python2-anyjson))))))
9702
9703(define-public python2-anyjson
9704 (let ((anyjson (package-with-python2
9705 (strip-python2-variant python-anyjson))))
9706 (package
9707 (inherit anyjson)
9708 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9709 #:tests? #t
9710 ,@(package-arguments anyjson)))
9711 (native-inputs `(("python2-nose" ,python2-nose))))))
9712
9713(define-public python-amqp
9714 (package
9715 (name "python-amqp")
9716 (version "2.3.2")
9717 (source
9718 (origin
9719 (method url-fetch)
9720 (uri (pypi-uri "amqp" version))
9721 (sha256
9722 (base32
9723 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9724 (build-system python-build-system)
9725 (native-inputs
9726 `(("python-case" ,python-case)
9727 ("python-pytest-sugar" ,python-pytest-sugar)
9728 ("python-mock" ,python-mock)))
9729 (propagated-inputs
9730 `(("python-vine" ,python-vine)))
9731 (home-page "https://github.com/celery/py-amqp")
9732 (synopsis
9733 "Low-level AMQP client for Python (fork of amqplib)")
9734 (description
9735 "This is a fork of amqplib which was originally written by Barry Pederson.
9736It is maintained by the Celery project, and used by kombu as a pure python
9737alternative when librabbitmq is not available.")
9738 (license license:lgpl2.1+)
9739 (properties `((python2-variant . ,(delay python2-amqp))))))
9740
9741(define-public python2-amqp
9742 (let ((amqp (package-with-python2
9743 (strip-python2-variant python-amqp))))
9744 (package
9745 (inherit amqp)
9746 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9747 ;; unmaintained. Weirdly, does not do this on the python 3
9748 ;; version?
9749 #:tests? #f
9750 ,@(package-arguments amqp))))))
9751
9752(define-public python-txamqp
9753 (package
9754 (name "python-txamqp")
9755 (version "0.8.2")
9756 (source
9757 (origin
9758 (method url-fetch)
9759 (uri (pypi-uri "txAMQP" version))
9760 (sha256
9761 (base32
9762 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9763 (build-system python-build-system)
9764 (propagated-inputs
9765 `(("python-six" ,python-six)
9766 ("python-twisted" ,python-twisted)))
9767 (home-page "https://github.com/txamqp/txamqp")
9768 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9769 (description
9770 "This package provides a Python library for communicating with AMQP peers
9771and brokers using the asynchronous networking framework Twisted. It contains
9772all the necessary code to connect, send and receive messages to/from an
9773AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9774also includes support for using Thrift RPC over AMQP in Twisted
9775applications.")
9776 (license license:asl2.0)))
9777
9778(define-public python2-txamqp
9779 (package-with-python2 python-txamqp))
9780
9781(define-public python-kombu
9782 (package
9783 (name "python-kombu")
9784 (version "4.2.2")
9785 (source
9786 (origin
9787 (method url-fetch)
9788 (uri (pypi-uri "kombu" version))
9789 (sha256
9790 (base32
9791 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9792 (build-system python-build-system)
9793 (native-inputs
9794 `(("python-mock" ,python-mock)
9795 ("python-case" ,python-case)
9796 ("python-pyro4" ,python-pyro4)
9797 ("python-pytest-sugar" ,python-pytest-sugar)
9798 ("python-pytz" ,python-pytz)))
9799 (propagated-inputs
9800 `(("python-anyjson" ,python-anyjson)
9801 ("python-amqp" ,python-amqp)
9802 ("python-redis" ,python-redis)))
9803 (home-page "https://kombu.readthedocs.io")
9804 (synopsis "Message passing library for Python")
9805 (description "The aim of Kombu is to make messaging in Python as easy as
9806possible by providing an idiomatic high-level interface for the AMQ protocol,
9807and also provide proven and tested solutions to common messaging problems.
9808AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9809message orientation, queuing, routing, reliability and security, for which the
9810RabbitMQ messaging server is the most popular implementation.")
9811 (license license:bsd-3)
9812 (properties `((python2-variant . ,(delay python2-kombu))))))
9813
9814(define-public python2-kombu
9815 (let ((kombu (package-with-python2
9816 (strip-python2-variant python-kombu))))
9817 (package
9818 (inherit kombu)
9819 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9820 ;; It works fine on the python3 variant.
9821 #:tests? #f
9822 ,@(package-arguments kombu)))
9823 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9824 ,@(package-native-inputs kombu))))))
9825
9826(define-public python-billiard
9827 (package
9828 (name "python-billiard")
9829 (version "3.5.0.5")
9830 (source
9831 (origin
9832 (method url-fetch)
9833 (uri (pypi-uri "billiard" version))
9834 (sha256
9835 (base32
9836 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9837 (build-system python-build-system)
9838 (native-inputs
9839 `(("python-case" ,python-case)
9840 ("python-pytest" ,python-pytest)))
9841 (home-page "https://github.com/celery/billiard")
9842 (synopsis
9843 "Python multiprocessing fork with improvements and bugfixes")
9844 (description
9845 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9846multiprocessing package itself is a renamed and updated version of R Oudkerk's
9847pyprocessing package. This standalone variant is intended to be compatible with
9848Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9849 (license license:bsd-3)
9850 (properties `((python2-variant . ,(delay python2-billiard))))))
9851
9852(define-public python2-billiard
9853 (let ((billiard (package-with-python2
9854 (strip-python2-variant python-billiard))))
9855 (package
9856 (inherit billiard)
9857 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9858 ("python2-mock" ,python2-mock)
9859 ,@(package-native-inputs billiard))))))
9860
9861(define-public python-celery
9862 (package
9863 (name "python-celery")
9864 (version "4.2.1")
9865 (source
9866 (origin
9867 (method url-fetch)
9868 (uri (pypi-uri "celery" version))
9869 (sha256
9870 (base32
9871 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9872 (build-system python-build-system)
9873 (arguments
9874 '(;; TODO The tests fail with Python 3.7
9875 ;; https://github.com/celery/celery/issues/4849
9876 #:tests? #f
9877 #:phases
9878 (modify-phases %standard-phases
9879 (add-after 'unpack 'patch-requirements
9880 (lambda _
9881 (substitute* "requirements/test.txt"
9882 (("pytest>=3\\.0,<3\\.3")
9883 "pytest>=3.0"))
9884 #t)))))
9885 (native-inputs
9886 `(("python-case" ,python-case)
9887 ("python-pytest" ,python-pytest)))
9888 (propagated-inputs
9889 `(("python-pytz" ,python-pytz)
9890 ("python-billiard" ,python-billiard)
9891 ("python-kombu" ,python-kombu)))
9892 (home-page "https://celeryproject.org")
9893 (synopsis "Distributed Task Queue")
9894 (description "Celery is an asynchronous task queue/job queue based on
9895distributed message passing. It is focused on real-time operation, but
9896supports scheduling as well. The execution units, called tasks, are executed
9897concurrently on a single or more worker servers using multiprocessing,
9898Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9899synchronously (wait until ready).")
9900 (license license:bsd-3)
9901 (properties `((python2-variant . ,(delay python2-celery))))))
9902
9903(define-public python2-celery
9904 (let ((celery (package-with-python2
9905 (strip-python2-variant python-celery))))
9906 (package
9907 (inherit celery)
9908 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9909 ("python2-mock" ,python2-mock)
9910 ,@(package-native-inputs celery))))))
9911
9912(define-public python-translitcodec
9913 (package
9914 (name "python-translitcodec")
9915 (version "0.4.0")
9916 (source
9917 (origin
9918 (method url-fetch)
9919 (uri (pypi-uri "translitcodec" version))
9920 (sha256
9921 (base32
9922 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9923 (build-system python-build-system)
9924 (arguments
9925 `(#:tests? #f)) ; no tests provided
9926 (home-page
9927 "https://github.com/claudep/translitcodec")
9928 (synopsis
9929 "Unicode to 8-bit charset transliteration codec")
9930 (description
9931 "This package contains codecs for transliterating ISO 10646 texts into
9932best-effort representations using smaller coded character sets (ASCII,
9933ISO 8859, etc.).")
9934 (license license:expat)))
9935
9936(define-public python2-translitcodec
9937 (package-with-python2 python-translitcodec))
9938
9939(define-public python-editor
9940 (package
9941 (name "python-editor")
baea210c 9942 (version "1.0.4")
44d10b1f
RW
9943 (source
9944 (origin
9945 (method url-fetch)
9946 (uri (pypi-uri "python-editor" version))
9947 (sha256
9948 (base32
baea210c 9949 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
44d10b1f 9950 (build-system python-build-system)
baea210c
MB
9951 (arguments
9952 '(#:tests? #f)) ;XXX: needs a TTY and an editor
9953 (home-page "https://github.com/fmoo/python-editor")
9954 (synopsis "Programmatically open an editor, capture the result")
44d10b1f
RW
9955 (description
9956 "python-editor is a library that provides the editor module for
9957programmatically interfacing with your system's $EDITOR.")
9958 (license license:asl2.0)))
9959
9960(define-public python2-editor
9961 (package-with-python2 python-editor))
9962
44d10b1f
RW
9963(define-public python-vobject
9964 (package
9965 (name "python-vobject")
9966 (version "0.9.5")
9967 (source (origin
9968 (method url-fetch)
9969 (uri (pypi-uri "vobject" version))
9970 (sha256
9971 (base32
9972 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9973 (build-system python-build-system)
9974 (arguments
9975 '(;; The test suite relies on some non-portable Windows interfaces.
9976 #:tests? #f))
9977 (propagated-inputs
9978 `(("python-dateutil" ,python-dateutil)
9979 ("python-pyicu" ,python-pyicu)))
9980 (synopsis "Parse and generate vCard and vCalendar files")
9981 (description "Vobject is intended to be a full featured Python package for
9982parsing and generating vCard and vCalendar files. Currently, iCalendar files
9983are supported and well tested. vCard 3.0 files are supported, and all data
9984should be imported, but only a few components are understood in a sophisticated
9985way.")
5d6e7106 9986 (home-page "https://eventable.github.io/vobject/")
44d10b1f
RW
9987 (license license:asl2.0)))
9988
9989(define-public python2-vobject
9990 (package-with-python2 python-vobject))
9991
9992(define-public python-munkres
9993 (package
9994 (name "python-munkres")
9995 (version "1.0.8")
9996 (source (origin
9997 (method url-fetch)
9998 (uri (pypi-uri "munkres" version))
9999 (sha256
10000 (base32
10001 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10002 (build-system python-build-system)
10003 (arguments
10004 '(#:tests? #f)) ; no test suite
78f8780e 10005 (home-page "https://software.clapper.org/munkres/")
44d10b1f
RW
10006 (synopsis "Implementation of the Munkres algorithm")
10007 (description "The Munkres module provides an implementation of the Munkres
10008algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10009useful for solving the Assignment Problem.")
10010 (license license:bsd-3)))
10011
10012(define-public python2-munkres
10013 (package-with-python2 python-munkres))
10014
10015(define-public python-whoosh
10016 (package
10017 (name "python-whoosh")
10018 (version "2.7.4")
10019 (source
10020 (origin
10021 (method url-fetch)
10022 (uri (pypi-uri "Whoosh" version))
10023 (sha256
10024 (base32
10025 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10026 (build-system python-build-system)
2679d9a4 10027 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
10028 (native-inputs
10029 `(("python-pytest" ,python-pytest)))
10030 (home-page "https://bitbucket.org/mchaput/whoosh")
10031 (synopsis "Full text indexing, search, and spell checking library")
10032 (description
10033 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10034checking library.")
10035 (license license:bsd-2)))
10036
10037(define-public python2-whoosh
10038 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10039 (package (inherit whoosh)
10040 (propagated-inputs
10041 `(("python2-backport-ssl-match-hostname"
10042 ,python2-backport-ssl-match-hostname)
10043 ,@(package-propagated-inputs whoosh))))))
10044
10045(define-public python-pathlib
10046 (package
10047 (name "python-pathlib")
10048 (version "1.0.1")
10049 (source (origin
10050 (method url-fetch)
10051 (uri (pypi-uri "pathlib" version))
10052 (sha256
10053 (base32
10054 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10055 (build-system python-build-system)
10056 ;; The tests depend on the internal "test" module, which does not provide
10057 ;; a stable interface.
10058 (arguments `(#:tests? #f))
10059 (home-page "https://pathlib.readthedocs.org/")
10060 (synopsis "Object-oriented file system paths")
10061 (description "Pathlib offers a set of classes to handle file system paths.
10062It offers the following advantages over using string objects:
10063
10064@enumerate
10065@item No more cumbersome use of os and os.path functions. Everything can
10066be done easily through operators, attribute accesses, and method calls.
10067@item Embodies the semantics of different path types. For example,
10068comparing Windows paths ignores casing.
10069@item Well-defined semantics, eliminating any inconsistencies or
10070ambiguities (forward vs. backward slashes, etc.).
10071@end enumerate
10072
10073Note: In Python 3.4, pathlib is now part of the standard library. For other
10074Python versions please consider python-pathlib2 instead, which tracks the
10075standard library module. This module (python-pathlib) isn't maintained
10076anymore.")
10077 (license license:expat)))
10078
10079(define-public python2-pathlib
10080 (package-with-python2 python-pathlib))
10081
10082(define-public python2-pathlib2
10083 (package
10084 (name "python2-pathlib2")
54da6f9f 10085 (version "2.3.3")
44d10b1f
RW
10086 (source (origin
10087 (method url-fetch)
10088 (uri (pypi-uri "pathlib2" version))
10089 (sha256
10090 (base32
54da6f9f 10091 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
10092 (build-system python-build-system)
10093 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10094 ;; version is 3.4 which already includes this package as part of the
10095 ;; standard library.
10096 (arguments
10097 `(#:python ,python-2))
10098 (propagated-inputs
10099 `(("python2-scandir" ,python2-scandir)
10100 ("python2-six" ,python2-six)))
e85af137 10101 (home-page "https://pypi.org/project/pathlib2/")
44d10b1f
RW
10102 (synopsis "Object-oriented file system paths - backport of standard
10103pathlib module")
10104 (description "The goal of pathlib2 is to provide a backport of standard
10105pathlib module which tracks the standard library module, so all the newest
10106features of the standard pathlib can be used also on older Python versions.
10107
10108Pathlib offers a set of classes to handle file system paths. It offers the
10109following advantages over using string objects:
10110
10111@enumerate
10112@item No more cumbersome use of os and os.path functions. Everything can
10113be done easily through operators, attribute accesses, and method calls.
10114@item Embodies the semantics of different path types. For example,
10115comparing Windows paths ignores casing.
10116@item Well-defined semantics, eliminating any inconsistencies or
10117ambiguities (forward vs. backward slashes, etc.).
10118@end enumerate")
10119 (license license:expat)))
10120
10121(define-public python2-pathlib2-bootstrap
10122 (hidden-package
10123 (package
10124 (inherit python2-pathlib2)
10125 (name "python2-pathlib2-bootstrap")
10126 (propagated-inputs
10127 `(("python2-scandir" ,python2-scandir)
10128 ("python2-six" ,python2-six-bootstrap))))))
10129
10130(define-public python-jellyfish
10131 (package
10132 (name "python-jellyfish")
10133 (version "0.5.6")
10134 (source (origin
10135 (method url-fetch)
10136 (uri (pypi-uri "jellyfish" version))
10137 (sha256
10138 (base32
10139 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10140 (build-system python-build-system)
10141 (native-inputs
10142 `(("python-pytest" ,python-pytest)))
10143 (home-page "https://github.com/jamesturk/jellyfish")
10144 (synopsis "Approximate and phonetic matching of strings")
10145 (description "Jellyfish uses a variety of string comparison and phonetic
10146encoding algorithms to do fuzzy string matching.")
10147 (license license:bsd-2)
10148 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10149
10150(define-public python2-jellyfish
10151 (let ((jellyfish (package-with-python2
10152 (strip-python2-variant python-jellyfish))))
10153 (package (inherit jellyfish)
10154 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10155 ,@(package-native-inputs jellyfish))))))
10156
10157(define-public python2-unicodecsv
10158 (package
10159 (name "python2-unicodecsv")
10160 (version "0.14.1")
10161 (source (origin
f711b71b 10162 (method git-fetch)
44d10b1f
RW
10163 ;; The test suite is not included in the PyPi release.
10164 ;; https://github.com/jdunck/python-unicodecsv/issues/19
f711b71b
EF
10165 (uri (git-reference
10166 (url "https://github.com/jdunck/python-unicodecsv")
10167 (commit version)))
10168 (file-name (git-file-name name version))
44d10b1f
RW
10169 (sha256
10170 (base32
f711b71b 10171 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
44d10b1f
RW
10172 (build-system python-build-system)
10173 (arguments
10174 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10175 #:python ,python-2))
10176 (native-inputs
10177 `(("python2-unittest2" ,python2-unittest2)))
10178 (home-page "https://github.com/jdunck/python-unicodecsv")
10179 (synopsis "Unicode CSV module for Python 2")
10180 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10181module, adding support for Unicode strings.")
10182 (license license:bsd-2)))
10183
10184(define-public python-rarfile
10185 (package
10186 (name "python-rarfile")
10187 (version "2.8")
10188 (source (origin
10189 (method url-fetch)
10190 (uri (pypi-uri "rarfile" version))
10191 (sha256
10192 (base32
10193 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10194 (build-system python-build-system)
10195 (arguments
10196 '(#:phases
10197 (modify-phases %standard-phases
10198 (replace 'check
10199 ;; Many tests fail, but the installation proceeds.
e59dd341 10200 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
10201 (native-inputs
10202 `(("which" ,which))) ; required for tests
10203 (propagated-inputs
10204 `(("libarchive" ,libarchive)))
10205 (home-page "https://github.com/markokr/rarfile")
10206 (synopsis "RAR archive reader for Python")
10207 (description "This is Python module for RAR archive reading. The interface
10208is made as zipfile like as possible.")
10209 (license license:isc)))
10210
10211(define-public python2-rarfile
10212 (package-with-python2 python-rarfile))
10213
10214(define-public python-magic
10215 (package
10216 (name "python-magic")
10217 (version "0.4.15")
10218 (source
10219 (origin
10220 (method url-fetch)
10221 (uri (pypi-uri "python-magic" version))
10222 (sha256
10223 (base32
10224 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
10225 (file-name (string-append name "-" version "-checkout"))))
10226 (build-system python-build-system)
10227 (arguments
10228 ;; The tests are unreliable, so don't run them. The tests fail
10229 ;; under Python3 because they were written for Python2 and
10230 ;; contain import statements that do not work in Python3. One of
10231 ;; the tests fails under Python2 because its assertions are
10232 ;; overly stringent; it relies on comparing output strings which
10233 ;; are brittle and can change depending on the version of
10234 ;; libmagic being used and the system on which the test is
10235 ;; running. In my case, under GuixSD 0.10.0, only one test
10236 ;; failed, and it seems to have failed only because the version
10237 ;; of libmagic that is packaged in Guix outputs a slightly
10238 ;; different (but not wrong) string than the one that the test
10239 ;; expected.
10240 '(#:tests? #f
10241 #:phases (modify-phases %standard-phases
10242 ;; Replace a specific method call with a hard-coded
10243 ;; path to the necessary libmagic.so file in the
10244 ;; store. If we don't do this, then the method call
10245 ;; will fail to find the libmagic.so file, which in
10246 ;; turn will cause any application using
10247 ;; python-magic to fail.
10248 (add-before 'build 'hard-code-path-to-libmagic
10249 (lambda* (#:key inputs #:allow-other-keys)
10250 (let ((file (assoc-ref inputs "file")))
10251 (substitute* "magic.py"
10252 (("ctypes.util.find_library\\('magic'\\)")
10253 (string-append "'" file "/lib/libmagic.so'")))
10254 #t)))
10255 (add-before 'install 'disable-egg-compression
10256 (lambda _
10257 (let ((port (open-file "setup.cfg" "a")))
10258 (display "\n[easy_install]\nzip_ok = 0\n"
10259 port)
10260 (close-port port)
10261 #t))))))
10262 (inputs
10263 ;; python-magic needs to be able to find libmagic.so.
10264 `(("file" ,file)))
10265 (home-page
10266 "https://github.com/ahupp/python-magic")
10267 (synopsis
10268 "File type identification using libmagic")
10269 (description
10270 "This module uses ctypes to access the libmagic file type
10271identification library. It makes use of the local magic database and
10272supports both textual and MIME-type output. Note that this module and
10273the python-file module both provide a \"magic.py\" file; these two
10274modules, which are different and were developed separately, both serve
10275the same purpose: to provide Python bindings for libmagic.")
10276 (license license:expat)))
10277
10278(define-public python2-magic
10279 (package-with-python2 python-magic))
10280
10281(define-public python2-s3cmd
10282 (package
10283 (name "python2-s3cmd")
10284 (version "1.6.1")
10285 (source
10286 (origin
10287 (method url-fetch)
10288 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10289 "s3cmd-" version ".tar.gz"))
10290 (sha256
10291 (base32
10292 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10293 (build-system python-build-system)
10294 (arguments
10295 ;; s3cmd is written for python2 only and contains no tests.
10296 `(#:python ,python-2
10297 #:tests? #f))
10298 (propagated-inputs
10299 `(("python2-dateutil" ,python2-dateutil)
10300 ;; The python-file package also provides a magic.py module.
10301 ;; This is an unfortunate state of affairs; however, s3cmd
10302 ;; fails to install if it cannot find specifically the
10303 ;; python-magic package. Thus we include it, instead of using
10304 ;; python-file. Ironically, s3cmd sometimes works better
10305 ;; without libmagic bindings at all:
10306 ;; https://github.com/s3tools/s3cmd/issues/198
10307 ("python2-magic" ,python2-magic)))
fa7efe17 10308 (home-page "https://s3tools.org/s3cmd")
44d10b1f
RW
10309 (synopsis "Command line tool for S3-compatible storage services")
10310 (description
10311 "S3cmd is a command line tool for uploading, retrieving and managing data
10312in storage services that are compatible with the Amazon Simple Storage
10313Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10314GnuPG encryption, and more. It also supports management of Amazon's
10315CloudFront content delivery network.")
10316 (license license:gpl2+)))
10317
10318(define-public python-pkgconfig
10319 (package
10320 (name "python-pkgconfig")
10321 (version "1.3.1")
10322 (source
10323 (origin
10324 (method url-fetch)
10325 (uri (pypi-uri "pkgconfig" version))
10326 (sha256
10327 (base32
10328 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
10329 (build-system python-build-system)
10330 (native-inputs
10331 `(("python-nose" ,python-nose)))
10332 (inputs
10333 `(("pkg-config" ,pkg-config)))
10334 (arguments
10335 `(#:phases
10336 (modify-phases %standard-phases
10337 (add-before 'build 'patch
10338 ;; Hard-code the path to pkg-config.
10339 (lambda _
10340 (substitute* "pkgconfig/pkgconfig.py"
10341 (("cmd = 'pkg-config")
10342 (string-append "cmd = '" (which "pkg-config"))))
10343 #t))
10344 (replace 'check
10345 (lambda _
10346 (invoke "nosetests" "test.py"))))))
10347 (home-page "https://github.com/matze/pkgconfig")
10348 (synopsis "Python interface for pkg-config")
10349 (description "This module provides a Python interface to pkg-config. It
10350can be used to find all pkg-config packages, check if a package exists,
10351check if a package meets certain version requirements, query CFLAGS and
10352LDFLAGS and parse the output to build extensions with setup.py.")
10353 (license license:expat)))
10354
10355(define-public python2-pkgconfig
10356 (package-with-python2 python-pkgconfig))
10357
10358(define-public python-bz2file
10359 (package
10360 (name "python-bz2file")
10361 (version "0.98")
10362 (source
10363 (origin
10364 (method url-fetch)
10365 (uri (pypi-uri "bz2file" version))
10366 (sha256
10367 (base32
10368 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10369 (build-system python-build-system)
10370 (arguments
10371 `(#:tests? #f)) ; Tests use deprecated python modules.
10372 (home-page "https://github.com/nvawda/bz2file")
10373 (synopsis "Read and write bzip2-compressed files")
10374 (description
10375 "Bz2file is a Python library for reading and writing bzip2-compressed
10376files. It contains a drop-in replacement for the I/O interface in the
10377standard library's @code{bz2} module, including features from the latest
10378development version of CPython that are not available in older releases.")
10379 (license license:asl2.0)))
10380
10381(define-public python2-bz2file
10382 (package-with-python2 python-bz2file))
10383
10384(define-public python-future
10385 (package
10386 (name "python-future")
d5d54030 10387 (version "0.17.1")
44d10b1f
RW
10388 (source
10389 (origin
10390 (method url-fetch)
10391 (uri (pypi-uri "future" version))
10392 (sha256
10393 (base32
d5d54030 10394 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
10395 (build-system python-build-system)
10396 ;; Many tests connect to the network or are otherwise flawed.
10397 ;; https://github.com/PythonCharmers/python-future/issues/210
10398 (arguments
10399 `(#:tests? #f))
02d1fd03 10400 (home-page "https://python-future.org")
44d10b1f
RW
10401 (synopsis "Single-source support for Python 3 and 2")
10402 (description
10403 "@code{python-future} is the missing compatibility layer between Python 2 and
10404Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10405to support both Python 2 and Python 3 with minimal overhead.")
10406 (license license:expat)))
10407
10408(define-public python2-future
10409 (package-with-python2 python-future))
10410
10411(define-public python-cysignals
10412 (package
10413 (name "python-cysignals")
8e3e51df 10414 (version "1.9.0")
44d10b1f
RW
10415 (source
10416 (origin
10417 (method url-fetch)
8e3e51df 10418 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
10419 (sha256
10420 (base32
8e3e51df 10421 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
10422 (build-system python-build-system)
10423 (native-inputs
10424 `(("python-cython" ,python-cython)
10425 ("python-sphinx" ,python-sphinx)))
10426 (inputs
10427 `(("pari-gp" ,pari-gp)))
10428 (arguments
10429 `(#:modules ((guix build python-build-system)
10430 ((guix build gnu-build-system) #:prefix gnu:)
10431 (guix build utils))
10432 ;; FIXME: Tests are executed after installation and currently fail
10433 ;; when not installing into standard locations; the author is working
10434 ;; on a fix.
10435 #:tests? #f
10436 #:phases
10437 (modify-phases %standard-phases
10438 (add-before
10439 'build 'configure
10440 (assoc-ref gnu:%standard-phases 'configure)))))
10441 (home-page
10442 "https://github.com/sagemath/cysignals")
10443 (synopsis
10444 "Handling of interrupts and signals for Cython")
10445 (description
10446 "The cysignals package provides mechanisms to handle interrupts (and
10447other signals and errors) in Cython code, using two related approaches,
10448for mixed Cython/Python code or external C libraries and pure Cython code,
10449respectively.")
10450 (license license:lgpl3+)))
10451
10452(define-public python2-cysignals
10453 (package-with-python2 python-cysignals))
10454
10455(define-public python2-shedskin
10456 (package
10457 (name "python2-shedskin")
10458 (version "0.9.4")
10459 (source
10460 (origin
10461 (method url-fetch)
10462 (uri (string-append "https://github.com/shedskin/shedskin/"
10463 "releases/download/v" version
10464 "/shedskin-" version ".tgz"))
10465 (sha256
10466 (base32
10467 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10468 (build-system python-build-system)
10469 (arguments
10470 `(#:python ,python-2
10471 #:phases (modify-phases %standard-phases
10472 (add-after 'unpack 'fix-resulting-include-libs
10473 (lambda* (#:key inputs #:allow-other-keys)
10474 (let ((libgc (assoc-ref inputs "libgc"))
10475 (pcre (assoc-ref inputs "pcre")))
10476 (substitute* "shedskin/makefile.py"
10477 (("variable == 'CCFLAGS':[ ]*")
10478 (string-append "variable == 'CCFLAGS':\n"
10479 " line += ' -I " pcre "/include"
10480 " -I " libgc "/include'"))
10481 (("variable == 'LFLAGS':[ ]*")
10482 (string-append "variable == 'LFLAGS':\n"
10483 " line += ' -L" pcre "/lib"
10484 " -L " libgc "/lib'")))
10485 #t))))))
10486 (inputs `(("pcre" ,pcre)
10487 ("libgc" ,libgc)))
10488 (home-page "https://shedskin.github.io/")
10489 (synopsis "Experimental Python-2 to C++ Compiler")
10490 (description (string-append "This is an experimental compiler for a subset of
10491Python. It generates C++ code and a Makefile."))
10492 (license (list license:gpl3 license:bsd-3 license:expat))))
10493
10494(define-public python2-rope
10495 (package
10496 (name "python2-rope")
a9ba0a31 10497 (version "0.11.0")
44d10b1f
RW
10498 (source
10499 (origin
10500 (method url-fetch)
10501 (uri (pypi-uri "rope" version))
10502 (sha256
10503 (base32
a9ba0a31 10504 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 10505 (arguments
afb29715 10506 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
10507 `(#:python ,python-2))
10508 (build-system python-build-system)
10509 (native-inputs
10510 `(("python2-unittest2" ,python2-unittest2)))
10511 (home-page "https://github.com/python-rope/rope")
10512 (synopsis "Refactoring library for Python")
10513 (description "Rope is a refactoring library for Python. It facilitates
10514the renaming, moving and extracting of attributes, functions, modules, fields
10515and parameters in Python 2 source code. These refactorings can also be applied
10516to occurrences in strings and comments.")
10517 (license license:gpl2)))
10518
2c880ef4
LC
10519(define-public python-rope
10520 (package
10521 (inherit python2-rope)
10522 (name "python-rope")
10523 (arguments `(#:python ,python-wrapper
10524 ;; XXX: Only partial python3 support, results in some failing
10525 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10526 #:tests? #f))
10527 (properties `((python2-variant . ,(delay python2-rope))))))
10528
44d10b1f
RW
10529(define-public python-py3status
10530 (package
10531 (name "python-py3status")
ef68b35d 10532 (version "3.21")
44d10b1f
RW
10533 (source
10534 (origin
10535 (method url-fetch)
10536 (uri (pypi-uri "py3status" version))
10537 (sha256
ef68b35d 10538 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
10539 (build-system python-build-system)
10540 (inputs
10541 `(("file" ,file)))
10542 (arguments
10543 '(#:phases
10544 (modify-phases %standard-phases
10545 ;; 'file' is used for detection of configuration file encoding
10546 ;; let's make link the dependency to particular input
10547 (add-before 'build 'patch-file-path
10548 (lambda* (#:key inputs #:allow-other-keys)
10549 (let ((file-path (assoc-ref inputs "file")))
10550 (substitute* "py3status/parse_config.py"
6a6b8a3f 10551 (("\\[\"file\", \"-b\"")
44d10b1f
RW
10552 (string-append "['" file-path "/bin/file', '-b'")))
10553 #t))))
10554 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10555 (home-page "https://github.com/ultrabug/py3status")
10556 (synopsis "Extensible i3status wrapper written in Python")
10557 (description "py3status is an i3status wrapper which extends i3status
10558functionality in a modular way, allowing you to extend your panel with your
10559own code, responding to click events and updating clock every second.")
10560 (license license:bsd-3)))
10561
10562(define-public python-tblib
10563 (package
10564 (name "python-tblib")
4fc26c65 10565 (version "1.6.0")
44d10b1f
RW
10566 (source (origin
10567 (method url-fetch)
10568 (uri (pypi-uri "tblib" version))
4fc26c65
MB
10569 (sha256
10570 (base32
10571 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
44d10b1f
RW
10572 (build-system python-build-system)
10573 (arguments
10574 `(#:phases
10575 (modify-phases %standard-phases
44d10b1f
RW
10576 (replace 'check
10577 (lambda _
10578 ;; Upstream runs tests after installation and the package itself
10579 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10580 ;; found.
10581 (setenv "PYTHONPATH"
10582 (string-append (getcwd) "/build/lib:"
10583 (getenv "PYTHONPATH")))
10584 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10585 (native-inputs
10586 `(("python-pytest" ,python-pytest)
10587 ("python-six" ,python-six)))
10588 (home-page "https://github.com/ionelmc/python-tblib")
10589 (synopsis "Traceback serialization library")
10590 (description
10591 "Traceback serialization allows you to:
10592
10593@enumerate
10594@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10595different processes. This allows better error handling when running code over
10596multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10597
10598@item Parse traceback strings and raise with the parsed tracebacks.
10599@end enumerate\n")
10600 (license license:bsd-3)))
10601
10602(define-public python2-tblib
10603 (package-with-python2 python-tblib))
10604
10605(define-public python-greenlet
10606 (package
10607 (name "python-greenlet")
10608 (version "0.4.15")
10609 (source (origin
10610 (method url-fetch)
10611 (uri (pypi-uri "greenlet" version))
10612 (sha256
10613 (base32
10614 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10615 (build-system python-build-system)
10616 (home-page "https://greenlet.readthedocs.io/")
10617 (synopsis "Lightweight in-process concurrent programming")
10618 (description
10619 "Greenlet package is a spin-off of Stackless, a version of CPython
10620that supports micro-threads called \"tasklets\". Tasklets run
10621pseudo-concurrently (typically in a single or a few OS-level threads) and
10622are synchronized with data exchanges on \"channels\".")
10623 (license (list license:psfl license:expat))))
10624
10625(define-public python2-greenlet
10626 (package-with-python2 python-greenlet))
10627
10628(define-public python-objgraph
10629 (package
10630 (name "python-objgraph")
eebc03bb 10631 (version "3.4.1")
44d10b1f
RW
10632 (source
10633 (origin
10634 (method url-fetch)
10635 (uri (pypi-uri "objgraph" version))
10636 (sha256
10637 (base32
eebc03bb 10638 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
44d10b1f
RW
10639 (build-system python-build-system)
10640 (propagated-inputs
10641 `(("python-graphviz" ,python-graphviz)))
10642 (native-inputs
10643 `(("python-mock" ,python-mock)
10644 ("graphviz" ,graphviz)))
10645 (home-page "https://mg.pov.lt/objgraph/")
10646 (synopsis "Draw Python object reference graphs with graphviz")
10647 (description
10648 "This package provides tools to draw Python object reference graphs with
10649graphviz.")
10650 (license license:expat)))
10651
ffe58d1d
MB
10652(define-public python2-objgraph
10653 (package-with-python2 python-objgraph))
10654
44d10b1f
RW
10655(define-public python-gevent
10656 (package
10657 (name "python-gevent")
f11b5556 10658 (version "1.4.0")
44d10b1f
RW
10659 (source (origin
10660 (method url-fetch)
10661 (uri (pypi-uri "gevent" version))
10662 (sha256
10663 (base32
f11b5556 10664 "1lchr4akw2jkm5v4kz7bdm4wv3knkfhbfn9vkkz4s5yrkcxzmdqy"))
44d10b1f
RW
10665 (modules '((guix build utils)))
10666 (snippet
10667 '(begin
10668 ;; unbunding libev and c-ares
10669 (delete-file-recursively "deps")
10670 #t))))
10671 (build-system python-build-system)
10672 (arguments
10673 `(#:modules ((ice-9 ftw)
10674 (ice-9 match)
10675 (srfi srfi-26)
10676 (guix build utils)
10677 (guix build python-build-system))
10678 #:phases (modify-phases %standard-phases
44d10b1f
RW
10679 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10680 (lambda _
10681 (substitute* "src/gevent/subprocess.py"
10682 (("/bin/sh") (which "sh")))
10683 (for-each (lambda (file)
10684 (substitute* file
10685 (("/bin/sh") (which "sh"))
10686 (("/bin/true") (which "true"))))
10687 (find-files "src/greentest" "\\.py$"))
10688 #t))
10689 (add-before 'build 'do-not-use-bundled-sources
10690 (lambda* (#:key inputs #:allow-other-keys)
f11b5556 10691 (setenv "GEVENTSETUP_EMBED" "0")
44d10b1f 10692
b5b56b7f
MB
10693 ;; Prevent building bundled libev.
10694 (substitute* "setup.py"
10695 (("run_make=_BUILDING")
10696 "run_make=False"))
10697
44d10b1f
RW
10698 (let ((greenlet (string-append
10699 (assoc-ref inputs "python-greenlet")
10700 "/include")))
10701 (match (scandir greenlet
10702 (lambda (item)
10703 (string-prefix? "python" item)))
10704 ((python)
b5b56b7f 10705 (setenv "C_INCLUDE_PATH"
f11b5556
MB
10706 (string-append greenlet "/" python ":"
10707 (or (getenv "C_INCLUDE_PATH")
10708 ""))))))
44d10b1f 10709 #t))
f11b5556 10710 (add-before 'check 'pretend-to-be-CI
44d10b1f 10711 (lambda _
f11b5556
MB
10712 ;; A few tests are skipped due to network constraints or
10713 ;; get longer timeouts when running in a CI environment.
10714 ;; Piggy-back on that, as we need the same adjustments.
10715 (setenv "TRAVIS" "1")
10716 (setenv "APPVEYOR" "1")
44d10b1f 10717 #t))
f11b5556
MB
10718 (add-before 'check 'adjust-tests
10719 (lambda _
10720 (let ((disabled-tests
10721 '(;; These tests rely on networking which is not
10722 ;; available in the build container.
10723 "test_urllib2net.py"
10724 "test__server.py"
10725 "test__server_pywsgi.py"
10726 "test_socket.py"
10727 "test__socket.py"
10728 "test__socket_ssl.py"
10729 "test__socket_dns.py"
10730 "test__socket_dns6.py"
10731 "test___example_servers.py"
10732 "test__getaddrinfo_import.py"
10733 "test__examples.py"
10734 "test_httplib.py"
10735 "test_https.py"
10736 "test_urllib2_localnet.py"
10737 "test_ssl.py"
10738 "test__ssl.py"
10739 ;; XXX: These tests borrow functionality from the
10740 ;; Python builtin 'test' module, but it is not
10741 ;; installed with the Guix Python distribution.
10742 "test_smtpd.py"
10743 "test_wsgiref.py"
10744 "test_urllib2.py"
10745 "test_thread.py"
10746 "test_threading.py"
10747 "test__threading_2.py"
10748 ;; FIXME: test_patch_twice_warning_events fails for
10749 ;; no apparent reason. Needs more investigation!
10750 "test__monkey.py"
10751 ;; These tests rely on KeyboardInterrupts which do not
10752 ;; work inside the build container for some reason
10753 ;; (lack of controlling terminal?).
10754 "test_subprocess.py"
10755 "test__issues461_471.py"
10756 ;; TODO: Patch out the tests that use getprotobyname, etc
10757 ;; instead of disabling all the tests from these files.
10758 "test__all__.py"
10759 "test___config.py"
10760 "test__execmodules.py")))
10761 (call-with-output-file "skipped_tests.txt"
10762 (lambda (port)
10763 (display (string-join disabled-tests "\n") port)))
10764 #t)))
44d10b1f
RW
10765 (replace 'check
10766 (lambda _
10767 ;; Make sure the build directory is on PYTHONPATH.
10768 (setenv "PYTHONPATH"
10769 (string-append
10770 (getenv "PYTHONPATH") ":"
10771 (getcwd) "/build/"
10772 (car (scandir "build" (cut string-prefix? "lib." <>)))))
f11b5556
MB
10773
10774 ;; Use the build daemons configured number of workers.
10775 (setenv "NWORKERS" (number->string (parallel-job-count)))
10776
10777 (invoke "python" "-m" "gevent.tests" "--config"
10778 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
44d10b1f
RW
10779 (propagated-inputs
10780 `(("python-greenlet" ,python-greenlet)
10781 ("python-objgraph" ,python-objgraph)))
10782 (native-inputs
f11b5556
MB
10783 `(("python-six" ,python-six)
10784
10785 ;; For tests.
10786 ("python-dnspython" ,python-dnspython)
10787 ("python-psutil" ,python-psutil)
10788 ("python-zope.event" ,python-zope-event)
10789 ("python-zope.interface" ,python-zope-interface)))
44d10b1f
RW
10790 (inputs
10791 `(("c-ares" ,c-ares)
10792 ("libev" ,libev)))
10793 (home-page "http://www.gevent.org/")
10794 (synopsis "Coroutine-based network library")
10795 (description
10796 "gevent is a coroutine-based Python networking library that uses greenlet
10797to provide a high-level synchronous API on top of the libev event loop.")
10798 (license license:expat)
10799 (properties `((python2-variant . ,(delay python2-gevent))))))
10800
10801(define-public python2-gevent
10802 (let ((base (package-with-python2
10803 (strip-python2-variant python-gevent))))
10804 (package
10805 (inherit base)
f11b5556 10806 (native-inputs `(,@(package-native-inputs base)
44d10b1f
RW
10807 ("python-mock" ,python2-mock))))))
10808
10809(define-public python-fastimport
10810 (package
10811 (name "python-fastimport")
10812 (version "0.9.6")
10813 (source
10814 (origin
10815 (method url-fetch)
10816 (uri (pypi-uri "fastimport" version))
10817 (sha256
10818 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10819 (build-system python-build-system)
10820 (home-page "https://github.com/jelmer/python-fastimport")
10821 (synopsis "VCS fastimport parser and generator in Python")
10822 (description "This package provides a parser for and generator of the Git
10823@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10824format.")
10825 (license license:gpl2+)))
10826
10827(define-public python2-fastimport
10828 (package-with-python2 python-fastimport))
10829
10830(define-public python-twisted
10831 (package
10832 (name "python-twisted")
fdfad2fc 10833 (version "19.7.0")
44d10b1f
RW
10834 (source (origin
10835 (method url-fetch)
10836 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10837 (sha256
10838 (base32
fdfad2fc 10839 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10840 (build-system python-build-system)
10841 (arguments
0107c9b8 10842 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10843 (propagated-inputs
10844 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10845 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10846 ("python-incremental" ,python-incremental)
e5ba2fe3 10847 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10848 ("python-constantly" ,python-constantly)
10849 ("python-automat" ,python-automat)))
10850 (home-page "https://twistedmatrix.com/")
10851 (synopsis "Asynchronous networking framework written in Python")
10852 (description
10853 "Twisted is an extensible framework for Python programming, with special
10854focus on event-based network programming and multiprotocol integration.")
10855 (license license:expat)))
10856
10857(define-public python2-twisted
10858 (package-with-python2 python-twisted))
10859
10860(define-public python-pika
10861 (package
10862 (name "python-pika")
10863 (version "0.12.0")
10864 (source
10865 (origin
10866 (method url-fetch)
10867 (uri (pypi-uri "pika" version))
10868 (sha256
10869 (base32
10870 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10871 (build-system python-build-system)
10872 (native-inputs
10873 `(("python-pyev" ,python-pyev)
10874 ("python-tornado" ,python-tornado)
10875 ("python-twisted" ,python-twisted)))
10876 (home-page "https://pika.readthedocs.org")
10877 (synopsis "Pure Python AMQP Client Library")
10878 (description
10879 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10880Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10881network support library.")
10882 (license license:bsd-3)))
10883
10884(define-public python2-pika
10885 (package-with-python2 python-pika))
10886
10887(define-public python-ply
10888 (package
10889 (name "python-ply")
10890 (version "3.10")
10891 (source
10892 (origin
10893 (method url-fetch)
10894 (uri (pypi-uri "ply" version))
10895 (sha256
10896 (base32
10897 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10898 (build-system python-build-system)
10899 (home-page "http://www.dabeaz.com/ply/")
10900 (synopsis "Python Lex & Yacc")
10901 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10902It uses LR parsing and does extensive error checking.")
10903 (license license:bsd-3)))
10904
10905(define-public python2-ply
10906 (package-with-python2 python-ply))
10907
10908(define-public python-tabulate
10909 (package
10910 (name "python-tabulate")
10911 (version "0.7.7")
10912 (source (origin
10913 (method url-fetch)
10914 (uri (pypi-uri "tabulate" version))
10915 (sha256
10916 (base32
10917 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10918 (build-system python-build-system)
10919 (arguments
10920 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10921 ;; and the latest release is not tagged in the upstream repository.
10922 '(#:tests? #f))
10923 (home-page "https://bitbucket.org/astanin/python-tabulate")
10924 (synopsis "Pretty-print tabular data")
10925 (description
10926 "Tabulate is a library and command-line utility to pretty-print tabular
10927data in Python.")
10928 (license license:expat)))
10929
10930(define-public python2-tabulate
10931 (package-with-python2 python-tabulate))
10932
10933(define-public python-kazoo
10934 (package
10935 (name "python-kazoo")
10936 (version "2.4.0")
10937 (source
10938 (origin
10939 (method url-fetch)
10940 (uri (pypi-uri "kazoo" version))
10941 (sha256
10942 (base32
10943 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10944 (build-system python-build-system)
10945 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10946 (propagated-inputs
10947 `(("python-six" ,python-six)))
10948 (home-page "https://kazoo.readthedocs.org")
10949 (synopsis "High-level Zookeeper client library")
10950 (description
10951 "Kazoo is a Python client library for the Apache Zookeeper distributed
10952application service. It is designed to be easy to use and to avoid common
10953programming errors.")
10954 (license license:asl2.0)))
10955
10956(define-public python2-kazoo
10957 (package-with-python2 python-kazoo))
10958
10959(define-public python-pykafka
10960 (package
10961 (name "python-pykafka")
10962 (version "2.4.0")
10963 (source (origin
10964 (method url-fetch)
0ca1d040 10965 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10966 (sha256
10967 (base32
10968 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10969 (build-system python-build-system)
10970 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10971 (propagated-inputs
10972 `(("python-gevent" ,python-gevent)
10973 ("python-kazoo" ,python-kazoo)
10974 ("python-tabulate" ,python-tabulate)))
10975 (inputs
10976 `(("librdkafka" ,librdkafka)))
10977 (home-page "https://pykafka.readthedocs.io/")
10978 (synopsis "Apache Kafka client for Python")
10979 (description
10980 "PyKafka is a client for the Apache Kafka distributed messaging system.
10981It includes Python implementations of Kafka producers and consumers, which
10982are optionally backed by a C extension built on librdkafka.")
10983 (license license:asl2.0)))
10984
10985(define-public python2-pykafka
10986 (package-with-python2 python-pykafka))
10987
10988(define-public python-wcwidth
28ac442b
MB
10989 (package
10990 (name "python-wcwidth")
574a71a7 10991 (version "0.1.8")
28ac442b
MB
10992 (source (origin
10993 (method url-fetch)
10994 (uri (pypi-uri "wcwidth" version))
10995 (sha256
10996 (base32
574a71a7 10997 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
28ac442b
MB
10998 (build-system python-build-system)
10999 (home-page "https://github.com/jquast/wcwidth")
11000 (synopsis "Measure number of terminal column cells of wide-character codes")
11001 (description "Wcwidth measures the number of terminal column cells of
44d10b1f
RW
11002wide-character codes. It is useful for those implementing a terminal emulator,
11003or programs that carefully produce output to be interpreted by one. It is a
11004Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11005specified in POSIX.1-2001 and POSIX.1-2008.")
28ac442b 11006 (license license:expat)))
44d10b1f
RW
11007
11008(define-public python2-wcwidth
11009 (package-with-python2 python-wcwidth))
11010
11011(define-public python2-jsonrpclib
11012 (package
11013 (name "python2-jsonrpclib")
11014 (version "0.1.7")
11015 (source (origin
11016 (method url-fetch)
6571bba0 11017 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
11018 (sha256
11019 (base32
11020 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11021 (build-system python-build-system)
11022 (arguments
11023 `(#:tests? #f
11024 #:python ,python-2))
11025 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11026 (synopsis "Implementation of JSON-RPC specification for Python")
11027 (description
11028 "This library is an implementation of the JSON-RPC specification.
11029It supports both the original 1.0 specification, as well as the
11030new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11031etc.")
11032 (license license:asl2.0)))
11033
11034(define-public python-chai
11035 (package
11036 (name "python-chai")
11037 (version "1.1.2")
11038 (source (origin
11039 (method url-fetch)
11040 (uri (pypi-uri "chai" version))
11041 (sha256
11042 (base32
11043 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
11044 (build-system python-build-system)
11045 (home-page "https://github.com/agoragames/chai")
11046 (synopsis "Mocking framework for Python")
11047 (description
11048 "Chai provides an api for mocking, stubbing and spying your python
11049objects, patterned after the Mocha library for Ruby.")
11050 (license license:bsd-3)))
11051
11052(define-public python2-chai
11053 (package-with-python2 python-chai))
11054
11055(define-public python-inflection
11056 (package
11057 (name "python-inflection")
11058 (version "0.3.1")
11059 (source
11060 (origin (method url-fetch)
11061 (uri (pypi-uri "inflection" version))
11062 (sha256
11063 (base32
11064 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11065 (build-system python-build-system)
11066 (native-inputs
11067 `(("python-pytest" ,python-pytest)))
11068 (home-page "https://github.com/jpvanhal/inflection")
11069 (synopsis "Python string transformation library")
11070 (description
11071 "Inflection is a string transformation library. It singularizes
11072and pluralizes English words, and transforms strings from CamelCase to
11073underscored string.")
11074 (license license:expat)))
11075
11076(define-public python2-inflection
11077 (package-with-python2 python-inflection))
11078
11079(define-public python-pylev
11080 (package
11081 (name "python-pylev")
11082 (version "1.3.0")
11083 (source (origin
11084 (method url-fetch)
11085 (uri (pypi-uri "pylev" version))
11086 (sha256
11087 (base32
11088 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11089 (build-system python-build-system)
11090 (home-page "https://github.com/toastdriven/pylev")
11091 (synopsis "Levenshtein distance implementation in Python")
11092 (description "Pure Python Levenshtein implementation, based off the
11093Wikipedia code samples at
11094@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11095 (license license:bsd-3)))
11096
11097(define-public python2-pylev
11098 (package-with-python2 python-pylev))
11099
11100(define-public python-cleo
11101 (package
11102 (name "python-cleo")
0c101a04 11103 (version "0.7.6")
44d10b1f
RW
11104 (source (origin
11105 (method url-fetch)
11106 (uri (pypi-uri "cleo" version))
11107 (sha256
11108 (base32
0c101a04 11109 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
44d10b1f
RW
11110 (build-system python-build-system)
11111 (native-inputs
af2d3713 11112 `( ;; For testing
44d10b1f
RW
11113 ("python-mock" ,python-mock)
11114 ("python-pytest-mock" ,python-pytest-mock)
11115 ("python-pytest" ,python-pytest)))
11116 (propagated-inputs
11117 `(("python-backpack" ,python-backpack)
0c101a04 11118 ("python-clikit" ,python-clikit)
44d10b1f
RW
11119 ("python-pastel" ,python-pastel)
11120 ("python-pylev" ,python-pylev)))
11121 (home-page "https://github.com/sdispater/cleo")
11122 (synopsis "Command-line arguments library for Python")
11123 (description
11124 "Cleo allows you to create command-line commands with signature in
11125docstring and colored output.")
11126 (license license:expat)))
11127
11128(define-public python2-cleo
11129 (package-with-python2 python-cleo))
11130
2be85c45
TLC
11131(define-public python-tomlkit
11132 (package
11133 (name "python-tomlkit")
f4b6ce21 11134 (version "0.5.11")
2be85c45
TLC
11135 (source
11136 (origin
11137 (method url-fetch)
11138 (uri (pypi-uri "tomlkit" version))
11139 (sha256
f4b6ce21 11140 (base32 "1kq1663iqxgwrmb883n55ypi5axnixla2hrby9g2x227asifsi7h"))))
2be85c45
TLC
11141 (build-system python-build-system)
11142 (native-inputs
11143 `(("python-pytest" ,python-pytest)))
2d3da186
TGR
11144 (home-page "https://github.com/sdispater/tomlkit")
11145 (synopsis "Style-preserving TOML library")
2be85c45
TLC
11146 (description
11147 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
11148preserves all comments, indentations, whitespace and internal element ordering,
11149and makes them accessible and editable via an intuitive API. It can also
11150create new TOML documents from scratch using the provided helpers. Part of the
2d3da186 11151implementation has been adapted, improved, and fixed from Molten.")
2be85c45
TLC
11152 (license license:expat)))
11153
0bb32201
TLC
11154(define-public python-shellingham
11155 (package
11156 (name "python-shellingham")
11157 (version "1.3.1")
11158 (source
11159 (origin
11160 (method url-fetch)
11161 (uri (pypi-uri "shellingham" version))
11162 (sha256
11163 (base32
11164 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
11165 (build-system python-build-system)
11166 (home-page
11167 "https://github.com/sarugaku/shellingham")
11168 (synopsis "Tool to detect surrounding shell")
11169 (description
11170 "Shellingham detects what shell the current Python executable is
11171running in.")
11172 (license license:isc)))
11173
aee92957
TLC
11174(define-public python-memcached
11175 (package
11176 (name "python-memcached")
11177 (version "1.59")
11178 (source
11179 (origin
11180 (method url-fetch)
11181 (uri (pypi-uri "python-memcached" version))
11182 (sha256
11183 (base32
11184 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
11185 (build-system python-build-system)
11186 (propagated-inputs `(("python-six" ,python-six)))
11187 (home-page
11188 "https://github.com/linsomniac/python-memcached")
11189 (synopsis "Pure python memcached client")
11190 (description
11191 "This software is a pure Python interface to the memcached memory cache
11192daemon. It is the client side software which allows storing values in one or
11193more, possibly remote, memcached servers.")
11194 (license license:psfl)))
11195
b2ac2508
TLC
11196(define-public python-clikit
11197 (package
11198 (name "python-clikit")
eac978ee 11199 (version "0.4.2")
b2ac2508
TLC
11200 (source
11201 (origin
11202 (method url-fetch)
11203 (uri (pypi-uri "clikit" version))
11204 (sha256
11205 (base32
eac978ee 11206 "1jnnr21hvzx4i29nbph1z96ympv0njiwyvngjq48w1q05133cwzn"))))
b2ac2508
TLC
11207 (build-system python-build-system)
11208 (propagated-inputs
11209 `(("python-pastel" ,python-pastel)
11210 ("python-pylev" ,python-pylev)))
11211 (home-page "https://github.com/sdispater/clikit")
11212 (synopsis "Group of utilities to build command line interfaces")
11213 (description
11214 "CliKit is a group of utilities to build testable command line
11215interfaces.")
0266a6a2 11216 (properties `((python2-variant . ,(delay python2-clikit))))
b2ac2508
TLC
11217 (license license:expat)))
11218
0266a6a2
MB
11219(define-public python2-clikit
11220 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
11221 (package/inherit
11222 base
11223 (propagated-inputs
11224 `(("python-enum34" ,python2-enum34)
11225 ("python-typing" ,python2-typing)
11226 ,@(package-propagated-inputs base))))))
11227
c6f008d6
TLC
11228(define-public python-msgpack-python
11229 (package
11230 (name "python-msgpack-python")
11231 (version "0.5.6")
11232 (source
11233 (origin
11234 (method url-fetch)
11235 (uri (pypi-uri "msgpack-python" version))
11236 (sha256
11237 (base32
11238 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
11239 (build-system python-build-system)
11240 (home-page "http://msgpack.org/")
11241 (synopsis "Package to deserialize messages in MessagePack binary format")
11242 (description
11243 "MessagePack is an efficient binary serialization format. It lets you
11244exchange data among multiple languages like JSON. But it's faster and
11245smaller. Small integers are encoded into a single byte, and typical short
11246strings require only one extra byte in addition to the strings themselves.")
11247 (license license:asl2.0)))
11248
badc1c63
TLC
11249(define-public python-cachy
11250 (package
11251 (name "python-cachy")
c2981188 11252 (version "0.3.0")
badc1c63
TLC
11253 (source
11254 (origin
11255 (method url-fetch)
11256 (uri (pypi-uri "cachy" version))
11257 (sha256
11258 (base32
c2981188 11259 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
badc1c63 11260 (build-system python-build-system)
c2981188
TLC
11261 (arguments
11262 '(#:phases
11263 (modify-phases %standard-phases
11264 (replace 'check
11265 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
11266 "pytest"))))))
badc1c63 11267 (native-inputs
c2981188
TLC
11268 `(("memcached" ,memcached)
11269 ("python-fakeredis" ,python-fakeredis)
badc1c63 11270 ("python-flexmock" ,python-flexmock)
c2981188 11271 ("python-pifpaf" ,python-pifpaf)
badc1c63
TLC
11272 ("python-pytest" ,python-pytest)))
11273 (propagated-inputs
11274 `(("python-memcached" ,python-memcached)
11275 ("python-msgpack-python" ,python-msgpack-python)
11276 ("python-redis" ,python-redis)))
11277 (home-page "https://github.com/sdispater/cachy")
11278 (synopsis "Simple yet effective caching library")
11279 (description
11280 "Cachy provides a simple yet effective caching library. A simple but
11281powerful API: thread-safety; decorator syntax; support for memcached, redis,
11282database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
11283 (license license:expat)))
11284
617bb67b
TLC
11285(define-public poetry
11286 (package
11287 (name "poetry")
97b1366d
TLC
11288 (version "1.0.5")
11289 ;; Poetry can only be built from source with Poetry.
617bb67b
TLC
11290 (source
11291 (origin
11292 (method url-fetch)
11293 (uri (pypi-uri "poetry" version))
11294 (sha256
11295 (base32
97b1366d 11296 "02h387k0xssvv78yy82pcpknpq4w5ym2in1zl8cg9r5wljl5w6cf"))))
617bb67b
TLC
11297 (build-system python-build-system)
11298 (arguments
11299 `(#:tests? #f ;; Pypi does not have tests.
11300 #:phases
11301 (modify-phases %standard-phases
97b1366d 11302 (add-before 'build 'patch-setup-py
617bb67b 11303 (lambda _
97b1366d
TLC
11304 (substitute* "setup.py"
11305 ;; poetry won't update version as 21.0.0 relies on python > 3.6
11306 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
11307 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.16.0")
11308 (("importlib-metadata>=1.1.3,<1.2.0") "importlib-metadata>=1.1.3,<1.5.0"))
617bb67b
TLC
11309 #t)))))
11310 (propagated-inputs
11311 `(("python-cachecontrol" ,python-cachecontrol)
11312 ("python-cachy" ,python-cachy)
11313 ("python-cleo" ,python-cleo)
97b1366d 11314 ("python-clikit" ,python-clikit)
617bb67b 11315 ("python-html5lib" ,python-html5lib)
97b1366d 11316 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
617bb67b 11317 ("python-jsonschema" ,python-jsonschema)
97b1366d
TLC
11318 ("python-keyring" ,python-keyring)
11319 ("python-pexpect" ,python-pexpect)
617bb67b
TLC
11320 ("python-pkginfo" ,python-pkginfo)
11321 ("python-pyparsing" ,python-pyparsing)
11322 ("python-pyrsistent" ,python-pyrsistent)
11323 ("python-requests" ,python-requests)
11324 ("python-requests-toolbelt" ,python-requests-toolbelt)
11325 ("python-shellingham" ,python-shellingham)
11326 ("python-tomlkit" ,python-tomlkit)
11327 ("python-virtualenv" ,python-virtualenv)))
97b1366d 11328 (home-page "https://python-poetry.org")
617bb67b
TLC
11329 (synopsis "Python dependency management and packaging made easy")
11330 (description "Poetry is a tool for dependency management and packaging
11331in Python. It allows you to declare the libraries your project depends on and
11332it will manage (install/update) them for you.")
11333 (license license:expat)))
11334
44d10b1f
RW
11335(define-public python-lazy-object-proxy
11336 (package
11337 (name "python-lazy-object-proxy")
7454078a 11338 (version "1.4.3")
44d10b1f
RW
11339 (source (origin
11340 (method url-fetch)
11341 (uri (pypi-uri "lazy-object-proxy" version))
11342 (sha256
11343 (base32
7454078a 11344 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
11345 (native-inputs
11346 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
11347 (build-system python-build-system)
11348 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11349 (synopsis "Lazy object proxy for python")
11350 (description
11351 "Lazy object proxy is an object that wraps a callable but defers the call
11352until the object is actually required, and caches the result of said call.")
11353 (license license:bsd-2)))
11354
11355(define-public python2-lazy-object-proxy
11356 (package-with-python2 python-lazy-object-proxy))
11357
11358(define-public python-dnspython
11359 (package
11360 (name "python-dnspython")
11361 (version "1.15.0")
11362 (source (origin
11363 (method url-fetch)
11364 (uri (string-append "http://www.dnspython.org/kits/"
11365 version "/dnspython-" version ".tar.gz"))
11366 (sha256
11367 (base32
11368 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11369 (build-system python-build-system)
11370 (arguments '(#:tests? #f)) ; XXX: requires internet access
11371 (home-page "http://www.dnspython.org")
11372 (synopsis "DNS toolkit for Python")
11373 (description
11374 "dnspython is a DNS toolkit for Python. It supports almost all record
11375types. It can be used for queries, zone transfers, and dynamic updates.
11376It supports TSIG authenticated messages and EDNS0.")
11377 (license license:expat)))
11378
11379(define-public python2-dnspython
11380 (package-with-python2 python-dnspython))
11381
11382(define-public python-email-validator
11383 (package
11384 (name "python-email-validator")
11385 (version "1.0.2")
11386 (source
11387 (origin (method url-fetch)
11388 (uri (pypi-uri "email_validator" version))
11389 (sha256
11390 (base32
11391 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11392 (build-system python-build-system)
11393 (arguments
11394 '(#:phases
11395 (modify-phases %standard-phases
11396 (add-before 'build 'use-dnspython
11397 (lambda _
11398 (substitute* "setup.py"
11399 (("dnspython3") "dnspython"))
11400 #t)))))
11401 (propagated-inputs
11402 `(("python-dnspython" ,python-dnspython)
11403 ("python-idna" ,python-idna)))
11404 (home-page "https://github.com/JoshData/python-email-validator")
11405 (synopsis "Email address validation library for Python")
11406 (description
11407 "This library validates email address syntax and deliverability.")
11408 (license license:cc0)))
11409
11410(define-public python2-email-validator
11411 (package-with-python2 python-email-validator))
11412
11413(define-public python-ukpostcodeparser
11414 (package
11415 (name "python-ukpostcodeparser")
11416 (version "1.0.3")
11417 (source (origin
11418 (method url-fetch)
11419 (uri (pypi-uri "UkPostcodeParser" version))
11420 (sha256
11421 (base32
11422 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11423 (build-system python-build-system)
11424 (home-page "https://github.com/hamstah/ukpostcodeparser")
11425 (synopsis "UK Postcode parser for Python")
11426 (description
11427 "This library provides the @code{parse_uk_postcode} function for
11428parsing UK postcodes.")
11429 (license license:expat)))
11430
11431(define-public python2-ukpostcodeparser
11432 (package-with-python2 python-ukpostcodeparser))
11433
11434(define-public python-faker
11435 (package
11436 (name "python-faker")
a6a73369 11437 (version "4.0.2")
44d10b1f
RW
11438 (source (origin
11439 (method url-fetch)
11440 (uri (pypi-uri "Faker" version))
11441 (sha256
11442 (base32
a6a73369 11443 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
44d10b1f
RW
11444 (build-system python-build-system)
11445 (arguments
11446 '(#:phases
11447 (modify-phases %standard-phases
11448 (replace 'check
a6a73369 11449 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
44d10b1f
RW
11450 (native-inputs
11451 `(;; For testing
a6a73369
MB
11452 ("python-freezegun" ,python-freezegun)
11453 ("python-pytest" ,python-pytest)
11454 ("python-random2" ,python-random2)
11455 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
11456 ("python-validators" ,python-validators)))
44d10b1f
RW
11457 (propagated-inputs
11458 `(("python-dateutil" ,python-dateutil)
a6a73369 11459 ("python-text-unidecode" ,python-text-unidecode)))
44d10b1f
RW
11460 (home-page "https://github.com/joke2k/faker")
11461 (synopsis "Python package that generates fake data")
11462 (description
11463 "Faker is a Python package that generates fake data such as names,
11464addresses, and phone numbers.")
11465 (license license:expat)
11466 (properties `((python2-variant . ,(delay python2-faker))))))
11467
a6a73369 11468;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
44d10b1f
RW
11469(define-public python2-faker
11470 (let ((base (package-with-python2 (strip-python2-variant
11471 python-faker))))
11472 (package
11473 (inherit base)
a6a73369
MB
11474 (version "3.0.1")
11475 (source (origin
11476 (method url-fetch)
11477 (uri (pypi-uri "Faker" version))
11478 (sha256
11479 (base32
11480 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
11481 (native-inputs
11482 `(("python-mock" ,python2-mock)
11483 ,@(package-native-inputs base)))
44d10b1f
RW
11484 (propagated-inputs
11485 `(("python2-ipaddress" ,python2-ipaddress)
85bad77f 11486 ("python2-six" ,python2-six)
44d10b1f
RW
11487 ,@(package-propagated-inputs base))))))
11488
11489(define-public python-pyaml
11490 (package
11491 (name "python-pyaml")
11492 (version "18.11.0")
11493 (source (origin
11494 (method url-fetch)
11495 (uri (pypi-uri "pyaml" version))
11496 (sha256
11497 (base32
11498 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
11499 (build-system python-build-system)
11500 (native-inputs
11501 `(("python-unidecode" ,python-unidecode)))
11502 (propagated-inputs
11503 `(("python-pyyaml" ,python-pyyaml)))
11504 (home-page "https://github.com/mk-fg/pretty-yaml")
11505 (synopsis "YAML pretty-print library for Python")
11506 (description
11507 "pyaml is a PyYAML based python module to produce pretty and readable
11508YAML-serialized data.")
492e3a7a 11509 (license license:wtfpl2)))
44d10b1f
RW
11510
11511(define-public python2-pyaml
11512 (package-with-python2 python-pyaml))
11513
11514(define-public python-backpack
11515 (package
11516 (name "python-backpack")
11517 (version "0.1")
11518 (source
11519 (origin
11520 (method url-fetch)
11521 (uri (pypi-uri "backpack" version))
11522 (sha256
11523 (base32
11524 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
11525 (build-system python-build-system)
11526 (native-inputs
11527 `(("python-pytest" ,python-pytest)
11528 ("python-nose" ,python-nose)))
11529 (propagated-inputs
11530 `(("python-simplejson" ,python-simplejson)))
11531 (home-page "https://github.com/sdispater/backpack")
11532 (synopsis "Utilities for working with Python collections")
11533 (description "Backpack provides some useful utilities for working with
11534collections of data.")
11535 (license license:expat)))
11536
11537(define-public python2-backpack
11538 (package-with-python2 python-backpack))
11539
11540(define-public python-prompt-toolkit
11541 (package
11542 (name "python-prompt-toolkit")
11543 (version "2.0.7")
11544 (source
11545 (origin
11546 (method url-fetch)
11547 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11548 (sha256
11549 (base32
11550 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
11551 (build-system python-build-system)
11552 (arguments
11553 `(#:phases
11554 (modify-phases %standard-phases
11555 (delete 'check)
11556 (add-after 'install 'post-install-check
11557 (lambda* (#:key inputs outputs #:allow-other-keys)
11558 ;; HOME is needed for the test
11559 ;; "test_pathcompleter_can_expanduser".
11560 (setenv "HOME" "/tmp")
11561 (add-installed-pythonpath inputs outputs)
11562 (invoke "py.test"))))))
11563 (propagated-inputs
11564 `(("python-wcwidth" ,python-wcwidth)
11565 ("python-six" ,python-six)
11566 ("python-pygments" ,python-pygments)))
11567 (native-inputs
11568 `(("python-pytest" ,python-pytest)))
11569 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11570 (synopsis "Library for building command line interfaces in Python")
11571 (description
11572 "Prompt-Toolkit is a library for building interactive command line
11573interfaces in Python. It's like GNU Readline but it also features syntax
11574highlighting while typing, out-of-the-box multi-line input editing, advanced
11575code completion, incremental search, support for Chinese double-width
11576characters, mouse support, and auto suggestions.")
11577 (license license:bsd-3)))
11578
11579(define-public python2-prompt-toolkit
11580 (package-with-python2 python-prompt-toolkit))
11581
11582(define-public python-prompt-toolkit-1
11583 (package (inherit python-prompt-toolkit)
11584 (version "1.0.15")
11585 (source
11586 (origin
11587 (method url-fetch)
11588 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11589 (sha256
11590 (base32
11591 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
11592
11593(define-public python2-prompt-toolkit-1
11594 (package-with-python2 python-prompt-toolkit-1))
11595
11596(define-public python-jedi
11597 (package
11598 (name "python-jedi")
745041b5 11599 (version "0.16.0")
44d10b1f
RW
11600 (source
11601 (origin
11602 (method url-fetch)
11603 (uri (pypi-uri "jedi" version))
745041b5 11604 (patches (search-patches "python-jedi-deleted-variables.patch"))
44d10b1f
RW
11605 (sha256
11606 (base32
745041b5 11607 "1mb5kmrk9bkc3kwzx02j62cdan1jqd92q1z7h7wi9d30jg5p3j6m"))))
44d10b1f
RW
11608 (build-system python-build-system)
11609 (arguments
296e1aea 11610 `(#:phases
44d10b1f
RW
11611 (modify-phases %standard-phases
11612 (replace 'check
296e1aea
MC
11613 (lambda _
11614 (setenv "HOME" "/tmp")
11615 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
11616 (native-inputs
11617 `(("python-pytest" ,python-pytest)
11618 ("python-docopt" ,python-docopt)))
11619 (propagated-inputs
11620 `(("python-parso" ,python-parso)))
11621 (home-page "https://github.com/davidhalter/jedi")
11622 (synopsis "Autocompletion and static analysis library for Python")
11623 (description
11624 "Jedi is a static analysis tool for Python that can be used in Integrated
11625Development Environments (@dfn{IDE}s) and text editors. It understands Python
11626on a deeper level than many other static analysis frameworks for Python.
11627
11628Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11629well.")
11630 (license license:expat)))
11631
11632(define-public python2-jedi
296e1aea 11633 (package-with-python2 python-jedi))
44d10b1f 11634
dcff9bda
MB
11635;; python-language-server requires 0.15 specifically. Remove once unused.
11636(define-public python-jedi-0.15
11637 (package
11638 (inherit python-jedi)
11639 (version "0.15.2")
11640 (source (origin
11641 (method url-fetch)
11642 (uri (pypi-uri "jedi" version))
11643 (sha256
11644 (base32
11645 "01zqasl690x1i6dq4mvh13pz0cw8i276xsivsrnn00x90iqm42g9"))))
11646 (propagated-inputs
11647 `(("python-parso" ,python-parso-0.5)))))
11648
44d10b1f
RW
11649(define-public ptpython
11650 (package
11651 (name "ptpython")
11652 (version "0.34")
11653 (source (origin
11654 (method url-fetch)
11655 (uri (pypi-uri "ptpython" version))
11656 (sha256
11657 (base32
11658 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11659 (build-system python-build-system)
11660 (arguments
11661 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11662 (propagated-inputs
11663 `(("python-docopt" ,python-docopt)
11664 ("python-jedi" ,python-jedi)
11665 ("python-prompt-toolkit" ,python-prompt-toolkit)
11666 ("python-pygments" ,python-pygments)))
11667 (home-page "https://github.com/jonathanslenders/ptpython")
11668 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11669 (description
11670 "ptpython is a Python read-eval-print loop with IDE-like features.
11671It supports syntax highlighting, multiline editing, autocompletion, mouse,
11672color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11673etc.")
11674 (license license:bsd-3)
11675 (properties `((python2-variant . ,(delay ptpython-2))))))
11676
11677(define-public ptpython-2
11678 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11679 (package
11680 (inherit base)
11681 (name "ptpython2"))))
11682
11683(define-public python-stem
11684 (package
11685 (name "python-stem")
a1dc5898 11686 (version "1.8.0")
44d10b1f
RW
11687 (source
11688 (origin
11689 (method url-fetch)
11690 (uri (pypi-uri "stem" version))
11691 (sha256
11692 (base32
a1dc5898 11693 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
44d10b1f
RW
11694 (build-system python-build-system)
11695 (arguments
11696 `(#:phases
11697 (modify-phases %standard-phases
11698 (replace 'check
11699 (lambda _
11700 (invoke "./run_tests.py" "--unit")
11701 #t)))))
11702 (native-inputs
11703 `(("python-mock" ,python-mock)
11704 ("python-pycodestyle" ,python-pycodestyle)
11705 ("python-pyflakes" ,python-pyflakes)))
11706 (home-page "https://stem.torproject.org/")
11707 (synopsis
11708 "Python controller library that allows applications to interact with Tor")
11709 (description
11710 "Stem is a Python controller library for Tor. With it you can use Tor's
11711control protocol to script against the Tor process and read descriptor data
11712relays publish about themselves.")
11713 (license license:lgpl3)))
11714
11715(define-public python2-stem
11716 (package-with-python2 python-stem))
11717
11718(define-public python-pyserial
11719 (package
11720 (name "python-pyserial")
00d81f98 11721 (version "3.4")
44d10b1f
RW
11722 (source
11723 (origin
11724 (method url-fetch)
11725 (uri (pypi-uri "pyserial" version))
11726 (sha256
11727 (base32
00d81f98 11728 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
44d10b1f
RW
11729 (build-system python-build-system)
11730 (arguments
11731 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11732 ;; #:phases
11733 ;; (modify-phases %standard-phases
11734 ;; (replace 'check
11735 ;; (lambda _
11736 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11737 (home-page
11738 "https://github.com/pyserial/pyserial")
11739 (synopsis "Python Serial Port Bindings")
11740 (description "@code{pyserial} provide serial port bindings for Python. It
11741supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11742and/or Xon/Xoff. The port is accessed in RAW mode.")
11743 (license license:bsd-3)))
11744
11745(define-public python2-pyserial
11746 (package-with-python2 python-pyserial))
11747
11748(define-public python-kivy
11749 (package
11750 (name "python-kivy")
11751 (version "1.10.1")
11752 (source
11753 (origin
11754 (method url-fetch)
11755 (uri (pypi-uri "Kivy" version))
11756 (file-name (string-append name "-" version ".tar.gz"))
11757 (sha256
11758 (base32
11759 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11760 (build-system python-build-system)
11761 (arguments
11762 `(#:tests? #f ; Tests require many optional packages
11763 #:phases
11764 (modify-phases %standard-phases
11765 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11766 (lambda* (#:key inputs #:allow-other-keys)
11767 (setenv "KIVY_SDL2_PATH"
11768 (string-append (assoc-ref inputs "sdl-union")
11769 "/include/SDL2"))
11770 #t)))))
11771 (native-inputs
aa0e4413 11772 `(("pkg-config" ,pkg-config)
44d10b1f
RW
11773 ("python-cython" ,python-cython)))
11774 (inputs
11775 `(("gstreamer" ,gstreamer)
11776 ("mesa" ,mesa)
11777 ("sdl-union"
11778 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
3d2d9cc7 11779 (home-page "https://kivy.org")
44d10b1f
RW
11780 (synopsis
11781 "Multitouch application framework")
11782 (description
11783 "A software library for rapid development of
11784hardware-accelerated multitouch applications.")
11785 (license license:expat)))
11786
11787(define-public python2-kivy
11788 (package-with-python2 python-kivy))
11789
44d10b1f
RW
11790(define-public python-binaryornot
11791 (package
11792 (name "python-binaryornot")
11793 (version "0.4.4")
11794 (source (origin
11795 (method url-fetch)
11796 (uri (pypi-uri "binaryornot" version))
11797 (sha256
11798 (base32
11799 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11800 (build-system python-build-system)
86723f98
DM
11801 (arguments
11802 `(#:phases
11803 (modify-phases %standard-phases
ee623903 11804 (add-after 'unpack 'patch-tests
86723f98
DM
11805 (lambda _
11806 ;; TypeError: binary() got an unexpected keyword argument
11807 ;; 'average_size'.
11808 (substitute* "tests/test_check.py"
11809 (("average_size=512") ""))
11810 #t)))))
44d10b1f
RW
11811 (propagated-inputs
11812 `(("python-chardet" ,python-chardet)
11813 ("python-hypothesis" ,python-hypothesis)))
11814 (home-page "https://github.com/audreyr/binaryornot")
11815 (synopsis "Package to check if a file is binary or text")
11816 (description "Ultra-lightweight pure Python package to check if a file is
11817binary or text.")
11818 (license license:bsd-3)
11819 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11820
11821(define-public python2-binaryornot
11822 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11823 (package (inherit base)
11824 (propagated-inputs
11825 `(("python2-enum34" ,python2-enum34)
11826 ,@(package-propagated-inputs base))))))
11827
f315673d 11828(define-public python-binwalk
9b9ab657
JK
11829 (package
11830 (name "python-binwalk")
11831 (version "2.2.0")
11832 (source
11833 (origin
11834 (method git-fetch)
11835 (uri (git-reference
11836 (url "https://github.com/ReFirmLabs/binwalk")
11837 (commit (string-append "v" version))))
11838 (file-name (git-file-name name version))
11839 (sha256
11840 (base32
11841 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
11842 (build-system python-build-system)
11843 (arguments
11844 `(#:phases
11845 (modify-phases %standard-phases
11846 (add-before 'check 'set-pythonpath
11847 (lambda _
11848 (setenv "PYTHONPATH"
11849 (string-append
11850 (getcwd) "/src/"
11851 ":" (getenv "PYTHONPATH")))
11852 (setenv "HOME" "")
11853 #t)))))
11854 (native-inputs
11855 `(("python-coverage" ,python-coverage)
11856 ("python-nose" ,python-nose)))
11857 (home-page "https://github.com/ReFirmLabs/binwalk")
11858 (synopsis "Firmware analysis tool")
11859 (description "Binwalk is a tool for analyzing, reverse engineering, and
11860extracting firmware images")
11861 (license license:expat)))
f315673d 11862
44d10b1f
RW
11863(define-public python-nltk
11864 (package
11865 (name "python-nltk")
11866 (version "3.2.1")
11867 (source (origin
11868 (method url-fetch)
11869 (uri (pypi-uri "nltk" version))
11870 (sha256
11871 (base32
11872 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11873 (build-system python-build-system)
11874 (arguments
11875 '(;; The tests require some extra resources to be downloaded.
11876 ;; TODO Try packaging these resources.
11877 #:tests? #f))
11878 (home-page "http://nltk.org/")
11879 (synopsis "Natural Language Toolkit")
11880 (description "It provides interfaces to over 50 corpora and lexical
11881resources such as WordNet, along with a suite of text processing libraries
11882for classification, tokenization, stemming, tagging, parsing, and semantic
11883reasoning, wrappers for natural language processing libraries.")
11884 (license license:asl2.0)))
11885
11886(define-public python2-nltk
11887 (package-with-python2 python-nltk))
11888
11889(define-public python-pymongo
11890 (package
11891 (name "python-pymongo")
11892 (version "3.7.2")
11893 (source (origin
11894 (method url-fetch)
11895 (uri (pypi-uri "pymongo" version))
11896 (sha256
11897 (base32
11898 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11899 (build-system python-build-system)
11900 (propagated-inputs
11901 `(("python-certifi" ,python-certifi)))
11902 (home-page "https://github.com/mongodb/mongo-python-driver")
11903 (synopsis "Python driver for MongoDB")
11904 (description "Python driver for MongoDB.")
11905 (license license:asl2.0)))
11906
11907(define-public python2-pymongo
11908 (package-with-python2 python-pymongo))
11909
44d10b1f
RW
11910(define-public python-consul
11911 (package
11912 (name "python-consul")
11913 (version "0.6.1")
11914 (source
11915 (origin
11916 (method url-fetch)
11917 (uri (pypi-uri "python-consul" version))
11918 (sha256
11919 (base32
11920 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11921 (build-system python-build-system)
11922 (arguments
11923 '(#:tests? #f)) ; The tests are not distributed
11924 (propagated-inputs
11925 `(("python-requests" ,python-requests)
11926 ("python-six" ,python-six)))
11927 (home-page "https://github.com/cablehead/python-consul")
11928 (synopsis "Python client for Consul")
11929 (description
11930 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11931discovery, monitoring and configuration.")
11932 (license license:expat)))
11933
11934(define-public python2-consul
11935 (package-with-python2 python-consul))
11936
11937(define-public python-schematics
11938 (package
11939 (name "python-schematics")
11940 (version "1.1.1")
11941 (source
1961d187
TGR
11942 (origin
11943 (method git-fetch)
11944 (uri (git-reference
11945 (url "https://github.com/schematics/schematics.git")
11946 (commit (string-append "v" version))))
11947 (file-name (git-file-name name version))
11948 (sha256
11949 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11950 (build-system python-build-system)
11951 (propagated-inputs
11952 `(("python-six" ,python-six)))
11953 (arguments
1961d187
TGR
11954 ;; The tests require a bunch of not very nice packages with fixed
11955 ;; version requirements (e.g. python-coveralls).
11956 `(#:tests? #f))
44d10b1f
RW
11957 (home-page "https://github.com/schematics/schematics")
11958 (synopsis "Python Data Structures for Humans")
11959 (description "Python Data Structures for Humans.")
11960 (license license:bsd-3)))
11961
11962(define-public python2-schematics
11963 (package-with-python2 python-schematics))
11964
11965(define-public python-odfpy
11966 (package
11967 (name "python-odfpy")
11968 (version "1.3.3")
11969 (source (origin
11970 (method url-fetch)
11971 (uri (pypi-uri "odfpy" version))
11972 (sha256
11973 (base32
11974 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11975 (arguments
11976 `(#:modules ((srfi srfi-1)
11977 (guix build python-build-system)
11978 (guix build utils))
11979 #:phases
11980 (modify-phases %standard-phases
11981 (replace 'check
11982 ;; The test runner invokes python2 and python3 for test*.py.
11983 ;; To avoid having both in inputs, we replicate it here.
11984 (lambda _
21ccc01d
RW
11985 (for-each (lambda (test-file) (invoke "python" test-file))
11986 (find-files "tests" "^test.*\\.py$"))
11987 #t)))))
44d10b1f
RW
11988 (build-system python-build-system)
11989 (home-page "https://github.com/eea/odfpy")
11990 (synopsis "Python API and tools to manipulate OpenDocument files")
11991 (description "Collection of libraries and utility programs written in
11992Python to manipulate OpenDocument 1.2 files.")
11993 (license
11994 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11995 ;; number of files with other licenses.
11996 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11997
11998(define-public python2-odfpy
11999 (package-with-python2 python-odfpy))
12000
12001(define-public python-natsort
12002 (package
12003 (name "python-natsort")
e3da9b2e 12004 (version "7.0.1")
44d10b1f
RW
12005 (source (origin
12006 (method url-fetch)
12007 (uri (pypi-uri "natsort" version))
12008 (sha256
12009 (base32
e3da9b2e 12010 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
44d10b1f
RW
12011 (build-system python-build-system)
12012 (arguments
12013 `(#:modules ((guix build utils)
12014 (guix build python-build-system)
12015 (srfi srfi-1)
12016 (srfi srfi-26)
12017 (ice-9 ftw))
12018 #:phases
12019 (modify-phases %standard-phases
12020 (add-before 'check 'set-cachedir
12021 ;; Tests require write access to $HOME by default
12022 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
12023 (replace 'check
12024 (lambda _
12025 (let ((cwd (getcwd)))
12026 (setenv "PYTHONPATH"
12027 (string-append
12028 cwd "/build/"
12029 (find (cut string-prefix? "lib" <>)
12030 (scandir (string-append cwd "/build")))
12031 ":"
12032 (getenv "PYTHONPATH")))
12033 (invoke "pytest" "-v")))))))
12034 (native-inputs
12035 `(("python-hypothesis" ,python-hypothesis)
12036 ("python-pytest-cov" ,python-pytest-cov)
12037 ("python-pytest-mock" ,python-pytest-mock)
12038 ("python-pytest" ,python-pytest)))
12039 (propagated-inputs ; TODO: Add python-fastnumbers.
12040 `(("python-pyicu" ,python-pyicu)))
12041 (home-page "https://github.com/SethMMorton/natsort")
12042 (synopsis "Natural sorting for python and shell")
12043 (description
12044 "Natsort lets you apply natural sorting on lists instead of
12045lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
12046on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
12047@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
12048@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
12049identifies numbers and sorts them separately from strings. It can also sort
12050version numbers, real numbers, mixed types and more, and comes with a shell
12051command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
12052 (license license:expat)
12053 (properties `((python2-variant . ,(delay python2-natsort))))))
12054
e3da9b2e 12055;; Natsort 6.x are the last versions with support for Python 2.
44d10b1f
RW
12056(define-public python2-natsort
12057 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12058 (package (inherit base)
e3da9b2e
MB
12059 (version "6.2.1")
12060 (source (origin
12061 (method url-fetch)
12062 (uri (pypi-uri "natsort" version))
12063 (sha256
12064 (base32
12065 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
44d10b1f
RW
12066 (native-inputs
12067 `(("python2-pathlib" ,python2-pathlib)
12068 ,@(package-native-inputs base))))))
12069
58d90274 12070(define-public glances
44d10b1f 12071 (package
58d90274 12072 (name "glances")
b8e777ef 12073 (version "3.1.4")
44d10b1f
RW
12074 (source
12075 (origin
12076 (method url-fetch)
12077 (uri (pypi-uri "Glances" version))
12078 (sha256
b8e777ef 12079 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
15b4c911
TGR
12080 (modules '((guix build utils)))
12081 (snippet
12082 '(begin
12083 ;; Glances phones PyPI for weekly update checks by default.
12084 ;; Disable these. The user can re-enable them if desired.
12085 (substitute* "glances/outdated.py"
12086 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
12087 (string-append indentation
12088 "self.args.disable_check_update = True\n"
12089 line)))
12090 #t))))
44d10b1f
RW
12091 (build-system python-build-system)
12092 (propagated-inputs
9898a2d3
TGR
12093 `(("python-future" ,python-future)
12094 ("python-psutil" ,python-psutil)))
a4ac25df 12095 (home-page "https://github.com/nicolargo/glances")
bab94ffa 12096 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
12097 (description
12098 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
12099Glances uses the PsUtil library to get information from your system. It
12100monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
12101 (license license:lgpl3+)))
12102
58d90274
TGR
12103(define-public python-glances
12104 (deprecated-package "python-glances" glances))
12105
44d10b1f
RW
12106(define-public python-graphql-core
12107 (package
12108 (name "python-graphql-core")
12109 (version "0.5.3")
12110 (source
12111 (origin
12112 (method url-fetch)
12113 (uri (pypi-uri "graphql-core" version))
12114 (sha256
12115 (base32
12116 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12117 (build-system python-build-system)
12118 (arguments
12119 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12120 #:phases
12121 (modify-phases %standard-phases
12122 (add-after 'unpack 'patch-hardcoded-version
12123 (lambda _ (substitute*
12124 "setup.py"
12125 (("'gevent==1.1rc1'") "'gevent'"))
12126 #t)))))
12127 (native-inputs
12128 `(("python-gevent" ,python-gevent)
12129 ("python-mock" ,python-mock)
12130 ("python-pytest-mock" ,python-pytest-mock)))
12131 (propagated-inputs
12132 `(("python-promise" ,python-promise)
12133 ("python-six" ,python-six)))
12134 (home-page "https://github.com/graphql-python/graphql-core")
12135 (synopsis "GraphQL implementation for Python")
12136 (description
12137 "GraphQL implementation for Python. GraphQL is a data query language and
12138runtime designed and used to request and deliver data to mobile and web apps.
12139This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12140to Python.")
12141 (license license:expat)))
12142
12143(define-public python2-graphql-core
12144 (package-with-python2 python-graphql-core))
12145
12146(define-public python-graphql-relay
12147 (package
12148 (name "python-graphql-relay")
12149 (version "0.4.5")
12150 (source
12151 (origin
12152 (method url-fetch)
12153 (uri (pypi-uri "graphql-relay" version))
12154 (sha256
12155 (base32
12156 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12157 (build-system python-build-system)
12158 (arguments
12159 '(#:tests? #f)) ; The tests are not distributed
12160 (propagated-inputs
12161 `(("python-graphql-core" ,python-graphql-core)
12162 ("python-promise" ,python-promise)
12163 ("python-six" ,python-six)))
12164 (home-page "https://github.com/graphql-python/graphql-relay-py")
12165 (synopsis "Relay implementation for Python")
12166 (description
12167 "This is a library to allow the easy creation of Relay-compliant servers
12168using the GraphQL Python reference implementation of a GraphQL server. It
12169should be noted that the code is a exact port of the original
12170@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12171from Facebook.")
12172 (license license:expat)))
12173
12174(define-public python2-graphql-relay
12175 (package-with-python2 python-graphql-relay))
12176
12177(define-public python-graphene
12178 (package
12179 (name "python-graphene")
12180 (version "0.10.2")
12181 (source
12182 (origin
12183 (method url-fetch)
12184 (uri (pypi-uri "graphene" version))
12185 (sha256
12186 (base32
12187 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12188 (build-system python-build-system)
12189 (propagated-inputs
12190 `(("python-graphql-core" ,python-graphql-core)
12191 ("python-graphql-relay" ,python-graphql-relay)
12192 ("python-iso8601" ,python-iso8601)
12193 ("python-promise" ,python-promise)
12194 ("python-six" ,python-six)))
12195 (arguments
12196 `(#:tests? #f)) ; no tests/ in the PyPI tarball
3dd74c8d 12197 (home-page "https://graphene-python.org/")
44d10b1f
RW
12198 (synopsis "GraphQL Framework for Python")
12199 (description
12200 "Graphene is a Python library for building GraphQL schemas/types.
12201A GraphQL schema describes your data model, and provides a GraphQL server
12202with an associated set of resolve methods that know how to fetch data.")
12203 (properties `((python2-variant . ,(delay python2-graphene))))
12204 (license license:expat)))
12205
12206(define-public python2-graphene
12207 (let ((base (package-with-python2
12208 (strip-python2-variant python-graphene))))
12209 (package (inherit base)
12210 (native-inputs
12211 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12212 ,@(package-native-inputs base))))))
12213
12214(define-public python-nautilus
12215 (package
12216 (name "python-nautilus")
12217 (version "0.4.9")
12218 (source
12219 (origin
12220 (method url-fetch)
12221 (uri (pypi-uri "nautilus" version))
12222 (sha256
12223 (base32
12224 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12225 (build-system python-build-system)
12226 (arguments `(#:tests? #f)) ; fails to import test modules
12227 (propagated-inputs
12228 `(("python-bcrypt" ,python-bcrypt)
12229 ("python-click" ,python-click)
12230 ("python-consul" ,python-consul)
12231 ("python-graphene" ,python-graphene)
12232 ("python-jinja2" ,python-jinja2)
12233 ("python-peewee" ,python-peewee)
12234 ("python-pika" ,python-pika)
12235 ("python-tornado" ,python-tornado)
12236 ("python-wtforms" ,python-wtforms)))
12237 (native-inputs
12238 `(("python-nose2" ,python-nose2)))
12239 (home-page "https://github.com/AlecAivazis/nautilus")
12240 (synopsis "Library for creating microservice applications")
12241 (description
12242 "Nautilus is a framework for flux based microservices that looks to
12243provide extendible implementations of common aspects of a cloud so that you can
12244focus on building massively scalable web applications.")
12245 (license license:expat)))
12246
fe36fdb2
MB
12247(define-public python-random2
12248 (package
12249 (name "python-random2")
12250 (version "1.0.1")
12251 (source (origin
12252 (method url-fetch)
12253 (uri (pypi-uri "random2" version ".zip"))
12254 (sha256
12255 (base32
12256 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
12257 (build-system python-build-system)
12258 (native-inputs `(("unzip" ,unzip)))
12259 (home-page "http://pypi.python.org/pypi/random2")
12260 (synopsis "Python 3 version of the Python 2 @code{random} module")
12261 (description
12262 "This package provides a Python 3 ported version of Python 2.7’s
12263@code{random} module. It has also been back-ported to work in Python 2.6.
12264
12265In Python 3, the implementation of @code{randrange()} was changed, so that
12266even with the same seed you get different sequences in Python 2 and 3.
12267
12268This package closes that gap, allowing stable random number generation
12269between the different Python versions.")
12270 (license license:psfl)))
12271
12272(define-public python2-random2
12273 (package-with-python2 python-random2))
12274
44d10b1f
RW
12275(define-public python-snowballstemmer
12276 (package
12277 (name "python-snowballstemmer")
9b54d319 12278 (version "2.0.0")
44d10b1f
RW
12279 (source (origin
12280 (method url-fetch)
12281 (uri (pypi-uri "snowballstemmer" version))
12282 (sha256
12283 (base32
9b54d319 12284 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
44d10b1f
RW
12285 (build-system python-build-system)
12286 (arguments
12287 `(;; No tests exist
12288 #:tests? #f))
12289 (home-page "https://github.com/shibukawa/snowball_py")
12290 (synopsis "Snowball stemming library collection for Python")
12291 (description "This package provides 16 word stemmer algorithms generated
12292from Snowball algorithms. It includes the 15 original ones plus the Poerter
12293English stemmer.")
12294 (license license:bsd-3)))
12295
12296(define-public python2-snowballstemmer
12297 (package-with-python2 python-snowballstemmer))
12298
44d10b1f
RW
12299(define-public python-setproctitle
12300(package
12301 (name "python-setproctitle")
12302 (version "1.1.10")
12303 (source
12304 (origin
12305 (method url-fetch)
12306 (uri (pypi-uri "setproctitle" version))
12307 (sha256
12308 (base32
12309 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12310 (build-system python-build-system)
12311 (arguments
12312 '(#:phases
12313 (modify-phases %standard-phases
12314 (add-before 'check 'patch-Makefile
12315 ;; Stricly this is only required for the python2 variant.
12316 ;; But adding a phase in an inherited package seems to be
12317 ;; cumbersum. So we patch even for python3.
12318 (lambda _
12319 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12320 (when nose
12321 (substitute* "Makefile"
12322 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12323 (string-append nose "/bin/nosetests "))))
12324 #t)))
12325 (replace 'check
12326 (lambda _
12327 (setenv "PYTHON" (or (which "python3") (which "python")))
12328 (setenv "PYCONFIG" (or (which "python3-config")
12329 (which "python-config")))
12330 (setenv "CC" "gcc")
12331 ;; No need to extend PYTHONPATH to find the built package, since
12332 ;; the Makefile will build anyway
12333 (invoke "make" "check"))))))
12334 (native-inputs
12335 `(("procps" ,procps))) ; required for tests
12336 (home-page
12337 "https://github.com/dvarrazzo/py-setproctitle")
12338 (synopsis
12339 "Setproctitle implementation for Python to customize the process title")
12340 (description "The library allows a process to change its title (as displayed
12341by system tools such as ps and top).
12342
12343Changing the title is mostly useful in multi-process systems, for
12344example when a master process is forked: changing the children's title
12345allows to identify the task each process is busy with. The technique
12346is used by PostgreSQL and the OpenSSH Server for example.")
12347 (license license:bsd-3)
12348 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12349
12350(define-public python2-setproctitle
12351 (let ((base (package-with-python2
12352 (strip-python2-variant python-setproctitle))))
12353 (package
12354 (inherit base)
12355 (native-inputs `(("python2-nose" ,python2-nose)
12356 ,@(package-native-inputs base))))))
12357
12358(define-public python-validictory
12359 (package
12360 (name "python-validictory")
12361 (version "1.0.1")
12362 (source
12363 (origin
12364 (method url-fetch)
12365 (uri (pypi-uri "validictory" version))
12366 (sha256
12367 (base32
12368 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12369 (build-system python-build-system)
12370 (arguments
12371 '(#:phases
12372 (modify-phases %standard-phases
12373 (add-after 'unpack 'bootstrap
12374 ;; Move the tests out of the package directory to avoid
12375 ;; packaging them.
12376 (lambda* _
12377 (rename-file "validictory/tests" "tests")
12378 (delete-file "tests/__init__.py")))
12379 (replace 'check
12380 (lambda _
12381 ;; Extend PYTHONPATH so the built package will be found.
12382 (setenv "PYTHONPATH"
12383 (string-append (getcwd) "/build/lib:"
12384 (getenv "PYTHONPATH")))
6568bd5d 12385 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
12386 (native-inputs
12387 `(("python-pytest" ,python-pytest)))
12388 (home-page
12389 "https://github.com/jamesturk/validictory")
12390 (synopsis "General purpose Python data validator")
12391 (description "It allows validation of arbitrary Python data structures.
12392
12393The schema format is based on the JSON Schema
12394proposal (http://json-schema.org), so combined with json the library is also
12395useful as a validator for JSON data.")
12396 (license license:expat)))
12397
12398(define-public python2-validictory
12399 (package-with-python2 python-validictory))
12400
12401(define-public python-pyelftools
12402 (package
12403 (name "python-pyelftools")
12404 (version "0.25")
12405 (source
12406 (origin
12407 (method url-fetch)
12408 (uri (pypi-uri "pyelftools" version))
12409 (sha256
12410 (base32
12411 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
12412 (build-system python-build-system)
12413 (arguments
12414 `(#:phases
12415 (modify-phases %standard-phases
12416 (add-before 'check 'set-pythonpath
12417 (lambda _
12418 (setenv "PYTHONPATH"
12419 (string-append
12420 (getcwd) "/test/"
12421 ":" (getenv "PYTHONPATH")))
12422 #t)))))
12423 (home-page
12424 "https://github.com/eliben/pyelftools")
12425 (synopsis
12426 "Analyze binary and library file information")
12427 (description "This Python library provides interfaces for parsing and
12428analyzing two binary and library file formats; the Executable and Linking
12429Format (ELF), and debugging information in the Debugging With Attributed
12430Record Format (DWARF).")
12431 (license license:public-domain)))
12432
12433(define-public python-pyev
12434 (package
12435 (name "python-pyev")
12436 (version "0.9.0")
12437 (source
12438 (origin
12439 (method url-fetch)
12440 (uri (pypi-uri "pyev" version))
12441 (sha256
12442 (base32
12443 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12444 (build-system python-build-system)
12445 (arguments
12446 `(#:tests? #f ; no test suite
12447 #:phases
12448 (modify-phases %standard-phases
12449 (add-after 'unpack 'patch
12450 (lambda* (#:key inputs #:allow-other-keys)
12451 (let ((libev (string-append (assoc-ref inputs "libev")
12452 "/lib/libev.so.4")))
12453 (substitute* "setup.py"
12454 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12455 (string-append "libev_dll_name = \"" libev "\"")))))))))
12456 (inputs
12457 `(("libev" ,libev)))
12458 (home-page "http://pythonhosted.org/pyev/")
12459 (synopsis "Python libev interface")
12460 (description "Pyev provides a Python interface to libev.")
12461 (license license:gpl3)))
12462
12463(define-public python2-pyev
12464 (package-with-python2 python-pyev))
12465
12466(define-public python-imagesize
12467 (package
12468 (name "python-imagesize")
318c6a5a 12469 (version "1.2.0")
44d10b1f
RW
12470 (source
12471 (origin
12472 (method url-fetch)
12473 (uri (pypi-uri "imagesize" version))
12474 (sha256
12475 (base32
318c6a5a 12476 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
44d10b1f
RW
12477 (build-system python-build-system)
12478 (home-page "https://github.com/shibukawa/imagesize_py")
12479 (synopsis "Gets image size of files in various formats in Python")
12480 (description
12481 "This package allows determination of image size from
12482PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12483 (license license:expat)))
12484
12485(define-public python2-imagesize
12486 (package-with-python2 python-imagesize))
12487
12488(define-public python-termstyle
12489 (package
12490 (name "python-termstyle")
12491 (version "0.1.11")
12492 (source
12493 (origin
12494 (method url-fetch)
12495 (uri (pypi-uri "termstyle" version))
12496 (sha256
12497 (base32
12498 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12499 (build-system python-build-system)
12500 (arguments
12501 '(#:phases
12502 (modify-phases %standard-phases
12503 (replace 'check
12504 (lambda _
831080a6 12505 (invoke "python" "test3.py"))))))
44d10b1f
RW
12506 (home-page "https://github.com/gfxmonk/termstyle")
12507 (synopsis "Console text coloring for Python")
12508 (description "This package provides console text coloring for Python.")
12509 (license license:bsd-3)))
12510
12511(define-public python-argcomplete
12512 (package
12513 (name "python-argcomplete")
98aecd3a 12514 (version "1.10.3")
44d10b1f 12515 (source
98aecd3a
RW
12516 (origin
12517 (method url-fetch)
12518 (uri (pypi-uri "argcomplete" version))
12519 (sha256
12520 (base32
12521 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
44d10b1f 12522 (build-system python-build-system)
98aecd3a
RW
12523 (arguments
12524 `(#:phases
12525 (modify-phases %standard-phases
12526 (add-after 'unpack 'embed-tool-references
12527 (lambda _
12528 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
12529 ((" grep")
12530 (string-append " " (which "grep")))
12531 ((" egrep")
12532 (string-append " " (which "egrep")))
12533 (("elif which")
12534 (string-append "elif " (which "which")))
12535 (("\\$\\(which")
12536 (string-append "$(" (which "which"))))
12537 #t)))))
12538 (inputs
12539 `(("grep" ,grep)
12540 ("which" ,which)))
44d10b1f 12541 (native-inputs
98aecd3a
RW
12542 `(("python-coverage" ,python-coverage)
12543 ("python-flake8" ,python-flake8)
12544 ("python-pexpect" ,python-pexpect)
12545 ("python-wheel" ,python-wheel)
44d10b1f 12546 ("tcsh" ,tcsh)
98aecd3a
RW
12547 ("fish" ,fish)
12548 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
44d10b1f
RW
12549 (home-page "https://github.com/kislyuk/argcomplete")
12550 (synopsis "Shell tab completion for Python argparse")
12551 (description "argcomplete provides extensible command line tab completion
12552of arguments and options for Python scripts using @code{argparse}. It's
12553particularly useful for programs with many options or sub-parsers that can
12554dynamically suggest completions; for example, when browsing resources over the
12555network.")
12556 (license license:asl2.0)))
12557
12558(define-public python2-argcomplete
12559 (package-with-python2 python-argcomplete))
12560
12561(define-public python-xopen
12562 (package
12563 (name "python-xopen")
24d64989 12564 (version "0.5.0")
44d10b1f
RW
12565 (source
12566 (origin
12567 (method url-fetch)
12568 (uri (pypi-uri "xopen" version))
12569 (sha256
12570 (base32
24d64989 12571 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 12572 (build-system python-build-system)
24d64989
RW
12573 (propagated-inputs
12574 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
12575 (home-page "https://github.com/marcelm/xopen/")
12576 (synopsis "Open compressed files transparently")
12577 (description "This module provides an @code{xopen} function that works like
12578Python's built-in @code{open} function, but can also deal with compressed files.
12579Supported compression formats are gzip, bzip2 and, xz, and are automatically
12580recognized by their file extensions. The focus is on being as efficient as
12581possible on all supported Python versions.")
12582 (license license:expat)))
12583
12584(define-public python2-xopen
12585 (let ((base (package-with-python2
12586 (strip-python2-variant python-xopen))))
12587 (package
12588 (inherit base)
12589 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
12590 ,@(package-propagated-inputs base))))))
12591
12592(define-public python-cheetah
12593 (package
12594 (name "python-cheetah")
12595 (version "3.1.0")
12596 (source
12597 (origin
12598 (method url-fetch)
12599 (uri (pypi-uri "Cheetah3" version))
12600 (sha256
12601 (base32
12602 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
12603 (build-system python-build-system)
12604 (arguments
12605 `(#:modules ((guix build utils)
12606 (guix build python-build-system)
12607 (ice-9 ftw)
12608 (srfi srfi-1)
12609 (srfi srfi-26))
12610 #:phases (modify-phases %standard-phases
12611 (add-after 'unpack 'use-absolute-python
12612 (lambda _
12613 (substitute* "Cheetah/CheetahWrapper.py"
12614 (("#!/usr/bin/env python")
12615 (string-append "#!" (which "python"))))
12616 #t))
12617 (replace 'check
12618 (lambda _
12619 (let ((cwd (getcwd)))
12620 (setenv "PYTHONPATH"
12621 (string-append
12622 cwd "/build/"
12623 (find (cut string-prefix? "lib" <>)
12624 (scandir (string-append cwd "/build")))
12625 ":" (getenv "PYTHONPATH")))
12626 (setenv "PATH"
12627 (string-append (getenv "PATH")
12628 ":" cwd "/bin"))
12629 (setenv "TMPDIR" "/tmp")
12630
12631 (substitute* "Cheetah/Tests/Test.py"
12632 (("unittest.TextTestRunner\\(\\)")
12633 "unittest.TextTestRunner(verbosity=2)"))
12634
12635 (invoke "python" "Cheetah/Tests/Test.py")))))))
12636 (propagated-inputs
12637 `(("python-markdown" ,python-markdown))) ;optional
012d2950 12638 (home-page "https://cheetahtemplate.org/")
44d10b1f
RW
12639 (synopsis "Template engine")
12640 (description "Cheetah is a text-based template engine and Python code
12641generator.
12642
12643Cheetah can be used as a standalone templating utility or referenced as
12644a library from other Python applications. It has many potential uses,
12645but web developers looking for a viable alternative to ASP, JSP, PHP and
12646PSP are expected to be its principle user group.
12647
12648Features:
12649@enumerate
12650@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12651 text-based format.
12652@item Cleanly separates content, graphic design, and program code.
12653@item Blends the power and flexibility of Python with a simple template language
12654 that non-programmers can understand.
12655@item Gives template writers full access to any Python data structure, module,
12656 function, object, or method in their templates.
12657@item Makes code reuse easy by providing an object-orientated interface to
12658 templates that is accessible from Python code or other Cheetah templates.
12659 One template can subclass another and selectively reimplement sections of it.
12660@item Provides a simple, yet powerful, caching mechanism that can dramatically
12661 improve the performance of a dynamic website.
12662@item Compiles templates into optimized, yet readable, Python code.
12663@end enumerate")
12664 (license (license:x11-style "file://LICENSE"))))
12665
12666(define-public python2-cheetah
12667 (package-with-python2 python-cheetah))
12668
12669(define-public python-dulwich
12670 (package
12671 (name "python-dulwich")
12672 (version "0.18.6")
12673 (source
12674 (origin
12675 (method url-fetch)
12676 (uri (list (string-append "https://www.dulwich.io/releases/"
12677 "dulwich-" version ".tar.gz")
12678 (pypi-uri "dulwich" version)))
12679 (sha256
12680 (base32
12681 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12682 (build-system python-build-system)
12683 (arguments
12684 `(#:phases
12685 (modify-phases %standard-phases
12686 (add-before 'check 'fix-tests
12687 (lambda* (#:key inputs #:allow-other-keys)
12688 ;; The tests use Popen with a custom environment which doesn't
12689 ;; include PATH.
12690 (substitute* "dulwich/tests/compat/utils.py"
12691 (("'git'") (string-append "'"
12692 (which "git")
12693 "'")))
12694 (substitute* '("dulwich/tests/test_repository.py"
12695 "dulwich/tests/test_hooks.py")
12696 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12697 (setenv "TEST_RUNNER" "unittest")
12698 (setenv "PYTHONHASHSEED" "random")
12699 #t)))))
12700 (propagated-inputs
12701 `(("python-fastimport" ,python-fastimport)))
12702 (native-inputs
12703 `(("python-mock" ,python-mock)
12704 ("python-geventhttpclient" ,python-geventhttpclient)
12705 ("git" ,git)))
12706 (home-page "https://www.dulwich.io/")
12707 (synopsis "Git implementation in Python")
12708 (description "Dulwich is an implementation of the Git file formats and
12709protocols written in pure Python.")
12710 ;; Can be used with either license.
12711 (license (list license:asl2.0 license:gpl2+))))
12712
12713(define-public python2-dulwich
12714 (package-with-python2 python-dulwich))
12715
12716(define-public python-pbkdf2
12717 (package
12718 (name "python-pbkdf2")
12719 (version "1.3")
12720 (source
12721 (origin
12722 (method url-fetch)
12723 (uri (pypi-uri "pbkdf2" version))
12724 (sha256
12725 (base32
12726 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12727 (build-system python-build-system)
12728 (arguments
12729 '(#:phases
12730 (modify-phases %standard-phases
12731 (replace 'check
12732 (lambda _
12733 (setenv "PYTHONPATH"
12734 (string-append (getcwd) "/build/lib:"
12735 (getenv "PYTHONPATH")))
ee2bb944 12736 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
12737 (propagated-inputs
12738 `(("python-pycrypto" ,python-pycrypto))) ; optional
12739 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12740 (synopsis "Password-based key derivation")
12741 (description "This module implements the password-based key derivation
12742function, PBKDF2, specified in RSA PKCS#5 v2.0.
12743
12744PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12745is part of the RSA Public Key Cryptography Standards series. The provided
12746implementation takes a password or a passphrase and a salt value (and
12747optionally a iteration count, a digest module, and a MAC module) and provides
12748a file-like object from which an arbitrarly-sized key can be read.")
12749 (license license:expat)))
12750
12751(define-public python2-pbkdf2
12752 (package-with-python2 python-pbkdf2))
12753
12754(define-public python-qrcode
12755 (package
12756 (name "python-qrcode")
217ea1a1 12757 (version "6.1")
44d10b1f
RW
12758 (source
12759 (origin
12760 (method url-fetch)
12761 (uri (pypi-uri "qrcode" version))
12762 (sha256
217ea1a1 12763 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12764 (build-system python-build-system)
12765 (arguments
12766 ;; FIXME: Tests require packaging 'pymaging'.
12767 '(#:tests? #f))
12768 (propagated-inputs
12769 `(("python-lxml" ,python-lxml) ; for SVG output
12770 ("python-pillow" ,python-pillow) ; for PNG output
12771 ("python-six" ,python-six)))
44d10b1f
RW
12772 (home-page "https://github.com/lincolnloop/python-qrcode")
12773 (synopsis "QR Code image generator")
12774 (description "This package provides a pure Python QR Code generator
12775module. It uses the Python Imaging Library (PIL) to allow for the generation
12776of QR Codes.
12777
12778In addition this package provides a command line tool to generate QR codes and
12779either write these QR codes to a file or do the output as ascii art at the
12780console.")
12781 (license license:bsd-3)))
12782
12783(define-public python2-qrcode
12784 (package-with-python2 python-qrcode))
12785
12786(define-public python-rst2ansi
12787 (package
12788 (name "python-rst2ansi")
12789 (version "0.1.5")
12790 (source
12791 (origin
12792 (method url-fetch)
12793 (uri (pypi-uri "rst2ansi" version))
12794 (sha256
12795 (base32
12796 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12797 (build-system python-build-system)
12798 (propagated-inputs
12799 `(("python-docutils" ,python-docutils)))
12800 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12801 (synopsis "Convert RST to ANSI-decorated console output")
12802 (description
12803 "Python module dedicated to rendering RST (reStructuredText) documents
12804to ansi-escaped strings suitable for display in a terminal.")
12805 (license license:expat)))
12806
12807(define-public python-ansi2html
12808 (package
12809 (name "python-ansi2html")
12810 (version "1.2.0")
12811 (source
12812 (origin
12813 (method url-fetch)
12814 (uri (pypi-uri "ansi2html" version))
12815 (sha256
12816 (base32
12817 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12818 (build-system python-build-system)
12819 (native-inputs
12820 `(("python-mock" ,python-mock)
12821 ("python-nose" ,python-nose)))
12822 (propagated-inputs
12823 `(("python-six" ,python-six)))
12824 (home-page "https://github.com/ralphbean/ansi2html")
12825 (synopsis "Convert ANSI-decorated console output to HTML")
12826 (description
12827 "@command{ansi2html} is a Python library and command line utility for
12828convering text with ANSI color codes to HTML or LaTeX.")
12829 (license license:gpl3+)))
12830
12831(define-public python2-ansi2html
12832 (package-with-python2 python-ansi2html))
12833
12834(define-public python-ddt
12835 (package
12836 (name "python-ddt")
12837 (version "1.1.3")
12838 (source
12839 (origin
12840 (method url-fetch)
12841 (uri (pypi-uri "ddt" version))
12842 (sha256
12843 (base32
12844 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12845 (build-system python-build-system)
12846 (native-inputs
12847 `(("python-mock" ,python-mock)
12848 ("python-nose" ,python-nose)))
12849 (propagated-inputs
12850 `(("python-six" ,python-six)
12851 ("python-pyyaml" ,python-pyyaml)))
12852 (home-page "https://github.com/txels/ddt")
12853 (synopsis "Data-Driven Tests")
12854 (description
12855 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12856running it with different test data, and make it appear as multiple test
12857cases.")
12858 (license license:expat)))
12859
12860(define-public python2-ddt
12861 (package-with-python2 python-ddt))
12862
12863(define-public python-pycountry
12864 (package
12865 (name "python-pycountry")
12866 (version "18.5.26")
12867 (source
12868 (origin
12869 (method url-fetch)
12870 (uri (pypi-uri "pycountry" version))
12871 (sha256
12872 (base32
12873 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12874 (build-system python-build-system)
12875 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12876 (synopsis "ISO databases for languages, countries, currencies, etc.")
12877 (description
12878 "@code{pycountry} provides the ISO databases for the standards:
12879@enumerate
12880@item 639-3 (Languages)
12881@item 3166 (Countries)
12882@item 3166-3 (Deleted Countries)
12883@item 3166-2 (Subdivisions of countries)
12884@item 4217 (Currencies)
12885@item 15924 (Scripts)
12886@end enumerate
12887It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12888through a Python API.")
12889 (license license:lgpl2.1+)))
12890
12891(define-public python2-pycountry
12892 (package-with-python2 python-pycountry))
12893
12894(define-public python-pycosat
12895 (package
12896 (name "python-pycosat")
12897 (version "0.6.1")
12898 (source
12899 (origin
12900 (method url-fetch)
12901 (uri (pypi-uri "pycosat" version))
12902 (sha256
12903 (base32
12904 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12905 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12906 (build-system python-build-system)
12907 (home-page "https://github.com/ContinuumIO/pycosat")
12908 (synopsis "Bindings to picosat (a SAT solver)")
12909 (description
12910 "This package provides efficient Python bindings to @code{picosat} on
12911the C level. When importing pycosat, the @code{picosat} solver becomes part
12912of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12913Problem} (SAT) solver.")
12914 (license license:expat)))
12915
12916(define-public python2-pycosat
12917 (package-with-python2 python-pycosat))
12918
12919(define-public python2-ruamel.ordereddict
12920 (package
12921 (name "python2-ruamel.ordereddict")
12922 (version "0.4.9")
12923 (source
12924 (origin
12925 (method url-fetch)
12926 (uri (pypi-uri "ruamel.ordereddict" version))
12927 (sha256
12928 (base32
12929 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12930 (build-system python-build-system)
12931 (arguments
12932 `(#:python ,python-2
12933 #:phases
12934 (modify-phases %standard-phases
12935 (delete 'check)
12936 (add-after 'install 'check
12937 (lambda* (#:key inputs outputs #:allow-other-keys)
12938 (add-installed-pythonpath inputs outputs)
f987ac30 12939 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12940 (home-page "https://bitbucket.org/ruamel/ordereddict")
12941 (synopsis "Version of dict that keeps keys in insertion order")
12942 (description
12943 "This is an implementation of an ordered dictionary with @dfn{Key
12944Insertion Order} (KIO: updates of values do not affect the position of the
12945key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12946removed and put at the back). The standard library module @code{OrderedDict},
12947implemented later, implements a subset of @code{ordereddict} functionality.
12948Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12949Order} (KSO, no sorting function can be specified, but a transform can be
12950specified to apply on the key before comparison (e.g. @code{string.lower})).")
12951 (license license:expat)))
12952
12953(define-public python-pypeg2
12954 (package
12955 (name "python-pypeg2")
12956 (version "2.15.2")
12957 (source
12958 (origin
12959 (method url-fetch)
12960 (uri (pypi-uri "pyPEG2" version))
12961 (sha256
12962 (base32
12963 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12964 (build-system python-build-system)
12965 (propagated-inputs `(("python-lxml" ,python-lxml)))
12966 (arguments
12967 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12968 '(#:tests? #f))
12969 (home-page "https://fdik.org/pyPEG/")
12970 (synopsis "Parsering Expression Grammars in Python")
12971 (description "PyPEG is an intrinsic parser interpreter framework for
12972Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12973parse many formal languages.")
12974 (license license:gpl2)))
12975
12976(define-public python-incremental
12977 (package
12978 (name "python-incremental")
12979 (version "17.5.0")
12980 (source
12981 (origin
12982 (method url-fetch)
12983 (uri (pypi-uri "incremental" version))
12984 (sha256
12985 (base32
12986 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12987 (build-system python-build-system)
12988 (home-page "https://github.com/hawkowl/incremental")
12989 (synopsis "Library for versioning Python projects")
12990 (description "Incremental is a small library that versions your Python
12991projects.")
12992 (license license:expat)))
12993
12994(define-public python2-incremental
12995 (package-with-python2 python-incremental))
12996
12997(define-public python-invoke
12998 (package
12999 (name "python-invoke")
b5544cb4 13000 (home-page "https://www.pyinvoke.org/")
a5662319 13001 (version "1.3.0")
44d10b1f
RW
13002 (source (origin
13003 (method url-fetch)
13004 (uri (pypi-uri "invoke" version))
13005 (sha256
13006 (base32
a5662319 13007 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
13008 (build-system python-build-system)
13009 (arguments
13010 ;; XXX: Requires many dependencies that are not yet in Guix.
13011 `(#:tests? #f))
13012 (synopsis "Pythonic task execution")
13013 (description
13014 "Invoke is a Python task execution tool and library, drawing inspiration
13015from various sources to arrive at a powerful and clean feature set. It is
13016evolved from the Fabric project, but focuses on local and abstract concerns
13017instead of servers and network commands.")
13018 (license license:bsd-3)))
13019
13020(define-public python2-invoke
13021 (package-with-python2 python-invoke))
13022
13023(define-public python-automat
13024 (package
13025 (name "python-automat")
919d80a0 13026 (version "0.7.0")
44d10b1f
RW
13027 (source (origin
13028 (method url-fetch)
13029 (uri (pypi-uri "Automat" version))
13030 (sha256
13031 (base32
919d80a0 13032 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
13033 (build-system python-build-system)
13034 ;; We disable the tests because they require python-twisted, while
13035 ;; python-twisted depends on python-automat. Twisted is optional, but the
13036 ;; tests fail if it is not available. Also see
13037 ;; <https://github.com/glyph/automat/issues/71>.
13038 (arguments '(#:tests? #f))
13039 (native-inputs
13040 `(("python-m2r" ,python-m2r)
13041 ("python-setuptools-scm" ,python-setuptools-scm)
13042 ("python-graphviz" ,python-graphviz)))
13043 (propagated-inputs
13044 `(("python-six" ,python-six)
13045 ("python-attrs" ,python-attrs)))
13046 (home-page "https://github.com/glyph/Automat")
13047 (synopsis "Self-service finite-state machines")
13048 (description "Automat is a library for concise, idiomatic Python
13049expression of finite-state automata (particularly deterministic finite-state
13050transducers).")
13051 (license license:expat)))
13052
13053(define-public python2-automat
13054 (package-with-python2 python-automat))
13055
13056(define-public python-m2r
13057 (package
13058 (name "python-m2r")
bcfb8fac 13059 (version "0.2.1")
44d10b1f
RW
13060 (source (origin
13061 (method url-fetch)
13062 (uri (pypi-uri "m2r" version))
13063 (sha256
13064 (base32
bcfb8fac 13065 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
13066 (build-system python-build-system)
13067 (propagated-inputs
13068 `(("python-docutils" ,python-docutils)
13069 ("python-mistune" ,python-mistune)))
13070 (native-inputs
13071 `(("python-pygments" ,python-pygments)
13072 ("python-mock" ,python-mock)))
13073 (home-page "https://github.com/miyakogi/m2r")
13074 (synopsis "Markdown to reStructuredText converter")
13075 (description "M2R converts a markdown file including reST markups to valid
13076reST format.")
13077 (license license:expat)))
13078
13079(define-public python2-m2r
13080 (package-with-python2 python-m2r))
13081
13082(define-public python-constantly
13083 (package
13084 (name "python-constantly")
13085 (version "15.1.0")
13086 (source (origin
13087 (method url-fetch)
13088 (uri (pypi-uri "constantly" version))
13089 (sha256
13090 (base32
13091 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
13092 (build-system python-build-system)
13093 (home-page "https://github.com/twisted/constantly")
13094 (synopsis "Symbolic constants in Python")
13095 (description "Constantly is a Python library that provides symbolic
13096constant support. It includes collections and constants with text, numeric,
13097and bit flag values.")
13098 (license license:expat)))
13099
13100(define-public python2-constantly
13101 (package-with-python2 python-constantly))
13102
13103(define-public python-attrs
13104 (package
13105 (name "python-attrs")
c41d5144 13106 (version "19.1.0")
44d10b1f
RW
13107 (source (origin
13108 (method url-fetch)
13109 (uri (pypi-uri "attrs" version))
13110 (sha256
13111 (base32
c41d5144 13112 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
13113 (build-system python-build-system)
13114 (arguments
13115 `(#:modules ((guix build utils)
13116 (guix build python-build-system)
13117 (ice-9 ftw)
13118 (srfi srfi-1)
13119 (srfi srfi-26))
13120 #:phases (modify-phases %standard-phases
13121 (replace 'check
13122 (lambda _
13123 (let ((cwd (getcwd)))
13124 (setenv "PYTHONPATH"
13125 (string-append
13126 cwd "/build/"
13127 (find (cut string-prefix? "lib" <>)
13128 (scandir (string-append cwd "/build")))
13129 ":"
13130 (getenv "PYTHONPATH")))
13131 (invoke "python" "-m" "pytest")))))))
13132 (native-inputs
13133 `(("python-coverage" ,python-coverage)
13134 ("python-hypothesis" ,python-hypothesis)
13135 ("python-pympler" ,python-pympler)
13136 ("python-pytest" ,python-pytest)
13137 ("python-six" ,python-six)
13138 ("python-sphinx" ,python-sphinx)
13139 ("python-zope-interface" ,python-zope-interface)))
13140 (home-page "https://github.com/python-attrs/attrs/")
13141 (synopsis "Attributes without boilerplate")
13142 (description "@code{attrs} is a Python package with class decorators that
13143ease the chores of implementing the most common attribute-related object
13144protocols.")
13145 (license license:expat)))
13146
13147(define-public python2-attrs
13148 (package-with-python2 python-attrs))
13149
13150(define-public python-attrs-bootstrap
13151 (package
13152 (inherit python-attrs)
13153 (name "python-attrs-bootstrap")
44d10b1f
RW
13154 (native-inputs `())
13155 (arguments `(#:tests? #f))))
13156
13157(define-public python2-attrs-bootstrap
13158 (package-with-python2 python-attrs-bootstrap))
13159
13160(define-public python2-cliapp
13161 (package
13162 (name "python2-cliapp")
9064b84e 13163 (version "1.20180812.1")
44d10b1f
RW
13164 (source
13165 (origin
13166 (method url-fetch)
13167 (uri (string-append
13168 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13169 version ".tar.gz"))
13170 (sha256
13171 (base32
9064b84e 13172 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
13173 (build-system python-build-system)
13174 (arguments
13175 `(#:python ,python-2
13176 #:phases
13177 (modify-phases %standard-phases
13178 ;; check phase needs to be run before the build phase. If not,
13179 ;; coverage-test-runner looks for tests for the built source files,
13180 ;; and fails.
13181 (delete 'check)
13182 (add-before 'build 'check
13183 (lambda _
13184 ;; Disable python3 tests
13185 (substitute* "check"
13186 (("python3") "# python3"))
6c826d32 13187 (invoke "./check"))))))
44d10b1f
RW
13188 (native-inputs
13189 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13190 ("python2-pep8" ,python2-pep8)))
13191 (propagated-inputs
13192 `(("python2-pyaml" ,python2-pyaml)))
13193 (home-page "https://liw.fi/cliapp/")
13194 (synopsis "Python framework for command line programs")
13195 (description "@code{python2-cliapp} is a python framework for
13196command line programs. It contains the typical stuff such programs
13197need to do, such as parsing the command line for options, and
13198iterating over input files.")
13199 (license license:gpl2+)))
13200
13201(define-public python2-ttystatus
13202 (package
13203 (name "python2-ttystatus")
e516a9c2 13204 (version "0.36")
44d10b1f
RW
13205 (source
13206 (origin
13207 (method url-fetch)
13208 (uri (string-append
13209 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13210 version ".tar.gz"))
13211 (sha256
13212 (base32
e516a9c2 13213 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
13214 (build-system python-build-system)
13215 (native-inputs
13216 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13217 ("python2-pep8" ,python2-pep8)))
13218 (arguments
13219 `(#:python ,python-2
13220 #:phases
13221 (modify-phases %standard-phases
13222 ;; check phase needs to be run before the build phase. If not,
13223 ;; coverage-test-runner looks for tests for the built source files,
13224 ;; and fails.
13225 (delete 'check)
13226 (add-before 'build 'check
cbeee881 13227 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
13228 (home-page "https://liw.fi/ttystatus/")
13229 (synopsis "Python library for showing progress reporting and
13230status updates on terminals")
13231 (description "@code{python2-ttystatus} is a python library for
13232showing progress reporting and status updates on terminals, for
13233command line programs. Output is automatically adapted to the width
13234of the terminal: truncated if it does not fit, and resized if the
13235terminal size changes.")
13236 (license license:gpl3+)))
13237
13238(define-public python2-tracing
13239 (package
13240 (name "python2-tracing")
13241 (version "0.10")
13242 (source
13243 (origin
13244 (method url-fetch)
13245 (uri (string-append
13246 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13247 version ".tar.gz"))
13248 (sha256
13249 (base32
13250 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13251 (build-system python-build-system)
13252 (arguments
13253 `(#:python ,python-2))
13254 (home-page "https://liw.fi/tracing/")
13255 (synopsis "Python debug logging helper")
13256 (description "@code{python2-tracing} is a python library for
13257logging debug messages. It provides a way to turn debugging messages
13258on and off, based on the filename they occur in. It is much faster
13259than using @code{logging.Filter} to accomplish the same thing, which
13260matters when code is run in production mode. The actual logging still
13261happens using the @code{logging} library.")
13262 (license license:gpl3+)))
13263
13264(define-public python2-larch
13265 (package
13266 (name "python2-larch")
13267 (version "1.20151025")
13268 (source
13269 (origin
13270 (method url-fetch)
13271 (uri (string-append
13272 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13273 version ".tar.gz"))
13274 (patches (search-patches
13275 "python2-larch-coverage-4.0a6-compatibility.patch"))
13276 (sha256
13277 (base32
13278 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13279 (build-system python-build-system)
13280 (arguments
13281 `(#:python ,python-2
13282 #:phases
13283 (modify-phases %standard-phases
13284 ;; check phase needs to be run before the build phase. If not,
13285 ;; coverage-test-runner looks for tests for the built source files,
13286 ;; and fails.
13287 (delete 'check)
13288 (add-before 'build 'check
204ad455 13289 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
13290 (native-inputs
13291 `(("cmdtest" ,cmdtest)
13292 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
13293 (propagated-inputs
13294 `(("python2-tracing" ,python2-tracing)))
13295 (home-page "https://liw.fi/larch/")
13296 (synopsis "Python copy-on-write B-tree library")
13297 (description "@code{python2-larch} is an implementation of
13298particular kind of B-tree, based on research by Ohad Rodeh. See
13299@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13300on the data structure.
13301
13302The distinctive feature of this B-tree is that a node is never
13303(conceptually) modified. Instead, all updates are done by
13304copy-on-write. This makes it easy to clone a tree, and modify only the
13305clone, while other processes access the original tree.")
13306 (license license:gpl3+)))
13307
13308(define-public python-astroid
13309 (package
13310 (name "python-astroid")
1c43c698 13311 (version "2.3.3")
44d10b1f
RW
13312 (source
13313 (origin
13314 (method url-fetch)
13315 (uri (pypi-uri "astroid" version))
13316 (sha256
1c43c698 13317 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
13318 (build-system python-build-system)
13319 (propagated-inputs
13320 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13321 ("python-six" ,python-six)
f0935460 13322 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
13323 ("python-wrapt" ,python-wrapt)))
13324 (native-inputs
13325 `(("python-dateutil" ,python-dateutil)
13326 ("python-nose" ,python-nose)
13327 ("python-pytest" ,python-pytest)
13328 ("python-pytest-runner" ,python-pytest-runner)))
13329 (arguments
13330 `(#:phases
13331 (modify-phases %standard-phases
13332 (add-after 'unpack 'remove-spurious-test
13333 (lambda _
13334 ;; This can be removed after upgrading from python-3.7
13335 ;; https://github.com/PyCQA/astroid/issues/593
13336 ;; https://bugs.python.org/issue34056
13337 (delete-file "astroid/tests/unittest_modutils.py")
13338 #t))
13339 (replace 'check
13340 (lambda _
13341 (invoke "pytest" "astroid"))))))
13342 (home-page "https://github.com/PyCQA/astroid")
13343 (synopsis "Common base representation of python source code for pylint and
13344other projects")
13345 (description "@code{python-astroid} provides a common base representation
13346of python source code for projects such as pychecker, pyreverse, pylint, etc.
13347
13348It provides a compatible representation which comes from the _ast module. It
13349rebuilds the tree generated by the builtin _ast module by recursively walking
13350down the AST and building an extended ast. The new node classes have
13351additional methods and attributes for different usages. They include some
13352support for static inference and local name scopes. Furthermore, astroid
13353builds partial trees by inspecting living objects.")
13354 (license license:lgpl2.1+)
13355 (properties `((python2-variant . ,(delay python2-astroid))))))
13356
13357(define-public python2-astroid
13358 (let ((base (package-with-python2
13359 (strip-python2-variant python-astroid))))
13360 (package (inherit base)
13361 ;; Version 2.x removes python2 support.
13362 (version "1.6.5")
13363 (source
13364 (origin
13365 (method url-fetch)
13366 (uri (pypi-uri "astroid" version))
13367 (sha256
13368 (base32
13369 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
13370 (arguments
13371 (substitute-keyword-arguments (package-arguments base)
13372 ((#:phases phases)
13373 `(modify-phases ,phases
13374 (add-after 'unpack 'remove-spurious-test
13375 (lambda _
13376 ;; https://github.com/PyCQA/astroid/issues/276
13377 (delete-file "astroid/tests/unittest_brain.py")
13378 #t))
13379 (replace 'check
13380 (lambda _
13381 (invoke"python" "-m" "unittest" "discover"
13382 "-p" "unittest*.py")))))))
13383 (native-inputs `())
13384 (propagated-inputs
13385 `(("python2-backports-functools-lru-cache"
13386 ,python2-backports-functools-lru-cache)
13387 ("python2-enum34" ,python2-enum34)
13388 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
13389 ,@(alist-delete "python-typed-ast"
13390 (package-propagated-inputs base)))))))
44d10b1f
RW
13391
13392(define-public python-isort
13393 (package
13394 (name "python-isort")
e2227b6a 13395 (version "4.3.4")
44d10b1f
RW
13396 (source
13397 (origin
e2227b6a
EF
13398 (method git-fetch)
13399 (uri (git-reference
13400 ;; Tests pass only from the Github sources
13401 (url "https://github.com/timothycrosley/isort")
13402 (commit version)))
13403 (file-name (git-file-name name version))
44d10b1f
RW
13404 (sha256
13405 (base32
e2227b6a 13406 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
13407 (build-system python-build-system)
13408 (native-inputs
13409 `(("python-mock" ,python-mock)
13410 ("python-pytest" ,python-pytest)))
13411 (home-page "https://github.com/timothycrosley/isort")
13412 (synopsis "Python utility/library to sort python imports")
13413 (description "@code{python-isort} is a python utility/library to sort
13414imports alphabetically, and automatically separated into sections. It
13415provides a command line utility, a python library and plugins for various
13416editors.")
e2227b6a
EF
13417 (license license:expat)
13418 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
13419
13420(define-public python2-isort
e2227b6a
EF
13421 (let ((base (package-with-python2
13422 (strip-python2-variant python-isort))))
13423 (package (inherit base)
13424 (native-inputs
13425 `(("python2-futures" ,python2-futures)
13426 ,@(package-native-inputs base))))))
44d10b1f
RW
13427
13428(define-public python2-backports-functools-lru-cache
13429 (package
13430 (name "python2-backports-functools-lru-cache")
13431 (version "1.5")
13432 (source
13433 (origin
13434 (method url-fetch)
13435 ;; only the pypi tarballs contain the necessary metadata
13436 (uri (pypi-uri "backports.functools_lru_cache" version))
13437 (sha256
13438 (base32
13439 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
13440 (build-system python-build-system)
13441 (native-inputs
13442 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13443 (arguments
13444 `(#:python ,python-2))
13445 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13446 (synopsis "Backport of functools.lru_cache from Python 3.3")
13447 (description "@code{python2-backports-functools-lru-cache} is a backport
13448of @code{functools.lru_cache} from python 3.3.")
13449 (license license:expat)))
13450
13451(define-public python-configparser
13452 (package
13453 (name "python-configparser")
84127f8c 13454 (version "3.7.1")
44d10b1f
RW
13455 (source
13456 (origin
13457 (method url-fetch)
84127f8c 13458 (uri (pypi-uri "configparser" version))
44d10b1f
RW
13459 (sha256
13460 (base32
84127f8c 13461 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 13462 (build-system python-build-system)
809f003f 13463 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
13464 (synopsis "Backport of configparser from python 3.5")
13465 (description "@code{python-configparser} is a backport of
13466@code{configparser} from Python 3.5 so that it can be used directly
13467in other versions.")
13468 (license license:expat)))
13469
13470(define-public python2-configparser
13471 (package-with-python2 python-configparser))
13472
13473(define-public python-mando
13474 (package
13475 (name "python-mando")
13476 (version "0.6.4")
13477 (source (origin
13478 (method url-fetch)
13479 (uri (pypi-uri "mando" version))
13480 (sha256
13481 (base32
13482 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
13483 (build-system python-build-system)
13484 (propagated-inputs
13485 `(("python-rst2ansi" ,python-rst2ansi)
13486 ("python-six" ,python-six)))
13487 (native-inputs
13488 `(("python-pytest" ,python-pytest)))
13489 (home-page "https://mando.readthedocs.org/")
13490 (synopsis
13491 "Wrapper around argparse, allowing creation of complete CLI applications")
13492 (description
13493 "This package is a wrapper around argparse, allowing you to write complete CLI
13494applications in seconds while maintaining all the flexibility.")
13495 (license license:expat)))
13496
13497(define-public python2-mando
13498 (package-with-python2 python-mando))
13499
70daf82f
RW
13500(define-public python2-argparse
13501 (package
13502 (name "python2-argparse")
13503 (version "1.4.0")
13504 (source
13505 (origin
13506 (method url-fetch)
13507 (uri (pypi-uri "argparse" version))
13508 (sha256
13509 (base32
13510 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
13511 (build-system python-build-system)
13512 (arguments
13513 `(#:python ,python-2))
13514 (home-page "https://github.com/ThomasWaldmann/argparse/")
13515 (synopsis "Python command-line parsing library")
13516 (description
13517 "This package is mostly for people who want to have @code{argparse} on
13518older Pythons because it was not part of the standard library back then.")
13519 (license license:psfl)))
13520
44d10b1f
RW
13521(define-public python-fudge
13522 (package
13523 (name "python-fudge")
13524 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
13525 ;; package, which is currently the only use of this package.
13526 (version "0.9.6")
13527 (source
13528 (origin
13529 (method url-fetch)
13530 (uri (pypi-uri "fudge" version))
13531 (sha256
13532 (base32
13533 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
13534 (build-system python-build-system)
13535 (arguments
13536 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
13537 (home-page "https://github.com/fudge-py/fudge")
13538 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
13539 (description
13540 "Fudge is a Python module for using fake objects (mocks and stubs) to
13541test real ones.
13542
13543In readable Python code, you declare the methods available on your fake object
13544and how they should be called. Then you inject that into your application and
13545start testing. This declarative approach means you don’t have to record and
13546playback actions and you don’t have to inspect your fakes after running code.
13547If the fake object was used incorrectly then you’ll see an informative
13548exception message with a traceback that points to the culprit.")
13549 (license license:expat)))
13550
13551(define-public python2-fudge
13552 (package-with-python2 python-fudge))
13553
13554(define-public python-mwclient
13555 (package
13556 (name "python-mwclient")
957c6833 13557 (version "0.10.0")
44d10b1f
RW
13558 (source
13559 (origin
957c6833 13560 (method git-fetch)
44d10b1f 13561 ;; The PyPI version wouldn't contain tests.
957c6833
EF
13562 (uri (git-reference
13563 (url "https://github.com/mwclient/mwclient")
13564 (commit (string-append "v" version))))
13565 (file-name (git-file-name name version))
44d10b1f
RW
13566 (sha256
13567 (base32
957c6833 13568 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
44d10b1f
RW
13569 (build-system python-build-system)
13570 (propagated-inputs
957c6833 13571 `(("python-requests-oauthlib" ,python-requests-oauthlib)
44d10b1f
RW
13572 ("python-six" ,python-six)))
13573 (native-inputs
13574 `(("python-mock" ,python-mock)
13575 ("python-pytest" ,python-pytest)
44d10b1f 13576 ("python-pytest-cov" ,python-pytest-cov)
957c6833 13577 ("python-pytest-runner" ,python-pytest-runner)
44d10b1f
RW
13578 ("python-responses" ,python-responses)))
13579 (home-page "https://github.com/btongminh/mwclient")
13580 (synopsis "MediaWiki API client")
13581 (description "This package provides a MediaWiki API client.")
13582 (license license:expat)))
13583
13584(define-public python2-mwclient
13585 (package-with-python2 python-mwclient))
13586
13587(define-public python-utils
13588 (package
13589 (name "python-utils")
13590 (version "2.1.0")
13591 (source (origin
13592 (method url-fetch)
13593 (uri (pypi-uri "python-utils" version))
13594 (sha256
13595 (base32
13596 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
13597 (build-system python-build-system)
13598 (native-inputs
13599 `(("pytest-runner" ,python-pytest-runner)
13600 ("pytest" ,python-pytest)
13601 ("six" ,python-six)))
13602 (home-page "https://github.com/WoLpH/python-utils")
13603 (synopsis "Convenient utilities not included with the standard Python install")
13604 (description
13605 "Python Utils is a collection of small Python functions and classes which
13606make common patterns shorter and easier.")
13607 (license license:bsd-2)))
13608
13609(define-public python2-utils
13610 (package-with-python2 python-utils))
13611
44d10b1f
RW
13612(define-public python-diff-match-patch
13613 (package
13614 (name "python-diff-match-patch")
13615 (version "20121119")
13616 (source
13617 (origin
13618 (method url-fetch)
13619 (uri (pypi-uri "diff-match-patch" version))
13620 (sha256
13621 (base32
13622 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
13623 (build-system python-build-system)
13624 (home-page "https://code.google.com/p/google-diff-match-patch")
13625 (synopsis "Synchronize plain text")
13626 (description "Diff Match and Patch libraries offer robust algorithms to
13627perform the operations required for synchronizing plain text.")
13628 (license license:asl2.0)))
13629
13630(define-public python2-diff-match-patch
13631 (package-with-python2 python-diff-match-patch))
13632
13633(define-public python-dirsync
13634 (package
13635 (name "python-dirsync")
13636 (version "2.2.3")
13637 (source
13638 (origin
13639 (method url-fetch)
13640 (uri (pypi-uri "dirsync" version))
13641 (sha256
13642 (base32
13643 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
13644 (build-system python-build-system)
13645 (propagated-inputs
13646 `(("six" ,python-six)))
13647 (home-page "https://bitbucket.org/tkhyn/dirsync")
13648 (synopsis "Advanced directory tree synchronisation tool")
13649 (description "Advanced directory tree synchronisation tool.")
13650 (license license:expat)))
13651
13652(define-public python2-dirsync
13653 (package-with-python2 python-dirsync))
13654
13655(define-public python-levenshtein
13656 (package
13657 (name "python-levenshtein")
13658 (version "0.12.0")
13659 (source
13660 (origin
13661 (method url-fetch)
13662 (uri (pypi-uri "python-Levenshtein" version))
13663 (sha256
13664 (base32
13665 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13666 (build-system python-build-system)
13667 (home-page "https://github.com/ztane/python-Levenshtein")
13668 (synopsis "Fast computation of Levenshtein distance and string similarity")
13669 (description
13670 "The Levenshtein Python C extension module contains functions for fast computation of
13671@enumerate
13672@item Levenshtein (edit) distance, and edit operations
13673@item string similarity
13674@item approximate median strings, and generally string averaging
13675@item string sequence and set similarity
13676@end enumerate
13677It supports both normal and Unicode strings.")
13678 (license license:gpl2+)))
13679
13680(define-public python2-levenshtein
13681 (package-with-python2 python-levenshtein))
13682
13683(define-public python-scandir
13684 (package
13685 (name "python-scandir")
13686 (version "1.9.0")
13687 (source
13688 (origin
13689 (method url-fetch)
13690 (uri (pypi-uri "scandir" version))
13691 (sha256
13692 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13693 (build-system python-build-system)
13694 (arguments
13695 `(#:phases (modify-phases %standard-phases
13696 (replace 'check
13697 (lambda _
13698 (invoke "python" "test/run_tests.py"))))))
13699 (home-page "https://github.com/benhoyt/scandir")
13700 (synopsis "Directory iteration function")
13701 (description
13702 "Directory iteration function like os.listdir(), except that instead of
13703returning a list of bare filenames, it yields DirEntry objects that include
13704file type and stat information along with the name. Using scandir() increases
13705the speed of os.walk() by 2-20 times (depending on the platform and file
13706system) by avoiding unnecessary calls to os.stat() in most cases.
13707
13708This package is part of the Python standard library since version 3.5.")
13709 (license license:bsd-3)))
13710
13711(define-public python2-scandir
13712 (package-with-python2 python-scandir))
13713
13714(define-public python2-stemming
13715 (package
13716 (name "python2-stemming")
13717 (version "1.0.1")
13718 (source
13719 (origin
13720 (method url-fetch)
13721 (uri (pypi-uri "stemming" version))
13722 (sha256
13723 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13724 (build-system python-build-system)
13725 (arguments
13726 `(#:python ,python-2))
13727 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13728 (synopsis "Python implementations of various stemming algorithms")
13729 (description
13730 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13731stemming algorithms for English. These implementations are straightforward and
13732efficient, unlike some Python versions of the same algorithms available on the
13733Web. This package is an extraction of the stemming code included in the Whoosh
13734search engine.")
13735 (license license:public-domain)))
13736
13737(define-public python-factory-boy
13738 (package
13739 (name "python-factory-boy")
13740 (version "2.8.1")
13741 (source
13742 (origin
13743 (method url-fetch)
13744 (uri (pypi-uri "factory_boy" version))
13745 (sha256
13746 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13747 (build-system python-build-system)
13748 (arguments
13749 ;; Tests are not included in the tarball.
13750 `(#:tests? #f))
13751 (propagated-inputs
13752 `(("faker" ,python-faker)))
13753 (home-page "https://github.com/benhoyt/scandir")
13754 (synopsis "Versatile test fixtures replacement")
13755 (description
13756 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13757
13758As a fixtures replacement tool, it aims to replace static, hard to maintain
13759fixtures with easy-to-use factories for complex object.
13760
13761Instead of building an exhaustive test setup with every possible combination
13762of corner cases, factory_boy allows you to use objects customized for the
13763current test, while only declaring the test-specific fields")
13764 (license license:expat)))
13765
13766(define-public python2-factory-boy
13767 (package-with-python2 python-factory-boy))
13768
13769(define-public python-translate-toolkit
13770 (package
13771 (name "python-translate-toolkit")
13772 (version "2.1.0")
13773 (source
13774 (origin
13775 (method url-fetch)
13776 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13777 (sha256
13778 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13779 (build-system python-build-system)
13780 (native-inputs
13781 `(("python-pytest" ,python-pytest)
13782 ("python-sphinx" ,python-sphinx)))
13783 (propagated-inputs
13784 `(("python-babel" ,python-babel)
13785 ("python-beautifulsoup4" ,python-beautifulsoup4)
13786 ("python-chardet" ,python-chardet)
13787 ("python-diff-match-patch" ,python-diff-match-patch)
13788 ("python-levenshtein" ,python-levenshtein)
13789 ("python-lxml" ,python-lxml)
13790 ("python-six" ,python-six)
13791 ("python-vobject" ,python-vobject)
13792 ("python-pyyaml" ,python-pyyaml)))
13793 (arguments
13794 ;; TODO: tests are not run, because they end with
13795 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13796 ;; 'parse_funcs'
13797 ;; during test setup.
13798 `(#:tests? #f))
18919cf9 13799 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13800 (synopsis "Tools and API for translation and localization engineering")
13801 (description
13802 "Tools and API for translation and localization engineering. It contains
13803several utilities, as well as an API for building localization tools.")
13804 (license license:gpl2+)))
13805
13806(define-public python2-translate-toolkit
13807 (package-with-python2 python-translate-toolkit))
13808
13809(define-public python-packaging
13810 (package
13811 (name "python-packaging")
a72a1892 13812 (version "20.0")
44d10b1f
RW
13813 (source
13814 (origin
13815 (method url-fetch)
13816 (uri (pypi-uri "packaging" version))
20bf58bf
MB
13817 ;; XXX: The URL in the patch file is wrong, it should be
13818 ;; <https://github.com/pypa/packaging/pull/256>.
fdd0c369 13819 (patches (search-patches "python-packaging-test-arch.patch"))
44d10b1f
RW
13820 (sha256
13821 (base32
a72a1892 13822 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
44d10b1f
RW
13823 (build-system python-build-system)
13824 (arguments
13825 `(#:phases (modify-phases %standard-phases
13826 (replace 'check
13827 (lambda _ (invoke "py.test" "-vv"))))))
13828 (native-inputs
13829 `(("python-pretend" ,python-pretend)
13830 ("python-pytest" ,python-pytest)))
13831 (propagated-inputs
13832 `(("python-pyparsing" ,python-pyparsing)
13833 ("python-six" ,python-six)))
13834 (home-page "https://github.com/pypa/packaging")
13835 (synopsis "Core utilities for Python packages")
13836 (description "Packaging is a Python module for dealing with Python packages.
13837It offers an interface for working with package versions, names, and dependency
13838information.")
13839 ;; From 'LICENSE': This software is made available under the terms of
13840 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13841 ;; Contributions to this software is made under the terms of *both* these
13842 ;; licenses.
13843 (license (list license:asl2.0 license:bsd-2))))
13844
13845(define-public python2-packaging
13846 (package-with-python2 python-packaging))
13847
13848(define-public python-relatorio
13849 (package
13850 (name "python-relatorio")
13851 (version "0.8.0")
13852 (source
13853 (origin
13854 (method url-fetch)
13855 (uri (pypi-uri "relatorio" version))
13856 (sha256
13857 (base32
13858 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13859 (build-system python-build-system)
13860 (propagated-inputs
13861 `(("python-lxml" ,python-lxml)
13862 ("python-genshi" ,python-genshi)))
13863 (native-inputs
13864 `(("python-magic" ,python-magic)))
13865 (home-page "https://relatorio.tryton.org/")
13866 (synopsis "Templating library able to output ODT and PDF files")
13867 (description "Relatorio is a templating library which provides a way to
13868easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13869for more filetypes can be easily added by creating plugins for them.")
13870 (license license:gpl3+)))
13871
13872(define-public python2-relatorio
13873 (package-with-python2 python-relatorio))
13874
13875(define-public python-radon
13876 (package
13877 (name "python-radon")
f675ab4f 13878 (version "4.1.0")
44d10b1f
RW
13879 (source
13880 (origin
13881 (method url-fetch)
13882 (uri (pypi-uri "radon" version))
13883 (sha256
13884 (base32
f675ab4f 13885 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
44d10b1f
RW
13886 (build-system python-build-system)
13887 (arguments
13888 `(#:phases (modify-phases %standard-phases
13889 (replace 'check
13890 (lambda _
13891 (invoke "python" "radon/tests/run.py"))))))
13892 (propagated-inputs
13893 `(("python-colorama" ,python-colorama)
13894 ("python-flake8-polyfill" ,python-flake8-polyfill)
13895 ("python-mando" ,python-mando)))
13896 (native-inputs
13897 `(("python-pytest" ,python-pytest)
13898 ("python-pytest-mock" ,python-pytest-mock)))
13899 (home-page "https://radon.readthedocs.org/")
13900 (synopsis "Code Metrics in Python")
13901 (description "Radon is a Python tool which computes various code metrics.
13902Supported metrics are:
13903@itemize @bullet
13904@item raw metrics: SLOC, comment lines, blank lines, &c.
13905@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13906@item Halstead metrics (all of them)
13907@item the Maintainability Index (a Visual Studio metric)
13908@end itemize")
6bd7d4cb 13909 (properties `((python2-variant . ,(delay python2-radon))))
44d10b1f
RW
13910 (license license:expat)))
13911
13912(define-public python2-radon
6bd7d4cb
MB
13913 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
13914 (package
13915 (inherit base)
13916 (propagated-inputs
13917 `(("python-configparser" ,python2-configparser)
13918 ("python-future" ,python2-future)
13919 ,@(package-propagated-inputs base))))))
44d10b1f
RW
13920
13921(define-public python-sure
13922 (package
13923 (name "python-sure")
13924 (version "1.4.11")
13925 (source
13926 (origin
13927 (method url-fetch)
13928 (uri (pypi-uri "sure" version))
13929 (sha256
13930 (base32
13931 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13932 (build-system python-build-system)
13933 (propagated-inputs
13934 `(("python-mock" ,python-mock)
13935 ("python-six" ,python-six)))
13936 (native-inputs
13937 `(("python-nose" ,python-nose)))
13938 (home-page "https://github.com/gabrielfalcao/sure")
13939 (synopsis "Automated testing library in python for python")
13940 (description
13941 "Sure is a python library that leverages a DSL for writing assertions.
13942Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13943 (license license:gpl3+)))
13944
13945(define-public python2-sure
13946 (package-with-python2 python-sure))
13947
13948(define-public python2-couleur
13949 ;; This package does not seem to support python3 at all, hence,
13950 ;; only the python2 variant definition is provided.
13951 (package
13952 (name "python2-couleur")
13953 (version "0.6.2")
13954 (source
13955 (origin
13956 (method url-fetch)
13957 (uri (pypi-uri "couleur" version))
13958 (sha256
13959 (base32
13960 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13961 (build-system python-build-system)
13962 (arguments
13963 `(#:python ,python-2))
13964 (home-page "https://github.com/gabrielfalcao/couleur")
13965 (synopsis
13966 "ANSI terminal tool for python, colored shell and other handy fancy features")
13967 (description
13968 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13969terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13970 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13971 ;; https://github.com/gabrielfalcao/couleur/issues/11
13972 (license license:lgpl3+)))
13973
13974(define-public python-misaka
13975 (package
13976 (name "python-misaka")
0dcb3412 13977 (version "2.1.1")
44d10b1f
RW
13978 (source
13979 (origin
13980 (method url-fetch)
13981 (uri (pypi-uri "misaka" version))
13982 (sha256
13983 (base32
0dcb3412 13984 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13985 (build-system python-build-system)
13986 (arguments
13987 `(;; Line 37 of setup.py calls self.run_command('develop')
13988 ;; in the 'check' phase. This command seems to be trying
13989 ;; to write to
13990 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13991 ;; for which it does not have the permission to write.
13992 #:tests? #f))
13993 (propagated-inputs
13994 `(("python-cffi" ,python-cffi)))
13995 (home-page "https://github.com/FSX/misaka")
13996 (synopsis "Python binding for Hoedown")
13997 (description
13998 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13999library written in C. It features a fast HTML renderer and functionality to make custom
14000renderers (e.g. man pages or LaTeX).")
14001 (license license:expat)))
14002
14003(define-public python2-misaka
14004 (package-with-python2 python-misaka))
14005
14006(define-public python2-steadymark
14007 ;; This is forced into being a python2 only variant
14008 ;; due to its dependence on couleur that has no support
14009 ;; for python3
14010 (package
14011 (name "python2-steadymark")
14012 (version "0.7.3")
14013 (source
14014 (origin
14015 (method url-fetch)
14016 (uri (pypi-uri "steadymark" version))
14017 (sha256
14018 (base32
14019 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
14020 (build-system python-build-system)
14021 (native-inputs
14022 `(("python-couleur" ,python2-couleur)
14023 ("python-sure" ,python2-sure)
14024 ("python-misaka" ,python2-misaka)))
14025 (arguments
14026 `(#:python ,python-2
14027 #:phases
14028 (modify-phases %standard-phases
14029 (add-before 'build 'patch-setup-py
14030 (lambda _
14031 ;; Update requirements from dependency==version
14032 ;; to dependency>=version
14033 (substitute* "setup.py"
14034 (("==") ">="))
14035 #t)))))
14036 (home-page "https://github.com/gabrielfalcao/steadymark")
14037 (synopsis "Markdown-based test runner for python")
14038 (description
14039 "@code{Steadymark} allows documentation to be written in github-flavoured
14040markdown. The documentation may contain snippets of code surrounded by python
14041code blocks and @code{Steadymark} will find these snippets and run them, making
14042sure that there are no old malfunctional examples in the documentation examples.")
14043 (license license:expat)))
14044
14045(define-public python-jsonpointer
14046 (package
14047 (name "python-jsonpointer")
14048 (version "1.10")
14049 (source
14050 (origin
14051 (method url-fetch)
14052 (uri (pypi-uri "jsonpointer" version))
14053 (sha256
14054 (base32
14055 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
14056 (build-system python-build-system)
14057 (home-page "https://github.com/stefankoegl/python-json-pointer")
14058 (synopsis "Identify specific nodes in a JSON document")
14059 (description "@code{jsonpointer} allows you to access specific nodes
14060by path in a JSON document (see RFC 6901).")
14061 (license license:bsd-3)))
14062
14063(define-public python2-jsonpointer
14064 (package-with-python2 python-jsonpointer))
14065
14066(define-public python-jsonpatch
14067 (package
14068 (name "python-jsonpatch")
14069 (version "1.16")
14070 (source
14071 (origin
854c5c95 14072 (method git-fetch)
44d10b1f 14073 ;; pypi version lacks tests.js
854c5c95
EF
14074 (uri (git-reference
14075 (url "https://github.com/stefankoegl/python-json-patch")
14076 (commit (string-append "v" version))))
14077 (file-name (git-file-name name version))
44d10b1f
RW
14078 (sha256
14079 (base32
854c5c95 14080 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
44d10b1f
RW
14081 (build-system python-build-system)
14082 (native-inputs
14083 `(("python-jsonpointer" ,python-jsonpointer)))
14084 (home-page "https://github.com/stefankoegl/python-json-patch")
14085 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
14086 (description "@code{jsonpatch} is a library and program that allows
14087applying JSON Patches according to RFC 6902.")
14088 (license license:bsd-3)))
14089
14090(define-public python2-jsonpatch
14091 (package-with-python2 python-jsonpatch))
14092
14093(define-public python-jsonpatch-0.4
14094 (package (inherit python-jsonpatch)
14095 (name "python-jsonpatch")
14096 (version "0.4")
14097 (source
14098 (origin
a9722d0d
EF
14099 (method git-fetch)
14100 (uri (git-reference
14101 (url "https://github.com/stefankoegl/python-json-patch")
14102 (commit (string-append "v" version))))
14103 (file-name (git-file-name name version))
44d10b1f
RW
14104 (sha256
14105 (base32
a9722d0d 14106 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
44d10b1f
RW
14107
14108(define-public python2-jsonpatch-0.4
14109 (package-with-python2 python-jsonpatch-0.4))
14110
14111(define-public python-rfc3986
14112 (package
14113 (name "python-rfc3986")
14114 (version "1.1.0")
14115 (source (origin
14116 (method url-fetch)
14117 (uri (pypi-uri "rfc3986" version))
14118 (sha256
14119 (base32
14120 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
14121 (build-system python-build-system)
14122 (arguments
14123 `(#:modules ((guix build utils)
14124 (guix build python-build-system)
14125 (ice-9 ftw)
14126 (srfi srfi-1)
14127 (srfi srfi-26))
14128 #:phases
14129 (modify-phases %standard-phases
14130 (replace 'check
14131 (lambda _
14132 (let ((cwd (getcwd)))
14133 (setenv "PYTHONPATH"
14134 (string-append cwd "/build/"
14135 (find (cut string-prefix? "lib" <>)
14136 (scandir (string-append cwd "/build")))
14137 ":"
14138 (getenv "PYTHONPATH")))
14139 (invoke "pytest" "-v")))))))
14140 (native-inputs
14141 `(("python-pytest" ,python-pytest)))
14142 (home-page "https://rfc3986.readthedocs.io/")
14143 (synopsis "Parse and validate URI references")
14144 (description
14145 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
14146validation and authority parsing. This module also supports RFC@tie{}6874
14147which adds support for zone identifiers to IPv6 addresses.")
14148 (license license:asl2.0)))
14149
14150(define-public python2-rfc3986
14151 (package-with-python2 python-rfc3986))
14152
14153(define-public python-rfc3987
14154 (package
14155 (name "python-rfc3987")
14156 (version "1.3.7")
14157 (source
14158 (origin
14159 (method url-fetch)
14160 (uri (pypi-uri "rfc3987" version))
14161 (sha256
14162 (base32
14163 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
14164 (build-system python-build-system)
e85af137 14165 (home-page "https://pypi.org/project/rfc3987/")
44d10b1f
RW
14166 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
14167 (description "@code{rfc3987} provides routines for parsing and
14168validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
14169 (license license:gpl3+)))
14170
14171(define-public python2-rfc3987
14172 (package-with-python2 python-rfc3987))
14173
28030d29
MB
14174(define-public python-validators
14175 (package
14176 (name "python-validators")
14177 (version "0.14.2")
14178 (source (origin
14179 (method url-fetch)
14180 (uri (pypi-uri "validators" version))
14181 (sha256
14182 (base32
14183 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
14184 (build-system python-build-system)
14185 (arguments
14186 '(#:phases (modify-phases %standard-phases
14187 (replace 'check
14188 (lambda _
14189 (invoke "pytest" "-vv"))))))
14190 (propagated-inputs
14191 `(("python-decorator" ,python-decorator)
14192 ("python-six" ,python-six)))
14193 (native-inputs
14194 `(("python-flake8" ,python-flake8)
14195 ("python-isort" ,python-isort)
14196 ("python-pytest" ,python-pytest)))
14197 (home-page "https://github.com/kvesteri/validators")
14198 (synopsis "Data validation library")
14199 (description
14200 "This package contains validators for different things such as email
14201addresses, IP addresses, URLs, hashes and more. It has been designed to
14202be easy to use and not require defining a schema or form just to validate
14203some input.")
14204 (license license:expat)))
14205
14206(define-public python2-validators
14207 (package-with-python2 python-validators))
14208
44d10b1f
RW
14209(define-public python-validate-email
14210 (package
14211 (name "python-validate-email")
14212 (version "1.3")
14213 (source
14214 (origin
14215 (method url-fetch)
14216 (uri (pypi-uri "validate_email" version))
14217 (sha256
14218 (base32
14219 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
14220 (build-system python-build-system)
14221 (home-page "https://github.com/syrusakbary/validate_email")
14222 (synopsis "Verifies if an email address is valid and really exists")
14223 (description "@code{validate_email} can be used to verify if an email
14224address is valid and really exists.")
14225 (license license:lgpl3+)))
14226
14227(define-public python2-validate-email
14228 (package-with-python2 python-validate-email))
14229
14230(define-public python-flex
14231 (package
14232 (name "python-flex")
14233 (version "6.10.0")
14234 (source
14235 (origin
14236 (method url-fetch)
14237 (uri (pypi-uri "flex" version))
14238 (sha256
14239 (base32
14240 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
14241 (build-system python-build-system)
14242 (propagated-inputs
14243 `(("python-click" ,python-click)
14244 ("python-iso8601" ,python-iso8601)
14245 ("python-jsonpointer" ,python-jsonpointer)
14246 ("python-pyyaml" ,python-pyyaml)
14247 ("python-requests" ,python-requests)
14248 ("python-rfc3987" ,python-rfc3987)
14249 ("python-six" ,python-six)
14250 ("python-validate-email" ,python-validate-email)))
14251 (home-page "https://github.com/pipermerriam/flex")
14252 (synopsis "Validates Swagger schemata")
14253 (description "@code{flex} can be used to validate Swagger schemata.")
14254 (license license:bsd-3)))
14255
14256(define-public python2-flex
14257 (package-with-python2 python-flex))
14258
14259(define-public python-marshmallow
14260 (package
14261 (name "python-marshmallow")
14262 (version "3.0.0b14")
14263 (source
14264 (origin
14265 (method url-fetch)
14266 (uri (pypi-uri "marshmallow" version))
14267 (sha256
14268 (base32
14269 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
14270 (build-system python-build-system)
14271 (propagated-inputs
14272 `(("python-dateutil" ,python-dateutil)
14273 ("python-simplejson" ,python-simplejson)))
14274 (native-inputs
14275 `(("python-pytest" ,python-pytest)
14276 ("python-pytz" ,python-pytz)))
14277 (home-page "https://github.com/marshmallow-code/marshmallow")
14278 (synopsis "Convert complex datatypes to and from native
14279Python datatypes.")
14280 (description "@code{marshmallow} provides a library for converting
14281complex datatypes to and from native Python datatypes.")
14282 (license license:expat)))
14283
14284(define-public python2-marshmallow
14285 (package-with-python2 python-marshmallow))
14286
14287(define-public python-apispec
14288 (package
14289 (name "python-apispec")
14290 (version "0.25.3")
14291 (source
14292 (origin
14293 (method url-fetch)
14294 (uri (pypi-uri "apispec" version))
14295 (sha256
14296 (base32
14297 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
14298 (build-system python-build-system)
14299 (propagated-inputs
14300 `(("python-pyyaml" ,python-pyyaml)))
14301 (native-inputs
14302 `(("python-pytest" ,python-pytest)
14303 ("python-flask" ,python-flask)
14304 ("python-marshmallow" ,python-marshmallow)
14305 ("python-tornado" ,python-tornado)
14306 ("python-bottle" ,python-bottle)
14307 ("python-mock" ,python-mock)))
14308 (home-page "https://github.com/marshmallow-code/apispec")
14309 (synopsis "Swagger 2.0 API specification generator")
14310 (description "@code{python-apispec} is a pluggable API specification
14311generator. Currently supports the OpenAPI specification (f.k.a.
14312Swagger 2.0).")
14313 (license license:expat)))
14314
14315(define-public python2-apispec
14316 (package-with-python2 python-apispec))
14317
14318(define-public python-flasgger
14319 (package
14320 (name "python-flasgger")
14321 (version "0.6.3")
14322 (source
14323 (origin
1a04d421
TGR
14324 (method git-fetch)
14325 (uri (git-reference
14326 (url "https://github.com/rochacbruno/flasgger.git")
14327 (commit version)))
14328 (file-name (git-file-name name version))
44d10b1f 14329 (sha256
1a04d421 14330 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
14331 (build-system python-build-system)
14332 (arguments
14333 `(#:phases
14334 (modify-phases %standard-phases
14335 (replace 'check
14336 (lambda* (#:key inputs outputs #:allow-other-keys)
14337 (substitute* "Makefile"
14338 (("flake8 flasgger --ignore=F403")
14339 "flake8 flasgger --ignore=E731,F403"))
14340 (setenv "PYTHONPATH" (string-append (getcwd)
14341 ":"
14342 (getenv "PYTHONPATH")))
ac599a09 14343 (invoke "py.test"))))))
44d10b1f
RW
14344 (propagated-inputs
14345 `(("python-flask" ,python-flask)
14346 ("python-pyyaml" ,python-pyyaml)
14347 ("python-jsonschema" ,python-jsonschema)
14348 ("python-mistune" ,python-mistune)
14349 ("python-six" ,python-six)))
14350 (native-inputs
14351 `(("python-decorator" ,python-decorator)
14352 ("python-flake8" ,python-flake8)
14353 ("python-flask-restful" ,python-flask-restful)
14354 ("python-flex" ,python-flex)
14355 ("python-pytest" ,python-pytest)
14356 ("python-pytest-cov" ,python-pytest-cov)
14357 ("python-marshmallow" ,python-marshmallow)
14358 ("python-apispec" ,python-apispec)))
14359 (home-page "https://github.com/rochacbruno/flasgger/")
14360 (synopsis "Extract Swagger specs from your Flask project")
14361 (description "@code{python-flasgger} allows extracting Swagger specs
14362from your Flask project. It is a fork of Flask-Swagger.")
14363 (license license:expat)))
14364
14365(define-public python2-flasgger
14366 (package-with-python2 python-flasgger))
14367
14368(define-public python-swagger-spec-validator
14369 (package
14370 (name "python-swagger-spec-validator")
fe9c5b1d 14371 (version "2.4.3")
44d10b1f
RW
14372 (source
14373 (origin
14374 (method url-fetch)
14375 (uri (pypi-uri "swagger-spec-validator" version))
14376 (sha256
14377 (base32
fe9c5b1d 14378 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
14379 (build-system python-build-system)
14380 (propagated-inputs
14381 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 14382 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
14383 ("python-six" ,python-six)))
14384 (home-page
14385 "https://github.com/Yelp/swagger_spec_validator")
14386 (synopsis "Validation of Swagger specifications")
14387 (description "@code{swagger_spec_validator} provides a library for
14388validating Swagger API specifications.")
14389 (license license:asl2.0)))
14390
14391(define-public python2-swagger-spec-validator
14392 (package-with-python2 python-swagger-spec-validator))
14393
14394(define-public python-apache-libcloud
14395 (package
14396 (name "python-apache-libcloud")
14397 (version "2.4.0")
14398 (source
14399 (origin
14400 (method url-fetch)
14401 (uri (pypi-uri "apache-libcloud" version))
14402 (sha256
14403 (base32
14404 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
14405 (build-system python-build-system)
14406 (arguments
14407 `(#:phases
14408 (modify-phases %standard-phases
14409 (add-after 'unpack 'patch-ssh
14410 (lambda* (#:key inputs #:allow-other-keys)
14411 (substitute* "libcloud/compute/ssh.py"
14412 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
14413 "/bin/ssh" "'")))
14414 #t))
14415 (add-after 'unpack 'patch-tests
14416 (lambda _
14417 (substitute* "./libcloud/test/test_file_fixtures.py"
14418 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
14419 (("def _ascii") "def _raw_data(self, method, url, body, headers):
14420 return (httplib.OK,
14421 \"1234abcd\",
14422 {\"test\": \"value\"},
14423 httplib.responses[httplib.OK])
14424 def _ascii"))
14425 (substitute* "libcloud/test/compute/test_ssh_client.py"
14426 (("class ShellOutSSHClientTests")
14427 "@unittest.skip(\"Guix container doesn't have ssh service\")
14428class ShellOutSSHClientTests")
14429 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
14430 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
14431 (("'.xF0', '.x90', '.x8D', '.x88'")
14432 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
14433 #t))
14434 (add-before 'check 'copy-secret
14435 (lambda _
14436 (copy-file "libcloud/test/secrets.py-dist"
14437 "libcloud/test/secrets.py")
14438 #t)))))
14439 (inputs
14440 `(("openssh" ,openssh)))
14441 (propagated-inputs
14442 `(("python-paramiko" ,python-paramiko)
14443 ("python-requests" ,python-requests)))
14444 (native-inputs
14445 `(("python-lockfile" ,python-lockfile)
14446 ("python-mock" ,python-mock)
14447 ("python-pytest" ,python-pytest)
14448 ("python-pytest-runner" ,python-pytest-runner)
14449 ("python-requests-mock" ,python-requests-mock)))
14450 (home-page "https://libcloud.apache.org/")
14451 (synopsis "Unified Cloud API")
14452 (description "@code{libcloud} is a Python library for interacting with
14453many of the popular cloud service providers using a unified API.")
14454 (license license:asl2.0)))
14455
14456(define-public python2-apache-libcloud
14457 (package-with-python2 python-apache-libcloud))
14458
1639e0b7 14459(define-public python-smmap
44d10b1f 14460 (package
1639e0b7
MC
14461 (name "python-smmap")
14462 (version "3.0.1")
44d10b1f
RW
14463 (source
14464 (origin
14465 (method url-fetch)
1639e0b7 14466 (uri (pypi-uri "smmap" version))
44d10b1f 14467 (sha256
1639e0b7 14468 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
44d10b1f
RW
14469 (build-system python-build-system)
14470 (native-inputs
14471 `(("python-nosexcover" ,python-nosexcover)))
14472 (home-page "https://github.com/Byron/smmap")
14473 (synopsis "Python sliding window memory map manager")
1639e0b7 14474 (description "@code{smmap} is a pure Python implementation of a sliding
44d10b1f
RW
14475window memory map manager.")
14476 (license license:bsd-3)))
14477
1639e0b7
MC
14478(define-public python-smmap2
14479 (deprecated-package "python-smmap2" python-smmap))
14480
14481(define-public python2-smmap
14482 (package-with-python2 python-smmap))
14483
44d10b1f 14484(define-public python2-smmap2
1639e0b7 14485 (deprecated-package "python2-smmap2" python2-smmap))
44d10b1f
RW
14486
14487(define-public python-regex
14488 (package
14489 (name "python-regex")
c187c9d7 14490 (version "2019.04.14")
44d10b1f
RW
14491 (source (origin
14492 (method url-fetch)
14493 (uri (pypi-uri "regex" version))
14494 (sha256
14495 (base32
c187c9d7
BT
14496 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
14497 ;; TODO: Fix and enable regex_test.py tests that complain about the
14498 ;; test.support module not existing.
44d10b1f
RW
14499 (build-system python-build-system)
14500 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
14501 (synopsis "Alternative regular expression module")
14502 (description "This regular expression implementation is backwards-
14503compatible with the standard @code{re} module, but offers additional
14504functionality like full case-folding for case-insensitive matches in Unicode.")
14505 (license license:psfl)))
14506
14507(define-public python2-regex
14508 (package-with-python2 python-regex))
14509
14510(define-public python2-pyopengl
14511 (package
14512 (name "python2-pyopengl")
14513 (version "3.1.0")
14514 (source
14515 (origin
14516 (method url-fetch)
14517 (uri (pypi-uri "PyOpenGL" version))
14518 (sha256
14519 (base32
14520 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
14521 (arguments
14522 `(#:python ,python-2))
14523 (build-system python-build-system)
14524 (home-page "http://pyopengl.sourceforge.net")
14525 (synopsis "Standard OpenGL bindings for Python")
14526 (description
14527 "PyOpenGL is the most common cross platform Python binding to OpenGL and
14528related APIs. The binding is created using the standard @code{ctypes}
14529library.")
14530 (license license:bsd-3)))
14531
14532(define-public python2-pyopengl-accelerate
14533 (package
14534 (inherit python2-pyopengl)
14535 (name "python2-pyopengl-accelerate")
14536 (version "3.1.0")
14537 (source
14538 (origin
14539 (method url-fetch)
14540 (uri (pypi-uri "PyOpenGL-accelerate" version))
14541 (sha256
14542 (base32
14543 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
14544 (synopsis "Acceleration code for PyOpenGL")
14545 (description
14546 "This is the Cython-coded accelerator module for PyOpenGL.")))
14547
14548(define-public python-rencode
14549 (package
14550 (name "python-rencode")
14551 (version "1.0.5")
14552 (source
14553 (origin
14554 (method url-fetch)
14555 (uri (pypi-uri "rencode" version))
14556 (sha256
14557 (base32
14558 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
14559 (build-system python-build-system)
14560 (arguments
14561 `(#:phases
14562 (modify-phases %standard-phases
14563 (add-before 'check 'delete-bogus-test
14564 ;; This test requires /home/aresch/Downloads, which is not provided by
14565 ;; the build environment.
14566 (lambda _
14567 (delete-file "rencode/t.py")
14568 #t)))))
14569 (native-inputs `(("pkg-config" ,pkg-config)
14570 ("python-cython" ,python-cython)))
14571 (home-page "https://github.com/aresch/rencode")
14572 (synopsis "Serialization of heterogeneous data structures")
14573 (description
14574 "The @code{rencode} module is a data structure serialization library,
14575similar to @code{bencode} from the BitTorrent project. For complex,
14576heterogeneous data structures with many small elements, r-encoding stake up
14577significantly less space than b-encodings. This version of rencode is a
14578complete rewrite in Cython to attempt to increase the performance over the
14579pure Python module.")
14580 (license license:bsd-3)))
14581
14582(define-public python2-rencode
14583 (package-with-python2 python-rencode))
14584
14585(define-public python-xenon
14586 (package
14587 (name "python-xenon")
8c06d6d8 14588 (version "0.7.0")
44d10b1f
RW
14589 (source
14590 (origin
14591 (method url-fetch)
14592 (uri (pypi-uri "xenon" version))
14593 (sha256
14594 (base32
8c06d6d8 14595 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
44d10b1f
RW
14596 (build-system python-build-system)
14597 (native-inputs
14598 `(("python-pyyaml" ,python-pyyaml)
14599 ("python-radon" ,python-radon)
14600 ("python-requests" ,python-requests)
14601 ("python-flake8" ,python-flake8)
14602 ("python-tox" ,python-tox)))
14603 (arguments
8c06d6d8
MC
14604 `(#:tests? #f ;test suite not shipped with the PyPI archive
14605 #:phases
44d10b1f
RW
14606 (modify-phases %standard-phases
14607 (add-before 'build 'patch-test-requirements
14608 (lambda _
14609 ;; Remove httpretty dependency for tests.
14610 (substitute* "setup.py"
14611 (("httpretty") ""))
14612 #t)))))
14613 (home-page "https://xenon.readthedocs.org/")
14614 (synopsis "Monitor code metrics for Python on your CI server")
14615 (description
14616 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
14617Ideally, @code{xenon} is run every time code is committed. Through command
14618line options, various thresholds can be set for the complexity of code. It
14619will fail (i.e. it will exit with a non-zero exit code) when any of these
14620requirements is not met.")
14621 (license license:expat)))
14622
14623(define-public python2-xenon
14624 (package-with-python2 python-xenon))
14625
14626(define-public python-pysocks
14627 (package
14628 (name "python-pysocks")
b8725cdf 14629 (version "1.7.0")
44d10b1f
RW
14630 (source
14631 (origin
14632 (method url-fetch)
14633 (uri (pypi-uri "PySocks" version))
14634 (sha256
14635 (base32
b8725cdf 14636 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
14637 (build-system python-build-system)
14638 (arguments `(#:tests? #f))
14639 (home-page "https://github.com/Anorov/PySocks")
14640 (synopsis "SOCKS client module")
14641 (description "@code{pysocks} is an updated and semi-actively maintained
14642version of @code{SocksiPy} with bug fixes and extra features.")
14643 (license license:bsd-3)))
14644
14645(define-public python2-pysocks
14646 (package-with-python2 python-pysocks))
14647
14648(define-public python-pydiff
14649 (package
14650 (name "python-pydiff")
14651 (version "0.2")
14652 (source
14653 (origin
14654 (method url-fetch)
14655 (uri (pypi-uri "pydiff" version))
14656 (sha256
14657 (base32
14658 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
14659 (build-system python-build-system)
14660 (home-page "https://github.com/myint/pydiff")
14661 (synopsis "Library to diff two Python files at the bytecode level")
14662 (description
14663 "@code{pydiff} makes it easy to look for actual code changes while
14664ignoring formatting changes.")
14665 (license license:expat)))
14666
14667(define-public python2-pydiff
14668 (package-with-python2 python-pydiff))
14669
14670(define-public python-tqdm
14671 (package
14672 (name "python-tqdm")
8317c89a 14673 (version "4.43.0")
44d10b1f
RW
14674 (source
14675 (origin
14676 (method url-fetch)
14677 (uri (pypi-uri "tqdm" version))
14678 (sha256
14679 (base32
8317c89a 14680 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
44d10b1f 14681 (build-system python-build-system)
8317c89a
MB
14682 (arguments
14683 '(#:phases (modify-phases %standard-phases
14684 (replace 'check
14685 (lambda* (#:key inputs outputs #:allow-other-keys)
14686 (add-installed-pythonpath inputs outputs)
14687 ;; This invokation is taken from tox.ini.
14688 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
14689 "-d" "-v" "tqdm/"))))))
44d10b1f 14690 (native-inputs
8317c89a 14691 `(("python-nose" ,python-nose)))
44d10b1f
RW
14692 (home-page "https://github.com/tqdm/tqdm")
14693 (synopsis "Fast, extensible progress meter")
14694 (description
14695 "Make loops show a progress bar on the console by just wrapping any
14696iterable with @code{|tqdm(iterable)|}. Offers many options to define
14697design and layout.")
8317c89a 14698 (license (list license:mpl2.0 license:expat))))
44d10b1f
RW
14699
14700(define-public python2-tqdm
8317c89a 14701 (package-with-python2 python-tqdm))
44d10b1f
RW
14702
14703(define-public python-pkginfo
14704 (package
14705 (name "python-pkginfo")
14706 (version "1.4.2")
14707 (source
14708 (origin
14709 (method url-fetch)
14710 (uri (pypi-uri "pkginfo" version))
14711 (sha256
14712 (base32
14713 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14714 (build-system python-build-system)
14715 (arguments
14716 ;; The tests are broken upstream.
14717 '(#:tests? #f))
14718 (home-page
14719 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14720 (synopsis
14721 "Query metadatdata from sdists, bdists, and installed packages")
14722 (description
14723 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14724source distriubtion (an sdist) or a binary distribution (e.g., created by
14725running bdist_egg). It can also query the EGG-INFO directory of an installed
14726distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14727created by running @code{python setup.py develop}).")
14728 (license license:expat)))
14729
14730(define-public python2-pkginfo
14731 (package-with-python2 python-pkginfo))
14732
14733(define-public python-twine
14734 (package
14735 (name "python-twine")
14736 (version "1.9.1")
14737 (source
14738 (origin
14739 (method url-fetch)
14740 (uri (pypi-uri "twine" version))
14741 (sha256
14742 (base32
14743 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14744 (build-system python-build-system)
14745 (propagated-inputs
14746 `(("python-tqdm" ,python-tqdm)
14747 ("python-pkginfo" ,python-pkginfo)
14748 ("python-requests" ,python-requests)
14749 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14750 (home-page "https://github.com/pypa/twine")
14751 (synopsis "Collection of utilities for interacting with PyPI")
14752 (description
14753 "@code{twine} currently supports registering projects and uploading
14754distributions. It authenticates the user over HTTPS, allows them to pre-sign
14755their files and supports any packaging format (including wheels).")
14756 (license license:asl2.0)))
14757
14758(define-public python2-twine
14759 (package-with-python2 python-twine))
14760
14761(define-public python-linecache2
14762 (package
14763 (name "python-linecache2")
14764 (version "1.0.0")
14765 (source
14766 (origin
14767 (method url-fetch)
14768 (uri (pypi-uri "linecache2" version))
14769 (sha256
14770 (base32
14771 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14772 (build-system python-build-system)
14773 (arguments
14774 `(;; The tests depend on unittest2, and our version is a bit too old.
14775 #:tests? #f))
14776 (native-inputs
14777 `(("python-pbr" ,python-pbr-minimal)))
14778 (home-page
14779 "https://github.com/testing-cabal/linecache2")
14780 (synopsis "Backports of the linecache module")
14781 (description
14782 "The linecache module allows one to get any line from any file, while
14783attempting to optimize internally, using a cache, the common case where many
14784lines are read from a single file.")
14785 (license license:psfl)))
14786
14787(define-public python2-linecache2
14788 (package-with-python2 python-linecache2))
14789
14790(define-public python-traceback2
14791 (package
14792 (name "python-traceback2")
14793 (version "1.4.0")
14794 (source
14795 (origin
14796 (method url-fetch)
14797 (uri (pypi-uri "traceback2" version))
14798 (sha256
14799 (base32
14800 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14801 (build-system python-build-system)
14802 (arguments
14803 `(;; python-traceback2 and python-unittest2 depend on one another.
14804 #:tests? #f))
14805 (native-inputs
14806 `(("python-pbr" ,python-pbr-minimal)))
14807 (propagated-inputs
14808 `(("python-linecache2" ,python-linecache2)))
14809 (home-page
14810 "https://github.com/testing-cabal/traceback2")
14811 (synopsis "Backports of the traceback module")
14812 (description
14813 "This module provides a standard interface to extract, format and print
14814stack traces of Python programs. It exactly mimics the behavior of the Python
14815interpreter when it prints a stack trace.")
14816 (license license:psfl)))
14817
14818(define-public python2-traceback2
14819 (package-with-python2 python-traceback2))
14820
14821(define-public python-ratelimiter
14822 (package
14823 (name "python-ratelimiter")
14824 (version "1.2.0")
14825 (source
14826 (origin
14827 (method url-fetch)
14828 (uri (pypi-uri "ratelimiter" version))
14829 (sha256
14830 (base32
14831 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14832 (build-system python-build-system)
14833 (arguments
14834 '(#:tests? #f)) ; There are no tests in the pypi archive.
14835 (home-page "https://github.com/RazerM/ratelimiter")
14836 (synopsis "Simple rate limiting object")
14837 (description
14838 "The @code{ratelimiter} module ensures that an operation will not be
14839executed more than a given number of times during a given period.")
14840 (license license:asl2.0)))
14841
14842(define-public python2-ratelimiter
14843 (package-with-python2 python-ratelimiter))
14844
14845(define-public python-dukpy
14846 (package
14847 (name "python-dukpy")
14848 (version "0.3")
14849 (source
14850 (origin
5b77ebe1
TGR
14851 (method git-fetch)
14852 (uri (git-reference
14853 (url "https://github.com/kovidgoyal/dukpy.git")
14854 (commit (string-append "v" version))))
14855 (file-name (git-file-name name version))
44d10b1f 14856 (sha256
5b77ebe1 14857 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14858 (build-system python-build-system)
14859 (home-page "https://github.com/kovidgoyal/dukpy")
14860 (synopsis "Run JavaScript in python")
14861 (description
14862 "dukpy is a JavaScript runtime environment for Python using the duktape
14863embeddable JavaScript engine.")
14864 ;; Dukpy is licensed under MIT like the embedded duktape library,
14865 ;; with 'errors.c' as GPL3.
14866 (license (list license:expat license:gpl3))))
14867
14868(define-public python2-dukpy
14869 (package-with-python2 python-dukpy))
14870
14871(define-public python-jsonrpclib-pelix
14872 (package
14873 (name "python-jsonrpclib-pelix")
14874 (version "0.3.2")
14875 (source
14876 (origin
14877 (method url-fetch)
14878 (uri (pypi-uri "jsonrpclib-pelix" version))
14879 (sha256
14880 (base32
14881 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14882 (build-system python-build-system)
14883 (arguments
14884 `(#:tests? #f)) ; no tests in PyPI tarball
14885 (home-page "https://github.com/tcalmant/jsonrpclib/")
14886 (synopsis "JSON-RPC 2.0 client library for Python")
14887 (description
14888 "This library implements the JSON-RPC v2.0
14889specification (backwards-compatible) as a client library for Python. This
14890version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14891services.")
14892 (license license:asl2.0)))
14893
14894(define-public python2-jsonrpclib-pelix
14895 (package-with-python2 python-jsonrpclib-pelix))
14896
14897(define-public python-setuptools-scm-git-archive
14898 (package
14899 (name "python-setuptools-scm-git-archive")
14900 (version "1.0")
14901 (source
14902 (origin
14903 (method url-fetch)
14904 (uri (pypi-uri "setuptools_scm_git_archive" version))
14905 (sha256
14906 (base32
14907 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14908 (build-system python-build-system)
14909 (native-inputs
14910 `(("python-pytest" ,python-pytest)))
14911 (propagated-inputs
14912 `(("python-setuptools-scm" ,python-setuptools-scm)))
14913 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14914 (synopsis "Setuptools_scm plugin for git archives")
14915 (description
14916 "The setuptools_scm_git_archive package is a plugin to
14917setuptools_scm, which supports obtaining versions from git archives that
14918belong to tagged versions.")
14919 (license license:expat)))
14920
14921(define-public python2-setuptools-scm-git-archive
14922 (package-with-python2 python-setuptools-scm-git-archive))
14923
724a350c
RW
14924(define-public python-setuptools-git
14925 (package
14926 (name "python-setuptools-git")
14927 (version "1.2")
14928 (source
14929 (origin
14930 (method url-fetch)
14931 (uri (pypi-uri "setuptools-git" version))
14932 (sha256
14933 (base32
14934 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14935 (build-system python-build-system)
14936 (arguments
14937 `(#:phases
14938 (modify-phases %standard-phases
14939 ;; This is needed for tests.
14940 (add-after 'unpack 'configure-git
14941 (lambda _
14942 (setenv "HOME" "/tmp")
14943 (invoke "git" "config" "--global" "user.email" "guix")
14944 (invoke "git" "config" "--global" "user.name" "guix")
14945 #t)))))
14946 (native-inputs
14947 `(("git" ,git-minimal)))
14948 (home-page "https://github.com/msabramo/setuptools-git")
14949 (synopsis "Setuptools revision control system plugin for Git")
14950 (description
14951 "This package provides a plugin for Setuptools for revision control with
14952Git.")
14953 (license license:bsd-3)))
14954
44d10b1f
RW
14955(define-public python-pyclipper
14956 (package
14957 (name "python-pyclipper")
ff3d1b99 14958 (version "1.1.0.post3")
44d10b1f
RW
14959 (source
14960 (origin
14961 (method url-fetch)
14962 (uri (pypi-uri "pyclipper" version ".zip"))
14963 (sha256
ff3d1b99 14964 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14965 (modules '((guix build utils)))
14966 (snippet
14967 '(begin
14968 ;; This file is generated by Cython.
14969 (delete-file "pyclipper/pyclipper.cpp") #t))))
14970 (build-system python-build-system)
14971 (arguments
14972 `(#:phases
14973 (modify-phases %standard-phases
14974 (add-before 'build 'cythonize-sources
14975 (lambda _
14976 (with-directory-excursion "pyclipper"
14977 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14978 (propagated-inputs
14979 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14980 (native-inputs
14981 `(("python-cython" ,python-cython)
14982 ("python-pytest" ,python-pytest)
14983 ("python-pytest-runner" ,python-pytest-runner)
14984 ("python-unittest2" ,python-unittest2)
14985 ("unzip" ,unzip)))
14986 (home-page "https://github.com/greginvm/pyclipper")
14987 (synopsis "Wrapper for Angus Johnson's Clipper library")
14988 (description
14989 "Pyclipper is a Cython wrapper for the C++ translation of the
14990Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14991 (license license:expat)))
14992
14993(define-public python2-pyclipper
14994 (package-with-python2 python-pyclipper))
14995
14996(define-public python2-booleanoperations
14997 (package
14998 (name "python2-booleanoperations")
14999 (version "0.7.1")
15000 (source
15001 (origin
15002 (method url-fetch)
15003 (uri (pypi-uri "booleanOperations" version ".zip"))
15004 (sha256
15005 (base32
15006 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
15007 (build-system python-build-system)
15008 (arguments
15009 `(#:python ,python-2))
15010 (native-inputs
15011 `(("unzip" ,unzip)
15012 ("python2-pytest" ,python2-pytest)
15013 ("python2-pytest-runner" ,python2-pytest-runner)))
15014 (propagated-inputs
15015 `(("python-fonttools" ,python2-fonttools)
15016 ("python-pyclipper" ,python2-pyclipper)
15017 ("python-ufolib" ,python2-ufolib)))
15018 (home-page "https://github.com/typemytype/booleanOperations")
15019 (synopsis "Boolean operations on paths")
15020 (description
15021 "BooleanOperations provides a Python library that enables
15022boolean operations on paths.")
15023 (license license:expat)))
15024
15025(define-public python-tempdir
15026 (package
15027 (name "python-tempdir")
15028 (version "0.7.1")
15029 (source
15030 (origin
15031 (method url-fetch)
15032 (uri (pypi-uri "tempdir" version))
15033 (sha256
15034 (base32
15035 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
15036 (build-system python-build-system)
15037 (home-page "https://pypi.org/project/tempdir/")
15038 (arguments
15039 ;; the package has no tests
15040 '(#:tests? #f))
15041 (synopsis "Python library for managing temporary directories")
15042 (description
15043 "This library manages temporary directories that are automatically
15044deleted with all their contents when they are no longer needed. It is
15045particularly convenient for use in tests.")
15046 (license license:expat)))
15047
15048(define-public python2-tempdir
15049 (package-with-python2 python-tempdir))
15050
15051(define-public python-activepapers
15052 (package
15053 (name "python-activepapers")
15054 (version "0.2.2")
15055 (source
15056 (origin
15057 (method url-fetch)
15058 (uri (pypi-uri "ActivePapers.Py" version))
15059 (sha256
15060 (base32
15061 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
15062 (build-system python-build-system)
15063 (arguments
15064 `(#:modules ((ice-9 ftw)
15065 (srfi srfi-1)
15066 (guix build utils)
15067 (guix build python-build-system))
15068
15069 #:phases
15070 (modify-phases %standard-phases
15071 (add-after 'unpack 'delete-python2-code
15072 (lambda _
15073 (for-each delete-file
15074 '("lib/activepapers/builtins2.py"
15075 "lib/activepapers/standardlib2.py"
15076 "lib/activepapers/utility2.py"))))
15077 (replace 'check
15078 (lambda _
15079 ;; Deactivate the test cases that download files
15080 (setenv "NO_NETWORK_ACCESS" "1")
15081 ;; For some strange reason, some tests fail if nosetests runs all
15082 ;; test modules in a single execution. They pass if each test
15083 ;; module is run individually.
15084 (for-each (lambda (filename)
15085 (invoke "nosetests"
15086 (string-append "tests/" filename)))
15087 (scandir "tests"
15088 (lambda (filename)
15089 (string-suffix? ".py" filename)))))))))
15090 (native-inputs
15091 `(("python-tempdir" ,python-tempdir)
15092 ("python-nose" ,python-nose)))
15093 (propagated-inputs
15094 `(("python-h5py" ,python-h5py)))
26827dfe 15095 (home-page "https://www.activepapers.org/")
44d10b1f
RW
15096 (synopsis "Executable papers for scientific computing")
15097 (description
15098 "ActivePapers is a tool for working with executable papers, which
15099combine data, code, and documentation in single-file packages,
15100suitable for publication as supplementary material or on repositories
15101such as figshare or Zenodo.")
15102 (properties `((python2-variant . ,(delay python2-activepapers))))
15103 (license license:bsd-3)))
15104
15105(define-public python2-activepapers
15106 (let ((base (package-with-python2
15107 (strip-python2-variant python-activepapers))))
15108 (package
15109 (inherit base)
15110 (arguments
15111 (substitute-keyword-arguments (package-arguments base)
15112 ((#:phases phases)
15113 `(modify-phases ,phases
15114 (delete 'delete-python2-code)
15115 (add-after 'unpack 'delete-python3-code
15116 (lambda _
15117 (for-each delete-file
15118 '("lib/activepapers/builtins3.py"
15119 "lib/activepapers/standardlib3.py"
15120 "lib/activepapers/utility3.py")))))))))))
15121
15122(define-public python-semver
15123 (package
15124 (name "python-semver")
594280b1 15125 (version "2.9.0")
44d10b1f 15126 (source
2ecbba24
BG
15127 (origin
15128 (method url-fetch)
15129 (uri (pypi-uri "semver" version))
15130 (sha256
15131 (base32
15132 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
44d10b1f 15133 (build-system python-build-system)
44d10b1f 15134 (native-inputs
b4e1ca06
RJ
15135 `(("python-appdirs" ,python-appdirs)
15136 ("python-distlib" ,python-distlib)
15137 ("python-importlib-metadata" ,python-importlib-metadata)
15138 ("python-filelock" ,python-filelock)
15139 ("python-six" ,python-six)
15140 ("python-tox" ,python-tox)
44d10b1f
RW
15141 ("python-virtualenv" ,python-virtualenv)))
15142 (home-page "https://github.com/k-bx/python-semver")
15143 (synopsis "Python helper for Semantic Versioning")
15144 (description "This package provides a Python library for
15145@url{Semantic Versioning, http://semver.org/}.")
15146 (license license:bsd-3)))
15147
15148(define-public python2-semver
15149 (package-with-python2 python-semver))
15150
15151(define-public python-pyro4
15152 (package
15153 (name "python-pyro4")
3ce91d44 15154 (version "4.77")
44d10b1f
RW
15155 (source
15156 (origin
15157 (method url-fetch)
15158 (uri (pypi-uri "Pyro4" version))
15159 (sha256
3ce91d44 15160 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 15161 (build-system python-build-system)
3ce91d44
GL
15162 (arguments
15163 '(#:tests? #f)) ;FIXME: Some tests require network access.
15164 (native-inputs
15165 `(("python-cloudpickle" ,python-cloudpickle)
15166 ("python-dill" ,python-dill)
15167 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
15168 (propagated-inputs
15169 `(("python-serpent" ,python-serpent)))
15170 (home-page "https://pyro4.readthedocs.io")
15171 (synopsis "Distributed object middleware for Python")
15172 (description
15173 "Pyro enables you to build applications in which objects can talk to each
15174other over the network. You can just use normal Python method calls to call
15175objects on other machines, also known as remote procedure calls (RPC).")
15176 (license license:expat)))
15177
15178(define-public python2-pyro
15179 (package
15180 (name "python2-pyro")
15181 (version "3.16")
15182 (source
15183 (origin
15184 (method url-fetch)
15185 (uri (pypi-uri "Pyro" version))
15186 (file-name (string-append "Pyro-" version ".tar.gz"))
15187 (sha256
15188 (base32
15189 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
15190 (build-system python-build-system)
15191 (arguments
15192 ;; Pyro is not compatible with Python 3
15193 `(#:python ,python-2
15194 ;; Pyro has no test cases for automatic execution
15195 #:tests? #f))
26be188f 15196 (home-page "https://pythonhosted.org/Pyro/")
44d10b1f
RW
15197 (synopsis "Distributed object manager for Python")
15198 (description "Pyro is a Distributed Object Technology system
15199written in Python that is designed to be easy to use. It resembles
15200Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
15201which is a system and language independent Distributed Object Technology
15202and has much more to offer than Pyro or RMI. Pyro 3.x is no
15203longer maintained. New projects should use Pyro4 instead, which
15204is the new Pyro version that is actively developed.")
15205 (license license:expat)))
15206
15207(define-public python2-scientific
15208 (package
15209 (name "python2-scientific")
15210 (version "2.9.4")
15211 (source
15212 (origin
c695f011
KH
15213 (method git-fetch)
15214 (uri (git-reference
15215 (url "https://github.com/khinsen/ScientificPython")
15216 (commit (string-append "rel" version))))
15217 (file-name (git-file-name name version))
44d10b1f
RW
15218 (sha256
15219 (base32
c695f011 15220 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
15221 (build-system python-build-system)
15222 (inputs
15223 `(("netcdf" ,netcdf)))
15224 (propagated-inputs
15225 `(("python-numpy" ,python2-numpy-1.8)
15226 ("python-pyro" ,python2-pyro)))
15227 (arguments
15228 ;; ScientificPython is not compatible with Python 3
15229 `(#:python ,python-2
15230 #:tests? #f ; No test suite
15231 #:phases
15232 (modify-phases %standard-phases
15233 (replace 'build
15234 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
15235 (invoke "python" "setup.py" "build"
15236 (string-append "--netcdf_prefix="
15237 (assoc-ref inputs "netcdf"))))))))
c695f011 15238 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
15239 (synopsis "Python modules for scientific computing")
15240 (description "ScientificPython is a collection of Python modules that are
15241useful for scientific computing. Most modules are rather general (Geometry,
15242physical units, automatic derivatives, ...) whereas others are more
15243domain-specific (e.g. netCDF and PDB support). The library is currently
15244not actively maintained and works only with Python 2 and NumPy < 1.9.")
15245 (license license:cecill-c)))
15246
15247(define-public python2-mmtk
15248 (package
15249 (name "python2-mmtk")
fe9b72c5 15250 (version "2.7.12")
44d10b1f
RW
15251 (source
15252 (origin
fe9b72c5
KH
15253 (method git-fetch)
15254 (uri (git-reference
15255 (url "https://github.com/khinsen/MMTK")
15256 (commit (string-append "rel" version))))
15257 (file-name (git-file-name name version))
44d10b1f
RW
15258 (sha256
15259 (base32
fe9b72c5 15260 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
15261 (build-system python-build-system)
15262 (native-inputs
15263 `(("netcdf" ,netcdf)))
15264 (propagated-inputs
15265 `(("python-scientific" ,python2-scientific)
15266 ("python-tkinter" ,python-2 "tk")))
15267 (arguments
15268 `(#:python ,python-2
15269 #:tests? #f
15270 #:phases
15271 (modify-phases %standard-phases
15272 (add-before 'build 'includes-from-scientific
15273 (lambda* (#:key inputs #:allow-other-keys)
15274 (mkdir-p "Include/Scientific")
15275 (copy-recursively
15276 (string-append
15277 (assoc-ref inputs "python-scientific")
15278 "/include/python2.7/Scientific")
15279 "Include/Scientific"))))))
15280 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
15281 (synopsis "Python library for molecular simulation")
15282 (description "MMTK is a library for molecular simulations with an emphasis
15283on biomolecules. It provides widely used methods such as Molecular Dynamics
15284and normal mode analysis, but also basic routines for implementing new methods
15285for simulation and analysis. The library is currently not actively maintained
15286and works only with Python 2 and NumPy < 1.9.")
15287 (license license:cecill-c)))
15288
15289(define-public python-phonenumbers
15290 (package
15291 (name "python-phonenumbers")
15292 (version "8.9.1")
15293 (source
15294 (origin
15295 (method url-fetch)
15296 (uri (pypi-uri "phonenumbers" version))
15297 (sha256
15298 (base32
15299 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
15300 (build-system python-build-system)
15301 (home-page
15302 "https://github.com/daviddrysdale/python-phonenumbers")
15303 (synopsis
15304 "Python library for dealing with international phone numbers")
15305 (description
15306 "This package provides a Python port of Google's libphonenumber library.")
15307 (license license:asl2.0)))
15308
15309(define-public python2-phonenumbers
15310 (package-with-python2 python-phonenumbers))
15311
15312(define-public python-send2trash
15313 (package
15314 (name "python-send2trash")
d9b0216b 15315 (version "1.5.0")
44d10b1f 15316 (source
d9b0216b 15317 (origin (method git-fetch)
44d10b1f 15318 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
15319 (uri (git-reference
15320 (url "https://github.com/hsoft/send2trash.git")
15321 (commit version)))
15322 (file-name (git-file-name name version))
44d10b1f
RW
15323 (sha256
15324 (base32
d9b0216b 15325 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
15326 (build-system python-build-system)
15327 (arguments
15328 '(#:phases
15329 (modify-phases %standard-phases
15330 (add-before 'check 'pre-check
15331 (lambda _
15332 (mkdir-p "/tmp/foo")
15333 (setenv "HOME" "/tmp/foo")
15334 #t)))))
15335 (home-page "https://github.com/hsoft/send2trash")
15336 (synopsis "Send files to the user's @file{~/Trash} directory")
15337 (description "This package provides a Python library to send files to the
15338user's @file{~/Trash} directory.")
20b3fde7 15339 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
15340 (license license:bsd-3)))
15341
15342(define-public python2-send2trash
15343 (package
f32164ab 15344 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
15345 (arguments
15346 (substitute-keyword-arguments (package-arguments python-send2trash)
15347 ((#:phases phases)
15348 `(modify-phases ,phases
15349 (add-before 'check 'setenv
15350 (lambda _
15351 (setenv "PYTHONPATH"
15352 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 15353 #t))))))))
44d10b1f
RW
15354
15355(define-public python-yapf
15356 (package
15357 (name "python-yapf")
19ba75dc 15358 (version "0.29.0")
44d10b1f
RW
15359 (source
15360 (origin
15361 (method url-fetch)
15362 (uri (pypi-uri "yapf" version))
15363 (sha256
15364 (base32
19ba75dc 15365 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
44d10b1f
RW
15366 (build-system python-build-system)
15367 (home-page "https://github.com/google/yapf")
15368 (synopsis "Formatter for Python code")
15369 (description "YAPF is a formatter for Python code. It's based off of
15370@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
15371takes the code and reformats it to the best formatting that conforms to the
15372style guide, even if the original code didn't violate the style guide.")
15373 (license license:asl2.0)))
15374
15375(define-public python2-yapf
15376 (package-with-python2 python-yapf))
15377
15378(define-public python-gyp
15379 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
15380 (revision "0"))
15381 (package
15382 (name "python-gyp")
15383 ;; Google does not release versions,
15384 ;; based on second most recent commit date.
15385 (version (git-version "0.0.0" revision commit))
15386 (source
15387 (origin
15388 ;; Google does not release tarballs,
15389 ;; git checkout is needed.
15390 (method git-fetch)
15391 (uri (git-reference
15392 (url "https://chromium.googlesource.com/external/gyp")
15393 (commit commit)))
15394 (file-name (git-file-name name version))
15395 (sha256
15396 (base32
15397 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
15398 (build-system python-build-system)
15399 (home-page "https://gyp.gsrc.io/")
15400 (synopsis "GYP is a Meta-Build system")
15401 (description
15402 "GYP builds build systems for large, cross platform applications.
15403It can be used to generate XCode projects, Visual Studio projects, Ninja build
15404files, and Makefiles.")
15405 (license license:bsd-3))))
15406
15407(define-public python2-gyp
15408 (package-with-python2 python-gyp))
15409
15410(define-public python-whatever
15411 (package
15412 (name "python-whatever")
97610a66 15413 (version "0.6")
44d10b1f
RW
15414 (source
15415 (origin
ac0ea38c
EF
15416 (method git-fetch)
15417 (uri (git-reference
15418 (url "https://github.com/Suor/whatever")
15419 (commit version)))
15420 (file-name (git-file-name name version))
44d10b1f 15421 (sha256
ac0ea38c 15422 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
44d10b1f
RW
15423 (build-system python-build-system)
15424 (arguments
15425 `(#:phases
15426 (modify-phases %standard-phases
15427 (replace 'check
15428 (lambda _
15429 (invoke "py.test"))))))
15430 (native-inputs
15431 `(("python-pytest" ,python-pytest)))
15432 (home-page "http://github.com/Suor/whatever")
15433 (synopsis "Make anonymous functions by partial application of operators")
15434 (description "@code{whatever} provides an easy way to make anonymous
15435functions by partial application of operators.")
15436 (license license:bsd-3)))
15437
15438(define-public python2-whatever
15439 (package-with-python2 python-whatever))
15440
15441(define-public python-funcy
15442 (package
15443 (name "python-funcy")
9e396ab8 15444 (version "1.11")
44d10b1f
RW
15445 (source
15446 (origin
a85c6027
TGR
15447 (method git-fetch)
15448 (uri (git-reference
15449 (url "https://github.com/Suor/funcy.git")
15450 (commit version)))
44d10b1f 15451 (sha256
a85c6027
TGR
15452 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
15453 (file-name (git-file-name name version))))
44d10b1f
RW
15454 (build-system python-build-system)
15455 (arguments
15456 `(#:phases
15457 (modify-phases %standard-phases
15458 (replace 'check
15459 (lambda _
15460 (invoke "py.test"))))))
15461 (native-inputs
15462 `(("python-pytest" ,python-pytest)
15463 ("python-whatever" ,python-whatever)))
15464 (home-page "http://github.com/Suor/funcy")
15465 (synopsis "Functional tools")
15466 (description "@code{funcy} is a library that provides functional tools.
15467Examples are:
15468@enumerate
15469@item merge - Merges collections of the same type
15470@item walk - Type-preserving map
15471@item select - Selects a part of a collection
15472@item take - Takes the first n items of a collection
15473@item first - Takes the first item of a collection
15474@item remove - Predicated-removes items of a collection
15475@item concat - Concatenates two collections
15476@item flatten - Flattens a collection with subcollections
15477@item distinct - Returns only distinct items
15478@item split - Predicated-splits a collection
15479@item split_at - Splits a collection at a given item
15480@item group_by - Groups items by group
15481@item pairwise - Pairs off adjacent items
15482@item partial - Partially-applies a function
15483@item curry - Curries a function
15484@item compose - Composes functions
15485@item complement - Complements a predicate
15486@item all_fn - \"all\" with predicate
15487@end enumerate")
15488 (license license:bsd-3)))
15489
15490(define-public python2-funcy
15491 (package-with-python2 python-funcy))
15492
15493(define-public python-isoweek
15494 (package
15495 (name "python-isoweek")
15496 (version "1.3.3")
15497 (source
15498 (origin
15499 (method url-fetch)
15500 (uri (pypi-uri "isoweek" version))
15501 (sha256
15502 (base32
15503 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
15504 (build-system python-build-system)
15505 (home-page "https://github.com/gisle/isoweek")
15506 (synopsis "Objects representing a week")
15507 (description "The @code{isoweek} module provide the class Week that
15508implements the week definition of ISO 8601. This standard also defines
15509a notation for identifying weeks; yyyyWww (where the W is a literal).
15510Week instances stringify to this form.")
15511 (license license:bsd-3)))
15512
15513(define-public python2-isoweek
15514 (package-with-python2 python-isoweek))
15515
15516(define-public python-tokenize-rt
15517 (package
15518 (name "python-tokenize-rt")
15519 (version "2.0.1")
15520 (source
15521 (origin
15522 (method url-fetch)
15523 (uri (pypi-uri "tokenize-rt" version))
15524 (sha256
15525 (base32
15526 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
15527 (build-system python-build-system)
15528 (home-page "https://github.com/asottile/tokenize-rt")
15529 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
15530 (description
15531 "This Python library is a wrapper around @code{tokenize} from the Python
15532standard library. It provides two additional tokens @code{ESCAPED_NL} and
15533@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
15534and @code{tokens_to_src} to roundtrip.")
15535 (license license:expat)))
15536
15537(define-public python-future-fstrings
15538 (package
15539 (name "python-future-fstrings")
15540 (version "0.4.1")
15541 (source
15542 (origin
15543 (method url-fetch)
15544 (uri (pypi-uri "future_fstrings" version))
15545 (sha256
15546 (base32
15547 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
15548 (build-system python-build-system)
15549 (propagated-inputs
15550 `(("python-tokenize-rt" ,python-tokenize-rt)))
15551 (home-page "https://github.com/asottile/future-fstrings")
15552 (synopsis "Backport of fstrings to Python < 3.6")
15553 (description
15554 "This package provides a UTF-8 compatible encoding
15555@code{future_fstrings}, which performs source manipulation. It decodes the
15556source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
15557@code{f} strings.")
15558 (license license:expat)))
15559
dae2eb1c
MC
15560(define-public python-typed-ast
15561 (package
15562 (name "python-typed-ast")
bae89583 15563 (version "1.4.0")
dae2eb1c
MC
15564 (source
15565 (origin
bae89583
MO
15566 (method git-fetch)
15567 (uri (git-reference
15568 (url "https://github.com/python/typed_ast.git")
15569 (commit version)))
dae2eb1c 15570 (sha256
bae89583
MO
15571 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
15572 (file-name (git-file-name name version))))
dae2eb1c
MC
15573 (build-system python-build-system)
15574 (arguments
15575 `(#:modules ((guix build utils)
15576 (guix build python-build-system)
15577 (ice-9 ftw)
15578 (srfi srfi-1)
15579 (srfi srfi-26))
15580 #:phases
15581 (modify-phases %standard-phases
15582 (replace 'check
15583 (lambda _
15584 (let ((cwd (getcwd)))
15585 (setenv "PYTHONPATH"
15586 (string-append cwd "/build/"
15587 (find (cut string-prefix? "lib" <>)
15588 (scandir (string-append cwd "/build")))
15589 ":"
15590 (getenv "PYTHONPATH"))))
15591 (invoke "pytest")
15592 #t)))))
15593 (native-inputs `(("python-pytest" ,python-pytest)))
15594 (home-page "https://github.com/python/typed_ast")
15595 (synopsis "Fork of Python @code{ast} modules with type comment support")
15596 (description "This package provides a parser similar to the standard
15597@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
15598include PEP 484 type comments and are independent of the version of Python
15599under which they are run. The @code{typed_ast} parsers produce the standard
15600Python AST (plus type comments), and are both fast and correct, as they are
15601based on the CPython 2.7 and 3.7 parsers.")
15602 ;; See the file "LICENSE" for the details.
15603 (license (list license:psfl
15604 license:asl2.0
15605 license:expat)))) ;ast27/Parser/spark.py
15606
44d10b1f
RW
15607(define-public python-typing
15608 (package
15609 (name "python-typing")
15610 (version "3.6.6")
15611 (source
15612 (origin
15613 (method url-fetch)
15614 (uri (pypi-uri "typing" version))
15615 (sha256
15616 (base32
15617 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
15618 (build-system python-build-system)
15619 (home-page "https://docs.python.org/3/library/typing.html")
15620 (synopsis "Type hints for Python")
15621 (description "This is a backport of the standard library @code{typing}
15622module to Python versions older than 3.5. Typing defines a standard notation
15623for Python function and variable type annotations. The notation can be used
15624for documenting code in a concise, standard format, and it has been designed
15625to also be used by static and runtime type checkers, static analyzers, IDEs
15626and other tools.")
15627 (license license:psfl)))
15628
15629(define-public python2-typing
15630 (package-with-python2 python-typing))
15631
f89d443b
VC
15632(define-public python-typing-extensions
15633 (package
15634 (name "python-typing-extensions")
99f3fdd1 15635 (version "3.7.4.1")
f89d443b
VC
15636 (source
15637 (origin
15638 (method url-fetch)
15639 (uri (pypi-uri "typing_extensions" version))
15640 (sha256
15641 (base32
99f3fdd1 15642 "1wj1vcgbnm20aiinmphyxfrbv3qi9xdhvw89ab3qm42y9n4wq7h9"))))
f89d443b
VC
15643 (build-system python-build-system)
15644 (home-page
15645 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
15646 (synopsis "Experimental type hints for Python")
15647 (description
15648 "The typing_extensions module contains additional @code{typing} hints not
15649yet present in the of the @code{typing} standard library.
15650Included are implementations of:
15651@enumerate
15652@item ClassVar
15653@item ContextManager
15654@item Counter
15655@item DefaultDict
15656@item Deque
15657@item NewType
15658@item NoReturn
15659@item overload
15660@item Protocol
15661@item runtime
15662@item Text
15663@item Type
15664@item TYPE_CHECKING
15665@item AsyncGenerator
15666@end enumerate\n")
15667 (license license:psfl)))
15668
44d10b1f
RW
15669(define-public bpython
15670 (package
15671 (name "bpython")
4de93b2f 15672 (version "0.18")
44d10b1f
RW
15673 (source
15674 (origin
15675 (method url-fetch)
15676 (uri (pypi-uri "bpython" version))
15677 (sha256
4de93b2f 15678 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
15679 (build-system python-build-system)
15680 (arguments
15681 `(#:phases
15682 (modify-phases %standard-phases
15683 (add-after 'unpack 'remove-failing-test
15684 (lambda _
15685 ;; Remove failing test. FIXME: make it pass
15686 (delete-file "bpython/test/test_args.py")
15687 #t))
15688 (add-after 'wrap 'add-aliases
15689 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15690 (lambda* (#:key outputs #:allow-other-keys)
15691 (let ((out (assoc-ref outputs "out")))
15692 (for-each
15693 (lambda (old new)
15694 (symlink old (string-append out "/bin/" new)))
15695 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
15696 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
15697 #t)))))
15698 (propagated-inputs
15699 `(("python-pygments" ,python-pygments)
15700 ("python-requests" ,python-requests)
4de93b2f 15701 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
15702 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
15703 ("python-greenlet" ,python-greenlet)
4de93b2f 15704 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
15705 ("python-six" ,python-six)))
15706 (native-inputs
15707 `(("python-sphinx" ,python-sphinx)
15708 ("python-mock" ,python-mock)))
15709 (home-page "https://bpython-interpreter.org/")
15710 (synopsis "Fancy interface to the Python interpreter")
15711 (description "Bpython is a fancy interface to the Python
15712interpreter. bpython's main features are
15713
15714@enumerate
15715@item in-line syntax highlighting,
15716@item readline-like autocomplete with suggestions displayed as you type,
15717@item expected parameter list for any Python function,
15718@item \"rewind\" function to pop the last line of code from memory and
15719 re-evaluate,
15720@item send the code you've entered off to a pastebin,
15721@item save the code you've entered to a file, and
15722@item auto-indentation.
15723@end enumerate")
15724 (license license:expat)))
15725
15726(define-public bpython2
15727 (let ((base (package-with-python2
15728 (strip-python2-variant bpython))))
15729 (package (inherit base)
15730 (name "bpython2")
15731 (arguments
15732 `(#:python ,python-2
15733 #:phases
15734 (modify-phases %standard-phases
15735 (add-after 'unpack 'remove-failing-test
15736 (lambda _
15737 ;; Remove failing test. FIXME: make it pass
15738 (delete-file "bpython/test/test_args.py")
15739 ;; Disable failing test-cases (renaming inhibits they are
15740 ;; discovered)
15741 (substitute* "bpython/test/test_curtsies_repl.py"
15742 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15743 (string-append a "xxx_off_" b))
15744 (("^(\\s*def )(test_complex\\W)" _ a b)
15745 (string-append a "xxx_off_" b)))
15746 #t))
15747 (add-before 'build 'rename-scripts
15748 ;; rename the scripts to bypthon2, bpdb2, etc.
15749 (lambda _
15750 (substitute* "setup.py"
15751 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15752 (string-append name "2" rest "\n"))
15753 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15754 (string-append name "2" (or sub "") rest "\n")))
15755 #t))))))))
15756
15757(define-public python-pyinotify
15758 (package
15759 (name "python-pyinotify")
15760 (version "0.9.6")
15761 (source (origin
15762 (method url-fetch)
15763 (uri (pypi-uri "pyinotify" version))
15764 (sha256
15765 (base32
15766 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15767 (build-system python-build-system)
15768 (arguments `(#:tests? #f)) ;no tests
15769 (home-page "https://github.com/seb-m/pyinotify")
15770 (synopsis "Python library for monitoring inotify events")
15771 (description
15772 "@code{pyinotify} provides a Python interface for monitoring
15773file system events on Linux.")
15774 (license license:expat)))
15775
15776(define-public python2-pyinotify
15777 (package-with-python2 python-pyinotify))
15778
15779;; Ada parser uses this version.
15780(define-public python2-quex-0.67.3
15781 (package
15782 (name "python2-quex")
15783 (version "0.67.3")
15784 (source
15785 (origin
15786 (method url-fetch)
15787 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15788 (version-major+minor version)
15789 "/quex-" version ".zip"))
15790 (sha256
15791 (base32
15792 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15793 (build-system python-build-system)
15794 (native-inputs
15795 `(("unzip" ,unzip)))
15796 (arguments
15797 `(#:python ,python-2
15798 #:tests? #f
15799 #:phases
15800 (modify-phases %standard-phases
15801 (delete 'configure)
15802 (delete 'build)
15803 (replace 'install
15804 (lambda* (#:key outputs #:allow-other-keys)
15805 (let* ((out (assoc-ref outputs "out"))
15806 (share/quex (string-append out "/share/quex"))
15807 (bin (string-append out "/bin")))
15808 (copy-recursively "." share/quex)
15809 (mkdir-p bin)
15810 (symlink (string-append share/quex "/quex-exe.py")
15811 (string-append bin "/quex"))
15812 #t))))))
15813 (native-search-paths
15814 (list (search-path-specification
15815 (variable "QUEX_PATH")
15816 (files '("share/quex")))))
15817 (home-page "http://quex.sourceforge.net/")
15818 (synopsis "Lexical analyzer generator in Python")
15819 (description "@code{quex} is a lexical analyzer generator in Python.")
15820 (license license:lgpl2.1+))) ; Non-military
15821
15822(define-public python2-quex
15823 (package (inherit python2-quex-0.67.3)
15824 (name "python2-quex")
15825 (version "0.68.1")
15826 (source
15827 (origin
15828 (method url-fetch)
15829 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15830 (sha256
15831 (base32
15832 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15833 (file-name (string-append name "-" version ".tar.gz"))))))
15834
15835(define-public python-more-itertools
15836 (package
15837 (name "python-more-itertools")
1b066827 15838 (version "7.1.0")
44d10b1f
RW
15839 (source
15840 (origin
15841 (method url-fetch)
15842 (uri (pypi-uri "more-itertools" version))
15843 (sha256
15844 (base32
1b066827 15845 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15846 (build-system python-build-system)
44d10b1f
RW
15847 (home-page "https://github.com/erikrose/more-itertools")
15848 (synopsis "More routines for operating on iterables, beyond itertools")
15849 (description "Python's built-in @code{itertools} module implements a
15850number of iterator building blocks inspired by constructs from APL, Haskell,
15851and SML. @code{more-itertools} includes additional building blocks for
15852working with iterables.")
47f66348 15853 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15854 (license license:expat)))
15855
47f66348 15856;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15857(define-public python2-more-itertools
47f66348
MB
15858 (package
15859 (inherit python-more-itertools)
15860 (name "python2-more-itertools")
15861 (version "5.0.0")
15862 (source (origin
15863 (method url-fetch)
15864 (uri (pypi-uri "more-itertools" version))
15865 (sha256
15866 (base32
15867 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15868 (arguments
15869 `(#:python ,python2-minimal))
15870 (propagated-inputs
15871 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15872
15873(define-public python-latexcodec
15874 (package
15875 (name "python-latexcodec")
f3415ba5 15876 (version "1.0.7")
44d10b1f
RW
15877 (source
15878 (origin
15879 (method url-fetch)
15880 (uri (pypi-uri "latexcodec" version))
15881 (sha256
f3415ba5 15882 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15883 (build-system python-build-system)
15884 (inputs
15885 `(("python-six" ,python-six)))
15886 (home-page "https://readthedocs.org/projects/latexcodec/")
15887 (synopsis "Work with LaTeX code in Python")
15888 (description "Lexer and codec to work with LaTeX code in Python.")
15889 (license license:expat)))
15890
15891(define-public python-pybtex
15892 (package
15893 (name "python-pybtex")
9441a9c1 15894 (version "0.22.2")
44d10b1f
RW
15895 (source
15896 (origin
15897 (method url-fetch)
15898 (uri (pypi-uri "pybtex" version))
15899 (sha256
9441a9c1 15900 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15901 (build-system python-build-system)
15902 (native-inputs
15903 `(("python-nose" ,python-nose)))
15904 (inputs
15905 `(("python-latexcodec" ,python-latexcodec)
15906 ("python-pyyaml" ,python-pyyaml)
15907 ("python-six" ,python-six)))
15908 (arguments
15909 `(#:test-target "nosetests"))
15910 (home-page "https://pybtex.org/")
15911 (synopsis "BibTeX-compatible bibliography processor")
15912 (description "Pybtex is a BibTeX-compatible bibliography processor written
15913in Python. You can simply type pybtex instead of bibtex.")
15914 (license license:expat)))
15915
15916(define-public python-onetimepass
15917 (package
15918 (name "python-onetimepass")
15919 (version "1.0.1")
15920 (source
15921 (origin
15922 (method url-fetch)
15923 (uri (pypi-uri "onetimepass" version))
15924 (sha256
15925 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15926 (build-system python-build-system)
15927 (propagated-inputs `(("python-six" ,python-six)))
15928 (home-page "https://github.com/tadeck/onetimepass/")
15929 (synopsis "One-time password library")
15930 (description "Python one-time password library for HMAC-based (HOTP) and
15931time-based (TOTP) passwords.")
15932 (license license:expat)))
15933
15934(define-public python-parso
15935 (package
15936 (name "python-parso")
a4abed71 15937 (version "0.6.2")
44d10b1f
RW
15938 (source
15939 (origin
15940 (method url-fetch)
15941 (uri (pypi-uri "parso" version))
15942 (sha256
15943 (base32
a4abed71 15944 "0mr1j4ijqnrihz1yap34g6i8vjldg5lz814sz4v0d8pbqvh5jmhc"))))
44d10b1f
RW
15945 (native-inputs
15946 `(("python-pytest" ,python-pytest)))
15947 (build-system python-build-system)
4eb97c25
MC
15948 (arguments
15949 `(#:phases (modify-phases %standard-phases
15950 (replace 'check
15951 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15952 (home-page "https://github.com/davidhalter/parso")
15953 (synopsis "Python Parser")
15954 (description "Parso is a Python parser that supports error recovery and
15955round-trip parsing for different Python versions (in multiple Python versions).
15956Parso is also able to list multiple syntax errors in your Python file.")
15957 (license license:expat)))
15958
15959(define-public python2-parso
15960 (package-with-python2 python-parso))
15961
dcff9bda
MB
15962;; This version is required for Jedi@0.15, which in turn is needed for
15963;; python-language-server.
15964(define-public python-parso-0.5
15965 (package
15966 (inherit python-parso)
15967 (version "0.5.2")
15968 (source (origin
15969 (method url-fetch)
15970 (uri (pypi-uri "parso" version))
15971 (sha256
15972 (base32
15973 "1qgvrkpma7vylrk047mxxvqd66nwqk978n3ig2w8iz9m3bgjbksm"))))))
15974
44d10b1f
RW
15975(define-public python-async-generator
15976 (package
15977 (name "python-async-generator")
94fcbf8d 15978 (version "1.10")
44d10b1f
RW
15979 (source
15980 (origin
15981 (method url-fetch)
15982 (uri (pypi-uri "async_generator" version))
15983 (sha256
15984 (base32
94fcbf8d 15985 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15986 (build-system python-build-system)
15987 (native-inputs
15988 `(("python-pytest" ,python-pytest)))
15989 (home-page "https://github.com/python-trio/async_generator")
15990 (synopsis "Async generators and context managers for Python 3.5+")
15991 (description "@code{async_generator} back-ports Python 3.6's native async
15992generators and Python 3.7's context managers into Python 3.5.")
15993 ;; Dual licensed.
15994 (license (list license:expat license:asl2.0))))
15995
15996(define-public python-async-timeout
15997 (package
15998 (name "python-async-timeout")
15999 (version "3.0.1")
16000 (source
16001 (origin
16002 (method url-fetch)
16003 (uri (pypi-uri "async-timeout" version))
16004 (sha256
16005 (base32
16006 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
16007 (build-system python-build-system)
16008 (home-page "https://github.com/aio-libs/async_timeout/")
16009 (synopsis "Timeout context manager for asyncio programs")
16010 (description "@code{async-timeout} provides a timeout timeout context
16011manager compatible with @code{asyncio}.")
16012 (license license:asl2.0)))
16013
16014(define-public python-glob2
16015 (package
16016 (name "python-glob2")
4df49d19 16017 (version "0.7")
8fa2bcc7
TGR
16018 (source
16019 (origin
16020 (method git-fetch)
16021 (uri (git-reference
16022 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 16023 (commit (string-append "v" version))))
8fa2bcc7
TGR
16024 (file-name (git-file-name name version))
16025 (sha256
4df49d19 16026 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
16027 (build-system python-build-system)
16028 (home-page "https://github.com/miracle2k/python-glob2/")
16029 (synopsis "Extended Version of the python buildin glob module")
16030 (description "This is an extended version of the Python
16031@url{http://docs.python.org/library/glob.html, built-in glob module} which
16032adds:
16033
16034@itemize
16035@item The ability to capture the text matched by glob patterns, and return
16036those matches alongside the file names.
16037@item A recursive @code{**} globbing syntax, akin for example to the
16038@code{globstar} option of Bash.
16039@item The ability to replace the file system functions used, in order to glob
16040on virtual file systems.
16041@item Compatible with Python 2 and Python 3 (tested with 3.3).
16042@end itemize
16043
16044Glob2 currently based on the glob code from Python 3.3.1.")
16045 (license license:bsd-2)))
16046
16047(define-public python2-glob2
16048 (package-with-python2 python-glob2))
16049
16050(define-public python-gipc
16051 (package
16052 (name "python-gipc")
16053 (version "0.6.0")
16054 (source
16055 (origin
16056 (method url-fetch)
16057 (uri (pypi-uri "gipc" version ".zip"))
16058 (sha256
16059 (base32
16060 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
16061 (build-system python-build-system)
16062 (native-inputs
16063 `(("unzip" ,unzip)))
16064 (propagated-inputs
16065 `(("python-gevent" ,python-gevent)))
fd3ae040 16066 (home-page "https://gehrcke.de/gipc/")
44d10b1f
RW
16067 (synopsis "Child process management in the context of gevent")
16068 (description "Usage of Python's multiprocessing package in a
16069gevent-powered application may raise problems. With @code{gipc},
16070process-based child processes can safely be created anywhere within a
16071gevent-powered application.")
16072 (license license:expat)))
16073
16074(define-public python2-gipc
16075 (package-with-python2 python-gipc))
16076
16077(define-public python-fusepy
16078 (package
16079 (name "python-fusepy")
16080 (version "2.0.4")
16081 (source
16082 (origin
16083 (method url-fetch)
16084 (uri (pypi-uri "fusepy" version))
16085 (sha256
16086 (base32
16087 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
16088 (build-system python-build-system)
16089 (arguments
16090 `(#:phases
16091 (modify-phases %standard-phases
16092 (add-before 'build 'set-library-file-name
16093 (lambda* (#:key inputs #:allow-other-keys)
16094 (let ((fuse (assoc-ref inputs "fuse")))
16095 (substitute* "fuse.py"
16096 (("find_library\\('fuse'\\)")
16097 (string-append "'" fuse "/lib/libfuse.so'")))
16098 #t))))))
16099 (propagated-inputs
16100 `(("fuse" ,fuse)))
16101 (home-page "https://github.com/fusepy/fusepy")
16102 (synopsis "Simple ctypes bindings for FUSE")
16103 (description "Python module that provides a simple interface to FUSE and
16104MacFUSE. The binding is created using the standard @code{ctypes} library.")
16105 (license license:isc)))
16106
16107(define-public python2-fusepy
16108 (package-with-python2 python-fusepy))
16109
2eb09a5c
EF
16110(define-public python-fusepyng
16111 (package
16112 (name "python-fusepyng")
16113 (version "1.0.7")
16114 (source
16115 (origin
16116 (method url-fetch)
16117 (uri (pypi-uri "fusepyng" version))
16118 (sha256
16119 (base32
16120 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
16121 (build-system python-build-system)
16122 (arguments
16123 '(#:phases
16124 (modify-phases %standard-phases
16125 (add-after 'unpack 'set-libfuse-path
16126 (lambda* (#:key inputs #:allow-other-keys)
16127 (let ((fuse (assoc-ref inputs "fuse")))
16128 (substitute* "fusepyng.py"
16129 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
16130 (string-append "\"" fuse "/lib/libfuse.so\""))))
16131 #t)))))
16132 (inputs
16133 `(("fuse" ,fuse)))
16134 (propagated-inputs
16135 `(("python-paramiko" ,python-paramiko)))
16136 (home-page "https://github.com/rianhunter/fusepyng")
16137 (synopsis "Simple ctypes bindings for FUSE")
16138 (description "@code{fusepyng} is a Python module that provides a simple
16139interface to FUSE on various operating systems. It's just one file and is
16140implemented using @code{ctypes}.")
16141 (license license:isc)))
16142
44d10b1f
RW
16143(define-public python2-gdrivefs
16144 (package
16145 (name "python2-gdrivefs")
16146 (version "0.14.9")
16147 (source
16148 (origin
16149 (method url-fetch)
16150 (uri (pypi-uri "gdrivefs" version))
16151 (sha256
16152 (base32
16153 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
16154 (build-system python-build-system)
16155 (arguments
16156 `(#:python ,python-2
16157 #:phases
16158 (modify-phases %standard-phases
16159 (add-before 'build 'patch-setup-py
16160 (lambda _
16161 ;; Update requirements from dependency==version
16162 ;; to dependency>=version
16163 (substitute* "gdrivefs/resources/requirements.txt"
16164 (("==") ">="))
16165 #t)))))
16166 (native-inputs
16167 `(("python2-gipc" ,python2-gipc)
16168 ("python2-gevent" ,python2-gevent)
16169 ("python2-greenlet" ,python2-greenlet)
16170 ("python2-httplib2" ,python2-httplib2)
16171 ("python2-uritemplate" ,python2-uritemplate)
16172 ("python2-oauth2client" ,python2-oauth2client)
16173 ("python2-six" ,python2-six)))
16174 (propagated-inputs
16175 `(("python2-dateutil" ,python2-dateutil)
16176 ("python2-fusepy" ,python2-fusepy)
16177 ("python2-google-api-client" ,python2-google-api-client)))
16178 (home-page "https://github.com/dsoprea/GDriveFS")
16179 (synopsis "Mount Google Drive as a local file system")
16180 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
16181under Python 2.7.")
16182 (license license:gpl2)))
16183
24200bdf
EF
16184(define-public python-userspacefs
16185 (package
16186 (name "python-userspacefs")
16187 (version "1.0.13")
16188 (source
16189 (origin
16190 (method url-fetch)
16191 (uri (pypi-uri "userspacefs" version))
16192 (sha256
16193 (base32
16194 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
16195 (build-system python-build-system)
16196 (propagated-inputs
16197 `(("python-fusepyng" ,python-fusepyng)))
16198 (home-page "https://github.com/rianhunter/userspacefs")
16199 (synopsis "User-space file systems for Python")
16200 (description
16201 "@code{userspacefs} is a library that allows you to easily write
16202user-space file systems in Python.")
16203 (license license:gpl3+)))
16204
44d10b1f
RW
16205(define-public pybind11
16206 (package
16207 (name "pybind11")
0690f324 16208 (version "2.4.3")
44d10b1f
RW
16209 (source (origin
16210 (method git-fetch)
16211 (uri (git-reference
16212 (url "https://github.com/pybind/pybind11.git")
16213 (commit (string-append "v" version))))
16214 (sha256
16215 (base32
0690f324 16216 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
44d10b1f
RW
16217 (file-name (git-file-name name version))))
16218 (build-system cmake-build-system)
16219 (native-inputs
3cf579e9 16220 `(("python" ,python-wrapper)
ae8db9ce
LC
16221
16222 ;; The following dependencies are used for tests.
16223 ("python-pytest" ,python-pytest)
16224 ("catch" ,catch-framework2-1)
16225 ("eigen" ,eigen)))
44d10b1f 16226 (arguments
ae8db9ce
LC
16227 `(#:configure-flags
16228 (list (string-append "-DCATCH_INCLUDE_DIR="
16229 (assoc-ref %build-inputs "catch")
16230 "/include/catch"))
16231
3cf579e9
LC
16232 #:phases (modify-phases %standard-phases
16233 (add-after 'install 'install-python
16234 (lambda* (#:key outputs #:allow-other-keys)
16235 (let ((out (assoc-ref outputs "out")))
16236 (with-directory-excursion "../source"
16237 (setenv "PYBIND11_USE_CMAKE" "yes")
16238 (invoke "python" "setup.py" "install"
16239 "--single-version-externally-managed"
16240 "--root=/"
16241 (string-append "--prefix=" out)))))))
16242
ae8db9ce 16243 #:test-target "check"))
44d10b1f
RW
16244 (home-page "https://github.com/pybind/pybind11/")
16245 (synopsis "Seamless operability between C++11 and Python")
ab17297a
LC
16246 (description
16247 "@code{pybind11} is a lightweight header-only library that exposes C++
16248types in Python and vice versa, mainly to create Python bindings of existing
16249C++ code. Its goals and syntax are similar to the @code{Boost.Python}
16250library: to minimize boilerplate code in traditional extension modules by
16251inferring type information using compile-time introspection.")
65eada58 16252 (license license:bsd-3)))
44d10b1f
RW
16253
16254(define-public python-fasteners
16255 (package
16256 (name "python-fasteners")
16257 (version "0.14.1")
16258 (source
16259 (origin
16260 (method url-fetch)
16261 (uri (pypi-uri "fasteners" version))
16262 (sha256
16263 (base32
16264 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
16265 (build-system python-build-system)
16266 (propagated-inputs
16267 `(("python-monotonic" ,python-monotonic)
16268 ("python-six" ,python-six)
16269 ("python-testtools" ,python-testtools)))
16270 (home-page "https://github.com/harlowja/fasteners")
16271 (synopsis "Python package that provides useful locks")
16272 (description
16273 "This package provides a Python program that provides following locks:
16274
16275@itemize
16276@item Locking decorator
16277@item Reader-writer locks
16278@item Inter-process locks
16279@item Generic helpers
16280@end itemize\n")
16281 (properties `((python2-variant . ,(delay python2-fasteners))))
16282 (license license:asl2.0)))
16283
16284(define-public python2-fasteners
16285 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
16286 (package
16287 (inherit base)
16288 (propagated-inputs
16289 `(("python2-futures" ,python2-futures)
16290 ,@(package-propagated-inputs base))))))
16291
16292(define-public python-requests-file
16293 (package
16294 (name "python-requests-file")
16295 (version "1.4.3")
16296 (source
16297 (origin
16298 (method url-fetch)
16299 (uri (pypi-uri "requests-file" version))
16300 (sha256
16301 (base32
16302 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
16303 (build-system python-build-system)
16304 (propagated-inputs
16305 `(("python-requests" ,python-requests)
16306 ("python-six" ,python-six)))
16307 (home-page
16308 "https://github.com/dashea/requests-file")
16309 (synopsis "File transport adapter for Requests")
16310 (description
16311 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 16312library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
16313 (license license:asl2.0)))
16314
16315(define-public python2-requests-file
16316 (package-with-python2 python-requests-file))
16317
16318(define-public python-tldextract
16319 (package
16320 (name "python-tldextract")
16321 (version "2.2.0")
16322 (source
16323 (origin
16324 (method url-fetch)
16325 (uri (pypi-uri "tldextract" version))
16326 (sha256
16327 (base32
16328 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
16329 (build-system python-build-system)
16330 (native-inputs
16331 `(("python-pytest" ,python-pytest)
16332 ("python-responses" ,python-responses)))
16333 (propagated-inputs
16334 `(("python-idna" ,python-idna)
16335 ("python-requests" ,python-requests)
16336 ("python-requests-file" ,python-requests-file)))
16337 (home-page
16338 "https://github.com/john-kurkowski/tldextract")
16339 (synopsis
16340 "Separate the TLD from the registered domain and subdomains of a URL")
16341 (description
16342 "TLDExtract accurately separates the TLD from the registered domain and
16343subdomains of a URL, using the Public Suffix List. By default, this includes
16344the public ICANN TLDs and their exceptions. It can optionally support the
16345Public Suffix List's private domains as well.")
16346 (license license:bsd-3)))
16347
16348(define-public python2-tldextract
16349 (package-with-python2 python-tldextract))
16350
16351(define-public python-pynamecheap
16352 (package
16353 (name "python-pynamecheap")
16354 (version "0.0.3")
16355 (source
16356 (origin
16357 (method url-fetch)
16358 (uri (pypi-uri "PyNamecheap" version))
16359 (sha256
16360 (base32
16361 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
16362 (build-system python-build-system)
16363 (propagated-inputs
16364 `(("python-requests" ,python-requests)))
16365 (home-page
16366 "https://github.com/Bemmu/PyNamecheap")
16367 (synopsis
16368 "Namecheap API client in Python")
16369 (description
16370 "PyNamecheap is a Namecheap API client in Python.")
16371 (license license:expat)))
16372
16373(define-public python2-pynamecheap
16374 (package-with-python2 python-pynamecheap))
16375
16376(define-public python-dns-lexicon
16377 (package
16378 (name "python-dns-lexicon")
16379 (version "2.4.0")
16380 (source
16381 (origin
16382 (method url-fetch)
16383 (uri (pypi-uri "dns-lexicon" version))
16384 (sha256
16385 (base32
16386 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
16387 (build-system python-build-system)
16388 (arguments
16389 `(#:tests? #f)) ;requires internet access
16390 (propagated-inputs
16391 `(("python-future" ,python-future)
16392 ("python-pynamecheap" ,python-pynamecheap)
16393 ("python-requests" ,python-requests)
16394 ("python-tldextract" ,python-tldextract)
16395 ("python-urllib3" ,python-urllib3)))
16396 (home-page "https://github.com/AnalogJ/lexicon")
16397 (synopsis
16398 "Manipulate DNS records on various DNS providers")
16399 (description
16400 "Lexicon provides a way to manipulate DNS records on multiple DNS
16401providers in a standardized way. It has a CLI but it can also be used as a
16402Python library. It was designed to be used in automation, specifically with
16403Let's Encrypt.")
16404 (license license:expat)))
16405
16406(define-public python2-dns-lexicon
16407 (package-with-python2 python-dns-lexicon))
16408
16409(define-public python-commandlines
16410 (package
16411 (name "python-commandlines")
16412 (version "0.4.1")
16413 (source
16414 (origin
16415 (method url-fetch)
16416 (uri (pypi-uri "commandlines" version))
16417 (sha256
16418 (base32
16419 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
16420 (build-system python-build-system)
16421 (home-page "https://github.com/chrissimpkins/commandlines")
16422 (synopsis "Command line argument to object parsing library")
16423 (description
16424 "@code{Commandlines} is a Python library for command line application
16425development that supports command line argument parsing, command string
16426validation testing and application logic.")
16427 (license license:expat)))
16428
16429;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
16430;; python-numba. They have a very unflexible relationship.
16431(define-public python-numba
16432 (package
16433 (name "python-numba")
65f84096 16434 (version "0.46.0")
44d10b1f
RW
16435 (source
16436 (origin
16437 (method url-fetch)
16438 (uri (pypi-uri "numba" version))
16439 (sha256
16440 (base32
65f84096 16441 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
44d10b1f
RW
16442 (build-system python-build-system)
16443 (arguments
16444 `(#:modules ((guix build utils)
16445 (guix build python-build-system)
16446 (ice-9 ftw)
16447 (srfi srfi-1)
16448 (srfi srfi-26))
16449 #:phases
16450 (modify-phases %standard-phases
16451 (add-after 'unpack 'disable-proprietary-features
16452 (lambda _
16453 (setenv "NUMBA_DISABLE_HSA" "1")
16454 (setenv "NUMBA_DISABLE_CUDA" "1")
16455 #t))
16456 (add-after 'unpack 'remove-failing-tests
16457 (lambda _
65f84096 16458 ;; FIXME: These tests fail for unknown reasons:
44d10b1f
RW
16459 ;; test_non_writable_pycache, test_non_creatable_pycache, and
16460 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
16461 (substitute* "numba/tests/test_dispatcher.py"
16462 (("def test(_non_writable_pycache)" _ m)
16463 (string-append "def guix_skip" m))
16464 (("def test(_non_creatable_pycache)" _ m)
16465 (string-append "def guix_skip" m))
16466 (("def test(_frozen)" _ m)
16467 (string-append "def guix_skip" m)))
16468
16469 ;; These tests fail because we don't run the tests from the build
16470 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
65f84096 16471 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
44d10b1f
RW
16472 (substitute* "numba/tests/test_pycc.py"
16473 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
16474 (string-append "def guix_skip" m)))
65f84096
BG
16475
16476 ;; These tests fail because our version of Python does not have
16477 ;; a recognizable front-end for the Numba distribution to use
16478 ;; to check against.
16479 (substitute* "numba/tests/test_entrypoints.py"
16480 (("def test(_init_entrypoint)" _ m)
16481 (string-append "def guix_skip" m)))
16482 (substitute* "numba/tests/test_jitclasses.py"
16483 (("def test(_jitclass_longlabel_not_truncated)" _ m)
16484 (string-append "def guix_skip" m)))
44d10b1f
RW
16485 #t))
16486 (replace 'check
16487 (lambda _
16488 (let ((cwd (getcwd)))
16489 (setenv "PYTHONPATH"
16490 (string-append cwd "/build/"
16491 (find (cut string-prefix? "lib" <>)
16492 (scandir (string-append cwd "/build")))
16493 ":"
16494 (getenv "PYTHONPATH")))
16495 ;; Something is wrong with the PYTHONPATH when running the
16496 ;; tests from the build directory, as it complains about not being
16497 ;; able to import certain modules.
16498 (with-directory-excursion "/tmp"
16499 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
16500 #t)))))
16501 (propagated-inputs
16502 `(("python-llvmlite" ,python-llvmlite)
16503 ("python-numpy" ,python-numpy)
16504 ("python-singledispatch" ,python-singledispatch)))
16505 ;; Needed for tests.
16506 (inputs
16507 `(("python-jinja2" ,python-jinja2)
16508 ("python-pygments" ,python-pygments)))
16509 (home-page "https://numba.pydata.org")
16510 (synopsis "Compile Python code using LLVM")
16511 (description "Numba gives you the power to speed up your applications with
16512high performance functions written directly in Python. With a few
16513annotations, array-oriented and math-heavy Python code can be just-in-time
16514compiled to native machine instructions, similar in performance to C, C++ and
16515Fortran, without having to switch languages or Python interpreters.
16516
16517Numba works by generating optimized machine code using the LLVM compiler
16518infrastructure at import time, runtime, or statically (using the included pycc
16519tool).")
16520 (license license:bsd-3)))
16521
241409cd
RW
16522(define-public python-numcodecs
16523 (package
16524 (name "python-numcodecs")
16525 (version "0.6.4")
16526 (source
16527 (origin
16528 (method url-fetch)
16529 (uri (pypi-uri "numcodecs" version))
16530 (sha256
16531 (base32
16532 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
16533 (build-system python-build-system)
16534 (propagated-inputs
16535 `(("python-numpy" ,python-numpy)
16536 ("python-msgpack" ,python-msgpack)))
16537 (native-inputs
16538 `(("python-pytest" ,python-pytest)
16539 ("python-setuptools-scm" ,python-setuptools-scm)))
16540 (home-page "https://github.com/zarr-developers/numcodecs")
16541 (synopsis "Buffer compression and transformation codecs")
16542 (description
16543 "This Python package provides buffer compression and transformation
16544codecs for use in data storage and communication applications.")
16545 (license license:expat)))
16546
8e04b233
RW
16547(define-public python-asciitree
16548 (package
16549 (name "python-asciitree")
16550 (version "0.3.3")
16551 (source
16552 (origin
16553 (method url-fetch)
16554 (uri (pypi-uri "asciitree" version))
16555 (sha256
16556 (base32
16557 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
16558 (build-system python-build-system)
16559 (home-page "https://github.com/mbr/asciitree")
16560 (synopsis "Draws ASCII trees")
16561 (description "This package draws tree structures using characters.")
16562 (license license:expat)))
16563
7032c1cc
RW
16564(define-public python-zarr
16565 (package
16566 (name "python-zarr")
16567 (version "2.4.0")
16568 (source
16569 (origin
16570 (method url-fetch)
16571 (uri (pypi-uri "zarr" version))
16572 (sha256
16573 (base32
16574 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
16575 (build-system python-build-system)
16576 (arguments
16577 `(#:phases
16578 (modify-phases %standard-phases
16579 (add-after 'unpack 'disable-service-tests
16580 (lambda _
16581 (setenv "ZARR_TEST_ABS" "0")
16582 (setenv "ZARR_TEST_MONGO" "0")
16583 (setenv "ZARR_TEST_REDIS" "0")
16584 #t))
16585 (replace 'check
16586 (lambda _
16587 (invoke "pytest" "-vv" "-k" "not lmdb")
16588 #t)))))
16589 (propagated-inputs
16590 `(("python-asciitree" ,python-asciitree)
16591 ("python-fasteners" ,python-fasteners)
16592 ("python-numcodecs" ,python-numcodecs)
16593 ("python-numpy" ,python-numpy)))
16594 (native-inputs
16595 `(("python-pytest" ,python-pytest)
16596 ("python-setuptools-scm" ,python-setuptools-scm)))
16597 (home-page "https://github.com/zarr-developers/zarr-python")
16598 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
16599 (description
16600 "This package provides an implementation of chunked, compressed,
16601N-dimensional arrays for Python.")
16602 (license license:expat)))
16603
44d10b1f
RW
16604(define-public python-anndata
16605 (package
16606 (name "python-anndata")
a098b349 16607 (version "0.7.1")
44d10b1f
RW
16608 (source
16609 (origin
16610 (method url-fetch)
16611 (uri (pypi-uri "anndata" version))
16612 (sha256
16613 (base32
a098b349 16614 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
44d10b1f 16615 (build-system python-build-system)
a098b349
RW
16616 (arguments
16617 `(#:phases
16618 (modify-phases %standard-phases
16619 (add-after 'unpack 'delete-inconvenient-tests
16620 (lambda _
16621 ;; This test depends on python-scikit-learn.
16622 (delete-file "anndata/tests/test_inplace_subset.py")
16623 #t))
16624 (delete 'check)
16625 (add-after 'install 'check
16626 (lambda* (#:key inputs outputs #:allow-other-keys)
16627 (add-installed-pythonpath inputs outputs)
16628 (invoke "pytest" "-vv"))))))
44d10b1f
RW
16629 (propagated-inputs
16630 `(("python-h5py" ,python-h5py)
a098b349 16631 ("python-importlib-metadata" ,python-importlib-metadata)
44d10b1f 16632 ("python-natsort" ,python-natsort)
a098b349
RW
16633 ("python-numcodecs" ,python-numcodecs)
16634 ("python-packaging" ,python-packaging)
44d10b1f 16635 ("python-pandas" ,python-pandas)
a098b349
RW
16636 ("python-scipy" ,python-scipy)
16637 ("python-zarr" ,python-zarr)))
16638 (native-inputs
16639 `(("python-joblib" ,python-joblib)
16640 ("python-pytest" ,python-pytest)
16641 ("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
16642 (home-page "https://github.com/theislab/anndata")
16643 (synopsis "Annotated data for data analysis pipelines")
16644 (description "Anndata is a package for simple (functional) high-level APIs
16645for data analysis pipelines. In this context, it provides an efficient,
16646scalable way of keeping track of data together with learned annotations and
16647reduces the code overhead typically encountered when using a mostly
16648object-oriented library such as @code{scikit-learn}.")
16649 (license license:bsd-3)))
16650
16651(define-public python-dill
16652 (package
16653 (name "python-dill")
32be3577 16654 (version "0.3.1.1")
44d10b1f
RW
16655 (source
16656 (origin
16657 (method url-fetch)
16658 (uri (pypi-uri "dill" version))
16659 (sha256
32be3577 16660 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
44d10b1f 16661 (build-system python-build-system)
32be3577
MIP
16662 (arguments
16663 `(#:phases
16664 (modify-phases %standard-phases
16665 (replace 'check
16666 (lambda _
16667 (with-directory-excursion "/tmp"
16668 (invoke "nosetests" "-v"))
16669 #t)))))
16670 (native-inputs
16671 `(("python-nose" ,python-nose)))
16672 (home-page "https://pypi.org/project/dill/")
44d10b1f
RW
16673 (synopsis "Serialize all of Python")
16674 (description "Dill extends Python's @code{pickle} module for serializing
16675and de-serializing Python objects to the majority of the built-in Python
16676types. Dill provides the user the same interface as the @code{pickle} module,
16677and also includes some additional features. In addition to pickling Python
16678objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 16679session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
16680interpreter session, close the interpreter, ship the pickled file to another
16681computer, open a new interpreter, unpickle the session and thus continue from
16682the saved state of the original interpreter session.")
16683 (license license:bsd-3)))
16684
16685(define-public python-multiprocess
16686 (package
16687 (name "python-multiprocess")
fcc4e9e7 16688 (version "0.70.9")
44d10b1f
RW
16689 (source
16690 (origin
16691 (method url-fetch)
16692 (uri (pypi-uri "multiprocess" version))
16693 (sha256
16694 (base32
fcc4e9e7 16695 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
44d10b1f 16696 (build-system python-build-system)
fcc4e9e7
MIP
16697 (arguments
16698 `(#:phases
16699 (modify-phases %standard-phases
16700 (add-after 'unpack 'disable-broken-tests
16701 (lambda _
16702 ;; This test is broken as there is no keyboard interrupt.
16703 (substitute* "py3.7/multiprocess/tests/__init__.py"
16704 (("^(.*)def test_wait_result"
16705 line indent)
16706 (string-append indent
16707 "@unittest.skip(\"Disabled by Guix\")\n"
16708 line)))
16709 #t))
16710 ;; Tests must be run after installation.
16711 (delete 'check)
16712 (add-after 'install 'check
16713 (lambda* (#:key inputs outputs #:allow-other-keys)
16714 (add-installed-pythonpath inputs outputs)
16715 (invoke "python" "-m" "multiprocess.tests")
16716 #t)))))
44d10b1f
RW
16717 (propagated-inputs
16718 `(("python-dill" ,python-dill)))
fcc4e9e7 16719 (home-page "https://pypi.org/project/multiprocess/")
44d10b1f
RW
16720 (synopsis "Multiprocessing and multithreading in Python")
16721 (description
16722 "This package is a fork of the multiprocessing Python package, a package
16723which supports the spawning of processes using the API of the standard
16724library's @code{threading} module.")
16725 (license license:bsd-3)))
16726
16727(define-public python-toolz
16728 (package
16729 (name "python-toolz")
16730 (version "0.9.0")
16731 (source
16732 (origin
16733 (method url-fetch)
16734 (uri (pypi-uri "toolz" version))
16735 (sha256
16736 (base32
16737 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
16738 (build-system python-build-system)
16739 ;; FIXME: tests cannot be computed: "Can't perform this operation for
16740 ;; unregistered loader type"
16741 (arguments '(#:tests? #f))
16742 (home-page "https://github.com/pytoolz/toolz/")
16743 (synopsis "List processing tools and functional utilities")
16744 (description
16745 "This package provides a set of utility functions for iterators,
16746functions, and dictionaries.")
16747 (license license:bsd-3)))
16748
16749(define-public python2-toolz
16750 (package-with-python2 python-toolz))
16751
16752(define-public python-cytoolz
16753 (package
16754 (name "python-cytoolz")
16755 (version "0.9.0.1")
16756 (source
16757 (origin
16758 (method url-fetch)
16759 (uri (pypi-uri "cytoolz" version))
16760 (sha256
16761 (base32
16762 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
16763 (build-system python-build-system)
16764 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
16765 ;; 'exceptions'"
16766 (arguments '(#:tests? #f))
16767 (propagated-inputs
16768 `(("python-toolz" ,python-toolz)))
16769 (native-inputs
16770 `(("python-cython" ,python-cython)))
16771 (home-page "https://github.com/pytoolz/cytoolz")
16772 (synopsis "High performance functional utilities")
16773 (description
16774 "The cytoolz package implements the same API as provided by toolz. The
16775main differences are that @code{cytoolz} is faster and cytoolz offers a C API
16776that is accessible to other projects developed in Cython.")
16777 (license license:bsd-3)))
16778
16779(define-public python-sortedcontainers
16780 (package
16781 (name "python-sortedcontainers")
b244f166 16782 (version "2.1.0")
44d10b1f
RW
16783 (source
16784 (origin
16785 (method url-fetch)
16786 (uri (pypi-uri "sortedcontainers" version))
16787 (sha256
16788 (base32
b244f166 16789 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
44d10b1f
RW
16790 (build-system python-build-system)
16791 (native-inputs
16792 `(("python-tox" ,python-tox)))
01e30442
TLC
16793 (propagated-inputs
16794 `(("python-appdirs" ,python-appdirs)
16795 ("python-distlib" ,python-distlib)
16796 ("python-filelock" ,python-filelock)
16797 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
16798 ("python-six" ,python-six)))
44d10b1f
RW
16799 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
16800 (synopsis "Sorted List, Sorted Dict, Sorted Set")
16801 (description
16802 "This package provides a sorted collections library, written in
16803pure-Python.")
16804 (license license:asl2.0)))
16805
16806(define-public python-cloudpickle
16807 (package
16808 (name "python-cloudpickle")
16809 (version "0.6.1")
16810 (source
16811 (origin
16812 (method url-fetch)
16813 (uri (pypi-uri "cloudpickle" version))
16814 (sha256
16815 (base32
16816 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
16817 (build-system python-build-system)
16818 ;; FIXME: there are 5 errors in 122 tests:
16819 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
16820 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
16821 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16822 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16823 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
16824 ;; TypeError: cannot serialize '_io.BufferedRandom' object
16825 (arguments '(#:tests? #f))
16826 (native-inputs
16827 `(("python-pytest" ,python-pytest)
16828 ("python-mock" ,python-mock)
16829 ("python-tornado" ,python-tornado)))
16830 (home-page "https://github.com/cloudpipe/cloudpickle")
16831 (synopsis "Extended pickling support for Python objects")
16832 (description
16833 "Cloudpickle makes it possible to serialize Python constructs not
16834supported by the default pickle module from the Python standard library. It
16835is especially useful for cluster computing where Python expressions are
16836shipped over the network to execute on remote hosts, possibly close to the
16837data.")
16838 (license license:bsd-3)))
16839
16840(define-public python2-cloudpickle
16841 (package-with-python2 python-cloudpickle))
16842
16843(define-public python-locket
16844 (package
16845 (name "python-locket")
16846 (version "0.2.0")
16847 (source
16848 (origin
16849 (method url-fetch)
16850 (uri (pypi-uri "locket" version))
16851 (sha256
16852 (base32
16853 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
16854 (build-system python-build-system)
16855 (home-page "https://github.com/mwilliamson/locket.py")
16856 (synopsis "File-based locks for Python")
16857 (description
16858 "Locket implements a lock that can be used by multiple processes provided
16859they use the same path.")
16860 (license license:bsd-2)))
16861
16862(define-public python2-locket
16863 (package-with-python2 python-locket))
16864
16865(define-public python-blosc
16866 (package
16867 (name "python-blosc")
16868 (version "1.5.1")
16869 (source
16870 (origin
16871 (method url-fetch)
16872 (uri (pypi-uri "blosc" version))
16873 (sha256
16874 (base32
16875 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
16876 (build-system python-build-system)
16877 ;; FIXME: all tests pass, but then this error is printed:
16878 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
16879 (arguments '(#:tests? #f))
16880 (propagated-inputs
16881 `(("python-numpy" ,python-numpy)))
16882 (home-page "https://github.com/blosc/python-blosc")
16883 (synopsis "Python wrapper for the Blosc data compressor library")
16884 (description "Blosc is a high performance compressor optimized for binary
16885data. It has been designed to transmit data to the processor cache faster
16886than the traditional, non-compressed, direct memory fetch approach via a
16887@code{memcpy()} system call.
16888
16889Blosc works well for compressing numerical arrays that contains data with
16890relatively low entropy, like sparse data, time series, grids with
16891regular-spaced values, etc.
16892
16893This Python package wraps the Blosc library.")
16894 (license license:bsd-3)))
16895
16896(define-public python2-blosc
16897 (package-with-python2 python-blosc))
16898
16899(define-public python-partd
16900 (package
16901 (name "python-partd")
16902 (version "0.3.9")
16903 (source
16904 (origin
16905 (method url-fetch)
16906 (uri (pypi-uri "partd" version))
16907 (sha256
16908 (base32
16909 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16910 (build-system python-build-system)
16911 (propagated-inputs
16912 `(("python-blosc" ,python-blosc)
16913 ("python-locket" ,python-locket)
16914 ("python-numpy" ,python-numpy)
16915 ("python-pandas" ,python-pandas)
16916 ("python-pyzmq" ,python-pyzmq)
16917 ("python-toolz" ,python-toolz)))
16918 (home-page "https://github.com/dask/partd/")
16919 (synopsis "Appendable key-value storage")
16920 (description "Partd stores key-value pairs. Values are raw bytes. We
16921append on old values. Partd excels at shuffling operations.")
16922 (license license:bsd-3)))
16923
16924(define-public python2-partd
16925 (package-with-python2 python-partd))
16926
c70a0191
RW
16927(define-public python-fsspec
16928 (package
16929 (name "python-fsspec")
16930 (version "0.6.1")
16931 (source
16932 (origin
16933 (method url-fetch)
16934 (uri (pypi-uri "fsspec" version))
16935 (sha256
16936 (base32
16937 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16938 (build-system python-build-system)
16939 (arguments '(#:tests? #f)) ; there are none
16940 (home-page "https://github.com/intake/filesystem_spec")
16941 (synopsis "File-system specification")
16942 (description "The purpose of this package is to produce a template or
16943specification for a file-system interface, that specific implementations
16944should follow, so that applications making use of them can rely on a common
16945behavior and not have to worry about the specific internal implementation
16946decisions with any given backend.")
16947 (license license:bsd-3)))
16948
44d10b1f
RW
16949(define-public python-dask
16950 (package
16951 (name "python-dask")
86c7ca07 16952 (version "2.9.0")
44d10b1f
RW
16953 (source
16954 (origin
16955 (method url-fetch)
16956 (uri (pypi-uri "dask" version))
16957 (sha256
86c7ca07 16958 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
44d10b1f 16959 (build-system python-build-system)
44d10b1f
RW
16960 (arguments
16961 `(#:phases
16962 (modify-phases %standard-phases
86c7ca07 16963 (add-after 'unpack 'disable-broken-tests
44d10b1f 16964 (lambda _
86c7ca07 16965 ;; This test is marked as xfail when pytest-xdist is used.
44d10b1f
RW
16966 (substitute* "dask/tests/test_threaded.py"
16967 (("def test_interrupt\\(\\)" m)
16968 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16969 m)))
86c7ca07
RW
16970 ;; This one fails with a type error:
16971 ;; TypeError: Already tz-aware, use tz_convert to convert.
16972 (substitute* "dask/dataframe/tests/test_shuffle.py"
16973 (("def test_set_index_timestamp\\(\\)" m)
16974 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16975 m)))
44d10b1f
RW
16976 #t))
16977 (replace 'check
16978 (lambda _ (invoke "pytest" "-vv"))))))
16979 (propagated-inputs
16980 `(("python-cloudpickle" ,python-cloudpickle)
86c7ca07 16981 ("python-fsspec" ,python-fsspec)
44d10b1f 16982 ("python-numpy" ,python-numpy)
86c7ca07 16983 ("python-packaging" ,python-packaging)
44d10b1f
RW
16984 ("python-pandas" ,python-pandas)
16985 ("python-partd" ,python-partd)
16986 ("python-toolz" ,python-toolz)
16987 ("python-pyyaml" ,python-pyyaml)))
16988 (native-inputs
16989 `(("python-pytest" ,python-pytest)
16990 ("python-pytest-runner" ,python-pytest-runner)))
16991 (home-page "https://github.com/dask/dask/")
16992 (synopsis "Parallel computing with task scheduling")
16993 (description
16994 "Dask is a flexible parallel computing library for analytics. It
16995consists of two components: dynamic task scheduling optimized for computation,
16996and large data collections like parallel arrays, dataframes, and lists that
16997extend common interfaces like NumPy, Pandas, or Python iterators to
16998larger-than-memory or distributed environments. These parallel collections
16999run on top of the dynamic task schedulers. ")
17000 (license license:bsd-3)))
17001
44d10b1f
RW
17002(define-public python-ilinkedlist
17003 (package
17004 (name "python-ilinkedlist")
17005 (version "0.4.0")
17006 (source
17007 (origin
17008 (method url-fetch)
17009 (uri (pypi-uri "ilinkedlist" version))
17010 (sha256
17011 (base32
17012 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
17013 (build-system python-build-system)
17014 (native-inputs `(("python-pytest" ,python-pytest)))
17015 (inputs `(("python" ,python)))
17016 (home-page "https://github.com/luther9/ilinkedlist-py")
17017 (synopsis "Immutable linked list library")
17018 (description
17019 "This is a implementation of immutable linked lists for Python. It
17020contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
17021Since a linked list is treated as immutable, it is hashable, and its length
17022can be retrieved in constant time. Some of the terminology is inspired by
17023LISP. It is possible to create an improper list by creating a @code{Pair}
17024with a non-list @code{cdr}.")
17025 (license license:gpl3+)))
17026
17027(define-public python-readlike
17028 (package
17029 (name "python-readlike")
17030 (version "0.1.3")
17031 (source
17032 (origin
17033 (method url-fetch)
17034 (uri (pypi-uri "readlike" version))
17035 (sha256
17036 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
17037 (build-system python-build-system)
17038 (home-page "https://github.com/jangler/readlike")
17039 (synopsis "GNU Readline-like line editing module")
17040 (description
17041 "This Python module provides line editing functions similar to the default
17042Emacs-style ones of GNU Readline. Unlike the Python standard library's
17043@code{readline} package, this one allows access to those capabilties in settings
17044outside of a standard command-line interface. It is especially well-suited to
17045interfacing with Urwid, due to a shared syntax for describing key inputs.
17046
17047Currently, all stateless Readline commands are implemented. Yanking and history
17048are not supported.")
17049 (license license:expat)))
17050
17051(define-public python2-readlike
17052 (package-with-python2 python-readlike))
17053
17054(define-public python-reparser
17055 (package
17056 (name "python-reparser")
17057 (version "1.4.3")
17058 (source
17059 (origin
17060 (method url-fetch)
17061 (uri (pypi-uri "ReParser" version))
17062 (sha256
17063 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
17064 (build-system python-build-system)
17065 (home-page "https://github.com/xmikos/reparser")
17066 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
17067 (description
17068 "This Python library provides a simple lexer/parser for inline markup based
17069on regular expressions.")
17070 (license license:expat)))
17071
17072(define-public python2-reparser
17073 (let ((reparser (package-with-python2
17074 (strip-python2-variant python-reparser))))
17075 (package (inherit reparser)
17076 (propagated-inputs
17077 `(("python2-enum34" ,python2-enum34)
17078 ,@(package-propagated-inputs reparser))))))
17079
17080(define-public python-precis-i18n
17081 (package
17082 (name "python-precis-i18n")
17083 (version "1.0.0")
17084 (source
17085 (origin
17086 (method url-fetch)
17087 (uri (pypi-uri "precis_i18n" version))
17088 (sha256
17089 (base32
17090 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
17091 (build-system python-build-system)
17092 (home-page "https://github.com/byllyfish/precis_i18n")
17093 (synopsis "Implementation of the PRECIS framework")
17094 (description
17095 "This module implements the PRECIS Framework as described in RFC 8264,
17096RFC 8265 and RFC 8266.")
17097 (license license:expat)))
17098
d0446c4b
RW
17099(define-public python-absl-py
17100 (package
17101 (name "python-absl-py")
17102 (version "0.6.1")
17103 (source
17104 (origin
17105 (method url-fetch)
17106 (uri (pypi-uri "absl-py" version))
17107 (sha256
17108 (base32
17109 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
17110 (build-system python-build-system)
17111 (propagated-inputs
17112 `(("python-six" ,python-six)))
17113 (home-page "https://github.com/abseil/abseil-py")
17114 (synopsis "Abseil Python common libraries")
17115 (description
17116 "This package provides the Abseil Python Common Libraries, a collection
17117of Python libraries for building Python applications.")
17118 (license license:asl2.0)))
17119
81bed4e9
RW
17120(define-public python-astor
17121 (package
17122 (name "python-astor")
17123 (version "0.7.1")
17124 (source
17125 (origin
17126 (method url-fetch)
17127 (uri (pypi-uri "astor" version))
17128 (sha256
17129 (base32
17130 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
17131 (build-system python-build-system)
17132 ;; FIXME: There are two errors and two test failures.
17133 (arguments `(#:tests? #f))
17134 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 17135 (synopsis "Read and write Python ASTs")
81bed4e9 17136 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 17137source via the Abstract Syntax Tree.")
81bed4e9
RW
17138 (license license:bsd-3)))
17139
39ee82ff
RW
17140(define-public python2-astor
17141 (package-with-python2 python-astor))
17142
79869f80
RW
17143(define-public python-astunparse
17144 (package
17145 (name "python-astunparse")
47d79541 17146 (version "1.6.2")
79869f80
RW
17147 (source
17148 (origin
17149 (method url-fetch)
17150 (uri (pypi-uri "astunparse" version))
17151 (sha256
47d79541 17152 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 17153 (build-system python-build-system)
47d79541 17154 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
17155 (propagated-inputs
17156 `(("python-six" ,python-six)
17157 ("python-wheel" ,python-wheel)))
17158 (home-page "https://github.com/simonpercivall/astunparse")
17159 (synopsis "AST unparser for Python")
17160 (description "This package provides an AST unparser for Python. It is a
17161factored out version of @code{unparse} found in the Python source
17162distribution.")
17163 (license license:bsd-3)))
17164
2884aac0
RW
17165(define-public python-gast
17166 (package
17167 (name "python-gast")
c28a8855 17168 (version "0.3.3")
2884aac0
RW
17169 (source
17170 (origin
17171 (method url-fetch)
17172 (uri (pypi-uri "gast" version))
17173 (sha256
c28a8855 17174 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
2884aac0
RW
17175 (build-system python-build-system)
17176 (propagated-inputs
17177 `(("python-astunparse" ,python-astunparse)))
17178 (home-page "https://pypi.org/project/gast/")
17179 (synopsis "Generic Python AST that abstracts the underlying Python version")
17180 (description
17181 "GAST provides a compatibility layer between the AST of various Python
17182versions, as produced by @code{ast.parse} from the standard @code{ast}
17183module.")
17184 (license license:bsd-3)))
17185
44d10b1f
RW
17186(define-public python-wikidata
17187 (package
17188 (name "python-wikidata")
17189 (version "0.6.1")
17190 (source
17191 (origin
17192 (method url-fetch)
17193 (uri (pypi-uri "Wikidata" version))
17194 (sha256
17195 (base32
17196 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
17197 (build-system python-build-system)
17198 (propagated-inputs
17199 `(("python-babel" ,python-babel)))
17200 (home-page "https://github.com/dahlia/wikidata")
17201 (synopsis "Wikidata client library")
17202 (description
17203 "This package provides a Python interface to
17204@url{https://www.wikidata.org/, Wikidata}.")
17205 (properties '((upstream-name . "Wikidata")))
17206 (license license:gpl3+)))
17207
17208(define-public python-doctest-ignore-unicode
17209 (package
17210 (name "python-doctest-ignore-unicode")
17211 (version "0.1.2")
17212 (source
17213 (origin
17214 (method url-fetch)
17215 (uri (pypi-uri "doctest-ignore-unicode" version))
17216 (sha256
17217 (base32
17218 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
17219 (build-system python-build-system)
17220 (native-inputs
17221 `(("python-nose" ,python-nose)))
17222 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
17223 (synopsis "Ignore Unicode literal prefixes in doctests")
17224 (description
17225 "This package adds support for a flag to ignore Unicode literal prefixes
17226in doctests.")
17227 (license license:asl2.0)))
17228
17229(define-public python-attr
17230 (package
17231 (name "python-attr")
17232 (version "0.3.1")
17233 (source
17234 (origin
17235 (method url-fetch)
17236 (uri (pypi-uri "attr" version))
17237 (sha256
17238 (base32
17239 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
17240 (build-system python-build-system)
17241 (home-page "https://github.com/denis-ryzhkov/attr")
17242 (synopsis "Decorator for attributes of target function or class")
17243 (description "Simple decorator to set attributes of target function or
17244class in a @acronym{DRY, Don't Repeat Yourself} way.")
17245 (license license:expat)))
f98232a3
VC
17246
17247(define-public python-construct
17248 (package
17249 (name "python-construct")
d854ab15 17250 (version "2.10.56")
f98232a3
VC
17251 (source
17252 (origin
17253 (method url-fetch)
17254 (uri (pypi-uri "construct" version))
17255 (sha256
17256 (base32
d854ab15 17257 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
f98232a3
VC
17258 (build-system python-build-system)
17259 (arguments
17260 `(#:tests? #f)) ; No tests exist.
17261 (propagated-inputs
17262 `(("python-extras" ,python-extras)
17263 ("python-arrow" ,python-arrow)
17264 ("python-numpy" ,python-numpy)
17265 ("python-ruamel.yaml" ,python-ruamel.yaml)))
aabc8954 17266 (home-page "https://construct.readthedocs.io")
f98232a3
VC
17267 (synopsis "Declarative and symmetrical parser and builder for binary data")
17268 (description
17269 "This package provides both simple, atomic constructs (such as
17270integers of various sizes), as well as composite ones which allow you
17271form hierarchical and sequential structures of increasing complexity.
17272It features bit and byte granularity, easy debugging and testing, an
17273easy-to-extend subclass system, and lots of primitive constructs to
17274make your work easier.")
17275 (license license:expat)))
b742c006
LF
17276
17277(define-public python-humanize
17278 (package
17279 (name "python-humanize")
17280 (version "0.5.1")
17281 (source
17282 (origin
17283 (method url-fetch)
17284 (uri (pypi-uri "humanize" version))
17285 (sha256
17286 (base32
17287 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
17288 (arguments
17289 '(#:tests? #f)) ; tests not in pypi archive
17290 (build-system python-build-system)
17291 (home-page "https://github.com/jmoiron/humanize")
17292 (synopsis "Print numerical information in a human-readable form")
17293 (description "This package provides a Python module that displays numbers
17294and dates in \"human readable\" forms. For example, it would display
17295\"12345591313\" as \"12.3 billion\".")
17296 (license license:expat)))
d5bbf66d
LF
17297
17298(define-public python-txaio
17299 (package
17300 (name "python-txaio")
17301 (version "18.8.1")
17302 (source
17303 (origin
17304 (method url-fetch)
17305 (uri (pypi-uri "txaio" version))
17306 (sha256
17307 (base32
17308 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
17309 (build-system python-build-system)
17310 (propagated-inputs
17311 `(("python-twisted" ,python-twisted)
17312 ("python-six" ,python-six)))
17313 (home-page "https://github.com/crossbario/txaio")
17314 (synopsis "Compatibility layer between Python asyncio and Twisted")
17315 (description "Txaio provides a compatibility layer between the Python
17316@code{asyncio} module and @code{Twisted}.")
17317 (license license:expat)))
963dfd3a
RW
17318
17319(define-public python-toolshed
17320 (package
17321 (name "python-toolshed")
17322 (version "0.4.6")
17323 (source
17324 (origin
17325 (method url-fetch)
17326 (uri (pypi-uri "toolshed" version))
17327 (sha256
17328 (base32
17329 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
17330 (build-system python-build-system)
17331 (native-inputs
17332 `(("python-nose" ,python-nose)))
17333 (home-page "https://github.com/brentp/toolshed/")
17334 (synopsis "Collection of modules and functions for working with data")
17335 (description "This is a collection of well-tested, simple modules and
17336functions that aim to reduce boilerplate when working with data.")
17337 (license license:bsd-2)))
c91ecf2d
RW
17338
17339(define-public python-annoy
17340 (package
17341 (name "python-annoy")
17342 (version "1.15.1")
17343 (source
17344 (origin
17345 (method url-fetch)
17346 (uri (pypi-uri "annoy" version))
17347 (sha256
17348 (base32
17349 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
17350 (build-system python-build-system)
17351 (native-inputs
17352 `(("python-nose" ,python-nose)))
17353 (home-page "https://github.com/spotify/annoy/")
17354 (synopsis "Approximate nearest neighbors library")
17355 (description
17356 "Annoy is a C++ library with Python bindings to search for points in
17357space that are close to a given query point. It also creates large read-only
17358file-based data structures that are @code{mmap}ped into memory so that many
17359processes may share the same data.")
17360 (license license:asl2.0)))
412342d1 17361
79bfa422 17362(define-public python-pylzma
412342d1 17363 (package
79bfa422
DM
17364 (name "python-pylzma")
17365 (version "0.5.0")
17366 (source
17367 (origin
17368 (method url-fetch)
17369 (uri (pypi-uri "pylzma" version))
17370 (sha256
17371 (base32
17372 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 17373 (build-system python-build-system)
79bfa422
DM
17374 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
17375 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
17376 (description "This package provides Python bindings for the LZMA library
17377by Igor Pavlov.")
17378 (license license:lgpl2.1+)))
17379
17380(define-public python2-pylzma
17381 (package-with-python2 python-pylzma))
f825e605 17382
6609ebe7
AG
17383(define-public python2-zeroconf
17384 (package
17385 (name "python2-zeroconf")
17386
17387 ;; This is the last version that supports Python 2.x.
17388 (version "0.19.1")
17389 (source
17390 (origin
17391 (method url-fetch)
17392 (uri (pypi-uri "zeroconf" version))
17393 (sha256
17394 (base32
17395 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
17396 (build-system python-build-system)
17397 (arguments
17398 `(#:python ,python-2
17399 #:phases
17400 (modify-phases %standard-phases
17401 (add-after 'unpack 'patch-requires
17402 (lambda* (#:key inputs #:allow-other-keys)
17403 (substitute* "setup.py"
17404 (("enum-compat")
17405 "enum34"))
17406 #t)))))
17407 (native-inputs
17408 `(("python2-six" ,python2-six)
17409 ("python2-enum32" ,python2-enum34)
17410 ("python2-netifaces" ,python2-netifaces)
17411 ("python2-typing" ,python2-typing)))
17412 (home-page "https://github.com/jstasiak/python-zeroconf")
17413 (synopsis "Pure Python mDNS service discovery")
17414 (description
17415 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
17416compatible).")
17417 (license license:lgpl2.1+)))
17418
f825e605
GLV
17419(define-public python-bsddb3
17420 (package
17421 (name "python-bsddb3")
17422 (version "6.2.6")
17423 (source
17424 (origin
17425 (method url-fetch)
17426 (uri (pypi-uri "bsddb3" version))
17427 (sha256
17428 (base32
17429 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
17430 (build-system python-build-system)
17431 (inputs
17432 `(("bdb" ,bdb)))
17433 (arguments
17434 '(#:phases
17435 (modify-phases %standard-phases
17436 (add-after 'unpack 'configure-locations
17437 (lambda* (#:key inputs #:allow-other-keys)
17438 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
17439 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
17440 #t))
17441 (replace 'check
17442 (lambda _
17443 (invoke "python3" "test3.py" "-v"))))))
17444 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
17445 (synopsis "Python bindings for Oracle Berkeley DB")
17446 (description
17447 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
17448C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
17449Transaction objects, and each of these is exposed as a Python type in the
17450bsddb3.db module. The database objects can use various access methods: btree,
17451hash, recno, and queue. Complete support of Berkeley DB distributed
17452transactions. Complete support for Berkeley DB Replication Manager.
17453Complete support for Berkeley DB Base Replication. Support for RPC.")
17454 (license license:bsd-3)))
edeb04bf
PL
17455
17456(define-public python-dbfread
17457 (package
17458 (name "python-dbfread")
17459 (version "2.0.7")
17460 (source (origin
17461 (method url-fetch)
17462 (uri (pypi-uri "dbfread" version))
17463 (sha256
17464 (base32
17465 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
17466 (build-system python-build-system)
17467 (native-inputs
17468 `(("python-pytest" ,python-pytest)))
17469 (home-page "https://dbfread.readthedocs.io")
17470 (synopsis "Read DBF Files with Python")
17471 (description
17472 "This library reads DBF files and returns the data as native Python data
17473types for further processing. It is primarily intended for batch jobs and
17474one-off scripts.")
17475 (license license:expat)))
e308b4f0
JM
17476
17477(define-public python-cached-property
17478 (package
17479 (name "python-cached-property")
17480 (version "1.5.1")
17481 (source
17482 (origin
17483 (method url-fetch)
17484 (uri (pypi-uri "cached-property" version))
17485 (sha256
17486 (base32
17487 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
17488 (build-system python-build-system)
17489 (arguments
17490 `(#:phases
17491 (modify-phases %standard-phases
17492 ;; https://github.com/pydanny/cached-property/issues/131
17493 ;; recent versions of freezegun break one test
17494 (add-after 'unpack 'disable-broken-test
17495 (lambda _
17496 (substitute* "tests/test_cached_property.py"
17497 (("def test_threads_ttl_expiry\\(self\\)" m)
17498 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
17499 " " m)))
17500 #t)))))
17501 (native-inputs
17502 `(("python-freezegun" ,python-freezegun)))
17503 (home-page
17504 "https://github.com/pydanny/cached-property")
17505 (synopsis
17506 "Decorator for caching properties in classes")
17507 (description
17508 "This package provides a decorator which makes caching
17509time-or-computationally-expensive properties quick and easy and works in Python
175102 or 3.")
17511 (license license:bsd-3)))
dfe8a704
NG
17512
17513(define-public python-folium
17514 (package
17515 (name "python-folium")
d3bc1ea9 17516 (version "0.10.1")
dfe8a704
NG
17517 (source
17518 (origin
17519 (method url-fetch)
17520 (uri (pypi-uri "folium" version))
17521 (sha256
17522 (base32
d3bc1ea9 17523 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
dfe8a704
NG
17524 (build-system python-build-system)
17525 (propagated-inputs
17526 `(("python-branca" ,python-branca)
17527 ("python-jinja2" ,python-jinja2)
17528 ("python-numpy" ,python-numpy)
17529 ("python-requests" ,python-requests)))
17530 (native-inputs
17531 `(("python-pytest" ,python-pytest)))
17532 (home-page "https://github.com/python-visualization/folium")
17533 (synopsis "Make beautiful maps with Leaflet.js & Python")
17534 (description "@code{folium} makes it easy to visualize data that’s been
17535manipulated in Python on an interactive leaflet map. It enables both the
17536binding of data to a map for @code{choropleth} visualizations as well as
17537passing rich vector/raster/HTML visualizations as markers on the map.
17538
17539The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
17540Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
17541supports Image, Video, GeoJSON and TopoJSON overlays.")
17542 (license license:expat)))
9dd5f475
LC
17543
17544(define-public jube
17545 (package
17546 ;; This is a command-line tool, so no "python-" prefix.
17547 (name "jube")
17548 (version "2.2.2")
17549 (source (origin
17550 (method url-fetch)
17551 (uri (string-append
17552 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
17553 version))
17554 (sha256
17555 (base32
17556 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
17557 (file-name (string-append "jube-" version ".tar.gz"))))
17558 (build-system python-build-system)
17559 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
17560 (synopsis "Benchmarking environment")
17561 (description
17562 "JUBE helps perform and analyze benchmarks in a systematic way. For each
17563benchmarked application, benchmark data is stored in a format that allows JUBE
17564to deduct the desired information. This data can be parsed by automatic pre-
17565and post-processing scripts that draw information and store it more densely
17566for manual interpretation.")
a9f33960 17567 (license license:gpl3+)))
66436424
NG
17568
17569(define-public python-pyroutelib3
17570 (package
17571 (name "python-pyroutelib3")
17572 (version "1.3.post1")
17573 (source
17574 (origin
17575 (method url-fetch)
17576 (uri (pypi-uri "pyroutelib3" version))
17577 (sha256
17578 (base32
17579 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
17580 (build-system python-build-system)
17581 (propagated-inputs
17582 `(("python-dateutil" ,python-dateutil)))
17583 (home-page "https://github.com/MKuranowski/pyroutelib3")
17584 (synopsis "Library for simple routing on OSM data")
17585 (description "Library for simple routing on OSM data")
17586 (license license:gpl3+)))
30e7c03a 17587
c1bbef69
17588(define-public python-bibtexparser
17589 (package
17590 (name "python-bibtexparser")
17591 (version "1.1.0")
17592 (source
17593 (origin
17594 (method url-fetch)
17595 (uri (pypi-uri "bibtexparser" version))
17596 (sha256
17597 (base32
17598 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
17599 (build-system python-build-system)
17600 (propagated-inputs
17601 `(("python-pyparsing" ,python-pyparsing)))
17602 (native-inputs
17603 `(("python-future" ,python-future)))
17604 (home-page "https://github.com/sciunto-org/python-bibtexparser")
17605 (synopsis "Python library to parse BibTeX files")
17606 (description "BibtexParser is a Python library to parse BibTeX files.")
17607 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
17608
17609(define-public python-distro
17610 (package
17611 (name "python-distro")
17612 (version "1.4.0")
17613 (source
17614 (origin
17615 (method url-fetch)
17616 (uri (pypi-uri "distro" version))
17617 (sha256
17618 (base32
17619 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
17620 (build-system python-build-system)
17621 (native-inputs
17622 `(("python-pytest" ,python-pytest)))
17623 (home-page "https://github.com/nir0s/distro")
17624 (synopsis
17625 "OS platform information API")
17626 (description
17627 "@code{distro} provides information about the OS distribution it runs on,
17628such as a reliable machine-readable ID, or version information.
17629
17630It is the recommended replacement for Python's original
17631`platform.linux_distribution` function (which will be removed in Python 3.8).
17632@code{distro} also provides a command-line interface to output the platform
17633information in various formats.")
17634 (license license:asl2.0)))
f2f41e1a
HG
17635
17636(define-public python-cairosvg
17637 (package
17638 (name "python-cairosvg")
17639 (version "2.4.2")
17640 (source
17641 (origin
17642 (method url-fetch)
17643 (uri (pypi-uri "CairoSVG" version))
17644 (sha256
17645 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
17646 (build-system python-build-system)
17647 (arguments
17648 `(#:phases
17649 (modify-phases %standard-phases
17650 (replace 'check
17651 (lambda _ (invoke "pytest"))))))
17652 (propagated-inputs
17653 `(("python-cairocffi" ,python-cairocffi)
17654 ("python-cssselect2" ,python-cssselect2)
17655 ("python-defusedxml" ,python-defusedxml)
17656 ("python-pillow" ,python-pillow)
17657 ("python-tinycss2" ,python-tinycss2)))
17658 (native-inputs
17659 `(("python-pytest-flake8" ,python-pytest-flake8)
17660 ("python-pytest-isort" ,python-pytest-isort)
17661 ("python-pytest-runner" ,python-pytest-runner)))
17662 (home-page "https://cairosvg.org/")
17663 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
17664 (description "CairoSVG is a SVG converter based on Cairo. It can export
17665SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
17666SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
17667parsed, the result is drawn to a Cairo surface that can be exported to
17668qvarious formats: PDF, PostScript, PNG and even SVG.")
17669 (license license:lgpl3+)))
ea1801e0
HG
17670
17671(define-public python-pyphen
17672 (package
17673 (name "python-pyphen")
17674 (version "0.9.5")
17675 (source
17676 (origin
17677 (method url-fetch)
17678 (uri (pypi-uri "Pyphen" version))
17679 (sha256
17680 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
17681 (build-system python-build-system)
17682 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
17683 ;; embedded set provided by upstream - like Debian does.
17684 (home-page "https://github.com/Kozea/Pyphen")
17685 (synopsis "Pure Python module to hyphenate text")
17686 (description "Pyphen is a pure Python module to hyphenate text using
17687existing Hunspell hyphenation dictionaries.")
17688 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
17689
17690(define-public python-intelhex
17691 (package
17692 (name "python-intelhex")
17693 (version "2.2.1")
17694 (source
17695 (origin
17696 (method url-fetch)
17697 (uri (pypi-uri "intelhex" version))
17698 (sha256
17699 (base32
17700 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
17701 (build-system python-build-system)
17702 (arguments '(#:tests? #f)) ;issue with version
17703 (home-page "https://pypi.org/project/IntelHex/")
17704 (synopsis "Python library for Intel HEX files manipulations")
17705 (description "The Intel HEX file format is widely used in microprocessors
17706and microcontrollers area (embedded systems etc.) as the de facto standard for
17707representation of code to be programmed into microelectronic devices. This
17708package provides an intelhex Python library to read, write, create from
17709scratch and manipulate data from Intel HEX file format. It also includes
17710several convenience Python scripts, including \"classic\" hex2bin and bin2hex
17711converters and more, those based on the library itself.")
17712 (license license:bsd-3)))
34bf6869
CL
17713
17714(define-public python-pykwalify
17715 (package
17716 (name "python-pykwalify")
17717 (version "1.7.0")
17718 (source
17719 (origin
17720 (method url-fetch)
17721 (uri (pypi-uri "pykwalify" version))
17722 (sha256
17723 (base32
17724 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
17725 (build-system python-build-system)
17726 (arguments '(#:tests? #f)) ;missing dependencies
17727 (propagated-inputs
17728 `(("python-dateutil" ,python-dateutil)
17729 ("python-docopt" ,python-docopt)
17730 ("python-pyyaml" ,python-pyyaml)))
17731 (home-page "https://github.com/grokzen/pykwalify")
17732 (synopsis
17733 "Python lib/cli for JSON/YAML schema validation")
17734 (description
17735 "This package provides a parser, schema validator, and data binding tool
17736for YAML and JSON.")
17737 (license license:expat)))
e2ebbbcc
KK
17738
17739(define-public python-dbusmock
17740 (package
022b0d5f
BG
17741 (name "python-dbusmock")
17742 (version "0.18.3")
17743 (source
17744 (origin
17745 (method url-fetch)
17746 (uri (pypi-uri "python-dbusmock" version))
17747 (sha256
e2ebbbcc 17748 (base32
022b0d5f
BG
17749 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
17750 (build-system python-build-system)
17751 (arguments
17752 '(#:phases
17753 (modify-phases %standard-phases
17754 (add-after 'unpack 'patch-shell-path
17755 (lambda _
17756 (substitute* "tests/test_code.py"
17757 (("/bin/bash") (which "bash")))
17758 #t)))))
17759 (native-inputs
17760 `(;; For tests.
17761 ("dbus" ,dbus) ; for dbus-daemon
17762 ("python-nose" ,python-nose)
17763 ("which" ,which)))
17764 (propagated-inputs
17765 `(("python-dbus" ,python-dbus)
17766 ("python-pygobject" ,python-pygobject)))
17767 (home-page "https://github.com/martinpitt/python-dbusmock")
17768 (synopsis "Python library for mock D-Bus objects")
17769 (description "python-dbusmock allows for the easy creation of mock objects on
e2ebbbcc
KK
17770D-Bus. This is useful for writing tests for software which talks to D-Bus
17771services such as upower, systemd, logind, gnome-session or others, and it is
17772hard (or impossible without root privileges) to set the state of the real
17773services to what you expect in your tests.")
022b0d5f 17774 (license license:lgpl3+)))
b657b23f
BG
17775
17776(define-public python-ujson
17777 (package
17778 (name "python-ujson")
17779 (version "1.35")
17780 (source
17781 (origin
17782 (method url-fetch)
17783 (uri (pypi-uri "ujson" version))
17784 (sha256
17785 (base32
17786 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
17787 (build-system python-build-system)
17788 (home-page "http://www.esn.me")
17789 (synopsis
17790 "Ultra fast JSON encoder and decoder for Python")
17791 (description
17792 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
17793 bindings for Python 2.5+ and 3.")
17794 (license license:bsd-3)))
17795
17796(define-public python2-ujson
17797 (package-with-python2 python-ujson))
dbcef44a
MIP
17798
17799(define-public python-iocapture
17800 ;; The latest release is more than a year older than this commit.
17801 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
17802 (revision "1"))
17803 (package
17804 (name "python-iocapture")
17805 (version "0.1.2")
17806 (source
17807 (origin
17808 (method git-fetch)
17809 (uri (git-reference
17810 (url "https://github.com/oinume/iocapture.git")
17811 (commit commit)))
17812 (file-name (git-file-name name version))
17813 (sha256
17814 (base32
17815 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
17816 (build-system python-build-system)
17817 (arguments
17818 `(#:phases
17819 (modify-phases %standard-phases
17820 (delete 'check)
17821 (add-after 'install 'check
17822 (lambda* (#:key inputs outputs #:allow-other-keys)
17823 (add-installed-pythonpath inputs outputs)
17824 (invoke "py.test" "-v" "tests")
17825 #t)))))
17826 (propagated-inputs
17827 `(("python-flexmock" ,python-flexmock)
17828 ("python-pytest" ,python-pytest)
17829 ("python-pytest-cov" ,python-pytest-cov)
17830 ("python-six" ,python-six)))
17831 (home-page "https://github.com/oinume/iocapture")
17832 (synopsis "Python capturing tool for stdout and stderr")
17833 (description
17834 "This package helps you to capture the standard out (stdout) and the
17835standard error channel (stderr) in your program.")
17836 (license license:expat))))
db6bd842
MIP
17837
17838(define-public python-argh
17839 ;; There are 21 commits since the latest release containing important
17840 ;; improvements.
17841 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
17842 (revision "1"))
17843 (package
17844 (name "python-argh")
17845 (version (git-version "0.26.2" revision commit))
17846 (source
17847 (origin
17848 (method git-fetch)
17849 (uri (git-reference
17850 (url "https://github.com/neithere/argh.git")
17851 (commit commit)))
17852 (file-name (git-file-name name version))
17853 (sha256
17854 (base32
17855 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
17856 (build-system python-build-system)
17857 (propagated-inputs
17858 `(("python-iocapture" ,python-iocapture)
17859 ("python-mock" ,python-mock)
17860 ("python-pytest" ,python-pytest)
17861 ("python-pytest-cov" ,python-pytest-cov)
17862 ("python-pytest-xdist" ,python-pytest-xdist)
17863 ("python-tox" ,python-tox)))
17864 (home-page "https://github.com/neithere/argh/")
17865 (synopsis "Argparse wrapper with natural syntax")
17866 (description
17867 "python-argh is a small library that provides several layers of
17868abstraction on top of @code{python-argparse}. The layers can be mixed. It is
17869always possible to declare a command with the highest possible (and least
17870flexible) layer and then tune the behaviour with any of the lower layers
17871including the native API of @code{python-argparse}.")
17872 (license license:lgpl3+))))
073723fa
MIP
17873
17874(define-public python-ppft
17875 (package
17876 (name "python-ppft")
17877 (version "1.6.6.1")
17878 (source
17879 (origin
17880 (method url-fetch)
17881 (uri (pypi-uri "ppft" version))
17882 (sha256
17883 (base32
17884 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
17885 (build-system python-build-system)
17886 (arguments '(#:tests? #f)) ; there are none
17887 (propagated-inputs
17888 `(("python-six" ,python-six)))
17889 (home-page "https://pypi.org/project/ppft/")
17890 (synopsis "Fork of Parallel Python")
17891 (description
17892 "This package is a fork of Parallel Python. The Parallel Python
17893module (@code{pp}) provides an easy and efficient way to create
17894parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
17895computers and clusters. It features cross-platform portability and dynamic
17896load balancing.")
17897 (license license:bsd-3)))
8451ea19
MIP
17898
17899(define-public python-pox
17900 (package
17901 (name "python-pox")
17902 (version "0.2.7")
17903 (source
17904 (origin
17905 (method url-fetch)
17906 (uri (pypi-uri "pox" version))
17907 (sha256
17908 (base32
17909 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17910 (build-system python-build-system)
17911 (arguments
17912 `(#:phases
17913 (modify-phases %standard-phases
17914 (replace 'check
17915 (lambda _
17916 (mkdir-p "/tmp/guix")
17917 (setenv "SHELL" "bash")
17918 (setenv "USERNAME" "guix")
17919 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17920 (invoke "py.test" "-vv")
17921 #t)))))
17922 (native-inputs
17923 `(("python-pytest" ,python-pytest)
17924 ("which" ,which)))
17925 (home-page "https://pypi.org/project/pox/")
17926 (synopsis "Python utilities for filesystem exploration and automated builds")
17927 (description
17928 "Pox provides a collection of utilities for navigating and manipulating
17929filesystems. This module is designed to facilitate some of the low level
17930operating system interactions that are useful when exploring a filesystem on a
17931remote host. Pox provides Python equivalents of several shell commands such
17932as @command{which} and @command{find}. These commands allow automated
17933discovery of what has been installed on an operating system, and where the
17934essential tools are located.")
17935 (license license:bsd-3)))
7e476ae8
MIP
17936
17937(define-public python-pathos
17938 (package
17939 (name "python-pathos")
17940 (version "0.2.5")
17941 (source
17942 (origin
17943 (method url-fetch)
17944 (uri (pypi-uri "pathos" version))
17945 (sha256
17946 (base32
17947 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17948 (build-system python-build-system)
8f82e7e3
EF
17949 (arguments
17950 '(#:phases
17951 (modify-phases %standard-phases
17952 (replace 'check
17953 (lambda _
17954 (setenv "PYTHONPATH"
17955 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17956 (invoke "python" "./tests/__main__.py"))))))
7e476ae8
MIP
17957 (propagated-inputs
17958 `(("python-dill" ,python-dill)
17959 ("python-multiprocess" ,python-multiprocess)
17960 ("python-pox" ,python-pox)
17961 ("python-ppft" ,python-ppft)))
8f82e7e3
EF
17962 (native-inputs
17963 `(("python-pytest" ,python-pytest)))
7e476ae8
MIP
17964 (home-page "https://pypi.org/project/pathos/")
17965 (synopsis
17966 "Parallel graph management and execution in heterogeneous computing")
17967 (description
17968 "Python-pathos is a framework for heterogenous computing. It provides a
17969consistent high-level interface for configuring and launching parallel
17970computations across heterogenous resources. Python-pathos provides configurable
17971launchers for parallel and distributed computing, where each launcher contains
17972the syntactic logic to configure and launch jobs in an execution environment.")
17973 (license license:bsd-3)))
54e5ee5a
BG
17974
17975(define-public python-flit
17976 (package
17977 (name "python-flit")
17978 (version "2.1.0")
17979 (source
17980 (origin
17981 (method url-fetch)
17982 (uri (pypi-uri "flit" version))
17983 (sha256
17984 (base32
17985 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17986 (build-system python-build-system)
17987 (arguments
17988 `(#:tests? #f)) ; XXX: Check requires network access.
17989 (home-page "https://flit.readthedocs.io/")
17990 (synopsis
17991 "Simple packaging tool for simple packages")
17992 (description
17993 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17994packages a single importable module or package at a time, using the import
17995name as the name on PyPI. All subpackages and data files within a package
17996are included automatically.")
17997 (license license:bsd-3)))
02139b42
BG
17998
17999(define-public python-pathtools
18000 (package
18001 (name "python-pathtools")
18002 (version "0.1.2")
18003 (source
18004 (origin
18005 (method url-fetch)
18006 (uri (pypi-uri "pathtools" version))
18007 (sha256
18008 (base32
18009 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
18010 (build-system python-build-system)
18011 (home-page
18012 "https://github.com/gorakhargosh/pathtools")
18013 (synopsis "Path utilities for Python")
18014 (description "Pattern matching and various utilities for file systems
18015paths.")
18016 (license license:expat)))
6b520177
JG
18017
18018(define-public python-fastentrypoints
18019 (package
18020 (name "python-fastentrypoints")
18021 (version "0.12")
18022 (source
18023 (origin
18024 (method url-fetch)
18025 (uri (pypi-uri "fastentrypoints" version))
18026 (sha256
18027 (base32
18028 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
18029 (build-system python-build-system)
18030 (home-page
18031 "https://github.com/ninjaaron/fast-entry_points")
18032 (synopsis
18033 "Makes entry_points specified in setup.py load more quickly")
18034 (description
18035 "Using entry_points in your setup.py makes scripts that start really
18036slowly because it imports pkg_resources. This package allows such setup
18037scripts to load entry points more quickly.")
18038 (license license:bsd-3)))
c5eb8cf8
JG
18039
18040(define-public python-funcparserlib
18041 (package
18042 (name "python-funcparserlib")
18043 (version "0.3.6")
18044 (source
18045 (origin
18046 (method url-fetch)
18047 (uri (pypi-uri "funcparserlib" version))
18048 (sha256
18049 (base32
18050 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
18051 (native-inputs
18052 `(("python-tox" ,python-tox)))
18053 (arguments
18054 `(#:phases
18055 (modify-phases %standard-phases
18056 (replace 'check
18057 (lambda _
18058 (invoke "tox"))))))
18059 (build-system python-build-system)
18060 (home-page
18061 "https://github.com/vlasovskikh/funcparserlib")
18062 (synopsis
18063 "Recursive descent parsing library based on functional combinators")
18064 (description
11140cf1 18065 "This package is a recursive descent parsing library for Python based on
c5eb8cf8
JG
18066functional combinators. Parser combinators are just higher-order functions
18067that take parsers as their arguments and return them as result values.")
18068 (license license:expat)))
602f3b67
NG
18069
18070(define-public python-speg
18071 (package
18072 (name "python-speg")
18073 (version "0.3")
18074 (source
18075 (origin
18076 (method url-fetch)
18077 (uri (pypi-uri "speg" version ".zip"))
18078 (sha256
18079 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
18080 (arguments
18081 `(#:tests? #f)) ;FIXME: tests fail, not sure why
18082 (native-inputs
18083 `(("unzip" ,unzip)))
18084 (build-system python-build-system)
18085 (home-page "https://github.com/avakar/speg")
18086 (synopsis "PEG-based parser interpreter with memoization")
18087 (description "This package is a PEG-based parser and interpreter with
18088memoization.")
18089 (license license:expat)))
07c8177b
NG
18090
18091(define-public python-cson
18092 (package
18093 (name "python-cson")
18094 (version "0.8")
18095 (source
18096 (origin
18097 (method url-fetch)
18098 (uri (pypi-uri "cson" version))
18099 (sha256
18100 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
18101 (build-system python-build-system)
18102 (propagated-inputs
18103 `(("python-speg" ,python-speg)))
18104 (home-page "https://github.com/avakar/pycson")
18105 (synopsis "Parser for Coffeescript Object Notation (CSON)")
18106 (description "This package is a parser for Coffeescript Object
18107Notation (CSON).")
18108 (license license:expat)))
e24c672e
LDB
18109
18110(define-public python-asynctest
18111 (package
18112 (name "python-asynctest")
18113 (version "0.13.0")
18114 (source
18115 (origin
18116 (method url-fetch)
18117 (uri (pypi-uri "asynctest" version))
18118 (sha256
18119 (base32
18120 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
18121 (build-system python-build-system)
18122 (arguments
18123 '(#:phases
18124 (modify-phases %standard-phases
18125 (replace 'check
18126 (lambda _
18127 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
18128 (add-after 'unpack 'disable-tests
18129 (lambda* _
18130 (substitute* "test/test_selector.py"
18131 ;; XXX: This test fails for unknown reason inside the build
18132 ;; environment.
18133 (("def test_events_watched_outside_test_are_ignored")
18134 "@unittest.skip('disabled by guix')
18135 def test_events_watched_outside_test_are_ignored")))))))
18136 (home-page "https://github.com/Martiusweb/asynctest")
18137 (synopsis "Extension of unittest for testing asyncio libraries")
18138 (description
18139 "The package asynctest is built on top of the standard unittest module
18140and cuts down boilerplate code when testing libraries for asyncio.")
18141 (license license:asl2.0)))
1cc9c38e
LDB
18142
18143(define-public python-aionotify
18144 (package
18145 (name "python-aionotify")
18146 (version "0.2.0")
18147 (source
18148 (origin
18149 ;; Source tarball on PyPi lacks tests
18150 (method git-fetch)
18151 (uri (git-reference
18152 (url "https://github.com/rbarrois/aionotify")
18153 (commit (string-append "v" version))))
18154 (file-name (git-file-name name version))
18155 (sha256
18156 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
18157 (build-system python-build-system)
18158 (native-inputs `(("python-asynctest" ,python-asynctest)))
18159 (home-page "https://github.com/rbarrois/aionotify")
18160 (synopsis "Asyncio-powered inotify library")
18161 (description
18162 "@code{aionotify} is a simple, asyncio-based inotify library.")
18163 (license license:bsd-3)))
84efaa3b
LDB
18164
18165(define-public python-forbiddenfruit
18166 (package
18167 (name "python-forbiddenfruit")
18168 (version "0.1.3")
18169 (source
18170 (origin
18171 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
18172 (method git-fetch)
18173 (uri (git-reference
18174 (url "https://github.com/clarete/forbiddenfruit")
18175 (commit version)))
18176 (file-name (git-file-name name version))
18177 (sha256
18178 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
18179 (build-system python-build-system)
18180 (arguments
18181 '(#:phases
18182 (modify-phases %standard-phases
18183 (replace 'check
18184 (lambda _
18185 (invoke "make" "SKIP_DEPS=1"))))))
18186 (native-inputs
18187 `(("python-nose" ,python-nose)
18188 ("python-coverage" ,python-coverage)))
18189 (home-page "https://github.com/clarete/forbiddenfruit")
18190 (synopsis "Patch python built-in objects")
18191 (description "This project allows Python code to extend built-in types.")
18192 (license (list license:gpl3+ license:expat))))
9786258b
LDB
18193
18194(define-public python-shouldbe
18195 (package
18196 (name "python-shouldbe")
18197 (version "0.1.2")
18198 (source
18199 (origin
18200 (method url-fetch)
18201 (uri (pypi-uri "shouldbe" version))
18202 (sha256
18203 (base32
18204 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
18205 (build-system python-build-system)
18206 (propagated-inputs
18207 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
18208 (native-inputs
18209 `(("python-nose" ,python-nose)))
18210 (home-page "https://github.com/directxman12/should_be")
18211 (synopsis "Python Assertion Helpers inspired by Shouldly")
18212 (description
18213 "Python Assertion Helpers inspired by Shouldly.")
18214 (license license:isc)))
72c2478a
LDB
18215
18216(define-public python-k5test
18217 (package
18218 (name "python-k5test")
18219 (version "0.9.2")
18220 (source
18221 (origin
18222 (method url-fetch)
18223 (uri (pypi-uri "k5test" version))
18224 (sha256
18225 (base32
18226 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
18227 (build-system python-build-system)
18228 (propagated-inputs
18229 `(("python-six" ,python-six)
18230 ;; `which`, `kadmin.local` binaries called inside library
18231 ("which" ,which)
18232 ("mit-krb5" ,mit-krb5)))
18233 (native-inputs `(("mit-krb5" ,mit-krb5)))
18234 (arguments
18235 '(#:phases
18236 (modify-phases %standard-phases
18237 (add-after 'unpack 'patch-paths
18238 (lambda* _
18239 (substitute* "k5test/realm.py"
18240 (("'kadmin_local'") "'kadmin.local'")))))))
18241 (home-page "https://github.com/pythongssapi/k5test")
18242 (synopsis "Library for setting up self-contained Kerberos 5 environments")
18243 (description
18244 "@code{k5test} is a library for setting up self-contained Kerberos 5
18245environments, and running Python unit tests inside those environments. It is
18246based on the file of the same name found alongside the MIT Kerberos 5 unit
18247tests.")
18248 (license license:isc)))
a8ef4978
LDB
18249
18250(define-public python-gssapi
18251 (package
18252 (name "python-gssapi")
18253 (version "1.6.1")
18254 (source
18255 (origin
18256 (method url-fetch)
18257 (uri (pypi-uri "gssapi" version))
18258 (sha256
18259 (base32
18260 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
18261 (build-system python-build-system)
18262 (propagated-inputs
18263 `(("python-decorator" ,python-decorator)
18264 ("python-six" ,python-six)))
18265 (inputs
18266 `(("mit-krb5" ,mit-krb5)))
18267 ;; for tests
18268 (native-inputs
18269 `(("python-shouldbe" ,python-shouldbe)
18270 ("python-parameterized" ,python-parameterized)
18271 ("python-k5test" ,python-k5test)
18272 ("python-nose" ,python-nose)))
18273 (home-page "https://github.com/pythongssapi/python-gssapi")
18274 (synopsis "Python GSSAPI Wrapper")
18275 (description
18276 "Python-GSSAPI provides both low-level and high level wrappers around the
18277GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
18278also be useable with other GSSAPI mechanisms.")
18279 (license license:isc)))
7261bdca
JL
18280
18281(define-public python-check-manifest
18282 (package
18283 (name "python-check-manifest")
18284 (version "0.37")
18285 (source
18286 (origin
18287 (method url-fetch)
18288 (uri (pypi-uri "check-manifest" version))
18289 (sha256
18290 (base32
18291 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
18292 (build-system python-build-system)
18293 (native-inputs
18294 `(("python-mock" ,python-mock)
18295 ("git" ,git)))
18296 (home-page "https://github.com/mgedmin/check-manifest")
18297 (synopsis "Check MANIFEST.in in a Python source package for completeness")
18298 (description "Python package can include a MANIFEST.in file to help with
18299sending package files to the Python Package Index. This package checks that
18300file to ensure it completely and accurately describes your project.")
18301 (license license:expat)))
b487b7b5
JL
18302
18303(define-public python-android-stringslib
18304 (package
18305 (name "python-android-stringslib")
18306 (version "0.1.2")
18307 (source
18308 (origin
18309 (method git-fetch)
18310 (uri (git-reference
18311 (url "https://framagit.org/tyreunom/python-android-strings-lib")
18312 (commit (string-append "v" version))))
18313 (file-name (git-file-name name version))
18314 (sha256
18315 (base32
18316 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
18317 (build-system python-build-system)
18318 (arguments
18319 `(#:tests? #f))
18320 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
18321 (synopsis "Android strings.xml support")
18322 (description "Android Strings Lib provides support for android's strings.xml
18323files. These files are used to translate strings in android apps.")
18324 (license license:expat)))
87435943 18325
7dec888f
JL
18326(define-public python-watchdog
18327 (package
18328 (name "python-watchdog")
18329 (version "0.9.0")
18330 (source
18331 (origin
18332 (method url-fetch)
18333 (uri (pypi-uri "watchdog" version))
18334 (sha256
18335 (base32
18336 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
18337 (build-system python-build-system)
18338 (arguments
18339 `(#:phases
18340 (modify-phases %standard-phases
18341 (add-before 'check 'remove-failing
18342 (lambda _
18343 (delete-file "tests/test_inotify_buffer.py")
18344 (delete-file "tests/test_snapshot_diff.py")
18345 #t)))))
18346 (propagated-inputs
18347 `(("python-argh" ,python-argh)
18348 ("python-pathtools" ,python-pathtools)
18349 ("python-pyyaml" ,python-pyyaml)))
18350 (native-inputs
18351 `(("python-pytest-cov" ,python-pytest-cov)
18352 ("python-pytest-timeout" ,python-pytest-timeout)))
18353 (home-page "https://github.com/gorakhargosh/watchdog")
18354 (synopsis "Filesystem events monitoring")
18355 (description "This package provides a way to monitor filesystem events
18356such as a file modification and trigger an action. This is similar to inotify,
18357but portable.")
18358 (license license:asl2.0)))
2cbede59 18359
9c9704a9
MC
18360(define-public python-wget
18361 (package
18362 (name "python-wget")
18363 (version "3.2")
18364 (source
18365 (origin
18366 (method url-fetch)
18367 (uri (pypi-uri "wget" version ".zip"))
18368 (sha256
18369 (base32
18370 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
18371 (build-system python-build-system)
18372 (native-inputs `(("unzip" ,unzip)))
18373 (home-page "https://bitbucket.org/techtonik/python-wget/")
18374 (synopsis "Pure Python download utility")
18375 (description "The python-wget library provides an API to download files
18376with features similar to the @command{wget} utility.")
18377 (license license:unlicense)))
18378
2cbede59
JL
18379(define-public offlate
18380 (package
18381 (name "offlate")
18382 (version "0.5")
18383 (source
18384 (origin
18385 (method git-fetch)
18386 (uri (git-reference
18387 (url "https://framagit.org/tyreunom/offlate")
18388 (commit version)))
18389 (file-name (git-file-name name version))
18390 (sha256
18391 (base32
18392 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
18393 (build-system python-build-system)
18394 (arguments
18395 ;; No tests
18396 `(#:tests? #f))
18397 (propagated-inputs
18398 `(("python-android-stringslib" ,python-android-stringslib)
18399 ("python-dateutil" ,python-dateutil)
18400 ("python-gitlab" ,python-gitlab)
18401 ("python-lxml" ,python-lxml)
18402 ("python-polib" ,python-polib)
18403 ("python-pyenchant" ,python-pyenchant)
18404 ("python-pygit2" ,python-pygit2)
18405 ("python-pygithub" ,python-pygithub)
18406 ("python-pyqt" ,python-pyqt)
18407 ("python-requests" ,python-requests)
18408 ("python-ruamel.yaml" ,python-ruamel.yaml)
18409 ("python-translation-finder" ,python-translation-finder)
18410 ("python-watchdog" ,python-watchdog)))
18411 (native-inputs
18412 `(("qttools" ,qttools)))
18413 (home-page "https://framagit.org/tyreunom/offlate")
18414 (synopsis "Offline translation interface for online translation tools")
18415 (description "Offlate offers a unified interface for different translation
18416file formats, as well as many different online translation platforms. You can
18417use it to get work from online platforms, specialized such as the Translation
18418Project, or not such a gitlab instance when your upstream doesn't use any
18419dedicated platform. The tool proposes a unified interface for any format and
18420an upload option to send your work back to the platform.")
18421 (license license:gpl3+)))
479f4013
JK
18422
18423(define-public python-pypng
18424 (package
18425 (name "python-pypng")
18426 (version "0.0.20")
18427 (source
18428 (origin
18429 (method url-fetch)
18430 (uri (pypi-uri "pypng" version))
18431 (sha256
18432 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
18433 (build-system python-build-system)
18434 (home-page "https://github.com/drj11/pypng")
18435 (synopsis "Pure Python PNG image encoder/decoder")
18436 (description
18437 "The PyPNG module implements support for PNG images. It reads and writes
18438PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
18439pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
18440LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
18441images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
18442A number of optional chunks can be specified (when writing) and
18443understood (when reading): tRNS, bKGD, gAMA.
18444
18445PyPNG is not a high level toolkit for image processing (like PIL) and does not
18446aim at being a replacement or competitor. Its strength lies in fine-grained
18447extensive support of PNG features. It can also read and write Netpbm PAM
18448files, with a focus on its use as an intermediate format for implementing
18449custom PNG processing.")
18450 (license license:expat)))
da8ca4c3 18451
18452(define-public python-fuzzywuzzy
18453 (package
18454 (name "python-fuzzywuzzy")
18455 (version "0.18.0")
18456 (source
18457 (origin
18458 (method url-fetch)
18459 (uri (pypi-uri "fuzzywuzzy" version))
18460 (sha256
18461 (base32
18462 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
18463 (build-system python-build-system)
18464 (native-inputs
18465 `(("python-hypothesis" ,python-hypothesis)
18466 ("python-pycodestyle" ,python-pycodestyle)
18467 ("python-pytest" ,python-pytest)))
18468 (propagated-inputs
18469 `(("python-levenshtein" ,python-levenshtein)))
18470 (home-page "https://github.com/seatgeek/fuzzywuzzy")
7d9f8db2 18471 (synopsis "Fuzzy string matching in Python")
da8ca4c3 18472 (description "Approximate string matching using
18473@emph{Levenshtein Distance} to calculate the differences between
18474sequences.")
18475 (license license:gpl2)))
18476
18477(define-public python2-fuzzywuzzy
18478 (package-with-python2 python-fuzzywuzzy))
34bf3ed2
EF
18479
18480(define-public python-block-tracing
18481 (package
18482 (name "python-block-tracing")
18483 (version "1.0.1")
18484 (source
18485 (origin
18486 (method url-fetch)
18487 (uri (pypi-uri "block_tracing" version))
18488 (sha256
18489 (base32
18490 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
18491 (build-system python-build-system)
18492 (arguments '(#:tests? #f)) ; no tests
18493 (home-page "https://github.com/rianhunter/block_tracing")
18494 (synopsis "Protect process memory")
18495 (description
18496 "@code{block_tracing} is a tiny Python library that can be used to
18497prevent debuggers and other applications from inspecting the memory within
18498your process.")
18499 (license license:expat)))
591faabd
AT
18500
18501(define-public python-gcovr
18502 (package
18503 (name "python-gcovr")
18504 (version "4.2")
18505 (source
18506 (origin
18507 (method url-fetch)
18508 (uri (pypi-uri "gcovr" version))
18509 (sha256
18510 (base32
18511 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
18512 (build-system python-build-system)
18513 (propagated-inputs
18514 `(("python-lxml" ,python-lxml)
18515 ("python-jinja2" ,python-jinja2)))
18516 (home-page "https://gcovr.com/")
18517 (synopsis "Utility for generating code coverage results")
18518 (description
18519 "Gcovr provides a utility for managing the use of the GNU gcov
18520utility and generating summarized code coverage results. It is inspired
18521by the Python coverage.py package, which provides a similar utility for
18522Python.")
18523 (license license:bsd-3)))
efcb0508
GLV
18524
18525(define-public python-owslib
18526 (package
18527 (name "python-owslib")
18528 (version "0.19.2")
18529 (source
18530 (origin
18531 (method url-fetch)
18532 (uri (pypi-uri "OWSLib" version))
18533 (sha256
18534 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
18535 (build-system python-build-system)
18536 (arguments
18537 '(#:tests? #f)) ; TODO: package dependencies required for tests.
18538 (synopsis "Interface for Open Geospatial Consortium web service")
18539 (description
18540 "OWSLib is a Python package for client programming with Open Geospatial
18541Consortium (OGC) web service (hence OWS) interface standards, and their related
18542content models.")
18543 (home-page "https://geopython.github.io/OWSLib/")
18544 (license license:bsd-3)))
b14c234c
JM
18545
18546(define-public python-docusign-esign
18547 (package
18548 (name "python-docusign-esign")
18549 (version "3.1.0")
18550 (source (origin
18551 (method url-fetch)
18552 (uri (pypi-uri "docusign_esign" version))
18553 (sha256
18554 (base32
18555 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
18556 (build-system python-build-system)
18557 ;; Testing requires undocumented setup changes, and so testing is disabled here.
18558 (arguments `(#:tests? #f))
18559 (propagated-inputs
18560 `(("python-certifi", python-certifi)
18561 ("python-six", python-six)
18562 ("python-dateutil", python-dateutil)
18563 ("python-urllib3", python-urllib3)
18564 ("python-pyjwt", python-pyjwt)
18565 ("python-cryptography", python-cryptography)
18566 ("python-nose", python-nose)))
18567 (synopsis "DocuSign Python Client")
18568 (description "The Official DocuSign Python Client Library used to interact
18569 with the eSign REST API. Send, sign, and approve documents using this client.")
18570 (home-page "https://www.docusign.com/devcenter")
18571 (license license:expat)))
f6c78480
TLC
18572
18573(define-public python-xattr
18574 (package
18575 (name "python-xattr")
18576 (version "0.9.7")
18577 (source
18578 (origin
18579 (method url-fetch)
18580 (uri (pypi-uri "xattr" version))
18581 (sha256
18582 (base32
18583 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
18584 (build-system python-build-system)
18585 (propagated-inputs
18586 `(("python-cffi" ,python-cffi)))
18587 (home-page "https://github.com/xattr/xattr")
18588 (synopsis
18589 "Python wrapper for extended filesystem attributes")
18590 (description "This package provides a Python wrapper for using extended
18591filesystem attributes. Extended attributes extend the basic attributes of files
18592and directories in the file system. They are stored as name:data pairs
18593associated with file system objects (files, directories, symlinks, etc).")
18594 (license license:expat)))
3b3edfa8
TLC
18595
18596(define-public python-json-logger
18597 (package
18598 (name "python-json-logger")
18599 (version "0.1.11")
18600 (source
18601 (origin
18602 (method url-fetch)
18603 (uri (pypi-uri "python-json-logger" version))
18604 (sha256
18605 (base32
18606 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
18607 (build-system python-build-system)
18608 (home-page
18609 "https://github.com/madzak/python-json-logger")
18610 (synopsis "JSON log formatter in Python")
18611 (description "This library allows standard Python logging to output log data
18612as JSON objects. With JSON we can make our logs more readable by machines and
18613we can stop writing custom parsers for syslog-type records.")
18614 (license license:bsd-3)))
20c9df4e
TLC
18615
18616(define-public python-daiquiri
18617 (package
18618 (name "python-daiquiri")
18619 (version "2.1.1")
18620 (source
18621 (origin
18622 (method url-fetch)
18623 (uri (pypi-uri "daiquiri" version))
18624 (sha256
18625 (base32
18626 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
18627 (build-system python-build-system)
18628 (propagated-inputs
18629 `(("python-json-logger" ,python-json-logger)))
18630 (native-inputs
18631 `(("python-mock" ,python-mock)
18632 ("python-pytest" ,python-pytest)
18633 ("python-setuptools-scm" ,python-setuptools-scm)
18634 ("python-six" ,python-six)))
18635 (home-page "https://github.com/jd/daiquiri")
18636 (synopsis
18637 "Library to configure Python logging easily")
18638 (description "The daiquiri library provides an easy way to configure
18639logging in Python. It also provides some custom formatters and handlers.")
18640 (license license:asl2.0)))
f5879f15
TLC
18641
18642(define-public python-pifpaf
18643 (package
18644 (name "python-pifpaf")
18645 (version "2.4.0")
18646 (source
18647 (origin
18648 (method url-fetch)
18649 (uri (pypi-uri "pifpaf" version))
18650 (sha256
18651 (base32
18652 "150av2pylsjy8ykrpyi0vzy2q24s9rhh2ya01zvwnvj9j5dspviz"))))
18653 (build-system python-build-system)
18654 (arguments
18655 `(#:tests? #f))
18656 (propagated-inputs
18657 `(("python-click" ,python-click)
18658 ("python-daiquiri" ,python-daiquiri)
18659 ("python-fixtures" ,python-fixtures)
18660 ("python-jinja2" ,python-jinja2)
18661 ("python-pbr" ,python-pbr)
18662 ("python-psutil" ,python-psutil)
18663 ("python-six" ,python-six)
18664 ("python-xattr" ,python-xattr)))
18665 (native-inputs
18666 `(("python-mock" ,python-mock)
18667 ("python-os-testr" ,python-os-testr)
18668 ("python-requests" ,python-requests)
18669 ("python-testrepository" ,python-testrepository)
18670 ("python-testtools" ,python-testtools)))
18671 (home-page "https://github.com/jd/pifpaf")
18672 (synopsis "Tools and fixtures to manage daemons for testing in Python")
18673 (description "Pifpaf is a suite of fixtures and a command-line tool that
18674allows to start and stop daemons for a quick throw-away usage. This is typically
18675useful when needing these daemons to run integration testing. It originally
18676evolved from its precursor @code{overtest}.")
18677 (license license:asl2.0)))
aefcfecd
LDB
18678
18679(define-public python-pytest-check-links
18680 (package
18681 (name "python-pytest-check-links")
18682 (version "0.3.0")
18683 (source
18684 (origin
18685 (method url-fetch)
18686 ;; URI uses underscores
18687 (uri (pypi-uri "pytest_check_links" version))
18688 (sha256
18689 (base32
18690 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
18691 (build-system python-build-system)
18692 (propagated-inputs
18693 `(("python-docutils" ,python-docutils)
18694 ("python-html5lib" ,python-html5lib)
18695 ("python-nbconvert" ,python-nbconvert)
18696 ("python-nbformat" ,python-nbformat)
18697 ("python-pytest" ,python-pytest)
18698 ("python-six" ,python-six)))
18699 (native-inputs
18700 `(("python-pbr-minimal" ,python-pbr-minimal)))
18701 (home-page "https://github.com/minrk/pytest-check-links")
18702 (synopsis "Check links in files")
18703 (description "This package provides a pytest plugin that checks URLs for
18704HTML-containing files.")
18705 (license license:bsd-3)))
01d5f2c5
LDB
18706
18707(define-public python-json5
18708 (package
18709 (name "python-json5")
18710 (version "0.8.5")
18711 (source
18712 (origin
18713 ;; sample.json5 is missing from PyPi source tarball
18714 (method git-fetch)
18715 (uri (git-reference
18716 (url "https://github.com/dpranke/pyjson5.git")
18717 (commit (string-append "v" version))))
18718 (file-name (git-file-name name version))
18719 (sha256
18720 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
18721 (build-system python-build-system)
18722 (home-page "https://github.com/dpranke/pyjson5")
18723 (synopsis
18724 "Python implementation of the JSON5 data format")
18725 (description
18726 "JSON5 extends the JSON data interchange format to make it slightly more
18727usable as a configuration language. This Python package implements parsing and
18728dumping of JSON5 data structures.")
18729 (license license:asl2.0)))
3094c0ae
AW
18730
18731(define-public python-frozendict
18732 (package
18733 (name "python-frozendict")
18734 (version "1.2")
18735 (source
18736 (origin
18737 (method url-fetch)
18738 (uri (pypi-uri "frozendict" version))
18739 (sha256
18740 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
18741 (build-system python-build-system)
18742 (home-page "https://github.com/slezica/python-frozendict")
18743 (synopsis "Simple immutable mapping for Python")
18744 (description
18745 "@dfn{frozendict} is an immutable wrapper around dictionaries that
18746implements the complete mapping interface. It can be used as a drop-in
18747replacement for dictionaries where immutability is desired.")
18748 (license license:expat)))