gnu: oil-shell: Update to 0.6.0
[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>
2d040763 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 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>
10;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
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>
17;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
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>
22;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
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>
ea43f0d5 29;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
44d10b1f
RW
30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
e746d1c3 32;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
44d10b1f
RW
33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
217ea1a1 35;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
44d10b1f
RW
36;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
dcfa0acd 47;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
44d10b1f
RW
48;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
412342d1 54;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
44d10b1f
RW
55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
4caf37b0 57;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
44d10b1f
RW
58;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
a9ba0a31 60;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
a91f4eba 61;;; Copyright © 2019 Sam <smbaines8@gmail.com>
8c141421 62;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
f825e605 63;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
fb236fdd 64;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
edeb04bf 65;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
e308b4f0 66;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
44d10b1f
RW
67;;;
68;;; This file is part of GNU Guix.
69;;;
70;;; GNU Guix is free software; you can redistribute it and/or modify it
71;;; under the terms of the GNU General Public License as published by
72;;; the Free Software Foundation; either version 3 of the License, or (at
73;;; your option) any later version.
74;;;
75;;; GNU Guix is distributed in the hope that it will be useful, but
76;;; WITHOUT ANY WARRANTY; without even the implied warranty of
77;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
78;;; GNU General Public License for more details.
79;;;
80;;; You should have received a copy of the GNU General Public License
81;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
82
83(define-module (gnu packages python-xyz)
84 #:use-module ((guix licenses) #:prefix license:)
85 #:use-module (gnu packages)
86 #:use-module (gnu packages algebra)
87 #:use-module (gnu packages adns)
88 #:use-module (gnu packages attr)
89 #:use-module (gnu packages backup)
90 #:use-module (gnu packages bash)
91 #:use-module (gnu packages check)
92 #:use-module (gnu packages compression)
93 #:use-module (gnu packages crypto)
94 #:use-module (gnu packages databases)
f825e605 95 #:use-module (gnu packages dbm)
44d10b1f
RW
96 #:use-module (gnu packages file)
97 #:use-module (gnu packages fontutils)
98 #:use-module (gnu packages gcc)
99 #:use-module (gnu packages geo)
100 #:use-module (gnu packages ghostscript)
101 #:use-module (gnu packages gl)
102 #:use-module (gnu packages glib)
103 #:use-module (gnu packages graphviz)
104 #:use-module (gnu packages graphics)
105 #:use-module (gnu packages gstreamer)
106 #:use-module (gnu packages gtk)
107 #:use-module (gnu packages icu4c)
108 #:use-module (gnu packages image)
109 #:use-module (gnu packages imagemagick)
110 #:use-module (gnu packages libevent)
111 #:use-module (gnu packages libffi)
112 #:use-module (gnu packages linux)
113 #:use-module (gnu packages llvm)
114 #:use-module (gnu packages man)
115 #:use-module (gnu packages maths)
42f0b0c2 116 #:use-module (gnu packages monitoring)
44d10b1f
RW
117 #:use-module (gnu packages multiprecision)
118 #:use-module (gnu packages networking)
119 #:use-module (gnu packages ncurses)
120 #:use-module (gnu packages openstack)
121 #:use-module (gnu packages pcre)
122 #:use-module (gnu packages perl)
123 #:use-module (gnu packages pkg-config)
124 #:use-module (gnu packages python)
d362b11d 125 #:use-module (gnu packages python-check)
15b65617 126 #:use-module (gnu packages python-compression)
44d10b1f
RW
127 #:use-module (gnu packages python-crypto)
128 #:use-module (gnu packages python-web)
129 #:use-module (gnu packages qt)
130 #:use-module (gnu packages readline)
131 #:use-module (gnu packages sdl)
132 #:use-module (gnu packages search)
133 #:use-module (gnu packages shells)
9d0c291e 134 #:use-module (gnu packages sphinx)
44d10b1f
RW
135 #:use-module (gnu packages ssh)
136 #:use-module (gnu packages terminals)
137 #:use-module (gnu packages tex)
138 #:use-module (gnu packages texinfo)
139 #:use-module (gnu packages time)
140 #:use-module (gnu packages tls)
141 #:use-module (gnu packages version-control)
142 #:use-module (gnu packages video)
143 #:use-module (gnu packages web)
144 #:use-module (gnu packages base)
145 #:use-module (gnu packages xml)
146 #:use-module (gnu packages xorg)
147 #:use-module (gnu packages xdisorg)
148 #:use-module (gnu packages tcl)
149 #:use-module (gnu packages bdw-gc)
f98232a3 150 #:use-module (gnu packages serialization)
44d10b1f
RW
151 #:use-module (guix packages)
152 #:use-module (guix download)
153 #:use-module (guix git-download)
a042d348 154 #:use-module (guix hg-download)
44d10b1f
RW
155 #:use-module (guix utils)
156 #:use-module (guix build-system gnu)
157 #:use-module (guix build-system cmake)
158 #:use-module (guix build-system python)
159 #:use-module (guix build-system trivial)
160 #:use-module (srfi srfi-1)
161 #:use-module (srfi srfi-26))
162
163(define-public python-psutil
164 (package
165 (name "python-psutil")
7abf3cbf 166 (version "5.6.2")
44d10b1f
RW
167 (source
168 (origin
169 (method url-fetch)
170 (uri (pypi-uri "psutil" version))
171 (sha256
172 (base32
7abf3cbf 173 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
44d10b1f
RW
174 (build-system python-build-system)
175 (arguments
176 ;; FIXME: some tests does not return and times out.
177 '(#:tests? #f))
178 (home-page "https://www.github.com/giampaolo/psutil")
179 (synopsis "Library for retrieving information on running processes")
180 (description
181 "psutil (Python system and process utilities) is a library for retrieving
182information on running processes and system utilization (CPU, memory, disks,
183network) in Python. It is useful mainly for system monitoring, profiling and
184limiting process resources and management of running processes. It implements
185many functionalities offered by command line tools such as: ps, top, lsof,
186netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
187pidof, tty, taskset, pmap.")
188 (properties `((python2-variant . ,(delay python2-psutil))))
189 (license license:bsd-3)))
190
191(define-public python2-psutil
192 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
193 (package
194 (inherit base)
195 (propagated-inputs
196 `(("python2-enum34" ,python2-enum34) ;optional
197 ,@(package-propagated-inputs base))))))
198
199(define-public python-shapely
200 (package
201 (name "python-shapely")
6d94465b 202 (version "1.6.4.post2")
44d10b1f
RW
203 (source
204 (origin
205 (method url-fetch)
206 (uri (pypi-uri "Shapely" version))
207 (sha256
208 (base32
6d94465b 209 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
210 (build-system python-build-system)
211 (native-inputs
212 `(("python-cython" ,python-cython)
213 ("python-matplotlib" ,python-matplotlib)
214 ("python-pytest" ,python-pytest)
215 ("python-pytest-cov" ,python-pytest-cov)))
216 (inputs
217 `(("geos" ,geos)))
218 (propagated-inputs
219 `(("python-numpy" ,python-numpy)))
220 (arguments
221 `(#:phases
222 (modify-phases %standard-phases
223 (add-after 'unpack 'patch-geos-path
224 (lambda* (#:key inputs #:allow-other-keys)
225 (let ((geos (assoc-ref inputs "geos"))
226 (glibc (assoc-ref inputs ,(if (%current-target-system)
227 "cross-libc" "libc"))))
228 (substitute* "shapely/geos.py"
229 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
230 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
231 geos "/lib/libgeos_c.so'])"))
232 (("free = load_dll\\('c'\\)\\.free")
233 (string-append "free = load_dll('c', fallbacks=['"
234 glibc "/lib/libc.so.6']).free"))))
235 #t)))))
236 (home-page "https://github.com/Toblerity/Shapely")
237 (synopsis "Library for the manipulation and analysis of geometric objects")
238 (description "Shapely is a Python package for manipulation and analysis of
239planar geometric objects. It is based on the @code{GEOS} library.")
240 (license license:bsd-3)))
241
a91f4eba
S
242(define-public python-shortuuid
243 (package
244 (name "python-shortuuid")
245 (version "0.5.0")
246 (source
247 (origin
248 (method url-fetch)
249 (uri (pypi-uri "shortuuid" version))
250 (sha256
251 (base32
252 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
253 (build-system python-build-system)
254 (native-inputs
255 `(("python-pep8" ,python-pep8)))
256 (home-page "https://github.com/skorokithakis/shortuuid")
257 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
258 (description
259 "@code{shortuuid} is a Python library for generating concise, unambiguous
260and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
261module and then similar looking characters are removed.")
262 (license license:bsd-3)))
263
44d10b1f
RW
264(define-public python-logwrap
265 (package
266 (name "python-logwrap")
267 (version "3.2.1")
268 (source
269 (origin
270 (method url-fetch)
271 (uri (pypi-uri "logwrap" version ".zip"))
272 (sha256
273 (base32
274 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
275 (build-system python-build-system)
276 (propagated-inputs
277 `(("python-six" ,python-six)
278 ("python-typing" ,python-typing)))
279 (native-inputs
280 `(("unzip" ,unzip)
281 ("python-cython" ,python-cython)
282 ("python-pytest" ,python-pytest)
283 ("python-pytest-cov" ,python-pytest-cov)
284 ("python-pytest-runner" ,python-pytest-runner)))
285 (home-page "https://github.com/penguinolog/logwrap")
286 (synopsis "Decorator for logging function arguments")
287 (description "This package provides a decorator to log function arguments
288and function call return values in a human-readable way.")
289 (license license:asl2.0)))
290
291(define-public python2-shapely
292 (package-with-python2 python-shapely))
293
294(define-public python-clyent
295 (package
296 (name "python-clyent")
297 (version "1.2.1")
298 (source
299 (origin
300 (method url-fetch)
301 (uri (pypi-uri "clyent" version))
302 (sha256
303 (base32
304 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
305 (build-system python-build-system)
306 (native-inputs
307 `(("python-mock" ,python-mock)))
308 (home-page "https://github.com/binstar/clyent")
309 (synopsis "Command line client library")
310 (description "Clyent is a Python command line utiliy library. It is used
311by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
312 (license license:bsd-3)))
313
314(define-public python2-clyent
315 (package-with-python2 python-clyent))
316
317(define-public python-babel
318 (package
319 (name "python-babel")
93253411 320 (version "2.7.0")
44d10b1f
RW
321 (source
322 (origin
323 (method url-fetch)
324 (uri (pypi-uri "Babel" version))
325 (sha256
326 (base32
93253411 327 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
328 (build-system python-build-system)
329 (native-inputs
330 `(("python-freezegun" ,python-freezegun)
331 ("python-pytest" ,python-pytest)))
332 (propagated-inputs
333 `(("python-pytz" ,python-pytz)))
334 (arguments
335 `(#:phases (modify-phases %standard-phases
336 (replace 'check
337 (lambda _ (invoke "pytest" "-vv"))))))
338 (home-page "http://babel.pocoo.org/")
339 (synopsis
340 "Tools for internationalizing Python applications")
341 (description
342 "Babel is composed of two major parts:
343- tools to build and work with gettext message catalogs
344- a Python interface to the CLDR (Common Locale Data Repository), providing
345access to various locale display names, localized number and date formatting,
346etc. ")
347 (license license:bsd-3)))
348
349(define-public python2-babel
350 (package-with-python2 python-babel))
351
93253411
MB
352;; Sphinx < 2.0 requires this version. Remove once no longer needed.
353(define-public python2-babel-2.6
354 (package
355 (inherit python2-babel)
356 (version "2.6.0")
357 (source (origin
358 (method url-fetch)
359 (uri (pypi-uri "Babel" version))
360 (sha256
361 (base32
362 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
363
44d10b1f
RW
364(define-public python2-backport-ssl-match-hostname
365 (package
366 (name "python2-backport-ssl-match-hostname")
367 (version "3.5.0.1")
368 (source
369 (origin
370 (method url-fetch)
2c1f0d09 371 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
372 (sha256
373 (base32
374 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
375 (build-system python-build-system)
376 (arguments
377 `(#:python ,python-2
378 #:tests? #f)) ; no test target
379 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
380 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
381 (description
382 "This backport brings the ssl.match_hostname() function to users of
383earlier versions of Python. The function checks the hostname in the
384certificate returned by the server to which a connection has been established,
385and verifies that it matches the intended target hostname.")
386 (license license:psfl)))
387
388(define-public python-hdf4
389 (package
390 (name "python-hdf4")
391 (version "0.9")
392 (source
393 (origin
394 (method url-fetch)
395 (uri (pypi-uri name version))
396 (sha256
397 (base32
398 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
399 (build-system python-build-system)
400 (native-inputs `(("nose" ,python-nose)))
401 (propagated-inputs `(("numpy" ,python-numpy)))
402 (inputs
403 `(("hdf4" ,hdf4)
404 ("libjpeg" ,libjpeg)
405 ("zlib" ,zlib)))
406 (arguments
407 `(#:phases
408 (modify-phases %standard-phases
409 (replace 'check
410 (lambda _
411 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
412 ;; on to import numpy. Somehow this works on their CI system.
413 ;; Let's just manage PYTHONPATH here instead.
414 (substitute* "runexamples.sh"
415 (("export PYTHONPATH=.*") ""))
416 (setenv "PYTHONPATH"
417 (string-append (getcwd) ":"
418 (getenv "PYTHONPATH")))
419 (invoke "./runexamples.sh")
420 (invoke "nosetests" "-v"))))))
421 (home-page "https://github.com/fhs/python-hdf4")
422 (synopsis "Python interface to the NCSA HDF4 library")
423 (description
424 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
425which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
426NetCDF files can also be read and modified. Python-HDF4 is a fork of
427@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
428 (license license:expat)))
429
430(define-public python2-hdf4
431 (package-with-python2 python-hdf4))
432
433(define-public python-h5py
434 (package
435 (name "python-h5py")
436 (version "2.8.0")
437 (source
438 (origin
439 (method url-fetch)
440 (uri (pypi-uri "h5py" version))
441 (sha256
442 (base32
443 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
444 (build-system python-build-system)
445 (arguments
446 `(#:tests? #f ; no test target
447 #:phases
448 (modify-phases %standard-phases
449 (add-after 'unpack 'fix-hdf5-paths
450 (lambda* (#:key inputs #:allow-other-keys)
451 (let ((prefix (assoc-ref inputs "hdf5")))
452 (substitute* "setup_build.py"
453 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
454 (string-append "['" prefix "/lib" "']"))
455 (("'/opt/local/include', '/usr/local/include'")
456 (string-append "'" prefix "/include" "'")))
457 (substitute* "setup_configure.py"
458 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
459 (string-append "['" prefix "/lib" "']")))
460 #t))))))
461 (propagated-inputs
462 `(("python-six" ,python-six)
463 ("python-numpy" ,python-numpy)))
464 (inputs
465 `(("hdf5" ,hdf5)))
466 (native-inputs
467 `(("python-cython" ,python-cython)
468 ("python-pkgconfig" ,python-pkgconfig)))
469 (home-page "http://www.h5py.org/")
470 (synopsis "Read and write HDF5 files from Python")
471 (description
472 "The h5py package provides both a high- and low-level interface to the
473HDF5 library from Python. The low-level interface is intended to be a
474complete wrapping of the HDF5 API, while the high-level component supports
475access to HDF5 files, datasets and groups using established Python and NumPy
476concepts.")
477 (license license:bsd-3)))
478
479(define-public python2-h5py
480 (package-with-python2 python-h5py))
481
8b89dedc
RW
482(define-public python-sh
483 (package
484 (name "python-sh")
485 (version "1.12.14")
486 (source
487 (origin
488 (method url-fetch)
489 (uri (pypi-uri "sh" version))
490 (sha256
491 (base32
492 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
493 (build-system python-build-system)
fd3638d8
EF
494 (arguments
495 '(#:phases
496 (modify-phases %standard-phases
497 (replace 'check
498 (lambda _
ca983a2f
NG
499 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
500 (setenv "HOME" "/tmp")
fd3638d8
EF
501 (invoke "python" "sh.py" "test"))))))
502 (native-inputs
503 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
504 (home-page "https://github.com/amoffat/sh")
505 (synopsis "Python subprocess replacement")
506 (description "This package provides a replacement for Python's
507@code{subprocess} feature.")
508 (license license:expat)))
509
3869effd
RW
510(define-public python2-sh
511 (package-with-python2 python-sh))
512
d362b11d
RW
513(define-public python-cftime
514 (package
515 (name "python-cftime")
516 (version "1.0.3.4")
517 (source
518 (origin
519 (method url-fetch)
520 (uri (pypi-uri "cftime" version))
521 (sha256
522 (base32
523 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
524 (build-system python-build-system)
525 (propagated-inputs
526 `(("python-numpy" ,python-numpy)))
527 (native-inputs
528 `(("python-coveralls" ,python-coveralls)
529 ("python-cython" ,python-cython)
530 ("python-pytest-cov" ,python-pytest-cov)))
531 (home-page "https://github.com/Unidata/cftime")
532 (synopsis "Library for time handling")
533 (description
534 "This package provides time-handling functionality that used to be part
535of the netcdf4 package before.")
536 ;; This package claims to include code under the GPLv3 but is released
537 ;; under ISC.
538 (license (list license:isc license:gpl3+))))
539
44d10b1f
RW
540(define-public python-netcdf4
541 (package
542 (name "python-netcdf4")
93e7b209 543 (version "1.4.2")
44d10b1f
RW
544 (source
545 (origin
546 (method url-fetch)
547 (uri (pypi-uri "netCDF4" version))
548 (sha256
549 (base32
93e7b209 550 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 551 (build-system python-build-system)
93e7b209
RW
552 (arguments
553 '(#:phases
554 (modify-phases %standard-phases
555 (add-after 'unpack 'configure-locations
556 (lambda* (#:key inputs #:allow-other-keys)
557 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
558 #t)))))
44d10b1f
RW
559 (native-inputs
560 `(("python-cython" ,python-cython)))
561 (propagated-inputs
93e7b209
RW
562 `(("python-numpy" ,python-numpy)
563 ("python-cftime" ,python-cftime)))
44d10b1f
RW
564 (inputs
565 `(("netcdf" ,netcdf)
566 ("hdf4" ,hdf4)
567 ("hdf5" ,hdf5)))
93e7b209 568 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
569 (synopsis "Python/numpy interface to the netCDF library")
570 (description "Netcdf4-python is a Python interface to the netCDF C
571library. netCDF version 4 has many features not found in earlier
572versions of the library and is implemented on top of HDF5. This module
573can read and write files in both the new netCDF 4 and the old netCDF 3
574format, and can create files that are readable by HDF5 clients. The
575API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
576to users of that module.")
577 ;; The software is mainly ISC, but includes some files covered
578 ;; by the Expat license.
579 (license (list license:isc license:expat))))
580
581(define-public python2-netcdf4
582 (package-with-python2 python-netcdf4))
583
584(define-public python-lockfile
585 (package
586 (name "python-lockfile")
587 (version "0.12.2")
588 (source
589 (origin
590 (method url-fetch)
8318bf07 591 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
592 (sha256
593 (base32
594 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
595 (build-system python-build-system)
596 (arguments '(#:test-target "check"))
597 (native-inputs
598 `(("python-pbr" ,python-pbr)))
599 (home-page "https://launchpad.net/pylockfile")
600 (synopsis "Platform-independent file locking module")
601 (description
602 "The lockfile package exports a LockFile class which provides a simple
603API for locking files.")
604 (license license:expat)))
605
606(define-public python2-lockfile
607 (package-with-python2 python-lockfile))
608
609(define-public python-semantic-version
610 (package
611 (name "python-semantic-version")
612 (version "2.6.0")
613 (source
614 (origin
615 (method url-fetch)
616 (uri (pypi-uri "semantic_version" version))
617 (sha256
618 (base32
619 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
620 (build-system python-build-system)
621 (arguments
622 `(#:tests? #f)) ; PyPI tarball lacks tests
623 (home-page "https://github.com/rbarrois/python-semanticversion")
624 (synopsis "Semantic versioning module for Python")
625 (description
626 "The @code{semantic_version} class is a small library for handling
627@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
628
629It can compare versions, generate a new version that represents a bump in one of
630the version levels, and check whether any given string is a proper semantic
631version identifier.")
632 (license license:bsd-3)))
633
634(define-public python2-semantic-version
635 (package-with-python2 python-semantic-version))
636
637(define-public python-serpent
638 (package
639 (name "python-serpent")
fa9d14ac 640 (version "1.28")
44d10b1f
RW
641 (source
642 (origin
643 (method url-fetch)
644 (uri (pypi-uri "serpent" version))
645 (sha256
fa9d14ac 646 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 647 (build-system python-build-system)
fa9d14ac
TGR
648 (native-inputs
649 `(("python-attrs" ,python-attrs)
650 ("python-pytz" ,python-pytz)))
44d10b1f
RW
651 (home-page "https://github.com/irmen/Serpent")
652 (synopsis "Serializer for literal Python expressions")
653 (description
1d3c7803
TGR
654 "Serpent provides @code{ast.literal_eval()}-compatible object tree
655serialization. It serializes an object tree into bytes (an utf-8 encoded
656string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
657to rebuild the original object tree.
658
659Because only safe literals are encoded, it is safe to send serpent data to
660other machines, such as over the network.")
44d10b1f
RW
661 (license license:expat)))
662
663(define-public python-setuptools
664 (package
665 (name "python-setuptools")
e39d4933 666 (version "41.0.1")
44d10b1f
RW
667 (source
668 (origin
669 (method url-fetch)
670 (uri (pypi-uri "setuptools" version ".zip"))
671 (sha256
672 (base32
e39d4933 673 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
674 (modules '((guix build utils)))
675 (snippet
676 '(begin
677 ;; Remove included binaries which are used to build self-extracting
678 ;; installers for Windows.
679 ;; TODO: Find some way to build them ourself so we can include them.
680 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
681 #t))))
682 (build-system python-build-system)
683 ;; FIXME: Tests require pytest, which itself relies on setuptools.
684 ;; One could bootstrap with an internal untested setuptools.
685 (arguments
686 `(#:tests? #f))
687 (home-page "https://pypi.python.org/pypi/setuptools")
688 (synopsis
689 "Library designed to facilitate packaging Python projects")
690 (description
691 "Setuptools is a fully-featured, stable library designed to facilitate
692packaging Python projects, where packaging includes:
693Python package and module definitions,
694distribution package metadata,
695test hooks,
696project installation,
697platform-specific details,
698Python 3 support.")
699 ;; TODO: setuptools now bundles the following libraries:
700 ;; packaging, pyparsing, six and appdirs. How to unbundle?
701 (license (list license:psfl ; setuptools itself
702 license:expat ; six, appdirs, pyparsing
703 license:asl2.0 ; packaging is dual ASL2/BSD-2
704 license:bsd-2))))
705
706(define-public python2-setuptools
707 (package-with-python2 python-setuptools))
708
709(define-public python-uniseg
710 (package
711 (name "python-uniseg")
712 (version "0.7.1")
713 (source
714 (origin
715 (method url-fetch)
716 (uri (pypi-uri "uniseg" version ".zip"))
717 (sha256
718 (base32
719 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
720 (build-system python-build-system)
721 (arguments
722 '(#:tests? #f)) ; The test suite requires network access.
723 (native-inputs
724 `(("unzip" ,unzip)))
725 (home-page
726 "https://bitbucket.org/emptypage/uniseg-python")
727 (synopsis
728 "Python library to determine Unicode text segmentations")
729 (description
730 "Uniseg is a Python package used to determine Unicode text segmentations.
731Supported segmentations include:
732@enumerate
733@item @dfn{Code point} (any value in the Unicode codespace)
734@item @dfn{Grapheme cluster} (user-perceived character made of a single or
735multiple Unicode code points, e.g. \"G\" + acute-accent)
736@item Word break
737@item Sentence break
738@item Line break
739@end enumerate")
740 (license license:expat)))
741
742(define-public python2-uniseg
743 (package-with-python2 python-uniseg))
744
745(define-public python-humanfriendly
746 (package
747 (name "python-humanfriendly")
748 (version "4.4.1")
749 (source
750 (origin
751 (method url-fetch)
752 (uri (pypi-uri "humanfriendly" version))
753 (sha256
754 (base32
755 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
756 (build-system python-build-system)
757 (arguments
758 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
759 #:tests? #f))
760 (propagated-inputs
761 `(("python-monotonic" ,python-monotonic)))
762 (home-page "https://humanfriendly.readthedocs.io")
763 (synopsis "Human-friendly input and output in Python")
764 (description
765 "The functions and classes in @code{humanfriendly} can be used to make
766text interfaces more user-friendly. It includes tools to parse and format
767numbers, file sizes, and timespans, timers for long-running operations, menus
768to allow the user to choose from a list of options, and terminal interaction
769helpers.")
770 (license license:expat)))
771
772(define-public python2-humanfriendly
773 (package-with-python2 python-humanfriendly))
774
775(define-public python-capturer
776 (package
777 (name "python-capturer")
778 (version "2.4")
779 (source
780 (origin
781 (method url-fetch)
782 (uri (pypi-uri "capturer" version))
783 (sha256
784 (base32
785 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
786 (build-system python-build-system)
787 (arguments
788 `(#:tests? #f))
789 (propagated-inputs
790 `(("python-humanfriendly" ,python-humanfriendly)))
791 (home-page "https://capturer.readthedocs.io")
792 (synopsis "Capture stdout and stderr streams of the current process")
793 (description
794 "The capturer package makes it easy to capture the stdout and stderr
795streams of the current process and subprocesses. Output can be relayed
796to the terminal in real time but is also available to the Python program
797for additional processing.")
798 (license license:expat)))
799
800(define-public python2-capturer
801 (package-with-python2 python-capturer))
802
803(define-public python-case
804 (package
805 (name "python-case")
806 (version "1.5.3")
807 (source
808 (origin
809 (method url-fetch)
810 (uri (pypi-uri "case" version))
811 (sha256
812 (base32
813 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
814 (build-system python-build-system)
815 (propagated-inputs
816 `(("python-mock" ,python-mock)
817 ("python-nose" ,python-nose)
818 ("python-six" ,python-six)
819 ("python-unittest2" ,python-unittest2)))
820 (native-inputs
821 `(("python-coverage" ,python-coverage)))
822 (home-page "https://github.com/celery/case")
823 (synopsis "Unittest utilities and convenience methods")
824 (description
825 "The @code{case} package provides utilities on top of unittest, including
826some helpful Python 2 compatibility convenience methods.")
827 (license license:bsd-3)))
828
829(define-public python-verboselogs
830 (package
831 (name "python-verboselogs")
832 (version "1.7")
833 (source
834 (origin
835 (method url-fetch)
836 (uri (pypi-uri "verboselogs" version))
837 (sha256
838 (base32
839 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
840 (build-system python-build-system)
841 (native-inputs
842 `(("python-mock" ,python-mock)
843 ("python-astroid" ,python-astroid)
844 ("python-pylint" ,python-pylint)))
845 (home-page "https://verboselogs.readthedocs.io")
846 (synopsis "Verbose logging level for Python's logging module")
847 (description
848 "The @code{verboselogs} package extends Python's @code{logging} module to
849add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
850 (license license:expat)))
851
852(define-public python2-verboselogs
853 (package-with-python2 python-verboselogs))
854
855(define-public python-coloredlogs
856 (package
857 (name "python-coloredlogs")
858 (version "7.3")
859 (source
860 (origin
861 (method url-fetch)
862 (uri (pypi-uri "coloredlogs" version))
863 (sha256
864 (base32
865 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
866 (build-system python-build-system)
867 (arguments
868 `(;Tests require some updated modules
869 #:tests? #f))
870 (propagated-inputs
871 `(("python-capturer" ,python-capturer)))
872 (home-page "https://coloredlogs.readthedocs.io")
873 (synopsis "Colored stream handler for Python's logging module")
874 (description
875 "The @code{coloredlogs} package enables colored terminal output for
876Python's logging module. The @code{ColoredFormatter} class inherits from
877@code{logging.Formatter} and uses ANSI escape sequences to render your logging
878messages in color.")
879 (license license:expat)))
880
881(define-public python2-coloredlogs
882 (package-with-python2 python-coloredlogs))
883
4caf37b0
MC
884(define-public python-et-xmlfile
885 (package
886 (name "python-et-xmlfile")
887 (version "1.0.1")
888 (source
889 (origin
890 (method url-fetch)
891 (uri (pypi-uri "et_xmlfile" version))
892 (sha256
893 (base32
894 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
895 (build-system python-build-system)
896 (arguments
897 `(#:phases (modify-phases %standard-phases
898 (replace 'check
899 (lambda _
900 (invoke "pytest"))))))
901 (native-inputs
902 `(("python-pytest" ,python-pytest)
903 ("python-lxml" ,python-lxml))) ;used for the tests
904 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
905 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
906 (description "This Python library is based upon the @code{xmlfile} module
907from @code{lxml}. It aims to provide a low memory, compatible implementation
908of @code{xmlfile}.")
909 (license license:expat)))
910
911(define-public python2-et-xmlfile
912 (package-with-python2 python-et-xmlfile))
913
a042d348
MC
914(define-public python-openpyxl
915 (package
916 (name "python-openpyxl")
441e6d93 917 (version "2.6.2")
a042d348
MC
918 (source
919 (origin
920 ;; We use the upstream repository, as the tests are not included in the
921 ;; PyPI releases.
922 (method hg-fetch)
923 (uri (hg-reference
924 (url "https://bitbucket.org/openpyxl/openpyxl")
925 (changeset version)))
926 (file-name (string-append name "-" version "-checkout"))
927 (sha256
441e6d93 928 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
929 (build-system python-build-system)
930 (arguments
931 `(#:phases (modify-phases %standard-phases
932 (replace 'check
933 (lambda _
934 (invoke "pytest"))))))
935 (native-inputs
936 ;; For the test suite.
937 `(("python-lxml" ,python-lxml)
938 ("python-pillow" ,python-pillow)
939 ("python-pytest" ,python-pytest)))
940 (propagated-inputs
941 `(("python-et-xmlfile" ,python-et-xmlfile)
942 ("python-jdcal" ,python-jdcal)))
943 (home-page "https://openpyxl.readthedocs.io")
944 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
945 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
946XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
947standard.")
948 (license license:expat)))
949
44d10b1f
RW
950(define-public python-eventlet
951 (package
952 (name "python-eventlet")
953 (version "0.20.1")
954 (source
955 (origin
956 (method url-fetch)
957 (uri (pypi-uri "eventlet" version))
958 (sha256
959 (base32
960 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
961 (build-system python-build-system)
962 (propagated-inputs
963 `(("python-greenlet" ,python-greenlet)))
964 (arguments
965 ;; TODO: Requires unpackaged 'enum-compat'.
966 '(#:tests? #f))
967 (home-page "http://eventlet.net")
968 (synopsis "Concurrent networking library for Python")
969 (description
970 "Eventlet is a concurrent networking library for Python that
971allows you to change how you run your code, not how you write it.
972It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
973Coroutines ensure that the developer uses a blocking style of programming
974that is similar to threading, but provide the benefits of non-blocking I/O.
975The event dispatch is implicit, which means you can easily use @code{Eventlet}
976from the Python interpreter, or as a small part of a larger application.")
977 (license license:expat)))
978
979(define-public python2-eventlet
980 (let ((base (package-with-python2
981 (strip-python2-variant python-eventlet))))
982 (package (inherit base)
983 (propagated-inputs
984 `(("python2-enum34" ,python2-enum34)
985 ,@(package-propagated-inputs base))))))
986
987(define-public python-six
988 (package
989 (name "python-six")
990 (version "1.11.0")
991 (source
992 (origin
993 (method url-fetch)
994 (uri (pypi-uri "six" version))
995 (sha256
996 (base32
997 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
998 (build-system python-build-system)
999 (arguments
1000 `(#:phases
1001 (modify-phases %standard-phases
1002 (replace 'check
1003 (lambda _
1004 (invoke "py.test" "-v"))))))
1005 (native-inputs
1006 `(("python-py" ,python-py)
1007 ("python-pytest" ,python-pytest-bootstrap)))
1008 (home-page "https://pypi.python.org/pypi/six/")
1009 (synopsis "Python 2 and 3 compatibility utilities")
1010 (description
1011 "Six is a Python 2 and 3 compatibility library. It provides utility
1012functions for smoothing over the differences between the Python versions with
1013the goal of writing Python code that is compatible on both Python versions.
1014Six supports every Python version since 2.5. It is contained in only one
1015Python file, so it can be easily copied into your project.")
1016 (license license:x11)))
1017
1018(define-public python2-six
1019 (package-with-python2 python-six))
1020
1021(define-public python-six-bootstrap
1022 (package
1023 (inherit python-six)
1024 (name "python-six-bootstrap")
1025 (native-inputs `())
1026 (arguments `(#:tests? #f))))
1027
1028(define-public python2-six-bootstrap
1029 (package-with-python2 python-six-bootstrap))
1030
1031(define-public python-schedule
1032 (package
1033 (name "python-schedule")
1034 (version "0.4.3")
1035 (source
1036 (origin
1037 (method url-fetch)
1038 (uri (pypi-uri "schedule" version))
1039 (sha256
1040 (base32
1041 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1042 (build-system python-build-system)
1043 (native-inputs
1044 `(("python-pytest" ,python-pytest)
1045 ("python-mock" ,python-mock)))
1046 (home-page "https://github.com/dbader/schedule")
1047 (synopsis "Schedule periodic function calls in Python")
1048 (description
1049 "Schedule is an in-process scheduler for periodic jobs that uses the
1050builder pattern for configuration. Schedule lets you run Python functions (or
1051any other callable) periodically at pre-determined intervals using a simple,
1052human-friendly syntax.")
1053 (license license:expat)))
1054
1055(define-public python2-schedule
1056 (package-with-python2 python-schedule))
1057
1058(define-public python-pandas
1059 (package
1060 (name "python-pandas")
c0d43f62 1061 (version "0.24.2")
44d10b1f
RW
1062 (source
1063 (origin
1064 (method url-fetch)
1065 (uri (pypi-uri "pandas" version))
1066 (sha256
c0d43f62 1067 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
44d10b1f
RW
1068 (build-system python-build-system)
1069 (arguments
1070 `(#:modules ((guix build utils)
1071 (guix build python-build-system)
1072 (ice-9 ftw)
1073 (srfi srfi-26))
1074 #:phases (modify-phases %standard-phases
c0d43f62
MC
1075 (add-after 'unpack 'patch-which
1076 (lambda* (#:key inputs #:allow-other-keys)
1077 (let ((which (assoc-ref inputs "which")))
1078 (substitute* "pandas/io/clipboard/__init__.py"
1079 (("^CHECK_CMD = .*")
1080 (string-append "CHECK_CMD = \"" which "\"\n"))))
1081 #t))
44d10b1f
RW
1082 (replace 'check
1083 (lambda _
1084 (let ((build-directory
1085 (string-append
1086 (getcwd) "/build/"
1087 (car (scandir "build"
1088 (cut string-prefix? "lib." <>))))))
1089 ;; Disable the "strict data files" option which causes
c0d43f62
MC
1090 ;; the build to error out if required data files are
1091 ;; not available (as is the case with PyPI archives).
44d10b1f
RW
1092 (substitute* "setup.cfg"
1093 (("addopts = --strict-data-files") "addopts = "))
1094 (with-directory-excursion build-directory
c0d43f62
MC
1095 ;; Delete tests that require "moto" which is not yet
1096 ;; in Guix.
44d10b1f
RW
1097 (for-each delete-file
1098 '("pandas/tests/io/conftest.py"
1099 "pandas/tests/io/json/test_compression.py"
1100 "pandas/tests/io/parser/test_network.py"
44d10b1f
RW
1101 "pandas/tests/io/test_parquet.py"))
1102 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1103 "--skip-network" "-k"
1104 ;; XXX: Due to the deleted tests above.
1105 "not test_read_s3_jsonl"))))))))
1106 (propagated-inputs
1107 `(("python-numpy" ,python-numpy)
667c6ef5 1108 ("python-openpyxl" ,python-openpyxl)
44d10b1f 1109 ("python-pytz" ,python-pytz)
667c6ef5
MC
1110 ("python-dateutil" ,python-dateutil)
1111 ("python-xlrd" ,python-xlrd)))
c0d43f62
MC
1112 (inputs
1113 `(("which" ,which)))
44d10b1f
RW
1114 (native-inputs
1115 `(("python-cython" ,python-cython)
1116 ("python-beautifulsoup4" ,python-beautifulsoup4)
1117 ("python-lxml" ,python-lxml)
1118 ("python-html5lib" ,python-html5lib)
1119 ("python-nose" ,python-nose)
c0d43f62
MC
1120 ("python-pytest" ,python-pytest)
1121 ("python-pytest-mock" ,python-pytest-mock)))
44d10b1f
RW
1122 (home-page "https://pandas.pydata.org")
1123 (synopsis "Data structures for data analysis, time series, and statistics")
1124 (description
1125 "Pandas is a Python package providing fast, flexible, and expressive data
1126structures designed to make working with structured (tabular,
1127multidimensional, potentially heterogeneous) and time series data both easy
1128and intuitive. It aims to be the fundamental high-level building block for
1129doing practical, real world data analysis in Python.")
1130 (license license:bsd-3)))
1131
1132(define-public python2-pandas
1133 (package-with-python2 python-pandas))
1134
1135(define-public python2-mechanize
1136 (package
1137 (name "python2-mechanize")
1138 (version "0.2.5")
1139 (source
1140 (origin
1141 (method url-fetch)
1cc184e6 1142 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1143 (sha256
1144 (base32
1145 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1146 (build-system python-build-system)
1147 (arguments
1148 `(#:python ,python-2 ; apparently incompatible with Python 3
1149 #:tests? #f))
1150 ;; test fails with message
1151 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1152 ;; (python-3.3.2) or
1153 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1154 ;; (python-2.7.5).
1155 ;; The source code is from March 2011 and probably not up-to-date
1156 ;; with respect to python unit tests.
1157 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1158 (synopsis
1159 "Stateful programmatic web browsing in Python")
1160 (description
1161 "Mechanize implements stateful programmatic web browsing in Python,
1162after Andy Lester’s Perl module WWW::Mechanize.")
1163 (license (license:non-copyleft
1164 "file://COPYING"
1165 "See COPYING in the distribution."))))
1166
1167
1168(define-public python-simplejson
1169 (package
1170 (name "python-simplejson")
1171 (version "3.14.0")
1172 (source
1173 (origin
1174 (method url-fetch)
1175 (uri (pypi-uri "simplejson" version))
1176 (sha256
1177 (base32
1178 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1179 (build-system python-build-system)
1180 (home-page "http://simplejson.readthedocs.org/en/latest/")
1181 (synopsis
1182 "Json library for Python")
1183 (description
1184 "JSON (JavaScript Object Notation) is a subset of JavaScript
1185syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1186format.
1187
1188Simplejson exposes an API familiar to users of the standard library marshal
1189and pickle modules. It is the externally maintained version of the json
1190library contained in Python 2.6, but maintains compatibility with Python 2.5
1191and (currently) has significant performance advantages, even without using
1192the optional C extension for speedups. Simplejson is also supported on
1193Python 3.3+.")
1194 (license license:x11)))
1195
1196(define-public python2-simplejson
1197 (package-with-python2 python-simplejson))
1198
1199
1200(define-public python-pyicu
1201 (package
1202 (name "python-pyicu")
1203 (version "2.2")
1204 (source
1205 (origin
1206 (method url-fetch)
1207 (uri (pypi-uri "PyICU" version))
1208 (sha256
1209 (base32
1210 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1211 (build-system python-build-system)
1212 (inputs
1213 `(("icu4c" ,icu4c)))
1214 (native-inputs
1215 `(("python-pytest" ,python-pytest)
1216 ("python-six" ,python-six)))
1217 (home-page "https://github.com/ovalhub/pyicu")
1218 (synopsis "Python extension wrapping the ICU C++ API")
1219 (description
1220 "PyICU is a python extension wrapping the ICU C++ API.")
1221 (properties `((python2-variant . ,(delay python2-pyicu))))
1222 (license license:x11)))
1223
1224(define-public python2-pyicu
1225 (let ((base (package-with-python2
1226 (strip-python2-variant python-pyicu))))
1227 (package
1228 (inherit base)
1229 (arguments
1230 `(,@(package-arguments base)
1231 #:phases
1232 (modify-phases %standard-phases
1233 (add-before 'check 'delete-failing-test
1234 (λ _
1235 ;; XXX: This fails due to Unicode issues unique to Python 2,
1236 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1237 (delete-file "test/test_Script.py")
1238 #t))))))))
1239
1240(define-public python2-dogtail
1241 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1242 ;; spaces in indentation" with Python 3.
1243 (package
1244 (name "python2-dogtail")
1245 (version "0.9.9")
1246 (source (origin
1247 (method url-fetch)
1248 (uri (pypi-uri "dogtail" version))
1249 (sha256
1250 (base32
1251 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1252 (build-system python-build-system)
1253 (arguments `(#:python ,python-2
1254 #:tests? #f)) ; invalid command "test"
1255 ;; Currently no offical homepage.
1256 (home-page "https://pypi.python.org/pypi/dogtail/")
1257 (synopsis "GUI test tool and automation framework written in Python")
1258 (description
1259 "Dogtail is a GUI test tool and automation framework written in Python.
1260It uses Accessibility (a11y) technologies to communicate with desktop
1261applications. dogtail scripts are written in Python and executed like any
1262other Python program.")
1263 (license license:gpl2+)))
1264
1265(define-public python-empy
1266 (package
1267 (name "python-empy")
0f6d5115 1268 (version "3.3.3")
44d10b1f
RW
1269 (source (origin
1270 (method url-fetch)
1271 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1272 version ".tar.gz"))
1273 (sha256
1274 (base32
0f6d5115 1275 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1276 (build-system python-build-system)
1277 (arguments
0f6d5115 1278 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1279 (home-page "http://www.alcyone.com/software/empy/")
1280 (synopsis "Templating system for Python")
1281 (description
1282 "EmPy is a system for embedding Python expressions and statements in
1283template text; it takes an EmPy source file, processes it, and produces
1284output. This is accomplished via expansions, which are special signals to the
1285EmPy system and are set off by a special prefix (by default the at sign, @@).
1286EmPy can expand arbitrary Python expressions and statements in this way, as
1287well as a variety of special forms. Textual data not explicitly delimited in
1288this way is sent unaffected to the output, allowing Python to be used in
1289effect as a markup language. Also supported are callbacks via hooks,
1290recording and playback via diversions, and dynamic, chainable filters. The
1291system is highly configurable via command line options and embedded
1292commands.")
1293 (license license:lgpl2.1+)))
1294
1295(define-public python2-empy
0f064242
TGR
1296 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1297 (package
1298 (inherit base)
1299 (arguments `(,@(package-arguments base)
1300 #:tests? #t)))))
44d10b1f
RW
1301
1302(define-public python2-element-tree
1303 (package
1304 (name "python2-element-tree")
1305 (version "1.2.6")
1306 (source (origin
1307 (method url-fetch)
1308 (uri (string-append
1309 "http://effbot.org/media/downloads/elementtree-"
1310 version "-20050316.tar.gz"))
1311 (sha256
1312 (base32
1313 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1314 (build-system python-build-system)
1315 (arguments
1316 `(#:python ,python-2 ; seems to be part of Python 3
1317 #:tests? #f)) ; no 'test' sub-command
1318 (synopsis "Toolkit for XML processing in Python")
1319 (description
1320 "ElementTree is a Python library supporting lightweight XML processing.")
1321 (home-page "http://effbot.org/zone/element-index.htm")
1322 (license (license:x11-style
1323 "http://docs.python.org/2/license.html"
1324 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1325
1326(define-public python2-pybugz
1327 (package
1328 (name "python2-pybugz")
1329 (version "0.6.11")
1330 (source (origin
1331 (method url-fetch)
1332 (uri (string-append
1333 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1334 version ".tar.gz"))
1335 (sha256
1336 (base32
1337 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1338 (patches (search-patches "pybugz-stty.patch"
1339 "pybugz-encode-error.patch"))))
1340 (build-system python-build-system)
1341 (arguments
1342 `(#:python ,python-2 ; SyntaxError with Python 3
1343 #:tests? #f)) ; no 'test' sub-command
1344 (propagated-inputs
1345 `(("element-tree" ,python2-element-tree)))
1346 (synopsis "Python and command-line interface to Bugzilla")
1347 (description
1348 "PyBugz is a Python library and command-line tool to query the Bugzilla
1349bug tracking system. It is meant as an aid to speed up interaction with the
1350bug tracker.")
1351 (home-page "http://www.liquidx.net/pybugz/")
1352 (license license:gpl2)))
1353
1354(define-public python2-enum
1355 (package
1356 (name "python2-enum")
1357 (version "0.4.6")
1358 (source (origin
1359 (method url-fetch)
1360 (uri (pypi-uri "enum" version))
1361 (sha256
1362 (base32
1363 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1364 (build-system python-build-system)
1365 (arguments
1366 `(#:python ,python-2))
1367 (home-page "http://pypi.python.org/pypi/enum/")
1368 (synopsis "Robust enumerated type support in Python")
1369 (description
1370 "This provides a module for robust enumerations in Python. It has
1371been superseded by the Python standard library and is provided only for
1372compatibility.")
1373 ;; Choice of either license.
1374 (license (list license:gpl3+ license:psfl))))
1375
1376(define-public python-enum34
1377 (package
1378 (name "python-enum34")
1379 (version "1.1.6")
1380 (source
1381 (origin
1382 (method url-fetch)
1383 (uri (pypi-uri "enum34" version))
1384 (sha256
1385 (base32
1386 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1387 (build-system python-build-system)
1388 (home-page "https://pypi.python.org/pypi/enum34")
1389 (synopsis "Backported Python 3.4 Enum")
1390 (description
1391 "Enum34 is the new Python stdlib enum module available in Python 3.4
1392backported for previous versions of Python from 2.4 to 3.3.")
1393 (license license:bsd-3)))
1394
1395(define-public python2-enum34
1396 (package-with-python2 python-enum34))
1397
1398(define-public python-parse-type
1399 (package
1400 (name "python-parse-type")
1401 (version "0.4.2")
1402 (source
1403 (origin
1404 (method url-fetch)
1405 (uri (pypi-uri "parse_type" version))
1406 (sha256
1407 (base32
1408 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1409 (build-system python-build-system)
1410 (propagated-inputs
1411 `(("python-six" ,python-six)
1412 ("python-parse" ,python-parse)))
1413 (native-inputs
1414 `(("python-pytest" ,python-pytest)
1415 ("python-pytest-runner" ,python-pytest-runner)))
1416 (home-page "https://github.com/jenisys/parse_type")
1417 (synopsis "Extended parse module")
1418 (description
1419 "Parse_type extends the python parse module.")
1420 (properties
1421 `((python2-variant . ,(delay python2-parse-type))))
1422 (license license:bsd-3)))
1423
1424(define-public python2-parse-type
1425 (let ((base (package-with-python2
1426 (strip-python2-variant python-parse-type))))
1427 (package (inherit base)
1428 (propagated-inputs
1429 `(("python2-enum34" ,python2-enum34)
1430 ,@(package-propagated-inputs base))))))
1431
1432(define-public python-parse
1433 (package
1434 (name "python-parse")
1435 (version "1.8.4")
1436 (source
1437 (origin
1438 (method url-fetch)
1439 (uri (pypi-uri "parse" version))
1440 (sha256
1441 (base32
1442 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1443 (build-system python-build-system)
1444 (arguments
1445 `(#:phases
1446 (modify-phases %standard-phases
1447 (replace 'check
1448 (lambda _ (invoke "python" "test_parse.py"))))))
1449 (home-page "https://github.com/r1chardj0n3s/parse")
1450 (synopsis "Parse strings")
1451 (description
1452 "Parse strings using a specification based on the Python @code{format()}
1453syntax.")
1454 (license license:x11)))
1455
1456(define-public python-polib
1457 (package
1458 (name "python-polib")
1459 (version "1.0.8")
1460 (source (origin
1461 (method url-fetch)
1462 (uri (pypi-uri "polib" version))
1463 (sha256
1464 (base32
1465 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1466 (build-system python-build-system)
1467 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1468 (synopsis "Manipulate, create and modify gettext files")
1469 (description "Polib can manipulate any gettext format (po, pot and mo)
1470files. It can be used to create po files from scratch or to modify
1471existing ones.")
1472 (license license:expat)))
1473
1474(define-public python2-polib
1475 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1476 (package
1477 (inherit base)
1478 (arguments `(,@(package-arguments base)
1479 ;; Tests don't work with python2.
1480 #:tests? #f)))))
1481
1482(define-public scons
1483 (package
1484 (name "scons")
05487ed8 1485 (version "3.0.4")
44d10b1f 1486 (source (origin
ad34338d
RW
1487 (method git-fetch)
1488 (uri (git-reference
1489 (url "https://github.com/SCons/scons.git")
1490 (commit version)))
1491 (file-name (git-file-name name version))
44d10b1f
RW
1492 (sha256
1493 (base32
05487ed8 1494 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1495 (build-system python-build-system)
1496 (arguments
1497 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1498 #:tests? #f ; no 'python setup.py test' command
1499 #:phases
1500 (modify-phases %standard-phases
1501 (add-before 'build 'bootstrap
1502 (lambda _
1503 (substitute* "src/engine/SCons/compat/__init__.py"
1504 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1505 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1506 (substitute* "src/engine/SCons/Platform/__init__.py"
1507 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1508 "mod = __import__(full_name)"))
ad34338d
RW
1509 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1510 (chdir "build/scons")
1511 #t)))))
44d10b1f
RW
1512 (home-page "http://scons.org/")
1513 (synopsis "Software construction tool written in Python")
1514 (description
1515 "SCons is a software construction tool. Think of SCons as an improved,
1516cross-platform substitute for the classic Make utility with integrated
1517functionality similar to autoconf/automake and compiler caches such as ccache.
1518In short, SCons is an easier, more reliable and faster way to build
1519software.")
1520 (license license:x11)))
1521
1522(define-public scons-python2
1523 (package
1524 (inherit (package-with-python2 scons))
1525 (name "scons-python2")))
1526
1527(define-public python-extras
1528 (package
1529 (name "python-extras")
1530 (version "1.0.0")
1531 (source
1532 (origin
1533 (method url-fetch)
1534 (uri (pypi-uri "extras" version))
1535 (sha256
1536 (base32
1537 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1538 (build-system python-build-system)
1539 (arguments
1540 ;; FIXME: Circular dependency on testtools.
1541 '(#:tests? #f))
1542 (home-page "https://github.com/testing-cabal/extras")
1543 (synopsis "Useful extensions to the Python standard library")
1544 (description
1545 "Extras is a set of extensions to the Python standard library.")
1546 (license license:expat)))
1547
1548(define-public python2-extras
1549 (package-with-python2 python-extras))
1550
1551(define-public python-mimeparse
1552 (package
1553 (name "python-mimeparse")
1554 (version "1.6.0")
1555 (source
1556 (origin
1557 (method url-fetch)
89bf667c 1558 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1559 (sha256
1560 (base32
1561 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1562 (build-system python-build-system)
1563 (arguments
1564 '(#:phases
1565 (modify-phases %standard-phases
1566 (replace 'check
1567 (lambda _
1568 (invoke "./mimeparse_test.py"))))))
1569 (home-page
1570 "https://github.com/dbtsai/python-mimeparse")
1571 (synopsis "Python library for parsing MIME types")
1572 (description
1573 "Mimeparse provides basic functions for parsing MIME type names and
1574matching them against a list of media-ranges.")
1575 (license license:expat)))
1576
1577(define-public python2-mimeparse
1578 (package-with-python2 python-mimeparse))
1579
1580(define-public python-miniboa
1581 (package
1582 (name "python-miniboa")
1583 (version "1.0.7")
1584 (source
1585 (origin
1586 (method url-fetch)
1587 (uri (pypi-uri "miniboa" version))
1588 (sha256
1589 (base32
1590 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1591 (build-system python-build-system)
1592 (home-page "https://github.com/shmup/miniboa")
1593 (synopsis "Simple, single-threaded Telnet server")
1594 (description
1595 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1596server.")
1597 (license license:asl2.0)))
1598
1599(define-public python2-miniboa
1600 (package-with-python2 python-miniboa))
1601
1602(define-public python-pafy
1603 (package
1604 (name "python-pafy")
1605 (version "0.5.3.1")
1606 (source
1607 (origin
1608 (method url-fetch)
1609 (uri (pypi-uri "pafy" version))
1610 (sha256
1611 (base32
1612 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1613 (build-system python-build-system)
1614 (arguments
1615 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1616 (propagated-inputs
1617 ;; Youtube-dl is a python package which is imported in the file
1618 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1619 `(("youtube-dl" ,youtube-dl)))
1620 (home-page "https://np1.github.io/pafy/")
1621 (synopsis "Retrieve YouTube content and metadata")
1622 (description
1623 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1624 (license license:lgpl3+)))
1625
1626(define-public python2-funcsigs
1627 (package
1628 (name "python2-funcsigs")
1629 (version "1.0.2")
1630 (source (origin
1631 (method url-fetch)
1632 (uri (pypi-uri "funcsigs" version))
1633 (sha256
1634 (base32
1635 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1636 (build-system python-build-system)
1637 (arguments
1638 `(#:python ,python-2))
1639 (native-inputs
1640 `(("python2-unittest2" ,python2-unittest2)))
1641 (home-page "http://funcsigs.readthedocs.org")
1642 (synopsis "Python function signatures from PEP362")
1643 (description
1644 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1645 (license license:asl2.0)))
1646
1647(define-public python2-funcsigs-bootstrap
1648 (package
1649 (inherit python2-funcsigs)
1650 (name "python2-funcsigs-bootstrap")
1651 (native-inputs `())
1652 (arguments
1653 `(#:tests? #f
1654 ,@(package-arguments python2-funcsigs)))))
1655
1656(define-public python-py
1657 (package
1658 (name "python-py")
1659 (version "1.5.4")
1660 (source
1661 (origin
1662 (method url-fetch)
1663 (uri (pypi-uri "py" version))
1664 (sha256
1665 (base32
1666 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1667 (build-system python-build-system)
1668 (arguments
1669 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1670 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1671 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1672 ;; Is this module globally installed?"
1673 '(#:tests? #f))
1674 (native-inputs
1675 `(("python-setuptools-scm" ,python-setuptools-scm)))
1676 (home-page "https://github.com/pytest-dev/py")
1677 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1678 (description
1679 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1680code introspection, and logging.")
1681 (license license:expat)))
1682
1683(define-public python2-py
1684 (package-with-python2 python-py))
1685
1686;; Recent versions of python-fixtures and python-testrepository need
1687;; python-pbr for packaging, which itself needs these two packages for
1688;; testing.
1689;; To fix this circular dependency, we use a build of python-pbr, based on the
1690;; same source, just without any test dependencies and with tests disabled.
1691;; python-pbr-minmal is then used to package python-fixtures and
1692;; python-testrepository.
1693;; Strictly speaking we currently could remove the test-requirements from the
1694;; normal python-pbr package (and save this package) since test are disabled
1695;; there anyway. But this may change in future.
1696(define-public python-pbr-minimal
1697 (package
1698 (name "python-pbr-minimal")
1699 (version "3.0.1")
1700 (source
1701 (origin
1702 (method url-fetch)
1703 (uri (pypi-uri "pbr" version))
1704 (sha256
1705 (base32
1706 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1707 (build-system python-build-system)
1708 (arguments
1709 `(#:tests? #f))
1710 (home-page "http://docs.openstack.org/developer/pbr/")
1711 (synopsis "Minimal build of python-pbr used for bootstrapping")
1712 (description
1713 "Used only for bootstrapping python2-pbr, you should not need this.")
1714 (license license:asl2.0)))
1715
1716(define-public python2-pbr-minimal
1717 (package-with-python2 python-pbr-minimal))
1718
1719(define-public python-pbr
1720 (package
1721 (inherit python-pbr-minimal)
1722 (name "python-pbr")
1723 (arguments
1724 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1725 (propagated-inputs
1726 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1727 (native-inputs
1728 `(("python-fixtures" ,python-fixtures-bootstrap)
1729 ;; discover, coverage, hacking, subunit
1730 ("python-mock" ,python-mock)
1731 ("python-six" ,python-six)
1732 ("python-sphinx" ,python-sphinx)
1733 ("python-testrepository" ,python-testrepository-bootstrap)
1734 ("python-testresources" ,python-testresources-bootstrap)
1735 ("python-testscenarios" ,python-testscenarios-bootstrap)
1736 ("python-testtools" ,python-testtools-bootstrap)
1737 ("python-virtualenv" ,python-virtualenv)))
1738 (synopsis "Enhance the default behavior of Python’s setuptools")
1739 (description
1740 "Python Build Reasonableness (PBR) is a library that injects some useful
1741and sensible default behaviors into your setuptools run. It will set
1742versions, process requirements files and generate AUTHORS and ChangeLog file
1743from git information.
1744")))
1745
1746(define-public python2-pbr
1747 (package-with-python2 python-pbr))
1748
ea43f0d5
MB
1749(define-public python-pyrsistent
1750 (package
1751 (name "python-pyrsistent")
1752 (version "0.14.11")
1753 (home-page "https://github.com/tobgu/pyrsistent")
1754 (source (origin
1755 (method url-fetch)
1756 (uri (pypi-uri "pyrsistent" version))
1757 (sha256
1758 (base32
1759 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1760 (build-system python-build-system)
1761 (native-inputs
1762 `(("python-hypothesis" ,python-hypothesis)
1763 ("python-pytest" ,python-pytest)
1764 ("python-pytest-runner" ,python-pytest-runner)))
1765 (propagated-inputs
1766 `(("python-six" ,python-six)))
1767 (synopsis "Persistent data structures for Python")
1768 (description
1769 "Pyrsistent is a number of persistent collections (by some referred to as
1770functional data structures). Persistent in the sense that they are immutable.
1771
1772All methods on a data structure that would normally mutate it instead return a
1773new copy of the structure containing the requested updates. The original
1774structure is left untouched.")
1775 (license license:expat)))
1776
1777(define-public python2-pyrsistent
1778 (package-with-python2 python-pyrsistent))
1779
44d10b1f
RW
1780(define-public python-exif-read
1781 (package
1782 (name "python-exif-read")
1783 (version "2.1.2")
1784 (source (origin
1785 (method url-fetch)
1786 (uri (pypi-uri "ExifRead" version))
1787 (sha256
1788 (base32
1789 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1790 (build-system python-build-system)
1791 (arguments `(#:tests? #f)) ; no tests
1792 (home-page "https://github.com/ianare/exif-py")
1793 (synopsis "Python library to extract EXIF data from image files")
1794 (description
1795 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1796files.")
1797 (license license:bsd-3)))
1798
1799(define-public python2-exif-read
1800 (package-with-python2 python-exif-read))
1801
1802(define-public python-pyld
1803 (package
1804 (name "python-pyld")
1805 (version "1.0.3")
1806 (source (origin
1807 (method url-fetch)
1808 (uri (pypi-uri "PyLD" version))
1809 (sha256
1810 (base32
1811 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1812 (build-system python-build-system)
1813 (home-page "https://github.com/digitalbazaar/pyld")
1814 (synopsis "Python implementation of the JSON-LD specification")
1815 (description
1816 "PyLD is an implementation of the JSON-LD specification.")
1817 (license license:bsd-3)))
1818
1819(define-public python2-pyld
1820 (package-with-python2 python-pyld))
1821
1822(define-public python-click
1823 (package
1824 (name "python-click")
61984855 1825 (version "7.0")
44d10b1f
RW
1826 (source
1827 (origin
1828 (method url-fetch)
1829 (uri (pypi-uri "click" version))
1830 (sha256
1831 (base32
61984855 1832 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1833 (build-system python-build-system)
1834 (arguments
8d7e7ca6 1835 `(#:phases
44d10b1f
RW
1836 (modify-phases %standard-phases
1837 (add-after 'unpack 'fix-paths
1838 (lambda* (#:key inputs #:allow-other-keys)
1839 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1840 "cross-libc" "libc"))))
1841 (substitute* "click/_unicodefun.py"
1842 (("'locale'")
1843 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1844 #t))
1845 (replace 'check
1846 (lambda _
1847 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1848 (native-inputs
1849 `(("python-pytest" ,python-pytest)))
61984855 1850 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1851 (synopsis "Command line library for Python")
1852 (description
1853 "Click is a Python package for creating command line interfaces in a
1854composable way with as little code as necessary. Its name stands for
1855\"Command Line Interface Creation Kit\". It's highly configurable but comes
1856with sensible defaults out of the box.")
1857 (license license:bsd-3)))
1858
1859(define-public python2-click
1860 (package-with-python2 python-click))
1861
1862(define-public python-wheel
1863 (package
1864 (name "python-wheel")
746c074b 1865 (version "0.32.3")
44d10b1f
RW
1866 (source
1867 (origin
1868 (method url-fetch)
1869 (uri (pypi-uri "wheel" version))
1870 (sha256
1871 (base32
746c074b 1872 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1873 (build-system python-build-system)
1874 (native-inputs
1875 `(("python-jsonschema" ,python-jsonschema)
1876 ("python-pytest-cov" ,python-pytest-cov)))
1877 (home-page "https://bitbucket.org/pypa/wheel/")
1878 (synopsis "Format for built Python packages")
1879 (description
1880 "A wheel is a ZIP-format archive with a specially formatted filename and
1881the @code{.whl} extension. It is designed to contain all the files for a PEP
1882376 compatible install in a way that is very close to the on-disk format. Many
1883packages will be properly installed with only the @code{Unpack} step and the
1884unpacked archive preserves enough information to @code{Spread} (copy data and
1885scripts to their final locations) at any later time. Wheel files can be
1886installed with a newer @code{pip} or with wheel's own command line utility.")
1887 (license license:expat)
1888 (properties `((python2-variant . ,(delay python2-wheel))))))
1889
1890(define-public python2-wheel
1891 (let ((wheel (package-with-python2
1892 (strip-python2-variant python-wheel))))
1893 (package (inherit wheel)
1894 (native-inputs `(("python2-functools32" ,python2-functools32)
1895 ,@(package-native-inputs wheel))))))
1896
1897(define-public python-vcversioner
1898 (package
1899 (name "python-vcversioner")
1900 (version "2.16.0.0")
1901 (source
1902 (origin
1903 (method url-fetch)
1904 (uri (pypi-uri "vcversioner" version))
1905 (sha256
1906 (base32
1907 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1908 (build-system python-build-system)
1909 (synopsis "Python library for version number discovery")
1910 (description "Vcversioner is a Python library that inspects tagging
1911information in a variety of version control systems in order to discover
1912version numbers.")
1913 (home-page "https://github.com/habnabit/vcversioner")
1914 (license license:isc)))
1915
1916(define-public python2-vcversioner
1917 (package-with-python2 python-vcversioner))
1918
5591fc4f
MC
1919(define-public python-jdcal
1920 (package
1921 (name "python-jdcal")
1922 (version "1.4")
1923 (source
1924 (origin
1925 (method url-fetch)
1926 (uri (pypi-uri "jdcal" version))
1927 (sha256
1928 (base32
1929 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1930 (build-system python-build-system)
1931 (arguments
1932 `(#:phases (modify-phases %standard-phases
1933 (replace 'check
1934 (lambda _
1935 (invoke "pytest"))))))
1936 (native-inputs
1937 `(("python-pytest" ,python-pytest)))
1938 (home-page "https://github.com/phn/jdcal")
1939 (synopsis "Functions to convert between Julian dates Gregorian dates")
1940 (description "This Python library provides functions for converting
1941between Julian dates and Gregorian dates.")
1942 (license license:bsd-2)))
1943
1944(define-public python2-jdcal
1945 (package-with-python2 python-jdcal))
1946
44d10b1f
RW
1947(define-public python-jsonschema
1948 (package
1949 (name "python-jsonschema")
1adde06e 1950 (version "3.0.1")
44d10b1f
RW
1951 (source (origin
1952 (method url-fetch)
786ccb87 1953 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1954 (sha256
1955 (base32
1adde06e 1956 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
1957 (build-system python-build-system)
1958 (arguments
1959 '(#:phases
1960 (modify-phases %standard-phases
1adde06e
MB
1961 (replace 'check
1962 (lambda _
1963 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1964 (invoke "trial" "jsonschema"))))))
44d10b1f 1965 (native-inputs
1adde06e
MB
1966 `(("python-setuptools_scm" ,python-setuptools-scm)
1967 ("python-twisted" ,python-twisted)))
1968 (propagated-inputs
1969 `(("python-attrs" ,python-attrs)
1970 ("python-pyrsistent" ,python-pyrsistent)
1971 ("python-six" ,python-six)))
44d10b1f
RW
1972 (home-page "https://github.com/Julian/jsonschema")
1973 (synopsis "Implementation of JSON Schema for Python")
1974 (description
1975 "Jsonschema is an implementation of JSON Schema for Python.")
1976 (license license:expat)
1977 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1978
1979(define-public python2-jsonschema
1980 (let ((jsonschema (package-with-python2
1981 (strip-python2-variant python-jsonschema))))
1982 (package (inherit jsonschema)
44d10b1f 1983 (propagated-inputs
1adde06e
MB
1984 `(("python2-functools32" ,python2-functools32)
1985 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 1986
914bba28
TGR
1987;; This old version is still required by docker-compose as of 1.24.0.
1988(define-public python-jsonschema-2.6
1989 (package
1990 (name "python-jsonschema")
1991 (version "2.6.0")
1992 (source (origin
1993 (method url-fetch)
1994 (uri (pypi-uri "jsonschema" version))
1995 (sha256
1996 (base32
1997 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1998 (build-system python-build-system)
1999 (arguments
2000 '(#:phases
2001 (modify-phases %standard-phases
2002 (replace 'check (lambda _ (invoke "nosetests"))))))
2003 (native-inputs
2004 `(("python-nose" ,python-nose)
2005 ("python-vcversioner" ,python-vcversioner)))
2006 (home-page "https://github.com/Julian/jsonschema")
2007 (synopsis "Implementation of JSON Schema for Python")
2008 (description
2009 "Jsonschema is an implementation of JSON Schema for Python.")
2010 (license license:expat)
2011 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2012
44d10b1f
RW
2013(define-public python-schema
2014 (package
2015 (name "python-schema")
2016 (version "0.6.6")
2017 (source
2018 (origin
2019 (method url-fetch)
2020 (uri (pypi-uri "schema" version))
2021 (sha256
2022 (base32
2023 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2024 (build-system python-build-system)
2025 (native-inputs
2026 `(("python-pytest" ,python-pytest)))
2027 (home-page "https://github.com/keleshev/schema")
2028 (synopsis "Simple data validation library")
2029 (description
2030 "@code{python-schema} is a library for validating Python data
2031structures, such as those obtained from config-files, forms, external
2032services or command-line parsing, converted from JSON/YAML (or
2033something else) to Python data-types.")
2034 (license license:psfl)))
2035
2036(define-public python2-schema
2037 (package-with-python2 python-schema))
2038
2039(define-public python-schema-0.5
2040 (package (inherit python-schema)
2041 (version "0.5.0")
2042 (source
2043 (origin
2044 (method url-fetch)
2045 (uri (pypi-uri "schema" version))
2046 (sha256
2047 (base32
2048 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2049
2050(define-public python2-schema-0.5
2051 (package-with-python2 python-schema-0.5))
2052
2053(define-public python-kitchen
2054 (package
2055 (name "python-kitchen")
2056 (version "1.2.5")
2057 (source
2058 (origin
2059 (method url-fetch)
2060 (uri (pypi-uri "kitchen" version))
2061 (sha256
2062 (base32
2063 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2064 (build-system python-build-system)
2065 (propagated-inputs
2066 `(("python-chardet" ,python-chardet)))
2067 (home-page "https://github.com/fedora-infra/kitchen")
2068 (synopsis "Python API for snippets")
2069 (description "@code{kitchen} module provides a python API for all sorts of
2070little useful snippets of code that everybody ends up writing for their projects
2071but never seem big enough to build an independent release. Use kitchen and stop
2072cutting and pasting that code over and over.")
2073 (license (list license:lgpl2.1+
2074 ;; subprocess.py, test_subprocess.py,
2075 ;; kitchen/pycompat25/defaultdict.py:
2076 license:psfl))))
2077
2078(define-public python2-kitchen
2079 (package-with-python2 python-kitchen))
2080
2081(define-public python-unidecode
2082 (package
2083 (name "python-unidecode")
bd9d7206 2084 (version "1.1.0")
44d10b1f
RW
2085 (source (origin
2086 (method url-fetch)
2087 (uri (pypi-uri "Unidecode" version))
2088 (sha256
2089 (base32
bd9d7206 2090 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
44d10b1f
RW
2091 (build-system python-build-system)
2092 (home-page "https://pypi.python.org/pypi/Unidecode")
2093 (synopsis "ASCII transliterations of Unicode text")
2094 (description
2095 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2096useful when integrating with legacy code that doesn't support Unicode, or for
2097ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2098machine identifiers from human-readable Unicode strings that should still be
2099somewhat intelligible.")
2100 (license license:gpl2+)))
2101
2102(define-public python2-unidecode
2103 (package-with-python2 python-unidecode))
2104
2105(define-public python-pyjwt
2106 (package
2107 (name "python-pyjwt")
2108 (version "1.5.3")
2109 (source
2110 (origin
2111 (method url-fetch)
2112 (uri (pypi-uri "PyJWT" version))
2113 (sha256
2114 (base32
2115 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2116 (modules '((guix build utils)))
2117 (snippet
2118 '(begin
2119 (for-each delete-file-recursively
2120 (find-files "." "\\.pyc$"))
2121 #t))))
2122 (build-system python-build-system)
2123 (native-inputs
2124 `(("python-pytest" ,python-pytest)
2125 ("python-pytest-cov" ,python-pytest-cov)
2126 ("python-pytest-runner" ,python-pytest-runner)))
2127 (home-page "https://github.com/progrium/pyjwt")
2128 (synopsis "JSON Web Token implementation in Python")
2129 (description
2130 "PyJWT is a JSON Web Token implementation written in Python.")
2131 (license license:expat)))
2132
2133(define-public python2-pyjwt
2134 (package-with-python2 python-pyjwt))
2135
2136(define-public python-pykka
2137 (package
2138 (name "python-pykka")
2139 (version "1.2.1")
2140 (source
2141 (origin
2142 (method url-fetch)
2143 (uri (pypi-uri "Pykka" version))
2144 (sha256
2145 (base32
2146 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2147 (build-system python-build-system)
2148 (native-inputs
2149 `(("python-mock" ,python-mock)
2150 ("python-nose" ,python-nose)
2151 ("python-gevent" ,python-gevent)
2152 ("python-eventlet" ,python-eventlet)))
2153 (home-page "https://www.pykka.org/")
2154 (synopsis "Pykka is a Python implementation of the actor model")
2155 (description
2156 "Pykka is a Python implementation of the actor model.
2157The actor model introduces some simple rules to control the sharing
2158of state and cooperation between execution units, which makes it
2159easier to build concurrent applications.")
2160 (license license:asl2.0)))
2161
2162(define-public python2-pykka
2163 (package-with-python2 python-pykka))
2164
8d22f7e3
VC
2165(define-public python-pymsgbox
2166 (package
2167 (name "python-pymsgbox")
2168 (version "1.0.6")
2169 (source
2170 (origin
2171 (method git-fetch)
2172 (uri (git-reference
2173 ;; LICENSE.txt is not present on pypi
2174 (url "https://github.com/asweigart/PyMsgBox")
2175 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2176 (file-name (git-file-name name version))
2177 (sha256
2178 (base32
2179 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2180 (arguments
2181 ;; Circular dependency to run tests:
2182 ;; Tests need pyautogui, which depends on pymsgbox.
2183 '(#:tests? #f))
2184 (build-system python-build-system)
2185 (home-page "https://github.com/asweigart/PyMsgBox")
2186 (synopsis "Python module for JavaScript-like message boxes")
2187 (description
2188 "PyMsgBox is a simple, cross-platform, pure Python module for
2189JavaScript-like message boxes. Types of dialog boxes include:
2190@enumerate
2191@item alert
2192@item confirm
2193@item prompt
2194@item password
2195@end enumerate
2196")
2197 (license license:bsd-3)))
2198
44d10b1f
RW
2199(define-public python-pympler
2200 (package
2201 (name "python-pympler")
2202 (home-page "https://pythonhosted.org/Pympler/")
2203 (version "0.5")
2204 (source (origin
2205 (method url-fetch)
2206 (uri (pypi-uri "Pympler" version))
2207 (sha256
2208 (base32
2209 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
2210 (build-system python-build-system)
2211 (arguments
2212 `(#:phases (modify-phases %standard-phases
2213 (delete 'check)
2214 (add-after 'install 'check
2215 (lambda* (#:key inputs outputs #:allow-other-keys)
2216 (add-installed-pythonpath inputs outputs)
2217 (invoke "python" "setup.py" "test"))))))
2218 (synopsis "Measure, monitor and analyze memory behavior")
2219 (description
2220 "Pympler is a development tool to measure, monitor and analyze
2221the memory behavior of Python objects in a running Python application.
2222
2223By pympling a Python application, detailed insight in the size and the
2224lifetime of Python objects can be obtained. Undesirable or unexpected
2225runtime behavior like memory bloat and other @samp{pymples} can easily
2226be identified.
2227
2228A web profiling frontend exposes process statistics, garbage
2229visualisation and class tracker statistics.")
2230 (license license:asl2.0)))
2231
2232(define-public python2-pympler
2233 (package-with-python2 python-pympler))
2234
2235(define-public python-itsdangerous
2236 (package
2237 (name "python-itsdangerous")
acfcf2ed 2238 (version "1.1.0")
44d10b1f
RW
2239 (source
2240 (origin
2241 (method url-fetch)
acfcf2ed 2242 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2243 (sha256
2244 (base32
acfcf2ed 2245 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2246 (build-system python-build-system)
acfcf2ed 2247 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2248 (synopsis "Python library for passing data to/from untrusted environments")
2249 (description
2250 "Itsdangerous provides various helpers to pass trusted data to untrusted
2251environments and back.")
2252 (license license:bsd-3)))
2253
2254(define-public python2-itsdangerous
2255 (package-with-python2 python-itsdangerous))
2256
2257(define-public python-pyyaml
2258 (package
2259 (name "python-pyyaml")
2260 (version "3.13")
2261 (source
2262 (origin
2263 (method url-fetch)
2264 (uri (pypi-uri "PyYAML" version))
2265 (sha256
2266 (base32
2267 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2268 (build-system python-build-system)
2269 (inputs
2270 `(("libyaml" ,libyaml)))
2271 (home-page "http://pyyaml.org/wiki/PyYAML")
2272 (synopsis "YAML parser and emitter for Python")
2273 (description
2274 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2275complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2276API, and sensible error messages. PyYAML supports standard YAML tags and
2277provides Python-specific tags that allow to represent an arbitrary Python
2278object.")
2279 (license license:expat)))
2280
2281(define-public python2-pyyaml
2282 (package-with-python2 python-pyyaml))
2283
2284(define-public python-vine
2285 (package
2286 (name "python-vine")
2287 (version "1.1.4")
2288 (source
2289 (origin
2290 (method url-fetch)
2291 (uri (pypi-uri "vine" version))
2292 (sha256
2293 (base32
2294 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2295 (build-system python-build-system)
2296 (native-inputs
2297 `(("python-pytest" ,python-pytest)
2298 ("python-case" ,python-case)))
2299 (home-page "https://github.com/celery/vine")
2300 (synopsis "Promises for Python")
2301 (description
2302 "@code{vine} provides a special implementation of promises in that it can
2303be used both for \"promise of a value\" and lazy evaluation. The biggest
2304upside for this is that everything in a promise can also be a promise,
2305e.g. filters, callbacks and errbacks can all be promises.")
2306 (license license:bsd-3)))
2307
2308(define-public python-virtualenv
2309 (package
2310 (name "python-virtualenv")
2782bd51 2311 (version "16.1.0")
44d10b1f
RW
2312 (source
2313 (origin
2314 (method url-fetch)
2315 (uri (pypi-uri "virtualenv" version))
2316 (sha256
2317 (base32
2782bd51 2318 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2319 (build-system python-build-system)
2320 (arguments
2321 `(#:phases
2322 (modify-phases %standard-phases
2782bd51 2323 (add-before 'check 'disable-failing-test
44d10b1f
RW
2324 (lambda _
2325 ;; Disable failing test. See upstream bug report
2326 ;; https://github.com/pypa/virtualenv/issues/957
2327 (substitute* "tests/test_virtualenv.py"
2328 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2329 #t)))))
44d10b1f
RW
2330 (native-inputs
2331 `(("python-mock" ,python-mock)
2332 ("python-pytest" ,python-pytest)))
2333 (home-page "https://virtualenv.pypa.io/")
2334 (synopsis "Virtual Python environment builder")
2335 (description
2336 "Virtualenv is a tool to create isolated Python environments.")
2337 (license license:expat)))
2338
2339(define-public python2-virtualenv
2340 (package-with-python2 python-virtualenv))
2341
2342(define-public python-markupsafe
2343 (package
2344 (name "python-markupsafe")
753eb411 2345 (version "1.1.1")
44d10b1f
RW
2346 (source
2347 (origin
2348 (method url-fetch)
5182927c 2349 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2350 (sha256
2351 (base32
753eb411 2352 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2353 (build-system python-build-system)
753eb411
MB
2354 (arguments
2355 `(#:modules ((ice-9 ftw)
2356 (srfi srfi-1)
2357 (srfi srfi-26)
2358 (guix build utils)
2359 (guix build python-build-system))
2360 #:phases (modify-phases %standard-phases
2361 (replace 'check
2362 (lambda _
2363 (let ((cwd (getcwd))
2364 (libdir (find (cut string-prefix? "lib." <>)
2365 (scandir "build"))))
2366 (setenv "PYTHONPATH"
2367 (string-append cwd "/build/" libdir ":"
2368 (getenv "PYTHONPATH")))
2369 (invoke "pytest" "-vv")))))))
2370 (native-inputs
2371 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2372 (home-page "https://github.com/mitsuhiko/markupsafe")
2373 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2374 (description
2375 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2376for Python.")
2377 (license license:bsd-3)))
2378
2379(define-public python2-markupsafe
2380 (package-with-python2 python-markupsafe))
2381
2382(define-public python-jinja2
2383 (package
2384 (name "python-jinja2")
4a5c7934 2385 (version "2.10.1")
44d10b1f
RW
2386 (source
2387 (origin
2388 (method url-fetch)
2389 (uri (pypi-uri "Jinja2" version))
2390 (sha256
2391 (base32
4a5c7934 2392 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2393 (build-system python-build-system)
2394 (propagated-inputs
2395 `(("python-markupsafe" ,python-markupsafe)))
2396 (home-page "http://jinja.pocoo.org/")
2397 (synopsis "Python template engine")
2398 (description
2399 "Jinja2 is a small but fast and easy to use stand-alone template engine
2400written in pure Python.")
2401 (license license:bsd-3)))
2402
2403(define-public python2-jinja2
2404 (package-with-python2 python-jinja2))
2405
2406(define-public python-pystache
2407 (package
2408 (name "python-pystache")
2409 (version "0.5.4")
2410 (source (origin
2411 (method url-fetch)
2412 (uri (pypi-uri "pystache" version))
2413 (sha256
2414 (base32
2415 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2416 (build-system python-build-system)
2417 (arguments
2418 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2419 (home-page "http://defunkt.io/pystache/")
2420 (synopsis "Python logic-less template engine")
2421 (description
2422 "Pystache is a Python implementation of the framework agnostic,
2423logic-free templating system Mustache.")
2424 (license license:expat)
2425 (properties `((python2-variant . ,(delay python2-pystache))))))
2426
2427(define-public python2-pystache
2428 (package (inherit (package-with-python2
2429 (strip-python2-variant python-pystache)))
2430 (arguments
2431 `(#:python ,python-2
2432 #:phases
2433 (modify-phases %standard-phases
2434 (replace 'check
2435 (lambda _
dfafc29b 2436 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2437
2438(define-public python-joblib
2439 (package
2440 (name "python-joblib")
2441 (version "0.13.0")
2442 (source (origin
2443 (method url-fetch)
2444 (uri (pypi-uri "joblib" version))
2445 (sha256
2446 (base32
2447 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2448 (build-system python-build-system)
2449 (arguments
2450 `(#:phases
2451 (modify-phases %standard-phases
2452 (replace 'check
2453 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2454 (native-inputs
2455 `(("python-pytest" ,python-pytest)))
2456 (home-page "https://joblib.readthedocs.io/")
2457 (synopsis "Using Python functions as pipeline jobs")
2458 (description
2459 "Joblib is a set of tools to provide lightweight pipelining in Python.
2460In particular, joblib offers: transparent disk-caching of the output values
2461and lazy re-evaluation (memoize pattern), easy simple parallel computing
2462logging and tracing of the execution.")
2463 (license license:bsd-3)))
2464
2465(define-public python2-joblib
2466 (package-with-python2 python-joblib))
2467
a3363341
VC
2468(define-public python-daemon
2469 (package
2470 (name "python-daemon")
2471 (version "2.2.3")
2472 (source
2473 (origin
2474 (method url-fetch)
2475 (uri (pypi-uri "python-daemon" version))
2476 (sha256
2477 (base32
2478 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2479 (build-system python-build-system)
2480 (arguments
2481 `(#:phases
2482 (modify-phases %standard-phases
2483 (add-before 'check 'disable-tests
2484 (lambda _
2485 ;; FIXME: Determine why test fails
2486 (substitute* "test/test_daemon.py"
2487 (("test_detaches_process_context")
2488 "skip_test_detaches_process_context"))
2489 #t)))))
2490 (propagated-inputs
2491 `(("python-lockfile" ,python-lockfile)))
2492 (native-inputs
2493 `(("python-unittest2" ,python-unittest2)
2494 ("python-testtools" ,python-testtools)
2495 ("python-testscenarios" ,python-testscenarios)
2496 ("python-mock" ,python-mock)
2497 ("python-docutils" ,python-docutils)))
2498 (home-page "https://pagure.io/python-daemon/")
2499 (synopsis "Python library for making a Unix daemon process")
2500 (description "Python-daemon is a library that assists a Python program to
2501turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2502
2503This library provides a @code{DaemonContext} class that manages the following
2504important tasks for becoming a daemon process:
2505@enumerate
2506@item Detach the process into its own process group.
2507@item Set process environment appropriate for running inside a chroot.
2508@item Renounce suid and sgid privileges.
2509@item Close all open file descriptors.
2510@item Change the working directory, uid, gid, and umask.
2511@item Set appropriate signal handlers.
2512@item Open new file descriptors for stdin, stdout, and stderr.
2513@item Manage a specified PID lock file.
2514@item Register cleanup functions for at-exit processing.
2515@end enumerate")
2516 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2517 (license (list license:asl2.0 license:gpl3+))))
2518
44d10b1f
RW
2519(define-public python-docutils
2520 (package
2521 (name "python-docutils")
2522 (version "0.14")
2523 (source
2524 (origin
2525 (method url-fetch)
2526 (uri (pypi-uri "docutils" version))
2527 (sha256
2528 (base32
2529 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2530 (build-system python-build-system)
2531 (arguments
2532 '(#:tests? #f)) ; no setup.py test command
2533 (home-page "http://docutils.sourceforge.net/")
2534 (synopsis "Python Documentation Utilities")
2535 (description
2536 "Docutils is a modular system for processing documentation into useful
2537formats, such as HTML, XML, and LaTeX. For input Docutils supports
2538reStructuredText.")
2539 ;; Most of the source code is public domain, but some source files are
2540 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2541 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2542
2543(define-public python2-docutils
2544 (package-with-python2 python-docutils))
2545
2546(define-public python-pygments
2547 (package
2548 (name "python-pygments")
eed81080 2549 (version "2.4.2")
44d10b1f
RW
2550 (source
2551 (origin
2552 (method url-fetch)
2553 (uri (pypi-uri "Pygments" version))
2554 (sha256
2555 (base32
eed81080 2556 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
44d10b1f
RW
2557 (build-system python-build-system)
2558 (arguments
2559 ;; FIXME: Tests require sphinx, which depends on this.
2560 '(#:tests? #f))
2561 (home-page "http://pygments.org/")
2562 (synopsis "Syntax highlighting")
2563 (description
2564 "Pygments is a syntax highlighting package written in Python.")
2565 (license license:bsd-2)))
2566
2567(define-public python2-pygments
2568 (package-with-python2 python-pygments))
2569
0f0a5ef9
MC
2570(define-public python-bumpversion
2571 (package
2572 (name "python-bumpversion")
2573 (version "0.5.3")
2574 (source
2575 (origin
2576 (method url-fetch)
2577 (uri (pypi-uri "bumpversion" version))
2578 (sha256
2579 (base32
2580 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2581 (build-system python-build-system)
2582 (home-page "https://github.com/peritus/bumpversion")
2583 (synopsis "Tool to bump software version")
2584 (description "This tool provides a command-line interface (CLI) to bump a
2585software version simply.")
2586 (license license:expat)))
2587
b24fd2c2
MC
2588(define-public python-deprecated
2589 (package
2590 (name "python-deprecated")
2591 (version "1.2.5")
2592 (source
2593 (origin
2594 (method git-fetch)
2595 (uri (git-reference
2596 (url "https://github.com/tantale/deprecated.git")
2597 (commit (string-append "v" version))))
2598 (file-name (git-file-name name version))
2599 (sha256
2600 (base32
2601 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2602 (build-system python-build-system)
2603 (arguments
2604 `(#:phases (modify-phases %standard-phases
2605 (replace 'check
2606 (lambda _
2607 (invoke "pytest"))))))
2608 (propagated-inputs
2609 `(("python-wrapt" ,python-wrapt)))
2610 (native-inputs
2611 `(("python-bumpversion" ,python-bumpversion)
2612 ("python-pytest" ,python-pytest)
2613 ("python-pytest-cov" ,python-pytest-cov)
2614 ("python-sphinx" ,python-sphinx)
2615 ("python-tox" ,python-tox)))
2616 (home-page "https://github.com/tantale/deprecated")
2617 (synopsis "Python decorator to deprecate classes, functions or methods")
2618 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2619to deprecate classes, functions or methods.")
2620 (license license:expat)))
2621
d5a998fa
MC
2622(define-public python-pygithub
2623 (package
2624 (name "python-pygithub")
2625 (version "1.43.7")
2626 (source
2627 ;; We fetch from the Git repo because there are no tests in the PyPI
2628 ;; archive.
2629 (origin
2630 (method git-fetch)
2631 (uri (git-reference
2632 (url "https://github.com/PyGithub/PyGithub.git")
2633 (commit (string-append "v" version))))
2634 (file-name (git-file-name name version))
2635 (sha256
2636 (base32
2637 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2638 (build-system python-build-system)
2639 (arguments
2640 `(#:phases (modify-phases %standard-phases
2641 ;; Some tests rely on the network.
2642 (add-after 'unpack 'disable-failing-tests
2643 (lambda _
2644 (substitute* "tests/Issue142.py"
2645 (("testDecodeJson") "disabled_testDecodeJson"))
2646 #t))
2647 (add-before 'check 'prepare-for-tests
2648 (lambda _
2649 (for-each (lambda (f)
2650 (chmod f #o666))
2651 (find-files "./tests"))
2652 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2653 (setenv "PYTHONPATH"
2654 (string-append "./tests:" (getenv "PYTHONPATH")))
2655 #t)))))
2656 (propagated-inputs
2657 `(("python-deprecated" ,python-deprecated)
2658 ("python-pyjwt" ,python-pyjwt)
2659 ("python-requests" ,python-requests)))
2660 (native-inputs `(("python-httpretty" ,python-httpretty)))
2661 (home-page "https://pygithub.readthedocs.io/en/latest/")
2662 (synopsis "Python library for the GitHub API")
2663 (description "This library allows managing GitHub resources such as
2664repositories, user profiles, and organizations in your Python applications,
2665using version 3 of the GitHub application programming interface (API).")
2666 (license license:lgpl3+)))
2667
c0c0bb38
MC
2668(define-public python-rellu
2669 (package
2670 (name "python-rellu")
2671 (version "0.7")
2672 (source
2673 (origin
2674 (method url-fetch)
2675 (uri (pypi-uri "rellu" version))
2676 (sha256
2677 (base32
2678 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2679 (build-system python-build-system)
2680 (propagated-inputs
2681 `(("python-invoke" ,python-invoke)
2682 ("python-pygithub" ,python-pygithub)))
2683 (home-page "https://github.com/robotframework/rellu")
2684 (synopsis "Utilities to create PyPI releases")
2685 (description "This collection of utilities contains tooling and templates
2686to assist in creating releases on GitHub and publishing them on PyPI. It is
2687designed to be used by Robot Framework and tools and libraries in its
2688ecosystem, but can naturally be used also by other projects.")
2689 (license license:asl2.0)))
2690
b9790285
MC
2691(define-public python-robotframework
2692 (package
2693 (name "python-robotframework")
1710b8f8 2694 (version "3.1.2")
b9790285
MC
2695 ;; There are no tests in the PyPI archive.
2696 (source
2697 (origin
2698 (method git-fetch)
2699 (uri (git-reference
2700 (url "https://github.com/robotframework/robotframework.git")
2701 (commit (string-append "v" version))))
2702 (file-name (git-file-name name version))
2703 (sha256
1710b8f8 2704 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2705 (patches (search-patches
2706 "python-robotframework-honor-source-date-epoch.patch"))))
2707 (build-system python-build-system)
2708 (arguments
2709 `(#:phases (modify-phases %standard-phases
2710 (add-before 'build 'build-and-install-doc
2711 (lambda* (#:key outputs #:allow-other-keys)
2712 (let* ((doc-output (assoc-ref outputs "doc"))
2713 (doc (string-append doc-output "/share/"
2714 ,name "-" ,version "/")))
2715 (invoke "invoke" "library-docs" "all")
2716 (mkdir-p doc)
2717 (copy-recursively "doc/libraries"
2718 (string-append doc "/libraries"))
2719 #t)))
2720 (replace 'check
2721 (lambda _
2722 (invoke "python" "utest/run.py"))))))
2723 (native-inputs
2724 `(("python-invoke" ,python-invoke)
2725 ("python-rellu" ,python-rellu)
2726 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2727 (outputs '("out" "doc"))
2728 (home-page "https://robotframework.org")
2729 (synopsis "Generic automation framework")
2730 (description "Robot Framework is a generic automation framework for
2731acceptance testing, acceptance test driven development (ATDD), and robotic
2732process automation (RPA).")
2733 (license license:asl2.0)))
2734
5b84c120
MC
2735(define-public python-robotframework-lint
2736 ;; There is no properly tagged release; the commit below seems to correspond
2737 ;; to the 0.9 stable release available from PyPI. The tests are not
2738 ;; included in the PyPI archive, so we fetch the sources from the upstream
2739 ;; Git repo.
2740 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2741 (revision "1"))
2742 (package
2743 (name "python-robotframework-lint")
2744 (version (git-version "0.9.0" revision commit))
2745 (source
2746 (origin
2747 (method git-fetch)
2748 (uri (git-reference
2749 (url "https://github.com/boakley/robotframework-lint.git")
2750 (commit commit)))
2751 (file-name (git-file-name name version))
2752 (sha256
2753 (base32
2754 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2755 (build-system python-build-system)
2756 (arguments
2757 `(#:phases
2758 (modify-phases %standard-phases
2759 (replace 'check
2760 (lambda _
2761 (invoke "python" "-m" "robot" "-A"
2762 "tests/conf/default.args" "tests"))))))
2763 (propagated-inputs
2764 `(("python-robotframework" ,python-robotframework)))
2765 (home-page "https://github.com/boakley/robotframework-lint/")
2766 (synopsis "Static analysis tool (linter) for Robot Framework")
2767 (description "This package provides the @code{rflint} command-line
2768utility, a static analysis tool (linter) for Robot Framework source files.")
2769 (license license:asl2.0))))
2770
c0c64f17
MC
2771(define-public python-robotframework-sshlibrary
2772 (package
2773 (name "python-robotframework-sshlibrary")
2774 (version "3.3.0")
2775 ;; There are no tests in the PyPI archive.
2776 (source
2777 (origin
2778 (method git-fetch)
2779 (uri (git-reference
2780 (url "https://github.com/robotframework/SSHLibrary.git")
2781 (commit (string-append "v" version))))
2782 (file-name (git-file-name name version))
2783 (sha256
2784 (base32
2785 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2786 (build-system python-build-system)
2787 (arguments
2788 `(#:phases
2789 (modify-phases %standard-phases
2790 (add-before 'build 'build-and-install-doc
2791 (lambda* (#:key outputs #:allow-other-keys)
2792 (let* ((doc-output (assoc-ref outputs "doc"))
2793 (doc (string-append doc-output "/share/"
2794 ,name "-" ,version "/")))
2795 (invoke "chmod" "-R" "+w" "docs")
2796 (invoke "invoke" "kw-docs" "project-docs")
2797 (mkdir-p doc)
2798 (for-each delete-file (find-files "docs" "\\.rst"))
2799 (copy-recursively "docs" doc)
2800 #t)))
2801 (replace 'check
2802 (lambda _
2803 ;; Some tests require an SSH server; we remove them.
2804 (delete-file "utest/test_client_api.py")
2805 (delete-file "utest/test_scp.py")
2806 (invoke "python" "utest/run.py"))))))
2807 (propagated-inputs
2808 `(("python-robotframework" ,python-robotframework)
2809 ("python-paramiko" ,python-paramiko)
2810 ("python-scp" ,python-scp)))
2811 (native-inputs
2812 `(("openssh" ,openssh)
2813 ("which" ,which)
2814 ;; To generate the documentation
2815 ("python-docutils" ,python-docutils)
2816 ("python-invoke" ,python-invoke)
2817 ("python-pygments" ,python-pygments)
2818 ("python-rellu" ,python-rellu)))
2819 (outputs '("out" "doc"))
2820 (home-page "https://github.com/robotframework/SSHLibrary")
2821 (synopsis "Robot Framework library for SSH and SFTP")
2822 (description "SSHLibrary is a Robot Framework library providing support
2823for SSH and SFTP. It has the following main usages:
2824@itemize @bullet
2825@item Executing commands on the remote machine, either blocking or non-blocking.
2826@item Writing and reading in an interactive shell.
2827@item Transferring files and directories over SFTP.
2828@item Ensuring that files and directories exist on the remote machine.
2829@end itemize")
2830 (license license:asl2.0)))
2831
13d825fc
MC
2832(define-public python-scp
2833 (package
2834 (name "python-scp")
2835 (version "0.13.2")
2836 (source
2837 (origin
2838 (method url-fetch)
2839 (uri (pypi-uri "scp" version))
2840 (sha256
2841 (base32
2842 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2843 (build-system python-build-system)
2844 (arguments
2845 '(#:tests? #f)) ;tests require an SSH server
2846 (propagated-inputs
2847 `(("python-paramiko" ,python-paramiko)))
2848 (home-page "https://github.com/jbardin/scp.py")
2849 (synopsis "SCP protocol module for Python and Paramiko")
2850 (description "The scp module extends the Paramiko library to send and
2851receive files via the SCP1 protocol, as implemented by the OpenSSH
2852@command{scp} program.")
2853 (license license:gpl2+)))
2854
44d10b1f
RW
2855(define-public python-rst.linker
2856 (package
2857 (name "python-rst.linker")
2858 (version "1.10")
2859 (source
2860 (origin
2861 (method url-fetch)
2862 (uri (pypi-uri "rst.linker" version))
2863 (sha256
2864 (base32
2865 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2866 (build-system python-build-system)
2867 (propagated-inputs
2868 `(("python-dateutil" ,python-dateutil)
2869 ("python-six" ,python-six)))
2870 (native-inputs
2871 `(("python-setuptools-scm" ,python-setuptools-scm)))
2872 ;; Test would require path.py, which would introduce a cyclic dependence.
2873 (arguments `(#:tests? #f))
2874 ;; Note: As of version 1.7 the documentation is not worth building.
2875 (home-page "https://github.com/jaraco/rst.linker")
2876 (synopsis "Sphinx plugin to add links and timestamps")
2877 (description "rst.linker allows to automatically replace text by a
2878reStructuredText external reference or timestamps. It's primary purpose is to
2879augment the changelog, but it can be used for other documents, too.")
2880 (license license:expat)))
2881
2882(define-public python2-rst.linker
2883 (package-with-python2 python-rst.linker))
2884
2885(define-public python-feedgenerator
2886 (package
2887 (name "python-feedgenerator")
2888 (version "1.9")
2889 (source
2890 (origin
2891 (method url-fetch)
2892 (uri (pypi-uri "feedgenerator" version))
2893 (sha256
2894 (base32
2895 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2896 (modules '((guix build utils)))
2897 (snippet
2898 '(begin
2899 ;; Remove pre-compiled .pyc files from source.
2900 (for-each delete-file-recursively
2901 (find-files "." "__pycache__" #:directories? #t))
2902 (for-each delete-file (find-files "." "\\.pyc$"))
2903 #t))))
2904 (build-system python-build-system)
2905 (propagated-inputs
2906 `(("python-pytz" ,python-pytz)
2907 ("python-six" ,python-six)))
2908 (home-page "https://github.com/getpelican/feedgenerator")
2909 (synopsis
2910 "Standalone version of Django's Atom/RSS feed generator")
2911 (description
2912 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2913which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2914 (license license:bsd-3)))
2915
2916(define-public python2-feedgenerator
2917 (package-with-python2 python-feedgenerator))
2918
2919(define-public python-toml
2920 (package
2921 (name "python-toml")
2922 (version "0.9.4")
2923 (source
2924 (origin
2925 (method url-fetch)
2926 (uri (pypi-uri "toml" version))
2927 (sha256
2928 (base32
2929 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2930 (build-system python-build-system)
2931 (arguments
2932 `(#:tests? #f)) ;no tests suite in release
2933 (home-page "https://github.com/uiri/toml")
2934 (synopsis "Library for TOML")
2935 (description
2936 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2937Language (TOML) configuration files.")
2938 (license license:expat)))
2939
346c8752
BG
2940(define-public python-jsonrpc-server
2941 (package
2942 (name "python-jsonrpc-server")
2943 (version "0.1.2")
2944 (source
2945 (origin
2946 (method url-fetch)
2947 (uri (pypi-uri "python-jsonrpc-server" version))
2948 (sha256
2949 (base32
2950 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2951 (build-system python-build-system)
2952 (propagated-inputs
2953 `(("python-future" ,python-future)
2954 ("python-mock" ,python-mock)
2955 ("python-pytest" ,python-pytest)))
2956 (home-page
2957 "https://github.com/palantir/python-jsonrpc-server")
2958 (synopsis "JSON RPC 2.0 server library")
2959 (description
1df5407c 2960 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
2961 (license license:expat)))
2962
56f4ad47
BG
2963(define-public python-pydocstyle
2964 (package
2965 (name "python-pydocstyle")
2966 (version "3.0.0")
2967 (source
2968 (origin
2969 (method url-fetch)
2970 (uri (pypi-uri "pydocstyle" version))
2971 (sha256
2972 (base32
2973 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2974 (build-system python-build-system)
2975 (propagated-inputs
2976 `(("python-six" ,python-six)
2977 ("python-snowballstemmer" ,python-snowballstemmer)))
2978 (home-page
2979 "https://github.com/PyCQA/pydocstyle/")
2980 (synopsis "Python docstring style checker")
2981 (description
2982 "This package provides a style checker for the Python Language
2983Server (PLS).")
2984 (license license:expat)))
2985
be4d840c
BG
2986(define-public python-language-server
2987 (package
2988 (name "python-language-server")
ccbaeba3 2989 (version "0.26.1")
be4d840c
BG
2990 (source
2991 (origin
2992 (method url-fetch)
2993 (uri (pypi-uri "python-language-server" version))
2994 (sha256
2995 (base32
ccbaeba3 2996 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
be4d840c
BG
2997 (build-system python-build-system)
2998 (propagated-inputs
2999 `(("python-pluggy" ,python-pluggy)
3000 ("python-jsonrpc-server" ,python-jsonrpc-server)
3001 ("python-jedi" ,python-jedi)
3002 ("python-yapf" ,python-yapf)
3003 ("python-pyflakes" ,python-pyflakes)
3004 ("python-pydocstyle" ,python-pydocstyle)
3005 ("python-pycodestyle" ,python-pycodestyle)
3006 ("python-mccabe" ,python-mccabe)
3007 ("python-rope" ,python-rope)
fe4a4bd2
BG
3008 ("python-autopep8" ,python-autopep8)
3009 ("python-pylint" ,python-pylint)))
be4d840c
BG
3010 (home-page "https://github.com/palantir/python-language-server")
3011 (synopsis "Python implementation of the Language Server Protocol")
3012 (description
3013 "The Python Language Server (pyls) is an implementation of the Python 3
3014language specification for the Language Server Protocol (LSP). This tool is
3015used in text editing environments to provide a complete and integrated
3016feature-set for programming Python effectively.")
3017 (license license:expat)))
3018
44d10b1f
RW
3019(define-public python-black
3020 (package
3021 (name "python-black")
3022 (version "18.6b4")
3023 (source
3024 (origin
3025 (method url-fetch)
3026 (uri (pypi-uri "black" version))
3027 (sha256
3028 (base32
3029 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3030 (build-system python-build-system)
3031 (arguments
3032 `(#:phases
3033 (modify-phases %standard-phases
3034 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3035 (lambda _
3036 (let ((python3 (which "python3")))
3037 (substitute* '("tests/data/fmtonoff.py"
3038 "tests/data/string_prefixes.py"
3039 "tests/data/function.py")
3040 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3041 (string-append "#!" python3 (if (string? minor-version)
3042 minor-version
3043 ""))))))))))
3044 (propagated-inputs
3045 `(("python-click" ,python-click)
3046 ("python-attrs" ,python-attrs)
3047 ("python-appdirs" ,python-appdirs)
3048 ("python-toml" ,python-toml)))
3049 (home-page "https://github.com/ambv/black")
3050 (synopsis "The uncompromising code formatter")
3051 (description "Black is the uncompromising Python code formatter.")
3052 (license license:expat)))
3053
3054(define-public python-blinker
3055 (package
3056 (name "python-blinker")
3057 (version "1.4")
3058 (source
3059 (origin
3060 (method url-fetch)
3061 (uri (pypi-uri "blinker" version))
3062 (sha256
3063 (base32
3064 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3065 (build-system python-build-system)
3066 (home-page "http://pythonhosted.org/blinker/")
3067 (synopsis "Fast, simple object-to-object and broadcast signaling")
3068 (description
3069 "Blinker provides a fast dispatching system that allows any number of
3070interested parties to subscribe to events, or \"signals\".")
3071 (license license:expat)))
3072
3073(define-public python2-blinker
3074 (package-with-python2 python-blinker))
3075
3076(define-public pelican
3077 (package
3078 (name "pelican")
aa71b690 3079 (version "4.0.1")
44d10b1f
RW
3080 (source
3081 (origin
3082 (method url-fetch)
3083 (uri (pypi-uri "pelican" version))
3084 (sha256
3085 (base32
aa71b690 3086 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
3087 (build-system python-build-system)
3088 (propagated-inputs
3089 `(("python-feedgenerator" ,python-feedgenerator)
3090 ("python-jinja2" ,python-jinja2)
3091 ("python-pygments" ,python-pygments)
3092 ("python-docutils" ,python-docutils)
3093 ("python-pytz" ,python-pytz)
3094 ("python-blinker" ,python-blinker)
3095 ("python-unidecode" ,python-unidecode)
3096 ("python-six" ,python-six)
3097 ("python-dateutil" ,python-dateutil)
3098 ("python-markdown" ,python-markdown)))
3099 (home-page "https://getpelican.com/")
3100 (arguments
3101 `(;; XXX Requires a lot more packages to do unit tests :P
3102 #:tests? #f
3103 #:phases (modify-phases %standard-phases
3104 (add-before
3105 'install 'adjust-requires
3106 ;; Since feedgenerator is installed from git, it doesn't
3107 ;; conform to the version requirements.
3108 ;;
3109 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3110 ;; version requirement so setuptools doesn't get confused.
3111 (lambda _
3112 (substitute* "setup.py"
3113 (("['\"]feedgenerator.*?['\"]")
3114 "'feedgenerator'")))))))
3115 (synopsis "Python-based static site publishing system")
3116 (description
3117 "Pelican is a tool to generate a static blog from reStructuredText,
3118Markdown input files, and more. Pelican uses Jinja2 for templating
3119and is very extensible.")
3120 (license license:agpl3+)))
3121
8c141421
JH
3122(define-public mallard-ducktype
3123 (package
3124 (name "mallard-ducktype")
3125 (version "1.0.1")
3126 (source
3127 (origin
3128 (method git-fetch)
3129 ;; git-reference because a proper source tarball is not available
3130 ;; https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00209.html
3131 (uri (git-reference
3132 (url "https://github.com/projectmallard/mallard-ducktype.git")
3133 (commit version)))
3134 (file-name (git-file-name name version))
3135 (sha256
3136 (base32
3137 "0crland0kmpsyjfmnflcw7gaqy5b87b6ah17cmr9d5z1kyazf54n"))))
3138 (build-system python-build-system)
3139 (home-page "http://projectmallard.org")
3140 (synopsis "Convert Ducktype to Mallard documentation markup")
3141 (description
3142 "Ducktype is a lightweight syntax that can represent all the semantics
3143of the Mallard XML documentation system. Ducktype files can be converted to
3144Mallard using the @command{ducktype} tool. The yelp-tools package
3145provides additional functionality on the produced Mallard documents.")
3146 (license license:expat)))
3147
44d10b1f
RW
3148(define-public python-scikit-image
3149 (package
3150 (name "python-scikit-image")
9ff04084 3151 (version "0.14.2")
44d10b1f
RW
3152 (source
3153 (origin
3154 (method url-fetch)
3155 (uri (pypi-uri "scikit-image" version))
3156 (sha256
9ff04084 3157 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
3158 (build-system python-build-system)
3159 (arguments
3160 ;; TODO: Some tests require running X11 server. Disable them?
3161 '(#:tests? #f))
3162 ;; See DEPENDS.txt for the list of build and run time requiremnts
3163 (propagated-inputs
3164 `(("python-cloudpickle" ,python-cloudpickle)
3165 ("python-dask" ,python-dask)
3166 ("python-matplotlib" ,python-matplotlib)
3167 ("python-networkx" ,python-networkx)
3168 ("python-numpy" ,python-numpy)
3169 ("python-pillow" ,python-pillow)
3170 ("python-pywavelets" ,python-pywavelets)
3171 ("python-scipy" ,python-scipy)
3172 ("python-six" ,python-six)))
3173 (native-inputs
3174 `(("python-cython" ,python-cython)))
3175 (home-page "http://scikit-image.org/")
3176 (synopsis "Image processing in Python")
3177 (description
3178 "Scikit-image is a collection of algorithms for image processing.")
3179 (license license:bsd-3)))
3180
3181(define-public python2-scikit-image
3182 (package-with-python2 python-scikit-image))
3183
3184(define-public python-cython
3185 (package
3186 (name "python-cython")
d1b93e91 3187 (version "0.29.11")
44d10b1f
RW
3188 (source
3189 (origin
3190 (method url-fetch)
3191 (uri (pypi-uri "Cython" version))
3192 (sha256
3193 (base32
d1b93e91 3194 "1866m01ggl2h3rky4hac3m5p048gg4a0jb09ljkknryiqln54fkn"))))
44d10b1f
RW
3195 (build-system python-build-system)
3196 ;; we need the full python package and not just the python-wrapper
3197 ;; because we need libpython3.3m.so
3198 (inputs
3199 `(("python" ,python)))
3200 (arguments
3201 `(#:phases
3202 (modify-phases %standard-phases
3203 (add-before 'check 'set-HOME
3204 ;; some tests require access to "$HOME/.cython"
3205 (lambda _ (setenv "HOME" "/tmp") #t))
3206
3207 ;; FIXME: These tests started failing on armhf after the 0.28 update
3208 ;; (commit c69d11c5930), both with an error such as this:
3209 ;; compiling (cpp) and running dictcomp ...
3210 ;; === C/C++ compiler error output: ===
3211 ;; ‘
3212 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3213 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3214 ,@(if (target-arm32?)
3215 `((add-before 'check 'disable-failing-tests
3216 (lambda _
3217 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3218 (for-each (lambda (test)
3219 (format disabled-tests "~a\n" test))
3220 '("memslice" "dictcomp"))
3221 (close-port disabled-tests)))))
3222 '())
3223
3224 (replace 'check
3225 (lambda _
44d10b1f 3226 (invoke "python" "runtests.py" "-vv"))))))
f319409b 3227 (home-page "https://cython.org/")
44d10b1f
RW
3228 (synopsis "C extensions for Python")
3229 (description "Cython is an optimising static compiler for both the Python
3230programming language and the extended Cython programming language. It makes
3231writing C extensions for Python as easy as Python itself.")
3232 (license license:asl2.0)
3233 (properties `((python2-variant . ,(delay python2-cython))))))
3234
3235(define-public python2-cython
3236 (package (inherit (package-with-python2
3237 (strip-python2-variant python-cython)))
3238 (name "python2-cython")
3239 (inputs
3240 `(("python-2" ,python-2))))) ; this is not automatically changed
3241
3242;; The RPython toolchain currently does not support Python 3.
3243(define-public python2-rpython
3244 (package
3245 (name "python2-rpython")
3246 (version "0.2.1")
3247 (source
3248 (origin
3249 (method url-fetch)
3250 (uri (pypi-uri "rpython" version))
3251 (sha256
3252 (base32
3253 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3254 (build-system python-build-system)
3255 (arguments `(#:python ,python-2))
3256 (native-inputs
3257 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3258 (home-page "https://rpython.readthedocs.org")
3259 (synopsis "Framework for implementing interpreters and virtual machines")
3260 (description "RPython is a translation and support framework for
3261producing implementations of dynamic languages, emphasizing a clean separation
3262between language specification and implementation aspects.")
3263 (license license:expat)))
3264
3265;; NOTE: when upgrading numpy please make sure that python-pandas and
3266;; python-scipy still build, as these three packages are often used together.
3267(define-public python-numpy
3268 (package
3269 (name "python-numpy")
3270 (version "1.15.4")
3271 (source
3272 (origin
3273 (method url-fetch)
3274 (uri (string-append
3275 "https://github.com/numpy/numpy/releases/download/v"
3276 version "/numpy-" version ".tar.gz"))
3277 (sha256
3278 (base32
3279 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3280 (build-system python-build-system)
3281 (inputs
3282 `(("openblas" ,openblas)
3283 ("lapack" ,lapack)))
3284 (native-inputs
3285 `(("python-cython" ,python-cython)
3286 ("python-pytest" ,python-pytest)
3287 ("gfortran" ,gfortran)))
3288 (arguments
3289 `(#:phases
3290 (modify-phases %standard-phases
3291 (add-before 'build 'configure-blas-lapack
3292 (lambda* (#:key inputs #:allow-other-keys)
3293 (call-with-output-file "site.cfg"
3294 (lambda (port)
3295 (format port
3296 "[openblas]
3297libraries = openblas
3298library_dirs = ~a/lib
3299include_dirs = ~a/include
3300
3301# backslash-n to make emacs happy
3302\n[lapack]
3303lapack_libs = lapack
3304library_dirs = ~a/lib
3305include_dirs = ~a/include
3306"
3307 (assoc-ref inputs "openblas")
3308 (assoc-ref inputs "openblas")
3309 (assoc-ref inputs "lapack")
3310 (assoc-ref inputs "lapack"))))
3311 #t))
3312 (add-before 'build 'fix-executable-paths
3313 (lambda* (#:key inputs #:allow-other-keys)
3314 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3315 ;; instead of /bin/sh.
3316 (substitute* "numpy/distutils/exec_command.py"
3317 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3318 (string-append match-start (assoc-ref inputs "bash") match-end)))
3319 ;; Use "gcc" executable, not "cc".
3320 (substitute* "numpy/distutils/system_info.py"
3321 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3322 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3323 #t))
3324 ;; Tests can only be run after the library has been installed and not
3325 ;; within the source directory.
3326 (delete 'check)
3327 (add-after 'install 'check
3328 (lambda* (#:key outputs inputs #:allow-other-keys)
3329 ;; Make installed package available for running the tests
3330 (add-installed-pythonpath inputs outputs)
3331 ;; Make sure "f2py" etc is found.
3332 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3333 ":" (getenv "PATH")))
3334 (with-directory-excursion "/tmp"
3335 (invoke "python" "-c"
3336 "import numpy; numpy.test(verbose=2)")))))))
3337 (home-page "http://www.numpy.org/")
3338 (synopsis "Fundamental package for scientific computing with Python")
3339 (description "NumPy is the fundamental package for scientific computing
3340with Python. It contains among other things: a powerful N-dimensional array
3341object, sophisticated (broadcasting) functions, tools for integrating C/C++
3342and Fortran code, useful linear algebra, Fourier transform, and random number
3343capabilities.")
3344 (license license:bsd-3)))
3345
3346(define-public python2-numpy
3347 (package-with-python2 python-numpy))
3348
3349;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3350;; interest only for legacy code going back to NumPy's predecessor
3351;; Numeric.
3352(define-public python2-numpy-1.8
3353 (package (inherit python2-numpy)
3354 (version "1.8.2")
3355 (source
3356 (origin
3357 (method url-fetch)
3358 (uri (string-append
3359 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3360 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3361 (sha256
3362 (base32
3363 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3364 (arguments
3365 (substitute-keyword-arguments (package-arguments python2-numpy)
3366 ((#:phases phases)
3367 `(modify-phases ,phases
3368 (replace 'configure-blas-lapack
3369 (lambda* (#:key inputs #:allow-other-keys)
3370 (call-with-output-file "site.cfg"
3371 (lambda (port)
3372 (format port
3373 "[openblas]
3374libraries = openblas,lapack
3375library_dirs = ~a/lib:~a/lib
3376include_dirs = ~a/include:~a/include
3377"
3378 (assoc-ref inputs "openblas")
3379 (assoc-ref inputs "lapack")
3380 (assoc-ref inputs "openblas")
3381 (assoc-ref inputs "lapack"))))
3382 #t))))))
3383 (native-inputs
3384 `(("python2-nose" ,python2-nose)))
3385 (description "NumPy is the fundamental package for scientific computing
3386with Python. It contains among other things: a powerful N-dimensional array
3387object, sophisticated (broadcasting) functions, tools for integrating C/C++
3388and Fortran code, useful linear algebra, Fourier transform, and random number
3389capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3390that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3391Numeric.")
3392 (license license:bsd-3)))
3393
3394(define-public python-munch
3395 (package
3396 (name "python-munch")
3397 (version "2.0.4")
3398 (source
3399 (origin
3400 (method url-fetch)
3401 (uri (pypi-uri "munch" version))
3402 (sha256
3403 (base32
3404 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3405 (build-system python-build-system)
3406 (home-page "https://github.com/Infinidat/munch")
3407 (synopsis "Dot-accessible dictionary")
3408 (description "Munch is a dot-accessible dictionary similar to JavaScript
3409objects.")
3410 (license license:expat)))
3411
3412(define-public python2-munch
3413 (package-with-python2 python-munch))
3414
3415(define-public python-colormath
3416 (package
3417 (name "python-colormath")
3418 (version "3.0.0")
3419 (source
3420 (origin
3421 (method url-fetch)
3422 (uri (pypi-uri "colormath" version))
3423 (sha256
3424 (base32
3425 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3426 (build-system python-build-system)
3427 (propagated-inputs
3428 `(("python-networkx" ,python-networkx)
3429 ("python-numpy" ,python-numpy)))
3430 (home-page "https://github.com/gtaylor/python-colormath")
3431 (synopsis "Color math and conversion library")
3432 (description
3433 "This is a Python library for color math and conversions.")
3434 (license license:bsd-3)))
3435
3436(define-public python2-colormath
3437 (package-with-python2 python-colormath))
3438
3439(define-public python-spectra
3440 (package
3441 (name "python-spectra")
3442 (version "0.0.11")
3443 (source
3444 (origin
3445 (method url-fetch)
3446 (uri (pypi-uri "spectra" version))
3447 (sha256
3448 (base32
3449 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3450 (build-system python-build-system)
3451 (arguments
3452 `(#:phases
3453 (modify-phases %standard-phases
3454 (replace 'check
38ec0f6a 3455 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3456 (propagated-inputs
3457 `(("python-colormath" ,python-colormath)))
3458 (native-inputs
3459 `(("python-nose" ,python-nose)))
3460 (home-page "https://github.com/jsvine/spectra")
3461 (synopsis "Color scales and color conversion")
3462 (description
3463 "This package provides a Python library intended to make color math,
3464color scales, and color space conversion easy. It has support for:
3465
3466@enumerate
3467@item Color scales
3468@item Color ranges
3469@item Color blending
3470@item Brightening/darkening colors
3471@item Saturating/desaturating colors
3472@item Conversion to/from multiple color spaces.
3473@end enumerate\n")
3474 (license license:expat)))
3475
3476(define-public python2-spectra
3477 (package-with-python2 python-spectra))
3478
3479(define-public python-numpy-documentation
3480 (package
3481 (name "python-numpy-documentation")
3482 (version (package-version python-numpy))
3483 (source (package-source python-numpy))
3484 (build-system python-build-system)
3485 (native-inputs
3486 `(("python-matplotlib" ,python-matplotlib)
3487 ("python-numpy" ,python-numpy)
3488 ("pkg-config" ,pkg-config)
3489 ("python-sphinx" ,python-sphinx)
3490 ("python-numpydoc" ,python-numpydoc)
3491 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3492 texlive-fonts-cm-super
3493 texlive-fonts-ec
3494 texlive-generic-ifxetex
3495 texlive-generic-pdftex
3496 texlive-latex-amsfonts
3497 texlive-latex-capt-of
3498 texlive-latex-cmap
3499 texlive-latex-environ
3500 texlive-latex-eqparbox
3501 texlive-latex-etoolbox
3502 texlive-latex-expdlist
3503 texlive-latex-fancyhdr
3504 texlive-latex-fancyvrb
3505 texlive-latex-fncychap
3506 texlive-latex-float
3507 texlive-latex-framed
3508 texlive-latex-geometry
3509 texlive-latex-graphics
3510 texlive-latex-hyperref
3511 texlive-latex-mdwtools
3512 texlive-latex-multirow
3513 texlive-latex-needspace
3514 texlive-latex-oberdiek
3515 texlive-latex-parskip
3516 texlive-latex-preview
3517 texlive-latex-tabulary
3518 texlive-latex-threeparttable
3519 texlive-latex-titlesec
3520 texlive-latex-trimspaces
3521 texlive-latex-ucs
3522 texlive-latex-upquote
3523 texlive-latex-url
3524 texlive-latex-varwidth
3525 texlive-latex-wrapfig)))
3526 ("texinfo" ,texinfo)
3527 ("perl" ,perl)
3528 ("scipy-sphinx-theme"
3529 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3530 (method git-fetch)
3531 (uri (git-reference
3532 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3533 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3534 (sha256
3535 (base32
3536 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3537 ,@(package-native-inputs python-numpy)))
3538 (arguments
3539 `(#:tests? #f ; we're only generating the documentation
3540 #:phases
3541 (modify-phases %standard-phases
3542 (delete 'build)
3543 (replace 'install
3544 (lambda* (#:key inputs outputs #:allow-other-keys)
3545 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3546 (doc (string-append
3547 data "/doc/" ,name "-"
3548 ,(package-version python-numpy)))
3549 (info-reader (string-append data "/info"))
3550 (html (string-append doc "/html"))
3551 (scipy-sphinx-theme "scipy-sphinx-theme")
3552 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3553 (pyver ,(string-append "PYVER=")))
3554
3555 ;; FIXME: this is needed to for texlive-union to generate
3556 ;; fonts, which are not found.
3557 (setenv "HOME" "/tmp")
3558
3559 (with-directory-excursion "doc"
3560 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3561 (mkdir-p html)
4fc898da
RW
3562 (invoke "make" "html" pyver)
3563 (invoke "make" "latex" "PAPER=a4" pyver)
3564 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3565 "all-pdf" "PAPER=a4" pyver)
3566 ;; FIXME: Generation of the info file fails.
4fc898da 3567 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3568 ;; (mkdir-p info)
3569 ;; (copy-file "build/texinfo/numpy.info"
3570 ;; (string-append info "/numpy.info"))
3571 (for-each (lambda (file)
3572 (copy-file (string-append "build/latex" file)
3573 (string-append doc file)))
3574 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3575 (with-directory-excursion "build/html"
3576 (for-each (lambda (file)
3577 (let* ((dir (dirname file))
3578 (tgt-dir (string-append html "/" dir)))
3579 (unless (equal? "." dir)
3580 (mkdir-p tgt-dir))
3581 (install-file file html)))
3582 (find-files "." ".*")))))
3583 #t)))))
3584 (home-page (package-home-page python-numpy))
3585 (synopsis "Documentation for the python-numpy package")
3586 (description (package-description python-numpy))
3587 (license (package-license python-numpy))))
3588
3589(define-public python2-numpy-documentation
3590 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3591 (package
3592 (inherit numpy-documentation)
3593 (native-inputs `(("python2-functools32" ,python2-functools32)
3594 ,@(package-native-inputs numpy-documentation))))))
3595
3596(define-public python-pygit2
3597 (package
3598 (name "python-pygit2")
dac8b275 3599 (version "0.28.2")
44d10b1f
RW
3600 (source
3601 (origin
3602 (method url-fetch)
3603 (uri (pypi-uri "pygit2" version))
3604 (sha256
dac8b275 3605 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3606 (build-system python-build-system)
3607 (arguments
c3ecab0d 3608 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3609 (propagated-inputs
3610 `(("python-six" ,python-six)
3611 ("python-cffi" ,python-cffi)
3612 ("libgit2" ,libgit2)
3613 ("python-tox" ,python-tox)))
3614 (native-inputs
3615 `(("python-pytest" ,python-pytest)))
3616 (home-page "https://github.com/libgit2/pygit2")
3617 (synopsis "Python bindings for libgit2")
3618 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3619library, libgit2 implements Git plumbing.")
3620 ;; GPL2.0 only, with linking exception.
3621 (license license:gpl2)))
3622
3623(define-public python2-pygit2
3624 (package-with-python2 python-pygit2))
3625
3626(define-public python-pyparsing
3627 (package
3628 (name "python-pyparsing")
6d3cff5a 3629 (version "2.3.1")
44d10b1f
RW
3630 (source
3631 (origin
3632 (method url-fetch)
3633 (uri (pypi-uri "pyparsing" version))
3634 (sha256
6d3cff5a 3635 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3636 (build-system python-build-system)
3637 (outputs '("out" "doc"))
3638 (arguments
3639 `(#:tests? #f ; no test target
3640 #:phases
3641 (modify-phases %standard-phases
3642 (add-after 'install 'install-doc
3643 (lambda* (#:key outputs #:allow-other-keys)
3644 (let* ((doc (string-append (assoc-ref outputs "doc")
3645 "/share/doc/" ,name "-" ,version))
3646 (html-doc (string-append doc "/html"))
3647 (examples (string-append doc "/examples")))
3648 (mkdir-p html-doc)
3649 (mkdir-p examples)
3650 (for-each
3651 (lambda (dir tgt)
3652 (map (lambda (file)
3653 (install-file file tgt))
3654 (find-files dir ".*")))
3655 (list "docs" "htmldoc" "examples")
3656 (list doc html-doc examples))
3657 #t))))))
3658 (home-page "https://github.com/pyparsing/pyparsing")
3659 (synopsis "Python parsing class library")
3660 (description
3661 "The pyparsing module is an alternative approach to creating and
3662executing simple grammars, vs. the traditional lex/yacc approach, or the use
3663of regular expressions. The pyparsing module provides a library of classes
3664that client code uses to construct the grammar directly in Python code.")
3665 (license license:expat)))
3666
3667(define-public python2-pyparsing
3668 (package-with-python2 python-pyparsing))
3669
3670(define-public python-numpydoc
3671 (package
3672 (name "python-numpydoc")
3673 (version "0.8.0")
3674 (source
3675 (origin
3676 (method url-fetch)
3677 (uri (pypi-uri "numpydoc" version))
3678 (sha256
3679 (base32
3680 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3681 (build-system python-build-system)
3682 (propagated-inputs
3683 `(("python-sphinx" ,python-sphinx)))
3684 (native-inputs
3685 `(("python-nose" ,python-nose)))
3686 (home-page "https://pypi.python.org/pypi/numpydoc")
3687 (synopsis
3688 "Numpy's Sphinx extensions")
3689 (description
3690 "Sphinx extension to support docstrings in Numpy format.")
3691 (license license:bsd-2)))
3692
3693(define-public python2-numpydoc
3694 (package-with-python2 python-numpydoc))
3695
3696(define-public python-numexpr
3697 (package
3698 (name "python-numexpr")
3699 (version "2.6.5")
3700 (source
3701 (origin
3702 (method url-fetch)
3703 (uri (pypi-uri "numexpr" version))
3704 (sha256
3705 (base32
3706 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3707 (build-system python-build-system)
3708 (arguments `(#:tests? #f)) ; no tests included
3709 (propagated-inputs
3710 `(("python-numpy" ,python-numpy)))
3711 (home-page "https://github.com/pydata/numexpr")
3712 (synopsis "Fast numerical expression evaluator for NumPy")
3713 (description
3714 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3715expressions that operate on arrays are accelerated and use less memory than
3716doing the same calculation in Python. In addition, its multi-threaded
3717capabilities can make use of all your cores, which may accelerate
3718computations, most specially if they are not memory-bounded (e.g. those using
3719transcendental functions).")
3720 (license license:expat)))
3721
3722(define-public python2-numexpr
3723 (package-with-python2 python-numexpr))
3724
3725(define-public python-cycler
3726 (package
3727 (name "python-cycler")
3728 (version "0.10.0")
3729 (source (origin
3730 (method url-fetch)
3731 (uri (pypi-uri "cycler" version))
3732 (sha256
3733 (base32
3734 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3735 (build-system python-build-system)
3736 (arguments
3737 ;; XXX: The current version requires 'coveralls' which we don't have.
3738 ;; Enable this for the next release which uses 'python-pytest'.
3739 '(#:tests? #f))
3740 (propagated-inputs
3741 `(("python-six" ,python-six)))
3742 (home-page "http://matplotlib.org/cycler/")
3743 (synopsis "Composable keyword argument iterator")
3744 (description
3745 "When using @code{matplotlib} and plotting more than one line, it is
3746common to want to be able to want to be able to cycle over one or more artist
3747styles; but the plotting logic can quickly become involved.
3748To address this and enable easy cycling over arbitrary @code{kwargs}, the
3749@code{Cycler} class was developed.")
3750 (license license:bsd-3)))
3751
3752(define-public python2-cycler
3753 (package-with-python2 python-cycler))
3754
3755(define-public python-colorspacious
3756 (package
3757 (name "python-colorspacious")
3758 (version "1.1.0")
3759 (source
dee92e65
TGR
3760 (origin
3761 (method git-fetch)
3762 (uri (git-reference
3763 (url "https://github.com/njsmith/colorspacious.git")
3764 (commit (string-append "v" version))))
3765 (file-name (git-file-name name version))
3766 (sha256
3767 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
44d10b1f
RW
3768 (build-system python-build-system)
3769 (propagated-inputs
3770 `(("python-numpy" ,python-numpy)))
3771 (native-inputs
3772 `(("python-nose" ,python-nose)))
3773 (arguments
3774 `(#:phases
3775 (modify-phases %standard-phases
3776 (replace 'check
3777 (lambda _
c988afda 3778 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3779 (home-page "https://github.com/njsmith/colorspacious")
3780 (synopsis "Python library for colorspace conversions")
3781 (description "@code{colorspacious} is a Python library that lets you
3782convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3783 (license license:expat)))
3784
3785(define-public python2-colorspacious
3786 (package-with-python2 python-colorspacious))
3787
3788(define-public python-matplotlib
3789 (package
3790 (name "python-matplotlib")
3791 (version "2.2.3")
3792 (source
3793 (origin
3794 (method url-fetch)
3795 (uri (pypi-uri "matplotlib" version))
3796 (sha256
3797 (base32
3798 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3799 (build-system python-build-system)
3800 (propagated-inputs ; the following packages are all needed at run time
3801 `(("python-cycler" ,python-cycler)
3802 ("python-kiwisolver" ,python-kiwisolver)
3803 ("python-pyparsing" ,python-pyparsing)
3804 ("python-pygobject" ,python-pygobject)
3805 ("gobject-introspection" ,gobject-introspection)
3806 ("python-tkinter" ,python "tk")
3807 ("python-dateutil" ,python-dateutil)
3808 ("python-numpy" ,python-numpy)
3809 ("python-pillow" ,python-pillow)
3810 ("python-pytz" ,python-pytz)
3811 ("python-six" ,python-six)
44d10b1f
RW
3812 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3813 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3814 ;; object. For this reason we need to import both libraries.
3815 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3816 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
3817 ("python-cairocffi" ,python-cairocffi)))
3818 (inputs
3819 `(("libpng" ,libpng)
3820 ("imagemagick" ,imagemagick)
3821 ("freetype" ,freetype)
3822 ("cairo" ,cairo)
3823 ("glib" ,glib)
3824 ;; FIXME: Add backends when available.
3825 ;("python-wxpython" ,python-wxpython)
3826 ("tcl" ,tcl)
3827 ("tk" ,tk)))
3828 (native-inputs
3829 `(("pkg-config" ,pkg-config)
3830 ("python-nose" ,python-nose)
3831 ("python-mock" ,python-mock)))
3832 (arguments
3833 `(#:phases
3834 (modify-phases %standard-phases
3835 (add-before 'build 'configure-environment
3836 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
3837 (let ((cairo (assoc-ref inputs "cairo")))
3838 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 3839 ;; has not effect.
34c2a16b 3840 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
3841 (setenv "HOME" (getcwd))
3842 (call-with-output-file "setup.cfg"
3843 (lambda (port)
3844 (format port "[directories]~%
3845basedirlist = ~a,~a~%
3846 [rc_options]~%
3847backend = TkAgg~%"
3848 (assoc-ref inputs "tcl")
3849 (assoc-ref inputs "tk")))))
3850 #t)))))
3851 (home-page "http://matplotlib.org")
3852 (synopsis "2D plotting library for Python")
3853 (description
3854 "Matplotlib is a Python 2D plotting library which produces publication
3855quality figures in a variety of hardcopy formats and interactive environments
3856across platforms. Matplotlib can be used in Python scripts, the python and
3857ipython shell, web application servers, and six graphical user interface
3858toolkits.")
3859 (license license:psfl)
3860 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3861
3862(define-public python2-matplotlib
3863 (let ((matplotlib (package-with-python2
3864 (strip-python2-variant python-matplotlib))))
3865 (package (inherit matplotlib)
3866 ;; Make sure to use special packages for Python 2 instead
3867 ;; of those automatically rewritten by package-with-python2.
3868 (propagated-inputs
3869 `(("python2-pycairo" ,python2-pycairo)
3870 ("python2-backports-functools-lru-cache"
3871 ,python2-backports-functools-lru-cache)
3872 ("python2-functools32" ,python2-functools32)
3873 ("python2-pygobject-2" ,python2-pygobject-2)
3874 ("python2-subprocess32" ,python2-subprocess32)
3875 ("python2-tkinter" ,python-2 "tk")
3876 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3877 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3878
3879(define-public python-matplotlib-documentation
3880 (package
3881 (name "python-matplotlib-documentation")
3882 (version (package-version python-matplotlib))
3883 (source (package-source python-matplotlib))
3884 (build-system python-build-system)
3885 (native-inputs
3886 `(("python-matplotlib" ,python-matplotlib)
3887 ("python-colorspacious" ,python-colorspacious)
3888 ("python-sphinx" ,python-sphinx)
3889 ("python-sphinx-gallery" ,python-sphinx-gallery)
3890 ("python-numpydoc" ,python-numpydoc)
3891 ("python-ipython" ,python-ipython)
e7a53914 3892 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3893 ("python-mock" ,python-mock)
3894 ("graphviz" ,graphviz)
e7a53914
RW
3895 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3896 texlive-latex-amsmath
3897 texlive-latex-enumitem
3898 texlive-latex-expdlist
3899 texlive-latex-geometry
3900 texlive-latex-preview
3901 texlive-latex-type1cm
3902 texlive-latex-ucs
3903
3904 texlive-generic-pdftex
3905
3906 texlive-fonts-amsfonts
3907 texlive-fonts-ec
3908 texlive-fonts-adobe-times
3909 texlive-fonts-txfonts)))
44d10b1f
RW
3910 ("texinfo" ,texinfo)
3911 ,@(package-native-inputs python-matplotlib)))
3912 (arguments
3913 `(#:tests? #f ; we're only generating documentation
3914 #:phases
3915 (modify-phases %standard-phases
3916 (replace 'build
3917 (lambda _
3918 (chdir "doc")
e7a53914
RW
3919 (setenv "PYTHONPATH"
3920 (string-append (getenv "PYTHONPATH")
3921 ":" (getcwd) "/../examples/units"))
44d10b1f 3922 (substitute* "conf.py"
e7a53914
RW
3923 ;; Don't use git.
3924 (("^SHA = check_output.*")
3925 (string-append "SHA = \"" ,version "\"\n"))
3926 ;; Don't fetch intersphinx files from the Internet
3927 (("^explicit_order_folders" m)
3928 (string-append "intersphinx_mapping = {}\n" m))
3929 (("'sphinx.ext.intersphinx',") "")
3930 ;; Disable URL embedding which requires internet access.
3931 (("'https://docs.scipy.org/doc/numpy'") "None")
3932 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3933 (invoke "make"
3934 "SPHINXBUILD=sphinx-build"
3935 "SPHINXOPTS=" ; don't abort on warnings
3936 "html" "texinfo")))
44d10b1f
RW
3937 (replace 'install
3938 (lambda* (#:key inputs outputs #:allow-other-keys)
3939 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3940 (doc (string-append data "/doc/python-matplotlib-" ,version))
3941 (info (string-append data "/info"))
3942 (html (string-append doc "/html")))
3943 (mkdir-p html)
3944 (mkdir-p info)
3945 (copy-recursively "build/html" html)
3946 (symlink (string-append html "/_images")
3947 (string-append info "/matplotlib-figures"))
3948 (with-directory-excursion "build/texinfo"
3949 (substitute* "matplotlib.texi"
3950 (("@image\\{([^,]*)" all file)
3951 (string-append "@image{matplotlib-figures/" file)))
3952 (symlink (string-append html "/_images")
3953 "./matplotlib-figures")
e7a53914
RW
3954 (invoke "makeinfo" "--no-split"
3955 "-o" "matplotlib.info" "matplotlib.texi"))
3956 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
3957 #t)))))
3958 (home-page (package-home-page python-matplotlib))
3959 (synopsis "Documentation for the python-matplotlib package")
3960 (description (package-description python-matplotlib))
3961 (license (package-license python-matplotlib))))
3962
3963(define-public python2-matplotlib-documentation
3964 (package-with-python2 python-matplotlib-documentation))
3965
55dae98f
RW
3966(define-public python-matplotlib-venn
3967 (package
3968 (name "python-matplotlib-venn")
3969 (version "0.11.5")
3970 (source
3971 (origin
3972 (method url-fetch)
3973 (uri (pypi-uri "matplotlib-venn" version ".zip"))
3974 (sha256
3975 (base32
3976 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
3977 (build-system python-build-system)
3978 (arguments '(#:tests? #f)) ; tests are not included
3979 (propagated-inputs
3980 `(("python-matplotlib" ,python-matplotlib)
3981 ("python-numpy" ,python-numpy)
3982 ("python-scipy" ,python-scipy)))
3983 (native-inputs
3984 `(("unzip" ,unzip)))
3985 (home-page "https://github.com/konstantint/matplotlib-venn")
3986 (synopsis "Plot area-proportional Venn diagrams")
3987 (description
3988 "This package provides tools for plotting area-proportional two- and
3989three-way Venn diagrams in @code{matplotlib}.")
3990 (license license:expat)))
3991
44d10b1f
RW
3992(define-public python2-pysnptools
3993 (package
3994 (name "python2-pysnptools")
5d1ade85 3995 (version "0.3.13")
44d10b1f
RW
3996 (source
3997 (origin
3998 (method url-fetch)
5d1ade85 3999 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4000 (sha256
4001 (base32
5d1ade85 4002 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4003 (build-system python-build-system)
4004 (arguments
5d1ade85
RW
4005 `(#:python ,python-2 ; only Python 2.7 is supported
4006 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4007 (propagated-inputs
4008 `(("python2-numpy" ,python2-numpy)
4009 ("python2-scipy" ,python2-scipy)
4010 ("python2-pandas" ,python2-pandas)))
44d10b1f 4011 (native-inputs
5d1ade85 4012 `(("python2-cython" ,python2-cython)))
1b66989b 4013 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4014 (synopsis "Library for reading and manipulating genetic data")
4015 (description
4016 "PySnpTools is a library for reading and manipulating genetic data. It
4017can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4018those files. It can also efficiently manipulate ranges of integers using set
4019operators such as union, intersection, and difference.")
4020 (license license:asl2.0)))
4021
4022(define-public python-scipy
4023 (package
4024 (name "python-scipy")
5cfc1632 4025 (version "1.2.2")
44d10b1f
RW
4026 (source
4027 (origin
4028 (method url-fetch)
4029 (uri (pypi-uri "scipy" version))
4030 (sha256
4031 (base32
5cfc1632 4032 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
44d10b1f
RW
4033 (build-system python-build-system)
4034 (propagated-inputs
4035 `(("python-numpy" ,python-numpy)
4036 ("python-matplotlib" ,python-matplotlib)
4037 ("python-pyparsing" ,python-pyparsing)))
4038 (inputs
4039 `(("lapack" ,lapack)
4040 ("openblas" ,openblas)))
4041 (native-inputs
4042 `(("python-cython" ,python-cython)
4043 ("python-pytest" ,python-pytest)
4044 ("python-sphinx" ,python-sphinx)
4045 ("python-numpydoc" ,python-numpydoc)
4046 ("gfortran" ,gfortran)
4047 ("perl" ,perl)
4048 ("which" ,which)))
4049 (outputs '("out" "doc"))
4050 (arguments
4051 `(#:phases
4052 (modify-phases %standard-phases
4053 (add-after 'unpack 'disable-broken-tests
4054 (lambda _
4055 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4056 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4057 (string-append indent
4058 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4059 m)))
4060 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4061 (("^def test_parallel_threads\\(\\):" m)
4062 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4063 m)))
4064 #t))
4065 (add-before 'build 'configure-openblas
4066 (lambda* (#:key inputs #:allow-other-keys)
4067 (call-with-output-file "site.cfg"
4068 (lambda (port)
4069 (format port
4070 "[blas]
4071libraries = openblas
4072library_dirs = ~a/lib
4073include_dirs = ~a/include
4074
4075# backslash-n to make emacs happy
4076\n[atlas]
4077library_dirs = ~a/lib
4078atlas_libs = openblas
4079"
4080 (assoc-ref inputs "openblas")
4081 (assoc-ref inputs "openblas")
4082 (assoc-ref inputs "openblas"))))
4083 #t))
4084 (add-after 'install 'install-doc
4085 (lambda* (#:key inputs outputs #:allow-other-keys)
4086 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4087 (doc (string-append data "/doc/" ,name "-" ,version))
4088 (html (string-append doc "/html"))
4089 (pyver ,(string-append "PYVER=" (version-major+minor
4090 (package-version python))))
4091 ;; By default it tries to run sphinx-build through the Python
4092 ;; interpreter which won't work with our shell wrapper.
4093 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4094 ;; Make installed package available for building the
4095 ;; documentation
4096 (add-installed-pythonpath inputs outputs)
4097 (with-directory-excursion "doc"
4098 ;; Fix generation of images for mathematical expressions.
4099 (substitute* (find-files "source" "conf\\.py")
4100 (("pngmath_use_preview = True")
4101 "pngmath_use_preview = False"))
4102 (mkdir-p html)
4103 (invoke "make" "html" pyver sphinxbuild)
4104 (with-directory-excursion "build/html"
4105 (for-each (lambda (file)
4106 (let* ((dir (dirname file))
4107 (tgt-dir (string-append html "/" dir)))
4108 (install-file file html)))
4109 (find-files "." ".*")))))
4110 #t))
4111 ;; Tests can only be run after the library has been installed and not
4112 ;; within the source directory.
4113 (delete 'check)
4114 (add-after 'install 'check
4115 (lambda* (#:key inputs outputs #:allow-other-keys)
4116 (add-installed-pythonpath inputs outputs)
4117 (with-directory-excursion "/tmp"
4118 (invoke "python" "-c"
4119 "import scipy; scipy.test(verbose=2)")))))))
4120 (home-page "https://www.scipy.org/")
4121 (synopsis "The Scipy library provides efficient numerical routines")
4122 (description "The SciPy library is one of the core packages that make up
4123the SciPy stack. It provides many user-friendly and efficient numerical
4124routines such as routines for numerical integration and optimization.")
4125 (properties `((python2-variant . ,(delay python2-scipy))))
4126 (license license:bsd-3)))
4127
4128(define-public python2-scipy
4129 (package-with-python2
4130 (strip-python2-variant python-scipy)))
4131
4132(define-public python-socksipy-branch
4133 (package
4134 (name "python-socksipy-branch")
4135 (version "1.01")
4136 (source
4137 (origin
4138 (method url-fetch)
4139 (uri (pypi-uri "SocksiPy-branch" version))
4140 (sha256
4141 (base32
4142 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4143 (build-system python-build-system)
4144 (arguments
4145 `(#:tests? #f)) ; There are no tests
4146 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4147 (synopsis "Python SOCKS module")
4148 (description
4149 "SocksiPy - A Python SOCKS client module. It provides a
4150socket-like interface that supports connections to any TCP
4151service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4152The original version was developed by Dan Haim, this is a
4153branch created by Mario Vilas to address some open issues,
4154as the original project seems to have been abandoned circa 2007.")
4155 (license license:bsd-3)))
4156
4157(define-public python2-socksipy-branch
4158 (package-with-python2 python-socksipy-branch))
4159
4160(define-public python-pycodestyle
4161 (package
4162 (name "python-pycodestyle")
4163 (version "2.4.0")
4164 (source
4165 (origin
4166 (method url-fetch)
4167 (uri (pypi-uri "pycodestyle" version))
4168 (sha256
4169 (base32
4170 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
4171 (build-system python-build-system)
4172 (home-page "https://pycodestyle.readthedocs.io/")
4173 (synopsis "Python style guide checker")
4174 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4175Python code against some of the style conventions in
4176@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4177 (license license:expat)))
4178
4179(define-public python2-pycodestyle
4180 (package-with-python2 python-pycodestyle))
4181
4182(define-public python-multidict
4183 (package
4184 (name "python-multidict")
4185 (version "4.2.0")
4186 (source
4187 (origin
4188 (method url-fetch)
4189 (uri (pypi-uri "multidict" version))
4190 (sha256
4191 (base32
4192 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4193 (build-system python-build-system)
4194 (native-inputs
4195 `(("python-pytest" ,python-pytest)
4196 ("python-pytest-runner" ,python-pytest-runner)))
4197 (home-page "https://github.com/aio-libs/multidict/")
4198 (synopsis "Multidict implementation")
4199 (description "Multidict is dict-like collection of key-value pairs
4200where key might be occurred more than once in the container.")
4201 (license license:asl2.0)))
4202
4203(define-public python-orderedmultidict
4204 (package
4205 (name "python-orderedmultidict")
4206 (version "0.7.11")
4207 (source
4208 (origin
4209 (method url-fetch)
4210 (uri (pypi-uri "orderedmultidict" version))
4211 (sha256
4212 (base32
4213 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4214 (build-system python-build-system)
4215 (arguments
4216 `(#:phases
4217 (modify-phases %standard-phases
4218 (add-after 'unpack 'fix-tests
4219 (lambda _
4220 ;; The package uses nosetest for running the tests.
4221 ;; Adding this initfile allows to run the test suite
4222 ;; without requiring nosetest.
d1c4f329
RW
4223 (with-output-to-file "tests/__init__.py" newline)
4224 #t)))))
44d10b1f
RW
4225 (propagated-inputs
4226 `(("python-six" ,python-six)))
4227 (native-inputs
4228 `(("python-pycodestyle" ,python-pycodestyle)))
4229 (home-page "https://github.com/gruns/orderedmultidict")
4230 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4231 (description "This package contains a library for ordered multivalue
4232dictionaries. A multivalue dictionary is a dictionary that can store
4233multiple values for the same key. An ordered multivalue dictionary is a
4234multivalue dictionary that retains the order of insertions and deletions.")
4235 (license license:unlicense)))
4236
4237(define-public python2-orderedmultidict
4238 (package-with-python2 python-orderedmultidict))
4239
4240(define-public python-autopep8
4241 (package
4242 (name "python-autopep8")
4243 (version "1.3.5")
4244 (source
4245 (origin
4246 (method url-fetch)
4247 (uri (pypi-uri "autopep8" version))
4248 (sha256
4249 (base32
4250 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4251 (build-system python-build-system)
4252 (propagated-inputs
4253 `(("python-pycodestyle" ,python-pycodestyle)))
4254 (home-page "https://github.com/hhatto/autopep8")
4255 (synopsis "Format Python code according to the PEP 8 style guide")
4256 (description
4257 "@code{autopep8} automatically formats Python code to conform to
4258the PEP 8 style guide. It uses the pycodestyle utility to determine
4259what parts of the code needs to be formatted. @code{autopep8} is
4260capable of fixing most of the formatting issues that can be reported
4261by pycodestyle.")
4262 (license (license:non-copyleft
4263 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4264
4265(define-public python2-autopep8
4266 (package-with-python2 python-autopep8))
4267
4268(define-public python-distutils-extra
4269 (package
4270 (name "python-distutils-extra")
4271 (version "2.38")
4272 (source
4273 (origin
4274 (method url-fetch)
4275 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4276 version "/+download/python-distutils-extra-"
4277 version ".tar.gz"))
4278 (sha256
4279 (base32
4280 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4281 (build-system python-build-system)
4282 (home-page "https://launchpad.net/python-distutils-extra/")
4283 (synopsis "Enhancements to Python's distutils")
4284 (description
4285 "The python-distutils-extra module enables you to easily integrate
4286gettext support, themed icons, and scrollkeeper-based documentation into
4287Python's distutils.")
4288 (license license:gpl2)))
4289
4290(define-public python2-distutils-extra
4291 (package-with-python2 python-distutils-extra))
4292
4293(define-public python2-elib.intl
4294 (package
4295 (name "python2-elib.intl")
4296 (version "0.0.3")
4297 (source
4298 (origin
4299 ;; This project doesn't tag releases or publish tarballs, so we take
4300 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4301 (method git-fetch)
4302 (uri (git-reference
4303 (url "https://github.com/dieterv/elib.intl.git")
4304 (commit "d09997cfef")))
4305 (file-name (string-append name "-" version "-checkout"))
4306 (sha256
4307 (base32
4308 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4309 (build-system python-build-system)
4310 (arguments
4311 ;; incompatible with Python 3 (exception syntax)
4312 `(#:python ,python-2
4313 #:tests? #f))
4314 (home-page "https://github.com/dieterv/elib.intl")
4315 (synopsis "Enhanced internationalization for Python")
4316 (description
4317 "The elib.intl module provides enhanced internationalization (I18N)
4318services for your Python modules and applications.")
4319 (license license:lgpl3+)))
4320
4321(define-public python-olefile
4322 (package
4323 (name "python-olefile")
5bef0f10 4324 (version "0.46")
44d10b1f
RW
4325 (source
4326 (origin
4327 (method url-fetch)
5bef0f10
MB
4328 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4329 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4330 (file-name (string-append name "-" version ".tar.gz"))
4331 (sha256
4332 (base32
5bef0f10 4333 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4334 (build-system python-build-system)
5bef0f10 4335 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4336 (synopsis "Read and write Microsoft OLE2 files.")
4337 (description
4338 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4339Storage or Compound Document, Microsoft Office). It is an improved version of
4340the OleFileIO module from PIL, the Python Image Library.")
4341 (license license:bsd-3)))
4342
4343(define-public python2-olefile
4344 (package-with-python2 python-olefile))
4345
4346(define-public python-pillow
4347 (package
4348 (name "python-pillow")
4349 (version "5.4.1")
4350 (source
4351 (origin
4352 (method url-fetch)
4353 (uri (pypi-uri "Pillow" version))
4354 (sha256
4355 (base32
4356 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
4357 (build-system python-build-system)
4358 (native-inputs
4359 `(("python-pytest" ,python-pytest)))
4360 (inputs
4361 `(("freetype" ,freetype)
4362 ("lcms" ,lcms)
4363 ("zlib" ,zlib)
4364 ("libjpeg" ,libjpeg)
4365 ("openjpeg" ,openjpeg)
4366 ("libtiff" ,libtiff)
4367 ("libwebp" ,libwebp)))
4368 (propagated-inputs
4369 `(("python-olefile" ,python-olefile)))
4370 (arguments
4371 `(#:phases
4372 (modify-phases %standard-phases
4373 (add-after 'unpack 'patch-ldconfig
4374 (lambda _
4375 (substitute* "setup.py"
4376 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4377 (delete 'check) ; We must run checks after python-pillow is installed.
4378 (add-after 'install 'check-installed
4379 (lambda* (#:key outputs inputs #:allow-other-keys)
4380 (begin
4381 (setenv "HOME" (getcwd))
4382 ;; Make installed package available for running the tests.
4383 (add-installed-pythonpath inputs outputs)
4384 (invoke "python" "selftest.py" "--installed")
4385 (invoke "python" "-m" "pytest" "-vv")))))))
4386 (home-page "https://python-pillow.org")
4387 (synopsis "Fork of the Python Imaging Library")
4388 (description
4389 "The Python Imaging Library adds image processing capabilities to your
4390Python interpreter. This library provides extensive file format support, an
4391efficient internal representation, and fairly powerful image processing
4392capabilities. The core image library is designed for fast access to data
4393stored in a few basic pixel formats. It should provide a solid foundation for
4394a general image processing tool.")
4395 (license (license:x11-style
4396 "http://www.pythonware.com/products/pil/license.htm"
4397 "The PIL Software License"))))
4398
4399(define-public python2-pillow
4400 (package-with-python2 python-pillow))
4401
4402(define-public python-pycparser
4403 (package
4404 (name "python-pycparser")
c6c0940e 4405 (version "2.19")
44d10b1f
RW
4406 (source
4407 (origin
4408 (method url-fetch)
4409 (uri (pypi-uri "pycparser" version))
4410 (sha256
4411 (base32
c6c0940e 4412 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4413 (outputs '("out" "doc"))
4414 (build-system python-build-system)
4415 (native-inputs
4416 `(("pkg-config" ,pkg-config)))
4417 (arguments
4418 `(#:phases
4419 (modify-phases %standard-phases
4420 (replace 'check
4421 (lambda _
4422 (with-directory-excursion "tests"
acb75c03
RW
4423 (invoke "python" "all_tests.py"))
4424 #t))
44d10b1f
RW
4425 (add-after 'install 'install-doc
4426 (lambda* (#:key outputs #:allow-other-keys)
4427 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4428 (doc (string-append data "/doc/" ,name "-" ,version))
4429 (examples (string-append doc "/examples")))
4430 (mkdir-p examples)
4431 (for-each (lambda (file)
4432 (copy-file (string-append "." file)
4433 (string-append doc file)))
4434 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4435 (copy-recursively "examples" examples)
4436 #t))))))
44d10b1f
RW
4437 (home-page "https://github.com/eliben/pycparser")
4438 (synopsis "C parser in Python")
4439 (description
4440 "Pycparser is a complete parser of the C language, written in pure Python
4441using the PLY parsing library. It parses C code into an AST and can serve as
4442a front-end for C compilers or analysis tools.")
4443 (license license:bsd-3)))
4444
4445(define-public python2-pycparser
4446 (package-with-python2 python-pycparser))
4447
4448(define-public python-pywavelets
4449 (package
4450 (name "python-pywavelets")
4451 (version "1.0.1")
4452 (home-page "https://github.com/PyWavelets/pywt")
4453 (source (origin
4454 (method url-fetch)
4455 (uri (pypi-uri "PyWavelets" version))
4456 (sha256
4457 (base32
4458 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4459 (build-system python-build-system)
4460 (arguments
4461 '(#:modules ((ice-9 ftw)
4462 (srfi srfi-1)
4463 (srfi srfi-26)
4464 (guix build utils)
4465 (guix build python-build-system))
4466 #:phases (modify-phases %standard-phases
4467 (replace 'check
4468 (lambda _
4469 (let ((cwd (getcwd))
4470 (libdir (find (cut string-prefix? "lib." <>)
4471 (scandir "build"))))
4472 (with-directory-excursion (string-append cwd "/build/" libdir)
4473 (invoke "nosetests" "-v" "."))))))))
4474 (native-inputs
4475 `(("python-matplotlib" ,python-matplotlib) ;for tests
4476 ("python-nose" ,python-nose)))
4477 (propagated-inputs
4478 `(("python-numpy" ,python-numpy)))
4479 (synopsis "Wavelet transforms in Python")
4480 (description
4481 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4482mathematical basis functions that are localized in both time and frequency.
4483Wavelet transforms are time-frequency transforms employing wavelets. They are
4484similar to Fourier transforms, the difference being that Fourier transforms are
4485localized only in frequency instead of in time and frequency.")
4486 (license license:expat)))
4487
4488(define-public python2-pywavelets
4489 (package-with-python2 python-pywavelets))
4490
4491(define-public python-xcffib
4492 (package
4493 (name "python-xcffib")
4494 (version "0.6.0")
4495 (source
4496 (origin
4497 (method url-fetch)
4498 (uri (pypi-uri "xcffib" version))
4499 (sha256
4500 (base32
4501 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4502 (build-system python-build-system)
4503 (inputs
4504 `(("libxcb" ,libxcb)))
4505 (propagated-inputs
4506 `(("python-cffi" ,python-cffi) ; used at run time
4507 ("python-six" ,python-six)))
4508 (arguments
4509 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4510 #:tests? #f
4511 #:phases
4512 (modify-phases %standard-phases
4513 (add-after 'unpack 'fix-libxcb-path
4514 (lambda* (#:key inputs #:allow-other-keys)
4515 (let ((libxcb (assoc-ref inputs "libxcb")))
4516 (substitute* '("xcffib/__init__.py")
4517 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4518 #t)))
4519 (add-after 'install 'install-doc
4520 (lambda* (#:key outputs #:allow-other-keys)
4521 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4522 "/doc/" ,name "-" ,version)))
4523 (mkdir-p doc)
4524 (copy-file "README.md"
4525 (string-append doc "/README.md"))
4526 #t))))))
4527 (home-page "https://github.com/tych0/xcffib")
4528 (synopsis "XCB Python bindings")
4529 (description
4530 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4531support for Python 3 and PyPy. It is based on cffi.")
4532 (license license:expat)))
4533
4534(define-public python2-xcffib
4535 (package-with-python2 python-xcffib))
4536
4537(define-public python-cairocffi
4538 (package
4539 (name "python-cairocffi")
4540 (version "0.9.0")
4541 (source
4542 (origin
4543 (method url-fetch)
4544 (uri (pypi-uri "cairocffi" version))
4545 (sha256
4546 (base32
4547 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4548 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4549 (build-system python-build-system)
4550 (outputs '("out" "doc"))
4551 (inputs
4552 `(("glib" ,glib)
4553 ("gtk+" ,gtk+)
4554 ("gdk-pixbuf" ,gdk-pixbuf)
4555 ("cairo" ,cairo)
4556 ("pango" ,pango)))
4557 (native-inputs
4558 `(("pkg-config" ,pkg-config)
4559 ("python-pytest" ,python-pytest)
4560 ("python-pytest-cov" ,python-pytest-cov)
4561 ("python-pytest-runner" ,python-pytest-runner)
4562 ("python-sphinx" ,python-sphinx)
4563 ("python-docutils" ,python-docutils)))
4564 (propagated-inputs
4565 `(("python-xcffib" ,python-xcffib))) ; used at run time
4566 (arguments
4567 `(#:phases
4568 (modify-phases %standard-phases
4569 (add-after 'unpack 'patch-paths
4570 (lambda* (#:key inputs outputs #:allow-other-keys)
4571 (substitute* (find-files "." "\\.py$")
4572 (("dlopen\\(ffi, 'cairo'")
4573 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4574 "/lib/libcairo.so.2'"))
4575 (("dlopen\\(ffi, 'gdk-3'")
4576 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4577 "/lib/libgtk-3.so.0'"))
4578 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4579 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4580 "/lib/libgdk_pixbuf-2.0.so.0'"))
4581 (("dlopen\\(ffi, 'glib-2.0'")
4582 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4583 "/lib/libglib-2.0.so.0'"))
4584 (("dlopen\\(ffi, 'gobject-2.0'")
4585 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4586 "/lib/libgobject-2.0.so.0'"))
4587 (("dlopen\\(ffi, 'pangocairo-1.0'")
4588 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4589 "/lib/libpangocairo-1.0.so.0'"))
4590 (("dlopen\\(ffi, 'pango-1.0'")
4591 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4592 "/lib/libpango-1.0.so.0'")))
4593 #t))
4594 (add-after 'install 'install-doc
4595 (lambda* (#:key inputs outputs #:allow-other-keys)
4596 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4597 (doc (string-append data "/doc/" ,name "-" ,version))
4598 (html (string-append doc "/html")))
4599 (setenv "LD_LIBRARY_PATH"
4600 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4601 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4602 (setenv "LANG" "en_US.UTF-8")
4603 (mkdir-p html)
4604 (for-each (lambda (file)
4605 (copy-file (string-append "." file)
4606 (string-append doc file)))
4607 '("/README.rst" "/CHANGES" "/LICENSE"))
4608 (system* "python" "setup.py" "build_sphinx")
4609 (copy-recursively "docs/_build/html" html)
4610 #t))))))
4611 (home-page "https://github.com/Kozea/cairocffi")
4612 (synopsis "Python bindings and object-oriented API for Cairo")
4613 (description
4614 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4615Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4616graphics library with support for multiple backends including image buffers,
4617PNG, PostScript, PDF, and SVG file output.")
4618 (license license:bsd-3)))
4619
4620(define-public python2-cairocffi
4621 (package-with-python2 python-cairocffi))
4622
4623(define-public python-decorator
4624 (package
4625 (name "python-decorator")
4626 (version "4.3.0")
4627 (source
4628 (origin
4629 (method url-fetch)
4630 (uri (pypi-uri "decorator" version))
4631 (sha256
4632 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4633 (build-system python-build-system)
4634 (home-page "https://pypi.python.org/pypi/decorator/")
4635 (synopsis "Python module to simplify usage of decorators")
4636 (description
4637 "The aim of the decorator module is to simplify the usage of decorators
4638for the average programmer, and to popularize decorators usage giving examples
4639of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4640etc. The core of this module is a decorator factory.")
4641 (license license:expat)))
4642
4643(define-public python2-decorator
4644 (package-with-python2 python-decorator))
4645
4646(define-public python-drmaa
4647 (package
4648 (name "python-drmaa")
4649 (version "0.7.7")
4650 (source
4651 (origin
4652 (method url-fetch)
4653 (uri (pypi-uri "drmaa" version))
4654 (sha256
4655 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4656 (build-system python-build-system)
4657 ;; The test suite requires libdrmaa which is provided by the cluster
4658 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4659 ;; should be set to the path of the libdrmaa library.
4660 (arguments '(#:tests? #f))
4661 (native-inputs
4662 `(("python-nose" ,python-nose)))
4663 (home-page "https://pypi.python.org/pypi/drmaa")
4664 (synopsis "Python bindings for the DRMAA library")
4665 (description
4666 "A Python package for Distributed Resource Management (DRM) job
4667submission and control. This package is an implementation of the DRMAA 1.0
4668Python language binding specification.")
4669 (license license:bsd-3)))
4670
4671(define-public python2-drmaa
4672 (package-with-python2 python-drmaa))
4673
4674(define-public python-grako
4675 (package
4676 (name "python-grako")
4677 (version "3.99.9")
4678 (source
4679 (origin
4680 (method url-fetch)
4681 (uri
4682 (pypi-uri "grako" version ".zip"))
4683 (sha256
4684 (base32
4685 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4686 (build-system python-build-system)
4687 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4688 (native-inputs
4689 `(("unzip" ,unzip)
4690 ("python-pytest" ,python-pytest)
4691 ("python-pytest-runner" ,python-pytest-runner)))
4692 (home-page "https://bitbucket.org/neogeny/grako")
4693 (synopsis "EBNF parser generator")
4694 (description
4695 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4696memoizing PEG/Packrat parser in Python.")
4697 (license license:bsd-3)))
4698
4699(define-public python2-grako
4700 (package-with-python2 python-grako))
4701
4702(define-public python-gridmap
4703 (package
4704 (name "python-gridmap")
4705 (version "0.13.0")
4706 (source
4707 (origin
768fea0f
TGR
4708 (method git-fetch)
4709 (uri (git-reference
4710 (url "https://github.com/pygridtools/gridmap.git")
4711 (commit (string-append "v" version))))
4712 (file-name (git-file-name name version))
44d10b1f 4713 (sha256
768fea0f 4714 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4715 (build-system python-build-system)
4716 (arguments
4717 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4718 (propagated-inputs
4719 `(("python-psutil" ,python-psutil)
4720 ("python-drmaa" ,python-drmaa)
4721 ("python-pyzmq" ,python-pyzmq)))
4722 (home-page "https://github.com/pygridtools/gridmap")
4723 (synopsis "Create jobs on a cluster directly from Python")
4724 (description
4725 "Gridmap is a Python package to allow you to easily create jobs on the
4726cluster directly from Python. You can directly map Python functions onto the
4727cluster without needing to write any wrapper code yourself.")
4728 (license license:gpl3+)))
4729
4730(define-public python2-gridmap
4731 (package-with-python2 python-gridmap))
4732
4733(define-public python-honcho
4734 (package
4735 (name "python-honcho")
4736 (version "1.0.1")
4737 (source
4738 (origin
8524d130
TGR
4739 (method git-fetch)
4740 (uri (git-reference
4741 (url "https://github.com/nickstenning/honcho.git")
4742 (commit (string-append "v" version))))
4743 (file-name (git-file-name name version))
44d10b1f 4744 (sha256
8524d130 4745 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4746 (build-system python-build-system)
4747 (native-inputs
4748 `(("python-pytest" ,python-pytest)
4749 ("python-mock" ,python-mock)
4750 ("python-tox" ,python-tox)
4751 ("which" ,which))) ;for tests
4752 (propagated-inputs
4753 `(("python-jinja2" ,python-jinja2)))
4754 (arguments
4755 `(#:phases
4756 (modify-phases %standard-phases
4757 (delete 'check)
4758 (add-after 'install 'check
4759 (lambda* (#:key outputs inputs #:allow-other-keys)
4760 ;; fix honcho path in testsuite
4761 (substitute* "tests/conftest.py"
4762 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4763 "/bin/honcho" "'")))
4764 ;; It's easier to run tests after install.
4765 ;; Make installed package available for running the tests
4766 (add-installed-pythonpath inputs outputs)
95b707fb 4767 (invoke "py.test" "-v"))))))
44d10b1f
RW
4768 (home-page "https://github.com/nickstenning/honcho")
4769 (synopsis "Manage Procfile-based applications")
4770 (description
4771 "A Procfile is a file which describes how to run an application
50fceab0 4772consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4773The output of all running processes is collected by honcho and
4774displayed.")
4775 (license license:expat)))
4776
4777(define-public python2-honcho
4778 (package-with-python2 python-honcho))
4779
4780(define-public python-pexpect
4781 (package
4782 (name "python-pexpect")
4783 (version "4.6.0")
4784 (source
4785 (origin
4786 (method url-fetch)
4787 (uri (pypi-uri "pexpect" version))
4788 (sha256
4789 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4790 (build-system python-build-system)
4791 (arguments
4792 `(#:phases
4793 (modify-phases %standard-phases
4794 (add-before 'check 'prepare-tests
4795 (lambda _
4796 (substitute* (find-files "tests")
4797 (("/bin/ls") (which "ls"))
4798 (("/bin/echo") (which "echo"))
4799 (("/bin/which") (which "which"))
4800 ;; Many tests try to use the /bin directory which
4801 ;; is not present in the build environment.
4802 ;; Use one that's non-empty and unlikely to change.
4803 (("/bin'") "/dev'"))
4804 ;; XXX: Socket connection test gets "Connection reset by peer".
4805 ;; Why does it not work? Delete for now.
4806 (delete-file "tests/test_socket.py")
4807 #t))
4808 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4809 (native-inputs
4810 `(("python-nose" ,python-nose)
4811 ("python-pytest" ,python-pytest)
4812 ("man-db" ,man-db)
4813 ("which" ,which)
4814 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4815 (propagated-inputs
4816 `(("python-ptyprocess" ,python-ptyprocess)))
4817 (home-page "http://pexpect.readthedocs.org/")
4818 (synopsis "Controlling interactive console applications")
4819 (description
4820 "Pexpect is a pure Python module for spawning child applications;
4821controlling them; and responding to expected patterns in their output.
4822Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4823child application and control it as if a human were typing commands.")
4824 (license license:isc)))
4825
4826(define-public python2-pexpect
4827 (package-with-python2 python-pexpect))
4828
4829(define-public python-setuptools-scm
4830 (package
4831 (name "python-setuptools-scm")
4832 (version "3.1.0")
4833 (source (origin
4834 (method url-fetch)
4835 (uri (pypi-uri "setuptools_scm" version))
4836 (sha256
4837 (base32
4838 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4839 (build-system python-build-system)
4840 (home-page "https://github.com/pypa/setuptools_scm/")
4841 (synopsis "Manage Python package versions in SCM metadata")
4842 (description
4843 "Setuptools_scm handles managing your Python package versions in
4844@dfn{software configuration management} (SCM) metadata instead of declaring
4845them as the version argument or in a SCM managed file.")
4846 (license license:expat)))
4847
4848(define-public python2-setuptools-scm
4849 (package-with-python2 python-setuptools-scm))
4850
bb74ea09
RW
4851(define-public python-pathlib2
4852 (package
4853 (name "python-pathlib2")
4854 (version "2.3.3")
4855 (source
4856 (origin
4857 (method url-fetch)
4858 (uri (pypi-uri "pathlib2" version))
4859 (sha256
4860 (base32
4861 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4862 (build-system python-build-system)
4863 (propagated-inputs
4864 `(("python-scandir" ,python-scandir)
4865 ("python-six" ,python-six)))
4866 (home-page "https://pypi.python.org/pypi/pathlib2/")
746d3384 4867 (synopsis "Object-oriented file system paths")
bb74ea09
RW
4868 (description "The goal of pathlib2 is to provide a backport of the
4869standard @code{pathlib} module which tracks the standard library module, so
4870all the newest features of the standard @code{pathlib} can be used also on
4871older Python versions.")
4872 (license license:expat)))
4873
15b65617
RW
4874(define-public python-importlib-metadata
4875 (package
4876 (name "python-importlib-metadata")
4877 (version "0.18")
4878 (source
4879 (origin
4880 (method url-fetch)
4881 (uri (pypi-uri "importlib_metadata" version))
4882 (sha256
4883 (base32
4884 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4885 (build-system python-build-system)
4886 (propagated-inputs
4887 `(("python-configparser" ,python-configparser)
4888 ("python-contextlib2" ,python-contextlib2)
4889 ("python-docutils" ,python-docutils)
4890 ("python-pathlib2" ,python-pathlib2)
4891 ("python-rst.linker" ,python-rst.linker)
4892 ("python-zipp" ,python-zipp)))
4893 (native-inputs
4894 `(("python-setuptools-scm" ,python-setuptools-scm)
4895 ("python-sphinx" ,python-sphinx)))
4896 (home-page "https://importlib-metadata.readthedocs.io/")
4897 (synopsis "Read metadata from Python packages")
4898 (description
4899 "@code{importlib_metadata} is a library which provides an API for
4900accessing an installed Python package's metadata, such as its entry points or
4901its top-level name. This functionality intends to replace most uses of
4902@code{pkg_resources} entry point API and metadata API. Along with
4903@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4904need to use the older and less efficient @code{pkg_resources} package.")
4905 (license license:asl2.0)))
4906
37c173d1
RW
4907(define-public python-jaraco-packaging
4908 (package
4909 (name "python-jaraco-packaging")
4910 (version "6.1")
4911 (source
4912 (origin
4913 (method url-fetch)
4914 (uri (pypi-uri "jaraco.packaging" version))
4915 (sha256
4916 (base32
4917 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4918 (build-system python-build-system)
4919 (propagated-inputs
4920 `(("python-pytest" ,python-pytest)
4921 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4922 ("python-pytest-flake8" ,python-pytest-flake8)
4923 ("python-rst.linker" ,python-rst.linker)
4924 ("python-setuptools" ,python-setuptools)
4925 ("python-setuptools-scm" ,python-setuptools-scm)
4926 ("python-six" ,python-six)
4927 ("python-sphinx" ,python-sphinx)))
4928 (home-page "https://github.com/jaraco/jaraco.packaging")
4929 (synopsis "Tools to supplement packaging Python releases")
4930 (description
4931 "This package provides various tools to supplement packaging Python
4932releases.")
4933 (license license:expat)))
4934
44d10b1f
RW
4935(define-public python-pathpy
4936 (package
4937 (name "python-pathpy")
49ad11e9 4938 (version "11.5.0")
44d10b1f
RW
4939 (source
4940 (origin
4941 (method url-fetch)
4942 (uri (pypi-uri "path.py" version))
4943 (sha256
49ad11e9
RW
4944 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
4945 (outputs '("out" "doc"))
44d10b1f
RW
4946 (build-system python-build-system)
4947 (propagated-inputs
4948 `(("python-appdirs" ,python-appdirs)))
4949 (native-inputs
4950 `(("python-setuptools-scm" ,python-setuptools-scm)
4951 ("python-sphinx" ,python-sphinx)
4952 ("python-rst.linker" ,python-rst.linker)
4953 ("python-pytest" ,python-pytest)
49ad11e9
RW
4954 ("python-pytest-runner" ,python-pytest-runner)
4955 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 4956 (arguments
49ad11e9
RW
4957 `(#:phases
4958 (modify-phases %standard-phases
4959 (add-after 'build 'build-doc
4960 (lambda _
4961 (setenv "LANG" "en_US.UTF-8")
4962 (invoke "python" "setup.py" "build_sphinx")))
4963 (add-after 'install 'install-doc
4964 (lambda* (#:key outputs #:allow-other-keys)
4965 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4966 (doc (string-append data "/doc/" ,name "-" ,version))
4967 (html (string-append doc "/html")))
4968 (mkdir-p html)
4969 (for-each (lambda (file)
4970 (copy-file file (string-append doc "/" file)))
4971 '("README.rst" "CHANGES.rst"))
4972 (copy-recursively "build/sphinx/html" html)
4973 #t)))
4974 (replace 'check
4975 (lambda _
4976 ;; The import time test aborts if an import takes longer than
4977 ;; 100ms. It may very well take a little longer than that.
4978 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
4979 (home-page "https://github.com/jaraco/path.py")
4980 (synopsis "Python module wrapper for built-in os.path")
4981 (description
4982 "@code{path.py} implements path objects as first-class entities, allowing
4983common operations on files to be invoked on those path objects directly.")
4984 (license license:expat)))
4985
4986(define-public python2-pathpy
4987 (package-with-python2 python-pathpy))
4988
4989(define-public python-simplegeneric
4990 (package
4991 (name "python-simplegeneric")
4992 (version "0.8.1")
4993 (source
4994 (origin
4995 (method url-fetch)
6c8c3980 4996 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4997 (sha256
4998 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4999 (build-system python-build-system)
5000 (native-inputs
5001 `(("unzip" ,unzip)))
5002 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5003 (synopsis "Python module for simple generic functions")
5004 (description
5005 "The simplegeneric module lets you define simple single-dispatch generic
5006functions, akin to Python’s built-in generic functions like @code{len()},
5007@code{iter()} and so on. However, instead of using specially-named methods,
5008these generic functions use simple lookup tables, akin to those used by
5009e.g. @code{pickle.dump()} and other generic functions found in the Python
5010standard library.")
5011 (license license:zpl2.1)))
5012
5013(define-public python2-simplegeneric
5014 (package-with-python2 python-simplegeneric))
5015
5016(define-public python-ipython-genutils
5017 ;; TODO: This package is retired, check if can be removed, see description.
5018 (package
5019 (name "python-ipython-genutils")
5020 (version "0.1.0")
5021 (source
5022 (origin
5023 (method url-fetch)
c9671d4b 5024 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5025 (sha256
5026 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5027 (build-system python-build-system)
5028 (arguments `(#:tests? #f)) ; no tests
5029 (home-page "https://ipython.org")
5030 (synopsis "Vestigial utilities from IPython")
5031 (description
5032 "This package provides retired utilities from IPython. No packages
5033outside IPython/Jupyter should depend on it.
5034
5035This package shouldn't exist. It contains some common utilities shared by
5036Jupyter and IPython projects during The Big Split. As soon as possible, those
5037packages will remove their dependency on this, and this package will go
5038away.")
5039 (license license:bsd-3)))
5040
5041(define-public python2-ipython-genutils
5042 (package-with-python2 python-ipython-genutils))
5043
5044(define-public python-traitlets
5045 (package
5046 (name "python-traitlets")
5047 (version "4.3.2")
5048 (source
5049 (origin
5050 (method url-fetch)
5051 (uri (pypi-uri "traitlets" version))
5052 (sha256
5053 (base32
5054 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5055 (build-system python-build-system)
5056 (arguments
5057 `(#:phases
5058 (modify-phases %standard-phases
5059 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5060 (propagated-inputs
5061 `(("python-ipython-genutils" ,python-ipython-genutils)
5062 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5063 (native-inputs
5064 `(("python-pytest" ,python-pytest)))
5065 (properties `((python2-variant . ,(delay python2-traitlets))))
5066 (home-page "https://ipython.org")
5067 (synopsis "Configuration system for Python applications")
5068 (description
5069 "Traitlets is a framework that lets Python classes have attributes with
5070type checking, dynamically calculated default values, and ‘on change’
5071callbacks. The package also includes a mechanism to use traitlets for
5072configuration, loading values from files or from command line arguments. This
5073is a distinct layer on top of traitlets, so you can use traitlets in your code
5074without using the configuration machinery.")
5075 (license license:bsd-3)))
5076
5077(define-public python2-traitlets
5078 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5079 (package
5080 (inherit traitlets)
5081 (propagated-inputs
5082 `(("python2-enum34" ,python2-enum34)
5083 ,@(package-propagated-inputs traitlets))))))
5084
5085(define-public python-jupyter-core
5086 (package
5087 (name "python-jupyter-core")
5088 (version "4.4.0")
5089 (source
5090 (origin
5091 (method url-fetch)
5092 (uri (string-append (pypi-uri "jupyter_core" version)))
5093 (sha256
5094 (base32
5095 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5096 (build-system python-build-system)
5097 ;; FIXME: not sure how to run the tests
5098 (arguments `(#:tests? #f))
5099 (propagated-inputs
5100 `(("python-traitlets" ,python-traitlets)))
5101 (home-page "http://jupyter.org/")
5102 (synopsis "Jupyter base package")
5103 (description
5104 "Jupyter core is the base package on which Jupyter projects rely.")
5105 (license license:bsd-3)))
5106
5107(define-public python2-jupyter-core
5108 (package-with-python2 python-jupyter-core))
5109
5110(define-public python-jupyter-client
5111 (package
5112 (name "python-jupyter-client")
5113 (version "5.2.4")
5114 (source
5115 (origin
5116 (method url-fetch)
5117 (uri (pypi-uri "jupyter_client" version))
5118 (sha256
5119 (base32
5120 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5121 (build-system python-build-system)
5122 ;; Tests fail because of missing native python kernel which I assume is
5123 ;; provided by the ipython package, which we cannot use because it would
5124 ;; cause a dependency cycle.
ddc586ea
LC
5125 (arguments
5126 `(#:tests? #f
5127
5128 #:phases (modify-phases %standard-phases
5129 (add-after 'unpack 'set-tool-file-names
5130 (lambda* (#:key inputs #:allow-other-keys)
5131 (let ((iproute (assoc-ref inputs "iproute")))
5132 (substitute* "jupyter_client/localinterfaces.py"
5133 (("'ip'")
5134 (string-append "'" iproute "/sbin/ip'")))
5135 #t))))))
5136 (inputs
5137 `(("iproute" ,iproute)))
44d10b1f
RW
5138 (propagated-inputs
5139 `(("python-pyzmq" ,python-pyzmq)
5140 ("python-traitlets" ,python-traitlets)
5141 ("python-jupyter-core" ,python-jupyter-core)))
5142 (home-page "http://jupyter.org/")
5143 (synopsis "Jupyter protocol implementation and client libraries")
5144 (description
5145 "The @code{jupyter_client} package contains the reference implementation
5146of the Jupyter protocol. It also provides client and kernel management APIs
5147for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5148installing @code{kernelspec}s for use with Jupyter frontends.")
5149 (license license:bsd-3)))
5150
5151(define-public python2-jupyter-client
5152 (package-with-python2 python-jupyter-client))
5153
5154(define-public python-ipykernel
5155 (package
5156 (name "python-ipykernel")
82110dea 5157 (version "5.1.1")
44d10b1f
RW
5158 (source
5159 (origin
5160 (method url-fetch)
5161 (uri (pypi-uri "ipykernel" version))
5162 (sha256
82110dea 5163 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
44d10b1f
RW
5164 (build-system python-build-system)
5165 (arguments
5166 `(#:phases
5167 (modify-phases %standard-phases
5168 (replace 'check
5169 (lambda _
5170 (setenv "HOME" "/tmp")
5171 (invoke "pytest" "-v")
aa856d02
LC
5172 #t))
5173 (add-after 'install 'set-python-file-name
5174 (lambda* (#:key outputs #:allow-other-keys)
5175 ;; Record the absolute file name of the 'python' executable in
5176 ;; 'kernel.json'.
5177 (let ((out (assoc-ref outputs "out")))
5178 (substitute* (string-append out "/share/jupyter"
5179 "/kernels/python3/kernel.json")
5180 (("\"python\"")
5181 (string-append "\"" (which "python") "\"")))
5182 #t))))))
44d10b1f
RW
5183 (propagated-inputs
5184 `(("python-ipython" ,python-ipython)
5185 ;; imported at runtime during connect
5186 ("python-jupyter-client" ,python-jupyter-client)))
5187 (native-inputs
5188 `(("python-pytest" ,python-pytest)
5189 ("python-nose" ,python-nose)))
5190 (home-page "https://ipython.org")
5191 (synopsis "IPython Kernel for Jupyter")
5192 (description
5193 "This package provides the IPython kernel for Jupyter.")
5194 (license license:bsd-3)))
5195
0f378947 5196;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5197(define-public python2-ipykernel
0f378947
RW
5198 (package
5199 (name "python2-ipykernel")
5200 (version "5.1.0")
5201 (source
5202 (origin
5203 (method url-fetch)
5204 (uri (pypi-uri "ipykernel" version))
5205 (sha256
5206 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5207 (build-system python-build-system)
5208 (arguments
5209 `(#:python ,python-2
5210 #:phases
5211 (modify-phases %standard-phases
5212 (replace 'check
5213 (lambda _
5214 (setenv "HOME" "/tmp")
5215 (invoke "pytest" "-v")
5216 #t)))))
5217 (propagated-inputs
5218 `(("python2-ipython" ,python2-ipython)
5219 ;; imported at runtime during connect
5220 ("python2-jupyter-client" ,python2-jupyter-client)))
5221 (native-inputs
5222 `(("python2-pytest" ,python2-pytest)
5223 ("python2-nose" ,python2-nose)))
5224 (home-page "https://ipython.org")
5225 (synopsis "IPython Kernel for Jupyter")
5226 (description
5227 "This package provides the IPython kernel for Jupyter.")
5228 (license license:bsd-3)))
44d10b1f 5229
966aa714
AE
5230(define-public python-pari-jupyter
5231 (package
5232 (name "python-pari-jupyter")
5233 (version "1.3.2")
5234 (source
5235 (origin
5236 (method url-fetch)
5237 (uri (pypi-uri "pari_jupyter" version))
5238 (sha256
5239 (base32
5240 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5241 (build-system python-build-system)
5242 (propagated-inputs
5243 `(("python-ipykernel" ,python-ipykernel)))
5244 (inputs
5245 `(("pari-gp" ,pari-gp)
5246 ("readline" ,readline)))
5247 (arguments
5248 `(#:tests? #f)) ; no test suite
5249 (home-page
5250 "https://github.com/jdemeyer/pari_jupyter")
5251 (synopsis "A Jupyter kernel for PARI/GP")
5252 (description "The package provides a PARI/GP kernel for Jupyter.")
5253 (license license:gpl3+)))
5254
dede052a
RW
5255(define-public python-backcall
5256 (package
5257 (name "python-backcall")
5258 (version "0.1.0")
5259 (source
5260 (origin
5261 (method url-fetch)
5262 (uri (pypi-uri "backcall" version))
5263 (sha256
5264 (base32
5265 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5266 (build-system python-build-system)
5267 (home-page "https://github.com/takluyver/backcall/")
5268 (synopsis "Specifications for callback functions passed in to an API")
5269 (description
5270 "If your code lets other people supply callback functions, it's important
5271to specify the function signature you expect, and check that functions support
5272that. Adding extra parameters later would break other peoples code unless
5273you're careful. The @code{backcall} package provides a way of specifying the
5274callback signature using a prototype function.")
5275 (license license:bsd-3)))
5276
44d10b1f
RW
5277;; This is the latest release of the LTS version of ipython with support for
5278;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5279;; dropped support for Python 2.7.
5280(define-public python2-ipython
44d10b1f 5281 (package
8b5f756c 5282 (name "python2-ipython")
44d10b1f
RW
5283 (version "5.8.0")
5284 (source
5285 (origin
5286 (method url-fetch)
5287 (uri (pypi-uri "ipython" version ".tar.gz"))
5288 (sha256
5289 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5290 (build-system python-build-system)
44d10b1f 5291 (propagated-inputs
8b5f756c
RW
5292 `(("python2-backports-shutil-get-terminal-size"
5293 ,python2-backports-shutil-get-terminal-size)
5294 ("python2-pathlib2" ,python2-pathlib2)
5295 ("python2-pyzmq" ,python2-pyzmq)
5296 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5297 ("python2-terminado" ,python2-terminado)
5298 ("python2-matplotlib" ,python2-matplotlib)
5299 ("python2-numpy" ,python2-numpy)
5300 ("python2-numpydoc" ,python2-numpydoc)
5301 ("python2-jinja2" ,python2-jinja2)
5302 ("python2-mistune" ,python2-mistune)
5303 ("python2-pexpect" ,python2-pexpect)
5304 ("python2-pickleshare" ,python2-pickleshare)
5305 ("python2-simplegeneric" ,python2-simplegeneric)
5306 ("python2-jsonschema" ,python2-jsonschema)
5307 ("python2-traitlets" ,python2-traitlets)
5308 ("python2-nbformat" ,python2-nbformat)
5309 ("python2-pygments" ,python2-pygments)))
5310 (inputs
5311 `(("readline" ,readline)
5312 ("which" ,which)))
5313 (native-inputs
5314 `(("graphviz" ,graphviz)
5315 ("pkg-config" ,pkg-config)
5316 ("python2-requests" ,python2-requests) ;; for tests
5317 ("python2-testpath" ,python2-testpath)
5318 ("python2-mock" ,python2-mock)
5319 ("python2-nose" ,python2-nose)))
5320 (arguments
5321 `(#:python ,python-2
5322 #:phases
5323 (modify-phases %standard-phases
5324 (add-before 'check 'delete-broken-tests
5325 (lambda* (#:key inputs #:allow-other-keys)
5326 ;; These tests throw errors for unknown reasons.
5327 (delete-file "IPython/core/tests/test_profile.py")
5328 (delete-file "IPython/core/tests/test_interactiveshell.py")
5329 (delete-file "IPython/core/tests/test_magic.py")
5330 #t)))))
5331 (home-page "https://ipython.org")
5332 (synopsis "IPython is a tool for interactive computing in Python")
5333 (description
5334 "IPython provides a rich architecture for interactive computing with:
5335Powerful interactive shells, a browser-based notebook, support for interactive
5336data visualization, embeddable interpreters and tools for parallel
5337computing.")
5338 (license license:bsd-3)))
5339
5340(define-public python-ipython
5341 (package
5342 (name "python-ipython")
5343 (version "7.5.0")
5344 (source
5345 (origin
5346 (method url-fetch)
5347 (uri (pypi-uri "ipython" version ".tar.gz"))
5348 (sha256
5349 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5350 (build-system python-build-system)
5351 (propagated-inputs
5352 `(("python-backcall" ,python-backcall)
5353 ("python-pyzmq" ,python-pyzmq)
5354 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5355 ("python-terminado" ,python-terminado)
5356 ("python-matplotlib" ,python-matplotlib)
5357 ("python-numpy" ,python-numpy)
5358 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5359 ("python-jedi" ,python-jedi)
44d10b1f
RW
5360 ("python-jinja2" ,python-jinja2)
5361 ("python-mistune" ,python-mistune)
5362 ("python-pexpect" ,python-pexpect)
5363 ("python-pickleshare" ,python-pickleshare)
5364 ("python-simplegeneric" ,python-simplegeneric)
5365 ("python-jsonschema" ,python-jsonschema)
5366 ("python-traitlets" ,python-traitlets)
5367 ("python-nbformat" ,python-nbformat)
5368 ("python-pygments" ,python-pygments)))
5369 (inputs
5370 `(("readline" ,readline)
5371 ("which" ,which)))
5372 (native-inputs
5373 `(("graphviz" ,graphviz)
5374 ("pkg-config" ,pkg-config)
5375 ("python-requests" ,python-requests) ;; for tests
5376 ("python-testpath" ,python-testpath)
8b5f756c 5377 ("python-nose" ,python-nose)))
44d10b1f
RW
5378 (arguments
5379 `(#:phases
5380 (modify-phases %standard-phases
44d10b1f
RW
5381 ;; Tests can only be run after the library has been installed and not
5382 ;; within the source directory.
5383 (delete 'check)
5384 (add-after 'install 'check
5385 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5386 (if tests?
5387 (begin
5388 ;; Make installed package available for running the tests
5389 (add-installed-pythonpath inputs outputs)
5390 (setenv "HOME" "/tmp/") ;; required by a test
5391 ;; We only test the core because one of the other tests
5392 ;; tries to import ipykernel.
5393 (invoke "python" "IPython/testing/iptest.py"
5394 "-v" "IPython/core/tests"))
5395 #t)))
5396 (add-before 'check 'fix-tests
5397 (lambda* (#:key inputs #:allow-other-keys)
5398 (substitute* "./IPython/utils/_process_posix.py"
5399 (("/usr/bin/env', 'which") (which "which")))
5400 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5401 (("#!/usr/bin/env python")
5402 (string-append "#!" (which "python"))))
44d10b1f
RW
5403 ;; This test introduces a circular dependency on ipykernel
5404 ;; (which depends on ipython).
5405 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5406 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5407 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5408 #t)))))
5409 (home-page "https://ipython.org")
5410 (synopsis "IPython is a tool for interactive computing in Python")
5411 (description
5412 "IPython provides a rich architecture for interactive computing with:
5413Powerful interactive shells, a browser-based notebook, support for interactive
5414data visualization, embeddable interpreters and tools for parallel
5415computing.")
8b5f756c 5416 (license license:bsd-3)))
44d10b1f 5417
8b5f756c
RW
5418(define-public python-ipython-documentation
5419 (package
5420 (inherit python-ipython)
5421 (name "python-ipython-documentation")
5422 (version (package-version python-ipython))
5423 (arguments
5424 `(#:phases
5425 (modify-phases %standard-phases
5426 (delete 'build)
5427 (delete 'check)
5428 (replace 'install
5429 (lambda* (#:key outputs #:allow-other-keys)
5430 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5431 (doc (string-append data "/doc/" ,name "-" ,version))
5432 (html (string-append doc "/html"))
5433 (man1 (string-append data "/man/man1"))
5434 (info (string-append data "/info"))
5435 (examples (string-append doc "/examples"))
5436 (python-arg (string-append "PYTHON=" (which "python"))))
5437 (setenv "LANG" "en_US.utf8")
5438 (with-directory-excursion "docs"
5439 ;; FIXME: pdf fails to build
5440 ;;(system* "make" "pdf" "PAPER=a4")
5441 (system* "make" python-arg "html")
5442 ;; FIXME: the generated texi file contains ^@^@, which trips
5443 ;; up the parser.
5444 ;; (system* "make" python-arg "info")
5445 )
5446 (copy-recursively "docs/man" man1)
5447 (copy-recursively "examples" examples)
5448 (copy-recursively "docs/build/html" html)
5449 ;; (copy-file "docs/build/latex/ipython.pdf"
5450 ;; (string-append doc "/ipython.pdf"))
5451 (mkdir-p info)
5452 ;; (copy-file "docs/build/texinfo/ipython.info"
5453 ;; (string-append info "/ipython.info"))
5454 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5455 #t)))))
5456 (inputs
5457 `(("python-ipython" ,python-ipython)
5458 ("python-ipykernel" ,python-ipykernel)))
5459 (native-inputs
5460 `(("python-sphinx" ,python-sphinx)
5461 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5462 ;; FIXME: It's possible that a smaller union would work just as well.
5463 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5464 texlive-fonts-ec
5465 texlive-generic-ifxetex
5466 texlive-generic-pdftex
5467 texlive-latex-amsfonts
5468 texlive-latex-capt-of
5469 texlive-latex-cmap
5470 texlive-latex-environ
5471 texlive-latex-eqparbox
5472 texlive-latex-etoolbox
5473 texlive-latex-expdlist
5474 texlive-latex-fancyhdr
5475 texlive-latex-fancyvrb
5476 texlive-latex-fncychap
5477 texlive-latex-float
5478 texlive-latex-framed
5479 texlive-latex-geometry
5480 texlive-latex-graphics
5481 texlive-latex-hyperref
5482 texlive-latex-mdwtools
5483 texlive-latex-multirow
5484 texlive-latex-needspace
5485 texlive-latex-oberdiek
5486 texlive-latex-parskip
5487 texlive-latex-preview
5488 texlive-latex-tabulary
5489 texlive-latex-threeparttable
5490 texlive-latex-titlesec
5491 texlive-latex-trimspaces
5492 texlive-latex-ucs
5493 texlive-latex-upquote
5494 texlive-latex-url
5495 texlive-latex-varwidth
5496 texlive-latex-wrapfig)))
5497 ("texinfo" ,texinfo)))))
44d10b1f
RW
5498
5499(define-public python-urwid
5500 (package
5501 (name "python-urwid")
5502 (version "2.0.1")
5503 (source
5504 (origin
5505 (method url-fetch)
5506 (uri (pypi-uri "urwid" version))
5507 (sha256
5508 (base32
5509 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5510 (build-system python-build-system)
5511 (home-page "http://urwid.org")
5512 (synopsis "Console user interface library for Python")
5513 (description
5514 "Urwid is a curses-based UI/widget library for Python. It includes many
5515features useful for text console applications.")
5516 (license license:lgpl2.1+)))
5517
5518(define-public python2-urwid
5519 (package-with-python2 python-urwid))
5520
5521(define-public python-urwidtrees
5522 (package
5523 (name "python-urwidtrees")
5524 (version "1.0.2")
5525 (source
5526 (origin
5527 (method url-fetch)
5528 ;; package author intends on distributing via github rather than pypi:
5529 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5530 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5531 version ".tar.gz"))
5532 (file-name (string-append name "-" version ".tar.gz"))
5533 (sha256
5534 (base32
5535 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5536 (build-system python-build-system)
5537 (arguments
5538 '(#:tests? #f)) ; no tests
5539 (propagated-inputs `(("python-urwid" ,python-urwid)))
5540 (home-page "https://github.com/pazz/urwidtrees")
5541 (synopsis "Tree widgets for urwid")
5542 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5543toolkit. Use it to build trees of widgets.")
5544 (license license:gpl3+)))
5545
5546(define-public python2-urwidtrees
5547 (package-with-python2 python-urwidtrees))
5548
5549(define-public python-ua-parser
5550 (package
5551 (name "python-ua-parser")
5552 (version "0.8.0")
5553 (source
5554 (origin
5555 (method url-fetch)
5556 (uri (pypi-uri "ua-parser" version))
5557 (sha256
5558 (base32
5559 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5560 (build-system python-build-system)
5561 (arguments
5562 `(#:tests? #f)) ;no test suite in release
5563 (native-inputs
5564 `(("python-pyyaml" ,python-pyyaml)))
5565 (home-page "https://github.com/ua-parser/uap-python")
5566 (synopsis "User agent parser")
5567 (description
5568 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5569 (license license:asl2.0)))
5570
5571(define-public python2-ua-parser
5572 (package-with-python2 python-ua-parser))
5573
5574(define-public python-user-agents
5575 (package
5576 (name "python-user-agents")
5577 (version "1.1.0")
5578 (source
5579 (origin
5580 (method url-fetch)
5581 (uri (pypi-uri "user-agents" version))
5582 (sha256
5583 (base32
5584 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5585 (build-system python-build-system)
5586 (arguments
5587 `(#:tests? #f)) ;missing devices.json test file in release
5588 (propagated-inputs
5589 `(("python-ua-parser" ,python-ua-parser)))
5590 (home-page "https://github.com/selwin/python-user-agents")
5591 (synopsis "User Agent strings parsing library")
5592 (description
5593 "A library to identify devices (phones, tablets) and their capabilities by
5594parsing (browser/HTTP) user agent strings.")
5595 (license license:expat)))
5596
5597(define-public python2-user-agents
5598 (package-with-python2 python-user-agents))
5599
5600(define-public python-dbus
5601 (package
5602 (name "python-dbus")
5603 (version "1.2.8")
5604 (source
5605 (origin
5606 (method url-fetch)
5607 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5608 "dbus-python-" version ".tar.gz"))
5609 (sha256
5610 (base32
5611 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5612 (build-system gnu-build-system)
5613 (arguments
5614 '(#:phases
5615 (modify-phases %standard-phases
5616 (add-before
5617 'check 'pre-check
5618 (lambda _
5619 ;; XXX: For the missing '/etc/machine-id'.
5620 (substitute* "test/run-test.sh"
5621 (("DBUS_FATAL_WARNINGS=1")
5622 "DBUS_FATAL_WARNINGS=0"))
5623 #t)))))
5624 (native-inputs
5625 `(("pkg-config" ,pkg-config)))
5626 (inputs
5627 `(("python" ,python-wrapper)
5628 ("dbus-glib" ,dbus-glib)))
5629 (synopsis "Python bindings for D-bus")
5630 (description "python-dbus provides bindings for libdbus, the reference
5631implementation of D-Bus.")
5632 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5633 (license license:expat)))
5634
5635(define-public python2-dbus
5636 (package (inherit python-dbus)
5637 (name "python2-dbus")
5638 (inputs `(("python" ,python-2)
5639 ,@(alist-delete "python"
5640 (package-inputs python-dbus)
5641 equal?)))
5642 ;; FIXME: on Python 2, the test_utf8 fails with:
5643 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5644 (arguments `(#:tests? #f))))
5645
fb236fdd
AG
5646(define-public python-notify2
5647 (package
5648 (name "python-notify2")
5649 (version "0.3.1")
5650 (source
5651 (origin
5652 (method url-fetch)
5653 (uri (pypi-uri "notify2" version))
5654 (sha256
5655 (base32
5656 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5657 (build-system python-build-system)
5658 (arguments `(#:tests? #f)) ; tests depend on system state
5659 (native-inputs
5660 `(("python-dbus" ,python-dbus)))
5661 (home-page "https://bitbucket.org/takluyver/pynotify2")
5662 (synopsis "Python interface to D-Bus notifications")
5663 (description
5664 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5665It is a reimplementation of pynotify in pure Python, and an alternative to
5666the GObject Introspection bindings to libnotify for non-GTK applications.")
5667 (license (list license:bsd-2
5668 license:lgpl2.1+))))
5669
5670(define-public python2-notify2
5671 (package-with-python2 python-notify2))
5672
44d10b1f
RW
5673(define-public python-lxml
5674 (package
5675 (name "python-lxml")
5676 (version "4.2.5")
5677 (source
5678 (origin
5679 (method url-fetch)
5680 (uri (pypi-uri "lxml" version))
5681 (sha256
5682 (base32
5683 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5684 (build-system python-build-system)
5685 (inputs
5686 `(("libxml2" ,libxml2)
5687 ("libxslt" ,libxslt)))
5688 (home-page "http://lxml.de/")
5689 (synopsis
5690 "Python XML processing library")
5691 (description
5692 "The lxml XML toolkit is a Pythonic binding for the C libraries
5693libxml2 and libxslt.")
5694 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5695
5696(define-public python2-lxml
5697 (package-with-python2 python-lxml))
5698
5699;; beautifulsoup4 has a totally different namespace than 3.x,
5700;; and pypi seems to put it under its own name, so I guess we should too
5701(define-public python-beautifulsoup4
5702 (package
5703 (name "python-beautifulsoup4")
abb53e6f 5704 (version "4.7.1")
44d10b1f
RW
5705 (source
5706 (origin
5707 (method url-fetch)
5708 (uri (pypi-uri "beautifulsoup4" version))
5709 (sha256
5710 (base32
abb53e6f 5711 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5712 (build-system python-build-system)
5713 (arguments
5714 `(#:phases
5715 (modify-phases %standard-phases
5716 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5717 ;; must use this conversion script when building with Python 3. The
5718 ;; conversion script also runs the tests.
5719 ;; For more information, see the file 'convert-py3k' in the source
5720 ;; distribution.
5721 (replace 'check
dff0197e 5722 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5723 (propagated-inputs
abb53e6f 5724 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5725 (home-page
5726 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5727 (synopsis
5728 "Python screen-scraping library")
5729 (description
5730 "Beautiful Soup is a Python library designed for rapidly setting up
5731screen-scraping projects. It offers Pythonic idioms for navigating,
5732searching, and modifying a parse tree, providing a toolkit for
5733dissecting a document and extracting what you need. It automatically
5734converts incoming documents to Unicode and outgoing documents to UTF-8.")
5735 (license license:expat)
5736 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5737
5738(define-public python2-beautifulsoup4
5739 (package
5740 (inherit (package-with-python2
5741 (strip-python2-variant python-beautifulsoup4)))
5742 (arguments `(#:python ,python-2))))
5743
ad74978a
BT
5744(define-public python-soupsieve
5745 (package
5746 (name "python-soupsieve")
e9cb6edd 5747 (version "1.9.2")
ad74978a
BT
5748 (source
5749 (origin
5750 (method url-fetch)
5751 (uri (pypi-uri "soupsieve" version))
5752 (sha256
5753 (base32
e9cb6edd 5754 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
ad74978a
BT
5755 (build-system python-build-system)
5756 (arguments `(#:tests? #f))
5757 ;;XXX: 2 tests fail currently despite claming they were to be
5758 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5759 ;;don't want to create a circular dependency.
5760 (home-page "https://github.com/facelessuser/soupsieve")
5761 (synopsis "CSS selector library")
5762 (description
5763 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5764Soup 4. It aims to provide selecting, matching, and filtering using modern
5765CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5766specifications up through the latest CSS level 4 drafts and beyond (though
5767some are not yet implemented).")
d00b83fb 5768 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5769 (license license:expat)))
5770
5771(define-public python2-soupsieve
d00b83fb 5772 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5773 (package
5774 (inherit base)
5775 (propagated-inputs
d00b83fb
MB
5776 `(("python2-backports-functools-lru-cache"
5777 ,python2-backports-functools-lru-cache)
5778 ,@(package-propagated-inputs base))))))
ad74978a 5779
44d10b1f
RW
5780(define-public python-netifaces
5781 (package
5782 (name "python-netifaces")
5783 (version "0.10.7")
5784 (source
5785 (origin
5786 (method url-fetch)
5787 (uri (pypi-uri "netifaces" version))
5788 (sha256
5789 (base32
5790 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5791 (build-system python-build-system)
5792 (home-page "https://github.com/al45tair/netifaces")
5793 (synopsis
5794 "Python module for portable network interface information")
5795 (description
5796 "Netifaces is a Python module providing information on network
5797interfaces in an easy and portable manner.")
5798 (license license:expat)))
5799
5800(define-public python2-netifaces
5801 (package-with-python2 python-netifaces))
5802
5803(define-public python-networkx
5804 (package
5805 (name "python-networkx")
5806 (version "2.2")
5807 (source
5808 (origin
5809 (method url-fetch)
5810 (uri (pypi-uri "networkx" version ".zip"))
5811 (sha256
5812 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5813 (build-system python-build-system)
5814 ;; python-decorator is needed at runtime.
5815 (propagated-inputs
5816 `(("python-decorator" ,python-decorator)))
5817 (native-inputs
5818 `(("python-nose" ,python-nose)
5819 ("unzip" ,unzip)))
5820 (home-page "https://networkx.github.io/")
5821 (synopsis "Python module for creating and manipulating graphs and networks")
5822 (description
5823 "NetworkX is a Python package for the creation, manipulation, and study
5824of the structure, dynamics, and functions of complex networks.")
5825 (license license:bsd-3)))
5826
5827(define-public python2-networkx
5828 (package-with-python2 python-networkx))
5829
5830(define-public python-datrie
5831 (package
5832 (name "python-datrie")
5833 (version "0.7.1")
5834 (source
5835 (origin
5836 (method url-fetch)
5837 (uri (pypi-uri "datrie" version))
5838 (sha256
5839 (base32
5840 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5841 (build-system python-build-system)
5842 (arguments
5843 `(#:phases (modify-phases %standard-phases
5844 (add-before 'build 'cythonize
5845 (lambda _
5846 ;; Regenerate Cython classes to solve ABI issues with Python
5847 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5848 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5849 "src/stdio_ext.pxd" "-a"))))))
5850 (native-inputs
5851 `(("python-cython" ,python-cython)
5852 ("python-hypothesis" ,python-hypothesis)
5853 ("python-pytest" ,python-pytest)
5854 ("python-pytest-runner" ,python-pytest-runner)))
5855 (home-page "https://github.com/kmike/datrie")
5856 (synopsis "Fast, efficiently stored trie for Python")
5857 (description
5858 "This package provides a fast, efficiently stored trie implementation for
5859Python.")
5860 (license license:lgpl2.1+)))
5861
5862(define-public snakemake
5863 (package
5864 (name "snakemake")
5865 (version "5.2.4")
5866 (source
5867 (origin
5868 (method url-fetch)
5869 (uri (pypi-uri "snakemake" version))
5870 (sha256
5871 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5872 (build-system python-build-system)
5873 (arguments
5874 ;; TODO: Package missing test dependencies.
5875 '(#:tests? #f
5876 #:phases
5877 (modify-phases %standard-phases
5878 ;; For cluster execution Snakemake will call Python. Since there is
5879 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5880 ;; this by calling the snakemake wrapper instead.
5881 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5882 (lambda* (#:key outputs #:allow-other-keys)
5883 (substitute* "snakemake/executors.py"
5884 (("\\{sys.executable\\} -m snakemake")
5885 (string-append (assoc-ref outputs "out")
5886 "/bin/snakemake")))
5887 #t)))))
5888 (propagated-inputs
5889 `(("python-gitpython" ,python-gitpython)
5890 ("python-wrapt" ,python-wrapt)
5891 ("python-requests" ,python-requests)
5892 ("python-appdirs" ,python-appdirs)
5893 ("python-configargparse" ,python-configargparse)
5894 ("python-datrie" ,python-datrie)
5895 ("python-docutils" ,python-docutils)
5896 ("python-jinja2" ,python-jinja2)
5897 ("python-jsonschema" ,python-jsonschema)
5898 ("python-networkx" ,python-networkx)
5899 ("python-pyyaml" ,python-pyyaml)
5900 ("python-ratelimiter" ,python-ratelimiter)))
5901 (home-page "https://snakemake.readthedocs.io")
5902 (synopsis "Python-based execution environment for make-like workflows")
5903 (description
5904 "Snakemake aims to reduce the complexity of creating workflows by
5905providing a clean and modern domain specific specification language (DSL) in
5906Python style, together with a fast and comfortable execution environment.")
5907 (license license:expat)))
5908
5909;; This is currently needed for the pigx-* packages.
5910(define-public snakemake-4
5911 (package (inherit snakemake)
5912 (version "4.4.0")
5913 (source
5914 (origin
5915 (method url-fetch)
5916 (uri (pypi-uri "snakemake" version))
5917 (sha256
5918 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5919 (propagated-inputs
5920 `(("python-wrapt" ,python-wrapt)
5921 ("python-requests" ,python-requests)
5922 ("python-appdirs" ,python-appdirs)
5923 ("python-configargparse" ,python-configargparse)
5924 ("python-pyyaml" ,python-pyyaml)
5925 ("python-ratelimiter" ,python-ratelimiter)))))
5926
5927(define-public python-pyqrcode
5928 (package
5929 (name "python-pyqrcode")
5930 (version "1.2.1")
5931 (source
5932 (origin
5933 (method url-fetch)
5934 (uri (pypi-uri "PyQRCode" version))
5935 (sha256
5936 (base32
5937 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5938 (build-system python-build-system)
5939 (home-page
5940 "https://github.com/mnooner256/pyqrcode")
5941 (synopsis "QR code generator")
5942 (description
5943 "Pyqrcode is a QR code generator written purely in Python with
5944SVG, EPS, PNG and terminal output.")
5945 (license license:bsd-3)))
5946
5947(define-public python-seaborn
5948 (package
5949 (name "python-seaborn")
5950 (version "0.9.0")
5951 (source
5952 (origin
5953 (method url-fetch)
5954 (uri (pypi-uri "seaborn" version))
5955 (sha256
5956 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5957 (build-system python-build-system)
5958 (arguments
5959 `(#:phases
5960 (modify-phases %standard-phases
5961 (add-before 'check 'start-xserver
5962 (lambda* (#:key inputs #:allow-other-keys)
5963 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5964 ;; There must be a running X server and make check doesn't
5965 ;; start one. Therefore we must do it.
5966 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5967 (setenv "DISPLAY" ":1")
5968 #t)))
5969 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5970 (propagated-inputs
5971 `(("python-pandas" ,python-pandas)
5972 ("python-matplotlib" ,python-matplotlib)
5973 ("python-numpy" ,python-numpy)
5974 ("python-scipy" ,python-scipy)))
5975 (native-inputs
5976 `(("python-pytest" ,python-pytest)
5977 ("xorg-server" ,xorg-server)))
5978 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5979 (synopsis "Statistical data visualization")
5980 (description
5981 "Seaborn is a library for making attractive and informative statistical
5982graphics in Python. It is built on top of matplotlib and tightly integrated
5983with the PyData stack, including support for numpy and pandas data structures
5984and statistical routines from scipy and statsmodels.")
5985 (license license:bsd-3)))
5986
5987(define-public python2-seaborn
5988 (package-with-python2 python-seaborn))
5989
5990(define-public python-mpmath
5991 (package
5992 (name "python-mpmath")
5993 (version "0.19")
5994 (source (origin
5995 (method url-fetch)
5996 (uri (string-append "http://mpmath.org/files/mpmath-"
5997 version ".tar.gz"))
5998 (sha256
5999 (base32
6000 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6001 (build-system python-build-system)
6002 (arguments
6003 '(#:phases
6004 (modify-phases %standard-phases
6005 (replace 'check
6006 (lambda _
5d7a6f1c 6007 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6008 (home-page "http://mpmath.org")
6009 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6010 (description
6011 "@code{mpmath} can be used as an arbitrary-precision substitute for
6012Python's float/complex types and math/cmath modules, but also does much
6013more advanced mathematics.")
6014 (license license:bsd-3)))
6015
6016(define-public python2-mpmath
6017 (package-with-python2 python-mpmath))
6018
6019(define-public python-bigfloat
6020 (package
6021 (name "python-bigfloat")
6022 (version "0.3.0")
6023 (source
6024 (origin
6025 (method url-fetch)
6026 (uri (pypi-uri "bigfloat" version))
6027 (sha256
6028 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6029 (build-system python-build-system)
6030 (inputs
6031 `(("mpfr" ,mpfr)))
6032 (home-page "https://github.com/mdickinson/bigfloat")
6033 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6034 (description
e36de31b 6035 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6036multiprecision arithmetic.")
6037 (license license:lgpl3+)))
6038
6039(define-public python2-bigfloat
6040 (package-with-python2 python-bigfloat))
6041
6042(define-public python-sympy
6043 (package
6044 (name "python-sympy")
6045 (version "1.1.1")
6046 (source
6047 (origin
6048 (method url-fetch)
6049 (uri (string-append
6050 "https://github.com/sympy/sympy/releases/download/sympy-"
6051 version "/sympy-" version ".tar.gz"))
6052 (sha256
6053 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6054 (build-system python-build-system)
6055 (arguments
6056 `(#:phases
6057 (modify-phases %standard-phases
6058 ;; Run the core tests after installation. By default it would run
6059 ;; *all* tests, which take a very long time to complete and are known
6060 ;; to be flaky.
6061 (delete 'check)
6062 (add-after 'install 'check
6063 (lambda* (#:key outputs #:allow-other-keys)
6064 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6065 #t)))))
6066 (propagated-inputs
6067 `(("python-mpmath" ,python-mpmath)))
6068 (home-page "http://www.sympy.org/")
6069 (synopsis "Python library for symbolic mathematics")
6070 (description
6071 "SymPy is a Python library for symbolic mathematics. It aims to become a
6072full-featured computer algebra system (CAS) while keeping the code as simple
6073as possible in order to be comprehensible and easily extensible.")
6074 (license license:bsd-3)))
6075
6076(define-public python2-sympy
6077 (package
6078 (inherit (package-with-python2 python-sympy))
6079 (arguments
6080 `(#:phases
6081 (modify-phases %standard-phases
6082 ;; Run the core tests after installation. By default it would run
6083 ;; *all* tests, which take a very long time to complete and are known
6084 ;; to be flaky.
6085 (delete 'check)
6086 (add-after 'install 'check
6087 (lambda* (#:key outputs #:allow-other-keys)
6088 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6089 #t)))))))
6090
6091(define-public python-q
6092 (package
6093 (name "python-q")
6094 (version "2.6")
6095 (source
6096 (origin
6097 (method url-fetch)
6098 (uri (pypi-uri "q" version))
6099 (sha256
6100 (base32
6101 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6102 (build-system python-build-system)
6103 (home-page "https://github.com/zestyping/q")
6104 (synopsis "Quick-and-dirty debugging output for tired programmers")
6105 (description
6106 "q is a Python module for \"print\" style of debugging Python code. It
6107provides convenient short API for print out of values, tracebacks, and
6108falling into the Python interpreter.")
6109 (license license:asl2.0)))
6110
6111(define-public python2-q
6112 (package-with-python2 python-q))
6113
6114(define-public python2-xlib
6115 (package
6116 (name "python2-xlib")
6117 (version "0.14")
6118 (source (origin
6119 (method url-fetch)
6120 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6121 "/" version "/"
6122 "python-xlib-" version ".tar.gz"))
6123 (sha256
6124 (base32
6125 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6126 (build-system python-build-system)
6127 (arguments
6128 `(#:python ,python-2 ;Python 2 only
6129 #:tests? #f)) ;no tests
6130 (home-page "http://python-xlib.sourceforge.net/")
6131 (synopsis "Python X11 client library")
6132 (description
6133 "The Python X Library is intended to be a fully functional X client
6134library for Python programs. It is useful to implement low-level X clients.
6135It is written entirely in Python.")
6136 (license license:gpl2+)))
6137
6138(define-public python-singledispatch
6139 (package
6140 (name "python-singledispatch")
6141 (version "3.4.0.3")
6142 (source
6143 (origin
6144 (method url-fetch)
6145 (uri (pypi-uri "singledispatch" version))
6146 (sha256
6147 (base32
6148 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6149 (build-system python-build-system)
6150 (native-inputs
6151 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6152 (home-page
6153 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6154 (synopsis "Backport of singledispatch feature from Python 3.4")
6155 (description
6156 "This library brings functools.singledispatch from Python 3.4 to Python
61572.6-3.3.")
6158 (license license:expat)))
6159
6160(define-public python2-singledispatch
6161 (package-with-python2 python-singledispatch))
6162
6163;; the python- version can be removed with python-3.5
6164(define-public python-backports-abc
6165 (package
6166 (name "python-backports-abc")
6167 (version "0.5")
6168 (source
6169 (origin
6170 (method url-fetch)
6171 (uri (pypi-uri "backports_abc" version))
6172 (sha256
6173 (base32
6174 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6175 (build-system python-build-system)
6176 (home-page "https://github.com/cython/backports_abc")
6177 (synopsis "Backport of additions to the 'collections.abc' module")
6178 (description
6179 "Python-backports-abc provides a backport of additions to the
36a4366d 6180@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6181 (license license:psfl)))
6182
6183(define-public python2-backports-abc
6184 (package-with-python2 python-backports-abc))
6185
6186(define-public python-backports-csv
6187 (package
6188 (name "python-backports-csv")
6189 (version "1.0.5")
6190 (source
6191 (origin
6192 (method url-fetch)
6193 (uri (pypi-uri "backports.csv" version))
6194 (sha256
6195 (base32
6196 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6197 (build-system python-build-system)
6198 (home-page "https://github.com/ryanhiebert/backports.csv")
6199 (synopsis "Backport of Python 3's csv module for Python 2")
6200 (description
6201 "Provides a backport of Python 3's @code{csv} module for parsing
6202comma separated values. The API of the @code{csv} module in Python 2
6203is drastically different from the @code{csv} module in Python 3.
6204This is due, for the most part, to the difference between str in
6205Python 2 and Python 3.")
6206 (license license:psfl)))
6207
6208(define-public python2-backports-csv
6209 (package-with-python2 python-backports-csv))
6210
6211(define-public python2-backports-shutil-get-terminal-size
6212 (package
6213 (name "python2-backports-shutil-get-terminal-size")
6214 (version "1.0.0")
6215 (source
6216 (origin
6217 (method url-fetch)
6218 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6219 (sha256
6220 (base32
6221 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6222 (build-system python-build-system)
6223 (arguments
6224 `(#:python ,python-2
6225 #:phases
6226 (modify-phases %standard-phases
6227 (replace 'check
6228 (lambda _
4a4a7d9a 6229 (invoke "py.test" "-v"))))))
44d10b1f
RW
6230 (native-inputs
6231 `(("python2-pytest" ,python2-pytest)))
6232 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6233 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6234 (description
6235 "This package provides a backport of the @code{get_terminal_size
6236function} from Python 3.3's @code{shutil}.
6237Unlike the original version it is written in pure Python rather than C,
6238so it might be a tiny bit slower.")
6239 (license license:expat)))
6240
6241(define-public python-waf
6242 (package
6243 (name "python-waf")
6244 (version "2.0.11")
6245 (source (origin
6246 (method url-fetch)
6247 (uri (string-append "https://waf.io/"
6248 "waf-" version ".tar.bz2"))
6249 (sha256
6250 (base32
6251 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6252 (build-system python-build-system)
6253 (arguments
6254 '(#:phases
6255 (modify-phases %standard-phases
6256 (replace 'build
6257 (lambda _
6258 (invoke "python" "waf-light" "configure" "build")))
6259 (replace 'check
6260 (lambda _
6261 (invoke "python" "waf" "--version")))
6262 (replace 'install
6263 (lambda* (#:key outputs #:allow-other-keys)
6264 (let ((out (assoc-ref outputs "out")))
6265 (install-file "waf" (string-append out "/bin")))
6266 #t))
6267 ;; waf breaks when it is wrapped.
6268 (delete 'wrap))))
6269 (home-page "https://waf.io/")
6270 (synopsis "Python-based build system")
6271 (description
6272 "Waf is a Python-based framework for configuring, compiling and installing
6273applications.")
6274 (license license:bsd-3)))
6275
6276(define-public python2-waf
6277 (package-with-python2 python-waf))
6278
6279(define-public python-pyzmq
6280 (package
6281 (name "python-pyzmq")
6282 (version "17.1.2")
6283 (source
6284 (origin
6285 (method url-fetch)
6286 (uri (pypi-uri "pyzmq" version))
6287 (sha256
6288 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6289 (build-system python-build-system)
6290 (arguments
6291 `(#:configure-flags
6292 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6293 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6294 ;; --inplace' for 'python setup.py test' to work.
6295 #:tests? #f))
6296 (inputs
6297 `(("zeromq" ,zeromq)))
6298 (native-inputs
6299 `(("pkg-config" ,pkg-config)
6300 ("python-nose" ,python-nose)))
6301 (home-page "https://github.com/zeromq/pyzmq")
6302 (synopsis "Python bindings for 0MQ")
6303 (description
6304 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6305 (license license:bsd-4)))
6306
6307(define-public python2-pyzmq
6308 (package-with-python2 python-pyzmq))
6309
6310(define-public python-pep8
6311 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6312 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6313 ;; some dependents' test suites, and nothing more.
6314 (package
6315 (name "python-pep8")
6316 (version "1.7.0")
6317 (source
6318 (origin
6319 (method url-fetch)
6320 (uri (pypi-uri "pep8" version))
6321 (sha256
6322 (base32
6323 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6324 (build-system python-build-system)
6325 (home-page "https://pep8.readthedocs.org/")
6326 (synopsis "Python style guide checker")
6327 (description
6328 "This tools checks Python code against some of the style conventions in
6329PEP 8.")
6330 (license license:expat)))
6331
6332(define-public python2-pep8
6333 (package-with-python2 python-pep8))
6334
6335(define-public python-pyflakes
6336 (package
6337 (name "python-pyflakes")
6338 (version "2.0.0")
6339 (source
6340 (origin
6341 (method url-fetch)
6342 (uri (pypi-uri "pyflakes" version))
6343 (sha256
6344 (base32
6345 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
6346 (build-system python-build-system)
6347 (home-page
6348 "https://github.com/pyflakes/pyflakes")
6349 (synopsis "Passive checker of Python programs")
6350 (description
6351 "Pyflakes statically checks Python source code for common errors.")
6352 (license license:expat)))
6353
6354(define-public python2-pyflakes
6355 (package-with-python2 python-pyflakes))
6356
6357(define-public python-mccabe
6358 (package
6359 (name "python-mccabe")
6360 (version "0.6.1")
6361 (source
6362 (origin
6363 (method url-fetch)
6364 (uri (pypi-uri "mccabe" version))
6365 (sha256
6366 (base32
6367 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6368 (build-system python-build-system)
6369 (native-inputs
6370 `(("python-pytest" ,python-pytest-bootstrap)
6371 ("python-pytest-runner" ,python-pytest-runner)))
6372 (home-page "https://github.com/flintwork/mccabe")
6373 (synopsis "McCabe checker, plugin for flake8")
6374 (description
6375 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6376complexity of Python source code.")
6377 (license license:expat)))
6378
6379(define-public python2-mccabe
6380 (package-with-python2 python-mccabe))
6381
6382(define-public python-mccabe-0.2.1
6383 (package (inherit python-mccabe)
6384 (version "0.2.1")
6385 (source
6386 (origin
6387 (method url-fetch)
6388 (uri (pypi-uri "mccabe" version))
6389 (sha256
6390 (base32
6391 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6392
6393(define-public python2-mccabe-0.2.1
6394 (package-with-python2 python-mccabe-0.2.1))
6395
6396;; Flake8 2.4.1 requires an older version of pep8.
6397;; This should be removed ASAP.
6398(define-public python-pep8-1.5.7
6399 (package (inherit python-pep8)
6400 (version "1.5.7")
6401 (source
f3576970
RW
6402 (origin
6403 (method url-fetch)
6404 (uri (pypi-uri "pep8" version))
6405 (sha256
6406 (base32
6407 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6408 (arguments
6409 ;; XXX Tests not compatible with Python 3.5.
6410 '(#:tests? #f))))
6411
6412(define-public python2-pep8-1.5.7
6413 (package-with-python2 python-pep8-1.5.7))
6414
6415;; Flake8 2.4.1 requires an older version of pyflakes.
6416;; This should be removed ASAP.
6417(define-public python-pyflakes-0.8.1
6418 (package (inherit python-pyflakes)
6419 (version "0.8.1")
6420 (source
8c4dffb5
RW
6421 (origin
6422 (method url-fetch)
6423 (uri (pypi-uri "pyflakes" version))
6424 (sha256
6425 (base32
6426 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6427 (arguments
6428 ;; XXX Tests not compatible with Python 3.5.
6429 '(#:tests? #f))))
6430
6431(define-public python2-pyflakes-0.8.1
6432 (package-with-python2 python-pyflakes-0.8.1))
6433
6434;; This package is used by hypothesis which has thousands of dependent packages.
6435;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
6436(define-public python-flake8-3.5
6437 (package
6438 (name "python-flake8")
6439 (version "3.5.0")
6440 (source
6441 (origin
6442 (method url-fetch)
6443 (uri (pypi-uri "flake8" version))
6444 (sha256
6445 (base32
6446 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
6447 (build-system python-build-system)
6448 (arguments
6449 `(#:phases
6450 (modify-phases %standard-phases
6451 ;; Two errors don't seem to have assigned codes.
6452 (add-after 'unpack 'delete-broken-test
6453 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
6454 (add-after 'unpack 'fix-problem-with-pycodestyle
6455 (lambda _
6456 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
6457 ;; This should no longer be needed with the next release.
6458 (substitute* "setup.py"
6459 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
6460 "PEP8_PLUGIN('break_after_binary_operator'),\
6461PEP8_PLUGIN('break_before_binary_operator'),"))
6462 #t))
6463 (delete 'check)
6464 (add-after 'install 'check
6465 (lambda* (#:key inputs outputs #:allow-other-keys)
6466 (add-installed-pythonpath inputs outputs)
6467 (invoke "pytest" "-v")
6468 #t)))))
6469 (propagated-inputs
6470 `(("python-pycodestyle" ,python-pycodestyle)
6471 ("python-pyflakes" ,python-pyflakes)
6472 ("python-mccabe" ,python-mccabe)))
6473 (native-inputs
6474 `(("python-mock" ,python-mock)
6475 ("python-pytest" ,python-pytest-bootstrap)
6476 ("python-pytest-runner" ,python-pytest-runner)))
6477 (home-page "https://gitlab.com/pycqa/flake8")
6478 (synopsis
6479 "The modular source code checker: pep8, pyflakes and co")
6480 (description
6481 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6482 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
6483 (license license:expat)))
6484
6485(define-public python2-flake8-3.5
6486 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
6487 (package (inherit base)
6488 (propagated-inputs
6489 `(("python2-configparser" ,python2-configparser)
6490 ("python2-enum34" ,python2-enum34)
6491 ,@(package-propagated-inputs base))))))
6492
6493;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
6494;; this newer version. Keep it as a separate variable for now to avoid
6495;; rebuilding "python-hypothesis"; this should be removed in the next
6496;; rebuild cycle.
6497(define-public python-flake8
6498 (package
6499 (inherit python-flake8-3.5)
6500 (version "3.6.0")
6501 (source (origin
6502 (method url-fetch)
6503 (uri (pypi-uri "flake8" version))
6504 (sha256
6505 (base32
6506 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
6507 (arguments
6508 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
6509 ((#:phases phases)
6510 `(modify-phases ,phases
6511 (delete 'delete-broken-test)
6512 (delete 'fix-problem-with-pycodestyle)))))
6513 (properties `((python2-variant . ,(delay python2-flake8))))))
6514
6515(define-public python2-flake8
6516 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6517 (package (inherit base)
6518 (propagated-inputs
6519 (package-propagated-inputs python2-flake8-3.5)))))
6520
6521;; python-hacking requires flake8 <2.6.0.
6522(define-public python-flake8-2.5
6523 (package
6524 (inherit python-flake8)
6525 (version "2.5.5")
6526 (source (origin
6527 (method url-fetch)
6528 (uri (pypi-uri "flake8" version))
6529 (sha256
6530 (base32
6531 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6532 (propagated-inputs
6533 `(("python-pep8" ,python-pep8)
6534 ,@(package-propagated-inputs python-flake8)))
6535 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6536
6537(define-public python2-flake8-2.5
6538 (package
6539 (inherit python2-flake8)
6540 (version (package-version python-flake8-2.5))
6541 (source (origin
6542 (inherit (package-source python-flake8-2.5))))
6543 (propagated-inputs
6544 `(("python2-pep8" ,python2-pep8)
6545 ,@(package-propagated-inputs python2-flake8)))))
6546
6547(define-public python-flake8-polyfill
6548 (package
6549 (name "python-flake8-polyfill")
6550 (version "1.0.2")
6551 (source
6552 (origin
6553 (method url-fetch)
6554 (uri (pypi-uri "flake8-polyfill" version))
6555 (sha256
6556 (base32
6557 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6558 (build-system python-build-system)
6559 (arguments
6560 '(#:phases
6561 (modify-phases %standard-phases
6562 (replace 'check
6563 (lambda _
6564 (setenv "PYTHONPATH"
6565 (string-append (getcwd) "/build/lib:"
6566 (getenv "PYTHONPATH")))
4f0a0894 6567 (invoke "py.test" "-v"))))))
44d10b1f
RW
6568 (native-inputs
6569 `(("python-flake8" ,python-flake8)
6570 ("python-mock" ,python-mock)
6571 ("python-pep8" ,python-pep8)
6572 ("python-pycodestyle" ,python-pycodestyle)
6573 ("python-pytest" ,python-pytest)))
6574 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6575 (synopsis "Polyfill package for Flake8 plugins")
6576 (description
6577 "This package that provides some compatibility helpers for Flake8
6578plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6579 (license license:expat)))
6580
6581(define-public python2-flake8-polyfill
6582 (package-with-python2 python-flake8-polyfill))
6583
6584(define-public python-mistune
6585 (package
6586 (name "python-mistune")
6587 (version "0.8.4")
6588 (source
6589 (origin
6590 (method url-fetch)
6591 (uri (pypi-uri "mistune" version))
6592 (sha256
6593 (base32
6594 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6595 (build-system python-build-system)
6596 (native-inputs
6597 `(("python-nose" ,python-nose)
6598 ("python-cython" ,python-cython)))
6599 (home-page "https://github.com/lepture/mistune")
6600 (synopsis "Markdown parser in pure Python")
6601 (description "This package provides a fast markdown parser in pure
6602Python.")
6603 (license license:bsd-3)))
6604
6605(define-public python2-mistune
6606 (package-with-python2 python-mistune))
6607
6608(define-public python-markdown
6609 (package
6610 (name "python-markdown")
ceb1936a 6611 (version "3.1.1")
44d10b1f
RW
6612 (source
6613 (origin
6614 (method url-fetch)
6615 (uri (pypi-uri "Markdown" version))
6616 (sha256
6617 (base32
ceb1936a 6618 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6619 (build-system python-build-system)
6620 (native-inputs
6621 `(("python-nose" ,python-nose)
6622 ("python-pyyaml" ,python-pyyaml)))
6623 (home-page "https://python-markdown.github.io/")
6624 (synopsis "Python implementation of Markdown")
6625 (description
6626 "This package provides a Python implementation of John Gruber's
6627Markdown. The library features international input, various Markdown
6628extensions, and several HTML output formats. A command line wrapper
6629markdown_py is also provided to convert Markdown files to HTML.")
6630 (license license:bsd-3)))
6631
6632(define-public python2-markdown
6633 (package-with-python2 python-markdown))
6634
6635(define-public python-ptyprocess
6636 (package
6637 (name "python-ptyprocess")
6638 (version "0.5.2")
6639 (source
6640 (origin
6641 (method url-fetch)
6642 (uri (pypi-uri "ptyprocess" version))
6643 (sha256
6644 (base32
6645 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6646 (build-system python-build-system)
6647 (native-inputs
6648 `(("python-nose" ,python-nose)))
6649 (arguments
6650 `(#:phases
6651 (modify-phases %standard-phases
6652 (replace 'check
7904d6fa 6653 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6654 (home-page "https://github.com/pexpect/ptyprocess")
6655 (synopsis "Run a subprocess in a pseudo terminal")
6656 (description
6657 "This package provides a Python library used to launch a subprocess in a
6658pseudo terminal (pty), and interact with both the process and its pty.")
6659 (license license:isc)))
6660
6661(define-public python2-ptyprocess
6662 (package-with-python2 python-ptyprocess))
6663
6664(define-public python-cram
6665 (package
6666 (name "python-cram")
6667 (version "0.7")
6668 (home-page "https://bitheap.org/cram/")
6669 (source (origin
6670 (method url-fetch)
6671 (uri (list (string-append home-page "cram-"
6672 version ".tar.gz")
6673 (pypi-uri "cram" version)))
6674 (sha256
6675 (base32
6676 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6677 (arguments
6678 '(#:phases
6679 (modify-phases %standard-phases
6680 (add-after 'unpack 'patch-source
6681 (lambda _
6682 (substitute* (find-files "cram" ".*\\.py$")
6683 ;; Replace default shell path.
6684 (("/bin/sh") (which "sh")))
6685 (substitute* (find-files "tests" ".*\\.t$")
6686 (("md5") "md5sum")
6687 (("/bin/bash") (which "bash"))
6688 (("/bin/sh") (which "sh")))
6689 (substitute* "cram/_test.py"
6690 ;; This hack works around a bug triggered by substituting
6691 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6692 ;; "cram -h", which breaks the output at 80 characters. This
6693 ;; causes the line showing the default shell to break into two
6694 ;; lines, but the test expects a single line...
6695 (("env\\['COLUMNS'\\] = '80'")
6696 "env['COLUMNS'] = '160'"))
6697 #t))
6698 (delete 'check)
6699 (add-after 'install 'check
6700 ;; The test phase uses the built library and executable.
6701 ;; It's easier to run it after install since the build
6702 ;; directory contains version-specific PATH.
6703 (lambda* (#:key inputs outputs #:allow-other-keys)
6704 (add-installed-pythonpath inputs outputs)
6705 (setenv "PATH" (string-append (getenv "PATH") ":"
6706 (assoc-ref outputs "out") "/bin"))
2d7db192 6707 (invoke "make" "test"))))))
44d10b1f
RW
6708 (build-system python-build-system)
6709 (native-inputs
6710 `(("python-coverage" ,python-coverage)
6711 ("which" ,which)))
6712 (synopsis "Simple testing framework for command line applications")
6713 (description
6714 "Cram is a functional testing framework for command line applications.
6715Cram tests look like snippets of interactive shell sessions. Cram runs each
6716command and compares the command output in the test with the command’s actual
6717output.")
6718 (license license:gpl2+)))
6719
6720(define-public python2-cram
6721 (package-with-python2 python-cram))
6722
6723(define-public python-straight-plugin
6724 (package
6725 (name "python-straight-plugin")
6726 (version "1.4.1")
6727 (source
6728 (origin
6729 (method url-fetch)
6730 (uri (pypi-uri "straight.plugin" version))
6731 (sha256
6732 (base32
6733 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6734 (build-system python-build-system)
6735 (home-page "https://github.com/ironfroggy/straight.plugin")
6736 (synopsis "Simple namespaced plugin facility")
6737 (description "Straight Plugin provides a type of plugin you can create from
6738almost any existing Python modules, and an easy way for outside developers to
6739add functionality and customization to your projects with their own plugins.")
6740 (license license:expat)))
6741
6742(define-public python2-straight-plugin
6743 (package-with-python2 python-straight-plugin))
6744
6745(define-public python-fonttools
6746 (package
6747 (name "python-fonttools")
6748 (version "3.28.0")
6749 (source (origin
6750 (method url-fetch)
6751 (uri (pypi-uri "fonttools" version ".zip"))
6752 (sha256
6753 (base32
6754 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6755 (build-system python-build-system)
6756 (native-inputs
6757 `(("unzip" ,unzip)
6758 ("python-pytest" ,python-pytest)
6759 ("python-pytest-runner" ,python-pytest-runner)))
6760 (home-page "https://github.com/behdad/fonttools")
6761 (synopsis "Tools to manipulate font files")
6762 (description
6763 "FontTools/TTX is a library to manipulate font files from Python. It
6764supports reading and writing of TrueType/OpenType fonts, reading and writing
6765of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6766also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6767from an XML-based format.")
6768 (license license:expat)))
6769
6770(define-public python2-fonttools
6771 (package-with-python2 python-fonttools))
6772
6773(define-public python-ly
6774 (package
6775 (name "python-ly")
6776 (version "0.9.5")
6777 (source
6778 (origin
6779 (method url-fetch)
6780 (uri (pypi-uri name version))
6781 (sha256
6782 (base32
6783 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6784 (build-system python-build-system)
6785 (arguments
6786 ;; FIXME: Some tests need network access.
6787 '(#:tests? #f))
6788 (synopsis "Tool and library for manipulating LilyPond files")
6789 (description "This package provides a Python library to parse, manipulate
6790or create documents in LilyPond format. A command line program ly is also
6791provided that can be used to do various manipulations with LilyPond files.")
6792 (home-page "https://pypi.python.org/pypi/python-ly")
6793 (license license:gpl2+)))
6794
6795(define-public python-appdirs
6796 (package
6797 (name "python-appdirs")
6798 (version "1.4.3")
6799 (source
6800 (origin
6801 (method url-fetch)
6802 (uri (pypi-uri "appdirs" version))
6803 (sha256
6804 (base32
6805 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6806 (build-system python-build-system)
6807 (home-page "https://github.com/ActiveState/appdirs")
6808 (synopsis
6809 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6810 (description
6811 "This module provides a portable way of finding out where user data
6812should be stored on various operating systems.")
6813 (license license:expat)))
6814
6815(define-public python2-appdirs
6816 (package-with-python2 python-appdirs))
6817
6818(define-public python-llfuse
6819 (package
6820 (name "python-llfuse")
6821 (version "1.3.5")
6822 (source (origin
6823 (method url-fetch)
6824 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6825 (sha256
6826 (base32
6827 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6828 (build-system python-build-system)
6829 (inputs
6830 `(("fuse" ,fuse)
6831 ("attr" ,attr)))
6832 (native-inputs
6833 `(("pkg-config" ,pkg-config)))
6834 (synopsis "Python bindings for FUSE")
6835 (description
6836 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6837 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6838 (license license:lgpl2.0+)
6839 (properties `((python2-variant . ,(delay python2-llfuse))))))
6840
6841(define-public python2-llfuse
6842 (package (inherit (package-with-python2
6843 (strip-python2-variant python-llfuse)))
6844 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6845
6846;; For attic-0.16
6847(define-public python-llfuse-0.41
6848 (package (inherit python-llfuse)
6849 (version "0.41.1")
6850 (source (origin
6851 (method url-fetch)
6852 (uri (string-append
6853 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6854 "llfuse-" version ".tar.bz2"))
6855 (sha256
6856 (base32
6857 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6858 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6859 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6860 (license (list license:expat license:lgpl2.0+))))
6861
6862(define-public python-msgpack
6863 (package
6864 (name "python-msgpack")
6865 (version "0.5.6")
6866 (source (origin
6867 (method url-fetch)
6868 (uri (pypi-uri "msgpack" version))
6869 (sha256
6870 (base32
6871 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6872 (build-system python-build-system)
6873 (arguments
6874 `(#:modules ((guix build utils)
6875 (guix build python-build-system)
6876 (ice-9 ftw)
6877 (srfi srfi-1)
6878 (srfi srfi-26))
6879 #:phases
6880 (modify-phases %standard-phases
6881 (replace 'check
6882 (lambda _
6883 (let ((cwd (getcwd)))
6884 (setenv "PYTHONPATH"
6885 (string-append cwd "/build/"
6886 (find (cut string-prefix? "lib" <>)
6887 (scandir (string-append cwd "/build")))
6888 ":"
6889 (getenv "PYTHONPATH")))
6890 (invoke "pytest" "-v" "test")))))))
6891 (native-inputs
6892 `(("python-pytest" ,python-pytest)))
6893 (synopsis "MessagePack (de)serializer")
6894 (description "MessagePack is a fast, compact binary serialization format,
6895suitable for similar data to JSON. This package provides CPython bindings for
6896reading and writing MessagePack data.")
6897 (home-page "https://pypi.python.org/pypi/msgpack/")
6898 (license license:asl2.0)))
6899
6900;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6901;; release 0.5. Some packages like borg still call it by the old name for now.
6902;; <https://bugs.gnu.org/30662>
6903(define-public python-msgpack-transitional
6904 (package
6905 (inherit python-msgpack)
6906 (name "python-msgpack-transitional")
6907 (arguments
6908 (substitute-keyword-arguments (package-arguments python-msgpack)
6909 ((#:phases phases)
6910 `(modify-phases ,phases
6911 (add-after 'unpack 'configure-transitional
6912 (lambda _
6913 ;; Keep using the old name.
6914 (substitute* "setup.py"
6915 (("TRANSITIONAL = False")
6916 "TRANSITIONAL = 1"))
6917 #t))))))))
6918
6919(define-public python2-msgpack
6920 (package-with-python2 python-msgpack))
6921
6922(define-public python-netaddr
6923 (package
6924 (name "python-netaddr")
6925 (version "0.7.19")
6926 (source
6927 (origin
6928 (method url-fetch)
6929 (uri (pypi-uri "netaddr" version))
6930 (sha256
6931 (base32
6932 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6933 (build-system python-build-system)
6934 (arguments `(#:tests? #f)) ;; No tests.
6935 (home-page "https://github.com/drkjam/netaddr/")
6936 (synopsis "Pythonic manipulation of network addresses")
6937 (description
6938 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6939and MAC network addresses.")
6940 (license license:bsd-3)))
6941
6942(define-public python2-netaddr
6943 (package-with-python2 python-netaddr))
6944
dd85eca0
AG
6945(define-public python2-pyroute2
6946 (package
6947 (name "python2-pyroute2")
6948 (version "0.5.6")
6949 (source
6950 (origin
6951 (method url-fetch)
6952 (uri (pypi-uri "pyroute2" version))
6953 (sha256
6954 (base32
6955 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6956 (build-system python-build-system)
6957 (arguments
6958 `(#:python ,python-2)) ;Python 3.x is not supported
6959 (home-page "https://github.com/svinota/pyroute2")
6960 (synopsis "Python netlink library")
6961 (description
6962 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6963Supported netlink families and protocols include:
6964@itemize
6965@item rtnl, network settings - addresses, routes, traffic controls
6966@item nfnetlink - netfilter API: ipset, nftables, ...
6967@item ipq - simplest userspace packet filtering, iptables QUEUE target
6968@item devlink - manage and monitor devlink-enabled hardware
6969@item generic - generic netlink families
6970 @itemize
6971 @item nl80211 - wireless functions API (basic support)
6972 @item taskstats - extended process statistics
6973 @item acpi_events - ACPI events monitoring
6974 @item thermal_events - thermal events monitoring
6975 @item VFS_DQUOT - disk quota events monitoring
6976 @end itemize
6977@end itemize")
6978 (license license:gpl2+)))
6979
44d10b1f
RW
6980(define-public python-wrapt
6981 (package
6982 (name "python-wrapt")
dddd7a75 6983 (version "1.11.1")
44d10b1f
RW
6984 (source
6985 (origin
6986 (method url-fetch)
6987 (uri (pypi-uri "wrapt" version))
6988 (sha256
6989 (base32
dddd7a75 6990 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6991 (build-system python-build-system)
6992 (arguments
6993 ;; Tests are not included in the tarball, they are only available in the
6994 ;; git repository.
6995 `(#:tests? #f))
6996 (home-page "https://github.com/GrahamDumpleton/wrapt")
6997 (synopsis "Module for decorators, wrappers and monkey patching")
6998 (description
6999 "The aim of the wrapt module is to provide a transparent object proxy for
7000 Python, which can be used as the basis for the construction of function
7001 wrappers and decorator functions.")
7002 (license license:bsd-2)))
7003
7004(define-public python2-wrapt
7005 (package-with-python2 python-wrapt))
7006
7007(define-public python-xlrd
7008 (package
7009 (name "python-xlrd")
7010 (version "1.0.0")
7011 (source (origin
7012 (method url-fetch)
7013 (uri (pypi-uri "xlrd" version))
7014 (sha256
7015 (base32
7016 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7017 (build-system python-build-system)
7018 (arguments
7019 `(#:phases
7020 (modify-phases %standard-phases
7021 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7022 ;; run tests instead for now.
45fd0081 7023 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
7024 (native-inputs `(("python-nose" ,python-nose)))
7025 (home-page "http://www.python-excel.org/")
7026 (synopsis "Library for extracting data from Excel files")
a0909286 7027 (description "This package provides a library to extract data from
44d10b1f
RW
7028spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7029@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7030Unicode-aware. It is not intended as an end-user tool.")
7031 (license license:bsd-3)))
7032
7033(define-public python2-xlrd
7034 (package-with-python2 python-xlrd))
7035
7036(define-public python-prettytable
7037 (package
7038 (name "python-prettytable")
7039 (version "0.7.2")
7040 (source
7041 (origin
7042 (method url-fetch)
337c3a1e 7043 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7044 (sha256
7045 (base32
7046 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7047 (build-system python-build-system)
7048 (home-page "http://code.google.com/p/prettytable/")
7049 (synopsis "Display tabular data in an ASCII table format")
7050 (description
7051 "A library designed to represent tabular data in visually appealing ASCII
7052tables. PrettyTable allows for selection of which columns are to be printed,
7053independent alignment of columns (left or right justified or centred) and
7054printing of sub-tables by specifying a row range.")
7055 (license license:bsd-3)))
7056
7057(define-public python2-prettytable
7058 (package-with-python2 python-prettytable))
7059
7060(define-public python-tables
7061 (package
7062 (name "python-tables")
7063 (version "3.4.4")
7064 (source
7065 (origin
7066 (method url-fetch)
7067 (uri (pypi-uri "tables" version))
7068 (sha256
7069 (base32
7070 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7071 (modules '((guix build utils)))
7072 (snippet
7073 '(begin
7074 ;; Remove pre-compiled .pyc files from source.
7075 (for-each delete-file-recursively
7076 (find-files "." "__pycache__" #:directories? #t))
7077 (for-each delete-file (find-files "." "\\.pyc$"))
7078 #t))))
7079 (build-system python-build-system)
7080 (arguments
7081 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7082 ;; or "check", so we must override the build and check phases.
7083 #:phases
7084 (modify-phases %standard-phases
7085 (add-after 'unpack 'use-gcc
7086 (lambda _
7087 (substitute* "setup.py"
7088 (("compiler = new_compiler\\(\\)" line)
7089 (string-append line
7090 "\ncompiler.set_executables(compiler='gcc',"
7091 "compiler_so='gcc',"
7092 "linker_exe='gcc',"
7093 "linker_so='gcc -shared')")))
7094 #t))
7095 (replace 'build
7096 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7097 (invoke "python" "setup.py" "build"
7098 (string-append "--hdf5="
7099 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7100 (replace 'check
7101 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7102 (invoke "python" "setup.py" "check"
7103 (string-append "--hdf5="
7104 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7105 (propagated-inputs
7106 `(("python-numexpr" ,python-numexpr)
7107 ("python-numpy" ,python-numpy)))
7108 (native-inputs
7109 `(("python-cython" ,python-cython)
7110 ("pkg-config" ,pkg-config)))
7111 (inputs
7112 `(("hdf5" ,hdf5)
7113 ("bzip2" ,bzip2)
7114 ("zlib" ,zlib)))
7115 (home-page "http://www.pytables.org/")
7116 (synopsis "Hierarchical datasets for Python")
7117 (description "PyTables is a package for managing hierarchical datasets and
7118designed to efficiently cope with extremely large amounts of data.")
7119 (license license:bsd-3)))
7120
7121(define-public python2-tables
7122 (package-with-python2 python-tables))
7123
7124(define-public python-pyasn1
7125 (package
7126 (name "python-pyasn1")
7127 (version "0.4.3")
7128 (source
7129 (origin
7130 (method url-fetch)
7131 (uri (pypi-uri "pyasn1" version))
7132 (sha256
7133 (base32
7134 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7135 (build-system python-build-system)
7136 (home-page "http://pyasn1.sourceforge.net/")
7137 (synopsis "ASN.1 types and codecs")
7138 (description
7139 "This is an implementation of ASN.1 types and codecs in Python. It is
7140suitable for a wide range of protocols based on the ASN.1 specification.")
7141 (license license:bsd-2)))
7142
7143(define-public python2-pyasn1
7144 (package-with-python2 python-pyasn1))
7145
7146(define-public python-pyasn1-modules
7147 (package
7148 (name "python-pyasn1-modules")
7149 (version "0.2.2")
7150 (source
7151 (origin
7152 (method url-fetch)
7153 (uri (pypi-uri "pyasn1-modules" version))
7154 (sha256
7155 (base32
7156 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7157 (build-system python-build-system)
7158 (propagated-inputs
7159 `(("python-pyasn1" ,python-pyasn1)))
7160 (home-page "https://sourceforge.net/projects/pyasn1/")
7161 (synopsis "ASN.1 codec implementations")
7162 (description
7163 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7164implementations of ASN.1-based codecs and protocols.")
7165 (license license:bsd-3)))
7166
7167(define-public python2-pyasn1-modules
7168 (package-with-python2 python-pyasn1-modules))
7169
7170(define-public python-ipaddress
7171 (package
7172 (name "python-ipaddress")
7173 (version "1.0.22")
7174 (source (origin
7175 (method url-fetch)
7176 (uri (pypi-uri "ipaddress" version))
7177 (sha256
7178 (base32
7179 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7180 (build-system python-build-system)
7181 (home-page "https://github.com/phihag/ipaddress")
7182 (synopsis "IP address manipulation library")
7183 (description
7184 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7185 in Python. This library is used to create, poke at, and manipulate IPv4 and
7186 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7187 module to older versions of Python.")
7188 (license license:psfl)))
7189
7190(define-public python2-ipaddress
7191 (package-with-python2 python-ipaddress))
7192
7193(define-public python2-ipaddr
7194 (package
7195 (name "python2-ipaddr")
7196 (version "2.1.11")
7197 (source
7198 (origin
7199 (method url-fetch)
7200 (uri (pypi-uri "ipaddr" version))
7201 (sha256
7202 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7203 (build-system python-build-system)
7204 (arguments
7205 `(#:python ,python-2 ;version 2 only
7206 #:phases
7207 (modify-phases %standard-phases
7208 (replace 'check
40b8c4e3 7209 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7210 (home-page "https://github.com/google/ipaddr-py")
7211 (synopsis "IP address manipulation library")
7212 (description
7213 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7214IPv6 addresses and networks.
7215
7216For new implementations you may prefer to use the standard module
7217@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7218versions of Python.")
7219 (license license:asl2.0)))
7220
7221(define-public python-idna
7222 (package
7223 (name "python-idna")
e95c9837 7224 (version "2.8")
44d10b1f
RW
7225 (source
7226 (origin
7227 (method url-fetch)
7228 (uri (pypi-uri "idna" version))
7229 (sha256
7230 (base32
e95c9837 7231 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7232 (build-system python-build-system)
7233 (home-page "https://github.com/kjd/idna")
7234 (synopsis "Internationalized domain names in applications")
7235 (description
7236 "This is a library to support the Internationalised Domain Names in
7237Applications (IDNA) protocol as specified in RFC 5891. This version of the
7238protocol is often referred to as “IDNA2008” and can produce different results
7239from the earlier standard from 2003. The library is also intended to act as a
7240suitable drop-in replacement for the “encodings.idna” module that comes with
7241the Python standard library but currently only supports the older 2003
7242specification.")
7243 (license license:bsd-4)))
7244
a76e6a69
JM
7245(define-public python-idna-2.7
7246 (package (inherit python-idna)
7247 (version "2.7")
7248 (source (origin
7249 (method url-fetch)
7250 (uri (pypi-uri "idna" version))
7251 (sha256
7252 (base32
7253 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7254
7255
44d10b1f
RW
7256(define-public python2-idna
7257 (package-with-python2 python-idna))
7258
7259(define-public python-idna-ssl
7260 (package
7261 (name "python-idna-ssl")
7262 (version "1.0.1")
7263 (source
7264 (origin
7265 (method url-fetch)
7266 (uri (pypi-uri "idna-ssl" version))
7267 (sha256
7268 (base32
7269 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7270 (build-system python-build-system)
7271 (arguments
7272 `(#:tests? #f)) ;circular dependency with python-aiohttp
7273 (home-page "https://github.com/aio-libs/idna-ssl")
7274 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7275 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7276domains support.")
7277 (license license:expat)))
7278
7279(define-public python-pretend
7280 (package
7281 (name "python-pretend")
7282 (version "1.0.9")
7283 (source
7284 (origin
7285 (method url-fetch)
9f1f22ee 7286 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7287 (sha256
7288 (base32
7289 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7290 (build-system python-build-system)
7291 (home-page "https://github.com/alex/pretend")
7292 (synopsis "Library for stubbing in Python")
7293 (description
7294 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7295technique for writing tests. You may hear the term mixed up with mocks,
7296fakes, or doubles. Basically, a stub is an object that returns pre-canned
7297responses, rather than doing any computation.")
7298 (license license:bsd-3)))
7299
7300(define-public python2-pretend
7301 (package-with-python2 python-pretend))
7302
7303(define-public python-pip
7304 (package
7305 (name "python-pip")
7306 (version "18.1")
7307 (source
7308 (origin
7309 (method url-fetch)
7310 (uri (pypi-uri "pip" version))
7311 (sha256
7312 (base32
7313 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7314 (build-system python-build-system)
7315 (arguments
7316 '(#:tests? #f)) ; there are no tests in the pypi archive.
7317 (home-page "https://pip.pypa.io/")
7318 (synopsis "Package manager for Python software")
7319 (description
7320 "Pip is a package manager for Python software, that finds packages on the
7321Python Package Index (PyPI).")
7322 (license license:expat)))
7323
7324(define-public python2-pip
7325 (package-with-python2 python-pip))
7326
7327(define-public python-tlsh
7328 (package
7329 (name "python-tlsh")
7330 (version "3.4.5")
7331 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7332 (source
7333 (origin
7334 (method git-fetch)
7335 (uri (git-reference
7336 (url "https://github.com/trendmicro/tlsh.git")
7337 (commit (string-append "v" version))))
7338 (file-name (git-file-name name version))
7339 (sha256
7340 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7341 (build-system cmake-build-system)
7342 (arguments
7343 '(#:out-of-source? #f
7344 #:phases (modify-phases %standard-phases
7345 (replace
7346 'install
7347 (lambda* (#:key outputs #:allow-other-keys)
7348 ;; Build and install the Python bindings. The underlying
7349 ;; C++ library is apparently not meant to be installed.
7350 (let ((out (assoc-ref outputs "out")))
7351 (with-directory-excursion "py_ext"
7352 (and (system* "python" "setup.py" "build")
7353 (system* "python" "setup.py" "install"
7354 (string-append "--prefix=" out))))))))))
7355 (inputs `(("python" ,python-wrapper))) ;for the bindings
7356 (synopsis "Fuzzy matching library for Python")
7357 (description
7358 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7359Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7360value which can be used for similarity comparisons. Similar objects have
7361similar hash values, which allows for the detection of similar objects by
7362comparing their hash values. The byte stream should have a sufficient amount
7363of complexity; for example, a byte stream of identical bytes will not generate
7364a hash value.")
7365 (license license:asl2.0)))
7366
7367(define-public python2-tlsh
7368 (package
7369 (inherit python-tlsh)
7370 (name "python2-tlsh")
7371 (inputs `(("python" ,python-2)))))
7372
7373(define-public python-termcolor
7374 (package
7375 (name "python-termcolor")
7376 (version "1.1.0")
7377 (source
7378 (origin
7379 (method url-fetch)
7380 (uri (pypi-uri "termcolor" version))
7381 (sha256
7382 (base32
7383 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7384 (build-system python-build-system)
7385 (arguments
7386 ;; There are no tests.
7387 `(#:tests? #f))
7388 (home-page "https://pypi.python.org/pypi/termcolor")
7389 (synopsis "ANSII Color formatting for terminal output")
7390 (description
7391 "This package provides ANSII Color formatting for output in terminals.")
7392 (license license:expat)))
7393
7394(define-public python2-termcolor
7395 (package-with-python2 python-termcolor))
7396
7397(define-public python-libarchive-c
7398 (package
7399 (name "python-libarchive-c")
7400 (version "2.8")
7401 (source (origin
7402 (method url-fetch)
7403 (uri (pypi-uri "libarchive-c" version))
7404 (sha256
7405 (base32
7406 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7407 (build-system python-build-system)
7408 (arguments
7409 '(#:phases (modify-phases %standard-phases
7410 (add-before
7411 'build 'reference-libarchive
7412 (lambda* (#:key inputs #:allow-other-keys)
7413 ;; Retain the absolute file name of libarchive.so.
7414 (let ((libarchive (assoc-ref inputs "libarchive")))
7415 (substitute* "libarchive/ffi.py"
7416 (("find_library\\('archive'\\)")
7417 (string-append "'" libarchive
7418 "/lib/libarchive.so'"))))))
7419 (replace 'check
7420 (lambda _ (invoke "pytest" "-vv"))))))
7421 (native-inputs
7422 `(("python-mock" ,python-mock)
7423 ("python-pytest" ,python-pytest)))
7424 (inputs
7425 `(("libarchive" ,libarchive)))
7426 (home-page "https://github.com/Changaco/python-libarchive-c")
7427 (synopsis "Python interface to libarchive")
7428 (description
7429 "This package provides Python bindings to libarchive, a C library to
7430access possibly compressed archives in many different formats. It uses
7431Python's @code{ctypes} foreign function interface (FFI).")
7432 (license license:lgpl2.0+)))
7433
7434(define-public python2-libarchive-c
7435 (package-with-python2 python-libarchive-c))
7436
7437(define-public python-file
7438 (package
7439 (inherit file)
7440 (name "python-file")
7441 (build-system python-build-system)
7442 (arguments
7443 '(#:tests? #f ;no tests
7444 #:configure-flags '("--single-version-externally-managed" "--root=/")
7445 #:phases (modify-phases %standard-phases
7446 (add-before 'build 'change-directory
7447 (lambda _
7448 (chdir "python")
7449 #t))
7450 (add-before 'build 'set-library-file-name
7451 (lambda* (#:key inputs #:allow-other-keys)
7452 (let ((file (assoc-ref inputs "file")))
7453 (substitute* "magic.py"
7454 (("find_library\\('magic'\\)")
7455 (string-append "'" file "/lib/libmagic.so'")))
7456 #t))))))
7457 (inputs `(("file" ,file)))
528ea990
LC
7458 (native-inputs (if (%current-target-system)
7459 `(("self" ,this-package))
7460 '()))
44d10b1f
RW
7461 (synopsis "Python bindings to the libmagic file type guesser. Note that
7462this module and the python-magic module both provide a \"magic.py\" file;
7463these two modules, which are different and were developed separately, both
7464serve the same purpose: provide Python bindings for libmagic.")))
7465
7466(define-public python2-file
7467 (package-with-python2 python-file))
7468
7469(define-public python-debian
7470 (package
7471 (name "python-debian")
7472 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7473 (version "0.1.28")
7474 (source
7475 (origin
7476 (method url-fetch)
7477 (uri (pypi-uri name version))
7478 (sha256
7479 (base32
7480 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7481 (build-system python-build-system)
7482 (propagated-inputs
7483 `(("python-six" ,python-six)))
7484 (synopsis "Debian package related modules")
7485 (description
7486 ;; XXX: Use @enumerate instead of @itemize to work around
7487 ;; <http://bugs.gnu.org/21772>.
7488 "This package provides Python modules that abstract many formats of
7489Debian-related files, such as:
7490
7491@enumerate
7492@item Debtags information;
7493@item @file{debian/changelog} files;
7494@item packages files, pdiffs;
7495@item control files of single or multiple RFC822-style paragraphs---e.g.
7496 @file{debian/control}, @file{.changes}, @file{.dsc};
7497@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7498 contained files and meta-information.
7499@end enumerate\n")
7500
7501 ;; Modules are either GPLv2+ or GPLv3+.
7502 (license license:gpl3+)))
7503
7504(define-public python2-debian
7505 (package-with-python2 python-debian))
7506
7507(define-public python-nbformat
7508 (package
7509 (name "python-nbformat")
7510 (version "4.4.0")
7511 (source
7512 (origin
7513 (method url-fetch)
7514 (uri (pypi-uri "nbformat" version))
7515 (sha256
7516 (base32
7517 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7518 (build-system python-build-system)
7519 (arguments `(#:tests? #f)) ; no test target
7520 (propagated-inputs
7521 `(("python-ipython-genutils" ,python-ipython-genutils)
7522 ("python-jsonschema" ,python-jsonschema)
7523 ("python-jupyter-core" ,python-jupyter-core)
7524 ("python-traitlets" ,python-traitlets)))
7525 (home-page "http://jupyter.org")
7526 (synopsis "Jupyter Notebook format")
7527 (description "This package provides the reference implementation of the
7528Jupyter Notebook format and Python APIs for working with notebooks.")
7529 (license license:bsd-3)))
7530
7531(define-public python2-nbformat
7532 (package-with-python2 python-nbformat))
7533
7534(define-public python-bleach
7535 (package
7536 (name "python-bleach")
7537 (version "1.4.3")
7538 (source
7539 (origin
7540 (method url-fetch)
7541 (uri (pypi-uri "bleach" version))
7542 (sha256
7543 (base32
7544 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7545 (build-system python-build-system)
7546 (propagated-inputs
7547 `(("python-html5lib" ,python-html5lib-0.9)
7548 ("python-six" ,python-six)))
7549 (native-inputs
7550 `(("python-nose" ,python-nose)))
7551 (home-page "https://github.com/jsocol/bleach")
7552 (synopsis "Whitelist-based HTML-sanitizing tool")
7553 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7554 (license license:asl2.0)))
7555
7556(define-public python2-bleach
7557 (package-with-python2 python-bleach))
7558
7559(define-public python-entrypoints
7560 (package
7561 (name "python-entrypoints")
a7f1b718 7562 (version "0.3")
44d10b1f
RW
7563 (source
7564 (origin
7565 (method url-fetch)
a7f1b718 7566 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7567 (sha256
7568 (base32
a7f1b718 7569 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7570 (build-system python-build-system)
7571 ;; The package does not come with a setup.py file, so we have to generate
7572 ;; one ourselves.
7573 (arguments
7574 `(#:tests? #f
7575 #:phases
7576 (modify-phases %standard-phases
7577 (add-after 'unpack 'create-setup.py
7578 (lambda _
7579 (call-with-output-file "setup.py"
7580 (lambda (port)
7581 (format port "\
7582from setuptools import setup
7583setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7584" ,version))))))))
7585 (home-page "https://github.com/takluyver/entrypoints")
7586 (synopsis "Discover and load entry points from installed Python packages")
7587 (description "Entry points are a way for Python packages to advertise
7588objects with some common interface. The most common examples are
7589@code{console_scripts} entry points, which define shell commands by
7590identifying a Python function to run. The @code{entrypoints} module contains
7591functions to find and load entry points.")
7592 (license license:expat)))
7593
7594(define-public python2-entrypoints
7595 (package-with-python2 python-entrypoints))
7596
7597(define-public python-nbconvert
7598 (package
7599 (name "python-nbconvert")
7600 (version "5.0.0b1")
7601 (source
7602 (origin
7603 (method url-fetch)
7604 (uri (pypi-uri "nbconvert" version))
7605 (sha256
7606 (base32
7607 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7608 (build-system python-build-system)
7609 (arguments
7610 `(;; The "bdist_egg" target is disabled by default, causing the installation
7611 ;; to fail.
7612 #:configure-flags (list "bdist_egg")
7613 ;; FIXME: 5 failures, 40 errors.
7614 #:tests? #f))
7615 ;; #:phases
7616 ;; (modify-phases %standard-phases
7617 ;; (replace 'check
7618 ;; (lambda _
7619 ;; (zero? (system* "py.test" "-v")))))
7620 (native-inputs
7621 `(("python-pytest" ,python-pytest)))
7622 (propagated-inputs
7623 `(("python-bleach" ,python-bleach)
7624 ("python-entrypoints" ,python-entrypoints)
7625 ("python-jinja2" ,python-jinja2)
7626 ("python-jupyter-core" ,python-jupyter-core)
7627 ("python-mistune" ,python-mistune)
7628 ("python-nbformat" ,python-nbformat)
7629 ("python-pygments" ,python-pygments)
7630 ("python-traitlets" ,python-traitlets)))
7631 (home-page "http://jupyter.org")
7632 (synopsis "Converting Jupyter Notebooks")
7633 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7634notebooks to various other formats via Jinja templates. It allows you to
7635convert an @code{.ipynb} notebook file into various static formats including:
7636
7637@enumerate
7638@item HTML
7639@item LaTeX
7640@item PDF
7641@item Reveal JS
7642@item Markdown (md)
7643@item ReStructured Text (rst)
7644@item executable script
7645@end enumerate\n")
7646 (license license:bsd-3)))
7647
7648(define-public python2-nbconvert
7649 (package-with-python2 python-nbconvert))
7650
44d10b1f
RW
7651(define-public python-notebook
7652 (package
7653 (name "python-notebook")
7654 (version "5.7.4")
7655 (source (origin
7656 (method url-fetch)
7657 (uri (pypi-uri "notebook" version))
7658 (sha256
7659 (base32
7660 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7661 (build-system python-build-system)
7662 (arguments
7663 `(#:phases
7664 (modify-phases %standard-phases
7665 (replace 'check
7666 (lambda _
7667 ;; These tests require a browser
7668 (delete-file-recursively "notebook/tests/selenium")
7669 ;; Some tests need HOME
7670 (setenv "HOME" "/tmp")
7671 ;; This file contains "warningfilters", which are not supported
7672 ;; by this version of nose.
7673 (delete-file "setup.cfg")
7674 (with-directory-excursion "/tmp"
7675 (invoke "nosetests" "-v"))
7676 #t)))))
7677 (propagated-inputs
7678 `(("python-jupyter-core" ,python-jupyter-core)
7679 ("python-nbformat" ,python-nbformat)
7680 ("python-nbconvert" ,python-nbconvert)
7681 ("python-prometheus-client" ,python-prometheus-client)
7682 ("python-send2trash" ,python-send2trash)
7683 ("python-terminado" ,python-terminado)))
7684 (native-inputs
7685 `(("python-nose" ,python-nose)
7686 ("python-sphinx" ,python-sphinx)
7687 ("python-requests" ,python-requests)))
7688 (home-page "http://jupyter.org/")
7689 (synopsis "Web-based notebook environment for interactive computing")
7690 (description
7691 "The Jupyter HTML notebook is a web-based notebook environment for
7692interactive computing.")
7693 (properties `((python2-variant . ,(delay python2-notebook))))
7694 (license license:bsd-3)))
7695
7696(define-public python2-notebook
7697 (let ((base (package-with-python2
7698 (strip-python2-variant python-notebook))))
7699 (package (inherit base)
7700 (native-inputs
7701 `(("python2-mock" ,python2-mock)
7702 ,@(package-native-inputs base)))
7703 (arguments
7704 (substitute-keyword-arguments (package-arguments base)
7705 ((#:phases phases)
7706 `(modify-phases ,phases
7707 (add-before 'check 'disable-test-case
7708 ;; The test requires network access to localhost. Curiously it
7709 ;; fails with Python 2 only. Simply make the test-case return
7710 ;; immediately.
7711 (lambda _
7712 (substitute*
7713 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7714 (("formats = self.nbconvert_api") "return #")))))))))))
7715
7716(define-public python-widgetsnbextension
7717 (package
7718 (name "python-widgetsnbextension")
7719 (version "3.4.2")
7720 (source
7721 (origin
7722 (method url-fetch)
7723 (uri (pypi-uri "widgetsnbextension" version))
7724 (sha256
7725 (base32
7726 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7727 (build-system python-build-system)
7728 (propagated-inputs
7729 `(("python-ipykernel" ,python-ipykernel)
7730 ("python-notebook" ,python-notebook)))
7731 (native-inputs
7732 `(("python-certifi" ,python-certifi)
7733 ("python-nose" ,python-nose)))
7734 (home-page "https://ipython.org")
7735 (synopsis "IPython HTML widgets for Jupyter")
7736 (description "This package provides interactive HTML widgets for Jupyter
7737notebooks.")
7738 (license license:bsd-3)))
7739
7740(define-public python2-widgetsnbextension
7741 (package-with-python2 python-widgetsnbextension))
7742
7743(define-public python-ipywidgets
7744 (package
7745 (name "python-ipywidgets")
7746 (version "5.2.2")
7747 (source
7748 (origin
7749 (method url-fetch)
7750 (uri (pypi-uri "ipywidgets" version))
7751 (sha256
7752 (base32
7753 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7754 (build-system python-build-system)
7755 (propagated-inputs
7756 `(("python-ipython" ,python-ipython)
7757 ("python-traitlets" ,python-traitlets)
7758 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7759 (native-inputs
7760 `(("python-nose" ,python-nose)
7761 ("python-pytest" ,python-pytest)))
7762 (home-page "https://ipython.org")
7763 (synopsis "IPython HTML widgets for Jupyter")
7764 (description "Ipywidgets are interactive HTML widgets for Jupyter
7765notebooks and the IPython kernel. Notebooks come alive when interactive
7766widgets are used. Users gain control of their data and can visualize changes
7767in the data.")
7768 (license license:bsd-3)))
7769
7770(define-public python2-ipywidgets
7771 (package-with-python2 python-ipywidgets))
7772
7773(define-public python-jupyter-console
7774 (package
7775 (name "python-jupyter-console")
becb9cbf 7776 (version "6.0.0")
44d10b1f
RW
7777 (source
7778 (origin
7779 (method url-fetch)
7780 (uri (pypi-uri "jupyter_console" version))
7781 (sha256
7782 (base32
becb9cbf 7783 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 7784 (build-system python-build-system)
44d10b1f
RW
7785 (propagated-inputs
7786 `(("python-ipykernel" ,python-ipykernel)
7787 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 7788 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
7789 ("python-pygments" ,python-pygments)))
7790 (native-inputs
7791 `(("python-nose" ,python-nose)))
7792 (home-page "https://jupyter.org")
7793 (synopsis "Jupyter terminal console")
7794 (description "This package provides a terminal-based console frontend for
7795Jupyter kernels. It also allows for console-based interaction with non-Python
7796Jupyter kernels such as IJulia and IRKernel.")
7797 (license license:bsd-3)))
7798
7799(define-public python2-jupyter-console
8e590c81
RW
7800 (package
7801 (name "python2-jupyter-console")
7802 (version "5.2.0")
7803 (source
7804 (origin
7805 (method url-fetch)
7806 (uri (pypi-uri "jupyter_console" version))
7807 (sha256
7808 (base32
7809 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7810 (build-system python-build-system)
7811 ;; Tests only run in an TTY.
7812 (arguments `(#:tests? #f))
7813 (propagated-inputs
7814 `(("python2-ipykernel" ,python2-ipykernel)
7815 ("python2-jupyter-client" ,python2-jupyter-client)
7816 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7817 ("python2-pygments" ,python2-pygments)))
7818 (native-inputs
7819 `(("python2-nose" ,python2-nose)))
7820 (home-page "https://jupyter.org")
7821 (synopsis "Jupyter terminal console")
7822 (description "This package provides a terminal-based console frontend for
7823Jupyter kernels. It also allows for console-based interaction with non-Python
7824Jupyter kernels such as IJulia and IRKernel.")
7825 (license license:bsd-3)))
44d10b1f
RW
7826
7827;; The python-ipython and python-jupyter-console require each other. To get
7828;; the functionality in both packages working, strip down the
7829;; python-jupyter-console package when using it as an input to python-ipython.
7830(define python-jupyter-console-minimal
7831 (package
7832 (inherit python-jupyter-console)
7833 (name "python-jupyter-console-minimal")
7834 (arguments
7835 (substitute-keyword-arguments
7836 (package-arguments python-jupyter-console)
7837 ((#:phases phases)
7838 `(modify-phases ,phases
7839 (add-after 'install 'delete-bin
7840 (lambda* (#:key outputs #:allow-other-keys)
7841 ;; Delete the bin files, to avoid conflicts in profiles
7842 ;; where python-ipython and python-jupyter-console are
7843 ;; both present.
7844 (delete-file-recursively
7845 (string-append
7846 (assoc-ref outputs "out") "/bin"))))))))
7847 ;; Remove the python-ipython propagated input, to avoid the cycle
7848 (propagated-inputs
7849 (alist-delete
7850 "python-ipython"
7851 (package-propagated-inputs python-jupyter-console)))))
7852
7853(define-public python-qtconsole
7854 (package
7855 (name "python-qtconsole")
7856 (version "4.4.3")
7857 (source
7858 (origin
7859 (method url-fetch)
7860 (uri (pypi-uri "qtconsole" version))
7861 (sha256
7862 (base32
7863 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7864 (build-system python-build-system)
7865 (arguments
7866 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7867 ;; but we only have the LTS version 5.x. This means that there might be
7868 ;; runtime errors, but since this is a dependency of the Jupyter package,
7869 ;; and Jupyter can be used without the qtconsole we can overlook this for
7870 ;; now.
7871 `(#:tests? #f
7872 #:phases
7873 (modify-phases %standard-phases
7874 (add-before 'check 'pre-check
7875 (lambda _
7876 (setenv "QT_QPA_PLATFORM" "offscreen")
7877 #t)))))
7878 (propagated-inputs
7879 `(("python-ipykernel" ,python-ipykernel)
7880 ("python-ipython" ,python-ipython)))
7881 (native-inputs
7882 `(("python-pytest" ,python-pytest)))
7883 (home-page "http://jupyter.org")
7884 (synopsis "Jupyter Qt console")
7885 (description "This package provides a Qt-based console for Jupyter with
7886support for rich media output.")
7887 (license license:bsd-3)))
7888
7889(define-public jupyter
7890 (package
7891 (name "jupyter")
7892 (version "1.0.0")
7893 (source
7894 (origin
7895 (method url-fetch)
7896 (uri (pypi-uri "jupyter" version))
7897 (sha256
7898 (base32
7899 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7900 (build-system python-build-system)
7901 (arguments '(#:tests? #f)) ; there are none.
7902 (propagated-inputs
7903 `(("python-ipykernel" ,python-ipykernel)
7904 ("python-ipywidgets" ,python-ipywidgets)
7905 ("python-jupyter-console" ,python-jupyter-console)
7906 ("python-nbconvert" ,python-nbconvert)
7907 ("python-notebook" ,python-notebook)
7908 ("python-qtconsole" ,python-qtconsole)))
7909 (native-search-paths
7910 (list (search-path-specification
7911 (variable "JUPYTER_PATH")
7912 (files '("share/jupyter")))))
7913 (home-page "https://jupyter.org")
7914 (synopsis "Web application for interactive documents")
7915 (description
7916 "The Jupyter Notebook is a web application that allows you to create and
7917share documents that contain live code, equations, visualizations and
7918explanatory text. Uses include: data cleaning and transformation, numerical
7919simulation, statistical modeling, machine learning and much more.")
7920 (license license:bsd-3)))
7921
7922(define-public python-chardet
7923 (package
7924 (name "python-chardet")
7925 (version "3.0.4")
7926 (source
7927 (origin
7928 (method url-fetch)
7929 (uri (pypi-uri "chardet" version))
7930 (sha256
7931 (base32
7932 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7933 (native-inputs
7934 `(("python-hypothesis" ,python-hypothesis)
7935 ("python-pytest" ,python-pytest)
7936 ("python-pytest-runner" ,python-pytest-runner)))
7937 (build-system python-build-system)
7938 (home-page "https://github.com/chardet/chardet")
7939 (synopsis "Universal encoding detector for Python 2 and 3")
7940 (description
7941 "This package provides @code{chardet}, a Python module that can
7942automatically detect a wide range of file encodings.")
7943 (license license:lgpl2.1+)))
7944
7945(define-public python2-chardet
7946 (package-with-python2 python-chardet))
7947
7948(define-public python-docopt
7949 (package
7950 (name "python-docopt")
7951 (version "0.6.2")
7952 (source
7953 (origin
7954 (method url-fetch)
7955 ;; The release on PyPI does not include tests.
7956 (uri (string-append
7957 "https://github.com/docopt/docopt/archive/"
7958 version ".tar.gz"))
7959 (file-name (string-append name "-" version ".tar.gz"))
7960 (sha256
7961 (base32
7962 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7963 (build-system python-build-system)
7964 (native-inputs
7965 `(("python-pytest" ,python-pytest)))
7966 (arguments
7967 `(#:phases
7968 (modify-phases %standard-phases
7969 (replace 'check
7970 (lambda _ (invoke "py.test"))))))
7971 (home-page "http://docopt.org")
7972 (synopsis "Command-line interface description language for Python")
7973 (description "This library allows the user to define a command-line
7974interface from a program's help message rather than specifying it
4ca7207b 7975programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
7976@code{argparse}.")
7977 (license license:expat)))
7978
7979(define-public python2-docopt
7980 (package-with-python2 python-docopt))
7981
7982(define-public python-pythondialog
7983 (package
7984 (name "python-pythondialog")
7985 (version "3.4.0")
7986 (source
7987 (origin
7988 (method url-fetch)
7989 (uri (pypi-uri "pythondialog" version))
7990 (sha256
7991 (base32
7992 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7993 (build-system python-build-system)
7994 (arguments
7995 `(#:phases
7996 (modify-phases %standard-phases
7997 (add-after 'unpack 'patch-path
7998 (lambda* (#:key inputs #:allow-other-keys)
7999 (let* ((dialog (assoc-ref inputs "dialog")))
8000 ;; Since this library really wants to grovel the search path, we
8001 ;; must hardcode dialog's store path into it.
8002 (substitute* "dialog.py"
8003 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8004 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8005 #t))))
8006 #:tests? #f)) ; no test suite
8007 (propagated-inputs
8008 `(("dialog" ,dialog)))
8009 (home-page "http://pythondialog.sourceforge.net/")
8010 (synopsis "Python interface to the UNIX dialog utility")
8011 (description "A Python wrapper for the dialog utility. Its purpose is to
8012provide an easy to use, pythonic and comprehensive Python interface to dialog.
8013This allows one to make simple text-mode user interfaces on Unix-like systems")
8014 (license license:lgpl2.1)
8015 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8016
8017(define-public python2-pythondialog
8018 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8019 (package
8020 (inherit base)
8021 (version (package-version python-pythondialog))
8022 (source (origin
8023 (method url-fetch)
8024 (uri (pypi-uri "python2-pythondialog" version))
8025 (sha256
8026 (base32
8027 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8028
8029(define-public python-configobj
8030 (package
8031 (name "python-configobj")
8032 (version "5.0.6")
8033 (source (origin
8034 (method url-fetch)
b0758fbb 8035 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8036 (sha256
8037 (base32
8038 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8039 ;; Patch setup.py so it looks for python-setuptools, which is
8040 ;; required to parse the keyword 'install_requires' in setup.py.
8041 (patches (search-patches "python-configobj-setuptools.patch"))))
8042 (build-system python-build-system)
8043 (propagated-inputs
8044 `(("python-six" ,python-six)))
8045 (synopsis "Config file reading, writing and validation")
8046 (description "ConfigObj is a simple but powerful config file reader and
8047writer: an ini file round tripper. Its main feature is that it is very easy to
8048use, with a straightforward programmer’s interface and a simple syntax for
8049config files.")
8050 (home-page "https://github.com/DiffSK/configobj")
8051 (license license:bsd-3)))
8052
8053(define-public python2-configobj
8054 (package-with-python2 python-configobj))
8055
8056(define-public python-configargparse
8057 (package
8058 (name "python-configargparse")
86ae491f 8059 (version "0.14.0")
44d10b1f
RW
8060 (source (origin
8061 (method url-fetch)
8062 (uri (pypi-uri "ConfigArgParse" version))
8063 (sha256
8064 (base32
86ae491f 8065 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8066 (build-system python-build-system)
8067 (native-inputs
8068 `(("python-pyyaml" ,python-pyyaml)))
8069 (arguments
8070 `(#:phases
8071 (modify-phases %standard-phases
8072 (replace 'check
8073 (lambda _
8074 ;; Bypass setuptools-shim because one test relies on "setup.py"
8075 ;; being the first argument passed to the python call.
8076 ;;
8077 ;; NOTE: Many tests do not run because they rely on Python's
8078 ;; built-in test.test_argparse, but we remove the unit tests from
8079 ;; our Python installation.
8080 (invoke "python" "setup.py" "test"))))))
8081 (synopsis "Replacement for argparse")
8082 (description "A drop-in replacement for argparse that allows options to also
8083be set via config files and/or environment variables.")
8084 (home-page "https://github.com/bw2/ConfigArgParse")
8085 (license license:expat)))
8086
8087(define-public python2-configargparse
8088 (package-with-python2 python-configargparse))
8089
8090(define-public python-argparse-manpage
8091 (package
8092 (name "python-argparse-manpage")
8093 (version "1.1")
8094 (source
8095 (origin
8096 (method url-fetch)
8097 (uri (pypi-uri "argparse-manpage" version))
8098 (sha256
8099 (base32
8100 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8101 (build-system python-build-system)
8102 (home-page "https://github.com/praiskup/argparse-manpage")
8103 (synopsis "Build manual page from Python's ArgumentParser object")
8104 (description
8105 "This package provides tools to build manual pages from Python's
8106@code{ArgumentParser} object.")
8107 (license license:asl2.0)))
8108
3e8f76d8
RW
8109(define-public python-contextlib2
8110 (package
8111 (name "python-contextlib2")
8112 (version "0.5.5")
8113 (source
8114 (origin
8115 (method url-fetch)
8116 (uri (pypi-uri "contextlib2" version))
8117 (sha256
8118 (base32
8119 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8120 (build-system python-build-system)
8121 (home-page "http://contextlib2.readthedocs.org/")
8122 (synopsis "Tools for decorators and context managers")
8123 (description "This module is primarily a backport of the Python
81243.2 contextlib to earlier Python versions. Like contextlib, it
8125provides utilities for common tasks involving decorators and context
8126managers. It also contains additional features that are not part of
8127the standard library.")
8128 (license license:psfl)))
8129
44d10b1f
RW
8130(define-public python2-contextlib2
8131 (package
8132 (name "python2-contextlib2")
8133 (version "0.5.5")
8134 (source
8135 (origin
8136 (method url-fetch)
8137 (uri (pypi-uri "contextlib2" version))
8138 (sha256
8139 (base32
8140 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8141 (build-system python-build-system)
8142 (arguments
8143 `(#:python ,python-2
8144 #:phases
8145 (modify-phases %standard-phases
8146 (replace 'check
8147 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8148 (native-inputs
8149 `(("python2-unittest2" ,python2-unittest2)))
8150 (home-page "http://contextlib2.readthedocs.org/")
8151 (synopsis "Tools for decorators and context managers")
8152 (description "This module is primarily a backport of the Python
81533.2 contextlib to earlier Python versions. Like contextlib, it
8154provides utilities for common tasks involving decorators and context
8155managers. It also contains additional features that are not part of
8156the standard library.")
8157 (license license:psfl)))
8158
8159(define-public python-texttable
8160 (package
8161 (name "python-texttable")
52cc4892 8162 (version "0.9.1")
44d10b1f
RW
8163 (source
8164 (origin
8165 (method url-fetch)
8166 (uri (pypi-uri "texttable" version))
8167 (sha256
8168 (base32
52cc4892 8169 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
44d10b1f
RW
8170 (build-system python-build-system)
8171 (arguments '(#:tests? #f)) ; no tests
8172 (home-page "https://github.com/foutaise/texttable/")
8173 (synopsis "Python module for creating simple ASCII tables")
8174 (description "Texttable is a Python module for creating simple ASCII
8175tables.")
8176 (license license:lgpl2.1+)))
8177
8178(define-public python2-texttable
8179 (package-with-python2 python-texttable))
8180
8181(define-public python-atomicwrites
8182 (package
8183 (name "python-atomicwrites")
8184 (version "1.1.5")
8185 (source (origin
8186 (method url-fetch)
8187 (uri (pypi-uri "atomicwrites" version))
8188 (sha256
8189 (base32
8190 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8191 (build-system python-build-system)
8192 (synopsis "Atomic file writes in Python")
8193 (description "Library for atomic file writes using platform dependent tools
8194for atomic file system operations.")
8195 (home-page "https://github.com/untitaker/python-atomicwrites")
8196 (license license:expat)))
8197
8198(define-public python2-atomicwrites
8199 (package-with-python2 python-atomicwrites))
8200
8201(define-public python-click-threading
8202 (package
8203 (name "python-click-threading")
8204 (version "0.4.4")
8205 (source (origin
8206 (method url-fetch)
8207 (uri (pypi-uri "click-threading" version))
8208 (sha256
8209 (base32
8210 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8211 (build-system python-build-system)
8212 (propagated-inputs
8213 `(("python-click" ,python-click)))
8214 (synopsis "Utilities for multithreading in Click")
8215 (description "This package provides utilities for multithreading in Click
8216applications.")
8217 (home-page "https://github.com/click-contrib/click-threading")
8218 (license license:expat)))
8219
8220(define-public python-click-log
8221 (package
8222 (name "python-click-log")
8223 (version "0.3.2")
8224 (source (origin
8225 (method url-fetch)
8226 (uri (pypi-uri "click-log" version))
8227 (sha256
8228 (base32
8229 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8230 (build-system python-build-system)
8231 (propagated-inputs
8232 `(("python-click" ,python-click)))
8233 (synopsis "Logging for click applications")
8234 (description "This package provides a Python library for logging Click
8235applications.")
8236 (home-page "https://github.com/click-contrib/click-log")
8237 (license license:expat)))
8238
8239(define-public python-apipkg
8240 (package
8241 (name "python-apipkg")
8242 (version "1.4")
8243 (source (origin
8244 (method url-fetch)
8245 (uri (pypi-uri "apipkg" version))
8246 (sha256
8247 (base32
8248 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8249 (build-system python-build-system)
8250 (native-inputs
8251 `(("python-pytest" ,python-pytest)))
8252 (synopsis "Namespace control and lazy-import mechanism")
8253 (description "With apipkg you can control the exported namespace of a Python
8254package and greatly reduce the number of imports for your users. It is a small
8255pure Python module that works on virtually all Python versions.")
8256 (home-page "https://github.com/pytest-dev/apipkg")
8257 (license license:expat)))
8258
8259(define-public python2-apipkg
8260 (package-with-python2 python-apipkg))
8261
8262(define-public python-execnet
8263 (package
8264 (name "python-execnet")
8265 (version "1.4.1")
8266 (source (origin
8267 (method url-fetch)
8268 (uri (pypi-uri "execnet" version))
8269 (sha256
8270 (base32
8271 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8272 (build-system python-build-system)
8273 (arguments
8274 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8275 ;; The two test failures are caused by the lack of an `ssh` executable.
8276 ;; The test suite can be run with pytest after the 'install' phase.
8277 #:tests? #f))
8278 (native-inputs
8279 `(("python-pytest" ,python-pytest)
8280 ("python-setuptools-scm" ,python-setuptools-scm)))
8281 (propagated-inputs
8282 `(("python-apipkg" ,python-apipkg)))
8283 (synopsis "Rapid multi-Python deployment")
8284 (description "Execnet provides a share-nothing model with
8285channel-send/receive communication for distributing execution across many
8286Python interpreters across version, platform and network barriers. It has a
8287minimal and fast API targeting the following uses:
8288@enumerate
8289@item distribute tasks to (many) local or remote CPUs
8290@item write and deploy hybrid multi-process applications
8291@item write scripts to administer multiple environments
8292@end enumerate")
8293 (home-page "http://codespeak.net/execnet/")
8294 (license license:expat)))
8295
8296(define-public python2-execnet
8297 (package-with-python2 python-execnet))
8298
8299(define-public python-icalendar
8300 (package
8301 (name "python-icalendar")
8302 (version "4.0.3")
8303 (source (origin
8304 (method url-fetch)
8305 (uri (pypi-uri "icalendar" version))
8306 (sha256
8307 (base32
8308 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8309 (build-system python-build-system)
8310 (propagated-inputs
8311 `(("python-dateutil" ,python-dateutil)
8312 ("python-pytz" ,python-pytz)))
8313 (synopsis "Python library for parsing iCalendar files")
8314 (description "The icalendar package is a parser/generator of iCalendar
8315files for use with Python.")
8316 (home-page "https://github.com/collective/icalendar")
8317 (license license:bsd-2)))
8318
44d10b1f
RW
8319(define-public python-args
8320 (package
8321 (name "python-args")
8322 (version "0.1.0")
8323 (source (origin
8324 (method url-fetch)
8325 (uri (pypi-uri "args" version))
8326 (sha256
8327 (base32
8328 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8329 (build-system python-build-system)
8330 (home-page "https://github.com/kennethreitz/args")
8331 (synopsis "Command-line argument parser")
8332 (description
8333 "This library provides a Python module to parse command-line arguments.")
8334 (license license:bsd-3)))
8335
8336(define-public python2-args
8337 (package-with-python2 python-args))
8338
8339(define-public python-clint
8340 (package
8341 (name "python-clint")
8342 (version "0.5.1")
8343 (source (origin
8344 (method url-fetch)
8345 (uri (pypi-uri "clint" version))
8346 (sha256
8347 (base32
8348 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8349 (build-system python-build-system)
8350 (arguments
8351 '(#:phases
8352 (modify-phases %standard-phases
8353 (replace 'check
8354 (lambda _ (invoke "py.test" "-v"))))))
8355 (native-inputs
8356 `(("python-pytest" ,python-pytest)))
8357 (propagated-inputs
8358 `(("python-args" ,python-args)))
8359 (home-page "https://github.com/kennethreitz/clint")
8360 (synopsis "Command-line interface tools")
8361 (description
8362 "Clint is a Python module filled with a set of tools for developing
8363command-line applications, including tools for colored and indented
8364output, progress bar display, and pipes.")
8365 (license license:isc)))
8366
8367(define-public python2-clint
8368 (package-with-python2 python-clint))
8369
44d10b1f
RW
8370(define-public python-rply
8371 (package
8372 (name "python-rply")
8373 (version "0.7.5")
8374 (source (origin
8375 (method url-fetch)
8376 (uri (pypi-uri "rply" version))
8377 (sha256
8378 (base32
8379 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8380 (build-system python-build-system)
8381 (propagated-inputs
8382 `(("python-appdirs" ,python-appdirs)))
8383 (home-page "https://github.com/alex/rply")
8384 (synopsis "Parser generator for Python")
8385 (description
8386 "This package provides a pure Python based parser generator, that also
8387works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8388with a new public API, and RPython support.")
8389 (license license:bsd-3)))
8390
8391(define-public python2-rply
8392 (package-with-python2 python-rply))
8393
8394(define-public python-hy
8395 (package
8396 (name "python-hy")
8397 (version "0.13.0")
8398 (source (origin
8399 (method url-fetch)
8400 (uri (pypi-uri "hy" version))
8401 (sha256
8402 (base32
8403 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8404 (build-system python-build-system)
8405 (arguments
8406 '(#:phases
8407 (modify-phases %standard-phases
8408 (replace 'check
8409 (lambda _
8410 ;; Tests require write access to HOME.
8411 (setenv "HOME" "/tmp")
8412 (invoke "nosetests"))))))
8413 (native-inputs
8414 `(("python-coverage" ,python-coverage)
8415 ("python-nose" ,python-nose)))
8416 (propagated-inputs
8417 `(("python-astor" ,python-astor)
8418 ("python-clint" ,python-clint)
8419 ("python-rply" ,python-rply)))
8420 (home-page "http://hylang.org/")
8421 (synopsis "Lisp frontend to Python")
8422 (description
8423 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8424its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8425Python at your fingertips, in Lisp form.")
8426 (license license:expat)))
8427
8428(define-public python2-hy
8429 (package-with-python2 python-hy))
8430
8431(define-public python2-functools32
8432 (package
8433 (name "python2-functools32")
8434 (version "3.2.3-2")
8435 (source
8436 (origin
8437 (method url-fetch)
8438 (uri (pypi-uri "functools32" version))
8439 (sha256
8440 (base32
8441 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8442 (build-system python-build-system)
8443 (arguments
8444 `(#:python ,python-2
8445 #:tests? #f)) ; no test target
8446 (home-page "https://github.com/MiCHiLU/python-functools32")
8447 (synopsis
8448 "Backport of the functools module from Python 3.2.3")
8449 (description
8450 "This package is a backport of the @code{functools} module from Python
84513.2.3 for use with older versions of Python and PyPy.")
8452 (license license:expat)))
8453
8454(define-public python2-subprocess32
8455 (package
8456 (name "python2-subprocess32")
8457 (version "3.2.7")
8458 (source (origin
8459 (method url-fetch)
8460 (uri (pypi-uri "subprocess32" version))
8461 (sha256
8462 (base32
8463 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8464 (patches
8465 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8466 (build-system python-build-system)
8467 (arguments
8468 `(#:python ,python-2
8469 ;; The test suite fails with Python > 2.7.13:
8470 ;; import test.support
8471 ;; ImportError: No module named support
8472 #:tests? #f
8473 #:phases
8474 (modify-phases %standard-phases
8475 (add-after 'unpack 'patch-/bin/sh
8476 (lambda _
8477 (substitute* '("subprocess32.py"
8478 "test_subprocess32.py")
8479 (("/bin/sh") (which "sh")))
8480 #t)))))
8481 (home-page "https://github.com/google/python-subprocess32")
8482 (synopsis "Backport of the subprocess module from Python 3.2")
8483 (description
8484 "This is a backport of the @code{subprocess} standard library module
8485from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8486new features. On POSIX systems it is guaranteed to be reliable when used
8487in threaded applications. It includes timeout support from Python 3.3 but
8488otherwise matches 3.2’s API.")
8489 (license license:psfl)))
8490
8491(define-public python2-futures
8492 (package
8493 (name "python2-futures")
8494 (version "3.2.0")
8495 (source
8496 (origin
8497 (method url-fetch)
8498 (uri (pypi-uri "futures" version))
8499 (sha256
8500 (base32
8501 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8502 (build-system python-build-system)
8503 (arguments `(#:python ,python-2
8504 ;; FIXME: Python 2.7.14 moved the test.support library,
8505 ;; but our package has not yet been adjusted. Enable
8506 ;; tests when the python2 package has been fixed.
8507 #:tests? #f))
8508 (home-page "https://github.com/agronholm/pythonfutures")
8509 (synopsis
8510 "Backport of the concurrent.futures package from Python 3.2")
8511 (description
8512 "The concurrent.futures module provides a high-level interface for
8513asynchronously executing callables. This package backports the
8514concurrent.futures package from Python 3.2")
8515 (license license:bsd-3)))
8516
8517(define-public python-promise
8518 (package
8519 (name "python-promise")
8520 (version "0.4.2")
8521 (source
8522 (origin
8523 (method url-fetch)
8524 (uri (pypi-uri "promise" version))
8525 (sha256
8526 (base32
8527 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8528 (build-system python-build-system)
8529 ;; Tests wants python-futures, which is a python2 only program, and
8530 ;; can't be found by python-promise at test time.
8531 (arguments `(#:tests? #f))
8532 (home-page "https://github.com/syrusakbary/promise")
8533 (synopsis "Promises/A+ implementation for Python")
8534 (description
8535 "Promises/A+ implementation for Python")
8536 (properties `((python2-variant . ,(delay python2-promise))))
8537 (license license:expat)))
8538
8539(define-public python2-promise
8540 (let ((promise (package-with-python2
8541 (strip-python2-variant python-promise))))
8542 (package (inherit promise)
8543 (arguments (substitute-keyword-arguments (package-arguments promise)
8544 ((#:tests? _) #t)))
8545 (native-inputs
8546 `(("python2-futures" ,python2-futures)
8547 ("python2-pytest" ,python2-pytest)
8548 ,@(package-native-inputs promise))))))
8549
d71d85cd
RW
8550(define-public python-progressbar33
8551 (package
8552 (name "python-progressbar33")
8553 (version "2.4")
8554 (source
8555 (origin
8556 (method url-fetch)
8557 (uri (pypi-uri "progressbar33" version))
8558 (sha256
8559 (base32
8560 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8561 (build-system python-build-system)
8562 (home-page "http://github.com/germangh/python-progressbar")
8563 (synopsis "Text progress bar library for Python")
8564 (description
8565 "This package provides a text progress bar library for Python. This
8566version only differs from the original @code{progressbar} package in that it
8567uses relative package imports instead of absolute imports, which is necessary
8568for the module to work under Python 3.3.")
8569 ;; Either or both of these licenses may be selected.
8570 (license (list license:lgpl2.1+ license:bsd-3))))
8571
44d10b1f
RW
8572(define-public python-colorama
8573 (package
8574 (name "python-colorama")
8575 (version "0.3.9")
8576 (source
8577 (origin
8578 (method url-fetch)
8579 (uri (pypi-uri "colorama" version))
8580 (sha256
8581 (base32
8582 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8583 (build-system python-build-system)
8584 (synopsis "Colored terminal text rendering for Python")
8585 (description "Colorama is a Python library for rendering colored terminal
8586text.")
8587 (home-page "https://pypi.python.org/pypi/colorama")
8588 (license license:bsd-3)))
8589
8590(define-public python2-colorama
8591 (package-with-python2 python-colorama))
8592
8593(define-public python-rsa
8594 (package
8595 (name "python-rsa")
8596 (version "3.4.2")
8597 (source
8598 (origin
8599 (method url-fetch)
8600 (uri (pypi-uri "rsa" version))
8601 (sha256
8602 (base32
8603 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8604 (build-system python-build-system)
8605 (propagated-inputs
8606 `(("python-pyasn1" ,python-pyasn1)))
8607 (synopsis "Pure-Python RSA implementation")
8608 (description "Python-RSA is a pure-Python RSA implementation. It supports
8609encryption and decryption, signing and verifying signatures, and key
8610generation according to PKCS#1 version 1.5. It can be used as a Python
8611library as well as on the command line.")
8612 (home-page "https://stuvel.eu/rsa")
8613 (license license:asl2.0)))
8614
8615(define-public python2-rsa
8616 (package-with-python2 python-rsa))
8617
8618(define-public python-pluggy
8619 (package
8620 (name "python-pluggy")
8621 (version "0.7.1")
8622 (source
8623 (origin
8624 (method url-fetch)
8625 (uri (pypi-uri "pluggy" version))
8626 (sha256
8627 (base32
8628 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8629 (build-system python-build-system)
8630 (native-inputs
8631 `(("python-setuptools-scm" ,python-setuptools-scm)))
8632 (synopsis "Plugin and hook calling mechanism for Python")
8633 (description "Pluggy is an extraction of the plugin manager as used by
8634Pytest but stripped of Pytest specific details.")
8635 (home-page "https://pypi.python.org/pypi/pluggy")
8636 (license license:expat)))
8637
8638(define-public python2-pluggy
8639 (package-with-python2 python-pluggy))
8640
8641(define-public python-tox
8642 (package
8643 (name "python-tox")
8644 (version "2.8.1")
8645 (source
8646 (origin
8647 (method url-fetch)
8648 (uri (pypi-uri "tox" version))
8649 (sha256
8650 (base32
8651 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8652 (build-system python-build-system)
8653 (arguments
8654 ;; FIXME: Tests require pytest-timeout, which itself requires
8655 ;; pytest>=2.8.0 for installation.
8656 '(#:tests? #f))
8657 (propagated-inputs
8658 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8659 ("python-py" ,python-py)
8660 ("python-virtualenv" ,python-virtualenv)))
8661 (native-inputs
8662 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8663 ("python-pytest" ,python-pytest) ; >= 2.3.5
8664 ("python-setuptools-scm" ,python-setuptools-scm)))
8665 (home-page "http://tox.testrun.org/")
8666 (synopsis "Virtualenv-based automation of test activities")
8667 (description "Tox is a generic virtualenv management and test command line
8668tool. It can be used to check that a package installs correctly with
8669different Python versions and interpreters, or run tests in each type of
8670supported environment, or act as a frontend to continuous integration
8671servers.")
8672 (license license:expat)))
8673
8674(define-public python2-tox
8675 (package-with-python2 python-tox))
8676
8677(define-public python-jmespath
8678 (package
8679 (name "python-jmespath")
8680 (version "0.9.3")
8681 (source
8682 (origin
8683 (method url-fetch)
8684 (uri (pypi-uri "jmespath" version))
8685 (sha256
8686 (base32
8687 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8688 (build-system python-build-system)
8689 (native-inputs
8690 `(("python-nose" ,python-nose)))
8691 (synopsis "JSON Matching Expressions")
8692 (description "JMESPath (pronounced “james path”) is a Python library that
8693allows one to declaratively specify how to extract elements from a JSON
8694document.")
8695 (home-page "https://github.com/jmespath/jmespath.py")
8696 (license license:expat)))
8697
8698(define-public python2-jmespath
8699 (package-with-python2 python-jmespath))
8700
8701(define-public python-botocore
8702 (package
7bcf827c
RW
8703 (name "python-botocore")
8704 (version "1.12.149")
8705 (source
8706 (origin
8707 (method url-fetch)
8708 (uri (pypi-uri "botocore" version))
8709 (sha256
8710 (base32
8711 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8712 (build-system python-build-system)
8713 (arguments
8714 ;; FIXME: Many tests are failing.
8715 '(#:tests? #f))
8716 (propagated-inputs
8717 `(("python-dateutil" ,python-dateutil)
8718 ("python-docutils" ,python-docutils)
8719 ("python-jmespath" ,python-jmespath)))
8720 (native-inputs
8721 `(("python-mock" ,python-mock)
8722 ("python-nose" ,python-nose)
8723 ("behave" ,behave)
8724 ("python-tox" ,python-tox)
8725 ("python-urllib3" ,python-urllib3)
8726 ("python-wheel" ,python-wheel)))
8727 (home-page "https://github.com/boto/botocore")
8728 (synopsis "Low-level interface to AWS")
8729 (description "Botocore is a Python library that provides a low-level
44d10b1f 8730interface to the Amazon Web Services (AWS) API.")
7bcf827c 8731 (license license:asl2.0)))
44d10b1f
RW
8732
8733(define-public python2-botocore
8734 (package-with-python2 python-botocore))
8735
8736(define-public python-xdo
8737 (package
8738 (name "python-xdo")
8739 (version "0.3")
8740 (source (origin
8741 (method url-fetch)
8742 (uri (string-append
8743 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8744 "python-xdo_" version ".orig.tar.gz"))
8745 (sha256
8746 (base32
8747 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8748 (build-system python-build-system)
8749 (arguments
8750 '(#:phases
8751 (modify-phases %standard-phases
8752 (add-before 'install 'patch-libxdo-path
8753 ;; Hardcode the path of dynamically loaded libxdo library.
8754 (lambda* (#:key inputs #:allow-other-keys)
8755 (let ((libxdo (string-append
8756 (assoc-ref inputs "xdotool")
8757 "/lib/libxdo.so")))
8758 (substitute* "xdo/_xdo.py"
8759 (("find_library\\(\"xdo\"\\)")
8760 (simple-format #f "\"~a\"" libxdo)))
8761 #t))))
8762 #:tests? #f)) ; no tests provided
8763 (propagated-inputs
8764 `(("python-six" ,python-six)))
8765 (inputs
8766 `(("xdotool" ,xdotool)
8767 ("libX11" ,libx11)))
8768 (home-page "https://tracker.debian.org/pkg/python-xdo")
8769 (synopsis "Python library for simulating X11 keyboard/mouse input")
8770 (description "Provides bindings to libxdo for manipulating X11 via simulated
8771input. (Note that this is mostly a legacy library; you may wish to look at
8772python-xdo for newer bindings.)")
8773 (license license:bsd-3)))
8774
8775(define-public python2-xdo
8776 (package-with-python2 python-xdo))
8777
8778(define-public python-mako
8779 (package
8780 (name "python-mako")
6dc7a193 8781 (version "1.0.13")
44d10b1f
RW
8782 (source
8783 (origin
8784 (method url-fetch)
8785 (uri (pypi-uri "Mako" version))
8786 (sha256
8787 (base32
6dc7a193 8788 "0h95n0g0k1jwxiqarr09navpfajarvbmpm8mhmw66c25qc675vlm"))))
44d10b1f
RW
8789 (build-system python-build-system)
8790 (propagated-inputs
8791 `(("python-markupsafe" ,python-markupsafe)))
8792 (native-inputs
8793 `(("python-mock" ,python-mock)
8794 ("python-nose" ,python-nose)
8795 ("python-pytest" ,python-pytest)))
7016e620 8796 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8797 (synopsis "Templating language for Python")
8798 (description "Mako is a templating language for Python that compiles
8799templates into Python modules.")
8800 (license license:expat)))
8801
8802(define-public python2-mako
8803 (package-with-python2 python-mako))
8804
8805(define-public python-waitress
8806 (package
8807 (name "python-waitress")
8808 (version "1.1.0")
8809 (source
8810 (origin
8811 (method url-fetch)
8812 (uri (pypi-uri "waitress" version))
8813 (patches (search-patches "python-waitress-fix-tests.patch"))
8814 (sha256
8815 (base32
8816 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8817 (build-system python-build-system)
8818 (home-page "https://github.com/Pylons/waitress")
8819 (synopsis "Waitress WSGI server")
8820 (description "Waitress is meant to be a production-quality pure-Python WSGI
8821server with very acceptable performance.")
8822 (license license:zpl2.1)))
8823
8824(define-public python2-waitress
8825 (package-with-python2 python-waitress))
8826
8827(define-public python-pyquery
8828 (package
8829 (name "python-pyquery")
8830 (version "1.2.17")
8831 (source
8832 (origin
8833 (method url-fetch)
8834 (uri (pypi-uri "pyquery" version))
8835 (sha256
8836 (base32
8837 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8838 (build-system python-build-system)
8839 (native-inputs
8840 `(("python-webob" ,python-webob)
8841 ("python-webtest" ,python-webtest)))
8842 (propagated-inputs
8843 `(("python-lxml" ,python-lxml)
8844 ("python-cssselect" ,python-cssselect)))
8845 (home-page "https://github.com/gawel/pyquery")
8846 (synopsis "Make jQuery-like queries on xml documents")
8847 (description "pyquery allows you to make jQuery queries on xml documents.
8848The API is as much as possible the similar to jQuery. pyquery uses lxml for
8849fast xml and html manipulation.")
8850 (license license:bsd-3)))
8851
44d10b1f
RW
8852(define-public python-anyjson
8853 (package
8854 (name "python-anyjson")
8855 (version "0.3.3")
8856 (source
8857 (origin
8858 (method url-fetch)
8859 (uri (pypi-uri "anyjson" version))
8860 (sha256
8861 (base32
8862 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8863 (build-system python-build-system)
8864 (arguments
8865 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8866 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8867 ;; whatever) so this transformation needs to be done before the tests
8868 ;; can be run. Maybe we could add a build step to transform beforehand
8869 ;; but it could be annoying/difficult.
8870 ;; We can enable tests for the Python 2 version, though, and do below.
8871 #:tests? #f))
8872 (home-page "https://bitbucket.org/runeh/anyjson/")
8873 (synopsis
8874 "Wraps best available JSON implementation in a common interface")
8875 (description
8876 "Anyjson loads whichever is the fastest JSON module installed
8877and provides a uniform API regardless of which JSON implementation is used.")
8878 (license license:bsd-3)
8879 (properties `((python2-variant . ,(delay python2-anyjson))))))
8880
8881(define-public python2-anyjson
8882 (let ((anyjson (package-with-python2
8883 (strip-python2-variant python-anyjson))))
8884 (package
8885 (inherit anyjson)
8886 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8887 #:tests? #t
8888 ,@(package-arguments anyjson)))
8889 (native-inputs `(("python2-nose" ,python2-nose))))))
8890
8891(define-public python-amqp
8892 (package
8893 (name "python-amqp")
8894 (version "2.3.2")
8895 (source
8896 (origin
8897 (method url-fetch)
8898 (uri (pypi-uri "amqp" version))
8899 (sha256
8900 (base32
8901 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8902 (build-system python-build-system)
8903 (native-inputs
8904 `(("python-case" ,python-case)
8905 ("python-pytest-sugar" ,python-pytest-sugar)
8906 ("python-mock" ,python-mock)))
8907 (propagated-inputs
8908 `(("python-vine" ,python-vine)))
8909 (home-page "https://github.com/celery/py-amqp")
8910 (synopsis
8911 "Low-level AMQP client for Python (fork of amqplib)")
8912 (description
8913 "This is a fork of amqplib which was originally written by Barry Pederson.
8914It is maintained by the Celery project, and used by kombu as a pure python
8915alternative when librabbitmq is not available.")
8916 (license license:lgpl2.1+)
8917 (properties `((python2-variant . ,(delay python2-amqp))))))
8918
8919(define-public python2-amqp
8920 (let ((amqp (package-with-python2
8921 (strip-python2-variant python-amqp))))
8922 (package
8923 (inherit amqp)
8924 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8925 ;; unmaintained. Weirdly, does not do this on the python 3
8926 ;; version?
8927 #:tests? #f
8928 ,@(package-arguments amqp))))))
8929
8930(define-public python-txamqp
8931 (package
8932 (name "python-txamqp")
8933 (version "0.8.2")
8934 (source
8935 (origin
8936 (method url-fetch)
8937 (uri (pypi-uri "txAMQP" version))
8938 (sha256
8939 (base32
8940 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8941 (build-system python-build-system)
8942 (propagated-inputs
8943 `(("python-six" ,python-six)
8944 ("python-twisted" ,python-twisted)))
8945 (home-page "https://github.com/txamqp/txamqp")
8946 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8947 (description
8948 "This package provides a Python library for communicating with AMQP peers
8949and brokers using the asynchronous networking framework Twisted. It contains
8950all the necessary code to connect, send and receive messages to/from an
8951AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8952also includes support for using Thrift RPC over AMQP in Twisted
8953applications.")
8954 (license license:asl2.0)))
8955
8956(define-public python2-txamqp
8957 (package-with-python2 python-txamqp))
8958
8959(define-public python-kombu
8960 (package
8961 (name "python-kombu")
8962 (version "4.2.2")
8963 (source
8964 (origin
8965 (method url-fetch)
8966 (uri (pypi-uri "kombu" version))
8967 (sha256
8968 (base32
8969 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8970 (build-system python-build-system)
8971 (native-inputs
8972 `(("python-mock" ,python-mock)
8973 ("python-case" ,python-case)
8974 ("python-pyro4" ,python-pyro4)
8975 ("python-pytest-sugar" ,python-pytest-sugar)
8976 ("python-pytz" ,python-pytz)))
8977 (propagated-inputs
8978 `(("python-anyjson" ,python-anyjson)
8979 ("python-amqp" ,python-amqp)
8980 ("python-redis" ,python-redis)))
8981 (home-page "https://kombu.readthedocs.io")
8982 (synopsis "Message passing library for Python")
8983 (description "The aim of Kombu is to make messaging in Python as easy as
8984possible by providing an idiomatic high-level interface for the AMQ protocol,
8985and also provide proven and tested solutions to common messaging problems.
8986AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8987message orientation, queuing, routing, reliability and security, for which the
8988RabbitMQ messaging server is the most popular implementation.")
8989 (license license:bsd-3)
8990 (properties `((python2-variant . ,(delay python2-kombu))))))
8991
8992(define-public python2-kombu
8993 (let ((kombu (package-with-python2
8994 (strip-python2-variant python-kombu))))
8995 (package
8996 (inherit kombu)
8997 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8998 ;; It works fine on the python3 variant.
8999 #:tests? #f
9000 ,@(package-arguments kombu)))
9001 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9002 ,@(package-native-inputs kombu))))))
9003
9004(define-public python-billiard
9005 (package
9006 (name "python-billiard")
9007 (version "3.5.0.5")
9008 (source
9009 (origin
9010 (method url-fetch)
9011 (uri (pypi-uri "billiard" version))
9012 (sha256
9013 (base32
9014 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9015 (build-system python-build-system)
9016 (native-inputs
9017 `(("python-case" ,python-case)
9018 ("python-pytest" ,python-pytest)))
9019 (home-page "https://github.com/celery/billiard")
9020 (synopsis
9021 "Python multiprocessing fork with improvements and bugfixes")
9022 (description
9023 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9024multiprocessing package itself is a renamed and updated version of R Oudkerk's
9025pyprocessing package. This standalone variant is intended to be compatible with
9026Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9027 (license license:bsd-3)
9028 (properties `((python2-variant . ,(delay python2-billiard))))))
9029
9030(define-public python2-billiard
9031 (let ((billiard (package-with-python2
9032 (strip-python2-variant python-billiard))))
9033 (package
9034 (inherit billiard)
9035 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9036 ("python2-mock" ,python2-mock)
9037 ,@(package-native-inputs billiard))))))
9038
9039(define-public python-celery
9040 (package
9041 (name "python-celery")
9042 (version "4.2.1")
9043 (source
9044 (origin
9045 (method url-fetch)
9046 (uri (pypi-uri "celery" version))
9047 (sha256
9048 (base32
9049 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9050 (build-system python-build-system)
9051 (arguments
9052 '(;; TODO The tests fail with Python 3.7
9053 ;; https://github.com/celery/celery/issues/4849
9054 #:tests? #f
9055 #:phases
9056 (modify-phases %standard-phases
9057 (add-after 'unpack 'patch-requirements
9058 (lambda _
9059 (substitute* "requirements/test.txt"
9060 (("pytest>=3\\.0,<3\\.3")
9061 "pytest>=3.0"))
9062 #t)))))
9063 (native-inputs
9064 `(("python-case" ,python-case)
9065 ("python-pytest" ,python-pytest)))
9066 (propagated-inputs
9067 `(("python-pytz" ,python-pytz)
9068 ("python-billiard" ,python-billiard)
9069 ("python-kombu" ,python-kombu)))
9070 (home-page "https://celeryproject.org")
9071 (synopsis "Distributed Task Queue")
9072 (description "Celery is an asynchronous task queue/job queue based on
9073distributed message passing. It is focused on real-time operation, but
9074supports scheduling as well. The execution units, called tasks, are executed
9075concurrently on a single or more worker servers using multiprocessing,
9076Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9077synchronously (wait until ready).")
9078 (license license:bsd-3)
9079 (properties `((python2-variant . ,(delay python2-celery))))))
9080
9081(define-public python2-celery
9082 (let ((celery (package-with-python2
9083 (strip-python2-variant python-celery))))
9084 (package
9085 (inherit celery)
9086 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9087 ("python2-mock" ,python2-mock)
9088 ,@(package-native-inputs celery))))))
9089
9090(define-public python-translitcodec
9091 (package
9092 (name "python-translitcodec")
9093 (version "0.4.0")
9094 (source
9095 (origin
9096 (method url-fetch)
9097 (uri (pypi-uri "translitcodec" version))
9098 (sha256
9099 (base32
9100 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9101 (build-system python-build-system)
9102 (arguments
9103 `(#:tests? #f)) ; no tests provided
9104 (home-page
9105 "https://github.com/claudep/translitcodec")
9106 (synopsis
9107 "Unicode to 8-bit charset transliteration codec")
9108 (description
9109 "This package contains codecs for transliterating ISO 10646 texts into
9110best-effort representations using smaller coded character sets (ASCII,
9111ISO 8859, etc.).")
9112 (license license:expat)))
9113
9114(define-public python2-translitcodec
9115 (package-with-python2 python-translitcodec))
9116
9117(define-public python-editor
9118 (package
9119 (name "python-editor")
9120 (version "0.5")
9121 (source
9122 (origin
9123 (method url-fetch)
9124 (uri (pypi-uri "python-editor" version))
9125 (sha256
9126 (base32
9127 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9128 (build-system python-build-system)
9129 (home-page
9130 "https://github.com/fmoo/python-editor")
9131 (synopsis
9132 "Programmatically open an editor, capture the result")
9133 (description
9134 "python-editor is a library that provides the editor module for
9135programmatically interfacing with your system's $EDITOR.")
9136 (license license:asl2.0)))
9137
9138(define-public python2-editor
9139 (package-with-python2 python-editor))
9140
44d10b1f
RW
9141(define-public python-vobject
9142 (package
9143 (name "python-vobject")
9144 (version "0.9.5")
9145 (source (origin
9146 (method url-fetch)
9147 (uri (pypi-uri "vobject" version))
9148 (sha256
9149 (base32
9150 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9151 (build-system python-build-system)
9152 (arguments
9153 '(;; The test suite relies on some non-portable Windows interfaces.
9154 #:tests? #f))
9155 (propagated-inputs
9156 `(("python-dateutil" ,python-dateutil)
9157 ("python-pyicu" ,python-pyicu)))
9158 (synopsis "Parse and generate vCard and vCalendar files")
9159 (description "Vobject is intended to be a full featured Python package for
9160parsing and generating vCard and vCalendar files. Currently, iCalendar files
9161are supported and well tested. vCard 3.0 files are supported, and all data
9162should be imported, but only a few components are understood in a sophisticated
9163way.")
9164 (home-page "http://eventable.github.io/vobject/")
9165 (license license:asl2.0)))
9166
9167(define-public python2-vobject
9168 (package-with-python2 python-vobject))
9169
9170(define-public python-munkres
9171 (package
9172 (name "python-munkres")
9173 (version "1.0.8")
9174 (source (origin
9175 (method url-fetch)
9176 (uri (pypi-uri "munkres" version))
9177 (sha256
9178 (base32
9179 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9180 (build-system python-build-system)
9181 (arguments
9182 '(#:tests? #f)) ; no test suite
9183 (home-page "http://software.clapper.org/munkres/")
9184 (synopsis "Implementation of the Munkres algorithm")
9185 (description "The Munkres module provides an implementation of the Munkres
9186algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9187useful for solving the Assignment Problem.")
9188 (license license:bsd-3)))
9189
9190(define-public python2-munkres
9191 (package-with-python2 python-munkres))
9192
9193(define-public python-whoosh
9194 (package
9195 (name "python-whoosh")
9196 (version "2.7.4")
9197 (source
9198 (origin
9199 (method url-fetch)
9200 (uri (pypi-uri "Whoosh" version))
9201 (sha256
9202 (base32
9203 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9204 (build-system python-build-system)
9205 (native-inputs
9206 `(("python-pytest" ,python-pytest)))
9207 (home-page "https://bitbucket.org/mchaput/whoosh")
9208 (synopsis "Full text indexing, search, and spell checking library")
9209 (description
9210 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9211checking library.")
9212 (license license:bsd-2)))
9213
9214(define-public python2-whoosh
9215 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9216 (package (inherit whoosh)
9217 (propagated-inputs
9218 `(("python2-backport-ssl-match-hostname"
9219 ,python2-backport-ssl-match-hostname)
9220 ,@(package-propagated-inputs whoosh))))))
9221
9222(define-public python-pathlib
9223 (package
9224 (name "python-pathlib")
9225 (version "1.0.1")
9226 (source (origin
9227 (method url-fetch)
9228 (uri (pypi-uri "pathlib" version))
9229 (sha256
9230 (base32
9231 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9232 (build-system python-build-system)
9233 ;; The tests depend on the internal "test" module, which does not provide
9234 ;; a stable interface.
9235 (arguments `(#:tests? #f))
9236 (home-page "https://pathlib.readthedocs.org/")
9237 (synopsis "Object-oriented file system paths")
9238 (description "Pathlib offers a set of classes to handle file system paths.
9239It offers the following advantages over using string objects:
9240
9241@enumerate
9242@item No more cumbersome use of os and os.path functions. Everything can
9243be done easily through operators, attribute accesses, and method calls.
9244@item Embodies the semantics of different path types. For example,
9245comparing Windows paths ignores casing.
9246@item Well-defined semantics, eliminating any inconsistencies or
9247ambiguities (forward vs. backward slashes, etc.).
9248@end enumerate
9249
9250Note: In Python 3.4, pathlib is now part of the standard library. For other
9251Python versions please consider python-pathlib2 instead, which tracks the
9252standard library module. This module (python-pathlib) isn't maintained
9253anymore.")
9254 (license license:expat)))
9255
9256(define-public python2-pathlib
9257 (package-with-python2 python-pathlib))
9258
9259(define-public python2-pathlib2
9260 (package
9261 (name "python2-pathlib2")
9262 (version "2.3.2")
9263 (source (origin
9264 (method url-fetch)
9265 (uri (pypi-uri "pathlib2" version))
9266 (sha256
9267 (base32
9268 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
9269 (build-system python-build-system)
9270 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9271 ;; version is 3.4 which already includes this package as part of the
9272 ;; standard library.
9273 (arguments
9274 `(#:python ,python-2))
9275 (propagated-inputs
9276 `(("python2-scandir" ,python2-scandir)
9277 ("python2-six" ,python2-six)))
9278 (home-page "https://pypi.python.org/pypi/pathlib2/")
9279 (synopsis "Object-oriented file system paths - backport of standard
9280pathlib module")
9281 (description "The goal of pathlib2 is to provide a backport of standard
9282pathlib module which tracks the standard library module, so all the newest
9283features of the standard pathlib can be used also on older Python versions.
9284
9285Pathlib offers a set of classes to handle file system paths. It offers the
9286following advantages over using string objects:
9287
9288@enumerate
9289@item No more cumbersome use of os and os.path functions. Everything can
9290be done easily through operators, attribute accesses, and method calls.
9291@item Embodies the semantics of different path types. For example,
9292comparing Windows paths ignores casing.
9293@item Well-defined semantics, eliminating any inconsistencies or
9294ambiguities (forward vs. backward slashes, etc.).
9295@end enumerate")
9296 (license license:expat)))
9297
9298(define-public python2-pathlib2-bootstrap
9299 (hidden-package
9300 (package
9301 (inherit python2-pathlib2)
9302 (name "python2-pathlib2-bootstrap")
9303 (propagated-inputs
9304 `(("python2-scandir" ,python2-scandir)
9305 ("python2-six" ,python2-six-bootstrap))))))
9306
9307(define-public python-jellyfish
9308 (package
9309 (name "python-jellyfish")
9310 (version "0.5.6")
9311 (source (origin
9312 (method url-fetch)
9313 (uri (pypi-uri "jellyfish" version))
9314 (sha256
9315 (base32
9316 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9317 (build-system python-build-system)
9318 (native-inputs
9319 `(("python-pytest" ,python-pytest)))
9320 (home-page "https://github.com/jamesturk/jellyfish")
9321 (synopsis "Approximate and phonetic matching of strings")
9322 (description "Jellyfish uses a variety of string comparison and phonetic
9323encoding algorithms to do fuzzy string matching.")
9324 (license license:bsd-2)
9325 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9326
9327(define-public python2-jellyfish
9328 (let ((jellyfish (package-with-python2
9329 (strip-python2-variant python-jellyfish))))
9330 (package (inherit jellyfish)
9331 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9332 ,@(package-native-inputs jellyfish))))))
9333
9334(define-public python2-unicodecsv
9335 (package
9336 (name "python2-unicodecsv")
9337 (version "0.14.1")
9338 (source (origin
9339 (method url-fetch)
9340 ;; The test suite is not included in the PyPi release.
9341 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9342 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9343 "archive/" version ".tar.gz"))
9344 (file-name (string-append name "-" version ".tar.gz"))
9345 (sha256
9346 (base32
9347 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9348 (build-system python-build-system)
9349 (arguments
9350 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9351 #:python ,python-2))
9352 (native-inputs
9353 `(("python2-unittest2" ,python2-unittest2)))
9354 (home-page "https://github.com/jdunck/python-unicodecsv")
9355 (synopsis "Unicode CSV module for Python 2")
9356 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9357module, adding support for Unicode strings.")
9358 (license license:bsd-2)))
9359
9360(define-public python-rarfile
9361 (package
9362 (name "python-rarfile")
9363 (version "2.8")
9364 (source (origin
9365 (method url-fetch)
9366 (uri (pypi-uri "rarfile" version))
9367 (sha256
9368 (base32
9369 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9370 (build-system python-build-system)
9371 (arguments
9372 '(#:phases
9373 (modify-phases %standard-phases
9374 (replace 'check
9375 ;; Many tests fail, but the installation proceeds.
e59dd341 9376 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9377 (native-inputs
9378 `(("which" ,which))) ; required for tests
9379 (propagated-inputs
9380 `(("libarchive" ,libarchive)))
9381 (home-page "https://github.com/markokr/rarfile")
9382 (synopsis "RAR archive reader for Python")
9383 (description "This is Python module for RAR archive reading. The interface
9384is made as zipfile like as possible.")
9385 (license license:isc)))
9386
9387(define-public python2-rarfile
9388 (package-with-python2 python-rarfile))
9389
9390(define-public python-magic
9391 (package
9392 (name "python-magic")
9393 (version "0.4.15")
9394 (source
9395 (origin
9396 (method url-fetch)
9397 (uri (pypi-uri "python-magic" version))
9398 (sha256
9399 (base32
9400 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9401 (file-name (string-append name "-" version "-checkout"))))
9402 (build-system python-build-system)
9403 (arguments
9404 ;; The tests are unreliable, so don't run them. The tests fail
9405 ;; under Python3 because they were written for Python2 and
9406 ;; contain import statements that do not work in Python3. One of
9407 ;; the tests fails under Python2 because its assertions are
9408 ;; overly stringent; it relies on comparing output strings which
9409 ;; are brittle and can change depending on the version of
9410 ;; libmagic being used and the system on which the test is
9411 ;; running. In my case, under GuixSD 0.10.0, only one test
9412 ;; failed, and it seems to have failed only because the version
9413 ;; of libmagic that is packaged in Guix outputs a slightly
9414 ;; different (but not wrong) string than the one that the test
9415 ;; expected.
9416 '(#:tests? #f
9417 #:phases (modify-phases %standard-phases
9418 ;; Replace a specific method call with a hard-coded
9419 ;; path to the necessary libmagic.so file in the
9420 ;; store. If we don't do this, then the method call
9421 ;; will fail to find the libmagic.so file, which in
9422 ;; turn will cause any application using
9423 ;; python-magic to fail.
9424 (add-before 'build 'hard-code-path-to-libmagic
9425 (lambda* (#:key inputs #:allow-other-keys)
9426 (let ((file (assoc-ref inputs "file")))
9427 (substitute* "magic.py"
9428 (("ctypes.util.find_library\\('magic'\\)")
9429 (string-append "'" file "/lib/libmagic.so'")))
9430 #t)))
9431 (add-before 'install 'disable-egg-compression
9432 (lambda _
9433 (let ((port (open-file "setup.cfg" "a")))
9434 (display "\n[easy_install]\nzip_ok = 0\n"
9435 port)
9436 (close-port port)
9437 #t))))))
9438 (inputs
9439 ;; python-magic needs to be able to find libmagic.so.
9440 `(("file" ,file)))
9441 (home-page
9442 "https://github.com/ahupp/python-magic")
9443 (synopsis
9444 "File type identification using libmagic")
9445 (description
9446 "This module uses ctypes to access the libmagic file type
9447identification library. It makes use of the local magic database and
9448supports both textual and MIME-type output. Note that this module and
9449the python-file module both provide a \"magic.py\" file; these two
9450modules, which are different and were developed separately, both serve
9451the same purpose: to provide Python bindings for libmagic.")
9452 (license license:expat)))
9453
9454(define-public python2-magic
9455 (package-with-python2 python-magic))
9456
9457(define-public python2-s3cmd
9458 (package
9459 (name "python2-s3cmd")
9460 (version "1.6.1")
9461 (source
9462 (origin
9463 (method url-fetch)
9464 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9465 "s3cmd-" version ".tar.gz"))
9466 (sha256
9467 (base32
9468 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9469 (build-system python-build-system)
9470 (arguments
9471 ;; s3cmd is written for python2 only and contains no tests.
9472 `(#:python ,python-2
9473 #:tests? #f))
9474 (propagated-inputs
9475 `(("python2-dateutil" ,python2-dateutil)
9476 ;; The python-file package also provides a magic.py module.
9477 ;; This is an unfortunate state of affairs; however, s3cmd
9478 ;; fails to install if it cannot find specifically the
9479 ;; python-magic package. Thus we include it, instead of using
9480 ;; python-file. Ironically, s3cmd sometimes works better
9481 ;; without libmagic bindings at all:
9482 ;; https://github.com/s3tools/s3cmd/issues/198
9483 ("python2-magic" ,python2-magic)))
9484 (home-page "http://s3tools.org/s3cmd")
9485 (synopsis "Command line tool for S3-compatible storage services")
9486 (description
9487 "S3cmd is a command line tool for uploading, retrieving and managing data
9488in storage services that are compatible with the Amazon Simple Storage
9489Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9490GnuPG encryption, and more. It also supports management of Amazon's
9491CloudFront content delivery network.")
9492 (license license:gpl2+)))
9493
9494(define-public python-pkgconfig
9495 (package
9496 (name "python-pkgconfig")
9497 (version "1.3.1")
9498 (source
9499 (origin
9500 (method url-fetch)
9501 (uri (pypi-uri "pkgconfig" version))
9502 (sha256
9503 (base32
9504 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9505 (build-system python-build-system)
9506 (native-inputs
9507 `(("python-nose" ,python-nose)))
9508 (inputs
9509 `(("pkg-config" ,pkg-config)))
9510 (arguments
9511 `(#:phases
9512 (modify-phases %standard-phases
9513 (add-before 'build 'patch
9514 ;; Hard-code the path to pkg-config.
9515 (lambda _
9516 (substitute* "pkgconfig/pkgconfig.py"
9517 (("cmd = 'pkg-config")
9518 (string-append "cmd = '" (which "pkg-config"))))
9519 #t))
9520 (replace 'check
9521 (lambda _
9522 (invoke "nosetests" "test.py"))))))
9523 (home-page "https://github.com/matze/pkgconfig")
9524 (synopsis "Python interface for pkg-config")
9525 (description "This module provides a Python interface to pkg-config. It
9526can be used to find all pkg-config packages, check if a package exists,
9527check if a package meets certain version requirements, query CFLAGS and
9528LDFLAGS and parse the output to build extensions with setup.py.")
9529 (license license:expat)))
9530
9531(define-public python2-pkgconfig
9532 (package-with-python2 python-pkgconfig))
9533
9534(define-public python-bz2file
9535 (package
9536 (name "python-bz2file")
9537 (version "0.98")
9538 (source
9539 (origin
9540 (method url-fetch)
9541 (uri (pypi-uri "bz2file" version))
9542 (sha256
9543 (base32
9544 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9545 (build-system python-build-system)
9546 (arguments
9547 `(#:tests? #f)) ; Tests use deprecated python modules.
9548 (home-page "https://github.com/nvawda/bz2file")
9549 (synopsis "Read and write bzip2-compressed files")
9550 (description
9551 "Bz2file is a Python library for reading and writing bzip2-compressed
9552files. It contains a drop-in replacement for the I/O interface in the
9553standard library's @code{bz2} module, including features from the latest
9554development version of CPython that are not available in older releases.")
9555 (license license:asl2.0)))
9556
9557(define-public python2-bz2file
9558 (package-with-python2 python-bz2file))
9559
9560(define-public python-future
9561 (package
9562 (name "python-future")
d5d54030 9563 (version "0.17.1")
44d10b1f
RW
9564 (source
9565 (origin
9566 (method url-fetch)
9567 (uri (pypi-uri "future" version))
9568 (sha256
9569 (base32
d5d54030 9570 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9571 (build-system python-build-system)
9572 ;; Many tests connect to the network or are otherwise flawed.
9573 ;; https://github.com/PythonCharmers/python-future/issues/210
9574 (arguments
9575 `(#:tests? #f))
9576 (home-page "http://python-future.org")
9577 (synopsis "Single-source support for Python 3 and 2")
9578 (description
9579 "@code{python-future} is the missing compatibility layer between Python 2 and
9580Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9581to support both Python 2 and Python 3 with minimal overhead.")
9582 (license license:expat)))
9583
9584(define-public python2-future
9585 (package-with-python2 python-future))
9586
9587(define-public python-cysignals
9588 (package
9589 (name "python-cysignals")
8e3e51df 9590 (version "1.9.0")
44d10b1f
RW
9591 (source
9592 (origin
9593 (method url-fetch)
8e3e51df 9594 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9595 (sha256
9596 (base32
8e3e51df 9597 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9598 (build-system python-build-system)
9599 (native-inputs
9600 `(("python-cython" ,python-cython)
9601 ("python-sphinx" ,python-sphinx)))
9602 (inputs
9603 `(("pari-gp" ,pari-gp)))
9604 (arguments
9605 `(#:modules ((guix build python-build-system)
9606 ((guix build gnu-build-system) #:prefix gnu:)
9607 (guix build utils))
9608 ;; FIXME: Tests are executed after installation and currently fail
9609 ;; when not installing into standard locations; the author is working
9610 ;; on a fix.
9611 #:tests? #f
9612 #:phases
9613 (modify-phases %standard-phases
9614 (add-before
9615 'build 'configure
9616 (assoc-ref gnu:%standard-phases 'configure)))))
9617 (home-page
9618 "https://github.com/sagemath/cysignals")
9619 (synopsis
9620 "Handling of interrupts and signals for Cython")
9621 (description
9622 "The cysignals package provides mechanisms to handle interrupts (and
9623other signals and errors) in Cython code, using two related approaches,
9624for mixed Cython/Python code or external C libraries and pure Cython code,
9625respectively.")
9626 (license license:lgpl3+)))
9627
9628(define-public python2-cysignals
9629 (package-with-python2 python-cysignals))
9630
9631(define-public python2-shedskin
9632 (package
9633 (name "python2-shedskin")
9634 (version "0.9.4")
9635 (source
9636 (origin
9637 (method url-fetch)
9638 (uri (string-append "https://github.com/shedskin/shedskin/"
9639 "releases/download/v" version
9640 "/shedskin-" version ".tgz"))
9641 (sha256
9642 (base32
9643 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9644 (build-system python-build-system)
9645 (arguments
9646 `(#:python ,python-2
9647 #:phases (modify-phases %standard-phases
9648 (add-after 'unpack 'fix-resulting-include-libs
9649 (lambda* (#:key inputs #:allow-other-keys)
9650 (let ((libgc (assoc-ref inputs "libgc"))
9651 (pcre (assoc-ref inputs "pcre")))
9652 (substitute* "shedskin/makefile.py"
9653 (("variable == 'CCFLAGS':[ ]*")
9654 (string-append "variable == 'CCFLAGS':\n"
9655 " line += ' -I " pcre "/include"
9656 " -I " libgc "/include'"))
9657 (("variable == 'LFLAGS':[ ]*")
9658 (string-append "variable == 'LFLAGS':\n"
9659 " line += ' -L" pcre "/lib"
9660 " -L " libgc "/lib'")))
9661 #t))))))
9662 (inputs `(("pcre" ,pcre)
9663 ("libgc" ,libgc)))
9664 (home-page "https://shedskin.github.io/")
9665 (synopsis "Experimental Python-2 to C++ Compiler")
9666 (description (string-append "This is an experimental compiler for a subset of
9667Python. It generates C++ code and a Makefile."))
9668 (license (list license:gpl3 license:bsd-3 license:expat))))
9669
9670(define-public python2-rope
9671 (package
9672 (name "python2-rope")
a9ba0a31 9673 (version "0.11.0")
44d10b1f
RW
9674 (source
9675 (origin
9676 (method url-fetch)
9677 (uri (pypi-uri "rope" version))
9678 (sha256
9679 (base32
a9ba0a31 9680 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9681 (arguments
afb29715 9682 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9683 `(#:python ,python-2))
9684 (build-system python-build-system)
9685 (native-inputs
9686 `(("python2-unittest2" ,python2-unittest2)))
9687 (home-page "https://github.com/python-rope/rope")
9688 (synopsis "Refactoring library for Python")
9689 (description "Rope is a refactoring library for Python. It facilitates
9690the renaming, moving and extracting of attributes, functions, modules, fields
9691and parameters in Python 2 source code. These refactorings can also be applied
9692to occurrences in strings and comments.")
9693 (license license:gpl2)))
9694
2c880ef4
LC
9695(define-public python-rope
9696 (package
9697 (inherit python2-rope)
9698 (name "python-rope")
9699 (arguments `(#:python ,python-wrapper
9700 ;; XXX: Only partial python3 support, results in some failing
9701 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9702 #:tests? #f))
9703 (properties `((python2-variant . ,(delay python2-rope))))))
9704
44d10b1f
RW
9705(define-public python-py3status
9706 (package
9707 (name "python-py3status")
77f3d303 9708 (version "3.16")
44d10b1f
RW
9709 (source
9710 (origin
9711 (method url-fetch)
9712 (uri (pypi-uri "py3status" version))
9713 (sha256
9714 (base32
77f3d303 9715 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
44d10b1f
RW
9716 (build-system python-build-system)
9717 (inputs
9718 `(("file" ,file)))
9719 (arguments
9720 '(#:phases
9721 (modify-phases %standard-phases
9722 ;; 'file' is used for detection of configuration file encoding
9723 ;; let's make link the dependency to particular input
9724 (add-before 'build 'patch-file-path
9725 (lambda* (#:key inputs #:allow-other-keys)
9726 (let ((file-path (assoc-ref inputs "file")))
9727 (substitute* "py3status/parse_config.py"
9728 (("\\['file', '-b'")
9729 (string-append "['" file-path "/bin/file', '-b'")))
9730 #t))))
9731 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9732 (home-page "https://github.com/ultrabug/py3status")
9733 (synopsis "Extensible i3status wrapper written in Python")
9734 (description "py3status is an i3status wrapper which extends i3status
9735functionality in a modular way, allowing you to extend your panel with your
9736own code, responding to click events and updating clock every second.")
9737 (license license:bsd-3)))
9738
9739(define-public python-tblib
9740 (package
9741 (name "python-tblib")
9742 (version "1.3.2")
9743 (source (origin
9744 (method url-fetch)
9745 (uri (pypi-uri "tblib" version))
9746 (sha256 (base32
9747 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9748 (build-system python-build-system)
9749 (arguments
9750 `(#:phases
9751 (modify-phases %standard-phases
9752 (add-before 'check 'adjust-tests
9753 (lambda _
9754 (when (which "python3")
9755 ;; Adjust the example output to match that of Python 3.7:
9756 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9757 (substitute* "README.rst"
9758 (("Exception\\('fail',") "Exception('fail'"))
9759 #t)))
9760 (replace 'check
9761 (lambda _
9762 ;; Upstream runs tests after installation and the package itself
9763 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9764 ;; found.
9765 (setenv "PYTHONPATH"
9766 (string-append (getcwd) "/build/lib:"
9767 (getenv "PYTHONPATH")))
9768 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9769 (native-inputs
9770 `(("python-pytest" ,python-pytest)
9771 ("python-six" ,python-six)))
9772 (home-page "https://github.com/ionelmc/python-tblib")
9773 (synopsis "Traceback serialization library")
9774 (description
9775 "Traceback serialization allows you to:
9776
9777@enumerate
9778@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9779different processes. This allows better error handling when running code over
9780multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9781
9782@item Parse traceback strings and raise with the parsed tracebacks.
9783@end enumerate\n")
9784 (license license:bsd-3)))
9785
9786(define-public python2-tblib
9787 (package-with-python2 python-tblib))
9788
9789(define-public python-greenlet
9790 (package
9791 (name "python-greenlet")
9792 (version "0.4.15")
9793 (source (origin
9794 (method url-fetch)
9795 (uri (pypi-uri "greenlet" version))
9796 (sha256
9797 (base32
9798 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9799 (build-system python-build-system)
9800 (home-page "https://greenlet.readthedocs.io/")
9801 (synopsis "Lightweight in-process concurrent programming")
9802 (description
9803 "Greenlet package is a spin-off of Stackless, a version of CPython
9804that supports micro-threads called \"tasklets\". Tasklets run
9805pseudo-concurrently (typically in a single or a few OS-level threads) and
9806are synchronized with data exchanges on \"channels\".")
9807 (license (list license:psfl license:expat))))
9808
9809(define-public python2-greenlet
9810 (package-with-python2 python-greenlet))
9811
9812(define-public python-objgraph
9813 (package
9814 (name "python-objgraph")
9815 (version "3.4.0")
9816 (source
9817 (origin
9818 (method url-fetch)
9819 (uri (pypi-uri "objgraph" version))
9820 (sha256
9821 (base32
9822 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9823 (build-system python-build-system)
9824 (propagated-inputs
9825 `(("python-graphviz" ,python-graphviz)))
9826 (native-inputs
9827 `(("python-mock" ,python-mock)
9828 ("graphviz" ,graphviz)))
9829 (home-page "https://mg.pov.lt/objgraph/")
9830 (synopsis "Draw Python object reference graphs with graphviz")
9831 (description
9832 "This package provides tools to draw Python object reference graphs with
9833graphviz.")
9834 (license license:expat)))
9835
9836(define-public python-gevent
9837 (package
9838 (name "python-gevent")
9839 (version "1.3.7")
9840 (source (origin
9841 (method url-fetch)
9842 (uri (pypi-uri "gevent" version))
9843 (sha256
9844 (base32
9845 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9846 (modules '((guix build utils)))
9847 (snippet
9848 '(begin
9849 ;; unbunding libev and c-ares
9850 (delete-file-recursively "deps")
9851 #t))))
9852 (build-system python-build-system)
9853 (arguments
9854 `(#:modules ((ice-9 ftw)
9855 (ice-9 match)
9856 (srfi srfi-26)
9857 (guix build utils)
9858 (guix build python-build-system))
9859 #:phases (modify-phases %standard-phases
9860 (add-after 'unpack 'unpack-libev
9861 (lambda* (#:key inputs #:allow-other-keys)
9862 (mkdir-p "deps/libev")
9863 ;; FIXME: gevent requires building libev, even though
9864 ;; it only links against the proper one.
9865 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9866 "--strip-components=1" "-C" "deps/libev")))
9867 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9868 (lambda _
9869 (substitute* "src/gevent/subprocess.py"
9870 (("/bin/sh") (which "sh")))
9871 (for-each (lambda (file)
9872 (substitute* file
9873 (("/bin/sh") (which "sh"))
9874 (("/bin/true") (which "true"))))
9875 (find-files "src/greentest" "\\.py$"))
9876 #t))
9877 (add-before 'build 'do-not-use-bundled-sources
9878 (lambda* (#:key inputs #:allow-other-keys)
9879 (setenv "CONFIG_SHELL" (which "bash"))
9880 (setenv "LIBEV_EMBED" "false")
9881 (setenv "CARES_EMBED" "false")
9882 (setenv "EMBED" "false")
9883
9884 (let ((greenlet (string-append
9885 (assoc-ref inputs "python-greenlet")
9886 "/include")))
9887 (match (scandir greenlet
9888 (lambda (item)
9889 (string-prefix? "python" item)))
9890 ((python)
9891 (setenv "CPATH"
9892 (string-append greenlet "/" python)))))
9893 #t))
9894 (add-before 'check 'skip-timer-test
9895 (lambda _
9896 ;; XXX: Skip 'TestTimerResolution', which appears to be
9897 ;; unreliable.
9898 (substitute* "src/greentest/test__core_timer.py"
9899 (("not greentest.RUNNING_ON_CI") "False"))
9900 #t))
9901 (replace 'check
9902 (lambda _
9903 ;; Make sure the build directory is on PYTHONPATH.
9904 (setenv "PYTHONPATH"
9905 (string-append
9906 (getenv "PYTHONPATH") ":"
9907 (getcwd) "/build/"
9908 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9909 (with-directory-excursion "src/greentest"
9910 ;; XXX: Many tests require network access. Instead we only
9911 ;; run known-good tests. Unfortunately we cannot use
9912 ;; recursion here since this directory also contains
9913 ;; Python-version-specific subfolders.
9914 (apply invoke "python" "testrunner.py" "--config"
9915 "known_failures.py"
9916 (scandir "." (cut regexp-exec
9917 (make-regexp "test_+(subprocess|core)")
9918 <>)))))))))
9919 (propagated-inputs
9920 `(("python-greenlet" ,python-greenlet)
9921 ("python-objgraph" ,python-objgraph)))
9922 (native-inputs
9923 `(("libev-source" ,(package-source libev))
9924 ("python-six" ,python-six)))
9925 (inputs
9926 `(("c-ares" ,c-ares)
9927 ("libev" ,libev)))
9928 (home-page "http://www.gevent.org/")
9929 (synopsis "Coroutine-based network library")
9930 (description
9931 "gevent is a coroutine-based Python networking library that uses greenlet
9932to provide a high-level synchronous API on top of the libev event loop.")
9933 (license license:expat)
9934 (properties `((python2-variant . ,(delay python2-gevent))))))
9935
9936(define-public python2-gevent
9937 (let ((base (package-with-python2
9938 (strip-python2-variant python-gevent))))
9939 (package
9940 (inherit base)
9941 (native-inputs `(,@(package-native-inputs python-gevent)
9942 ("python-mock" ,python2-mock))))))
9943
9944(define-public python-fastimport
9945 (package
9946 (name "python-fastimport")
9947 (version "0.9.6")
9948 (source
9949 (origin
9950 (method url-fetch)
9951 (uri (pypi-uri "fastimport" version))
9952 (sha256
9953 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9954 (build-system python-build-system)
9955 (home-page "https://github.com/jelmer/python-fastimport")
9956 (synopsis "VCS fastimport parser and generator in Python")
9957 (description "This package provides a parser for and generator of the Git
9958@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9959format.")
9960 (license license:gpl2+)))
9961
9962(define-public python2-fastimport
9963 (package-with-python2 python-fastimport))
9964
9965(define-public python-twisted
9966 (package
9967 (name "python-twisted")
0107c9b8 9968 (version "19.2.1")
44d10b1f
RW
9969 (source (origin
9970 (method url-fetch)
9971 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9972 (sha256
9973 (base32
0107c9b8 9974 "0liymyd4pzphizjlpwkncxjpm9akyr3lkfkm77yfg6wasv108b7s"))))
44d10b1f
RW
9975 (build-system python-build-system)
9976 (arguments
0107c9b8 9977 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
9978 (propagated-inputs
9979 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 9980 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 9981 ("python-incremental" ,python-incremental)
e5ba2fe3 9982 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9983 ("python-constantly" ,python-constantly)
9984 ("python-automat" ,python-automat)))
9985 (home-page "https://twistedmatrix.com/")
9986 (synopsis "Asynchronous networking framework written in Python")
9987 (description
9988 "Twisted is an extensible framework for Python programming, with special
9989focus on event-based network programming and multiprotocol integration.")
9990 (license license:expat)))
9991
9992(define-public python2-twisted
9993 (package-with-python2 python-twisted))
9994
9995(define-public python-pika
9996 (package
9997 (name "python-pika")
9998 (version "0.12.0")
9999 (source
10000 (origin
10001 (method url-fetch)
10002 (uri (pypi-uri "pika" version))
10003 (sha256
10004 (base32
10005 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10006 (build-system python-build-system)
10007 (native-inputs
10008 `(("python-pyev" ,python-pyev)
10009 ("python-tornado" ,python-tornado)
10010 ("python-twisted" ,python-twisted)))
10011 (home-page "https://pika.readthedocs.org")
10012 (synopsis "Pure Python AMQP Client Library")
10013 (description
10014 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10015Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10016network support library.")
10017 (license license:bsd-3)))
10018
10019(define-public python2-pika
10020 (package-with-python2 python-pika))
10021
10022(define-public python-ply
10023 (package
10024 (name "python-ply")
10025 (version "3.10")
10026 (source
10027 (origin
10028 (method url-fetch)
10029 (uri (pypi-uri "ply" version))
10030 (sha256
10031 (base32
10032 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10033 (build-system python-build-system)
10034 (home-page "http://www.dabeaz.com/ply/")
10035 (synopsis "Python Lex & Yacc")
10036 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10037It uses LR parsing and does extensive error checking.")
10038 (license license:bsd-3)))
10039
10040(define-public python2-ply
10041 (package-with-python2 python-ply))
10042
10043(define-public python-tabulate
10044 (package
10045 (name "python-tabulate")
10046 (version "0.7.7")
10047 (source (origin
10048 (method url-fetch)
10049 (uri (pypi-uri "tabulate" version))
10050 (sha256
10051 (base32
10052 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10053 (build-system python-build-system)
10054 (arguments
10055 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10056 ;; and the latest release is not tagged in the upstream repository.
10057 '(#:tests? #f))
10058 (home-page "https://bitbucket.org/astanin/python-tabulate")
10059 (synopsis "Pretty-print tabular data")
10060 (description
10061 "Tabulate is a library and command-line utility to pretty-print tabular
10062data in Python.")
10063 (license license:expat)))
10064
10065(define-public python2-tabulate
10066 (package-with-python2 python-tabulate))
10067
10068(define-public python-kazoo
10069 (package
10070 (name "python-kazoo")
10071 (version "2.4.0")
10072 (source
10073 (origin
10074 (method url-fetch)
10075 (uri (pypi-uri "kazoo" version))
10076 (sha256
10077 (base32
10078 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10079 (build-system python-build-system)
10080 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10081 (propagated-inputs
10082 `(("python-six" ,python-six)))
10083 (home-page "https://kazoo.readthedocs.org")
10084 (synopsis "High-level Zookeeper client library")
10085 (description
10086 "Kazoo is a Python client library for the Apache Zookeeper distributed
10087application service. It is designed to be easy to use and to avoid common
10088programming errors.")
10089 (license license:asl2.0)))
10090
10091(define-public python2-kazoo
10092 (package-with-python2 python-kazoo))
10093
10094(define-public python-pykafka
10095 (package
10096 (name "python-pykafka")
10097 (version "2.4.0")
10098 (source (origin
10099 (method url-fetch)
0ca1d040 10100 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10101 (sha256
10102 (base32
10103 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10104 (build-system python-build-system)
10105 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10106 (propagated-inputs
10107 `(("python-gevent" ,python-gevent)
10108 ("python-kazoo" ,python-kazoo)
10109 ("python-tabulate" ,python-tabulate)))
10110 (inputs
10111 `(("librdkafka" ,librdkafka)))
10112 (home-page "https://pykafka.readthedocs.io/")
10113 (synopsis "Apache Kafka client for Python")
10114 (description
10115 "PyKafka is a client for the Apache Kafka distributed messaging system.
10116It includes Python implementations of Kafka producers and consumers, which
10117are optionally backed by a C extension built on librdkafka.")
10118 (license license:asl2.0)))
10119
10120(define-public python2-pykafka
10121 (package-with-python2 python-pykafka))
10122
10123(define-public python-wcwidth
10124 (package
10125 (name "python-wcwidth")
10126 (version "0.1.7")
10127 (source
10128 (origin
10129 (method url-fetch)
10130 (uri (pypi-uri "wcwidth" version))
10131 (sha256
10132 (base32
10133 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10134 (build-system python-build-system)
10135 (home-page "https://github.com/jquast/wcwidth")
10136 (synopsis "Measure number of terminal column cells of wide-character codes")
10137 (description "Wcwidth measures the number of terminal column cells of
10138wide-character codes. It is useful for those implementing a terminal emulator,
10139or programs that carefully produce output to be interpreted by one. It is a
10140Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10141specified in POSIX.1-2001 and POSIX.1-2008.")
10142 (license license:expat)))
10143
10144(define-public python2-wcwidth
10145 (package-with-python2 python-wcwidth))
10146
10147(define-public python2-jsonrpclib
10148 (package
10149 (name "python2-jsonrpclib")
10150 (version "0.1.7")
10151 (source (origin
10152 (method url-fetch)
6571bba0 10153 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10154 (sha256
10155 (base32
10156 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10157 (build-system python-build-system)
10158 (arguments
10159 `(#:tests? #f
10160 #:python ,python-2))
10161 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10162 (synopsis "Implementation of JSON-RPC specification for Python")
10163 (description
10164 "This library is an implementation of the JSON-RPC specification.
10165It supports both the original 1.0 specification, as well as the
10166new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10167etc.")
10168 (license license:asl2.0)))
10169
10170(define-public python-chai
10171 (package
10172 (name "python-chai")
10173 (version "1.1.2")
10174 (source (origin
10175 (method url-fetch)
10176 (uri (pypi-uri "chai" version))
10177 (sha256
10178 (base32
10179 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10180 (build-system python-build-system)
10181 (home-page "https://github.com/agoragames/chai")
10182 (synopsis "Mocking framework for Python")
10183 (description
10184 "Chai provides an api for mocking, stubbing and spying your python
10185objects, patterned after the Mocha library for Ruby.")
10186 (license license:bsd-3)))
10187
10188(define-public python2-chai
10189 (package-with-python2 python-chai))
10190
10191(define-public python-inflection
10192 (package
10193 (name "python-inflection")
10194 (version "0.3.1")
10195 (source
10196 (origin (method url-fetch)
10197 (uri (pypi-uri "inflection" version))
10198 (sha256
10199 (base32
10200 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10201 (build-system python-build-system)
10202 (native-inputs
10203 `(("python-pytest" ,python-pytest)))
10204 (home-page "https://github.com/jpvanhal/inflection")
10205 (synopsis "Python string transformation library")
10206 (description
10207 "Inflection is a string transformation library. It singularizes
10208and pluralizes English words, and transforms strings from CamelCase to
10209underscored string.")
10210 (license license:expat)))
10211
10212(define-public python2-inflection
10213 (package-with-python2 python-inflection))
10214
10215(define-public python-pylev
10216 (package
10217 (name "python-pylev")
10218 (version "1.3.0")
10219 (source (origin
10220 (method url-fetch)
10221 (uri (pypi-uri "pylev" version))
10222 (sha256
10223 (base32
10224 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10225 (build-system python-build-system)
10226 (home-page "https://github.com/toastdriven/pylev")
10227 (synopsis "Levenshtein distance implementation in Python")
10228 (description "Pure Python Levenshtein implementation, based off the
10229Wikipedia code samples at
10230@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10231 (license license:bsd-3)))
10232
10233(define-public python2-pylev
10234 (package-with-python2 python-pylev))
10235
10236(define-public python-cleo
10237 (package
10238 (name "python-cleo")
10239 (version "0.6.1")
10240 (source (origin
10241 (method url-fetch)
10242 (uri (pypi-uri "cleo" version))
10243 (sha256
10244 (base32
10245 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10246 (build-system python-build-system)
10247 (native-inputs
10248 `(;; For testing
10249 ("python-mock" ,python-mock)
10250 ("python-pytest-mock" ,python-pytest-mock)
10251 ("python-pytest" ,python-pytest)))
10252 (propagated-inputs
10253 `(("python-backpack" ,python-backpack)
10254 ("python-pastel" ,python-pastel)
10255 ("python-pylev" ,python-pylev)))
10256 (home-page "https://github.com/sdispater/cleo")
10257 (synopsis "Command-line arguments library for Python")
10258 (description
10259 "Cleo allows you to create command-line commands with signature in
10260docstring and colored output.")
10261 (license license:expat)))
10262
10263(define-public python2-cleo
10264 (package-with-python2 python-cleo))
10265
10266(define-public python-lazy-object-proxy
10267 (package
10268 (name "python-lazy-object-proxy")
10269 (version "1.3.1")
10270 (source (origin
10271 (method url-fetch)
10272 (uri (pypi-uri "lazy-object-proxy" version))
10273 (sha256
10274 (base32
10275 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10276 (build-system python-build-system)
10277 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10278 (synopsis "Lazy object proxy for python")
10279 (description
10280 "Lazy object proxy is an object that wraps a callable but defers the call
10281until the object is actually required, and caches the result of said call.")
10282 (license license:bsd-2)))
10283
10284(define-public python2-lazy-object-proxy
10285 (package-with-python2 python-lazy-object-proxy))
10286
10287(define-public python-dnspython
10288 (package
10289 (name "python-dnspython")
10290 (version "1.15.0")
10291 (source (origin
10292 (method url-fetch)
10293 (uri (string-append "http://www.dnspython.org/kits/"
10294 version "/dnspython-" version ".tar.gz"))
10295 (sha256
10296 (base32
10297 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10298 (build-system python-build-system)
10299 (arguments '(#:tests? #f)) ; XXX: requires internet access
10300 (home-page "http://www.dnspython.org")
10301 (synopsis "DNS toolkit for Python")
10302 (description
10303 "dnspython is a DNS toolkit for Python. It supports almost all record
10304types. It can be used for queries, zone transfers, and dynamic updates.
10305It supports TSIG authenticated messages and EDNS0.")
10306 (license license:expat)))
10307
10308(define-public python2-dnspython
10309 (package-with-python2 python-dnspython))
10310
10311(define-public python-email-validator
10312 (package
10313 (name "python-email-validator")
10314 (version "1.0.2")
10315 (source
10316 (origin (method url-fetch)
10317 (uri (pypi-uri "email_validator" version))
10318 (sha256
10319 (base32
10320 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10321 (build-system python-build-system)
10322 (arguments
10323 '(#:phases
10324 (modify-phases %standard-phases
10325 (add-before 'build 'use-dnspython
10326 (lambda _
10327 (substitute* "setup.py"
10328 (("dnspython3") "dnspython"))
10329 #t)))))
10330 (propagated-inputs
10331 `(("python-dnspython" ,python-dnspython)
10332 ("python-idna" ,python-idna)))
10333 (home-page "https://github.com/JoshData/python-email-validator")
10334 (synopsis "Email address validation library for Python")
10335 (description
10336 "This library validates email address syntax and deliverability.")
10337 (license license:cc0)))
10338
10339(define-public python2-email-validator
10340 (package-with-python2 python-email-validator))
10341
10342(define-public python-ukpostcodeparser
10343 (package
10344 (name "python-ukpostcodeparser")
10345 (version "1.0.3")
10346 (source (origin
10347 (method url-fetch)
10348 (uri (pypi-uri "UkPostcodeParser" version))
10349 (sha256
10350 (base32
10351 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10352 (build-system python-build-system)
10353 (home-page "https://github.com/hamstah/ukpostcodeparser")
10354 (synopsis "UK Postcode parser for Python")
10355 (description
10356 "This library provides the @code{parse_uk_postcode} function for
10357parsing UK postcodes.")
10358 (license license:expat)))
10359
10360(define-public python2-ukpostcodeparser
10361 (package-with-python2 python-ukpostcodeparser))
10362
10363(define-public python-faker
10364 (package
10365 (name "python-faker")
10366 (version "0.7.9")
10367 (source (origin
10368 (method url-fetch)
10369 (uri (pypi-uri "Faker" version))
10370 (sha256
10371 (base32
10372 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10373 (patches
10374 (search-patches "python-faker-fix-build-32bit.patch"))
10375 (modules '((guix build utils)))
10376 (snippet
10377 '(begin
10378 (for-each delete-file (find-files "." "\\.pyc$"))
10379 #t))))
10380 (build-system python-build-system)
10381 (arguments
10382 '(#:phases
10383 (modify-phases %standard-phases
10384 (replace 'check
49ff8827 10385 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10386 (native-inputs
10387 `(;; For testing
10388 ("python-email-validator" ,python-email-validator)
10389 ("python-mock" ,python-mock)
10390 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10391 (propagated-inputs
10392 `(("python-dateutil" ,python-dateutil)
10393 ("python-six" ,python-six)))
10394 (home-page "https://github.com/joke2k/faker")
10395 (synopsis "Python package that generates fake data")
10396 (description
10397 "Faker is a Python package that generates fake data such as names,
10398addresses, and phone numbers.")
10399 (license license:expat)
10400 (properties `((python2-variant . ,(delay python2-faker))))))
10401
10402(define-public python2-faker
10403 (let ((base (package-with-python2 (strip-python2-variant
10404 python-faker))))
10405 (package
10406 (inherit base)
10407 (propagated-inputs
10408 `(("python2-ipaddress" ,python2-ipaddress)
10409 ,@(package-propagated-inputs base))))))
10410
10411(define-public python-pyaml
10412 (package
10413 (name "python-pyaml")
10414 (version "18.11.0")
10415 (source (origin
10416 (method url-fetch)
10417 (uri (pypi-uri "pyaml" version))
10418 (sha256
10419 (base32
10420 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10421 (build-system python-build-system)
10422 (native-inputs
10423 `(("python-unidecode" ,python-unidecode)))
10424 (propagated-inputs
10425 `(("python-pyyaml" ,python-pyyaml)))
10426 (home-page "https://github.com/mk-fg/pretty-yaml")
10427 (synopsis "YAML pretty-print library for Python")
10428 (description
10429 "pyaml is a PyYAML based python module to produce pretty and readable
10430YAML-serialized data.")
492e3a7a 10431 (license license:wtfpl2)))
44d10b1f
RW
10432
10433(define-public python2-pyaml
10434 (package-with-python2 python-pyaml))
10435
10436(define-public python-backpack
10437 (package
10438 (name "python-backpack")
10439 (version "0.1")
10440 (source
10441 (origin
10442 (method url-fetch)
10443 (uri (pypi-uri "backpack" version))
10444 (sha256
10445 (base32
10446 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10447 (build-system python-build-system)
10448 (native-inputs
10449 `(("python-pytest" ,python-pytest)
10450 ("python-nose" ,python-nose)))
10451 (propagated-inputs
10452 `(("python-simplejson" ,python-simplejson)))
10453 (home-page "https://github.com/sdispater/backpack")
10454 (synopsis "Utilities for working with Python collections")
10455 (description "Backpack provides some useful utilities for working with
10456collections of data.")
10457 (license license:expat)))
10458
10459(define-public python2-backpack
10460 (package-with-python2 python-backpack))
10461
10462(define-public python-prompt-toolkit
10463 (package
10464 (name "python-prompt-toolkit")
10465 (version "2.0.7")
10466 (source
10467 (origin
10468 (method url-fetch)
10469 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10470 (sha256
10471 (base32
10472 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10473 (build-system python-build-system)
10474 (arguments
10475 `(#:phases
10476 (modify-phases %standard-phases
10477 (delete 'check)
10478 (add-after 'install 'post-install-check
10479 (lambda* (#:key inputs outputs #:allow-other-keys)
10480 ;; HOME is needed for the test
10481 ;; "test_pathcompleter_can_expanduser".
10482 (setenv "HOME" "/tmp")
10483 (add-installed-pythonpath inputs outputs)
10484 (invoke "py.test"))))))
10485 (propagated-inputs
10486 `(("python-wcwidth" ,python-wcwidth)
10487 ("python-six" ,python-six)
10488 ("python-pygments" ,python-pygments)))
10489 (native-inputs
10490 `(("python-pytest" ,python-pytest)))
10491 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10492 (synopsis "Library for building command line interfaces in Python")
10493 (description
10494 "Prompt-Toolkit is a library for building interactive command line
10495interfaces in Python. It's like GNU Readline but it also features syntax
10496highlighting while typing, out-of-the-box multi-line input editing, advanced
10497code completion, incremental search, support for Chinese double-width
10498characters, mouse support, and auto suggestions.")
10499 (license license:bsd-3)))
10500
10501(define-public python2-prompt-toolkit
10502 (package-with-python2 python-prompt-toolkit))
10503
10504(define-public python-prompt-toolkit-1
10505 (package (inherit python-prompt-toolkit)
10506 (version "1.0.15")
10507 (source
10508 (origin
10509 (method url-fetch)
10510 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10511 (sha256
10512 (base32
10513 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10514
10515(define-public python2-prompt-toolkit-1
10516 (package-with-python2 python-prompt-toolkit-1))
10517
10518(define-public python-jedi
10519 (package
10520 (name "python-jedi")
b8e5de56 10521 (version "0.13.3")
44d10b1f
RW
10522 (source
10523 (origin
10524 (method url-fetch)
10525 (uri (pypi-uri "jedi" version))
10526 (sha256
10527 (base32
b8e5de56 10528 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
44d10b1f
RW
10529 (build-system python-build-system)
10530 (arguments
b8e5de56 10531 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
44d10b1f
RW
10532 ;; https://github.com/davidhalter/jedi/issues/1263)
10533 #:tests? #f
10534 #:phases
10535 (modify-phases %standard-phases
10536 (replace 'check
10537 (lambda* (#:key tests? #:allow-other-keys)
10538 (when tests?
10539 (invoke "py.test" "-vv")))))))
10540 (native-inputs
10541 `(("python-pytest" ,python-pytest)
10542 ("python-docopt" ,python-docopt)))
10543 (propagated-inputs
10544 `(("python-parso" ,python-parso)))
10545 (home-page "https://github.com/davidhalter/jedi")
10546 (synopsis "Autocompletion and static analysis library for Python")
10547 (description
10548 "Jedi is a static analysis tool for Python that can be used in Integrated
10549Development Environments (@dfn{IDE}s) and text editors. It understands Python
10550on a deeper level than many other static analysis frameworks for Python.
10551
10552Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10553well.")
10554 (license license:expat)))
10555
10556(define-public python2-jedi
b8e5de56
MC
10557 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10558 (package
10559 (inherit base)
10560 (arguments (substitute-keyword-arguments (package-arguments base)
10561 ((#:tests? _) #t))))))
44d10b1f
RW
10562
10563(define-public ptpython
10564 (package
10565 (name "ptpython")
10566 (version "0.34")
10567 (source (origin
10568 (method url-fetch)
10569 (uri (pypi-uri "ptpython" version))
10570 (sha256
10571 (base32
10572 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10573 (build-system python-build-system)
10574 (arguments
10575 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10576 (propagated-inputs
10577 `(("python-docopt" ,python-docopt)
10578 ("python-jedi" ,python-jedi)
10579 ("python-prompt-toolkit" ,python-prompt-toolkit)
10580 ("python-pygments" ,python-pygments)))
10581 (home-page "https://github.com/jonathanslenders/ptpython")
10582 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10583 (description
10584 "ptpython is a Python read-eval-print loop with IDE-like features.
10585It supports syntax highlighting, multiline editing, autocompletion, mouse,
10586color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10587etc.")
10588 (license license:bsd-3)
10589 (properties `((python2-variant . ,(delay ptpython-2))))))
10590
10591(define-public ptpython-2
10592 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10593 (package
10594 (inherit base)
10595 (name "ptpython2"))))
10596
10597(define-public python-stem
10598 (package
10599 (name "python-stem")
e746d1c3 10600 (version "1.7.1")
44d10b1f
RW
10601 (source
10602 (origin
10603 (method url-fetch)
10604 (uri (pypi-uri "stem" version))
10605 (sha256
10606 (base32
e746d1c3 10607 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
10608 (build-system python-build-system)
10609 (arguments
10610 `(#:phases
10611 (modify-phases %standard-phases
10612 (replace 'check
10613 (lambda _
10614 (invoke "./run_tests.py" "--unit")
10615 #t)))))
10616 (native-inputs
10617 `(("python-mock" ,python-mock)
10618 ("python-pycodestyle" ,python-pycodestyle)
10619 ("python-pyflakes" ,python-pyflakes)))
10620 (home-page "https://stem.torproject.org/")
10621 (synopsis
10622 "Python controller library that allows applications to interact with Tor")
10623 (description
10624 "Stem is a Python controller library for Tor. With it you can use Tor's
10625control protocol to script against the Tor process and read descriptor data
10626relays publish about themselves.")
10627 (license license:lgpl3)))
10628
10629(define-public python2-stem
10630 (package-with-python2 python-stem))
10631
10632(define-public python-pyserial
10633 (package
10634 (name "python-pyserial")
10635 (version "3.1.1")
10636 (source
10637 (origin
10638 (method url-fetch)
10639 (uri (pypi-uri "pyserial" version))
10640 (sha256
10641 (base32
10642 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10643 (build-system python-build-system)
10644 (arguments
10645 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10646 ;; #:phases
10647 ;; (modify-phases %standard-phases
10648 ;; (replace 'check
10649 ;; (lambda _
10650 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10651 (home-page
10652 "https://github.com/pyserial/pyserial")
10653 (synopsis "Python Serial Port Bindings")
10654 (description "@code{pyserial} provide serial port bindings for Python. It
10655supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10656and/or Xon/Xoff. The port is accessed in RAW mode.")
10657 (license license:bsd-3)))
10658
10659(define-public python2-pyserial
10660 (package-with-python2 python-pyserial))
10661
10662(define-public python-kivy
10663 (package
10664 (name "python-kivy")
10665 (version "1.10.1")
10666 (source
10667 (origin
10668 (method url-fetch)
10669 (uri (pypi-uri "Kivy" version))
10670 (file-name (string-append name "-" version ".tar.gz"))
10671 (sha256
10672 (base32
10673 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10674 (build-system python-build-system)
10675 (arguments
10676 `(#:tests? #f ; Tests require many optional packages
10677 #:phases
10678 (modify-phases %standard-phases
10679 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10680 (lambda* (#:key inputs #:allow-other-keys)
10681 (setenv "KIVY_SDL2_PATH"
10682 (string-append (assoc-ref inputs "sdl-union")
10683 "/include/SDL2"))
10684 #t)))))
10685 (native-inputs
10686 `(("git" ,git)
10687 ("pkg-config" ,pkg-config)
10688 ("python-cython" ,python-cython)))
10689 (inputs
10690 `(("gstreamer" ,gstreamer)
10691 ("mesa" ,mesa)
10692 ("sdl-union"
10693 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10694 (home-page "http://kivy.org")
10695 (synopsis
10696 "Multitouch application framework")
10697 (description
10698 "A software library for rapid development of
10699hardware-accelerated multitouch applications.")
10700 (license license:expat)))
10701
10702(define-public python2-kivy
10703 (package-with-python2 python-kivy))
10704
10705(define-public python-kivy-next
10706 (deprecated-package "python-kivy-next" python-kivy))
10707
10708(define-public python2-kivy-next
10709 (deprecated-package "python2-kivy-next" python2-kivy))
10710
10711(define-public python-binaryornot
10712 (package
10713 (name "python-binaryornot")
10714 (version "0.4.4")
10715 (source (origin
10716 (method url-fetch)
10717 (uri (pypi-uri "binaryornot" version))
10718 (sha256
10719 (base32
10720 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10721 (build-system python-build-system)
10722 (propagated-inputs
10723 `(("python-chardet" ,python-chardet)
10724 ("python-hypothesis" ,python-hypothesis)))
10725 (home-page "https://github.com/audreyr/binaryornot")
10726 (synopsis "Package to check if a file is binary or text")
10727 (description "Ultra-lightweight pure Python package to check if a file is
10728binary or text.")
10729 (license license:bsd-3)
10730 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10731
10732(define-public python2-binaryornot
10733 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10734 (package (inherit base)
10735 (propagated-inputs
10736 `(("python2-enum34" ,python2-enum34)
10737 ,@(package-propagated-inputs base))))))
10738
10739(define-public python-nltk
10740 (package
10741 (name "python-nltk")
10742 (version "3.2.1")
10743 (source (origin
10744 (method url-fetch)
10745 (uri (pypi-uri "nltk" version))
10746 (sha256
10747 (base32
10748 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10749 (build-system python-build-system)
10750 (arguments
10751 '(;; The tests require some extra resources to be downloaded.
10752 ;; TODO Try packaging these resources.
10753 #:tests? #f))
10754 (home-page "http://nltk.org/")
10755 (synopsis "Natural Language Toolkit")
10756 (description "It provides interfaces to over 50 corpora and lexical
10757resources such as WordNet, along with a suite of text processing libraries
10758for classification, tokenization, stemming, tagging, parsing, and semantic
10759reasoning, wrappers for natural language processing libraries.")
10760 (license license:asl2.0)))
10761
10762(define-public python2-nltk
10763 (package-with-python2 python-nltk))
10764
10765(define-public python-pymongo
10766 (package
10767 (name "python-pymongo")
10768 (version "3.7.2")
10769 (source (origin
10770 (method url-fetch)
10771 (uri (pypi-uri "pymongo" version))
10772 (sha256
10773 (base32
10774 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10775 (build-system python-build-system)
10776 (propagated-inputs
10777 `(("python-certifi" ,python-certifi)))
10778 (home-page "https://github.com/mongodb/mongo-python-driver")
10779 (synopsis "Python driver for MongoDB")
10780 (description "Python driver for MongoDB.")
10781 (license license:asl2.0)))
10782
10783(define-public python2-pymongo
10784 (package-with-python2 python-pymongo))
10785
44d10b1f
RW
10786(define-public python-consul
10787 (package
10788 (name "python-consul")
10789 (version "0.6.1")
10790 (source
10791 (origin
10792 (method url-fetch)
10793 (uri (pypi-uri "python-consul" version))
10794 (sha256
10795 (base32
10796 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10797 (build-system python-build-system)
10798 (arguments
10799 '(#:tests? #f)) ; The tests are not distributed
10800 (propagated-inputs
10801 `(("python-requests" ,python-requests)
10802 ("python-six" ,python-six)))
10803 (home-page "https://github.com/cablehead/python-consul")
10804 (synopsis "Python client for Consul")
10805 (description
10806 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10807discovery, monitoring and configuration.")
10808 (license license:expat)))
10809
10810(define-public python2-consul
10811 (package-with-python2 python-consul))
10812
10813(define-public python-schematics
10814 (package
10815 (name "python-schematics")
10816 (version "1.1.1")
10817 (source
1961d187
TGR
10818 (origin
10819 (method git-fetch)
10820 (uri (git-reference
10821 (url "https://github.com/schematics/schematics.git")
10822 (commit (string-append "v" version))))
10823 (file-name (git-file-name name version))
10824 (sha256
10825 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
10826 (build-system python-build-system)
10827 (propagated-inputs
10828 `(("python-six" ,python-six)))
10829 (arguments
1961d187
TGR
10830 ;; The tests require a bunch of not very nice packages with fixed
10831 ;; version requirements (e.g. python-coveralls).
10832 `(#:tests? #f))
44d10b1f
RW
10833 (home-page "https://github.com/schematics/schematics")
10834 (synopsis "Python Data Structures for Humans")
10835 (description "Python Data Structures for Humans.")
10836 (license license:bsd-3)))
10837
10838(define-public python2-schematics
10839 (package-with-python2 python-schematics))
10840
10841(define-public python-odfpy
10842 (package
10843 (name "python-odfpy")
10844 (version "1.3.3")
10845 (source (origin
10846 (method url-fetch)
10847 (uri (pypi-uri "odfpy" version))
10848 (sha256
10849 (base32
10850 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10851 (arguments
10852 `(#:modules ((srfi srfi-1)
10853 (guix build python-build-system)
10854 (guix build utils))
10855 #:phases
10856 (modify-phases %standard-phases
10857 (replace 'check
10858 ;; The test runner invokes python2 and python3 for test*.py.
10859 ;; To avoid having both in inputs, we replicate it here.
10860 (lambda _
21ccc01d
RW
10861 (for-each (lambda (test-file) (invoke "python" test-file))
10862 (find-files "tests" "^test.*\\.py$"))
10863 #t)))))
44d10b1f
RW
10864 (build-system python-build-system)
10865 (home-page "https://github.com/eea/odfpy")
10866 (synopsis "Python API and tools to manipulate OpenDocument files")
10867 (description "Collection of libraries and utility programs written in
10868Python to manipulate OpenDocument 1.2 files.")
10869 (license
10870 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10871 ;; number of files with other licenses.
10872 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10873
10874(define-public python2-odfpy
10875 (package-with-python2 python-odfpy))
10876
10877(define-public python-natsort
10878 (package
10879 (name "python-natsort")
10880 (version "5.4.1")
10881 (source (origin
10882 (method url-fetch)
10883 (uri (pypi-uri "natsort" version))
10884 (sha256
10885 (base32
10886 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10887 (build-system python-build-system)
10888 (arguments
10889 `(#:modules ((guix build utils)
10890 (guix build python-build-system)
10891 (srfi srfi-1)
10892 (srfi srfi-26)
10893 (ice-9 ftw))
10894 #:phases
10895 (modify-phases %standard-phases
10896 (add-before 'check 'set-cachedir
10897 ;; Tests require write access to $HOME by default
10898 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10899 (replace 'check
10900 (lambda _
10901 (let ((cwd (getcwd)))
10902 (setenv "PYTHONPATH"
10903 (string-append
10904 cwd "/build/"
10905 (find (cut string-prefix? "lib" <>)
10906 (scandir (string-append cwd "/build")))
10907 ":"
10908 (getenv "PYTHONPATH")))
10909 (invoke "pytest" "-v")))))))
10910 (native-inputs
10911 `(("python-hypothesis" ,python-hypothesis)
10912 ("python-pytest-cov" ,python-pytest-cov)
10913 ("python-pytest-mock" ,python-pytest-mock)
10914 ("python-pytest" ,python-pytest)))
10915 (propagated-inputs ; TODO: Add python-fastnumbers.
10916 `(("python-pyicu" ,python-pyicu)))
10917 (home-page "https://github.com/SethMMorton/natsort")
10918 (synopsis "Natural sorting for python and shell")
10919 (description
10920 "Natsort lets you apply natural sorting on lists instead of
10921lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
10922on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10923@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10924@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10925identifies numbers and sorts them separately from strings. It can also sort
10926version numbers, real numbers, mixed types and more, and comes with a shell
10927command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
10928 (license license:expat)
10929 (properties `((python2-variant . ,(delay python2-natsort))))))
10930
10931(define-public python2-natsort
10932 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10933 (package (inherit base)
10934 (native-inputs
10935 `(("python2-pathlib" ,python2-pathlib)
10936 ,@(package-native-inputs base))))))
10937
10938(define-public python-glances
10939 (package
10940 (name "python-glances")
10941 (version "3.0.2")
10942 (source
10943 (origin
10944 (method url-fetch)
10945 (uri (pypi-uri "Glances" version))
10946 (sha256
10947 (base32
10948 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10949 (build-system python-build-system)
10950 (propagated-inputs
10951 `(("python-psutil" ,python-psutil)))
10952 (home-page
10953 "https://github.com/nicolargo/glances")
10954 (synopsis
10955 "A cross-platform curses-based monitoring tool")
10956 (description
10957 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10958Glances uses the PsUtil library to get information from your system. It monitors
10959CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10960 (license license:lgpl3+)))
10961
10962(define-public python2-glances
10963 (package-with-python2 python-glances))
10964
10965(define-public python-graphql-core
10966 (package
10967 (name "python-graphql-core")
10968 (version "0.5.3")
10969 (source
10970 (origin
10971 (method url-fetch)
10972 (uri (pypi-uri "graphql-core" version))
10973 (sha256
10974 (base32
10975 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10976 (build-system python-build-system)
10977 (arguments
10978 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10979 #:phases
10980 (modify-phases %standard-phases
10981 (add-after 'unpack 'patch-hardcoded-version
10982 (lambda _ (substitute*
10983 "setup.py"
10984 (("'gevent==1.1rc1'") "'gevent'"))
10985 #t)))))
10986 (native-inputs
10987 `(("python-gevent" ,python-gevent)
10988 ("python-mock" ,python-mock)
10989 ("python-pytest-mock" ,python-pytest-mock)))
10990 (propagated-inputs
10991 `(("python-promise" ,python-promise)
10992 ("python-six" ,python-six)))
10993 (home-page "https://github.com/graphql-python/graphql-core")
10994 (synopsis "GraphQL implementation for Python")
10995 (description
10996 "GraphQL implementation for Python. GraphQL is a data query language and
10997runtime designed and used to request and deliver data to mobile and web apps.
10998This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10999to Python.")
11000 (license license:expat)))
11001
11002(define-public python2-graphql-core
11003 (package-with-python2 python-graphql-core))
11004
11005(define-public python-graphql-relay
11006 (package
11007 (name "python-graphql-relay")
11008 (version "0.4.5")
11009 (source
11010 (origin
11011 (method url-fetch)
11012 (uri (pypi-uri "graphql-relay" version))
11013 (sha256
11014 (base32
11015 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11016 (build-system python-build-system)
11017 (arguments
11018 '(#:tests? #f)) ; The tests are not distributed
11019 (propagated-inputs
11020 `(("python-graphql-core" ,python-graphql-core)
11021 ("python-promise" ,python-promise)
11022 ("python-six" ,python-six)))
11023 (home-page "https://github.com/graphql-python/graphql-relay-py")
11024 (synopsis "Relay implementation for Python")
11025 (description
11026 "This is a library to allow the easy creation of Relay-compliant servers
11027using the GraphQL Python reference implementation of a GraphQL server. It
11028should be noted that the code is a exact port of the original
11029@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11030from Facebook.")
11031 (license license:expat)))
11032
11033(define-public python2-graphql-relay
11034 (package-with-python2 python-graphql-relay))
11035
11036(define-public python-graphene
11037 (package
11038 (name "python-graphene")
11039 (version "0.10.2")
11040 (source
11041 (origin
11042 (method url-fetch)
11043 (uri (pypi-uri "graphene" version))
11044 (sha256
11045 (base32
11046 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11047 (build-system python-build-system)
11048 (propagated-inputs
11049 `(("python-graphql-core" ,python-graphql-core)
11050 ("python-graphql-relay" ,python-graphql-relay)
11051 ("python-iso8601" ,python-iso8601)
11052 ("python-promise" ,python-promise)
11053 ("python-six" ,python-six)))
11054 (arguments
11055 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11056 (home-page "http://graphene-python.org/")
11057 (synopsis "GraphQL Framework for Python")
11058 (description
11059 "Graphene is a Python library for building GraphQL schemas/types.
11060A GraphQL schema describes your data model, and provides a GraphQL server
11061with an associated set of resolve methods that know how to fetch data.")
11062 (properties `((python2-variant . ,(delay python2-graphene))))
11063 (license license:expat)))
11064
11065(define-public python2-graphene
11066 (let ((base (package-with-python2
11067 (strip-python2-variant python-graphene))))
11068 (package (inherit base)
11069 (native-inputs
11070 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11071 ,@(package-native-inputs base))))))
11072
11073(define-public python-nautilus
11074 (package
11075 (name "python-nautilus")
11076 (version "0.4.9")
11077 (source
11078 (origin
11079 (method url-fetch)
11080 (uri (pypi-uri "nautilus" version))
11081 (sha256
11082 (base32
11083 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11084 (build-system python-build-system)
11085 (arguments `(#:tests? #f)) ; fails to import test modules
11086 (propagated-inputs
11087 `(("python-bcrypt" ,python-bcrypt)
11088 ("python-click" ,python-click)
11089 ("python-consul" ,python-consul)
11090 ("python-graphene" ,python-graphene)
11091 ("python-jinja2" ,python-jinja2)
11092 ("python-peewee" ,python-peewee)
11093 ("python-pika" ,python-pika)
11094 ("python-tornado" ,python-tornado)
11095 ("python-wtforms" ,python-wtforms)))
11096 (native-inputs
11097 `(("python-nose2" ,python-nose2)))
11098 (home-page "https://github.com/AlecAivazis/nautilus")
11099 (synopsis "Library for creating microservice applications")
11100 (description
11101 "Nautilus is a framework for flux based microservices that looks to
11102provide extendible implementations of common aspects of a cloud so that you can
11103focus on building massively scalable web applications.")
11104 (license license:expat)))
11105
11106(define-public python-snowballstemmer
11107 (package
11108 (name "python-snowballstemmer")
11109 (version "1.2.1")
11110 (source (origin
11111 (method url-fetch)
11112 (uri (pypi-uri "snowballstemmer" version))
11113 (sha256
11114 (base32
11115 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11116 (build-system python-build-system)
11117 (arguments
11118 `(;; No tests exist
11119 #:tests? #f))
11120 (home-page "https://github.com/shibukawa/snowball_py")
11121 (synopsis "Snowball stemming library collection for Python")
11122 (description "This package provides 16 word stemmer algorithms generated
11123from Snowball algorithms. It includes the 15 original ones plus the Poerter
11124English stemmer.")
11125 (license license:bsd-3)))
11126
11127(define-public python2-snowballstemmer
11128 (package-with-python2 python-snowballstemmer))
11129
44d10b1f
RW
11130(define-public python-setproctitle
11131(package
11132 (name "python-setproctitle")
11133 (version "1.1.10")
11134 (source
11135 (origin
11136 (method url-fetch)
11137 (uri (pypi-uri "setproctitle" version))
11138 (sha256
11139 (base32
11140 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11141 (build-system python-build-system)
11142 (arguments
11143 '(#:phases
11144 (modify-phases %standard-phases
11145 (add-before 'check 'patch-Makefile
11146 ;; Stricly this is only required for the python2 variant.
11147 ;; But adding a phase in an inherited package seems to be
11148 ;; cumbersum. So we patch even for python3.
11149 (lambda _
11150 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11151 (when nose
11152 (substitute* "Makefile"
11153 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11154 (string-append nose "/bin/nosetests "))))
11155 #t)))
11156 (replace 'check
11157 (lambda _
11158 (setenv "PYTHON" (or (which "python3") (which "python")))
11159 (setenv "PYCONFIG" (or (which "python3-config")
11160 (which "python-config")))
11161 (setenv "CC" "gcc")
11162 ;; No need to extend PYTHONPATH to find the built package, since
11163 ;; the Makefile will build anyway
11164 (invoke "make" "check"))))))
11165 (native-inputs
11166 `(("procps" ,procps))) ; required for tests
11167 (home-page
11168 "https://github.com/dvarrazzo/py-setproctitle")
11169 (synopsis
11170 "Setproctitle implementation for Python to customize the process title")
11171 (description "The library allows a process to change its title (as displayed
11172by system tools such as ps and top).
11173
11174Changing the title is mostly useful in multi-process systems, for
11175example when a master process is forked: changing the children's title
11176allows to identify the task each process is busy with. The technique
11177is used by PostgreSQL and the OpenSSH Server for example.")
11178 (license license:bsd-3)
11179 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11180
11181(define-public python2-setproctitle
11182 (let ((base (package-with-python2
11183 (strip-python2-variant python-setproctitle))))
11184 (package
11185 (inherit base)
11186 (native-inputs `(("python2-nose" ,python2-nose)
11187 ,@(package-native-inputs base))))))
11188
11189(define-public python-validictory
11190 (package
11191 (name "python-validictory")
11192 (version "1.0.1")
11193 (source
11194 (origin
11195 (method url-fetch)
11196 (uri (pypi-uri "validictory" version))
11197 (sha256
11198 (base32
11199 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11200 (build-system python-build-system)
11201 (arguments
11202 '(#:phases
11203 (modify-phases %standard-phases
11204 (add-after 'unpack 'bootstrap
11205 ;; Move the tests out of the package directory to avoid
11206 ;; packaging them.
11207 (lambda* _
11208 (rename-file "validictory/tests" "tests")
11209 (delete-file "tests/__init__.py")))
11210 (replace 'check
11211 (lambda _
11212 ;; Extend PYTHONPATH so the built package will be found.
11213 (setenv "PYTHONPATH"
11214 (string-append (getcwd) "/build/lib:"
11215 (getenv "PYTHONPATH")))
6568bd5d 11216 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11217 (native-inputs
11218 `(("python-pytest" ,python-pytest)))
11219 (home-page
11220 "https://github.com/jamesturk/validictory")
11221 (synopsis "General purpose Python data validator")
11222 (description "It allows validation of arbitrary Python data structures.
11223
11224The schema format is based on the JSON Schema
11225proposal (http://json-schema.org), so combined with json the library is also
11226useful as a validator for JSON data.")
11227 (license license:expat)))
11228
11229(define-public python2-validictory
11230 (package-with-python2 python-validictory))
11231
11232(define-public python-pyelftools
11233 (package
11234 (name "python-pyelftools")
11235 (version "0.25")
11236 (source
11237 (origin
11238 (method url-fetch)
11239 (uri (pypi-uri "pyelftools" version))
11240 (sha256
11241 (base32
11242 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11243 (build-system python-build-system)
11244 (arguments
11245 `(#:phases
11246 (modify-phases %standard-phases
11247 (add-before 'check 'set-pythonpath
11248 (lambda _
11249 (setenv "PYTHONPATH"
11250 (string-append
11251 (getcwd) "/test/"
11252 ":" (getenv "PYTHONPATH")))
11253 #t)))))
11254 (home-page
11255 "https://github.com/eliben/pyelftools")
11256 (synopsis
11257 "Analyze binary and library file information")
11258 (description "This Python library provides interfaces for parsing and
11259analyzing two binary and library file formats; the Executable and Linking
11260Format (ELF), and debugging information in the Debugging With Attributed
11261Record Format (DWARF).")
11262 (license license:public-domain)))
11263
11264(define-public python-pyev
11265 (package
11266 (name "python-pyev")
11267 (version "0.9.0")
11268 (source
11269 (origin
11270 (method url-fetch)
11271 (uri (pypi-uri "pyev" version))
11272 (sha256
11273 (base32
11274 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11275 (build-system python-build-system)
11276 (arguments
11277 `(#:tests? #f ; no test suite
11278 #:phases
11279 (modify-phases %standard-phases
11280 (add-after 'unpack 'patch
11281 (lambda* (#:key inputs #:allow-other-keys)
11282 (let ((libev (string-append (assoc-ref inputs "libev")
11283 "/lib/libev.so.4")))
11284 (substitute* "setup.py"
11285 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11286 (string-append "libev_dll_name = \"" libev "\"")))))))))
11287 (inputs
11288 `(("libev" ,libev)))
11289 (home-page "http://pythonhosted.org/pyev/")
11290 (synopsis "Python libev interface")
11291 (description "Pyev provides a Python interface to libev.")
11292 (license license:gpl3)))
11293
11294(define-public python2-pyev
11295 (package-with-python2 python-pyev))
11296
11297(define-public python-imagesize
11298 (package
11299 (name "python-imagesize")
11300 (version "1.1.0")
11301 (source
11302 (origin
11303 (method url-fetch)
11304 (uri (pypi-uri "imagesize" version))
11305 (sha256
11306 (base32
11307 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11308 (build-system python-build-system)
11309 (home-page "https://github.com/shibukawa/imagesize_py")
11310 (synopsis "Gets image size of files in various formats in Python")
11311 (description
11312 "This package allows determination of image size from
11313PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11314 (license license:expat)))
11315
11316(define-public python2-imagesize
11317 (package-with-python2 python-imagesize))
11318
11319(define-public python-termstyle
11320 (package
11321 (name "python-termstyle")
11322 (version "0.1.11")
11323 (source
11324 (origin
11325 (method url-fetch)
11326 (uri (pypi-uri "termstyle" version))
11327 (sha256
11328 (base32
11329 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11330 (build-system python-build-system)
11331 (arguments
11332 '(#:phases
11333 (modify-phases %standard-phases
11334 (replace 'check
11335 (lambda _
831080a6 11336 (invoke "python" "test3.py"))))))
44d10b1f
RW
11337 (home-page "https://github.com/gfxmonk/termstyle")
11338 (synopsis "Console text coloring for Python")
11339 (description "This package provides console text coloring for Python.")
11340 (license license:bsd-3)))
11341
11342(define-public python-argcomplete
11343 (package
11344 (name "python-argcomplete")
11345 (version "1.7.0")
11346 (source
11347 (origin
11348 (method url-fetch)
11349 (uri (pypi-uri "argcomplete" version))
11350 (sha256
11351 (base32
11352 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11353 (build-system python-build-system)
11354 (native-inputs
11355 `(("python-pexpect" ,python-pexpect)
11356 ("tcsh" ,tcsh)
11357 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11358 (home-page "https://github.com/kislyuk/argcomplete")
11359 (synopsis "Shell tab completion for Python argparse")
11360 (description "argcomplete provides extensible command line tab completion
11361of arguments and options for Python scripts using @code{argparse}. It's
11362particularly useful for programs with many options or sub-parsers that can
11363dynamically suggest completions; for example, when browsing resources over the
11364network.")
11365 (license license:asl2.0)))
11366
11367(define-public python2-argcomplete
11368 (package-with-python2 python-argcomplete))
11369
11370(define-public python-xopen
11371 (package
11372 (name "python-xopen")
24d64989 11373 (version "0.5.0")
44d10b1f
RW
11374 (source
11375 (origin
11376 (method url-fetch)
11377 (uri (pypi-uri "xopen" version))
11378 (sha256
11379 (base32
24d64989 11380 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11381 (build-system python-build-system)
24d64989
RW
11382 (propagated-inputs
11383 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11384 (home-page "https://github.com/marcelm/xopen/")
11385 (synopsis "Open compressed files transparently")
11386 (description "This module provides an @code{xopen} function that works like
11387Python's built-in @code{open} function, but can also deal with compressed files.
11388Supported compression formats are gzip, bzip2 and, xz, and are automatically
11389recognized by their file extensions. The focus is on being as efficient as
11390possible on all supported Python versions.")
11391 (license license:expat)))
11392
11393(define-public python2-xopen
11394 (let ((base (package-with-python2
11395 (strip-python2-variant python-xopen))))
11396 (package
11397 (inherit base)
11398 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11399 ,@(package-propagated-inputs base))))))
11400
11401(define-public python-cheetah
11402 (package
11403 (name "python-cheetah")
11404 (version "3.1.0")
11405 (source
11406 (origin
11407 (method url-fetch)
11408 (uri (pypi-uri "Cheetah3" version))
11409 (sha256
11410 (base32
11411 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11412 (build-system python-build-system)
11413 (arguments
11414 `(#:modules ((guix build utils)
11415 (guix build python-build-system)
11416 (ice-9 ftw)
11417 (srfi srfi-1)
11418 (srfi srfi-26))
11419 #:phases (modify-phases %standard-phases
11420 (add-after 'unpack 'use-absolute-python
11421 (lambda _
11422 (substitute* "Cheetah/CheetahWrapper.py"
11423 (("#!/usr/bin/env python")
11424 (string-append "#!" (which "python"))))
11425 #t))
11426 (replace 'check
11427 (lambda _
11428 (let ((cwd (getcwd)))
11429 (setenv "PYTHONPATH"
11430 (string-append
11431 cwd "/build/"
11432 (find (cut string-prefix? "lib" <>)
11433 (scandir (string-append cwd "/build")))
11434 ":" (getenv "PYTHONPATH")))
11435 (setenv "PATH"
11436 (string-append (getenv "PATH")
11437 ":" cwd "/bin"))
11438 (setenv "TMPDIR" "/tmp")
11439
11440 (substitute* "Cheetah/Tests/Test.py"
11441 (("unittest.TextTestRunner\\(\\)")
11442 "unittest.TextTestRunner(verbosity=2)"))
11443
11444 (invoke "python" "Cheetah/Tests/Test.py")))))))
11445 (propagated-inputs
11446 `(("python-markdown" ,python-markdown))) ;optional
11447 (home-page "http://cheetahtemplate.org/")
11448 (synopsis "Template engine")
11449 (description "Cheetah is a text-based template engine and Python code
11450generator.
11451
11452Cheetah can be used as a standalone templating utility or referenced as
11453a library from other Python applications. It has many potential uses,
11454but web developers looking for a viable alternative to ASP, JSP, PHP and
11455PSP are expected to be its principle user group.
11456
11457Features:
11458@enumerate
11459@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11460 text-based format.
11461@item Cleanly separates content, graphic design, and program code.
11462@item Blends the power and flexibility of Python with a simple template language
11463 that non-programmers can understand.
11464@item Gives template writers full access to any Python data structure, module,
11465 function, object, or method in their templates.
11466@item Makes code reuse easy by providing an object-orientated interface to
11467 templates that is accessible from Python code or other Cheetah templates.
11468 One template can subclass another and selectively reimplement sections of it.
11469@item Provides a simple, yet powerful, caching mechanism that can dramatically
11470 improve the performance of a dynamic website.
11471@item Compiles templates into optimized, yet readable, Python code.
11472@end enumerate")
11473 (license (license:x11-style "file://LICENSE"))))
11474
11475(define-public python2-cheetah
11476 (package-with-python2 python-cheetah))
11477
11478(define-public python-dulwich
11479 (package
11480 (name "python-dulwich")
11481 (version "0.18.6")
11482 (source
11483 (origin
11484 (method url-fetch)
11485 (uri (list (string-append "https://www.dulwich.io/releases/"
11486 "dulwich-" version ".tar.gz")
11487 (pypi-uri "dulwich" version)))
11488 (sha256
11489 (base32
11490 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11491 (build-system python-build-system)
11492 (arguments
11493 `(#:phases
11494 (modify-phases %standard-phases
11495 (add-before 'check 'fix-tests
11496 (lambda* (#:key inputs #:allow-other-keys)
11497 ;; The tests use Popen with a custom environment which doesn't
11498 ;; include PATH.
11499 (substitute* "dulwich/tests/compat/utils.py"
11500 (("'git'") (string-append "'"
11501 (which "git")
11502 "'")))
11503 (substitute* '("dulwich/tests/test_repository.py"
11504 "dulwich/tests/test_hooks.py")
11505 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11506 (setenv "TEST_RUNNER" "unittest")
11507 (setenv "PYTHONHASHSEED" "random")
11508 #t)))))
11509 (propagated-inputs
11510 `(("python-fastimport" ,python-fastimport)))
11511 (native-inputs
11512 `(("python-mock" ,python-mock)
11513 ("python-geventhttpclient" ,python-geventhttpclient)
11514 ("git" ,git)))
11515 (home-page "https://www.dulwich.io/")
11516 (synopsis "Git implementation in Python")
11517 (description "Dulwich is an implementation of the Git file formats and
11518protocols written in pure Python.")
11519 ;; Can be used with either license.
11520 (license (list license:asl2.0 license:gpl2+))))
11521
11522(define-public python2-dulwich
11523 (package-with-python2 python-dulwich))
11524
11525(define-public python-pbkdf2
11526 (package
11527 (name "python-pbkdf2")
11528 (version "1.3")
11529 (source
11530 (origin
11531 (method url-fetch)
11532 (uri (pypi-uri "pbkdf2" version))
11533 (sha256
11534 (base32
11535 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11536 (build-system python-build-system)
11537 (arguments
11538 '(#:phases
11539 (modify-phases %standard-phases
11540 (replace 'check
11541 (lambda _
11542 (setenv "PYTHONPATH"
11543 (string-append (getcwd) "/build/lib:"
11544 (getenv "PYTHONPATH")))
ee2bb944 11545 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11546 (propagated-inputs
11547 `(("python-pycrypto" ,python-pycrypto))) ; optional
11548 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11549 (synopsis "Password-based key derivation")
11550 (description "This module implements the password-based key derivation
11551function, PBKDF2, specified in RSA PKCS#5 v2.0.
11552
11553PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11554is part of the RSA Public Key Cryptography Standards series. The provided
11555implementation takes a password or a passphrase and a salt value (and
11556optionally a iteration count, a digest module, and a MAC module) and provides
11557a file-like object from which an arbitrarly-sized key can be read.")
11558 (license license:expat)))
11559
11560(define-public python2-pbkdf2
11561 (package-with-python2 python-pbkdf2))
11562
11563(define-public python-qrcode
11564 (package
11565 (name "python-qrcode")
217ea1a1 11566 (version "6.1")
44d10b1f
RW
11567 (source
11568 (origin
11569 (method url-fetch)
11570 (uri (pypi-uri "qrcode" version))
11571 (sha256
217ea1a1 11572 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11573 (build-system python-build-system)
11574 (arguments
11575 ;; FIXME: Tests require packaging 'pymaging'.
11576 '(#:tests? #f))
11577 (propagated-inputs
11578 `(("python-lxml" ,python-lxml) ; for SVG output
11579 ("python-pillow" ,python-pillow) ; for PNG output
11580 ("python-six" ,python-six)))
44d10b1f
RW
11581 (home-page "https://github.com/lincolnloop/python-qrcode")
11582 (synopsis "QR Code image generator")
11583 (description "This package provides a pure Python QR Code generator
11584module. It uses the Python Imaging Library (PIL) to allow for the generation
11585of QR Codes.
11586
11587In addition this package provides a command line tool to generate QR codes and
11588either write these QR codes to a file or do the output as ascii art at the
11589console.")
11590 (license license:bsd-3)))
11591
11592(define-public python2-qrcode
11593 (package-with-python2 python-qrcode))
11594
11595(define-public python-rst2ansi
11596 (package
11597 (name "python-rst2ansi")
11598 (version "0.1.5")
11599 (source
11600 (origin
11601 (method url-fetch)
11602 (uri (pypi-uri "rst2ansi" version))
11603 (sha256
11604 (base32
11605 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11606 (build-system python-build-system)
11607 (propagated-inputs
11608 `(("python-docutils" ,python-docutils)))
11609 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11610 (synopsis "Convert RST to ANSI-decorated console output")
11611 (description
11612 "Python module dedicated to rendering RST (reStructuredText) documents
11613to ansi-escaped strings suitable for display in a terminal.")
11614 (license license:expat)))
11615
11616(define-public python-ansi2html
11617 (package
11618 (name "python-ansi2html")
11619 (version "1.2.0")
11620 (source
11621 (origin
11622 (method url-fetch)
11623 (uri (pypi-uri "ansi2html" version))
11624 (sha256
11625 (base32
11626 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11627 (build-system python-build-system)
11628 (native-inputs
11629 `(("python-mock" ,python-mock)
11630 ("python-nose" ,python-nose)))
11631 (propagated-inputs
11632 `(("python-six" ,python-six)))
11633 (home-page "https://github.com/ralphbean/ansi2html")
11634 (synopsis "Convert ANSI-decorated console output to HTML")
11635 (description
11636 "@command{ansi2html} is a Python library and command line utility for
11637convering text with ANSI color codes to HTML or LaTeX.")
11638 (license license:gpl3+)))
11639
11640(define-public python2-ansi2html
11641 (package-with-python2 python-ansi2html))
11642
11643(define-public python-ddt
11644 (package
11645 (name "python-ddt")
11646 (version "1.1.3")
11647 (source
11648 (origin
11649 (method url-fetch)
11650 (uri (pypi-uri "ddt" version))
11651 (sha256
11652 (base32
11653 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11654 (build-system python-build-system)
11655 (native-inputs
11656 `(("python-mock" ,python-mock)
11657 ("python-nose" ,python-nose)))
11658 (propagated-inputs
11659 `(("python-six" ,python-six)
11660 ("python-pyyaml" ,python-pyyaml)))
11661 (home-page "https://github.com/txels/ddt")
11662 (synopsis "Data-Driven Tests")
11663 (description
11664 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11665running it with different test data, and make it appear as multiple test
11666cases.")
11667 (license license:expat)))
11668
11669(define-public python2-ddt
11670 (package-with-python2 python-ddt))
11671
11672(define-public python-pycountry
11673 (package
11674 (name "python-pycountry")
11675 (version "18.5.26")
11676 (source
11677 (origin
11678 (method url-fetch)
11679 (uri (pypi-uri "pycountry" version))
11680 (sha256
11681 (base32
11682 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11683 (build-system python-build-system)
11684 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11685 (synopsis "ISO databases for languages, countries, currencies, etc.")
11686 (description
11687 "@code{pycountry} provides the ISO databases for the standards:
11688@enumerate
11689@item 639-3 (Languages)
11690@item 3166 (Countries)
11691@item 3166-3 (Deleted Countries)
11692@item 3166-2 (Subdivisions of countries)
11693@item 4217 (Currencies)
11694@item 15924 (Scripts)
11695@end enumerate
11696It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11697through a Python API.")
11698 (license license:lgpl2.1+)))
11699
11700(define-public python2-pycountry
11701 (package-with-python2 python-pycountry))
11702
11703(define-public python-pycosat
11704 (package
11705 (name "python-pycosat")
11706 (version "0.6.1")
11707 (source
11708 (origin
11709 (method url-fetch)
11710 (uri (pypi-uri "pycosat" version))
11711 (sha256
11712 (base32
11713 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11714 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11715 (build-system python-build-system)
11716 (home-page "https://github.com/ContinuumIO/pycosat")
11717 (synopsis "Bindings to picosat (a SAT solver)")
11718 (description
11719 "This package provides efficient Python bindings to @code{picosat} on
11720the C level. When importing pycosat, the @code{picosat} solver becomes part
11721of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11722Problem} (SAT) solver.")
11723 (license license:expat)))
11724
11725(define-public python2-pycosat
11726 (package-with-python2 python-pycosat))
11727
11728(define-public python2-ruamel.ordereddict
11729 (package
11730 (name "python2-ruamel.ordereddict")
11731 (version "0.4.9")
11732 (source
11733 (origin
11734 (method url-fetch)
11735 (uri (pypi-uri "ruamel.ordereddict" version))
11736 (sha256
11737 (base32
11738 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11739 (build-system python-build-system)
11740 (arguments
11741 `(#:python ,python-2
11742 #:phases
11743 (modify-phases %standard-phases
11744 (delete 'check)
11745 (add-after 'install 'check
11746 (lambda* (#:key inputs outputs #:allow-other-keys)
11747 (add-installed-pythonpath inputs outputs)
f987ac30 11748 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11749 (home-page "https://bitbucket.org/ruamel/ordereddict")
11750 (synopsis "Version of dict that keeps keys in insertion order")
11751 (description
11752 "This is an implementation of an ordered dictionary with @dfn{Key
11753Insertion Order} (KIO: updates of values do not affect the position of the
11754key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11755removed and put at the back). The standard library module @code{OrderedDict},
11756implemented later, implements a subset of @code{ordereddict} functionality.
11757Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11758Order} (KSO, no sorting function can be specified, but a transform can be
11759specified to apply on the key before comparison (e.g. @code{string.lower})).")
11760 (license license:expat)))
11761
11762(define-public python-pypeg2
11763 (package
11764 (name "python-pypeg2")
11765 (version "2.15.2")
11766 (source
11767 (origin
11768 (method url-fetch)
11769 (uri (pypi-uri "pyPEG2" version))
11770 (sha256
11771 (base32
11772 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11773 (build-system python-build-system)
11774 (propagated-inputs `(("python-lxml" ,python-lxml)))
11775 (arguments
11776 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11777 '(#:tests? #f))
11778 (home-page "https://fdik.org/pyPEG/")
11779 (synopsis "Parsering Expression Grammars in Python")
11780 (description "PyPEG is an intrinsic parser interpreter framework for
11781Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11782parse many formal languages.")
11783 (license license:gpl2)))
11784
11785(define-public python-incremental
11786 (package
11787 (name "python-incremental")
11788 (version "17.5.0")
11789 (source
11790 (origin
11791 (method url-fetch)
11792 (uri (pypi-uri "incremental" version))
11793 (sha256
11794 (base32
11795 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11796 (build-system python-build-system)
11797 (home-page "https://github.com/hawkowl/incremental")
11798 (synopsis "Library for versioning Python projects")
11799 (description "Incremental is a small library that versions your Python
11800projects.")
11801 (license license:expat)))
11802
11803(define-public python2-incremental
11804 (package-with-python2 python-incremental))
11805
11806(define-public python-invoke
11807 (package
11808 (name "python-invoke")
11809 (home-page "http://www.pyinvoke.org/")
11810 (version "1.1.0")
11811 (source (origin
11812 (method url-fetch)
11813 (uri (pypi-uri "invoke" version))
11814 (sha256
11815 (base32
11816 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11817 (build-system python-build-system)
11818 (arguments
11819 ;; XXX: Requires many dependencies that are not yet in Guix.
11820 `(#:tests? #f))
11821 (synopsis "Pythonic task execution")
11822 (description
11823 "Invoke is a Python task execution tool and library, drawing inspiration
11824from various sources to arrive at a powerful and clean feature set. It is
11825evolved from the Fabric project, but focuses on local and abstract concerns
11826instead of servers and network commands.")
11827 (license license:bsd-3)))
11828
11829(define-public python2-invoke
11830 (package-with-python2 python-invoke))
11831
11832(define-public python-automat
11833 (package
11834 (name "python-automat")
919d80a0 11835 (version "0.7.0")
44d10b1f
RW
11836 (source (origin
11837 (method url-fetch)
11838 (uri (pypi-uri "Automat" version))
11839 (sha256
11840 (base32
919d80a0 11841 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
11842 (build-system python-build-system)
11843 ;; We disable the tests because they require python-twisted, while
11844 ;; python-twisted depends on python-automat. Twisted is optional, but the
11845 ;; tests fail if it is not available. Also see
11846 ;; <https://github.com/glyph/automat/issues/71>.
11847 (arguments '(#:tests? #f))
11848 (native-inputs
11849 `(("python-m2r" ,python-m2r)
11850 ("python-setuptools-scm" ,python-setuptools-scm)
11851 ("python-graphviz" ,python-graphviz)))
11852 (propagated-inputs
11853 `(("python-six" ,python-six)
11854 ("python-attrs" ,python-attrs)))
11855 (home-page "https://github.com/glyph/Automat")
11856 (synopsis "Self-service finite-state machines")
11857 (description "Automat is a library for concise, idiomatic Python
11858expression of finite-state automata (particularly deterministic finite-state
11859transducers).")
11860 (license license:expat)))
11861
11862(define-public python2-automat
11863 (package-with-python2 python-automat))
11864
11865(define-public python-m2r
11866 (package
11867 (name "python-m2r")
bcfb8fac 11868 (version "0.2.1")
44d10b1f
RW
11869 (source (origin
11870 (method url-fetch)
11871 (uri (pypi-uri "m2r" version))
11872 (sha256
11873 (base32
bcfb8fac 11874 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
11875 (build-system python-build-system)
11876 (propagated-inputs
11877 `(("python-docutils" ,python-docutils)
11878 ("python-mistune" ,python-mistune)))
11879 (native-inputs
11880 `(("python-pygments" ,python-pygments)
11881 ("python-mock" ,python-mock)))
11882 (home-page "https://github.com/miyakogi/m2r")
11883 (synopsis "Markdown to reStructuredText converter")
11884 (description "M2R converts a markdown file including reST markups to valid
11885reST format.")
11886 (license license:expat)))
11887
11888(define-public python2-m2r
11889 (package-with-python2 python-m2r))
11890
11891(define-public python-constantly
11892 (package
11893 (name "python-constantly")
11894 (version "15.1.0")
11895 (source (origin
11896 (method url-fetch)
11897 (uri (pypi-uri "constantly" version))
11898 (sha256
11899 (base32
11900 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11901 (build-system python-build-system)
11902 (home-page "https://github.com/twisted/constantly")
11903 (synopsis "Symbolic constants in Python")
11904 (description "Constantly is a Python library that provides symbolic
11905constant support. It includes collections and constants with text, numeric,
11906and bit flag values.")
11907 (license license:expat)))
11908
11909(define-public python2-constantly
11910 (package-with-python2 python-constantly))
11911
11912(define-public python-attrs
11913 (package
11914 (name "python-attrs")
67458e20 11915 (version "19.1.0")
44d10b1f
RW
11916 (source (origin
11917 (method url-fetch)
11918 (uri (pypi-uri "attrs" version))
11919 (sha256
11920 (base32
67458e20 11921 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
11922 (build-system python-build-system)
11923 (arguments
11924 `(#:modules ((guix build utils)
11925 (guix build python-build-system)
11926 (ice-9 ftw)
11927 (srfi srfi-1)
11928 (srfi srfi-26))
11929 #:phases (modify-phases %standard-phases
11930 (replace 'check
11931 (lambda _
11932 (let ((cwd (getcwd)))
11933 (setenv "PYTHONPATH"
11934 (string-append
11935 cwd "/build/"
11936 (find (cut string-prefix? "lib" <>)
11937 (scandir (string-append cwd "/build")))
11938 ":"
11939 (getenv "PYTHONPATH")))
11940 (invoke "python" "-m" "pytest")))))))
11941 (native-inputs
11942 `(("python-coverage" ,python-coverage)
11943 ("python-hypothesis" ,python-hypothesis)
11944 ("python-pympler" ,python-pympler)
11945 ("python-pytest" ,python-pytest)
11946 ("python-six" ,python-six)
11947 ("python-sphinx" ,python-sphinx)
11948 ("python-zope-interface" ,python-zope-interface)))
11949 (home-page "https://github.com/python-attrs/attrs/")
11950 (synopsis "Attributes without boilerplate")
11951 (description "@code{attrs} is a Python package with class decorators that
11952ease the chores of implementing the most common attribute-related object
11953protocols.")
11954 (license license:expat)))
11955
11956(define-public python2-attrs
11957 (package-with-python2 python-attrs))
11958
11959(define-public python-attrs-bootstrap
11960 (package
11961 (inherit python-attrs)
11962 (name "python-attrs-bootstrap")
11963 ;; Keep this on a fixed version so python-attrs can be updated without
11964 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11965 (version "17.4.0")
11966 (source (origin
11967 (method url-fetch)
11968 (uri (pypi-uri "attrs" version))
11969 (sha256
11970 (base32
11971 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11972 (native-inputs `())
11973 (arguments `(#:tests? #f))))
11974
11975(define-public python2-attrs-bootstrap
11976 (package-with-python2 python-attrs-bootstrap))
11977
11978(define-public python2-cliapp
11979 (package
11980 (name "python2-cliapp")
9064b84e 11981 (version "1.20180812.1")
44d10b1f
RW
11982 (source
11983 (origin
11984 (method url-fetch)
11985 (uri (string-append
11986 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11987 version ".tar.gz"))
11988 (sha256
11989 (base32
9064b84e 11990 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11991 (build-system python-build-system)
11992 (arguments
11993 `(#:python ,python-2
11994 #:phases
11995 (modify-phases %standard-phases
11996 ;; check phase needs to be run before the build phase. If not,
11997 ;; coverage-test-runner looks for tests for the built source files,
11998 ;; and fails.
11999 (delete 'check)
12000 (add-before 'build 'check
12001 (lambda _
12002 ;; Disable python3 tests
12003 (substitute* "check"
12004 (("python3") "# python3"))
6c826d32 12005 (invoke "./check"))))))
44d10b1f
RW
12006 (native-inputs
12007 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12008 ("python2-pep8" ,python2-pep8)))
12009 (propagated-inputs
12010 `(("python2-pyaml" ,python2-pyaml)))
12011 (home-page "https://liw.fi/cliapp/")
12012 (synopsis "Python framework for command line programs")
12013 (description "@code{python2-cliapp} is a python framework for
12014command line programs. It contains the typical stuff such programs
12015need to do, such as parsing the command line for options, and
12016iterating over input files.")
12017 (license license:gpl2+)))
12018
12019(define-public python2-ttystatus
12020 (package
12021 (name "python2-ttystatus")
e516a9c2 12022 (version "0.36")
44d10b1f
RW
12023 (source
12024 (origin
12025 (method url-fetch)
12026 (uri (string-append
12027 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12028 version ".tar.gz"))
12029 (sha256
12030 (base32
e516a9c2 12031 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12032 (build-system python-build-system)
12033 (native-inputs
12034 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12035 ("python2-pep8" ,python2-pep8)))
12036 (arguments
12037 `(#:python ,python-2
12038 #:phases
12039 (modify-phases %standard-phases
12040 ;; check phase needs to be run before the build phase. If not,
12041 ;; coverage-test-runner looks for tests for the built source files,
12042 ;; and fails.
12043 (delete 'check)
12044 (add-before 'build 'check
cbeee881 12045 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12046 (home-page "https://liw.fi/ttystatus/")
12047 (synopsis "Python library for showing progress reporting and
12048status updates on terminals")
12049 (description "@code{python2-ttystatus} is a python library for
12050showing progress reporting and status updates on terminals, for
12051command line programs. Output is automatically adapted to the width
12052of the terminal: truncated if it does not fit, and resized if the
12053terminal size changes.")
12054 (license license:gpl3+)))
12055
12056(define-public python2-tracing
12057 (package
12058 (name "python2-tracing")
12059 (version "0.10")
12060 (source
12061 (origin
12062 (method url-fetch)
12063 (uri (string-append
12064 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12065 version ".tar.gz"))
12066 (sha256
12067 (base32
12068 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12069 (build-system python-build-system)
12070 (arguments
12071 `(#:python ,python-2))
12072 (home-page "https://liw.fi/tracing/")
12073 (synopsis "Python debug logging helper")
12074 (description "@code{python2-tracing} is a python library for
12075logging debug messages. It provides a way to turn debugging messages
12076on and off, based on the filename they occur in. It is much faster
12077than using @code{logging.Filter} to accomplish the same thing, which
12078matters when code is run in production mode. The actual logging still
12079happens using the @code{logging} library.")
12080 (license license:gpl3+)))
12081
12082(define-public python2-larch
12083 (package
12084 (name "python2-larch")
12085 (version "1.20151025")
12086 (source
12087 (origin
12088 (method url-fetch)
12089 (uri (string-append
12090 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12091 version ".tar.gz"))
12092 (patches (search-patches
12093 "python2-larch-coverage-4.0a6-compatibility.patch"))
12094 (sha256
12095 (base32
12096 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12097 (build-system python-build-system)
12098 (arguments
12099 `(#:python ,python-2
12100 #:phases
12101 (modify-phases %standard-phases
12102 ;; check phase needs to be run before the build phase. If not,
12103 ;; coverage-test-runner looks for tests for the built source files,
12104 ;; and fails.
12105 (delete 'check)
12106 (add-before 'build 'check
204ad455 12107 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12108 (native-inputs
12109 `(("cmdtest" ,cmdtest)
12110 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12111 (propagated-inputs
12112 `(("python2-tracing" ,python2-tracing)))
12113 (home-page "https://liw.fi/larch/")
12114 (synopsis "Python copy-on-write B-tree library")
12115 (description "@code{python2-larch} is an implementation of
12116particular kind of B-tree, based on research by Ohad Rodeh. See
12117@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12118on the data structure.
12119
12120The distinctive feature of this B-tree is that a node is never
12121(conceptually) modified. Instead, all updates are done by
12122copy-on-write. This makes it easy to clone a tree, and modify only the
12123clone, while other processes access the original tree.")
12124 (license license:gpl3+)))
12125
12126(define-public python-astroid
12127 (package
12128 (name "python-astroid")
12129 (version "2.1.0")
12130 (source
12131 (origin
12132 (method url-fetch)
12133 (uri (pypi-uri "astroid" version))
12134 (sha256
12135 (base32
12136 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12137 (build-system python-build-system)
12138 (propagated-inputs
12139 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12140 ("python-six" ,python-six)
12141 ("python-wrapt" ,python-wrapt)))
12142 (native-inputs
12143 `(("python-dateutil" ,python-dateutil)
12144 ("python-nose" ,python-nose)
12145 ("python-pytest" ,python-pytest)
12146 ("python-pytest-runner" ,python-pytest-runner)))
12147 (arguments
12148 `(#:phases
12149 (modify-phases %standard-phases
12150 (add-after 'unpack 'remove-spurious-test
12151 (lambda _
12152 ;; This can be removed after upgrading from python-3.7
12153 ;; https://github.com/PyCQA/astroid/issues/593
12154 ;; https://bugs.python.org/issue34056
12155 (delete-file "astroid/tests/unittest_modutils.py")
12156 #t))
12157 (replace 'check
12158 (lambda _
12159 (invoke "pytest" "astroid"))))))
12160 (home-page "https://github.com/PyCQA/astroid")
12161 (synopsis "Common base representation of python source code for pylint and
12162other projects")
12163 (description "@code{python-astroid} provides a common base representation
12164of python source code for projects such as pychecker, pyreverse, pylint, etc.
12165
12166It provides a compatible representation which comes from the _ast module. It
12167rebuilds the tree generated by the builtin _ast module by recursively walking
12168down the AST and building an extended ast. The new node classes have
12169additional methods and attributes for different usages. They include some
12170support for static inference and local name scopes. Furthermore, astroid
12171builds partial trees by inspecting living objects.")
12172 (license license:lgpl2.1+)
12173 (properties `((python2-variant . ,(delay python2-astroid))))))
12174
12175(define-public python2-astroid
12176 (let ((base (package-with-python2
12177 (strip-python2-variant python-astroid))))
12178 (package (inherit base)
12179 ;; Version 2.x removes python2 support.
12180 (version "1.6.5")
12181 (source
12182 (origin
12183 (method url-fetch)
12184 (uri (pypi-uri "astroid" version))
12185 (sha256
12186 (base32
12187 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12188 (arguments
12189 (substitute-keyword-arguments (package-arguments base)
12190 ((#:phases phases)
12191 `(modify-phases ,phases
12192 (add-after 'unpack 'remove-spurious-test
12193 (lambda _
12194 ;; https://github.com/PyCQA/astroid/issues/276
12195 (delete-file "astroid/tests/unittest_brain.py")
12196 #t))
12197 (replace 'check
12198 (lambda _
12199 (invoke"python" "-m" "unittest" "discover"
12200 "-p" "unittest*.py")))))))
12201 (native-inputs `())
12202 (propagated-inputs
12203 `(("python2-backports-functools-lru-cache"
12204 ,python2-backports-functools-lru-cache)
12205 ("python2-enum34" ,python2-enum34)
12206 ("python2-singledispatch" ,python2-singledispatch)
12207 ,@(package-propagated-inputs base))))))
12208
12209(define-public python-isort
12210 (package
12211 (name "python-isort")
e2227b6a 12212 (version "4.3.4")
44d10b1f
RW
12213 (source
12214 (origin
e2227b6a
EF
12215 (method git-fetch)
12216 (uri (git-reference
12217 ;; Tests pass only from the Github sources
12218 (url "https://github.com/timothycrosley/isort")
12219 (commit version)))
12220 (file-name (git-file-name name version))
44d10b1f
RW
12221 (sha256
12222 (base32
e2227b6a 12223 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12224 (build-system python-build-system)
12225 (native-inputs
12226 `(("python-mock" ,python-mock)
12227 ("python-pytest" ,python-pytest)))
12228 (home-page "https://github.com/timothycrosley/isort")
12229 (synopsis "Python utility/library to sort python imports")
12230 (description "@code{python-isort} is a python utility/library to sort
12231imports alphabetically, and automatically separated into sections. It
12232provides a command line utility, a python library and plugins for various
12233editors.")
e2227b6a
EF
12234 (license license:expat)
12235 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12236
12237(define-public python2-isort
e2227b6a
EF
12238 (let ((base (package-with-python2
12239 (strip-python2-variant python-isort))))
12240 (package (inherit base)
12241 (native-inputs
12242 `(("python2-futures" ,python2-futures)
12243 ,@(package-native-inputs base))))))
44d10b1f
RW
12244
12245(define-public python2-backports-functools-lru-cache
12246 (package
12247 (name "python2-backports-functools-lru-cache")
12248 (version "1.5")
12249 (source
12250 (origin
12251 (method url-fetch)
12252 ;; only the pypi tarballs contain the necessary metadata
12253 (uri (pypi-uri "backports.functools_lru_cache" version))
12254 (sha256
12255 (base32
12256 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12257 (build-system python-build-system)
12258 (native-inputs
12259 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12260 (arguments
12261 `(#:python ,python-2))
12262 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12263 (synopsis "Backport of functools.lru_cache from Python 3.3")
12264 (description "@code{python2-backports-functools-lru-cache} is a backport
12265of @code{functools.lru_cache} from python 3.3.")
12266 (license license:expat)))
12267
12268(define-public python-configparser
12269 (package
12270 (name "python-configparser")
12271 (version "3.5.0")
12272 (source
12273 (origin
12274 (method url-fetch)
12275 (uri (string-append
12276 "https://bitbucket.org/ambv/configparser/get/"
12277 version ".tar.bz2"))
12278 (file-name (string-append name "-" version ".tar.gz"))
12279 (sha256
12280 (base32
12281 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
12282 (build-system python-build-system)
809f003f 12283 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12284 (synopsis "Backport of configparser from python 3.5")
12285 (description "@code{python-configparser} is a backport of
12286@code{configparser} from Python 3.5 so that it can be used directly
12287in other versions.")
12288 (license license:expat)))
12289
12290(define-public python2-configparser
12291 (package-with-python2 python-configparser))
12292
12293(define-public python-mando
12294 (package
12295 (name "python-mando")
12296 (version "0.6.4")
12297 (source (origin
12298 (method url-fetch)
12299 (uri (pypi-uri "mando" version))
12300 (sha256
12301 (base32
12302 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12303 (build-system python-build-system)
12304 (propagated-inputs
12305 `(("python-rst2ansi" ,python-rst2ansi)
12306 ("python-six" ,python-six)))
12307 (native-inputs
12308 `(("python-pytest" ,python-pytest)))
12309 (home-page "https://mando.readthedocs.org/")
12310 (synopsis
12311 "Wrapper around argparse, allowing creation of complete CLI applications")
12312 (description
12313 "This package is a wrapper around argparse, allowing you to write complete CLI
12314applications in seconds while maintaining all the flexibility.")
12315 (license license:expat)))
12316
12317(define-public python2-mando
12318 (package-with-python2 python-mando))
12319
70daf82f
RW
12320(define-public python2-argparse
12321 (package
12322 (name "python2-argparse")
12323 (version "1.4.0")
12324 (source
12325 (origin
12326 (method url-fetch)
12327 (uri (pypi-uri "argparse" version))
12328 (sha256
12329 (base32
12330 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12331 (build-system python-build-system)
12332 (arguments
12333 `(#:python ,python-2))
12334 (home-page "https://github.com/ThomasWaldmann/argparse/")
12335 (synopsis "Python command-line parsing library")
12336 (description
12337 "This package is mostly for people who want to have @code{argparse} on
12338older Pythons because it was not part of the standard library back then.")
12339 (license license:psfl)))
12340
44d10b1f
RW
12341(define-public python-fudge
12342 (package
12343 (name "python-fudge")
12344 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12345 ;; package, which is currently the only use of this package.
12346 (version "0.9.6")
12347 (source
12348 (origin
12349 (method url-fetch)
12350 (uri (pypi-uri "fudge" version))
12351 (sha256
12352 (base32
12353 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12354 (build-system python-build-system)
12355 (arguments
12356 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12357 (home-page "https://github.com/fudge-py/fudge")
12358 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12359 (description
12360 "Fudge is a Python module for using fake objects (mocks and stubs) to
12361test real ones.
12362
12363In readable Python code, you declare the methods available on your fake object
12364and how they should be called. Then you inject that into your application and
12365start testing. This declarative approach means you don’t have to record and
12366playback actions and you don’t have to inspect your fakes after running code.
12367If the fake object was used incorrectly then you’ll see an informative
12368exception message with a traceback that points to the culprit.")
12369 (license license:expat)))
12370
12371(define-public python2-fudge
12372 (package-with-python2 python-fudge))
12373
12374(define-public python-mwclient
12375 (package
12376 (name "python-mwclient")
12377 (version "0.8.4")
12378 (source
12379 (origin
12380 (method url-fetch)
12381 ;; The PyPI version wouldn't contain tests.
12382 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12383 "v" version ".tar.gz"))
12384 (file-name (string-append name "-" version ".tar.gz"))
12385 (sha256
12386 (base32
12387 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12388 (build-system python-build-system)
12389 (propagated-inputs
12390 `(("python-requests" ,python-requests)
12391 ("python-requests-oauthlib"
12392 ,python-requests-oauthlib)
12393 ("python-six" ,python-six)))
12394 (native-inputs
12395 `(("python-mock" ,python-mock)
12396 ("python-pytest" ,python-pytest)
12397 ("python-pytest-pep8" ,python-pytest-pep8)
12398 ("python-pytest-cache" ,python-pytest-cache)
12399 ("python-pytest-cov" ,python-pytest-cov)
12400 ("python-responses" ,python-responses)))
12401 (home-page "https://github.com/btongminh/mwclient")
12402 (synopsis "MediaWiki API client")
12403 (description "This package provides a MediaWiki API client.")
12404 (license license:expat)))
12405
12406(define-public python2-mwclient
12407 (package-with-python2 python-mwclient))
12408
12409(define-public python-utils
12410 (package
12411 (name "python-utils")
12412 (version "2.1.0")
12413 (source (origin
12414 (method url-fetch)
12415 (uri (pypi-uri "python-utils" version))
12416 (sha256
12417 (base32
12418 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12419 (build-system python-build-system)
12420 (native-inputs
12421 `(("pytest-runner" ,python-pytest-runner)
12422 ("pytest" ,python-pytest)
12423 ("six" ,python-six)))
12424 (home-page "https://github.com/WoLpH/python-utils")
12425 (synopsis "Convenient utilities not included with the standard Python install")
12426 (description
12427 "Python Utils is a collection of small Python functions and classes which
12428make common patterns shorter and easier.")
12429 (license license:bsd-2)))
12430
12431(define-public python2-utils
12432 (package-with-python2 python-utils))
12433
44d10b1f
RW
12434(define-public python-diff-match-patch
12435 (package
12436 (name "python-diff-match-patch")
12437 (version "20121119")
12438 (source
12439 (origin
12440 (method url-fetch)
12441 (uri (pypi-uri "diff-match-patch" version))
12442 (sha256
12443 (base32
12444 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12445 (build-system python-build-system)
12446 (home-page "https://code.google.com/p/google-diff-match-patch")
12447 (synopsis "Synchronize plain text")
12448 (description "Diff Match and Patch libraries offer robust algorithms to
12449perform the operations required for synchronizing plain text.")
12450 (license license:asl2.0)))
12451
12452(define-public python2-diff-match-patch
12453 (package-with-python2 python-diff-match-patch))
12454
12455(define-public python-dirsync
12456 (package
12457 (name "python-dirsync")
12458 (version "2.2.3")
12459 (source
12460 (origin
12461 (method url-fetch)
12462 (uri (pypi-uri "dirsync" version))
12463 (sha256
12464 (base32
12465 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12466 (build-system python-build-system)
12467 (propagated-inputs
12468 `(("six" ,python-six)))
12469 (home-page "https://bitbucket.org/tkhyn/dirsync")
12470 (synopsis "Advanced directory tree synchronisation tool")
12471 (description "Advanced directory tree synchronisation tool.")
12472 (license license:expat)))
12473
12474(define-public python2-dirsync
12475 (package-with-python2 python-dirsync))
12476
12477(define-public python-levenshtein
12478 (package
12479 (name "python-levenshtein")
12480 (version "0.12.0")
12481 (source
12482 (origin
12483 (method url-fetch)
12484 (uri (pypi-uri "python-Levenshtein" version))
12485 (sha256
12486 (base32
12487 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12488 (build-system python-build-system)
12489 (home-page "https://github.com/ztane/python-Levenshtein")
12490 (synopsis "Fast computation of Levenshtein distance and string similarity")
12491 (description
12492 "The Levenshtein Python C extension module contains functions for fast computation of
12493@enumerate
12494@item Levenshtein (edit) distance, and edit operations
12495@item string similarity
12496@item approximate median strings, and generally string averaging
12497@item string sequence and set similarity
12498@end enumerate
12499It supports both normal and Unicode strings.")
12500 (license license:gpl2+)))
12501
12502(define-public python2-levenshtein
12503 (package-with-python2 python-levenshtein))
12504
12505(define-public python-scandir
12506 (package
12507 (name "python-scandir")
12508 (version "1.9.0")
12509 (source
12510 (origin
12511 (method url-fetch)
12512 (uri (pypi-uri "scandir" version))
12513 (sha256
12514 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12515 (build-system python-build-system)
12516 (arguments
12517 `(#:phases (modify-phases %standard-phases
12518 (replace 'check
12519 (lambda _
12520 (invoke "python" "test/run_tests.py"))))))
12521 (home-page "https://github.com/benhoyt/scandir")
12522 (synopsis "Directory iteration function")
12523 (description
12524 "Directory iteration function like os.listdir(), except that instead of
12525returning a list of bare filenames, it yields DirEntry objects that include
12526file type and stat information along with the name. Using scandir() increases
12527the speed of os.walk() by 2-20 times (depending on the platform and file
12528system) by avoiding unnecessary calls to os.stat() in most cases.
12529
12530This package is part of the Python standard library since version 3.5.")
12531 (license license:bsd-3)))
12532
12533(define-public python2-scandir
12534 (package-with-python2 python-scandir))
12535
12536(define-public python2-stemming
12537 (package
12538 (name "python2-stemming")
12539 (version "1.0.1")
12540 (source
12541 (origin
12542 (method url-fetch)
12543 (uri (pypi-uri "stemming" version))
12544 (sha256
12545 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12546 (build-system python-build-system)
12547 (arguments
12548 `(#:python ,python-2))
12549 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12550 (synopsis "Python implementations of various stemming algorithms")
12551 (description
12552 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12553stemming algorithms for English. These implementations are straightforward and
12554efficient, unlike some Python versions of the same algorithms available on the
12555Web. This package is an extraction of the stemming code included in the Whoosh
12556search engine.")
12557 (license license:public-domain)))
12558
12559(define-public python-factory-boy
12560 (package
12561 (name "python-factory-boy")
12562 (version "2.8.1")
12563 (source
12564 (origin
12565 (method url-fetch)
12566 (uri (pypi-uri "factory_boy" version))
12567 (sha256
12568 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12569 (build-system python-build-system)
12570 (arguments
12571 ;; Tests are not included in the tarball.
12572 `(#:tests? #f))
12573 (propagated-inputs
12574 `(("faker" ,python-faker)))
12575 (home-page "https://github.com/benhoyt/scandir")
12576 (synopsis "Versatile test fixtures replacement")
12577 (description
12578 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12579
12580As a fixtures replacement tool, it aims to replace static, hard to maintain
12581fixtures with easy-to-use factories for complex object.
12582
12583Instead of building an exhaustive test setup with every possible combination
12584of corner cases, factory_boy allows you to use objects customized for the
12585current test, while only declaring the test-specific fields")
12586 (license license:expat)))
12587
12588(define-public python2-factory-boy
12589 (package-with-python2 python-factory-boy))
12590
12591(define-public python-translate-toolkit
12592 (package
12593 (name "python-translate-toolkit")
12594 (version "2.1.0")
12595 (source
12596 (origin
12597 (method url-fetch)
12598 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12599 (sha256
12600 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12601 (build-system python-build-system)
12602 (native-inputs
12603 `(("python-pytest" ,python-pytest)
12604 ("python-sphinx" ,python-sphinx)))
12605 (propagated-inputs
12606 `(("python-babel" ,python-babel)
12607 ("python-beautifulsoup4" ,python-beautifulsoup4)
12608 ("python-chardet" ,python-chardet)
12609 ("python-diff-match-patch" ,python-diff-match-patch)
12610 ("python-levenshtein" ,python-levenshtein)
12611 ("python-lxml" ,python-lxml)
12612 ("python-six" ,python-six)
12613 ("python-vobject" ,python-vobject)
12614 ("python-pyyaml" ,python-pyyaml)))
12615 (arguments
12616 ;; TODO: tests are not run, because they end with
12617 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12618 ;; 'parse_funcs'
12619 ;; during test setup.
12620 `(#:tests? #f))
18919cf9 12621 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
12622 (synopsis "Tools and API for translation and localization engineering")
12623 (description
12624 "Tools and API for translation and localization engineering. It contains
12625several utilities, as well as an API for building localization tools.")
12626 (license license:gpl2+)))
12627
12628(define-public python2-translate-toolkit
12629 (package-with-python2 python-translate-toolkit))
12630
12631(define-public python-packaging
12632 (package
12633 (name "python-packaging")
9dc6ff5a 12634 (version "19.0")
44d10b1f
RW
12635 (source
12636 (origin
12637 (method url-fetch)
12638 (uri (pypi-uri "packaging" version))
12639 (sha256
12640 (base32
9dc6ff5a 12641 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
44d10b1f
RW
12642 (build-system python-build-system)
12643 (arguments
12644 `(#:phases (modify-phases %standard-phases
12645 (replace 'check
12646 (lambda _ (invoke "py.test" "-vv"))))))
12647 (native-inputs
12648 `(("python-pretend" ,python-pretend)
12649 ("python-pytest" ,python-pytest)))
12650 (propagated-inputs
12651 `(("python-pyparsing" ,python-pyparsing)
12652 ("python-six" ,python-six)))
12653 (home-page "https://github.com/pypa/packaging")
12654 (synopsis "Core utilities for Python packages")
12655 (description "Packaging is a Python module for dealing with Python packages.
12656It offers an interface for working with package versions, names, and dependency
12657information.")
12658 ;; From 'LICENSE': This software is made available under the terms of
12659 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12660 ;; Contributions to this software is made under the terms of *both* these
12661 ;; licenses.
12662 (license (list license:asl2.0 license:bsd-2))))
12663
12664(define-public python2-packaging
12665 (package-with-python2 python-packaging))
12666
12667(define-public python-relatorio
12668 (package
12669 (name "python-relatorio")
12670 (version "0.8.0")
12671 (source
12672 (origin
12673 (method url-fetch)
12674 (uri (pypi-uri "relatorio" version))
12675 (sha256
12676 (base32
12677 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12678 (build-system python-build-system)
12679 (propagated-inputs
12680 `(("python-lxml" ,python-lxml)
12681 ("python-genshi" ,python-genshi)))
12682 (native-inputs
12683 `(("python-magic" ,python-magic)))
12684 (home-page "https://relatorio.tryton.org/")
12685 (synopsis "Templating library able to output ODT and PDF files")
12686 (description "Relatorio is a templating library which provides a way to
12687easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12688for more filetypes can be easily added by creating plugins for them.")
12689 (license license:gpl3+)))
12690
12691(define-public python2-relatorio
12692 (package-with-python2 python-relatorio))
12693
12694(define-public python-radon
12695 (package
12696 (name "python-radon")
12697 (version "2.2.0")
12698 (source
12699 (origin
12700 (method url-fetch)
12701 (uri (pypi-uri "radon" version))
12702 (sha256
12703 (base32
12704 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12705 (build-system python-build-system)
12706 (arguments
12707 `(#:phases (modify-phases %standard-phases
12708 (replace 'check
12709 (lambda _
12710 (invoke "python" "radon/tests/run.py"))))))
12711 (propagated-inputs
12712 `(("python-colorama" ,python-colorama)
12713 ("python-flake8-polyfill" ,python-flake8-polyfill)
12714 ("python-mando" ,python-mando)))
12715 (native-inputs
12716 `(("python-pytest" ,python-pytest)
12717 ("python-pytest-mock" ,python-pytest-mock)))
12718 (home-page "https://radon.readthedocs.org/")
12719 (synopsis "Code Metrics in Python")
12720 (description "Radon is a Python tool which computes various code metrics.
12721Supported metrics are:
12722@itemize @bullet
12723@item raw metrics: SLOC, comment lines, blank lines, &c.
12724@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12725@item Halstead metrics (all of them)
12726@item the Maintainability Index (a Visual Studio metric)
12727@end itemize")
12728 (license license:expat)))
12729
12730(define-public python2-radon
12731 (package-with-python2 python-radon))
12732
12733(define-public python-sure
12734 (package
12735 (name "python-sure")
12736 (version "1.4.11")
12737 (source
12738 (origin
12739 (method url-fetch)
12740 (uri (pypi-uri "sure" version))
12741 (sha256
12742 (base32
12743 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12744 (build-system python-build-system)
12745 (propagated-inputs
12746 `(("python-mock" ,python-mock)
12747 ("python-six" ,python-six)))
12748 (native-inputs
12749 `(("python-nose" ,python-nose)))
12750 (home-page "https://github.com/gabrielfalcao/sure")
12751 (synopsis "Automated testing library in python for python")
12752 (description
12753 "Sure is a python library that leverages a DSL for writing assertions.
12754Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12755 (license license:gpl3+)))
12756
12757(define-public python2-sure
12758 (package-with-python2 python-sure))
12759
12760(define-public python2-couleur
12761 ;; This package does not seem to support python3 at all, hence,
12762 ;; only the python2 variant definition is provided.
12763 (package
12764 (name "python2-couleur")
12765 (version "0.6.2")
12766 (source
12767 (origin
12768 (method url-fetch)
12769 (uri (pypi-uri "couleur" version))
12770 (sha256
12771 (base32
12772 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12773 (build-system python-build-system)
12774 (arguments
12775 `(#:python ,python-2))
12776 (home-page "https://github.com/gabrielfalcao/couleur")
12777 (synopsis
12778 "ANSI terminal tool for python, colored shell and other handy fancy features")
12779 (description
12780 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12781terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12782 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12783 ;; https://github.com/gabrielfalcao/couleur/issues/11
12784 (license license:lgpl3+)))
12785
12786(define-public python-misaka
12787 (package
12788 (name "python-misaka")
0dcb3412 12789 (version "2.1.1")
44d10b1f
RW
12790 (source
12791 (origin
12792 (method url-fetch)
12793 (uri (pypi-uri "misaka" version))
12794 (sha256
12795 (base32
0dcb3412 12796 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12797 (build-system python-build-system)
12798 (arguments
12799 `(;; Line 37 of setup.py calls self.run_command('develop')
12800 ;; in the 'check' phase. This command seems to be trying
12801 ;; to write to
12802 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12803 ;; for which it does not have the permission to write.
12804 #:tests? #f))
12805 (propagated-inputs
12806 `(("python-cffi" ,python-cffi)))
12807 (home-page "https://github.com/FSX/misaka")
12808 (synopsis "Python binding for Hoedown")
12809 (description
12810 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12811library written in C. It features a fast HTML renderer and functionality to make custom
12812renderers (e.g. man pages or LaTeX).")
12813 (license license:expat)))
12814
12815(define-public python2-misaka
12816 (package-with-python2 python-misaka))
12817
12818(define-public python2-steadymark
12819 ;; This is forced into being a python2 only variant
12820 ;; due to its dependence on couleur that has no support
12821 ;; for python3
12822 (package
12823 (name "python2-steadymark")
12824 (version "0.7.3")
12825 (source
12826 (origin
12827 (method url-fetch)
12828 (uri (pypi-uri "steadymark" version))
12829 (sha256
12830 (base32
12831 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12832 (build-system python-build-system)
12833 (native-inputs
12834 `(("python-couleur" ,python2-couleur)
12835 ("python-sure" ,python2-sure)
12836 ("python-misaka" ,python2-misaka)))
12837 (arguments
12838 `(#:python ,python-2
12839 #:phases
12840 (modify-phases %standard-phases
12841 (add-before 'build 'patch-setup-py
12842 (lambda _
12843 ;; Update requirements from dependency==version
12844 ;; to dependency>=version
12845 (substitute* "setup.py"
12846 (("==") ">="))
12847 #t)))))
12848 (home-page "https://github.com/gabrielfalcao/steadymark")
12849 (synopsis "Markdown-based test runner for python")
12850 (description
12851 "@code{Steadymark} allows documentation to be written in github-flavoured
12852markdown. The documentation may contain snippets of code surrounded by python
12853code blocks and @code{Steadymark} will find these snippets and run them, making
12854sure that there are no old malfunctional examples in the documentation examples.")
12855 (license license:expat)))
12856
12857(define-public python-jsonpointer
12858 (package
12859 (name "python-jsonpointer")
12860 (version "1.10")
12861 (source
12862 (origin
12863 (method url-fetch)
12864 (uri (pypi-uri "jsonpointer" version))
12865 (sha256
12866 (base32
12867 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12868 (build-system python-build-system)
12869 (home-page "https://github.com/stefankoegl/python-json-pointer")
12870 (synopsis "Identify specific nodes in a JSON document")
12871 (description "@code{jsonpointer} allows you to access specific nodes
12872by path in a JSON document (see RFC 6901).")
12873 (license license:bsd-3)))
12874
12875(define-public python2-jsonpointer
12876 (package-with-python2 python-jsonpointer))
12877
12878(define-public python-jsonpatch
12879 (package
12880 (name "python-jsonpatch")
12881 (version "1.16")
12882 (source
12883 (origin
12884 (method url-fetch)
12885 ;; pypi version lacks tests.js
12886 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12887 "archive/v" version ".tar.gz"))
12888 (file-name (string-append name "-" version ".tar.gz"))
12889 (sha256
12890 (base32
12891 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12892 (build-system python-build-system)
12893 (native-inputs
12894 `(("python-jsonpointer" ,python-jsonpointer)))
12895 (home-page "https://github.com/stefankoegl/python-json-patch")
12896 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12897 (description "@code{jsonpatch} is a library and program that allows
12898applying JSON Patches according to RFC 6902.")
12899 (license license:bsd-3)))
12900
12901(define-public python2-jsonpatch
12902 (package-with-python2 python-jsonpatch))
12903
12904(define-public python-jsonpatch-0.4
12905 (package (inherit python-jsonpatch)
12906 (name "python-jsonpatch")
12907 (version "0.4")
12908 (source
12909 (origin
12910 (method url-fetch)
12911 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12912 "archive/v" version ".tar.gz"))
12913 (file-name (string-append name "-" version ".tar.gz"))
12914 (sha256
12915 (base32
12916 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12917
12918(define-public python2-jsonpatch-0.4
12919 (package-with-python2 python-jsonpatch-0.4))
12920
12921(define-public python-rfc3986
12922 (package
12923 (name "python-rfc3986")
12924 (version "1.1.0")
12925 (source (origin
12926 (method url-fetch)
12927 (uri (pypi-uri "rfc3986" version))
12928 (sha256
12929 (base32
12930 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12931 (build-system python-build-system)
12932 (arguments
12933 `(#:modules ((guix build utils)
12934 (guix build python-build-system)
12935 (ice-9 ftw)
12936 (srfi srfi-1)
12937 (srfi srfi-26))
12938 #:phases
12939 (modify-phases %standard-phases
12940 (replace 'check
12941 (lambda _
12942 (let ((cwd (getcwd)))
12943 (setenv "PYTHONPATH"
12944 (string-append cwd "/build/"
12945 (find (cut string-prefix? "lib" <>)
12946 (scandir (string-append cwd "/build")))
12947 ":"
12948 (getenv "PYTHONPATH")))
12949 (invoke "pytest" "-v")))))))
12950 (native-inputs
12951 `(("python-pytest" ,python-pytest)))
12952 (home-page "https://rfc3986.readthedocs.io/")
12953 (synopsis "Parse and validate URI references")
12954 (description
12955 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12956validation and authority parsing. This module also supports RFC@tie{}6874
12957which adds support for zone identifiers to IPv6 addresses.")
12958 (license license:asl2.0)))
12959
12960(define-public python2-rfc3986
12961 (package-with-python2 python-rfc3986))
12962
12963(define-public python-rfc3987
12964 (package
12965 (name "python-rfc3987")
12966 (version "1.3.7")
12967 (source
12968 (origin
12969 (method url-fetch)
12970 (uri (pypi-uri "rfc3987" version))
12971 (sha256
12972 (base32
12973 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12974 (build-system python-build-system)
12975 (home-page "https://pypi.python.org/pypi/rfc3987")
12976 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12977 (description "@code{rfc3987} provides routines for parsing and
12978validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12979 (license license:gpl3+)))
12980
12981(define-public python2-rfc3987
12982 (package-with-python2 python-rfc3987))
12983
12984(define-public python-validate-email
12985 (package
12986 (name "python-validate-email")
12987 (version "1.3")
12988 (source
12989 (origin
12990 (method url-fetch)
12991 (uri (pypi-uri "validate_email" version))
12992 (sha256
12993 (base32
12994 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12995 (build-system python-build-system)
12996 (home-page "https://github.com/syrusakbary/validate_email")
12997 (synopsis "Verifies if an email address is valid and really exists")
12998 (description "@code{validate_email} can be used to verify if an email
12999address is valid and really exists.")
13000 (license license:lgpl3+)))
13001
13002(define-public python2-validate-email
13003 (package-with-python2 python-validate-email))
13004
13005(define-public python-flex
13006 (package
13007 (name "python-flex")
13008 (version "6.10.0")
13009 (source
13010 (origin
13011 (method url-fetch)
13012 (uri (pypi-uri "flex" version))
13013 (sha256
13014 (base32
13015 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13016 (build-system python-build-system)
13017 (propagated-inputs
13018 `(("python-click" ,python-click)
13019 ("python-iso8601" ,python-iso8601)
13020 ("python-jsonpointer" ,python-jsonpointer)
13021 ("python-pyyaml" ,python-pyyaml)
13022 ("python-requests" ,python-requests)
13023 ("python-rfc3987" ,python-rfc3987)
13024 ("python-six" ,python-six)
13025 ("python-validate-email" ,python-validate-email)))
13026 (home-page "https://github.com/pipermerriam/flex")
13027 (synopsis "Validates Swagger schemata")
13028 (description "@code{flex} can be used to validate Swagger schemata.")
13029 (license license:bsd-3)))
13030
13031(define-public python2-flex
13032 (package-with-python2 python-flex))
13033
13034(define-public python-marshmallow
13035 (package
13036 (name "python-marshmallow")
13037 (version "3.0.0b14")
13038 (source
13039 (origin
13040 (method url-fetch)
13041 (uri (pypi-uri "marshmallow" version))
13042 (sha256
13043 (base32
13044 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13045 (build-system python-build-system)
13046 (propagated-inputs
13047 `(("python-dateutil" ,python-dateutil)
13048 ("python-simplejson" ,python-simplejson)))
13049 (native-inputs
13050 `(("python-pytest" ,python-pytest)
13051 ("python-pytz" ,python-pytz)))
13052 (home-page "https://github.com/marshmallow-code/marshmallow")
13053 (synopsis "Convert complex datatypes to and from native
13054Python datatypes.")
13055 (description "@code{marshmallow} provides a library for converting
13056complex datatypes to and from native Python datatypes.")
13057 (license license:expat)))
13058
13059(define-public python2-marshmallow
13060 (package-with-python2 python-marshmallow))
13061
13062(define-public python-apispec
13063 (package
13064 (name "python-apispec")
13065 (version "0.25.3")
13066 (source
13067 (origin
13068 (method url-fetch)
13069 (uri (pypi-uri "apispec" version))
13070 (sha256
13071 (base32
13072 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13073 (build-system python-build-system)
13074 (propagated-inputs
13075 `(("python-pyyaml" ,python-pyyaml)))
13076 (native-inputs
13077 `(("python-pytest" ,python-pytest)
13078 ("python-flask" ,python-flask)
13079 ("python-marshmallow" ,python-marshmallow)
13080 ("python-tornado" ,python-tornado)
13081 ("python-bottle" ,python-bottle)
13082 ("python-mock" ,python-mock)))
13083 (home-page "https://github.com/marshmallow-code/apispec")
13084 (synopsis "Swagger 2.0 API specification generator")
13085 (description "@code{python-apispec} is a pluggable API specification
13086generator. Currently supports the OpenAPI specification (f.k.a.
13087Swagger 2.0).")
13088 (license license:expat)))
13089
13090(define-public python2-apispec
13091 (package-with-python2 python-apispec))
13092
13093(define-public python-flasgger
13094 (package
13095 (name "python-flasgger")
13096 (version "0.6.3")
13097 (source
13098 (origin
1a04d421
TGR
13099 (method git-fetch)
13100 (uri (git-reference
13101 (url "https://github.com/rochacbruno/flasgger.git")
13102 (commit version)))
13103 (file-name (git-file-name name version))
44d10b1f 13104 (sha256
1a04d421 13105 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13106 (build-system python-build-system)
13107 (arguments
13108 `(#:phases
13109 (modify-phases %standard-phases
13110 (replace 'check
13111 (lambda* (#:key inputs outputs #:allow-other-keys)
13112 (substitute* "Makefile"
13113 (("flake8 flasgger --ignore=F403")
13114 "flake8 flasgger --ignore=E731,F403"))
13115 (setenv "PYTHONPATH" (string-append (getcwd)
13116 ":"
13117 (getenv "PYTHONPATH")))
ac599a09 13118 (invoke "py.test"))))))
44d10b1f
RW
13119 (propagated-inputs
13120 `(("python-flask" ,python-flask)
13121 ("python-pyyaml" ,python-pyyaml)
13122 ("python-jsonschema" ,python-jsonschema)
13123 ("python-mistune" ,python-mistune)
13124 ("python-six" ,python-six)))
13125 (native-inputs
13126 `(("python-decorator" ,python-decorator)
13127 ("python-flake8" ,python-flake8)
13128 ("python-flask-restful" ,python-flask-restful)
13129 ("python-flex" ,python-flex)
13130 ("python-pytest" ,python-pytest)
13131 ("python-pytest-cov" ,python-pytest-cov)
13132 ("python-marshmallow" ,python-marshmallow)
13133 ("python-apispec" ,python-apispec)))
13134 (home-page "https://github.com/rochacbruno/flasgger/")
13135 (synopsis "Extract Swagger specs from your Flask project")
13136 (description "@code{python-flasgger} allows extracting Swagger specs
13137from your Flask project. It is a fork of Flask-Swagger.")
13138 (license license:expat)))
13139
13140(define-public python2-flasgger
13141 (package-with-python2 python-flasgger))
13142
13143(define-public python-swagger-spec-validator
13144 (package
13145 (name "python-swagger-spec-validator")
fe9c5b1d 13146 (version "2.4.3")
44d10b1f
RW
13147 (source
13148 (origin
13149 (method url-fetch)
13150 (uri (pypi-uri "swagger-spec-validator" version))
13151 (sha256
13152 (base32
fe9c5b1d 13153 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13154 (build-system python-build-system)
13155 (propagated-inputs
13156 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13157 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13158 ("python-six" ,python-six)))
13159 (home-page
13160 "https://github.com/Yelp/swagger_spec_validator")
13161 (synopsis "Validation of Swagger specifications")
13162 (description "@code{swagger_spec_validator} provides a library for
13163validating Swagger API specifications.")
13164 (license license:asl2.0)))
13165
13166(define-public python2-swagger-spec-validator
13167 (package-with-python2 python-swagger-spec-validator))
13168
13169(define-public python-apache-libcloud
13170 (package
13171 (name "python-apache-libcloud")
13172 (version "2.4.0")
13173 (source
13174 (origin
13175 (method url-fetch)
13176 (uri (pypi-uri "apache-libcloud" version))
13177 (sha256
13178 (base32
13179 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13180 (build-system python-build-system)
13181 (arguments
13182 `(#:phases
13183 (modify-phases %standard-phases
13184 (add-after 'unpack 'patch-ssh
13185 (lambda* (#:key inputs #:allow-other-keys)
13186 (substitute* "libcloud/compute/ssh.py"
13187 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13188 "/bin/ssh" "'")))
13189 #t))
13190 (add-after 'unpack 'patch-tests
13191 (lambda _
13192 (substitute* "./libcloud/test/test_file_fixtures.py"
13193 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13194 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13195 return (httplib.OK,
13196 \"1234abcd\",
13197 {\"test\": \"value\"},
13198 httplib.responses[httplib.OK])
13199 def _ascii"))
13200 (substitute* "libcloud/test/compute/test_ssh_client.py"
13201 (("class ShellOutSSHClientTests")
13202 "@unittest.skip(\"Guix container doesn't have ssh service\")
13203class ShellOutSSHClientTests")
13204 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13205 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13206 (("'.xF0', '.x90', '.x8D', '.x88'")
13207 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13208 #t))
13209 (add-before 'check 'copy-secret
13210 (lambda _
13211 (copy-file "libcloud/test/secrets.py-dist"
13212 "libcloud/test/secrets.py")
13213 #t)))))
13214 (inputs
13215 `(("openssh" ,openssh)))
13216 (propagated-inputs
13217 `(("python-paramiko" ,python-paramiko)
13218 ("python-requests" ,python-requests)))
13219 (native-inputs
13220 `(("python-lockfile" ,python-lockfile)
13221 ("python-mock" ,python-mock)
13222 ("python-pytest" ,python-pytest)
13223 ("python-pytest-runner" ,python-pytest-runner)
13224 ("python-requests-mock" ,python-requests-mock)))
13225 (home-page "https://libcloud.apache.org/")
13226 (synopsis "Unified Cloud API")
13227 (description "@code{libcloud} is a Python library for interacting with
13228many of the popular cloud service providers using a unified API.")
13229 (license license:asl2.0)))
13230
13231(define-public python2-apache-libcloud
13232 (package-with-python2 python-apache-libcloud))
13233
13234(define-public python-smmap2
13235 (package
13236 (name "python-smmap2")
13237 (version "2.0.3")
13238 (source
13239 (origin
13240 (method url-fetch)
13241 (uri (pypi-uri "smmap2" version))
13242 (sha256
13243 (base32
13244 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13245 (build-system python-build-system)
13246 (native-inputs
13247 `(("python-nosexcover" ,python-nosexcover)))
13248 (home-page "https://github.com/Byron/smmap")
13249 (synopsis "Python sliding window memory map manager")
13250 (description "@code{smmap2} is a pure Python implementation of a sliding
13251window memory map manager.")
13252 (license license:bsd-3)))
13253
13254(define-public python2-smmap2
13255 (package-with-python2 python-smmap2))
13256
13257(define-public python-regex
13258 (package
13259 (name "python-regex")
c187c9d7 13260 (version "2019.04.14")
44d10b1f
RW
13261 (source (origin
13262 (method url-fetch)
13263 (uri (pypi-uri "regex" version))
13264 (sha256
13265 (base32
c187c9d7
BT
13266 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13267 ;; TODO: Fix and enable regex_test.py tests that complain about the
13268 ;; test.support module not existing.
44d10b1f
RW
13269 (build-system python-build-system)
13270 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13271 (synopsis "Alternative regular expression module")
13272 (description "This regular expression implementation is backwards-
13273compatible with the standard @code{re} module, but offers additional
13274functionality like full case-folding for case-insensitive matches in Unicode.")
13275 (license license:psfl)))
13276
13277(define-public python2-regex
13278 (package-with-python2 python-regex))
13279
13280(define-public python2-pyopengl
13281 (package
13282 (name "python2-pyopengl")
13283 (version "3.1.0")
13284 (source
13285 (origin
13286 (method url-fetch)
13287 (uri (pypi-uri "PyOpenGL" version))
13288 (sha256
13289 (base32
13290 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13291 (arguments
13292 `(#:python ,python-2))
13293 (build-system python-build-system)
13294 (home-page "http://pyopengl.sourceforge.net")
13295 (synopsis "Standard OpenGL bindings for Python")
13296 (description
13297 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13298related APIs. The binding is created using the standard @code{ctypes}
13299library.")
13300 (license license:bsd-3)))
13301
13302(define-public python2-pyopengl-accelerate
13303 (package
13304 (inherit python2-pyopengl)
13305 (name "python2-pyopengl-accelerate")
13306 (version "3.1.0")
13307 (source
13308 (origin
13309 (method url-fetch)
13310 (uri (pypi-uri "PyOpenGL-accelerate" version))
13311 (sha256
13312 (base32
13313 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13314 (synopsis "Acceleration code for PyOpenGL")
13315 (description
13316 "This is the Cython-coded accelerator module for PyOpenGL.")))
13317
13318(define-public python-rencode
13319 (package
13320 (name "python-rencode")
13321 (version "1.0.5")
13322 (source
13323 (origin
13324 (method url-fetch)
13325 (uri (pypi-uri "rencode" version))
13326 (sha256
13327 (base32
13328 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13329 (build-system python-build-system)
13330 (arguments
13331 `(#:phases
13332 (modify-phases %standard-phases
13333 (add-before 'check 'delete-bogus-test
13334 ;; This test requires /home/aresch/Downloads, which is not provided by
13335 ;; the build environment.
13336 (lambda _
13337 (delete-file "rencode/t.py")
13338 #t)))))
13339 (native-inputs `(("pkg-config" ,pkg-config)
13340 ("python-cython" ,python-cython)))
13341 (home-page "https://github.com/aresch/rencode")
13342 (synopsis "Serialization of heterogeneous data structures")
13343 (description
13344 "The @code{rencode} module is a data structure serialization library,
13345similar to @code{bencode} from the BitTorrent project. For complex,
13346heterogeneous data structures with many small elements, r-encoding stake up
13347significantly less space than b-encodings. This version of rencode is a
13348complete rewrite in Cython to attempt to increase the performance over the
13349pure Python module.")
13350 (license license:bsd-3)))
13351
13352(define-public python2-rencode
13353 (package-with-python2 python-rencode))
13354
13355(define-public python-xenon
13356 (package
13357 (name "python-xenon")
13358 (version "0.5.4")
13359 (source
13360 (origin
13361 (method url-fetch)
13362 (uri (pypi-uri "xenon" version))
13363 (sha256
13364 (base32
13365 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13366 (build-system python-build-system)
13367 (native-inputs
13368 `(("python-pyyaml" ,python-pyyaml)
13369 ("python-radon" ,python-radon)
13370 ("python-requests" ,python-requests)
13371 ("python-flake8" ,python-flake8)
13372 ("python-tox" ,python-tox)))
13373 (arguments
13374 `(#:phases
13375 (modify-phases %standard-phases
13376 (add-before 'build 'patch-test-requirements
13377 (lambda _
13378 ;; Remove httpretty dependency for tests.
13379 (substitute* "setup.py"
13380 (("httpretty") ""))
13381 #t)))))
13382 (home-page "https://xenon.readthedocs.org/")
13383 (synopsis "Monitor code metrics for Python on your CI server")
13384 (description
13385 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13386Ideally, @code{xenon} is run every time code is committed. Through command
13387line options, various thresholds can be set for the complexity of code. It
13388will fail (i.e. it will exit with a non-zero exit code) when any of these
13389requirements is not met.")
13390 (license license:expat)))
13391
13392(define-public python2-xenon
13393 (package-with-python2 python-xenon))
13394
13395(define-public python-pysocks
13396 (package
13397 (name "python-pysocks")
b8725cdf 13398 (version "1.7.0")
44d10b1f
RW
13399 (source
13400 (origin
13401 (method url-fetch)
13402 (uri (pypi-uri "PySocks" version))
13403 (sha256
13404 (base32
b8725cdf 13405 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13406 (build-system python-build-system)
13407 (arguments `(#:tests? #f))
13408 (home-page "https://github.com/Anorov/PySocks")
13409 (synopsis "SOCKS client module")
13410 (description "@code{pysocks} is an updated and semi-actively maintained
13411version of @code{SocksiPy} with bug fixes and extra features.")
13412 (license license:bsd-3)))
13413
13414(define-public python2-pysocks
13415 (package-with-python2 python-pysocks))
13416
13417(define-public python-pydiff
13418 (package
13419 (name "python-pydiff")
13420 (version "0.2")
13421 (source
13422 (origin
13423 (method url-fetch)
13424 (uri (pypi-uri "pydiff" version))
13425 (sha256
13426 (base32
13427 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13428 (build-system python-build-system)
13429 (home-page "https://github.com/myint/pydiff")
13430 (synopsis "Library to diff two Python files at the bytecode level")
13431 (description
13432 "@code{pydiff} makes it easy to look for actual code changes while
13433ignoring formatting changes.")
13434 (license license:expat)))
13435
13436(define-public python2-pydiff
13437 (package-with-python2 python-pydiff))
13438
13439(define-public python-tqdm
13440 (package
13441 (name "python-tqdm")
13442 (version "4.19.6")
13443 (source
13444 (origin
13445 (method url-fetch)
13446 (uri (pypi-uri "tqdm" version))
13447 (sha256
13448 (base32
13449 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13450 (build-system python-build-system)
13451 (native-inputs
13452 `(("python-flake8" ,python-flake8)
13453 ("python-nose" ,python-nose)
13454 ("python-coverage" ,python-coverage)))
13455 (home-page "https://github.com/tqdm/tqdm")
13456 (synopsis "Fast, extensible progress meter")
13457 (description
13458 "Make loops show a progress bar on the console by just wrapping any
13459iterable with @code{|tqdm(iterable)|}. Offers many options to define
13460design and layout.")
13461 (license (list license:mpl2.0 license:expat))))
13462
13463(define-public python2-tqdm
13464 (package-with-python2 python-tqdm))
13465
13466(define-public python-pkginfo
13467 (package
13468 (name "python-pkginfo")
13469 (version "1.4.2")
13470 (source
13471 (origin
13472 (method url-fetch)
13473 (uri (pypi-uri "pkginfo" version))
13474 (sha256
13475 (base32
13476 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13477 (build-system python-build-system)
13478 (arguments
13479 ;; The tests are broken upstream.
13480 '(#:tests? #f))
13481 (home-page
13482 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13483 (synopsis
13484 "Query metadatdata from sdists, bdists, and installed packages")
13485 (description
13486 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13487source distriubtion (an sdist) or a binary distribution (e.g., created by
13488running bdist_egg). It can also query the EGG-INFO directory of an installed
13489distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13490created by running @code{python setup.py develop}).")
13491 (license license:expat)))
13492
13493(define-public python2-pkginfo
13494 (package-with-python2 python-pkginfo))
13495
13496(define-public python-twine
13497 (package
13498 (name "python-twine")
13499 (version "1.9.1")
13500 (source
13501 (origin
13502 (method url-fetch)
13503 (uri (pypi-uri "twine" version))
13504 (sha256
13505 (base32
13506 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13507 (build-system python-build-system)
13508 (propagated-inputs
13509 `(("python-tqdm" ,python-tqdm)
13510 ("python-pkginfo" ,python-pkginfo)
13511 ("python-requests" ,python-requests)
13512 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13513 (home-page "https://github.com/pypa/twine")
13514 (synopsis "Collection of utilities for interacting with PyPI")
13515 (description
13516 "@code{twine} currently supports registering projects and uploading
13517distributions. It authenticates the user over HTTPS, allows them to pre-sign
13518their files and supports any packaging format (including wheels).")
13519 (license license:asl2.0)))
13520
13521(define-public python2-twine
13522 (package-with-python2 python-twine))
13523
13524(define-public python-linecache2
13525 (package
13526 (name "python-linecache2")
13527 (version "1.0.0")
13528 (source
13529 (origin
13530 (method url-fetch)
13531 (uri (pypi-uri "linecache2" version))
13532 (sha256
13533 (base32
13534 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13535 (build-system python-build-system)
13536 (arguments
13537 `(;; The tests depend on unittest2, and our version is a bit too old.
13538 #:tests? #f))
13539 (native-inputs
13540 `(("python-pbr" ,python-pbr-minimal)))
13541 (home-page
13542 "https://github.com/testing-cabal/linecache2")
13543 (synopsis "Backports of the linecache module")
13544 (description
13545 "The linecache module allows one to get any line from any file, while
13546attempting to optimize internally, using a cache, the common case where many
13547lines are read from a single file.")
13548 (license license:psfl)))
13549
13550(define-public python2-linecache2
13551 (package-with-python2 python-linecache2))
13552
13553(define-public python-traceback2
13554 (package
13555 (name "python-traceback2")
13556 (version "1.4.0")
13557 (source
13558 (origin
13559 (method url-fetch)
13560 (uri (pypi-uri "traceback2" version))
13561 (sha256
13562 (base32
13563 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13564 (build-system python-build-system)
13565 (arguments
13566 `(;; python-traceback2 and python-unittest2 depend on one another.
13567 #:tests? #f))
13568 (native-inputs
13569 `(("python-pbr" ,python-pbr-minimal)))
13570 (propagated-inputs
13571 `(("python-linecache2" ,python-linecache2)))
13572 (home-page
13573 "https://github.com/testing-cabal/traceback2")
13574 (synopsis "Backports of the traceback module")
13575 (description
13576 "This module provides a standard interface to extract, format and print
13577stack traces of Python programs. It exactly mimics the behavior of the Python
13578interpreter when it prints a stack trace.")
13579 (license license:psfl)))
13580
13581(define-public python2-traceback2
13582 (package-with-python2 python-traceback2))
13583
13584(define-public python-ratelimiter
13585 (package
13586 (name "python-ratelimiter")
13587 (version "1.2.0")
13588 (source
13589 (origin
13590 (method url-fetch)
13591 (uri (pypi-uri "ratelimiter" version))
13592 (sha256
13593 (base32
13594 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13595 (build-system python-build-system)
13596 (arguments
13597 '(#:tests? #f)) ; There are no tests in the pypi archive.
13598 (home-page "https://github.com/RazerM/ratelimiter")
13599 (synopsis "Simple rate limiting object")
13600 (description
13601 "The @code{ratelimiter} module ensures that an operation will not be
13602executed more than a given number of times during a given period.")
13603 (license license:asl2.0)))
13604
13605(define-public python2-ratelimiter
13606 (package-with-python2 python-ratelimiter))
13607
13608(define-public python-dukpy
13609 (package
13610 (name "python-dukpy")
13611 (version "0.3")
13612 (source
13613 (origin
5b77ebe1
TGR
13614 (method git-fetch)
13615 (uri (git-reference
13616 (url "https://github.com/kovidgoyal/dukpy.git")
13617 (commit (string-append "v" version))))
13618 (file-name (git-file-name name version))
44d10b1f 13619 (sha256
5b77ebe1 13620 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
13621 (build-system python-build-system)
13622 (home-page "https://github.com/kovidgoyal/dukpy")
13623 (synopsis "Run JavaScript in python")
13624 (description
13625 "dukpy is a JavaScript runtime environment for Python using the duktape
13626embeddable JavaScript engine.")
13627 ;; Dukpy is licensed under MIT like the embedded duktape library,
13628 ;; with 'errors.c' as GPL3.
13629 (license (list license:expat license:gpl3))))
13630
13631(define-public python2-dukpy
13632 (package-with-python2 python-dukpy))
13633
13634(define-public python-jsonrpclib-pelix
13635 (package
13636 (name "python-jsonrpclib-pelix")
13637 (version "0.3.2")
13638 (source
13639 (origin
13640 (method url-fetch)
13641 (uri (pypi-uri "jsonrpclib-pelix" version))
13642 (sha256
13643 (base32
13644 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13645 (build-system python-build-system)
13646 (arguments
13647 `(#:tests? #f)) ; no tests in PyPI tarball
13648 (home-page "https://github.com/tcalmant/jsonrpclib/")
13649 (synopsis "JSON-RPC 2.0 client library for Python")
13650 (description
13651 "This library implements the JSON-RPC v2.0
13652specification (backwards-compatible) as a client library for Python. This
13653version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13654services.")
13655 (license license:asl2.0)))
13656
13657(define-public python2-jsonrpclib-pelix
13658 (package-with-python2 python-jsonrpclib-pelix))
13659
13660(define-public python-setuptools-scm-git-archive
13661 (package
13662 (name "python-setuptools-scm-git-archive")
13663 (version "1.0")
13664 (source
13665 (origin
13666 (method url-fetch)
13667 (uri (pypi-uri "setuptools_scm_git_archive" version))
13668 (sha256
13669 (base32
13670 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13671 (build-system python-build-system)
13672 (native-inputs
13673 `(("python-pytest" ,python-pytest)))
13674 (propagated-inputs
13675 `(("python-setuptools-scm" ,python-setuptools-scm)))
13676 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13677 (synopsis "Setuptools_scm plugin for git archives")
13678 (description
13679 "The setuptools_scm_git_archive package is a plugin to
13680setuptools_scm, which supports obtaining versions from git archives that
13681belong to tagged versions.")
13682 (license license:expat)))
13683
13684(define-public python2-setuptools-scm-git-archive
13685 (package-with-python2 python-setuptools-scm-git-archive))
13686
724a350c
RW
13687(define-public python-setuptools-git
13688 (package
13689 (name "python-setuptools-git")
13690 (version "1.2")
13691 (source
13692 (origin
13693 (method url-fetch)
13694 (uri (pypi-uri "setuptools-git" version))
13695 (sha256
13696 (base32
13697 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13698 (build-system python-build-system)
13699 (arguments
13700 `(#:phases
13701 (modify-phases %standard-phases
13702 ;; This is needed for tests.
13703 (add-after 'unpack 'configure-git
13704 (lambda _
13705 (setenv "HOME" "/tmp")
13706 (invoke "git" "config" "--global" "user.email" "guix")
13707 (invoke "git" "config" "--global" "user.name" "guix")
13708 #t)))))
13709 (native-inputs
13710 `(("git" ,git-minimal)))
13711 (home-page "https://github.com/msabramo/setuptools-git")
13712 (synopsis "Setuptools revision control system plugin for Git")
13713 (description
13714 "This package provides a plugin for Setuptools for revision control with
13715Git.")
13716 (license license:bsd-3)))
13717
44d10b1f
RW
13718(define-public python-pyclipper
13719 (package
13720 (name "python-pyclipper")
13721 (version "1.1.0.post1")
13722 (source
13723 (origin
13724 (method url-fetch)
13725 (uri (pypi-uri "pyclipper" version ".zip"))
13726 (sha256
13727 (base32
13728 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13729 (modules '((guix build utils)))
13730 (snippet
13731 '(begin
13732 ;; This file is generated by Cython.
13733 (delete-file "pyclipper/pyclipper.cpp") #t))))
13734 (build-system python-build-system)
13735 (arguments
13736 `(#:phases
13737 (modify-phases %standard-phases
13738 (add-before 'build 'cythonize-sources
13739 (lambda _
13740 (with-directory-excursion "pyclipper"
13741 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13742 (propagated-inputs
13743 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13744 (native-inputs
13745 `(("python-cython" ,python-cython)
13746 ("python-pytest" ,python-pytest)
13747 ("python-pytest-runner" ,python-pytest-runner)
13748 ("python-unittest2" ,python-unittest2)
13749 ("unzip" ,unzip)))
13750 (home-page "https://github.com/greginvm/pyclipper")
13751 (synopsis "Wrapper for Angus Johnson's Clipper library")
13752 (description
13753 "Pyclipper is a Cython wrapper for the C++ translation of the
13754Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13755 (license license:expat)))
13756
13757(define-public python2-pyclipper
13758 (package-with-python2 python-pyclipper))
13759
13760(define-public python2-booleanoperations
13761 (package
13762 (name "python2-booleanoperations")
13763 (version "0.7.1")
13764 (source
13765 (origin
13766 (method url-fetch)
13767 (uri (pypi-uri "booleanOperations" version ".zip"))
13768 (sha256
13769 (base32
13770 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13771 (build-system python-build-system)
13772 (arguments
13773 `(#:python ,python-2))
13774 (native-inputs
13775 `(("unzip" ,unzip)
13776 ("python2-pytest" ,python2-pytest)
13777 ("python2-pytest-runner" ,python2-pytest-runner)))
13778 (propagated-inputs
13779 `(("python-fonttools" ,python2-fonttools)
13780 ("python-pyclipper" ,python2-pyclipper)
13781 ("python-ufolib" ,python2-ufolib)))
13782 (home-page "https://github.com/typemytype/booleanOperations")
13783 (synopsis "Boolean operations on paths")
13784 (description
13785 "BooleanOperations provides a Python library that enables
13786boolean operations on paths.")
13787 (license license:expat)))
13788
13789(define-public python-tempdir
13790 (package
13791 (name "python-tempdir")
13792 (version "0.7.1")
13793 (source
13794 (origin
13795 (method url-fetch)
13796 (uri (pypi-uri "tempdir" version))
13797 (sha256
13798 (base32
13799 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13800 (build-system python-build-system)
13801 (home-page "https://pypi.org/project/tempdir/")
13802 (arguments
13803 ;; the package has no tests
13804 '(#:tests? #f))
13805 (synopsis "Python library for managing temporary directories")
13806 (description
13807 "This library manages temporary directories that are automatically
13808deleted with all their contents when they are no longer needed. It is
13809particularly convenient for use in tests.")
13810 (license license:expat)))
13811
13812(define-public python2-tempdir
13813 (package-with-python2 python-tempdir))
13814
13815(define-public python-activepapers
13816 (package
13817 (name "python-activepapers")
13818 (version "0.2.2")
13819 (source
13820 (origin
13821 (method url-fetch)
13822 (uri (pypi-uri "ActivePapers.Py" version))
13823 (sha256
13824 (base32
13825 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13826 (build-system python-build-system)
13827 (arguments
13828 `(#:modules ((ice-9 ftw)
13829 (srfi srfi-1)
13830 (guix build utils)
13831 (guix build python-build-system))
13832
13833 #:phases
13834 (modify-phases %standard-phases
13835 (add-after 'unpack 'delete-python2-code
13836 (lambda _
13837 (for-each delete-file
13838 '("lib/activepapers/builtins2.py"
13839 "lib/activepapers/standardlib2.py"
13840 "lib/activepapers/utility2.py"))))
13841 (replace 'check
13842 (lambda _
13843 ;; Deactivate the test cases that download files
13844 (setenv "NO_NETWORK_ACCESS" "1")
13845 ;; For some strange reason, some tests fail if nosetests runs all
13846 ;; test modules in a single execution. They pass if each test
13847 ;; module is run individually.
13848 (for-each (lambda (filename)
13849 (invoke "nosetests"
13850 (string-append "tests/" filename)))
13851 (scandir "tests"
13852 (lambda (filename)
13853 (string-suffix? ".py" filename)))))))))
13854 (native-inputs
13855 `(("python-tempdir" ,python-tempdir)
13856 ("python-nose" ,python-nose)))
13857 (propagated-inputs
13858 `(("python-h5py" ,python-h5py)))
13859 (home-page "http://www.activepapers.org/")
13860 (synopsis "Executable papers for scientific computing")
13861 (description
13862 "ActivePapers is a tool for working with executable papers, which
13863combine data, code, and documentation in single-file packages,
13864suitable for publication as supplementary material or on repositories
13865such as figshare or Zenodo.")
13866 (properties `((python2-variant . ,(delay python2-activepapers))))
13867 (license license:bsd-3)))
13868
13869(define-public python2-activepapers
13870 (let ((base (package-with-python2
13871 (strip-python2-variant python-activepapers))))
13872 (package
13873 (inherit base)
13874 (arguments
13875 (substitute-keyword-arguments (package-arguments base)
13876 ((#:phases phases)
13877 `(modify-phases ,phases
13878 (delete 'delete-python2-code)
13879 (add-after 'unpack 'delete-python3-code
13880 (lambda _
13881 (for-each delete-file
13882 '("lib/activepapers/builtins3.py"
13883 "lib/activepapers/standardlib3.py"
13884 "lib/activepapers/utility3.py")))))))))))
13885
13886(define-public python-semver
13887 (package
13888 (name "python-semver")
13889 (version "2.7.9")
13890 (source
13891 (origin
13892 (method url-fetch)
13893 (uri (pypi-uri "semver" version))
13894 (sha256
13895 (base32
13896 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13897 (build-system python-build-system)
13898 (arguments
13899 `(#:phases
13900 (modify-phases %standard-phases
13901 (add-after 'unpack 'patch-test-requirements
13902 (lambda _
13903 (substitute* "setup.py"
13904 ;; Our Python is new enough.
13905 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13906 #t)))))
13907 (native-inputs
13908 `(("python-tox" ,python-tox)
13909 ("python-virtualenv" ,python-virtualenv)))
13910 (home-page "https://github.com/k-bx/python-semver")
13911 (synopsis "Python helper for Semantic Versioning")
13912 (description "This package provides a Python library for
13913@url{Semantic Versioning, http://semver.org/}.")
13914 (license license:bsd-3)))
13915
13916(define-public python2-semver
13917 (package-with-python2 python-semver))
13918
13919(define-public python-pyro4
13920 (package
13921 (name "python-pyro4")
ad1acb81 13922 (version "4.75")
44d10b1f
RW
13923 (source
13924 (origin
13925 (method url-fetch)
13926 (uri (pypi-uri "Pyro4" version))
13927 (sha256
ad1acb81 13928 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
44d10b1f
RW
13929 (build-system python-build-system)
13930 (propagated-inputs
13931 `(("python-serpent" ,python-serpent)))
13932 (home-page "https://pyro4.readthedocs.io")
13933 (synopsis "Distributed object middleware for Python")
13934 (description
13935 "Pyro enables you to build applications in which objects can talk to each
13936other over the network. You can just use normal Python method calls to call
13937objects on other machines, also known as remote procedure calls (RPC).")
13938 (license license:expat)))
13939
13940(define-public python2-pyro
13941 (package
13942 (name "python2-pyro")
13943 (version "3.16")
13944 (source
13945 (origin
13946 (method url-fetch)
13947 (uri (pypi-uri "Pyro" version))
13948 (file-name (string-append "Pyro-" version ".tar.gz"))
13949 (sha256
13950 (base32
13951 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13952 (build-system python-build-system)
13953 (arguments
13954 ;; Pyro is not compatible with Python 3
13955 `(#:python ,python-2
13956 ;; Pyro has no test cases for automatic execution
13957 #:tests? #f))
13958 (home-page "http://pythonhosted.org/Pyro/")
13959 (synopsis "Distributed object manager for Python")
13960 (description "Pyro is a Distributed Object Technology system
13961written in Python that is designed to be easy to use. It resembles
13962Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13963which is a system and language independent Distributed Object Technology
13964and has much more to offer than Pyro or RMI. Pyro 3.x is no
13965longer maintained. New projects should use Pyro4 instead, which
13966is the new Pyro version that is actively developed.")
13967 (license license:expat)))
13968
13969(define-public python2-scientific
13970 (package
13971 (name "python2-scientific")
13972 (version "2.9.4")
13973 (source
13974 (origin
13975 (method url-fetch)
13976 (uri (string-append "https://bitbucket.org/khinsen/"
13977 "scientificpython/downloads/ScientificPython-"
13978 version ".tar.gz"))
13979 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13980 (sha256
13981 (base32
13982 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13983 (build-system python-build-system)
13984 (inputs
13985 `(("netcdf" ,netcdf)))
13986 (propagated-inputs
13987 `(("python-numpy" ,python2-numpy-1.8)
13988 ("python-pyro" ,python2-pyro)))
13989 (arguments
13990 ;; ScientificPython is not compatible with Python 3
13991 `(#:python ,python-2
13992 #:tests? #f ; No test suite
13993 #:phases
13994 (modify-phases %standard-phases
13995 (replace 'build
13996 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13997 (invoke "python" "setup.py" "build"
13998 (string-append "--netcdf_prefix="
13999 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
14000 (home-page "https://bitbucket.org/khinsen/scientificpython")
14001 (synopsis "Python modules for scientific computing")
14002 (description "ScientificPython is a collection of Python modules that are
14003useful for scientific computing. Most modules are rather general (Geometry,
14004physical units, automatic derivatives, ...) whereas others are more
14005domain-specific (e.g. netCDF and PDB support). The library is currently
14006not actively maintained and works only with Python 2 and NumPy < 1.9.")
14007 (license license:cecill-c)))
14008
14009(define-public python2-mmtk
14010 (package
14011 (name "python2-mmtk")
14012 (version "2.7.11")
14013 (source
14014 (origin
14015 (method url-fetch)
14016 (uri (string-append "https://bitbucket.org/khinsen/"
14017 "mmtk/downloads/MMTK-" version ".tar.gz"))
14018 (file-name (string-append "MMTK-" version ".tar.gz"))
14019 (sha256
14020 (base32
14021 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14022 (build-system python-build-system)
14023 (native-inputs
14024 `(("netcdf" ,netcdf)))
14025 (propagated-inputs
14026 `(("python-scientific" ,python2-scientific)
14027 ("python-tkinter" ,python-2 "tk")))
14028 (arguments
14029 `(#:python ,python-2
14030 #:tests? #f
14031 #:phases
14032 (modify-phases %standard-phases
14033 (add-before 'build 'includes-from-scientific
14034 (lambda* (#:key inputs #:allow-other-keys)
14035 (mkdir-p "Include/Scientific")
14036 (copy-recursively
14037 (string-append
14038 (assoc-ref inputs "python-scientific")
14039 "/include/python2.7/Scientific")
14040 "Include/Scientific"))))))
14041 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14042 (synopsis "Python library for molecular simulation")
14043 (description "MMTK is a library for molecular simulations with an emphasis
14044on biomolecules. It provides widely used methods such as Molecular Dynamics
14045and normal mode analysis, but also basic routines for implementing new methods
14046for simulation and analysis. The library is currently not actively maintained
14047and works only with Python 2 and NumPy < 1.9.")
14048 (license license:cecill-c)))
14049
14050(define-public python-phonenumbers
14051 (package
14052 (name "python-phonenumbers")
14053 (version "8.9.1")
14054 (source
14055 (origin
14056 (method url-fetch)
14057 (uri (pypi-uri "phonenumbers" version))
14058 (sha256
14059 (base32
14060 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14061 (build-system python-build-system)
14062 (home-page
14063 "https://github.com/daviddrysdale/python-phonenumbers")
14064 (synopsis
14065 "Python library for dealing with international phone numbers")
14066 (description
14067 "This package provides a Python port of Google's libphonenumber library.")
14068 (license license:asl2.0)))
14069
14070(define-public python2-phonenumbers
14071 (package-with-python2 python-phonenumbers))
14072
14073(define-public python-send2trash
14074 (package
14075 (name "python-send2trash")
d9b0216b 14076 (version "1.5.0")
44d10b1f 14077 (source
d9b0216b 14078 (origin (method git-fetch)
44d10b1f 14079 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14080 (uri (git-reference
14081 (url "https://github.com/hsoft/send2trash.git")
14082 (commit version)))
14083 (file-name (git-file-name name version))
44d10b1f
RW
14084 (sha256
14085 (base32
d9b0216b 14086 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14087 (build-system python-build-system)
14088 (arguments
14089 '(#:phases
14090 (modify-phases %standard-phases
14091 (add-before 'check 'pre-check
14092 (lambda _
14093 (mkdir-p "/tmp/foo")
14094 (setenv "HOME" "/tmp/foo")
14095 #t)))))
14096 (home-page "https://github.com/hsoft/send2trash")
14097 (synopsis "Send files to the user's @file{~/Trash} directory")
14098 (description "This package provides a Python library to send files to the
14099user's @file{~/Trash} directory.")
20b3fde7 14100 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14101 (license license:bsd-3)))
14102
14103(define-public python2-send2trash
14104 (package
f32164ab 14105 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14106 (arguments
14107 (substitute-keyword-arguments (package-arguments python-send2trash)
14108 ((#:phases phases)
14109 `(modify-phases ,phases
14110 (add-before 'check 'setenv
14111 (lambda _
14112 (setenv "PYTHONPATH"
14113 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14114 #t))))))))
44d10b1f
RW
14115
14116(define-public python-yapf
14117 (package
14118 (name "python-yapf")
14119 (version "0.24.0")
14120 (source
14121 (origin
14122 (method url-fetch)
14123 (uri (pypi-uri "yapf" version))
14124 (sha256
14125 (base32
14126 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14127 (build-system python-build-system)
14128 (home-page "https://github.com/google/yapf")
14129 (synopsis "Formatter for Python code")
14130 (description "YAPF is a formatter for Python code. It's based off of
14131@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14132takes the code and reformats it to the best formatting that conforms to the
14133style guide, even if the original code didn't violate the style guide.")
14134 (license license:asl2.0)))
14135
14136(define-public python2-yapf
14137 (package-with-python2 python-yapf))
14138
14139(define-public python-gyp
14140 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14141 (revision "0"))
14142 (package
14143 (name "python-gyp")
14144 ;; Google does not release versions,
14145 ;; based on second most recent commit date.
14146 (version (git-version "0.0.0" revision commit))
14147 (source
14148 (origin
14149 ;; Google does not release tarballs,
14150 ;; git checkout is needed.
14151 (method git-fetch)
14152 (uri (git-reference
14153 (url "https://chromium.googlesource.com/external/gyp")
14154 (commit commit)))
14155 (file-name (git-file-name name version))
14156 (sha256
14157 (base32
14158 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14159 (build-system python-build-system)
14160 (home-page "https://gyp.gsrc.io/")
14161 (synopsis "GYP is a Meta-Build system")
14162 (description
14163 "GYP builds build systems for large, cross platform applications.
14164It can be used to generate XCode projects, Visual Studio projects, Ninja build
14165files, and Makefiles.")
14166 (license license:bsd-3))))
14167
14168(define-public python2-gyp
14169 (package-with-python2 python-gyp))
14170
14171(define-public python-whatever
14172 (package
14173 (name "python-whatever")
14174 (version "0.5")
14175 (source
14176 (origin
14177 (method url-fetch)
14178 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14179 ".tar.gz"))
14180 (sha256
14181 (base32
14182 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14183 (file-name (string-append name "-" version ".tar.gz"))))
14184 (build-system python-build-system)
14185 (arguments
14186 `(#:phases
14187 (modify-phases %standard-phases
14188 (replace 'check
14189 (lambda _
14190 (invoke "py.test"))))))
14191 (native-inputs
14192 `(("python-pytest" ,python-pytest)))
14193 (home-page "http://github.com/Suor/whatever")
14194 (synopsis "Make anonymous functions by partial application of operators")
14195 (description "@code{whatever} provides an easy way to make anonymous
14196functions by partial application of operators.")
14197 (license license:bsd-3)))
14198
14199(define-public python2-whatever
14200 (package-with-python2 python-whatever))
14201
14202(define-public python-funcy
14203 (package
14204 (name "python-funcy")
9e396ab8 14205 (version "1.11")
44d10b1f
RW
14206 (source
14207 (origin
a85c6027
TGR
14208 (method git-fetch)
14209 (uri (git-reference
14210 (url "https://github.com/Suor/funcy.git")
14211 (commit version)))
44d10b1f 14212 (sha256
a85c6027
TGR
14213 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14214 (file-name (git-file-name name version))))
44d10b1f
RW
14215 (build-system python-build-system)
14216 (arguments
14217 `(#:phases
14218 (modify-phases %standard-phases
14219 (replace 'check
14220 (lambda _
14221 (invoke "py.test"))))))
14222 (native-inputs
14223 `(("python-pytest" ,python-pytest)
14224 ("python-whatever" ,python-whatever)))
14225 (home-page "http://github.com/Suor/funcy")
14226 (synopsis "Functional tools")
14227 (description "@code{funcy} is a library that provides functional tools.
14228Examples are:
14229@enumerate
14230@item merge - Merges collections of the same type
14231@item walk - Type-preserving map
14232@item select - Selects a part of a collection
14233@item take - Takes the first n items of a collection
14234@item first - Takes the first item of a collection
14235@item remove - Predicated-removes items of a collection
14236@item concat - Concatenates two collections
14237@item flatten - Flattens a collection with subcollections
14238@item distinct - Returns only distinct items
14239@item split - Predicated-splits a collection
14240@item split_at - Splits a collection at a given item
14241@item group_by - Groups items by group
14242@item pairwise - Pairs off adjacent items
14243@item partial - Partially-applies a function
14244@item curry - Curries a function
14245@item compose - Composes functions
14246@item complement - Complements a predicate
14247@item all_fn - \"all\" with predicate
14248@end enumerate")
14249 (license license:bsd-3)))
14250
14251(define-public python2-funcy
14252 (package-with-python2 python-funcy))
14253
14254(define-public python-isoweek
14255 (package
14256 (name "python-isoweek")
14257 (version "1.3.3")
14258 (source
14259 (origin
14260 (method url-fetch)
14261 (uri (pypi-uri "isoweek" version))
14262 (sha256
14263 (base32
14264 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14265 (build-system python-build-system)
14266 (home-page "https://github.com/gisle/isoweek")
14267 (synopsis "Objects representing a week")
14268 (description "The @code{isoweek} module provide the class Week that
14269implements the week definition of ISO 8601. This standard also defines
14270a notation for identifying weeks; yyyyWww (where the W is a literal).
14271Week instances stringify to this form.")
14272 (license license:bsd-3)))
14273
14274(define-public python2-isoweek
14275 (package-with-python2 python-isoweek))
14276
14277(define-public python-tokenize-rt
14278 (package
14279 (name "python-tokenize-rt")
14280 (version "2.0.1")
14281 (source
14282 (origin
14283 (method url-fetch)
14284 (uri (pypi-uri "tokenize-rt" version))
14285 (sha256
14286 (base32
14287 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14288 (build-system python-build-system)
14289 (home-page "https://github.com/asottile/tokenize-rt")
14290 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14291 (description
14292 "This Python library is a wrapper around @code{tokenize} from the Python
14293standard library. It provides two additional tokens @code{ESCAPED_NL} and
14294@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14295and @code{tokens_to_src} to roundtrip.")
14296 (license license:expat)))
14297
14298(define-public python-future-fstrings
14299 (package
14300 (name "python-future-fstrings")
14301 (version "0.4.1")
14302 (source
14303 (origin
14304 (method url-fetch)
14305 (uri (pypi-uri "future_fstrings" version))
14306 (sha256
14307 (base32
14308 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14309 (build-system python-build-system)
14310 (propagated-inputs
14311 `(("python-tokenize-rt" ,python-tokenize-rt)))
14312 (home-page "https://github.com/asottile/future-fstrings")
14313 (synopsis "Backport of fstrings to Python < 3.6")
14314 (description
14315 "This package provides a UTF-8 compatible encoding
14316@code{future_fstrings}, which performs source manipulation. It decodes the
14317source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14318@code{f} strings.")
14319 (license license:expat)))
14320
dae2eb1c
MC
14321(define-public python-typed-ast
14322 (package
14323 (name "python-typed-ast")
14324 (version "1.3.5")
14325 (source
14326 (origin
14327 (method url-fetch)
14328 (uri (pypi-uri "typed-ast" version))
14329 (sha256
14330 (base32
14331 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14332 (build-system python-build-system)
14333 (arguments
14334 `(#:modules ((guix build utils)
14335 (guix build python-build-system)
14336 (ice-9 ftw)
14337 (srfi srfi-1)
14338 (srfi srfi-26))
14339 #:phases
14340 (modify-phases %standard-phases
14341 (replace 'check
14342 (lambda _
14343 (let ((cwd (getcwd)))
14344 (setenv "PYTHONPATH"
14345 (string-append cwd "/build/"
14346 (find (cut string-prefix? "lib" <>)
14347 (scandir (string-append cwd "/build")))
14348 ":"
14349 (getenv "PYTHONPATH"))))
14350 (invoke "pytest")
14351 #t)))))
14352 (native-inputs `(("python-pytest" ,python-pytest)))
14353 (home-page "https://github.com/python/typed_ast")
14354 (synopsis "Fork of Python @code{ast} modules with type comment support")
14355 (description "This package provides a parser similar to the standard
14356@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14357include PEP 484 type comments and are independent of the version of Python
14358under which they are run. The @code{typed_ast} parsers produce the standard
14359Python AST (plus type comments), and are both fast and correct, as they are
14360based on the CPython 2.7 and 3.7 parsers.")
14361 ;; See the file "LICENSE" for the details.
14362 (license (list license:psfl
14363 license:asl2.0
14364 license:expat)))) ;ast27/Parser/spark.py
14365
44d10b1f
RW
14366(define-public python-typing
14367 (package
14368 (name "python-typing")
14369 (version "3.6.6")
14370 (source
14371 (origin
14372 (method url-fetch)
14373 (uri (pypi-uri "typing" version))
14374 (sha256
14375 (base32
14376 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14377 (build-system python-build-system)
14378 (home-page "https://docs.python.org/3/library/typing.html")
14379 (synopsis "Type hints for Python")
14380 (description "This is a backport of the standard library @code{typing}
14381module to Python versions older than 3.5. Typing defines a standard notation
14382for Python function and variable type annotations. The notation can be used
14383for documenting code in a concise, standard format, and it has been designed
14384to also be used by static and runtime type checkers, static analyzers, IDEs
14385and other tools.")
14386 (license license:psfl)))
14387
14388(define-public python2-typing
14389 (package-with-python2 python-typing))
14390
f89d443b
VC
14391(define-public python-typing-extensions
14392 (package
14393 (name "python-typing-extensions")
14394 (version "3.7.2")
14395 (source
14396 (origin
14397 (method url-fetch)
14398 (uri (pypi-uri "typing_extensions" version))
14399 (sha256
14400 (base32
14401 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14402 (build-system python-build-system)
14403 (home-page
14404 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14405 (synopsis "Experimental type hints for Python")
14406 (description
14407 "The typing_extensions module contains additional @code{typing} hints not
14408yet present in the of the @code{typing} standard library.
14409Included are implementations of:
14410@enumerate
14411@item ClassVar
14412@item ContextManager
14413@item Counter
14414@item DefaultDict
14415@item Deque
14416@item NewType
14417@item NoReturn
14418@item overload
14419@item Protocol
14420@item runtime
14421@item Text
14422@item Type
14423@item TYPE_CHECKING
14424@item AsyncGenerator
14425@end enumerate\n")
14426 (license license:psfl)))
14427
44d10b1f
RW
14428(define-public bpython
14429 (package
14430 (name "bpython")
14431 (version "0.17.1")
14432 (source
14433 (origin
14434 (method url-fetch)
14435 (uri (pypi-uri "bpython" version))
14436 (sha256
14437 (base32
14438 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14439 (build-system python-build-system)
14440 (arguments
14441 `(#:phases
14442 (modify-phases %standard-phases
14443 (add-after 'unpack 'remove-failing-test
14444 (lambda _
14445 ;; Remove failing test. FIXME: make it pass
14446 (delete-file "bpython/test/test_args.py")
14447 #t))
14448 (add-after 'wrap 'add-aliases
14449 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14450 (lambda* (#:key outputs #:allow-other-keys)
14451 (let ((out (assoc-ref outputs "out")))
14452 (for-each
14453 (lambda (old new)
14454 (symlink old (string-append out "/bin/" new)))
14455 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14456 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14457 #t)))))
14458 (propagated-inputs
14459 `(("python-pygments" ,python-pygments)
14460 ("python-requests" ,python-requests)
14461 ("python-babel" ,python-babel) ; optional, for internationalization
14462 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14463 ("python-greenlet" ,python-greenlet)
14464 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14465 ("python-six" ,python-six)))
14466 (native-inputs
14467 `(("python-sphinx" ,python-sphinx)
14468 ("python-mock" ,python-mock)))
14469 (home-page "https://bpython-interpreter.org/")
14470 (synopsis "Fancy interface to the Python interpreter")
14471 (description "Bpython is a fancy interface to the Python
14472interpreter. bpython's main features are
14473
14474@enumerate
14475@item in-line syntax highlighting,
14476@item readline-like autocomplete with suggestions displayed as you type,
14477@item expected parameter list for any Python function,
14478@item \"rewind\" function to pop the last line of code from memory and
14479 re-evaluate,
14480@item send the code you've entered off to a pastebin,
14481@item save the code you've entered to a file, and
14482@item auto-indentation.
14483@end enumerate")
14484 (license license:expat)))
14485
14486(define-public bpython2
14487 (let ((base (package-with-python2
14488 (strip-python2-variant bpython))))
14489 (package (inherit base)
14490 (name "bpython2")
14491 (arguments
14492 `(#:python ,python-2
14493 #:phases
14494 (modify-phases %standard-phases
14495 (add-after 'unpack 'remove-failing-test
14496 (lambda _
14497 ;; Remove failing test. FIXME: make it pass
14498 (delete-file "bpython/test/test_args.py")
14499 ;; Disable failing test-cases (renaming inhibits they are
14500 ;; discovered)
14501 (substitute* "bpython/test/test_curtsies_repl.py"
14502 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14503 (string-append a "xxx_off_" b))
14504 (("^(\\s*def )(test_complex\\W)" _ a b)
14505 (string-append a "xxx_off_" b)))
14506 #t))
14507 (add-before 'build 'rename-scripts
14508 ;; rename the scripts to bypthon2, bpdb2, etc.
14509 (lambda _
14510 (substitute* "setup.py"
14511 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14512 (string-append name "2" rest "\n"))
14513 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14514 (string-append name "2" (or sub "") rest "\n")))
14515 #t))))))))
14516
14517(define-public python-pyinotify
14518 (package
14519 (name "python-pyinotify")
14520 (version "0.9.6")
14521 (source (origin
14522 (method url-fetch)
14523 (uri (pypi-uri "pyinotify" version))
14524 (sha256
14525 (base32
14526 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14527 (build-system python-build-system)
14528 (arguments `(#:tests? #f)) ;no tests
14529 (home-page "https://github.com/seb-m/pyinotify")
14530 (synopsis "Python library for monitoring inotify events")
14531 (description
14532 "@code{pyinotify} provides a Python interface for monitoring
14533file system events on Linux.")
14534 (license license:expat)))
14535
14536(define-public python2-pyinotify
14537 (package-with-python2 python-pyinotify))
14538
14539;; Ada parser uses this version.
14540(define-public python2-quex-0.67.3
14541 (package
14542 (name "python2-quex")
14543 (version "0.67.3")
14544 (source
14545 (origin
14546 (method url-fetch)
14547 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14548 (version-major+minor version)
14549 "/quex-" version ".zip"))
14550 (sha256
14551 (base32
14552 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14553 (build-system python-build-system)
14554 (native-inputs
14555 `(("unzip" ,unzip)))
14556 (arguments
14557 `(#:python ,python-2
14558 #:tests? #f
14559 #:phases
14560 (modify-phases %standard-phases
14561 (delete 'configure)
14562 (delete 'build)
14563 (replace 'install
14564 (lambda* (#:key outputs #:allow-other-keys)
14565 (let* ((out (assoc-ref outputs "out"))
14566 (share/quex (string-append out "/share/quex"))
14567 (bin (string-append out "/bin")))
14568 (copy-recursively "." share/quex)
14569 (mkdir-p bin)
14570 (symlink (string-append share/quex "/quex-exe.py")
14571 (string-append bin "/quex"))
14572 #t))))))
14573 (native-search-paths
14574 (list (search-path-specification
14575 (variable "QUEX_PATH")
14576 (files '("share/quex")))))
14577 (home-page "http://quex.sourceforge.net/")
14578 (synopsis "Lexical analyzer generator in Python")
14579 (description "@code{quex} is a lexical analyzer generator in Python.")
14580 (license license:lgpl2.1+))) ; Non-military
14581
14582(define-public python2-quex
14583 (package (inherit python2-quex-0.67.3)
14584 (name "python2-quex")
14585 (version "0.68.1")
14586 (source
14587 (origin
14588 (method url-fetch)
14589 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14590 (sha256
14591 (base32
14592 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14593 (file-name (string-append name "-" version ".tar.gz"))))))
14594
14595(define-public python-more-itertools
14596 (package
14597 (name "python-more-itertools")
14598 (version "4.3.0")
14599 (source
14600 (origin
14601 (method url-fetch)
14602 (uri (pypi-uri "more-itertools" version))
14603 (sha256
14604 (base32
14605 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14606 (build-system python-build-system)
14607 (arguments
14608 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14609 (%current-target-system)))
14610 '("armhf" "i686"))
14611 '(#:phases
14612 (modify-phases %standard-phases
14613 ;; This is required for 32-bit hardware.
14614 ;; TODO: Try to remove this when upgrading.
14615 (add-after 'unpack 'patch-test
14616 (lambda _
14617 (substitute* "more_itertools/tests/test_more.py"
14618 (("10 \\*\\* 10") "9 ** 9"))
14619 #t))))
14620 '())))
14621 (propagated-inputs
14622 `(("python-six" ,python-six-bootstrap)))
14623 (home-page "https://github.com/erikrose/more-itertools")
14624 (synopsis "More routines for operating on iterables, beyond itertools")
14625 (description "Python's built-in @code{itertools} module implements a
14626number of iterator building blocks inspired by constructs from APL, Haskell,
14627and SML. @code{more-itertools} includes additional building blocks for
14628working with iterables.")
14629 (license license:expat)))
14630
14631(define-public python2-more-itertools
14632 (package-with-python2 python-more-itertools))
14633
14634(define-public python-latexcodec
14635 (package
14636 (name "python-latexcodec")
91b61f02 14637 (version "1.0.6")
44d10b1f
RW
14638 (source
14639 (origin
14640 (method url-fetch)
14641 (uri (pypi-uri "latexcodec" version))
14642 (sha256
91b61f02 14643 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
44d10b1f
RW
14644 (build-system python-build-system)
14645 (inputs
14646 `(("python-six" ,python-six)))
14647 (home-page "https://readthedocs.org/projects/latexcodec/")
14648 (synopsis "Work with LaTeX code in Python")
14649 (description "Lexer and codec to work with LaTeX code in Python.")
14650 (license license:expat)))
14651
14652(define-public python-pybtex
14653 (package
14654 (name "python-pybtex")
14655 (version "0.21")
14656 (source
14657 (origin
14658 (method url-fetch)
14659 (uri (pypi-uri "pybtex" version))
14660 (sha256
14661 (base32
14662 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14663 (build-system python-build-system)
14664 (native-inputs
14665 `(("python-nose" ,python-nose)))
14666 (inputs
14667 `(("python-latexcodec" ,python-latexcodec)
14668 ("python-pyyaml" ,python-pyyaml)
14669 ("python-six" ,python-six)))
14670 (arguments
14671 `(#:test-target "nosetests"))
14672 (home-page "https://pybtex.org/")
14673 (synopsis "BibTeX-compatible bibliography processor")
14674 (description "Pybtex is a BibTeX-compatible bibliography processor written
14675in Python. You can simply type pybtex instead of bibtex.")
14676 (license license:expat)))
14677
14678(define-public python-onetimepass
14679 (package
14680 (name "python-onetimepass")
14681 (version "1.0.1")
14682 (source
14683 (origin
14684 (method url-fetch)
14685 (uri (pypi-uri "onetimepass" version))
14686 (sha256
14687 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14688 (build-system python-build-system)
14689 (propagated-inputs `(("python-six" ,python-six)))
14690 (home-page "https://github.com/tadeck/onetimepass/")
14691 (synopsis "One-time password library")
14692 (description "Python one-time password library for HMAC-based (HOTP) and
14693time-based (TOTP) passwords.")
14694 (license license:expat)))
14695
14696(define-public python-parso
14697 (package
14698 (name "python-parso")
14699 (version "0.3.1")
14700 (source
14701 (origin
14702 (method url-fetch)
14703 (uri (pypi-uri "parso" version))
14704 (sha256
14705 (base32
14706 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14707 (native-inputs
14708 `(("python-pytest" ,python-pytest)))
14709 (build-system python-build-system)
14710 (home-page "https://github.com/davidhalter/parso")
14711 (synopsis "Python Parser")
14712 (description "Parso is a Python parser that supports error recovery and
14713round-trip parsing for different Python versions (in multiple Python versions).
14714Parso is also able to list multiple syntax errors in your Python file.")
14715 (license license:expat)))
14716
14717(define-public python2-parso
14718 (package-with-python2 python-parso))
14719
14720(define-public python-async-generator
14721 (package
14722 (name "python-async-generator")
94fcbf8d 14723 (version "1.10")
44d10b1f
RW
14724 (source
14725 (origin
14726 (method url-fetch)
14727 (uri (pypi-uri "async_generator" version))
14728 (sha256
14729 (base32
94fcbf8d 14730 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
14731 (build-system python-build-system)
14732 (native-inputs
14733 `(("python-pytest" ,python-pytest)))
14734 (home-page "https://github.com/python-trio/async_generator")
14735 (synopsis "Async generators and context managers for Python 3.5+")
14736 (description "@code{async_generator} back-ports Python 3.6's native async
14737generators and Python 3.7's context managers into Python 3.5.")
14738 ;; Dual licensed.
14739 (license (list license:expat license:asl2.0))))
14740
14741(define-public python-async-timeout
14742 (package
14743 (name "python-async-timeout")
14744 (version "3.0.1")
14745 (source
14746 (origin
14747 (method url-fetch)
14748 (uri (pypi-uri "async-timeout" version))
14749 (sha256
14750 (base32
14751 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14752 (build-system python-build-system)
14753 (home-page "https://github.com/aio-libs/async_timeout/")
14754 (synopsis "Timeout context manager for asyncio programs")
14755 (description "@code{async-timeout} provides a timeout timeout context
14756manager compatible with @code{asyncio}.")
14757 (license license:asl2.0)))
14758
14759(define-public python-glob2
14760 (package
14761 (name "python-glob2")
14762 (version "0.6")
8fa2bcc7
TGR
14763 (source
14764 (origin
14765 (method git-fetch)
14766 (uri (git-reference
14767 (url "https://github.com/miracle2k/python-glob2.git")
14768 (commit version)))
14769 (file-name (git-file-name name version))
14770 (sha256
14771 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
44d10b1f
RW
14772 (build-system python-build-system)
14773 (home-page "https://github.com/miracle2k/python-glob2/")
14774 (synopsis "Extended Version of the python buildin glob module")
14775 (description "This is an extended version of the Python
14776@url{http://docs.python.org/library/glob.html, built-in glob module} which
14777adds:
14778
14779@itemize
14780@item The ability to capture the text matched by glob patterns, and return
14781those matches alongside the file names.
14782@item A recursive @code{**} globbing syntax, akin for example to the
14783@code{globstar} option of Bash.
14784@item The ability to replace the file system functions used, in order to glob
14785on virtual file systems.
14786@item Compatible with Python 2 and Python 3 (tested with 3.3).
14787@end itemize
14788
14789Glob2 currently based on the glob code from Python 3.3.1.")
14790 (license license:bsd-2)))
14791
14792(define-public python2-glob2
14793 (package-with-python2 python-glob2))
14794
14795(define-public python-gipc
14796 (package
14797 (name "python-gipc")
14798 (version "0.6.0")
14799 (source
14800 (origin
14801 (method url-fetch)
14802 (uri (pypi-uri "gipc" version ".zip"))
14803 (sha256
14804 (base32
14805 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14806 (build-system python-build-system)
14807 (native-inputs
14808 `(("unzip" ,unzip)))
14809 (propagated-inputs
14810 `(("python-gevent" ,python-gevent)))
14811 (home-page "http://gehrcke.de/gipc")
14812 (synopsis "Child process management in the context of gevent")
14813 (description "Usage of Python's multiprocessing package in a
14814gevent-powered application may raise problems. With @code{gipc},
14815process-based child processes can safely be created anywhere within a
14816gevent-powered application.")
14817 (license license:expat)))
14818
14819(define-public python2-gipc
14820 (package-with-python2 python-gipc))
14821
14822(define-public python-fusepy
14823 (package
14824 (name "python-fusepy")
14825 (version "2.0.4")
14826 (source
14827 (origin
14828 (method url-fetch)
14829 (uri (pypi-uri "fusepy" version))
14830 (sha256
14831 (base32
14832 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14833 (build-system python-build-system)
14834 (arguments
14835 `(#:phases
14836 (modify-phases %standard-phases
14837 (add-before 'build 'set-library-file-name
14838 (lambda* (#:key inputs #:allow-other-keys)
14839 (let ((fuse (assoc-ref inputs "fuse")))
14840 (substitute* "fuse.py"
14841 (("find_library\\('fuse'\\)")
14842 (string-append "'" fuse "/lib/libfuse.so'")))
14843 #t))))))
14844 (propagated-inputs
14845 `(("fuse" ,fuse)))
14846 (home-page "https://github.com/fusepy/fusepy")
14847 (synopsis "Simple ctypes bindings for FUSE")
14848 (description "Python module that provides a simple interface to FUSE and
14849MacFUSE. The binding is created using the standard @code{ctypes} library.")
14850 (license license:isc)))
14851
14852(define-public python2-fusepy
14853 (package-with-python2 python-fusepy))
14854
14855(define-public python2-gdrivefs
14856 (package
14857 (name "python2-gdrivefs")
14858 (version "0.14.9")
14859 (source
14860 (origin
14861 (method url-fetch)
14862 (uri (pypi-uri "gdrivefs" version))
14863 (sha256
14864 (base32
14865 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14866 (build-system python-build-system)
14867 (arguments
14868 `(#:python ,python-2
14869 #:phases
14870 (modify-phases %standard-phases
14871 (add-before 'build 'patch-setup-py
14872 (lambda _
14873 ;; Update requirements from dependency==version
14874 ;; to dependency>=version
14875 (substitute* "gdrivefs/resources/requirements.txt"
14876 (("==") ">="))
14877 #t)))))
14878 (native-inputs
14879 `(("python2-gipc" ,python2-gipc)
14880 ("python2-gevent" ,python2-gevent)
14881 ("python2-greenlet" ,python2-greenlet)
14882 ("python2-httplib2" ,python2-httplib2)
14883 ("python2-uritemplate" ,python2-uritemplate)
14884 ("python2-oauth2client" ,python2-oauth2client)
14885 ("python2-six" ,python2-six)))
14886 (propagated-inputs
14887 `(("python2-dateutil" ,python2-dateutil)
14888 ("python2-fusepy" ,python2-fusepy)
14889 ("python2-google-api-client" ,python2-google-api-client)))
14890 (home-page "https://github.com/dsoprea/GDriveFS")
14891 (synopsis "Mount Google Drive as a local file system")
14892 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14893under Python 2.7.")
14894 (license license:gpl2)))
14895
14896(define-public pybind11
14897 (package
14898 (name "pybind11")
14899 (version "2.2.4")
14900 (source (origin
14901 (method git-fetch)
14902 (uri (git-reference
14903 (url "https://github.com/pybind/pybind11.git")
14904 (commit (string-append "v" version))))
14905 (sha256
14906 (base32
14907 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14908 (file-name (git-file-name name version))))
14909 (build-system cmake-build-system)
14910 (native-inputs
14911 `(("python" ,python)
14912 ("python-pytest" ,python-pytest)))
14913 (arguments
14914 `(#:test-target "check"))
14915 (home-page "https://github.com/pybind/pybind11/")
14916 (synopsis "Seamless operability between C++11 and Python")
14917 (description "pybind11 is a lightweight header-only library that exposes
14918C++ types in Python and vice versa, mainly to create Python bindings of
14919existing C++ code. Its goals and syntax are similar to the excellent
14920Boost.Python library by David Abrahams: to minimize boilerplate code in
14921traditional extension modules by inferring type information using compile-time
14922introspection.")
14923 (license license:expat)))
14924
14925(define-public python-fasteners
14926 (package
14927 (name "python-fasteners")
14928 (version "0.14.1")
14929 (source
14930 (origin
14931 (method url-fetch)
14932 (uri (pypi-uri "fasteners" version))
14933 (sha256
14934 (base32
14935 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14936 (build-system python-build-system)
14937 (propagated-inputs
14938 `(("python-monotonic" ,python-monotonic)
14939 ("python-six" ,python-six)
14940 ("python-testtools" ,python-testtools)))
14941 (home-page "https://github.com/harlowja/fasteners")
14942 (synopsis "Python package that provides useful locks")
14943 (description
14944 "This package provides a Python program that provides following locks:
14945
14946@itemize
14947@item Locking decorator
14948@item Reader-writer locks
14949@item Inter-process locks
14950@item Generic helpers
14951@end itemize\n")
14952 (properties `((python2-variant . ,(delay python2-fasteners))))
14953 (license license:asl2.0)))
14954
14955(define-public python2-fasteners
14956 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14957 (package
14958 (inherit base)
14959 (propagated-inputs
14960 `(("python2-futures" ,python2-futures)
14961 ,@(package-propagated-inputs base))))))
14962
14963(define-public python-requests-file
14964 (package
14965 (name "python-requests-file")
14966 (version "1.4.3")
14967 (source
14968 (origin
14969 (method url-fetch)
14970 (uri (pypi-uri "requests-file" version))
14971 (sha256
14972 (base32
14973 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14974 (build-system python-build-system)
14975 (propagated-inputs
14976 `(("python-requests" ,python-requests)
14977 ("python-six" ,python-six)))
14978 (home-page
14979 "https://github.com/dashea/requests-file")
14980 (synopsis "File transport adapter for Requests")
14981 (description
14982 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 14983library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
14984 (license license:asl2.0)))
14985
14986(define-public python2-requests-file
14987 (package-with-python2 python-requests-file))
14988
14989(define-public python-tldextract
14990 (package
14991 (name "python-tldextract")
14992 (version "2.2.0")
14993 (source
14994 (origin
14995 (method url-fetch)
14996 (uri (pypi-uri "tldextract" version))
14997 (sha256
14998 (base32
14999 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15000 (build-system python-build-system)
15001 (native-inputs
15002 `(("python-pytest" ,python-pytest)
15003 ("python-responses" ,python-responses)))
15004 (propagated-inputs
15005 `(("python-idna" ,python-idna)
15006 ("python-requests" ,python-requests)
15007 ("python-requests-file" ,python-requests-file)))
15008 (home-page
15009 "https://github.com/john-kurkowski/tldextract")
15010 (synopsis
15011 "Separate the TLD from the registered domain and subdomains of a URL")
15012 (description
15013 "TLDExtract accurately separates the TLD from the registered domain and
15014subdomains of a URL, using the Public Suffix List. By default, this includes
15015the public ICANN TLDs and their exceptions. It can optionally support the
15016Public Suffix List's private domains as well.")
15017 (license license:bsd-3)))
15018
15019(define-public python2-tldextract
15020 (package-with-python2 python-tldextract))
15021
15022(define-public python-pynamecheap
15023 (package
15024 (name "python-pynamecheap")
15025 (version "0.0.3")
15026 (source
15027 (origin
15028 (method url-fetch)
15029 (uri (pypi-uri "PyNamecheap" version))
15030 (sha256
15031 (base32
15032 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15033 (build-system python-build-system)
15034 (propagated-inputs
15035 `(("python-requests" ,python-requests)))
15036 (home-page
15037 "https://github.com/Bemmu/PyNamecheap")
15038 (synopsis
15039 "Namecheap API client in Python")
15040 (description
15041 "PyNamecheap is a Namecheap API client in Python.")
15042 (license license:expat)))
15043
15044(define-public python2-pynamecheap
15045 (package-with-python2 python-pynamecheap))
15046
15047(define-public python-dns-lexicon
15048 (package
15049 (name "python-dns-lexicon")
15050 (version "2.4.0")
15051 (source
15052 (origin
15053 (method url-fetch)
15054 (uri (pypi-uri "dns-lexicon" version))
15055 (sha256
15056 (base32
15057 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15058 (build-system python-build-system)
15059 (arguments
15060 `(#:tests? #f)) ;requires internet access
15061 (propagated-inputs
15062 `(("python-future" ,python-future)
15063 ("python-pynamecheap" ,python-pynamecheap)
15064 ("python-requests" ,python-requests)
15065 ("python-tldextract" ,python-tldextract)
15066 ("python-urllib3" ,python-urllib3)))
15067 (home-page "https://github.com/AnalogJ/lexicon")
15068 (synopsis
15069 "Manipulate DNS records on various DNS providers")
15070 (description
15071 "Lexicon provides a way to manipulate DNS records on multiple DNS
15072providers in a standardized way. It has a CLI but it can also be used as a
15073Python library. It was designed to be used in automation, specifically with
15074Let's Encrypt.")
15075 (license license:expat)))
15076
15077(define-public python2-dns-lexicon
15078 (package-with-python2 python-dns-lexicon))
15079
15080(define-public python-commandlines
15081 (package
15082 (name "python-commandlines")
15083 (version "0.4.1")
15084 (source
15085 (origin
15086 (method url-fetch)
15087 (uri (pypi-uri "commandlines" version))
15088 (sha256
15089 (base32
15090 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15091 (build-system python-build-system)
15092 (home-page "https://github.com/chrissimpkins/commandlines")
15093 (synopsis "Command line argument to object parsing library")
15094 (description
15095 "@code{Commandlines} is a Python library for command line application
15096development that supports command line argument parsing, command string
15097validation testing and application logic.")
15098 (license license:expat)))
15099
15100;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15101;; python-numba. They have a very unflexible relationship.
15102(define-public python-numba
15103 (package
15104 (name "python-numba")
7757e6d8 15105 (version "0.42.0")
44d10b1f
RW
15106 (source
15107 (origin
15108 (method url-fetch)
15109 (uri (pypi-uri "numba" version))
15110 (sha256
15111 (base32
7757e6d8 15112 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
15113 (build-system python-build-system)
15114 (arguments
15115 `(#:modules ((guix build utils)
15116 (guix build python-build-system)
15117 (ice-9 ftw)
15118 (srfi srfi-1)
15119 (srfi srfi-26))
15120 #:phases
15121 (modify-phases %standard-phases
15122 (add-after 'unpack 'disable-proprietary-features
15123 (lambda _
15124 (setenv "NUMBA_DISABLE_HSA" "1")
15125 (setenv "NUMBA_DISABLE_CUDA" "1")
15126 #t))
15127 (add-after 'unpack 'remove-failing-tests
15128 (lambda _
15129 ;; FIXME: these tests fail for unknown reasons:
15130 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15131 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15132 (substitute* "numba/tests/test_dispatcher.py"
15133 (("def test(_non_writable_pycache)" _ m)
15134 (string-append "def guix_skip" m))
15135 (("def test(_non_creatable_pycache)" _ m)
15136 (string-append "def guix_skip" m))
15137 (("def test(_frozen)" _ m)
15138 (string-append "def guix_skip" m)))
15139
15140 ;; These tests fail because we don't run the tests from the build
15141 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15142 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15143 (substitute* "numba/tests/test_pycc.py"
15144 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15145 (string-append "def guix_skip" m)))
15146 #t))
15147 (replace 'check
15148 (lambda _
15149 (let ((cwd (getcwd)))
15150 (setenv "PYTHONPATH"
15151 (string-append cwd "/build/"
15152 (find (cut string-prefix? "lib" <>)
15153 (scandir (string-append cwd "/build")))
15154 ":"
15155 (getenv "PYTHONPATH")))
15156 ;; Something is wrong with the PYTHONPATH when running the
15157 ;; tests from the build directory, as it complains about not being
15158 ;; able to import certain modules.
15159 (with-directory-excursion "/tmp"
15160 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15161 #t)))))
15162 (propagated-inputs
15163 `(("python-llvmlite" ,python-llvmlite)
15164 ("python-numpy" ,python-numpy)
15165 ("python-singledispatch" ,python-singledispatch)))
15166 ;; Needed for tests.
15167 (inputs
15168 `(("python-jinja2" ,python-jinja2)
15169 ("python-pygments" ,python-pygments)))
15170 (home-page "https://numba.pydata.org")
15171 (synopsis "Compile Python code using LLVM")
15172 (description "Numba gives you the power to speed up your applications with
15173high performance functions written directly in Python. With a few
15174annotations, array-oriented and math-heavy Python code can be just-in-time
15175compiled to native machine instructions, similar in performance to C, C++ and
15176Fortran, without having to switch languages or Python interpreters.
15177
15178Numba works by generating optimized machine code using the LLVM compiler
15179infrastructure at import time, runtime, or statically (using the included pycc
15180tool).")
15181 (license license:bsd-3)))
15182
15183(define-public python-anndata
15184 (package
15185 (name "python-anndata")
8c9372c1 15186 (version "0.6.18")
44d10b1f
RW
15187 (source
15188 (origin
15189 (method url-fetch)
15190 (uri (pypi-uri "anndata" version))
15191 (sha256
15192 (base32
8c9372c1 15193 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15194 (build-system python-build-system)
15195 (propagated-inputs
15196 `(("python-h5py" ,python-h5py)
15197 ("python-natsort" ,python-natsort)
15198 ("python-pandas" ,python-pandas)
15199 ("python-scipy" ,python-scipy)))
15200 (home-page "https://github.com/theislab/anndata")
15201 (synopsis "Annotated data for data analysis pipelines")
15202 (description "Anndata is a package for simple (functional) high-level APIs
15203for data analysis pipelines. In this context, it provides an efficient,
15204scalable way of keeping track of data together with learned annotations and
15205reduces the code overhead typically encountered when using a mostly
15206object-oriented library such as @code{scikit-learn}.")
15207 (license license:bsd-3)))
15208
15209(define-public python-dill
15210 (package
15211 (name "python-dill")
c60b15cc 15212 (version "0.2.9")
44d10b1f
RW
15213 (source
15214 (origin
15215 (method url-fetch)
15216 (uri (pypi-uri "dill" version))
15217 (sha256
c60b15cc 15218 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
44d10b1f 15219 (build-system python-build-system)
c60b15cc 15220 ;; FIXME: The check phase fails with "don't know how to make test from: …".
44d10b1f
RW
15221 (arguments '(#:tests? #f))
15222 (home-page "https://pypi.org/project/dill")
15223 (synopsis "Serialize all of Python")
15224 (description "Dill extends Python's @code{pickle} module for serializing
15225and de-serializing Python objects to the majority of the built-in Python
15226types. Dill provides the user the same interface as the @code{pickle} module,
15227and also includes some additional features. In addition to pickling Python
15228objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15229session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15230interpreter session, close the interpreter, ship the pickled file to another
15231computer, open a new interpreter, unpickle the session and thus continue from
15232the saved state of the original interpreter session.")
15233 (license license:bsd-3)))
15234
15235(define-public python-multiprocess
15236 (package
15237 (name "python-multiprocess")
15238 (version "0.70.6.1")
15239 (source
15240 (origin
15241 (method url-fetch)
15242 (uri (pypi-uri "multiprocess" version))
15243 (sha256
15244 (base32
15245 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15246 (build-system python-build-system)
15247 (propagated-inputs
15248 `(("python-dill" ,python-dill)))
15249 (home-page "https://pypi.org/project/multiprocess")
15250 (synopsis "Multiprocessing and multithreading in Python")
15251 (description
15252 "This package is a fork of the multiprocessing Python package, a package
15253which supports the spawning of processes using the API of the standard
15254library's @code{threading} module.")
15255 (license license:bsd-3)))
15256
15257(define-public python-toolz
15258 (package
15259 (name "python-toolz")
15260 (version "0.9.0")
15261 (source
15262 (origin
15263 (method url-fetch)
15264 (uri (pypi-uri "toolz" version))
15265 (sha256
15266 (base32
15267 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15268 (build-system python-build-system)
15269 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15270 ;; unregistered loader type"
15271 (arguments '(#:tests? #f))
15272 (home-page "https://github.com/pytoolz/toolz/")
15273 (synopsis "List processing tools and functional utilities")
15274 (description
15275 "This package provides a set of utility functions for iterators,
15276functions, and dictionaries.")
15277 (license license:bsd-3)))
15278
15279(define-public python2-toolz
15280 (package-with-python2 python-toolz))
15281
15282(define-public python-cytoolz
15283 (package
15284 (name "python-cytoolz")
15285 (version "0.9.0.1")
15286 (source
15287 (origin
15288 (method url-fetch)
15289 (uri (pypi-uri "cytoolz" version))
15290 (sha256
15291 (base32
15292 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15293 (build-system python-build-system)
15294 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15295 ;; 'exceptions'"
15296 (arguments '(#:tests? #f))
15297 (propagated-inputs
15298 `(("python-toolz" ,python-toolz)))
15299 (native-inputs
15300 `(("python-cython" ,python-cython)))
15301 (home-page "https://github.com/pytoolz/cytoolz")
15302 (synopsis "High performance functional utilities")
15303 (description
15304 "The cytoolz package implements the same API as provided by toolz. The
15305main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15306that is accessible to other projects developed in Cython.")
15307 (license license:bsd-3)))
15308
15309(define-public python-sortedcontainers
15310 (package
15311 (name "python-sortedcontainers")
15312 (version "2.0.4")
15313 (source
15314 (origin
15315 (method url-fetch)
15316 (uri (pypi-uri "sortedcontainers" version))
15317 (sha256
15318 (base32
15319 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15320 (build-system python-build-system)
15321 (native-inputs
15322 `(("python-tox" ,python-tox)))
15323 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15324 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15325 (description
15326 "This package provides a sorted collections library, written in
15327pure-Python.")
15328 (license license:asl2.0)))
15329
15330(define-public python-cloudpickle
15331 (package
15332 (name "python-cloudpickle")
15333 (version "0.6.1")
15334 (source
15335 (origin
15336 (method url-fetch)
15337 (uri (pypi-uri "cloudpickle" version))
15338 (sha256
15339 (base32
15340 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15341 (build-system python-build-system)
15342 ;; FIXME: there are 5 errors in 122 tests:
15343 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15344 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15345 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15346 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15347 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15348 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15349 (arguments '(#:tests? #f))
15350 (native-inputs
15351 `(("python-pytest" ,python-pytest)
15352 ("python-mock" ,python-mock)
15353 ("python-tornado" ,python-tornado)))
15354 (home-page "https://github.com/cloudpipe/cloudpickle")
15355 (synopsis "Extended pickling support for Python objects")
15356 (description
15357 "Cloudpickle makes it possible to serialize Python constructs not
15358supported by the default pickle module from the Python standard library. It
15359is especially useful for cluster computing where Python expressions are
15360shipped over the network to execute on remote hosts, possibly close to the
15361data.")
15362 (license license:bsd-3)))
15363
15364(define-public python2-cloudpickle
15365 (package-with-python2 python-cloudpickle))
15366
15367(define-public python-locket
15368 (package
15369 (name "python-locket")
15370 (version "0.2.0")
15371 (source
15372 (origin
15373 (method url-fetch)
15374 (uri (pypi-uri "locket" version))
15375 (sha256
15376 (base32
15377 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15378 (build-system python-build-system)
15379 (home-page "https://github.com/mwilliamson/locket.py")
15380 (synopsis "File-based locks for Python")
15381 (description
15382 "Locket implements a lock that can be used by multiple processes provided
15383they use the same path.")
15384 (license license:bsd-2)))
15385
15386(define-public python2-locket
15387 (package-with-python2 python-locket))
15388
15389(define-public python-blosc
15390 (package
15391 (name "python-blosc")
15392 (version "1.5.1")
15393 (source
15394 (origin
15395 (method url-fetch)
15396 (uri (pypi-uri "blosc" version))
15397 (sha256
15398 (base32
15399 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15400 (build-system python-build-system)
15401 ;; FIXME: all tests pass, but then this error is printed:
15402 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15403 (arguments '(#:tests? #f))
15404 (propagated-inputs
15405 `(("python-numpy" ,python-numpy)))
15406 (home-page "https://github.com/blosc/python-blosc")
15407 (synopsis "Python wrapper for the Blosc data compressor library")
15408 (description "Blosc is a high performance compressor optimized for binary
15409data. It has been designed to transmit data to the processor cache faster
15410than the traditional, non-compressed, direct memory fetch approach via a
15411@code{memcpy()} system call.
15412
15413Blosc works well for compressing numerical arrays that contains data with
15414relatively low entropy, like sparse data, time series, grids with
15415regular-spaced values, etc.
15416
15417This Python package wraps the Blosc library.")
15418 (license license:bsd-3)))
15419
15420(define-public python2-blosc
15421 (package-with-python2 python-blosc))
15422
15423(define-public python-partd
15424 (package
15425 (name "python-partd")
15426 (version "0.3.9")
15427 (source
15428 (origin
15429 (method url-fetch)
15430 (uri (pypi-uri "partd" version))
15431 (sha256
15432 (base32
15433 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15434 (build-system python-build-system)
15435 (propagated-inputs
15436 `(("python-blosc" ,python-blosc)
15437 ("python-locket" ,python-locket)
15438 ("python-numpy" ,python-numpy)
15439 ("python-pandas" ,python-pandas)
15440 ("python-pyzmq" ,python-pyzmq)
15441 ("python-toolz" ,python-toolz)))
15442 (home-page "https://github.com/dask/partd/")
15443 (synopsis "Appendable key-value storage")
15444 (description "Partd stores key-value pairs. Values are raw bytes. We
15445append on old values. Partd excels at shuffling operations.")
15446 (license license:bsd-3)))
15447
15448(define-public python2-partd
15449 (package-with-python2 python-partd))
15450
15451(define-public python-dask
15452 (package
15453 (name "python-dask")
0998175f 15454 (version "1.2.2")
44d10b1f
RW
15455 (source
15456 (origin
15457 (method url-fetch)
15458 (uri (pypi-uri "dask" version))
15459 (sha256
0998175f 15460 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
44d10b1f
RW
15461 (build-system python-build-system)
15462 ;; A single test out of 5000+ fails. This test is marked as xfail when
15463 ;; pytest-xdist is used.
15464 (arguments
15465 `(#:phases
15466 (modify-phases %standard-phases
15467 (add-after 'unpack 'disable-broken-test
15468 (lambda _
15469 (substitute* "dask/tests/test_threaded.py"
15470 (("def test_interrupt\\(\\)" m)
15471 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15472 m)))
15473 (when (which "python2")
15474 ;; This test fails with recent Pandas:
15475 ;; <https://github.com/dask/dask/issues/3794>.
15476 (substitute* "dask/dataframe/tests/test_dataframe.py"
15477 (("def test_info\\(\\)" m)
15478 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15479 m))))
15480 #t))
15481 (replace 'check
15482 (lambda _ (invoke "pytest" "-vv"))))))
15483 (propagated-inputs
15484 `(("python-cloudpickle" ,python-cloudpickle)
15485 ("python-numpy" ,python-numpy)
15486 ("python-pandas" ,python-pandas)
15487 ("python-partd" ,python-partd)
15488 ("python-toolz" ,python-toolz)
15489 ("python-pyyaml" ,python-pyyaml)))
15490 (native-inputs
15491 `(("python-pytest" ,python-pytest)
15492 ("python-pytest-runner" ,python-pytest-runner)))
15493 (home-page "https://github.com/dask/dask/")
15494 (synopsis "Parallel computing with task scheduling")
15495 (description
15496 "Dask is a flexible parallel computing library for analytics. It
15497consists of two components: dynamic task scheduling optimized for computation,
15498and large data collections like parallel arrays, dataframes, and lists that
15499extend common interfaces like NumPy, Pandas, or Python iterators to
15500larger-than-memory or distributed environments. These parallel collections
15501run on top of the dynamic task schedulers. ")
15502 (license license:bsd-3)))
15503
15504(define-public python2-dask
15505 (package-with-python2 python-dask))
15506
15507(define-public python-ilinkedlist
15508 (package
15509 (name "python-ilinkedlist")
15510 (version "0.4.0")
15511 (source
15512 (origin
15513 (method url-fetch)
15514 (uri (pypi-uri "ilinkedlist" version))
15515 (sha256
15516 (base32
15517 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15518 (build-system python-build-system)
15519 (native-inputs `(("python-pytest" ,python-pytest)))
15520 (inputs `(("python" ,python)))
15521 (home-page "https://github.com/luther9/ilinkedlist-py")
15522 (synopsis "Immutable linked list library")
15523 (description
15524 "This is a implementation of immutable linked lists for Python. It
15525contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15526Since a linked list is treated as immutable, it is hashable, and its length
15527can be retrieved in constant time. Some of the terminology is inspired by
15528LISP. It is possible to create an improper list by creating a @code{Pair}
15529with a non-list @code{cdr}.")
15530 (license license:gpl3+)))
15531
15532(define-public python-readlike
15533 (package
15534 (name "python-readlike")
15535 (version "0.1.3")
15536 (source
15537 (origin
15538 (method url-fetch)
15539 (uri (pypi-uri "readlike" version))
15540 (sha256
15541 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15542 (build-system python-build-system)
15543 (home-page "https://github.com/jangler/readlike")
15544 (synopsis "GNU Readline-like line editing module")
15545 (description
15546 "This Python module provides line editing functions similar to the default
15547Emacs-style ones of GNU Readline. Unlike the Python standard library's
15548@code{readline} package, this one allows access to those capabilties in settings
15549outside of a standard command-line interface. It is especially well-suited to
15550interfacing with Urwid, due to a shared syntax for describing key inputs.
15551
15552Currently, all stateless Readline commands are implemented. Yanking and history
15553are not supported.")
15554 (license license:expat)))
15555
15556(define-public python2-readlike
15557 (package-with-python2 python-readlike))
15558
15559(define-public python-reparser
15560 (package
15561 (name "python-reparser")
15562 (version "1.4.3")
15563 (source
15564 (origin
15565 (method url-fetch)
15566 (uri (pypi-uri "ReParser" version))
15567 (sha256
15568 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15569 (build-system python-build-system)
15570 (home-page "https://github.com/xmikos/reparser")
15571 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15572 (description
15573 "This Python library provides a simple lexer/parser for inline markup based
15574on regular expressions.")
15575 (license license:expat)))
15576
15577(define-public python2-reparser
15578 (let ((reparser (package-with-python2
15579 (strip-python2-variant python-reparser))))
15580 (package (inherit reparser)
15581 (propagated-inputs
15582 `(("python2-enum34" ,python2-enum34)
15583 ,@(package-propagated-inputs reparser))))))
15584
15585(define-public python-precis-i18n
15586 (package
15587 (name "python-precis-i18n")
15588 (version "1.0.0")
15589 (source
15590 (origin
15591 (method url-fetch)
15592 (uri (pypi-uri "precis_i18n" version))
15593 (sha256
15594 (base32
15595 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15596 (build-system python-build-system)
15597 (home-page "https://github.com/byllyfish/precis_i18n")
15598 (synopsis "Implementation of the PRECIS framework")
15599 (description
15600 "This module implements the PRECIS Framework as described in RFC 8264,
15601RFC 8265 and RFC 8266.")
15602 (license license:expat)))
15603
d0446c4b
RW
15604(define-public python-absl-py
15605 (package
15606 (name "python-absl-py")
15607 (version "0.6.1")
15608 (source
15609 (origin
15610 (method url-fetch)
15611 (uri (pypi-uri "absl-py" version))
15612 (sha256
15613 (base32
15614 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15615 (build-system python-build-system)
15616 (propagated-inputs
15617 `(("python-six" ,python-six)))
15618 (home-page "https://github.com/abseil/abseil-py")
15619 (synopsis "Abseil Python common libraries")
15620 (description
15621 "This package provides the Abseil Python Common Libraries, a collection
15622of Python libraries for building Python applications.")
15623 (license license:asl2.0)))
15624
81bed4e9
RW
15625(define-public python-astor
15626 (package
15627 (name "python-astor")
15628 (version "0.7.1")
15629 (source
15630 (origin
15631 (method url-fetch)
15632 (uri (pypi-uri "astor" version))
15633 (sha256
15634 (base32
15635 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15636 (build-system python-build-system)
15637 ;; FIXME: There are two errors and two test failures.
15638 (arguments `(#:tests? #f))
15639 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 15640 (synopsis "Read and write Python ASTs")
81bed4e9 15641 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 15642source via the Abstract Syntax Tree.")
81bed4e9
RW
15643 (license license:bsd-3)))
15644
39ee82ff
RW
15645(define-public python2-astor
15646 (package-with-python2 python-astor))
15647
22e623ae
RW
15648(define-public python-grpcio
15649 (package
15650 (name "python-grpcio")
15651 (version "1.17.1")
15652 (source
15653 (origin
15654 (method url-fetch)
15655 (uri (pypi-uri "grpcio" version))
15656 (sha256
15657 (base32
15658 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15659 (build-system python-build-system)
15660 (propagated-inputs
15661 `(("python-six" ,python-six)))
15662 (home-page "https://grpc.io")
15663 (synopsis "HTTP/2-based RPC framework")
15664 (description "This package provides a Python library for communicating
15665with the HTTP/2-based RPC framework gRPC.")
15666 (license license:asl2.0)))
15667
79869f80
RW
15668(define-public python-astunparse
15669 (package
15670 (name "python-astunparse")
47d79541 15671 (version "1.6.2")
79869f80
RW
15672 (source
15673 (origin
15674 (method url-fetch)
15675 (uri (pypi-uri "astunparse" version))
15676 (sha256
47d79541 15677 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 15678 (build-system python-build-system)
47d79541 15679 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
15680 (propagated-inputs
15681 `(("python-six" ,python-six)
15682 ("python-wheel" ,python-wheel)))
15683 (home-page "https://github.com/simonpercivall/astunparse")
15684 (synopsis "AST unparser for Python")
15685 (description "This package provides an AST unparser for Python. It is a
15686factored out version of @code{unparse} found in the Python source
15687distribution.")
15688 (license license:bsd-3)))
15689
2884aac0
RW
15690(define-public python-gast
15691 (package
15692 (name "python-gast")
bd300261 15693 (version "0.2.2")
2884aac0
RW
15694 (source
15695 (origin
15696 (method url-fetch)
15697 (uri (pypi-uri "gast" version))
15698 (sha256
bd300261 15699 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
15700 (build-system python-build-system)
15701 (propagated-inputs
15702 `(("python-astunparse" ,python-astunparse)))
15703 (home-page "https://pypi.org/project/gast/")
15704 (synopsis "Generic Python AST that abstracts the underlying Python version")
15705 (description
15706 "GAST provides a compatibility layer between the AST of various Python
15707versions, as produced by @code{ast.parse} from the standard @code{ast}
15708module.")
15709 (license license:bsd-3)))
15710
44d10b1f
RW
15711(define-public python-wikidata
15712 (package
15713 (name "python-wikidata")
15714 (version "0.6.1")
15715 (source
15716 (origin
15717 (method url-fetch)
15718 (uri (pypi-uri "Wikidata" version))
15719 (sha256
15720 (base32
15721 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15722 (build-system python-build-system)
15723 (propagated-inputs
15724 `(("python-babel" ,python-babel)))
15725 (home-page "https://github.com/dahlia/wikidata")
15726 (synopsis "Wikidata client library")
15727 (description
15728 "This package provides a Python interface to
15729@url{https://www.wikidata.org/, Wikidata}.")
15730 (properties '((upstream-name . "Wikidata")))
15731 (license license:gpl3+)))
15732
15733(define-public python-doctest-ignore-unicode
15734 (package
15735 (name "python-doctest-ignore-unicode")
15736 (version "0.1.2")
15737 (source
15738 (origin
15739 (method url-fetch)
15740 (uri (pypi-uri "doctest-ignore-unicode" version))
15741 (sha256
15742 (base32
15743 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15744 (build-system python-build-system)
15745 (native-inputs
15746 `(("python-nose" ,python-nose)))
15747 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15748 (synopsis "Ignore Unicode literal prefixes in doctests")
15749 (description
15750 "This package adds support for a flag to ignore Unicode literal prefixes
15751in doctests.")
15752 (license license:asl2.0)))
15753
15754(define-public python-attr
15755 (package
15756 (name "python-attr")
15757 (version "0.3.1")
15758 (source
15759 (origin
15760 (method url-fetch)
15761 (uri (pypi-uri "attr" version))
15762 (sha256
15763 (base32
15764 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15765 (build-system python-build-system)
15766 (home-page "https://github.com/denis-ryzhkov/attr")
15767 (synopsis "Decorator for attributes of target function or class")
15768 (description "Simple decorator to set attributes of target function or
15769class in a @acronym{DRY, Don't Repeat Yourself} way.")
15770 (license license:expat)))
f98232a3
VC
15771
15772(define-public python-construct
15773 (package
15774 (name "python-construct")
15775 (version "2.9.45")
15776 (source
15777 (origin
15778 (method url-fetch)
15779 (uri (pypi-uri "construct" version))
15780 (sha256
15781 (base32
15782 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15783 (build-system python-build-system)
15784 (arguments
15785 `(#:tests? #f)) ; No tests exist.
15786 (propagated-inputs
15787 `(("python-extras" ,python-extras)
15788 ("python-arrow" ,python-arrow)
15789 ("python-numpy" ,python-numpy)
15790 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15791 (home-page "http://construct.readthedocs.io")
15792 (synopsis "Declarative and symmetrical parser and builder for binary data")
15793 (description
15794 "This package provides both simple, atomic constructs (such as
15795integers of various sizes), as well as composite ones which allow you
15796form hierarchical and sequential structures of increasing complexity.
15797It features bit and byte granularity, easy debugging and testing, an
15798easy-to-extend subclass system, and lots of primitive constructs to
15799make your work easier.")
15800 (license license:expat)))
b742c006
LF
15801
15802(define-public python-humanize
15803 (package
15804 (name "python-humanize")
15805 (version "0.5.1")
15806 (source
15807 (origin
15808 (method url-fetch)
15809 (uri (pypi-uri "humanize" version))
15810 (sha256
15811 (base32
15812 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15813 (arguments
15814 '(#:tests? #f)) ; tests not in pypi archive
15815 (build-system python-build-system)
15816 (home-page "https://github.com/jmoiron/humanize")
15817 (synopsis "Print numerical information in a human-readable form")
15818 (description "This package provides a Python module that displays numbers
15819and dates in \"human readable\" forms. For example, it would display
15820\"12345591313\" as \"12.3 billion\".")
15821 (license license:expat)))
d5bbf66d
LF
15822
15823(define-public python-txaio
15824 (package
15825 (name "python-txaio")
15826 (version "18.8.1")
15827 (source
15828 (origin
15829 (method url-fetch)
15830 (uri (pypi-uri "txaio" version))
15831 (sha256
15832 (base32
15833 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15834 (build-system python-build-system)
15835 (propagated-inputs
15836 `(("python-twisted" ,python-twisted)
15837 ("python-six" ,python-six)))
15838 (home-page "https://github.com/crossbario/txaio")
15839 (synopsis "Compatibility layer between Python asyncio and Twisted")
15840 (description "Txaio provides a compatibility layer between the Python
15841@code{asyncio} module and @code{Twisted}.")
15842 (license license:expat)))
963dfd3a
RW
15843
15844(define-public python-toolshed
15845 (package
15846 (name "python-toolshed")
15847 (version "0.4.6")
15848 (source
15849 (origin
15850 (method url-fetch)
15851 (uri (pypi-uri "toolshed" version))
15852 (sha256
15853 (base32
15854 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15855 (build-system python-build-system)
15856 (native-inputs
15857 `(("python-nose" ,python-nose)))
15858 (home-page "https://github.com/brentp/toolshed/")
15859 (synopsis "Collection of modules and functions for working with data")
15860 (description "This is a collection of well-tested, simple modules and
15861functions that aim to reduce boilerplate when working with data.")
15862 (license license:bsd-2)))
c91ecf2d
RW
15863
15864(define-public python-annoy
15865 (package
15866 (name "python-annoy")
15867 (version "1.15.1")
15868 (source
15869 (origin
15870 (method url-fetch)
15871 (uri (pypi-uri "annoy" version))
15872 (sha256
15873 (base32
15874 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15875 (build-system python-build-system)
15876 (native-inputs
15877 `(("python-nose" ,python-nose)))
15878 (home-page "https://github.com/spotify/annoy/")
15879 (synopsis "Approximate nearest neighbors library")
15880 (description
15881 "Annoy is a C++ library with Python bindings to search for points in
15882space that are close to a given query point. It also creates large read-only
15883file-based data structures that are @code{mmap}ped into memory so that many
15884processes may share the same data.")
15885 (license license:asl2.0)))
412342d1 15886
79bfa422 15887(define-public python-pylzma
412342d1 15888 (package
79bfa422
DM
15889 (name "python-pylzma")
15890 (version "0.5.0")
15891 (source
15892 (origin
15893 (method url-fetch)
15894 (uri (pypi-uri "pylzma" version))
15895 (sha256
15896 (base32
15897 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 15898 (build-system python-build-system)
79bfa422
DM
15899 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15900 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15901 (description "This package provides Python bindings for the LZMA library
15902by Igor Pavlov.")
15903 (license license:lgpl2.1+)))
15904
15905(define-public python2-pylzma
15906 (package-with-python2 python-pylzma))
f825e605 15907
6609ebe7
AG
15908(define-public python2-zeroconf
15909 (package
15910 (name "python2-zeroconf")
15911
15912 ;; This is the last version that supports Python 2.x.
15913 (version "0.19.1")
15914 (source
15915 (origin
15916 (method url-fetch)
15917 (uri (pypi-uri "zeroconf" version))
15918 (sha256
15919 (base32
15920 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15921 (build-system python-build-system)
15922 (arguments
15923 `(#:python ,python-2
15924 #:phases
15925 (modify-phases %standard-phases
15926 (add-after 'unpack 'patch-requires
15927 (lambda* (#:key inputs #:allow-other-keys)
15928 (substitute* "setup.py"
15929 (("enum-compat")
15930 "enum34"))
15931 #t)))))
15932 (native-inputs
15933 `(("python2-six" ,python2-six)
15934 ("python2-enum32" ,python2-enum34)
15935 ("python2-netifaces" ,python2-netifaces)
15936 ("python2-typing" ,python2-typing)))
15937 (home-page "https://github.com/jstasiak/python-zeroconf")
15938 (synopsis "Pure Python mDNS service discovery")
15939 (description
15940 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15941compatible).")
15942 (license license:lgpl2.1+)))
15943
f825e605
GLV
15944(define-public python-bsddb3
15945 (package
15946 (name "python-bsddb3")
15947 (version "6.2.6")
15948 (source
15949 (origin
15950 (method url-fetch)
15951 (uri (pypi-uri "bsddb3" version))
15952 (sha256
15953 (base32
15954 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15955 (build-system python-build-system)
15956 (inputs
15957 `(("bdb" ,bdb)))
15958 (arguments
15959 '(#:phases
15960 (modify-phases %standard-phases
15961 (add-after 'unpack 'configure-locations
15962 (lambda* (#:key inputs #:allow-other-keys)
15963 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
15964 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
15965 #t))
15966 (replace 'check
15967 (lambda _
15968 (invoke "python3" "test3.py" "-v"))))))
15969 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15970 (synopsis "Python bindings for Oracle Berkeley DB")
15971 (description
15972 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
15973C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
15974Transaction objects, and each of these is exposed as a Python type in the
15975bsddb3.db module. The database objects can use various access methods: btree,
15976hash, recno, and queue. Complete support of Berkeley DB distributed
15977transactions. Complete support for Berkeley DB Replication Manager.
15978Complete support for Berkeley DB Base Replication. Support for RPC.")
15979 (license license:bsd-3)))
edeb04bf
PL
15980
15981(define-public python-dbfread
15982 (package
15983 (name "python-dbfread")
15984 (version "2.0.7")
15985 (source (origin
15986 (method url-fetch)
15987 (uri (pypi-uri "dbfread" version))
15988 (sha256
15989 (base32
15990 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
15991 (build-system python-build-system)
15992 (native-inputs
15993 `(("python-pytest" ,python-pytest)))
15994 (home-page "https://dbfread.readthedocs.io")
15995 (synopsis "Read DBF Files with Python")
15996 (description
15997 "This library reads DBF files and returns the data as native Python data
15998types for further processing. It is primarily intended for batch jobs and
15999one-off scripts.")
16000 (license license:expat)))
e308b4f0
JM
16001
16002(define-public python-cached-property
16003 (package
16004 (name "python-cached-property")
16005 (version "1.5.1")
16006 (source
16007 (origin
16008 (method url-fetch)
16009 (uri (pypi-uri "cached-property" version))
16010 (sha256
16011 (base32
16012 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16013 (build-system python-build-system)
16014 (arguments
16015 `(#:phases
16016 (modify-phases %standard-phases
16017 ;; https://github.com/pydanny/cached-property/issues/131
16018 ;; recent versions of freezegun break one test
16019 (add-after 'unpack 'disable-broken-test
16020 (lambda _
16021 (substitute* "tests/test_cached_property.py"
16022 (("def test_threads_ttl_expiry\\(self\\)" m)
16023 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16024 " " m)))
16025 #t)))))
16026 (native-inputs
16027 `(("python-freezegun" ,python-freezegun)))
16028 (home-page
16029 "https://github.com/pydanny/cached-property")
16030 (synopsis
16031 "Decorator for caching properties in classes")
16032 (description
16033 "This package provides a decorator which makes caching
16034time-or-computationally-expensive properties quick and easy and works in Python
160352 or 3.")
16036 (license license:bsd-3)))