gnu: python-django: Use HTTPS home page.
[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>
f825e605 62;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
fb236fdd 63;;; Copyright © 2019 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>
ba42a6bf 68;;; Copyright © 2019 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>
44d10b1f
RW
73;;;
74;;; This file is part of GNU Guix.
75;;;
76;;; GNU Guix is free software; you can redistribute it and/or modify it
77;;; under the terms of the GNU General Public License as published by
78;;; the Free Software Foundation; either version 3 of the License, or (at
79;;; your option) any later version.
80;;;
81;;; GNU Guix is distributed in the hope that it will be useful, but
82;;; WITHOUT ANY WARRANTY; without even the implied warranty of
83;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84;;; GNU General Public License for more details.
85;;;
86;;; You should have received a copy of the GNU General Public License
87;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
88
89(define-module (gnu packages python-xyz)
90 #:use-module ((guix licenses) #:prefix license:)
91 #:use-module (gnu packages)
92 #:use-module (gnu packages algebra)
93 #:use-module (gnu packages adns)
94 #:use-module (gnu packages attr)
95 #:use-module (gnu packages backup)
96 #:use-module (gnu packages bash)
97 #:use-module (gnu packages check)
98 #:use-module (gnu packages compression)
99 #:use-module (gnu packages crypto)
100 #:use-module (gnu packages databases)
f825e605 101 #:use-module (gnu packages dbm)
2cbede59 102 #:use-module (gnu packages enchant)
44d10b1f
RW
103 #:use-module (gnu packages file)
104 #:use-module (gnu packages fontutils)
105 #:use-module (gnu packages gcc)
106 #:use-module (gnu packages geo)
107 #:use-module (gnu packages ghostscript)
108 #:use-module (gnu packages gl)
109 #:use-module (gnu packages glib)
e2ebbbcc 110 #:use-module (gnu packages gnome)
44d10b1f
RW
111 #:use-module (gnu packages graphviz)
112 #:use-module (gnu packages graphics)
113 #:use-module (gnu packages gstreamer)
114 #:use-module (gnu packages gtk)
115 #:use-module (gnu packages icu4c)
116 #:use-module (gnu packages image)
117 #:use-module (gnu packages imagemagick)
72c2478a 118 #:use-module (gnu packages kerberos)
44d10b1f
RW
119 #:use-module (gnu packages libevent)
120 #:use-module (gnu packages libffi)
121 #:use-module (gnu packages linux)
122 #:use-module (gnu packages llvm)
123 #:use-module (gnu packages man)
124 #:use-module (gnu packages maths)
42f0b0c2 125 #:use-module (gnu packages monitoring)
44d10b1f
RW
126 #:use-module (gnu packages multiprecision)
127 #:use-module (gnu packages networking)
128 #:use-module (gnu packages ncurses)
129 #:use-module (gnu packages openstack)
130 #:use-module (gnu packages pcre)
131 #:use-module (gnu packages perl)
a5e76112 132 #:use-module (gnu packages photo)
44d10b1f
RW
133 #:use-module (gnu packages pkg-config)
134 #:use-module (gnu packages python)
d362b11d 135 #:use-module (gnu packages python-check)
15b65617 136 #:use-module (gnu packages python-compression)
44d10b1f 137 #:use-module (gnu packages python-crypto)
ca7c3653 138 #:use-module (gnu packages python-science)
44d10b1f
RW
139 #:use-module (gnu packages python-web)
140 #:use-module (gnu packages qt)
141 #:use-module (gnu packages readline)
142 #:use-module (gnu packages sdl)
143 #:use-module (gnu packages search)
144 #:use-module (gnu packages shells)
9d0c291e 145 #:use-module (gnu packages sphinx)
44d10b1f
RW
146 #:use-module (gnu packages ssh)
147 #:use-module (gnu packages terminals)
148 #:use-module (gnu packages tex)
149 #:use-module (gnu packages texinfo)
150 #:use-module (gnu packages time)
151 #:use-module (gnu packages tls)
152 #:use-module (gnu packages version-control)
153 #:use-module (gnu packages video)
154 #:use-module (gnu packages web)
155 #:use-module (gnu packages base)
156 #:use-module (gnu packages xml)
157 #:use-module (gnu packages xorg)
158 #:use-module (gnu packages xdisorg)
159 #:use-module (gnu packages tcl)
160 #:use-module (gnu packages bdw-gc)
f98232a3 161 #:use-module (gnu packages serialization)
44d10b1f
RW
162 #:use-module (guix packages)
163 #:use-module (guix download)
164 #:use-module (guix git-download)
a042d348 165 #:use-module (guix hg-download)
44d10b1f
RW
166 #:use-module (guix utils)
167 #:use-module (guix build-system gnu)
168 #:use-module (guix build-system cmake)
169 #:use-module (guix build-system python)
170 #:use-module (guix build-system trivial)
171 #:use-module (srfi srfi-1)
172 #:use-module (srfi srfi-26))
173
2f12e660
SS
174(define-public python-tenacity
175 (package
176 (name "python-tenacity")
177 (version "6.1.0")
178 (source (origin
179 (method url-fetch)
180 (uri (pypi-uri "tenacity" version))
181 (sha256
182 (base32
183 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
184 (build-system python-build-system)
185 (native-inputs
186 `(("python-setuptools-scm" ,python-setuptools-scm)
187 ("python-sphinx" ,python-sphinx)
188 ("python-tornado" ,python-tornado)
189 ("python-pytest" ,python-pytest)))
190 (propagated-inputs
191 `(("python-six" ,python-six)))
192 (arguments
193 `(#:phases (modify-phases %standard-phases
194 (replace 'check
195 (lambda _
196 (invoke "pytest")
197 #t)))))
198 (home-page "https://github.com/jd/tenacity")
199 (synopsis "Retrying library for python")
200 (description "Tenacity is a general-purpose python library to simplify the
201task of adding retry behavior to just about anything.")
202 (license license:asl2.0)))
203
dcf95329
SS
204(define-public python-colorlog
205 (package
206 (name "python-colorlog")
207 (version "4.1.0")
208 (source (origin
209 (method url-fetch)
210 (uri (pypi-uri "colorlog" version))
211 (sha256
212 (base32
213 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
214 (build-system python-build-system)
215 (native-inputs
216 `(("python-pytest" ,python-pytest)))
217 (arguments
218 `(#:phases (modify-phases %standard-phases
219 (replace 'check
220 (lambda _
221 ;; Extend PYTHONPATH so the built package will be found.
222 (setenv "PYTHONPATH"
223 (string-append (getcwd) "/build/lib:"
224 (getenv "PYTHONPATH")))
225 (invoke "pytest" "-p" "no:logging")
226 #t)))))
227 (home-page "https://github.com/borntyping/python-colorlog")
228 (synopsis "Log formatting with colors for python")
229 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
230with Python's logging module that outputs records using terminal colors.")
231 (license license:expat)))
232
23fde56b
SS
233(define-public python-pyprind
234 (package
235 (name "python-pyprind")
236 (version "2.11.2")
237 (source (origin
238 (method url-fetch)
239 (uri (pypi-uri "PyPrind" version))
240 (sha256
241 (base32
242 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
243 (build-system python-build-system)
244 (propagated-inputs
245 `(("python-psutil" ,python-psutil)))
246 (home-page "https://github.com/rasbt/pyprind")
247 (synopsis "Python Progress Bar and Percent Indicator Utility")
248 (description "The PyPrind (Python Progress Indicator) module provides a
249progress bar and a percentage indicator object that let you track the progress
250of a loop structure or other iterative computation.")
251 (license license:bsd-3)))
252
f3465dee
SS
253(define-public python-gphoto2
254 (package
255 (name "python-gphoto2")
256 (version "2.2.1")
257 (source (origin
258 (method url-fetch)
259 (uri (pypi-uri "gphoto2" version))
260 (sha256
261 (base32
262 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
263 (build-system python-build-system)
264 (native-inputs
265 `(("pkg-config" ,pkg-config)))
266 (inputs
267 `(("libgphoto2" ,libgphoto2)))
268 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
269 (synopsis "Python interface to libgphoto2")
270 (description "@code{python-gphoto2} is a comprehensive Python interface
271(or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
272automatically generate the interface code.")
273 (license license:gpl3+)))
274
2763f0de
SS
275(define-public python-colour
276 (package
277 (name "python-colour")
278 (version "0.1.5")
279 (source (origin
280 (method url-fetch)
281 (uri (pypi-uri "colour" version))
282 (sha256
283 (base32
284 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
285 (build-system python-build-system)
286 (native-inputs
287 `(("python-d2to1" ,python-d2to1)))
288 (home-page "https://github.com/vaab/colour")
289 (synopsis "Convert and manipulate various color representations")
290 (description "Pythonic way to manipulate color representations (HSL, RVB,
291web, X11, ...).")
292 (license license:expat)))
293
5164a92e
SS
294(define-public python-d2to1
295 (package
296 (name "python-d2to1")
297 (version "0.2.12.post1")
298 (source (origin
299 (method url-fetch)
300 (uri (pypi-uri "d2to1" version))
301 (sha256
302 (base32
303 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
304 (build-system python-build-system)
305 (native-inputs
306 `(("python-nose" ,python-nose)))
307 (home-page "https://github.com/embray/d2to1")
308 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
309in python")
310 (description "The python package d2to1 (the d is for distutils) allows
311using distutils2-like setup.cfg files for a package's metadata with a
312distribute/setuptools setup.py script.")
313 (license license:bsd-2)))
314
a5e76112
SS
315(define-public python-rawkit
316 (package
317 (name "python-rawkit")
318 (version "0.6.0")
319 (source (origin
320 (method url-fetch)
321 (uri (pypi-uri "rawkit" version))
322 (sha256
323 (base32
324 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
325 (build-system python-build-system)
326 (native-inputs
327 `(("python-pytest" ,python-pytest)
328 ("python-mock" ,python-mock)))
329 (inputs
330 `(("libraw" ,libraw)))
331 (home-page "https://rawkit.readthedocs.io")
332 (synopsis "Ctypes-based LibRaw binding for Python")
333 (description "The rawkit package provides two modules: rawkit and libraw.
334The rawkit module provides a high-level Pythonic interface for developing raw
335photos, while the libraw module provides a CTypes based interface for
336interacting with the low-level LibRaw C APIs.")
337 (license license:expat)))
338
1b9c1fdb
SS
339(define-public python-easygui
340 (package
341 (name "python-easygui")
342 (version "0.98.1")
343 (source (origin
344 (method url-fetch)
345 (uri (pypi-uri "easygui" version))
346 (sha256
347 (base32
348 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
349 (build-system python-build-system)
350 (propagated-inputs
351 `(("python-tkinter" ,python "tk")))
352 (home-page "https://github.com/robertlugg/easygui")
353 (synopsis "GUI programming module for Python")
354 (description "EasyGUI is a module for very simple, very easy GUI
355programming in Python. EasyGUI is different from other GUI generators in that
356EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
357simple function calls.")
358 (license license:bsd-3)))
359
244a527d
SS
360(define-public python-pymediainfo
361 (package
362 (name "python-pymediainfo")
363 (version "4.1")
364 (source
365 (origin
366 (method url-fetch)
367 (uri (pypi-uri "pymediainfo" version))
368 (sha256
369 (base32
370 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
371 (build-system python-build-system)
372 (native-inputs
373 `(("python-setuptools-scm" ,python-setuptools-scm)
374 ("python-pytest" ,python-pytest)))
375 (inputs
376 `(("libmediainfo" ,libmediainfo)))
377 (arguments
378 `(#:phases
379 (modify-phases %standard-phases
380 (add-after 'unpack 'patch-libmediainfo
381 (lambda _
382 (substitute* "pymediainfo/__init__.py"
383 (("libmediainfo.so.0")
384 (string-append (assoc-ref %build-inputs "libmediainfo")
385 "/lib/libmediainfo.so.0")))
386 #t))
387 (replace 'check
388 (lambda _
389 ;; Extend PYTHONPATH so the built package will be found.
390 (setenv "PYTHONPATH"
391 (string-append (getcwd) "/build/lib:"
392 (getenv "PYTHONPATH")))
393 ;; Skip the only failing test "test_parse_url"
394 (invoke "pytest" "-vv" "-k" "not test_parse_url")
395 #t)))))
396 (home-page
397 "https://github.com/sbraz/pymediainfo")
398 (synopsis
399 "Python wrapper for the mediainfo library")
400 (description
401 "Python wrapper for the mediainfo library to access the technical and tag
402data for video and audio files.")
403 (license license:expat)))
404
44d10b1f
RW
405(define-public python-psutil
406 (package
407 (name "python-psutil")
e9119ac1 408 (version "5.6.5")
44d10b1f
RW
409 (source
410 (origin
411 (method url-fetch)
412 (uri (pypi-uri "psutil" version))
413 (sha256
e9119ac1 414 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
44d10b1f
RW
415 (build-system python-build-system)
416 (arguments
417 ;; FIXME: some tests does not return and times out.
418 '(#:tests? #f))
419 (home-page "https://www.github.com/giampaolo/psutil")
420 (synopsis "Library for retrieving information on running processes")
421 (description
422 "psutil (Python system and process utilities) is a library for retrieving
423information on running processes and system utilization (CPU, memory, disks,
424network) in Python. It is useful mainly for system monitoring, profiling and
425limiting process resources and management of running processes. It implements
426many functionalities offered by command line tools such as: ps, top, lsof,
427netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
428pidof, tty, taskset, pmap.")
429 (properties `((python2-variant . ,(delay python2-psutil))))
430 (license license:bsd-3)))
431
432(define-public python2-psutil
433 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
434 (package
435 (inherit base)
436 (propagated-inputs
437 `(("python2-enum34" ,python2-enum34) ;optional
438 ,@(package-propagated-inputs base))))))
439
440(define-public python-shapely
441 (package
442 (name "python-shapely")
6d94465b 443 (version "1.6.4.post2")
44d10b1f
RW
444 (source
445 (origin
446 (method url-fetch)
447 (uri (pypi-uri "Shapely" version))
448 (sha256
449 (base32
6d94465b 450 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
451 (build-system python-build-system)
452 (native-inputs
453 `(("python-cython" ,python-cython)
454 ("python-matplotlib" ,python-matplotlib)
455 ("python-pytest" ,python-pytest)
456 ("python-pytest-cov" ,python-pytest-cov)))
457 (inputs
458 `(("geos" ,geos)))
459 (propagated-inputs
460 `(("python-numpy" ,python-numpy)))
461 (arguments
462 `(#:phases
463 (modify-phases %standard-phases
464 (add-after 'unpack 'patch-geos-path
465 (lambda* (#:key inputs #:allow-other-keys)
466 (let ((geos (assoc-ref inputs "geos"))
467 (glibc (assoc-ref inputs ,(if (%current-target-system)
468 "cross-libc" "libc"))))
469 (substitute* "shapely/geos.py"
470 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
471 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
472 geos "/lib/libgeos_c.so'])"))
473 (("free = load_dll\\('c'\\)\\.free")
474 (string-append "free = load_dll('c', fallbacks=['"
475 glibc "/lib/libc.so.6']).free"))))
476 #t)))))
477 (home-page "https://github.com/Toblerity/Shapely")
478 (synopsis "Library for the manipulation and analysis of geometric objects")
479 (description "Shapely is a Python package for manipulation and analysis of
480planar geometric objects. It is based on the @code{GEOS} library.")
481 (license license:bsd-3)))
482
a91f4eba
S
483(define-public python-shortuuid
484 (package
485 (name "python-shortuuid")
486 (version "0.5.0")
487 (source
488 (origin
489 (method url-fetch)
490 (uri (pypi-uri "shortuuid" version))
491 (sha256
492 (base32
493 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
494 (build-system python-build-system)
495 (native-inputs
496 `(("python-pep8" ,python-pep8)))
497 (home-page "https://github.com/skorokithakis/shortuuid")
498 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
499 (description
500 "@code{shortuuid} is a Python library for generating concise, unambiguous
501and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
502module and then similar looking characters are removed.")
503 (license license:bsd-3)))
504
44d10b1f
RW
505(define-public python-logwrap
506 (package
507 (name "python-logwrap")
508 (version "3.2.1")
509 (source
510 (origin
511 (method url-fetch)
512 (uri (pypi-uri "logwrap" version ".zip"))
513 (sha256
514 (base32
515 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
516 (build-system python-build-system)
517 (propagated-inputs
518 `(("python-six" ,python-six)
519 ("python-typing" ,python-typing)))
520 (native-inputs
521 `(("unzip" ,unzip)
522 ("python-cython" ,python-cython)
523 ("python-pytest" ,python-pytest)
524 ("python-pytest-cov" ,python-pytest-cov)
525 ("python-pytest-runner" ,python-pytest-runner)))
526 (home-page "https://github.com/penguinolog/logwrap")
527 (synopsis "Decorator for logging function arguments")
528 (description "This package provides a decorator to log function arguments
529and function call return values in a human-readable way.")
530 (license license:asl2.0)))
531
532(define-public python2-shapely
533 (package-with-python2 python-shapely))
534
535(define-public python-clyent
536 (package
537 (name "python-clyent")
538 (version "1.2.1")
539 (source
540 (origin
541 (method url-fetch)
542 (uri (pypi-uri "clyent" version))
543 (sha256
544 (base32
545 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
546 (build-system python-build-system)
547 (native-inputs
548 `(("python-mock" ,python-mock)))
549 (home-page "https://github.com/binstar/clyent")
550 (synopsis "Command line client library")
551 (description "Clyent is a Python command line utiliy library. It is used
552by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
553 (license license:bsd-3)))
554
555(define-public python2-clyent
556 (package-with-python2 python-clyent))
557
558(define-public python-babel
559 (package
560 (name "python-babel")
dab3c841 561 (version "2.8.0")
44d10b1f
RW
562 (source
563 (origin
564 (method url-fetch)
565 (uri (pypi-uri "Babel" version))
566 (sha256
567 (base32
dab3c841 568 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
44d10b1f
RW
569 (build-system python-build-system)
570 (native-inputs
571 `(("python-freezegun" ,python-freezegun)
572 ("python-pytest" ,python-pytest)))
573 (propagated-inputs
574 `(("python-pytz" ,python-pytz)))
575 (arguments
576 `(#:phases (modify-phases %standard-phases
577 (replace 'check
8acd1e90
MB
578 (lambda _
579 (invoke "pytest" "-vv" "-k"
580 (string-append
581 ;; XXX: These tests fail when using Pytest 4.x and
582 ;; Babel 2.6.0. Try removing this for later versions.
583 "not test_no_inherit_metazone_marker_never_in_output"
584 " and not test_smoke_dates"
585 " and not test_smoke_numbers")))))))
44d10b1f
RW
586 (home-page "http://babel.pocoo.org/")
587 (synopsis
588 "Tools for internationalizing Python applications")
589 (description
590 "Babel is composed of two major parts:
591- tools to build and work with gettext message catalogs
592- a Python interface to the CLDR (Common Locale Data Repository), providing
593access to various locale display names, localized number and date formatting,
594etc. ")
595 (license license:bsd-3)))
596
597(define-public python2-babel
598 (package-with-python2 python-babel))
599
93253411
MB
600;; Sphinx < 2.0 requires this version. Remove once no longer needed.
601(define-public python2-babel-2.6
602 (package
603 (inherit python2-babel)
604 (version "2.6.0")
605 (source (origin
606 (method url-fetch)
607 (uri (pypi-uri "Babel" version))
608 (sha256
609 (base32
610 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
611
44d10b1f
RW
612(define-public python2-backport-ssl-match-hostname
613 (package
614 (name "python2-backport-ssl-match-hostname")
615 (version "3.5.0.1")
616 (source
617 (origin
618 (method url-fetch)
2c1f0d09 619 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
620 (sha256
621 (base32
622 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
623 (build-system python-build-system)
624 (arguments
625 `(#:python ,python-2
626 #:tests? #f)) ; no test target
627 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
628 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
629 (description
630 "This backport brings the ssl.match_hostname() function to users of
631earlier versions of Python. The function checks the hostname in the
632certificate returned by the server to which a connection has been established,
633and verifies that it matches the intended target hostname.")
634 (license license:psfl)))
635
dc827867
TGR
636(define-public python-boolean.py
637 (package
638 (name "python-boolean.py")
639 (version "3.6")
640 (source
641 (origin
642 ;; There's no source tarball on PyPI.
643 (method git-fetch)
644 (uri (git-reference
645 (url "https://github.com/bastikr/boolean.py")
646 (commit (string-append "v" version))))
647 (file-name (git-file-name name version))
648 (sha256
649 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
650 (build-system python-build-system)
651 (home-page "https://github.com/bastikr/boolean.py")
652 (synopsis "Boolean algebra in one Python module")
653 (description
654 "This is a small Python library that implements boolean algebra.
655It defines two base elements, @code{TRUE} and @code{FALSE}, and a
656@code{Symbol} class that can take on one of these two values. Calculations
657are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
658compositions like @code{XOR} and @code{NAND} are emulated on top of them.
659Expressions are constructed from parsed strings or directly in Python.")
660 (license license:bsd-2)))
661
44d10b1f
RW
662(define-public python-hdf4
663 (package
664 (name "python-hdf4")
665 (version "0.9")
666 (source
667 (origin
668 (method url-fetch)
669 (uri (pypi-uri name version))
670 (sha256
671 (base32
672 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
673 (build-system python-build-system)
674 (native-inputs `(("nose" ,python-nose)))
675 (propagated-inputs `(("numpy" ,python-numpy)))
676 (inputs
677 `(("hdf4" ,hdf4)
678 ("libjpeg" ,libjpeg)
679 ("zlib" ,zlib)))
680 (arguments
681 `(#:phases
682 (modify-phases %standard-phases
683 (replace 'check
684 (lambda _
685 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
686 ;; on to import numpy. Somehow this works on their CI system.
687 ;; Let's just manage PYTHONPATH here instead.
688 (substitute* "runexamples.sh"
689 (("export PYTHONPATH=.*") ""))
690 (setenv "PYTHONPATH"
691 (string-append (getcwd) ":"
692 (getenv "PYTHONPATH")))
693 (invoke "./runexamples.sh")
694 (invoke "nosetests" "-v"))))))
695 (home-page "https://github.com/fhs/python-hdf4")
696 (synopsis "Python interface to the NCSA HDF4 library")
697 (description
698 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
699which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
700NetCDF files can also be read and modified. Python-HDF4 is a fork of
701@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
702 (license license:expat)))
703
704(define-public python2-hdf4
705 (package-with-python2 python-hdf4))
706
707(define-public python-h5py
708 (package
709 (name "python-h5py")
24ce6421 710 (version "2.10.0")
44d10b1f
RW
711 (source
712 (origin
713 (method url-fetch)
714 (uri (pypi-uri "h5py" version))
715 (sha256
716 (base32
24ce6421 717 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
44d10b1f
RW
718 (build-system python-build-system)
719 (arguments
720 `(#:tests? #f ; no test target
721 #:phases
722 (modify-phases %standard-phases
723 (add-after 'unpack 'fix-hdf5-paths
724 (lambda* (#:key inputs #:allow-other-keys)
725 (let ((prefix (assoc-ref inputs "hdf5")))
726 (substitute* "setup_build.py"
727 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
728 (string-append "['" prefix "/lib" "']"))
729 (("'/opt/local/include', '/usr/local/include'")
730 (string-append "'" prefix "/include" "'")))
731 (substitute* "setup_configure.py"
732 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
733 (string-append "['" prefix "/lib" "']")))
734 #t))))))
735 (propagated-inputs
736 `(("python-six" ,python-six)
737 ("python-numpy" ,python-numpy)))
738 (inputs
24ce6421 739 `(("hdf5" ,hdf5-1.10)))
44d10b1f
RW
740 (native-inputs
741 `(("python-cython" ,python-cython)
24ce6421
RW
742 ("python-pkgconfig" ,python-pkgconfig)
743 ("pkg-config" ,pkg-config)))
efc0a587 744 (home-page "https://www.h5py.org/")
44d10b1f
RW
745 (synopsis "Read and write HDF5 files from Python")
746 (description
747 "The h5py package provides both a high- and low-level interface to the
748HDF5 library from Python. The low-level interface is intended to be a
749complete wrapping of the HDF5 API, while the high-level component supports
750access to HDF5 files, datasets and groups using established Python and NumPy
751concepts.")
752 (license license:bsd-3)))
753
754(define-public python2-h5py
755 (package-with-python2 python-h5py))
756
8b89dedc
RW
757(define-public python-sh
758 (package
759 (name "python-sh")
760 (version "1.12.14")
761 (source
762 (origin
763 (method url-fetch)
764 (uri (pypi-uri "sh" version))
765 (sha256
766 (base32
767 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
768 (build-system python-build-system)
fd3638d8
EF
769 (arguments
770 '(#:phases
771 (modify-phases %standard-phases
772 (replace 'check
773 (lambda _
ca983a2f
NG
774 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
775 (setenv "HOME" "/tmp")
fd3638d8
EF
776 (invoke "python" "sh.py" "test"))))))
777 (native-inputs
778 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
779 (home-page "https://github.com/amoffat/sh")
780 (synopsis "Python subprocess replacement")
781 (description "This package provides a replacement for Python's
782@code{subprocess} feature.")
783 (license license:expat)))
784
3869effd
RW
785(define-public python2-sh
786 (package-with-python2 python-sh))
787
d362b11d
RW
788(define-public python-cftime
789 (package
790 (name "python-cftime")
da107cf5 791 (version "1.0.4.2")
d362b11d
RW
792 (source
793 (origin
794 (method url-fetch)
795 (uri (pypi-uri "cftime" version))
796 (sha256
da107cf5 797 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
d362b11d
RW
798 (build-system python-build-system)
799 (propagated-inputs
800 `(("python-numpy" ,python-numpy)))
801 (native-inputs
802 `(("python-coveralls" ,python-coveralls)
803 ("python-cython" ,python-cython)
804 ("python-pytest-cov" ,python-pytest-cov)))
805 (home-page "https://github.com/Unidata/cftime")
806 (synopsis "Library for time handling")
807 (description
808 "This package provides time-handling functionality that used to be part
809of the netcdf4 package before.")
810 ;; This package claims to include code under the GPLv3 but is released
811 ;; under ISC.
812 (license (list license:isc license:gpl3+))))
813
44d10b1f
RW
814(define-public python-netcdf4
815 (package
816 (name "python-netcdf4")
93e7b209 817 (version "1.4.2")
44d10b1f
RW
818 (source
819 (origin
820 (method url-fetch)
821 (uri (pypi-uri "netCDF4" version))
822 (sha256
823 (base32
93e7b209 824 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 825 (build-system python-build-system)
93e7b209
RW
826 (arguments
827 '(#:phases
828 (modify-phases %standard-phases
829 (add-after 'unpack 'configure-locations
830 (lambda* (#:key inputs #:allow-other-keys)
831 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
832 #t)))))
44d10b1f
RW
833 (native-inputs
834 `(("python-cython" ,python-cython)))
835 (propagated-inputs
93e7b209
RW
836 `(("python-numpy" ,python-numpy)
837 ("python-cftime" ,python-cftime)))
44d10b1f
RW
838 (inputs
839 `(("netcdf" ,netcdf)
840 ("hdf4" ,hdf4)
841 ("hdf5" ,hdf5)))
93e7b209 842 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
843 (synopsis "Python/numpy interface to the netCDF library")
844 (description "Netcdf4-python is a Python interface to the netCDF C
845library. netCDF version 4 has many features not found in earlier
846versions of the library and is implemented on top of HDF5. This module
847can read and write files in both the new netCDF 4 and the old netCDF 3
848format, and can create files that are readable by HDF5 clients. The
849API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
850to users of that module.")
851 ;; The software is mainly ISC, but includes some files covered
852 ;; by the Expat license.
853 (license (list license:isc license:expat))))
854
855(define-public python2-netcdf4
856 (package-with-python2 python-netcdf4))
857
d6803445
TGR
858(define-public python-license-expression
859 (package
860 (name "python-license-expression")
861 (version "0.999")
862 (source
863 (origin
864 (method url-fetch)
865 (uri (pypi-uri "license-expression" version))
866 (sha256
867 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
868 (build-system python-build-system)
869 (propagated-inputs
870 `(("python-boolean.py" ,python-boolean.py)))
871 (home-page "https://github.com/nexB/license-expression")
872 (synopsis "Apply boolean logic to license expressions")
873 (description
874 "This Python module defines a tiny language to evaluate and compare
875license expressions using boolean logic. Logical combinations of licenses can
876be tested for equality, containment, and equivalence. They can be normalised
877and simplified. It supports SPDX license expressions as well as other naming
878conventions and aliases in the same expression.")
879 (license license:gpl2+)))
880
44d10b1f
RW
881(define-public python-lockfile
882 (package
883 (name "python-lockfile")
884 (version "0.12.2")
885 (source
886 (origin
887 (method url-fetch)
8318bf07 888 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
889 (sha256
890 (base32
891 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
892 (build-system python-build-system)
893 (arguments '(#:test-target "check"))
894 (native-inputs
895 `(("python-pbr" ,python-pbr)))
896 (home-page "https://launchpad.net/pylockfile")
897 (synopsis "Platform-independent file locking module")
898 (description
899 "The lockfile package exports a LockFile class which provides a simple
900API for locking files.")
901 (license license:expat)))
902
903(define-public python2-lockfile
904 (package-with-python2 python-lockfile))
905
6e792089
JK
906(define-public python-filelock
907 (package
908 (name "python-filelock")
909 (version "3.0.12")
910 (source
911 (origin
912 (method url-fetch)
913 (uri (pypi-uri "filelock" version))
914 (sha256
915 (base32
916 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
917 (build-system python-build-system)
918 (home-page
919 "https://github.com/benediktschmitt/py-filelock")
920 (synopsis "Platform independent file lock")
921 (description "@code{filelock} contains a single module implementing
922a platform independent file lock in Python, which provides a simple way of
923inter-process communication.")
924 (license license:unlicense)))
925
44d10b1f
RW
926(define-public python-semantic-version
927 (package
928 (name "python-semantic-version")
929 (version "2.6.0")
930 (source
931 (origin
932 (method url-fetch)
933 (uri (pypi-uri "semantic_version" version))
934 (sha256
935 (base32
936 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
937 (build-system python-build-system)
938 (arguments
939 `(#:tests? #f)) ; PyPI tarball lacks tests
940 (home-page "https://github.com/rbarrois/python-semanticversion")
941 (synopsis "Semantic versioning module for Python")
942 (description
943 "The @code{semantic_version} class is a small library for handling
944@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
945
946It can compare versions, generate a new version that represents a bump in one of
947the version levels, and check whether any given string is a proper semantic
948version identifier.")
949 (license license:bsd-3)))
950
951(define-public python2-semantic-version
952 (package-with-python2 python-semantic-version))
953
954(define-public python-serpent
955 (package
956 (name "python-serpent")
fa9d14ac 957 (version "1.28")
44d10b1f
RW
958 (source
959 (origin
960 (method url-fetch)
961 (uri (pypi-uri "serpent" version))
962 (sha256
fa9d14ac 963 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 964 (build-system python-build-system)
fa9d14ac
TGR
965 (native-inputs
966 `(("python-attrs" ,python-attrs)
967 ("python-pytz" ,python-pytz)))
44d10b1f
RW
968 (home-page "https://github.com/irmen/Serpent")
969 (synopsis "Serializer for literal Python expressions")
970 (description
1d3c7803
TGR
971 "Serpent provides @code{ast.literal_eval()}-compatible object tree
972serialization. It serializes an object tree into bytes (an utf-8 encoded
973string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
974to rebuild the original object tree.
975
976Because only safe literals are encoded, it is safe to send serpent data to
977other machines, such as over the network.")
44d10b1f
RW
978 (license license:expat)))
979
980(define-public python-setuptools
981 (package
982 (name "python-setuptools")
e39d4933 983 (version "41.0.1")
44d10b1f
RW
984 (source
985 (origin
986 (method url-fetch)
987 (uri (pypi-uri "setuptools" version ".zip"))
988 (sha256
989 (base32
e39d4933 990 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
991 (modules '((guix build utils)))
992 (snippet
993 '(begin
994 ;; Remove included binaries which are used to build self-extracting
995 ;; installers for Windows.
996 ;; TODO: Find some way to build them ourself so we can include them.
997 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
998 #t))))
999 (build-system python-build-system)
1000 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1001 ;; One could bootstrap with an internal untested setuptools.
1002 (arguments
1003 `(#:tests? #f))
e85af137 1004 (home-page "https://pypi.org/project/setuptools/")
44d10b1f
RW
1005 (synopsis
1006 "Library designed to facilitate packaging Python projects")
1007 (description
1008 "Setuptools is a fully-featured, stable library designed to facilitate
1009packaging Python projects, where packaging includes:
1010Python package and module definitions,
1011distribution package metadata,
1012test hooks,
1013project installation,
1014platform-specific details,
1015Python 3 support.")
1016 ;; TODO: setuptools now bundles the following libraries:
1017 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1018 (license (list license:psfl ; setuptools itself
1019 license:expat ; six, appdirs, pyparsing
1020 license:asl2.0 ; packaging is dual ASL2/BSD-2
1021 license:bsd-2))))
1022
1023(define-public python2-setuptools
1024 (package-with-python2 python-setuptools))
1025
0fdec2a3
MB
1026;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1027(define-public python-setuptools-for-tensorflow
1028 (hidden-package
1029 (package
1030 (inherit python-setuptools)
1031 (version "39.1.0")
1032 (source (origin
1033 (inherit (package-source python-setuptools))
1034 (uri (pypi-uri "setuptools" version ".zip"))
1035 (sha256
1036 (base32
1037 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1038
44d10b1f
RW
1039(define-public python-uniseg
1040 (package
1041 (name "python-uniseg")
1042 (version "0.7.1")
1043 (source
1044 (origin
1045 (method url-fetch)
1046 (uri (pypi-uri "uniseg" version ".zip"))
1047 (sha256
1048 (base32
1049 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1050 (build-system python-build-system)
1051 (arguments
1052 '(#:tests? #f)) ; The test suite requires network access.
1053 (native-inputs
1054 `(("unzip" ,unzip)))
1055 (home-page
1056 "https://bitbucket.org/emptypage/uniseg-python")
1057 (synopsis
1058 "Python library to determine Unicode text segmentations")
1059 (description
1060 "Uniseg is a Python package used to determine Unicode text segmentations.
1061Supported segmentations include:
1062@enumerate
1063@item @dfn{Code point} (any value in the Unicode codespace)
1064@item @dfn{Grapheme cluster} (user-perceived character made of a single or
1065multiple Unicode code points, e.g. \"G\" + acute-accent)
1066@item Word break
1067@item Sentence break
1068@item Line break
1069@end enumerate")
1070 (license license:expat)))
1071
1072(define-public python2-uniseg
1073 (package-with-python2 python-uniseg))
1074
1075(define-public python-humanfriendly
1076 (package
1077 (name "python-humanfriendly")
1078 (version "4.4.1")
1079 (source
1080 (origin
1081 (method url-fetch)
1082 (uri (pypi-uri "humanfriendly" version))
1083 (sha256
1084 (base32
1085 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
1086 (build-system python-build-system)
1087 (arguments
1088 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1089 #:tests? #f))
1090 (propagated-inputs
1091 `(("python-monotonic" ,python-monotonic)))
1092 (home-page "https://humanfriendly.readthedocs.io")
1093 (synopsis "Human-friendly input and output in Python")
1094 (description
1095 "The functions and classes in @code{humanfriendly} can be used to make
1096text interfaces more user-friendly. It includes tools to parse and format
1097numbers, file sizes, and timespans, timers for long-running operations, menus
1098to allow the user to choose from a list of options, and terminal interaction
1099helpers.")
1100 (license license:expat)))
1101
1102(define-public python2-humanfriendly
1103 (package-with-python2 python-humanfriendly))
1104
1105(define-public python-capturer
1106 (package
1107 (name "python-capturer")
1108 (version "2.4")
1109 (source
1110 (origin
1111 (method url-fetch)
1112 (uri (pypi-uri "capturer" version))
1113 (sha256
1114 (base32
1115 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1116 (build-system python-build-system)
1117 (arguments
1118 `(#:tests? #f))
1119 (propagated-inputs
1120 `(("python-humanfriendly" ,python-humanfriendly)))
1121 (home-page "https://capturer.readthedocs.io")
1122 (synopsis "Capture stdout and stderr streams of the current process")
1123 (description
1124 "The capturer package makes it easy to capture the stdout and stderr
1125streams of the current process and subprocesses. Output can be relayed
1126to the terminal in real time but is also available to the Python program
1127for additional processing.")
1128 (license license:expat)))
1129
1130(define-public python2-capturer
1131 (package-with-python2 python-capturer))
1132
1133(define-public python-case
1134 (package
1135 (name "python-case")
1136 (version "1.5.3")
1137 (source
1138 (origin
1139 (method url-fetch)
1140 (uri (pypi-uri "case" version))
1141 (sha256
1142 (base32
1143 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1144 (build-system python-build-system)
1145 (propagated-inputs
1146 `(("python-mock" ,python-mock)
1147 ("python-nose" ,python-nose)
1148 ("python-six" ,python-six)
1149 ("python-unittest2" ,python-unittest2)))
1150 (native-inputs
1151 `(("python-coverage" ,python-coverage)))
1152 (home-page "https://github.com/celery/case")
1153 (synopsis "Unittest utilities and convenience methods")
1154 (description
1155 "The @code{case} package provides utilities on top of unittest, including
1156some helpful Python 2 compatibility convenience methods.")
1157 (license license:bsd-3)))
1158
1159(define-public python-verboselogs
1160 (package
1161 (name "python-verboselogs")
1162 (version "1.7")
1163 (source
1164 (origin
1165 (method url-fetch)
1166 (uri (pypi-uri "verboselogs" version))
1167 (sha256
1168 (base32
1169 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1170 (build-system python-build-system)
1760c970
MO
1171 (arguments
1172 `(#:phases
1173 (modify-phases %standard-phases
1174 (replace 'check
1175 (lambda _
1176 ;; Do not run pylint plugin test, as astroid is an old
1177 ;; unsupported version.
1178 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1179 "verboselogs/tests.py"))))))
44d10b1f
RW
1180 (native-inputs
1181 `(("python-mock" ,python-mock)
1760c970 1182 ("python-pytest" ,python-pytest)))
44d10b1f
RW
1183 (home-page "https://verboselogs.readthedocs.io")
1184 (synopsis "Verbose logging level for Python's logging module")
1185 (description
1186 "The @code{verboselogs} package extends Python's @code{logging} module to
1187add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1188 (license license:expat)))
1189
1190(define-public python2-verboselogs
1191 (package-with-python2 python-verboselogs))
1192
1193(define-public python-coloredlogs
1194 (package
1195 (name "python-coloredlogs")
b2b8a39c 1196 (version "10.0")
44d10b1f
RW
1197 (source
1198 (origin
1199 (method url-fetch)
1200 (uri (pypi-uri "coloredlogs" version))
1201 (sha256
1202 (base32
b2b8a39c 1203 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
44d10b1f
RW
1204 (build-system python-build-system)
1205 (arguments
1206 `(;Tests require some updated modules
1207 #:tests? #f))
1208 (propagated-inputs
1209 `(("python-capturer" ,python-capturer)))
1210 (home-page "https://coloredlogs.readthedocs.io")
1211 (synopsis "Colored stream handler for Python's logging module")
1212 (description
1213 "The @code{coloredlogs} package enables colored terminal output for
1214Python's logging module. The @code{ColoredFormatter} class inherits from
1215@code{logging.Formatter} and uses ANSI escape sequences to render your logging
1216messages in color.")
1217 (license license:expat)))
1218
1219(define-public python2-coloredlogs
1220 (package-with-python2 python-coloredlogs))
1221
af760990
VC
1222(define-public python-editorconfig
1223 (package
1224 (name "python-editorconfig")
1225 (version "0.12.2")
1226 (source
1227 (origin
1228 (method url-fetch)
1229 (uri (pypi-uri "EditorConfig" version))
1230 (sha256
1231 (base32
1232 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1233 (build-system python-build-system)
1234 (home-page "https://editorconfig.org/")
1235 (synopsis "EditorConfig bindings for python")
1236 (description "The EditorConfig project consists of a file format for
1237defining coding styles and a collection of text editor plugins that enable
1238editors to read the file format and adhere to defined styles. EditorConfig
1239files are easily readable and they work nicely with version control systems.")
1240 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1241 (license (list license:bsd-2 license:psfl))))
1242
4caf37b0
MC
1243(define-public python-et-xmlfile
1244 (package
1245 (name "python-et-xmlfile")
1246 (version "1.0.1")
1247 (source
1248 (origin
1249 (method url-fetch)
1250 (uri (pypi-uri "et_xmlfile" version))
1251 (sha256
1252 (base32
1253 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1254 (build-system python-build-system)
1255 (arguments
1256 `(#:phases (modify-phases %standard-phases
1257 (replace 'check
1258 (lambda _
1259 (invoke "pytest"))))))
1260 (native-inputs
1261 `(("python-pytest" ,python-pytest)
1262 ("python-lxml" ,python-lxml))) ;used for the tests
1263 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1264 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1265 (description "This Python library is based upon the @code{xmlfile} module
1266from @code{lxml}. It aims to provide a low memory, compatible implementation
1267of @code{xmlfile}.")
1268 (license license:expat)))
1269
1270(define-public python2-et-xmlfile
1271 (package-with-python2 python-et-xmlfile))
1272
a042d348
MC
1273(define-public python-openpyxl
1274 (package
1275 (name "python-openpyxl")
441e6d93 1276 (version "2.6.2")
a042d348
MC
1277 (source
1278 (origin
1279 ;; We use the upstream repository, as the tests are not included in the
1280 ;; PyPI releases.
1281 (method hg-fetch)
1282 (uri (hg-reference
1283 (url "https://bitbucket.org/openpyxl/openpyxl")
1284 (changeset version)))
1285 (file-name (string-append name "-" version "-checkout"))
1286 (sha256
441e6d93 1287 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1288 (build-system python-build-system)
1289 (arguments
1290 `(#:phases (modify-phases %standard-phases
1291 (replace 'check
1292 (lambda _
1293 (invoke "pytest"))))))
1294 (native-inputs
1295 ;; For the test suite.
1296 `(("python-lxml" ,python-lxml)
1297 ("python-pillow" ,python-pillow)
1298 ("python-pytest" ,python-pytest)))
1299 (propagated-inputs
1300 `(("python-et-xmlfile" ,python-et-xmlfile)
1301 ("python-jdcal" ,python-jdcal)))
1302 (home-page "https://openpyxl.readthedocs.io")
1303 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1304 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1305XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1306standard.")
1307 (license license:expat)))
1308
44d10b1f
RW
1309(define-public python-eventlet
1310 (package
1311 (name "python-eventlet")
c9876c9b 1312 (version "0.25.1")
44d10b1f
RW
1313 (source
1314 (origin
1315 (method url-fetch)
1316 (uri (pypi-uri "eventlet" version))
1317 (sha256
1318 (base32
c9876c9b 1319 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
44d10b1f
RW
1320 (build-system python-build-system)
1321 (propagated-inputs
1322 `(("python-greenlet" ,python-greenlet)))
1323 (arguments
1324 ;; TODO: Requires unpackaged 'enum-compat'.
1325 '(#:tests? #f))
bff36617 1326 (home-page "https://eventlet.net")
44d10b1f
RW
1327 (synopsis "Concurrent networking library for Python")
1328 (description
1329 "Eventlet is a concurrent networking library for Python that
1330allows you to change how you run your code, not how you write it.
1331It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1332Coroutines ensure that the developer uses a blocking style of programming
1333that is similar to threading, but provide the benefits of non-blocking I/O.
1334The event dispatch is implicit, which means you can easily use @code{Eventlet}
1335from the Python interpreter, or as a small part of a larger application.")
1336 (license license:expat)))
1337
1338(define-public python2-eventlet
1339 (let ((base (package-with-python2
1340 (strip-python2-variant python-eventlet))))
1341 (package (inherit base)
1342 (propagated-inputs
1343 `(("python2-enum34" ,python2-enum34)
1344 ,@(package-propagated-inputs base))))))
1345
1346(define-public python-six
1347 (package
1348 (name "python-six")
6c58a06e 1349 (version "1.12.0")
44d10b1f
RW
1350 (source
1351 (origin
1352 (method url-fetch)
1353 (uri (pypi-uri "six" version))
1354 (sha256
1355 (base32
6c58a06e 1356 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1357 (build-system python-build-system)
1358 (arguments
1359 `(#:phases
1360 (modify-phases %standard-phases
1361 (replace 'check
1362 (lambda _
1363 (invoke "py.test" "-v"))))))
1364 (native-inputs
1365 `(("python-py" ,python-py)
1366 ("python-pytest" ,python-pytest-bootstrap)))
e85af137 1367 (home-page "https://pypi.org/project/six/")
44d10b1f
RW
1368 (synopsis "Python 2 and 3 compatibility utilities")
1369 (description
1370 "Six is a Python 2 and 3 compatibility library. It provides utility
1371functions for smoothing over the differences between the Python versions with
1372the goal of writing Python code that is compatible on both Python versions.
1373Six supports every Python version since 2.5. It is contained in only one
1374Python file, so it can be easily copied into your project.")
1375 (license license:x11)))
1376
1377(define-public python2-six
1378 (package-with-python2 python-six))
1379
1380(define-public python-six-bootstrap
1381 (package
1382 (inherit python-six)
1383 (name "python-six-bootstrap")
1384 (native-inputs `())
1385 (arguments `(#:tests? #f))))
1386
1387(define-public python2-six-bootstrap
1388 (package-with-python2 python-six-bootstrap))
1389
1390(define-public python-schedule
1391 (package
1392 (name "python-schedule")
1393 (version "0.4.3")
1394 (source
1395 (origin
1396 (method url-fetch)
1397 (uri (pypi-uri "schedule" version))
1398 (sha256
1399 (base32
1400 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1401 (build-system python-build-system)
1402 (native-inputs
1403 `(("python-pytest" ,python-pytest)
1404 ("python-mock" ,python-mock)))
1405 (home-page "https://github.com/dbader/schedule")
1406 (synopsis "Schedule periodic function calls in Python")
1407 (description
1408 "Schedule is an in-process scheduler for periodic jobs that uses the
1409builder pattern for configuration. Schedule lets you run Python functions (or
1410any other callable) periodically at pre-determined intervals using a simple,
1411human-friendly syntax.")
1412 (license license:expat)))
1413
1414(define-public python2-schedule
1415 (package-with-python2 python-schedule))
1416
44d10b1f
RW
1417(define-public python2-mechanize
1418 (package
1419 (name "python2-mechanize")
1420 (version "0.2.5")
1421 (source
1422 (origin
1423 (method url-fetch)
1cc184e6 1424 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1425 (sha256
1426 (base32
1427 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1428 (build-system python-build-system)
1429 (arguments
1430 `(#:python ,python-2 ; apparently incompatible with Python 3
1431 #:tests? #f))
1432 ;; test fails with message
1433 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1434 ;; (python-3.3.2) or
1435 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1436 ;; (python-2.7.5).
1437 ;; The source code is from March 2011 and probably not up-to-date
1438 ;; with respect to python unit tests.
1439 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1440 (synopsis
1441 "Stateful programmatic web browsing in Python")
1442 (description
1443 "Mechanize implements stateful programmatic web browsing in Python,
1444after Andy Lester’s Perl module WWW::Mechanize.")
1445 (license (license:non-copyleft
1446 "file://COPYING"
1447 "See COPYING in the distribution."))))
1448
1449
1450(define-public python-simplejson
1451 (package
1452 (name "python-simplejson")
1453 (version "3.14.0")
1454 (source
1455 (origin
1456 (method url-fetch)
1457 (uri (pypi-uri "simplejson" version))
1458 (sha256
1459 (base32
1460 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1461 (build-system python-build-system)
1462 (home-page "http://simplejson.readthedocs.org/en/latest/")
1463 (synopsis
1464 "Json library for Python")
1465 (description
1466 "JSON (JavaScript Object Notation) is a subset of JavaScript
1467syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1468format.
1469
1470Simplejson exposes an API familiar to users of the standard library marshal
1471and pickle modules. It is the externally maintained version of the json
1472library contained in Python 2.6, but maintains compatibility with Python 2.5
1473and (currently) has significant performance advantages, even without using
1474the optional C extension for speedups. Simplejson is also supported on
1475Python 3.3+.")
1476 (license license:x11)))
1477
1478(define-public python2-simplejson
1479 (package-with-python2 python-simplejson))
1480
1481
1482(define-public python-pyicu
1483 (package
1484 (name "python-pyicu")
dc23bb45 1485 (version "2.3.1")
44d10b1f
RW
1486 (source
1487 (origin
1488 (method url-fetch)
1489 (uri (pypi-uri "PyICU" version))
1490 (sha256
1491 (base32
dc23bb45 1492 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1493 (build-system python-build-system)
1494 (inputs
1495 `(("icu4c" ,icu4c)))
1496 (native-inputs
1497 `(("python-pytest" ,python-pytest)
1498 ("python-six" ,python-six)))
1499 (home-page "https://github.com/ovalhub/pyicu")
1500 (synopsis "Python extension wrapping the ICU C++ API")
1501 (description
1502 "PyICU is a python extension wrapping the ICU C++ API.")
1503 (properties `((python2-variant . ,(delay python2-pyicu))))
1504 (license license:x11)))
1505
1506(define-public python2-pyicu
1507 (let ((base (package-with-python2
1508 (strip-python2-variant python-pyicu))))
1509 (package
1510 (inherit base)
1511 (arguments
1512 `(,@(package-arguments base)
1513 #:phases
1514 (modify-phases %standard-phases
1515 (add-before 'check 'delete-failing-test
1516 (λ _
1517 ;; XXX: This fails due to Unicode issues unique to Python 2,
1518 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1519 (delete-file "test/test_Script.py")
1520 #t))))))))
1521
1522(define-public python2-dogtail
1523 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1524 ;; spaces in indentation" with Python 3.
1525 (package
1526 (name "python2-dogtail")
1527 (version "0.9.9")
1528 (source (origin
1529 (method url-fetch)
1530 (uri (pypi-uri "dogtail" version))
1531 (sha256
1532 (base32
1533 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1534 (build-system python-build-system)
1535 (arguments `(#:python ,python-2
1536 #:tests? #f)) ; invalid command "test"
1537 ;; Currently no offical homepage.
e85af137 1538 (home-page "https://pypi.org/project/dogtail/")
44d10b1f
RW
1539 (synopsis "GUI test tool and automation framework written in Python")
1540 (description
1541 "Dogtail is a GUI test tool and automation framework written in Python.
1542It uses Accessibility (a11y) technologies to communicate with desktop
1543applications. dogtail scripts are written in Python and executed like any
1544other Python program.")
1545 (license license:gpl2+)))
1546
1547(define-public python-empy
1548 (package
1549 (name "python-empy")
0f6d5115 1550 (version "3.3.3")
44d10b1f
RW
1551 (source (origin
1552 (method url-fetch)
1553 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1554 version ".tar.gz"))
1555 (sha256
1556 (base32
0f6d5115 1557 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1558 (build-system python-build-system)
1559 (arguments
0f6d5115 1560 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1561 (home-page "http://www.alcyone.com/software/empy/")
1562 (synopsis "Templating system for Python")
1563 (description
1564 "EmPy is a system for embedding Python expressions and statements in
1565template text; it takes an EmPy source file, processes it, and produces
1566output. This is accomplished via expansions, which are special signals to the
1567EmPy system and are set off by a special prefix (by default the at sign, @@).
1568EmPy can expand arbitrary Python expressions and statements in this way, as
1569well as a variety of special forms. Textual data not explicitly delimited in
1570this way is sent unaffected to the output, allowing Python to be used in
1571effect as a markup language. Also supported are callbacks via hooks,
1572recording and playback via diversions, and dynamic, chainable filters. The
1573system is highly configurable via command line options and embedded
1574commands.")
1575 (license license:lgpl2.1+)))
1576
1577(define-public python2-empy
0f064242
TGR
1578 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1579 (package
1580 (inherit base)
1581 (arguments `(,@(package-arguments base)
1582 #:tests? #t)))))
44d10b1f
RW
1583
1584(define-public python2-element-tree
1585 (package
1586 (name "python2-element-tree")
1587 (version "1.2.6")
1588 (source (origin
1589 (method url-fetch)
1590 (uri (string-append
1591 "http://effbot.org/media/downloads/elementtree-"
1592 version "-20050316.tar.gz"))
1593 (sha256
1594 (base32
1595 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1596 (build-system python-build-system)
1597 (arguments
1598 `(#:python ,python-2 ; seems to be part of Python 3
1599 #:tests? #f)) ; no 'test' sub-command
1600 (synopsis "Toolkit for XML processing in Python")
1601 (description
1602 "ElementTree is a Python library supporting lightweight XML processing.")
1603 (home-page "http://effbot.org/zone/element-index.htm")
1604 (license (license:x11-style
1605 "http://docs.python.org/2/license.html"
1606 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1607
1608(define-public python2-pybugz
1609 (package
1610 (name "python2-pybugz")
1611 (version "0.6.11")
1612 (source (origin
1613 (method url-fetch)
1614 (uri (string-append
1615 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1616 version ".tar.gz"))
1617 (sha256
1618 (base32
1619 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1620 (patches (search-patches "pybugz-stty.patch"
1621 "pybugz-encode-error.patch"))))
1622 (build-system python-build-system)
1623 (arguments
1624 `(#:python ,python-2 ; SyntaxError with Python 3
1625 #:tests? #f)) ; no 'test' sub-command
1626 (propagated-inputs
1627 `(("element-tree" ,python2-element-tree)))
1628 (synopsis "Python and command-line interface to Bugzilla")
1629 (description
1630 "PyBugz is a Python library and command-line tool to query the Bugzilla
1631bug tracking system. It is meant as an aid to speed up interaction with the
1632bug tracker.")
1633 (home-page "http://www.liquidx.net/pybugz/")
1634 (license license:gpl2)))
1635
1636(define-public python2-enum
1637 (package
1638 (name "python2-enum")
1639 (version "0.4.6")
1640 (source (origin
1641 (method url-fetch)
1642 (uri (pypi-uri "enum" version))
1643 (sha256
1644 (base32
1645 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1646 (build-system python-build-system)
1647 (arguments
1648 `(#:python ,python-2))
e85af137 1649 (home-page "https://pypi.org/project/enum/")
44d10b1f
RW
1650 (synopsis "Robust enumerated type support in Python")
1651 (description
1652 "This provides a module for robust enumerations in Python. It has
1653been superseded by the Python standard library and is provided only for
1654compatibility.")
1655 ;; Choice of either license.
1656 (license (list license:gpl3+ license:psfl))))
1657
1658(define-public python-enum34
1659 (package
1660 (name "python-enum34")
1661 (version "1.1.6")
1662 (source
1663 (origin
1664 (method url-fetch)
1665 (uri (pypi-uri "enum34" version))
1666 (sha256
1667 (base32
1668 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1669 (build-system python-build-system)
e85af137 1670 (home-page "https://pypi.org/project/enum34/")
44d10b1f
RW
1671 (synopsis "Backported Python 3.4 Enum")
1672 (description
1673 "Enum34 is the new Python stdlib enum module available in Python 3.4
1674backported for previous versions of Python from 2.4 to 3.3.")
1675 (license license:bsd-3)))
1676
1677(define-public python2-enum34
1678 (package-with-python2 python-enum34))
1679
1680(define-public python-parse-type
1681 (package
1682 (name "python-parse-type")
1683 (version "0.4.2")
1684 (source
1685 (origin
1686 (method url-fetch)
1687 (uri (pypi-uri "parse_type" version))
1688 (sha256
1689 (base32
1690 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1691 (build-system python-build-system)
1692 (propagated-inputs
1693 `(("python-six" ,python-six)
1694 ("python-parse" ,python-parse)))
1695 (native-inputs
1696 `(("python-pytest" ,python-pytest)
1697 ("python-pytest-runner" ,python-pytest-runner)))
1698 (home-page "https://github.com/jenisys/parse_type")
1699 (synopsis "Extended parse module")
1700 (description
1701 "Parse_type extends the python parse module.")
1702 (properties
1703 `((python2-variant . ,(delay python2-parse-type))))
1704 (license license:bsd-3)))
1705
1706(define-public python2-parse-type
1707 (let ((base (package-with-python2
1708 (strip-python2-variant python-parse-type))))
1709 (package (inherit base)
1710 (propagated-inputs
1711 `(("python2-enum34" ,python2-enum34)
1712 ,@(package-propagated-inputs base))))))
1713
1714(define-public python-parse
1715 (package
1716 (name "python-parse")
1717 (version "1.8.4")
1718 (source
1719 (origin
1720 (method url-fetch)
1721 (uri (pypi-uri "parse" version))
1722 (sha256
1723 (base32
1724 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1725 (build-system python-build-system)
1726 (arguments
1727 `(#:phases
1728 (modify-phases %standard-phases
1729 (replace 'check
1730 (lambda _ (invoke "python" "test_parse.py"))))))
1731 (home-page "https://github.com/r1chardj0n3s/parse")
1732 (synopsis "Parse strings")
1733 (description
1734 "Parse strings using a specification based on the Python @code{format()}
1735syntax.")
1736 (license license:x11)))
1737
1738(define-public python-polib
1739 (package
1740 (name "python-polib")
1741 (version "1.0.8")
1742 (source (origin
1743 (method url-fetch)
1744 (uri (pypi-uri "polib" version))
1745 (sha256
1746 (base32
1747 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1748 (build-system python-build-system)
1749 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1750 (synopsis "Manipulate, create and modify gettext files")
1751 (description "Polib can manipulate any gettext format (po, pot and mo)
1752files. It can be used to create po files from scratch or to modify
1753existing ones.")
1754 (license license:expat)))
1755
1756(define-public python2-polib
1757 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1758 (package
1759 (inherit base)
1760 (arguments `(,@(package-arguments base)
1761 ;; Tests don't work with python2.
1762 #:tests? #f)))))
1763
6830120e
TLC
1764(define-public python-poyo
1765 (package
1766 (name "python-poyo")
1767 (version "0.5.0")
1768 (source
1769 (origin
1770 (method url-fetch)
1771 (uri (pypi-uri "poyo" version))
1772 (sha256
1773 (base32
1774 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1775 (build-system python-build-system)
1776 (home-page "https://github.com/hackebrot/poyo")
1777 (synopsis "Lightweight YAML Parser for Python")
1778 (description
1779 "This package provides a lightweight YAML Parser for Python. It supports
1780only a chosen subset of the YAML format that is required to parse cookiecutter
1781user configuration files. It does not have support for serializing into YAML
1782and is not compatible with JSON.")
1783 (license license:expat)))
1784
44d10b1f
RW
1785(define-public scons
1786 (package
1787 (name "scons")
05487ed8 1788 (version "3.0.4")
44d10b1f 1789 (source (origin
ad34338d
RW
1790 (method git-fetch)
1791 (uri (git-reference
1792 (url "https://github.com/SCons/scons.git")
1793 (commit version)))
1794 (file-name (git-file-name name version))
44d10b1f
RW
1795 (sha256
1796 (base32
05487ed8 1797 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1798 (build-system python-build-system)
1799 (arguments
1800 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1801 #:tests? #f ; no 'python setup.py test' command
1802 #:phases
1803 (modify-phases %standard-phases
1804 (add-before 'build 'bootstrap
1805 (lambda _
1806 (substitute* "src/engine/SCons/compat/__init__.py"
1807 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1808 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1809 (substitute* "src/engine/SCons/Platform/__init__.py"
1810 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1811 "mod = __import__(full_name)"))
ad34338d
RW
1812 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1813 (chdir "build/scons")
1814 #t)))))
3602de33 1815 (home-page "https://scons.org/")
44d10b1f
RW
1816 (synopsis "Software construction tool written in Python")
1817 (description
1818 "SCons is a software construction tool. Think of SCons as an improved,
1819cross-platform substitute for the classic Make utility with integrated
1820functionality similar to autoconf/automake and compiler caches such as ccache.
1821In short, SCons is an easier, more reliable and faster way to build
1822software.")
1823 (license license:x11)))
1824
1825(define-public scons-python2
1826 (package
1827 (inherit (package-with-python2 scons))
1828 (name "scons-python2")))
1829
1830(define-public python-extras
1831 (package
1832 (name "python-extras")
1833 (version "1.0.0")
1834 (source
1835 (origin
1836 (method url-fetch)
1837 (uri (pypi-uri "extras" version))
1838 (sha256
1839 (base32
1840 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1841 (build-system python-build-system)
1842 (arguments
1843 ;; FIXME: Circular dependency on testtools.
1844 '(#:tests? #f))
1845 (home-page "https://github.com/testing-cabal/extras")
1846 (synopsis "Useful extensions to the Python standard library")
1847 (description
1848 "Extras is a set of extensions to the Python standard library.")
1849 (license license:expat)))
1850
1851(define-public python2-extras
1852 (package-with-python2 python-extras))
1853
1854(define-public python-mimeparse
1855 (package
1856 (name "python-mimeparse")
1857 (version "1.6.0")
1858 (source
1859 (origin
1860 (method url-fetch)
89bf667c 1861 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1862 (sha256
1863 (base32
1864 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1865 (build-system python-build-system)
1866 (arguments
1867 '(#:phases
1868 (modify-phases %standard-phases
1869 (replace 'check
1870 (lambda _
1871 (invoke "./mimeparse_test.py"))))))
1872 (home-page
1873 "https://github.com/dbtsai/python-mimeparse")
1874 (synopsis "Python library for parsing MIME types")
1875 (description
1876 "Mimeparse provides basic functions for parsing MIME type names and
1877matching them against a list of media-ranges.")
1878 (license license:expat)))
1879
1880(define-public python2-mimeparse
1881 (package-with-python2 python-mimeparse))
1882
1883(define-public python-miniboa
1884 (package
1885 (name "python-miniboa")
1886 (version "1.0.7")
1887 (source
1888 (origin
1889 (method url-fetch)
1890 (uri (pypi-uri "miniboa" version))
1891 (sha256
1892 (base32
1893 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1894 (build-system python-build-system)
1895 (home-page "https://github.com/shmup/miniboa")
1896 (synopsis "Simple, single-threaded Telnet server")
1897 (description
1898 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1899server.")
1900 (license license:asl2.0)))
1901
1902(define-public python2-miniboa
1903 (package-with-python2 python-miniboa))
1904
1905(define-public python-pafy
1906 (package
1907 (name "python-pafy")
1908 (version "0.5.3.1")
1909 (source
1910 (origin
1911 (method url-fetch)
1912 (uri (pypi-uri "pafy" version))
1913 (sha256
1914 (base32
1915 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1916 (build-system python-build-system)
1917 (arguments
1918 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1919 (propagated-inputs
1920 ;; Youtube-dl is a python package which is imported in the file
1921 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1922 `(("youtube-dl" ,youtube-dl)))
1923 (home-page "https://np1.github.io/pafy/")
1924 (synopsis "Retrieve YouTube content and metadata")
1925 (description
1926 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1927 (license license:lgpl3+)))
1928
1929(define-public python2-funcsigs
1930 (package
1931 (name "python2-funcsigs")
1932 (version "1.0.2")
1933 (source (origin
1934 (method url-fetch)
1935 (uri (pypi-uri "funcsigs" version))
1936 (sha256
1937 (base32
1938 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1939 (build-system python-build-system)
1940 (arguments
1941 `(#:python ,python-2))
1942 (native-inputs
1943 `(("python2-unittest2" ,python2-unittest2)))
1944 (home-page "http://funcsigs.readthedocs.org")
1945 (synopsis "Python function signatures from PEP362")
1946 (description
1947 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1948 (license license:asl2.0)))
1949
1950(define-public python2-funcsigs-bootstrap
1951 (package
1952 (inherit python2-funcsigs)
1953 (name "python2-funcsigs-bootstrap")
1954 (native-inputs `())
1955 (arguments
1956 `(#:tests? #f
1957 ,@(package-arguments python2-funcsigs)))))
1958
1959(define-public python-py
1960 (package
1961 (name "python-py")
08eba545 1962 (version "1.8.0")
44d10b1f
RW
1963 (source
1964 (origin
1965 (method url-fetch)
1966 (uri (pypi-uri "py" version))
1967 (sha256
1968 (base32
08eba545 1969 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1970 (build-system python-build-system)
1971 (arguments
1972 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1973 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1974 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1975 ;; Is this module globally installed?"
1976 '(#:tests? #f))
1977 (native-inputs
1978 `(("python-setuptools-scm" ,python-setuptools-scm)))
1979 (home-page "https://github.com/pytest-dev/py")
1980 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1981 (description
1982 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1983code introspection, and logging.")
1984 (license license:expat)))
1985
1986(define-public python2-py
1987 (package-with-python2 python-py))
1988
1989;; Recent versions of python-fixtures and python-testrepository need
1990;; python-pbr for packaging, which itself needs these two packages for
1991;; testing.
1992;; To fix this circular dependency, we use a build of python-pbr, based on the
1993;; same source, just without any test dependencies and with tests disabled.
1994;; python-pbr-minmal is then used to package python-fixtures and
1995;; python-testrepository.
1996;; Strictly speaking we currently could remove the test-requirements from the
1997;; normal python-pbr package (and save this package) since test are disabled
1998;; there anyway. But this may change in future.
1999(define-public python-pbr-minimal
2000 (package
2001 (name "python-pbr-minimal")
2002 (version "3.0.1")
2003 (source
2004 (origin
2005 (method url-fetch)
2006 (uri (pypi-uri "pbr" version))
2007 (sha256
2008 (base32
2009 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2010 (build-system python-build-system)
2011 (arguments
2012 `(#:tests? #f))
58d4e949 2013 (home-page "https://docs.openstack.org/pbr/latest/")
44d10b1f
RW
2014 (synopsis "Minimal build of python-pbr used for bootstrapping")
2015 (description
2016 "Used only for bootstrapping python2-pbr, you should not need this.")
2017 (license license:asl2.0)))
2018
2019(define-public python2-pbr-minimal
2020 (package-with-python2 python-pbr-minimal))
2021
2022(define-public python-pbr
2023 (package
2024 (inherit python-pbr-minimal)
2025 (name "python-pbr")
2026 (arguments
2027 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2028 (propagated-inputs
2029 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2030 (native-inputs
2031 `(("python-fixtures" ,python-fixtures-bootstrap)
2032 ;; discover, coverage, hacking, subunit
2033 ("python-mock" ,python-mock)
2034 ("python-six" ,python-six)
2035 ("python-sphinx" ,python-sphinx)
2036 ("python-testrepository" ,python-testrepository-bootstrap)
2037 ("python-testresources" ,python-testresources-bootstrap)
2038 ("python-testscenarios" ,python-testscenarios-bootstrap)
2039 ("python-testtools" ,python-testtools-bootstrap)
2040 ("python-virtualenv" ,python-virtualenv)))
2041 (synopsis "Enhance the default behavior of Python’s setuptools")
2042 (description
2043 "Python Build Reasonableness (PBR) is a library that injects some useful
2044and sensible default behaviors into your setuptools run. It will set
2045versions, process requirements files and generate AUTHORS and ChangeLog file
2046from git information.
2047")))
2048
2049(define-public python2-pbr
2050 (package-with-python2 python-pbr))
2051
ea43f0d5
MB
2052(define-public python-pyrsistent
2053 (package
2054 (name "python-pyrsistent")
c19930dc 2055 (version "0.15.7")
ea43f0d5
MB
2056 (home-page "https://github.com/tobgu/pyrsistent")
2057 (source (origin
2058 (method url-fetch)
2059 (uri (pypi-uri "pyrsistent" version))
2060 (sha256
2061 (base32
c19930dc 2062 "103j63g6lb5dfspph96zxjdpnq9h991kazd4f09ddgkpxpivbiyd"))))
ea43f0d5
MB
2063 (build-system python-build-system)
2064 (native-inputs
2065 `(("python-hypothesis" ,python-hypothesis)
2066 ("python-pytest" ,python-pytest)
2067 ("python-pytest-runner" ,python-pytest-runner)))
2068 (propagated-inputs
2069 `(("python-six" ,python-six)))
2070 (synopsis "Persistent data structures for Python")
2071 (description
2072 "Pyrsistent is a number of persistent collections (by some referred to as
2073functional data structures). Persistent in the sense that they are immutable.
2074
2075All methods on a data structure that would normally mutate it instead return a
2076new copy of the structure containing the requested updates. The original
2077structure is left untouched.")
2078 (license license:expat)))
2079
2080(define-public python2-pyrsistent
2081 (package-with-python2 python-pyrsistent))
2082
44d10b1f
RW
2083(define-public python-exif-read
2084 (package
2085 (name "python-exif-read")
2086 (version "2.1.2")
2087 (source (origin
2088 (method url-fetch)
2089 (uri (pypi-uri "ExifRead" version))
2090 (sha256
2091 (base32
2092 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2093 (build-system python-build-system)
2094 (arguments `(#:tests? #f)) ; no tests
2095 (home-page "https://github.com/ianare/exif-py")
2096 (synopsis "Python library to extract EXIF data from image files")
2097 (description
2098 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2099files.")
2100 (license license:bsd-3)))
2101
2102(define-public python2-exif-read
2103 (package-with-python2 python-exif-read))
2104
2105(define-public python-pyld
2106 (package
2107 (name "python-pyld")
6d4ed78d 2108 (version "1.0.5")
44d10b1f
RW
2109 (source (origin
2110 (method url-fetch)
2111 (uri (pypi-uri "PyLD" version))
2112 (sha256
2113 (base32
6d4ed78d 2114 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
44d10b1f
RW
2115 (build-system python-build-system)
2116 (home-page "https://github.com/digitalbazaar/pyld")
2117 (synopsis "Python implementation of the JSON-LD specification")
2118 (description
2119 "PyLD is an implementation of the JSON-LD specification.")
2120 (license license:bsd-3)))
2121
2122(define-public python2-pyld
2123 (package-with-python2 python-pyld))
2124
2125(define-public python-click
2126 (package
2127 (name "python-click")
61984855 2128 (version "7.0")
44d10b1f
RW
2129 (source
2130 (origin
2131 (method url-fetch)
2132 (uri (pypi-uri "click" version))
2133 (sha256
2134 (base32
61984855 2135 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
2136 (build-system python-build-system)
2137 (arguments
8d7e7ca6 2138 `(#:phases
44d10b1f
RW
2139 (modify-phases %standard-phases
2140 (add-after 'unpack 'fix-paths
2141 (lambda* (#:key inputs #:allow-other-keys)
2142 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2143 "cross-libc" "libc"))))
2144 (substitute* "click/_unicodefun.py"
2145 (("'locale'")
2146 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
2147 #t))
2148 (replace 'check
2149 (lambda _
2150 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
2151 (native-inputs
2152 `(("python-pytest" ,python-pytest)))
61984855 2153 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
2154 (synopsis "Command line library for Python")
2155 (description
2156 "Click is a Python package for creating command line interfaces in a
2157composable way with as little code as necessary. Its name stands for
2158\"Command Line Interface Creation Kit\". It's highly configurable but comes
2159with sensible defaults out of the box.")
2160 (license license:bsd-3)))
2161
2162(define-public python2-click
2163 (package-with-python2 python-click))
2164
2165(define-public python-wheel
2166 (package
2167 (name "python-wheel")
8f137daf 2168 (version "0.33.6")
44d10b1f
RW
2169 (source
2170 (origin
2171 (method url-fetch)
2172 (uri (pypi-uri "wheel" version))
2173 (sha256
2174 (base32
8f137daf 2175 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
44d10b1f 2176 (build-system python-build-system)
8f137daf
MB
2177 (arguments
2178 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2179 ;; fails to find the newly-built bdist_wheel library, even though it is
2180 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2181 '(#:tests? #f))
44d10b1f
RW
2182 (home-page "https://bitbucket.org/pypa/wheel/")
2183 (synopsis "Format for built Python packages")
2184 (description
2185 "A wheel is a ZIP-format archive with a specially formatted filename and
2186the @code{.whl} extension. It is designed to contain all the files for a PEP
2187376 compatible install in a way that is very close to the on-disk format. Many
2188packages will be properly installed with only the @code{Unpack} step and the
2189unpacked archive preserves enough information to @code{Spread} (copy data and
2190scripts to their final locations) at any later time. Wheel files can be
2191installed with a newer @code{pip} or with wheel's own command line utility.")
8f137daf 2192 (license license:expat)))
44d10b1f
RW
2193
2194(define-public python2-wheel
8f137daf 2195 (package-with-python2 python-wheel))
44d10b1f
RW
2196
2197(define-public python-vcversioner
2198 (package
2199 (name "python-vcversioner")
2200 (version "2.16.0.0")
2201 (source
2202 (origin
2203 (method url-fetch)
2204 (uri (pypi-uri "vcversioner" version))
2205 (sha256
2206 (base32
2207 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2208 (build-system python-build-system)
2209 (synopsis "Python library for version number discovery")
2210 (description "Vcversioner is a Python library that inspects tagging
2211information in a variety of version control systems in order to discover
2212version numbers.")
2213 (home-page "https://github.com/habnabit/vcversioner")
2214 (license license:isc)))
2215
2216(define-public python2-vcversioner
2217 (package-with-python2 python-vcversioner))
2218
5591fc4f
MC
2219(define-public python-jdcal
2220 (package
2221 (name "python-jdcal")
2222 (version "1.4")
2223 (source
2224 (origin
2225 (method url-fetch)
2226 (uri (pypi-uri "jdcal" version))
2227 (sha256
2228 (base32
2229 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2230 (build-system python-build-system)
2231 (arguments
2232 `(#:phases (modify-phases %standard-phases
2233 (replace 'check
2234 (lambda _
2235 (invoke "pytest"))))))
2236 (native-inputs
2237 `(("python-pytest" ,python-pytest)))
2238 (home-page "https://github.com/phn/jdcal")
2239 (synopsis "Functions to convert between Julian dates Gregorian dates")
2240 (description "This Python library provides functions for converting
2241between Julian dates and Gregorian dates.")
2242 (license license:bsd-2)))
2243
2244(define-public python2-jdcal
2245 (package-with-python2 python-jdcal))
2246
06d41d8d
VC
2247(define-public python-jsondiff
2248 (package
2249 (name "python-jsondiff")
2250 (version "1.2.0")
2251 (source
2252 (origin
2253 (method url-fetch)
2254 (uri (pypi-uri "jsondiff" version))
2255 (sha256
2256 (base32
2257 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2258 (build-system python-build-system)
2259 (native-inputs
2260 `(("python-nose" ,python-nose)
2261 ("python-nose-random" ,python-nose-random)))
2262 (home-page
2263 "https://github.com/fzumstein/jsondiff")
2264 (synopsis "Compare JSON and JSON-like structures in Python")
2265 (description "@code{jsondiff} is a Python library which lets you
2266compare, diff, and patch JSON and JSON-like structures in Python.")
2267 (license license:expat)))
2268
44d10b1f
RW
2269(define-public python-jsonschema
2270 (package
2271 (name "python-jsonschema")
1adde06e 2272 (version "3.0.1")
44d10b1f
RW
2273 (source (origin
2274 (method url-fetch)
786ccb87 2275 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
2276 (sha256
2277 (base32
1adde06e 2278 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
2279 (build-system python-build-system)
2280 (arguments
2281 '(#:phases
2282 (modify-phases %standard-phases
1adde06e
MB
2283 (replace 'check
2284 (lambda _
2285 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2286 (invoke "trial" "jsonschema"))))))
44d10b1f 2287 (native-inputs
1adde06e
MB
2288 `(("python-setuptools_scm" ,python-setuptools-scm)
2289 ("python-twisted" ,python-twisted)))
2290 (propagated-inputs
2291 `(("python-attrs" ,python-attrs)
2292 ("python-pyrsistent" ,python-pyrsistent)
2293 ("python-six" ,python-six)))
44d10b1f
RW
2294 (home-page "https://github.com/Julian/jsonschema")
2295 (synopsis "Implementation of JSON Schema for Python")
2296 (description
2297 "Jsonschema is an implementation of JSON Schema for Python.")
2298 (license license:expat)
2299 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2300
2301(define-public python2-jsonschema
2302 (let ((jsonschema (package-with-python2
2303 (strip-python2-variant python-jsonschema))))
2304 (package (inherit jsonschema)
44d10b1f 2305 (propagated-inputs
1adde06e
MB
2306 `(("python2-functools32" ,python2-functools32)
2307 ,@(package-propagated-inputs jsonschema))))))
44d10b1f
RW
2308
2309(define-public python-schema
2310 (package
2311 (name "python-schema")
2312 (version "0.6.6")
2313 (source
2314 (origin
2315 (method url-fetch)
2316 (uri (pypi-uri "schema" version))
2317 (sha256
2318 (base32
2319 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2320 (build-system python-build-system)
2321 (native-inputs
2322 `(("python-pytest" ,python-pytest)))
2323 (home-page "https://github.com/keleshev/schema")
2324 (synopsis "Simple data validation library")
2325 (description
2326 "@code{python-schema} is a library for validating Python data
2327structures, such as those obtained from config-files, forms, external
2328services or command-line parsing, converted from JSON/YAML (or
2329something else) to Python data-types.")
2330 (license license:psfl)))
2331
2332(define-public python2-schema
2333 (package-with-python2 python-schema))
2334
2335(define-public python-schema-0.5
2336 (package (inherit python-schema)
2337 (version "0.5.0")
2338 (source
2339 (origin
2340 (method url-fetch)
2341 (uri (pypi-uri "schema" version))
2342 (sha256
2343 (base32
2344 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2345
2346(define-public python2-schema-0.5
2347 (package-with-python2 python-schema-0.5))
2348
2349(define-public python-kitchen
2350 (package
2351 (name "python-kitchen")
2352 (version "1.2.5")
2353 (source
2354 (origin
2355 (method url-fetch)
2356 (uri (pypi-uri "kitchen" version))
2357 (sha256
2358 (base32
2359 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2360 (build-system python-build-system)
2361 (propagated-inputs
2362 `(("python-chardet" ,python-chardet)))
2363 (home-page "https://github.com/fedora-infra/kitchen")
2364 (synopsis "Python API for snippets")
2365 (description "@code{kitchen} module provides a python API for all sorts of
2366little useful snippets of code that everybody ends up writing for their projects
2367but never seem big enough to build an independent release. Use kitchen and stop
2368cutting and pasting that code over and over.")
2369 (license (list license:lgpl2.1+
2370 ;; subprocess.py, test_subprocess.py,
2371 ;; kitchen/pycompat25/defaultdict.py:
2372 license:psfl))))
2373
2374(define-public python2-kitchen
2375 (package-with-python2 python-kitchen))
2376
2377(define-public python-unidecode
2378 (package
2379 (name "python-unidecode")
eb80a300 2380 (version "1.1.1")
44d10b1f
RW
2381 (source (origin
2382 (method url-fetch)
2383 (uri (pypi-uri "Unidecode" version))
2384 (sha256
2385 (base32
eb80a300 2386 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
44d10b1f 2387 (build-system python-build-system)
e85af137 2388 (home-page "https://pypi.org/project/Unidecode/")
44d10b1f
RW
2389 (synopsis "ASCII transliterations of Unicode text")
2390 (description
2391 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2392useful when integrating with legacy code that doesn't support Unicode, or for
2393ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2394machine identifiers from human-readable Unicode strings that should still be
2395somewhat intelligible.")
2396 (license license:gpl2+)))
2397
2398(define-public python2-unidecode
2399 (package-with-python2 python-unidecode))
2400
9f933527
MB
2401(define-public python-text-unidecode
2402 (package
2403 (name "python-text-unidecode")
2404 (version "1.3")
2405 (source (origin
2406 (method url-fetch)
2407 (uri (pypi-uri "text-unidecode" version))
2408 (sha256
2409 (base32
2410 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2411 (build-system python-build-system)
2412 (arguments
2413 '(#:phases (modify-phases %standard-phases
2414 (replace 'check
2415 (lambda _
2416 (setenv "PYTHONPATH"
2417 (string-append "./build/lib:"
2418 (getenv "PYTHONPATH")))
2419 (invoke "pytest" "-vv"))))))
2420 (native-inputs
2421 `(("python-pytest" ,python-pytest)))
2422 (home-page "https://github.com/kmike/text-unidecode/")
2423 (synopsis "Decode Unicode data")
2424 (description
2425 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2426Perl library. It can create ASCII representations of Unicode data. In general
2427users should prefer the @code{python-unidecode} package which offers better
2428memory usage and transliteration quality.")
2429 ;; The user can choose either license.
2430 (license (list license:clarified-artistic license:gpl2+))))
2431
2432(define-public python2-text-unidecode
2433 (package-with-python2 python-text-unidecode))
2434
44d10b1f
RW
2435(define-public python-pyjwt
2436 (package
2437 (name "python-pyjwt")
be6f2f56 2438 (version "1.7.1")
44d10b1f
RW
2439 (source
2440 (origin
2441 (method url-fetch)
2442 (uri (pypi-uri "PyJWT" version))
2443 (sha256
2444 (base32
be6f2f56 2445 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
44d10b1f
RW
2446 (modules '((guix build utils)))
2447 (snippet
2448 '(begin
2449 (for-each delete-file-recursively
2450 (find-files "." "\\.pyc$"))
2451 #t))))
2452 (build-system python-build-system)
2453 (native-inputs
2454 `(("python-pytest" ,python-pytest)
2455 ("python-pytest-cov" ,python-pytest-cov)
2456 ("python-pytest-runner" ,python-pytest-runner)))
2457 (home-page "https://github.com/progrium/pyjwt")
2458 (synopsis "JSON Web Token implementation in Python")
2459 (description
2460 "PyJWT is a JSON Web Token implementation written in Python.")
2461 (license license:expat)))
2462
2463(define-public python2-pyjwt
2464 (package-with-python2 python-pyjwt))
2465
2466(define-public python-pykka
2467 (package
2468 (name "python-pykka")
2469 (version "1.2.1")
2470 (source
2471 (origin
2472 (method url-fetch)
2473 (uri (pypi-uri "Pykka" version))
2474 (sha256
2475 (base32
2476 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2477 (build-system python-build-system)
2478 (native-inputs
2479 `(("python-mock" ,python-mock)
2480 ("python-nose" ,python-nose)
2481 ("python-gevent" ,python-gevent)
2482 ("python-eventlet" ,python-eventlet)))
2483 (home-page "https://www.pykka.org/")
2484 (synopsis "Pykka is a Python implementation of the actor model")
2485 (description
2486 "Pykka is a Python implementation of the actor model.
2487The actor model introduces some simple rules to control the sharing
2488of state and cooperation between execution units, which makes it
2489easier to build concurrent applications.")
2490 (license license:asl2.0)))
2491
2492(define-public python2-pykka
2493 (package-with-python2 python-pykka))
2494
8d22f7e3
VC
2495(define-public python-pymsgbox
2496 (package
2497 (name "python-pymsgbox")
2498 (version "1.0.6")
2499 (source
2500 (origin
2501 (method git-fetch)
2502 (uri (git-reference
2503 ;; LICENSE.txt is not present on pypi
2504 (url "https://github.com/asweigart/PyMsgBox")
2505 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2506 (file-name (git-file-name name version))
2507 (sha256
2508 (base32
2509 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2510 (arguments
2511 ;; Circular dependency to run tests:
2512 ;; Tests need pyautogui, which depends on pymsgbox.
2513 '(#:tests? #f))
2514 (build-system python-build-system)
2515 (home-page "https://github.com/asweigart/PyMsgBox")
2516 (synopsis "Python module for JavaScript-like message boxes")
2517 (description
2518 "PyMsgBox is a simple, cross-platform, pure Python module for
2519JavaScript-like message boxes. Types of dialog boxes include:
2520@enumerate
2521@item alert
2522@item confirm
2523@item prompt
2524@item password
2525@end enumerate
2526")
2527 (license license:bsd-3)))
2528
44d10b1f
RW
2529(define-public python-pympler
2530 (package
2531 (name "python-pympler")
2532 (home-page "https://pythonhosted.org/Pympler/")
6469af6f 2533 (version "0.8")
44d10b1f
RW
2534 (source (origin
2535 (method url-fetch)
2536 (uri (pypi-uri "Pympler" version))
2537 (sha256
2538 (base32
6469af6f 2539 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
44d10b1f
RW
2540 (build-system python-build-system)
2541 (arguments
2542 `(#:phases (modify-phases %standard-phases
2543 (delete 'check)
2544 (add-after 'install 'check
2545 (lambda* (#:key inputs outputs #:allow-other-keys)
2546 (add-installed-pythonpath inputs outputs)
2547 (invoke "python" "setup.py" "test"))))))
2548 (synopsis "Measure, monitor and analyze memory behavior")
2549 (description
2550 "Pympler is a development tool to measure, monitor and analyze
2551the memory behavior of Python objects in a running Python application.
2552
2553By pympling a Python application, detailed insight in the size and the
2554lifetime of Python objects can be obtained. Undesirable or unexpected
2555runtime behavior like memory bloat and other @samp{pymples} can easily
2556be identified.
2557
2558A web profiling frontend exposes process statistics, garbage
2559visualisation and class tracker statistics.")
2560 (license license:asl2.0)))
2561
2562(define-public python2-pympler
2563 (package-with-python2 python-pympler))
2564
2565(define-public python-itsdangerous
2566 (package
2567 (name "python-itsdangerous")
acfcf2ed 2568 (version "1.1.0")
44d10b1f
RW
2569 (source
2570 (origin
2571 (method url-fetch)
acfcf2ed 2572 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2573 (sha256
2574 (base32
acfcf2ed 2575 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2576 (build-system python-build-system)
acfcf2ed 2577 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2578 (synopsis "Python library for passing data to/from untrusted environments")
2579 (description
2580 "Itsdangerous provides various helpers to pass trusted data to untrusted
2581environments and back.")
2582 (license license:bsd-3)))
2583
2584(define-public python2-itsdangerous
2585 (package-with-python2 python-itsdangerous))
2586
2587(define-public python-pyyaml
2588 (package
2589 (name "python-pyyaml")
357af7f2 2590 (version "5.3")
44d10b1f
RW
2591 (source
2592 (origin
2593 (method url-fetch)
2594 (uri (pypi-uri "PyYAML" version))
2595 (sha256
2596 (base32
357af7f2 2597 "058nd4p8f25wwzy2aiwh18wcrdm6663cqbfdkgjp8y9cp7ampx79"))))
44d10b1f
RW
2598 (build-system python-build-system)
2599 (inputs
2600 `(("libyaml" ,libyaml)))
7509f34f 2601 (home-page "https://pyyaml.org")
44d10b1f
RW
2602 (synopsis "YAML parser and emitter for Python")
2603 (description
2604 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2605complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2606API, and sensible error messages. PyYAML supports standard YAML tags and
2607provides Python-specific tags that allow to represent an arbitrary Python
2608object.")
2609 (license license:expat)))
2610
2611(define-public python2-pyyaml
2612 (package-with-python2 python-pyyaml))
2613
2614(define-public python-vine
2615 (package
2616 (name "python-vine")
2617 (version "1.1.4")
2618 (source
2619 (origin
2620 (method url-fetch)
2621 (uri (pypi-uri "vine" version))
2622 (sha256
2623 (base32
2624 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2625 (build-system python-build-system)
2626 (native-inputs
2627 `(("python-pytest" ,python-pytest)
2628 ("python-case" ,python-case)))
2629 (home-page "https://github.com/celery/vine")
2630 (synopsis "Promises for Python")
2631 (description
2632 "@code{vine} provides a special implementation of promises in that it can
2633be used both for \"promise of a value\" and lazy evaluation. The biggest
2634upside for this is that everything in a promise can also be a promise,
2635e.g. filters, callbacks and errbacks can all be promises.")
2636 (license license:bsd-3)))
2637
2638(define-public python-virtualenv
2639 (package
2640 (name "python-virtualenv")
60067279 2641 (version "20.0.10")
44d10b1f
RW
2642 (source
2643 (origin
2644 (method url-fetch)
2645 (uri (pypi-uri "virtualenv" version))
2646 (sha256
2647 (base32
60067279 2648 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
44d10b1f 2649 (build-system python-build-system)
44d10b1f
RW
2650 (native-inputs
2651 `(("python-mock" ,python-mock)
94d57ba3
JK
2652 ("python-pytest" ,python-pytest)
2653 ;; NOTE: guix lint remarks that "python-setuptools should probably not
2654 ;; be an input at all". However, removing the input makes the build error:
2655 ;; File "setup.py", line 4, in <module>
2656 ;; raise RuntimeError("setuptools >= 41 required to build")
2657 ("python-setuptools" ,python-setuptools)
2658 ("python-setuptools-scm" ,python-setuptools-scm)))
828996bb 2659 (propagated-inputs
94d57ba3
JK
2660 `(("python-appdirs" ,python-appdirs)
2661 ("python-distlib" ,python-distlib)
2662 ("python-filelock" ,python-filelock)
2663 ("python-six" ,python-six)
2664 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
2665 (home-page "https://virtualenv.pypa.io/")
2666 (synopsis "Virtual Python environment builder")
2667 (description
2668 "Virtualenv is a tool to create isolated Python environments.")
7815afc9 2669 (properties `((python2-variant . ,(delay python2-virtualenv))))
44d10b1f
RW
2670 (license license:expat)))
2671
2672(define-public python2-virtualenv
7815afc9
MB
2673 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
2674 (package
2675 (inherit base)
2676 (arguments
2677 `(#:python ,python-2
2678 #:phases
2679 (modify-phases %standard-phases
2680 (add-after 'set-paths 'adjust-PYTHONPATH
2681 (lambda* (#:key inputs #:allow-other-keys)
2682 (let* ((python (assoc-ref inputs "python"))
2683 (python-sitedir (string-append python "/lib/python2.7"
2684 "/site-packages")))
2685 ;; XXX: 'python2' always comes first on PYTHONPATH
2686 ;; and shadows the 'setuptools' input. Move python2
2687 ;; last: this should be fixed in python-build-system
2688 ;; in a future rebuild cycle.
2689 (setenv "PYTHONPATH"
2690 (string-append (string-join (delete python-sitedir
2691 (string-split
2692 (getenv "PYTHONPATH")
2693 #\:))
2694 ":")
2695 ":" python-sitedir))
2696 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
2697 (getenv "PYTHONPATH"))
2698 #t))))))
2699 (propagated-inputs
2700 `(("python-contextlib2" ,python2-contextlib2)
2701 ,@(package-propagated-inputs base))))))
44d10b1f
RW
2702
2703(define-public python-markupsafe
2704 (package
2705 (name "python-markupsafe")
753eb411 2706 (version "1.1.1")
44d10b1f
RW
2707 (source
2708 (origin
2709 (method url-fetch)
5182927c 2710 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2711 (sha256
2712 (base32
753eb411 2713 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2714 (build-system python-build-system)
753eb411
MB
2715 (arguments
2716 `(#:modules ((ice-9 ftw)
2717 (srfi srfi-1)
2718 (srfi srfi-26)
2719 (guix build utils)
2720 (guix build python-build-system))
2721 #:phases (modify-phases %standard-phases
2722 (replace 'check
2723 (lambda _
2724 (let ((cwd (getcwd))
2725 (libdir (find (cut string-prefix? "lib." <>)
2726 (scandir "build"))))
2727 (setenv "PYTHONPATH"
2728 (string-append cwd "/build/" libdir ":"
2729 (getenv "PYTHONPATH")))
2730 (invoke "pytest" "-vv")))))))
2731 (native-inputs
2732 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2733 (home-page "https://github.com/mitsuhiko/markupsafe")
2734 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2735 (description
2736 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2737for Python.")
2738 (license license:bsd-3)))
2739
2740(define-public python2-markupsafe
2741 (package-with-python2 python-markupsafe))
2742
2743(define-public python-jinja2
2744 (package
2745 (name "python-jinja2")
3c8ad087 2746 (version "2.11.1")
44d10b1f
RW
2747 (source
2748 (origin
2749 (method url-fetch)
2750 (uri (pypi-uri "Jinja2" version))
2751 (sha256
2752 (base32
3c8ad087 2753 "0l72c11n959yzb8d3ankckb6yhjhm6x729zm7rkpk040qzxpy64k"))))
44d10b1f 2754 (build-system python-build-system)
dce9b8b5
MB
2755 (arguments
2756 '(#:phases (modify-phases %standard-phases
2757 (replace 'check
2758 (lambda* (#:key tests? #:allow-other-keys)
2759 (if tests?
2760 (begin
2761 (setenv "PYTHONPATH"
2762 (string-append "./build/lib:"
2763 (getenv "PYTHONPATH")))
2764 (invoke "pytest" "-vv"))
2765 (format #t "test suite not run~%"))
2766 #t)))))
2767 (native-inputs
2768 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2769 (propagated-inputs
2770 `(("python-markupsafe" ,python-markupsafe)))
2771 (home-page "http://jinja.pocoo.org/")
2772 (synopsis "Python template engine")
2773 (description
2774 "Jinja2 is a small but fast and easy to use stand-alone template engine
2775written in pure Python.")
2776 (license license:bsd-3)))
2777
2778(define-public python2-jinja2
2779 (package-with-python2 python-jinja2))
2780
ba42a6bf
TLC
2781(define-public python-jinja2-time
2782 (package
2783 (name "python-jinja2-time")
2784 (version "0.2.0")
2785 (source
2786 (origin
2787 (method url-fetch)
2788 (uri (pypi-uri "jinja2-time" version))
2789 (sha256
2790 (base32
2791 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2792 (build-system python-build-system)
2793 (propagated-inputs
2794 `(("python-arrow" ,python-arrow)
2795 ("python-jinja2" ,python-jinja2)))
2796 (home-page
2797 "https://github.com/hackebrot/jinja2-time")
2798 (synopsis "Jinja2 Extension for Dates and Times")
2799 (description
2800 "This package provides an extension for the template engine Jinja2. It
2801adds a 'now' tag providing a convenient access to the arrow.now() API from
2802templates. A format string can be provided to control the output.")
2803 (license license:expat)))
2804
44d10b1f
RW
2805(define-public python-pystache
2806 (package
2807 (name "python-pystache")
2808 (version "0.5.4")
2809 (source (origin
2810 (method url-fetch)
2811 (uri (pypi-uri "pystache" version))
2812 (sha256
2813 (base32
2814 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2815 (build-system python-build-system)
2816 (arguments
2817 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2818 (home-page "http://defunkt.io/pystache/")
2819 (synopsis "Python logic-less template engine")
2820 (description
2821 "Pystache is a Python implementation of the framework agnostic,
2822logic-free templating system Mustache.")
2823 (license license:expat)
2824 (properties `((python2-variant . ,(delay python2-pystache))))))
2825
2826(define-public python2-pystache
2827 (package (inherit (package-with-python2
2828 (strip-python2-variant python-pystache)))
2829 (arguments
2830 `(#:python ,python-2
2831 #:phases
2832 (modify-phases %standard-phases
2833 (replace 'check
2834 (lambda _
dfafc29b 2835 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2836
2837(define-public python-joblib
2838 (package
2839 (name "python-joblib")
23bc9a35 2840 (version "0.14.1")
44d10b1f
RW
2841 (source (origin
2842 (method url-fetch)
2843 (uri (pypi-uri "joblib" version))
2844 (sha256
2845 (base32
23bc9a35 2846 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
44d10b1f
RW
2847 (build-system python-build-system)
2848 (arguments
2849 `(#:phases
2850 (modify-phases %standard-phases
2851 (replace 'check
2852 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2853 (native-inputs
2854 `(("python-pytest" ,python-pytest)))
2855 (home-page "https://joblib.readthedocs.io/")
2856 (synopsis "Using Python functions as pipeline jobs")
2857 (description
2858 "Joblib is a set of tools to provide lightweight pipelining in Python.
2859In particular, joblib offers: transparent disk-caching of the output values
2860and lazy re-evaluation (memoize pattern), easy simple parallel computing
2861logging and tracing of the execution.")
2862 (license license:bsd-3)))
2863
2864(define-public python2-joblib
2865 (package-with-python2 python-joblib))
2866
a3363341
VC
2867(define-public python-daemon
2868 (package
2869 (name "python-daemon")
2870 (version "2.2.3")
2871 (source
2872 (origin
2873 (method url-fetch)
2874 (uri (pypi-uri "python-daemon" version))
2875 (sha256
2876 (base32
2877 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2878 (build-system python-build-system)
2879 (arguments
2880 `(#:phases
2881 (modify-phases %standard-phases
2882 (add-before 'check 'disable-tests
2883 (lambda _
2884 ;; FIXME: Determine why test fails
2885 (substitute* "test/test_daemon.py"
2886 (("test_detaches_process_context")
2887 "skip_test_detaches_process_context"))
2888 #t)))))
2889 (propagated-inputs
2890 `(("python-lockfile" ,python-lockfile)))
2891 (native-inputs
2892 `(("python-unittest2" ,python-unittest2)
2893 ("python-testtools" ,python-testtools)
2894 ("python-testscenarios" ,python-testscenarios)
2895 ("python-mock" ,python-mock)
2896 ("python-docutils" ,python-docutils)))
2897 (home-page "https://pagure.io/python-daemon/")
2898 (synopsis "Python library for making a Unix daemon process")
2899 (description "Python-daemon is a library that assists a Python program to
2900turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2901
2902This library provides a @code{DaemonContext} class that manages the following
2903important tasks for becoming a daemon process:
2904@enumerate
2905@item Detach the process into its own process group.
2906@item Set process environment appropriate for running inside a chroot.
2907@item Renounce suid and sgid privileges.
2908@item Close all open file descriptors.
2909@item Change the working directory, uid, gid, and umask.
2910@item Set appropriate signal handlers.
2911@item Open new file descriptors for stdin, stdout, and stderr.
2912@item Manage a specified PID lock file.
2913@item Register cleanup functions for at-exit processing.
2914@end enumerate")
2915 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2916 (license (list license:asl2.0 license:gpl3+))))
2917
544ea9c2
MB
2918(define-public python-anytree
2919 (package
2920 (name "python-anytree")
2921 (version "2.8.0")
2922 (source (origin
2923 (method url-fetch)
2924 (uri (pypi-uri "anytree" version))
2925 (sha256
2926 (base32
2927 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2928 (build-system python-build-system)
2929 (propagated-inputs
2930 `(("python-six" ,python-six)))
2931 (native-inputs
2932 `(;; For tests.
2933 ("graphviz" ,graphviz) ;for 'dot'
2934 ("python-nose" ,python-nose)))
2935 (home-page "https://github.com/c0fec0de/anytree")
2936 (synopsis "Lightweight tree data library")
2937 (description
2938 "@code{anytree} is a simple, lightweight, and extensible tree data
2939structure for Python.")
2940 (license license:asl2.0)))
2941
44d10b1f
RW
2942(define-public python-docutils
2943 (package
2944 (name "python-docutils")
da8e8dc6 2945 (version "0.16")
44d10b1f
RW
2946 (source
2947 (origin
2948 (method url-fetch)
2949 (uri (pypi-uri "docutils" version))
2950 (sha256
2951 (base32
da8e8dc6 2952 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
44d10b1f
RW
2953 (build-system python-build-system)
2954 (arguments
8cf5c9fa
MB
2955 '(#:phases (modify-phases %standard-phases
2956 (replace 'check
2957 (lambda* (#:key tests? #:allow-other-keys)
2958 (if tests?
2959 (invoke "python" "test/alltests.py")
2960 (format #t "test suite not run~%"))
2961 #t)))))
44d10b1f
RW
2962 (home-page "http://docutils.sourceforge.net/")
2963 (synopsis "Python Documentation Utilities")
2964 (description
2965 "Docutils is a modular system for processing documentation into useful
2966formats, such as HTML, XML, and LaTeX. For input Docutils supports
2967reStructuredText.")
2968 ;; Most of the source code is public domain, but some source files are
2969 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2970 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2971
2972(define-public python2-docutils
2973 (package-with-python2 python-docutils))
2974
4510aeb9
MB
2975;; python2-sphinx fails its test suite with newer versions.
2976(define-public python2-docutils-0.14
2977 (package
2978 (inherit python2-docutils)
2979 (version "0.14")
2980 (source (origin
2981 (method url-fetch)
2982 (uri (pypi-uri "docutils" version))
2983 (sha256
2984 (base32
2985 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
2986
44d10b1f
RW
2987(define-public python-pygments
2988 (package
2989 (name "python-pygments")
69002b21 2990 (version "2.5.2")
44d10b1f
RW
2991 (source
2992 (origin
2993 (method url-fetch)
2994 (uri (pypi-uri "Pygments" version))
2995 (sha256
2996 (base32
69002b21 2997 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
44d10b1f
RW
2998 (build-system python-build-system)
2999 (arguments
3000 ;; FIXME: Tests require sphinx, which depends on this.
3001 '(#:tests? #f))
69002b21 3002 (home-page "https://pygments.org/")
44d10b1f
RW
3003 (synopsis "Syntax highlighting")
3004 (description
3005 "Pygments is a syntax highlighting package written in Python.")
3006 (license license:bsd-2)))
3007
3008(define-public python2-pygments
3009 (package-with-python2 python-pygments))
3010
0f0a5ef9
MC
3011(define-public python-bumpversion
3012 (package
3013 (name "python-bumpversion")
3014 (version "0.5.3")
3015 (source
3016 (origin
3017 (method url-fetch)
3018 (uri (pypi-uri "bumpversion" version))
3019 (sha256
3020 (base32
3021 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3022 (build-system python-build-system)
3023 (home-page "https://github.com/peritus/bumpversion")
3024 (synopsis "Tool to bump software version")
3025 (description "This tool provides a command-line interface (CLI) to bump a
3026software version simply.")
3027 (license license:expat)))
3028
b24fd2c2
MC
3029(define-public python-deprecated
3030 (package
3031 (name "python-deprecated")
3032 (version "1.2.5")
3033 (source
3034 (origin
3035 (method git-fetch)
3036 (uri (git-reference
3037 (url "https://github.com/tantale/deprecated.git")
3038 (commit (string-append "v" version))))
3039 (file-name (git-file-name name version))
3040 (sha256
3041 (base32
3042 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3043 (build-system python-build-system)
3044 (arguments
3045 `(#:phases (modify-phases %standard-phases
3046 (replace 'check
3047 (lambda _
3048 (invoke "pytest"))))))
3049 (propagated-inputs
3050 `(("python-wrapt" ,python-wrapt)))
3051 (native-inputs
3052 `(("python-bumpversion" ,python-bumpversion)
3053 ("python-pytest" ,python-pytest)
3054 ("python-pytest-cov" ,python-pytest-cov)
3055 ("python-sphinx" ,python-sphinx)
3056 ("python-tox" ,python-tox)))
3057 (home-page "https://github.com/tantale/deprecated")
3058 (synopsis "Python decorator to deprecate classes, functions or methods")
3059 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3060to deprecate classes, functions or methods.")
3061 (license license:expat)))
3062
d5a998fa
MC
3063(define-public python-pygithub
3064 (package
3065 (name "python-pygithub")
749e38d7 3066 (version "1.43.8")
d5a998fa
MC
3067 (source
3068 ;; We fetch from the Git repo because there are no tests in the PyPI
3069 ;; archive.
3070 (origin
3071 (method git-fetch)
3072 (uri (git-reference
3073 (url "https://github.com/PyGithub/PyGithub.git")
3074 (commit (string-append "v" version))))
3075 (file-name (git-file-name name version))
3076 (sha256
749e38d7 3077 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
3078 (build-system python-build-system)
3079 (arguments
3080 `(#:phases (modify-phases %standard-phases
3081 ;; Some tests rely on the network.
3082 (add-after 'unpack 'disable-failing-tests
3083 (lambda _
3084 (substitute* "tests/Issue142.py"
3085 (("testDecodeJson") "disabled_testDecodeJson"))
3086 #t))
3087 (add-before 'check 'prepare-for-tests
3088 (lambda _
3089 (for-each (lambda (f)
3090 (chmod f #o666))
3091 (find-files "./tests"))
3092 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3093 (setenv "PYTHONPATH"
3094 (string-append "./tests:" (getenv "PYTHONPATH")))
3095 #t)))))
3096 (propagated-inputs
3097 `(("python-deprecated" ,python-deprecated)
3098 ("python-pyjwt" ,python-pyjwt)
3099 ("python-requests" ,python-requests)))
3100 (native-inputs `(("python-httpretty" ,python-httpretty)))
3101 (home-page "https://pygithub.readthedocs.io/en/latest/")
3102 (synopsis "Python library for the GitHub API")
3103 (description "This library allows managing GitHub resources such as
3104repositories, user profiles, and organizations in your Python applications,
3105using version 3 of the GitHub application programming interface (API).")
3106 (license license:lgpl3+)))
3107
c0c0bb38
MC
3108(define-public python-rellu
3109 (package
3110 (name "python-rellu")
3111 (version "0.7")
3112 (source
3113 (origin
3114 (method url-fetch)
3115 (uri (pypi-uri "rellu" version))
3116 (sha256
3117 (base32
3118 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3119 (build-system python-build-system)
3120 (propagated-inputs
3121 `(("python-invoke" ,python-invoke)
3122 ("python-pygithub" ,python-pygithub)))
3123 (home-page "https://github.com/robotframework/rellu")
3124 (synopsis "Utilities to create PyPI releases")
3125 (description "This collection of utilities contains tooling and templates
3126to assist in creating releases on GitHub and publishing them on PyPI. It is
3127designed to be used by Robot Framework and tools and libraries in its
3128ecosystem, but can naturally be used also by other projects.")
3129 (license license:asl2.0)))
3130
b9790285
MC
3131(define-public python-robotframework
3132 (package
3133 (name "python-robotframework")
1710b8f8 3134 (version "3.1.2")
b9790285
MC
3135 ;; There are no tests in the PyPI archive.
3136 (source
3137 (origin
3138 (method git-fetch)
3139 (uri (git-reference
3140 (url "https://github.com/robotframework/robotframework.git")
3141 (commit (string-append "v" version))))
3142 (file-name (git-file-name name version))
3143 (sha256
1710b8f8 3144 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
3145 (patches (search-patches
3146 "python-robotframework-honor-source-date-epoch.patch"))))
3147 (build-system python-build-system)
3148 (arguments
3149 `(#:phases (modify-phases %standard-phases
3150 (add-before 'build 'build-and-install-doc
3151 (lambda* (#:key outputs #:allow-other-keys)
3152 (let* ((doc-output (assoc-ref outputs "doc"))
3153 (doc (string-append doc-output "/share/"
3154 ,name "-" ,version "/")))
3155 (invoke "invoke" "library-docs" "all")
3156 (mkdir-p doc)
3157 (copy-recursively "doc/libraries"
3158 (string-append doc "/libraries"))
3159 #t)))
3160 (replace 'check
3161 (lambda _
3162 (invoke "python" "utest/run.py"))))))
3163 (native-inputs
3164 `(("python-invoke" ,python-invoke)
3165 ("python-rellu" ,python-rellu)
3166 ("python:tk" ,python "tk"))) ;used when building the HTML doc
3167 (outputs '("out" "doc"))
3168 (home-page "https://robotframework.org")
3169 (synopsis "Generic automation framework")
3170 (description "Robot Framework is a generic automation framework for
3171acceptance testing, acceptance test driven development (ATDD), and robotic
3172process automation (RPA).")
3173 (license license:asl2.0)))
3174
5b84c120
MC
3175(define-public python-robotframework-lint
3176 ;; There is no properly tagged release; the commit below seems to correspond
3177 ;; to the 0.9 stable release available from PyPI. The tests are not
3178 ;; included in the PyPI archive, so we fetch the sources from the upstream
3179 ;; Git repo.
3180 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
3181 (revision "1"))
3182 (package
3183 (name "python-robotframework-lint")
3184 (version (git-version "0.9.0" revision commit))
3185 (source
3186 (origin
3187 (method git-fetch)
3188 (uri (git-reference
3189 (url "https://github.com/boakley/robotframework-lint.git")
3190 (commit commit)))
3191 (file-name (git-file-name name version))
3192 (sha256
3193 (base32
3194 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
3195 (build-system python-build-system)
3196 (arguments
3197 `(#:phases
3198 (modify-phases %standard-phases
3199 (replace 'check
3200 (lambda _
3201 (invoke "python" "-m" "robot" "-A"
3202 "tests/conf/default.args" "tests"))))))
3203 (propagated-inputs
3204 `(("python-robotframework" ,python-robotframework)))
3205 (home-page "https://github.com/boakley/robotframework-lint/")
3206 (synopsis "Static analysis tool (linter) for Robot Framework")
3207 (description "This package provides the @code{rflint} command-line
3208utility, a static analysis tool (linter) for Robot Framework source files.")
3209 (license license:asl2.0))))
3210
c0c64f17
MC
3211(define-public python-robotframework-sshlibrary
3212 (package
3213 (name "python-robotframework-sshlibrary")
3214 (version "3.3.0")
3215 ;; There are no tests in the PyPI archive.
3216 (source
3217 (origin
3218 (method git-fetch)
3219 (uri (git-reference
3220 (url "https://github.com/robotframework/SSHLibrary.git")
3221 (commit (string-append "v" version))))
3222 (file-name (git-file-name name version))
3223 (sha256
3224 (base32
3225 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3226 (build-system python-build-system)
3227 (arguments
3228 `(#:phases
3229 (modify-phases %standard-phases
3230 (add-before 'build 'build-and-install-doc
3231 (lambda* (#:key outputs #:allow-other-keys)
3232 (let* ((doc-output (assoc-ref outputs "doc"))
3233 (doc (string-append doc-output "/share/"
3234 ,name "-" ,version "/")))
3235 (invoke "chmod" "-R" "+w" "docs")
3236 (invoke "invoke" "kw-docs" "project-docs")
3237 (mkdir-p doc)
3238 (for-each delete-file (find-files "docs" "\\.rst"))
3239 (copy-recursively "docs" doc)
3240 #t)))
3241 (replace 'check
3242 (lambda _
3243 ;; Some tests require an SSH server; we remove them.
3244 (delete-file "utest/test_client_api.py")
3245 (delete-file "utest/test_scp.py")
3246 (invoke "python" "utest/run.py"))))))
3247 (propagated-inputs
3248 `(("python-robotframework" ,python-robotframework)
3249 ("python-paramiko" ,python-paramiko)
3250 ("python-scp" ,python-scp)))
3251 (native-inputs
3252 `(("openssh" ,openssh)
3253 ("which" ,which)
3254 ;; To generate the documentation
3255 ("python-docutils" ,python-docutils)
3256 ("python-invoke" ,python-invoke)
3257 ("python-pygments" ,python-pygments)
3258 ("python-rellu" ,python-rellu)))
3259 (outputs '("out" "doc"))
3260 (home-page "https://github.com/robotframework/SSHLibrary")
3261 (synopsis "Robot Framework library for SSH and SFTP")
3262 (description "SSHLibrary is a Robot Framework library providing support
3263for SSH and SFTP. It has the following main usages:
3264@itemize @bullet
3265@item Executing commands on the remote machine, either blocking or non-blocking.
3266@item Writing and reading in an interactive shell.
3267@item Transferring files and directories over SFTP.
3268@item Ensuring that files and directories exist on the remote machine.
3269@end itemize")
3270 (license license:asl2.0)))
3271
b1daba94
VC
3272(define-public python-rstr
3273 (package
3274 (name "python-rstr")
3275 (version "2.2.6")
3276 (source
3277 (origin
3278 (method url-fetch)
3279 (uri (pypi-uri "rstr" version))
3280 (sha256
3281 (base32
3282 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3283 (build-system python-build-system)
3284 (home-page
3285 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3286 (synopsis "Generate random strings in Python")
3287 (description "This package provides a python module for generating
3288random strings of various types. It could be useful for fuzz testing,
3289generating dummy data, or other applications. It has no dependencies
3290outside the standard library.")
3291 (license license:bsd-3)))
3292
13d825fc
MC
3293(define-public python-scp
3294 (package
3295 (name "python-scp")
3296 (version "0.13.2")
3297 (source
3298 (origin
3299 (method url-fetch)
3300 (uri (pypi-uri "scp" version))
3301 (sha256
3302 (base32
3303 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3304 (build-system python-build-system)
3305 (arguments
3306 '(#:tests? #f)) ;tests require an SSH server
3307 (propagated-inputs
3308 `(("python-paramiko" ,python-paramiko)))
3309 (home-page "https://github.com/jbardin/scp.py")
3310 (synopsis "SCP protocol module for Python and Paramiko")
3311 (description "The scp module extends the Paramiko library to send and
3312receive files via the SCP1 protocol, as implemented by the OpenSSH
3313@command{scp} program.")
3314 (license license:gpl2+)))
3315
44d10b1f
RW
3316(define-public python-rst.linker
3317 (package
3318 (name "python-rst.linker")
d37e8e53 3319 (version "1.11")
44d10b1f
RW
3320 (source
3321 (origin
3322 (method url-fetch)
3323 (uri (pypi-uri "rst.linker" version))
3324 (sha256
d37e8e53 3325 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
3326 (build-system python-build-system)
3327 (propagated-inputs
3328 `(("python-dateutil" ,python-dateutil)
3329 ("python-six" ,python-six)))
3330 (native-inputs
3331 `(("python-setuptools-scm" ,python-setuptools-scm)))
3332 ;; Test would require path.py, which would introduce a cyclic dependence.
3333 (arguments `(#:tests? #f))
3334 ;; Note: As of version 1.7 the documentation is not worth building.
3335 (home-page "https://github.com/jaraco/rst.linker")
3336 (synopsis "Sphinx plugin to add links and timestamps")
3337 (description "rst.linker allows to automatically replace text by a
3338reStructuredText external reference or timestamps. It's primary purpose is to
3339augment the changelog, but it can be used for other documents, too.")
3340 (license license:expat)))
3341
3342(define-public python2-rst.linker
3343 (package-with-python2 python-rst.linker))
3344
3345(define-public python-feedgenerator
3346 (package
3347 (name "python-feedgenerator")
3348 (version "1.9")
3349 (source
3350 (origin
3351 (method url-fetch)
3352 (uri (pypi-uri "feedgenerator" version))
3353 (sha256
3354 (base32
3355 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3356 (modules '((guix build utils)))
3357 (snippet
3358 '(begin
3359 ;; Remove pre-compiled .pyc files from source.
3360 (for-each delete-file-recursively
3361 (find-files "." "__pycache__" #:directories? #t))
3362 (for-each delete-file (find-files "." "\\.pyc$"))
3363 #t))))
3364 (build-system python-build-system)
3365 (propagated-inputs
3366 `(("python-pytz" ,python-pytz)
3367 ("python-six" ,python-six)))
3368 (home-page "https://github.com/getpelican/feedgenerator")
3369 (synopsis
3370 "Standalone version of Django's Atom/RSS feed generator")
3371 (description
3372 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3373which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3374 (license license:bsd-3)))
3375
3376(define-public python2-feedgenerator
3377 (package-with-python2 python-feedgenerator))
3378
3379(define-public python-toml
3380 (package
3381 (name "python-toml")
3382 (version "0.9.4")
3383 (source
3384 (origin
3385 (method url-fetch)
3386 (uri (pypi-uri "toml" version))
3387 (sha256
3388 (base32
3389 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3390 (build-system python-build-system)
3391 (arguments
3392 `(#:tests? #f)) ;no tests suite in release
3393 (home-page "https://github.com/uiri/toml")
3394 (synopsis "Library for TOML")
3395 (description
3396 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3397Language (TOML) configuration files.")
3398 (license license:expat)))
3399
346c8752
BG
3400(define-public python-jsonrpc-server
3401 (package
3402 (name "python-jsonrpc-server")
d6cf4c6e 3403 (version "0.3.2")
346c8752
BG
3404 (source
3405 (origin
3406 (method url-fetch)
3407 (uri (pypi-uri "python-jsonrpc-server" version))
3408 (sha256
3409 (base32
d6cf4c6e 3410 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
346c8752
BG
3411 (build-system python-build-system)
3412 (propagated-inputs
3413 `(("python-future" ,python-future)
3414 ("python-mock" ,python-mock)
d6cf4c6e
BG
3415 ("python-pytest" ,python-pytest)
3416 ("python-ujson" ,python-ujson)))
346c8752
BG
3417 (home-page
3418 "https://github.com/palantir/python-jsonrpc-server")
3419 (synopsis "JSON RPC 2.0 server library")
3420 (description
1df5407c 3421 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3422 (license license:expat)))
3423
56f4ad47
BG
3424(define-public python-pydocstyle
3425 (package
3426 (name "python-pydocstyle")
3427 (version "3.0.0")
3428 (source
3429 (origin
3430 (method url-fetch)
3431 (uri (pypi-uri "pydocstyle" version))
3432 (sha256
3433 (base32
3434 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3435 (build-system python-build-system)
3436 (propagated-inputs
3437 `(("python-six" ,python-six)
3438 ("python-snowballstemmer" ,python-snowballstemmer)))
3439 (home-page
3440 "https://github.com/PyCQA/pydocstyle/")
3441 (synopsis "Python docstring style checker")
3442 (description
3443 "This package provides a style checker for the Python Language
3444Server (PLS).")
3445 (license license:expat)))
3446
be4d840c 3447(define-public python-language-server
808dd2d0
BL
3448 (package
3449 (name "python-language-server")
a42f1420 3450 (version "0.31.7")
808dd2d0
BL
3451 (source
3452 (origin
3453 (method url-fetch)
3454 (uri (pypi-uri "python-language-server" version))
3455 (sha256
3456 (base32
a42f1420 3457 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
808dd2d0
BL
3458 (build-system python-build-system)
3459 (propagated-inputs
3460 `(("python-pluggy" ,python-pluggy)
3461 ("python-jsonrpc-server" ,python-jsonrpc-server)
3462 ("python-jedi" ,python-jedi)
3463 ("python-yapf" ,python-yapf)
3464 ("python-pyflakes" ,python-pyflakes)
3465 ("python-pydocstyle" ,python-pydocstyle)
3466 ("python-pycodestyle" ,python-pycodestyle)
3467 ("python-mccabe" ,python-mccabe)
3468 ("python-rope" ,python-rope)
3469 ("python-autopep8" ,python-autopep8)
3470 ("python-flake8" ,python-flake8)
3471 ("python-pylint" ,python-pylint)))
3472 (home-page "https://github.com/palantir/python-language-server")
3473 (synopsis "Python implementation of the Language Server Protocol")
3474 (description
3475 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3476language specification for the Language Server Protocol (LSP). This tool is
3477used in text editing environments to provide a complete and integrated
3478feature-set for programming Python effectively.")
808dd2d0 3479 (license license:expat)))
be4d840c 3480
c777ecb3
RW
3481(define-public python-pathspec
3482 (package
3483 (name "python-pathspec")
3484 (version "0.7.0")
3485 (source
3486 (origin
3487 (method url-fetch)
3488 (uri (pypi-uri "pathspec" version))
3489 (sha256
3490 (base32
3491 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
3492 (build-system python-build-system)
3493 (home-page "https://github.com/cpburnz/python-path-specification")
3494 (synopsis "Utility library for gitignore style pattern matching of file paths")
3495 (description
3496 "This package provides a utility library for gitignore style pattern
3497matching of file paths.")
3498 (license license:mpl2.0)))
3499
44d10b1f
RW
3500(define-public python-black
3501 (package
3502 (name "python-black")
5f603fab 3503 (version "19.10b0")
44d10b1f
RW
3504 (source
3505 (origin
3506 (method url-fetch)
3507 (uri (pypi-uri "black" version))
3508 (sha256
3509 (base32
5f603fab 3510 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
44d10b1f
RW
3511 (build-system python-build-system)
3512 (arguments
3513 `(#:phases
3514 (modify-phases %standard-phases
3515 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3516 (lambda _
3517 (let ((python3 (which "python3")))
3518 (substitute* '("tests/data/fmtonoff.py"
3519 "tests/data/string_prefixes.py"
5f603fab
RW
3520 "tests/data/function.py"
3521 "tests/data/python37.py")
44d10b1f
RW
3522 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3523 (string-append "#!" python3 (if (string? minor-version)
3524 minor-version
5f603fab
RW
3525 "")))))
3526 #t))
3527 (add-after 'unpack 'disable-broken-tests
3528 (lambda _
3529 ;; These tests are supposed to be skipped when the blackd
3530 ;; dependencies are missing, but this doesn't quite work.
3531 (substitute* "tests/test_black.py"
3532 (("( *)class BlackDTestCase.*" match indent)
3533 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
3534 indent "class BlackDTestCase(unittest.TestCase):\n"))
3535 (("web.Application") "False")
3536 (("@unittest_run_loop") ""))
3537
3538 ;; Patching the above file breaks the self test
3539 (substitute* "tests/test_black.py"
3540 (("( *)def test_self" match indent)
3541 (string-append indent "@unittest.skip(\"guix\")\n" match)))
3542 #t)))))
44d10b1f
RW
3543 (propagated-inputs
3544 `(("python-click" ,python-click)
3545 ("python-attrs" ,python-attrs)
3546 ("python-appdirs" ,python-appdirs)
5f603fab
RW
3547 ("python-pathspec" ,python-pathspec)
3548 ("python-regex" ,python-regex)
3549 ("python-toml" ,python-toml)
3550 ("python-typed-ast" ,python-typed-ast)))
3551 (native-inputs
3552 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
3553 (home-page "https://github.com/ambv/black")
3554 (synopsis "The uncompromising code formatter")
3555 (description "Black is the uncompromising Python code formatter.")
3556 (license license:expat)))
3557
3558(define-public python-blinker
3559 (package
3560 (name "python-blinker")
3561 (version "1.4")
3562 (source
3563 (origin
3564 (method url-fetch)
3565 (uri (pypi-uri "blinker" version))
3566 (sha256
3567 (base32
3568 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3569 (build-system python-build-system)
d46646d9 3570 (home-page "https://pythonhosted.org/blinker/")
44d10b1f
RW
3571 (synopsis "Fast, simple object-to-object and broadcast signaling")
3572 (description
3573 "Blinker provides a fast dispatching system that allows any number of
3574interested parties to subscribe to events, or \"signals\".")
3575 (license license:expat)))
3576
3577(define-public python2-blinker
3578 (package-with-python2 python-blinker))
3579
3580(define-public pelican
3581 (package
3582 (name "pelican")
fa9e3b5e 3583 (version "4.2.0")
44d10b1f
RW
3584 (source
3585 (origin
3586 (method url-fetch)
3587 (uri (pypi-uri "pelican" version))
3588 (sha256
3589 (base32
fa9e3b5e 3590 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
44d10b1f
RW
3591 (build-system python-build-system)
3592 (propagated-inputs
fa9e3b5e
VC
3593 `(("python-blinker" ,python-blinker)
3594 ("python-dateutil" ,python-dateutil)
3595 ("python-docutils" ,python-docutils)
3596 ("python-feedgenerator" ,python-feedgenerator)
44d10b1f 3597 ("python-jinja2" ,python-jinja2)
fa9e3b5e 3598 ("python-markdown" ,python-markdown)
44d10b1f 3599 ("python-pygments" ,python-pygments)
44d10b1f 3600 ("python-pytz" ,python-pytz)
44d10b1f 3601 ("python-six" ,python-six)
fa9e3b5e 3602 ("python-unidecode" ,python-unidecode)))
44d10b1f
RW
3603 (home-page "https://getpelican.com/")
3604 (arguments
3605 `(;; XXX Requires a lot more packages to do unit tests :P
fa9e3b5e 3606 #:tests? #f))
44d10b1f
RW
3607 (synopsis "Python-based static site publishing system")
3608 (description
3609 "Pelican is a tool to generate a static blog from reStructuredText,
3610Markdown input files, and more. Pelican uses Jinja2 for templating
3611and is very extensible.")
3612 (license license:agpl3+)))
3613
8c141421
JH
3614(define-public mallard-ducktype
3615 (package
3616 (name "mallard-ducktype")
12cc3da5 3617 (version "1.0.2")
8c141421
JH
3618 (source
3619 (origin
3620 (method git-fetch)
12cc3da5
JH
3621 ;; git-reference because tests are not included in pypi source tarball
3622 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3623 (uri (git-reference
3624 (url "https://github.com/projectmallard/mallard-ducktype.git")
3625 (commit version)))
3626 (file-name (git-file-name name version))
3627 (sha256
3628 (base32
12cc3da5 3629 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3630 (build-system python-build-system)
5246655f
EF
3631 (arguments
3632 '(#:phases
3633 (modify-phases %standard-phases
3634 (replace 'check
3635 (lambda _
3636 (with-directory-excursion "tests"
3637 (invoke "sh" "runtests")))))))
8c141421
JH
3638 (home-page "http://projectmallard.org")
3639 (synopsis "Convert Ducktype to Mallard documentation markup")
3640 (description
3641 "Ducktype is a lightweight syntax that can represent all the semantics
3642of the Mallard XML documentation system. Ducktype files can be converted to
3643Mallard using the @command{ducktype} tool. The yelp-tools package
3644provides additional functionality on the produced Mallard documents.")
3645 (license license:expat)))
3646
44d10b1f
RW
3647(define-public python-cython
3648 (package
3649 (name "python-cython")
3220e44f 3650 (version "0.29.15")
44d10b1f
RW
3651 (source
3652 (origin
3653 (method url-fetch)
3654 (uri (pypi-uri "Cython" version))
3655 (sha256
6fd27a71 3656 (base32
3220e44f 3657 "0c5cjyxfvba6c0vih1fvhywp8bpz30vwvbjqdm1q1k55xzhmkn30"))))
44d10b1f
RW
3658 (build-system python-build-system)
3659 ;; we need the full python package and not just the python-wrapper
3660 ;; because we need libpython3.3m.so
3661 (inputs
3662 `(("python" ,python)))
3663 (arguments
3664 `(#:phases
3665 (modify-phases %standard-phases
3666 (add-before 'check 'set-HOME
3667 ;; some tests require access to "$HOME/.cython"
3668 (lambda _ (setenv "HOME" "/tmp") #t))
44d10b1f
RW
3669 (replace 'check
3670 (lambda _
e9194eb0
MB
3671 ;; Disable compiler optimizations to greatly reduce the running
3672 ;; time of the test suite.
3673 (setenv "CFLAGS" "-O0")
3674
3675 (invoke "python" "runtests.py" "-vv"
3676 "-j" (number->string (parallel-job-count))))))))
f319409b 3677 (home-page "https://cython.org/")
44d10b1f
RW
3678 (synopsis "C extensions for Python")
3679 (description "Cython is an optimising static compiler for both the Python
3680programming language and the extended Cython programming language. It makes
3681writing C extensions for Python as easy as Python itself.")
3682 (license license:asl2.0)
3683 (properties `((python2-variant . ,(delay python2-cython))))))
3684
3685(define-public python2-cython
da460865
MB
3686 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3687 (package
3688 (inherit base)
3689 (name "python2-cython")
3690 (inputs
3691 `(("python-2" ,python-2))) ;this is not automatically changed
3692 (arguments
3693 (substitute-keyword-arguments (package-arguments base)
3694 ((#:phases phases)
3695 `(modify-phases ,phases
baab9eef
MB
3696 ;; XXX: On i686-linux, running the parallel tests fails on many-core
3697 ;; systems, see <https://github.com/cython/cython/issues/2807>.
3698 ;; TODO: Move this logic to the regular check phase in a future
3699 ;; rebuild cycle.
3700 ,@(if (string-prefix? "i686" (%current-system))
3701 '((replace 'check
3702 (lambda _
3703 (setenv "CFLAGS" "-O0")
3704 (invoke "python" "runtests.py" "-vv"
3705 "-j" (number->string (parallel-job-count))
3706 "-x" "run.parallel"))))
3707 '())
da460865
MB
3708 (add-before 'check 'adjust-test_embed
3709 (lambda _
3710 (substitute* "runtests.py"
3711 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3712 ;; so it can give the right -L flag to GCC when embedding static
3713 ;; builds of Python. It is unaware that the Python "config"
3714 ;; directory (where the static library lives) was renamed in
3715 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3716 ;; which works fine, because that is where the shared library is.
3717 ;;
3718 ;; It also appears to be unaware that the Makefile in Demos/embed
3719 ;; already unconditionally pass the static library location to GCC,
3720 ;; after checking sysconfig.get_config_var('LIBPL).
3721 ;;
3722 ;; The effect is that the linker is unable to resolve libexpat
3723 ;; symbols when building for Python 2, because neither the Python 2
3724 ;; shared library nor Expat is available. To fix it, we can either
3725 ;; add Expat as an input and make it visible to the linker, or just
3726 ;; prevent it from overriding the Python shared library location.
3727 ;; The end result is identical, so we take the easy route.
3728 ((" or libname not in os\\.listdir\\(libdir\\)")
3729 ""))
3730 #t)))))))))
44d10b1f
RW
3731
3732;; The RPython toolchain currently does not support Python 3.
3733(define-public python2-rpython
3734 (package
3735 (name "python2-rpython")
3736 (version "0.2.1")
3737 (source
3738 (origin
3739 (method url-fetch)
3740 (uri (pypi-uri "rpython" version))
3741 (sha256
3742 (base32
3743 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3744 (build-system python-build-system)
3745 (arguments `(#:python ,python-2))
3746 (native-inputs
3747 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3748 (home-page "https://rpython.readthedocs.org")
3749 (synopsis "Framework for implementing interpreters and virtual machines")
3750 (description "RPython is a translation and support framework for
3751producing implementations of dynamic languages, emphasizing a clean separation
3752between language specification and implementation aspects.")
3753 (license license:expat)))
3754
3755;; NOTE: when upgrading numpy please make sure that python-pandas and
3756;; python-scipy still build, as these three packages are often used together.
3757(define-public python-numpy
3758 (package
3759 (name "python-numpy")
8e5fbd5d 3760 (version "1.17.3")
44d10b1f
RW
3761 (source
3762 (origin
3763 (method url-fetch)
3764 (uri (string-append
3765 "https://github.com/numpy/numpy/releases/download/v"
3766 version "/numpy-" version ".tar.gz"))
3767 (sha256
3768 (base32
8e5fbd5d 3769 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3770 (build-system python-build-system)
3771 (inputs
3772 `(("openblas" ,openblas)
3773 ("lapack" ,lapack)))
3774 (native-inputs
3775 `(("python-cython" ,python-cython)
3776 ("python-pytest" ,python-pytest)
3777 ("gfortran" ,gfortran)))
3778 (arguments
3779 `(#:phases
3780 (modify-phases %standard-phases
3781 (add-before 'build 'configure-blas-lapack
3782 (lambda* (#:key inputs #:allow-other-keys)
3783 (call-with-output-file "site.cfg"
3784 (lambda (port)
3785 (format port
3786 "[openblas]
3787libraries = openblas
3788library_dirs = ~a/lib
3789include_dirs = ~a/include
3790
3791# backslash-n to make emacs happy
3792\n[lapack]
3793lapack_libs = lapack
3794library_dirs = ~a/lib
3795include_dirs = ~a/include
3796"
3797 (assoc-ref inputs "openblas")
3798 (assoc-ref inputs "openblas")
3799 (assoc-ref inputs "lapack")
3800 (assoc-ref inputs "lapack"))))
3801 #t))
3802 (add-before 'build 'fix-executable-paths
3803 (lambda* (#:key inputs #:allow-other-keys)
3804 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3805 ;; instead of /bin/sh.
3806 (substitute* "numpy/distutils/exec_command.py"
3807 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3808 (string-append match-start (assoc-ref inputs "bash") match-end)))
3809 ;; Use "gcc" executable, not "cc".
3810 (substitute* "numpy/distutils/system_info.py"
3811 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3812 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3813 #t))
3814 ;; Tests can only be run after the library has been installed and not
3815 ;; within the source directory.
3816 (delete 'check)
3817 (add-after 'install 'check
3818 (lambda* (#:key outputs inputs #:allow-other-keys)
3819 ;; Make installed package available for running the tests
3820 (add-installed-pythonpath inputs outputs)
3821 ;; Make sure "f2py" etc is found.
3822 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3823 ":" (getenv "PATH")))
3824 (with-directory-excursion "/tmp"
3825 (invoke "python" "-c"
3826 "import numpy; numpy.test(verbose=2)")))))))
28191bdc 3827 (home-page "https://numpy.org")
44d10b1f
RW
3828 (synopsis "Fundamental package for scientific computing with Python")
3829 (description "NumPy is the fundamental package for scientific computing
3830with Python. It contains among other things: a powerful N-dimensional array
3831object, sophisticated (broadcasting) functions, tools for integrating C/C++
3832and Fortran code, useful linear algebra, Fourier transform, and random number
3833capabilities.")
adb396ea 3834 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3835 (license license:bsd-3)))
3836
adb396ea 3837;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3838(define-public python2-numpy
adb396ea
MB
3839 (let ((numpy (package-with-python2
3840 (strip-python2-variant python-numpy))))
3841 (package/inherit
3842 numpy
3843 (version "1.16.5")
3844 (source (origin
3845 (method url-fetch)
3846 (uri (string-append
3847 "https://github.com/numpy/numpy/releases/download/v"
3848 version "/numpy-" version ".tar.gz"))
3849 (sha256
3850 (base32
3851 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3852
3853;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3854;; interest only for legacy code going back to NumPy's predecessor
3855;; Numeric.
3856(define-public python2-numpy-1.8
3857 (package (inherit python2-numpy)
3858 (version "1.8.2")
3859 (source
3860 (origin
6b61fc47
EF
3861 (method git-fetch)
3862 (uri (git-reference
3863 (url "https://github.com/numpy/numpy")
3864 (commit (string-append "v" version))))
3865 (file-name (git-file-name "numpy" version))
44d10b1f
RW
3866 (sha256
3867 (base32
6b61fc47 3868 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
44d10b1f
RW
3869 (arguments
3870 (substitute-keyword-arguments (package-arguments python2-numpy)
3871 ((#:phases phases)
3872 `(modify-phases ,phases
3873 (replace 'configure-blas-lapack
3874 (lambda* (#:key inputs #:allow-other-keys)
3875 (call-with-output-file "site.cfg"
3876 (lambda (port)
3877 (format port
3878 "[openblas]
3879libraries = openblas,lapack
3880library_dirs = ~a/lib:~a/lib
3881include_dirs = ~a/include:~a/include
3882"
3883 (assoc-ref inputs "openblas")
3884 (assoc-ref inputs "lapack")
3885 (assoc-ref inputs "openblas")
3886 (assoc-ref inputs "lapack"))))
3887 #t))))))
3888 (native-inputs
3889 `(("python2-nose" ,python2-nose)))
3890 (description "NumPy is the fundamental package for scientific computing
3891with Python. It contains among other things: a powerful N-dimensional array
3892object, sophisticated (broadcasting) functions, tools for integrating C/C++
3893and Fortran code, useful linear algebra, Fourier transform, and random number
3894capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3895that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3896Numeric.")
3897 (license license:bsd-3)))
3898
3899(define-public python-munch
3900 (package
3901 (name "python-munch")
3902 (version "2.0.4")
3903 (source
3904 (origin
3905 (method url-fetch)
3906 (uri (pypi-uri "munch" version))
3907 (sha256
3908 (base32
3909 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3910 (build-system python-build-system)
3911 (home-page "https://github.com/Infinidat/munch")
3912 (synopsis "Dot-accessible dictionary")
3913 (description "Munch is a dot-accessible dictionary similar to JavaScript
3914objects.")
3915 (license license:expat)))
3916
3917(define-public python2-munch
3918 (package-with-python2 python-munch))
3919
3920(define-public python-colormath
3921 (package
3922 (name "python-colormath")
3923 (version "3.0.0")
3924 (source
3925 (origin
3926 (method url-fetch)
3927 (uri (pypi-uri "colormath" version))
3928 (sha256
3929 (base32
3930 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3931 (build-system python-build-system)
3932 (propagated-inputs
3933 `(("python-networkx" ,python-networkx)
3934 ("python-numpy" ,python-numpy)))
3935 (home-page "https://github.com/gtaylor/python-colormath")
3936 (synopsis "Color math and conversion library")
3937 (description
3938 "This is a Python library for color math and conversions.")
3939 (license license:bsd-3)))
3940
3941(define-public python2-colormath
3942 (package-with-python2 python-colormath))
3943
3944(define-public python-spectra
3945 (package
3946 (name "python-spectra")
3947 (version "0.0.11")
3948 (source
3949 (origin
3950 (method url-fetch)
3951 (uri (pypi-uri "spectra" version))
3952 (sha256
3953 (base32
3954 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3955 (build-system python-build-system)
3956 (arguments
3957 `(#:phases
3958 (modify-phases %standard-phases
3959 (replace 'check
38ec0f6a 3960 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3961 (propagated-inputs
3962 `(("python-colormath" ,python-colormath)))
3963 (native-inputs
3964 `(("python-nose" ,python-nose)))
3965 (home-page "https://github.com/jsvine/spectra")
3966 (synopsis "Color scales and color conversion")
3967 (description
3968 "This package provides a Python library intended to make color math,
3969color scales, and color space conversion easy. It has support for:
3970
3971@enumerate
3972@item Color scales
3973@item Color ranges
3974@item Color blending
3975@item Brightening/darkening colors
3976@item Saturating/desaturating colors
3977@item Conversion to/from multiple color spaces.
3978@end enumerate\n")
3979 (license license:expat)))
3980
3981(define-public python2-spectra
3982 (package-with-python2 python-spectra))
3983
3984(define-public python-numpy-documentation
3985 (package
3986 (name "python-numpy-documentation")
3987 (version (package-version python-numpy))
3988 (source (package-source python-numpy))
3989 (build-system python-build-system)
3990 (native-inputs
3991 `(("python-matplotlib" ,python-matplotlib)
3992 ("python-numpy" ,python-numpy)
3993 ("pkg-config" ,pkg-config)
3994 ("python-sphinx" ,python-sphinx)
3995 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3996 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3997 texlive-fonts-ec
3998 texlive-generic-ifxetex
3999 texlive-generic-pdftex
f75aa97f 4000 texlive-amsfonts
44d10b1f
RW
4001 texlive-latex-capt-of
4002 texlive-latex-cmap
4003 texlive-latex-environ
4004 texlive-latex-eqparbox
4005 texlive-latex-etoolbox
4006 texlive-latex-expdlist
4007 texlive-latex-fancyhdr
4008 texlive-latex-fancyvrb
4009 texlive-latex-fncychap
4010 texlive-latex-float
4011 texlive-latex-framed
4012 texlive-latex-geometry
4013 texlive-latex-graphics
4014 texlive-latex-hyperref
4015 texlive-latex-mdwtools
4016 texlive-latex-multirow
4017 texlive-latex-needspace
4018 texlive-latex-oberdiek
4019 texlive-latex-parskip
4020 texlive-latex-preview
4021 texlive-latex-tabulary
4022 texlive-latex-threeparttable
4023 texlive-latex-titlesec
4024 texlive-latex-trimspaces
4025 texlive-latex-ucs
4026 texlive-latex-upquote
4027 texlive-latex-url
4028 texlive-latex-varwidth
4029 texlive-latex-wrapfig)))
4030 ("texinfo" ,texinfo)
4031 ("perl" ,perl)
4032 ("scipy-sphinx-theme"
4033 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4034 (method git-fetch)
4035 (uri (git-reference
4036 (url "https://github.com/scipy/scipy-sphinx-theme.git")
4037 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4038 (sha256
4039 (base32
4040 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4041 ,@(package-native-inputs python-numpy)))
4042 (arguments
4043 `(#:tests? #f ; we're only generating the documentation
4044 #:phases
4045 (modify-phases %standard-phases
4046 (delete 'build)
4047 (replace 'install
4048 (lambda* (#:key inputs outputs #:allow-other-keys)
4049 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4050 (doc (string-append
4051 data "/doc/" ,name "-"
4052 ,(package-version python-numpy)))
4053 (info-reader (string-append data "/info"))
4054 (html (string-append doc "/html"))
4055 (scipy-sphinx-theme "scipy-sphinx-theme")
4056 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4057 (pyver ,(string-append "PYVER=")))
4058
4059 ;; FIXME: this is needed to for texlive-union to generate
4060 ;; fonts, which are not found.
4061 (setenv "HOME" "/tmp")
4062
4063 (with-directory-excursion "doc"
4064 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4065 (mkdir-p html)
4fc898da
RW
4066 (invoke "make" "html" pyver)
4067 (invoke "make" "latex" "PAPER=a4" pyver)
4068 (invoke "make" "-C" "build/latex"
44d10b1f
RW
4069 "all-pdf" "PAPER=a4" pyver)
4070 ;; FIXME: Generation of the info file fails.
4fc898da 4071 ;; (invoke "make" "info" pyver)
44d10b1f
RW
4072 ;; (mkdir-p info)
4073 ;; (copy-file "build/texinfo/numpy.info"
4074 ;; (string-append info "/numpy.info"))
4075 (for-each (lambda (file)
4076 (copy-file (string-append "build/latex" file)
4077 (string-append doc file)))
4078 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4079 (with-directory-excursion "build/html"
4080 (for-each (lambda (file)
4081 (let* ((dir (dirname file))
4082 (tgt-dir (string-append html "/" dir)))
4083 (unless (equal? "." dir)
4084 (mkdir-p tgt-dir))
4085 (install-file file html)))
4086 (find-files "." ".*")))))
4087 #t)))))
4088 (home-page (package-home-page python-numpy))
4089 (synopsis "Documentation for the python-numpy package")
4090 (description (package-description python-numpy))
4091 (license (package-license python-numpy))))
4092
4093(define-public python2-numpy-documentation
4094 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4095 (package
4096 (inherit numpy-documentation)
4097 (native-inputs `(("python2-functools32" ,python2-functools32)
4098 ,@(package-native-inputs numpy-documentation))))))
4099
4100(define-public python-pygit2
4101 (package
4102 (name "python-pygit2")
7154f5ef 4103 (version "1.1.0")
44d10b1f
RW
4104 (source
4105 (origin
4106 (method url-fetch)
4107 (uri (pypi-uri "pygit2" version))
4108 (sha256
7154f5ef 4109 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
44d10b1f
RW
4110 (build-system python-build-system)
4111 (arguments
c3ecab0d 4112 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f 4113 (propagated-inputs
7154f5ef 4114 `(("python-cached-property" ,python-cached-property)
44d10b1f 4115 ("python-cffi" ,python-cffi)
7154f5ef 4116 ("libgit2" ,libgit2)))
44d10b1f
RW
4117 (native-inputs
4118 `(("python-pytest" ,python-pytest)))
4119 (home-page "https://github.com/libgit2/pygit2")
4120 (synopsis "Python bindings for libgit2")
4121 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4122library, libgit2 implements Git plumbing.")
4123 ;; GPL2.0 only, with linking exception.
4124 (license license:gpl2)))
4125
44d10b1f
RW
4126(define-public python-pyparsing
4127 (package
4128 (name "python-pyparsing")
6d3cff5a 4129 (version "2.3.1")
44d10b1f
RW
4130 (source
4131 (origin
4132 (method url-fetch)
4133 (uri (pypi-uri "pyparsing" version))
4134 (sha256
6d3cff5a 4135 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
4136 (build-system python-build-system)
4137 (outputs '("out" "doc"))
4138 (arguments
4139 `(#:tests? #f ; no test target
4140 #:phases
4141 (modify-phases %standard-phases
4142 (add-after 'install 'install-doc
4143 (lambda* (#:key outputs #:allow-other-keys)
4144 (let* ((doc (string-append (assoc-ref outputs "doc")
4145 "/share/doc/" ,name "-" ,version))
4146 (html-doc (string-append doc "/html"))
4147 (examples (string-append doc "/examples")))
4148 (mkdir-p html-doc)
4149 (mkdir-p examples)
4150 (for-each
4151 (lambda (dir tgt)
4152 (map (lambda (file)
4153 (install-file file tgt))
4154 (find-files dir ".*")))
4155 (list "docs" "htmldoc" "examples")
4156 (list doc html-doc examples))
4157 #t))))))
4158 (home-page "https://github.com/pyparsing/pyparsing")
4159 (synopsis "Python parsing class library")
4160 (description
4161 "The pyparsing module is an alternative approach to creating and
4162executing simple grammars, vs. the traditional lex/yacc approach, or the use
4163of regular expressions. The pyparsing module provides a library of classes
4164that client code uses to construct the grammar directly in Python code.")
4165 (license license:expat)))
4166
4167(define-public python2-pyparsing
4168 (package-with-python2 python-pyparsing))
4169
4170(define-public python-numpydoc
4171 (package
4172 (name "python-numpydoc")
4173 (version "0.8.0")
4174 (source
4175 (origin
4176 (method url-fetch)
4177 (uri (pypi-uri "numpydoc" version))
4178 (sha256
4179 (base32
4180 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4181 (build-system python-build-system)
4182 (propagated-inputs
4183 `(("python-sphinx" ,python-sphinx)))
4184 (native-inputs
4185 `(("python-nose" ,python-nose)))
e85af137 4186 (home-page "https://pypi.org/project/numpydoc/")
44d10b1f
RW
4187 (synopsis
4188 "Numpy's Sphinx extensions")
4189 (description
4190 "Sphinx extension to support docstrings in Numpy format.")
4191 (license license:bsd-2)))
4192
4193(define-public python2-numpydoc
4194 (package-with-python2 python-numpydoc))
4195
4196(define-public python-numexpr
4197 (package
4198 (name "python-numexpr")
4199 (version "2.6.5")
4200 (source
4201 (origin
4202 (method url-fetch)
4203 (uri (pypi-uri "numexpr" version))
4204 (sha256
4205 (base32
4206 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4207 (build-system python-build-system)
4208 (arguments `(#:tests? #f)) ; no tests included
4209 (propagated-inputs
4210 `(("python-numpy" ,python-numpy)))
4211 (home-page "https://github.com/pydata/numexpr")
4212 (synopsis "Fast numerical expression evaluator for NumPy")
4213 (description
4214 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4215expressions that operate on arrays are accelerated and use less memory than
4216doing the same calculation in Python. In addition, its multi-threaded
4217capabilities can make use of all your cores, which may accelerate
4218computations, most specially if they are not memory-bounded (e.g. those using
4219transcendental functions).")
4220 (license license:expat)))
4221
4222(define-public python2-numexpr
4223 (package-with-python2 python-numexpr))
4224
4225(define-public python-cycler
4226 (package
4227 (name "python-cycler")
4228 (version "0.10.0")
4229 (source (origin
4230 (method url-fetch)
4231 (uri (pypi-uri "cycler" version))
4232 (sha256
4233 (base32
4234 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4235 (build-system python-build-system)
4236 (arguments
4237 ;; XXX: The current version requires 'coveralls' which we don't have.
4238 ;; Enable this for the next release which uses 'python-pytest'.
4239 '(#:tests? #f))
4240 (propagated-inputs
4241 `(("python-six" ,python-six)))
4242 (home-page "http://matplotlib.org/cycler/")
4243 (synopsis "Composable keyword argument iterator")
4244 (description
4245 "When using @code{matplotlib} and plotting more than one line, it is
4246common to want to be able to want to be able to cycle over one or more artist
4247styles; but the plotting logic can quickly become involved.
4248To address this and enable easy cycling over arbitrary @code{kwargs}, the
4249@code{Cycler} class was developed.")
4250 (license license:bsd-3)))
4251
4252(define-public python2-cycler
4253 (package-with-python2 python-cycler))
4254
4255(define-public python-colorspacious
4256 (package
4257 (name "python-colorspacious")
53a3ebed 4258 (version "1.1.2")
44d10b1f 4259 (source
dee92e65
TGR
4260 (origin
4261 (method git-fetch)
4262 (uri (git-reference
4263 (url "https://github.com/njsmith/colorspacious.git")
4264 (commit (string-append "v" version))))
4265 (file-name (git-file-name name version))
4266 (sha256
53a3ebed 4267 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
4268 (build-system python-build-system)
4269 (propagated-inputs
4270 `(("python-numpy" ,python-numpy)))
4271 (native-inputs
4272 `(("python-nose" ,python-nose)))
4273 (arguments
4274 `(#:phases
4275 (modify-phases %standard-phases
4276 (replace 'check
4277 (lambda _
c988afda 4278 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
4279 (home-page "https://github.com/njsmith/colorspacious")
4280 (synopsis "Python library for colorspace conversions")
4281 (description "@code{colorspacious} is a Python library that lets you
4282convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4283 (license license:expat)))
4284
4285(define-public python2-colorspacious
4286 (package-with-python2 python-colorspacious))
4287
4288(define-public python-matplotlib
4289 (package
4290 (name "python-matplotlib")
9e7cb2f1 4291 (version "3.1.2")
44d10b1f
RW
4292 (source
4293 (origin
4294 (method url-fetch)
4295 (uri (pypi-uri "matplotlib" version))
4296 (sha256
4297 (base32
9e7cb2f1 4298 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
4299 (build-system python-build-system)
4300 (propagated-inputs ; the following packages are all needed at run time
4301 `(("python-cycler" ,python-cycler)
4302 ("python-kiwisolver" ,python-kiwisolver)
4303 ("python-pyparsing" ,python-pyparsing)
4304 ("python-pygobject" ,python-pygobject)
4305 ("gobject-introspection" ,gobject-introspection)
4306 ("python-tkinter" ,python "tk")
4307 ("python-dateutil" ,python-dateutil)
4308 ("python-numpy" ,python-numpy)
4309 ("python-pillow" ,python-pillow)
4310 ("python-pytz" ,python-pytz)
4311 ("python-six" ,python-six)
44d10b1f
RW
4312 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4313 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4314 ;; object. For this reason we need to import both libraries.
5ea654cf 4315 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 4316 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
4317 ("python-cairocffi" ,python-cairocffi)))
4318 (inputs
4319 `(("libpng" ,libpng)
4320 ("imagemagick" ,imagemagick)
4321 ("freetype" ,freetype)
4322 ("cairo" ,cairo)
4323 ("glib" ,glib)
4324 ;; FIXME: Add backends when available.
4325 ;("python-wxpython" ,python-wxpython)
4326 ("tcl" ,tcl)
4327 ("tk" ,tk)))
4328 (native-inputs
4329 `(("pkg-config" ,pkg-config)
5ea654cf
RW
4330 ("python-pytest" ,python-pytest)
4331 ("python-mock" ,python-mock)
4332 ("unzip" ,unzip)
4333 ("jquery-ui"
4334 ,(origin
4335 (method url-fetch)
4336 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4337 (sha256
4338 (base32
4339 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
4340 (arguments
4341 `(#:phases
4342 (modify-phases %standard-phases
5ea654cf
RW
4343 ;; XXX We disable all image comparison tests because we're using a
4344 ;; newer version of FreeType than matplotlib expects. This leads to
4345 ;; minor differences throughout the tests.
4346 (add-after 'unpack 'fix-and-disable-failing-tests
4347 (lambda _
4348 (substitute* (append (find-files "lib/matplotlib/tests/"
4349 "test_.*\\.py$")
4350 (find-files "lib/mpl_toolkits/tests"
4351 "test_.*\\.py$"))
4352 (("^from matplotlib" match)
4353 (string-append "import pytest\n" match))
4354 (("( *)@image_comparison" match indent)
4355 (string-append indent
4356 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4357 match)))
4358 (substitute* "lib/matplotlib/tests/test_animation.py"
4359 (("/bin/sh") (which "sh")))
4360 (for-each delete-file
4361 ;; test_normal_axes, test_get_tightbbox_polar
4362 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
4363 ;; We don't use the webagg backend and this test forces it.
4364 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
4365 ;; test_outward_ticks
4366 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
4367 ;; test_hidden_axes fails with minor extent
4368 ;; differences, possibly due to the use of a
4369 ;; different version of FreeType.
4370 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
4371 ;; Fontconfig returns no fonts.
4372 "lib/matplotlib/tests/test_font_manager.py"))
4373 #t))
4374 (add-before 'install 'install-jquery-ui
4375 (lambda* (#:key outputs inputs #:allow-other-keys)
4376 (let ((dir (string-append (assoc-ref outputs "out")
4377 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4378 (mkdir-p dir)
4379 (invoke "unzip"
4380 (assoc-ref inputs "jquery-ui")
4381 "-d" dir))
4382 #t))
c09f598d 4383 (replace 'check
5ea654cf
RW
4384 (lambda* (#:key outputs inputs #:allow-other-keys)
4385 (add-installed-pythonpath inputs outputs)
4386 (invoke "python" "tests.py" "-v"
9e7cb2f1 4387 "-m" "not network and not webagg")))
44d10b1f
RW
4388 (add-before 'build 'configure-environment
4389 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
4390 (let ((cairo (assoc-ref inputs "cairo")))
4391 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 4392 ;; has not effect.
34c2a16b 4393 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
4394 (setenv "HOME" (getcwd))
4395 (call-with-output-file "setup.cfg"
4396 (lambda (port)
4397 (format port "[directories]~%
4398basedirlist = ~a,~a~%
5ea654cf
RW
4399[packages]~%
4400tests = True~%"
44d10b1f
RW
4401 (assoc-ref inputs "tcl")
4402 (assoc-ref inputs "tk")))))
4403 #t)))))
339b5828 4404 (home-page "https://matplotlib.org/")
44d10b1f
RW
4405 (synopsis "2D plotting library for Python")
4406 (description
4407 "Matplotlib is a Python 2D plotting library which produces publication
4408quality figures in a variety of hardcopy formats and interactive environments
4409across platforms. Matplotlib can be used in Python scripts, the python and
4410ipython shell, web application servers, and six graphical user interface
4411toolkits.")
4412 (license license:psfl)
4413 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4414
4415(define-public python2-matplotlib
4416 (let ((matplotlib (package-with-python2
4417 (strip-python2-variant python-matplotlib))))
4418 (package (inherit matplotlib)
7380df73 4419 (version "2.2.4")
5ea654cf
RW
4420 (source
4421 (origin
4422 (method url-fetch)
4423 (uri (pypi-uri "matplotlib" version))
4424 (sha256
4425 (base32
7380df73 4426 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4427 (arguments
4428 (substitute-keyword-arguments (package-arguments matplotlib)
4429 ((#:phases phases)
4430 `(modify-phases ,phases
66a3c2db
EF
4431 (replace 'install-jquery-ui
4432 (lambda* (#:key outputs inputs #:allow-other-keys)
4433 (let ((dir (string-append (assoc-ref outputs "out")
4434 "/lib/python2.7/site-packages/"
4435 "matplotlib/backends/web_backend/")))
4436 (mkdir-p dir)
4437 (invoke "unzip"
4438 (assoc-ref inputs "jquery-ui")
4439 "-d" dir))
4440 #t))
38a404d5 4441 (delete 'fix-and-disable-failing-tests)
5d484f42 4442 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4443 ;; Make sure to use special packages for Python 2 instead
4444 ;; of those automatically rewritten by package-with-python2.
4445 (propagated-inputs
4446 `(("python2-pycairo" ,python2-pycairo)
4447 ("python2-backports-functools-lru-cache"
4448 ,python2-backports-functools-lru-cache)
4449 ("python2-functools32" ,python2-functools32)
4450 ("python2-pygobject-2" ,python2-pygobject-2)
4451 ("python2-subprocess32" ,python2-subprocess32)
4452 ("python2-tkinter" ,python-2 "tk")
4453 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4454 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4455
4456(define-public python-matplotlib-documentation
4457 (package
4458 (name "python-matplotlib-documentation")
4459 (version (package-version python-matplotlib))
4460 (source (package-source python-matplotlib))
4461 (build-system python-build-system)
4462 (native-inputs
4463 `(("python-matplotlib" ,python-matplotlib)
4464 ("python-colorspacious" ,python-colorspacious)
4465 ("python-sphinx" ,python-sphinx)
5ad0a452 4466 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4467 ("python-sphinx-gallery" ,python-sphinx-gallery)
4468 ("python-numpydoc" ,python-numpydoc)
4469 ("python-ipython" ,python-ipython)
e7a53914 4470 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4471 ("python-mock" ,python-mock)
4472 ("graphviz" ,graphviz)
f75aa97f 4473 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4474 texlive-latex-amsmath
4475 texlive-latex-enumitem
4476 texlive-latex-expdlist
4477 texlive-latex-geometry
4478 texlive-latex-preview
4479 texlive-latex-type1cm
4480 texlive-latex-ucs
4481
4482 texlive-generic-pdftex
4483
e7a53914
RW
4484 texlive-fonts-ec
4485 texlive-fonts-adobe-times
4486 texlive-fonts-txfonts)))
44d10b1f
RW
4487 ("texinfo" ,texinfo)
4488 ,@(package-native-inputs python-matplotlib)))
4489 (arguments
4490 `(#:tests? #f ; we're only generating documentation
4491 #:phases
4492 (modify-phases %standard-phases
5ea654cf
RW
4493 ;; The tests in python-matplotlib are run after the install phase, so
4494 ;; we need to delete the extra phase here.
4495 (delete 'check)
44d10b1f
RW
4496 (replace 'build
4497 (lambda _
4498 (chdir "doc")
e7a53914
RW
4499 (setenv "PYTHONPATH"
4500 (string-append (getenv "PYTHONPATH")
4501 ":" (getcwd) "/../examples/units"))
44d10b1f 4502 (substitute* "conf.py"
e7a53914
RW
4503 ;; Don't use git.
4504 (("^SHA = check_output.*")
4505 (string-append "SHA = \"" ,version "\"\n"))
4506 ;; Don't fetch intersphinx files from the Internet
4507 (("^explicit_order_folders" m)
4508 (string-append "intersphinx_mapping = {}\n" m))
4509 (("'sphinx.ext.intersphinx',") "")
4510 ;; Disable URL embedding which requires internet access.
4511 (("'https://docs.scipy.org/doc/numpy'") "None")
4512 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4513 (invoke "make"
4514 "SPHINXBUILD=sphinx-build"
4515 "SPHINXOPTS=" ; don't abort on warnings
4516 "html" "texinfo")))
44d10b1f
RW
4517 (replace 'install
4518 (lambda* (#:key inputs outputs #:allow-other-keys)
4519 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4520 (doc (string-append data "/doc/python-matplotlib-" ,version))
4521 (info (string-append data "/info"))
4522 (html (string-append doc "/html")))
4523 (mkdir-p html)
4524 (mkdir-p info)
4525 (copy-recursively "build/html" html)
4526 (symlink (string-append html "/_images")
4527 (string-append info "/matplotlib-figures"))
4528 (with-directory-excursion "build/texinfo"
4529 (substitute* "matplotlib.texi"
4530 (("@image\\{([^,]*)" all file)
4531 (string-append "@image{matplotlib-figures/" file)))
4532 (symlink (string-append html "/_images")
4533 "./matplotlib-figures")
e7a53914
RW
4534 (invoke "makeinfo" "--no-split"
4535 "-o" "matplotlib.info" "matplotlib.texi"))
4536 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4537 #t)))))
4538 (home-page (package-home-page python-matplotlib))
4539 (synopsis "Documentation for the python-matplotlib package")
4540 (description (package-description python-matplotlib))
4541 (license (package-license python-matplotlib))))
4542
4543(define-public python2-matplotlib-documentation
5ad0a452
RW
4544 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4545 (package
4546 (inherit parent)
4547 (native-inputs
4548 (alist-delete "python-sphinx-copybutton"
4549 (package-native-inputs parent))))))
44d10b1f 4550
55dae98f
RW
4551(define-public python-matplotlib-venn
4552 (package
4553 (name "python-matplotlib-venn")
4554 (version "0.11.5")
4555 (source
4556 (origin
4557 (method url-fetch)
4558 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4559 (sha256
4560 (base32
4561 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4562 (build-system python-build-system)
4563 (arguments '(#:tests? #f)) ; tests are not included
4564 (propagated-inputs
4565 `(("python-matplotlib" ,python-matplotlib)
4566 ("python-numpy" ,python-numpy)
4567 ("python-scipy" ,python-scipy)))
4568 (native-inputs
4569 `(("unzip" ,unzip)))
4570 (home-page "https://github.com/konstantint/matplotlib-venn")
4571 (synopsis "Plot area-proportional Venn diagrams")
4572 (description
4573 "This package provides tools for plotting area-proportional two- and
4574three-way Venn diagrams in @code{matplotlib}.")
4575 (license license:expat)))
4576
44d10b1f
RW
4577(define-public python2-pysnptools
4578 (package
4579 (name "python2-pysnptools")
5d1ade85 4580 (version "0.3.13")
44d10b1f
RW
4581 (source
4582 (origin
4583 (method url-fetch)
5d1ade85 4584 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4585 (sha256
4586 (base32
5d1ade85 4587 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4588 (build-system python-build-system)
4589 (arguments
5d1ade85
RW
4590 `(#:python ,python-2 ; only Python 2.7 is supported
4591 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4592 (propagated-inputs
4593 `(("python2-numpy" ,python2-numpy)
4594 ("python2-scipy" ,python2-scipy)
4595 ("python2-pandas" ,python2-pandas)))
44d10b1f 4596 (native-inputs
5d1ade85 4597 `(("python2-cython" ,python2-cython)))
1b66989b 4598 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4599 (synopsis "Library for reading and manipulating genetic data")
4600 (description
4601 "PySnpTools is a library for reading and manipulating genetic data. It
4602can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4603those files. It can also efficiently manipulate ranges of integers using set
4604operators such as union, intersection, and difference.")
4605 (license license:asl2.0)))
4606
44d10b1f
RW
4607(define-public python-socksipy-branch
4608 (package
4609 (name "python-socksipy-branch")
4610 (version "1.01")
4611 (source
4612 (origin
4613 (method url-fetch)
4614 (uri (pypi-uri "SocksiPy-branch" version))
4615 (sha256
4616 (base32
4617 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4618 (build-system python-build-system)
4619 (arguments
4620 `(#:tests? #f)) ; There are no tests
4621 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4622 (synopsis "Python SOCKS module")
4623 (description
4624 "SocksiPy - A Python SOCKS client module. It provides a
4625socket-like interface that supports connections to any TCP
4626service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4627The original version was developed by Dan Haim, this is a
4628branch created by Mario Vilas to address some open issues,
4629as the original project seems to have been abandoned circa 2007.")
4630 (license license:bsd-3)))
4631
4632(define-public python2-socksipy-branch
4633 (package-with-python2 python-socksipy-branch))
4634
6fcceb23
AG
4635(define-public python-socksipychain
4636 (package
4637 (name "python-socksipychain")
d97cdff1 4638 (version "2.1.0")
6fcceb23
AG
4639 (source
4640 (origin
4641 (method git-fetch)
4642 (uri (git-reference
4643 (url "https://github.com/pagekite/PySocksipyChain.git")
4644 (commit (string-append "v" version))))
4645 (file-name (git-file-name name version))
4646 (sha256
4647 (base32
d97cdff1 4648 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
6fcceb23
AG
4649 (build-system python-build-system)
4650 (arguments
4651 `(#:tests? #f)) ; Tests try to access the network.
4652 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4653 (synopsis "Python SOCKS module with chained proxies support")
4654 (description
4655 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4656adds support for arbitrary chaining of proxy servers and various modes of
4657TLS/SSL encryption. It was developed for use in PageKite, and also includes
4658a simple netcat replacement with chaining support.")
4659 (license license:bsd-3)))
4660
44d10b1f
RW
4661(define-public python-pycodestyle
4662 (package
4663 (name "python-pycodestyle")
d16ef28b 4664 (version "2.5.0")
44d10b1f 4665 (source
ba88eea2
RW
4666 (origin
4667 (method url-fetch)
4668 (uri (pypi-uri "pycodestyle" version))
4669 (sha256
4670 (base32
d16ef28b 4671 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4672 (build-system python-build-system)
4673 (home-page "https://pycodestyle.readthedocs.io/")
4674 (synopsis "Python style guide checker")
4675 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4676Python code against some of the style conventions in
4677@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4678 (license license:expat)))
4679
4680(define-public python2-pycodestyle
4681 (package-with-python2 python-pycodestyle))
4682
4683(define-public python-multidict
4684 (package
4685 (name "python-multidict")
1ed3b845 4686 (version "4.7.5")
44d10b1f
RW
4687 (source
4688 (origin
4689 (method url-fetch)
4690 (uri (pypi-uri "multidict" version))
4691 (sha256
4692 (base32
1ed3b845 4693 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
44d10b1f 4694 (build-system python-build-system)
1ed3b845
MB
4695 (arguments
4696 '(#:modules ((ice-9 ftw)
4697 (srfi srfi-1)
4698 (srfi srfi-26)
4699 (guix build utils)
4700 (guix build python-build-system))
4701 #:phases (modify-phases %standard-phases
4702 (replace 'check
4703 (lambda* (#:key tests? #:allow-other-keys)
4704 (if tests?
4705 (begin
4706 (let ((libdir (find (cut string-prefix? "lib." <>)
4707 (scandir "build"))))
4708 (setenv "PYTHONPATH"
4709 (string-append "./build/" libdir ":"
4710 (getenv "PYTHONPATH")))
4711 (invoke "pytest" "-vv")))
4712 (format #t "test suite not run~%"))
4713 #t)))))
44d10b1f
RW
4714 (native-inputs
4715 `(("python-pytest" ,python-pytest)
1ed3b845 4716 ("python-pytest-cov" ,python-pytest-cov)))
44d10b1f
RW
4717 (home-page "https://github.com/aio-libs/multidict/")
4718 (synopsis "Multidict implementation")
4719 (description "Multidict is dict-like collection of key-value pairs
4720where key might be occurred more than once in the container.")
4721 (license license:asl2.0)))
4722
4723(define-public python-orderedmultidict
4724 (package
4725 (name "python-orderedmultidict")
4726 (version "0.7.11")
4727 (source
4728 (origin
4729 (method url-fetch)
4730 (uri (pypi-uri "orderedmultidict" version))
4731 (sha256
4732 (base32
4733 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4734 (build-system python-build-system)
4735 (arguments
4736 `(#:phases
4737 (modify-phases %standard-phases
4738 (add-after 'unpack 'fix-tests
4739 (lambda _
4740 ;; The package uses nosetest for running the tests.
4741 ;; Adding this initfile allows to run the test suite
4742 ;; without requiring nosetest.
d1c4f329
RW
4743 (with-output-to-file "tests/__init__.py" newline)
4744 #t)))))
44d10b1f
RW
4745 (propagated-inputs
4746 `(("python-six" ,python-six)))
4747 (native-inputs
4748 `(("python-pycodestyle" ,python-pycodestyle)))
4749 (home-page "https://github.com/gruns/orderedmultidict")
4750 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4751 (description "This package contains a library for ordered multivalue
4752dictionaries. A multivalue dictionary is a dictionary that can store
4753multiple values for the same key. An ordered multivalue dictionary is a
4754multivalue dictionary that retains the order of insertions and deletions.")
4755 (license license:unlicense)))
4756
4757(define-public python2-orderedmultidict
4758 (package-with-python2 python-orderedmultidict))
4759
4760(define-public python-autopep8
4761 (package
4762 (name "python-autopep8")
4763 (version "1.3.5")
4764 (source
4765 (origin
4766 (method url-fetch)
4767 (uri (pypi-uri "autopep8" version))
4768 (sha256
4769 (base32
4770 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4771 (build-system python-build-system)
4772 (propagated-inputs
4773 `(("python-pycodestyle" ,python-pycodestyle)))
4774 (home-page "https://github.com/hhatto/autopep8")
4775 (synopsis "Format Python code according to the PEP 8 style guide")
4776 (description
4777 "@code{autopep8} automatically formats Python code to conform to
4778the PEP 8 style guide. It uses the pycodestyle utility to determine
4779what parts of the code needs to be formatted. @code{autopep8} is
4780capable of fixing most of the formatting issues that can be reported
4781by pycodestyle.")
4782 (license (license:non-copyleft
4783 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4784
4785(define-public python2-autopep8
4786 (package-with-python2 python-autopep8))
4787
f2a64830
JK
4788(define-public python-distlib
4789 (package
4790 (name "python-distlib")
4791 (version "0.3.0")
4792 (source
4793 (origin
4794 (method url-fetch)
4795 (uri (pypi-uri "distlib" version ".zip"))
4796 (sha256
4797 (base32
4798 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
4799 (build-system python-build-system)
4800 (arguments
4801 `(#:phases
4802 (modify-phases %standard-phases
4803 (add-before 'build 'no-/bin/sh
4804 (lambda _
4805 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
4806 (("/bin/sh") (which "sh")))
4807 #t))
4808 (add-before 'check 'prepare-test-env
4809 (lambda _
4810 (setenv "HOME" "/tmp")
4811 ;; NOTE: Any value works, the variable just has to be present.
4812 (setenv "SKIP_ONLINE" "1")
4813 #t)))))
4814 (native-inputs `(("unzip" ,unzip)))
4815 (home-page "https://bitbucket.org/pypa/distlib")
4816 (synopsis "Distribution utilities")
4817 (description "Distlib is a library which implements low-level functions that
4818relate to packaging and distribution of Python software. It is intended to be
4819used as the basis for third-party packaging tools.")
4820 (license license:psfl)))
4821
44d10b1f
RW
4822(define-public python-distutils-extra
4823 (package
4824 (name "python-distutils-extra")
4825 (version "2.38")
4826 (source
4827 (origin
4828 (method url-fetch)
4829 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4830 version "/+download/python-distutils-extra-"
4831 version ".tar.gz"))
4832 (sha256
4833 (base32
4834 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4835 (build-system python-build-system)
4836 (home-page "https://launchpad.net/python-distutils-extra/")
4837 (synopsis "Enhancements to Python's distutils")
4838 (description
4839 "The python-distutils-extra module enables you to easily integrate
4840gettext support, themed icons, and scrollkeeper-based documentation into
4841Python's distutils.")
4842 (license license:gpl2)))
4843
4844(define-public python2-distutils-extra
4845 (package-with-python2 python-distutils-extra))
4846
4847(define-public python2-elib.intl
4848 (package
4849 (name "python2-elib.intl")
4850 (version "0.0.3")
4851 (source
4852 (origin
4853 ;; This project doesn't tag releases or publish tarballs, so we take
4854 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4855 (method git-fetch)
4856 (uri (git-reference
4857 (url "https://github.com/dieterv/elib.intl.git")
4858 (commit "d09997cfef")))
4859 (file-name (string-append name "-" version "-checkout"))
4860 (sha256
4861 (base32
4862 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4863 (build-system python-build-system)
4864 (arguments
4865 ;; incompatible with Python 3 (exception syntax)
4866 `(#:python ,python-2
4867 #:tests? #f))
4868 (home-page "https://github.com/dieterv/elib.intl")
4869 (synopsis "Enhanced internationalization for Python")
4870 (description
4871 "The elib.intl module provides enhanced internationalization (I18N)
4872services for your Python modules and applications.")
4873 (license license:lgpl3+)))
4874
4875(define-public python-olefile
4876 (package
4877 (name "python-olefile")
5bef0f10 4878 (version "0.46")
44d10b1f
RW
4879 (source
4880 (origin
4881 (method url-fetch)
5bef0f10
MB
4882 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4883 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4884 (file-name (string-append name "-" version ".tar.gz"))
4885 (sha256
4886 (base32
5bef0f10 4887 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4888 (build-system python-build-system)
5bef0f10 4889 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4890 (synopsis "Read and write Microsoft OLE2 files.")
4891 (description
4892 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4893Storage or Compound Document, Microsoft Office). It is an improved version of
4894the OleFileIO module from PIL, the Python Image Library.")
4895 (license license:bsd-3)))
4896
4897(define-public python2-olefile
4898 (package-with-python2 python-olefile))
4899
4900(define-public python-pillow
4901 (package
4902 (name "python-pillow")
5fbdd917 4903 (version "6.2.1")
44d10b1f
RW
4904 (source
4905 (origin
4906 (method url-fetch)
4907 (uri (pypi-uri "Pillow" version))
4908 (sha256
4909 (base32
5fbdd917 4910 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
44d10b1f
RW
4911 (build-system python-build-system)
4912 (native-inputs
4913 `(("python-pytest" ,python-pytest)))
4914 (inputs
4915 `(("freetype" ,freetype)
4916 ("lcms" ,lcms)
44d10b1f 4917 ("libjpeg" ,libjpeg)
44d10b1f 4918 ("libtiff" ,libtiff)
0c4e1c5f
EF
4919 ("libwebp" ,libwebp)
4920 ("openjpeg" ,openjpeg)
4921 ("zlib" ,zlib)))
44d10b1f
RW
4922 (propagated-inputs
4923 `(("python-olefile" ,python-olefile)))
4924 (arguments
4925 `(#:phases
4926 (modify-phases %standard-phases
4927 (add-after 'unpack 'patch-ldconfig
4928 (lambda _
4929 (substitute* "setup.py"
4930 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
61b77ff3 4931 (replace 'check
979d8464
EF
4932 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4933 (if tests?
4934 (begin
4935 (setenv "HOME" (getcwd))
4936 ;; Make installed package available for running the tests.
4937 (add-installed-pythonpath inputs outputs)
4938 (invoke "python" "selftest.py" "--installed")
4939 (invoke "python" "-m" "pytest" "-vv"))
4940 #t))))))
44d10b1f
RW
4941 (home-page "https://python-pillow.org")
4942 (synopsis "Fork of the Python Imaging Library")
4943 (description
4944 "The Python Imaging Library adds image processing capabilities to your
4945Python interpreter. This library provides extensive file format support, an
4946efficient internal representation, and fairly powerful image processing
4947capabilities. The core image library is designed for fast access to data
4948stored in a few basic pixel formats. It should provide a solid foundation for
4949a general image processing tool.")
4950 (license (license:x11-style
4951 "http://www.pythonware.com/products/pil/license.htm"
4952 "The PIL Software License"))))
4953
4954(define-public python2-pillow
4955 (package-with-python2 python-pillow))
4956
4957(define-public python-pycparser
4958 (package
4959 (name "python-pycparser")
c6c0940e 4960 (version "2.19")
44d10b1f
RW
4961 (source
4962 (origin
4963 (method url-fetch)
4964 (uri (pypi-uri "pycparser" version))
4965 (sha256
4966 (base32
c6c0940e 4967 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4968 (outputs '("out" "doc"))
4969 (build-system python-build-system)
4970 (native-inputs
4971 `(("pkg-config" ,pkg-config)))
4972 (arguments
4973 `(#:phases
4974 (modify-phases %standard-phases
4975 (replace 'check
4976 (lambda _
4977 (with-directory-excursion "tests"
acb75c03
RW
4978 (invoke "python" "all_tests.py"))
4979 #t))
44d10b1f
RW
4980 (add-after 'install 'install-doc
4981 (lambda* (#:key outputs #:allow-other-keys)
4982 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4983 (doc (string-append data "/doc/" ,name "-" ,version))
4984 (examples (string-append doc "/examples")))
4985 (mkdir-p examples)
4986 (for-each (lambda (file)
4987 (copy-file (string-append "." file)
4988 (string-append doc file)))
4989 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4990 (copy-recursively "examples" examples)
4991 #t))))))
44d10b1f
RW
4992 (home-page "https://github.com/eliben/pycparser")
4993 (synopsis "C parser in Python")
4994 (description
4995 "Pycparser is a complete parser of the C language, written in pure Python
4996using the PLY parsing library. It parses C code into an AST and can serve as
4997a front-end for C compilers or analysis tools.")
4998 (license license:bsd-3)))
4999
5000(define-public python2-pycparser
5001 (package-with-python2 python-pycparser))
5002
5003(define-public python-pywavelets
5004 (package
5005 (name "python-pywavelets")
5006 (version "1.0.1")
5007 (home-page "https://github.com/PyWavelets/pywt")
5008 (source (origin
5009 (method url-fetch)
5010 (uri (pypi-uri "PyWavelets" version))
5011 (sha256
5012 (base32
5013 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
5014 (build-system python-build-system)
5015 (arguments
5016 '(#:modules ((ice-9 ftw)
5017 (srfi srfi-1)
5018 (srfi srfi-26)
5019 (guix build utils)
5020 (guix build python-build-system))
5021 #:phases (modify-phases %standard-phases
5022 (replace 'check
5023 (lambda _
5024 (let ((cwd (getcwd))
5025 (libdir (find (cut string-prefix? "lib." <>)
5026 (scandir "build"))))
5027 (with-directory-excursion (string-append cwd "/build/" libdir)
5028 (invoke "nosetests" "-v" "."))))))))
5029 (native-inputs
5030 `(("python-matplotlib" ,python-matplotlib) ;for tests
5031 ("python-nose" ,python-nose)))
5032 (propagated-inputs
5033 `(("python-numpy" ,python-numpy)))
5034 (synopsis "Wavelet transforms in Python")
5035 (description
5036 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5037mathematical basis functions that are localized in both time and frequency.
5038Wavelet transforms are time-frequency transforms employing wavelets. They are
5039similar to Fourier transforms, the difference being that Fourier transforms are
5040localized only in frequency instead of in time and frequency.")
5041 (license license:expat)))
5042
5043(define-public python2-pywavelets
5044 (package-with-python2 python-pywavelets))
5045
5046(define-public python-xcffib
5047 (package
5048 (name "python-xcffib")
5049 (version "0.6.0")
5050 (source
5051 (origin
5052 (method url-fetch)
5053 (uri (pypi-uri "xcffib" version))
5054 (sha256
5055 (base32
5056 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5057 (build-system python-build-system)
5058 (inputs
5059 `(("libxcb" ,libxcb)))
5060 (propagated-inputs
5061 `(("python-cffi" ,python-cffi) ; used at run time
5062 ("python-six" ,python-six)))
5063 (arguments
5064 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5065 #:tests? #f
5066 #:phases
5067 (modify-phases %standard-phases
5068 (add-after 'unpack 'fix-libxcb-path
5069 (lambda* (#:key inputs #:allow-other-keys)
5070 (let ((libxcb (assoc-ref inputs "libxcb")))
5071 (substitute* '("xcffib/__init__.py")
5072 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5073 #t)))
5074 (add-after 'install 'install-doc
5075 (lambda* (#:key outputs #:allow-other-keys)
5076 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5077 "/doc/" ,name "-" ,version)))
5078 (mkdir-p doc)
5079 (copy-file "README.md"
5080 (string-append doc "/README.md"))
5081 #t))))))
5082 (home-page "https://github.com/tych0/xcffib")
5083 (synopsis "XCB Python bindings")
5084 (description
5085 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5086support for Python 3 and PyPy. It is based on cffi.")
5087 (license license:expat)))
5088
5089(define-public python2-xcffib
5090 (package-with-python2 python-xcffib))
5091
5092(define-public python-cairocffi
5093 (package
5094 (name "python-cairocffi")
5095 (version "0.9.0")
5096 (source
5097 (origin
5098 (method url-fetch)
5099 (uri (pypi-uri "cairocffi" version))
5100 (sha256
5101 (base32
5102 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5103 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5104 (build-system python-build-system)
5105 (outputs '("out" "doc"))
5106 (inputs
5107 `(("glib" ,glib)
5108 ("gtk+" ,gtk+)
5109 ("gdk-pixbuf" ,gdk-pixbuf)
5110 ("cairo" ,cairo)
5111 ("pango" ,pango)))
5112 (native-inputs
5113 `(("pkg-config" ,pkg-config)
5114 ("python-pytest" ,python-pytest)
5115 ("python-pytest-cov" ,python-pytest-cov)
5116 ("python-pytest-runner" ,python-pytest-runner)
5117 ("python-sphinx" ,python-sphinx)
5118 ("python-docutils" ,python-docutils)))
5119 (propagated-inputs
5120 `(("python-xcffib" ,python-xcffib))) ; used at run time
5121 (arguments
5122 `(#:phases
5123 (modify-phases %standard-phases
5124 (add-after 'unpack 'patch-paths
5125 (lambda* (#:key inputs outputs #:allow-other-keys)
5126 (substitute* (find-files "." "\\.py$")
5127 (("dlopen\\(ffi, 'cairo'")
5128 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
5129 "/lib/libcairo.so.2'"))
5130 (("dlopen\\(ffi, 'gdk-3'")
5131 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
5132 "/lib/libgtk-3.so.0'"))
5133 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
5134 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
5135 "/lib/libgdk_pixbuf-2.0.so.0'"))
5136 (("dlopen\\(ffi, 'glib-2.0'")
5137 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5138 "/lib/libglib-2.0.so.0'"))
5139 (("dlopen\\(ffi, 'gobject-2.0'")
5140 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5141 "/lib/libgobject-2.0.so.0'"))
5142 (("dlopen\\(ffi, 'pangocairo-1.0'")
5143 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5144 "/lib/libpangocairo-1.0.so.0'"))
5145 (("dlopen\\(ffi, 'pango-1.0'")
5146 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5147 "/lib/libpango-1.0.so.0'")))
5148 #t))
5149 (add-after 'install 'install-doc
5150 (lambda* (#:key inputs outputs #:allow-other-keys)
5151 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5152 (doc (string-append data "/doc/" ,name "-" ,version))
5153 (html (string-append doc "/html")))
5154 (setenv "LD_LIBRARY_PATH"
5155 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5156 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5157 (setenv "LANG" "en_US.UTF-8")
5158 (mkdir-p html)
5159 (for-each (lambda (file)
5160 (copy-file (string-append "." file)
5161 (string-append doc file)))
5162 '("/README.rst" "/CHANGES" "/LICENSE"))
5163 (system* "python" "setup.py" "build_sphinx")
5164 (copy-recursively "docs/_build/html" html)
5165 #t))))))
5166 (home-page "https://github.com/Kozea/cairocffi")
5167 (synopsis "Python bindings and object-oriented API for Cairo")
5168 (description
5169 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5170Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5171graphics library with support for multiple backends including image buffers,
5172PNG, PostScript, PDF, and SVG file output.")
5173 (license license:bsd-3)))
5174
5175(define-public python2-cairocffi
5176 (package-with-python2 python-cairocffi))
5177
5178(define-public python-decorator
5179 (package
5180 (name "python-decorator")
5181 (version "4.3.0")
5182 (source
5183 (origin
5184 (method url-fetch)
5185 (uri (pypi-uri "decorator" version))
5186 (sha256
5187 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
5188 (build-system python-build-system)
e85af137 5189 (home-page "https://pypi.org/project/decorator/")
44d10b1f
RW
5190 (synopsis "Python module to simplify usage of decorators")
5191 (description
5192 "The aim of the decorator module is to simplify the usage of decorators
5193for the average programmer, and to popularize decorators usage giving examples
5194of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5195etc. The core of this module is a decorator factory.")
5196 (license license:expat)))
5197
5198(define-public python2-decorator
5199 (package-with-python2 python-decorator))
5200
5201(define-public python-drmaa
5202 (package
5203 (name "python-drmaa")
5204 (version "0.7.7")
5205 (source
5206 (origin
5207 (method url-fetch)
5208 (uri (pypi-uri "drmaa" version))
5209 (sha256
5210 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5211 (build-system python-build-system)
5212 ;; The test suite requires libdrmaa which is provided by the cluster
5213 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5214 ;; should be set to the path of the libdrmaa library.
5215 (arguments '(#:tests? #f))
5216 (native-inputs
5217 `(("python-nose" ,python-nose)))
e85af137 5218 (home-page "https://pypi.org/project/drmaa/")
44d10b1f
RW
5219 (synopsis "Python bindings for the DRMAA library")
5220 (description
5221 "A Python package for Distributed Resource Management (DRM) job
5222submission and control. This package is an implementation of the DRMAA 1.0
5223Python language binding specification.")
5224 (license license:bsd-3)))
5225
5226(define-public python2-drmaa
5227 (package-with-python2 python-drmaa))
5228
5229(define-public python-grako
5230 (package
5231 (name "python-grako")
5232 (version "3.99.9")
5233 (source
5234 (origin
5235 (method url-fetch)
5236 (uri
5237 (pypi-uri "grako" version ".zip"))
5238 (sha256
5239 (base32
5240 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5241 (build-system python-build-system)
5242 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5243 (native-inputs
5244 `(("unzip" ,unzip)
5245 ("python-pytest" ,python-pytest)
5246 ("python-pytest-runner" ,python-pytest-runner)))
5247 (home-page "https://bitbucket.org/neogeny/grako")
5248 (synopsis "EBNF parser generator")
5249 (description
5250 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5251memoizing PEG/Packrat parser in Python.")
5252 (license license:bsd-3)))
5253
5254(define-public python2-grako
5255 (package-with-python2 python-grako))
5256
5257(define-public python-gridmap
5258 (package
5259 (name "python-gridmap")
5260 (version "0.13.0")
5261 (source
5262 (origin
768fea0f
TGR
5263 (method git-fetch)
5264 (uri (git-reference
5265 (url "https://github.com/pygridtools/gridmap.git")
5266 (commit (string-append "v" version))))
5267 (file-name (git-file-name name version))
44d10b1f 5268 (sha256
768fea0f 5269 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
5270 (build-system python-build-system)
5271 (arguments
5272 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5273 (propagated-inputs
5274 `(("python-psutil" ,python-psutil)
5275 ("python-drmaa" ,python-drmaa)
5276 ("python-pyzmq" ,python-pyzmq)))
5277 (home-page "https://github.com/pygridtools/gridmap")
5278 (synopsis "Create jobs on a cluster directly from Python")
5279 (description
5280 "Gridmap is a Python package to allow you to easily create jobs on the
5281cluster directly from Python. You can directly map Python functions onto the
5282cluster without needing to write any wrapper code yourself.")
5283 (license license:gpl3+)))
5284
5285(define-public python2-gridmap
5286 (package-with-python2 python-gridmap))
5287
5288(define-public python-honcho
5289 (package
5290 (name "python-honcho")
5291 (version "1.0.1")
5292 (source
5293 (origin
8524d130
TGR
5294 (method git-fetch)
5295 (uri (git-reference
5296 (url "https://github.com/nickstenning/honcho.git")
5297 (commit (string-append "v" version))))
5298 (file-name (git-file-name name version))
44d10b1f 5299 (sha256
8524d130 5300 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
5301 (build-system python-build-system)
5302 (native-inputs
5303 `(("python-pytest" ,python-pytest)
5304 ("python-mock" ,python-mock)
5305 ("python-tox" ,python-tox)
5306 ("which" ,which))) ;for tests
5307 (propagated-inputs
5308 `(("python-jinja2" ,python-jinja2)))
5309 (arguments
5310 `(#:phases
5311 (modify-phases %standard-phases
5312 (delete 'check)
5313 (add-after 'install 'check
5314 (lambda* (#:key outputs inputs #:allow-other-keys)
5315 ;; fix honcho path in testsuite
5316 (substitute* "tests/conftest.py"
5317 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5318 "/bin/honcho" "'")))
5319 ;; It's easier to run tests after install.
5320 ;; Make installed package available for running the tests
5321 (add-installed-pythonpath inputs outputs)
95b707fb 5322 (invoke "py.test" "-v"))))))
44d10b1f
RW
5323 (home-page "https://github.com/nickstenning/honcho")
5324 (synopsis "Manage Procfile-based applications")
5325 (description
5326 "A Procfile is a file which describes how to run an application
50fceab0 5327consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
5328The output of all running processes is collected by honcho and
5329displayed.")
5330 (license license:expat)))
5331
5332(define-public python2-honcho
5333 (package-with-python2 python-honcho))
5334
5335(define-public python-pexpect
5336 (package
5337 (name "python-pexpect")
5338 (version "4.6.0")
5339 (source
5340 (origin
5341 (method url-fetch)
5342 (uri (pypi-uri "pexpect" version))
5343 (sha256
5344 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5345 (build-system python-build-system)
5346 (arguments
5347 `(#:phases
5348 (modify-phases %standard-phases
5349 (add-before 'check 'prepare-tests
5350 (lambda _
5351 (substitute* (find-files "tests")
5352 (("/bin/ls") (which "ls"))
5353 (("/bin/echo") (which "echo"))
5354 (("/bin/which") (which "which"))
5355 ;; Many tests try to use the /bin directory which
5356 ;; is not present in the build environment.
5357 ;; Use one that's non-empty and unlikely to change.
5358 (("/bin'") "/dev'"))
5359 ;; XXX: Socket connection test gets "Connection reset by peer".
5360 ;; Why does it not work? Delete for now.
5361 (delete-file "tests/test_socket.py")
5362 #t))
5363 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5364 (native-inputs
5365 `(("python-nose" ,python-nose)
5366 ("python-pytest" ,python-pytest)
5367 ("man-db" ,man-db)
5368 ("which" ,which)
5369 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5370 (propagated-inputs
5371 `(("python-ptyprocess" ,python-ptyprocess)))
5372 (home-page "http://pexpect.readthedocs.org/")
5373 (synopsis "Controlling interactive console applications")
5374 (description
5375 "Pexpect is a pure Python module for spawning child applications;
5376controlling them; and responding to expected patterns in their output.
5377Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5378child application and control it as if a human were typing commands.")
5379 (license license:isc)))
5380
5381(define-public python2-pexpect
5382 (package-with-python2 python-pexpect))
5383
5384(define-public python-setuptools-scm
5385 (package
5386 (name "python-setuptools-scm")
85092643 5387 (version "3.2.0")
44d10b1f
RW
5388 (source (origin
5389 (method url-fetch)
5390 (uri (pypi-uri "setuptools_scm" version))
5391 (sha256
5392 (base32
85092643 5393 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
5394 (build-system python-build-system)
5395 (home-page "https://github.com/pypa/setuptools_scm/")
5396 (synopsis "Manage Python package versions in SCM metadata")
5397 (description
5398 "Setuptools_scm handles managing your Python package versions in
5399@dfn{software configuration management} (SCM) metadata instead of declaring
5400them as the version argument or in a SCM managed file.")
5401 (license license:expat)))
5402
a0b2accf
MO
5403;; Needed by python-lazy-object-proxy, remove on next update cycle.
5404(define-public python-setuptools-scm-3.3
5405 (package
5406 (inherit python-setuptools-scm)
5407 (version "3.3.3")
5408 (source (origin
5409 (method url-fetch)
5410 (uri (pypi-uri "setuptools_scm" version))
5411 (sha256
5412 (base32
5413 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5414
44d10b1f
RW
5415(define-public python2-setuptools-scm
5416 (package-with-python2 python-setuptools-scm))
5417
bb74ea09
RW
5418(define-public python-pathlib2
5419 (package
5420 (name "python-pathlib2")
5421 (version "2.3.3")
5422 (source
5423 (origin
5424 (method url-fetch)
5425 (uri (pypi-uri "pathlib2" version))
5426 (sha256
5427 (base32
5428 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5429 (build-system python-build-system)
5430 (propagated-inputs
5431 `(("python-scandir" ,python-scandir)
5432 ("python-six" ,python-six)))
e85af137 5433 (home-page "https://pypi.org/project/pathlib2/")
746d3384 5434 (synopsis "Object-oriented file system paths")
bb74ea09
RW
5435 (description "The goal of pathlib2 is to provide a backport of the
5436standard @code{pathlib} module which tracks the standard library module, so
5437all the newest features of the standard @code{pathlib} can be used also on
5438older Python versions.")
5439 (license license:expat)))
5440
fd5c264a
MB
5441(define-public python2-importlib-resources
5442 (package
5443 (name "python2-importlib-resources")
5444 (version "1.0.2")
5445 (source (origin
5446 (method url-fetch)
5447 (uri (pypi-uri "importlib_resources" version))
5448 (sha256
5449 (base32
5450 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5451 (build-system python-build-system)
5452 (arguments
5453 `(#:python ,python-2))
5454 (native-inputs
5455 `(("python-wheel" ,python2-wheel)))
5456 (propagated-inputs
5457 `(("python-pathlib2" ,python2-pathlib2)
5458 ("python-typing" ,python2-typing)))
5459 (home-page "https://gitlab.com/python-devs/importlib_resources")
5460 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5461 (description
5462 "This package provides an implementation of @code{importlib.resources}
5463for older versions of Python.")
5464 (license license:asl2.0)))
5465
15b65617
RW
5466(define-public python-importlib-metadata
5467 (package
5468 (name "python-importlib-metadata")
4dc04d11 5469 (version "1.4.0")
15b65617
RW
5470 (source
5471 (origin
5472 (method url-fetch)
5473 (uri (pypi-uri "importlib_metadata" version))
5474 (sha256
4dc04d11 5475 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
15b65617
RW
5476 (build-system python-build-system)
5477 (propagated-inputs
4dc04d11 5478 `(("python-zipp" ,python-zipp)))
15b65617
RW
5479 (native-inputs
5480 `(("python-setuptools-scm" ,python-setuptools-scm)
4dc04d11 5481 ("python-packaging" ,python-packaging)))
15b65617
RW
5482 (home-page "https://importlib-metadata.readthedocs.io/")
5483 (synopsis "Read metadata from Python packages")
5484 (description
5485 "@code{importlib_metadata} is a library which provides an API for
5486accessing an installed Python package's metadata, such as its entry points or
5487its top-level name. This functionality intends to replace most uses of
5488@code{pkg_resources} entry point API and metadata API. Along with
5489@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5490need to use the older and less efficient @code{pkg_resources} package.")
3dfb3d44 5491 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
15b65617
RW
5492 (license license:asl2.0)))
5493
5efa04dd
MB
5494(define-public python2-importlib-metadata
5495 (let ((base (package-with-python2 (strip-python2-variant
5496 python-importlib-metadata))))
5497 (package/inherit
5498 base
5499 (name "python2-importlib-metadata")
5500 (propagated-inputs
5501 `(("python-configparser" ,python2-configparser)
5502 ("python-contextlib2" ,python2-contextlib2)
5503 ("python-importlib-resources" ,python2-importlib-resources)
5504 ("python-pathlib2" ,python2-pathlib2)
5505 ,@(package-propagated-inputs base))))))
5506
37c173d1
RW
5507(define-public python-jaraco-packaging
5508 (package
5509 (name "python-jaraco-packaging")
5510 (version "6.1")
5511 (source
5512 (origin
5513 (method url-fetch)
5514 (uri (pypi-uri "jaraco.packaging" version))
5515 (sha256
5516 (base32
5517 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5518 (build-system python-build-system)
5519 (propagated-inputs
5520 `(("python-pytest" ,python-pytest)
5521 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5522 ("python-pytest-flake8" ,python-pytest-flake8)
5523 ("python-rst.linker" ,python-rst.linker)
5524 ("python-setuptools" ,python-setuptools)
5525 ("python-setuptools-scm" ,python-setuptools-scm)
5526 ("python-six" ,python-six)
5527 ("python-sphinx" ,python-sphinx)))
5528 (home-page "https://github.com/jaraco/jaraco.packaging")
5529 (synopsis "Tools to supplement packaging Python releases")
5530 (description
5531 "This package provides various tools to supplement packaging Python
5532releases.")
5533 (license license:expat)))
5534
44d10b1f
RW
5535(define-public python-pathpy
5536 (package
5537 (name "python-pathpy")
a3dd8871 5538 (version "11.5.1")
44d10b1f
RW
5539 (source
5540 (origin
5541 (method url-fetch)
5542 (uri (pypi-uri "path.py" version))
5543 (sha256
a3dd8871 5544 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5545 (outputs '("out" "doc"))
44d10b1f
RW
5546 (build-system python-build-system)
5547 (propagated-inputs
01a53e0b
MC
5548 `(("python-appdirs" ,python-appdirs)
5549 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5550 (native-inputs
5551 `(("python-setuptools-scm" ,python-setuptools-scm)
5552 ("python-sphinx" ,python-sphinx)
5553 ("python-rst.linker" ,python-rst.linker)
5554 ("python-pytest" ,python-pytest)
49ad11e9
RW
5555 ("python-pytest-runner" ,python-pytest-runner)
5556 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5557 (arguments
49ad11e9
RW
5558 `(#:phases
5559 (modify-phases %standard-phases
5560 (add-after 'build 'build-doc
5561 (lambda _
5562 (setenv "LANG" "en_US.UTF-8")
5563 (invoke "python" "setup.py" "build_sphinx")))
5564 (add-after 'install 'install-doc
5565 (lambda* (#:key outputs #:allow-other-keys)
5566 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5567 (doc (string-append data "/doc/" ,name "-" ,version))
5568 (html (string-append doc "/html")))
5569 (mkdir-p html)
5570 (for-each (lambda (file)
5571 (copy-file file (string-append doc "/" file)))
5572 '("README.rst" "CHANGES.rst"))
5573 (copy-recursively "build/sphinx/html" html)
5574 #t)))
5575 (replace 'check
5576 (lambda _
5577 ;; The import time test aborts if an import takes longer than
5578 ;; 100ms. It may very well take a little longer than that.
5579 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5580 (home-page "https://github.com/jaraco/path.py")
5581 (synopsis "Python module wrapper for built-in os.path")
5582 (description
5583 "@code{path.py} implements path objects as first-class entities, allowing
5584common operations on files to be invoked on those path objects directly.")
5585 (license license:expat)))
5586
5587(define-public python2-pathpy
5588 (package-with-python2 python-pathpy))
5589
5590(define-public python-simplegeneric
5591 (package
5592 (name "python-simplegeneric")
5593 (version "0.8.1")
5594 (source
5595 (origin
5596 (method url-fetch)
6c8c3980 5597 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5598 (sha256
5599 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5600 (build-system python-build-system)
5601 (native-inputs
5602 `(("unzip" ,unzip)))
5603 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5604 (synopsis "Python module for simple generic functions")
5605 (description
5606 "The simplegeneric module lets you define simple single-dispatch generic
5607functions, akin to Python’s built-in generic functions like @code{len()},
5608@code{iter()} and so on. However, instead of using specially-named methods,
5609these generic functions use simple lookup tables, akin to those used by
5610e.g. @code{pickle.dump()} and other generic functions found in the Python
5611standard library.")
5612 (license license:zpl2.1)))
5613
5614(define-public python2-simplegeneric
5615 (package-with-python2 python-simplegeneric))
5616
5617(define-public python-ipython-genutils
5618 ;; TODO: This package is retired, check if can be removed, see description.
5619 (package
5620 (name "python-ipython-genutils")
5621 (version "0.1.0")
5622 (source
5623 (origin
5624 (method url-fetch)
c9671d4b 5625 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5626 (sha256
5627 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5628 (build-system python-build-system)
5629 (arguments `(#:tests? #f)) ; no tests
5630 (home-page "https://ipython.org")
5631 (synopsis "Vestigial utilities from IPython")
5632 (description
5633 "This package provides retired utilities from IPython. No packages
5634outside IPython/Jupyter should depend on it.
5635
5636This package shouldn't exist. It contains some common utilities shared by
5637Jupyter and IPython projects during The Big Split. As soon as possible, those
5638packages will remove their dependency on this, and this package will go
5639away.")
5640 (license license:bsd-3)))
5641
5642(define-public python2-ipython-genutils
5643 (package-with-python2 python-ipython-genutils))
5644
5645(define-public python-traitlets
5646 (package
5647 (name "python-traitlets")
ac5e205a 5648 (version "4.3.3")
44d10b1f
RW
5649 (source
5650 (origin
5651 (method url-fetch)
5652 (uri (pypi-uri "traitlets" version))
5653 (sha256
5654 (base32
ac5e205a 5655 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5656 (build-system python-build-system)
5657 (arguments
5658 `(#:phases
5659 (modify-phases %standard-phases
5660 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5661 (propagated-inputs
5662 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5663 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5664 (native-inputs
5665 `(("python-pytest" ,python-pytest)))
5666 (properties `((python2-variant . ,(delay python2-traitlets))))
5667 (home-page "https://ipython.org")
5668 (synopsis "Configuration system for Python applications")
5669 (description
5670 "Traitlets is a framework that lets Python classes have attributes with
5671type checking, dynamically calculated default values, and ‘on change’
5672callbacks. The package also includes a mechanism to use traitlets for
5673configuration, loading values from files or from command line arguments. This
5674is a distinct layer on top of traitlets, so you can use traitlets in your code
5675without using the configuration machinery.")
5676 (license license:bsd-3)))
5677
5678(define-public python2-traitlets
5679 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5680 (package
5681 (inherit traitlets)
5682 (propagated-inputs
5683 `(("python2-enum34" ,python2-enum34)
5684 ,@(package-propagated-inputs traitlets))))))
5685
5686(define-public python-jupyter-core
5687 (package
5688 (name "python-jupyter-core")
5689 (version "4.4.0")
5690 (source
5691 (origin
5692 (method url-fetch)
5693 (uri (string-append (pypi-uri "jupyter_core" version)))
5694 (sha256
5695 (base32
5696 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5697 (build-system python-build-system)
5698 ;; FIXME: not sure how to run the tests
5699 (arguments `(#:tests? #f))
5700 (propagated-inputs
5701 `(("python-traitlets" ,python-traitlets)))
5702 (home-page "http://jupyter.org/")
5703 (synopsis "Jupyter base package")
5704 (description
5705 "Jupyter core is the base package on which Jupyter projects rely.")
5706 (license license:bsd-3)))
5707
5708(define-public python2-jupyter-core
5709 (package-with-python2 python-jupyter-core))
5710
5711(define-public python-jupyter-client
5712 (package
5713 (name "python-jupyter-client")
5714 (version "5.2.4")
5715 (source
5716 (origin
5717 (method url-fetch)
5718 (uri (pypi-uri "jupyter_client" version))
5719 (sha256
5720 (base32
5721 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5722 (build-system python-build-system)
5723 ;; Tests fail because of missing native python kernel which I assume is
5724 ;; provided by the ipython package, which we cannot use because it would
5725 ;; cause a dependency cycle.
ddc586ea
LC
5726 (arguments
5727 `(#:tests? #f
5728
5729 #:phases (modify-phases %standard-phases
5730 (add-after 'unpack 'set-tool-file-names
5731 (lambda* (#:key inputs #:allow-other-keys)
5732 (let ((iproute (assoc-ref inputs "iproute")))
5733 (substitute* "jupyter_client/localinterfaces.py"
5734 (("'ip'")
5735 (string-append "'" iproute "/sbin/ip'")))
5736 #t))))))
5737 (inputs
5738 `(("iproute" ,iproute)))
44d10b1f
RW
5739 (propagated-inputs
5740 `(("python-pyzmq" ,python-pyzmq)
5741 ("python-traitlets" ,python-traitlets)
5742 ("python-jupyter-core" ,python-jupyter-core)))
5743 (home-page "http://jupyter.org/")
5744 (synopsis "Jupyter protocol implementation and client libraries")
5745 (description
5746 "The @code{jupyter_client} package contains the reference implementation
5747of the Jupyter protocol. It also provides client and kernel management APIs
5748for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5749installing @code{kernelspec}s for use with Jupyter frontends.")
5750 (license license:bsd-3)))
5751
5752(define-public python2-jupyter-client
5753 (package-with-python2 python-jupyter-client))
5754
5755(define-public python-ipykernel
5756 (package
5757 (name "python-ipykernel")
08d0a355 5758 (version "5.1.3")
44d10b1f
RW
5759 (source
5760 (origin
5761 (method url-fetch)
5762 (uri (pypi-uri "ipykernel" version))
5763 (sha256
08d0a355 5764 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5765 (build-system python-build-system)
5766 (arguments
5767 `(#:phases
5768 (modify-phases %standard-phases
5769 (replace 'check
5770 (lambda _
5771 (setenv "HOME" "/tmp")
5772 (invoke "pytest" "-v")
aa856d02
LC
5773 #t))
5774 (add-after 'install 'set-python-file-name
5775 (lambda* (#:key outputs #:allow-other-keys)
5776 ;; Record the absolute file name of the 'python' executable in
5777 ;; 'kernel.json'.
5778 (let ((out (assoc-ref outputs "out")))
5779 (substitute* (string-append out "/share/jupyter"
5780 "/kernels/python3/kernel.json")
5781 (("\"python\"")
5782 (string-append "\"" (which "python") "\"")))
5783 #t))))))
44d10b1f
RW
5784 (propagated-inputs
5785 `(("python-ipython" ,python-ipython)
5786 ;; imported at runtime during connect
5787 ("python-jupyter-client" ,python-jupyter-client)))
5788 (native-inputs
08d0a355
TGR
5789 `(("python-flaky" ,python-flaky)
5790 ("python-nose" ,python-nose)
5791 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5792 (home-page "https://ipython.org")
5793 (synopsis "IPython Kernel for Jupyter")
5794 (description
5795 "This package provides the IPython kernel for Jupyter.")
578e4cf4 5796 (properties `((python2-variant . ,(delay python2-ipykernel))))
44d10b1f
RW
5797 (license license:bsd-3)))
5798
578e4cf4 5799;; Version 5.x and above no longer support Python 2.
44d10b1f 5800(define-public python2-ipykernel
0f378947
RW
5801 (package
5802 (name "python2-ipykernel")
578e4cf4 5803 (version "4.10.1")
0f378947
RW
5804 (source
5805 (origin
5806 (method url-fetch)
5807 (uri (pypi-uri "ipykernel" version))
5808 (sha256
578e4cf4 5809 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
0f378947
RW
5810 (build-system python-build-system)
5811 (arguments
578e4cf4 5812 `(#:python ,python-2))
0f378947
RW
5813 (propagated-inputs
5814 `(("python2-ipython" ,python2-ipython)
5815 ;; imported at runtime during connect
578e4cf4
EF
5816 ("python2-jupyter-client" ,python2-jupyter-client)
5817 ("python2-tornado" ,python2-tornado)
5818 ("python2-traitlets" ,python2-traitlets)))
0f378947 5819 (native-inputs
578e4cf4
EF
5820 `(("python2-mock" ,python2-mock)
5821 ("python2-nose" ,python2-nose)
5822 ("python2-pytest" ,python2-pytest)
5823 ("python2-pytest-cov" ,python2-pytest-cov)))
0f378947
RW
5824 (home-page "https://ipython.org")
5825 (synopsis "IPython Kernel for Jupyter")
5826 (description
5827 "This package provides the IPython kernel for Jupyter.")
5828 (license license:bsd-3)))
44d10b1f 5829
966aa714
AE
5830(define-public python-pari-jupyter
5831 (package
5832 (name "python-pari-jupyter")
5833 (version "1.3.2")
5834 (source
5835 (origin
5836 (method url-fetch)
5837 (uri (pypi-uri "pari_jupyter" version))
5838 (sha256
5839 (base32
5840 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5841 (build-system python-build-system)
5842 (propagated-inputs
5843 `(("python-ipykernel" ,python-ipykernel)))
5844 (inputs
5845 `(("pari-gp" ,pari-gp)
5846 ("readline" ,readline)))
5847 (arguments
5848 `(#:tests? #f)) ; no test suite
5849 (home-page
5850 "https://github.com/jdemeyer/pari_jupyter")
5851 (synopsis "A Jupyter kernel for PARI/GP")
5852 (description "The package provides a PARI/GP kernel for Jupyter.")
5853 (license license:gpl3+)))
5854
dede052a
RW
5855(define-public python-backcall
5856 (package
5857 (name "python-backcall")
5858 (version "0.1.0")
5859 (source
5860 (origin
5861 (method url-fetch)
5862 (uri (pypi-uri "backcall" version))
5863 (sha256
5864 (base32
5865 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5866 (build-system python-build-system)
5867 (home-page "https://github.com/takluyver/backcall/")
5868 (synopsis "Specifications for callback functions passed in to an API")
5869 (description
5870 "If your code lets other people supply callback functions, it's important
5871to specify the function signature you expect, and check that functions support
5872that. Adding extra parameters later would break other peoples code unless
5873you're careful. The @code{backcall} package provides a way of specifying the
5874callback signature using a prototype function.")
5875 (license license:bsd-3)))
5876
8b5f756c
RW
5877(define-public python-ipython
5878 (package
5879 (name "python-ipython")
ee515773 5880 (version "7.9.0")
8b5f756c
RW
5881 (source
5882 (origin
5883 (method url-fetch)
5884 (uri (pypi-uri "ipython" version ".tar.gz"))
5885 (sha256
ee515773 5886 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5887 (build-system python-build-system)
5888 (propagated-inputs
5889 `(("python-backcall" ,python-backcall)
5890 ("python-pyzmq" ,python-pyzmq)
5891 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5892 ("python-terminado" ,python-terminado)
5893 ("python-matplotlib" ,python-matplotlib)
5894 ("python-numpy" ,python-numpy)
5895 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5896 ("python-jedi" ,python-jedi)
44d10b1f
RW
5897 ("python-jinja2" ,python-jinja2)
5898 ("python-mistune" ,python-mistune)
5899 ("python-pexpect" ,python-pexpect)
5900 ("python-pickleshare" ,python-pickleshare)
5901 ("python-simplegeneric" ,python-simplegeneric)
5902 ("python-jsonschema" ,python-jsonschema)
5903 ("python-traitlets" ,python-traitlets)
5904 ("python-nbformat" ,python-nbformat)
5905 ("python-pygments" ,python-pygments)))
5906 (inputs
5907 `(("readline" ,readline)
5908 ("which" ,which)))
5909 (native-inputs
5910 `(("graphviz" ,graphviz)
5911 ("pkg-config" ,pkg-config)
5912 ("python-requests" ,python-requests) ;; for tests
5913 ("python-testpath" ,python-testpath)
8b5f756c 5914 ("python-nose" ,python-nose)))
44d10b1f
RW
5915 (arguments
5916 `(#:phases
5917 (modify-phases %standard-phases
0f272518
RW
5918 (add-after 'unpack 'make-docs-reproducible
5919 (lambda _
5920 (substitute* "IPython/sphinxext/ipython_directive.py"
5921 ((".*import datetime") "")
5922 ((".*datetime.datetime.now\\(\\)") "")
5923 (("%timeit") "# %timeit"))
5924 #t))
44d10b1f
RW
5925 ;; Tests can only be run after the library has been installed and not
5926 ;; within the source directory.
5927 (delete 'check)
5928 (add-after 'install 'check
5929 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5930 (if tests?
5931 (begin
5932 ;; Make installed package available for running the tests
5933 (add-installed-pythonpath inputs outputs)
5934 (setenv "HOME" "/tmp/") ;; required by a test
5935 ;; We only test the core because one of the other tests
5936 ;; tries to import ipykernel.
5937 (invoke "python" "IPython/testing/iptest.py"
5938 "-v" "IPython/core/tests"))
5939 #t)))
5940 (add-before 'check 'fix-tests
5941 (lambda* (#:key inputs #:allow-other-keys)
5942 (substitute* "./IPython/utils/_process_posix.py"
5943 (("/usr/bin/env', 'which") (which "which")))
5944 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5945 (("#!/usr/bin/env python")
5946 (string-append "#!" (which "python"))))
44d10b1f
RW
5947 ;; This test introduces a circular dependency on ipykernel
5948 ;; (which depends on ipython).
5949 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5950 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5951 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5952 #t)))))
5953 (home-page "https://ipython.org")
5954 (synopsis "IPython is a tool for interactive computing in Python")
5955 (description
5956 "IPython provides a rich architecture for interactive computing with:
5957Powerful interactive shells, a browser-based notebook, support for interactive
5958data visualization, embeddable interpreters and tools for parallel
2bc5d5d5
EF
5959computing.")
5960 (properties `((python2-variant . ,(delay python2-ipython))))
5961 (license license:bsd-3)))
5962
5963;; This is the latest release of the LTS version of ipython with support for
5964;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5965;; dropped support for Python 2.7.
5966(define-public python2-ipython
5967 (package
5968 (name "python2-ipython")
5969 (version "5.8.0")
5970 (source
5971 (origin
5972 (method url-fetch)
5973 (uri (pypi-uri "ipython" version ".tar.gz"))
5974 (sha256
5975 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5976 (build-system python-build-system)
5977 (propagated-inputs
5978 `(("python2-backports-shutil-get-terminal-size"
5979 ,python2-backports-shutil-get-terminal-size)
5980 ("python2-pathlib2" ,python2-pathlib2)
5981 ("python2-pyzmq" ,python2-pyzmq)
5982 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5983 ("python2-terminado" ,python2-terminado)
5984 ("python2-matplotlib" ,python2-matplotlib)
5985 ("python2-numpy" ,python2-numpy)
5986 ("python2-numpydoc" ,python2-numpydoc)
5987 ("python2-jinja2" ,python2-jinja2)
5988 ("python2-mistune" ,python2-mistune)
5989 ("python2-pexpect" ,python2-pexpect)
5990 ("python2-pickleshare" ,python2-pickleshare)
5991 ("python2-simplegeneric" ,python2-simplegeneric)
5992 ("python2-jsonschema" ,python2-jsonschema)
5993 ("python2-traitlets" ,python2-traitlets)
5994 ("python2-nbformat" ,python2-nbformat)
5995 ("python2-pygments" ,python2-pygments)))
5996 (inputs
5997 `(("readline" ,readline)
5998 ("which" ,which)))
5999 (native-inputs
6000 `(("graphviz" ,graphviz)
6001 ("pkg-config" ,pkg-config)
6002 ("python2-requests" ,python2-requests) ;; for tests
6003 ("python2-testpath" ,python2-testpath)
6004 ("python2-mock" ,python2-mock)
6005 ("python2-nose" ,python2-nose)))
6006 (arguments
6007 `(#:python ,python-2
6008 #:phases
6009 (modify-phases %standard-phases
6010 (add-before 'check 'delete-broken-tests
6011 (lambda* (#:key inputs #:allow-other-keys)
6012 ;; These tests throw errors for unknown reasons.
d8ba1135
EF
6013 (delete-file "IPython/core/tests/test_displayhook.py")
6014 (delete-file "IPython/core/tests/test_magic_terminal.py")
2bc5d5d5 6015 (delete-file "IPython/core/tests/test_profile.py")
2bc5d5d5
EF
6016 #t)))))
6017 (home-page "https://ipython.org")
6018 (synopsis "IPython is a tool for interactive computing in Python")
6019 (description
6020 "IPython provides a rich architecture for interactive computing with:
6021Powerful interactive shells, a browser-based notebook, support for interactive
6022data visualization, embeddable interpreters and tools for parallel
44d10b1f 6023computing.")
8b5f756c 6024 (license license:bsd-3)))
44d10b1f 6025
8b5f756c
RW
6026(define-public python-ipython-documentation
6027 (package
6028 (inherit python-ipython)
6029 (name "python-ipython-documentation")
6030 (version (package-version python-ipython))
6031 (arguments
6032 `(#:phases
6033 (modify-phases %standard-phases
6034 (delete 'build)
6035 (delete 'check)
6036 (replace 'install
6037 (lambda* (#:key outputs #:allow-other-keys)
6038 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
6039 (doc (string-append data "/doc/" ,name "-" ,version))
6040 (html (string-append doc "/html"))
6041 (man1 (string-append data "/man/man1"))
6042 (info (string-append data "/info"))
6043 (examples (string-append doc "/examples"))
6044 (python-arg (string-append "PYTHON=" (which "python"))))
6045 (setenv "LANG" "en_US.utf8")
6046 (with-directory-excursion "docs"
6047 ;; FIXME: pdf fails to build
6048 ;;(system* "make" "pdf" "PAPER=a4")
6049 (system* "make" python-arg "html")
6050 ;; FIXME: the generated texi file contains ^@^@, which trips
6051 ;; up the parser.
6052 ;; (system* "make" python-arg "info")
6053 )
6054 (copy-recursively "docs/man" man1)
6055 (copy-recursively "examples" examples)
6056 (copy-recursively "docs/build/html" html)
6057 ;; (copy-file "docs/build/latex/ipython.pdf"
6058 ;; (string-append doc "/ipython.pdf"))
6059 (mkdir-p info)
6060 ;; (copy-file "docs/build/texinfo/ipython.info"
6061 ;; (string-append info "/ipython.info"))
6062 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
6063 #t)))))
6064 (inputs
6065 `(("python-ipython" ,python-ipython)
6066 ("python-ipykernel" ,python-ipykernel)))
6067 (native-inputs
6068 `(("python-sphinx" ,python-sphinx)
6069 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
6070 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 6071 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
6072 texlive-fonts-ec
6073 texlive-generic-ifxetex
6074 texlive-generic-pdftex
8b5f756c
RW
6075 texlive-latex-capt-of
6076 texlive-latex-cmap
6077 texlive-latex-environ
6078 texlive-latex-eqparbox
6079 texlive-latex-etoolbox
6080 texlive-latex-expdlist
6081 texlive-latex-fancyhdr
6082 texlive-latex-fancyvrb
6083 texlive-latex-fncychap
6084 texlive-latex-float
6085 texlive-latex-framed
6086 texlive-latex-geometry
6087 texlive-latex-graphics
6088 texlive-latex-hyperref
6089 texlive-latex-mdwtools
6090 texlive-latex-multirow
6091 texlive-latex-needspace
6092 texlive-latex-oberdiek
6093 texlive-latex-parskip
6094 texlive-latex-preview
6095 texlive-latex-tabulary
6096 texlive-latex-threeparttable
6097 texlive-latex-titlesec
6098 texlive-latex-trimspaces
6099 texlive-latex-ucs
6100 texlive-latex-upquote
6101 texlive-latex-url
6102 texlive-latex-varwidth
6103 texlive-latex-wrapfig)))
6104 ("texinfo" ,texinfo)))))
44d10b1f
RW
6105
6106(define-public python-urwid
6107 (package
6108 (name "python-urwid")
6109 (version "2.0.1")
6110 (source
6111 (origin
6112 (method url-fetch)
6113 (uri (pypi-uri "urwid" version))
6114 (sha256
6115 (base32
6116 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
6117 (build-system python-build-system)
6118 (home-page "http://urwid.org")
6119 (synopsis "Console user interface library for Python")
6120 (description
6121 "Urwid is a curses-based UI/widget library for Python. It includes many
6122features useful for text console applications.")
6123 (license license:lgpl2.1+)))
6124
6125(define-public python2-urwid
6126 (package-with-python2 python-urwid))
6127
6128(define-public python-urwidtrees
6129 (package
6130 (name "python-urwidtrees")
6131 (version "1.0.2")
6132 (source
6133 (origin
c8364072 6134 (method git-fetch)
44d10b1f
RW
6135 ;; package author intends on distributing via github rather than pypi:
6136 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
c8364072
EF
6137 (uri (git-reference
6138 (url "https://github.com/pazz/urwidtrees")
6139 (commit version)))
6140 (file-name (git-file-name name version))
44d10b1f
RW
6141 (sha256
6142 (base32
c8364072 6143 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
44d10b1f
RW
6144 (build-system python-build-system)
6145 (arguments
26bb7fc6
EF
6146 '(#:use-setuptools? #f
6147 #:tests? #f)) ; no tests
44d10b1f
RW
6148 (propagated-inputs `(("python-urwid" ,python-urwid)))
6149 (home-page "https://github.com/pazz/urwidtrees")
6150 (synopsis "Tree widgets for urwid")
6151 (description "Urwidtrees is a Widget Container API for the @code{urwid}
6152toolkit. Use it to build trees of widgets.")
6153 (license license:gpl3+)))
6154
6155(define-public python2-urwidtrees
6156 (package-with-python2 python-urwidtrees))
6157
6158(define-public python-ua-parser
6159 (package
6160 (name "python-ua-parser")
6161 (version "0.8.0")
6162 (source
6163 (origin
6164 (method url-fetch)
6165 (uri (pypi-uri "ua-parser" version))
6166 (sha256
6167 (base32
6168 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
6169 (build-system python-build-system)
6170 (arguments
6171 `(#:tests? #f)) ;no test suite in release
6172 (native-inputs
6173 `(("python-pyyaml" ,python-pyyaml)))
6174 (home-page "https://github.com/ua-parser/uap-python")
6175 (synopsis "User agent parser")
6176 (description
6177 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
6178 (license license:asl2.0)))
6179
6180(define-public python2-ua-parser
6181 (package-with-python2 python-ua-parser))
6182
6183(define-public python-user-agents
6184 (package
6185 (name "python-user-agents")
6186 (version "1.1.0")
6187 (source
6188 (origin
6189 (method url-fetch)
6190 (uri (pypi-uri "user-agents" version))
6191 (sha256
6192 (base32
6193 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
6194 (build-system python-build-system)
6195 (arguments
6196 `(#:tests? #f)) ;missing devices.json test file in release
6197 (propagated-inputs
6198 `(("python-ua-parser" ,python-ua-parser)))
6199 (home-page "https://github.com/selwin/python-user-agents")
6200 (synopsis "User Agent strings parsing library")
6201 (description
6202 "A library to identify devices (phones, tablets) and their capabilities by
6203parsing (browser/HTTP) user agent strings.")
6204 (license license:expat)))
6205
6206(define-public python2-user-agents
6207 (package-with-python2 python-user-agents))
6208
6209(define-public python-dbus
6210 (package
6211 (name "python-dbus")
ba5ef999 6212 (version "1.2.14")
44d10b1f
RW
6213 (source
6214 (origin
6215 (method url-fetch)
6216 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
6217 "dbus-python-" version ".tar.gz"))
6218 (sha256
ba5ef999 6219 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 6220 (build-system gnu-build-system)
44d10b1f
RW
6221 (native-inputs
6222 `(("pkg-config" ,pkg-config)))
6223 (inputs
6224 `(("python" ,python-wrapper)
6225 ("dbus-glib" ,dbus-glib)))
6226 (synopsis "Python bindings for D-bus")
6227 (description "python-dbus provides bindings for libdbus, the reference
6228implementation of D-Bus.")
6229 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
6230 (license license:expat)))
6231
6232(define-public python2-dbus
6233 (package (inherit python-dbus)
6234 (name "python2-dbus")
6235 (inputs `(("python" ,python-2)
6236 ,@(alist-delete "python"
6237 (package-inputs python-dbus)
ba5ef999 6238 equal?)))))
44d10b1f 6239
fb236fdd
AG
6240(define-public python-notify2
6241 (package
6242 (name "python-notify2")
6243 (version "0.3.1")
6244 (source
6245 (origin
6246 (method url-fetch)
6247 (uri (pypi-uri "notify2" version))
6248 (sha256
6249 (base32
6250 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
6251 (build-system python-build-system)
6252 (arguments `(#:tests? #f)) ; tests depend on system state
6253 (native-inputs
6254 `(("python-dbus" ,python-dbus)))
6255 (home-page "https://bitbucket.org/takluyver/pynotify2")
6256 (synopsis "Python interface to D-Bus notifications")
6257 (description
6258 "Pynotify2 provides a Python interface for sending D-Bus notifications.
6259It is a reimplementation of pynotify in pure Python, and an alternative to
6260the GObject Introspection bindings to libnotify for non-GTK applications.")
6261 (license (list license:bsd-2
6262 license:lgpl2.1+))))
6263
6264(define-public python2-notify2
6265 (package-with-python2 python-notify2))
6266
44d10b1f
RW
6267;; beautifulsoup4 has a totally different namespace than 3.x,
6268;; and pypi seems to put it under its own name, so I guess we should too
6269(define-public python-beautifulsoup4
6270 (package
6271 (name "python-beautifulsoup4")
abb53e6f 6272 (version "4.7.1")
44d10b1f
RW
6273 (source
6274 (origin
6275 (method url-fetch)
6276 (uri (pypi-uri "beautifulsoup4" version))
6277 (sha256
6278 (base32
abb53e6f 6279 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
6280 (build-system python-build-system)
6281 (arguments
6282 `(#:phases
6283 (modify-phases %standard-phases
6284 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6285 ;; must use this conversion script when building with Python 3. The
6286 ;; conversion script also runs the tests.
6287 ;; For more information, see the file 'convert-py3k' in the source
6288 ;; distribution.
6289 (replace 'check
dff0197e 6290 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 6291 (propagated-inputs
abb53e6f 6292 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
6293 (home-page
6294 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6295 (synopsis
6296 "Python screen-scraping library")
6297 (description
6298 "Beautiful Soup is a Python library designed for rapidly setting up
6299screen-scraping projects. It offers Pythonic idioms for navigating,
6300searching, and modifying a parse tree, providing a toolkit for
6301dissecting a document and extracting what you need. It automatically
6302converts incoming documents to Unicode and outgoing documents to UTF-8.")
6303 (license license:expat)
6304 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6305
6306(define-public python2-beautifulsoup4
6307 (package
6308 (inherit (package-with-python2
6309 (strip-python2-variant python-beautifulsoup4)))
6310 (arguments `(#:python ,python-2))))
6311
ad74978a
BT
6312(define-public python-soupsieve
6313 (package
6314 (name "python-soupsieve")
3367df31 6315 (version "1.9.5")
ad74978a
BT
6316 (source
6317 (origin
6318 (method url-fetch)
6319 (uri (pypi-uri "soupsieve" version))
6320 (sha256
6321 (base32
3367df31 6322 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
6323 (build-system python-build-system)
6324 (arguments `(#:tests? #f))
6325 ;;XXX: 2 tests fail currently despite claming they were to be
6326 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6327 ;;don't want to create a circular dependency.
6328 (home-page "https://github.com/facelessuser/soupsieve")
6329 (synopsis "CSS selector library")
6330 (description
6331 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6332Soup 4. It aims to provide selecting, matching, and filtering using modern
6333CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6334specifications up through the latest CSS level 4 drafts and beyond (though
6335some are not yet implemented).")
d00b83fb 6336 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
6337 (license license:expat)))
6338
6339(define-public python2-soupsieve
d00b83fb 6340 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
6341 (package
6342 (inherit base)
6343 (propagated-inputs
d00b83fb
MB
6344 `(("python2-backports-functools-lru-cache"
6345 ,python2-backports-functools-lru-cache)
6346 ,@(package-propagated-inputs base))))))
ad74978a 6347
44d10b1f
RW
6348(define-public python-netifaces
6349 (package
6350 (name "python-netifaces")
6351 (version "0.10.7")
6352 (source
6353 (origin
6354 (method url-fetch)
6355 (uri (pypi-uri "netifaces" version))
6356 (sha256
6357 (base32
6358 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6359 (build-system python-build-system)
6360 (home-page "https://github.com/al45tair/netifaces")
6361 (synopsis
6362 "Python module for portable network interface information")
6363 (description
6364 "Netifaces is a Python module providing information on network
6365interfaces in an easy and portable manner.")
6366 (license license:expat)))
6367
6368(define-public python2-netifaces
6369 (package-with-python2 python-netifaces))
6370
6371(define-public python-networkx
6372 (package
6373 (name "python-networkx")
5a9980d5 6374 (version "2.4")
44d10b1f
RW
6375 (source
6376 (origin
6377 (method url-fetch)
5a9980d5 6378 (uri (pypi-uri "networkx" version))
44d10b1f 6379 (sha256
5a9980d5 6380 (base32 "0r2wr7aqay9fwjrgk35fkjzk8lvvb4i4df7ndaqzkr4ndw5zzx7q"))))
44d10b1f 6381 (build-system python-build-system)
5a9980d5
MB
6382 (arguments
6383 '(#:phases (modify-phases %standard-phases
6384 (replace 'check
6385 (lambda* (#:key tests? #:allow-other-keys)
6386 (if tests?
6387 (invoke "pytest" "-vv" "--pyargs" "networkx")
6388 (format #t "test suite not run~%"))
6389 #t)))))
44d10b1f
RW
6390 ;; python-decorator is needed at runtime.
6391 (propagated-inputs
6392 `(("python-decorator" ,python-decorator)))
6393 (native-inputs
5a9980d5 6394 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
6395 (home-page "https://networkx.github.io/")
6396 (synopsis "Python module for creating and manipulating graphs and networks")
6397 (description
6398 "NetworkX is a Python package for the creation, manipulation, and study
6399of the structure, dynamics, and functions of complex networks.")
5a9980d5 6400 (properties `((python2-variant . ,(delay python2-networkx))))
44d10b1f
RW
6401 (license license:bsd-3)))
6402
5a9980d5 6403;; NetworkX 2.2 is the last version with support for Python 2.
44d10b1f 6404(define-public python2-networkx
5a9980d5
MB
6405 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
6406 (package
6407 (inherit base)
6408 (version "2.2")
6409 (source (origin
6410 (method url-fetch)
6411 (uri (pypi-uri "networkx" version ".zip"))
6412 (sha256
6413 (base32
6414 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6415 (arguments
6416 `(#:python ,python-2))
6417 (native-inputs
6418 `(("python-nose" ,python2-nose)
6419 ("unzip" ,unzip))))))
44d10b1f
RW
6420
6421(define-public python-datrie
6422 (package
6423 (name "python-datrie")
0b58cb42 6424 (version "0.8")
44d10b1f
RW
6425 (source
6426 (origin
6427 (method url-fetch)
6428 (uri (pypi-uri "datrie" version))
6429 (sha256
6430 (base32
0b58cb42 6431 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 6432 (build-system python-build-system)
44d10b1f
RW
6433 (native-inputs
6434 `(("python-cython" ,python-cython)
6435 ("python-hypothesis" ,python-hypothesis)
6436 ("python-pytest" ,python-pytest)
6437 ("python-pytest-runner" ,python-pytest-runner)))
6438 (home-page "https://github.com/kmike/datrie")
6439 (synopsis "Fast, efficiently stored trie for Python")
6440 (description
6441 "This package provides a fast, efficiently stored trie implementation for
6442Python.")
6443 (license license:lgpl2.1+)))
6444
6445(define-public snakemake
6446 (package
6447 (name "snakemake")
93803c6b 6448 (version "5.7.1")
44d10b1f
RW
6449 (source
6450 (origin
6451 (method url-fetch)
6452 (uri (pypi-uri "snakemake" version))
6453 (sha256
93803c6b 6454 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
6455 (build-system python-build-system)
6456 (arguments
6457 ;; TODO: Package missing test dependencies.
6458 '(#:tests? #f
6459 #:phases
6460 (modify-phases %standard-phases
6461 ;; For cluster execution Snakemake will call Python. Since there is
6462 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6463 ;; this by calling the snakemake wrapper instead.
6464 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6465 (lambda* (#:key outputs #:allow-other-keys)
6466 (substitute* "snakemake/executors.py"
6467 (("\\{sys.executable\\} -m snakemake")
6468 (string-append (assoc-ref outputs "out")
6469 "/bin/snakemake")))
6470 #t)))))
6471 (propagated-inputs
8994ae34 6472 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
6473 ("python-configargparse" ,python-configargparse)
6474 ("python-datrie" ,python-datrie)
6475 ("python-docutils" ,python-docutils)
8994ae34 6476 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
6477 ("python-jinja2" ,python-jinja2)
6478 ("python-jsonschema" ,python-jsonschema)
6479 ("python-networkx" ,python-networkx)
93803c6b 6480 ("python-psutil" ,python-psutil)
44d10b1f 6481 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
6482 ("python-ratelimiter" ,python-ratelimiter)
6483 ("python-requests" ,python-requests)
6484 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
6485 (home-page "https://snakemake.readthedocs.io")
6486 (synopsis "Python-based execution environment for make-like workflows")
6487 (description
6488 "Snakemake aims to reduce the complexity of creating workflows by
6489providing a clean and modern domain specific specification language (DSL) in
6490Python style, together with a fast and comfortable execution environment.")
6491 (license license:expat)))
6492
44d10b1f
RW
6493(define-public python-pyqrcode
6494 (package
6495 (name "python-pyqrcode")
6496 (version "1.2.1")
6497 (source
6498 (origin
6499 (method url-fetch)
6500 (uri (pypi-uri "PyQRCode" version))
6501 (sha256
6502 (base32
6503 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6504 (build-system python-build-system)
6505 (home-page
6506 "https://github.com/mnooner256/pyqrcode")
6507 (synopsis "QR code generator")
6508 (description
6509 "Pyqrcode is a QR code generator written purely in Python with
6510SVG, EPS, PNG and terminal output.")
6511 (license license:bsd-3)))
6512
6513(define-public python-seaborn
6514 (package
6515 (name "python-seaborn")
0731f943 6516 (version "0.10.0")
44d10b1f
RW
6517 (source
6518 (origin
6519 (method url-fetch)
6520 (uri (pypi-uri "seaborn" version))
6521 (sha256
0731f943 6522 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
44d10b1f
RW
6523 (build-system python-build-system)
6524 (arguments
6525 `(#:phases
6526 (modify-phases %standard-phases
6527 (add-before 'check 'start-xserver
6528 (lambda* (#:key inputs #:allow-other-keys)
6529 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6530 ;; There must be a running X server and make check doesn't
6531 ;; start one. Therefore we must do it.
6532 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6533 (setenv "DISPLAY" ":1")
6534 #t)))
6535 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6536 (propagated-inputs
6537 `(("python-pandas" ,python-pandas)
6538 ("python-matplotlib" ,python-matplotlib)
6539 ("python-numpy" ,python-numpy)
6540 ("python-scipy" ,python-scipy)))
6541 (native-inputs
6542 `(("python-pytest" ,python-pytest)
ff337525 6543 ("xorg-server" ,xorg-server-for-tests)))
d3d73bd6 6544 (home-page "https://seaborn.pydata.org/")
44d10b1f
RW
6545 (synopsis "Statistical data visualization")
6546 (description
6547 "Seaborn is a library for making attractive and informative statistical
6548graphics in Python. It is built on top of matplotlib and tightly integrated
6549with the PyData stack, including support for numpy and pandas data structures
6550and statistical routines from scipy and statsmodels.")
0731f943 6551 (properties `((python2-variant . ,(delay python2-seaborn))))
44d10b1f
RW
6552 (license license:bsd-3)))
6553
0731f943 6554;; 0.9.1 is the last release with support for Python 2.
44d10b1f 6555(define-public python2-seaborn
0731f943
MB
6556 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6557 (package
6558 (inherit base)
6559 (version "0.9.1")
6560 (source (origin
6561 (method url-fetch)
6562 (uri (pypi-uri "seaborn" version))
6563 (sha256
6564 (base32
6565 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
44d10b1f
RW
6566
6567(define-public python-mpmath
6568 (package
6569 (name "python-mpmath")
6570 (version "0.19")
6571 (source (origin
6572 (method url-fetch)
6573 (uri (string-append "http://mpmath.org/files/mpmath-"
6574 version ".tar.gz"))
6575 (sha256
6576 (base32
6577 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6578 (build-system python-build-system)
6579 (arguments
6580 '(#:phases
6581 (modify-phases %standard-phases
6582 (replace 'check
6583 (lambda _
5d7a6f1c 6584 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6585 (home-page "http://mpmath.org")
6586 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6587 (description
6588 "@code{mpmath} can be used as an arbitrary-precision substitute for
6589Python's float/complex types and math/cmath modules, but also does much
6590more advanced mathematics.")
6591 (license license:bsd-3)))
6592
6593(define-public python2-mpmath
6594 (package-with-python2 python-mpmath))
6595
6596(define-public python-bigfloat
6597 (package
6598 (name "python-bigfloat")
6599 (version "0.3.0")
6600 (source
6601 (origin
6602 (method url-fetch)
6603 (uri (pypi-uri "bigfloat" version))
6604 (sha256
6605 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6606 (build-system python-build-system)
6607 (inputs
6608 `(("mpfr" ,mpfr)))
6609 (home-page "https://github.com/mdickinson/bigfloat")
6610 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6611 (description
e36de31b 6612 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6613multiprecision arithmetic.")
6614 (license license:lgpl3+)))
6615
6616(define-public python2-bigfloat
6617 (package-with-python2 python-bigfloat))
6618
6619(define-public python-sympy
6620 (package
6621 (name "python-sympy")
6622 (version "1.1.1")
6623 (source
6624 (origin
6625 (method url-fetch)
6626 (uri (string-append
6627 "https://github.com/sympy/sympy/releases/download/sympy-"
6628 version "/sympy-" version ".tar.gz"))
6629 (sha256
6630 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6631 (build-system python-build-system)
6632 (arguments
6633 `(#:phases
6634 (modify-phases %standard-phases
6635 ;; Run the core tests after installation. By default it would run
6636 ;; *all* tests, which take a very long time to complete and are known
6637 ;; to be flaky.
6638 (delete 'check)
6639 (add-after 'install 'check
6640 (lambda* (#:key outputs #:allow-other-keys)
6641 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6642 #t)))))
6643 (propagated-inputs
6644 `(("python-mpmath" ,python-mpmath)))
2f35985c 6645 (home-page "https://www.sympy.org/")
44d10b1f
RW
6646 (synopsis "Python library for symbolic mathematics")
6647 (description
6648 "SymPy is a Python library for symbolic mathematics. It aims to become a
6649full-featured computer algebra system (CAS) while keeping the code as simple
6650as possible in order to be comprehensible and easily extensible.")
6651 (license license:bsd-3)))
6652
6653(define-public python2-sympy
6654 (package
6655 (inherit (package-with-python2 python-sympy))
6656 (arguments
6657 `(#:phases
6658 (modify-phases %standard-phases
6659 ;; Run the core tests after installation. By default it would run
6660 ;; *all* tests, which take a very long time to complete and are known
6661 ;; to be flaky.
6662 (delete 'check)
6663 (add-after 'install 'check
6664 (lambda* (#:key outputs #:allow-other-keys)
6665 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6666 #t)))))))
6667
6668(define-public python-q
6669 (package
6670 (name "python-q")
6671 (version "2.6")
6672 (source
6673 (origin
6674 (method url-fetch)
6675 (uri (pypi-uri "q" version))
6676 (sha256
6677 (base32
6678 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6679 (build-system python-build-system)
6680 (home-page "https://github.com/zestyping/q")
6681 (synopsis "Quick-and-dirty debugging output for tired programmers")
6682 (description
6683 "q is a Python module for \"print\" style of debugging Python code. It
6684provides convenient short API for print out of values, tracebacks, and
6685falling into the Python interpreter.")
6686 (license license:asl2.0)))
6687
6688(define-public python2-q
6689 (package-with-python2 python-q))
6690
6691(define-public python2-xlib
6692 (package
6693 (name "python2-xlib")
6694 (version "0.14")
6695 (source (origin
6696 (method url-fetch)
6697 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6698 "/" version "/"
6699 "python-xlib-" version ".tar.gz"))
6700 (sha256
6701 (base32
6702 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6703 (build-system python-build-system)
6704 (arguments
6705 `(#:python ,python-2 ;Python 2 only
6706 #:tests? #f)) ;no tests
6707 (home-page "http://python-xlib.sourceforge.net/")
6708 (synopsis "Python X11 client library")
6709 (description
6710 "The Python X Library is intended to be a fully functional X client
6711library for Python programs. It is useful to implement low-level X clients.
6712It is written entirely in Python.")
6713 (license license:gpl2+)))
6714
6715(define-public python-singledispatch
6716 (package
6717 (name "python-singledispatch")
6718 (version "3.4.0.3")
6719 (source
6720 (origin
6721 (method url-fetch)
6722 (uri (pypi-uri "singledispatch" version))
6723 (sha256
6724 (base32
6725 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6726 (build-system python-build-system)
6727 (native-inputs
6728 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6729 (home-page
8680eff3 6730 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
44d10b1f
RW
6731 (synopsis "Backport of singledispatch feature from Python 3.4")
6732 (description
6733 "This library brings functools.singledispatch from Python 3.4 to Python
67342.6-3.3.")
6735 (license license:expat)))
6736
6737(define-public python2-singledispatch
6738 (package-with-python2 python-singledispatch))
6739
6740;; the python- version can be removed with python-3.5
6741(define-public python-backports-abc
6742 (package
6743 (name "python-backports-abc")
6744 (version "0.5")
6745 (source
6746 (origin
6747 (method url-fetch)
6748 (uri (pypi-uri "backports_abc" version))
6749 (sha256
6750 (base32
6751 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6752 (build-system python-build-system)
6753 (home-page "https://github.com/cython/backports_abc")
6754 (synopsis "Backport of additions to the 'collections.abc' module")
6755 (description
6756 "Python-backports-abc provides a backport of additions to the
36a4366d 6757@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6758 (license license:psfl)))
6759
6760(define-public python2-backports-abc
6761 (package-with-python2 python-backports-abc))
6762
6763(define-public python-backports-csv
6764 (package
6765 (name "python-backports-csv")
6766 (version "1.0.5")
6767 (source
6768 (origin
6769 (method url-fetch)
6770 (uri (pypi-uri "backports.csv" version))
6771 (sha256
6772 (base32
6773 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6774 (build-system python-build-system)
6775 (home-page "https://github.com/ryanhiebert/backports.csv")
6776 (synopsis "Backport of Python 3's csv module for Python 2")
6777 (description
6778 "Provides a backport of Python 3's @code{csv} module for parsing
6779comma separated values. The API of the @code{csv} module in Python 2
6780is drastically different from the @code{csv} module in Python 3.
6781This is due, for the most part, to the difference between str in
6782Python 2 and Python 3.")
6783 (license license:psfl)))
6784
6785(define-public python2-backports-csv
6786 (package-with-python2 python-backports-csv))
6787
6788(define-public python2-backports-shutil-get-terminal-size
6789 (package
6790 (name "python2-backports-shutil-get-terminal-size")
6791 (version "1.0.0")
6792 (source
6793 (origin
6794 (method url-fetch)
6795 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6796 (sha256
6797 (base32
6798 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6799 (build-system python-build-system)
6800 (arguments
6801 `(#:python ,python-2
6802 #:phases
6803 (modify-phases %standard-phases
6804 (replace 'check
6805 (lambda _
4a4a7d9a 6806 (invoke "py.test" "-v"))))))
44d10b1f
RW
6807 (native-inputs
6808 `(("python2-pytest" ,python2-pytest)))
6809 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6810 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6811 (description
6812 "This package provides a backport of the @code{get_terminal_size
6813function} from Python 3.3's @code{shutil}.
6814Unlike the original version it is written in pure Python rather than C,
6815so it might be a tiny bit slower.")
6816 (license license:expat)))
6817
6818(define-public python-waf
6819 (package
6820 (name "python-waf")
6c2c11fa 6821 (version "2.0.19")
44d10b1f
RW
6822 (source (origin
6823 (method url-fetch)
6824 (uri (string-append "https://waf.io/"
6825 "waf-" version ".tar.bz2"))
6826 (sha256
6827 (base32
6c2c11fa 6828 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
44d10b1f
RW
6829 (build-system python-build-system)
6830 (arguments
6831 '(#:phases
6832 (modify-phases %standard-phases
6833 (replace 'build
6834 (lambda _
633c8b71
MO
6835 ;; XXX: Find a way to add all extra tools.
6836 (let ((tools '("gccdeps"
6837 "clang_compilation_database")))
6838 (invoke "python" "waf-light" "configure" "build"
6839 (string-append "--tools="
6840 (string-join tools ","))))))
44d10b1f
RW
6841 (replace 'check
6842 (lambda _
6843 (invoke "python" "waf" "--version")))
6844 (replace 'install
6845 (lambda* (#:key outputs #:allow-other-keys)
6846 (let ((out (assoc-ref outputs "out")))
6847 (install-file "waf" (string-append out "/bin")))
6848 #t))
6849 ;; waf breaks when it is wrapped.
6850 (delete 'wrap))))
6851 (home-page "https://waf.io/")
6852 (synopsis "Python-based build system")
6853 (description
6854 "Waf is a Python-based framework for configuring, compiling and installing
6855applications.")
6856 (license license:bsd-3)))
6857
6858(define-public python2-waf
6859 (package-with-python2 python-waf))
6860
6861(define-public python-pyzmq
6862 (package
6863 (name "python-pyzmq")
6864 (version "17.1.2")
6865 (source
6866 (origin
6867 (method url-fetch)
6868 (uri (pypi-uri "pyzmq" version))
6869 (sha256
6870 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6871 (build-system python-build-system)
6872 (arguments
6873 `(#:configure-flags
6874 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6875 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6876 ;; --inplace' for 'python setup.py test' to work.
6877 #:tests? #f))
6878 (inputs
6879 `(("zeromq" ,zeromq)))
6880 (native-inputs
6881 `(("pkg-config" ,pkg-config)
6882 ("python-nose" ,python-nose)))
6883 (home-page "https://github.com/zeromq/pyzmq")
6884 (synopsis "Python bindings for 0MQ")
6885 (description
6886 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6887 (license license:bsd-4)))
6888
6889(define-public python2-pyzmq
6890 (package-with-python2 python-pyzmq))
6891
6892(define-public python-pep8
6893 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6894 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6895 ;; some dependents' test suites, and nothing more.
6896 (package
6897 (name "python-pep8")
6898 (version "1.7.0")
6899 (source
6900 (origin
6901 (method url-fetch)
6902 (uri (pypi-uri "pep8" version))
6903 (sha256
6904 (base32
2be878d8
CB
6905 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6906 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6907 (build-system python-build-system)
6908 (home-page "https://pep8.readthedocs.org/")
6909 (synopsis "Python style guide checker")
6910 (description
6911 "This tools checks Python code against some of the style conventions in
6912PEP 8.")
6913 (license license:expat)))
6914
6915(define-public python2-pep8
6916 (package-with-python2 python-pep8))
6917
6918(define-public python-pyflakes
6919 (package
6920 (name "python-pyflakes")
d0cba11b 6921 (version "2.1.1")
44d10b1f
RW
6922 (source
6923 (origin
6924 (method url-fetch)
6925 (uri (pypi-uri "pyflakes" version))
6926 (sha256
6927 (base32
d0cba11b 6928 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6929 (build-system python-build-system)
6930 (home-page
6931 "https://github.com/pyflakes/pyflakes")
6932 (synopsis "Passive checker of Python programs")
6933 (description
6934 "Pyflakes statically checks Python source code for common errors.")
6935 (license license:expat)))
6936
6937(define-public python2-pyflakes
6938 (package-with-python2 python-pyflakes))
6939
6940(define-public python-mccabe
6941 (package
6942 (name "python-mccabe")
6943 (version "0.6.1")
6944 (source
6945 (origin
6946 (method url-fetch)
6947 (uri (pypi-uri "mccabe" version))
6948 (sha256
6949 (base32
6950 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6951 (build-system python-build-system)
6952 (native-inputs
6953 `(("python-pytest" ,python-pytest-bootstrap)
6954 ("python-pytest-runner" ,python-pytest-runner)))
6955 (home-page "https://github.com/flintwork/mccabe")
6956 (synopsis "McCabe checker, plugin for flake8")
6957 (description
6958 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6959complexity of Python source code.")
6960 (license license:expat)))
6961
6962(define-public python2-mccabe
6963 (package-with-python2 python-mccabe))
6964
6965(define-public python-mccabe-0.2.1
6966 (package (inherit python-mccabe)
6967 (version "0.2.1")
6968 (source
6969 (origin
6970 (method url-fetch)
6971 (uri (pypi-uri "mccabe" version))
6972 (sha256
6973 (base32
6974 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6975
6976(define-public python2-mccabe-0.2.1
6977 (package-with-python2 python-mccabe-0.2.1))
6978
6979;; Flake8 2.4.1 requires an older version of pep8.
6980;; This should be removed ASAP.
6981(define-public python-pep8-1.5.7
6982 (package (inherit python-pep8)
6983 (version "1.5.7")
6984 (source
f3576970
RW
6985 (origin
6986 (method url-fetch)
6987 (uri (pypi-uri "pep8" version))
6988 (sha256
6989 (base32
6990 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6991 (arguments
6992 ;; XXX Tests not compatible with Python 3.5.
6993 '(#:tests? #f))))
6994
6995(define-public python2-pep8-1.5.7
6996 (package-with-python2 python-pep8-1.5.7))
6997
6998;; Flake8 2.4.1 requires an older version of pyflakes.
6999;; This should be removed ASAP.
7000(define-public python-pyflakes-0.8.1
7001 (package (inherit python-pyflakes)
7002 (version "0.8.1")
7003 (source
8c4dffb5
RW
7004 (origin
7005 (method url-fetch)
7006 (uri (pypi-uri "pyflakes" version))
7007 (sha256
7008 (base32
7009 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
7010 (arguments
7011 ;; XXX Tests not compatible with Python 3.5.
7012 '(#:tests? #f))))
7013
7014(define-public python2-pyflakes-0.8.1
7015 (package-with-python2 python-pyflakes-0.8.1))
7016
ac63cf0a 7017(define-public python-flake8
44d10b1f
RW
7018 (package
7019 (name "python-flake8")
beaff4a8 7020 (version "3.7.7")
ac63cf0a
MB
7021 (source (origin
7022 (method url-fetch)
7023 (uri (pypi-uri "flake8" version))
7024 (sha256
7025 (base32
beaff4a8 7026 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
7027 (build-system python-build-system)
7028 (arguments
7029 `(#:phases
7030 (modify-phases %standard-phases
44d10b1f
RW
7031 (delete 'check)
7032 (add-after 'install 'check
7033 (lambda* (#:key inputs outputs #:allow-other-keys)
7034 (add-installed-pythonpath inputs outputs)
7035 (invoke "pytest" "-v")
7036 #t)))))
7037 (propagated-inputs
7038 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 7039 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
7040 ("python-pyflakes" ,python-pyflakes)
7041 ("python-mccabe" ,python-mccabe)))
7042 (native-inputs
7043 `(("python-mock" ,python-mock)
7044 ("python-pytest" ,python-pytest-bootstrap)
7045 ("python-pytest-runner" ,python-pytest-runner)))
7046 (home-page "https://gitlab.com/pycqa/flake8")
7047 (synopsis
7048 "The modular source code checker: pep8, pyflakes and co")
7049 (description
7050 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 7051 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
7052 (license license:expat)))
7053
ac63cf0a
MB
7054(define-public python2-flake8
7055 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
7056 (package (inherit base)
7057 (propagated-inputs
7058 `(("python2-configparser" ,python2-configparser)
7059 ("python2-enum34" ,python2-enum34)
f8205d9a 7060 ("python2-functools32" ,python2-functools32)
beaff4a8 7061 ("python2-typing" ,python2-typing)
44d10b1f
RW
7062 ,@(package-propagated-inputs base))))))
7063
44d10b1f
RW
7064;; python-hacking requires flake8 <2.6.0.
7065(define-public python-flake8-2.5
7066 (package
7067 (inherit python-flake8)
7068 (version "2.5.5")
7069 (source (origin
7070 (method url-fetch)
7071 (uri (pypi-uri "flake8" version))
7072 (sha256
7073 (base32
7074 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
7075 (propagated-inputs
7076 `(("python-pep8" ,python-pep8)
7077 ,@(package-propagated-inputs python-flake8)))
7078 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
7079
7080(define-public python2-flake8-2.5
7081 (package
7082 (inherit python2-flake8)
7083 (version (package-version python-flake8-2.5))
7084 (source (origin
7085 (inherit (package-source python-flake8-2.5))))
7086 (propagated-inputs
7087 `(("python2-pep8" ,python2-pep8)
7088 ,@(package-propagated-inputs python2-flake8)))))
7089
7090(define-public python-flake8-polyfill
7091 (package
7092 (name "python-flake8-polyfill")
7093 (version "1.0.2")
7094 (source
7095 (origin
7096 (method url-fetch)
7097 (uri (pypi-uri "flake8-polyfill" version))
7098 (sha256
7099 (base32
7100 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
7101 (build-system python-build-system)
7102 (arguments
7103 '(#:phases
7104 (modify-phases %standard-phases
7105 (replace 'check
7106 (lambda _
40a7153d
MB
7107 ;; Be compatible with Pytest 4:
7108 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
7109 (substitute* "setup.cfg"
7110 (("\\[pytest\\]")
7111 "[tool:pytest]"))
7112
44d10b1f
RW
7113 (setenv "PYTHONPATH"
7114 (string-append (getcwd) "/build/lib:"
7115 (getenv "PYTHONPATH")))
4f0a0894 7116 (invoke "py.test" "-v"))))))
44d10b1f
RW
7117 (native-inputs
7118 `(("python-flake8" ,python-flake8)
7119 ("python-mock" ,python-mock)
7120 ("python-pep8" ,python-pep8)
7121 ("python-pycodestyle" ,python-pycodestyle)
7122 ("python-pytest" ,python-pytest)))
7123 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7124 (synopsis "Polyfill package for Flake8 plugins")
7125 (description
7126 "This package that provides some compatibility helpers for Flake8
7127plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7128 (license license:expat)))
7129
7130(define-public python2-flake8-polyfill
7131 (package-with-python2 python-flake8-polyfill))
7132
7133(define-public python-mistune
7134 (package
7135 (name "python-mistune")
7136 (version "0.8.4")
7137 (source
7138 (origin
7139 (method url-fetch)
7140 (uri (pypi-uri "mistune" version))
7141 (sha256
7142 (base32
7143 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
7144 (build-system python-build-system)
7145 (native-inputs
7146 `(("python-nose" ,python-nose)
7147 ("python-cython" ,python-cython)))
7148 (home-page "https://github.com/lepture/mistune")
7149 (synopsis "Markdown parser in pure Python")
7150 (description "This package provides a fast markdown parser in pure
7151Python.")
7152 (license license:bsd-3)))
7153
7154(define-public python2-mistune
7155 (package-with-python2 python-mistune))
7156
7157(define-public python-markdown
7158 (package
7159 (name "python-markdown")
0d1d0a6e 7160 (version "3.2.1")
44d10b1f
RW
7161 (source
7162 (origin
7163 (method url-fetch)
7164 (uri (pypi-uri "Markdown" version))
7165 (sha256
7166 (base32
0d1d0a6e 7167 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
44d10b1f
RW
7168 (build-system python-build-system)
7169 (native-inputs
7170 `(("python-nose" ,python-nose)
7171 ("python-pyyaml" ,python-pyyaml)))
7172 (home-page "https://python-markdown.github.io/")
7173 (synopsis "Python implementation of Markdown")
7174 (description
7175 "This package provides a Python implementation of John Gruber's
7176Markdown. The library features international input, various Markdown
7177extensions, and several HTML output formats. A command line wrapper
7178markdown_py is also provided to convert Markdown files to HTML.")
2537ce68 7179 (properties `((python2-variant . ,(delay python2-markdown))))
44d10b1f
RW
7180 (license license:bsd-3)))
7181
2537ce68 7182;; Markdown 3.2 dropped support for Python 2.
44d10b1f 7183(define-public python2-markdown
2537ce68
MB
7184 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
7185 (package/inherit
7186 base
7187 (version "3.1.1")
7188 (source (origin
7189 (method url-fetch)
7190 (uri (pypi-uri "Markdown" version))
7191 (sha256
7192 (base32
7193 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
44d10b1f
RW
7194
7195(define-public python-ptyprocess
7196 (package
7197 (name "python-ptyprocess")
7198 (version "0.5.2")
7199 (source
7200 (origin
7201 (method url-fetch)
7202 (uri (pypi-uri "ptyprocess" version))
7203 (sha256
7204 (base32
7205 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
7206 (build-system python-build-system)
7207 (native-inputs
7208 `(("python-nose" ,python-nose)))
7209 (arguments
7210 `(#:phases
7211 (modify-phases %standard-phases
7212 (replace 'check
7904d6fa 7213 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
7214 (home-page "https://github.com/pexpect/ptyprocess")
7215 (synopsis "Run a subprocess in a pseudo terminal")
7216 (description
7217 "This package provides a Python library used to launch a subprocess in a
7218pseudo terminal (pty), and interact with both the process and its pty.")
7219 (license license:isc)))
7220
7221(define-public python2-ptyprocess
7222 (package-with-python2 python-ptyprocess))
7223
7224(define-public python-cram
7225 (package
7226 (name "python-cram")
7227 (version "0.7")
7228 (home-page "https://bitheap.org/cram/")
7229 (source (origin
7230 (method url-fetch)
7231 (uri (list (string-append home-page "cram-"
7232 version ".tar.gz")
7233 (pypi-uri "cram" version)))
7234 (sha256
7235 (base32
7236 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7237 (arguments
7238 '(#:phases
7239 (modify-phases %standard-phases
7240 (add-after 'unpack 'patch-source
7241 (lambda _
7242 (substitute* (find-files "cram" ".*\\.py$")
7243 ;; Replace default shell path.
7244 (("/bin/sh") (which "sh")))
7245 (substitute* (find-files "tests" ".*\\.t$")
7246 (("md5") "md5sum")
7247 (("/bin/bash") (which "bash"))
7248 (("/bin/sh") (which "sh")))
7249 (substitute* "cram/_test.py"
7250 ;; This hack works around a bug triggered by substituting
7251 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7252 ;; "cram -h", which breaks the output at 80 characters. This
7253 ;; causes the line showing the default shell to break into two
7254 ;; lines, but the test expects a single line...
7255 (("env\\['COLUMNS'\\] = '80'")
7256 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
7257
7258 (substitute* "Makefile"
7259 ;; Recent versions of python-coverage have caused the test
7260 ;; coverage to decrease (as of version 0.7). Allow that.
7261 (("--fail-under=100")
7262 "--fail-under=90"))
7263
44d10b1f 7264 #t))
ff1e80d7 7265 (replace 'check
44d10b1f 7266 ;; The test phase uses the built library and executable.
44d10b1f
RW
7267 (lambda* (#:key inputs outputs #:allow-other-keys)
7268 (add-installed-pythonpath inputs outputs)
7269 (setenv "PATH" (string-append (getenv "PATH") ":"
7270 (assoc-ref outputs "out") "/bin"))
2d7db192 7271 (invoke "make" "test"))))))
44d10b1f
RW
7272 (build-system python-build-system)
7273 (native-inputs
7274 `(("python-coverage" ,python-coverage)
7275 ("which" ,which)))
7276 (synopsis "Simple testing framework for command line applications")
7277 (description
7278 "Cram is a functional testing framework for command line applications.
7279Cram tests look like snippets of interactive shell sessions. Cram runs each
7280command and compares the command output in the test with the command’s actual
7281output.")
7282 (license license:gpl2+)))
7283
7284(define-public python2-cram
7285 (package-with-python2 python-cram))
7286
7287(define-public python-straight-plugin
7288 (package
7289 (name "python-straight-plugin")
7290 (version "1.4.1")
7291 (source
7292 (origin
7293 (method url-fetch)
7294 (uri (pypi-uri "straight.plugin" version))
7295 (sha256
7296 (base32
7297 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7298 (build-system python-build-system)
7299 (home-page "https://github.com/ironfroggy/straight.plugin")
7300 (synopsis "Simple namespaced plugin facility")
7301 (description "Straight Plugin provides a type of plugin you can create from
7302almost any existing Python modules, and an easy way for outside developers to
7303add functionality and customization to your projects with their own plugins.")
7304 (license license:expat)))
7305
7306(define-public python2-straight-plugin
7307 (package-with-python2 python-straight-plugin))
7308
7309(define-public python-fonttools
7310 (package
7311 (name "python-fonttools")
1a4bb420 7312 (version "3.38.0")
44d10b1f
RW
7313 (source (origin
7314 (method url-fetch)
7315 (uri (pypi-uri "fonttools" version ".zip"))
7316 (sha256
7317 (base32
1a4bb420 7318 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
7319 (build-system python-build-system)
7320 (native-inputs
7321 `(("unzip" ,unzip)
7322 ("python-pytest" ,python-pytest)
7323 ("python-pytest-runner" ,python-pytest-runner)))
9d25a454 7324 (home-page "https://github.com/fonttools/fonttools")
44d10b1f
RW
7325 (synopsis "Tools to manipulate font files")
7326 (description
7327 "FontTools/TTX is a library to manipulate font files from Python. It
7328supports reading and writing of TrueType/OpenType fonts, reading and writing
7329of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7330also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7331from an XML-based format.")
7332 (license license:expat)))
7333
7334(define-public python2-fonttools
7335 (package-with-python2 python-fonttools))
7336
7337(define-public python-ly
7338 (package
7339 (name "python-ly")
7340 (version "0.9.5")
7341 (source
7342 (origin
7343 (method url-fetch)
7344 (uri (pypi-uri name version))
7345 (sha256
7346 (base32
7347 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7348 (build-system python-build-system)
7349 (arguments
7350 ;; FIXME: Some tests need network access.
7351 '(#:tests? #f))
7352 (synopsis "Tool and library for manipulating LilyPond files")
7353 (description "This package provides a Python library to parse, manipulate
7354or create documents in LilyPond format. A command line program ly is also
7355provided that can be used to do various manipulations with LilyPond files.")
e85af137 7356 (home-page "https://pypi.org/project/python-ly/")
44d10b1f
RW
7357 (license license:gpl2+)))
7358
7359(define-public python-appdirs
7360 (package
7361 (name "python-appdirs")
7362 (version "1.4.3")
7363 (source
7364 (origin
7365 (method url-fetch)
7366 (uri (pypi-uri "appdirs" version))
7367 (sha256
7368 (base32
7369 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7370 (build-system python-build-system)
7371 (home-page "https://github.com/ActiveState/appdirs")
7372 (synopsis
7373 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7374 (description
7375 "This module provides a portable way of finding out where user data
7376should be stored on various operating systems.")
7377 (license license:expat)))
7378
7379(define-public python2-appdirs
7380 (package-with-python2 python-appdirs))
7381
7382(define-public python-llfuse
7383 (package
7384 (name "python-llfuse")
7385 (version "1.3.5")
7386 (source (origin
7387 (method url-fetch)
7388 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7389 (sha256
7390 (base32
7391 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7392 (build-system python-build-system)
7393 (inputs
7394 `(("fuse" ,fuse)
7395 ("attr" ,attr)))
7396 (native-inputs
7397 `(("pkg-config" ,pkg-config)))
7398 (synopsis "Python bindings for FUSE")
7399 (description
7400 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7401 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7402 (license license:lgpl2.0+)
7403 (properties `((python2-variant . ,(delay python2-llfuse))))))
7404
7405(define-public python2-llfuse
7406 (package (inherit (package-with-python2
7407 (strip-python2-variant python-llfuse)))
7408 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7409
7410;; For attic-0.16
7411(define-public python-llfuse-0.41
7412 (package (inherit python-llfuse)
7413 (version "0.41.1")
7414 (source (origin
7415 (method url-fetch)
7416 (uri (string-append
7417 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7418 "llfuse-" version ".tar.bz2"))
7419 (sha256
7420 (base32
7421 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7422 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7423 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7424 (license (list license:expat license:lgpl2.0+))))
7425
7426(define-public python-msgpack
7427 (package
7428 (name "python-msgpack")
7429 (version "0.5.6")
7430 (source (origin
7431 (method url-fetch)
7432 (uri (pypi-uri "msgpack" version))
7433 (sha256
7434 (base32
7435 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7436 (build-system python-build-system)
7437 (arguments
7438 `(#:modules ((guix build utils)
7439 (guix build python-build-system)
7440 (ice-9 ftw)
7441 (srfi srfi-1)
7442 (srfi srfi-26))
7443 #:phases
7444 (modify-phases %standard-phases
7445 (replace 'check
7446 (lambda _
7447 (let ((cwd (getcwd)))
7448 (setenv "PYTHONPATH"
7449 (string-append cwd "/build/"
7450 (find (cut string-prefix? "lib" <>)
7451 (scandir (string-append cwd "/build")))
7452 ":"
7453 (getenv "PYTHONPATH")))
7454 (invoke "pytest" "-v" "test")))))))
7455 (native-inputs
7456 `(("python-pytest" ,python-pytest)))
7457 (synopsis "MessagePack (de)serializer")
7458 (description "MessagePack is a fast, compact binary serialization format,
7459suitable for similar data to JSON. This package provides CPython bindings for
7460reading and writing MessagePack data.")
e85af137 7461 (home-page "https://pypi.org/project/msgpack/")
44d10b1f
RW
7462 (license license:asl2.0)))
7463
7464;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7465;; release 0.5. Some packages like borg still call it by the old name for now.
7466;; <https://bugs.gnu.org/30662>
7467(define-public python-msgpack-transitional
7468 (package
7469 (inherit python-msgpack)
7470 (name "python-msgpack-transitional")
7471 (arguments
7472 (substitute-keyword-arguments (package-arguments python-msgpack)
7473 ((#:phases phases)
7474 `(modify-phases ,phases
7475 (add-after 'unpack 'configure-transitional
7476 (lambda _
7477 ;; Keep using the old name.
7478 (substitute* "setup.py"
7479 (("TRANSITIONAL = False")
7480 "TRANSITIONAL = 1"))
7481 #t))))))))
7482
7483(define-public python2-msgpack
7484 (package-with-python2 python-msgpack))
7485
7486(define-public python-netaddr
7487 (package
7488 (name "python-netaddr")
7489 (version "0.7.19")
7490 (source
7491 (origin
7492 (method url-fetch)
7493 (uri (pypi-uri "netaddr" version))
7494 (sha256
7495 (base32
7496 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7497 (build-system python-build-system)
7498 (arguments `(#:tests? #f)) ;; No tests.
7499 (home-page "https://github.com/drkjam/netaddr/")
7500 (synopsis "Pythonic manipulation of network addresses")
7501 (description
7502 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7503and MAC network addresses.")
7504 (license license:bsd-3)))
7505
7506(define-public python2-netaddr
7507 (package-with-python2 python-netaddr))
7508
dd85eca0
AG
7509(define-public python2-pyroute2
7510 (package
7511 (name "python2-pyroute2")
7512 (version "0.5.6")
7513 (source
7514 (origin
7515 (method url-fetch)
7516 (uri (pypi-uri "pyroute2" version))
7517 (sha256
7518 (base32
7519 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7520 (build-system python-build-system)
7521 (arguments
7522 `(#:python ,python-2)) ;Python 3.x is not supported
7523 (home-page "https://github.com/svinota/pyroute2")
7524 (synopsis "Python netlink library")
7525 (description
7526 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7527Supported netlink families and protocols include:
7528@itemize
7529@item rtnl, network settings - addresses, routes, traffic controls
7530@item nfnetlink - netfilter API: ipset, nftables, ...
7531@item ipq - simplest userspace packet filtering, iptables QUEUE target
7532@item devlink - manage and monitor devlink-enabled hardware
7533@item generic - generic netlink families
7534 @itemize
7535 @item nl80211 - wireless functions API (basic support)
7536 @item taskstats - extended process statistics
7537 @item acpi_events - ACPI events monitoring
7538 @item thermal_events - thermal events monitoring
7539 @item VFS_DQUOT - disk quota events monitoring
7540 @end itemize
7541@end itemize")
7542 (license license:gpl2+)))
7543
44d10b1f
RW
7544(define-public python-wrapt
7545 (package
7546 (name "python-wrapt")
2271a1dc 7547 (version "1.11.2")
44d10b1f 7548 (source
2271a1dc
MB
7549 (origin
7550 (method url-fetch)
7551 (uri (pypi-uri "wrapt" version))
7552 (sha256
7553 (base32
7554 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7555 (build-system python-build-system)
7556 (arguments
7557 ;; Tests are not included in the tarball, they are only available in the
7558 ;; git repository.
7559 `(#:tests? #f))
7560 (home-page "https://github.com/GrahamDumpleton/wrapt")
7561 (synopsis "Module for decorators, wrappers and monkey patching")
7562 (description
2271a1dc 7563 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7564 Python, which can be used as the basis for the construction of function
7565 wrappers and decorator functions.")
7566 (license license:bsd-2)))
7567
7568(define-public python2-wrapt
7569 (package-with-python2 python-wrapt))
7570
7571(define-public python-xlrd
7572 (package
7573 (name "python-xlrd")
3a2b1a3c 7574 (version "1.2.0")
44d10b1f
RW
7575 (source (origin
7576 (method url-fetch)
7577 (uri (pypi-uri "xlrd" version))
7578 (sha256
7579 (base32
3a2b1a3c 7580 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7581 (build-system python-build-system)
7582 (arguments
7583 `(#:phases
7584 (modify-phases %standard-phases
3ccdd3a5
MO
7585 ;; Some tests depend on writing a temporary file to the user's home
7586 ;; directory.
3a2b1a3c
GL
7587 (add-after 'unpack 'fix-tests
7588 (lambda _
7589 (delete-file "tests/test_open_workbook.py")
7590 #t)))))
44d10b1f
RW
7591 (home-page "http://www.python-excel.org/")
7592 (synopsis "Library for extracting data from Excel files")
a0909286 7593 (description "This package provides a library to extract data from
44d10b1f
RW
7594spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7595@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7596Unicode-aware. It is not intended as an end-user tool.")
7597 (license license:bsd-3)))
7598
7599(define-public python2-xlrd
7600 (package-with-python2 python-xlrd))
7601
7602(define-public python-prettytable
7603 (package
7604 (name "python-prettytable")
7605 (version "0.7.2")
7606 (source
7607 (origin
7608 (method url-fetch)
337c3a1e 7609 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7610 (sha256
7611 (base32
7612 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7613 (build-system python-build-system)
8be58b48 7614 (home-page "https://code.google.com/archive/p/prettytable/")
44d10b1f
RW
7615 (synopsis "Display tabular data in an ASCII table format")
7616 (description
7617 "A library designed to represent tabular data in visually appealing ASCII
7618tables. PrettyTable allows for selection of which columns are to be printed,
7619independent alignment of columns (left or right justified or centred) and
7620printing of sub-tables by specifying a row range.")
7621 (license license:bsd-3)))
7622
7623(define-public python2-prettytable
7624 (package-with-python2 python-prettytable))
7625
7626(define-public python-tables
7627 (package
7628 (name "python-tables")
7629 (version "3.4.4")
7630 (source
7631 (origin
7632 (method url-fetch)
7633 (uri (pypi-uri "tables" version))
7634 (sha256
7635 (base32
7636 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7637 (modules '((guix build utils)))
7638 (snippet
7639 '(begin
7640 ;; Remove pre-compiled .pyc files from source.
7641 (for-each delete-file-recursively
7642 (find-files "." "__pycache__" #:directories? #t))
7643 (for-each delete-file (find-files "." "\\.pyc$"))
7644 #t))))
7645 (build-system python-build-system)
7646 (arguments
7647 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7648 ;; or "check", so we must override the build and check phases.
7649 #:phases
7650 (modify-phases %standard-phases
7651 (add-after 'unpack 'use-gcc
7652 (lambda _
7653 (substitute* "setup.py"
7654 (("compiler = new_compiler\\(\\)" line)
7655 (string-append line
7656 "\ncompiler.set_executables(compiler='gcc',"
7657 "compiler_so='gcc',"
7658 "linker_exe='gcc',"
7659 "linker_so='gcc -shared')")))
7660 #t))
70b74663
RW
7661 (add-after 'unpack 'disable-tuning
7662 (lambda _
7663 (substitute* "setup.py"
7664 (("cpu_flags = .*")
7665 "cpu_flags = ['sse2']\n"))
7666 #t))
44d10b1f
RW
7667 (replace 'build
7668 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7669 (invoke "python" "setup.py" "build"
7670 (string-append "--hdf5="
7671 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7672 (replace 'check
7673 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7674 (invoke "python" "setup.py" "check"
7675 (string-append "--hdf5="
7676 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7677 (propagated-inputs
7678 `(("python-numexpr" ,python-numexpr)
7679 ("python-numpy" ,python-numpy)))
7680 (native-inputs
7681 `(("python-cython" ,python-cython)
7682 ("pkg-config" ,pkg-config)))
7683 (inputs
538c1a02 7684 `(("hdf5" ,hdf5-1.10)
44d10b1f
RW
7685 ("bzip2" ,bzip2)
7686 ("zlib" ,zlib)))
7687 (home-page "http://www.pytables.org/")
7688 (synopsis "Hierarchical datasets for Python")
7689 (description "PyTables is a package for managing hierarchical datasets and
7690designed to efficiently cope with extremely large amounts of data.")
7691 (license license:bsd-3)))
7692
7693(define-public python2-tables
7694 (package-with-python2 python-tables))
7695
cc2c2850
RW
7696(define-public python-pytest-black
7697 (package
7698 (name "python-pytest-black")
7699 (version "0.3.8")
7700 (source
7701 (origin
7702 (method url-fetch)
7703 (uri (pypi-uri "pytest-black" version))
7704 (sha256
7705 (base32
7706 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
7707 (build-system python-build-system)
7708 (propagated-inputs
7709 `(("python-pytest" ,python-pytest)
7710 ("python-black" ,python-black)
7711 ("python-toml" ,python-toml)))
7712 (native-inputs
7713 `(("python-setuptools-scm" ,python-setuptools-scm)))
7714 (home-page "https://github.com/shopkeep/pytest-black")
7715 (synopsis "Pytest plugin to enable format checking with black")
7716 (description
7717 "This package provides a pytest plugin to enable format checking with the
7718Python code formatter \"black\".")
7719 (license license:expat)))
7720
2ceff35f
RW
7721(define-public python-get-version
7722 (package
7723 (name "python-get-version")
7724 (version "2.1")
7725 (source
7726 (origin
7727 (method url-fetch)
7728 (uri (pypi-uri "get_version" version))
7729 (sha256
7730 (base32
7731 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
7732 (build-system python-build-system)
7733 (propagated-inputs
7734 `(("python-pygments" ,python-pygments)
7735 ("python-pytest" ,python-pytest)
7736 ("python-pytest-black" ,python-pytest-black)
7737 ("python-pytest-cov" ,python-pytest-cov)
7738 ("python-setuptools" ,python-setuptools)
7739 ("python-testpath" ,python-testpath)))
7740 (home-page "https://github.com/flying-sheep/get_version")
7741 (synopsis "Version helper in the spirit of versioneer")
7742 (description
7743 "This package provides a version helper that lets you automatically use
7744the latest @code{vX.X.X} Git tag as the version in your Python package. It
7745also supports getting the version from Python source distributions or, once
7746your package is installed, via @code{pkg_resources} (part of
7747@code{setuptools}).")
7748 (license license:gpl3+)))
7749
053ab825
RW
7750(define-public python-legacy-api-wrap
7751 (package
7752 (name "python-legacy-api-wrap")
7753 (version "1.2")
7754 (source
7755 (origin
7756 (method url-fetch)
7757 (uri (pypi-uri "legacy-api-wrap" version))
7758 (sha256
7759 (base32
7760 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
7761 (build-system python-build-system)
7762 (propagated-inputs
7763 `(("python-get-version" ,python-get-version)
7764 ("python-pytest" ,python-pytest)
7765 ("python-pytest-black" ,python-pytest-black)
7766 ("python-pytest-cov" ,python-pytest-cov)
7767 ("python-setuptools" ,python-setuptools)))
7768 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
7769 (synopsis "Legacy API wrapper")
7770 (description "This module defines a decorator to wrap legacy APIs. The
7771primary use case is APIs defined before keyword-only parameters existed.")
7772 (license license:gpl3+)))
7773
44d10b1f
RW
7774(define-public python-pyasn1
7775 (package
7776 (name "python-pyasn1")
7777 (version "0.4.3")
7778 (source
7779 (origin
7780 (method url-fetch)
7781 (uri (pypi-uri "pyasn1" version))
7782 (sha256
7783 (base32
7784 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7785 (build-system python-build-system)
7786 (home-page "http://pyasn1.sourceforge.net/")
7787 (synopsis "ASN.1 types and codecs")
7788 (description
7789 "This is an implementation of ASN.1 types and codecs in Python. It is
7790suitable for a wide range of protocols based on the ASN.1 specification.")
7791 (license license:bsd-2)))
7792
7793(define-public python2-pyasn1
7794 (package-with-python2 python-pyasn1))
7795
7796(define-public python-pyasn1-modules
7797 (package
7798 (name "python-pyasn1-modules")
7799 (version "0.2.2")
7800 (source
7801 (origin
7802 (method url-fetch)
7803 (uri (pypi-uri "pyasn1-modules" version))
7804 (sha256
7805 (base32
7806 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7807 (build-system python-build-system)
7808 (propagated-inputs
7809 `(("python-pyasn1" ,python-pyasn1)))
7810 (home-page "https://sourceforge.net/projects/pyasn1/")
7811 (synopsis "ASN.1 codec implementations")
7812 (description
7813 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7814implementations of ASN.1-based codecs and protocols.")
7815 (license license:bsd-3)))
7816
7817(define-public python2-pyasn1-modules
7818 (package-with-python2 python-pyasn1-modules))
7819
7820(define-public python-ipaddress
7821 (package
7822 (name "python-ipaddress")
7823 (version "1.0.22")
7824 (source (origin
7825 (method url-fetch)
7826 (uri (pypi-uri "ipaddress" version))
7827 (sha256
7828 (base32
7829 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7830 (build-system python-build-system)
7831 (home-page "https://github.com/phihag/ipaddress")
7832 (synopsis "IP address manipulation library")
7833 (description
7834 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7835 in Python. This library is used to create, poke at, and manipulate IPv4 and
7836 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7837 module to older versions of Python.")
7838 (license license:psfl)))
7839
7840(define-public python2-ipaddress
7841 (package-with-python2 python-ipaddress))
7842
7843(define-public python2-ipaddr
7844 (package
7845 (name "python2-ipaddr")
7846 (version "2.1.11")
7847 (source
7848 (origin
7849 (method url-fetch)
7850 (uri (pypi-uri "ipaddr" version))
7851 (sha256
7852 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7853 (build-system python-build-system)
7854 (arguments
7855 `(#:python ,python-2 ;version 2 only
7856 #:phases
7857 (modify-phases %standard-phases
7858 (replace 'check
40b8c4e3 7859 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7860 (home-page "https://github.com/google/ipaddr-py")
7861 (synopsis "IP address manipulation library")
7862 (description
7863 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7864IPv6 addresses and networks.
7865
7866For new implementations you may prefer to use the standard module
7867@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7868versions of Python.")
7869 (license license:asl2.0)))
7870
7871(define-public python-idna
7872 (package
7873 (name "python-idna")
e95c9837 7874 (version "2.8")
44d10b1f
RW
7875 (source
7876 (origin
7877 (method url-fetch)
7878 (uri (pypi-uri "idna" version))
7879 (sha256
7880 (base32
e95c9837 7881 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7882 (build-system python-build-system)
7883 (home-page "https://github.com/kjd/idna")
7884 (synopsis "Internationalized domain names in applications")
7885 (description
7886 "This is a library to support the Internationalised Domain Names in
7887Applications (IDNA) protocol as specified in RFC 5891. This version of the
7888protocol is often referred to as “IDNA2008” and can produce different results
7889from the earlier standard from 2003. The library is also intended to act as a
7890suitable drop-in replacement for the “encodings.idna” module that comes with
7891the Python standard library but currently only supports the older 2003
7892specification.")
7893 (license license:bsd-4)))
7894
a76e6a69
JM
7895(define-public python-idna-2.7
7896 (package (inherit python-idna)
7897 (version "2.7")
7898 (source (origin
7899 (method url-fetch)
7900 (uri (pypi-uri "idna" version))
7901 (sha256
7902 (base32
7903 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7904
7905
44d10b1f
RW
7906(define-public python2-idna
7907 (package-with-python2 python-idna))
7908
7909(define-public python-idna-ssl
7910 (package
7911 (name "python-idna-ssl")
7912 (version "1.0.1")
7913 (source
7914 (origin
7915 (method url-fetch)
7916 (uri (pypi-uri "idna-ssl" version))
7917 (sha256
7918 (base32
7919 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7920 (build-system python-build-system)
7921 (arguments
7922 `(#:tests? #f)) ;circular dependency with python-aiohttp
7923 (home-page "https://github.com/aio-libs/idna-ssl")
7924 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7925 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7926domains support.")
7927 (license license:expat)))
7928
7929(define-public python-pretend
7930 (package
7931 (name "python-pretend")
7932 (version "1.0.9")
7933 (source
7934 (origin
7935 (method url-fetch)
9f1f22ee 7936 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7937 (sha256
7938 (base32
7939 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7940 (build-system python-build-system)
7941 (home-page "https://github.com/alex/pretend")
7942 (synopsis "Library for stubbing in Python")
7943 (description
7944 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7945technique for writing tests. You may hear the term mixed up with mocks,
7946fakes, or doubles. Basically, a stub is an object that returns pre-canned
7947responses, rather than doing any computation.")
7948 (license license:bsd-3)))
7949
7950(define-public python2-pretend
7951 (package-with-python2 python-pretend))
7952
7953(define-public python-pip
7954 (package
7955 (name "python-pip")
0a193d32 7956 (version "20.0.2")
44d10b1f
RW
7957 (source
7958 (origin
7959 (method url-fetch)
7960 (uri (pypi-uri "pip" version))
7961 (sha256
7962 (base32
0a193d32 7963 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
44d10b1f
RW
7964 (build-system python-build-system)
7965 (arguments
7966 '(#:tests? #f)) ; there are no tests in the pypi archive.
7967 (home-page "https://pip.pypa.io/")
7968 (synopsis "Package manager for Python software")
7969 (description
7970 "Pip is a package manager for Python software, that finds packages on the
7971Python Package Index (PyPI).")
7972 (license license:expat)))
7973
7974(define-public python2-pip
7975 (package-with-python2 python-pip))
7976
7977(define-public python-tlsh
7978 (package
7979 (name "python-tlsh")
7980 (version "3.4.5")
7981 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7982 (source
7983 (origin
7984 (method git-fetch)
7985 (uri (git-reference
7986 (url "https://github.com/trendmicro/tlsh.git")
7987 (commit (string-append "v" version))))
7988 (file-name (git-file-name name version))
7989 (sha256
7990 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7991 (build-system cmake-build-system)
7992 (arguments
7993 '(#:out-of-source? #f
7994 #:phases (modify-phases %standard-phases
7995 (replace
7996 'install
7997 (lambda* (#:key outputs #:allow-other-keys)
7998 ;; Build and install the Python bindings. The underlying
7999 ;; C++ library is apparently not meant to be installed.
8000 (let ((out (assoc-ref outputs "out")))
8001 (with-directory-excursion "py_ext"
8002 (and (system* "python" "setup.py" "build")
8003 (system* "python" "setup.py" "install"
8004 (string-append "--prefix=" out))))))))))
8005 (inputs `(("python" ,python-wrapper))) ;for the bindings
8006 (synopsis "Fuzzy matching library for Python")
8007 (description
8008 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
8009Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
8010value which can be used for similarity comparisons. Similar objects have
8011similar hash values, which allows for the detection of similar objects by
8012comparing their hash values. The byte stream should have a sufficient amount
8013of complexity; for example, a byte stream of identical bytes will not generate
8014a hash value.")
8015 (license license:asl2.0)))
8016
8017(define-public python2-tlsh
8018 (package
8019 (inherit python-tlsh)
8020 (name "python2-tlsh")
8021 (inputs `(("python" ,python-2)))))
8022
8023(define-public python-termcolor
8024 (package
8025 (name "python-termcolor")
8026 (version "1.1.0")
8027 (source
8028 (origin
8029 (method url-fetch)
8030 (uri (pypi-uri "termcolor" version))
8031 (sha256
8032 (base32
8033 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8034 (build-system python-build-system)
8035 (arguments
8036 ;; There are no tests.
8037 `(#:tests? #f))
e85af137 8038 (home-page "https://pypi.org/project/termcolor/")
44d10b1f
RW
8039 (synopsis "ANSII Color formatting for terminal output")
8040 (description
8041 "This package provides ANSII Color formatting for output in terminals.")
8042 (license license:expat)))
8043
8044(define-public python2-termcolor
8045 (package-with-python2 python-termcolor))
8046
8047(define-public python-libarchive-c
8048 (package
8049 (name "python-libarchive-c")
f2774824 8050 (version "2.9")
44d10b1f
RW
8051 (source (origin
8052 (method url-fetch)
8053 (uri (pypi-uri "libarchive-c" version))
8054 (sha256
8055 (base32
f2774824 8056 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
44d10b1f
RW
8057 (build-system python-build-system)
8058 (arguments
8059 '(#:phases (modify-phases %standard-phases
8060 (add-before
8061 'build 'reference-libarchive
8062 (lambda* (#:key inputs #:allow-other-keys)
8063 ;; Retain the absolute file name of libarchive.so.
8064 (let ((libarchive (assoc-ref inputs "libarchive")))
8065 (substitute* "libarchive/ffi.py"
8066 (("find_library\\('archive'\\)")
8067 (string-append "'" libarchive
8068 "/lib/libarchive.so'"))))))
8069 (replace 'check
8070 (lambda _ (invoke "pytest" "-vv"))))))
8071 (native-inputs
8072 `(("python-mock" ,python-mock)
8073 ("python-pytest" ,python-pytest)))
8074 (inputs
8075 `(("libarchive" ,libarchive)))
8076 (home-page "https://github.com/Changaco/python-libarchive-c")
8077 (synopsis "Python interface to libarchive")
8078 (description
8079 "This package provides Python bindings to libarchive, a C library to
8080access possibly compressed archives in many different formats. It uses
8081Python's @code{ctypes} foreign function interface (FFI).")
8082 (license license:lgpl2.0+)))
8083
8084(define-public python2-libarchive-c
8085 (package-with-python2 python-libarchive-c))
8086
8087(define-public python-file
8088 (package
8089 (inherit file)
8090 (name "python-file")
8091 (build-system python-build-system)
8092 (arguments
8093 '(#:tests? #f ;no tests
8094 #:configure-flags '("--single-version-externally-managed" "--root=/")
8095 #:phases (modify-phases %standard-phases
8096 (add-before 'build 'change-directory
8097 (lambda _
8098 (chdir "python")
8099 #t))
8100 (add-before 'build 'set-library-file-name
8101 (lambda* (#:key inputs #:allow-other-keys)
8102 (let ((file (assoc-ref inputs "file")))
8103 (substitute* "magic.py"
8104 (("find_library\\('magic'\\)")
8105 (string-append "'" file "/lib/libmagic.so'")))
8106 #t))))))
8107 (inputs `(("file" ,file)))
528ea990
LC
8108 (native-inputs (if (%current-target-system)
8109 `(("self" ,this-package))
8110 '()))
44d10b1f
RW
8111 (synopsis "Python bindings to the libmagic file type guesser. Note that
8112this module and the python-magic module both provide a \"magic.py\" file;
8113these two modules, which are different and were developed separately, both
8114serve the same purpose: provide Python bindings for libmagic.")))
8115
8116(define-public python2-file
8117 (package-with-python2 python-file))
8118
8119(define-public python-debian
8120 (package
8121 (name "python-debian")
8122 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 8123 (version "0.1.36")
44d10b1f
RW
8124 (source
8125 (origin
9f74bd31
VC
8126 ;; Use git-fetch, as pypi doesn't include test suite.
8127 (method git-fetch)
8128 (uri (git-reference
8129 (url home-page)
8130 (commit version)))
8131 (file-name (git-file-name name version))
44d10b1f
RW
8132 (sha256
8133 (base32
9f74bd31 8134 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 8135 (build-system python-build-system)
9f74bd31
VC
8136 (arguments
8137 `(#:phases (modify-phases %standard-phases
8138 (add-after 'unpack 'remove-debian-specific-tests
8139 ;; python-apt, apt and dpkg are not yet available in guix,
8140 ;; and these tests heavily depend on them.
8141 (lambda _
8142 (delete-file "lib/debian/tests/test_deb822.py")
8143 (delete-file "lib/debian/tests/test_debfile.py")
8144 #t)))))
44d10b1f 8145 (propagated-inputs
9f74bd31
VC
8146 `(("python-six" ,python-six)
8147 ("python-chardet" ,python-chardet)))
44d10b1f
RW
8148 (synopsis "Debian package related modules")
8149 (description
8150 ;; XXX: Use @enumerate instead of @itemize to work around
8151 ;; <http://bugs.gnu.org/21772>.
8152 "This package provides Python modules that abstract many formats of
8153Debian-related files, such as:
8154
8155@enumerate
8156@item Debtags information;
8157@item @file{debian/changelog} files;
8158@item packages files, pdiffs;
8159@item control files of single or multiple RFC822-style paragraphs---e.g.
8160 @file{debian/control}, @file{.changes}, @file{.dsc};
8161@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8162 contained files and meta-information.
8163@end enumerate\n")
8164
8165 ;; Modules are either GPLv2+ or GPLv3+.
8166 (license license:gpl3+)))
8167
44d10b1f
RW
8168(define-public python-nbformat
8169 (package
8170 (name "python-nbformat")
8171 (version "4.4.0")
8172 (source
8173 (origin
8174 (method url-fetch)
8175 (uri (pypi-uri "nbformat" version))
8176 (sha256
8177 (base32
8178 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
8179 (build-system python-build-system)
8180 (arguments `(#:tests? #f)) ; no test target
8181 (propagated-inputs
8182 `(("python-ipython-genutils" ,python-ipython-genutils)
8183 ("python-jsonschema" ,python-jsonschema)
8184 ("python-jupyter-core" ,python-jupyter-core)
8185 ("python-traitlets" ,python-traitlets)))
8186 (home-page "http://jupyter.org")
8187 (synopsis "Jupyter Notebook format")
8188 (description "This package provides the reference implementation of the
8189Jupyter Notebook format and Python APIs for working with notebooks.")
8190 (license license:bsd-3)))
8191
8192(define-public python2-nbformat
8193 (package-with-python2 python-nbformat))
8194
8195(define-public python-bleach
8196 (package
8197 (name "python-bleach")
e6daf515 8198 (version "3.1.1")
44d10b1f
RW
8199 (source
8200 (origin
8201 (method url-fetch)
8202 (uri (pypi-uri "bleach" version))
8203 (sha256
8204 (base32
e6daf515 8205 "0j4xlnw99m1xy0s7wxz9fk5f3c1n8r296fh75jn5p5j61w6qg2xa"))))
44d10b1f
RW
8206 (build-system python-build-system)
8207 (propagated-inputs
ff0efc8f 8208 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
8209 ("python-six" ,python-six)))
8210 (native-inputs
ff0efc8f
MB
8211 `(("python-pytest" ,python-pytest)
8212 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
8213 (home-page "https://github.com/jsocol/bleach")
8214 (synopsis "Whitelist-based HTML-sanitizing tool")
8215 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8216 (license license:asl2.0)))
8217
8218(define-public python2-bleach
8219 (package-with-python2 python-bleach))
8220
8221(define-public python-entrypoints
8222 (package
8223 (name "python-entrypoints")
a7f1b718 8224 (version "0.3")
44d10b1f
RW
8225 (source
8226 (origin
8227 (method url-fetch)
a7f1b718 8228 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
8229 (sha256
8230 (base32
a7f1b718 8231 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
8232 (build-system python-build-system)
8233 ;; The package does not come with a setup.py file, so we have to generate
8234 ;; one ourselves.
8235 (arguments
8236 `(#:tests? #f
8237 #:phases
8238 (modify-phases %standard-phases
8239 (add-after 'unpack 'create-setup.py
8240 (lambda _
8241 (call-with-output-file "setup.py"
8242 (lambda (port)
8243 (format port "\
8244from setuptools import setup
8245setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8246" ,version))))))))
8247 (home-page "https://github.com/takluyver/entrypoints")
8248 (synopsis "Discover and load entry points from installed Python packages")
8249 (description "Entry points are a way for Python packages to advertise
8250objects with some common interface. The most common examples are
8251@code{console_scripts} entry points, which define shell commands by
8252identifying a Python function to run. The @code{entrypoints} module contains
8253functions to find and load entry points.")
8254 (license license:expat)))
8255
8256(define-public python2-entrypoints
8257 (package-with-python2 python-entrypoints))
8258
8259(define-public python-nbconvert
8260 (package
8261 (name "python-nbconvert")
8262 (version "5.0.0b1")
8263 (source
8264 (origin
8265 (method url-fetch)
8266 (uri (pypi-uri "nbconvert" version))
8267 (sha256
8268 (base32
8269 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8270 (build-system python-build-system)
8271 (arguments
8272 `(;; The "bdist_egg" target is disabled by default, causing the installation
8273 ;; to fail.
8274 #:configure-flags (list "bdist_egg")
8275 ;; FIXME: 5 failures, 40 errors.
8276 #:tests? #f))
8277 ;; #:phases
8278 ;; (modify-phases %standard-phases
8279 ;; (replace 'check
8280 ;; (lambda _
8281 ;; (zero? (system* "py.test" "-v")))))
8282 (native-inputs
8283 `(("python-pytest" ,python-pytest)))
8284 (propagated-inputs
8285 `(("python-bleach" ,python-bleach)
8286 ("python-entrypoints" ,python-entrypoints)
8287 ("python-jinja2" ,python-jinja2)
8288 ("python-jupyter-core" ,python-jupyter-core)
8289 ("python-mistune" ,python-mistune)
8290 ("python-nbformat" ,python-nbformat)
8291 ("python-pygments" ,python-pygments)
8292 ("python-traitlets" ,python-traitlets)))
8293 (home-page "http://jupyter.org")
8294 (synopsis "Converting Jupyter Notebooks")
8295 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8296notebooks to various other formats via Jinja templates. It allows you to
8297convert an @code{.ipynb} notebook file into various static formats including:
8298
8299@enumerate
8300@item HTML
8301@item LaTeX
8302@item PDF
8303@item Reveal JS
8304@item Markdown (md)
8305@item ReStructured Text (rst)
8306@item executable script
8307@end enumerate\n")
8308 (license license:bsd-3)))
8309
8310(define-public python2-nbconvert
8311 (package-with-python2 python-nbconvert))
8312
44d10b1f
RW
8313(define-public python-notebook
8314 (package
8315 (name "python-notebook")
8316 (version "5.7.4")
8317 (source (origin
8318 (method url-fetch)
8319 (uri (pypi-uri "notebook" version))
8320 (sha256
8321 (base32
8322 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
8323 (build-system python-build-system)
8324 (arguments
8325 `(#:phases
8326 (modify-phases %standard-phases
8327 (replace 'check
8328 (lambda _
8329 ;; These tests require a browser
8330 (delete-file-recursively "notebook/tests/selenium")
8331 ;; Some tests need HOME
8332 (setenv "HOME" "/tmp")
8333 ;; This file contains "warningfilters", which are not supported
8334 ;; by this version of nose.
8335 (delete-file "setup.cfg")
8336 (with-directory-excursion "/tmp"
8337 (invoke "nosetests" "-v"))
8338 #t)))))
8339 (propagated-inputs
8340 `(("python-jupyter-core" ,python-jupyter-core)
8341 ("python-nbformat" ,python-nbformat)
8342 ("python-nbconvert" ,python-nbconvert)
8343 ("python-prometheus-client" ,python-prometheus-client)
8344 ("python-send2trash" ,python-send2trash)
8345 ("python-terminado" ,python-terminado)))
8346 (native-inputs
8347 `(("python-nose" ,python-nose)
8348 ("python-sphinx" ,python-sphinx)
8349 ("python-requests" ,python-requests)))
8350 (home-page "http://jupyter.org/")
8351 (synopsis "Web-based notebook environment for interactive computing")
8352 (description
8353 "The Jupyter HTML notebook is a web-based notebook environment for
8354interactive computing.")
8355 (properties `((python2-variant . ,(delay python2-notebook))))
8356 (license license:bsd-3)))
8357
8358(define-public python2-notebook
8359 (let ((base (package-with-python2
8360 (strip-python2-variant python-notebook))))
8361 (package (inherit base)
8362 (native-inputs
8363 `(("python2-mock" ,python2-mock)
8364 ,@(package-native-inputs base)))
8365 (arguments
8366 (substitute-keyword-arguments (package-arguments base)
8367 ((#:phases phases)
8368 `(modify-phases ,phases
8369 (add-before 'check 'disable-test-case
8370 ;; The test requires network access to localhost. Curiously it
8371 ;; fails with Python 2 only. Simply make the test-case return
8372 ;; immediately.
8373 (lambda _
8374 (substitute*
8375 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8376 (("formats = self.nbconvert_api") "return #")))))))))))
8377
8378(define-public python-widgetsnbextension
8379 (package
8380 (name "python-widgetsnbextension")
8381 (version "3.4.2")
8382 (source
8383 (origin
8384 (method url-fetch)
8385 (uri (pypi-uri "widgetsnbextension" version))
8386 (sha256
8387 (base32
8388 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
8389 (build-system python-build-system)
8390 (propagated-inputs
8391 `(("python-ipykernel" ,python-ipykernel)
8392 ("python-notebook" ,python-notebook)))
8393 (native-inputs
8394 `(("python-certifi" ,python-certifi)
8395 ("python-nose" ,python-nose)))
8396 (home-page "https://ipython.org")
8397 (synopsis "IPython HTML widgets for Jupyter")
8398 (description "This package provides interactive HTML widgets for Jupyter
8399notebooks.")
8400 (license license:bsd-3)))
8401
8402(define-public python2-widgetsnbextension
8403 (package-with-python2 python-widgetsnbextension))
8404
8405(define-public python-ipywidgets
8406 (package
8407 (name "python-ipywidgets")
8408 (version "5.2.2")
8409 (source
8410 (origin
8411 (method url-fetch)
8412 (uri (pypi-uri "ipywidgets" version))
8413 (sha256
8414 (base32
8415 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8416 (build-system python-build-system)
8417 (propagated-inputs
8418 `(("python-ipython" ,python-ipython)
8419 ("python-traitlets" ,python-traitlets)
8420 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8421 (native-inputs
8422 `(("python-nose" ,python-nose)
8423 ("python-pytest" ,python-pytest)))
8424 (home-page "https://ipython.org")
8425 (synopsis "IPython HTML widgets for Jupyter")
8426 (description "Ipywidgets are interactive HTML widgets for Jupyter
8427notebooks and the IPython kernel. Notebooks come alive when interactive
8428widgets are used. Users gain control of their data and can visualize changes
8429in the data.")
8430 (license license:bsd-3)))
8431
8432(define-public python2-ipywidgets
8433 (package-with-python2 python-ipywidgets))
8434
8435(define-public python-jupyter-console
8436 (package
8437 (name "python-jupyter-console")
becb9cbf 8438 (version "6.0.0")
44d10b1f
RW
8439 (source
8440 (origin
8441 (method url-fetch)
8442 (uri (pypi-uri "jupyter_console" version))
8443 (sha256
8444 (base32
becb9cbf 8445 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 8446 (build-system python-build-system)
44d10b1f
RW
8447 (propagated-inputs
8448 `(("python-ipykernel" ,python-ipykernel)
8449 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 8450 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
8451 ("python-pygments" ,python-pygments)))
8452 (native-inputs
8453 `(("python-nose" ,python-nose)))
8454 (home-page "https://jupyter.org")
8455 (synopsis "Jupyter terminal console")
8456 (description "This package provides a terminal-based console frontend for
8457Jupyter kernels. It also allows for console-based interaction with non-Python
8458Jupyter kernels such as IJulia and IRKernel.")
e8588a78 8459 (properties `((python2-variant . ,(delay python2-jupyter-console))))
44d10b1f
RW
8460 (license license:bsd-3)))
8461
8462(define-public python2-jupyter-console
8e590c81
RW
8463 (package
8464 (name "python2-jupyter-console")
8465 (version "5.2.0")
8466 (source
8467 (origin
8468 (method url-fetch)
8469 (uri (pypi-uri "jupyter_console" version))
8470 (sha256
8471 (base32
8472 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8473 (build-system python-build-system)
b0aa58d8
EF
8474 (arguments
8475 `(#:python ,python-2
8476 #:tests? #f)) ; Tests only run in a TTY.
8e590c81
RW
8477 (propagated-inputs
8478 `(("python2-ipykernel" ,python2-ipykernel)
8479 ("python2-jupyter-client" ,python2-jupyter-client)
8480 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8481 ("python2-pygments" ,python2-pygments)))
8482 (native-inputs
8483 `(("python2-nose" ,python2-nose)))
8484 (home-page "https://jupyter.org")
8485 (synopsis "Jupyter terminal console")
8486 (description "This package provides a terminal-based console frontend for
8487Jupyter kernels. It also allows for console-based interaction with non-Python
8488Jupyter kernels such as IJulia and IRKernel.")
8489 (license license:bsd-3)))
44d10b1f
RW
8490
8491;; The python-ipython and python-jupyter-console require each other. To get
8492;; the functionality in both packages working, strip down the
8493;; python-jupyter-console package when using it as an input to python-ipython.
8494(define python-jupyter-console-minimal
8495 (package
8496 (inherit python-jupyter-console)
8497 (name "python-jupyter-console-minimal")
8498 (arguments
8499 (substitute-keyword-arguments
8500 (package-arguments python-jupyter-console)
8501 ((#:phases phases)
8502 `(modify-phases ,phases
8503 (add-after 'install 'delete-bin
8504 (lambda* (#:key outputs #:allow-other-keys)
8505 ;; Delete the bin files, to avoid conflicts in profiles
8506 ;; where python-ipython and python-jupyter-console are
8507 ;; both present.
8508 (delete-file-recursively
8509 (string-append
8510 (assoc-ref outputs "out") "/bin"))))))))
8511 ;; Remove the python-ipython propagated input, to avoid the cycle
8512 (propagated-inputs
8513 (alist-delete
8514 "python-ipython"
8515 (package-propagated-inputs python-jupyter-console)))))
8516
8517(define-public python-qtconsole
8518 (package
8519 (name "python-qtconsole")
8520 (version "4.4.3")
8521 (source
8522 (origin
8523 (method url-fetch)
8524 (uri (pypi-uri "qtconsole" version))
8525 (sha256
8526 (base32
8527 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8528 (build-system python-build-system)
8529 (arguments
8530 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8531 ;; but we only have the LTS version 5.x. This means that there might be
8532 ;; runtime errors, but since this is a dependency of the Jupyter package,
8533 ;; and Jupyter can be used without the qtconsole we can overlook this for
8534 ;; now.
8535 `(#:tests? #f
8536 #:phases
8537 (modify-phases %standard-phases
8538 (add-before 'check 'pre-check
8539 (lambda _
8540 (setenv "QT_QPA_PLATFORM" "offscreen")
8541 #t)))))
8542 (propagated-inputs
8543 `(("python-ipykernel" ,python-ipykernel)
8544 ("python-ipython" ,python-ipython)))
8545 (native-inputs
8546 `(("python-pytest" ,python-pytest)))
8547 (home-page "http://jupyter.org")
8548 (synopsis "Jupyter Qt console")
8549 (description "This package provides a Qt-based console for Jupyter with
8550support for rich media output.")
8551 (license license:bsd-3)))
8552
6ec87223
VC
8553(define-public python-jsbeautifier
8554 (package
8555 (name "python-jsbeautifier")
8556 (version "1.10.2")
8557 (home-page "https://github.com/beautify-web/js-beautify")
8558 (source (origin
8559 (method git-fetch)
8560 (uri (git-reference
8561 (url home-page)
8562 (commit (string-append "v" version))))
8563 (file-name (git-file-name name version))
8564 (sha256
8565 (base32
8566 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8567 (build-system python-build-system)
8568 (arguments
8569 `(#:phases (modify-phases %standard-phases
8570 (add-after 'unpack 'chdir
8571 (lambda _
8572 ;; The upstream Git repository contains all the code,
8573 ;; but this package only builds the python code.
8574 (chdir "python")
8575 #t))
8576 (add-after 'unpack 'patch-python-six-requirements
8577 (lambda _
8578 (substitute* "python/setup.py"
8579 (("six>=1.12.0")
8580 "six>=1.11.0"))
8581 #t)))))
8582 (propagated-inputs
8583 `(("python-editorconfig" ,python-editorconfig)
8584 ("python-six" ,python-six)))
8585 (native-inputs
8586 `(("python-pytest" ,python-pytest)))
8587 (synopsis "JavaScript unobfuscator and beautifier")
8588 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8589popular online obfuscators.")
8590 (license license:expat)))
8591
44d10b1f
RW
8592(define-public jupyter
8593 (package
8594 (name "jupyter")
8595 (version "1.0.0")
8596 (source
8597 (origin
8598 (method url-fetch)
8599 (uri (pypi-uri "jupyter" version))
8600 (sha256
8601 (base32
8602 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8603 (build-system python-build-system)
8604 (arguments '(#:tests? #f)) ; there are none.
8605 (propagated-inputs
8606 `(("python-ipykernel" ,python-ipykernel)
8607 ("python-ipywidgets" ,python-ipywidgets)
8608 ("python-jupyter-console" ,python-jupyter-console)
8609 ("python-nbconvert" ,python-nbconvert)
8610 ("python-notebook" ,python-notebook)
8611 ("python-qtconsole" ,python-qtconsole)))
8612 (native-search-paths
8613 (list (search-path-specification
8614 (variable "JUPYTER_PATH")
8615 (files '("share/jupyter")))))
8616 (home-page "https://jupyter.org")
8617 (synopsis "Web application for interactive documents")
8618 (description
8619 "The Jupyter Notebook is a web application that allows you to create and
8620share documents that contain live code, equations, visualizations and
8621explanatory text. Uses include: data cleaning and transformation, numerical
8622simulation, statistical modeling, machine learning and much more.")
8623 (license license:bsd-3)))
8624
8625(define-public python-chardet
8626 (package
8627 (name "python-chardet")
8628 (version "3.0.4")
8629 (source
8630 (origin
8631 (method url-fetch)
8632 (uri (pypi-uri "chardet" version))
8633 (sha256
8634 (base32
8635 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8636 (native-inputs
8637 `(("python-hypothesis" ,python-hypothesis)
8638 ("python-pytest" ,python-pytest)
8639 ("python-pytest-runner" ,python-pytest-runner)))
8640 (build-system python-build-system)
3d369407
MB
8641 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8642 (arguments `(#:tests? #f))
44d10b1f
RW
8643 (home-page "https://github.com/chardet/chardet")
8644 (synopsis "Universal encoding detector for Python 2 and 3")
8645 (description
8646 "This package provides @code{chardet}, a Python module that can
8647automatically detect a wide range of file encodings.")
8648 (license license:lgpl2.1+)))
8649
8650(define-public python2-chardet
8651 (package-with-python2 python-chardet))
8652
8653(define-public python-docopt
8654 (package
8655 (name "python-docopt")
8656 (version "0.6.2")
8657 (source
8658 (origin
11e46326 8659 (method git-fetch)
44d10b1f 8660 ;; The release on PyPI does not include tests.
11e46326
EF
8661 (uri (git-reference
8662 (url "https://github.com/docopt/docopt")
8663 (commit version)))
8664 (file-name (git-file-name name version))
44d10b1f
RW
8665 (sha256
8666 (base32
11e46326 8667 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
44d10b1f
RW
8668 (build-system python-build-system)
8669 (native-inputs
8670 `(("python-pytest" ,python-pytest)))
8671 (arguments
8672 `(#:phases
8673 (modify-phases %standard-phases
8674 (replace 'check
8675 (lambda _ (invoke "py.test"))))))
8676 (home-page "http://docopt.org")
8677 (synopsis "Command-line interface description language for Python")
8678 (description "This library allows the user to define a command-line
8679interface from a program's help message rather than specifying it
4ca7207b 8680programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8681@code{argparse}.")
8682 (license license:expat)))
8683
8684(define-public python2-docopt
8685 (package-with-python2 python-docopt))
8686
8687(define-public python-pythondialog
8688 (package
8689 (name "python-pythondialog")
8690 (version "3.4.0")
8691 (source
8692 (origin
8693 (method url-fetch)
8694 (uri (pypi-uri "pythondialog" version))
8695 (sha256
8696 (base32
8697 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8698 (build-system python-build-system)
8699 (arguments
8700 `(#:phases
8701 (modify-phases %standard-phases
8702 (add-after 'unpack 'patch-path
8703 (lambda* (#:key inputs #:allow-other-keys)
8704 (let* ((dialog (assoc-ref inputs "dialog")))
8705 ;; Since this library really wants to grovel the search path, we
8706 ;; must hardcode dialog's store path into it.
8707 (substitute* "dialog.py"
8708 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8709 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8710 #t))))
8711 #:tests? #f)) ; no test suite
8712 (propagated-inputs
8713 `(("dialog" ,dialog)))
8714 (home-page "http://pythondialog.sourceforge.net/")
8715 (synopsis "Python interface to the UNIX dialog utility")
8716 (description "A Python wrapper for the dialog utility. Its purpose is to
8717provide an easy to use, pythonic and comprehensive Python interface to dialog.
8718This allows one to make simple text-mode user interfaces on Unix-like systems")
8719 (license license:lgpl2.1)
8720 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8721
8722(define-public python2-pythondialog
8723 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8724 (package
8725 (inherit base)
8726 (version (package-version python-pythondialog))
8727 (source (origin
8728 (method url-fetch)
8729 (uri (pypi-uri "python2-pythondialog" version))
8730 (sha256
8731 (base32
8732 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8733
8734(define-public python-configobj
8735 (package
8736 (name "python-configobj")
8737 (version "5.0.6")
8738 (source (origin
8739 (method url-fetch)
b0758fbb 8740 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8741 (sha256
8742 (base32
8743 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8744 ;; Patch setup.py so it looks for python-setuptools, which is
8745 ;; required to parse the keyword 'install_requires' in setup.py.
8746 (patches (search-patches "python-configobj-setuptools.patch"))))
8747 (build-system python-build-system)
8748 (propagated-inputs
8749 `(("python-six" ,python-six)))
8750 (synopsis "Config file reading, writing and validation")
8751 (description "ConfigObj is a simple but powerful config file reader and
8752writer: an ini file round tripper. Its main feature is that it is very easy to
8753use, with a straightforward programmer’s interface and a simple syntax for
8754config files.")
8755 (home-page "https://github.com/DiffSK/configobj")
8756 (license license:bsd-3)))
8757
8758(define-public python2-configobj
8759 (package-with-python2 python-configobj))
8760
8761(define-public python-configargparse
8762 (package
8763 (name "python-configargparse")
86ae491f 8764 (version "0.14.0")
44d10b1f
RW
8765 (source (origin
8766 (method url-fetch)
8767 (uri (pypi-uri "ConfigArgParse" version))
8768 (sha256
8769 (base32
86ae491f 8770 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8771 (build-system python-build-system)
8772 (native-inputs
8773 `(("python-pyyaml" ,python-pyyaml)))
8774 (arguments
8775 `(#:phases
8776 (modify-phases %standard-phases
8777 (replace 'check
8778 (lambda _
8779 ;; Bypass setuptools-shim because one test relies on "setup.py"
8780 ;; being the first argument passed to the python call.
8781 ;;
8782 ;; NOTE: Many tests do not run because they rely on Python's
8783 ;; built-in test.test_argparse, but we remove the unit tests from
8784 ;; our Python installation.
8785 (invoke "python" "setup.py" "test"))))))
8786 (synopsis "Replacement for argparse")
8787 (description "A drop-in replacement for argparse that allows options to also
8788be set via config files and/or environment variables.")
8789 (home-page "https://github.com/bw2/ConfigArgParse")
8790 (license license:expat)))
8791
8792(define-public python2-configargparse
8793 (package-with-python2 python-configargparse))
8794
8795(define-public python-argparse-manpage
8796 (package
8797 (name "python-argparse-manpage")
8798 (version "1.1")
8799 (source
8800 (origin
8801 (method url-fetch)
8802 (uri (pypi-uri "argparse-manpage" version))
8803 (sha256
8804 (base32
8805 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8806 (build-system python-build-system)
8807 (home-page "https://github.com/praiskup/argparse-manpage")
8808 (synopsis "Build manual page from Python's ArgumentParser object")
8809 (description
8810 "This package provides tools to build manual pages from Python's
8811@code{ArgumentParser} object.")
8812 (license license:asl2.0)))
8813
3e8f76d8
RW
8814(define-public python-contextlib2
8815 (package
8816 (name "python-contextlib2")
ebd4c251 8817 (version "0.6.0.post1")
3e8f76d8
RW
8818 (source
8819 (origin
8820 (method url-fetch)
8821 (uri (pypi-uri "contextlib2" version))
8822 (sha256
8823 (base32
ebd4c251 8824 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
3e8f76d8 8825 (build-system python-build-system)
a0fdade2 8826 (home-page "https://contextlib2.readthedocs.org/")
3e8f76d8
RW
8827 (synopsis "Tools for decorators and context managers")
8828 (description "This module is primarily a backport of the Python
88293.2 contextlib to earlier Python versions. Like contextlib, it
8830provides utilities for common tasks involving decorators and context
8831managers. It also contains additional features that are not part of
8832the standard library.")
1e158ba1 8833 (properties `((python2-variant . ,(delay python2-contextlib2))))
3e8f76d8
RW
8834 (license license:psfl)))
8835
44d10b1f 8836(define-public python2-contextlib2
1e158ba1
EF
8837 (let ((base (package-with-python2
8838 (strip-python2-variant python-contextlib2))))
8839 (package
8840 (inherit base)
8841 (arguments
8842 (substitute-keyword-arguments (package-arguments base)
8843 ((#:phases phases)
8844 `(modify-phases ,phases
8845 (replace 'check
8846 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8847 (native-inputs
8848 `(("python2-unittest2" ,python2-unittest2))))))
44d10b1f
RW
8849
8850(define-public python-texttable
8851 (package
8852 (name "python-texttable")
02422b3b 8853 (version "1.6.2")
44d10b1f
RW
8854 (source
8855 (origin
8856 (method url-fetch)
8857 (uri (pypi-uri "texttable" version))
8858 (sha256
8859 (base32
02422b3b 8860 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
44d10b1f 8861 (build-system python-build-system)
02422b3b
RW
8862 (arguments
8863 `(#:phases
8864 (modify-phases %standard-phases
8865 (replace 'check
8866 (lambda _ (invoke "pytest" "tests.py"))))))
8867 (native-inputs
8868 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
8869 (home-page "https://github.com/foutaise/texttable/")
8870 (synopsis "Python module for creating simple ASCII tables")
8871 (description "Texttable is a Python module for creating simple ASCII
8872tables.")
02422b3b 8873 (license license:expat)))
44d10b1f
RW
8874
8875(define-public python2-texttable
8876 (package-with-python2 python-texttable))
8877
8878(define-public python-atomicwrites
8879 (package
8880 (name "python-atomicwrites")
14f10479 8881 (version "1.3.0")
44d10b1f
RW
8882 (source (origin
8883 (method url-fetch)
8884 (uri (pypi-uri "atomicwrites" version))
8885 (sha256
8886 (base32
14f10479 8887 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8888 (build-system python-build-system)
8889 (synopsis "Atomic file writes in Python")
8890 (description "Library for atomic file writes using platform dependent tools
8891for atomic file system operations.")
8892 (home-page "https://github.com/untitaker/python-atomicwrites")
8893 (license license:expat)))
8894
8895(define-public python2-atomicwrites
8896 (package-with-python2 python-atomicwrites))
8897
8898(define-public python-click-threading
8899 (package
8900 (name "python-click-threading")
8901 (version "0.4.4")
8902 (source (origin
8903 (method url-fetch)
8904 (uri (pypi-uri "click-threading" version))
8905 (sha256
8906 (base32
8907 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8908 (build-system python-build-system)
8909 (propagated-inputs
8910 `(("python-click" ,python-click)))
8911 (synopsis "Utilities for multithreading in Click")
8912 (description "This package provides utilities for multithreading in Click
8913applications.")
8914 (home-page "https://github.com/click-contrib/click-threading")
8915 (license license:expat)))
8916
8917(define-public python-click-log
8918 (package
8919 (name "python-click-log")
8920 (version "0.3.2")
8921 (source (origin
8922 (method url-fetch)
8923 (uri (pypi-uri "click-log" version))
8924 (sha256
8925 (base32
8926 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8927 (build-system python-build-system)
8928 (propagated-inputs
8929 `(("python-click" ,python-click)))
8930 (synopsis "Logging for click applications")
8931 (description "This package provides a Python library for logging Click
8932applications.")
8933 (home-page "https://github.com/click-contrib/click-log")
8934 (license license:expat)))
8935
8936(define-public python-apipkg
8937 (package
8938 (name "python-apipkg")
8939 (version "1.4")
8940 (source (origin
8941 (method url-fetch)
8942 (uri (pypi-uri "apipkg" version))
8943 (sha256
8944 (base32
8945 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8946 (build-system python-build-system)
8947 (native-inputs
8948 `(("python-pytest" ,python-pytest)))
8949 (synopsis "Namespace control and lazy-import mechanism")
8950 (description "With apipkg you can control the exported namespace of a Python
8951package and greatly reduce the number of imports for your users. It is a small
8952pure Python module that works on virtually all Python versions.")
8953 (home-page "https://github.com/pytest-dev/apipkg")
8954 (license license:expat)))
8955
8956(define-public python2-apipkg
8957 (package-with-python2 python-apipkg))
8958
8959(define-public python-execnet
8960 (package
8961 (name "python-execnet")
8962 (version "1.4.1")
8963 (source (origin
8964 (method url-fetch)
8965 (uri (pypi-uri "execnet" version))
8966 (sha256
8967 (base32
8968 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8969 (build-system python-build-system)
8970 (arguments
8971 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8972 ;; The two test failures are caused by the lack of an `ssh` executable.
8973 ;; The test suite can be run with pytest after the 'install' phase.
8974 #:tests? #f))
8975 (native-inputs
8976 `(("python-pytest" ,python-pytest)
8977 ("python-setuptools-scm" ,python-setuptools-scm)))
8978 (propagated-inputs
8979 `(("python-apipkg" ,python-apipkg)))
8980 (synopsis "Rapid multi-Python deployment")
8981 (description "Execnet provides a share-nothing model with
8982channel-send/receive communication for distributing execution across many
8983Python interpreters across version, platform and network barriers. It has a
8984minimal and fast API targeting the following uses:
8985@enumerate
8986@item distribute tasks to (many) local or remote CPUs
8987@item write and deploy hybrid multi-process applications
8988@item write scripts to administer multiple environments
8989@end enumerate")
14a5146f 8990 (home-page "https://codespeak.net/execnet/")
44d10b1f
RW
8991 (license license:expat)))
8992
8993(define-public python2-execnet
8994 (package-with-python2 python-execnet))
8995
8996(define-public python-icalendar
8997 (package
8998 (name "python-icalendar")
43ae8f79 8999 (version "4.0.4")
44d10b1f
RW
9000 (source (origin
9001 (method url-fetch)
9002 (uri (pypi-uri "icalendar" version))
9003 (sha256
9004 (base32
43ae8f79 9005 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
44d10b1f
RW
9006 (build-system python-build-system)
9007 (propagated-inputs
9008 `(("python-dateutil" ,python-dateutil)
9009 ("python-pytz" ,python-pytz)))
9010 (synopsis "Python library for parsing iCalendar files")
9011 (description "The icalendar package is a parser/generator of iCalendar
9012files for use with Python.")
9013 (home-page "https://github.com/collective/icalendar")
9014 (license license:bsd-2)))
9015
44d10b1f
RW
9016(define-public python-args
9017 (package
9018 (name "python-args")
9019 (version "0.1.0")
9020 (source (origin
9021 (method url-fetch)
9022 (uri (pypi-uri "args" version))
9023 (sha256
9024 (base32
9025 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9026 (build-system python-build-system)
9027 (home-page "https://github.com/kennethreitz/args")
9028 (synopsis "Command-line argument parser")
9029 (description
9030 "This library provides a Python module to parse command-line arguments.")
9031 (license license:bsd-3)))
9032
9033(define-public python2-args
9034 (package-with-python2 python-args))
9035
9036(define-public python-clint
9037 (package
9038 (name "python-clint")
9039 (version "0.5.1")
9040 (source (origin
9041 (method url-fetch)
9042 (uri (pypi-uri "clint" version))
9043 (sha256
9044 (base32
9045 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9046 (build-system python-build-system)
9047 (arguments
9048 '(#:phases
9049 (modify-phases %standard-phases
9050 (replace 'check
9051 (lambda _ (invoke "py.test" "-v"))))))
9052 (native-inputs
9053 `(("python-pytest" ,python-pytest)))
9054 (propagated-inputs
9055 `(("python-args" ,python-args)))
9056 (home-page "https://github.com/kennethreitz/clint")
9057 (synopsis "Command-line interface tools")
9058 (description
9059 "Clint is a Python module filled with a set of tools for developing
9060command-line applications, including tools for colored and indented
9061output, progress bar display, and pipes.")
9062 (license license:isc)))
9063
9064(define-public python2-clint
9065 (package-with-python2 python-clint))
9066
44d10b1f
RW
9067(define-public python-rply
9068 (package
9069 (name "python-rply")
9070 (version "0.7.5")
9071 (source (origin
9072 (method url-fetch)
9073 (uri (pypi-uri "rply" version))
9074 (sha256
9075 (base32
9076 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
9077 (build-system python-build-system)
9078 (propagated-inputs
9079 `(("python-appdirs" ,python-appdirs)))
9080 (home-page "https://github.com/alex/rply")
9081 (synopsis "Parser generator for Python")
9082 (description
9083 "This package provides a pure Python based parser generator, that also
9084works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9085with a new public API, and RPython support.")
9086 (license license:bsd-3)))
9087
9088(define-public python2-rply
9089 (package-with-python2 python-rply))
9090
9091(define-public python-hy
9092 (package
9093 (name "python-hy")
c215051d 9094 (version "0.17.0")
44d10b1f
RW
9095 (source (origin
9096 (method url-fetch)
9097 (uri (pypi-uri "hy" version))
9098 (sha256
9099 (base32
c215051d 9100 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
44d10b1f
RW
9101 (build-system python-build-system)
9102 (arguments
9103 '(#:phases
9104 (modify-phases %standard-phases
6ba6a1c1
JG
9105 (add-before 'install 'set-HOME
9106 (lambda _
9107 (setenv "HOME" "/tmp")))
44d10b1f
RW
9108 (replace 'check
9109 (lambda _
9110 ;; Tests require write access to HOME.
9111 (setenv "HOME" "/tmp")
9112 (invoke "nosetests"))))))
9113 (native-inputs
9114 `(("python-coverage" ,python-coverage)
9115 ("python-nose" ,python-nose)))
9116 (propagated-inputs
9117 `(("python-astor" ,python-astor)
9118 ("python-clint" ,python-clint)
c215051d
JG
9119 ("python-rply" ,python-rply)
9120 ("python-fastentrypoints"
9121 ,python-fastentrypoints)
9122 ("python-funcparserlib"
9123 ,python-funcparserlib)))
44d10b1f
RW
9124 (home-page "http://hylang.org/")
9125 (synopsis "Lisp frontend to Python")
9126 (description
9127 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9128its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9129Python at your fingertips, in Lisp form.")
9130 (license license:expat)))
9131
9132(define-public python2-hy
9133 (package-with-python2 python-hy))
9134
9135(define-public python2-functools32
9136 (package
9137 (name "python2-functools32")
9138 (version "3.2.3-2")
9139 (source
9140 (origin
9141 (method url-fetch)
9142 (uri (pypi-uri "functools32" version))
9143 (sha256
9144 (base32
9145 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9146 (build-system python-build-system)
9147 (arguments
9148 `(#:python ,python-2
9149 #:tests? #f)) ; no test target
9150 (home-page "https://github.com/MiCHiLU/python-functools32")
9151 (synopsis
9152 "Backport of the functools module from Python 3.2.3")
9153 (description
9154 "This package is a backport of the @code{functools} module from Python
91553.2.3 for use with older versions of Python and PyPy.")
9156 (license license:expat)))
9157
9158(define-public python2-subprocess32
9159 (package
9160 (name "python2-subprocess32")
9161 (version "3.2.7")
9162 (source (origin
9163 (method url-fetch)
9164 (uri (pypi-uri "subprocess32" version))
9165 (sha256
9166 (base32
9167 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9168 (patches
9169 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9170 (build-system python-build-system)
9171 (arguments
9172 `(#:python ,python-2
9173 ;; The test suite fails with Python > 2.7.13:
9174 ;; import test.support
9175 ;; ImportError: No module named support
9176 #:tests? #f
9177 #:phases
9178 (modify-phases %standard-phases
9179 (add-after 'unpack 'patch-/bin/sh
9180 (lambda _
9181 (substitute* '("subprocess32.py"
9182 "test_subprocess32.py")
9183 (("/bin/sh") (which "sh")))
9184 #t)))))
9185 (home-page "https://github.com/google/python-subprocess32")
9186 (synopsis "Backport of the subprocess module from Python 3.2")
9187 (description
9188 "This is a backport of the @code{subprocess} standard library module
9189from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9190new features. On POSIX systems it is guaranteed to be reliable when used
9191in threaded applications. It includes timeout support from Python 3.3 but
9192otherwise matches 3.2’s API.")
9193 (license license:psfl)))
9194
9195(define-public python2-futures
9196 (package
9197 (name "python2-futures")
9198 (version "3.2.0")
9199 (source
9200 (origin
9201 (method url-fetch)
9202 (uri (pypi-uri "futures" version))
9203 (sha256
9204 (base32
9205 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
9206 (build-system python-build-system)
ba88eea2
RW
9207 (arguments
9208 `(#:python ,python-2
9209 #:phases
9210 (modify-phases %standard-phases
9211 (replace 'check
9212 (lambda _
9213 (invoke "python" "test_futures.py")
9214 #t)))))
44d10b1f
RW
9215 (home-page "https://github.com/agronholm/pythonfutures")
9216 (synopsis
9217 "Backport of the concurrent.futures package from Python 3.2")
9218 (description
9219 "The concurrent.futures module provides a high-level interface for
9220asynchronously executing callables. This package backports the
9221concurrent.futures package from Python 3.2")
9222 (license license:bsd-3)))
9223
9224(define-public python-promise
9225 (package
9226 (name "python-promise")
9227 (version "0.4.2")
9228 (source
9229 (origin
9230 (method url-fetch)
9231 (uri (pypi-uri "promise" version))
9232 (sha256
9233 (base32
9234 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9235 (build-system python-build-system)
9236 ;; Tests wants python-futures, which is a python2 only program, and
9237 ;; can't be found by python-promise at test time.
9238 (arguments `(#:tests? #f))
9239 (home-page "https://github.com/syrusakbary/promise")
9240 (synopsis "Promises/A+ implementation for Python")
9241 (description
9242 "Promises/A+ implementation for Python")
9243 (properties `((python2-variant . ,(delay python2-promise))))
9244 (license license:expat)))
9245
9246(define-public python2-promise
9247 (let ((promise (package-with-python2
9248 (strip-python2-variant python-promise))))
9249 (package (inherit promise)
9250 (arguments (substitute-keyword-arguments (package-arguments promise)
9251 ((#:tests? _) #t)))
9252 (native-inputs
9253 `(("python2-futures" ,python2-futures)
9254 ("python2-pytest" ,python2-pytest)
9255 ,@(package-native-inputs promise))))))
9256
d71d85cd
RW
9257(define-public python-progressbar33
9258 (package
9259 (name "python-progressbar33")
9260 (version "2.4")
9261 (source
9262 (origin
9263 (method url-fetch)
9264 (uri (pypi-uri "progressbar33" version))
9265 (sha256
9266 (base32
9267 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
9268 (build-system python-build-system)
9269 (home-page "http://github.com/germangh/python-progressbar")
9270 (synopsis "Text progress bar library for Python")
9271 (description
9272 "This package provides a text progress bar library for Python. This
9273version only differs from the original @code{progressbar} package in that it
9274uses relative package imports instead of absolute imports, which is necessary
9275for the module to work under Python 3.3.")
9276 ;; Either or both of these licenses may be selected.
9277 (license (list license:lgpl2.1+ license:bsd-3))))
9278
44d10b1f
RW
9279(define-public python-colorama
9280 (package
9281 (name "python-colorama")
bd137055 9282 (version "0.4.3")
44d10b1f
RW
9283 (source
9284 (origin
9285 (method url-fetch)
9286 (uri (pypi-uri "colorama" version))
9287 (sha256
9288 (base32
bd137055 9289 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
44d10b1f
RW
9290 (build-system python-build-system)
9291 (synopsis "Colored terminal text rendering for Python")
9292 (description "Colorama is a Python library for rendering colored terminal
9293text.")
e85af137 9294 (home-page "https://pypi.org/project/colorama/")
44d10b1f
RW
9295 (license license:bsd-3)))
9296
9297(define-public python2-colorama
9298 (package-with-python2 python-colorama))
9299
9300(define-public python-rsa
9301 (package
9302 (name "python-rsa")
9303 (version "3.4.2")
9304 (source
9305 (origin
9306 (method url-fetch)
9307 (uri (pypi-uri "rsa" version))
9308 (sha256
9309 (base32
9310 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9311 (build-system python-build-system)
9312 (propagated-inputs
9313 `(("python-pyasn1" ,python-pyasn1)))
9314 (synopsis "Pure-Python RSA implementation")
9315 (description "Python-RSA is a pure-Python RSA implementation. It supports
9316encryption and decryption, signing and verifying signatures, and key
9317generation according to PKCS#1 version 1.5. It can be used as a Python
9318library as well as on the command line.")
9319 (home-page "https://stuvel.eu/rsa")
9320 (license license:asl2.0)))
9321
9322(define-public python2-rsa
9323 (package-with-python2 python-rsa))
9324
9325(define-public python-pluggy
9326 (package
9327 (name "python-pluggy")
e5731c03 9328 (version "0.11.0")
44d10b1f
RW
9329 (source
9330 (origin
9331 (method url-fetch)
9332 (uri (pypi-uri "pluggy" version))
9333 (sha256
9334 (base32
e5731c03 9335 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
9336 (build-system python-build-system)
9337 (native-inputs
9338 `(("python-setuptools-scm" ,python-setuptools-scm)))
9339 (synopsis "Plugin and hook calling mechanism for Python")
9340 (description "Pluggy is an extraction of the plugin manager as used by
9341Pytest but stripped of Pytest specific details.")
e85af137 9342 (home-page "https://pypi.org/project/pluggy/")
44d10b1f
RW
9343 (license license:expat)))
9344
9345(define-public python2-pluggy
9346 (package-with-python2 python-pluggy))
9347
9348(define-public python-tox
9349 (package
9350 (name "python-tox")
9351 (version "2.8.1")
9352 (source
9353 (origin
9354 (method url-fetch)
9355 (uri (pypi-uri "tox" version))
9356 (sha256
9357 (base32
9358 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
9359 (build-system python-build-system)
9360 (arguments
9361 ;; FIXME: Tests require pytest-timeout, which itself requires
9362 ;; pytest>=2.8.0 for installation.
9363 '(#:tests? #f))
9364 (propagated-inputs
9365 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9366 ("python-py" ,python-py)
9367 ("python-virtualenv" ,python-virtualenv)))
9368 (native-inputs
9369 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9370 ("python-pytest" ,python-pytest) ; >= 2.3.5
9371 ("python-setuptools-scm" ,python-setuptools-scm)))
d81fb2ae 9372 (home-page "https://tox.readthedocs.io")
44d10b1f
RW
9373 (synopsis "Virtualenv-based automation of test activities")
9374 (description "Tox is a generic virtualenv management and test command line
9375tool. It can be used to check that a package installs correctly with
9376different Python versions and interpreters, or run tests in each type of
9377supported environment, or act as a frontend to continuous integration
9378servers.")
9379 (license license:expat)))
9380
9381(define-public python2-tox
9382 (package-with-python2 python-tox))
9383
9384(define-public python-jmespath
9385 (package
9386 (name "python-jmespath")
27fb781f 9387 (version "0.9.4")
44d10b1f
RW
9388 (source
9389 (origin
9390 (method url-fetch)
9391 (uri (pypi-uri "jmespath" version))
9392 (sha256
9393 (base32
27fb781f 9394 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
9395 (build-system python-build-system)
9396 (native-inputs
9397 `(("python-nose" ,python-nose)))
9398 (synopsis "JSON Matching Expressions")
9399 (description "JMESPath (pronounced “james path”) is a Python library that
9400allows one to declaratively specify how to extract elements from a JSON
9401document.")
9402 (home-page "https://github.com/jmespath/jmespath.py")
9403 (license license:expat)))
9404
9405(define-public python2-jmespath
9406 (package-with-python2 python-jmespath))
9407
9408(define-public python-botocore
9409 (package
7bcf827c 9410 (name "python-botocore")
6b8c390f 9411 (version "1.15.26")
7bcf827c
RW
9412 (source
9413 (origin
9414 (method url-fetch)
9415 (uri (pypi-uri "botocore" version))
9416 (sha256
9417 (base32
6b8c390f 9418 "1a87pbwkk5vlwz92hy1wizfnpiwn11bhaicr6bmji1i5ybwdhnr8"))))
7bcf827c
RW
9419 (build-system python-build-system)
9420 (arguments
9421 ;; FIXME: Many tests are failing.
9422 '(#:tests? #f))
9423 (propagated-inputs
9424 `(("python-dateutil" ,python-dateutil)
9425 ("python-docutils" ,python-docutils)
9426 ("python-jmespath" ,python-jmespath)))
9427 (native-inputs
9428 `(("python-mock" ,python-mock)
9429 ("python-nose" ,python-nose)
9430 ("behave" ,behave)
9431 ("python-tox" ,python-tox)
9432 ("python-urllib3" ,python-urllib3)
9433 ("python-wheel" ,python-wheel)))
9434 (home-page "https://github.com/boto/botocore")
9435 (synopsis "Low-level interface to AWS")
9436 (description "Botocore is a Python library that provides a low-level
44d10b1f 9437interface to the Amazon Web Services (AWS) API.")
7bcf827c 9438 (license license:asl2.0)))
44d10b1f
RW
9439
9440(define-public python2-botocore
9441 (package-with-python2 python-botocore))
9442
9443(define-public python-xdo
9444 (package
9445 (name "python-xdo")
9446 (version "0.3")
9447 (source (origin
9448 (method url-fetch)
9449 (uri (string-append
9450 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9451 "python-xdo_" version ".orig.tar.gz"))
9452 (sha256
9453 (base32
9454 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9455 (build-system python-build-system)
9456 (arguments
9457 '(#:phases
9458 (modify-phases %standard-phases
9459 (add-before 'install 'patch-libxdo-path
9460 ;; Hardcode the path of dynamically loaded libxdo library.
9461 (lambda* (#:key inputs #:allow-other-keys)
9462 (let ((libxdo (string-append
9463 (assoc-ref inputs "xdotool")
9464 "/lib/libxdo.so")))
9465 (substitute* "xdo/_xdo.py"
9466 (("find_library\\(\"xdo\"\\)")
9467 (simple-format #f "\"~a\"" libxdo)))
9468 #t))))
9469 #:tests? #f)) ; no tests provided
9470 (propagated-inputs
9471 `(("python-six" ,python-six)))
9472 (inputs
9473 `(("xdotool" ,xdotool)
9474 ("libX11" ,libx11)))
9475 (home-page "https://tracker.debian.org/pkg/python-xdo")
9476 (synopsis "Python library for simulating X11 keyboard/mouse input")
9477 (description "Provides bindings to libxdo for manipulating X11 via simulated
9478input. (Note that this is mostly a legacy library; you may wish to look at
9479python-xdo for newer bindings.)")
9480 (license license:bsd-3)))
9481
9482(define-public python2-xdo
9483 (package-with-python2 python-xdo))
9484
9485(define-public python-mako
9486 (package
9487 (name "python-mako")
4d3c2cb7 9488 (version "1.1.1")
44d10b1f
RW
9489 (source
9490 (origin
9491 (method url-fetch)
9492 (uri (pypi-uri "Mako" version))
9493 (sha256
9494 (base32
4d3c2cb7 9495 "193mds7lv91pphnvn6c1n55rhjkgq94asdzgrsb2fiqx7rrsd119"))))
44d10b1f 9496 (build-system python-build-system)
6bf53ad5
MB
9497 (arguments
9498 `(#:phases (modify-phases %standard-phases
9499 (replace 'check
9500 (lambda _
9501 (invoke "pytest" "-vv"))))))
44d10b1f
RW
9502 (propagated-inputs
9503 `(("python-markupsafe" ,python-markupsafe)))
9504 (native-inputs
9505 `(("python-mock" ,python-mock)
44d10b1f 9506 ("python-pytest" ,python-pytest)))
7016e620 9507 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
9508 (synopsis "Templating language for Python")
9509 (description "Mako is a templating language for Python that compiles
9510templates into Python modules.")
9511 (license license:expat)))
9512
9513(define-public python2-mako
9514 (package-with-python2 python-mako))
9515
9516(define-public python-waitress
9517 (package
9518 (name "python-waitress")
9519 (version "1.1.0")
9520 (source
9521 (origin
9522 (method url-fetch)
9523 (uri (pypi-uri "waitress" version))
9524 (patches (search-patches "python-waitress-fix-tests.patch"))
9525 (sha256
9526 (base32
9527 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9528 (build-system python-build-system)
9529 (home-page "https://github.com/Pylons/waitress")
9530 (synopsis "Waitress WSGI server")
9531 (description "Waitress is meant to be a production-quality pure-Python WSGI
9532server with very acceptable performance.")
9533 (license license:zpl2.1)))
9534
9535(define-public python2-waitress
9536 (package-with-python2 python-waitress))
9537
b2b23d12
TLC
9538(define-public python-whichcraft
9539 (package
9540 (name "python-whichcraft")
9541 (version "0.6.1")
9542 (source
9543 (origin
9544 (method url-fetch)
9545 (uri (pypi-uri "whichcraft" version))
9546 (sha256
9547 (base32
9548 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9549 (build-system python-build-system)
9550 (native-inputs
9551 `(("python-pytest" ,python-pytest)))
9552 (home-page "https://github.com/pydanny/whichcraft")
9553 (synopsis "Cross-platform cross-python shutil.which functionality")
9554 (description
9555 "This package provides a shim of the shutil.which function that's
9556designed to work across multiple versions of Python.")
9557 (license license:bsd-3)))
9558
1133ca44
TLC
9559(define-public python-cookiecutter
9560 (package
9561 (name "python-cookiecutter")
9562 (version "1.6.0")
9563 (source
9564 (origin
9565 (method url-fetch)
9566 (uri (pypi-uri "cookiecutter" version))
9567 (sha256
9568 (base32
9569 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9570 (build-system python-build-system)
9571 (native-inputs
9572 `(("python-freezegun" ,python-freezegun)
9573 ("python-pytest" ,python-pytest)
9574 ("python-pytest-catchlog" ,python-pytest-catchlog)
9575 ("python-pytest-cov" ,python-pytest-cov)
9576 ("python-pytest-mock" ,python-pytest-mock)))
9577 (propagated-inputs
9578 `(("python-binaryornot" ,python-binaryornot)
9579 ("python-click" ,python-click)
9580 ("python-future" ,python-future)
9581 ("python-jinja2" ,python-jinja2)
9582 ("python-jinja2-time" ,python-jinja2-time)
9583 ("python-poyo" ,python-poyo)
9584 ("python-requests" ,python-requests)
9585 ("python-whichcraft" ,python-whichcraft)))
9586 (home-page "https://github.com/audreyr/cookiecutter")
9587 (synopsis
9588 "Command-line utility that creates projects from project templates")
9589 (description
9590 "This package provides a command-line utility that creates projects from
9591project templates, e.g. creating a Python package project from a Python package
9592project template.")
9593 (license license:bsd-3)))
9594
44d10b1f
RW
9595(define-public python-pyquery
9596 (package
9597 (name "python-pyquery")
9598 (version "1.2.17")
9599 (source
9600 (origin
9601 (method url-fetch)
9602 (uri (pypi-uri "pyquery" version))
9603 (sha256
9604 (base32
9605 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9606 (build-system python-build-system)
9607 (native-inputs
9608 `(("python-webob" ,python-webob)
9609 ("python-webtest" ,python-webtest)))
9610 (propagated-inputs
9611 `(("python-lxml" ,python-lxml)
9612 ("python-cssselect" ,python-cssselect)))
9613 (home-page "https://github.com/gawel/pyquery")
9614 (synopsis "Make jQuery-like queries on xml documents")
9615 (description "pyquery allows you to make jQuery queries on xml documents.
9616The API is as much as possible the similar to jQuery. pyquery uses lxml for
9617fast xml and html manipulation.")
9618 (license license:bsd-3)))
9619
44d10b1f
RW
9620(define-public python-anyjson
9621 (package
9622 (name "python-anyjson")
9623 (version "0.3.3")
9624 (source
9625 (origin
9626 (method url-fetch)
9627 (uri (pypi-uri "anyjson" version))
9628 (sha256
9629 (base32
9630 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9631 (build-system python-build-system)
9632 (arguments
9633 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9634 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9635 ;; whatever) so this transformation needs to be done before the tests
9636 ;; can be run. Maybe we could add a build step to transform beforehand
9637 ;; but it could be annoying/difficult.
9638 ;; We can enable tests for the Python 2 version, though, and do below.
9639 #:tests? #f))
9640 (home-page "https://bitbucket.org/runeh/anyjson/")
9641 (synopsis
9642 "Wraps best available JSON implementation in a common interface")
9643 (description
9644 "Anyjson loads whichever is the fastest JSON module installed
9645and provides a uniform API regardless of which JSON implementation is used.")
9646 (license license:bsd-3)
9647 (properties `((python2-variant . ,(delay python2-anyjson))))))
9648
9649(define-public python2-anyjson
9650 (let ((anyjson (package-with-python2
9651 (strip-python2-variant python-anyjson))))
9652 (package
9653 (inherit anyjson)
9654 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9655 #:tests? #t
9656 ,@(package-arguments anyjson)))
9657 (native-inputs `(("python2-nose" ,python2-nose))))))
9658
9659(define-public python-amqp
9660 (package
9661 (name "python-amqp")
9662 (version "2.3.2")
9663 (source
9664 (origin
9665 (method url-fetch)
9666 (uri (pypi-uri "amqp" version))
9667 (sha256
9668 (base32
9669 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9670 (build-system python-build-system)
9671 (native-inputs
9672 `(("python-case" ,python-case)
9673 ("python-pytest-sugar" ,python-pytest-sugar)
9674 ("python-mock" ,python-mock)))
9675 (propagated-inputs
9676 `(("python-vine" ,python-vine)))
9677 (home-page "https://github.com/celery/py-amqp")
9678 (synopsis
9679 "Low-level AMQP client for Python (fork of amqplib)")
9680 (description
9681 "This is a fork of amqplib which was originally written by Barry Pederson.
9682It is maintained by the Celery project, and used by kombu as a pure python
9683alternative when librabbitmq is not available.")
9684 (license license:lgpl2.1+)
9685 (properties `((python2-variant . ,(delay python2-amqp))))))
9686
9687(define-public python2-amqp
9688 (let ((amqp (package-with-python2
9689 (strip-python2-variant python-amqp))))
9690 (package
9691 (inherit amqp)
9692 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9693 ;; unmaintained. Weirdly, does not do this on the python 3
9694 ;; version?
9695 #:tests? #f
9696 ,@(package-arguments amqp))))))
9697
9698(define-public python-txamqp
9699 (package
9700 (name "python-txamqp")
9701 (version "0.8.2")
9702 (source
9703 (origin
9704 (method url-fetch)
9705 (uri (pypi-uri "txAMQP" version))
9706 (sha256
9707 (base32
9708 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9709 (build-system python-build-system)
9710 (propagated-inputs
9711 `(("python-six" ,python-six)
9712 ("python-twisted" ,python-twisted)))
9713 (home-page "https://github.com/txamqp/txamqp")
9714 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9715 (description
9716 "This package provides a Python library for communicating with AMQP peers
9717and brokers using the asynchronous networking framework Twisted. It contains
9718all the necessary code to connect, send and receive messages to/from an
9719AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9720also includes support for using Thrift RPC over AMQP in Twisted
9721applications.")
9722 (license license:asl2.0)))
9723
9724(define-public python2-txamqp
9725 (package-with-python2 python-txamqp))
9726
9727(define-public python-kombu
9728 (package
9729 (name "python-kombu")
9730 (version "4.2.2")
9731 (source
9732 (origin
9733 (method url-fetch)
9734 (uri (pypi-uri "kombu" version))
9735 (sha256
9736 (base32
9737 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9738 (build-system python-build-system)
9739 (native-inputs
9740 `(("python-mock" ,python-mock)
9741 ("python-case" ,python-case)
9742 ("python-pyro4" ,python-pyro4)
9743 ("python-pytest-sugar" ,python-pytest-sugar)
9744 ("python-pytz" ,python-pytz)))
9745 (propagated-inputs
9746 `(("python-anyjson" ,python-anyjson)
9747 ("python-amqp" ,python-amqp)
9748 ("python-redis" ,python-redis)))
9749 (home-page "https://kombu.readthedocs.io")
9750 (synopsis "Message passing library for Python")
9751 (description "The aim of Kombu is to make messaging in Python as easy as
9752possible by providing an idiomatic high-level interface for the AMQ protocol,
9753and also provide proven and tested solutions to common messaging problems.
9754AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9755message orientation, queuing, routing, reliability and security, for which the
9756RabbitMQ messaging server is the most popular implementation.")
9757 (license license:bsd-3)
9758 (properties `((python2-variant . ,(delay python2-kombu))))))
9759
9760(define-public python2-kombu
9761 (let ((kombu (package-with-python2
9762 (strip-python2-variant python-kombu))))
9763 (package
9764 (inherit kombu)
9765 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9766 ;; It works fine on the python3 variant.
9767 #:tests? #f
9768 ,@(package-arguments kombu)))
9769 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9770 ,@(package-native-inputs kombu))))))
9771
9772(define-public python-billiard
9773 (package
9774 (name "python-billiard")
9775 (version "3.5.0.5")
9776 (source
9777 (origin
9778 (method url-fetch)
9779 (uri (pypi-uri "billiard" version))
9780 (sha256
9781 (base32
9782 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9783 (build-system python-build-system)
9784 (native-inputs
9785 `(("python-case" ,python-case)
9786 ("python-pytest" ,python-pytest)))
9787 (home-page "https://github.com/celery/billiard")
9788 (synopsis
9789 "Python multiprocessing fork with improvements and bugfixes")
9790 (description
9791 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9792multiprocessing package itself is a renamed and updated version of R Oudkerk's
9793pyprocessing package. This standalone variant is intended to be compatible with
9794Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9795 (license license:bsd-3)
9796 (properties `((python2-variant . ,(delay python2-billiard))))))
9797
9798(define-public python2-billiard
9799 (let ((billiard (package-with-python2
9800 (strip-python2-variant python-billiard))))
9801 (package
9802 (inherit billiard)
9803 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9804 ("python2-mock" ,python2-mock)
9805 ,@(package-native-inputs billiard))))))
9806
9807(define-public python-celery
9808 (package
9809 (name "python-celery")
9810 (version "4.2.1")
9811 (source
9812 (origin
9813 (method url-fetch)
9814 (uri (pypi-uri "celery" version))
9815 (sha256
9816 (base32
9817 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9818 (build-system python-build-system)
9819 (arguments
9820 '(;; TODO The tests fail with Python 3.7
9821 ;; https://github.com/celery/celery/issues/4849
9822 #:tests? #f
9823 #:phases
9824 (modify-phases %standard-phases
9825 (add-after 'unpack 'patch-requirements
9826 (lambda _
9827 (substitute* "requirements/test.txt"
9828 (("pytest>=3\\.0,<3\\.3")
9829 "pytest>=3.0"))
9830 #t)))))
9831 (native-inputs
9832 `(("python-case" ,python-case)
9833 ("python-pytest" ,python-pytest)))
9834 (propagated-inputs
9835 `(("python-pytz" ,python-pytz)
9836 ("python-billiard" ,python-billiard)
9837 ("python-kombu" ,python-kombu)))
9838 (home-page "https://celeryproject.org")
9839 (synopsis "Distributed Task Queue")
9840 (description "Celery is an asynchronous task queue/job queue based on
9841distributed message passing. It is focused on real-time operation, but
9842supports scheduling as well. The execution units, called tasks, are executed
9843concurrently on a single or more worker servers using multiprocessing,
9844Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9845synchronously (wait until ready).")
9846 (license license:bsd-3)
9847 (properties `((python2-variant . ,(delay python2-celery))))))
9848
9849(define-public python2-celery
9850 (let ((celery (package-with-python2
9851 (strip-python2-variant python-celery))))
9852 (package
9853 (inherit celery)
9854 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9855 ("python2-mock" ,python2-mock)
9856 ,@(package-native-inputs celery))))))
9857
9858(define-public python-translitcodec
9859 (package
9860 (name "python-translitcodec")
9861 (version "0.4.0")
9862 (source
9863 (origin
9864 (method url-fetch)
9865 (uri (pypi-uri "translitcodec" version))
9866 (sha256
9867 (base32
9868 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9869 (build-system python-build-system)
9870 (arguments
9871 `(#:tests? #f)) ; no tests provided
9872 (home-page
9873 "https://github.com/claudep/translitcodec")
9874 (synopsis
9875 "Unicode to 8-bit charset transliteration codec")
9876 (description
9877 "This package contains codecs for transliterating ISO 10646 texts into
9878best-effort representations using smaller coded character sets (ASCII,
9879ISO 8859, etc.).")
9880 (license license:expat)))
9881
9882(define-public python2-translitcodec
9883 (package-with-python2 python-translitcodec))
9884
9885(define-public python-editor
9886 (package
9887 (name "python-editor")
baea210c 9888 (version "1.0.4")
44d10b1f
RW
9889 (source
9890 (origin
9891 (method url-fetch)
9892 (uri (pypi-uri "python-editor" version))
9893 (sha256
9894 (base32
baea210c 9895 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
44d10b1f 9896 (build-system python-build-system)
baea210c
MB
9897 (arguments
9898 '(#:tests? #f)) ;XXX: needs a TTY and an editor
9899 (home-page "https://github.com/fmoo/python-editor")
9900 (synopsis "Programmatically open an editor, capture the result")
44d10b1f
RW
9901 (description
9902 "python-editor is a library that provides the editor module for
9903programmatically interfacing with your system's $EDITOR.")
9904 (license license:asl2.0)))
9905
9906(define-public python2-editor
9907 (package-with-python2 python-editor))
9908
44d10b1f
RW
9909(define-public python-vobject
9910 (package
9911 (name "python-vobject")
9912 (version "0.9.5")
9913 (source (origin
9914 (method url-fetch)
9915 (uri (pypi-uri "vobject" version))
9916 (sha256
9917 (base32
9918 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9919 (build-system python-build-system)
9920 (arguments
9921 '(;; The test suite relies on some non-portable Windows interfaces.
9922 #:tests? #f))
9923 (propagated-inputs
9924 `(("python-dateutil" ,python-dateutil)
9925 ("python-pyicu" ,python-pyicu)))
9926 (synopsis "Parse and generate vCard and vCalendar files")
9927 (description "Vobject is intended to be a full featured Python package for
9928parsing and generating vCard and vCalendar files. Currently, iCalendar files
9929are supported and well tested. vCard 3.0 files are supported, and all data
9930should be imported, but only a few components are understood in a sophisticated
9931way.")
5d6e7106 9932 (home-page "https://eventable.github.io/vobject/")
44d10b1f
RW
9933 (license license:asl2.0)))
9934
9935(define-public python2-vobject
9936 (package-with-python2 python-vobject))
9937
9938(define-public python-munkres
9939 (package
9940 (name "python-munkres")
9941 (version "1.0.8")
9942 (source (origin
9943 (method url-fetch)
9944 (uri (pypi-uri "munkres" version))
9945 (sha256
9946 (base32
9947 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9948 (build-system python-build-system)
9949 (arguments
9950 '(#:tests? #f)) ; no test suite
78f8780e 9951 (home-page "https://software.clapper.org/munkres/")
44d10b1f
RW
9952 (synopsis "Implementation of the Munkres algorithm")
9953 (description "The Munkres module provides an implementation of the Munkres
9954algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9955useful for solving the Assignment Problem.")
9956 (license license:bsd-3)))
9957
9958(define-public python2-munkres
9959 (package-with-python2 python-munkres))
9960
9961(define-public python-whoosh
9962 (package
9963 (name "python-whoosh")
9964 (version "2.7.4")
9965 (source
9966 (origin
9967 (method url-fetch)
9968 (uri (pypi-uri "Whoosh" version))
9969 (sha256
9970 (base32
9971 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9972 (build-system python-build-system)
2679d9a4 9973 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
9974 (native-inputs
9975 `(("python-pytest" ,python-pytest)))
9976 (home-page "https://bitbucket.org/mchaput/whoosh")
9977 (synopsis "Full text indexing, search, and spell checking library")
9978 (description
9979 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9980checking library.")
9981 (license license:bsd-2)))
9982
9983(define-public python2-whoosh
9984 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9985 (package (inherit whoosh)
9986 (propagated-inputs
9987 `(("python2-backport-ssl-match-hostname"
9988 ,python2-backport-ssl-match-hostname)
9989 ,@(package-propagated-inputs whoosh))))))
9990
9991(define-public python-pathlib
9992 (package
9993 (name "python-pathlib")
9994 (version "1.0.1")
9995 (source (origin
9996 (method url-fetch)
9997 (uri (pypi-uri "pathlib" version))
9998 (sha256
9999 (base32
10000 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10001 (build-system python-build-system)
10002 ;; The tests depend on the internal "test" module, which does not provide
10003 ;; a stable interface.
10004 (arguments `(#:tests? #f))
10005 (home-page "https://pathlib.readthedocs.org/")
10006 (synopsis "Object-oriented file system paths")
10007 (description "Pathlib offers a set of classes to handle file system paths.
10008It offers the following advantages over using string objects:
10009
10010@enumerate
10011@item No more cumbersome use of os and os.path functions. Everything can
10012be done easily through operators, attribute accesses, and method calls.
10013@item Embodies the semantics of different path types. For example,
10014comparing Windows paths ignores casing.
10015@item Well-defined semantics, eliminating any inconsistencies or
10016ambiguities (forward vs. backward slashes, etc.).
10017@end enumerate
10018
10019Note: In Python 3.4, pathlib is now part of the standard library. For other
10020Python versions please consider python-pathlib2 instead, which tracks the
10021standard library module. This module (python-pathlib) isn't maintained
10022anymore.")
10023 (license license:expat)))
10024
10025(define-public python2-pathlib
10026 (package-with-python2 python-pathlib))
10027
10028(define-public python2-pathlib2
10029 (package
10030 (name "python2-pathlib2")
54da6f9f 10031 (version "2.3.3")
44d10b1f
RW
10032 (source (origin
10033 (method url-fetch)
10034 (uri (pypi-uri "pathlib2" version))
10035 (sha256
10036 (base32
54da6f9f 10037 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
10038 (build-system python-build-system)
10039 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10040 ;; version is 3.4 which already includes this package as part of the
10041 ;; standard library.
10042 (arguments
10043 `(#:python ,python-2))
10044 (propagated-inputs
10045 `(("python2-scandir" ,python2-scandir)
10046 ("python2-six" ,python2-six)))
e85af137 10047 (home-page "https://pypi.org/project/pathlib2/")
44d10b1f
RW
10048 (synopsis "Object-oriented file system paths - backport of standard
10049pathlib module")
10050 (description "The goal of pathlib2 is to provide a backport of standard
10051pathlib module which tracks the standard library module, so all the newest
10052features of the standard pathlib can be used also on older Python versions.
10053
10054Pathlib offers a set of classes to handle file system paths. It offers the
10055following advantages over using string objects:
10056
10057@enumerate
10058@item No more cumbersome use of os and os.path functions. Everything can
10059be done easily through operators, attribute accesses, and method calls.
10060@item Embodies the semantics of different path types. For example,
10061comparing Windows paths ignores casing.
10062@item Well-defined semantics, eliminating any inconsistencies or
10063ambiguities (forward vs. backward slashes, etc.).
10064@end enumerate")
10065 (license license:expat)))
10066
10067(define-public python2-pathlib2-bootstrap
10068 (hidden-package
10069 (package
10070 (inherit python2-pathlib2)
10071 (name "python2-pathlib2-bootstrap")
10072 (propagated-inputs
10073 `(("python2-scandir" ,python2-scandir)
10074 ("python2-six" ,python2-six-bootstrap))))))
10075
10076(define-public python-jellyfish
10077 (package
10078 (name "python-jellyfish")
10079 (version "0.5.6")
10080 (source (origin
10081 (method url-fetch)
10082 (uri (pypi-uri "jellyfish" version))
10083 (sha256
10084 (base32
10085 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10086 (build-system python-build-system)
10087 (native-inputs
10088 `(("python-pytest" ,python-pytest)))
10089 (home-page "https://github.com/jamesturk/jellyfish")
10090 (synopsis "Approximate and phonetic matching of strings")
10091 (description "Jellyfish uses a variety of string comparison and phonetic
10092encoding algorithms to do fuzzy string matching.")
10093 (license license:bsd-2)
10094 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10095
10096(define-public python2-jellyfish
10097 (let ((jellyfish (package-with-python2
10098 (strip-python2-variant python-jellyfish))))
10099 (package (inherit jellyfish)
10100 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10101 ,@(package-native-inputs jellyfish))))))
10102
10103(define-public python2-unicodecsv
10104 (package
10105 (name "python2-unicodecsv")
10106 (version "0.14.1")
10107 (source (origin
f711b71b 10108 (method git-fetch)
44d10b1f
RW
10109 ;; The test suite is not included in the PyPi release.
10110 ;; https://github.com/jdunck/python-unicodecsv/issues/19
f711b71b
EF
10111 (uri (git-reference
10112 (url "https://github.com/jdunck/python-unicodecsv")
10113 (commit version)))
10114 (file-name (git-file-name name version))
44d10b1f
RW
10115 (sha256
10116 (base32
f711b71b 10117 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
44d10b1f
RW
10118 (build-system python-build-system)
10119 (arguments
10120 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10121 #:python ,python-2))
10122 (native-inputs
10123 `(("python2-unittest2" ,python2-unittest2)))
10124 (home-page "https://github.com/jdunck/python-unicodecsv")
10125 (synopsis "Unicode CSV module for Python 2")
10126 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10127module, adding support for Unicode strings.")
10128 (license license:bsd-2)))
10129
10130(define-public python-rarfile
10131 (package
10132 (name "python-rarfile")
10133 (version "2.8")
10134 (source (origin
10135 (method url-fetch)
10136 (uri (pypi-uri "rarfile" version))
10137 (sha256
10138 (base32
10139 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10140 (build-system python-build-system)
10141 (arguments
10142 '(#:phases
10143 (modify-phases %standard-phases
10144 (replace 'check
10145 ;; Many tests fail, but the installation proceeds.
e59dd341 10146 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
10147 (native-inputs
10148 `(("which" ,which))) ; required for tests
10149 (propagated-inputs
10150 `(("libarchive" ,libarchive)))
10151 (home-page "https://github.com/markokr/rarfile")
10152 (synopsis "RAR archive reader for Python")
10153 (description "This is Python module for RAR archive reading. The interface
10154is made as zipfile like as possible.")
10155 (license license:isc)))
10156
10157(define-public python2-rarfile
10158 (package-with-python2 python-rarfile))
10159
10160(define-public python-magic
10161 (package
10162 (name "python-magic")
10163 (version "0.4.15")
10164 (source
10165 (origin
10166 (method url-fetch)
10167 (uri (pypi-uri "python-magic" version))
10168 (sha256
10169 (base32
10170 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
10171 (file-name (string-append name "-" version "-checkout"))))
10172 (build-system python-build-system)
10173 (arguments
10174 ;; The tests are unreliable, so don't run them. The tests fail
10175 ;; under Python3 because they were written for Python2 and
10176 ;; contain import statements that do not work in Python3. One of
10177 ;; the tests fails under Python2 because its assertions are
10178 ;; overly stringent; it relies on comparing output strings which
10179 ;; are brittle and can change depending on the version of
10180 ;; libmagic being used and the system on which the test is
10181 ;; running. In my case, under GuixSD 0.10.0, only one test
10182 ;; failed, and it seems to have failed only because the version
10183 ;; of libmagic that is packaged in Guix outputs a slightly
10184 ;; different (but not wrong) string than the one that the test
10185 ;; expected.
10186 '(#:tests? #f
10187 #:phases (modify-phases %standard-phases
10188 ;; Replace a specific method call with a hard-coded
10189 ;; path to the necessary libmagic.so file in the
10190 ;; store. If we don't do this, then the method call
10191 ;; will fail to find the libmagic.so file, which in
10192 ;; turn will cause any application using
10193 ;; python-magic to fail.
10194 (add-before 'build 'hard-code-path-to-libmagic
10195 (lambda* (#:key inputs #:allow-other-keys)
10196 (let ((file (assoc-ref inputs "file")))
10197 (substitute* "magic.py"
10198 (("ctypes.util.find_library\\('magic'\\)")
10199 (string-append "'" file "/lib/libmagic.so'")))
10200 #t)))
10201 (add-before 'install 'disable-egg-compression
10202 (lambda _
10203 (let ((port (open-file "setup.cfg" "a")))
10204 (display "\n[easy_install]\nzip_ok = 0\n"
10205 port)
10206 (close-port port)
10207 #t))))))
10208 (inputs
10209 ;; python-magic needs to be able to find libmagic.so.
10210 `(("file" ,file)))
10211 (home-page
10212 "https://github.com/ahupp/python-magic")
10213 (synopsis
10214 "File type identification using libmagic")
10215 (description
10216 "This module uses ctypes to access the libmagic file type
10217identification library. It makes use of the local magic database and
10218supports both textual and MIME-type output. Note that this module and
10219the python-file module both provide a \"magic.py\" file; these two
10220modules, which are different and were developed separately, both serve
10221the same purpose: to provide Python bindings for libmagic.")
10222 (license license:expat)))
10223
10224(define-public python2-magic
10225 (package-with-python2 python-magic))
10226
10227(define-public python2-s3cmd
10228 (package
10229 (name "python2-s3cmd")
10230 (version "1.6.1")
10231 (source
10232 (origin
10233 (method url-fetch)
10234 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10235 "s3cmd-" version ".tar.gz"))
10236 (sha256
10237 (base32
10238 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10239 (build-system python-build-system)
10240 (arguments
10241 ;; s3cmd is written for python2 only and contains no tests.
10242 `(#:python ,python-2
10243 #:tests? #f))
10244 (propagated-inputs
10245 `(("python2-dateutil" ,python2-dateutil)
10246 ;; The python-file package also provides a magic.py module.
10247 ;; This is an unfortunate state of affairs; however, s3cmd
10248 ;; fails to install if it cannot find specifically the
10249 ;; python-magic package. Thus we include it, instead of using
10250 ;; python-file. Ironically, s3cmd sometimes works better
10251 ;; without libmagic bindings at all:
10252 ;; https://github.com/s3tools/s3cmd/issues/198
10253 ("python2-magic" ,python2-magic)))
fa7efe17 10254 (home-page "https://s3tools.org/s3cmd")
44d10b1f
RW
10255 (synopsis "Command line tool for S3-compatible storage services")
10256 (description
10257 "S3cmd is a command line tool for uploading, retrieving and managing data
10258in storage services that are compatible with the Amazon Simple Storage
10259Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10260GnuPG encryption, and more. It also supports management of Amazon's
10261CloudFront content delivery network.")
10262 (license license:gpl2+)))
10263
10264(define-public python-pkgconfig
10265 (package
10266 (name "python-pkgconfig")
10267 (version "1.3.1")
10268 (source
10269 (origin
10270 (method url-fetch)
10271 (uri (pypi-uri "pkgconfig" version))
10272 (sha256
10273 (base32
10274 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
10275 (build-system python-build-system)
10276 (native-inputs
10277 `(("python-nose" ,python-nose)))
10278 (inputs
10279 `(("pkg-config" ,pkg-config)))
10280 (arguments
10281 `(#:phases
10282 (modify-phases %standard-phases
10283 (add-before 'build 'patch
10284 ;; Hard-code the path to pkg-config.
10285 (lambda _
10286 (substitute* "pkgconfig/pkgconfig.py"
10287 (("cmd = 'pkg-config")
10288 (string-append "cmd = '" (which "pkg-config"))))
10289 #t))
10290 (replace 'check
10291 (lambda _
10292 (invoke "nosetests" "test.py"))))))
10293 (home-page "https://github.com/matze/pkgconfig")
10294 (synopsis "Python interface for pkg-config")
10295 (description "This module provides a Python interface to pkg-config. It
10296can be used to find all pkg-config packages, check if a package exists,
10297check if a package meets certain version requirements, query CFLAGS and
10298LDFLAGS and parse the output to build extensions with setup.py.")
10299 (license license:expat)))
10300
10301(define-public python2-pkgconfig
10302 (package-with-python2 python-pkgconfig))
10303
10304(define-public python-bz2file
10305 (package
10306 (name "python-bz2file")
10307 (version "0.98")
10308 (source
10309 (origin
10310 (method url-fetch)
10311 (uri (pypi-uri "bz2file" version))
10312 (sha256
10313 (base32
10314 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10315 (build-system python-build-system)
10316 (arguments
10317 `(#:tests? #f)) ; Tests use deprecated python modules.
10318 (home-page "https://github.com/nvawda/bz2file")
10319 (synopsis "Read and write bzip2-compressed files")
10320 (description
10321 "Bz2file is a Python library for reading and writing bzip2-compressed
10322files. It contains a drop-in replacement for the I/O interface in the
10323standard library's @code{bz2} module, including features from the latest
10324development version of CPython that are not available in older releases.")
10325 (license license:asl2.0)))
10326
10327(define-public python2-bz2file
10328 (package-with-python2 python-bz2file))
10329
10330(define-public python-future
10331 (package
10332 (name "python-future")
d5d54030 10333 (version "0.17.1")
44d10b1f
RW
10334 (source
10335 (origin
10336 (method url-fetch)
10337 (uri (pypi-uri "future" version))
10338 (sha256
10339 (base32
d5d54030 10340 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
10341 (build-system python-build-system)
10342 ;; Many tests connect to the network or are otherwise flawed.
10343 ;; https://github.com/PythonCharmers/python-future/issues/210
10344 (arguments
10345 `(#:tests? #f))
10346 (home-page "http://python-future.org")
10347 (synopsis "Single-source support for Python 3 and 2")
10348 (description
10349 "@code{python-future} is the missing compatibility layer between Python 2 and
10350Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10351to support both Python 2 and Python 3 with minimal overhead.")
10352 (license license:expat)))
10353
10354(define-public python2-future
10355 (package-with-python2 python-future))
10356
10357(define-public python-cysignals
10358 (package
10359 (name "python-cysignals")
8e3e51df 10360 (version "1.9.0")
44d10b1f
RW
10361 (source
10362 (origin
10363 (method url-fetch)
8e3e51df 10364 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
10365 (sha256
10366 (base32
8e3e51df 10367 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
10368 (build-system python-build-system)
10369 (native-inputs
10370 `(("python-cython" ,python-cython)
10371 ("python-sphinx" ,python-sphinx)))
10372 (inputs
10373 `(("pari-gp" ,pari-gp)))
10374 (arguments
10375 `(#:modules ((guix build python-build-system)
10376 ((guix build gnu-build-system) #:prefix gnu:)
10377 (guix build utils))
10378 ;; FIXME: Tests are executed after installation and currently fail
10379 ;; when not installing into standard locations; the author is working
10380 ;; on a fix.
10381 #:tests? #f
10382 #:phases
10383 (modify-phases %standard-phases
10384 (add-before
10385 'build 'configure
10386 (assoc-ref gnu:%standard-phases 'configure)))))
10387 (home-page
10388 "https://github.com/sagemath/cysignals")
10389 (synopsis
10390 "Handling of interrupts and signals for Cython")
10391 (description
10392 "The cysignals package provides mechanisms to handle interrupts (and
10393other signals and errors) in Cython code, using two related approaches,
10394for mixed Cython/Python code or external C libraries and pure Cython code,
10395respectively.")
10396 (license license:lgpl3+)))
10397
10398(define-public python2-cysignals
10399 (package-with-python2 python-cysignals))
10400
10401(define-public python2-shedskin
10402 (package
10403 (name "python2-shedskin")
10404 (version "0.9.4")
10405 (source
10406 (origin
10407 (method url-fetch)
10408 (uri (string-append "https://github.com/shedskin/shedskin/"
10409 "releases/download/v" version
10410 "/shedskin-" version ".tgz"))
10411 (sha256
10412 (base32
10413 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10414 (build-system python-build-system)
10415 (arguments
10416 `(#:python ,python-2
10417 #:phases (modify-phases %standard-phases
10418 (add-after 'unpack 'fix-resulting-include-libs
10419 (lambda* (#:key inputs #:allow-other-keys)
10420 (let ((libgc (assoc-ref inputs "libgc"))
10421 (pcre (assoc-ref inputs "pcre")))
10422 (substitute* "shedskin/makefile.py"
10423 (("variable == 'CCFLAGS':[ ]*")
10424 (string-append "variable == 'CCFLAGS':\n"
10425 " line += ' -I " pcre "/include"
10426 " -I " libgc "/include'"))
10427 (("variable == 'LFLAGS':[ ]*")
10428 (string-append "variable == 'LFLAGS':\n"
10429 " line += ' -L" pcre "/lib"
10430 " -L " libgc "/lib'")))
10431 #t))))))
10432 (inputs `(("pcre" ,pcre)
10433 ("libgc" ,libgc)))
10434 (home-page "https://shedskin.github.io/")
10435 (synopsis "Experimental Python-2 to C++ Compiler")
10436 (description (string-append "This is an experimental compiler for a subset of
10437Python. It generates C++ code and a Makefile."))
10438 (license (list license:gpl3 license:bsd-3 license:expat))))
10439
10440(define-public python2-rope
10441 (package
10442 (name "python2-rope")
a9ba0a31 10443 (version "0.11.0")
44d10b1f
RW
10444 (source
10445 (origin
10446 (method url-fetch)
10447 (uri (pypi-uri "rope" version))
10448 (sha256
10449 (base32
a9ba0a31 10450 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 10451 (arguments
afb29715 10452 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
10453 `(#:python ,python-2))
10454 (build-system python-build-system)
10455 (native-inputs
10456 `(("python2-unittest2" ,python2-unittest2)))
10457 (home-page "https://github.com/python-rope/rope")
10458 (synopsis "Refactoring library for Python")
10459 (description "Rope is a refactoring library for Python. It facilitates
10460the renaming, moving and extracting of attributes, functions, modules, fields
10461and parameters in Python 2 source code. These refactorings can also be applied
10462to occurrences in strings and comments.")
10463 (license license:gpl2)))
10464
2c880ef4
LC
10465(define-public python-rope
10466 (package
10467 (inherit python2-rope)
10468 (name "python-rope")
10469 (arguments `(#:python ,python-wrapper
10470 ;; XXX: Only partial python3 support, results in some failing
10471 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10472 #:tests? #f))
10473 (properties `((python2-variant . ,(delay python2-rope))))))
10474
44d10b1f
RW
10475(define-public python-py3status
10476 (package
10477 (name "python-py3status")
ef68b35d 10478 (version "3.21")
44d10b1f
RW
10479 (source
10480 (origin
10481 (method url-fetch)
10482 (uri (pypi-uri "py3status" version))
10483 (sha256
ef68b35d 10484 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
10485 (build-system python-build-system)
10486 (inputs
10487 `(("file" ,file)))
10488 (arguments
10489 '(#:phases
10490 (modify-phases %standard-phases
10491 ;; 'file' is used for detection of configuration file encoding
10492 ;; let's make link the dependency to particular input
10493 (add-before 'build 'patch-file-path
10494 (lambda* (#:key inputs #:allow-other-keys)
10495 (let ((file-path (assoc-ref inputs "file")))
10496 (substitute* "py3status/parse_config.py"
6a6b8a3f 10497 (("\\[\"file\", \"-b\"")
44d10b1f
RW
10498 (string-append "['" file-path "/bin/file', '-b'")))
10499 #t))))
10500 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10501 (home-page "https://github.com/ultrabug/py3status")
10502 (synopsis "Extensible i3status wrapper written in Python")
10503 (description "py3status is an i3status wrapper which extends i3status
10504functionality in a modular way, allowing you to extend your panel with your
10505own code, responding to click events and updating clock every second.")
10506 (license license:bsd-3)))
10507
10508(define-public python-tblib
10509 (package
10510 (name "python-tblib")
4fc26c65 10511 (version "1.6.0")
44d10b1f
RW
10512 (source (origin
10513 (method url-fetch)
10514 (uri (pypi-uri "tblib" version))
4fc26c65
MB
10515 (sha256
10516 (base32
10517 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
44d10b1f
RW
10518 (build-system python-build-system)
10519 (arguments
10520 `(#:phases
10521 (modify-phases %standard-phases
44d10b1f
RW
10522 (replace 'check
10523 (lambda _
10524 ;; Upstream runs tests after installation and the package itself
10525 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10526 ;; found.
10527 (setenv "PYTHONPATH"
10528 (string-append (getcwd) "/build/lib:"
10529 (getenv "PYTHONPATH")))
10530 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10531 (native-inputs
10532 `(("python-pytest" ,python-pytest)
10533 ("python-six" ,python-six)))
10534 (home-page "https://github.com/ionelmc/python-tblib")
10535 (synopsis "Traceback serialization library")
10536 (description
10537 "Traceback serialization allows you to:
10538
10539@enumerate
10540@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10541different processes. This allows better error handling when running code over
10542multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10543
10544@item Parse traceback strings and raise with the parsed tracebacks.
10545@end enumerate\n")
10546 (license license:bsd-3)))
10547
10548(define-public python2-tblib
10549 (package-with-python2 python-tblib))
10550
10551(define-public python-greenlet
10552 (package
10553 (name "python-greenlet")
10554 (version "0.4.15")
10555 (source (origin
10556 (method url-fetch)
10557 (uri (pypi-uri "greenlet" version))
10558 (sha256
10559 (base32
10560 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10561 (build-system python-build-system)
10562 (home-page "https://greenlet.readthedocs.io/")
10563 (synopsis "Lightweight in-process concurrent programming")
10564 (description
10565 "Greenlet package is a spin-off of Stackless, a version of CPython
10566that supports micro-threads called \"tasklets\". Tasklets run
10567pseudo-concurrently (typically in a single or a few OS-level threads) and
10568are synchronized with data exchanges on \"channels\".")
10569 (license (list license:psfl license:expat))))
10570
10571(define-public python2-greenlet
10572 (package-with-python2 python-greenlet))
10573
10574(define-public python-objgraph
10575 (package
10576 (name "python-objgraph")
eebc03bb 10577 (version "3.4.1")
44d10b1f
RW
10578 (source
10579 (origin
10580 (method url-fetch)
10581 (uri (pypi-uri "objgraph" version))
10582 (sha256
10583 (base32
eebc03bb 10584 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
44d10b1f
RW
10585 (build-system python-build-system)
10586 (propagated-inputs
10587 `(("python-graphviz" ,python-graphviz)))
10588 (native-inputs
10589 `(("python-mock" ,python-mock)
10590 ("graphviz" ,graphviz)))
10591 (home-page "https://mg.pov.lt/objgraph/")
10592 (synopsis "Draw Python object reference graphs with graphviz")
10593 (description
10594 "This package provides tools to draw Python object reference graphs with
10595graphviz.")
10596 (license license:expat)))
10597
ffe58d1d
MB
10598(define-public python2-objgraph
10599 (package-with-python2 python-objgraph))
10600
44d10b1f
RW
10601(define-public python-gevent
10602 (package
10603 (name "python-gevent")
f11b5556 10604 (version "1.4.0")
44d10b1f
RW
10605 (source (origin
10606 (method url-fetch)
10607 (uri (pypi-uri "gevent" version))
10608 (sha256
10609 (base32
f11b5556 10610 "1lchr4akw2jkm5v4kz7bdm4wv3knkfhbfn9vkkz4s5yrkcxzmdqy"))
44d10b1f
RW
10611 (modules '((guix build utils)))
10612 (snippet
10613 '(begin
10614 ;; unbunding libev and c-ares
10615 (delete-file-recursively "deps")
10616 #t))))
10617 (build-system python-build-system)
10618 (arguments
10619 `(#:modules ((ice-9 ftw)
10620 (ice-9 match)
10621 (srfi srfi-26)
10622 (guix build utils)
10623 (guix build python-build-system))
10624 #:phases (modify-phases %standard-phases
44d10b1f
RW
10625 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10626 (lambda _
10627 (substitute* "src/gevent/subprocess.py"
10628 (("/bin/sh") (which "sh")))
10629 (for-each (lambda (file)
10630 (substitute* file
10631 (("/bin/sh") (which "sh"))
10632 (("/bin/true") (which "true"))))
10633 (find-files "src/greentest" "\\.py$"))
10634 #t))
10635 (add-before 'build 'do-not-use-bundled-sources
10636 (lambda* (#:key inputs #:allow-other-keys)
f11b5556 10637 (setenv "GEVENTSETUP_EMBED" "0")
44d10b1f 10638
b5b56b7f
MB
10639 ;; Prevent building bundled libev.
10640 (substitute* "setup.py"
10641 (("run_make=_BUILDING")
10642 "run_make=False"))
10643
44d10b1f
RW
10644 (let ((greenlet (string-append
10645 (assoc-ref inputs "python-greenlet")
10646 "/include")))
10647 (match (scandir greenlet
10648 (lambda (item)
10649 (string-prefix? "python" item)))
10650 ((python)
b5b56b7f 10651 (setenv "C_INCLUDE_PATH"
f11b5556
MB
10652 (string-append greenlet "/" python ":"
10653 (or (getenv "C_INCLUDE_PATH")
10654 ""))))))
44d10b1f 10655 #t))
f11b5556 10656 (add-before 'check 'pretend-to-be-CI
44d10b1f 10657 (lambda _
f11b5556
MB
10658 ;; A few tests are skipped due to network constraints or
10659 ;; get longer timeouts when running in a CI environment.
10660 ;; Piggy-back on that, as we need the same adjustments.
10661 (setenv "TRAVIS" "1")
10662 (setenv "APPVEYOR" "1")
44d10b1f 10663 #t))
f11b5556
MB
10664 (add-before 'check 'adjust-tests
10665 (lambda _
10666 (let ((disabled-tests
10667 '(;; These tests rely on networking which is not
10668 ;; available in the build container.
10669 "test_urllib2net.py"
10670 "test__server.py"
10671 "test__server_pywsgi.py"
10672 "test_socket.py"
10673 "test__socket.py"
10674 "test__socket_ssl.py"
10675 "test__socket_dns.py"
10676 "test__socket_dns6.py"
10677 "test___example_servers.py"
10678 "test__getaddrinfo_import.py"
10679 "test__examples.py"
10680 "test_httplib.py"
10681 "test_https.py"
10682 "test_urllib2_localnet.py"
10683 "test_ssl.py"
10684 "test__ssl.py"
10685 ;; XXX: These tests borrow functionality from the
10686 ;; Python builtin 'test' module, but it is not
10687 ;; installed with the Guix Python distribution.
10688 "test_smtpd.py"
10689 "test_wsgiref.py"
10690 "test_urllib2.py"
10691 "test_thread.py"
10692 "test_threading.py"
10693 "test__threading_2.py"
10694 ;; FIXME: test_patch_twice_warning_events fails for
10695 ;; no apparent reason. Needs more investigation!
10696 "test__monkey.py"
10697 ;; These tests rely on KeyboardInterrupts which do not
10698 ;; work inside the build container for some reason
10699 ;; (lack of controlling terminal?).
10700 "test_subprocess.py"
10701 "test__issues461_471.py"
10702 ;; TODO: Patch out the tests that use getprotobyname, etc
10703 ;; instead of disabling all the tests from these files.
10704 "test__all__.py"
10705 "test___config.py"
10706 "test__execmodules.py")))
10707 (call-with-output-file "skipped_tests.txt"
10708 (lambda (port)
10709 (display (string-join disabled-tests "\n") port)))
10710 #t)))
44d10b1f
RW
10711 (replace 'check
10712 (lambda _
10713 ;; Make sure the build directory is on PYTHONPATH.
10714 (setenv "PYTHONPATH"
10715 (string-append
10716 (getenv "PYTHONPATH") ":"
10717 (getcwd) "/build/"
10718 (car (scandir "build" (cut string-prefix? "lib." <>)))))
f11b5556
MB
10719
10720 ;; Use the build daemons configured number of workers.
10721 (setenv "NWORKERS" (number->string (parallel-job-count)))
10722
10723 (invoke "python" "-m" "gevent.tests" "--config"
10724 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
44d10b1f
RW
10725 (propagated-inputs
10726 `(("python-greenlet" ,python-greenlet)
10727 ("python-objgraph" ,python-objgraph)))
10728 (native-inputs
f11b5556
MB
10729 `(("python-six" ,python-six)
10730
10731 ;; For tests.
10732 ("python-dnspython" ,python-dnspython)
10733 ("python-psutil" ,python-psutil)
10734 ("python-zope.event" ,python-zope-event)
10735 ("python-zope.interface" ,python-zope-interface)))
44d10b1f
RW
10736 (inputs
10737 `(("c-ares" ,c-ares)
10738 ("libev" ,libev)))
10739 (home-page "http://www.gevent.org/")
10740 (synopsis "Coroutine-based network library")
10741 (description
10742 "gevent is a coroutine-based Python networking library that uses greenlet
10743to provide a high-level synchronous API on top of the libev event loop.")
10744 (license license:expat)
10745 (properties `((python2-variant . ,(delay python2-gevent))))))
10746
10747(define-public python2-gevent
10748 (let ((base (package-with-python2
10749 (strip-python2-variant python-gevent))))
10750 (package
10751 (inherit base)
f11b5556 10752 (native-inputs `(,@(package-native-inputs base)
44d10b1f
RW
10753 ("python-mock" ,python2-mock))))))
10754
10755(define-public python-fastimport
10756 (package
10757 (name "python-fastimport")
10758 (version "0.9.6")
10759 (source
10760 (origin
10761 (method url-fetch)
10762 (uri (pypi-uri "fastimport" version))
10763 (sha256
10764 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10765 (build-system python-build-system)
10766 (home-page "https://github.com/jelmer/python-fastimport")
10767 (synopsis "VCS fastimport parser and generator in Python")
10768 (description "This package provides a parser for and generator of the Git
10769@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10770format.")
10771 (license license:gpl2+)))
10772
10773(define-public python2-fastimport
10774 (package-with-python2 python-fastimport))
10775
10776(define-public python-twisted
10777 (package
10778 (name "python-twisted")
fdfad2fc 10779 (version "19.7.0")
44d10b1f
RW
10780 (source (origin
10781 (method url-fetch)
10782 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10783 (sha256
10784 (base32
fdfad2fc 10785 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10786 (build-system python-build-system)
10787 (arguments
0107c9b8 10788 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10789 (propagated-inputs
10790 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10791 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10792 ("python-incremental" ,python-incremental)
e5ba2fe3 10793 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10794 ("python-constantly" ,python-constantly)
10795 ("python-automat" ,python-automat)))
10796 (home-page "https://twistedmatrix.com/")
10797 (synopsis "Asynchronous networking framework written in Python")
10798 (description
10799 "Twisted is an extensible framework for Python programming, with special
10800focus on event-based network programming and multiprotocol integration.")
10801 (license license:expat)))
10802
10803(define-public python2-twisted
10804 (package-with-python2 python-twisted))
10805
10806(define-public python-pika
10807 (package
10808 (name "python-pika")
10809 (version "0.12.0")
10810 (source
10811 (origin
10812 (method url-fetch)
10813 (uri (pypi-uri "pika" version))
10814 (sha256
10815 (base32
10816 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10817 (build-system python-build-system)
10818 (native-inputs
10819 `(("python-pyev" ,python-pyev)
10820 ("python-tornado" ,python-tornado)
10821 ("python-twisted" ,python-twisted)))
10822 (home-page "https://pika.readthedocs.org")
10823 (synopsis "Pure Python AMQP Client Library")
10824 (description
10825 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10826Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10827network support library.")
10828 (license license:bsd-3)))
10829
10830(define-public python2-pika
10831 (package-with-python2 python-pika))
10832
10833(define-public python-ply
10834 (package
10835 (name "python-ply")
10836 (version "3.10")
10837 (source
10838 (origin
10839 (method url-fetch)
10840 (uri (pypi-uri "ply" version))
10841 (sha256
10842 (base32
10843 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10844 (build-system python-build-system)
10845 (home-page "http://www.dabeaz.com/ply/")
10846 (synopsis "Python Lex & Yacc")
10847 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10848It uses LR parsing and does extensive error checking.")
10849 (license license:bsd-3)))
10850
10851(define-public python2-ply
10852 (package-with-python2 python-ply))
10853
10854(define-public python-tabulate
10855 (package
10856 (name "python-tabulate")
10857 (version "0.7.7")
10858 (source (origin
10859 (method url-fetch)
10860 (uri (pypi-uri "tabulate" version))
10861 (sha256
10862 (base32
10863 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10864 (build-system python-build-system)
10865 (arguments
10866 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10867 ;; and the latest release is not tagged in the upstream repository.
10868 '(#:tests? #f))
10869 (home-page "https://bitbucket.org/astanin/python-tabulate")
10870 (synopsis "Pretty-print tabular data")
10871 (description
10872 "Tabulate is a library and command-line utility to pretty-print tabular
10873data in Python.")
10874 (license license:expat)))
10875
10876(define-public python2-tabulate
10877 (package-with-python2 python-tabulate))
10878
10879(define-public python-kazoo
10880 (package
10881 (name "python-kazoo")
10882 (version "2.4.0")
10883 (source
10884 (origin
10885 (method url-fetch)
10886 (uri (pypi-uri "kazoo" version))
10887 (sha256
10888 (base32
10889 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10890 (build-system python-build-system)
10891 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10892 (propagated-inputs
10893 `(("python-six" ,python-six)))
10894 (home-page "https://kazoo.readthedocs.org")
10895 (synopsis "High-level Zookeeper client library")
10896 (description
10897 "Kazoo is a Python client library for the Apache Zookeeper distributed
10898application service. It is designed to be easy to use and to avoid common
10899programming errors.")
10900 (license license:asl2.0)))
10901
10902(define-public python2-kazoo
10903 (package-with-python2 python-kazoo))
10904
10905(define-public python-pykafka
10906 (package
10907 (name "python-pykafka")
10908 (version "2.4.0")
10909 (source (origin
10910 (method url-fetch)
0ca1d040 10911 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10912 (sha256
10913 (base32
10914 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10915 (build-system python-build-system)
10916 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10917 (propagated-inputs
10918 `(("python-gevent" ,python-gevent)
10919 ("python-kazoo" ,python-kazoo)
10920 ("python-tabulate" ,python-tabulate)))
10921 (inputs
10922 `(("librdkafka" ,librdkafka)))
10923 (home-page "https://pykafka.readthedocs.io/")
10924 (synopsis "Apache Kafka client for Python")
10925 (description
10926 "PyKafka is a client for the Apache Kafka distributed messaging system.
10927It includes Python implementations of Kafka producers and consumers, which
10928are optionally backed by a C extension built on librdkafka.")
10929 (license license:asl2.0)))
10930
10931(define-public python2-pykafka
10932 (package-with-python2 python-pykafka))
10933
10934(define-public python-wcwidth
28ac442b
MB
10935 (package
10936 (name "python-wcwidth")
574a71a7 10937 (version "0.1.8")
28ac442b
MB
10938 (source (origin
10939 (method url-fetch)
10940 (uri (pypi-uri "wcwidth" version))
10941 (sha256
10942 (base32
574a71a7 10943 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
28ac442b
MB
10944 (build-system python-build-system)
10945 (home-page "https://github.com/jquast/wcwidth")
10946 (synopsis "Measure number of terminal column cells of wide-character codes")
10947 (description "Wcwidth measures the number of terminal column cells of
44d10b1f
RW
10948wide-character codes. It is useful for those implementing a terminal emulator,
10949or programs that carefully produce output to be interpreted by one. It is a
10950Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10951specified in POSIX.1-2001 and POSIX.1-2008.")
28ac442b 10952 (license license:expat)))
44d10b1f
RW
10953
10954(define-public python2-wcwidth
10955 (package-with-python2 python-wcwidth))
10956
10957(define-public python2-jsonrpclib
10958 (package
10959 (name "python2-jsonrpclib")
10960 (version "0.1.7")
10961 (source (origin
10962 (method url-fetch)
6571bba0 10963 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10964 (sha256
10965 (base32
10966 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10967 (build-system python-build-system)
10968 (arguments
10969 `(#:tests? #f
10970 #:python ,python-2))
10971 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10972 (synopsis "Implementation of JSON-RPC specification for Python")
10973 (description
10974 "This library is an implementation of the JSON-RPC specification.
10975It supports both the original 1.0 specification, as well as the
10976new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10977etc.")
10978 (license license:asl2.0)))
10979
10980(define-public python-chai
10981 (package
10982 (name "python-chai")
10983 (version "1.1.2")
10984 (source (origin
10985 (method url-fetch)
10986 (uri (pypi-uri "chai" version))
10987 (sha256
10988 (base32
10989 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10990 (build-system python-build-system)
10991 (home-page "https://github.com/agoragames/chai")
10992 (synopsis "Mocking framework for Python")
10993 (description
10994 "Chai provides an api for mocking, stubbing and spying your python
10995objects, patterned after the Mocha library for Ruby.")
10996 (license license:bsd-3)))
10997
10998(define-public python2-chai
10999 (package-with-python2 python-chai))
11000
11001(define-public python-inflection
11002 (package
11003 (name "python-inflection")
11004 (version "0.3.1")
11005 (source
11006 (origin (method url-fetch)
11007 (uri (pypi-uri "inflection" version))
11008 (sha256
11009 (base32
11010 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11011 (build-system python-build-system)
11012 (native-inputs
11013 `(("python-pytest" ,python-pytest)))
11014 (home-page "https://github.com/jpvanhal/inflection")
11015 (synopsis "Python string transformation library")
11016 (description
11017 "Inflection is a string transformation library. It singularizes
11018and pluralizes English words, and transforms strings from CamelCase to
11019underscored string.")
11020 (license license:expat)))
11021
11022(define-public python2-inflection
11023 (package-with-python2 python-inflection))
11024
11025(define-public python-pylev
11026 (package
11027 (name "python-pylev")
11028 (version "1.3.0")
11029 (source (origin
11030 (method url-fetch)
11031 (uri (pypi-uri "pylev" version))
11032 (sha256
11033 (base32
11034 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11035 (build-system python-build-system)
11036 (home-page "https://github.com/toastdriven/pylev")
11037 (synopsis "Levenshtein distance implementation in Python")
11038 (description "Pure Python Levenshtein implementation, based off the
11039Wikipedia code samples at
11040@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11041 (license license:bsd-3)))
11042
11043(define-public python2-pylev
11044 (package-with-python2 python-pylev))
11045
11046(define-public python-cleo
11047 (package
11048 (name "python-cleo")
0c101a04 11049 (version "0.7.6")
44d10b1f
RW
11050 (source (origin
11051 (method url-fetch)
11052 (uri (pypi-uri "cleo" version))
11053 (sha256
11054 (base32
0c101a04 11055 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
44d10b1f
RW
11056 (build-system python-build-system)
11057 (native-inputs
af2d3713 11058 `( ;; For testing
44d10b1f
RW
11059 ("python-mock" ,python-mock)
11060 ("python-pytest-mock" ,python-pytest-mock)
11061 ("python-pytest" ,python-pytest)))
11062 (propagated-inputs
11063 `(("python-backpack" ,python-backpack)
0c101a04 11064 ("python-clikit" ,python-clikit)
44d10b1f
RW
11065 ("python-pastel" ,python-pastel)
11066 ("python-pylev" ,python-pylev)))
11067 (home-page "https://github.com/sdispater/cleo")
11068 (synopsis "Command-line arguments library for Python")
11069 (description
11070 "Cleo allows you to create command-line commands with signature in
11071docstring and colored output.")
11072 (license license:expat)))
11073
11074(define-public python2-cleo
11075 (package-with-python2 python-cleo))
11076
2be85c45
TLC
11077(define-public python-tomlkit
11078 (package
11079 (name "python-tomlkit")
f4b6ce21 11080 (version "0.5.11")
2be85c45
TLC
11081 (source
11082 (origin
11083 (method url-fetch)
11084 (uri (pypi-uri "tomlkit" version))
11085 (sha256
f4b6ce21 11086 (base32 "1kq1663iqxgwrmb883n55ypi5axnixla2hrby9g2x227asifsi7h"))))
2be85c45
TLC
11087 (build-system python-build-system)
11088 (native-inputs
11089 `(("python-pytest" ,python-pytest)))
2d3da186
TGR
11090 (home-page "https://github.com/sdispater/tomlkit")
11091 (synopsis "Style-preserving TOML library")
2be85c45
TLC
11092 (description
11093 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
11094preserves all comments, indentations, whitespace and internal element ordering,
11095and makes them accessible and editable via an intuitive API. It can also
11096create new TOML documents from scratch using the provided helpers. Part of the
2d3da186 11097implementation has been adapted, improved, and fixed from Molten.")
2be85c45
TLC
11098 (license license:expat)))
11099
0bb32201
TLC
11100(define-public python-shellingham
11101 (package
11102 (name "python-shellingham")
11103 (version "1.3.1")
11104 (source
11105 (origin
11106 (method url-fetch)
11107 (uri (pypi-uri "shellingham" version))
11108 (sha256
11109 (base32
11110 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
11111 (build-system python-build-system)
11112 (home-page
11113 "https://github.com/sarugaku/shellingham")
11114 (synopsis "Tool to detect surrounding shell")
11115 (description
11116 "Shellingham detects what shell the current Python executable is
11117running in.")
11118 (license license:isc)))
11119
aee92957
TLC
11120(define-public python-memcached
11121 (package
11122 (name "python-memcached")
11123 (version "1.59")
11124 (source
11125 (origin
11126 (method url-fetch)
11127 (uri (pypi-uri "python-memcached" version))
11128 (sha256
11129 (base32
11130 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
11131 (build-system python-build-system)
11132 (propagated-inputs `(("python-six" ,python-six)))
11133 (home-page
11134 "https://github.com/linsomniac/python-memcached")
11135 (synopsis "Pure python memcached client")
11136 (description
11137 "This software is a pure Python interface to the memcached memory cache
11138daemon. It is the client side software which allows storing values in one or
11139more, possibly remote, memcached servers.")
11140 (license license:psfl)))
11141
b2ac2508
TLC
11142(define-public python-clikit
11143 (package
11144 (name "python-clikit")
4573b94d 11145 (version "0.4.1")
b2ac2508
TLC
11146 (source
11147 (origin
11148 (method url-fetch)
11149 (uri (pypi-uri "clikit" version))
11150 (sha256
11151 (base32
4573b94d 11152 "10gab65pq0jdf589n33sj2513pxal2lisl4xwf1ijysdjxmpdr4a"))))
b2ac2508
TLC
11153 (build-system python-build-system)
11154 (propagated-inputs
11155 `(("python-pastel" ,python-pastel)
11156 ("python-pylev" ,python-pylev)))
11157 (home-page "https://github.com/sdispater/clikit")
11158 (synopsis "Group of utilities to build command line interfaces")
11159 (description
11160 "CliKit is a group of utilities to build testable command line
11161interfaces.")
0266a6a2 11162 (properties `((python2-variant . ,(delay python2-clikit))))
b2ac2508
TLC
11163 (license license:expat)))
11164
0266a6a2
MB
11165(define-public python2-clikit
11166 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
11167 (package/inherit
11168 base
11169 (propagated-inputs
11170 `(("python-enum34" ,python2-enum34)
11171 ("python-typing" ,python2-typing)
11172 ,@(package-propagated-inputs base))))))
11173
c6f008d6
TLC
11174(define-public python-msgpack-python
11175 (package
11176 (name "python-msgpack-python")
11177 (version "0.5.6")
11178 (source
11179 (origin
11180 (method url-fetch)
11181 (uri (pypi-uri "msgpack-python" version))
11182 (sha256
11183 (base32
11184 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
11185 (build-system python-build-system)
11186 (home-page "http://msgpack.org/")
11187 (synopsis "Package to deserialize messages in MessagePack binary format")
11188 (description
11189 "MessagePack is an efficient binary serialization format. It lets you
11190exchange data among multiple languages like JSON. But it's faster and
11191smaller. Small integers are encoded into a single byte, and typical short
11192strings require only one extra byte in addition to the strings themselves.")
11193 (license license:asl2.0)))
11194
badc1c63
TLC
11195(define-public python-cachy
11196 (package
11197 (name "python-cachy")
11198 (version "0.2.0")
11199 (source
11200 (origin
11201 (method url-fetch)
11202 (uri (pypi-uri "cachy" version))
11203 (sha256
11204 (base32
11205 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
11206 (build-system python-build-system)
11207 (native-inputs
11208 `(("python-fakeredis" ,python-fakeredis)
11209 ("python-flexmock" ,python-flexmock)
11210 ("python-pytest" ,python-pytest)))
11211 (propagated-inputs
11212 `(("python-memcached" ,python-memcached)
11213 ("python-msgpack-python" ,python-msgpack-python)
11214 ("python-redis" ,python-redis)))
11215 (home-page "https://github.com/sdispater/cachy")
11216 (synopsis "Simple yet effective caching library")
11217 (description
11218 "Cachy provides a simple yet effective caching library. A simple but
11219powerful API: thread-safety; decorator syntax; support for memcached, redis,
11220database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
11221 (license license:expat)))
11222
617bb67b
TLC
11223(define-public poetry
11224 (package
11225 (name "poetry")
11226 (version "0.12.17")
11227 ;; Poetry can only be built from source with poetry.
11228 (source
11229 (origin
11230 (method url-fetch)
11231 (uri (pypi-uri "poetry" version))
11232 (sha256
11233 (base32
11234 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
11235 (build-system python-build-system)
11236 (arguments
11237 `(#:tests? #f ;; Pypi does not have tests.
11238 #:phases
11239 (modify-phases %standard-phases
11240 (replace 'build
11241 (lambda _
11242 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
11243 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
11244 "setup.py")
11245 #t)))))
11246 (propagated-inputs
11247 `(("python-cachecontrol" ,python-cachecontrol)
11248 ("python-cachy" ,python-cachy)
11249 ("python-cleo" ,python-cleo)
11250 ("python-glob2" ,python-glob2)
11251 ("python-html5lib" ,python-html5lib)
11252 ("python-jsonschema" ,python-jsonschema)
11253 ("python-msgpack" ,python-msgpack)
617bb67b
TLC
11254 ("python-pkginfo" ,python-pkginfo)
11255 ("python-pyparsing" ,python-pyparsing)
11256 ("python-pyrsistent" ,python-pyrsistent)
11257 ("python-requests" ,python-requests)
11258 ("python-requests-toolbelt" ,python-requests-toolbelt)
11259 ("python-shellingham" ,python-shellingham)
11260 ("python-tomlkit" ,python-tomlkit)
11261 ("python-virtualenv" ,python-virtualenv)))
11262 (home-page "https://poetry.eustace.io/")
11263 (synopsis "Python dependency management and packaging made easy")
11264 (description "Poetry is a tool for dependency management and packaging
11265in Python. It allows you to declare the libraries your project depends on and
11266it will manage (install/update) them for you.")
11267 (license license:expat)))
11268
44d10b1f
RW
11269(define-public python-lazy-object-proxy
11270 (package
11271 (name "python-lazy-object-proxy")
7454078a 11272 (version "1.4.3")
44d10b1f
RW
11273 (source (origin
11274 (method url-fetch)
11275 (uri (pypi-uri "lazy-object-proxy" version))
11276 (sha256
11277 (base32
7454078a 11278 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
11279 (native-inputs
11280 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
11281 (build-system python-build-system)
11282 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11283 (synopsis "Lazy object proxy for python")
11284 (description
11285 "Lazy object proxy is an object that wraps a callable but defers the call
11286until the object is actually required, and caches the result of said call.")
11287 (license license:bsd-2)))
11288
11289(define-public python2-lazy-object-proxy
11290 (package-with-python2 python-lazy-object-proxy))
11291
11292(define-public python-dnspython
11293 (package
11294 (name "python-dnspython")
11295 (version "1.15.0")
11296 (source (origin
11297 (method url-fetch)
11298 (uri (string-append "http://www.dnspython.org/kits/"
11299 version "/dnspython-" version ".tar.gz"))
11300 (sha256
11301 (base32
11302 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11303 (build-system python-build-system)
11304 (arguments '(#:tests? #f)) ; XXX: requires internet access
11305 (home-page "http://www.dnspython.org")
11306 (synopsis "DNS toolkit for Python")
11307 (description
11308 "dnspython is a DNS toolkit for Python. It supports almost all record
11309types. It can be used for queries, zone transfers, and dynamic updates.
11310It supports TSIG authenticated messages and EDNS0.")
11311 (license license:expat)))
11312
11313(define-public python2-dnspython
11314 (package-with-python2 python-dnspython))
11315
11316(define-public python-email-validator
11317 (package
11318 (name "python-email-validator")
11319 (version "1.0.2")
11320 (source
11321 (origin (method url-fetch)
11322 (uri (pypi-uri "email_validator" version))
11323 (sha256
11324 (base32
11325 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11326 (build-system python-build-system)
11327 (arguments
11328 '(#:phases
11329 (modify-phases %standard-phases
11330 (add-before 'build 'use-dnspython
11331 (lambda _
11332 (substitute* "setup.py"
11333 (("dnspython3") "dnspython"))
11334 #t)))))
11335 (propagated-inputs
11336 `(("python-dnspython" ,python-dnspython)
11337 ("python-idna" ,python-idna)))
11338 (home-page "https://github.com/JoshData/python-email-validator")
11339 (synopsis "Email address validation library for Python")
11340 (description
11341 "This library validates email address syntax and deliverability.")
11342 (license license:cc0)))
11343
11344(define-public python2-email-validator
11345 (package-with-python2 python-email-validator))
11346
11347(define-public python-ukpostcodeparser
11348 (package
11349 (name "python-ukpostcodeparser")
11350 (version "1.0.3")
11351 (source (origin
11352 (method url-fetch)
11353 (uri (pypi-uri "UkPostcodeParser" version))
11354 (sha256
11355 (base32
11356 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11357 (build-system python-build-system)
11358 (home-page "https://github.com/hamstah/ukpostcodeparser")
11359 (synopsis "UK Postcode parser for Python")
11360 (description
11361 "This library provides the @code{parse_uk_postcode} function for
11362parsing UK postcodes.")
11363 (license license:expat)))
11364
11365(define-public python2-ukpostcodeparser
11366 (package-with-python2 python-ukpostcodeparser))
11367
11368(define-public python-faker
11369 (package
11370 (name "python-faker")
a6a73369 11371 (version "4.0.2")
44d10b1f
RW
11372 (source (origin
11373 (method url-fetch)
11374 (uri (pypi-uri "Faker" version))
11375 (sha256
11376 (base32
a6a73369 11377 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
44d10b1f
RW
11378 (build-system python-build-system)
11379 (arguments
11380 '(#:phases
11381 (modify-phases %standard-phases
11382 (replace 'check
a6a73369 11383 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
44d10b1f
RW
11384 (native-inputs
11385 `(;; For testing
a6a73369
MB
11386 ("python-freezegun" ,python-freezegun)
11387 ("python-pytest" ,python-pytest)
11388 ("python-random2" ,python-random2)
11389 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
11390 ("python-validators" ,python-validators)))
44d10b1f
RW
11391 (propagated-inputs
11392 `(("python-dateutil" ,python-dateutil)
a6a73369 11393 ("python-text-unidecode" ,python-text-unidecode)))
44d10b1f
RW
11394 (home-page "https://github.com/joke2k/faker")
11395 (synopsis "Python package that generates fake data")
11396 (description
11397 "Faker is a Python package that generates fake data such as names,
11398addresses, and phone numbers.")
11399 (license license:expat)
11400 (properties `((python2-variant . ,(delay python2-faker))))))
11401
a6a73369 11402;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
44d10b1f
RW
11403(define-public python2-faker
11404 (let ((base (package-with-python2 (strip-python2-variant
11405 python-faker))))
11406 (package
11407 (inherit base)
a6a73369
MB
11408 (version "3.0.1")
11409 (source (origin
11410 (method url-fetch)
11411 (uri (pypi-uri "Faker" version))
11412 (sha256
11413 (base32
11414 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
11415 (native-inputs
11416 `(("python-mock" ,python2-mock)
11417 ,@(package-native-inputs base)))
44d10b1f
RW
11418 (propagated-inputs
11419 `(("python2-ipaddress" ,python2-ipaddress)
85bad77f 11420 ("python2-six" ,python2-six)
44d10b1f
RW
11421 ,@(package-propagated-inputs base))))))
11422
11423(define-public python-pyaml
11424 (package
11425 (name "python-pyaml")
11426 (version "18.11.0")
11427 (source (origin
11428 (method url-fetch)
11429 (uri (pypi-uri "pyaml" version))
11430 (sha256
11431 (base32
11432 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
11433 (build-system python-build-system)
11434 (native-inputs
11435 `(("python-unidecode" ,python-unidecode)))
11436 (propagated-inputs
11437 `(("python-pyyaml" ,python-pyyaml)))
11438 (home-page "https://github.com/mk-fg/pretty-yaml")
11439 (synopsis "YAML pretty-print library for Python")
11440 (description
11441 "pyaml is a PyYAML based python module to produce pretty and readable
11442YAML-serialized data.")
492e3a7a 11443 (license license:wtfpl2)))
44d10b1f
RW
11444
11445(define-public python2-pyaml
11446 (package-with-python2 python-pyaml))
11447
11448(define-public python-backpack
11449 (package
11450 (name "python-backpack")
11451 (version "0.1")
11452 (source
11453 (origin
11454 (method url-fetch)
11455 (uri (pypi-uri "backpack" version))
11456 (sha256
11457 (base32
11458 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
11459 (build-system python-build-system)
11460 (native-inputs
11461 `(("python-pytest" ,python-pytest)
11462 ("python-nose" ,python-nose)))
11463 (propagated-inputs
11464 `(("python-simplejson" ,python-simplejson)))
11465 (home-page "https://github.com/sdispater/backpack")
11466 (synopsis "Utilities for working with Python collections")
11467 (description "Backpack provides some useful utilities for working with
11468collections of data.")
11469 (license license:expat)))
11470
11471(define-public python2-backpack
11472 (package-with-python2 python-backpack))
11473
11474(define-public python-prompt-toolkit
11475 (package
11476 (name "python-prompt-toolkit")
11477 (version "2.0.7")
11478 (source
11479 (origin
11480 (method url-fetch)
11481 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11482 (sha256
11483 (base32
11484 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
11485 (build-system python-build-system)
11486 (arguments
11487 `(#:phases
11488 (modify-phases %standard-phases
11489 (delete 'check)
11490 (add-after 'install 'post-install-check
11491 (lambda* (#:key inputs outputs #:allow-other-keys)
11492 ;; HOME is needed for the test
11493 ;; "test_pathcompleter_can_expanduser".
11494 (setenv "HOME" "/tmp")
11495 (add-installed-pythonpath inputs outputs)
11496 (invoke "py.test"))))))
11497 (propagated-inputs
11498 `(("python-wcwidth" ,python-wcwidth)
11499 ("python-six" ,python-six)
11500 ("python-pygments" ,python-pygments)))
11501 (native-inputs
11502 `(("python-pytest" ,python-pytest)))
11503 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11504 (synopsis "Library for building command line interfaces in Python")
11505 (description
11506 "Prompt-Toolkit is a library for building interactive command line
11507interfaces in Python. It's like GNU Readline but it also features syntax
11508highlighting while typing, out-of-the-box multi-line input editing, advanced
11509code completion, incremental search, support for Chinese double-width
11510characters, mouse support, and auto suggestions.")
11511 (license license:bsd-3)))
11512
11513(define-public python2-prompt-toolkit
11514 (package-with-python2 python-prompt-toolkit))
11515
11516(define-public python-prompt-toolkit-1
11517 (package (inherit python-prompt-toolkit)
11518 (version "1.0.15")
11519 (source
11520 (origin
11521 (method url-fetch)
11522 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11523 (sha256
11524 (base32
11525 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
11526
11527(define-public python2-prompt-toolkit-1
11528 (package-with-python2 python-prompt-toolkit-1))
11529
11530(define-public python-jedi
11531 (package
11532 (name "python-jedi")
745041b5 11533 (version "0.16.0")
44d10b1f
RW
11534 (source
11535 (origin
11536 (method url-fetch)
11537 (uri (pypi-uri "jedi" version))
745041b5 11538 (patches (search-patches "python-jedi-deleted-variables.patch"))
44d10b1f
RW
11539 (sha256
11540 (base32
745041b5 11541 "1mb5kmrk9bkc3kwzx02j62cdan1jqd92q1z7h7wi9d30jg5p3j6m"))))
44d10b1f
RW
11542 (build-system python-build-system)
11543 (arguments
296e1aea 11544 `(#:phases
44d10b1f
RW
11545 (modify-phases %standard-phases
11546 (replace 'check
296e1aea
MC
11547 (lambda _
11548 (setenv "HOME" "/tmp")
11549 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
11550 (native-inputs
11551 `(("python-pytest" ,python-pytest)
11552 ("python-docopt" ,python-docopt)))
11553 (propagated-inputs
11554 `(("python-parso" ,python-parso)))
11555 (home-page "https://github.com/davidhalter/jedi")
11556 (synopsis "Autocompletion and static analysis library for Python")
11557 (description
11558 "Jedi is a static analysis tool for Python that can be used in Integrated
11559Development Environments (@dfn{IDE}s) and text editors. It understands Python
11560on a deeper level than many other static analysis frameworks for Python.
11561
11562Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11563well.")
11564 (license license:expat)))
11565
11566(define-public python2-jedi
296e1aea 11567 (package-with-python2 python-jedi))
44d10b1f
RW
11568
11569(define-public ptpython
11570 (package
11571 (name "ptpython")
11572 (version "0.34")
11573 (source (origin
11574 (method url-fetch)
11575 (uri (pypi-uri "ptpython" version))
11576 (sha256
11577 (base32
11578 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11579 (build-system python-build-system)
11580 (arguments
11581 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11582 (propagated-inputs
11583 `(("python-docopt" ,python-docopt)
11584 ("python-jedi" ,python-jedi)
11585 ("python-prompt-toolkit" ,python-prompt-toolkit)
11586 ("python-pygments" ,python-pygments)))
11587 (home-page "https://github.com/jonathanslenders/ptpython")
11588 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11589 (description
11590 "ptpython is a Python read-eval-print loop with IDE-like features.
11591It supports syntax highlighting, multiline editing, autocompletion, mouse,
11592color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11593etc.")
11594 (license license:bsd-3)
11595 (properties `((python2-variant . ,(delay ptpython-2))))))
11596
11597(define-public ptpython-2
11598 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11599 (package
11600 (inherit base)
11601 (name "ptpython2"))))
11602
11603(define-public python-stem
11604 (package
11605 (name "python-stem")
a1dc5898 11606 (version "1.8.0")
44d10b1f
RW
11607 (source
11608 (origin
11609 (method url-fetch)
11610 (uri (pypi-uri "stem" version))
11611 (sha256
11612 (base32
a1dc5898 11613 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
44d10b1f
RW
11614 (build-system python-build-system)
11615 (arguments
11616 `(#:phases
11617 (modify-phases %standard-phases
11618 (replace 'check
11619 (lambda _
11620 (invoke "./run_tests.py" "--unit")
11621 #t)))))
11622 (native-inputs
11623 `(("python-mock" ,python-mock)
11624 ("python-pycodestyle" ,python-pycodestyle)
11625 ("python-pyflakes" ,python-pyflakes)))
11626 (home-page "https://stem.torproject.org/")
11627 (synopsis
11628 "Python controller library that allows applications to interact with Tor")
11629 (description
11630 "Stem is a Python controller library for Tor. With it you can use Tor's
11631control protocol to script against the Tor process and read descriptor data
11632relays publish about themselves.")
11633 (license license:lgpl3)))
11634
11635(define-public python2-stem
11636 (package-with-python2 python-stem))
11637
11638(define-public python-pyserial
11639 (package
11640 (name "python-pyserial")
00d81f98 11641 (version "3.4")
44d10b1f
RW
11642 (source
11643 (origin
11644 (method url-fetch)
11645 (uri (pypi-uri "pyserial" version))
11646 (sha256
11647 (base32
00d81f98 11648 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
44d10b1f
RW
11649 (build-system python-build-system)
11650 (arguments
11651 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11652 ;; #:phases
11653 ;; (modify-phases %standard-phases
11654 ;; (replace 'check
11655 ;; (lambda _
11656 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11657 (home-page
11658 "https://github.com/pyserial/pyserial")
11659 (synopsis "Python Serial Port Bindings")
11660 (description "@code{pyserial} provide serial port bindings for Python. It
11661supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11662and/or Xon/Xoff. The port is accessed in RAW mode.")
11663 (license license:bsd-3)))
11664
11665(define-public python2-pyserial
11666 (package-with-python2 python-pyserial))
11667
11668(define-public python-kivy
11669 (package
11670 (name "python-kivy")
11671 (version "1.10.1")
11672 (source
11673 (origin
11674 (method url-fetch)
11675 (uri (pypi-uri "Kivy" version))
11676 (file-name (string-append name "-" version ".tar.gz"))
11677 (sha256
11678 (base32
11679 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11680 (build-system python-build-system)
11681 (arguments
11682 `(#:tests? #f ; Tests require many optional packages
11683 #:phases
11684 (modify-phases %standard-phases
11685 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11686 (lambda* (#:key inputs #:allow-other-keys)
11687 (setenv "KIVY_SDL2_PATH"
11688 (string-append (assoc-ref inputs "sdl-union")
11689 "/include/SDL2"))
11690 #t)))))
11691 (native-inputs
aa0e4413 11692 `(("pkg-config" ,pkg-config)
44d10b1f
RW
11693 ("python-cython" ,python-cython)))
11694 (inputs
11695 `(("gstreamer" ,gstreamer)
11696 ("mesa" ,mesa)
11697 ("sdl-union"
11698 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11699 (home-page "http://kivy.org")
11700 (synopsis
11701 "Multitouch application framework")
11702 (description
11703 "A software library for rapid development of
11704hardware-accelerated multitouch applications.")
11705 (license license:expat)))
11706
11707(define-public python2-kivy
11708 (package-with-python2 python-kivy))
11709
11710(define-public python-kivy-next
11711 (deprecated-package "python-kivy-next" python-kivy))
11712
11713(define-public python2-kivy-next
11714 (deprecated-package "python2-kivy-next" python2-kivy))
11715
11716(define-public python-binaryornot
11717 (package
11718 (name "python-binaryornot")
11719 (version "0.4.4")
11720 (source (origin
11721 (method url-fetch)
11722 (uri (pypi-uri "binaryornot" version))
11723 (sha256
11724 (base32
11725 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11726 (build-system python-build-system)
86723f98
DM
11727 (arguments
11728 `(#:phases
11729 (modify-phases %standard-phases
ee623903 11730 (add-after 'unpack 'patch-tests
86723f98
DM
11731 (lambda _
11732 ;; TypeError: binary() got an unexpected keyword argument
11733 ;; 'average_size'.
11734 (substitute* "tests/test_check.py"
11735 (("average_size=512") ""))
11736 #t)))))
44d10b1f
RW
11737 (propagated-inputs
11738 `(("python-chardet" ,python-chardet)
11739 ("python-hypothesis" ,python-hypothesis)))
11740 (home-page "https://github.com/audreyr/binaryornot")
11741 (synopsis "Package to check if a file is binary or text")
11742 (description "Ultra-lightweight pure Python package to check if a file is
11743binary or text.")
11744 (license license:bsd-3)
11745 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11746
11747(define-public python2-binaryornot
11748 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11749 (package (inherit base)
11750 (propagated-inputs
11751 `(("python2-enum34" ,python2-enum34)
11752 ,@(package-propagated-inputs base))))))
11753
f315673d 11754(define-public python-binwalk
9b9ab657
JK
11755 (package
11756 (name "python-binwalk")
11757 (version "2.2.0")
11758 (source
11759 (origin
11760 (method git-fetch)
11761 (uri (git-reference
11762 (url "https://github.com/ReFirmLabs/binwalk")
11763 (commit (string-append "v" version))))
11764 (file-name (git-file-name name version))
11765 (sha256
11766 (base32
11767 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
11768 (build-system python-build-system)
11769 (arguments
11770 `(#:phases
11771 (modify-phases %standard-phases
11772 (add-before 'check 'set-pythonpath
11773 (lambda _
11774 (setenv "PYTHONPATH"
11775 (string-append
11776 (getcwd) "/src/"
11777 ":" (getenv "PYTHONPATH")))
11778 (setenv "HOME" "")
11779 #t)))))
11780 (native-inputs
11781 `(("python-coverage" ,python-coverage)
11782 ("python-nose" ,python-nose)))
11783 (home-page "https://github.com/ReFirmLabs/binwalk")
11784 (synopsis "Firmware analysis tool")
11785 (description "Binwalk is a tool for analyzing, reverse engineering, and
11786extracting firmware images")
11787 (license license:expat)))
f315673d 11788
44d10b1f
RW
11789(define-public python-nltk
11790 (package
11791 (name "python-nltk")
11792 (version "3.2.1")
11793 (source (origin
11794 (method url-fetch)
11795 (uri (pypi-uri "nltk" version))
11796 (sha256
11797 (base32
11798 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11799 (build-system python-build-system)
11800 (arguments
11801 '(;; The tests require some extra resources to be downloaded.
11802 ;; TODO Try packaging these resources.
11803 #:tests? #f))
11804 (home-page "http://nltk.org/")
11805 (synopsis "Natural Language Toolkit")
11806 (description "It provides interfaces to over 50 corpora and lexical
11807resources such as WordNet, along with a suite of text processing libraries
11808for classification, tokenization, stemming, tagging, parsing, and semantic
11809reasoning, wrappers for natural language processing libraries.")
11810 (license license:asl2.0)))
11811
11812(define-public python2-nltk
11813 (package-with-python2 python-nltk))
11814
11815(define-public python-pymongo
11816 (package
11817 (name "python-pymongo")
11818 (version "3.7.2")
11819 (source (origin
11820 (method url-fetch)
11821 (uri (pypi-uri "pymongo" version))
11822 (sha256
11823 (base32
11824 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11825 (build-system python-build-system)
11826 (propagated-inputs
11827 `(("python-certifi" ,python-certifi)))
11828 (home-page "https://github.com/mongodb/mongo-python-driver")
11829 (synopsis "Python driver for MongoDB")
11830 (description "Python driver for MongoDB.")
11831 (license license:asl2.0)))
11832
11833(define-public python2-pymongo
11834 (package-with-python2 python-pymongo))
11835
44d10b1f
RW
11836(define-public python-consul
11837 (package
11838 (name "python-consul")
11839 (version "0.6.1")
11840 (source
11841 (origin
11842 (method url-fetch)
11843 (uri (pypi-uri "python-consul" version))
11844 (sha256
11845 (base32
11846 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11847 (build-system python-build-system)
11848 (arguments
11849 '(#:tests? #f)) ; The tests are not distributed
11850 (propagated-inputs
11851 `(("python-requests" ,python-requests)
11852 ("python-six" ,python-six)))
11853 (home-page "https://github.com/cablehead/python-consul")
11854 (synopsis "Python client for Consul")
11855 (description
11856 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11857discovery, monitoring and configuration.")
11858 (license license:expat)))
11859
11860(define-public python2-consul
11861 (package-with-python2 python-consul))
11862
11863(define-public python-schematics
11864 (package
11865 (name "python-schematics")
11866 (version "1.1.1")
11867 (source
1961d187
TGR
11868 (origin
11869 (method git-fetch)
11870 (uri (git-reference
11871 (url "https://github.com/schematics/schematics.git")
11872 (commit (string-append "v" version))))
11873 (file-name (git-file-name name version))
11874 (sha256
11875 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11876 (build-system python-build-system)
11877 (propagated-inputs
11878 `(("python-six" ,python-six)))
11879 (arguments
1961d187
TGR
11880 ;; The tests require a bunch of not very nice packages with fixed
11881 ;; version requirements (e.g. python-coveralls).
11882 `(#:tests? #f))
44d10b1f
RW
11883 (home-page "https://github.com/schematics/schematics")
11884 (synopsis "Python Data Structures for Humans")
11885 (description "Python Data Structures for Humans.")
11886 (license license:bsd-3)))
11887
11888(define-public python2-schematics
11889 (package-with-python2 python-schematics))
11890
11891(define-public python-odfpy
11892 (package
11893 (name "python-odfpy")
11894 (version "1.3.3")
11895 (source (origin
11896 (method url-fetch)
11897 (uri (pypi-uri "odfpy" version))
11898 (sha256
11899 (base32
11900 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11901 (arguments
11902 `(#:modules ((srfi srfi-1)
11903 (guix build python-build-system)
11904 (guix build utils))
11905 #:phases
11906 (modify-phases %standard-phases
11907 (replace 'check
11908 ;; The test runner invokes python2 and python3 for test*.py.
11909 ;; To avoid having both in inputs, we replicate it here.
11910 (lambda _
21ccc01d
RW
11911 (for-each (lambda (test-file) (invoke "python" test-file))
11912 (find-files "tests" "^test.*\\.py$"))
11913 #t)))))
44d10b1f
RW
11914 (build-system python-build-system)
11915 (home-page "https://github.com/eea/odfpy")
11916 (synopsis "Python API and tools to manipulate OpenDocument files")
11917 (description "Collection of libraries and utility programs written in
11918Python to manipulate OpenDocument 1.2 files.")
11919 (license
11920 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11921 ;; number of files with other licenses.
11922 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11923
11924(define-public python2-odfpy
11925 (package-with-python2 python-odfpy))
11926
11927(define-public python-natsort
11928 (package
11929 (name "python-natsort")
e3da9b2e 11930 (version "7.0.1")
44d10b1f
RW
11931 (source (origin
11932 (method url-fetch)
11933 (uri (pypi-uri "natsort" version))
11934 (sha256
11935 (base32
e3da9b2e 11936 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
44d10b1f
RW
11937 (build-system python-build-system)
11938 (arguments
11939 `(#:modules ((guix build utils)
11940 (guix build python-build-system)
11941 (srfi srfi-1)
11942 (srfi srfi-26)
11943 (ice-9 ftw))
11944 #:phases
11945 (modify-phases %standard-phases
11946 (add-before 'check 'set-cachedir
11947 ;; Tests require write access to $HOME by default
11948 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11949 (replace 'check
11950 (lambda _
11951 (let ((cwd (getcwd)))
11952 (setenv "PYTHONPATH"
11953 (string-append
11954 cwd "/build/"
11955 (find (cut string-prefix? "lib" <>)
11956 (scandir (string-append cwd "/build")))
11957 ":"
11958 (getenv "PYTHONPATH")))
11959 (invoke "pytest" "-v")))))))
11960 (native-inputs
11961 `(("python-hypothesis" ,python-hypothesis)
11962 ("python-pytest-cov" ,python-pytest-cov)
11963 ("python-pytest-mock" ,python-pytest-mock)
11964 ("python-pytest" ,python-pytest)))
11965 (propagated-inputs ; TODO: Add python-fastnumbers.
11966 `(("python-pyicu" ,python-pyicu)))
11967 (home-page "https://github.com/SethMMorton/natsort")
11968 (synopsis "Natural sorting for python and shell")
11969 (description
11970 "Natsort lets you apply natural sorting on lists instead of
11971lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11972on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11973@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11974@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11975identifies numbers and sorts them separately from strings. It can also sort
11976version numbers, real numbers, mixed types and more, and comes with a shell
11977command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11978 (license license:expat)
11979 (properties `((python2-variant . ,(delay python2-natsort))))))
11980
e3da9b2e 11981;; Natsort 6.x are the last versions with support for Python 2.
44d10b1f
RW
11982(define-public python2-natsort
11983 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11984 (package (inherit base)
e3da9b2e
MB
11985 (version "6.2.1")
11986 (source (origin
11987 (method url-fetch)
11988 (uri (pypi-uri "natsort" version))
11989 (sha256
11990 (base32
11991 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
44d10b1f
RW
11992 (native-inputs
11993 `(("python2-pathlib" ,python2-pathlib)
11994 ,@(package-native-inputs base))))))
11995
58d90274 11996(define-public glances
44d10b1f 11997 (package
58d90274 11998 (name "glances")
b8e777ef 11999 (version "3.1.4")
44d10b1f
RW
12000 (source
12001 (origin
12002 (method url-fetch)
12003 (uri (pypi-uri "Glances" version))
12004 (sha256
b8e777ef 12005 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
15b4c911
TGR
12006 (modules '((guix build utils)))
12007 (snippet
12008 '(begin
12009 ;; Glances phones PyPI for weekly update checks by default.
12010 ;; Disable these. The user can re-enable them if desired.
12011 (substitute* "glances/outdated.py"
12012 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
12013 (string-append indentation
12014 "self.args.disable_check_update = True\n"
12015 line)))
12016 #t))))
44d10b1f
RW
12017 (build-system python-build-system)
12018 (propagated-inputs
9898a2d3
TGR
12019 `(("python-future" ,python-future)
12020 ("python-psutil" ,python-psutil)))
a4ac25df 12021 (home-page "https://github.com/nicolargo/glances")
bab94ffa 12022 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
12023 (description
12024 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
12025Glances uses the PsUtil library to get information from your system. It
12026monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
12027 (license license:lgpl3+)))
12028
58d90274
TGR
12029(define-public python-glances
12030 (deprecated-package "python-glances" glances))
12031
44d10b1f
RW
12032(define-public python-graphql-core
12033 (package
12034 (name "python-graphql-core")
12035 (version "0.5.3")
12036 (source
12037 (origin
12038 (method url-fetch)
12039 (uri (pypi-uri "graphql-core" version))
12040 (sha256
12041 (base32
12042 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12043 (build-system python-build-system)
12044 (arguments
12045 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12046 #:phases
12047 (modify-phases %standard-phases
12048 (add-after 'unpack 'patch-hardcoded-version
12049 (lambda _ (substitute*
12050 "setup.py"
12051 (("'gevent==1.1rc1'") "'gevent'"))
12052 #t)))))
12053 (native-inputs
12054 `(("python-gevent" ,python-gevent)
12055 ("python-mock" ,python-mock)
12056 ("python-pytest-mock" ,python-pytest-mock)))
12057 (propagated-inputs
12058 `(("python-promise" ,python-promise)
12059 ("python-six" ,python-six)))
12060 (home-page "https://github.com/graphql-python/graphql-core")
12061 (synopsis "GraphQL implementation for Python")
12062 (description
12063 "GraphQL implementation for Python. GraphQL is a data query language and
12064runtime designed and used to request and deliver data to mobile and web apps.
12065This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12066to Python.")
12067 (license license:expat)))
12068
12069(define-public python2-graphql-core
12070 (package-with-python2 python-graphql-core))
12071
12072(define-public python-graphql-relay
12073 (package
12074 (name "python-graphql-relay")
12075 (version "0.4.5")
12076 (source
12077 (origin
12078 (method url-fetch)
12079 (uri (pypi-uri "graphql-relay" version))
12080 (sha256
12081 (base32
12082 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12083 (build-system python-build-system)
12084 (arguments
12085 '(#:tests? #f)) ; The tests are not distributed
12086 (propagated-inputs
12087 `(("python-graphql-core" ,python-graphql-core)
12088 ("python-promise" ,python-promise)
12089 ("python-six" ,python-six)))
12090 (home-page "https://github.com/graphql-python/graphql-relay-py")
12091 (synopsis "Relay implementation for Python")
12092 (description
12093 "This is a library to allow the easy creation of Relay-compliant servers
12094using the GraphQL Python reference implementation of a GraphQL server. It
12095should be noted that the code is a exact port of the original
12096@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12097from Facebook.")
12098 (license license:expat)))
12099
12100(define-public python2-graphql-relay
12101 (package-with-python2 python-graphql-relay))
12102
12103(define-public python-graphene
12104 (package
12105 (name "python-graphene")
12106 (version "0.10.2")
12107 (source
12108 (origin
12109 (method url-fetch)
12110 (uri (pypi-uri "graphene" version))
12111 (sha256
12112 (base32
12113 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12114 (build-system python-build-system)
12115 (propagated-inputs
12116 `(("python-graphql-core" ,python-graphql-core)
12117 ("python-graphql-relay" ,python-graphql-relay)
12118 ("python-iso8601" ,python-iso8601)
12119 ("python-promise" ,python-promise)
12120 ("python-six" ,python-six)))
12121 (arguments
12122 `(#:tests? #f)) ; no tests/ in the PyPI tarball
3dd74c8d 12123 (home-page "https://graphene-python.org/")
44d10b1f
RW
12124 (synopsis "GraphQL Framework for Python")
12125 (description
12126 "Graphene is a Python library for building GraphQL schemas/types.
12127A GraphQL schema describes your data model, and provides a GraphQL server
12128with an associated set of resolve methods that know how to fetch data.")
12129 (properties `((python2-variant . ,(delay python2-graphene))))
12130 (license license:expat)))
12131
12132(define-public python2-graphene
12133 (let ((base (package-with-python2
12134 (strip-python2-variant python-graphene))))
12135 (package (inherit base)
12136 (native-inputs
12137 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12138 ,@(package-native-inputs base))))))
12139
12140(define-public python-nautilus
12141 (package
12142 (name "python-nautilus")
12143 (version "0.4.9")
12144 (source
12145 (origin
12146 (method url-fetch)
12147 (uri (pypi-uri "nautilus" version))
12148 (sha256
12149 (base32
12150 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12151 (build-system python-build-system)
12152 (arguments `(#:tests? #f)) ; fails to import test modules
12153 (propagated-inputs
12154 `(("python-bcrypt" ,python-bcrypt)
12155 ("python-click" ,python-click)
12156 ("python-consul" ,python-consul)
12157 ("python-graphene" ,python-graphene)
12158 ("python-jinja2" ,python-jinja2)
12159 ("python-peewee" ,python-peewee)
12160 ("python-pika" ,python-pika)
12161 ("python-tornado" ,python-tornado)
12162 ("python-wtforms" ,python-wtforms)))
12163 (native-inputs
12164 `(("python-nose2" ,python-nose2)))
12165 (home-page "https://github.com/AlecAivazis/nautilus")
12166 (synopsis "Library for creating microservice applications")
12167 (description
12168 "Nautilus is a framework for flux based microservices that looks to
12169provide extendible implementations of common aspects of a cloud so that you can
12170focus on building massively scalable web applications.")
12171 (license license:expat)))
12172
fe36fdb2
MB
12173(define-public python-random2
12174 (package
12175 (name "python-random2")
12176 (version "1.0.1")
12177 (source (origin
12178 (method url-fetch)
12179 (uri (pypi-uri "random2" version ".zip"))
12180 (sha256
12181 (base32
12182 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
12183 (build-system python-build-system)
12184 (native-inputs `(("unzip" ,unzip)))
12185 (home-page "http://pypi.python.org/pypi/random2")
12186 (synopsis "Python 3 version of the Python 2 @code{random} module")
12187 (description
12188 "This package provides a Python 3 ported version of Python 2.7’s
12189@code{random} module. It has also been back-ported to work in Python 2.6.
12190
12191In Python 3, the implementation of @code{randrange()} was changed, so that
12192even with the same seed you get different sequences in Python 2 and 3.
12193
12194This package closes that gap, allowing stable random number generation
12195between the different Python versions.")
12196 (license license:psfl)))
12197
12198(define-public python2-random2
12199 (package-with-python2 python-random2))
12200
44d10b1f
RW
12201(define-public python-snowballstemmer
12202 (package
12203 (name "python-snowballstemmer")
9b54d319 12204 (version "2.0.0")
44d10b1f
RW
12205 (source (origin
12206 (method url-fetch)
12207 (uri (pypi-uri "snowballstemmer" version))
12208 (sha256
12209 (base32
9b54d319 12210 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
44d10b1f
RW
12211 (build-system python-build-system)
12212 (arguments
12213 `(;; No tests exist
12214 #:tests? #f))
12215 (home-page "https://github.com/shibukawa/snowball_py")
12216 (synopsis "Snowball stemming library collection for Python")
12217 (description "This package provides 16 word stemmer algorithms generated
12218from Snowball algorithms. It includes the 15 original ones plus the Poerter
12219English stemmer.")
12220 (license license:bsd-3)))
12221
12222(define-public python2-snowballstemmer
12223 (package-with-python2 python-snowballstemmer))
12224
44d10b1f
RW
12225(define-public python-setproctitle
12226(package
12227 (name "python-setproctitle")
12228 (version "1.1.10")
12229 (source
12230 (origin
12231 (method url-fetch)
12232 (uri (pypi-uri "setproctitle" version))
12233 (sha256
12234 (base32
12235 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12236 (build-system python-build-system)
12237 (arguments
12238 '(#:phases
12239 (modify-phases %standard-phases
12240 (add-before 'check 'patch-Makefile
12241 ;; Stricly this is only required for the python2 variant.
12242 ;; But adding a phase in an inherited package seems to be
12243 ;; cumbersum. So we patch even for python3.
12244 (lambda _
12245 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12246 (when nose
12247 (substitute* "Makefile"
12248 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12249 (string-append nose "/bin/nosetests "))))
12250 #t)))
12251 (replace 'check
12252 (lambda _
12253 (setenv "PYTHON" (or (which "python3") (which "python")))
12254 (setenv "PYCONFIG" (or (which "python3-config")
12255 (which "python-config")))
12256 (setenv "CC" "gcc")
12257 ;; No need to extend PYTHONPATH to find the built package, since
12258 ;; the Makefile will build anyway
12259 (invoke "make" "check"))))))
12260 (native-inputs
12261 `(("procps" ,procps))) ; required for tests
12262 (home-page
12263 "https://github.com/dvarrazzo/py-setproctitle")
12264 (synopsis
12265 "Setproctitle implementation for Python to customize the process title")
12266 (description "The library allows a process to change its title (as displayed
12267by system tools such as ps and top).
12268
12269Changing the title is mostly useful in multi-process systems, for
12270example when a master process is forked: changing the children's title
12271allows to identify the task each process is busy with. The technique
12272is used by PostgreSQL and the OpenSSH Server for example.")
12273 (license license:bsd-3)
12274 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12275
12276(define-public python2-setproctitle
12277 (let ((base (package-with-python2
12278 (strip-python2-variant python-setproctitle))))
12279 (package
12280 (inherit base)
12281 (native-inputs `(("python2-nose" ,python2-nose)
12282 ,@(package-native-inputs base))))))
12283
12284(define-public python-validictory
12285 (package
12286 (name "python-validictory")
12287 (version "1.0.1")
12288 (source
12289 (origin
12290 (method url-fetch)
12291 (uri (pypi-uri "validictory" version))
12292 (sha256
12293 (base32
12294 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12295 (build-system python-build-system)
12296 (arguments
12297 '(#:phases
12298 (modify-phases %standard-phases
12299 (add-after 'unpack 'bootstrap
12300 ;; Move the tests out of the package directory to avoid
12301 ;; packaging them.
12302 (lambda* _
12303 (rename-file "validictory/tests" "tests")
12304 (delete-file "tests/__init__.py")))
12305 (replace 'check
12306 (lambda _
12307 ;; Extend PYTHONPATH so the built package will be found.
12308 (setenv "PYTHONPATH"
12309 (string-append (getcwd) "/build/lib:"
12310 (getenv "PYTHONPATH")))
6568bd5d 12311 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
12312 (native-inputs
12313 `(("python-pytest" ,python-pytest)))
12314 (home-page
12315 "https://github.com/jamesturk/validictory")
12316 (synopsis "General purpose Python data validator")
12317 (description "It allows validation of arbitrary Python data structures.
12318
12319The schema format is based on the JSON Schema
12320proposal (http://json-schema.org), so combined with json the library is also
12321useful as a validator for JSON data.")
12322 (license license:expat)))
12323
12324(define-public python2-validictory
12325 (package-with-python2 python-validictory))
12326
12327(define-public python-pyelftools
12328 (package
12329 (name "python-pyelftools")
12330 (version "0.25")
12331 (source
12332 (origin
12333 (method url-fetch)
12334 (uri (pypi-uri "pyelftools" version))
12335 (sha256
12336 (base32
12337 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
12338 (build-system python-build-system)
12339 (arguments
12340 `(#:phases
12341 (modify-phases %standard-phases
12342 (add-before 'check 'set-pythonpath
12343 (lambda _
12344 (setenv "PYTHONPATH"
12345 (string-append
12346 (getcwd) "/test/"
12347 ":" (getenv "PYTHONPATH")))
12348 #t)))))
12349 (home-page
12350 "https://github.com/eliben/pyelftools")
12351 (synopsis
12352 "Analyze binary and library file information")
12353 (description "This Python library provides interfaces for parsing and
12354analyzing two binary and library file formats; the Executable and Linking
12355Format (ELF), and debugging information in the Debugging With Attributed
12356Record Format (DWARF).")
12357 (license license:public-domain)))
12358
12359(define-public python-pyev
12360 (package
12361 (name "python-pyev")
12362 (version "0.9.0")
12363 (source
12364 (origin
12365 (method url-fetch)
12366 (uri (pypi-uri "pyev" version))
12367 (sha256
12368 (base32
12369 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12370 (build-system python-build-system)
12371 (arguments
12372 `(#:tests? #f ; no test suite
12373 #:phases
12374 (modify-phases %standard-phases
12375 (add-after 'unpack 'patch
12376 (lambda* (#:key inputs #:allow-other-keys)
12377 (let ((libev (string-append (assoc-ref inputs "libev")
12378 "/lib/libev.so.4")))
12379 (substitute* "setup.py"
12380 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12381 (string-append "libev_dll_name = \"" libev "\"")))))))))
12382 (inputs
12383 `(("libev" ,libev)))
12384 (home-page "http://pythonhosted.org/pyev/")
12385 (synopsis "Python libev interface")
12386 (description "Pyev provides a Python interface to libev.")
12387 (license license:gpl3)))
12388
12389(define-public python2-pyev
12390 (package-with-python2 python-pyev))
12391
12392(define-public python-imagesize
12393 (package
12394 (name "python-imagesize")
318c6a5a 12395 (version "1.2.0")
44d10b1f
RW
12396 (source
12397 (origin
12398 (method url-fetch)
12399 (uri (pypi-uri "imagesize" version))
12400 (sha256
12401 (base32
318c6a5a 12402 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
44d10b1f
RW
12403 (build-system python-build-system)
12404 (home-page "https://github.com/shibukawa/imagesize_py")
12405 (synopsis "Gets image size of files in various formats in Python")
12406 (description
12407 "This package allows determination of image size from
12408PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12409 (license license:expat)))
12410
12411(define-public python2-imagesize
12412 (package-with-python2 python-imagesize))
12413
12414(define-public python-termstyle
12415 (package
12416 (name "python-termstyle")
12417 (version "0.1.11")
12418 (source
12419 (origin
12420 (method url-fetch)
12421 (uri (pypi-uri "termstyle" version))
12422 (sha256
12423 (base32
12424 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12425 (build-system python-build-system)
12426 (arguments
12427 '(#:phases
12428 (modify-phases %standard-phases
12429 (replace 'check
12430 (lambda _
831080a6 12431 (invoke "python" "test3.py"))))))
44d10b1f
RW
12432 (home-page "https://github.com/gfxmonk/termstyle")
12433 (synopsis "Console text coloring for Python")
12434 (description "This package provides console text coloring for Python.")
12435 (license license:bsd-3)))
12436
12437(define-public python-argcomplete
12438 (package
12439 (name "python-argcomplete")
98aecd3a 12440 (version "1.10.3")
44d10b1f 12441 (source
98aecd3a
RW
12442 (origin
12443 (method url-fetch)
12444 (uri (pypi-uri "argcomplete" version))
12445 (sha256
12446 (base32
12447 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
44d10b1f 12448 (build-system python-build-system)
98aecd3a
RW
12449 (arguments
12450 `(#:phases
12451 (modify-phases %standard-phases
12452 (add-after 'unpack 'embed-tool-references
12453 (lambda _
12454 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
12455 ((" grep")
12456 (string-append " " (which "grep")))
12457 ((" egrep")
12458 (string-append " " (which "egrep")))
12459 (("elif which")
12460 (string-append "elif " (which "which")))
12461 (("\\$\\(which")
12462 (string-append "$(" (which "which"))))
12463 #t)))))
12464 (inputs
12465 `(("grep" ,grep)
12466 ("which" ,which)))
44d10b1f 12467 (native-inputs
98aecd3a
RW
12468 `(("python-coverage" ,python-coverage)
12469 ("python-flake8" ,python-flake8)
12470 ("python-pexpect" ,python-pexpect)
12471 ("python-wheel" ,python-wheel)
44d10b1f 12472 ("tcsh" ,tcsh)
98aecd3a
RW
12473 ("fish" ,fish)
12474 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
44d10b1f
RW
12475 (home-page "https://github.com/kislyuk/argcomplete")
12476 (synopsis "Shell tab completion for Python argparse")
12477 (description "argcomplete provides extensible command line tab completion
12478of arguments and options for Python scripts using @code{argparse}. It's
12479particularly useful for programs with many options or sub-parsers that can
12480dynamically suggest completions; for example, when browsing resources over the
12481network.")
12482 (license license:asl2.0)))
12483
12484(define-public python2-argcomplete
12485 (package-with-python2 python-argcomplete))
12486
12487(define-public python-xopen
12488 (package
12489 (name "python-xopen")
24d64989 12490 (version "0.5.0")
44d10b1f
RW
12491 (source
12492 (origin
12493 (method url-fetch)
12494 (uri (pypi-uri "xopen" version))
12495 (sha256
12496 (base32
24d64989 12497 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 12498 (build-system python-build-system)
24d64989
RW
12499 (propagated-inputs
12500 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
12501 (home-page "https://github.com/marcelm/xopen/")
12502 (synopsis "Open compressed files transparently")
12503 (description "This module provides an @code{xopen} function that works like
12504Python's built-in @code{open} function, but can also deal with compressed files.
12505Supported compression formats are gzip, bzip2 and, xz, and are automatically
12506recognized by their file extensions. The focus is on being as efficient as
12507possible on all supported Python versions.")
12508 (license license:expat)))
12509
12510(define-public python2-xopen
12511 (let ((base (package-with-python2
12512 (strip-python2-variant python-xopen))))
12513 (package
12514 (inherit base)
12515 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
12516 ,@(package-propagated-inputs base))))))
12517
12518(define-public python-cheetah
12519 (package
12520 (name "python-cheetah")
12521 (version "3.1.0")
12522 (source
12523 (origin
12524 (method url-fetch)
12525 (uri (pypi-uri "Cheetah3" version))
12526 (sha256
12527 (base32
12528 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
12529 (build-system python-build-system)
12530 (arguments
12531 `(#:modules ((guix build utils)
12532 (guix build python-build-system)
12533 (ice-9 ftw)
12534 (srfi srfi-1)
12535 (srfi srfi-26))
12536 #:phases (modify-phases %standard-phases
12537 (add-after 'unpack 'use-absolute-python
12538 (lambda _
12539 (substitute* "Cheetah/CheetahWrapper.py"
12540 (("#!/usr/bin/env python")
12541 (string-append "#!" (which "python"))))
12542 #t))
12543 (replace 'check
12544 (lambda _
12545 (let ((cwd (getcwd)))
12546 (setenv "PYTHONPATH"
12547 (string-append
12548 cwd "/build/"
12549 (find (cut string-prefix? "lib" <>)
12550 (scandir (string-append cwd "/build")))
12551 ":" (getenv "PYTHONPATH")))
12552 (setenv "PATH"
12553 (string-append (getenv "PATH")
12554 ":" cwd "/bin"))
12555 (setenv "TMPDIR" "/tmp")
12556
12557 (substitute* "Cheetah/Tests/Test.py"
12558 (("unittest.TextTestRunner\\(\\)")
12559 "unittest.TextTestRunner(verbosity=2)"))
12560
12561 (invoke "python" "Cheetah/Tests/Test.py")))))))
12562 (propagated-inputs
12563 `(("python-markdown" ,python-markdown))) ;optional
12564 (home-page "http://cheetahtemplate.org/")
12565 (synopsis "Template engine")
12566 (description "Cheetah is a text-based template engine and Python code
12567generator.
12568
12569Cheetah can be used as a standalone templating utility or referenced as
12570a library from other Python applications. It has many potential uses,
12571but web developers looking for a viable alternative to ASP, JSP, PHP and
12572PSP are expected to be its principle user group.
12573
12574Features:
12575@enumerate
12576@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12577 text-based format.
12578@item Cleanly separates content, graphic design, and program code.
12579@item Blends the power and flexibility of Python with a simple template language
12580 that non-programmers can understand.
12581@item Gives template writers full access to any Python data structure, module,
12582 function, object, or method in their templates.
12583@item Makes code reuse easy by providing an object-orientated interface to
12584 templates that is accessible from Python code or other Cheetah templates.
12585 One template can subclass another and selectively reimplement sections of it.
12586@item Provides a simple, yet powerful, caching mechanism that can dramatically
12587 improve the performance of a dynamic website.
12588@item Compiles templates into optimized, yet readable, Python code.
12589@end enumerate")
12590 (license (license:x11-style "file://LICENSE"))))
12591
12592(define-public python2-cheetah
12593 (package-with-python2 python-cheetah))
12594
12595(define-public python-dulwich
12596 (package
12597 (name "python-dulwich")
12598 (version "0.18.6")
12599 (source
12600 (origin
12601 (method url-fetch)
12602 (uri (list (string-append "https://www.dulwich.io/releases/"
12603 "dulwich-" version ".tar.gz")
12604 (pypi-uri "dulwich" version)))
12605 (sha256
12606 (base32
12607 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12608 (build-system python-build-system)
12609 (arguments
12610 `(#:phases
12611 (modify-phases %standard-phases
12612 (add-before 'check 'fix-tests
12613 (lambda* (#:key inputs #:allow-other-keys)
12614 ;; The tests use Popen with a custom environment which doesn't
12615 ;; include PATH.
12616 (substitute* "dulwich/tests/compat/utils.py"
12617 (("'git'") (string-append "'"
12618 (which "git")
12619 "'")))
12620 (substitute* '("dulwich/tests/test_repository.py"
12621 "dulwich/tests/test_hooks.py")
12622 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12623 (setenv "TEST_RUNNER" "unittest")
12624 (setenv "PYTHONHASHSEED" "random")
12625 #t)))))
12626 (propagated-inputs
12627 `(("python-fastimport" ,python-fastimport)))
12628 (native-inputs
12629 `(("python-mock" ,python-mock)
12630 ("python-geventhttpclient" ,python-geventhttpclient)
12631 ("git" ,git)))
12632 (home-page "https://www.dulwich.io/")
12633 (synopsis "Git implementation in Python")
12634 (description "Dulwich is an implementation of the Git file formats and
12635protocols written in pure Python.")
12636 ;; Can be used with either license.
12637 (license (list license:asl2.0 license:gpl2+))))
12638
12639(define-public python2-dulwich
12640 (package-with-python2 python-dulwich))
12641
12642(define-public python-pbkdf2
12643 (package
12644 (name "python-pbkdf2")
12645 (version "1.3")
12646 (source
12647 (origin
12648 (method url-fetch)
12649 (uri (pypi-uri "pbkdf2" version))
12650 (sha256
12651 (base32
12652 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12653 (build-system python-build-system)
12654 (arguments
12655 '(#:phases
12656 (modify-phases %standard-phases
12657 (replace 'check
12658 (lambda _
12659 (setenv "PYTHONPATH"
12660 (string-append (getcwd) "/build/lib:"
12661 (getenv "PYTHONPATH")))
ee2bb944 12662 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
12663 (propagated-inputs
12664 `(("python-pycrypto" ,python-pycrypto))) ; optional
12665 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12666 (synopsis "Password-based key derivation")
12667 (description "This module implements the password-based key derivation
12668function, PBKDF2, specified in RSA PKCS#5 v2.0.
12669
12670PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12671is part of the RSA Public Key Cryptography Standards series. The provided
12672implementation takes a password or a passphrase and a salt value (and
12673optionally a iteration count, a digest module, and a MAC module) and provides
12674a file-like object from which an arbitrarly-sized key can be read.")
12675 (license license:expat)))
12676
12677(define-public python2-pbkdf2
12678 (package-with-python2 python-pbkdf2))
12679
12680(define-public python-qrcode
12681 (package
12682 (name "python-qrcode")
217ea1a1 12683 (version "6.1")
44d10b1f
RW
12684 (source
12685 (origin
12686 (method url-fetch)
12687 (uri (pypi-uri "qrcode" version))
12688 (sha256
217ea1a1 12689 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12690 (build-system python-build-system)
12691 (arguments
12692 ;; FIXME: Tests require packaging 'pymaging'.
12693 '(#:tests? #f))
12694 (propagated-inputs
12695 `(("python-lxml" ,python-lxml) ; for SVG output
12696 ("python-pillow" ,python-pillow) ; for PNG output
12697 ("python-six" ,python-six)))
44d10b1f
RW
12698 (home-page "https://github.com/lincolnloop/python-qrcode")
12699 (synopsis "QR Code image generator")
12700 (description "This package provides a pure Python QR Code generator
12701module. It uses the Python Imaging Library (PIL) to allow for the generation
12702of QR Codes.
12703
12704In addition this package provides a command line tool to generate QR codes and
12705either write these QR codes to a file or do the output as ascii art at the
12706console.")
12707 (license license:bsd-3)))
12708
12709(define-public python2-qrcode
12710 (package-with-python2 python-qrcode))
12711
12712(define-public python-rst2ansi
12713 (package
12714 (name "python-rst2ansi")
12715 (version "0.1.5")
12716 (source
12717 (origin
12718 (method url-fetch)
12719 (uri (pypi-uri "rst2ansi" version))
12720 (sha256
12721 (base32
12722 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12723 (build-system python-build-system)
12724 (propagated-inputs
12725 `(("python-docutils" ,python-docutils)))
12726 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12727 (synopsis "Convert RST to ANSI-decorated console output")
12728 (description
12729 "Python module dedicated to rendering RST (reStructuredText) documents
12730to ansi-escaped strings suitable for display in a terminal.")
12731 (license license:expat)))
12732
12733(define-public python-ansi2html
12734 (package
12735 (name "python-ansi2html")
12736 (version "1.2.0")
12737 (source
12738 (origin
12739 (method url-fetch)
12740 (uri (pypi-uri "ansi2html" version))
12741 (sha256
12742 (base32
12743 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12744 (build-system python-build-system)
12745 (native-inputs
12746 `(("python-mock" ,python-mock)
12747 ("python-nose" ,python-nose)))
12748 (propagated-inputs
12749 `(("python-six" ,python-six)))
12750 (home-page "https://github.com/ralphbean/ansi2html")
12751 (synopsis "Convert ANSI-decorated console output to HTML")
12752 (description
12753 "@command{ansi2html} is a Python library and command line utility for
12754convering text with ANSI color codes to HTML or LaTeX.")
12755 (license license:gpl3+)))
12756
12757(define-public python2-ansi2html
12758 (package-with-python2 python-ansi2html))
12759
12760(define-public python-ddt
12761 (package
12762 (name "python-ddt")
12763 (version "1.1.3")
12764 (source
12765 (origin
12766 (method url-fetch)
12767 (uri (pypi-uri "ddt" version))
12768 (sha256
12769 (base32
12770 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12771 (build-system python-build-system)
12772 (native-inputs
12773 `(("python-mock" ,python-mock)
12774 ("python-nose" ,python-nose)))
12775 (propagated-inputs
12776 `(("python-six" ,python-six)
12777 ("python-pyyaml" ,python-pyyaml)))
12778 (home-page "https://github.com/txels/ddt")
12779 (synopsis "Data-Driven Tests")
12780 (description
12781 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12782running it with different test data, and make it appear as multiple test
12783cases.")
12784 (license license:expat)))
12785
12786(define-public python2-ddt
12787 (package-with-python2 python-ddt))
12788
12789(define-public python-pycountry
12790 (package
12791 (name "python-pycountry")
12792 (version "18.5.26")
12793 (source
12794 (origin
12795 (method url-fetch)
12796 (uri (pypi-uri "pycountry" version))
12797 (sha256
12798 (base32
12799 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12800 (build-system python-build-system)
12801 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12802 (synopsis "ISO databases for languages, countries, currencies, etc.")
12803 (description
12804 "@code{pycountry} provides the ISO databases for the standards:
12805@enumerate
12806@item 639-3 (Languages)
12807@item 3166 (Countries)
12808@item 3166-3 (Deleted Countries)
12809@item 3166-2 (Subdivisions of countries)
12810@item 4217 (Currencies)
12811@item 15924 (Scripts)
12812@end enumerate
12813It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12814through a Python API.")
12815 (license license:lgpl2.1+)))
12816
12817(define-public python2-pycountry
12818 (package-with-python2 python-pycountry))
12819
12820(define-public python-pycosat
12821 (package
12822 (name "python-pycosat")
12823 (version "0.6.1")
12824 (source
12825 (origin
12826 (method url-fetch)
12827 (uri (pypi-uri "pycosat" version))
12828 (sha256
12829 (base32
12830 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12831 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12832 (build-system python-build-system)
12833 (home-page "https://github.com/ContinuumIO/pycosat")
12834 (synopsis "Bindings to picosat (a SAT solver)")
12835 (description
12836 "This package provides efficient Python bindings to @code{picosat} on
12837the C level. When importing pycosat, the @code{picosat} solver becomes part
12838of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12839Problem} (SAT) solver.")
12840 (license license:expat)))
12841
12842(define-public python2-pycosat
12843 (package-with-python2 python-pycosat))
12844
12845(define-public python2-ruamel.ordereddict
12846 (package
12847 (name "python2-ruamel.ordereddict")
12848 (version "0.4.9")
12849 (source
12850 (origin
12851 (method url-fetch)
12852 (uri (pypi-uri "ruamel.ordereddict" version))
12853 (sha256
12854 (base32
12855 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12856 (build-system python-build-system)
12857 (arguments
12858 `(#:python ,python-2
12859 #:phases
12860 (modify-phases %standard-phases
12861 (delete 'check)
12862 (add-after 'install 'check
12863 (lambda* (#:key inputs outputs #:allow-other-keys)
12864 (add-installed-pythonpath inputs outputs)
f987ac30 12865 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12866 (home-page "https://bitbucket.org/ruamel/ordereddict")
12867 (synopsis "Version of dict that keeps keys in insertion order")
12868 (description
12869 "This is an implementation of an ordered dictionary with @dfn{Key
12870Insertion Order} (KIO: updates of values do not affect the position of the
12871key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12872removed and put at the back). The standard library module @code{OrderedDict},
12873implemented later, implements a subset of @code{ordereddict} functionality.
12874Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12875Order} (KSO, no sorting function can be specified, but a transform can be
12876specified to apply on the key before comparison (e.g. @code{string.lower})).")
12877 (license license:expat)))
12878
12879(define-public python-pypeg2
12880 (package
12881 (name "python-pypeg2")
12882 (version "2.15.2")
12883 (source
12884 (origin
12885 (method url-fetch)
12886 (uri (pypi-uri "pyPEG2" version))
12887 (sha256
12888 (base32
12889 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12890 (build-system python-build-system)
12891 (propagated-inputs `(("python-lxml" ,python-lxml)))
12892 (arguments
12893 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12894 '(#:tests? #f))
12895 (home-page "https://fdik.org/pyPEG/")
12896 (synopsis "Parsering Expression Grammars in Python")
12897 (description "PyPEG is an intrinsic parser interpreter framework for
12898Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12899parse many formal languages.")
12900 (license license:gpl2)))
12901
12902(define-public python-incremental
12903 (package
12904 (name "python-incremental")
12905 (version "17.5.0")
12906 (source
12907 (origin
12908 (method url-fetch)
12909 (uri (pypi-uri "incremental" version))
12910 (sha256
12911 (base32
12912 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12913 (build-system python-build-system)
12914 (home-page "https://github.com/hawkowl/incremental")
12915 (synopsis "Library for versioning Python projects")
12916 (description "Incremental is a small library that versions your Python
12917projects.")
12918 (license license:expat)))
12919
12920(define-public python2-incremental
12921 (package-with-python2 python-incremental))
12922
12923(define-public python-invoke
12924 (package
12925 (name "python-invoke")
b5544cb4 12926 (home-page "https://www.pyinvoke.org/")
a5662319 12927 (version "1.3.0")
44d10b1f
RW
12928 (source (origin
12929 (method url-fetch)
12930 (uri (pypi-uri "invoke" version))
12931 (sha256
12932 (base32
a5662319 12933 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
12934 (build-system python-build-system)
12935 (arguments
12936 ;; XXX: Requires many dependencies that are not yet in Guix.
12937 `(#:tests? #f))
12938 (synopsis "Pythonic task execution")
12939 (description
12940 "Invoke is a Python task execution tool and library, drawing inspiration
12941from various sources to arrive at a powerful and clean feature set. It is
12942evolved from the Fabric project, but focuses on local and abstract concerns
12943instead of servers and network commands.")
12944 (license license:bsd-3)))
12945
12946(define-public python2-invoke
12947 (package-with-python2 python-invoke))
12948
12949(define-public python-automat
12950 (package
12951 (name "python-automat")
919d80a0 12952 (version "0.7.0")
44d10b1f
RW
12953 (source (origin
12954 (method url-fetch)
12955 (uri (pypi-uri "Automat" version))
12956 (sha256
12957 (base32
919d80a0 12958 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12959 (build-system python-build-system)
12960 ;; We disable the tests because they require python-twisted, while
12961 ;; python-twisted depends on python-automat. Twisted is optional, but the
12962 ;; tests fail if it is not available. Also see
12963 ;; <https://github.com/glyph/automat/issues/71>.
12964 (arguments '(#:tests? #f))
12965 (native-inputs
12966 `(("python-m2r" ,python-m2r)
12967 ("python-setuptools-scm" ,python-setuptools-scm)
12968 ("python-graphviz" ,python-graphviz)))
12969 (propagated-inputs
12970 `(("python-six" ,python-six)
12971 ("python-attrs" ,python-attrs)))
12972 (home-page "https://github.com/glyph/Automat")
12973 (synopsis "Self-service finite-state machines")
12974 (description "Automat is a library for concise, idiomatic Python
12975expression of finite-state automata (particularly deterministic finite-state
12976transducers).")
12977 (license license:expat)))
12978
12979(define-public python2-automat
12980 (package-with-python2 python-automat))
12981
12982(define-public python-m2r
12983 (package
12984 (name "python-m2r")
bcfb8fac 12985 (version "0.2.1")
44d10b1f
RW
12986 (source (origin
12987 (method url-fetch)
12988 (uri (pypi-uri "m2r" version))
12989 (sha256
12990 (base32
bcfb8fac 12991 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12992 (build-system python-build-system)
12993 (propagated-inputs
12994 `(("python-docutils" ,python-docutils)
12995 ("python-mistune" ,python-mistune)))
12996 (native-inputs
12997 `(("python-pygments" ,python-pygments)
12998 ("python-mock" ,python-mock)))
12999 (home-page "https://github.com/miyakogi/m2r")
13000 (synopsis "Markdown to reStructuredText converter")
13001 (description "M2R converts a markdown file including reST markups to valid
13002reST format.")
13003 (license license:expat)))
13004
13005(define-public python2-m2r
13006 (package-with-python2 python-m2r))
13007
13008(define-public python-constantly
13009 (package
13010 (name "python-constantly")
13011 (version "15.1.0")
13012 (source (origin
13013 (method url-fetch)
13014 (uri (pypi-uri "constantly" version))
13015 (sha256
13016 (base32
13017 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
13018 (build-system python-build-system)
13019 (home-page "https://github.com/twisted/constantly")
13020 (synopsis "Symbolic constants in Python")
13021 (description "Constantly is a Python library that provides symbolic
13022constant support. It includes collections and constants with text, numeric,
13023and bit flag values.")
13024 (license license:expat)))
13025
13026(define-public python2-constantly
13027 (package-with-python2 python-constantly))
13028
13029(define-public python-attrs
13030 (package
13031 (name "python-attrs")
c41d5144 13032 (version "19.1.0")
44d10b1f
RW
13033 (source (origin
13034 (method url-fetch)
13035 (uri (pypi-uri "attrs" version))
13036 (sha256
13037 (base32
c41d5144 13038 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
13039 (build-system python-build-system)
13040 (arguments
13041 `(#:modules ((guix build utils)
13042 (guix build python-build-system)
13043 (ice-9 ftw)
13044 (srfi srfi-1)
13045 (srfi srfi-26))
13046 #:phases (modify-phases %standard-phases
13047 (replace 'check
13048 (lambda _
13049 (let ((cwd (getcwd)))
13050 (setenv "PYTHONPATH"
13051 (string-append
13052 cwd "/build/"
13053 (find (cut string-prefix? "lib" <>)
13054 (scandir (string-append cwd "/build")))
13055 ":"
13056 (getenv "PYTHONPATH")))
13057 (invoke "python" "-m" "pytest")))))))
13058 (native-inputs
13059 `(("python-coverage" ,python-coverage)
13060 ("python-hypothesis" ,python-hypothesis)
13061 ("python-pympler" ,python-pympler)
13062 ("python-pytest" ,python-pytest)
13063 ("python-six" ,python-six)
13064 ("python-sphinx" ,python-sphinx)
13065 ("python-zope-interface" ,python-zope-interface)))
13066 (home-page "https://github.com/python-attrs/attrs/")
13067 (synopsis "Attributes without boilerplate")
13068 (description "@code{attrs} is a Python package with class decorators that
13069ease the chores of implementing the most common attribute-related object
13070protocols.")
13071 (license license:expat)))
13072
13073(define-public python2-attrs
13074 (package-with-python2 python-attrs))
13075
13076(define-public python-attrs-bootstrap
13077 (package
13078 (inherit python-attrs)
13079 (name "python-attrs-bootstrap")
44d10b1f
RW
13080 (native-inputs `())
13081 (arguments `(#:tests? #f))))
13082
13083(define-public python2-attrs-bootstrap
13084 (package-with-python2 python-attrs-bootstrap))
13085
13086(define-public python2-cliapp
13087 (package
13088 (name "python2-cliapp")
9064b84e 13089 (version "1.20180812.1")
44d10b1f
RW
13090 (source
13091 (origin
13092 (method url-fetch)
13093 (uri (string-append
13094 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13095 version ".tar.gz"))
13096 (sha256
13097 (base32
9064b84e 13098 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
13099 (build-system python-build-system)
13100 (arguments
13101 `(#:python ,python-2
13102 #:phases
13103 (modify-phases %standard-phases
13104 ;; check phase needs to be run before the build phase. If not,
13105 ;; coverage-test-runner looks for tests for the built source files,
13106 ;; and fails.
13107 (delete 'check)
13108 (add-before 'build 'check
13109 (lambda _
13110 ;; Disable python3 tests
13111 (substitute* "check"
13112 (("python3") "# python3"))
6c826d32 13113 (invoke "./check"))))))
44d10b1f
RW
13114 (native-inputs
13115 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13116 ("python2-pep8" ,python2-pep8)))
13117 (propagated-inputs
13118 `(("python2-pyaml" ,python2-pyaml)))
13119 (home-page "https://liw.fi/cliapp/")
13120 (synopsis "Python framework for command line programs")
13121 (description "@code{python2-cliapp} is a python framework for
13122command line programs. It contains the typical stuff such programs
13123need to do, such as parsing the command line for options, and
13124iterating over input files.")
13125 (license license:gpl2+)))
13126
13127(define-public python2-ttystatus
13128 (package
13129 (name "python2-ttystatus")
e516a9c2 13130 (version "0.36")
44d10b1f
RW
13131 (source
13132 (origin
13133 (method url-fetch)
13134 (uri (string-append
13135 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13136 version ".tar.gz"))
13137 (sha256
13138 (base32
e516a9c2 13139 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
13140 (build-system python-build-system)
13141 (native-inputs
13142 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13143 ("python2-pep8" ,python2-pep8)))
13144 (arguments
13145 `(#:python ,python-2
13146 #:phases
13147 (modify-phases %standard-phases
13148 ;; check phase needs to be run before the build phase. If not,
13149 ;; coverage-test-runner looks for tests for the built source files,
13150 ;; and fails.
13151 (delete 'check)
13152 (add-before 'build 'check
cbeee881 13153 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
13154 (home-page "https://liw.fi/ttystatus/")
13155 (synopsis "Python library for showing progress reporting and
13156status updates on terminals")
13157 (description "@code{python2-ttystatus} is a python library for
13158showing progress reporting and status updates on terminals, for
13159command line programs. Output is automatically adapted to the width
13160of the terminal: truncated if it does not fit, and resized if the
13161terminal size changes.")
13162 (license license:gpl3+)))
13163
13164(define-public python2-tracing
13165 (package
13166 (name "python2-tracing")
13167 (version "0.10")
13168 (source
13169 (origin
13170 (method url-fetch)
13171 (uri (string-append
13172 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13173 version ".tar.gz"))
13174 (sha256
13175 (base32
13176 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13177 (build-system python-build-system)
13178 (arguments
13179 `(#:python ,python-2))
13180 (home-page "https://liw.fi/tracing/")
13181 (synopsis "Python debug logging helper")
13182 (description "@code{python2-tracing} is a python library for
13183logging debug messages. It provides a way to turn debugging messages
13184on and off, based on the filename they occur in. It is much faster
13185than using @code{logging.Filter} to accomplish the same thing, which
13186matters when code is run in production mode. The actual logging still
13187happens using the @code{logging} library.")
13188 (license license:gpl3+)))
13189
13190(define-public python2-larch
13191 (package
13192 (name "python2-larch")
13193 (version "1.20151025")
13194 (source
13195 (origin
13196 (method url-fetch)
13197 (uri (string-append
13198 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13199 version ".tar.gz"))
13200 (patches (search-patches
13201 "python2-larch-coverage-4.0a6-compatibility.patch"))
13202 (sha256
13203 (base32
13204 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13205 (build-system python-build-system)
13206 (arguments
13207 `(#:python ,python-2
13208 #:phases
13209 (modify-phases %standard-phases
13210 ;; check phase needs to be run before the build phase. If not,
13211 ;; coverage-test-runner looks for tests for the built source files,
13212 ;; and fails.
13213 (delete 'check)
13214 (add-before 'build 'check
204ad455 13215 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
13216 (native-inputs
13217 `(("cmdtest" ,cmdtest)
13218 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
13219 (propagated-inputs
13220 `(("python2-tracing" ,python2-tracing)))
13221 (home-page "https://liw.fi/larch/")
13222 (synopsis "Python copy-on-write B-tree library")
13223 (description "@code{python2-larch} is an implementation of
13224particular kind of B-tree, based on research by Ohad Rodeh. See
13225@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13226on the data structure.
13227
13228The distinctive feature of this B-tree is that a node is never
13229(conceptually) modified. Instead, all updates are done by
13230copy-on-write. This makes it easy to clone a tree, and modify only the
13231clone, while other processes access the original tree.")
13232 (license license:gpl3+)))
13233
13234(define-public python-astroid
13235 (package
13236 (name "python-astroid")
1c43c698 13237 (version "2.3.3")
44d10b1f
RW
13238 (source
13239 (origin
13240 (method url-fetch)
13241 (uri (pypi-uri "astroid" version))
13242 (sha256
1c43c698 13243 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
13244 (build-system python-build-system)
13245 (propagated-inputs
13246 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13247 ("python-six" ,python-six)
f0935460 13248 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
13249 ("python-wrapt" ,python-wrapt)))
13250 (native-inputs
13251 `(("python-dateutil" ,python-dateutil)
13252 ("python-nose" ,python-nose)
13253 ("python-pytest" ,python-pytest)
13254 ("python-pytest-runner" ,python-pytest-runner)))
13255 (arguments
13256 `(#:phases
13257 (modify-phases %standard-phases
13258 (add-after 'unpack 'remove-spurious-test
13259 (lambda _
13260 ;; This can be removed after upgrading from python-3.7
13261 ;; https://github.com/PyCQA/astroid/issues/593
13262 ;; https://bugs.python.org/issue34056
13263 (delete-file "astroid/tests/unittest_modutils.py")
13264 #t))
13265 (replace 'check
13266 (lambda _
13267 (invoke "pytest" "astroid"))))))
13268 (home-page "https://github.com/PyCQA/astroid")
13269 (synopsis "Common base representation of python source code for pylint and
13270other projects")
13271 (description "@code{python-astroid} provides a common base representation
13272of python source code for projects such as pychecker, pyreverse, pylint, etc.
13273
13274It provides a compatible representation which comes from the _ast module. It
13275rebuilds the tree generated by the builtin _ast module by recursively walking
13276down the AST and building an extended ast. The new node classes have
13277additional methods and attributes for different usages. They include some
13278support for static inference and local name scopes. Furthermore, astroid
13279builds partial trees by inspecting living objects.")
13280 (license license:lgpl2.1+)
13281 (properties `((python2-variant . ,(delay python2-astroid))))))
13282
13283(define-public python2-astroid
13284 (let ((base (package-with-python2
13285 (strip-python2-variant python-astroid))))
13286 (package (inherit base)
13287 ;; Version 2.x removes python2 support.
13288 (version "1.6.5")
13289 (source
13290 (origin
13291 (method url-fetch)
13292 (uri (pypi-uri "astroid" version))
13293 (sha256
13294 (base32
13295 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
13296 (arguments
13297 (substitute-keyword-arguments (package-arguments base)
13298 ((#:phases phases)
13299 `(modify-phases ,phases
13300 (add-after 'unpack 'remove-spurious-test
13301 (lambda _
13302 ;; https://github.com/PyCQA/astroid/issues/276
13303 (delete-file "astroid/tests/unittest_brain.py")
13304 #t))
13305 (replace 'check
13306 (lambda _
13307 (invoke"python" "-m" "unittest" "discover"
13308 "-p" "unittest*.py")))))))
13309 (native-inputs `())
13310 (propagated-inputs
13311 `(("python2-backports-functools-lru-cache"
13312 ,python2-backports-functools-lru-cache)
13313 ("python2-enum34" ,python2-enum34)
13314 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
13315 ,@(alist-delete "python-typed-ast"
13316 (package-propagated-inputs base)))))))
44d10b1f
RW
13317
13318(define-public python-isort
13319 (package
13320 (name "python-isort")
e2227b6a 13321 (version "4.3.4")
44d10b1f
RW
13322 (source
13323 (origin
e2227b6a
EF
13324 (method git-fetch)
13325 (uri (git-reference
13326 ;; Tests pass only from the Github sources
13327 (url "https://github.com/timothycrosley/isort")
13328 (commit version)))
13329 (file-name (git-file-name name version))
44d10b1f
RW
13330 (sha256
13331 (base32
e2227b6a 13332 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
13333 (build-system python-build-system)
13334 (native-inputs
13335 `(("python-mock" ,python-mock)
13336 ("python-pytest" ,python-pytest)))
13337 (home-page "https://github.com/timothycrosley/isort")
13338 (synopsis "Python utility/library to sort python imports")
13339 (description "@code{python-isort} is a python utility/library to sort
13340imports alphabetically, and automatically separated into sections. It
13341provides a command line utility, a python library and plugins for various
13342editors.")
e2227b6a
EF
13343 (license license:expat)
13344 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
13345
13346(define-public python2-isort
e2227b6a
EF
13347 (let ((base (package-with-python2
13348 (strip-python2-variant python-isort))))
13349 (package (inherit base)
13350 (native-inputs
13351 `(("python2-futures" ,python2-futures)
13352 ,@(package-native-inputs base))))))
44d10b1f
RW
13353
13354(define-public python2-backports-functools-lru-cache
13355 (package
13356 (name "python2-backports-functools-lru-cache")
13357 (version "1.5")
13358 (source
13359 (origin
13360 (method url-fetch)
13361 ;; only the pypi tarballs contain the necessary metadata
13362 (uri (pypi-uri "backports.functools_lru_cache" version))
13363 (sha256
13364 (base32
13365 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
13366 (build-system python-build-system)
13367 (native-inputs
13368 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13369 (arguments
13370 `(#:python ,python-2))
13371 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13372 (synopsis "Backport of functools.lru_cache from Python 3.3")
13373 (description "@code{python2-backports-functools-lru-cache} is a backport
13374of @code{functools.lru_cache} from python 3.3.")
13375 (license license:expat)))
13376
13377(define-public python-configparser
13378 (package
13379 (name "python-configparser")
84127f8c 13380 (version "3.7.1")
44d10b1f
RW
13381 (source
13382 (origin
13383 (method url-fetch)
84127f8c 13384 (uri (pypi-uri "configparser" version))
44d10b1f
RW
13385 (sha256
13386 (base32
84127f8c 13387 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 13388 (build-system python-build-system)
809f003f 13389 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
13390 (synopsis "Backport of configparser from python 3.5")
13391 (description "@code{python-configparser} is a backport of
13392@code{configparser} from Python 3.5 so that it can be used directly
13393in other versions.")
13394 (license license:expat)))
13395
13396(define-public python2-configparser
13397 (package-with-python2 python-configparser))
13398
13399(define-public python-mando
13400 (package
13401 (name "python-mando")
13402 (version "0.6.4")
13403 (source (origin
13404 (method url-fetch)
13405 (uri (pypi-uri "mando" version))
13406 (sha256
13407 (base32
13408 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
13409 (build-system python-build-system)
13410 (propagated-inputs
13411 `(("python-rst2ansi" ,python-rst2ansi)
13412 ("python-six" ,python-six)))
13413 (native-inputs
13414 `(("python-pytest" ,python-pytest)))
13415 (home-page "https://mando.readthedocs.org/")
13416 (synopsis
13417 "Wrapper around argparse, allowing creation of complete CLI applications")
13418 (description
13419 "This package is a wrapper around argparse, allowing you to write complete CLI
13420applications in seconds while maintaining all the flexibility.")
13421 (license license:expat)))
13422
13423(define-public python2-mando
13424 (package-with-python2 python-mando))
13425
70daf82f
RW
13426(define-public python2-argparse
13427 (package
13428 (name "python2-argparse")
13429 (version "1.4.0")
13430 (source
13431 (origin
13432 (method url-fetch)
13433 (uri (pypi-uri "argparse" version))
13434 (sha256
13435 (base32
13436 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
13437 (build-system python-build-system)
13438 (arguments
13439 `(#:python ,python-2))
13440 (home-page "https://github.com/ThomasWaldmann/argparse/")
13441 (synopsis "Python command-line parsing library")
13442 (description
13443 "This package is mostly for people who want to have @code{argparse} on
13444older Pythons because it was not part of the standard library back then.")
13445 (license license:psfl)))
13446
44d10b1f
RW
13447(define-public python-fudge
13448 (package
13449 (name "python-fudge")
13450 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
13451 ;; package, which is currently the only use of this package.
13452 (version "0.9.6")
13453 (source
13454 (origin
13455 (method url-fetch)
13456 (uri (pypi-uri "fudge" version))
13457 (sha256
13458 (base32
13459 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
13460 (build-system python-build-system)
13461 (arguments
13462 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
13463 (home-page "https://github.com/fudge-py/fudge")
13464 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
13465 (description
13466 "Fudge is a Python module for using fake objects (mocks and stubs) to
13467test real ones.
13468
13469In readable Python code, you declare the methods available on your fake object
13470and how they should be called. Then you inject that into your application and
13471start testing. This declarative approach means you don’t have to record and
13472playback actions and you don’t have to inspect your fakes after running code.
13473If the fake object was used incorrectly then you’ll see an informative
13474exception message with a traceback that points to the culprit.")
13475 (license license:expat)))
13476
13477(define-public python2-fudge
13478 (package-with-python2 python-fudge))
13479
13480(define-public python-mwclient
13481 (package
13482 (name "python-mwclient")
957c6833 13483 (version "0.10.0")
44d10b1f
RW
13484 (source
13485 (origin
957c6833 13486 (method git-fetch)
44d10b1f 13487 ;; The PyPI version wouldn't contain tests.
957c6833
EF
13488 (uri (git-reference
13489 (url "https://github.com/mwclient/mwclient")
13490 (commit (string-append "v" version))))
13491 (file-name (git-file-name name version))
44d10b1f
RW
13492 (sha256
13493 (base32
957c6833 13494 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
44d10b1f
RW
13495 (build-system python-build-system)
13496 (propagated-inputs
957c6833 13497 `(("python-requests-oauthlib" ,python-requests-oauthlib)
44d10b1f
RW
13498 ("python-six" ,python-six)))
13499 (native-inputs
13500 `(("python-mock" ,python-mock)
13501 ("python-pytest" ,python-pytest)
44d10b1f 13502 ("python-pytest-cov" ,python-pytest-cov)
957c6833 13503 ("python-pytest-runner" ,python-pytest-runner)
44d10b1f
RW
13504 ("python-responses" ,python-responses)))
13505 (home-page "https://github.com/btongminh/mwclient")
13506 (synopsis "MediaWiki API client")
13507 (description "This package provides a MediaWiki API client.")
13508 (license license:expat)))
13509
13510(define-public python2-mwclient
13511 (package-with-python2 python-mwclient))
13512
13513(define-public python-utils
13514 (package
13515 (name "python-utils")
13516 (version "2.1.0")
13517 (source (origin
13518 (method url-fetch)
13519 (uri (pypi-uri "python-utils" version))
13520 (sha256
13521 (base32
13522 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
13523 (build-system python-build-system)
13524 (native-inputs
13525 `(("pytest-runner" ,python-pytest-runner)
13526 ("pytest" ,python-pytest)
13527 ("six" ,python-six)))
13528 (home-page "https://github.com/WoLpH/python-utils")
13529 (synopsis "Convenient utilities not included with the standard Python install")
13530 (description
13531 "Python Utils is a collection of small Python functions and classes which
13532make common patterns shorter and easier.")
13533 (license license:bsd-2)))
13534
13535(define-public python2-utils
13536 (package-with-python2 python-utils))
13537
44d10b1f
RW
13538(define-public python-diff-match-patch
13539 (package
13540 (name "python-diff-match-patch")
13541 (version "20121119")
13542 (source
13543 (origin
13544 (method url-fetch)
13545 (uri (pypi-uri "diff-match-patch" version))
13546 (sha256
13547 (base32
13548 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
13549 (build-system python-build-system)
13550 (home-page "https://code.google.com/p/google-diff-match-patch")
13551 (synopsis "Synchronize plain text")
13552 (description "Diff Match and Patch libraries offer robust algorithms to
13553perform the operations required for synchronizing plain text.")
13554 (license license:asl2.0)))
13555
13556(define-public python2-diff-match-patch
13557 (package-with-python2 python-diff-match-patch))
13558
13559(define-public python-dirsync
13560 (package
13561 (name "python-dirsync")
13562 (version "2.2.3")
13563 (source
13564 (origin
13565 (method url-fetch)
13566 (uri (pypi-uri "dirsync" version))
13567 (sha256
13568 (base32
13569 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
13570 (build-system python-build-system)
13571 (propagated-inputs
13572 `(("six" ,python-six)))
13573 (home-page "https://bitbucket.org/tkhyn/dirsync")
13574 (synopsis "Advanced directory tree synchronisation tool")
13575 (description "Advanced directory tree synchronisation tool.")
13576 (license license:expat)))
13577
13578(define-public python2-dirsync
13579 (package-with-python2 python-dirsync))
13580
13581(define-public python-levenshtein
13582 (package
13583 (name "python-levenshtein")
13584 (version "0.12.0")
13585 (source
13586 (origin
13587 (method url-fetch)
13588 (uri (pypi-uri "python-Levenshtein" version))
13589 (sha256
13590 (base32
13591 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13592 (build-system python-build-system)
13593 (home-page "https://github.com/ztane/python-Levenshtein")
13594 (synopsis "Fast computation of Levenshtein distance and string similarity")
13595 (description
13596 "The Levenshtein Python C extension module contains functions for fast computation of
13597@enumerate
13598@item Levenshtein (edit) distance, and edit operations
13599@item string similarity
13600@item approximate median strings, and generally string averaging
13601@item string sequence and set similarity
13602@end enumerate
13603It supports both normal and Unicode strings.")
13604 (license license:gpl2+)))
13605
13606(define-public python2-levenshtein
13607 (package-with-python2 python-levenshtein))
13608
13609(define-public python-scandir
13610 (package
13611 (name "python-scandir")
13612 (version "1.9.0")
13613 (source
13614 (origin
13615 (method url-fetch)
13616 (uri (pypi-uri "scandir" version))
13617 (sha256
13618 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13619 (build-system python-build-system)
13620 (arguments
13621 `(#:phases (modify-phases %standard-phases
13622 (replace 'check
13623 (lambda _
13624 (invoke "python" "test/run_tests.py"))))))
13625 (home-page "https://github.com/benhoyt/scandir")
13626 (synopsis "Directory iteration function")
13627 (description
13628 "Directory iteration function like os.listdir(), except that instead of
13629returning a list of bare filenames, it yields DirEntry objects that include
13630file type and stat information along with the name. Using scandir() increases
13631the speed of os.walk() by 2-20 times (depending on the platform and file
13632system) by avoiding unnecessary calls to os.stat() in most cases.
13633
13634This package is part of the Python standard library since version 3.5.")
13635 (license license:bsd-3)))
13636
13637(define-public python2-scandir
13638 (package-with-python2 python-scandir))
13639
13640(define-public python2-stemming
13641 (package
13642 (name "python2-stemming")
13643 (version "1.0.1")
13644 (source
13645 (origin
13646 (method url-fetch)
13647 (uri (pypi-uri "stemming" version))
13648 (sha256
13649 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13650 (build-system python-build-system)
13651 (arguments
13652 `(#:python ,python-2))
13653 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13654 (synopsis "Python implementations of various stemming algorithms")
13655 (description
13656 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13657stemming algorithms for English. These implementations are straightforward and
13658efficient, unlike some Python versions of the same algorithms available on the
13659Web. This package is an extraction of the stemming code included in the Whoosh
13660search engine.")
13661 (license license:public-domain)))
13662
13663(define-public python-factory-boy
13664 (package
13665 (name "python-factory-boy")
13666 (version "2.8.1")
13667 (source
13668 (origin
13669 (method url-fetch)
13670 (uri (pypi-uri "factory_boy" version))
13671 (sha256
13672 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13673 (build-system python-build-system)
13674 (arguments
13675 ;; Tests are not included in the tarball.
13676 `(#:tests? #f))
13677 (propagated-inputs
13678 `(("faker" ,python-faker)))
13679 (home-page "https://github.com/benhoyt/scandir")
13680 (synopsis "Versatile test fixtures replacement")
13681 (description
13682 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13683
13684As a fixtures replacement tool, it aims to replace static, hard to maintain
13685fixtures with easy-to-use factories for complex object.
13686
13687Instead of building an exhaustive test setup with every possible combination
13688of corner cases, factory_boy allows you to use objects customized for the
13689current test, while only declaring the test-specific fields")
13690 (license license:expat)))
13691
13692(define-public python2-factory-boy
13693 (package-with-python2 python-factory-boy))
13694
13695(define-public python-translate-toolkit
13696 (package
13697 (name "python-translate-toolkit")
13698 (version "2.1.0")
13699 (source
13700 (origin
13701 (method url-fetch)
13702 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13703 (sha256
13704 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13705 (build-system python-build-system)
13706 (native-inputs
13707 `(("python-pytest" ,python-pytest)
13708 ("python-sphinx" ,python-sphinx)))
13709 (propagated-inputs
13710 `(("python-babel" ,python-babel)
13711 ("python-beautifulsoup4" ,python-beautifulsoup4)
13712 ("python-chardet" ,python-chardet)
13713 ("python-diff-match-patch" ,python-diff-match-patch)
13714 ("python-levenshtein" ,python-levenshtein)
13715 ("python-lxml" ,python-lxml)
13716 ("python-six" ,python-six)
13717 ("python-vobject" ,python-vobject)
13718 ("python-pyyaml" ,python-pyyaml)))
13719 (arguments
13720 ;; TODO: tests are not run, because they end with
13721 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13722 ;; 'parse_funcs'
13723 ;; during test setup.
13724 `(#:tests? #f))
18919cf9 13725 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13726 (synopsis "Tools and API for translation and localization engineering")
13727 (description
13728 "Tools and API for translation and localization engineering. It contains
13729several utilities, as well as an API for building localization tools.")
13730 (license license:gpl2+)))
13731
13732(define-public python2-translate-toolkit
13733 (package-with-python2 python-translate-toolkit))
13734
13735(define-public python-packaging
13736 (package
13737 (name "python-packaging")
a72a1892 13738 (version "20.0")
44d10b1f
RW
13739 (source
13740 (origin
13741 (method url-fetch)
13742 (uri (pypi-uri "packaging" version))
20bf58bf
MB
13743 ;; XXX: The URL in the patch file is wrong, it should be
13744 ;; <https://github.com/pypa/packaging/pull/256>.
fdd0c369 13745 (patches (search-patches "python-packaging-test-arch.patch"))
44d10b1f
RW
13746 (sha256
13747 (base32
a72a1892 13748 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
44d10b1f
RW
13749 (build-system python-build-system)
13750 (arguments
13751 `(#:phases (modify-phases %standard-phases
13752 (replace 'check
13753 (lambda _ (invoke "py.test" "-vv"))))))
13754 (native-inputs
13755 `(("python-pretend" ,python-pretend)
13756 ("python-pytest" ,python-pytest)))
13757 (propagated-inputs
13758 `(("python-pyparsing" ,python-pyparsing)
13759 ("python-six" ,python-six)))
13760 (home-page "https://github.com/pypa/packaging")
13761 (synopsis "Core utilities for Python packages")
13762 (description "Packaging is a Python module for dealing with Python packages.
13763It offers an interface for working with package versions, names, and dependency
13764information.")
13765 ;; From 'LICENSE': This software is made available under the terms of
13766 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13767 ;; Contributions to this software is made under the terms of *both* these
13768 ;; licenses.
13769 (license (list license:asl2.0 license:bsd-2))))
13770
13771(define-public python2-packaging
13772 (package-with-python2 python-packaging))
13773
13774(define-public python-relatorio
13775 (package
13776 (name "python-relatorio")
13777 (version "0.8.0")
13778 (source
13779 (origin
13780 (method url-fetch)
13781 (uri (pypi-uri "relatorio" version))
13782 (sha256
13783 (base32
13784 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13785 (build-system python-build-system)
13786 (propagated-inputs
13787 `(("python-lxml" ,python-lxml)
13788 ("python-genshi" ,python-genshi)))
13789 (native-inputs
13790 `(("python-magic" ,python-magic)))
13791 (home-page "https://relatorio.tryton.org/")
13792 (synopsis "Templating library able to output ODT and PDF files")
13793 (description "Relatorio is a templating library which provides a way to
13794easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13795for more filetypes can be easily added by creating plugins for them.")
13796 (license license:gpl3+)))
13797
13798(define-public python2-relatorio
13799 (package-with-python2 python-relatorio))
13800
13801(define-public python-radon
13802 (package
13803 (name "python-radon")
f675ab4f 13804 (version "4.1.0")
44d10b1f
RW
13805 (source
13806 (origin
13807 (method url-fetch)
13808 (uri (pypi-uri "radon" version))
13809 (sha256
13810 (base32
f675ab4f 13811 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
44d10b1f
RW
13812 (build-system python-build-system)
13813 (arguments
13814 `(#:phases (modify-phases %standard-phases
13815 (replace 'check
13816 (lambda _
13817 (invoke "python" "radon/tests/run.py"))))))
13818 (propagated-inputs
13819 `(("python-colorama" ,python-colorama)
13820 ("python-flake8-polyfill" ,python-flake8-polyfill)
13821 ("python-mando" ,python-mando)))
13822 (native-inputs
13823 `(("python-pytest" ,python-pytest)
13824 ("python-pytest-mock" ,python-pytest-mock)))
13825 (home-page "https://radon.readthedocs.org/")
13826 (synopsis "Code Metrics in Python")
13827 (description "Radon is a Python tool which computes various code metrics.
13828Supported metrics are:
13829@itemize @bullet
13830@item raw metrics: SLOC, comment lines, blank lines, &c.
13831@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13832@item Halstead metrics (all of them)
13833@item the Maintainability Index (a Visual Studio metric)
13834@end itemize")
6bd7d4cb 13835 (properties `((python2-variant . ,(delay python2-radon))))
44d10b1f
RW
13836 (license license:expat)))
13837
13838(define-public python2-radon
6bd7d4cb
MB
13839 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
13840 (package
13841 (inherit base)
13842 (propagated-inputs
13843 `(("python-configparser" ,python2-configparser)
13844 ("python-future" ,python2-future)
13845 ,@(package-propagated-inputs base))))))
44d10b1f
RW
13846
13847(define-public python-sure
13848 (package
13849 (name "python-sure")
13850 (version "1.4.11")
13851 (source
13852 (origin
13853 (method url-fetch)
13854 (uri (pypi-uri "sure" version))
13855 (sha256
13856 (base32
13857 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13858 (build-system python-build-system)
13859 (propagated-inputs
13860 `(("python-mock" ,python-mock)
13861 ("python-six" ,python-six)))
13862 (native-inputs
13863 `(("python-nose" ,python-nose)))
13864 (home-page "https://github.com/gabrielfalcao/sure")
13865 (synopsis "Automated testing library in python for python")
13866 (description
13867 "Sure is a python library that leverages a DSL for writing assertions.
13868Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13869 (license license:gpl3+)))
13870
13871(define-public python2-sure
13872 (package-with-python2 python-sure))
13873
13874(define-public python2-couleur
13875 ;; This package does not seem to support python3 at all, hence,
13876 ;; only the python2 variant definition is provided.
13877 (package
13878 (name "python2-couleur")
13879 (version "0.6.2")
13880 (source
13881 (origin
13882 (method url-fetch)
13883 (uri (pypi-uri "couleur" version))
13884 (sha256
13885 (base32
13886 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13887 (build-system python-build-system)
13888 (arguments
13889 `(#:python ,python-2))
13890 (home-page "https://github.com/gabrielfalcao/couleur")
13891 (synopsis
13892 "ANSI terminal tool for python, colored shell and other handy fancy features")
13893 (description
13894 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13895terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13896 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13897 ;; https://github.com/gabrielfalcao/couleur/issues/11
13898 (license license:lgpl3+)))
13899
13900(define-public python-misaka
13901 (package
13902 (name "python-misaka")
0dcb3412 13903 (version "2.1.1")
44d10b1f
RW
13904 (source
13905 (origin
13906 (method url-fetch)
13907 (uri (pypi-uri "misaka" version))
13908 (sha256
13909 (base32
0dcb3412 13910 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13911 (build-system python-build-system)
13912 (arguments
13913 `(;; Line 37 of setup.py calls self.run_command('develop')
13914 ;; in the 'check' phase. This command seems to be trying
13915 ;; to write to
13916 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13917 ;; for which it does not have the permission to write.
13918 #:tests? #f))
13919 (propagated-inputs
13920 `(("python-cffi" ,python-cffi)))
13921 (home-page "https://github.com/FSX/misaka")
13922 (synopsis "Python binding for Hoedown")
13923 (description
13924 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13925library written in C. It features a fast HTML renderer and functionality to make custom
13926renderers (e.g. man pages or LaTeX).")
13927 (license license:expat)))
13928
13929(define-public python2-misaka
13930 (package-with-python2 python-misaka))
13931
13932(define-public python2-steadymark
13933 ;; This is forced into being a python2 only variant
13934 ;; due to its dependence on couleur that has no support
13935 ;; for python3
13936 (package
13937 (name "python2-steadymark")
13938 (version "0.7.3")
13939 (source
13940 (origin
13941 (method url-fetch)
13942 (uri (pypi-uri "steadymark" version))
13943 (sha256
13944 (base32
13945 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13946 (build-system python-build-system)
13947 (native-inputs
13948 `(("python-couleur" ,python2-couleur)
13949 ("python-sure" ,python2-sure)
13950 ("python-misaka" ,python2-misaka)))
13951 (arguments
13952 `(#:python ,python-2
13953 #:phases
13954 (modify-phases %standard-phases
13955 (add-before 'build 'patch-setup-py
13956 (lambda _
13957 ;; Update requirements from dependency==version
13958 ;; to dependency>=version
13959 (substitute* "setup.py"
13960 (("==") ">="))
13961 #t)))))
13962 (home-page "https://github.com/gabrielfalcao/steadymark")
13963 (synopsis "Markdown-based test runner for python")
13964 (description
13965 "@code{Steadymark} allows documentation to be written in github-flavoured
13966markdown. The documentation may contain snippets of code surrounded by python
13967code blocks and @code{Steadymark} will find these snippets and run them, making
13968sure that there are no old malfunctional examples in the documentation examples.")
13969 (license license:expat)))
13970
13971(define-public python-jsonpointer
13972 (package
13973 (name "python-jsonpointer")
13974 (version "1.10")
13975 (source
13976 (origin
13977 (method url-fetch)
13978 (uri (pypi-uri "jsonpointer" version))
13979 (sha256
13980 (base32
13981 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13982 (build-system python-build-system)
13983 (home-page "https://github.com/stefankoegl/python-json-pointer")
13984 (synopsis "Identify specific nodes in a JSON document")
13985 (description "@code{jsonpointer} allows you to access specific nodes
13986by path in a JSON document (see RFC 6901).")
13987 (license license:bsd-3)))
13988
13989(define-public python2-jsonpointer
13990 (package-with-python2 python-jsonpointer))
13991
13992(define-public python-jsonpatch
13993 (package
13994 (name "python-jsonpatch")
13995 (version "1.16")
13996 (source
13997 (origin
854c5c95 13998 (method git-fetch)
44d10b1f 13999 ;; pypi version lacks tests.js
854c5c95
EF
14000 (uri (git-reference
14001 (url "https://github.com/stefankoegl/python-json-patch")
14002 (commit (string-append "v" version))))
14003 (file-name (git-file-name name version))
44d10b1f
RW
14004 (sha256
14005 (base32
854c5c95 14006 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
44d10b1f
RW
14007 (build-system python-build-system)
14008 (native-inputs
14009 `(("python-jsonpointer" ,python-jsonpointer)))
14010 (home-page "https://github.com/stefankoegl/python-json-patch")
14011 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
14012 (description "@code{jsonpatch} is a library and program that allows
14013applying JSON Patches according to RFC 6902.")
14014 (license license:bsd-3)))
14015
14016(define-public python2-jsonpatch
14017 (package-with-python2 python-jsonpatch))
14018
14019(define-public python-jsonpatch-0.4
14020 (package (inherit python-jsonpatch)
14021 (name "python-jsonpatch")
14022 (version "0.4")
14023 (source
14024 (origin
a9722d0d
EF
14025 (method git-fetch)
14026 (uri (git-reference
14027 (url "https://github.com/stefankoegl/python-json-patch")
14028 (commit (string-append "v" version))))
14029 (file-name (git-file-name name version))
44d10b1f
RW
14030 (sha256
14031 (base32
a9722d0d 14032 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
44d10b1f
RW
14033
14034(define-public python2-jsonpatch-0.4
14035 (package-with-python2 python-jsonpatch-0.4))
14036
14037(define-public python-rfc3986
14038 (package
14039 (name "python-rfc3986")
14040 (version "1.1.0")
14041 (source (origin
14042 (method url-fetch)
14043 (uri (pypi-uri "rfc3986" version))
14044 (sha256
14045 (base32
14046 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
14047 (build-system python-build-system)
14048 (arguments
14049 `(#:modules ((guix build utils)
14050 (guix build python-build-system)
14051 (ice-9 ftw)
14052 (srfi srfi-1)
14053 (srfi srfi-26))
14054 #:phases
14055 (modify-phases %standard-phases
14056 (replace 'check
14057 (lambda _
14058 (let ((cwd (getcwd)))
14059 (setenv "PYTHONPATH"
14060 (string-append cwd "/build/"
14061 (find (cut string-prefix? "lib" <>)
14062 (scandir (string-append cwd "/build")))
14063 ":"
14064 (getenv "PYTHONPATH")))
14065 (invoke "pytest" "-v")))))))
14066 (native-inputs
14067 `(("python-pytest" ,python-pytest)))
14068 (home-page "https://rfc3986.readthedocs.io/")
14069 (synopsis "Parse and validate URI references")
14070 (description
14071 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
14072validation and authority parsing. This module also supports RFC@tie{}6874
14073which adds support for zone identifiers to IPv6 addresses.")
14074 (license license:asl2.0)))
14075
14076(define-public python2-rfc3986
14077 (package-with-python2 python-rfc3986))
14078
14079(define-public python-rfc3987
14080 (package
14081 (name "python-rfc3987")
14082 (version "1.3.7")
14083 (source
14084 (origin
14085 (method url-fetch)
14086 (uri (pypi-uri "rfc3987" version))
14087 (sha256
14088 (base32
14089 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
14090 (build-system python-build-system)
e85af137 14091 (home-page "https://pypi.org/project/rfc3987/")
44d10b1f
RW
14092 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
14093 (description "@code{rfc3987} provides routines for parsing and
14094validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
14095 (license license:gpl3+)))
14096
14097(define-public python2-rfc3987
14098 (package-with-python2 python-rfc3987))
14099
28030d29
MB
14100(define-public python-validators
14101 (package
14102 (name "python-validators")
14103 (version "0.14.2")
14104 (source (origin
14105 (method url-fetch)
14106 (uri (pypi-uri "validators" version))
14107 (sha256
14108 (base32
14109 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
14110 (build-system python-build-system)
14111 (arguments
14112 '(#:phases (modify-phases %standard-phases
14113 (replace 'check
14114 (lambda _
14115 (invoke "pytest" "-vv"))))))
14116 (propagated-inputs
14117 `(("python-decorator" ,python-decorator)
14118 ("python-six" ,python-six)))
14119 (native-inputs
14120 `(("python-flake8" ,python-flake8)
14121 ("python-isort" ,python-isort)
14122 ("python-pytest" ,python-pytest)))
14123 (home-page "https://github.com/kvesteri/validators")
14124 (synopsis "Data validation library")
14125 (description
14126 "This package contains validators for different things such as email
14127addresses, IP addresses, URLs, hashes and more. It has been designed to
14128be easy to use and not require defining a schema or form just to validate
14129some input.")
14130 (license license:expat)))
14131
14132(define-public python2-validators
14133 (package-with-python2 python-validators))
14134
44d10b1f
RW
14135(define-public python-validate-email
14136 (package
14137 (name "python-validate-email")
14138 (version "1.3")
14139 (source
14140 (origin
14141 (method url-fetch)
14142 (uri (pypi-uri "validate_email" version))
14143 (sha256
14144 (base32
14145 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
14146 (build-system python-build-system)
14147 (home-page "https://github.com/syrusakbary/validate_email")
14148 (synopsis "Verifies if an email address is valid and really exists")
14149 (description "@code{validate_email} can be used to verify if an email
14150address is valid and really exists.")
14151 (license license:lgpl3+)))
14152
14153(define-public python2-validate-email
14154 (package-with-python2 python-validate-email))
14155
14156(define-public python-flex
14157 (package
14158 (name "python-flex")
14159 (version "6.10.0")
14160 (source
14161 (origin
14162 (method url-fetch)
14163 (uri (pypi-uri "flex" version))
14164 (sha256
14165 (base32
14166 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
14167 (build-system python-build-system)
14168 (propagated-inputs
14169 `(("python-click" ,python-click)
14170 ("python-iso8601" ,python-iso8601)
14171 ("python-jsonpointer" ,python-jsonpointer)
14172 ("python-pyyaml" ,python-pyyaml)
14173 ("python-requests" ,python-requests)
14174 ("python-rfc3987" ,python-rfc3987)
14175 ("python-six" ,python-six)
14176 ("python-validate-email" ,python-validate-email)))
14177 (home-page "https://github.com/pipermerriam/flex")
14178 (synopsis "Validates Swagger schemata")
14179 (description "@code{flex} can be used to validate Swagger schemata.")
14180 (license license:bsd-3)))
14181
14182(define-public python2-flex
14183 (package-with-python2 python-flex))
14184
14185(define-public python-marshmallow
14186 (package
14187 (name "python-marshmallow")
14188 (version "3.0.0b14")
14189 (source
14190 (origin
14191 (method url-fetch)
14192 (uri (pypi-uri "marshmallow" version))
14193 (sha256
14194 (base32
14195 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
14196 (build-system python-build-system)
14197 (propagated-inputs
14198 `(("python-dateutil" ,python-dateutil)
14199 ("python-simplejson" ,python-simplejson)))
14200 (native-inputs
14201 `(("python-pytest" ,python-pytest)
14202 ("python-pytz" ,python-pytz)))
14203 (home-page "https://github.com/marshmallow-code/marshmallow")
14204 (synopsis "Convert complex datatypes to and from native
14205Python datatypes.")
14206 (description "@code{marshmallow} provides a library for converting
14207complex datatypes to and from native Python datatypes.")
14208 (license license:expat)))
14209
14210(define-public python2-marshmallow
14211 (package-with-python2 python-marshmallow))
14212
14213(define-public python-apispec
14214 (package
14215 (name "python-apispec")
14216 (version "0.25.3")
14217 (source
14218 (origin
14219 (method url-fetch)
14220 (uri (pypi-uri "apispec" version))
14221 (sha256
14222 (base32
14223 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
14224 (build-system python-build-system)
14225 (propagated-inputs
14226 `(("python-pyyaml" ,python-pyyaml)))
14227 (native-inputs
14228 `(("python-pytest" ,python-pytest)
14229 ("python-flask" ,python-flask)
14230 ("python-marshmallow" ,python-marshmallow)
14231 ("python-tornado" ,python-tornado)
14232 ("python-bottle" ,python-bottle)
14233 ("python-mock" ,python-mock)))
14234 (home-page "https://github.com/marshmallow-code/apispec")
14235 (synopsis "Swagger 2.0 API specification generator")
14236 (description "@code{python-apispec} is a pluggable API specification
14237generator. Currently supports the OpenAPI specification (f.k.a.
14238Swagger 2.0).")
14239 (license license:expat)))
14240
14241(define-public python2-apispec
14242 (package-with-python2 python-apispec))
14243
14244(define-public python-flasgger
14245 (package
14246 (name "python-flasgger")
14247 (version "0.6.3")
14248 (source
14249 (origin
1a04d421
TGR
14250 (method git-fetch)
14251 (uri (git-reference
14252 (url "https://github.com/rochacbruno/flasgger.git")
14253 (commit version)))
14254 (file-name (git-file-name name version))
44d10b1f 14255 (sha256
1a04d421 14256 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
14257 (build-system python-build-system)
14258 (arguments
14259 `(#:phases
14260 (modify-phases %standard-phases
14261 (replace 'check
14262 (lambda* (#:key inputs outputs #:allow-other-keys)
14263 (substitute* "Makefile"
14264 (("flake8 flasgger --ignore=F403")
14265 "flake8 flasgger --ignore=E731,F403"))
14266 (setenv "PYTHONPATH" (string-append (getcwd)
14267 ":"
14268 (getenv "PYTHONPATH")))
ac599a09 14269 (invoke "py.test"))))))
44d10b1f
RW
14270 (propagated-inputs
14271 `(("python-flask" ,python-flask)
14272 ("python-pyyaml" ,python-pyyaml)
14273 ("python-jsonschema" ,python-jsonschema)
14274 ("python-mistune" ,python-mistune)
14275 ("python-six" ,python-six)))
14276 (native-inputs
14277 `(("python-decorator" ,python-decorator)
14278 ("python-flake8" ,python-flake8)
14279 ("python-flask-restful" ,python-flask-restful)
14280 ("python-flex" ,python-flex)
14281 ("python-pytest" ,python-pytest)
14282 ("python-pytest-cov" ,python-pytest-cov)
14283 ("python-marshmallow" ,python-marshmallow)
14284 ("python-apispec" ,python-apispec)))
14285 (home-page "https://github.com/rochacbruno/flasgger/")
14286 (synopsis "Extract Swagger specs from your Flask project")
14287 (description "@code{python-flasgger} allows extracting Swagger specs
14288from your Flask project. It is a fork of Flask-Swagger.")
14289 (license license:expat)))
14290
14291(define-public python2-flasgger
14292 (package-with-python2 python-flasgger))
14293
14294(define-public python-swagger-spec-validator
14295 (package
14296 (name "python-swagger-spec-validator")
fe9c5b1d 14297 (version "2.4.3")
44d10b1f
RW
14298 (source
14299 (origin
14300 (method url-fetch)
14301 (uri (pypi-uri "swagger-spec-validator" version))
14302 (sha256
14303 (base32
fe9c5b1d 14304 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
14305 (build-system python-build-system)
14306 (propagated-inputs
14307 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 14308 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
14309 ("python-six" ,python-six)))
14310 (home-page
14311 "https://github.com/Yelp/swagger_spec_validator")
14312 (synopsis "Validation of Swagger specifications")
14313 (description "@code{swagger_spec_validator} provides a library for
14314validating Swagger API specifications.")
14315 (license license:asl2.0)))
14316
14317(define-public python2-swagger-spec-validator
14318 (package-with-python2 python-swagger-spec-validator))
14319
14320(define-public python-apache-libcloud
14321 (package
14322 (name "python-apache-libcloud")
14323 (version "2.4.0")
14324 (source
14325 (origin
14326 (method url-fetch)
14327 (uri (pypi-uri "apache-libcloud" version))
14328 (sha256
14329 (base32
14330 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
14331 (build-system python-build-system)
14332 (arguments
14333 `(#:phases
14334 (modify-phases %standard-phases
14335 (add-after 'unpack 'patch-ssh
14336 (lambda* (#:key inputs #:allow-other-keys)
14337 (substitute* "libcloud/compute/ssh.py"
14338 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
14339 "/bin/ssh" "'")))
14340 #t))
14341 (add-after 'unpack 'patch-tests
14342 (lambda _
14343 (substitute* "./libcloud/test/test_file_fixtures.py"
14344 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
14345 (("def _ascii") "def _raw_data(self, method, url, body, headers):
14346 return (httplib.OK,
14347 \"1234abcd\",
14348 {\"test\": \"value\"},
14349 httplib.responses[httplib.OK])
14350 def _ascii"))
14351 (substitute* "libcloud/test/compute/test_ssh_client.py"
14352 (("class ShellOutSSHClientTests")
14353 "@unittest.skip(\"Guix container doesn't have ssh service\")
14354class ShellOutSSHClientTests")
14355 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
14356 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
14357 (("'.xF0', '.x90', '.x8D', '.x88'")
14358 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
14359 #t))
14360 (add-before 'check 'copy-secret
14361 (lambda _
14362 (copy-file "libcloud/test/secrets.py-dist"
14363 "libcloud/test/secrets.py")
14364 #t)))))
14365 (inputs
14366 `(("openssh" ,openssh)))
14367 (propagated-inputs
14368 `(("python-paramiko" ,python-paramiko)
14369 ("python-requests" ,python-requests)))
14370 (native-inputs
14371 `(("python-lockfile" ,python-lockfile)
14372 ("python-mock" ,python-mock)
14373 ("python-pytest" ,python-pytest)
14374 ("python-pytest-runner" ,python-pytest-runner)
14375 ("python-requests-mock" ,python-requests-mock)))
14376 (home-page "https://libcloud.apache.org/")
14377 (synopsis "Unified Cloud API")
14378 (description "@code{libcloud} is a Python library for interacting with
14379many of the popular cloud service providers using a unified API.")
14380 (license license:asl2.0)))
14381
14382(define-public python2-apache-libcloud
14383 (package-with-python2 python-apache-libcloud))
14384
1639e0b7 14385(define-public python-smmap
44d10b1f 14386 (package
1639e0b7
MC
14387 (name "python-smmap")
14388 (version "3.0.1")
44d10b1f
RW
14389 (source
14390 (origin
14391 (method url-fetch)
1639e0b7 14392 (uri (pypi-uri "smmap" version))
44d10b1f 14393 (sha256
1639e0b7 14394 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
44d10b1f
RW
14395 (build-system python-build-system)
14396 (native-inputs
14397 `(("python-nosexcover" ,python-nosexcover)))
14398 (home-page "https://github.com/Byron/smmap")
14399 (synopsis "Python sliding window memory map manager")
1639e0b7 14400 (description "@code{smmap} is a pure Python implementation of a sliding
44d10b1f
RW
14401window memory map manager.")
14402 (license license:bsd-3)))
14403
1639e0b7
MC
14404(define-public python-smmap2
14405 (deprecated-package "python-smmap2" python-smmap))
14406
14407(define-public python2-smmap
14408 (package-with-python2 python-smmap))
14409
44d10b1f 14410(define-public python2-smmap2
1639e0b7 14411 (deprecated-package "python2-smmap2" python2-smmap))
44d10b1f
RW
14412
14413(define-public python-regex
14414 (package
14415 (name "python-regex")
c187c9d7 14416 (version "2019.04.14")
44d10b1f
RW
14417 (source (origin
14418 (method url-fetch)
14419 (uri (pypi-uri "regex" version))
14420 (sha256
14421 (base32
c187c9d7
BT
14422 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
14423 ;; TODO: Fix and enable regex_test.py tests that complain about the
14424 ;; test.support module not existing.
44d10b1f
RW
14425 (build-system python-build-system)
14426 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
14427 (synopsis "Alternative regular expression module")
14428 (description "This regular expression implementation is backwards-
14429compatible with the standard @code{re} module, but offers additional
14430functionality like full case-folding for case-insensitive matches in Unicode.")
14431 (license license:psfl)))
14432
14433(define-public python2-regex
14434 (package-with-python2 python-regex))
14435
14436(define-public python2-pyopengl
14437 (package
14438 (name "python2-pyopengl")
14439 (version "3.1.0")
14440 (source
14441 (origin
14442 (method url-fetch)
14443 (uri (pypi-uri "PyOpenGL" version))
14444 (sha256
14445 (base32
14446 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
14447 (arguments
14448 `(#:python ,python-2))
14449 (build-system python-build-system)
14450 (home-page "http://pyopengl.sourceforge.net")
14451 (synopsis "Standard OpenGL bindings for Python")
14452 (description
14453 "PyOpenGL is the most common cross platform Python binding to OpenGL and
14454related APIs. The binding is created using the standard @code{ctypes}
14455library.")
14456 (license license:bsd-3)))
14457
14458(define-public python2-pyopengl-accelerate
14459 (package
14460 (inherit python2-pyopengl)
14461 (name "python2-pyopengl-accelerate")
14462 (version "3.1.0")
14463 (source
14464 (origin
14465 (method url-fetch)
14466 (uri (pypi-uri "PyOpenGL-accelerate" version))
14467 (sha256
14468 (base32
14469 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
14470 (synopsis "Acceleration code for PyOpenGL")
14471 (description
14472 "This is the Cython-coded accelerator module for PyOpenGL.")))
14473
14474(define-public python-rencode
14475 (package
14476 (name "python-rencode")
14477 (version "1.0.5")
14478 (source
14479 (origin
14480 (method url-fetch)
14481 (uri (pypi-uri "rencode" version))
14482 (sha256
14483 (base32
14484 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
14485 (build-system python-build-system)
14486 (arguments
14487 `(#:phases
14488 (modify-phases %standard-phases
14489 (add-before 'check 'delete-bogus-test
14490 ;; This test requires /home/aresch/Downloads, which is not provided by
14491 ;; the build environment.
14492 (lambda _
14493 (delete-file "rencode/t.py")
14494 #t)))))
14495 (native-inputs `(("pkg-config" ,pkg-config)
14496 ("python-cython" ,python-cython)))
14497 (home-page "https://github.com/aresch/rencode")
14498 (synopsis "Serialization of heterogeneous data structures")
14499 (description
14500 "The @code{rencode} module is a data structure serialization library,
14501similar to @code{bencode} from the BitTorrent project. For complex,
14502heterogeneous data structures with many small elements, r-encoding stake up
14503significantly less space than b-encodings. This version of rencode is a
14504complete rewrite in Cython to attempt to increase the performance over the
14505pure Python module.")
14506 (license license:bsd-3)))
14507
14508(define-public python2-rencode
14509 (package-with-python2 python-rencode))
14510
14511(define-public python-xenon
14512 (package
14513 (name "python-xenon")
8c06d6d8 14514 (version "0.7.0")
44d10b1f
RW
14515 (source
14516 (origin
14517 (method url-fetch)
14518 (uri (pypi-uri "xenon" version))
14519 (sha256
14520 (base32
8c06d6d8 14521 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
44d10b1f
RW
14522 (build-system python-build-system)
14523 (native-inputs
14524 `(("python-pyyaml" ,python-pyyaml)
14525 ("python-radon" ,python-radon)
14526 ("python-requests" ,python-requests)
14527 ("python-flake8" ,python-flake8)
14528 ("python-tox" ,python-tox)))
14529 (arguments
8c06d6d8
MC
14530 `(#:tests? #f ;test suite not shipped with the PyPI archive
14531 #:phases
44d10b1f
RW
14532 (modify-phases %standard-phases
14533 (add-before 'build 'patch-test-requirements
14534 (lambda _
14535 ;; Remove httpretty dependency for tests.
14536 (substitute* "setup.py"
14537 (("httpretty") ""))
14538 #t)))))
14539 (home-page "https://xenon.readthedocs.org/")
14540 (synopsis "Monitor code metrics for Python on your CI server")
14541 (description
14542 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
14543Ideally, @code{xenon} is run every time code is committed. Through command
14544line options, various thresholds can be set for the complexity of code. It
14545will fail (i.e. it will exit with a non-zero exit code) when any of these
14546requirements is not met.")
14547 (license license:expat)))
14548
14549(define-public python2-xenon
14550 (package-with-python2 python-xenon))
14551
14552(define-public python-pysocks
14553 (package
14554 (name "python-pysocks")
b8725cdf 14555 (version "1.7.0")
44d10b1f
RW
14556 (source
14557 (origin
14558 (method url-fetch)
14559 (uri (pypi-uri "PySocks" version))
14560 (sha256
14561 (base32
b8725cdf 14562 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
14563 (build-system python-build-system)
14564 (arguments `(#:tests? #f))
14565 (home-page "https://github.com/Anorov/PySocks")
14566 (synopsis "SOCKS client module")
14567 (description "@code{pysocks} is an updated and semi-actively maintained
14568version of @code{SocksiPy} with bug fixes and extra features.")
14569 (license license:bsd-3)))
14570
14571(define-public python2-pysocks
14572 (package-with-python2 python-pysocks))
14573
14574(define-public python-pydiff
14575 (package
14576 (name "python-pydiff")
14577 (version "0.2")
14578 (source
14579 (origin
14580 (method url-fetch)
14581 (uri (pypi-uri "pydiff" version))
14582 (sha256
14583 (base32
14584 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
14585 (build-system python-build-system)
14586 (home-page "https://github.com/myint/pydiff")
14587 (synopsis "Library to diff two Python files at the bytecode level")
14588 (description
14589 "@code{pydiff} makes it easy to look for actual code changes while
14590ignoring formatting changes.")
14591 (license license:expat)))
14592
14593(define-public python2-pydiff
14594 (package-with-python2 python-pydiff))
14595
14596(define-public python-tqdm
14597 (package
14598 (name "python-tqdm")
8317c89a 14599 (version "4.43.0")
44d10b1f
RW
14600 (source
14601 (origin
14602 (method url-fetch)
14603 (uri (pypi-uri "tqdm" version))
14604 (sha256
14605 (base32
8317c89a 14606 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
44d10b1f 14607 (build-system python-build-system)
8317c89a
MB
14608 (arguments
14609 '(#:phases (modify-phases %standard-phases
14610 (replace 'check
14611 (lambda* (#:key inputs outputs #:allow-other-keys)
14612 (add-installed-pythonpath inputs outputs)
14613 ;; This invokation is taken from tox.ini.
14614 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
14615 "-d" "-v" "tqdm/"))))))
44d10b1f 14616 (native-inputs
8317c89a 14617 `(("python-nose" ,python-nose)))
44d10b1f
RW
14618 (home-page "https://github.com/tqdm/tqdm")
14619 (synopsis "Fast, extensible progress meter")
14620 (description
14621 "Make loops show a progress bar on the console by just wrapping any
14622iterable with @code{|tqdm(iterable)|}. Offers many options to define
14623design and layout.")
8317c89a 14624 (license (list license:mpl2.0 license:expat))))
44d10b1f
RW
14625
14626(define-public python2-tqdm
8317c89a 14627 (package-with-python2 python-tqdm))
44d10b1f
RW
14628
14629(define-public python-pkginfo
14630 (package
14631 (name "python-pkginfo")
14632 (version "1.4.2")
14633 (source
14634 (origin
14635 (method url-fetch)
14636 (uri (pypi-uri "pkginfo" version))
14637 (sha256
14638 (base32
14639 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14640 (build-system python-build-system)
14641 (arguments
14642 ;; The tests are broken upstream.
14643 '(#:tests? #f))
14644 (home-page
14645 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14646 (synopsis
14647 "Query metadatdata from sdists, bdists, and installed packages")
14648 (description
14649 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14650source distriubtion (an sdist) or a binary distribution (e.g., created by
14651running bdist_egg). It can also query the EGG-INFO directory of an installed
14652distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14653created by running @code{python setup.py develop}).")
14654 (license license:expat)))
14655
14656(define-public python2-pkginfo
14657 (package-with-python2 python-pkginfo))
14658
14659(define-public python-twine
14660 (package
14661 (name "python-twine")
14662 (version "1.9.1")
14663 (source
14664 (origin
14665 (method url-fetch)
14666 (uri (pypi-uri "twine" version))
14667 (sha256
14668 (base32
14669 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14670 (build-system python-build-system)
14671 (propagated-inputs
14672 `(("python-tqdm" ,python-tqdm)
14673 ("python-pkginfo" ,python-pkginfo)
14674 ("python-requests" ,python-requests)
14675 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14676 (home-page "https://github.com/pypa/twine")
14677 (synopsis "Collection of utilities for interacting with PyPI")
14678 (description
14679 "@code{twine} currently supports registering projects and uploading
14680distributions. It authenticates the user over HTTPS, allows them to pre-sign
14681their files and supports any packaging format (including wheels).")
14682 (license license:asl2.0)))
14683
14684(define-public python2-twine
14685 (package-with-python2 python-twine))
14686
14687(define-public python-linecache2
14688 (package
14689 (name "python-linecache2")
14690 (version "1.0.0")
14691 (source
14692 (origin
14693 (method url-fetch)
14694 (uri (pypi-uri "linecache2" version))
14695 (sha256
14696 (base32
14697 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14698 (build-system python-build-system)
14699 (arguments
14700 `(;; The tests depend on unittest2, and our version is a bit too old.
14701 #:tests? #f))
14702 (native-inputs
14703 `(("python-pbr" ,python-pbr-minimal)))
14704 (home-page
14705 "https://github.com/testing-cabal/linecache2")
14706 (synopsis "Backports of the linecache module")
14707 (description
14708 "The linecache module allows one to get any line from any file, while
14709attempting to optimize internally, using a cache, the common case where many
14710lines are read from a single file.")
14711 (license license:psfl)))
14712
14713(define-public python2-linecache2
14714 (package-with-python2 python-linecache2))
14715
14716(define-public python-traceback2
14717 (package
14718 (name "python-traceback2")
14719 (version "1.4.0")
14720 (source
14721 (origin
14722 (method url-fetch)
14723 (uri (pypi-uri "traceback2" version))
14724 (sha256
14725 (base32
14726 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14727 (build-system python-build-system)
14728 (arguments
14729 `(;; python-traceback2 and python-unittest2 depend on one another.
14730 #:tests? #f))
14731 (native-inputs
14732 `(("python-pbr" ,python-pbr-minimal)))
14733 (propagated-inputs
14734 `(("python-linecache2" ,python-linecache2)))
14735 (home-page
14736 "https://github.com/testing-cabal/traceback2")
14737 (synopsis "Backports of the traceback module")
14738 (description
14739 "This module provides a standard interface to extract, format and print
14740stack traces of Python programs. It exactly mimics the behavior of the Python
14741interpreter when it prints a stack trace.")
14742 (license license:psfl)))
14743
14744(define-public python2-traceback2
14745 (package-with-python2 python-traceback2))
14746
14747(define-public python-ratelimiter
14748 (package
14749 (name "python-ratelimiter")
14750 (version "1.2.0")
14751 (source
14752 (origin
14753 (method url-fetch)
14754 (uri (pypi-uri "ratelimiter" version))
14755 (sha256
14756 (base32
14757 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14758 (build-system python-build-system)
14759 (arguments
14760 '(#:tests? #f)) ; There are no tests in the pypi archive.
14761 (home-page "https://github.com/RazerM/ratelimiter")
14762 (synopsis "Simple rate limiting object")
14763 (description
14764 "The @code{ratelimiter} module ensures that an operation will not be
14765executed more than a given number of times during a given period.")
14766 (license license:asl2.0)))
14767
14768(define-public python2-ratelimiter
14769 (package-with-python2 python-ratelimiter))
14770
14771(define-public python-dukpy
14772 (package
14773 (name "python-dukpy")
14774 (version "0.3")
14775 (source
14776 (origin
5b77ebe1
TGR
14777 (method git-fetch)
14778 (uri (git-reference
14779 (url "https://github.com/kovidgoyal/dukpy.git")
14780 (commit (string-append "v" version))))
14781 (file-name (git-file-name name version))
44d10b1f 14782 (sha256
5b77ebe1 14783 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14784 (build-system python-build-system)
14785 (home-page "https://github.com/kovidgoyal/dukpy")
14786 (synopsis "Run JavaScript in python")
14787 (description
14788 "dukpy is a JavaScript runtime environment for Python using the duktape
14789embeddable JavaScript engine.")
14790 ;; Dukpy is licensed under MIT like the embedded duktape library,
14791 ;; with 'errors.c' as GPL3.
14792 (license (list license:expat license:gpl3))))
14793
14794(define-public python2-dukpy
14795 (package-with-python2 python-dukpy))
14796
14797(define-public python-jsonrpclib-pelix
14798 (package
14799 (name "python-jsonrpclib-pelix")
14800 (version "0.3.2")
14801 (source
14802 (origin
14803 (method url-fetch)
14804 (uri (pypi-uri "jsonrpclib-pelix" version))
14805 (sha256
14806 (base32
14807 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14808 (build-system python-build-system)
14809 (arguments
14810 `(#:tests? #f)) ; no tests in PyPI tarball
14811 (home-page "https://github.com/tcalmant/jsonrpclib/")
14812 (synopsis "JSON-RPC 2.0 client library for Python")
14813 (description
14814 "This library implements the JSON-RPC v2.0
14815specification (backwards-compatible) as a client library for Python. This
14816version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14817services.")
14818 (license license:asl2.0)))
14819
14820(define-public python2-jsonrpclib-pelix
14821 (package-with-python2 python-jsonrpclib-pelix))
14822
14823(define-public python-setuptools-scm-git-archive
14824 (package
14825 (name "python-setuptools-scm-git-archive")
14826 (version "1.0")
14827 (source
14828 (origin
14829 (method url-fetch)
14830 (uri (pypi-uri "setuptools_scm_git_archive" version))
14831 (sha256
14832 (base32
14833 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14834 (build-system python-build-system)
14835 (native-inputs
14836 `(("python-pytest" ,python-pytest)))
14837 (propagated-inputs
14838 `(("python-setuptools-scm" ,python-setuptools-scm)))
14839 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14840 (synopsis "Setuptools_scm plugin for git archives")
14841 (description
14842 "The setuptools_scm_git_archive package is a plugin to
14843setuptools_scm, which supports obtaining versions from git archives that
14844belong to tagged versions.")
14845 (license license:expat)))
14846
14847(define-public python2-setuptools-scm-git-archive
14848 (package-with-python2 python-setuptools-scm-git-archive))
14849
724a350c
RW
14850(define-public python-setuptools-git
14851 (package
14852 (name "python-setuptools-git")
14853 (version "1.2")
14854 (source
14855 (origin
14856 (method url-fetch)
14857 (uri (pypi-uri "setuptools-git" version))
14858 (sha256
14859 (base32
14860 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14861 (build-system python-build-system)
14862 (arguments
14863 `(#:phases
14864 (modify-phases %standard-phases
14865 ;; This is needed for tests.
14866 (add-after 'unpack 'configure-git
14867 (lambda _
14868 (setenv "HOME" "/tmp")
14869 (invoke "git" "config" "--global" "user.email" "guix")
14870 (invoke "git" "config" "--global" "user.name" "guix")
14871 #t)))))
14872 (native-inputs
14873 `(("git" ,git-minimal)))
14874 (home-page "https://github.com/msabramo/setuptools-git")
14875 (synopsis "Setuptools revision control system plugin for Git")
14876 (description
14877 "This package provides a plugin for Setuptools for revision control with
14878Git.")
14879 (license license:bsd-3)))
14880
44d10b1f
RW
14881(define-public python-pyclipper
14882 (package
14883 (name "python-pyclipper")
ff3d1b99 14884 (version "1.1.0.post3")
44d10b1f
RW
14885 (source
14886 (origin
14887 (method url-fetch)
14888 (uri (pypi-uri "pyclipper" version ".zip"))
14889 (sha256
ff3d1b99 14890 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14891 (modules '((guix build utils)))
14892 (snippet
14893 '(begin
14894 ;; This file is generated by Cython.
14895 (delete-file "pyclipper/pyclipper.cpp") #t))))
14896 (build-system python-build-system)
14897 (arguments
14898 `(#:phases
14899 (modify-phases %standard-phases
14900 (add-before 'build 'cythonize-sources
14901 (lambda _
14902 (with-directory-excursion "pyclipper"
14903 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14904 (propagated-inputs
14905 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14906 (native-inputs
14907 `(("python-cython" ,python-cython)
14908 ("python-pytest" ,python-pytest)
14909 ("python-pytest-runner" ,python-pytest-runner)
14910 ("python-unittest2" ,python-unittest2)
14911 ("unzip" ,unzip)))
14912 (home-page "https://github.com/greginvm/pyclipper")
14913 (synopsis "Wrapper for Angus Johnson's Clipper library")
14914 (description
14915 "Pyclipper is a Cython wrapper for the C++ translation of the
14916Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14917 (license license:expat)))
14918
14919(define-public python2-pyclipper
14920 (package-with-python2 python-pyclipper))
14921
14922(define-public python2-booleanoperations
14923 (package
14924 (name "python2-booleanoperations")
14925 (version "0.7.1")
14926 (source
14927 (origin
14928 (method url-fetch)
14929 (uri (pypi-uri "booleanOperations" version ".zip"))
14930 (sha256
14931 (base32
14932 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14933 (build-system python-build-system)
14934 (arguments
14935 `(#:python ,python-2))
14936 (native-inputs
14937 `(("unzip" ,unzip)
14938 ("python2-pytest" ,python2-pytest)
14939 ("python2-pytest-runner" ,python2-pytest-runner)))
14940 (propagated-inputs
14941 `(("python-fonttools" ,python2-fonttools)
14942 ("python-pyclipper" ,python2-pyclipper)
14943 ("python-ufolib" ,python2-ufolib)))
14944 (home-page "https://github.com/typemytype/booleanOperations")
14945 (synopsis "Boolean operations on paths")
14946 (description
14947 "BooleanOperations provides a Python library that enables
14948boolean operations on paths.")
14949 (license license:expat)))
14950
14951(define-public python-tempdir
14952 (package
14953 (name "python-tempdir")
14954 (version "0.7.1")
14955 (source
14956 (origin
14957 (method url-fetch)
14958 (uri (pypi-uri "tempdir" version))
14959 (sha256
14960 (base32
14961 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14962 (build-system python-build-system)
14963 (home-page "https://pypi.org/project/tempdir/")
14964 (arguments
14965 ;; the package has no tests
14966 '(#:tests? #f))
14967 (synopsis "Python library for managing temporary directories")
14968 (description
14969 "This library manages temporary directories that are automatically
14970deleted with all their contents when they are no longer needed. It is
14971particularly convenient for use in tests.")
14972 (license license:expat)))
14973
14974(define-public python2-tempdir
14975 (package-with-python2 python-tempdir))
14976
14977(define-public python-activepapers
14978 (package
14979 (name "python-activepapers")
14980 (version "0.2.2")
14981 (source
14982 (origin
14983 (method url-fetch)
14984 (uri (pypi-uri "ActivePapers.Py" version))
14985 (sha256
14986 (base32
14987 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14988 (build-system python-build-system)
14989 (arguments
14990 `(#:modules ((ice-9 ftw)
14991 (srfi srfi-1)
14992 (guix build utils)
14993 (guix build python-build-system))
14994
14995 #:phases
14996 (modify-phases %standard-phases
14997 (add-after 'unpack 'delete-python2-code
14998 (lambda _
14999 (for-each delete-file
15000 '("lib/activepapers/builtins2.py"
15001 "lib/activepapers/standardlib2.py"
15002 "lib/activepapers/utility2.py"))))
15003 (replace 'check
15004 (lambda _
15005 ;; Deactivate the test cases that download files
15006 (setenv "NO_NETWORK_ACCESS" "1")
15007 ;; For some strange reason, some tests fail if nosetests runs all
15008 ;; test modules in a single execution. They pass if each test
15009 ;; module is run individually.
15010 (for-each (lambda (filename)
15011 (invoke "nosetests"
15012 (string-append "tests/" filename)))
15013 (scandir "tests"
15014 (lambda (filename)
15015 (string-suffix? ".py" filename)))))))))
15016 (native-inputs
15017 `(("python-tempdir" ,python-tempdir)
15018 ("python-nose" ,python-nose)))
15019 (propagated-inputs
15020 `(("python-h5py" ,python-h5py)))
26827dfe 15021 (home-page "https://www.activepapers.org/")
44d10b1f
RW
15022 (synopsis "Executable papers for scientific computing")
15023 (description
15024 "ActivePapers is a tool for working with executable papers, which
15025combine data, code, and documentation in single-file packages,
15026suitable for publication as supplementary material or on repositories
15027such as figshare or Zenodo.")
15028 (properties `((python2-variant . ,(delay python2-activepapers))))
15029 (license license:bsd-3)))
15030
15031(define-public python2-activepapers
15032 (let ((base (package-with-python2
15033 (strip-python2-variant python-activepapers))))
15034 (package
15035 (inherit base)
15036 (arguments
15037 (substitute-keyword-arguments (package-arguments base)
15038 ((#:phases phases)
15039 `(modify-phases ,phases
15040 (delete 'delete-python2-code)
15041 (add-after 'unpack 'delete-python3-code
15042 (lambda _
15043 (for-each delete-file
15044 '("lib/activepapers/builtins3.py"
15045 "lib/activepapers/standardlib3.py"
15046 "lib/activepapers/utility3.py")))))))))))
15047
15048(define-public python-semver
15049 (package
15050 (name "python-semver")
594280b1 15051 (version "2.9.0")
44d10b1f 15052 (source
2ecbba24
BG
15053 (origin
15054 (method url-fetch)
15055 (uri (pypi-uri "semver" version))
15056 (sha256
15057 (base32
15058 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
44d10b1f 15059 (build-system python-build-system)
44d10b1f 15060 (native-inputs
b4e1ca06
RJ
15061 `(("python-appdirs" ,python-appdirs)
15062 ("python-distlib" ,python-distlib)
15063 ("python-importlib-metadata" ,python-importlib-metadata)
15064 ("python-filelock" ,python-filelock)
15065 ("python-six" ,python-six)
15066 ("python-tox" ,python-tox)
44d10b1f
RW
15067 ("python-virtualenv" ,python-virtualenv)))
15068 (home-page "https://github.com/k-bx/python-semver")
15069 (synopsis "Python helper for Semantic Versioning")
15070 (description "This package provides a Python library for
15071@url{Semantic Versioning, http://semver.org/}.")
15072 (license license:bsd-3)))
15073
15074(define-public python2-semver
15075 (package-with-python2 python-semver))
15076
15077(define-public python-pyro4
15078 (package
15079 (name "python-pyro4")
3ce91d44 15080 (version "4.77")
44d10b1f
RW
15081 (source
15082 (origin
15083 (method url-fetch)
15084 (uri (pypi-uri "Pyro4" version))
15085 (sha256
3ce91d44 15086 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 15087 (build-system python-build-system)
3ce91d44
GL
15088 (arguments
15089 '(#:tests? #f)) ;FIXME: Some tests require network access.
15090 (native-inputs
15091 `(("python-cloudpickle" ,python-cloudpickle)
15092 ("python-dill" ,python-dill)
15093 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
15094 (propagated-inputs
15095 `(("python-serpent" ,python-serpent)))
15096 (home-page "https://pyro4.readthedocs.io")
15097 (synopsis "Distributed object middleware for Python")
15098 (description
15099 "Pyro enables you to build applications in which objects can talk to each
15100other over the network. You can just use normal Python method calls to call
15101objects on other machines, also known as remote procedure calls (RPC).")
15102 (license license:expat)))
15103
15104(define-public python2-pyro
15105 (package
15106 (name "python2-pyro")
15107 (version "3.16")
15108 (source
15109 (origin
15110 (method url-fetch)
15111 (uri (pypi-uri "Pyro" version))
15112 (file-name (string-append "Pyro-" version ".tar.gz"))
15113 (sha256
15114 (base32
15115 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
15116 (build-system python-build-system)
15117 (arguments
15118 ;; Pyro is not compatible with Python 3
15119 `(#:python ,python-2
15120 ;; Pyro has no test cases for automatic execution
15121 #:tests? #f))
15122 (home-page "http://pythonhosted.org/Pyro/")
15123 (synopsis "Distributed object manager for Python")
15124 (description "Pyro is a Distributed Object Technology system
15125written in Python that is designed to be easy to use. It resembles
15126Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
15127which is a system and language independent Distributed Object Technology
15128and has much more to offer than Pyro or RMI. Pyro 3.x is no
15129longer maintained. New projects should use Pyro4 instead, which
15130is the new Pyro version that is actively developed.")
15131 (license license:expat)))
15132
15133(define-public python2-scientific
15134 (package
15135 (name "python2-scientific")
15136 (version "2.9.4")
15137 (source
15138 (origin
c695f011
KH
15139 (method git-fetch)
15140 (uri (git-reference
15141 (url "https://github.com/khinsen/ScientificPython")
15142 (commit (string-append "rel" version))))
15143 (file-name (git-file-name name version))
44d10b1f
RW
15144 (sha256
15145 (base32
c695f011 15146 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
15147 (build-system python-build-system)
15148 (inputs
15149 `(("netcdf" ,netcdf)))
15150 (propagated-inputs
15151 `(("python-numpy" ,python2-numpy-1.8)
15152 ("python-pyro" ,python2-pyro)))
15153 (arguments
15154 ;; ScientificPython is not compatible with Python 3
15155 `(#:python ,python-2
15156 #:tests? #f ; No test suite
15157 #:phases
15158 (modify-phases %standard-phases
15159 (replace 'build
15160 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
15161 (invoke "python" "setup.py" "build"
15162 (string-append "--netcdf_prefix="
15163 (assoc-ref inputs "netcdf"))))))))
c695f011 15164 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
15165 (synopsis "Python modules for scientific computing")
15166 (description "ScientificPython is a collection of Python modules that are
15167useful for scientific computing. Most modules are rather general (Geometry,
15168physical units, automatic derivatives, ...) whereas others are more
15169domain-specific (e.g. netCDF and PDB support). The library is currently
15170not actively maintained and works only with Python 2 and NumPy < 1.9.")
15171 (license license:cecill-c)))
15172
15173(define-public python2-mmtk
15174 (package
15175 (name "python2-mmtk")
fe9b72c5 15176 (version "2.7.12")
44d10b1f
RW
15177 (source
15178 (origin
fe9b72c5
KH
15179 (method git-fetch)
15180 (uri (git-reference
15181 (url "https://github.com/khinsen/MMTK")
15182 (commit (string-append "rel" version))))
15183 (file-name (git-file-name name version))
44d10b1f
RW
15184 (sha256
15185 (base32
fe9b72c5 15186 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
15187 (build-system python-build-system)
15188 (native-inputs
15189 `(("netcdf" ,netcdf)))
15190 (propagated-inputs
15191 `(("python-scientific" ,python2-scientific)
15192 ("python-tkinter" ,python-2 "tk")))
15193 (arguments
15194 `(#:python ,python-2
15195 #:tests? #f
15196 #:phases
15197 (modify-phases %standard-phases
15198 (add-before 'build 'includes-from-scientific
15199 (lambda* (#:key inputs #:allow-other-keys)
15200 (mkdir-p "Include/Scientific")
15201 (copy-recursively
15202 (string-append
15203 (assoc-ref inputs "python-scientific")
15204 "/include/python2.7/Scientific")
15205 "Include/Scientific"))))))
15206 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
15207 (synopsis "Python library for molecular simulation")
15208 (description "MMTK is a library for molecular simulations with an emphasis
15209on biomolecules. It provides widely used methods such as Molecular Dynamics
15210and normal mode analysis, but also basic routines for implementing new methods
15211for simulation and analysis. The library is currently not actively maintained
15212and works only with Python 2 and NumPy < 1.9.")
15213 (license license:cecill-c)))
15214
15215(define-public python-phonenumbers
15216 (package
15217 (name "python-phonenumbers")
15218 (version "8.9.1")
15219 (source
15220 (origin
15221 (method url-fetch)
15222 (uri (pypi-uri "phonenumbers" version))
15223 (sha256
15224 (base32
15225 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
15226 (build-system python-build-system)
15227 (home-page
15228 "https://github.com/daviddrysdale/python-phonenumbers")
15229 (synopsis
15230 "Python library for dealing with international phone numbers")
15231 (description
15232 "This package provides a Python port of Google's libphonenumber library.")
15233 (license license:asl2.0)))
15234
15235(define-public python2-phonenumbers
15236 (package-with-python2 python-phonenumbers))
15237
15238(define-public python-send2trash
15239 (package
15240 (name "python-send2trash")
d9b0216b 15241 (version "1.5.0")
44d10b1f 15242 (source
d9b0216b 15243 (origin (method git-fetch)
44d10b1f 15244 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
15245 (uri (git-reference
15246 (url "https://github.com/hsoft/send2trash.git")
15247 (commit version)))
15248 (file-name (git-file-name name version))
44d10b1f
RW
15249 (sha256
15250 (base32
d9b0216b 15251 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
15252 (build-system python-build-system)
15253 (arguments
15254 '(#:phases
15255 (modify-phases %standard-phases
15256 (add-before 'check 'pre-check
15257 (lambda _
15258 (mkdir-p "/tmp/foo")
15259 (setenv "HOME" "/tmp/foo")
15260 #t)))))
15261 (home-page "https://github.com/hsoft/send2trash")
15262 (synopsis "Send files to the user's @file{~/Trash} directory")
15263 (description "This package provides a Python library to send files to the
15264user's @file{~/Trash} directory.")
20b3fde7 15265 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
15266 (license license:bsd-3)))
15267
15268(define-public python2-send2trash
15269 (package
f32164ab 15270 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
15271 (arguments
15272 (substitute-keyword-arguments (package-arguments python-send2trash)
15273 ((#:phases phases)
15274 `(modify-phases ,phases
15275 (add-before 'check 'setenv
15276 (lambda _
15277 (setenv "PYTHONPATH"
15278 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 15279 #t))))))))
44d10b1f
RW
15280
15281(define-public python-yapf
15282 (package
15283 (name "python-yapf")
19ba75dc 15284 (version "0.29.0")
44d10b1f
RW
15285 (source
15286 (origin
15287 (method url-fetch)
15288 (uri (pypi-uri "yapf" version))
15289 (sha256
15290 (base32
19ba75dc 15291 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
44d10b1f
RW
15292 (build-system python-build-system)
15293 (home-page "https://github.com/google/yapf")
15294 (synopsis "Formatter for Python code")
15295 (description "YAPF is a formatter for Python code. It's based off of
15296@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
15297takes the code and reformats it to the best formatting that conforms to the
15298style guide, even if the original code didn't violate the style guide.")
15299 (license license:asl2.0)))
15300
15301(define-public python2-yapf
15302 (package-with-python2 python-yapf))
15303
15304(define-public python-gyp
15305 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
15306 (revision "0"))
15307 (package
15308 (name "python-gyp")
15309 ;; Google does not release versions,
15310 ;; based on second most recent commit date.
15311 (version (git-version "0.0.0" revision commit))
15312 (source
15313 (origin
15314 ;; Google does not release tarballs,
15315 ;; git checkout is needed.
15316 (method git-fetch)
15317 (uri (git-reference
15318 (url "https://chromium.googlesource.com/external/gyp")
15319 (commit commit)))
15320 (file-name (git-file-name name version))
15321 (sha256
15322 (base32
15323 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
15324 (build-system python-build-system)
15325 (home-page "https://gyp.gsrc.io/")
15326 (synopsis "GYP is a Meta-Build system")
15327 (description
15328 "GYP builds build systems for large, cross platform applications.
15329It can be used to generate XCode projects, Visual Studio projects, Ninja build
15330files, and Makefiles.")
15331 (license license:bsd-3))))
15332
15333(define-public python2-gyp
15334 (package-with-python2 python-gyp))
15335
15336(define-public python-whatever
15337 (package
15338 (name "python-whatever")
97610a66 15339 (version "0.6")
44d10b1f
RW
15340 (source
15341 (origin
ac0ea38c
EF
15342 (method git-fetch)
15343 (uri (git-reference
15344 (url "https://github.com/Suor/whatever")
15345 (commit version)))
15346 (file-name (git-file-name name version))
44d10b1f 15347 (sha256
ac0ea38c 15348 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
44d10b1f
RW
15349 (build-system python-build-system)
15350 (arguments
15351 `(#:phases
15352 (modify-phases %standard-phases
15353 (replace 'check
15354 (lambda _
15355 (invoke "py.test"))))))
15356 (native-inputs
15357 `(("python-pytest" ,python-pytest)))
15358 (home-page "http://github.com/Suor/whatever")
15359 (synopsis "Make anonymous functions by partial application of operators")
15360 (description "@code{whatever} provides an easy way to make anonymous
15361functions by partial application of operators.")
15362 (license license:bsd-3)))
15363
15364(define-public python2-whatever
15365 (package-with-python2 python-whatever))
15366
15367(define-public python-funcy
15368 (package
15369 (name "python-funcy")
9e396ab8 15370 (version "1.11")
44d10b1f
RW
15371 (source
15372 (origin
a85c6027
TGR
15373 (method git-fetch)
15374 (uri (git-reference
15375 (url "https://github.com/Suor/funcy.git")
15376 (commit version)))
44d10b1f 15377 (sha256
a85c6027
TGR
15378 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
15379 (file-name (git-file-name name version))))
44d10b1f
RW
15380 (build-system python-build-system)
15381 (arguments
15382 `(#:phases
15383 (modify-phases %standard-phases
15384 (replace 'check
15385 (lambda _
15386 (invoke "py.test"))))))
15387 (native-inputs
15388 `(("python-pytest" ,python-pytest)
15389 ("python-whatever" ,python-whatever)))
15390 (home-page "http://github.com/Suor/funcy")
15391 (synopsis "Functional tools")
15392 (description "@code{funcy} is a library that provides functional tools.
15393Examples are:
15394@enumerate
15395@item merge - Merges collections of the same type
15396@item walk - Type-preserving map
15397@item select - Selects a part of a collection
15398@item take - Takes the first n items of a collection
15399@item first - Takes the first item of a collection
15400@item remove - Predicated-removes items of a collection
15401@item concat - Concatenates two collections
15402@item flatten - Flattens a collection with subcollections
15403@item distinct - Returns only distinct items
15404@item split - Predicated-splits a collection
15405@item split_at - Splits a collection at a given item
15406@item group_by - Groups items by group
15407@item pairwise - Pairs off adjacent items
15408@item partial - Partially-applies a function
15409@item curry - Curries a function
15410@item compose - Composes functions
15411@item complement - Complements a predicate
15412@item all_fn - \"all\" with predicate
15413@end enumerate")
15414 (license license:bsd-3)))
15415
15416(define-public python2-funcy
15417 (package-with-python2 python-funcy))
15418
15419(define-public python-isoweek
15420 (package
15421 (name "python-isoweek")
15422 (version "1.3.3")
15423 (source
15424 (origin
15425 (method url-fetch)
15426 (uri (pypi-uri "isoweek" version))
15427 (sha256
15428 (base32
15429 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
15430 (build-system python-build-system)
15431 (home-page "https://github.com/gisle/isoweek")
15432 (synopsis "Objects representing a week")
15433 (description "The @code{isoweek} module provide the class Week that
15434implements the week definition of ISO 8601. This standard also defines
15435a notation for identifying weeks; yyyyWww (where the W is a literal).
15436Week instances stringify to this form.")
15437 (license license:bsd-3)))
15438
15439(define-public python2-isoweek
15440 (package-with-python2 python-isoweek))
15441
15442(define-public python-tokenize-rt
15443 (package
15444 (name "python-tokenize-rt")
15445 (version "2.0.1")
15446 (source
15447 (origin
15448 (method url-fetch)
15449 (uri (pypi-uri "tokenize-rt" version))
15450 (sha256
15451 (base32
15452 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
15453 (build-system python-build-system)
15454 (home-page "https://github.com/asottile/tokenize-rt")
15455 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
15456 (description
15457 "This Python library is a wrapper around @code{tokenize} from the Python
15458standard library. It provides two additional tokens @code{ESCAPED_NL} and
15459@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
15460and @code{tokens_to_src} to roundtrip.")
15461 (license license:expat)))
15462
15463(define-public python-future-fstrings
15464 (package
15465 (name "python-future-fstrings")
15466 (version "0.4.1")
15467 (source
15468 (origin
15469 (method url-fetch)
15470 (uri (pypi-uri "future_fstrings" version))
15471 (sha256
15472 (base32
15473 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
15474 (build-system python-build-system)
15475 (propagated-inputs
15476 `(("python-tokenize-rt" ,python-tokenize-rt)))
15477 (home-page "https://github.com/asottile/future-fstrings")
15478 (synopsis "Backport of fstrings to Python < 3.6")
15479 (description
15480 "This package provides a UTF-8 compatible encoding
15481@code{future_fstrings}, which performs source manipulation. It decodes the
15482source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
15483@code{f} strings.")
15484 (license license:expat)))
15485
dae2eb1c
MC
15486(define-public python-typed-ast
15487 (package
15488 (name "python-typed-ast")
bae89583 15489 (version "1.4.0")
dae2eb1c
MC
15490 (source
15491 (origin
bae89583
MO
15492 (method git-fetch)
15493 (uri (git-reference
15494 (url "https://github.com/python/typed_ast.git")
15495 (commit version)))
dae2eb1c 15496 (sha256
bae89583
MO
15497 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
15498 (file-name (git-file-name name version))))
dae2eb1c
MC
15499 (build-system python-build-system)
15500 (arguments
15501 `(#:modules ((guix build utils)
15502 (guix build python-build-system)
15503 (ice-9 ftw)
15504 (srfi srfi-1)
15505 (srfi srfi-26))
15506 #:phases
15507 (modify-phases %standard-phases
15508 (replace 'check
15509 (lambda _
15510 (let ((cwd (getcwd)))
15511 (setenv "PYTHONPATH"
15512 (string-append cwd "/build/"
15513 (find (cut string-prefix? "lib" <>)
15514 (scandir (string-append cwd "/build")))
15515 ":"
15516 (getenv "PYTHONPATH"))))
15517 (invoke "pytest")
15518 #t)))))
15519 (native-inputs `(("python-pytest" ,python-pytest)))
15520 (home-page "https://github.com/python/typed_ast")
15521 (synopsis "Fork of Python @code{ast} modules with type comment support")
15522 (description "This package provides a parser similar to the standard
15523@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
15524include PEP 484 type comments and are independent of the version of Python
15525under which they are run. The @code{typed_ast} parsers produce the standard
15526Python AST (plus type comments), and are both fast and correct, as they are
15527based on the CPython 2.7 and 3.7 parsers.")
15528 ;; See the file "LICENSE" for the details.
15529 (license (list license:psfl
15530 license:asl2.0
15531 license:expat)))) ;ast27/Parser/spark.py
15532
44d10b1f
RW
15533(define-public python-typing
15534 (package
15535 (name "python-typing")
15536 (version "3.6.6")
15537 (source
15538 (origin
15539 (method url-fetch)
15540 (uri (pypi-uri "typing" version))
15541 (sha256
15542 (base32
15543 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
15544 (build-system python-build-system)
15545 (home-page "https://docs.python.org/3/library/typing.html")
15546 (synopsis "Type hints for Python")
15547 (description "This is a backport of the standard library @code{typing}
15548module to Python versions older than 3.5. Typing defines a standard notation
15549for Python function and variable type annotations. The notation can be used
15550for documenting code in a concise, standard format, and it has been designed
15551to also be used by static and runtime type checkers, static analyzers, IDEs
15552and other tools.")
15553 (license license:psfl)))
15554
15555(define-public python2-typing
15556 (package-with-python2 python-typing))
15557
f89d443b
VC
15558(define-public python-typing-extensions
15559 (package
15560 (name "python-typing-extensions")
15561 (version "3.7.2")
15562 (source
15563 (origin
15564 (method url-fetch)
15565 (uri (pypi-uri "typing_extensions" version))
15566 (sha256
15567 (base32
15568 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
15569 (build-system python-build-system)
15570 (home-page
15571 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
15572 (synopsis "Experimental type hints for Python")
15573 (description
15574 "The typing_extensions module contains additional @code{typing} hints not
15575yet present in the of the @code{typing} standard library.
15576Included are implementations of:
15577@enumerate
15578@item ClassVar
15579@item ContextManager
15580@item Counter
15581@item DefaultDict
15582@item Deque
15583@item NewType
15584@item NoReturn
15585@item overload
15586@item Protocol
15587@item runtime
15588@item Text
15589@item Type
15590@item TYPE_CHECKING
15591@item AsyncGenerator
15592@end enumerate\n")
15593 (license license:psfl)))
15594
44d10b1f
RW
15595(define-public bpython
15596 (package
15597 (name "bpython")
4de93b2f 15598 (version "0.18")
44d10b1f
RW
15599 (source
15600 (origin
15601 (method url-fetch)
15602 (uri (pypi-uri "bpython" version))
15603 (sha256
4de93b2f 15604 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
15605 (build-system python-build-system)
15606 (arguments
15607 `(#:phases
15608 (modify-phases %standard-phases
15609 (add-after 'unpack 'remove-failing-test
15610 (lambda _
15611 ;; Remove failing test. FIXME: make it pass
15612 (delete-file "bpython/test/test_args.py")
15613 #t))
15614 (add-after 'wrap 'add-aliases
15615 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15616 (lambda* (#:key outputs #:allow-other-keys)
15617 (let ((out (assoc-ref outputs "out")))
15618 (for-each
15619 (lambda (old new)
15620 (symlink old (string-append out "/bin/" new)))
15621 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
15622 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
15623 #t)))))
15624 (propagated-inputs
15625 `(("python-pygments" ,python-pygments)
15626 ("python-requests" ,python-requests)
4de93b2f 15627 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
15628 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
15629 ("python-greenlet" ,python-greenlet)
4de93b2f 15630 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
15631 ("python-six" ,python-six)))
15632 (native-inputs
15633 `(("python-sphinx" ,python-sphinx)
15634 ("python-mock" ,python-mock)))
15635 (home-page "https://bpython-interpreter.org/")
15636 (synopsis "Fancy interface to the Python interpreter")
15637 (description "Bpython is a fancy interface to the Python
15638interpreter. bpython's main features are
15639
15640@enumerate
15641@item in-line syntax highlighting,
15642@item readline-like autocomplete with suggestions displayed as you type,
15643@item expected parameter list for any Python function,
15644@item \"rewind\" function to pop the last line of code from memory and
15645 re-evaluate,
15646@item send the code you've entered off to a pastebin,
15647@item save the code you've entered to a file, and
15648@item auto-indentation.
15649@end enumerate")
15650 (license license:expat)))
15651
15652(define-public bpython2
15653 (let ((base (package-with-python2
15654 (strip-python2-variant bpython))))
15655 (package (inherit base)
15656 (name "bpython2")
15657 (arguments
15658 `(#:python ,python-2
15659 #:phases
15660 (modify-phases %standard-phases
15661 (add-after 'unpack 'remove-failing-test
15662 (lambda _
15663 ;; Remove failing test. FIXME: make it pass
15664 (delete-file "bpython/test/test_args.py")
15665 ;; Disable failing test-cases (renaming inhibits they are
15666 ;; discovered)
15667 (substitute* "bpython/test/test_curtsies_repl.py"
15668 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15669 (string-append a "xxx_off_" b))
15670 (("^(\\s*def )(test_complex\\W)" _ a b)
15671 (string-append a "xxx_off_" b)))
15672 #t))
15673 (add-before 'build 'rename-scripts
15674 ;; rename the scripts to bypthon2, bpdb2, etc.
15675 (lambda _
15676 (substitute* "setup.py"
15677 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15678 (string-append name "2" rest "\n"))
15679 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15680 (string-append name "2" (or sub "") rest "\n")))
15681 #t))))))))
15682
15683(define-public python-pyinotify
15684 (package
15685 (name "python-pyinotify")
15686 (version "0.9.6")
15687 (source (origin
15688 (method url-fetch)
15689 (uri (pypi-uri "pyinotify" version))
15690 (sha256
15691 (base32
15692 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15693 (build-system python-build-system)
15694 (arguments `(#:tests? #f)) ;no tests
15695 (home-page "https://github.com/seb-m/pyinotify")
15696 (synopsis "Python library for monitoring inotify events")
15697 (description
15698 "@code{pyinotify} provides a Python interface for monitoring
15699file system events on Linux.")
15700 (license license:expat)))
15701
15702(define-public python2-pyinotify
15703 (package-with-python2 python-pyinotify))
15704
15705;; Ada parser uses this version.
15706(define-public python2-quex-0.67.3
15707 (package
15708 (name "python2-quex")
15709 (version "0.67.3")
15710 (source
15711 (origin
15712 (method url-fetch)
15713 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15714 (version-major+minor version)
15715 "/quex-" version ".zip"))
15716 (sha256
15717 (base32
15718 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15719 (build-system python-build-system)
15720 (native-inputs
15721 `(("unzip" ,unzip)))
15722 (arguments
15723 `(#:python ,python-2
15724 #:tests? #f
15725 #:phases
15726 (modify-phases %standard-phases
15727 (delete 'configure)
15728 (delete 'build)
15729 (replace 'install
15730 (lambda* (#:key outputs #:allow-other-keys)
15731 (let* ((out (assoc-ref outputs "out"))
15732 (share/quex (string-append out "/share/quex"))
15733 (bin (string-append out "/bin")))
15734 (copy-recursively "." share/quex)
15735 (mkdir-p bin)
15736 (symlink (string-append share/quex "/quex-exe.py")
15737 (string-append bin "/quex"))
15738 #t))))))
15739 (native-search-paths
15740 (list (search-path-specification
15741 (variable "QUEX_PATH")
15742 (files '("share/quex")))))
15743 (home-page "http://quex.sourceforge.net/")
15744 (synopsis "Lexical analyzer generator in Python")
15745 (description "@code{quex} is a lexical analyzer generator in Python.")
15746 (license license:lgpl2.1+))) ; Non-military
15747
15748(define-public python2-quex
15749 (package (inherit python2-quex-0.67.3)
15750 (name "python2-quex")
15751 (version "0.68.1")
15752 (source
15753 (origin
15754 (method url-fetch)
15755 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15756 (sha256
15757 (base32
15758 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15759 (file-name (string-append name "-" version ".tar.gz"))))))
15760
15761(define-public python-more-itertools
15762 (package
15763 (name "python-more-itertools")
1b066827 15764 (version "7.1.0")
44d10b1f
RW
15765 (source
15766 (origin
15767 (method url-fetch)
15768 (uri (pypi-uri "more-itertools" version))
15769 (sha256
15770 (base32
1b066827 15771 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15772 (build-system python-build-system)
44d10b1f
RW
15773 (home-page "https://github.com/erikrose/more-itertools")
15774 (synopsis "More routines for operating on iterables, beyond itertools")
15775 (description "Python's built-in @code{itertools} module implements a
15776number of iterator building blocks inspired by constructs from APL, Haskell,
15777and SML. @code{more-itertools} includes additional building blocks for
15778working with iterables.")
47f66348 15779 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15780 (license license:expat)))
15781
47f66348 15782;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15783(define-public python2-more-itertools
47f66348
MB
15784 (package
15785 (inherit python-more-itertools)
15786 (name "python2-more-itertools")
15787 (version "5.0.0")
15788 (source (origin
15789 (method url-fetch)
15790 (uri (pypi-uri "more-itertools" version))
15791 (sha256
15792 (base32
15793 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15794 (arguments
15795 `(#:python ,python2-minimal))
15796 (propagated-inputs
15797 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15798
15799(define-public python-latexcodec
15800 (package
15801 (name "python-latexcodec")
f3415ba5 15802 (version "1.0.7")
44d10b1f
RW
15803 (source
15804 (origin
15805 (method url-fetch)
15806 (uri (pypi-uri "latexcodec" version))
15807 (sha256
f3415ba5 15808 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15809 (build-system python-build-system)
15810 (inputs
15811 `(("python-six" ,python-six)))
15812 (home-page "https://readthedocs.org/projects/latexcodec/")
15813 (synopsis "Work with LaTeX code in Python")
15814 (description "Lexer and codec to work with LaTeX code in Python.")
15815 (license license:expat)))
15816
15817(define-public python-pybtex
15818 (package
15819 (name "python-pybtex")
9441a9c1 15820 (version "0.22.2")
44d10b1f
RW
15821 (source
15822 (origin
15823 (method url-fetch)
15824 (uri (pypi-uri "pybtex" version))
15825 (sha256
9441a9c1 15826 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15827 (build-system python-build-system)
15828 (native-inputs
15829 `(("python-nose" ,python-nose)))
15830 (inputs
15831 `(("python-latexcodec" ,python-latexcodec)
15832 ("python-pyyaml" ,python-pyyaml)
15833 ("python-six" ,python-six)))
15834 (arguments
15835 `(#:test-target "nosetests"))
15836 (home-page "https://pybtex.org/")
15837 (synopsis "BibTeX-compatible bibliography processor")
15838 (description "Pybtex is a BibTeX-compatible bibliography processor written
15839in Python. You can simply type pybtex instead of bibtex.")
15840 (license license:expat)))
15841
15842(define-public python-onetimepass
15843 (package
15844 (name "python-onetimepass")
15845 (version "1.0.1")
15846 (source
15847 (origin
15848 (method url-fetch)
15849 (uri (pypi-uri "onetimepass" version))
15850 (sha256
15851 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15852 (build-system python-build-system)
15853 (propagated-inputs `(("python-six" ,python-six)))
15854 (home-page "https://github.com/tadeck/onetimepass/")
15855 (synopsis "One-time password library")
15856 (description "Python one-time password library for HMAC-based (HOTP) and
15857time-based (TOTP) passwords.")
15858 (license license:expat)))
15859
15860(define-public python-parso
15861 (package
15862 (name "python-parso")
a4abed71 15863 (version "0.6.2")
44d10b1f
RW
15864 (source
15865 (origin
15866 (method url-fetch)
15867 (uri (pypi-uri "parso" version))
15868 (sha256
15869 (base32
a4abed71 15870 "0mr1j4ijqnrihz1yap34g6i8vjldg5lz814sz4v0d8pbqvh5jmhc"))))
44d10b1f
RW
15871 (native-inputs
15872 `(("python-pytest" ,python-pytest)))
15873 (build-system python-build-system)
4eb97c25
MC
15874 (arguments
15875 `(#:phases (modify-phases %standard-phases
15876 (replace 'check
15877 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15878 (home-page "https://github.com/davidhalter/parso")
15879 (synopsis "Python Parser")
15880 (description "Parso is a Python parser that supports error recovery and
15881round-trip parsing for different Python versions (in multiple Python versions).
15882Parso is also able to list multiple syntax errors in your Python file.")
15883 (license license:expat)))
15884
15885(define-public python2-parso
15886 (package-with-python2 python-parso))
15887
15888(define-public python-async-generator
15889 (package
15890 (name "python-async-generator")
94fcbf8d 15891 (version "1.10")
44d10b1f
RW
15892 (source
15893 (origin
15894 (method url-fetch)
15895 (uri (pypi-uri "async_generator" version))
15896 (sha256
15897 (base32
94fcbf8d 15898 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15899 (build-system python-build-system)
15900 (native-inputs
15901 `(("python-pytest" ,python-pytest)))
15902 (home-page "https://github.com/python-trio/async_generator")
15903 (synopsis "Async generators and context managers for Python 3.5+")
15904 (description "@code{async_generator} back-ports Python 3.6's native async
15905generators and Python 3.7's context managers into Python 3.5.")
15906 ;; Dual licensed.
15907 (license (list license:expat license:asl2.0))))
15908
15909(define-public python-async-timeout
15910 (package
15911 (name "python-async-timeout")
15912 (version "3.0.1")
15913 (source
15914 (origin
15915 (method url-fetch)
15916 (uri (pypi-uri "async-timeout" version))
15917 (sha256
15918 (base32
15919 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15920 (build-system python-build-system)
15921 (home-page "https://github.com/aio-libs/async_timeout/")
15922 (synopsis "Timeout context manager for asyncio programs")
15923 (description "@code{async-timeout} provides a timeout timeout context
15924manager compatible with @code{asyncio}.")
15925 (license license:asl2.0)))
15926
15927(define-public python-glob2
15928 (package
15929 (name "python-glob2")
4df49d19 15930 (version "0.7")
8fa2bcc7
TGR
15931 (source
15932 (origin
15933 (method git-fetch)
15934 (uri (git-reference
15935 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15936 (commit (string-append "v" version))))
8fa2bcc7
TGR
15937 (file-name (git-file-name name version))
15938 (sha256
4df49d19 15939 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15940 (build-system python-build-system)
15941 (home-page "https://github.com/miracle2k/python-glob2/")
15942 (synopsis "Extended Version of the python buildin glob module")
15943 (description "This is an extended version of the Python
15944@url{http://docs.python.org/library/glob.html, built-in glob module} which
15945adds:
15946
15947@itemize
15948@item The ability to capture the text matched by glob patterns, and return
15949those matches alongside the file names.
15950@item A recursive @code{**} globbing syntax, akin for example to the
15951@code{globstar} option of Bash.
15952@item The ability to replace the file system functions used, in order to glob
15953on virtual file systems.
15954@item Compatible with Python 2 and Python 3 (tested with 3.3).
15955@end itemize
15956
15957Glob2 currently based on the glob code from Python 3.3.1.")
15958 (license license:bsd-2)))
15959
15960(define-public python2-glob2
15961 (package-with-python2 python-glob2))
15962
15963(define-public python-gipc
15964 (package
15965 (name "python-gipc")
15966 (version "0.6.0")
15967 (source
15968 (origin
15969 (method url-fetch)
15970 (uri (pypi-uri "gipc" version ".zip"))
15971 (sha256
15972 (base32
15973 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15974 (build-system python-build-system)
15975 (native-inputs
15976 `(("unzip" ,unzip)))
15977 (propagated-inputs
15978 `(("python-gevent" ,python-gevent)))
fd3ae040 15979 (home-page "https://gehrcke.de/gipc/")
44d10b1f
RW
15980 (synopsis "Child process management in the context of gevent")
15981 (description "Usage of Python's multiprocessing package in a
15982gevent-powered application may raise problems. With @code{gipc},
15983process-based child processes can safely be created anywhere within a
15984gevent-powered application.")
15985 (license license:expat)))
15986
15987(define-public python2-gipc
15988 (package-with-python2 python-gipc))
15989
15990(define-public python-fusepy
15991 (package
15992 (name "python-fusepy")
15993 (version "2.0.4")
15994 (source
15995 (origin
15996 (method url-fetch)
15997 (uri (pypi-uri "fusepy" version))
15998 (sha256
15999 (base32
16000 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
16001 (build-system python-build-system)
16002 (arguments
16003 `(#:phases
16004 (modify-phases %standard-phases
16005 (add-before 'build 'set-library-file-name
16006 (lambda* (#:key inputs #:allow-other-keys)
16007 (let ((fuse (assoc-ref inputs "fuse")))
16008 (substitute* "fuse.py"
16009 (("find_library\\('fuse'\\)")
16010 (string-append "'" fuse "/lib/libfuse.so'")))
16011 #t))))))
16012 (propagated-inputs
16013 `(("fuse" ,fuse)))
16014 (home-page "https://github.com/fusepy/fusepy")
16015 (synopsis "Simple ctypes bindings for FUSE")
16016 (description "Python module that provides a simple interface to FUSE and
16017MacFUSE. The binding is created using the standard @code{ctypes} library.")
16018 (license license:isc)))
16019
16020(define-public python2-fusepy
16021 (package-with-python2 python-fusepy))
16022
16023(define-public python2-gdrivefs
16024 (package
16025 (name "python2-gdrivefs")
16026 (version "0.14.9")
16027 (source
16028 (origin
16029 (method url-fetch)
16030 (uri (pypi-uri "gdrivefs" version))
16031 (sha256
16032 (base32
16033 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
16034 (build-system python-build-system)
16035 (arguments
16036 `(#:python ,python-2
16037 #:phases
16038 (modify-phases %standard-phases
16039 (add-before 'build 'patch-setup-py
16040 (lambda _
16041 ;; Update requirements from dependency==version
16042 ;; to dependency>=version
16043 (substitute* "gdrivefs/resources/requirements.txt"
16044 (("==") ">="))
16045 #t)))))
16046 (native-inputs
16047 `(("python2-gipc" ,python2-gipc)
16048 ("python2-gevent" ,python2-gevent)
16049 ("python2-greenlet" ,python2-greenlet)
16050 ("python2-httplib2" ,python2-httplib2)
16051 ("python2-uritemplate" ,python2-uritemplate)
16052 ("python2-oauth2client" ,python2-oauth2client)
16053 ("python2-six" ,python2-six)))
16054 (propagated-inputs
16055 `(("python2-dateutil" ,python2-dateutil)
16056 ("python2-fusepy" ,python2-fusepy)
16057 ("python2-google-api-client" ,python2-google-api-client)))
16058 (home-page "https://github.com/dsoprea/GDriveFS")
16059 (synopsis "Mount Google Drive as a local file system")
16060 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
16061under Python 2.7.")
16062 (license license:gpl2)))
16063
16064(define-public pybind11
16065 (package
16066 (name "pybind11")
0690f324 16067 (version "2.4.3")
44d10b1f
RW
16068 (source (origin
16069 (method git-fetch)
16070 (uri (git-reference
16071 (url "https://github.com/pybind/pybind11.git")
16072 (commit (string-append "v" version))))
16073 (sha256
16074 (base32
0690f324 16075 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
44d10b1f
RW
16076 (file-name (git-file-name name version))))
16077 (build-system cmake-build-system)
16078 (native-inputs
3cf579e9 16079 `(("python" ,python-wrapper)
ae8db9ce
LC
16080
16081 ;; The following dependencies are used for tests.
16082 ("python-pytest" ,python-pytest)
16083 ("catch" ,catch-framework2-1)
16084 ("eigen" ,eigen)))
44d10b1f 16085 (arguments
ae8db9ce
LC
16086 `(#:configure-flags
16087 (list (string-append "-DCATCH_INCLUDE_DIR="
16088 (assoc-ref %build-inputs "catch")
16089 "/include/catch"))
16090
3cf579e9
LC
16091 #:phases (modify-phases %standard-phases
16092 (add-after 'install 'install-python
16093 (lambda* (#:key outputs #:allow-other-keys)
16094 (let ((out (assoc-ref outputs "out")))
16095 (with-directory-excursion "../source"
16096 (setenv "PYBIND11_USE_CMAKE" "yes")
16097 (invoke "python" "setup.py" "install"
16098 "--single-version-externally-managed"
16099 "--root=/"
16100 (string-append "--prefix=" out)))))))
16101
ae8db9ce 16102 #:test-target "check"))
44d10b1f
RW
16103 (home-page "https://github.com/pybind/pybind11/")
16104 (synopsis "Seamless operability between C++11 and Python")
ab17297a
LC
16105 (description
16106 "@code{pybind11} is a lightweight header-only library that exposes C++
16107types in Python and vice versa, mainly to create Python bindings of existing
16108C++ code. Its goals and syntax are similar to the @code{Boost.Python}
16109library: to minimize boilerplate code in traditional extension modules by
16110inferring type information using compile-time introspection.")
65eada58 16111 (license license:bsd-3)))
44d10b1f
RW
16112
16113(define-public python-fasteners
16114 (package
16115 (name "python-fasteners")
16116 (version "0.14.1")
16117 (source
16118 (origin
16119 (method url-fetch)
16120 (uri (pypi-uri "fasteners" version))
16121 (sha256
16122 (base32
16123 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
16124 (build-system python-build-system)
16125 (propagated-inputs
16126 `(("python-monotonic" ,python-monotonic)
16127 ("python-six" ,python-six)
16128 ("python-testtools" ,python-testtools)))
16129 (home-page "https://github.com/harlowja/fasteners")
16130 (synopsis "Python package that provides useful locks")
16131 (description
16132 "This package provides a Python program that provides following locks:
16133
16134@itemize
16135@item Locking decorator
16136@item Reader-writer locks
16137@item Inter-process locks
16138@item Generic helpers
16139@end itemize\n")
16140 (properties `((python2-variant . ,(delay python2-fasteners))))
16141 (license license:asl2.0)))
16142
16143(define-public python2-fasteners
16144 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
16145 (package
16146 (inherit base)
16147 (propagated-inputs
16148 `(("python2-futures" ,python2-futures)
16149 ,@(package-propagated-inputs base))))))
16150
16151(define-public python-requests-file
16152 (package
16153 (name "python-requests-file")
16154 (version "1.4.3")
16155 (source
16156 (origin
16157 (method url-fetch)
16158 (uri (pypi-uri "requests-file" version))
16159 (sha256
16160 (base32
16161 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
16162 (build-system python-build-system)
16163 (propagated-inputs
16164 `(("python-requests" ,python-requests)
16165 ("python-six" ,python-six)))
16166 (home-page
16167 "https://github.com/dashea/requests-file")
16168 (synopsis "File transport adapter for Requests")
16169 (description
16170 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 16171library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
16172 (license license:asl2.0)))
16173
16174(define-public python2-requests-file
16175 (package-with-python2 python-requests-file))
16176
16177(define-public python-tldextract
16178 (package
16179 (name "python-tldextract")
16180 (version "2.2.0")
16181 (source
16182 (origin
16183 (method url-fetch)
16184 (uri (pypi-uri "tldextract" version))
16185 (sha256
16186 (base32
16187 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
16188 (build-system python-build-system)
16189 (native-inputs
16190 `(("python-pytest" ,python-pytest)
16191 ("python-responses" ,python-responses)))
16192 (propagated-inputs
16193 `(("python-idna" ,python-idna)
16194 ("python-requests" ,python-requests)
16195 ("python-requests-file" ,python-requests-file)))
16196 (home-page
16197 "https://github.com/john-kurkowski/tldextract")
16198 (synopsis
16199 "Separate the TLD from the registered domain and subdomains of a URL")
16200 (description
16201 "TLDExtract accurately separates the TLD from the registered domain and
16202subdomains of a URL, using the Public Suffix List. By default, this includes
16203the public ICANN TLDs and their exceptions. It can optionally support the
16204Public Suffix List's private domains as well.")
16205 (license license:bsd-3)))
16206
16207(define-public python2-tldextract
16208 (package-with-python2 python-tldextract))
16209
16210(define-public python-pynamecheap
16211 (package
16212 (name "python-pynamecheap")
16213 (version "0.0.3")
16214 (source
16215 (origin
16216 (method url-fetch)
16217 (uri (pypi-uri "PyNamecheap" version))
16218 (sha256
16219 (base32
16220 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
16221 (build-system python-build-system)
16222 (propagated-inputs
16223 `(("python-requests" ,python-requests)))
16224 (home-page
16225 "https://github.com/Bemmu/PyNamecheap")
16226 (synopsis
16227 "Namecheap API client in Python")
16228 (description
16229 "PyNamecheap is a Namecheap API client in Python.")
16230 (license license:expat)))
16231
16232(define-public python2-pynamecheap
16233 (package-with-python2 python-pynamecheap))
16234
16235(define-public python-dns-lexicon
16236 (package
16237 (name "python-dns-lexicon")
16238 (version "2.4.0")
16239 (source
16240 (origin
16241 (method url-fetch)
16242 (uri (pypi-uri "dns-lexicon" version))
16243 (sha256
16244 (base32
16245 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
16246 (build-system python-build-system)
16247 (arguments
16248 `(#:tests? #f)) ;requires internet access
16249 (propagated-inputs
16250 `(("python-future" ,python-future)
16251 ("python-pynamecheap" ,python-pynamecheap)
16252 ("python-requests" ,python-requests)
16253 ("python-tldextract" ,python-tldextract)
16254 ("python-urllib3" ,python-urllib3)))
16255 (home-page "https://github.com/AnalogJ/lexicon")
16256 (synopsis
16257 "Manipulate DNS records on various DNS providers")
16258 (description
16259 "Lexicon provides a way to manipulate DNS records on multiple DNS
16260providers in a standardized way. It has a CLI but it can also be used as a
16261Python library. It was designed to be used in automation, specifically with
16262Let's Encrypt.")
16263 (license license:expat)))
16264
16265(define-public python2-dns-lexicon
16266 (package-with-python2 python-dns-lexicon))
16267
16268(define-public python-commandlines
16269 (package
16270 (name "python-commandlines")
16271 (version "0.4.1")
16272 (source
16273 (origin
16274 (method url-fetch)
16275 (uri (pypi-uri "commandlines" version))
16276 (sha256
16277 (base32
16278 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
16279 (build-system python-build-system)
16280 (home-page "https://github.com/chrissimpkins/commandlines")
16281 (synopsis "Command line argument to object parsing library")
16282 (description
16283 "@code{Commandlines} is a Python library for command line application
16284development that supports command line argument parsing, command string
16285validation testing and application logic.")
16286 (license license:expat)))
16287
16288;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
16289;; python-numba. They have a very unflexible relationship.
16290(define-public python-numba
16291 (package
16292 (name "python-numba")
65f84096 16293 (version "0.46.0")
44d10b1f
RW
16294 (source
16295 (origin
16296 (method url-fetch)
16297 (uri (pypi-uri "numba" version))
16298 (sha256
16299 (base32
65f84096 16300 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
44d10b1f
RW
16301 (build-system python-build-system)
16302 (arguments
16303 `(#:modules ((guix build utils)
16304 (guix build python-build-system)
16305 (ice-9 ftw)
16306 (srfi srfi-1)
16307 (srfi srfi-26))
16308 #:phases
16309 (modify-phases %standard-phases
16310 (add-after 'unpack 'disable-proprietary-features
16311 (lambda _
16312 (setenv "NUMBA_DISABLE_HSA" "1")
16313 (setenv "NUMBA_DISABLE_CUDA" "1")
16314 #t))
16315 (add-after 'unpack 'remove-failing-tests
16316 (lambda _
65f84096 16317 ;; FIXME: These tests fail for unknown reasons:
44d10b1f
RW
16318 ;; test_non_writable_pycache, test_non_creatable_pycache, and
16319 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
16320 (substitute* "numba/tests/test_dispatcher.py"
16321 (("def test(_non_writable_pycache)" _ m)
16322 (string-append "def guix_skip" m))
16323 (("def test(_non_creatable_pycache)" _ m)
16324 (string-append "def guix_skip" m))
16325 (("def test(_frozen)" _ m)
16326 (string-append "def guix_skip" m)))
16327
16328 ;; These tests fail because we don't run the tests from the build
16329 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
65f84096 16330 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
44d10b1f
RW
16331 (substitute* "numba/tests/test_pycc.py"
16332 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
16333 (string-append "def guix_skip" m)))
65f84096
BG
16334
16335 ;; These tests fail because our version of Python does not have
16336 ;; a recognizable front-end for the Numba distribution to use
16337 ;; to check against.
16338 (substitute* "numba/tests/test_entrypoints.py"
16339 (("def test(_init_entrypoint)" _ m)
16340 (string-append "def guix_skip" m)))
16341 (substitute* "numba/tests/test_jitclasses.py"
16342 (("def test(_jitclass_longlabel_not_truncated)" _ m)
16343 (string-append "def guix_skip" m)))
44d10b1f
RW
16344 #t))
16345 (replace 'check
16346 (lambda _
16347 (let ((cwd (getcwd)))
16348 (setenv "PYTHONPATH"
16349 (string-append cwd "/build/"
16350 (find (cut string-prefix? "lib" <>)
16351 (scandir (string-append cwd "/build")))
16352 ":"
16353 (getenv "PYTHONPATH")))
16354 ;; Something is wrong with the PYTHONPATH when running the
16355 ;; tests from the build directory, as it complains about not being
16356 ;; able to import certain modules.
16357 (with-directory-excursion "/tmp"
16358 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
16359 #t)))))
16360 (propagated-inputs
16361 `(("python-llvmlite" ,python-llvmlite)
16362 ("python-numpy" ,python-numpy)
16363 ("python-singledispatch" ,python-singledispatch)))
16364 ;; Needed for tests.
16365 (inputs
16366 `(("python-jinja2" ,python-jinja2)
16367 ("python-pygments" ,python-pygments)))
16368 (home-page "https://numba.pydata.org")
16369 (synopsis "Compile Python code using LLVM")
16370 (description "Numba gives you the power to speed up your applications with
16371high performance functions written directly in Python. With a few
16372annotations, array-oriented and math-heavy Python code can be just-in-time
16373compiled to native machine instructions, similar in performance to C, C++ and
16374Fortran, without having to switch languages or Python interpreters.
16375
16376Numba works by generating optimized machine code using the LLVM compiler
16377infrastructure at import time, runtime, or statically (using the included pycc
16378tool).")
16379 (license license:bsd-3)))
16380
241409cd
RW
16381(define-public python-numcodecs
16382 (package
16383 (name "python-numcodecs")
16384 (version "0.6.4")
16385 (source
16386 (origin
16387 (method url-fetch)
16388 (uri (pypi-uri "numcodecs" version))
16389 (sha256
16390 (base32
16391 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
16392 (build-system python-build-system)
16393 (propagated-inputs
16394 `(("python-numpy" ,python-numpy)
16395 ("python-msgpack" ,python-msgpack)))
16396 (native-inputs
16397 `(("python-pytest" ,python-pytest)
16398 ("python-setuptools-scm" ,python-setuptools-scm)))
16399 (home-page "https://github.com/zarr-developers/numcodecs")
16400 (synopsis "Buffer compression and transformation codecs")
16401 (description
16402 "This Python package provides buffer compression and transformation
16403codecs for use in data storage and communication applications.")
16404 (license license:expat)))
16405
8e04b233
RW
16406(define-public python-asciitree
16407 (package
16408 (name "python-asciitree")
16409 (version "0.3.3")
16410 (source
16411 (origin
16412 (method url-fetch)
16413 (uri (pypi-uri "asciitree" version))
16414 (sha256
16415 (base32
16416 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
16417 (build-system python-build-system)
16418 (home-page "https://github.com/mbr/asciitree")
16419 (synopsis "Draws ASCII trees")
16420 (description "This package draws tree structures using characters.")
16421 (license license:expat)))
16422
7032c1cc
RW
16423(define-public python-zarr
16424 (package
16425 (name "python-zarr")
16426 (version "2.4.0")
16427 (source
16428 (origin
16429 (method url-fetch)
16430 (uri (pypi-uri "zarr" version))
16431 (sha256
16432 (base32
16433 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
16434 (build-system python-build-system)
16435 (arguments
16436 `(#:phases
16437 (modify-phases %standard-phases
16438 (add-after 'unpack 'disable-service-tests
16439 (lambda _
16440 (setenv "ZARR_TEST_ABS" "0")
16441 (setenv "ZARR_TEST_MONGO" "0")
16442 (setenv "ZARR_TEST_REDIS" "0")
16443 #t))
16444 (replace 'check
16445 (lambda _
16446 (invoke "pytest" "-vv" "-k" "not lmdb")
16447 #t)))))
16448 (propagated-inputs
16449 `(("python-asciitree" ,python-asciitree)
16450 ("python-fasteners" ,python-fasteners)
16451 ("python-numcodecs" ,python-numcodecs)
16452 ("python-numpy" ,python-numpy)))
16453 (native-inputs
16454 `(("python-pytest" ,python-pytest)
16455 ("python-setuptools-scm" ,python-setuptools-scm)))
16456 (home-page "https://github.com/zarr-developers/zarr-python")
16457 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
16458 (description
16459 "This package provides an implementation of chunked, compressed,
16460N-dimensional arrays for Python.")
16461 (license license:expat)))
16462
44d10b1f
RW
16463(define-public python-anndata
16464 (package
16465 (name "python-anndata")
a098b349 16466 (version "0.7.1")
44d10b1f
RW
16467 (source
16468 (origin
16469 (method url-fetch)
16470 (uri (pypi-uri "anndata" version))
16471 (sha256
16472 (base32
a098b349 16473 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
44d10b1f 16474 (build-system python-build-system)
a098b349
RW
16475 (arguments
16476 `(#:phases
16477 (modify-phases %standard-phases
16478 (add-after 'unpack 'delete-inconvenient-tests
16479 (lambda _
16480 ;; This test depends on python-scikit-learn.
16481 (delete-file "anndata/tests/test_inplace_subset.py")
16482 #t))
16483 (delete 'check)
16484 (add-after 'install 'check
16485 (lambda* (#:key inputs outputs #:allow-other-keys)
16486 (add-installed-pythonpath inputs outputs)
16487 (invoke "pytest" "-vv"))))))
44d10b1f
RW
16488 (propagated-inputs
16489 `(("python-h5py" ,python-h5py)
a098b349 16490 ("python-importlib-metadata" ,python-importlib-metadata)
44d10b1f 16491 ("python-natsort" ,python-natsort)
a098b349
RW
16492 ("python-numcodecs" ,python-numcodecs)
16493 ("python-packaging" ,python-packaging)
44d10b1f 16494 ("python-pandas" ,python-pandas)
a098b349
RW
16495 ("python-scipy" ,python-scipy)
16496 ("python-zarr" ,python-zarr)))
16497 (native-inputs
16498 `(("python-joblib" ,python-joblib)
16499 ("python-pytest" ,python-pytest)
16500 ("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
16501 (home-page "https://github.com/theislab/anndata")
16502 (synopsis "Annotated data for data analysis pipelines")
16503 (description "Anndata is a package for simple (functional) high-level APIs
16504for data analysis pipelines. In this context, it provides an efficient,
16505scalable way of keeping track of data together with learned annotations and
16506reduces the code overhead typically encountered when using a mostly
16507object-oriented library such as @code{scikit-learn}.")
16508 (license license:bsd-3)))
16509
16510(define-public python-dill
16511 (package
16512 (name "python-dill")
32be3577 16513 (version "0.3.1.1")
44d10b1f
RW
16514 (source
16515 (origin
16516 (method url-fetch)
16517 (uri (pypi-uri "dill" version))
16518 (sha256
32be3577 16519 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
44d10b1f 16520 (build-system python-build-system)
32be3577
MIP
16521 (arguments
16522 `(#:phases
16523 (modify-phases %standard-phases
16524 (replace 'check
16525 (lambda _
16526 (with-directory-excursion "/tmp"
16527 (invoke "nosetests" "-v"))
16528 #t)))))
16529 (native-inputs
16530 `(("python-nose" ,python-nose)))
16531 (home-page "https://pypi.org/project/dill/")
44d10b1f
RW
16532 (synopsis "Serialize all of Python")
16533 (description "Dill extends Python's @code{pickle} module for serializing
16534and de-serializing Python objects to the majority of the built-in Python
16535types. Dill provides the user the same interface as the @code{pickle} module,
16536and also includes some additional features. In addition to pickling Python
16537objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 16538session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
16539interpreter session, close the interpreter, ship the pickled file to another
16540computer, open a new interpreter, unpickle the session and thus continue from
16541the saved state of the original interpreter session.")
16542 (license license:bsd-3)))
16543
16544(define-public python-multiprocess
16545 (package
16546 (name "python-multiprocess")
fcc4e9e7 16547 (version "0.70.9")
44d10b1f
RW
16548 (source
16549 (origin
16550 (method url-fetch)
16551 (uri (pypi-uri "multiprocess" version))
16552 (sha256
16553 (base32
fcc4e9e7 16554 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
44d10b1f 16555 (build-system python-build-system)
fcc4e9e7
MIP
16556 (arguments
16557 `(#:phases
16558 (modify-phases %standard-phases
16559 (add-after 'unpack 'disable-broken-tests
16560 (lambda _
16561 ;; This test is broken as there is no keyboard interrupt.
16562 (substitute* "py3.7/multiprocess/tests/__init__.py"
16563 (("^(.*)def test_wait_result"
16564 line indent)
16565 (string-append indent
16566 "@unittest.skip(\"Disabled by Guix\")\n"
16567 line)))
16568 #t))
16569 ;; Tests must be run after installation.
16570 (delete 'check)
16571 (add-after 'install 'check
16572 (lambda* (#:key inputs outputs #:allow-other-keys)
16573 (add-installed-pythonpath inputs outputs)
16574 (invoke "python" "-m" "multiprocess.tests")
16575 #t)))))
44d10b1f
RW
16576 (propagated-inputs
16577 `(("python-dill" ,python-dill)))
fcc4e9e7 16578 (home-page "https://pypi.org/project/multiprocess/")
44d10b1f
RW
16579 (synopsis "Multiprocessing and multithreading in Python")
16580 (description
16581 "This package is a fork of the multiprocessing Python package, a package
16582which supports the spawning of processes using the API of the standard
16583library's @code{threading} module.")
16584 (license license:bsd-3)))
16585
16586(define-public python-toolz
16587 (package
16588 (name "python-toolz")
16589 (version "0.9.0")
16590 (source
16591 (origin
16592 (method url-fetch)
16593 (uri (pypi-uri "toolz" version))
16594 (sha256
16595 (base32
16596 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
16597 (build-system python-build-system)
16598 ;; FIXME: tests cannot be computed: "Can't perform this operation for
16599 ;; unregistered loader type"
16600 (arguments '(#:tests? #f))
16601 (home-page "https://github.com/pytoolz/toolz/")
16602 (synopsis "List processing tools and functional utilities")
16603 (description
16604 "This package provides a set of utility functions for iterators,
16605functions, and dictionaries.")
16606 (license license:bsd-3)))
16607
16608(define-public python2-toolz
16609 (package-with-python2 python-toolz))
16610
16611(define-public python-cytoolz
16612 (package
16613 (name "python-cytoolz")
16614 (version "0.9.0.1")
16615 (source
16616 (origin
16617 (method url-fetch)
16618 (uri (pypi-uri "cytoolz" version))
16619 (sha256
16620 (base32
16621 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
16622 (build-system python-build-system)
16623 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
16624 ;; 'exceptions'"
16625 (arguments '(#:tests? #f))
16626 (propagated-inputs
16627 `(("python-toolz" ,python-toolz)))
16628 (native-inputs
16629 `(("python-cython" ,python-cython)))
16630 (home-page "https://github.com/pytoolz/cytoolz")
16631 (synopsis "High performance functional utilities")
16632 (description
16633 "The cytoolz package implements the same API as provided by toolz. The
16634main differences are that @code{cytoolz} is faster and cytoolz offers a C API
16635that is accessible to other projects developed in Cython.")
16636 (license license:bsd-3)))
16637
16638(define-public python-sortedcontainers
16639 (package
16640 (name "python-sortedcontainers")
b244f166 16641 (version "2.1.0")
44d10b1f
RW
16642 (source
16643 (origin
16644 (method url-fetch)
16645 (uri (pypi-uri "sortedcontainers" version))
16646 (sha256
16647 (base32
b244f166 16648 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
44d10b1f
RW
16649 (build-system python-build-system)
16650 (native-inputs
16651 `(("python-tox" ,python-tox)))
16652 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
16653 (synopsis "Sorted List, Sorted Dict, Sorted Set")
16654 (description
16655 "This package provides a sorted collections library, written in
16656pure-Python.")
16657 (license license:asl2.0)))
16658
16659(define-public python-cloudpickle
16660 (package
16661 (name "python-cloudpickle")
16662 (version "0.6.1")
16663 (source
16664 (origin
16665 (method url-fetch)
16666 (uri (pypi-uri "cloudpickle" version))
16667 (sha256
16668 (base32
16669 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
16670 (build-system python-build-system)
16671 ;; FIXME: there are 5 errors in 122 tests:
16672 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
16673 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
16674 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16675 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16676 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
16677 ;; TypeError: cannot serialize '_io.BufferedRandom' object
16678 (arguments '(#:tests? #f))
16679 (native-inputs
16680 `(("python-pytest" ,python-pytest)
16681 ("python-mock" ,python-mock)
16682 ("python-tornado" ,python-tornado)))
16683 (home-page "https://github.com/cloudpipe/cloudpickle")
16684 (synopsis "Extended pickling support for Python objects")
16685 (description
16686 "Cloudpickle makes it possible to serialize Python constructs not
16687supported by the default pickle module from the Python standard library. It
16688is especially useful for cluster computing where Python expressions are
16689shipped over the network to execute on remote hosts, possibly close to the
16690data.")
16691 (license license:bsd-3)))
16692
16693(define-public python2-cloudpickle
16694 (package-with-python2 python-cloudpickle))
16695
16696(define-public python-locket
16697 (package
16698 (name "python-locket")
16699 (version "0.2.0")
16700 (source
16701 (origin
16702 (method url-fetch)
16703 (uri (pypi-uri "locket" version))
16704 (sha256
16705 (base32
16706 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
16707 (build-system python-build-system)
16708 (home-page "https://github.com/mwilliamson/locket.py")
16709 (synopsis "File-based locks for Python")
16710 (description
16711 "Locket implements a lock that can be used by multiple processes provided
16712they use the same path.")
16713 (license license:bsd-2)))
16714
16715(define-public python2-locket
16716 (package-with-python2 python-locket))
16717
16718(define-public python-blosc
16719 (package
16720 (name "python-blosc")
16721 (version "1.5.1")
16722 (source
16723 (origin
16724 (method url-fetch)
16725 (uri (pypi-uri "blosc" version))
16726 (sha256
16727 (base32
16728 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
16729 (build-system python-build-system)
16730 ;; FIXME: all tests pass, but then this error is printed:
16731 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
16732 (arguments '(#:tests? #f))
16733 (propagated-inputs
16734 `(("python-numpy" ,python-numpy)))
16735 (home-page "https://github.com/blosc/python-blosc")
16736 (synopsis "Python wrapper for the Blosc data compressor library")
16737 (description "Blosc is a high performance compressor optimized for binary
16738data. It has been designed to transmit data to the processor cache faster
16739than the traditional, non-compressed, direct memory fetch approach via a
16740@code{memcpy()} system call.
16741
16742Blosc works well for compressing numerical arrays that contains data with
16743relatively low entropy, like sparse data, time series, grids with
16744regular-spaced values, etc.
16745
16746This Python package wraps the Blosc library.")
16747 (license license:bsd-3)))
16748
16749(define-public python2-blosc
16750 (package-with-python2 python-blosc))
16751
16752(define-public python-partd
16753 (package
16754 (name "python-partd")
16755 (version "0.3.9")
16756 (source
16757 (origin
16758 (method url-fetch)
16759 (uri (pypi-uri "partd" version))
16760 (sha256
16761 (base32
16762 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16763 (build-system python-build-system)
16764 (propagated-inputs
16765 `(("python-blosc" ,python-blosc)
16766 ("python-locket" ,python-locket)
16767 ("python-numpy" ,python-numpy)
16768 ("python-pandas" ,python-pandas)
16769 ("python-pyzmq" ,python-pyzmq)
16770 ("python-toolz" ,python-toolz)))
16771 (home-page "https://github.com/dask/partd/")
16772 (synopsis "Appendable key-value storage")
16773 (description "Partd stores key-value pairs. Values are raw bytes. We
16774append on old values. Partd excels at shuffling operations.")
16775 (license license:bsd-3)))
16776
16777(define-public python2-partd
16778 (package-with-python2 python-partd))
16779
c70a0191
RW
16780(define-public python-fsspec
16781 (package
16782 (name "python-fsspec")
16783 (version "0.6.1")
16784 (source
16785 (origin
16786 (method url-fetch)
16787 (uri (pypi-uri "fsspec" version))
16788 (sha256
16789 (base32
16790 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16791 (build-system python-build-system)
16792 (arguments '(#:tests? #f)) ; there are none
16793 (home-page "https://github.com/intake/filesystem_spec")
16794 (synopsis "File-system specification")
16795 (description "The purpose of this package is to produce a template or
16796specification for a file-system interface, that specific implementations
16797should follow, so that applications making use of them can rely on a common
16798behavior and not have to worry about the specific internal implementation
16799decisions with any given backend.")
16800 (license license:bsd-3)))
16801
44d10b1f
RW
16802(define-public python-dask
16803 (package
16804 (name "python-dask")
86c7ca07 16805 (version "2.9.0")
44d10b1f
RW
16806 (source
16807 (origin
16808 (method url-fetch)
16809 (uri (pypi-uri "dask" version))
16810 (sha256
86c7ca07 16811 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
44d10b1f 16812 (build-system python-build-system)
44d10b1f
RW
16813 (arguments
16814 `(#:phases
16815 (modify-phases %standard-phases
86c7ca07 16816 (add-after 'unpack 'disable-broken-tests
44d10b1f 16817 (lambda _
86c7ca07 16818 ;; This test is marked as xfail when pytest-xdist is used.
44d10b1f
RW
16819 (substitute* "dask/tests/test_threaded.py"
16820 (("def test_interrupt\\(\\)" m)
16821 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16822 m)))
86c7ca07
RW
16823 ;; This one fails with a type error:
16824 ;; TypeError: Already tz-aware, use tz_convert to convert.
16825 (substitute* "dask/dataframe/tests/test_shuffle.py"
16826 (("def test_set_index_timestamp\\(\\)" m)
16827 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16828 m)))
44d10b1f
RW
16829 #t))
16830 (replace 'check
16831 (lambda _ (invoke "pytest" "-vv"))))))
16832 (propagated-inputs
16833 `(("python-cloudpickle" ,python-cloudpickle)
86c7ca07 16834 ("python-fsspec" ,python-fsspec)
44d10b1f 16835 ("python-numpy" ,python-numpy)
86c7ca07 16836 ("python-packaging" ,python-packaging)
44d10b1f
RW
16837 ("python-pandas" ,python-pandas)
16838 ("python-partd" ,python-partd)
16839 ("python-toolz" ,python-toolz)
16840 ("python-pyyaml" ,python-pyyaml)))
16841 (native-inputs
16842 `(("python-pytest" ,python-pytest)
16843 ("python-pytest-runner" ,python-pytest-runner)))
16844 (home-page "https://github.com/dask/dask/")
16845 (synopsis "Parallel computing with task scheduling")
16846 (description
16847 "Dask is a flexible parallel computing library for analytics. It
16848consists of two components: dynamic task scheduling optimized for computation,
16849and large data collections like parallel arrays, dataframes, and lists that
16850extend common interfaces like NumPy, Pandas, or Python iterators to
16851larger-than-memory or distributed environments. These parallel collections
16852run on top of the dynamic task schedulers. ")
16853 (license license:bsd-3)))
16854
44d10b1f
RW
16855(define-public python-ilinkedlist
16856 (package
16857 (name "python-ilinkedlist")
16858 (version "0.4.0")
16859 (source
16860 (origin
16861 (method url-fetch)
16862 (uri (pypi-uri "ilinkedlist" version))
16863 (sha256
16864 (base32
16865 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16866 (build-system python-build-system)
16867 (native-inputs `(("python-pytest" ,python-pytest)))
16868 (inputs `(("python" ,python)))
16869 (home-page "https://github.com/luther9/ilinkedlist-py")
16870 (synopsis "Immutable linked list library")
16871 (description
16872 "This is a implementation of immutable linked lists for Python. It
16873contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16874Since a linked list is treated as immutable, it is hashable, and its length
16875can be retrieved in constant time. Some of the terminology is inspired by
16876LISP. It is possible to create an improper list by creating a @code{Pair}
16877with a non-list @code{cdr}.")
16878 (license license:gpl3+)))
16879
16880(define-public python-readlike
16881 (package
16882 (name "python-readlike")
16883 (version "0.1.3")
16884 (source
16885 (origin
16886 (method url-fetch)
16887 (uri (pypi-uri "readlike" version))
16888 (sha256
16889 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16890 (build-system python-build-system)
16891 (home-page "https://github.com/jangler/readlike")
16892 (synopsis "GNU Readline-like line editing module")
16893 (description
16894 "This Python module provides line editing functions similar to the default
16895Emacs-style ones of GNU Readline. Unlike the Python standard library's
16896@code{readline} package, this one allows access to those capabilties in settings
16897outside of a standard command-line interface. It is especially well-suited to
16898interfacing with Urwid, due to a shared syntax for describing key inputs.
16899
16900Currently, all stateless Readline commands are implemented. Yanking and history
16901are not supported.")
16902 (license license:expat)))
16903
16904(define-public python2-readlike
16905 (package-with-python2 python-readlike))
16906
16907(define-public python-reparser
16908 (package
16909 (name "python-reparser")
16910 (version "1.4.3")
16911 (source
16912 (origin
16913 (method url-fetch)
16914 (uri (pypi-uri "ReParser" version))
16915 (sha256
16916 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16917 (build-system python-build-system)
16918 (home-page "https://github.com/xmikos/reparser")
16919 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16920 (description
16921 "This Python library provides a simple lexer/parser for inline markup based
16922on regular expressions.")
16923 (license license:expat)))
16924
16925(define-public python2-reparser
16926 (let ((reparser (package-with-python2
16927 (strip-python2-variant python-reparser))))
16928 (package (inherit reparser)
16929 (propagated-inputs
16930 `(("python2-enum34" ,python2-enum34)
16931 ,@(package-propagated-inputs reparser))))))
16932
16933(define-public python-precis-i18n
16934 (package
16935 (name "python-precis-i18n")
16936 (version "1.0.0")
16937 (source
16938 (origin
16939 (method url-fetch)
16940 (uri (pypi-uri "precis_i18n" version))
16941 (sha256
16942 (base32
16943 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16944 (build-system python-build-system)
16945 (home-page "https://github.com/byllyfish/precis_i18n")
16946 (synopsis "Implementation of the PRECIS framework")
16947 (description
16948 "This module implements the PRECIS Framework as described in RFC 8264,
16949RFC 8265 and RFC 8266.")
16950 (license license:expat)))
16951
d0446c4b
RW
16952(define-public python-absl-py
16953 (package
16954 (name "python-absl-py")
16955 (version "0.6.1")
16956 (source
16957 (origin
16958 (method url-fetch)
16959 (uri (pypi-uri "absl-py" version))
16960 (sha256
16961 (base32
16962 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16963 (build-system python-build-system)
16964 (propagated-inputs
16965 `(("python-six" ,python-six)))
16966 (home-page "https://github.com/abseil/abseil-py")
16967 (synopsis "Abseil Python common libraries")
16968 (description
16969 "This package provides the Abseil Python Common Libraries, a collection
16970of Python libraries for building Python applications.")
16971 (license license:asl2.0)))
16972
81bed4e9
RW
16973(define-public python-astor
16974 (package
16975 (name "python-astor")
16976 (version "0.7.1")
16977 (source
16978 (origin
16979 (method url-fetch)
16980 (uri (pypi-uri "astor" version))
16981 (sha256
16982 (base32
16983 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16984 (build-system python-build-system)
16985 ;; FIXME: There are two errors and two test failures.
16986 (arguments `(#:tests? #f))
16987 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16988 (synopsis "Read and write Python ASTs")
81bed4e9 16989 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16990source via the Abstract Syntax Tree.")
81bed4e9
RW
16991 (license license:bsd-3)))
16992
39ee82ff
RW
16993(define-public python2-astor
16994 (package-with-python2 python-astor))
16995
22e623ae
RW
16996(define-public python-grpcio
16997 (package
16998 (name "python-grpcio")
16999 (version "1.17.1")
17000 (source
17001 (origin
17002 (method url-fetch)
17003 (uri (pypi-uri "grpcio" version))
17004 (sha256
17005 (base32
17006 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
17007 (build-system python-build-system)
17008 (propagated-inputs
17009 `(("python-six" ,python-six)))
17010 (home-page "https://grpc.io")
17011 (synopsis "HTTP/2-based RPC framework")
17012 (description "This package provides a Python library for communicating
17013with the HTTP/2-based RPC framework gRPC.")
17014 (license license:asl2.0)))
17015
79869f80
RW
17016(define-public python-astunparse
17017 (package
17018 (name "python-astunparse")
47d79541 17019 (version "1.6.2")
79869f80
RW
17020 (source
17021 (origin
17022 (method url-fetch)
17023 (uri (pypi-uri "astunparse" version))
17024 (sha256
47d79541 17025 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 17026 (build-system python-build-system)
47d79541 17027 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
17028 (propagated-inputs
17029 `(("python-six" ,python-six)
17030 ("python-wheel" ,python-wheel)))
17031 (home-page "https://github.com/simonpercivall/astunparse")
17032 (synopsis "AST unparser for Python")
17033 (description "This package provides an AST unparser for Python. It is a
17034factored out version of @code{unparse} found in the Python source
17035distribution.")
17036 (license license:bsd-3)))
17037
2884aac0
RW
17038(define-public python-gast
17039 (package
17040 (name "python-gast")
bd300261 17041 (version "0.2.2")
2884aac0
RW
17042 (source
17043 (origin
17044 (method url-fetch)
17045 (uri (pypi-uri "gast" version))
17046 (sha256
bd300261 17047 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
17048 (build-system python-build-system)
17049 (propagated-inputs
17050 `(("python-astunparse" ,python-astunparse)))
17051 (home-page "https://pypi.org/project/gast/")
17052 (synopsis "Generic Python AST that abstracts the underlying Python version")
17053 (description
17054 "GAST provides a compatibility layer between the AST of various Python
17055versions, as produced by @code{ast.parse} from the standard @code{ast}
17056module.")
17057 (license license:bsd-3)))
17058
44d10b1f
RW
17059(define-public python-wikidata
17060 (package
17061 (name "python-wikidata")
17062 (version "0.6.1")
17063 (source
17064 (origin
17065 (method url-fetch)
17066 (uri (pypi-uri "Wikidata" version))
17067 (sha256
17068 (base32
17069 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
17070 (build-system python-build-system)
17071 (propagated-inputs
17072 `(("python-babel" ,python-babel)))
17073 (home-page "https://github.com/dahlia/wikidata")
17074 (synopsis "Wikidata client library")
17075 (description
17076 "This package provides a Python interface to
17077@url{https://www.wikidata.org/, Wikidata}.")
17078 (properties '((upstream-name . "Wikidata")))
17079 (license license:gpl3+)))
17080
17081(define-public python-doctest-ignore-unicode
17082 (package
17083 (name "python-doctest-ignore-unicode")
17084 (version "0.1.2")
17085 (source
17086 (origin
17087 (method url-fetch)
17088 (uri (pypi-uri "doctest-ignore-unicode" version))
17089 (sha256
17090 (base32
17091 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
17092 (build-system python-build-system)
17093 (native-inputs
17094 `(("python-nose" ,python-nose)))
17095 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
17096 (synopsis "Ignore Unicode literal prefixes in doctests")
17097 (description
17098 "This package adds support for a flag to ignore Unicode literal prefixes
17099in doctests.")
17100 (license license:asl2.0)))
17101
17102(define-public python-attr
17103 (package
17104 (name "python-attr")
17105 (version "0.3.1")
17106 (source
17107 (origin
17108 (method url-fetch)
17109 (uri (pypi-uri "attr" version))
17110 (sha256
17111 (base32
17112 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
17113 (build-system python-build-system)
17114 (home-page "https://github.com/denis-ryzhkov/attr")
17115 (synopsis "Decorator for attributes of target function or class")
17116 (description "Simple decorator to set attributes of target function or
17117class in a @acronym{DRY, Don't Repeat Yourself} way.")
17118 (license license:expat)))
f98232a3
VC
17119
17120(define-public python-construct
17121 (package
17122 (name "python-construct")
d854ab15 17123 (version "2.10.56")
f98232a3
VC
17124 (source
17125 (origin
17126 (method url-fetch)
17127 (uri (pypi-uri "construct" version))
17128 (sha256
17129 (base32
d854ab15 17130 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
f98232a3
VC
17131 (build-system python-build-system)
17132 (arguments
17133 `(#:tests? #f)) ; No tests exist.
17134 (propagated-inputs
17135 `(("python-extras" ,python-extras)
17136 ("python-arrow" ,python-arrow)
17137 ("python-numpy" ,python-numpy)
17138 ("python-ruamel.yaml" ,python-ruamel.yaml)))
aabc8954 17139 (home-page "https://construct.readthedocs.io")
f98232a3
VC
17140 (synopsis "Declarative and symmetrical parser and builder for binary data")
17141 (description
17142 "This package provides both simple, atomic constructs (such as
17143integers of various sizes), as well as composite ones which allow you
17144form hierarchical and sequential structures of increasing complexity.
17145It features bit and byte granularity, easy debugging and testing, an
17146easy-to-extend subclass system, and lots of primitive constructs to
17147make your work easier.")
17148 (license license:expat)))
b742c006
LF
17149
17150(define-public python-humanize
17151 (package
17152 (name "python-humanize")
17153 (version "0.5.1")
17154 (source
17155 (origin
17156 (method url-fetch)
17157 (uri (pypi-uri "humanize" version))
17158 (sha256
17159 (base32
17160 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
17161 (arguments
17162 '(#:tests? #f)) ; tests not in pypi archive
17163 (build-system python-build-system)
17164 (home-page "https://github.com/jmoiron/humanize")
17165 (synopsis "Print numerical information in a human-readable form")
17166 (description "This package provides a Python module that displays numbers
17167and dates in \"human readable\" forms. For example, it would display
17168\"12345591313\" as \"12.3 billion\".")
17169 (license license:expat)))
d5bbf66d
LF
17170
17171(define-public python-txaio
17172 (package
17173 (name "python-txaio")
17174 (version "18.8.1")
17175 (source
17176 (origin
17177 (method url-fetch)
17178 (uri (pypi-uri "txaio" version))
17179 (sha256
17180 (base32
17181 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
17182 (build-system python-build-system)
17183 (propagated-inputs
17184 `(("python-twisted" ,python-twisted)
17185 ("python-six" ,python-six)))
17186 (home-page "https://github.com/crossbario/txaio")
17187 (synopsis "Compatibility layer between Python asyncio and Twisted")
17188 (description "Txaio provides a compatibility layer between the Python
17189@code{asyncio} module and @code{Twisted}.")
17190 (license license:expat)))
963dfd3a
RW
17191
17192(define-public python-toolshed
17193 (package
17194 (name "python-toolshed")
17195 (version "0.4.6")
17196 (source
17197 (origin
17198 (method url-fetch)
17199 (uri (pypi-uri "toolshed" version))
17200 (sha256
17201 (base32
17202 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
17203 (build-system python-build-system)
17204 (native-inputs
17205 `(("python-nose" ,python-nose)))
17206 (home-page "https://github.com/brentp/toolshed/")
17207 (synopsis "Collection of modules and functions for working with data")
17208 (description "This is a collection of well-tested, simple modules and
17209functions that aim to reduce boilerplate when working with data.")
17210 (license license:bsd-2)))
c91ecf2d
RW
17211
17212(define-public python-annoy
17213 (package
17214 (name "python-annoy")
17215 (version "1.15.1")
17216 (source
17217 (origin
17218 (method url-fetch)
17219 (uri (pypi-uri "annoy" version))
17220 (sha256
17221 (base32
17222 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
17223 (build-system python-build-system)
17224 (native-inputs
17225 `(("python-nose" ,python-nose)))
17226 (home-page "https://github.com/spotify/annoy/")
17227 (synopsis "Approximate nearest neighbors library")
17228 (description
17229 "Annoy is a C++ library with Python bindings to search for points in
17230space that are close to a given query point. It also creates large read-only
17231file-based data structures that are @code{mmap}ped into memory so that many
17232processes may share the same data.")
17233 (license license:asl2.0)))
412342d1 17234
79bfa422 17235(define-public python-pylzma
412342d1 17236 (package
79bfa422
DM
17237 (name "python-pylzma")
17238 (version "0.5.0")
17239 (source
17240 (origin
17241 (method url-fetch)
17242 (uri (pypi-uri "pylzma" version))
17243 (sha256
17244 (base32
17245 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 17246 (build-system python-build-system)
79bfa422
DM
17247 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
17248 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
17249 (description "This package provides Python bindings for the LZMA library
17250by Igor Pavlov.")
17251 (license license:lgpl2.1+)))
17252
17253(define-public python2-pylzma
17254 (package-with-python2 python-pylzma))
f825e605 17255
6609ebe7
AG
17256(define-public python2-zeroconf
17257 (package
17258 (name "python2-zeroconf")
17259
17260 ;; This is the last version that supports Python 2.x.
17261 (version "0.19.1")
17262 (source
17263 (origin
17264 (method url-fetch)
17265 (uri (pypi-uri "zeroconf" version))
17266 (sha256
17267 (base32
17268 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
17269 (build-system python-build-system)
17270 (arguments
17271 `(#:python ,python-2
17272 #:phases
17273 (modify-phases %standard-phases
17274 (add-after 'unpack 'patch-requires
17275 (lambda* (#:key inputs #:allow-other-keys)
17276 (substitute* "setup.py"
17277 (("enum-compat")
17278 "enum34"))
17279 #t)))))
17280 (native-inputs
17281 `(("python2-six" ,python2-six)
17282 ("python2-enum32" ,python2-enum34)
17283 ("python2-netifaces" ,python2-netifaces)
17284 ("python2-typing" ,python2-typing)))
17285 (home-page "https://github.com/jstasiak/python-zeroconf")
17286 (synopsis "Pure Python mDNS service discovery")
17287 (description
17288 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
17289compatible).")
17290 (license license:lgpl2.1+)))
17291
f825e605
GLV
17292(define-public python-bsddb3
17293 (package
17294 (name "python-bsddb3")
17295 (version "6.2.6")
17296 (source
17297 (origin
17298 (method url-fetch)
17299 (uri (pypi-uri "bsddb3" version))
17300 (sha256
17301 (base32
17302 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
17303 (build-system python-build-system)
17304 (inputs
17305 `(("bdb" ,bdb)))
17306 (arguments
17307 '(#:phases
17308 (modify-phases %standard-phases
17309 (add-after 'unpack 'configure-locations
17310 (lambda* (#:key inputs #:allow-other-keys)
17311 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
17312 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
17313 #t))
17314 (replace 'check
17315 (lambda _
17316 (invoke "python3" "test3.py" "-v"))))))
17317 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
17318 (synopsis "Python bindings for Oracle Berkeley DB")
17319 (description
17320 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
17321C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
17322Transaction objects, and each of these is exposed as a Python type in the
17323bsddb3.db module. The database objects can use various access methods: btree,
17324hash, recno, and queue. Complete support of Berkeley DB distributed
17325transactions. Complete support for Berkeley DB Replication Manager.
17326Complete support for Berkeley DB Base Replication. Support for RPC.")
17327 (license license:bsd-3)))
edeb04bf
PL
17328
17329(define-public python-dbfread
17330 (package
17331 (name "python-dbfread")
17332 (version "2.0.7")
17333 (source (origin
17334 (method url-fetch)
17335 (uri (pypi-uri "dbfread" version))
17336 (sha256
17337 (base32
17338 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
17339 (build-system python-build-system)
17340 (native-inputs
17341 `(("python-pytest" ,python-pytest)))
17342 (home-page "https://dbfread.readthedocs.io")
17343 (synopsis "Read DBF Files with Python")
17344 (description
17345 "This library reads DBF files and returns the data as native Python data
17346types for further processing. It is primarily intended for batch jobs and
17347one-off scripts.")
17348 (license license:expat)))
e308b4f0
JM
17349
17350(define-public python-cached-property
17351 (package
17352 (name "python-cached-property")
17353 (version "1.5.1")
17354 (source
17355 (origin
17356 (method url-fetch)
17357 (uri (pypi-uri "cached-property" version))
17358 (sha256
17359 (base32
17360 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
17361 (build-system python-build-system)
17362 (arguments
17363 `(#:phases
17364 (modify-phases %standard-phases
17365 ;; https://github.com/pydanny/cached-property/issues/131
17366 ;; recent versions of freezegun break one test
17367 (add-after 'unpack 'disable-broken-test
17368 (lambda _
17369 (substitute* "tests/test_cached_property.py"
17370 (("def test_threads_ttl_expiry\\(self\\)" m)
17371 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
17372 " " m)))
17373 #t)))))
17374 (native-inputs
17375 `(("python-freezegun" ,python-freezegun)))
17376 (home-page
17377 "https://github.com/pydanny/cached-property")
17378 (synopsis
17379 "Decorator for caching properties in classes")
17380 (description
17381 "This package provides a decorator which makes caching
17382time-or-computationally-expensive properties quick and easy and works in Python
173832 or 3.")
17384 (license license:bsd-3)))
dfe8a704
NG
17385
17386(define-public python-folium
17387 (package
17388 (name "python-folium")
d3bc1ea9 17389 (version "0.10.1")
dfe8a704
NG
17390 (source
17391 (origin
17392 (method url-fetch)
17393 (uri (pypi-uri "folium" version))
17394 (sha256
17395 (base32
d3bc1ea9 17396 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
dfe8a704
NG
17397 (build-system python-build-system)
17398 (propagated-inputs
17399 `(("python-branca" ,python-branca)
17400 ("python-jinja2" ,python-jinja2)
17401 ("python-numpy" ,python-numpy)
17402 ("python-requests" ,python-requests)))
17403 (native-inputs
17404 `(("python-pytest" ,python-pytest)))
17405 (home-page "https://github.com/python-visualization/folium")
17406 (synopsis "Make beautiful maps with Leaflet.js & Python")
17407 (description "@code{folium} makes it easy to visualize data that’s been
17408manipulated in Python on an interactive leaflet map. It enables both the
17409binding of data to a map for @code{choropleth} visualizations as well as
17410passing rich vector/raster/HTML visualizations as markers on the map.
17411
17412The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
17413Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
17414supports Image, Video, GeoJSON and TopoJSON overlays.")
17415 (license license:expat)))
9dd5f475
LC
17416
17417(define-public jube
17418 (package
17419 ;; This is a command-line tool, so no "python-" prefix.
17420 (name "jube")
17421 (version "2.2.2")
17422 (source (origin
17423 (method url-fetch)
17424 (uri (string-append
17425 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
17426 version))
17427 (sha256
17428 (base32
17429 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
17430 (file-name (string-append "jube-" version ".tar.gz"))))
17431 (build-system python-build-system)
17432 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
17433 (synopsis "Benchmarking environment")
17434 (description
17435 "JUBE helps perform and analyze benchmarks in a systematic way. For each
17436benchmarked application, benchmark data is stored in a format that allows JUBE
17437to deduct the desired information. This data can be parsed by automatic pre-
17438and post-processing scripts that draw information and store it more densely
17439for manual interpretation.")
a9f33960 17440 (license license:gpl3+)))
66436424
NG
17441
17442(define-public python-pyroutelib3
17443 (package
17444 (name "python-pyroutelib3")
17445 (version "1.3.post1")
17446 (source
17447 (origin
17448 (method url-fetch)
17449 (uri (pypi-uri "pyroutelib3" version))
17450 (sha256
17451 (base32
17452 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
17453 (build-system python-build-system)
17454 (propagated-inputs
17455 `(("python-dateutil" ,python-dateutil)))
17456 (home-page "https://github.com/MKuranowski/pyroutelib3")
17457 (synopsis "Library for simple routing on OSM data")
17458 (description "Library for simple routing on OSM data")
17459 (license license:gpl3+)))
30e7c03a 17460
c1bbef69
17461(define-public python-bibtexparser
17462 (package
17463 (name "python-bibtexparser")
17464 (version "1.1.0")
17465 (source
17466 (origin
17467 (method url-fetch)
17468 (uri (pypi-uri "bibtexparser" version))
17469 (sha256
17470 (base32
17471 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
17472 (build-system python-build-system)
17473 (propagated-inputs
17474 `(("python-pyparsing" ,python-pyparsing)))
17475 (native-inputs
17476 `(("python-future" ,python-future)))
17477 (home-page "https://github.com/sciunto-org/python-bibtexparser")
17478 (synopsis "Python library to parse BibTeX files")
17479 (description "BibtexParser is a Python library to parse BibTeX files.")
17480 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
17481
17482(define-public python-distro
17483 (package
17484 (name "python-distro")
17485 (version "1.4.0")
17486 (source
17487 (origin
17488 (method url-fetch)
17489 (uri (pypi-uri "distro" version))
17490 (sha256
17491 (base32
17492 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
17493 (build-system python-build-system)
17494 (native-inputs
17495 `(("python-pytest" ,python-pytest)))
17496 (home-page "https://github.com/nir0s/distro")
17497 (synopsis
17498 "OS platform information API")
17499 (description
17500 "@code{distro} provides information about the OS distribution it runs on,
17501such as a reliable machine-readable ID, or version information.
17502
17503It is the recommended replacement for Python's original
17504`platform.linux_distribution` function (which will be removed in Python 3.8).
17505@code{distro} also provides a command-line interface to output the platform
17506information in various formats.")
17507 (license license:asl2.0)))
f2f41e1a
HG
17508
17509(define-public python-cairosvg
17510 (package
17511 (name "python-cairosvg")
17512 (version "2.4.2")
17513 (source
17514 (origin
17515 (method url-fetch)
17516 (uri (pypi-uri "CairoSVG" version))
17517 (sha256
17518 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
17519 (build-system python-build-system)
17520 (arguments
17521 `(#:phases
17522 (modify-phases %standard-phases
17523 (replace 'check
17524 (lambda _ (invoke "pytest"))))))
17525 (propagated-inputs
17526 `(("python-cairocffi" ,python-cairocffi)
17527 ("python-cssselect2" ,python-cssselect2)
17528 ("python-defusedxml" ,python-defusedxml)
17529 ("python-pillow" ,python-pillow)
17530 ("python-tinycss2" ,python-tinycss2)))
17531 (native-inputs
17532 `(("python-pytest-flake8" ,python-pytest-flake8)
17533 ("python-pytest-isort" ,python-pytest-isort)
17534 ("python-pytest-runner" ,python-pytest-runner)))
17535 (home-page "https://cairosvg.org/")
17536 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
17537 (description "CairoSVG is a SVG converter based on Cairo. It can export
17538SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
17539SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
17540parsed, the result is drawn to a Cairo surface that can be exported to
17541qvarious formats: PDF, PostScript, PNG and even SVG.")
17542 (license license:lgpl3+)))
ea1801e0
HG
17543
17544(define-public python-pyphen
17545 (package
17546 (name "python-pyphen")
17547 (version "0.9.5")
17548 (source
17549 (origin
17550 (method url-fetch)
17551 (uri (pypi-uri "Pyphen" version))
17552 (sha256
17553 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
17554 (build-system python-build-system)
17555 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
17556 ;; embedded set provided by upstream - like Debian does.
17557 (home-page "https://github.com/Kozea/Pyphen")
17558 (synopsis "Pure Python module to hyphenate text")
17559 (description "Pyphen is a pure Python module to hyphenate text using
17560existing Hunspell hyphenation dictionaries.")
17561 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
17562
17563(define-public python-intelhex
17564 (package
17565 (name "python-intelhex")
17566 (version "2.2.1")
17567 (source
17568 (origin
17569 (method url-fetch)
17570 (uri (pypi-uri "intelhex" version))
17571 (sha256
17572 (base32
17573 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
17574 (build-system python-build-system)
17575 (arguments '(#:tests? #f)) ;issue with version
17576 (home-page "https://pypi.org/project/IntelHex/")
17577 (synopsis "Python library for Intel HEX files manipulations")
17578 (description "The Intel HEX file format is widely used in microprocessors
17579and microcontrollers area (embedded systems etc.) as the de facto standard for
17580representation of code to be programmed into microelectronic devices. This
17581package provides an intelhex Python library to read, write, create from
17582scratch and manipulate data from Intel HEX file format. It also includes
17583several convenience Python scripts, including \"classic\" hex2bin and bin2hex
17584converters and more, those based on the library itself.")
17585 (license license:bsd-3)))
34bf6869
CL
17586
17587(define-public python-pykwalify
17588 (package
17589 (name "python-pykwalify")
17590 (version "1.7.0")
17591 (source
17592 (origin
17593 (method url-fetch)
17594 (uri (pypi-uri "pykwalify" version))
17595 (sha256
17596 (base32
17597 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
17598 (build-system python-build-system)
17599 (arguments '(#:tests? #f)) ;missing dependencies
17600 (propagated-inputs
17601 `(("python-dateutil" ,python-dateutil)
17602 ("python-docopt" ,python-docopt)
17603 ("python-pyyaml" ,python-pyyaml)))
17604 (home-page "https://github.com/grokzen/pykwalify")
17605 (synopsis
17606 "Python lib/cli for JSON/YAML schema validation")
17607 (description
17608 "This package provides a parser, schema validator, and data binding tool
17609for YAML and JSON.")
17610 (license license:expat)))
e2ebbbcc
KK
17611
17612(define-public python-dbusmock
17613 (package
022b0d5f
BG
17614 (name "python-dbusmock")
17615 (version "0.18.3")
17616 (source
17617 (origin
17618 (method url-fetch)
17619 (uri (pypi-uri "python-dbusmock" version))
17620 (sha256
e2ebbbcc 17621 (base32
022b0d5f
BG
17622 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
17623 (build-system python-build-system)
17624 (arguments
17625 '(#:phases
17626 (modify-phases %standard-phases
17627 (add-after 'unpack 'patch-shell-path
17628 (lambda _
17629 (substitute* "tests/test_code.py"
17630 (("/bin/bash") (which "bash")))
17631 #t)))))
17632 (native-inputs
17633 `(;; For tests.
17634 ("dbus" ,dbus) ; for dbus-daemon
17635 ("python-nose" ,python-nose)
17636 ("which" ,which)))
17637 (propagated-inputs
17638 `(("python-dbus" ,python-dbus)
17639 ("python-pygobject" ,python-pygobject)))
17640 (home-page "https://github.com/martinpitt/python-dbusmock")
17641 (synopsis "Python library for mock D-Bus objects")
17642 (description "python-dbusmock allows for the easy creation of mock objects on
e2ebbbcc
KK
17643D-Bus. This is useful for writing tests for software which talks to D-Bus
17644services such as upower, systemd, logind, gnome-session or others, and it is
17645hard (or impossible without root privileges) to set the state of the real
17646services to what you expect in your tests.")
022b0d5f 17647 (license license:lgpl3+)))
b657b23f
BG
17648
17649(define-public python-ujson
17650 (package
17651 (name "python-ujson")
17652 (version "1.35")
17653 (source
17654 (origin
17655 (method url-fetch)
17656 (uri (pypi-uri "ujson" version))
17657 (sha256
17658 (base32
17659 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
17660 (build-system python-build-system)
17661 (home-page "http://www.esn.me")
17662 (synopsis
17663 "Ultra fast JSON encoder and decoder for Python")
17664 (description
17665 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
17666 bindings for Python 2.5+ and 3.")
17667 (license license:bsd-3)))
17668
17669(define-public python2-ujson
17670 (package-with-python2 python-ujson))
dbcef44a
MIP
17671
17672(define-public python-iocapture
17673 ;; The latest release is more than a year older than this commit.
17674 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
17675 (revision "1"))
17676 (package
17677 (name "python-iocapture")
17678 (version "0.1.2")
17679 (source
17680 (origin
17681 (method git-fetch)
17682 (uri (git-reference
17683 (url "https://github.com/oinume/iocapture.git")
17684 (commit commit)))
17685 (file-name (git-file-name name version))
17686 (sha256
17687 (base32
17688 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
17689 (build-system python-build-system)
17690 (arguments
17691 `(#:phases
17692 (modify-phases %standard-phases
17693 (delete 'check)
17694 (add-after 'install 'check
17695 (lambda* (#:key inputs outputs #:allow-other-keys)
17696 (add-installed-pythonpath inputs outputs)
17697 (invoke "py.test" "-v" "tests")
17698 #t)))))
17699 (propagated-inputs
17700 `(("python-flexmock" ,python-flexmock)
17701 ("python-pytest" ,python-pytest)
17702 ("python-pytest-cov" ,python-pytest-cov)
17703 ("python-six" ,python-six)))
17704 (home-page "https://github.com/oinume/iocapture")
17705 (synopsis "Python capturing tool for stdout and stderr")
17706 (description
17707 "This package helps you to capture the standard out (stdout) and the
17708standard error channel (stderr) in your program.")
17709 (license license:expat))))
db6bd842
MIP
17710
17711(define-public python-argh
17712 ;; There are 21 commits since the latest release containing important
17713 ;; improvements.
17714 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
17715 (revision "1"))
17716 (package
17717 (name "python-argh")
17718 (version (git-version "0.26.2" revision commit))
17719 (source
17720 (origin
17721 (method git-fetch)
17722 (uri (git-reference
17723 (url "https://github.com/neithere/argh.git")
17724 (commit commit)))
17725 (file-name (git-file-name name version))
17726 (sha256
17727 (base32
17728 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
17729 (build-system python-build-system)
17730 (propagated-inputs
17731 `(("python-iocapture" ,python-iocapture)
17732 ("python-mock" ,python-mock)
17733 ("python-pytest" ,python-pytest)
17734 ("python-pytest-cov" ,python-pytest-cov)
17735 ("python-pytest-xdist" ,python-pytest-xdist)
17736 ("python-tox" ,python-tox)))
17737 (home-page "https://github.com/neithere/argh/")
17738 (synopsis "Argparse wrapper with natural syntax")
17739 (description
17740 "python-argh is a small library that provides several layers of
17741abstraction on top of @code{python-argparse}. The layers can be mixed. It is
17742always possible to declare a command with the highest possible (and least
17743flexible) layer and then tune the behaviour with any of the lower layers
17744including the native API of @code{python-argparse}.")
17745 (license license:lgpl3+))))
073723fa
MIP
17746
17747(define-public python-ppft
17748 (package
17749 (name "python-ppft")
17750 (version "1.6.6.1")
17751 (source
17752 (origin
17753 (method url-fetch)
17754 (uri (pypi-uri "ppft" version))
17755 (sha256
17756 (base32
17757 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
17758 (build-system python-build-system)
17759 (arguments '(#:tests? #f)) ; there are none
17760 (propagated-inputs
17761 `(("python-six" ,python-six)))
17762 (home-page "https://pypi.org/project/ppft/")
17763 (synopsis "Fork of Parallel Python")
17764 (description
17765 "This package is a fork of Parallel Python. The Parallel Python
17766module (@code{pp}) provides an easy and efficient way to create
17767parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
17768computers and clusters. It features cross-platform portability and dynamic
17769load balancing.")
17770 (license license:bsd-3)))
8451ea19
MIP
17771
17772(define-public python-pox
17773 (package
17774 (name "python-pox")
17775 (version "0.2.7")
17776 (source
17777 (origin
17778 (method url-fetch)
17779 (uri (pypi-uri "pox" version))
17780 (sha256
17781 (base32
17782 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17783 (build-system python-build-system)
17784 (arguments
17785 `(#:phases
17786 (modify-phases %standard-phases
17787 (replace 'check
17788 (lambda _
17789 (mkdir-p "/tmp/guix")
17790 (setenv "SHELL" "bash")
17791 (setenv "USERNAME" "guix")
17792 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17793 (invoke "py.test" "-vv")
17794 #t)))))
17795 (native-inputs
17796 `(("python-pytest" ,python-pytest)
17797 ("which" ,which)))
17798 (home-page "https://pypi.org/project/pox/")
17799 (synopsis "Python utilities for filesystem exploration and automated builds")
17800 (description
17801 "Pox provides a collection of utilities for navigating and manipulating
17802filesystems. This module is designed to facilitate some of the low level
17803operating system interactions that are useful when exploring a filesystem on a
17804remote host. Pox provides Python equivalents of several shell commands such
17805as @command{which} and @command{find}. These commands allow automated
17806discovery of what has been installed on an operating system, and where the
17807essential tools are located.")
17808 (license license:bsd-3)))
7e476ae8
MIP
17809
17810(define-public python-pathos
17811 (package
17812 (name "python-pathos")
17813 (version "0.2.5")
17814 (source
17815 (origin
17816 (method url-fetch)
17817 (uri (pypi-uri "pathos" version))
17818 (sha256
17819 (base32
17820 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17821 (build-system python-build-system)
8f82e7e3
EF
17822 (arguments
17823 '(#:phases
17824 (modify-phases %standard-phases
17825 (replace 'check
17826 (lambda _
17827 (setenv "PYTHONPATH"
17828 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17829 (invoke "python" "./tests/__main__.py"))))))
7e476ae8
MIP
17830 (propagated-inputs
17831 `(("python-dill" ,python-dill)
17832 ("python-multiprocess" ,python-multiprocess)
17833 ("python-pox" ,python-pox)
17834 ("python-ppft" ,python-ppft)))
8f82e7e3
EF
17835 (native-inputs
17836 `(("python-pytest" ,python-pytest)))
7e476ae8
MIP
17837 (home-page "https://pypi.org/project/pathos/")
17838 (synopsis
17839 "Parallel graph management and execution in heterogeneous computing")
17840 (description
17841 "Python-pathos is a framework for heterogenous computing. It provides a
17842consistent high-level interface for configuring and launching parallel
17843computations across heterogenous resources. Python-pathos provides configurable
17844launchers for parallel and distributed computing, where each launcher contains
17845the syntactic logic to configure and launch jobs in an execution environment.")
17846 (license license:bsd-3)))
54e5ee5a
BG
17847
17848(define-public python-flit
17849 (package
17850 (name "python-flit")
17851 (version "2.1.0")
17852 (source
17853 (origin
17854 (method url-fetch)
17855 (uri (pypi-uri "flit" version))
17856 (sha256
17857 (base32
17858 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17859 (build-system python-build-system)
17860 (arguments
17861 `(#:tests? #f)) ; XXX: Check requires network access.
17862 (home-page "https://flit.readthedocs.io/")
17863 (synopsis
17864 "Simple packaging tool for simple packages")
17865 (description
17866 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17867packages a single importable module or package at a time, using the import
17868name as the name on PyPI. All subpackages and data files within a package
17869are included automatically.")
17870 (license license:bsd-3)))
02139b42
BG
17871
17872(define-public python-pathtools
17873 (package
17874 (name "python-pathtools")
17875 (version "0.1.2")
17876 (source
17877 (origin
17878 (method url-fetch)
17879 (uri (pypi-uri "pathtools" version))
17880 (sha256
17881 (base32
17882 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17883 (build-system python-build-system)
17884 (home-page
17885 "https://github.com/gorakhargosh/pathtools")
17886 (synopsis "Path utilities for Python")
17887 (description "Pattern matching and various utilities for file systems
17888paths.")
17889 (license license:expat)))
6b520177
JG
17890
17891(define-public python-fastentrypoints
17892 (package
17893 (name "python-fastentrypoints")
17894 (version "0.12")
17895 (source
17896 (origin
17897 (method url-fetch)
17898 (uri (pypi-uri "fastentrypoints" version))
17899 (sha256
17900 (base32
17901 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17902 (build-system python-build-system)
17903 (home-page
17904 "https://github.com/ninjaaron/fast-entry_points")
17905 (synopsis
17906 "Makes entry_points specified in setup.py load more quickly")
17907 (description
17908 "Using entry_points in your setup.py makes scripts that start really
17909slowly because it imports pkg_resources. This package allows such setup
17910scripts to load entry points more quickly.")
17911 (license license:bsd-3)))
c5eb8cf8
JG
17912
17913(define-public python-funcparserlib
17914 (package
17915 (name "python-funcparserlib")
17916 (version "0.3.6")
17917 (source
17918 (origin
17919 (method url-fetch)
17920 (uri (pypi-uri "funcparserlib" version))
17921 (sha256
17922 (base32
17923 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17924 (native-inputs
17925 `(("python-tox" ,python-tox)))
17926 (arguments
17927 `(#:phases
17928 (modify-phases %standard-phases
17929 (replace 'check
17930 (lambda _
17931 (invoke "tox"))))))
17932 (build-system python-build-system)
17933 (home-page
17934 "https://github.com/vlasovskikh/funcparserlib")
17935 (synopsis
17936 "Recursive descent parsing library based on functional combinators")
17937 (description
11140cf1 17938 "This package is a recursive descent parsing library for Python based on
c5eb8cf8
JG
17939functional combinators. Parser combinators are just higher-order functions
17940that take parsers as their arguments and return them as result values.")
17941 (license license:expat)))
602f3b67
NG
17942
17943(define-public python-speg
17944 (package
17945 (name "python-speg")
17946 (version "0.3")
17947 (source
17948 (origin
17949 (method url-fetch)
17950 (uri (pypi-uri "speg" version ".zip"))
17951 (sha256
17952 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17953 (arguments
17954 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17955 (native-inputs
17956 `(("unzip" ,unzip)))
17957 (build-system python-build-system)
17958 (home-page "https://github.com/avakar/speg")
17959 (synopsis "PEG-based parser interpreter with memoization")
17960 (description "This package is a PEG-based parser and interpreter with
17961memoization.")
17962 (license license:expat)))
07c8177b
NG
17963
17964(define-public python-cson
17965 (package
17966 (name "python-cson")
17967 (version "0.8")
17968 (source
17969 (origin
17970 (method url-fetch)
17971 (uri (pypi-uri "cson" version))
17972 (sha256
17973 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17974 (build-system python-build-system)
17975 (propagated-inputs
17976 `(("python-speg" ,python-speg)))
17977 (home-page "https://github.com/avakar/pycson")
17978 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17979 (description "This package is a parser for Coffeescript Object
17980Notation (CSON).")
17981 (license license:expat)))
e24c672e
LDB
17982
17983(define-public python-asynctest
17984 (package
17985 (name "python-asynctest")
17986 (version "0.13.0")
17987 (source
17988 (origin
17989 (method url-fetch)
17990 (uri (pypi-uri "asynctest" version))
17991 (sha256
17992 (base32
17993 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17994 (build-system python-build-system)
17995 (arguments
17996 '(#:phases
17997 (modify-phases %standard-phases
17998 (replace 'check
17999 (lambda _
18000 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
18001 (add-after 'unpack 'disable-tests
18002 (lambda* _
18003 (substitute* "test/test_selector.py"
18004 ;; XXX: This test fails for unknown reason inside the build
18005 ;; environment.
18006 (("def test_events_watched_outside_test_are_ignored")
18007 "@unittest.skip('disabled by guix')
18008 def test_events_watched_outside_test_are_ignored")))))))
18009 (home-page "https://github.com/Martiusweb/asynctest")
18010 (synopsis "Extension of unittest for testing asyncio libraries")
18011 (description
18012 "The package asynctest is built on top of the standard unittest module
18013and cuts down boilerplate code when testing libraries for asyncio.")
18014 (license license:asl2.0)))
1cc9c38e
LDB
18015
18016(define-public python-aionotify
18017 (package
18018 (name "python-aionotify")
18019 (version "0.2.0")
18020 (source
18021 (origin
18022 ;; Source tarball on PyPi lacks tests
18023 (method git-fetch)
18024 (uri (git-reference
18025 (url "https://github.com/rbarrois/aionotify")
18026 (commit (string-append "v" version))))
18027 (file-name (git-file-name name version))
18028 (sha256
18029 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
18030 (build-system python-build-system)
18031 (native-inputs `(("python-asynctest" ,python-asynctest)))
18032 (home-page "https://github.com/rbarrois/aionotify")
18033 (synopsis "Asyncio-powered inotify library")
18034 (description
18035 "@code{aionotify} is a simple, asyncio-based inotify library.")
18036 (license license:bsd-3)))
84efaa3b
LDB
18037
18038(define-public python-forbiddenfruit
18039 (package
18040 (name "python-forbiddenfruit")
18041 (version "0.1.3")
18042 (source
18043 (origin
18044 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
18045 (method git-fetch)
18046 (uri (git-reference
18047 (url "https://github.com/clarete/forbiddenfruit")
18048 (commit version)))
18049 (file-name (git-file-name name version))
18050 (sha256
18051 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
18052 (build-system python-build-system)
18053 (arguments
18054 '(#:phases
18055 (modify-phases %standard-phases
18056 (replace 'check
18057 (lambda _
18058 (invoke "make" "SKIP_DEPS=1"))))))
18059 (native-inputs
18060 `(("python-nose" ,python-nose)
18061 ("python-coverage" ,python-coverage)))
18062 (home-page "https://github.com/clarete/forbiddenfruit")
18063 (synopsis "Patch python built-in objects")
18064 (description "This project allows Python code to extend built-in types.")
18065 (license (list license:gpl3+ license:expat))))
9786258b
LDB
18066
18067(define-public python-shouldbe
18068 (package
18069 (name "python-shouldbe")
18070 (version "0.1.2")
18071 (source
18072 (origin
18073 (method url-fetch)
18074 (uri (pypi-uri "shouldbe" version))
18075 (sha256
18076 (base32
18077 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
18078 (build-system python-build-system)
18079 (propagated-inputs
18080 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
18081 (native-inputs
18082 `(("python-nose" ,python-nose)))
18083 (home-page "https://github.com/directxman12/should_be")
18084 (synopsis "Python Assertion Helpers inspired by Shouldly")
18085 (description
18086 "Python Assertion Helpers inspired by Shouldly.")
18087 (license license:isc)))
72c2478a
LDB
18088
18089(define-public python-k5test
18090 (package
18091 (name "python-k5test")
18092 (version "0.9.2")
18093 (source
18094 (origin
18095 (method url-fetch)
18096 (uri (pypi-uri "k5test" version))
18097 (sha256
18098 (base32
18099 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
18100 (build-system python-build-system)
18101 (propagated-inputs
18102 `(("python-six" ,python-six)
18103 ;; `which`, `kadmin.local` binaries called inside library
18104 ("which" ,which)
18105 ("mit-krb5" ,mit-krb5)))
18106 (native-inputs `(("mit-krb5" ,mit-krb5)))
18107 (arguments
18108 '(#:phases
18109 (modify-phases %standard-phases
18110 (add-after 'unpack 'patch-paths
18111 (lambda* _
18112 (substitute* "k5test/realm.py"
18113 (("'kadmin_local'") "'kadmin.local'")))))))
18114 (home-page "https://github.com/pythongssapi/k5test")
18115 (synopsis "Library for setting up self-contained Kerberos 5 environments")
18116 (description
18117 "@code{k5test} is a library for setting up self-contained Kerberos 5
18118environments, and running Python unit tests inside those environments. It is
18119based on the file of the same name found alongside the MIT Kerberos 5 unit
18120tests.")
18121 (license license:isc)))
a8ef4978
LDB
18122
18123(define-public python-gssapi
18124 (package
18125 (name "python-gssapi")
18126 (version "1.6.1")
18127 (source
18128 (origin
18129 (method url-fetch)
18130 (uri (pypi-uri "gssapi" version))
18131 (sha256
18132 (base32
18133 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
18134 (build-system python-build-system)
18135 (propagated-inputs
18136 `(("python-decorator" ,python-decorator)
18137 ("python-six" ,python-six)))
18138 (inputs
18139 `(("mit-krb5" ,mit-krb5)))
18140 ;; for tests
18141 (native-inputs
18142 `(("python-shouldbe" ,python-shouldbe)
18143 ("python-parameterized" ,python-parameterized)
18144 ("python-k5test" ,python-k5test)
18145 ("python-nose" ,python-nose)))
18146 (home-page "https://github.com/pythongssapi/python-gssapi")
18147 (synopsis "Python GSSAPI Wrapper")
18148 (description
18149 "Python-GSSAPI provides both low-level and high level wrappers around the
18150GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
18151also be useable with other GSSAPI mechanisms.")
18152 (license license:isc)))
7261bdca
JL
18153
18154(define-public python-check-manifest
18155 (package
18156 (name "python-check-manifest")
18157 (version "0.37")
18158 (source
18159 (origin
18160 (method url-fetch)
18161 (uri (pypi-uri "check-manifest" version))
18162 (sha256
18163 (base32
18164 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
18165 (build-system python-build-system)
18166 (native-inputs
18167 `(("python-mock" ,python-mock)
18168 ("git" ,git)))
18169 (home-page "https://github.com/mgedmin/check-manifest")
18170 (synopsis "Check MANIFEST.in in a Python source package for completeness")
18171 (description "Python package can include a MANIFEST.in file to help with
18172sending package files to the Python Package Index. This package checks that
18173file to ensure it completely and accurately describes your project.")
18174 (license license:expat)))
b487b7b5
JL
18175
18176(define-public python-android-stringslib
18177 (package
18178 (name "python-android-stringslib")
18179 (version "0.1.2")
18180 (source
18181 (origin
18182 (method git-fetch)
18183 (uri (git-reference
18184 (url "https://framagit.org/tyreunom/python-android-strings-lib")
18185 (commit (string-append "v" version))))
18186 (file-name (git-file-name name version))
18187 (sha256
18188 (base32
18189 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
18190 (build-system python-build-system)
18191 (arguments
18192 `(#:tests? #f))
18193 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
18194 (synopsis "Android strings.xml support")
18195 (description "Android Strings Lib provides support for android's strings.xml
18196files. These files are used to translate strings in android apps.")
18197 (license license:expat)))
87435943 18198
7dec888f
JL
18199(define-public python-watchdog
18200 (package
18201 (name "python-watchdog")
18202 (version "0.9.0")
18203 (source
18204 (origin
18205 (method url-fetch)
18206 (uri (pypi-uri "watchdog" version))
18207 (sha256
18208 (base32
18209 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
18210 (build-system python-build-system)
18211 (arguments
18212 `(#:phases
18213 (modify-phases %standard-phases
18214 (add-before 'check 'remove-failing
18215 (lambda _
18216 (delete-file "tests/test_inotify_buffer.py")
18217 (delete-file "tests/test_snapshot_diff.py")
18218 #t)))))
18219 (propagated-inputs
18220 `(("python-argh" ,python-argh)
18221 ("python-pathtools" ,python-pathtools)
18222 ("python-pyyaml" ,python-pyyaml)))
18223 (native-inputs
18224 `(("python-pytest-cov" ,python-pytest-cov)
18225 ("python-pytest-timeout" ,python-pytest-timeout)))
18226 (home-page "https://github.com/gorakhargosh/watchdog")
18227 (synopsis "Filesystem events monitoring")
18228 (description "This package provides a way to monitor filesystem events
18229such as a file modification and trigger an action. This is similar to inotify,
18230but portable.")
18231 (license license:asl2.0)))
2cbede59 18232
9c9704a9
MC
18233(define-public python-wget
18234 (package
18235 (name "python-wget")
18236 (version "3.2")
18237 (source
18238 (origin
18239 (method url-fetch)
18240 (uri (pypi-uri "wget" version ".zip"))
18241 (sha256
18242 (base32
18243 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
18244 (build-system python-build-system)
18245 (native-inputs `(("unzip" ,unzip)))
18246 (home-page "https://bitbucket.org/techtonik/python-wget/")
18247 (synopsis "Pure Python download utility")
18248 (description "The python-wget library provides an API to download files
18249with features similar to the @command{wget} utility.")
18250 (license license:unlicense)))
18251
2cbede59
JL
18252(define-public offlate
18253 (package
18254 (name "offlate")
18255 (version "0.5")
18256 (source
18257 (origin
18258 (method git-fetch)
18259 (uri (git-reference
18260 (url "https://framagit.org/tyreunom/offlate")
18261 (commit version)))
18262 (file-name (git-file-name name version))
18263 (sha256
18264 (base32
18265 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
18266 (build-system python-build-system)
18267 (arguments
18268 ;; No tests
18269 `(#:tests? #f))
18270 (propagated-inputs
18271 `(("python-android-stringslib" ,python-android-stringslib)
18272 ("python-dateutil" ,python-dateutil)
18273 ("python-gitlab" ,python-gitlab)
18274 ("python-lxml" ,python-lxml)
18275 ("python-polib" ,python-polib)
18276 ("python-pyenchant" ,python-pyenchant)
18277 ("python-pygit2" ,python-pygit2)
18278 ("python-pygithub" ,python-pygithub)
18279 ("python-pyqt" ,python-pyqt)
18280 ("python-requests" ,python-requests)
18281 ("python-ruamel.yaml" ,python-ruamel.yaml)
18282 ("python-translation-finder" ,python-translation-finder)
18283 ("python-watchdog" ,python-watchdog)))
18284 (native-inputs
18285 `(("qttools" ,qttools)))
18286 (home-page "https://framagit.org/tyreunom/offlate")
18287 (synopsis "Offline translation interface for online translation tools")
18288 (description "Offlate offers a unified interface for different translation
18289file formats, as well as many different online translation platforms. You can
18290use it to get work from online platforms, specialized such as the Translation
18291Project, or not such a gitlab instance when your upstream doesn't use any
18292dedicated platform. The tool proposes a unified interface for any format and
18293an upload option to send your work back to the platform.")
18294 (license license:gpl3+)))
479f4013
JK
18295
18296(define-public python-pypng
18297 (package
18298 (name "python-pypng")
18299 (version "0.0.20")
18300 (source
18301 (origin
18302 (method url-fetch)
18303 (uri (pypi-uri "pypng" version))
18304 (sha256
18305 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
18306 (build-system python-build-system)
18307 (home-page "https://github.com/drj11/pypng")
18308 (synopsis "Pure Python PNG image encoder/decoder")
18309 (description
18310 "The PyPNG module implements support for PNG images. It reads and writes
18311PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
18312pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
18313LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
18314images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
18315A number of optional chunks can be specified (when writing) and
18316understood (when reading): tRNS, bKGD, gAMA.
18317
18318PyPNG is not a high level toolkit for image processing (like PIL) and does not
18319aim at being a replacement or competitor. Its strength lies in fine-grained
18320extensive support of PNG features. It can also read and write Netpbm PAM
18321files, with a focus on its use as an intermediate format for implementing
18322custom PNG processing.")
18323 (license license:expat)))
da8ca4c3 18324
18325(define-public python-fuzzywuzzy
18326 (package
18327 (name "python-fuzzywuzzy")
18328 (version "0.18.0")
18329 (source
18330 (origin
18331 (method url-fetch)
18332 (uri (pypi-uri "fuzzywuzzy" version))
18333 (sha256
18334 (base32
18335 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
18336 (build-system python-build-system)
18337 (native-inputs
18338 `(("python-hypothesis" ,python-hypothesis)
18339 ("python-pycodestyle" ,python-pycodestyle)
18340 ("python-pytest" ,python-pytest)))
18341 (propagated-inputs
18342 `(("python-levenshtein" ,python-levenshtein)))
18343 (home-page "https://github.com/seatgeek/fuzzywuzzy")
7d9f8db2 18344 (synopsis "Fuzzy string matching in Python")
da8ca4c3 18345 (description "Approximate string matching using
18346@emph{Levenshtein Distance} to calculate the differences between
18347sequences.")
18348 (license license:gpl2)))
18349
18350(define-public python2-fuzzywuzzy
18351 (package-with-python2 python-fuzzywuzzy))