gnu: python-beautifulsoup4: Use INVOKE.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 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>
14 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 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>
26 ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
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>
47 ;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
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>
54 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;;
61 ;;; This file is part of GNU Guix.
62 ;;;
63 ;;; GNU Guix is free software; you can redistribute it and/or modify it
64 ;;; under the terms of the GNU General Public License as published by
65 ;;; the Free Software Foundation; either version 3 of the License, or (at
66 ;;; your option) any later version.
67 ;;;
68 ;;; GNU Guix is distributed in the hope that it will be useful, but
69 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
70 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
71 ;;; GNU General Public License for more details.
72 ;;;
73 ;;; You should have received a copy of the GNU General Public License
74 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
75
76 (define-module (gnu packages python-xyz)
77 #:use-module ((guix licenses) #:prefix license:)
78 #:use-module (gnu packages)
79 #:use-module (gnu packages algebra)
80 #:use-module (gnu packages adns)
81 #:use-module (gnu packages attr)
82 #:use-module (gnu packages backup)
83 #:use-module (gnu packages bash)
84 #:use-module (gnu packages check)
85 #:use-module (gnu packages compression)
86 #:use-module (gnu packages crypto)
87 #:use-module (gnu packages databases)
88 #:use-module (gnu packages file)
89 #:use-module (gnu packages fontutils)
90 #:use-module (gnu packages gcc)
91 #:use-module (gnu packages geo)
92 #:use-module (gnu packages ghostscript)
93 #:use-module (gnu packages gl)
94 #:use-module (gnu packages glib)
95 #:use-module (gnu packages graphviz)
96 #:use-module (gnu packages graphics)
97 #:use-module (gnu packages gstreamer)
98 #:use-module (gnu packages gtk)
99 #:use-module (gnu packages icu4c)
100 #:use-module (gnu packages image)
101 #:use-module (gnu packages imagemagick)
102 #:use-module (gnu packages libevent)
103 #:use-module (gnu packages libffi)
104 #:use-module (gnu packages linux)
105 #:use-module (gnu packages llvm)
106 #:use-module (gnu packages man)
107 #:use-module (gnu packages maths)
108 #:use-module (gnu packages multiprecision)
109 #:use-module (gnu packages networking)
110 #:use-module (gnu packages ncurses)
111 #:use-module (gnu packages openstack)
112 #:use-module (gnu packages pcre)
113 #:use-module (gnu packages perl)
114 #:use-module (gnu packages pkg-config)
115 #:use-module (gnu packages python)
116 #:use-module (gnu packages python-crypto)
117 #:use-module (gnu packages python-web)
118 #:use-module (gnu packages qt)
119 #:use-module (gnu packages readline)
120 #:use-module (gnu packages sdl)
121 #:use-module (gnu packages search)
122 #:use-module (gnu packages shells)
123 #:use-module (gnu packages ssh)
124 #:use-module (gnu packages terminals)
125 #:use-module (gnu packages tex)
126 #:use-module (gnu packages texinfo)
127 #:use-module (gnu packages time)
128 #:use-module (gnu packages tls)
129 #:use-module (gnu packages version-control)
130 #:use-module (gnu packages video)
131 #:use-module (gnu packages web)
132 #:use-module (gnu packages base)
133 #:use-module (gnu packages xml)
134 #:use-module (gnu packages xorg)
135 #:use-module (gnu packages xdisorg)
136 #:use-module (gnu packages tcl)
137 #:use-module (gnu packages bdw-gc)
138 #:use-module (guix packages)
139 #:use-module (guix download)
140 #:use-module (guix git-download)
141 #:use-module (guix utils)
142 #:use-module (guix build-system gnu)
143 #:use-module (guix build-system cmake)
144 #:use-module (guix build-system python)
145 #:use-module (guix build-system trivial)
146 #:use-module (srfi srfi-1)
147 #:use-module (srfi srfi-26))
148
149 (define-public python-psutil
150 (package
151 (name "python-psutil")
152 (version "5.4.3")
153 (source
154 (origin
155 (method url-fetch)
156 (uri (pypi-uri "psutil" version))
157 (sha256
158 (base32
159 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
160 (build-system python-build-system)
161 (arguments
162 ;; FIXME: some tests does not return and times out.
163 '(#:tests? #f))
164 (home-page "https://www.github.com/giampaolo/psutil")
165 (synopsis "Library for retrieving information on running processes")
166 (description
167 "psutil (Python system and process utilities) is a library for retrieving
168 information on running processes and system utilization (CPU, memory, disks,
169 network) in Python. It is useful mainly for system monitoring, profiling and
170 limiting process resources and management of running processes. It implements
171 many functionalities offered by command line tools such as: ps, top, lsof,
172 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
173 pidof, tty, taskset, pmap.")
174 (properties `((python2-variant . ,(delay python2-psutil))))
175 (license license:bsd-3)))
176
177 (define-public python2-psutil
178 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
179 (package
180 (inherit base)
181 (propagated-inputs
182 `(("python2-enum34" ,python2-enum34) ;optional
183 ,@(package-propagated-inputs base))))))
184
185 (define-public python-shapely
186 (package
187 (name "python-shapely")
188 (version "1.6.3")
189 (source
190 (origin
191 (method url-fetch)
192 (uri (pypi-uri "Shapely" version))
193 (sha256
194 (base32
195 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
196 (build-system python-build-system)
197 (native-inputs
198 `(("python-cython" ,python-cython)
199 ("python-matplotlib" ,python-matplotlib)
200 ("python-pytest" ,python-pytest)
201 ("python-pytest-cov" ,python-pytest-cov)))
202 (inputs
203 `(("geos" ,geos)))
204 (propagated-inputs
205 `(("python-numpy" ,python-numpy)))
206 (arguments
207 `(#:phases
208 (modify-phases %standard-phases
209 (add-after 'unpack 'patch-geos-path
210 (lambda* (#:key inputs #:allow-other-keys)
211 (let ((geos (assoc-ref inputs "geos"))
212 (glibc (assoc-ref inputs ,(if (%current-target-system)
213 "cross-libc" "libc"))))
214 (substitute* "shapely/geos.py"
215 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
216 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
217 geos "/lib/libgeos_c.so'])"))
218 (("free = load_dll\\('c'\\)\\.free")
219 (string-append "free = load_dll('c', fallbacks=['"
220 glibc "/lib/libc.so.6']).free"))))
221 #t)))))
222 (home-page "https://github.com/Toblerity/Shapely")
223 (synopsis "Library for the manipulation and analysis of geometric objects")
224 (description "Shapely is a Python package for manipulation and analysis of
225 planar geometric objects. It is based on the @code{GEOS} library.")
226 (license license:bsd-3)))
227
228 (define-public python-logwrap
229 (package
230 (name "python-logwrap")
231 (version "3.2.1")
232 (source
233 (origin
234 (method url-fetch)
235 (uri (pypi-uri "logwrap" version ".zip"))
236 (sha256
237 (base32
238 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
239 (build-system python-build-system)
240 (propagated-inputs
241 `(("python-six" ,python-six)
242 ("python-typing" ,python-typing)))
243 (native-inputs
244 `(("unzip" ,unzip)
245 ("python-cython" ,python-cython)
246 ("python-pytest" ,python-pytest)
247 ("python-pytest-cov" ,python-pytest-cov)
248 ("python-pytest-runner" ,python-pytest-runner)))
249 (home-page "https://github.com/penguinolog/logwrap")
250 (synopsis "Decorator for logging function arguments")
251 (description "This package provides a decorator to log function arguments
252 and function call return values in a human-readable way.")
253 (license license:asl2.0)))
254
255 (define-public python2-shapely
256 (package-with-python2 python-shapely))
257
258 (define-public python-clyent
259 (package
260 (name "python-clyent")
261 (version "1.2.1")
262 (source
263 (origin
264 (method url-fetch)
265 (uri (pypi-uri "clyent" version))
266 (sha256
267 (base32
268 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
269 (build-system python-build-system)
270 (native-inputs
271 `(("python-mock" ,python-mock)))
272 (home-page "https://github.com/binstar/clyent")
273 (synopsis "Command line client library")
274 (description "Clyent is a Python command line utiliy library. It is used
275 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
276 (license license:bsd-3)))
277
278 (define-public python2-clyent
279 (package-with-python2 python-clyent))
280
281 (define-public python-babel
282 (package
283 (name "python-babel")
284 (version "2.6.0")
285 (source
286 (origin
287 (method url-fetch)
288 (uri (pypi-uri "Babel" version))
289 (sha256
290 (base32
291 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
292 (build-system python-build-system)
293 (native-inputs
294 `(("python-freezegun" ,python-freezegun)
295 ("python-pytest" ,python-pytest)))
296 (propagated-inputs
297 `(("python-pytz" ,python-pytz)))
298 (arguments
299 `(#:phases (modify-phases %standard-phases
300 (replace 'check
301 (lambda _ (invoke "pytest" "-vv"))))))
302 (home-page "http://babel.pocoo.org/")
303 (synopsis
304 "Tools for internationalizing Python applications")
305 (description
306 "Babel is composed of two major parts:
307 - tools to build and work with gettext message catalogs
308 - a Python interface to the CLDR (Common Locale Data Repository), providing
309 access to various locale display names, localized number and date formatting,
310 etc. ")
311 (license license:bsd-3)))
312
313 (define-public python2-babel
314 (package-with-python2 python-babel))
315
316 (define-public python2-backport-ssl-match-hostname
317 (package
318 (name "python2-backport-ssl-match-hostname")
319 (version "3.5.0.1")
320 (source
321 (origin
322 (method url-fetch)
323 (uri (string-append
324 "https://pypi.python.org/packages/source/b/"
325 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
326 version ".tar.gz"))
327 (sha256
328 (base32
329 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
330 (build-system python-build-system)
331 (arguments
332 `(#:python ,python-2
333 #:tests? #f)) ; no test target
334 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
335 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
336 (description
337 "This backport brings the ssl.match_hostname() function to users of
338 earlier versions of Python. The function checks the hostname in the
339 certificate returned by the server to which a connection has been established,
340 and verifies that it matches the intended target hostname.")
341 (license license:psfl)))
342
343 (define-public python-hdf4
344 (package
345 (name "python-hdf4")
346 (version "0.9")
347 (source
348 (origin
349 (method url-fetch)
350 (uri (pypi-uri name version))
351 (sha256
352 (base32
353 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
354 (build-system python-build-system)
355 (native-inputs `(("nose" ,python-nose)))
356 (propagated-inputs `(("numpy" ,python-numpy)))
357 (inputs
358 `(("hdf4" ,hdf4)
359 ("libjpeg" ,libjpeg)
360 ("zlib" ,zlib)))
361 (arguments
362 `(#:phases
363 (modify-phases %standard-phases
364 (replace 'check
365 (lambda _
366 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
367 ;; on to import numpy. Somehow this works on their CI system.
368 ;; Let's just manage PYTHONPATH here instead.
369 (substitute* "runexamples.sh"
370 (("export PYTHONPATH=.*") ""))
371 (setenv "PYTHONPATH"
372 (string-append (getcwd) ":"
373 (getenv "PYTHONPATH")))
374 (invoke "./runexamples.sh")
375 (invoke "nosetests" "-v"))))))
376 (home-page "https://github.com/fhs/python-hdf4")
377 (synopsis "Python interface to the NCSA HDF4 library")
378 (description
379 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
380 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
381 NetCDF files can also be read and modified. Python-HDF4 is a fork of
382 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
383 (license license:expat)))
384
385 (define-public python2-hdf4
386 (package-with-python2 python-hdf4))
387
388 (define-public python-h5py
389 (package
390 (name "python-h5py")
391 (version "2.8.0")
392 (source
393 (origin
394 (method url-fetch)
395 (uri (pypi-uri "h5py" version))
396 (sha256
397 (base32
398 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
399 (build-system python-build-system)
400 (arguments
401 `(#:tests? #f ; no test target
402 #:phases
403 (modify-phases %standard-phases
404 (add-after 'unpack 'fix-hdf5-paths
405 (lambda* (#:key inputs #:allow-other-keys)
406 (let ((prefix (assoc-ref inputs "hdf5")))
407 (substitute* "setup_build.py"
408 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
409 (string-append "['" prefix "/lib" "']"))
410 (("'/opt/local/include', '/usr/local/include'")
411 (string-append "'" prefix "/include" "'")))
412 (substitute* "setup_configure.py"
413 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
414 (string-append "['" prefix "/lib" "']")))
415 #t))))))
416 (propagated-inputs
417 `(("python-six" ,python-six)
418 ("python-numpy" ,python-numpy)))
419 (inputs
420 `(("hdf5" ,hdf5)))
421 (native-inputs
422 `(("python-cython" ,python-cython)
423 ("python-pkgconfig" ,python-pkgconfig)))
424 (home-page "http://www.h5py.org/")
425 (synopsis "Read and write HDF5 files from Python")
426 (description
427 "The h5py package provides both a high- and low-level interface to the
428 HDF5 library from Python. The low-level interface is intended to be a
429 complete wrapping of the HDF5 API, while the high-level component supports
430 access to HDF5 files, datasets and groups using established Python and NumPy
431 concepts.")
432 (license license:bsd-3)))
433
434 (define-public python2-h5py
435 (package-with-python2 python-h5py))
436
437 (define-public python-netcdf4
438 (package
439 (name "python-netcdf4")
440 (version "1.2.9")
441 (source
442 (origin
443 (method url-fetch)
444 (uri (pypi-uri "netCDF4" version))
445 (sha256
446 (base32
447 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
448 (build-system python-build-system)
449 (native-inputs
450 `(("python-cython" ,python-cython)))
451 (propagated-inputs
452 `(("python-numpy" ,python-numpy)))
453 (inputs
454 `(("netcdf" ,netcdf)
455 ("hdf4" ,hdf4)
456 ("hdf5" ,hdf5)))
457 (arguments
458 '(#:phases
459 (modify-phases %standard-phases
460 (replace 'check
461 (lambda _
462 (setenv "NO_NET" "1") ; disable opendap tests
463 (with-directory-excursion "test"
464 (setenv "PYTHONPATH" ; find and add the library we just built
465 (string-append
466 (car (find-files "../build" "lib.*"
467 #:directories? #:t
468 #:fail-on-error? #:t))
469 ":" (getenv "PYTHONPATH")))
470 (zero? (system* "python" "run_all.py"))))))))
471 (home-page
472 "https://github.com/Unidata/netcdf4-python")
473 (synopsis "Python/numpy interface to the netCDF library")
474 (description "Netcdf4-python is a Python interface to the netCDF C
475 library. netCDF version 4 has many features not found in earlier
476 versions of the library and is implemented on top of HDF5. This module
477 can read and write files in both the new netCDF 4 and the old netCDF 3
478 format, and can create files that are readable by HDF5 clients. The
479 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
480 to users of that module.")
481 ;; The software is mainly ISC, but includes some files covered
482 ;; by the Expat license.
483 (license (list license:isc license:expat))))
484
485 (define-public python2-netcdf4
486 (package-with-python2 python-netcdf4))
487
488 (define-public python-lockfile
489 (package
490 (name "python-lockfile")
491 (version "0.12.2")
492 (source
493 (origin
494 (method url-fetch)
495 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
496 "lockfile-" version ".tar.gz"))
497 (sha256
498 (base32
499 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
500 (build-system python-build-system)
501 (arguments '(#:test-target "check"))
502 (native-inputs
503 `(("python-pbr" ,python-pbr)))
504 (home-page "https://launchpad.net/pylockfile")
505 (synopsis "Platform-independent file locking module")
506 (description
507 "The lockfile package exports a LockFile class which provides a simple
508 API for locking files.")
509 (license license:expat)))
510
511 (define-public python2-lockfile
512 (package-with-python2 python-lockfile))
513
514 (define-public python-semantic-version
515 (package
516 (name "python-semantic-version")
517 (version "2.6.0")
518 (source
519 (origin
520 (method url-fetch)
521 (uri (pypi-uri "semantic_version" version))
522 (sha256
523 (base32
524 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
525 (build-system python-build-system)
526 (arguments
527 `(#:tests? #f)) ; PyPI tarball lacks tests
528 (home-page "https://github.com/rbarrois/python-semanticversion")
529 (synopsis "Semantic versioning module for Python")
530 (description
531 "The @code{semantic_version} class is a small library for handling
532 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
533
534 It can compare versions, generate a new version that represents a bump in one of
535 the version levels, and check whether any given string is a proper semantic
536 version identifier.")
537 (license license:bsd-3)))
538
539 (define-public python2-semantic-version
540 (package-with-python2 python-semantic-version))
541
542 (define-public python-serpent
543 (package
544 (name "python-serpent")
545 (version "1.27")
546 (source
547 (origin
548 (method url-fetch)
549 (uri (pypi-uri "serpent" version))
550 (sha256
551 (base32
552 "04p9dsrm5pv8vhk3flvih55kgvlzpi38hlaykdiakddmgwqw93bg"))))
553 (build-system python-build-system)
554 (home-page "https://github.com/irmen/Serpent")
555 (synopsis "Serializer for literal Python expressions")
556 (description
557 "Serpent provides ast.literal_eval() compatible object tree
558 serialization. It serializes an object tree into bytes (utf-8 encoded string)
559 that can be decoded and then passed as-is to ast.literal_eval() to rebuild it
560 as the original object tree. As such it is safe to send serpent data to other
561 machines over the network for instance (because only safe literals are
562 encoded).")
563 (license license:expat)))
564
565 (define-public python-setuptools
566 (package
567 (name "python-setuptools")
568 (version "40.0.0")
569 (source
570 (origin
571 (method url-fetch)
572 (uri (pypi-uri "setuptools" version ".zip"))
573 (sha256
574 (base32
575 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
576 (modules '((guix build utils)))
577 (snippet
578 '(begin
579 ;; Remove included binaries which are used to build self-extracting
580 ;; installers for Windows.
581 ;; TODO: Find some way to build them ourself so we can include them.
582 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
583 #t))))
584 (build-system python-build-system)
585 ;; FIXME: Tests require pytest, which itself relies on setuptools.
586 ;; One could bootstrap with an internal untested setuptools.
587 (arguments
588 `(#:tests? #f))
589 (home-page "https://pypi.python.org/pypi/setuptools")
590 (synopsis
591 "Library designed to facilitate packaging Python projects")
592 (description
593 "Setuptools is a fully-featured, stable library designed to facilitate
594 packaging Python projects, where packaging includes:
595 Python package and module definitions,
596 distribution package metadata,
597 test hooks,
598 project installation,
599 platform-specific details,
600 Python 3 support.")
601 ;; TODO: setuptools now bundles the following libraries:
602 ;; packaging, pyparsing, six and appdirs. How to unbundle?
603 (license (list license:psfl ; setuptools itself
604 license:expat ; six, appdirs, pyparsing
605 license:asl2.0 ; packaging is dual ASL2/BSD-2
606 license:bsd-2))))
607
608 (define-public python2-setuptools
609 (package-with-python2 python-setuptools))
610
611 (define-public python-uniseg
612 (package
613 (name "python-uniseg")
614 (version "0.7.1")
615 (source
616 (origin
617 (method url-fetch)
618 (uri (pypi-uri "uniseg" version ".zip"))
619 (sha256
620 (base32
621 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
622 (build-system python-build-system)
623 (arguments
624 '(#:tests? #f)) ; The test suite requires network access.
625 (native-inputs
626 `(("unzip" ,unzip)))
627 (home-page
628 "https://bitbucket.org/emptypage/uniseg-python")
629 (synopsis
630 "Python library to determine Unicode text segmentations")
631 (description
632 "Uniseg is a Python package used to determine Unicode text segmentations.
633 Supported segmentations include:
634 @enumerate
635 @item @dfn{Code point} (any value in the Unicode codespace)
636 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
637 multiple Unicode code points, e.g. \"G\" + acute-accent)
638 @item Word break
639 @item Sentence break
640 @item Line break
641 @end enumerate")
642 (license license:expat)))
643
644 (define-public python2-uniseg
645 (package-with-python2 python-uniseg))
646
647 (define-public python-humanfriendly
648 (package
649 (name "python-humanfriendly")
650 (version "4.4.1")
651 (source
652 (origin
653 (method url-fetch)
654 (uri (pypi-uri "humanfriendly" version))
655 (sha256
656 (base32
657 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
658 (build-system python-build-system)
659 (arguments
660 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
661 #:tests? #f))
662 (propagated-inputs
663 `(("python-monotonic" ,python-monotonic)))
664 (home-page "https://humanfriendly.readthedocs.io")
665 (synopsis "Human-friendly input and output in Python")
666 (description
667 "The functions and classes in @code{humanfriendly} can be used to make
668 text interfaces more user-friendly. It includes tools to parse and format
669 numbers, file sizes, and timespans, timers for long-running operations, menus
670 to allow the user to choose from a list of options, and terminal interaction
671 helpers.")
672 (license license:expat)))
673
674 (define-public python2-humanfriendly
675 (package-with-python2 python-humanfriendly))
676
677 (define-public python-capturer
678 (package
679 (name "python-capturer")
680 (version "2.4")
681 (source
682 (origin
683 (method url-fetch)
684 (uri (pypi-uri "capturer" version))
685 (sha256
686 (base32
687 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
688 (build-system python-build-system)
689 (arguments
690 `(#:tests? #f))
691 (propagated-inputs
692 `(("python-humanfriendly" ,python-humanfriendly)))
693 (home-page "https://capturer.readthedocs.io")
694 (synopsis "Capture stdout and stderr streams of the current process")
695 (description
696 "The capturer package makes it easy to capture the stdout and stderr
697 streams of the current process and subprocesses. Output can be relayed
698 to the terminal in real time but is also available to the Python program
699 for additional processing.")
700 (license license:expat)))
701
702 (define-public python2-capturer
703 (package-with-python2 python-capturer))
704
705 (define-public python-case
706 (package
707 (name "python-case")
708 (version "1.5.3")
709 (source
710 (origin
711 (method url-fetch)
712 (uri (pypi-uri "case" version))
713 (sha256
714 (base32
715 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
716 (build-system python-build-system)
717 (propagated-inputs
718 `(("python-mock" ,python-mock)
719 ("python-nose" ,python-nose)
720 ("python-six" ,python-six)
721 ("python-unittest2" ,python-unittest2)))
722 (native-inputs
723 `(("python-coverage" ,python-coverage)))
724 (home-page "https://github.com/celery/case")
725 (synopsis "Unittest utilities and convenience methods")
726 (description
727 "The @code{case} package provides utilities on top of unittest, including
728 some helpful Python 2 compatibility convenience methods.")
729 (license license:bsd-3)))
730
731 (define-public python-verboselogs
732 (package
733 (name "python-verboselogs")
734 (version "1.7")
735 (source
736 (origin
737 (method url-fetch)
738 (uri (pypi-uri "verboselogs" version))
739 (sha256
740 (base32
741 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
742 (build-system python-build-system)
743 (native-inputs
744 `(("python-mock" ,python-mock)
745 ("python-astroid" ,python-astroid)
746 ("python-pylint" ,python-pylint)))
747 (home-page "https://verboselogs.readthedocs.io")
748 (synopsis "Verbose logging level for Python's logging module")
749 (description
750 "The @code{verboselogs} package extends Python's @code{logging} module to
751 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
752 (license license:expat)))
753
754 (define-public python2-verboselogs
755 (package-with-python2 python-verboselogs))
756
757 (define-public python-coloredlogs
758 (package
759 (name "python-coloredlogs")
760 (version "7.3")
761 (source
762 (origin
763 (method url-fetch)
764 (uri (pypi-uri "coloredlogs" version))
765 (sha256
766 (base32
767 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
768 (build-system python-build-system)
769 (arguments
770 `(;Tests require some updated modules
771 #:tests? #f))
772 (propagated-inputs
773 `(("python-capturer" ,python-capturer)))
774 (home-page "https://coloredlogs.readthedocs.io")
775 (synopsis "Colored stream handler for Python's logging module")
776 (description
777 "The @code{coloredlogs} package enables colored terminal output for
778 Python's logging module. The @code{ColoredFormatter} class inherits from
779 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
780 messages in color.")
781 (license license:expat)))
782
783 (define-public python2-coloredlogs
784 (package-with-python2 python-coloredlogs))
785
786 (define-public python-eventlet
787 (package
788 (name "python-eventlet")
789 (version "0.20.1")
790 (source
791 (origin
792 (method url-fetch)
793 (uri (pypi-uri "eventlet" version))
794 (sha256
795 (base32
796 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
797 (build-system python-build-system)
798 (propagated-inputs
799 `(("python-greenlet" ,python-greenlet)))
800 (arguments
801 ;; TODO: Requires unpackaged 'enum-compat'.
802 '(#:tests? #f))
803 (home-page "http://eventlet.net")
804 (synopsis "Concurrent networking library for Python")
805 (description
806 "Eventlet is a concurrent networking library for Python that
807 allows you to change how you run your code, not how you write it.
808 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
809 Coroutines ensure that the developer uses a blocking style of programming
810 that is similar to threading, but provide the benefits of non-blocking I/O.
811 The event dispatch is implicit, which means you can easily use @code{Eventlet}
812 from the Python interpreter, or as a small part of a larger application.")
813 (license license:expat)))
814
815 (define-public python2-eventlet
816 (let ((base (package-with-python2
817 (strip-python2-variant python-eventlet))))
818 (package (inherit base)
819 (propagated-inputs
820 `(("python2-enum34" ,python2-enum34)
821 ,@(package-propagated-inputs base))))))
822
823 (define-public python-six
824 (package
825 (name "python-six")
826 (version "1.11.0")
827 (source
828 (origin
829 (method url-fetch)
830 (uri (pypi-uri "six" version))
831 (sha256
832 (base32
833 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
834 (build-system python-build-system)
835 (arguments
836 `(#:phases
837 (modify-phases %standard-phases
838 (replace 'check
839 (lambda _
840 (invoke "py.test" "-v"))))))
841 (native-inputs
842 `(("python-py" ,python-py)
843 ("python-pytest" ,python-pytest-bootstrap)))
844 (home-page "https://pypi.python.org/pypi/six/")
845 (synopsis "Python 2 and 3 compatibility utilities")
846 (description
847 "Six is a Python 2 and 3 compatibility library. It provides utility
848 functions for smoothing over the differences between the Python versions with
849 the goal of writing Python code that is compatible on both Python versions.
850 Six supports every Python version since 2.5. It is contained in only one
851 Python file, so it can be easily copied into your project.")
852 (license license:x11)))
853
854 (define-public python2-six
855 (package-with-python2 python-six))
856
857 (define-public python-six-bootstrap
858 (package
859 (inherit python-six)
860 (name "python-six-bootstrap")
861 (native-inputs `())
862 (arguments `(#:tests? #f))))
863
864 (define-public python2-six-bootstrap
865 (package-with-python2 python-six-bootstrap))
866
867 (define-public python-schedule
868 (package
869 (name "python-schedule")
870 (version "0.4.3")
871 (source
872 (origin
873 (method url-fetch)
874 (uri (pypi-uri "schedule" version))
875 (sha256
876 (base32
877 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
878 (build-system python-build-system)
879 (native-inputs
880 `(("python-pytest" ,python-pytest)
881 ("python-mock" ,python-mock)))
882 (home-page "https://github.com/dbader/schedule")
883 (synopsis "Schedule periodic function calls in Python")
884 (description
885 "Schedule is an in-process scheduler for periodic jobs that uses the
886 builder pattern for configuration. Schedule lets you run Python functions (or
887 any other callable) periodically at pre-determined intervals using a simple,
888 human-friendly syntax.")
889 (license license:expat)))
890
891 (define-public python2-schedule
892 (package-with-python2 python-schedule))
893
894 (define-public python-pandas
895 (package
896 (name "python-pandas")
897 (version "0.23.4")
898 (source
899 (origin
900 (method url-fetch)
901 (uri (pypi-uri "pandas" version))
902 (sha256
903 (base32 "1x54pd7hr3y7qahx6b5bf2wzj54xvl8r3s1h4pl254pnmi3wl92v"))))
904 (build-system python-build-system)
905 (arguments
906 `(#:modules ((guix build utils)
907 (guix build python-build-system)
908 (ice-9 ftw)
909 (srfi srfi-26))
910 #:phases (modify-phases %standard-phases
911 (replace 'check
912 (lambda _
913 (let ((build-directory
914 (string-append
915 (getcwd) "/build/"
916 (car (scandir "build"
917 (cut string-prefix? "lib." <>))))))
918 ;; Disable the "strict data files" option which causes
919 ;; the build to error out if required data files are not
920 ;; available (as is the case with PyPI archives).
921 (substitute* "setup.cfg"
922 (("addopts = --strict-data-files") "addopts = "))
923 (with-directory-excursion build-directory
924 ;; Delete tests that require "moto" which is not yet in Guix.
925 (for-each delete-file
926 '("pandas/tests/io/conftest.py"
927 "pandas/tests/io/json/test_compression.py"
928 "pandas/tests/io/parser/test_network.py"
929 "pandas/tests/io/test_excel.py"
930 "pandas/tests/io/test_parquet.py"))
931 (invoke "pytest" "-vv" "pandas" "--skip-slow"
932 "--skip-network" "-k"
933 ;; XXX: Due to the deleted tests above.
934 "not test_read_s3_jsonl"))))))))
935 (propagated-inputs
936 `(("python-numpy" ,python-numpy)
937 ("python-pytz" ,python-pytz)
938 ("python-dateutil" ,python-dateutil)))
939 (native-inputs
940 `(("python-cython" ,python-cython)
941 ("python-beautifulsoup4" ,python-beautifulsoup4)
942 ("python-lxml" ,python-lxml)
943 ("python-html5lib" ,python-html5lib)
944 ("python-nose" ,python-nose)
945 ("python-pytest" ,python-pytest)))
946 (home-page "https://pandas.pydata.org")
947 (synopsis "Data structures for data analysis, time series, and statistics")
948 (description
949 "Pandas is a Python package providing fast, flexible, and expressive data
950 structures designed to make working with structured (tabular,
951 multidimensional, potentially heterogeneous) and time series data both easy
952 and intuitive. It aims to be the fundamental high-level building block for
953 doing practical, real world data analysis in Python.")
954 (license license:bsd-3)))
955
956 (define-public python2-pandas
957 (package-with-python2 python-pandas))
958
959 (define-public python2-mechanize
960 (package
961 (name "python2-mechanize")
962 (version "0.2.5")
963 (source
964 (origin
965 (method url-fetch)
966 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
967 version ".tar.gz"))
968 (sha256
969 (base32
970 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
971 (build-system python-build-system)
972 (arguments
973 `(#:python ,python-2 ; apparently incompatible with Python 3
974 #:tests? #f))
975 ;; test fails with message
976 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
977 ;; (python-3.3.2) or
978 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
979 ;; (python-2.7.5).
980 ;; The source code is from March 2011 and probably not up-to-date
981 ;; with respect to python unit tests.
982 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
983 (synopsis
984 "Stateful programmatic web browsing in Python")
985 (description
986 "Mechanize implements stateful programmatic web browsing in Python,
987 after Andy Lester’s Perl module WWW::Mechanize.")
988 (license (license:non-copyleft
989 "file://COPYING"
990 "See COPYING in the distribution."))))
991
992
993 (define-public python-simplejson
994 (package
995 (name "python-simplejson")
996 (version "3.14.0")
997 (source
998 (origin
999 (method url-fetch)
1000 (uri (pypi-uri "simplejson" version))
1001 (sha256
1002 (base32
1003 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1004 (build-system python-build-system)
1005 (home-page "http://simplejson.readthedocs.org/en/latest/")
1006 (synopsis
1007 "Json library for Python")
1008 (description
1009 "JSON (JavaScript Object Notation) is a subset of JavaScript
1010 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1011 format.
1012
1013 Simplejson exposes an API familiar to users of the standard library marshal
1014 and pickle modules. It is the externally maintained version of the json
1015 library contained in Python 2.6, but maintains compatibility with Python 2.5
1016 and (currently) has significant performance advantages, even without using
1017 the optional C extension for speedups. Simplejson is also supported on
1018 Python 3.3+.")
1019 (license license:x11)))
1020
1021 (define-public python2-simplejson
1022 (package-with-python2 python-simplejson))
1023
1024
1025 (define-public python-pyicu
1026 (package
1027 (name "python-pyicu")
1028 (version "2.2")
1029 (source
1030 (origin
1031 (method url-fetch)
1032 (uri (pypi-uri "PyICU" version))
1033 (sha256
1034 (base32
1035 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1036 (build-system python-build-system)
1037 (inputs
1038 `(("icu4c" ,icu4c)))
1039 (native-inputs
1040 `(("python-pytest" ,python-pytest)
1041 ("python-six" ,python-six)))
1042 (home-page "https://github.com/ovalhub/pyicu")
1043 (synopsis "Python extension wrapping the ICU C++ API")
1044 (description
1045 "PyICU is a python extension wrapping the ICU C++ API.")
1046 (properties `((python2-variant . ,(delay python2-pyicu))))
1047 (license license:x11)))
1048
1049 (define-public python2-pyicu
1050 (let ((base (package-with-python2
1051 (strip-python2-variant python-pyicu))))
1052 (package
1053 (inherit base)
1054 (arguments
1055 `(,@(package-arguments base)
1056 #:phases
1057 (modify-phases %standard-phases
1058 (add-before 'check 'delete-failing-test
1059 (λ _
1060 ;; XXX: This fails due to Unicode issues unique to Python 2,
1061 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1062 (delete-file "test/test_Script.py")
1063 #t))))))))
1064
1065 (define-public python2-dogtail
1066 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1067 ;; spaces in indentation" with Python 3.
1068 (package
1069 (name "python2-dogtail")
1070 (version "0.9.9")
1071 (source (origin
1072 (method url-fetch)
1073 (uri (pypi-uri "dogtail" version))
1074 (sha256
1075 (base32
1076 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1077 (build-system python-build-system)
1078 (arguments `(#:python ,python-2
1079 #:tests? #f)) ; invalid command "test"
1080 ;; Currently no offical homepage.
1081 (home-page "https://pypi.python.org/pypi/dogtail/")
1082 (synopsis "GUI test tool and automation framework written in Python")
1083 (description
1084 "Dogtail is a GUI test tool and automation framework written in Python.
1085 It uses Accessibility (a11y) technologies to communicate with desktop
1086 applications. dogtail scripts are written in Python and executed like any
1087 other Python program.")
1088 (license license:gpl2+)))
1089
1090 (define-public python-empy
1091 (package
1092 (name "python-empy")
1093 (version "3.3")
1094 (source (origin
1095 (method url-fetch)
1096 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1097 version ".tar.gz"))
1098 (sha256
1099 (base32
1100 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1101 (build-system python-build-system)
1102 (arguments
1103 `(#:tests? #f)) ;python2 only
1104 (home-page "http://www.alcyone.com/software/empy/")
1105 (synopsis "Templating system for Python")
1106 (description
1107 "EmPy is a system for embedding Python expressions and statements in
1108 template text; it takes an EmPy source file, processes it, and produces
1109 output. This is accomplished via expansions, which are special signals to the
1110 EmPy system and are set off by a special prefix (by default the at sign, @@).
1111 EmPy can expand arbitrary Python expressions and statements in this way, as
1112 well as a variety of special forms. Textual data not explicitly delimited in
1113 this way is sent unaffected to the output, allowing Python to be used in
1114 effect as a markup language. Also supported are callbacks via hooks,
1115 recording and playback via diversions, and dynamic, chainable filters. The
1116 system is highly configurable via command line options and embedded
1117 commands.")
1118 (license license:lgpl2.1+)))
1119
1120 (define-public python2-empy
1121 (package-with-python2 python-empy))
1122
1123 (define-public python2-element-tree
1124 (package
1125 (name "python2-element-tree")
1126 (version "1.2.6")
1127 (source (origin
1128 (method url-fetch)
1129 (uri (string-append
1130 "http://effbot.org/media/downloads/elementtree-"
1131 version "-20050316.tar.gz"))
1132 (sha256
1133 (base32
1134 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1135 (build-system python-build-system)
1136 (arguments
1137 `(#:python ,python-2 ; seems to be part of Python 3
1138 #:tests? #f)) ; no 'test' sub-command
1139 (synopsis "Toolkit for XML processing in Python")
1140 (description
1141 "ElementTree is a Python library supporting lightweight XML processing.")
1142 (home-page "http://effbot.org/zone/element-index.htm")
1143 (license (license:x11-style
1144 "http://docs.python.org/2/license.html"
1145 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1146
1147 (define-public python2-pybugz
1148 (package
1149 (name "python2-pybugz")
1150 (version "0.6.11")
1151 (source (origin
1152 (method url-fetch)
1153 (uri (string-append
1154 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1155 version ".tar.gz"))
1156 (sha256
1157 (base32
1158 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1159 (patches (search-patches "pybugz-stty.patch"
1160 "pybugz-encode-error.patch"))))
1161 (build-system python-build-system)
1162 (arguments
1163 `(#:python ,python-2 ; SyntaxError with Python 3
1164 #:tests? #f)) ; no 'test' sub-command
1165 (propagated-inputs
1166 `(("element-tree" ,python2-element-tree)))
1167 (synopsis "Python and command-line interface to Bugzilla")
1168 (description
1169 "PyBugz is a Python library and command-line tool to query the Bugzilla
1170 bug tracking system. It is meant as an aid to speed up interaction with the
1171 bug tracker.")
1172 (home-page "http://www.liquidx.net/pybugz/")
1173 (license license:gpl2)))
1174
1175 (define-public python2-enum
1176 (package
1177 (name "python2-enum")
1178 (version "0.4.6")
1179 (source (origin
1180 (method url-fetch)
1181 (uri (pypi-uri "enum" version))
1182 (sha256
1183 (base32
1184 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1185 (build-system python-build-system)
1186 (arguments
1187 `(#:python ,python-2))
1188 (home-page "http://pypi.python.org/pypi/enum/")
1189 (synopsis "Robust enumerated type support in Python")
1190 (description
1191 "This provides a module for robust enumerations in Python. It has
1192 been superseded by the Python standard library and is provided only for
1193 compatibility.")
1194 ;; Choice of either license.
1195 (license (list license:gpl3+ license:psfl))))
1196
1197 (define-public python-enum34
1198 (package
1199 (name "python-enum34")
1200 (version "1.1.6")
1201 (source
1202 (origin
1203 (method url-fetch)
1204 (uri (pypi-uri "enum34" version))
1205 (sha256
1206 (base32
1207 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1208 (build-system python-build-system)
1209 (home-page "https://pypi.python.org/pypi/enum34")
1210 (synopsis "Backported Python 3.4 Enum")
1211 (description
1212 "Enum34 is the new Python stdlib enum module available in Python 3.4
1213 backported for previous versions of Python from 2.4 to 3.3.")
1214 (license license:bsd-3)))
1215
1216 (define-public python2-enum34
1217 (package-with-python2 python-enum34))
1218
1219 (define-public python-parse-type
1220 (package
1221 (name "python-parse-type")
1222 (version "0.4.2")
1223 (source
1224 (origin
1225 (method url-fetch)
1226 (uri (pypi-uri "parse_type" version))
1227 (sha256
1228 (base32
1229 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1230 (build-system python-build-system)
1231 (propagated-inputs
1232 `(("python-six" ,python-six)
1233 ("python-parse" ,python-parse)))
1234 (native-inputs
1235 `(("python-pytest" ,python-pytest)
1236 ("python-pytest-runner" ,python-pytest-runner)))
1237 (home-page "https://github.com/jenisys/parse_type")
1238 (synopsis "Extended parse module")
1239 (description
1240 "Parse_type extends the python parse module.")
1241 (properties
1242 `((python2-variant . ,(delay python2-parse-type))))
1243 (license license:bsd-3)))
1244
1245 (define-public python2-parse-type
1246 (let ((base (package-with-python2
1247 (strip-python2-variant python-parse-type))))
1248 (package (inherit base)
1249 (propagated-inputs
1250 `(("python2-enum34" ,python2-enum34)
1251 ,@(package-propagated-inputs base))))))
1252
1253 (define-public python-parse
1254 (package
1255 (name "python-parse")
1256 (version "1.8.4")
1257 (source
1258 (origin
1259 (method url-fetch)
1260 (uri (pypi-uri "parse" version))
1261 (sha256
1262 (base32
1263 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1264 (build-system python-build-system)
1265 (arguments
1266 `(#:phases
1267 (modify-phases %standard-phases
1268 (replace 'check
1269 (lambda _ (invoke "python" "test_parse.py"))))))
1270 (home-page "https://github.com/r1chardj0n3s/parse")
1271 (synopsis "Parse strings")
1272 (description
1273 "Parse strings using a specification based on the Python @code{format()}
1274 syntax.")
1275 (license license:x11)))
1276
1277 (define-public python-polib
1278 (package
1279 (name "python-polib")
1280 (version "1.0.8")
1281 (source (origin
1282 (method url-fetch)
1283 (uri (pypi-uri "polib" version))
1284 (sha256
1285 (base32
1286 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1287 (build-system python-build-system)
1288 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1289 (synopsis "Manipulate, create and modify gettext files")
1290 (description "Polib can manipulate any gettext format (po, pot and mo)
1291 files. It can be used to create po files from scratch or to modify
1292 existing ones.")
1293 (license license:expat)))
1294
1295 (define-public python2-polib
1296 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1297 (package
1298 (inherit base)
1299 (arguments `(,@(package-arguments base)
1300 ;; Tests don't work with python2.
1301 #:tests? #f)))))
1302
1303 (define-public scons
1304 (package
1305 (name "scons")
1306 (version "3.0.1")
1307 (source (origin
1308 (method url-fetch)
1309 (uri (string-append "mirror://sourceforge/scons/scons/" version
1310 "/scons-" version ".tar.gz"))
1311 (sha256
1312 (base32
1313 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1314 (build-system python-build-system)
1315 (arguments
1316 `(#:use-setuptools? #f ; still relies on distutils
1317 #:tests? #f)) ; no 'python setup.py test' command
1318 (home-page "http://scons.org/")
1319 (synopsis "Software construction tool written in Python")
1320 (description
1321 "SCons is a software construction tool. Think of SCons as an improved,
1322 cross-platform substitute for the classic Make utility with integrated
1323 functionality similar to autoconf/automake and compiler caches such as ccache.
1324 In short, SCons is an easier, more reliable and faster way to build
1325 software.")
1326 (license license:x11)))
1327
1328 (define-public scons-python2
1329 (package
1330 (inherit (package-with-python2 scons))
1331 (name "scons-python2")))
1332
1333 (define-public python-extras
1334 (package
1335 (name "python-extras")
1336 (version "1.0.0")
1337 (source
1338 (origin
1339 (method url-fetch)
1340 (uri (pypi-uri "extras" version))
1341 (sha256
1342 (base32
1343 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1344 (build-system python-build-system)
1345 (arguments
1346 ;; FIXME: Circular dependency on testtools.
1347 '(#:tests? #f))
1348 (home-page "https://github.com/testing-cabal/extras")
1349 (synopsis "Useful extensions to the Python standard library")
1350 (description
1351 "Extras is a set of extensions to the Python standard library.")
1352 (license license:expat)))
1353
1354 (define-public python2-extras
1355 (package-with-python2 python-extras))
1356
1357 (define-public python-mimeparse
1358 (package
1359 (name "python-mimeparse")
1360 (version "1.6.0")
1361 (source
1362 (origin
1363 (method url-fetch)
1364 (uri (string-append
1365 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1366 version ".tar.gz"))
1367 (sha256
1368 (base32
1369 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1370 (build-system python-build-system)
1371 (arguments
1372 '(#:phases
1373 (modify-phases %standard-phases
1374 (replace 'check
1375 (lambda _
1376 (invoke "./mimeparse_test.py"))))))
1377 (home-page
1378 "https://github.com/dbtsai/python-mimeparse")
1379 (synopsis "Python library for parsing MIME types")
1380 (description
1381 "Mimeparse provides basic functions for parsing MIME type names and
1382 matching them against a list of media-ranges.")
1383 (license license:expat)))
1384
1385 (define-public python2-mimeparse
1386 (package-with-python2 python-mimeparse))
1387
1388 (define-public python-miniboa
1389 (package
1390 (name "python-miniboa")
1391 (version "1.0.7")
1392 (source
1393 (origin
1394 (method url-fetch)
1395 (uri (pypi-uri "miniboa" version))
1396 (sha256
1397 (base32
1398 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1399 (build-system python-build-system)
1400 (home-page "https://github.com/shmup/miniboa")
1401 (synopsis "Simple, single-threaded Telnet server")
1402 (description
1403 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1404 server.")
1405 (license license:asl2.0)))
1406
1407 (define-public python2-miniboa
1408 (package-with-python2 python-miniboa))
1409
1410 (define-public python-pafy
1411 (package
1412 (name "python-pafy")
1413 (version "0.5.3.1")
1414 (source
1415 (origin
1416 (method url-fetch)
1417 (uri (pypi-uri "pafy" version))
1418 (sha256
1419 (base32
1420 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1421 (build-system python-build-system)
1422 (arguments
1423 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1424 (propagated-inputs
1425 ;; Youtube-dl is a python package which is imported in the file
1426 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1427 `(("youtube-dl" ,youtube-dl)))
1428 (home-page "https://np1.github.io/pafy/")
1429 (synopsis "Retrieve YouTube content and metadata")
1430 (description
1431 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1432 (license license:lgpl3+)))
1433
1434 (define-public python2-funcsigs
1435 (package
1436 (name "python2-funcsigs")
1437 (version "1.0.2")
1438 (source (origin
1439 (method url-fetch)
1440 (uri (pypi-uri "funcsigs" version))
1441 (sha256
1442 (base32
1443 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1444 (build-system python-build-system)
1445 (arguments
1446 `(#:python ,python-2))
1447 (native-inputs
1448 `(("python2-unittest2" ,python2-unittest2)))
1449 (home-page "http://funcsigs.readthedocs.org")
1450 (synopsis "Python function signatures from PEP362")
1451 (description
1452 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1453 (license license:asl2.0)))
1454
1455 (define-public python2-funcsigs-bootstrap
1456 (package
1457 (inherit python2-funcsigs)
1458 (name "python2-funcsigs-bootstrap")
1459 (native-inputs `())
1460 (arguments
1461 `(#:tests? #f
1462 ,@(package-arguments python2-funcsigs)))))
1463
1464 (define-public python-py
1465 (package
1466 (name "python-py")
1467 (version "1.5.4")
1468 (source
1469 (origin
1470 (method url-fetch)
1471 (uri (pypi-uri "py" version))
1472 (sha256
1473 (base32
1474 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1475 (build-system python-build-system)
1476 (arguments
1477 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1478 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1479 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1480 ;; Is this module globally installed?"
1481 '(#:tests? #f))
1482 (native-inputs
1483 `(("python-setuptools-scm" ,python-setuptools-scm)))
1484 (home-page "https://github.com/pytest-dev/py")
1485 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1486 (description
1487 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1488 code introspection, and logging.")
1489 (license license:expat)))
1490
1491 (define-public python2-py
1492 (package-with-python2 python-py))
1493
1494 ;; Recent versions of python-fixtures and python-testrepository need
1495 ;; python-pbr for packaging, which itself needs these two packages for
1496 ;; testing.
1497 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1498 ;; same source, just without any test dependencies and with tests disabled.
1499 ;; python-pbr-minmal is then used to package python-fixtures and
1500 ;; python-testrepository.
1501 ;; Strictly speaking we currently could remove the test-requirements from the
1502 ;; normal python-pbr package (and save this package) since test are disabled
1503 ;; there anyway. But this may change in future.
1504 (define-public python-pbr-minimal
1505 (package
1506 (name "python-pbr-minimal")
1507 (version "3.0.1")
1508 (source
1509 (origin
1510 (method url-fetch)
1511 (uri (pypi-uri "pbr" version))
1512 (sha256
1513 (base32
1514 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1515 (build-system python-build-system)
1516 (arguments
1517 `(#:tests? #f))
1518 (home-page "http://docs.openstack.org/developer/pbr/")
1519 (synopsis "Minimal build of python-pbr used for bootstrapping")
1520 (description
1521 "Used only for bootstrapping python2-pbr, you should not need this.")
1522 (license license:asl2.0)))
1523
1524 (define-public python2-pbr-minimal
1525 (package-with-python2 python-pbr-minimal))
1526
1527 (define-public python-pbr
1528 (package
1529 (inherit python-pbr-minimal)
1530 (name "python-pbr")
1531 (arguments
1532 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1533 (propagated-inputs
1534 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1535 (native-inputs
1536 `(("python-fixtures" ,python-fixtures-bootstrap)
1537 ;; discover, coverage, hacking, subunit
1538 ("python-mock" ,python-mock)
1539 ("python-six" ,python-six)
1540 ("python-sphinx" ,python-sphinx)
1541 ("python-testrepository" ,python-testrepository-bootstrap)
1542 ("python-testresources" ,python-testresources-bootstrap)
1543 ("python-testscenarios" ,python-testscenarios-bootstrap)
1544 ("python-testtools" ,python-testtools-bootstrap)
1545 ("python-virtualenv" ,python-virtualenv)))
1546 (synopsis "Enhance the default behavior of Python’s setuptools")
1547 (description
1548 "Python Build Reasonableness (PBR) is a library that injects some useful
1549 and sensible default behaviors into your setuptools run. It will set
1550 versions, process requirements files and generate AUTHORS and ChangeLog file
1551 from git information.
1552 ")))
1553
1554 (define-public python2-pbr
1555 (package-with-python2 python-pbr))
1556
1557 (define-public python-exif-read
1558 (package
1559 (name "python-exif-read")
1560 (version "2.1.2")
1561 (source (origin
1562 (method url-fetch)
1563 (uri (pypi-uri "ExifRead" version))
1564 (sha256
1565 (base32
1566 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1567 (build-system python-build-system)
1568 (arguments `(#:tests? #f)) ; no tests
1569 (home-page "https://github.com/ianare/exif-py")
1570 (synopsis "Python library to extract EXIF data from image files")
1571 (description
1572 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1573 files.")
1574 (license license:bsd-3)))
1575
1576 (define-public python2-exif-read
1577 (package-with-python2 python-exif-read))
1578
1579 (define-public python-pyld
1580 (package
1581 (name "python-pyld")
1582 (version "1.0.3")
1583 (source (origin
1584 (method url-fetch)
1585 (uri (pypi-uri "PyLD" version))
1586 (sha256
1587 (base32
1588 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1589 (build-system python-build-system)
1590 (home-page "https://github.com/digitalbazaar/pyld")
1591 (synopsis "Python implementation of the JSON-LD specification")
1592 (description
1593 "PyLD is an implementation of the JSON-LD specification.")
1594 (license license:bsd-3)))
1595
1596 (define-public python2-pyld
1597 (package-with-python2 python-pyld))
1598
1599 (define-public python-click
1600 (package
1601 (name "python-click")
1602 (version "6.7")
1603 (source
1604 (origin
1605 (method url-fetch)
1606 (uri (pypi-uri "click" version))
1607 (sha256
1608 (base32
1609 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1610 (build-system python-build-system)
1611 (arguments
1612 `(;; The tests are fragile, depending on a specific version of pytest:
1613 ;; <https://github.com/pallets/click/issues/823>
1614 #:tests? #f
1615 #:phases
1616 (modify-phases %standard-phases
1617 (add-after 'unpack 'fix-paths
1618 (lambda* (#:key inputs #:allow-other-keys)
1619 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1620 "cross-libc" "libc"))))
1621 (substitute* "click/_unicodefun.py"
1622 (("'locale'")
1623 (string-append "'" glibc "/bin/locale'"))))
1624 #t)))))
1625 (native-inputs
1626 `(("python-pytest" ,python-pytest)))
1627 (home-page "http://click.pocoo.org")
1628 (synopsis "Command line library for Python")
1629 (description
1630 "Click is a Python package for creating command line interfaces in a
1631 composable way with as little code as necessary. Its name stands for
1632 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1633 with sensible defaults out of the box.")
1634 (license license:bsd-3)))
1635
1636 (define-public python2-click
1637 (package-with-python2 python-click))
1638
1639 (define-public python-wheel
1640 (package
1641 (name "python-wheel")
1642 (version "0.30.0a0")
1643 (source
1644 (origin
1645 (method url-fetch)
1646 (uri (pypi-uri "wheel" version))
1647 (sha256
1648 (base32
1649 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1650 (build-system python-build-system)
1651 (native-inputs
1652 `(("python-jsonschema" ,python-jsonschema)
1653 ("python-pytest-cov" ,python-pytest-cov)))
1654 (home-page "https://bitbucket.org/pypa/wheel/")
1655 (synopsis "Format for built Python packages")
1656 (description
1657 "A wheel is a ZIP-format archive with a specially formatted filename and
1658 the @code{.whl} extension. It is designed to contain all the files for a PEP
1659 376 compatible install in a way that is very close to the on-disk format. Many
1660 packages will be properly installed with only the @code{Unpack} step and the
1661 unpacked archive preserves enough information to @code{Spread} (copy data and
1662 scripts to their final locations) at any later time. Wheel files can be
1663 installed with a newer @code{pip} or with wheel's own command line utility.")
1664 (license license:expat)
1665 (properties `((python2-variant . ,(delay python2-wheel))))))
1666
1667 (define-public python2-wheel
1668 (let ((wheel (package-with-python2
1669 (strip-python2-variant python-wheel))))
1670 (package (inherit wheel)
1671 (native-inputs `(("python2-functools32" ,python2-functools32)
1672 ,@(package-native-inputs wheel))))))
1673
1674 (define-public python-vcversioner
1675 (package
1676 (name "python-vcversioner")
1677 (version "2.16.0.0")
1678 (source
1679 (origin
1680 (method url-fetch)
1681 (uri (pypi-uri "vcversioner" version))
1682 (sha256
1683 (base32
1684 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1685 (build-system python-build-system)
1686 (synopsis "Python library for version number discovery")
1687 (description "Vcversioner is a Python library that inspects tagging
1688 information in a variety of version control systems in order to discover
1689 version numbers.")
1690 (home-page "https://github.com/habnabit/vcversioner")
1691 (license license:isc)))
1692
1693 (define-public python2-vcversioner
1694 (package-with-python2 python-vcversioner))
1695
1696 (define-public python-jsonschema
1697 (package
1698 (name "python-jsonschema")
1699 (version "2.6.0")
1700 (source (origin
1701 (method url-fetch)
1702 (uri
1703 (string-append
1704 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
1705 version ".tar.gz"))
1706 (sha256
1707 (base32
1708 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1709 (build-system python-build-system)
1710 (arguments
1711 '(#:phases
1712 (modify-phases %standard-phases
1713 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
1714 (native-inputs
1715 `(("python-nose" ,python-nose)
1716 ("python-vcversioner" ,python-vcversioner)))
1717 (home-page "https://github.com/Julian/jsonschema")
1718 (synopsis "Implementation of JSON Schema for Python")
1719 (description
1720 "Jsonschema is an implementation of JSON Schema for Python.")
1721 (license license:expat)
1722 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1723
1724 (define-public python2-jsonschema
1725 (let ((jsonschema (package-with-python2
1726 (strip-python2-variant python-jsonschema))))
1727 (package (inherit jsonschema)
1728 (native-inputs
1729 `(("python2-mock" ,python2-mock)
1730 ,@(package-native-inputs jsonschema)))
1731 (propagated-inputs
1732 `(("python2-functools32" ,python2-functools32))))))
1733
1734 (define-public python-schema
1735 (package
1736 (name "python-schema")
1737 (version "0.6.6")
1738 (source
1739 (origin
1740 (method url-fetch)
1741 (uri (pypi-uri "schema" version))
1742 (sha256
1743 (base32
1744 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1745 (build-system python-build-system)
1746 (native-inputs
1747 `(("python-pytest" ,python-pytest)))
1748 (home-page "https://github.com/keleshev/schema")
1749 (synopsis "Simple data validation library")
1750 (description
1751 "@code{python-schema} is a library for validating Python data
1752 structures, such as those obtained from config-files, forms, external
1753 services or command-line parsing, converted from JSON/YAML (or
1754 something else) to Python data-types.")
1755 (license license:psfl)))
1756
1757 (define-public python2-schema
1758 (package-with-python2 python-schema))
1759
1760 (define-public python-schema-0.5
1761 (package (inherit python-schema)
1762 (version "0.5.0")
1763 (source
1764 (origin
1765 (method url-fetch)
1766 (uri (pypi-uri "schema" version))
1767 (sha256
1768 (base32
1769 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1770
1771 (define-public python2-schema-0.5
1772 (package-with-python2 python-schema-0.5))
1773
1774 (define-public python-kitchen
1775 (package
1776 (name "python-kitchen")
1777 (version "1.2.5")
1778 (source
1779 (origin
1780 (method url-fetch)
1781 (uri (pypi-uri "kitchen" version))
1782 (sha256
1783 (base32
1784 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1785 (build-system python-build-system)
1786 (propagated-inputs
1787 `(("python-chardet" ,python-chardet)))
1788 (home-page "https://github.com/fedora-infra/kitchen")
1789 (synopsis "Python API for snippets")
1790 (description "@code{kitchen} module provides a python API for all sorts of
1791 little useful snippets of code that everybody ends up writing for their projects
1792 but never seem big enough to build an independent release. Use kitchen and stop
1793 cutting and pasting that code over and over.")
1794 (license (list license:lgpl2.1+
1795 ;; subprocess.py, test_subprocess.py,
1796 ;; kitchen/pycompat25/defaultdict.py:
1797 license:psfl))))
1798
1799 (define-public python2-kitchen
1800 (package-with-python2 python-kitchen))
1801
1802 (define-public python-unidecode
1803 (package
1804 (name "python-unidecode")
1805 (version "1.0.23")
1806 (source (origin
1807 (method url-fetch)
1808 (uri (pypi-uri "Unidecode" version))
1809 (sha256
1810 (base32
1811 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
1812 (build-system python-build-system)
1813 (home-page "https://pypi.python.org/pypi/Unidecode")
1814 (synopsis "ASCII transliterations of Unicode text")
1815 (description
1816 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1817 useful when integrating with legacy code that doesn't support Unicode, or for
1818 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1819 machine identifiers from human-readable Unicode strings that should still be
1820 somewhat intelligible.")
1821 (license license:gpl2+)))
1822
1823 (define-public python2-unidecode
1824 (package-with-python2 python-unidecode))
1825
1826 (define-public python-pyjwt
1827 (package
1828 (name "python-pyjwt")
1829 (version "1.5.3")
1830 (source
1831 (origin
1832 (method url-fetch)
1833 (uri (pypi-uri "PyJWT" version))
1834 (sha256
1835 (base32
1836 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1837 (modules '((guix build utils)))
1838 (snippet
1839 '(begin
1840 (for-each delete-file-recursively
1841 (find-files "." "\\.pyc$"))
1842 #t))))
1843 (build-system python-build-system)
1844 (native-inputs
1845 `(("python-pytest" ,python-pytest)
1846 ("python-pytest-cov" ,python-pytest-cov)
1847 ("python-pytest-runner" ,python-pytest-runner)))
1848 (home-page "https://github.com/progrium/pyjwt")
1849 (synopsis "JSON Web Token implementation in Python")
1850 (description
1851 "PyJWT is a JSON Web Token implementation written in Python.")
1852 (license license:expat)))
1853
1854 (define-public python2-pyjwt
1855 (package-with-python2 python-pyjwt))
1856
1857 (define-public python-pykka
1858 (package
1859 (name "python-pykka")
1860 (version "1.2.1")
1861 (source
1862 (origin
1863 (method url-fetch)
1864 (uri (pypi-uri "Pykka" version))
1865 (sha256
1866 (base32
1867 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1868 (build-system python-build-system)
1869 (native-inputs
1870 `(("python-mock" ,python-mock)
1871 ("python-nose" ,python-nose)
1872 ("python-gevent" ,python-gevent)
1873 ("python-eventlet" ,python-eventlet)))
1874 (home-page "https://www.pykka.org/")
1875 (synopsis "Pykka is a Python implementation of the actor model")
1876 (description
1877 "Pykka is a Python implementation of the actor model.
1878 The actor model introduces some simple rules to control the sharing
1879 of state and cooperation between execution units, which makes it
1880 easier to build concurrent applications.")
1881 (license license:asl2.0)))
1882
1883 (define-public python2-pykka
1884 (package-with-python2 python-pykka))
1885
1886 (define-public python-pympler
1887 (package
1888 (name "python-pympler")
1889 (home-page "https://pythonhosted.org/Pympler/")
1890 (version "0.5")
1891 (source (origin
1892 (method url-fetch)
1893 (uri (pypi-uri "Pympler" version))
1894 (sha256
1895 (base32
1896 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
1897 (build-system python-build-system)
1898 (arguments
1899 `(#:phases (modify-phases %standard-phases
1900 (delete 'check)
1901 (add-after 'install 'check
1902 (lambda* (#:key inputs outputs #:allow-other-keys)
1903 (add-installed-pythonpath inputs outputs)
1904 (invoke "python" "setup.py" "test"))))))
1905 (synopsis "Measure, monitor and analyze memory behavior")
1906 (description
1907 "Pympler is a development tool to measure, monitor and analyze
1908 the memory behavior of Python objects in a running Python application.
1909
1910 By pympling a Python application, detailed insight in the size and the
1911 lifetime of Python objects can be obtained. Undesirable or unexpected
1912 runtime behavior like memory bloat and other @samp{pymples} can easily
1913 be identified.
1914
1915 A web profiling frontend exposes process statistics, garbage
1916 visualisation and class tracker statistics.")
1917 (license license:asl2.0)))
1918
1919 (define-public python2-pympler
1920 (package-with-python2 python-pympler))
1921
1922 (define-public python-itsdangerous
1923 (package
1924 (name "python-itsdangerous")
1925 (version "0.24")
1926 (source
1927 (origin
1928 (method url-fetch)
1929 (uri (string-append
1930 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
1931 version ".tar.gz"))
1932 (sha256
1933 (base32
1934 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
1935 (build-system python-build-system)
1936 (home-page "https://github.com/mitsuhiko/itsdangerous")
1937 (synopsis "Python library for passing data to/from untrusted environments")
1938 (description
1939 "Itsdangerous provides various helpers to pass trusted data to untrusted
1940 environments and back.")
1941 (license license:bsd-3)))
1942
1943 (define-public python2-itsdangerous
1944 (package-with-python2 python-itsdangerous))
1945
1946 (define-public python-pyyaml
1947 (package
1948 (name "python-pyyaml")
1949 (version "3.13")
1950 (source
1951 (origin
1952 (method url-fetch)
1953 (uri (pypi-uri "PyYAML" version))
1954 (sha256
1955 (base32
1956 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
1957 (build-system python-build-system)
1958 (inputs
1959 `(("libyaml" ,libyaml)))
1960 (home-page "http://pyyaml.org/wiki/PyYAML")
1961 (synopsis "YAML parser and emitter for Python")
1962 (description
1963 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
1964 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
1965 API, and sensible error messages. PyYAML supports standard YAML tags and
1966 provides Python-specific tags that allow to represent an arbitrary Python
1967 object.")
1968 (license license:expat)))
1969
1970 (define-public python2-pyyaml
1971 (package-with-python2 python-pyyaml))
1972
1973 (define-public python-vine
1974 (package
1975 (name "python-vine")
1976 (version "1.1.4")
1977 (source
1978 (origin
1979 (method url-fetch)
1980 (uri (pypi-uri "vine" version))
1981 (sha256
1982 (base32
1983 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
1984 (build-system python-build-system)
1985 (native-inputs
1986 `(("python-pytest" ,python-pytest)
1987 ("python-case" ,python-case)))
1988 (home-page "https://github.com/celery/vine")
1989 (synopsis "Promises for Python")
1990 (description
1991 "@code{vine} provides a special implementation of promises in that it can
1992 be used both for \"promise of a value\" and lazy evaluation. The biggest
1993 upside for this is that everything in a promise can also be a promise,
1994 e.g. filters, callbacks and errbacks can all be promises.")
1995 (license license:bsd-3)))
1996
1997 (define-public python-virtualenv
1998 (package
1999 (name "python-virtualenv")
2000 (version "16.1.0")
2001 (source
2002 (origin
2003 (method url-fetch)
2004 (uri (pypi-uri "virtualenv" version))
2005 (sha256
2006 (base32
2007 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2008 (build-system python-build-system)
2009 (arguments
2010 `(#:phases
2011 (modify-phases %standard-phases
2012 (add-before 'check 'disable-failing-test
2013 (lambda _
2014 ;; Disable failing test. See upstream bug report
2015 ;; https://github.com/pypa/virtualenv/issues/957
2016 (substitute* "tests/test_virtualenv.py"
2017 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2018 #t)))))
2019 (native-inputs
2020 `(("python-mock" ,python-mock)
2021 ("python-pytest" ,python-pytest)))
2022 (home-page "https://virtualenv.pypa.io/")
2023 (synopsis "Virtual Python environment builder")
2024 (description
2025 "Virtualenv is a tool to create isolated Python environments.")
2026 (license license:expat)))
2027
2028 (define-public python2-virtualenv
2029 (package-with-python2 python-virtualenv))
2030
2031 (define-public python-markupsafe
2032 (package
2033 (name "python-markupsafe")
2034 (version "1.0")
2035 (source
2036 (origin
2037 (method url-fetch)
2038 (uri (string-append
2039 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2040 version ".tar.gz"))
2041 (sha256
2042 (base32
2043 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2044 (build-system python-build-system)
2045 (home-page "https://github.com/mitsuhiko/markupsafe")
2046 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2047 (description
2048 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2049 for Python.")
2050 (license license:bsd-3)))
2051
2052 (define-public python2-markupsafe
2053 (package-with-python2 python-markupsafe))
2054
2055 (define-public python-jinja2
2056 (package
2057 (name "python-jinja2")
2058 (version "2.10")
2059 (source
2060 (origin
2061 (method url-fetch)
2062 (uri (pypi-uri "Jinja2" version))
2063 (sha256
2064 (base32
2065 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2066 (build-system python-build-system)
2067 (propagated-inputs
2068 `(("python-markupsafe" ,python-markupsafe)))
2069 (home-page "http://jinja.pocoo.org/")
2070 (synopsis "Python template engine")
2071 (description
2072 "Jinja2 is a small but fast and easy to use stand-alone template engine
2073 written in pure Python.")
2074 (license license:bsd-3)))
2075
2076 (define-public python2-jinja2
2077 (package-with-python2 python-jinja2))
2078
2079 (define-public python-pystache
2080 (package
2081 (name "python-pystache")
2082 (version "0.5.4")
2083 (source (origin
2084 (method url-fetch)
2085 (uri (pypi-uri "pystache" version))
2086 (sha256
2087 (base32
2088 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2089 (build-system python-build-system)
2090 (arguments
2091 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2092 (home-page "http://defunkt.io/pystache/")
2093 (synopsis "Python logic-less template engine")
2094 (description
2095 "Pystache is a Python implementation of the framework agnostic,
2096 logic-free templating system Mustache.")
2097 (license license:expat)
2098 (properties `((python2-variant . ,(delay python2-pystache))))))
2099
2100 (define-public python2-pystache
2101 (package (inherit (package-with-python2
2102 (strip-python2-variant python-pystache)))
2103 (arguments
2104 `(#:python ,python-2
2105 #:phases
2106 (modify-phases %standard-phases
2107 (replace 'check
2108 (lambda _
2109 (zero? (system* "python" "test_pystache.py")))))))))
2110
2111 (define-public python-joblib
2112 (package
2113 (name "python-joblib")
2114 (version "0.13.0")
2115 (source (origin
2116 (method url-fetch)
2117 (uri (pypi-uri "joblib" version))
2118 (sha256
2119 (base32
2120 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2121 (build-system python-build-system)
2122 (arguments
2123 `(#:phases
2124 (modify-phases %standard-phases
2125 (replace 'check
2126 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2127 (native-inputs
2128 `(("python-pytest" ,python-pytest)))
2129 (home-page "https://joblib.readthedocs.io/")
2130 (synopsis "Using Python functions as pipeline jobs")
2131 (description
2132 "Joblib is a set of tools to provide lightweight pipelining in Python.
2133 In particular, joblib offers: transparent disk-caching of the output values
2134 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2135 logging and tracing of the execution.")
2136 (license license:bsd-3)))
2137
2138 (define-public python2-joblib
2139 (package-with-python2 python-joblib))
2140
2141 (define-public python-docutils
2142 (package
2143 (name "python-docutils")
2144 (version "0.14")
2145 (source
2146 (origin
2147 (method url-fetch)
2148 (uri (pypi-uri "docutils" version))
2149 (sha256
2150 (base32
2151 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2152 (build-system python-build-system)
2153 (arguments
2154 '(#:tests? #f)) ; no setup.py test command
2155 (home-page "http://docutils.sourceforge.net/")
2156 (synopsis "Python Documentation Utilities")
2157 (description
2158 "Docutils is a modular system for processing documentation into useful
2159 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2160 reStructuredText.")
2161 ;; Most of the source code is public domain, but some source files are
2162 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2163 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2164
2165 (define-public python2-docutils
2166 (package-with-python2 python-docutils))
2167
2168 (define-public python-pygments
2169 (package
2170 (name "python-pygments")
2171 (version "2.2.0")
2172 (source
2173 (origin
2174 (method url-fetch)
2175 (uri (pypi-uri "Pygments" version))
2176 (sha256
2177 (base32
2178 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2179 (build-system python-build-system)
2180 (arguments
2181 ;; FIXME: Tests require sphinx, which depends on this.
2182 '(#:tests? #f))
2183 (home-page "http://pygments.org/")
2184 (synopsis "Syntax highlighting")
2185 (description
2186 "Pygments is a syntax highlighting package written in Python.")
2187 (license license:bsd-2)))
2188
2189 (define-public python2-pygments
2190 (package-with-python2 python-pygments))
2191
2192 (define-public python-sphinxcontrib-websupport
2193 (package
2194 (name "python-sphinxcontrib-websupport")
2195 (version "1.1.0")
2196 (source (origin
2197 (method url-fetch)
2198 (uri (pypi-uri "sphinxcontrib-websupport" version))
2199 (sha256
2200 (base32
2201 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2202 (build-system python-build-system)
2203 (arguments
2204 ;; FIXME: Tests depend on Sphinx, which depends on this.
2205 `(#:tests? #f))
2206 (home-page "http://sphinx-doc.org/")
2207 (synopsis "Sphinx API for web applications")
2208 (description "This package provides a Python API to easily integrate
2209 Sphinx documentation into your web application. It provides tools to
2210 integrate Sphinx documents in web templates and to handle searches.")
2211 (license license:bsd-3)))
2212
2213 (define-public python2-sphinxcontrib-websupport
2214 (package-with-python2 python-sphinxcontrib-websupport))
2215
2216 (define-public python-sphinx
2217 (package
2218 (name "python-sphinx")
2219 (version "1.7.7")
2220 (source
2221 (origin
2222 (method url-fetch)
2223 (uri (pypi-uri "Sphinx" version))
2224 (sha256
2225 (base32
2226 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2227 (build-system python-build-system)
2228 (arguments
2229 `(#:phases
2230 (modify-phases %standard-phases
2231 (replace 'check
2232 (lambda _
2233 ;; Requires Internet access.
2234 (delete-file "tests/test_build_linkcheck.py")
2235 (substitute* "tests/test_build_latex.py"
2236 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2237 "@pytest.mark.skip()"))
2238 (when (which "python")
2239 ;; XXX: These tests are broken when using Python2:
2240 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2241 (delete-file "tests/test_api_translator.py")
2242 (delete-file "tests/test_setup_command.py"))
2243 (invoke "make" "test"))))))
2244 (propagated-inputs
2245 `(("python-imagesize" ,python-imagesize)
2246 ("python-sphinx-alabaster-theme"
2247 ,python-sphinx-alabaster-theme)
2248 ("python-babel" ,python-babel)
2249 ("python-snowballstemmer" ,python-snowballstemmer)
2250 ("python-docutils" ,python-docutils)
2251 ("python-jinja2" ,python-jinja2)
2252 ("python-packaging" ,python-packaging)
2253 ("python-pygments" ,python-pygments)
2254 ("python-requests" ,python-requests)
2255 ("python-six" ,python-six)
2256 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2257 (native-inputs
2258 `(("graphviz" ,graphviz)
2259 ("imagemagick" ,imagemagick) ;for "convert"
2260 ("python-html5lib" ,python-html5lib)
2261 ("python-mock" ,python-mock)
2262 ("python-nose" ,python-nose)
2263 ("python-pytest" ,python-pytest)))
2264 (home-page "http://sphinx-doc.org/")
2265 (synopsis "Python documentation generator")
2266 (description "Sphinx is a tool that makes it easy to create documentation
2267 for Python projects or other documents consisting of multiple reStructuredText
2268 sources.")
2269 (license license:bsd-3)
2270 (properties `((python2-variant . ,(delay python2-sphinx))))))
2271
2272 (define-public python2-sphinx
2273 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2274 (package
2275 (inherit base)
2276 (native-inputs `(("python2-mock" ,python2-mock)
2277 ("python2-enum34" ,python2-enum34)
2278 ,@(package-native-inputs base)))
2279 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2280 ("python2-typing" ,python2-typing)
2281 ,@(package-propagated-inputs base))))))
2282
2283 (define-public python-sphinx-gallery
2284 (package
2285 (name "python-sphinx-gallery")
2286 (version "0.1.13")
2287 (source (origin
2288 (method url-fetch)
2289 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2290 "/archive/v" version ".tar.gz"))
2291 (file-name (string-append name "-" version ".tar.gz"))
2292 (sha256
2293 (base32
2294 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2295 (build-system python-build-system)
2296 (arguments
2297 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2298 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2299 ;; <https://matplotlib.org/objects.inv>.
2300 `(#:tests? #f))
2301 (native-inputs
2302 `(("python-pytest-runner" ,python-pytest-runner)))
2303 (home-page "https://sphinx-gallery.github.io/")
2304 (synopsis "Generate an examples gallery automatically")
2305 (description
2306 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2307 from any set of Python scripts and puts it into an examples gallery.")
2308 (license license:bsd-3)))
2309
2310 (define-public python2-sphinx-gallery
2311 (package-with-python2 python-sphinx-gallery))
2312
2313 (define-public python-sphinx-rtd-theme
2314 (package
2315 (name "python-sphinx-rtd-theme")
2316 (version "0.2.4")
2317 (source
2318 (origin
2319 (method url-fetch)
2320 (uri (pypi-uri "sphinx_rtd_theme" version))
2321 (sha256
2322 (base32
2323 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2324 (build-system python-build-system)
2325 (arguments '(#:tests? #f)) ; No tests.
2326 (propagated-inputs
2327 `(("python-sphinx" ,python-sphinx)))
2328 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2329 (synopsis "ReadTheDocs.org theme for Sphinx")
2330 (description "A theme for Sphinx used by ReadTheDocs.org.")
2331 (license license:expat)))
2332
2333 (define-public python2-sphinx-rtd-theme
2334 (package-with-python2 python-sphinx-rtd-theme))
2335
2336 (define-public python-guzzle-sphinx-theme
2337 (package
2338 (name "python-guzzle-sphinx-theme")
2339 (version "0.7.11")
2340 (source
2341 (origin
2342 (method url-fetch)
2343 (uri (pypi-uri "guzzle_sphinx_theme" version))
2344 (sha256
2345 (base32
2346 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2347 (build-system python-build-system)
2348 (propagated-inputs
2349 `(("python-sphinx" ,python-sphinx)))
2350 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2351 (synopsis "Sphinx theme used by Guzzle")
2352 (description "This package provides guzzle_sphinx_theme, a theme for the
2353 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2354 and several other projects.")
2355 (license license:expat)))
2356
2357 (define-public python2-guzzle-sphinx-theme
2358 (package-with-python2 python-guzzle-sphinx-theme))
2359
2360 (define-public python-rst.linker
2361 (package
2362 (name "python-rst.linker")
2363 (version "1.10")
2364 (source
2365 (origin
2366 (method url-fetch)
2367 (uri (pypi-uri "rst.linker" version))
2368 (sha256
2369 (base32
2370 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2371 (build-system python-build-system)
2372 (propagated-inputs
2373 `(("python-dateutil" ,python-dateutil)
2374 ("python-six" ,python-six)))
2375 (native-inputs
2376 `(("python-setuptools-scm" ,python-setuptools-scm)))
2377 ;; Test would require path.py, which would introduce a cyclic dependence.
2378 (arguments `(#:tests? #f))
2379 ;; Note: As of version 1.7 the documentation is not worth building.
2380 (home-page "https://github.com/jaraco/rst.linker")
2381 (synopsis "Sphinx plugin to add links and timestamps")
2382 (description "rst.linker allows to automatically replace text by a
2383 reStructuredText external reference or timestamps. It's primary purpose is to
2384 augment the changelog, but it can be used for other documents, too.")
2385 (license license:expat)))
2386
2387 (define-public python2-rst.linker
2388 (package-with-python2 python-rst.linker))
2389
2390 (define-public python-feedgenerator
2391 (package
2392 (name "python-feedgenerator")
2393 (version "1.9")
2394 (source
2395 (origin
2396 (method url-fetch)
2397 (uri (pypi-uri "feedgenerator" version))
2398 (sha256
2399 (base32
2400 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2401 (modules '((guix build utils)))
2402 (snippet
2403 '(begin
2404 ;; Remove pre-compiled .pyc files from source.
2405 (for-each delete-file-recursively
2406 (find-files "." "__pycache__" #:directories? #t))
2407 (for-each delete-file (find-files "." "\\.pyc$"))
2408 #t))))
2409 (build-system python-build-system)
2410 (propagated-inputs
2411 `(("python-pytz" ,python-pytz)
2412 ("python-six" ,python-six)))
2413 (home-page "https://github.com/getpelican/feedgenerator")
2414 (synopsis
2415 "Standalone version of Django's Atom/RSS feed generator")
2416 (description
2417 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2418 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2419 (license license:bsd-3)))
2420
2421 (define-public python2-feedgenerator
2422 (package-with-python2 python-feedgenerator))
2423
2424 (define-public python-toml
2425 (package
2426 (name "python-toml")
2427 (version "0.9.4")
2428 (source
2429 (origin
2430 (method url-fetch)
2431 (uri (pypi-uri "toml" version))
2432 (sha256
2433 (base32
2434 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2435 (build-system python-build-system)
2436 (arguments
2437 `(#:tests? #f)) ;no tests suite in release
2438 (home-page "https://github.com/uiri/toml")
2439 (synopsis "Library for TOML")
2440 (description
2441 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2442 Language (TOML) configuration files.")
2443 (license license:expat)))
2444
2445 (define-public python-black
2446 (package
2447 (name "python-black")
2448 (version "18.6b4")
2449 (source
2450 (origin
2451 (method url-fetch)
2452 (uri (pypi-uri "black" version))
2453 (sha256
2454 (base32
2455 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2456 (build-system python-build-system)
2457 (arguments
2458 `(#:phases
2459 (modify-phases %standard-phases
2460 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2461 (lambda _
2462 (let ((python3 (which "python3")))
2463 (substitute* '("tests/data/fmtonoff.py"
2464 "tests/data/string_prefixes.py"
2465 "tests/data/function.py")
2466 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2467 (string-append "#!" python3 (if (string? minor-version)
2468 minor-version
2469 ""))))))))))
2470 (propagated-inputs
2471 `(("python-click" ,python-click)
2472 ("python-attrs" ,python-attrs)
2473 ("python-appdirs" ,python-appdirs)
2474 ("python-toml" ,python-toml)))
2475 (home-page "https://github.com/ambv/black")
2476 (synopsis "The uncompromising code formatter")
2477 (description "Black is the uncompromising Python code formatter.")
2478 (license license:expat)))
2479
2480 (define-public python-blinker
2481 (package
2482 (name "python-blinker")
2483 (version "1.4")
2484 (source
2485 (origin
2486 (method url-fetch)
2487 (uri (pypi-uri "blinker" version))
2488 (sha256
2489 (base32
2490 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2491 (build-system python-build-system)
2492 (home-page "http://pythonhosted.org/blinker/")
2493 (synopsis "Fast, simple object-to-object and broadcast signaling")
2494 (description
2495 "Blinker provides a fast dispatching system that allows any number of
2496 interested parties to subscribe to events, or \"signals\".")
2497 (license license:expat)))
2498
2499 (define-public python2-blinker
2500 (package-with-python2 python-blinker))
2501
2502 (define-public pelican
2503 (package
2504 (name "pelican")
2505 (version "3.7.1")
2506 (source
2507 (origin
2508 (method url-fetch)
2509 (uri (pypi-uri "pelican" version))
2510 (sha256
2511 (base32
2512 "12spygavv9b6xpb5pgp7f0p3z0mms60nx6zrpx1yfkj68zz4flra"))))
2513 (build-system python-build-system)
2514 (propagated-inputs
2515 `(("python-feedgenerator" ,python-feedgenerator)
2516 ("python-jinja2" ,python-jinja2)
2517 ("python-pygments" ,python-pygments)
2518 ("python-docutils" ,python-docutils)
2519 ("python-pytz" ,python-pytz)
2520 ("python-blinker" ,python-blinker)
2521 ("python-unidecode" ,python-unidecode)
2522 ("python-six" ,python-six)
2523 ("python-dateutil" ,python-dateutil)
2524 ("python-markdown" ,python-markdown)))
2525 (home-page "https://getpelican.com/")
2526 (arguments
2527 `(;; XXX Requires a lot more packages to do unit tests :P
2528 #:tests? #f
2529 #:phases (modify-phases %standard-phases
2530 (add-before
2531 'install 'adjust-requires
2532 ;; Since feedgenerator is installed from git, it doesn't
2533 ;; conform to the version requirements.
2534 ;;
2535 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2536 ;; version requirement so setuptools doesn't get confused.
2537 (lambda _
2538 (substitute* "setup.py"
2539 (("['\"]feedgenerator.*?['\"]")
2540 "'feedgenerator'")))))))
2541 (synopsis "Python-based static site publishing system")
2542 (description
2543 "Pelican is a tool to generate a static blog from reStructuredText,
2544 Markdown input files, and more. Pelican uses Jinja2 for templating
2545 and is very extensible.")
2546 (license license:agpl3+)))
2547
2548 (define-public python-scikit-image
2549 (package
2550 (name "python-scikit-image")
2551 (version "0.14.1")
2552 (source
2553 (origin
2554 (method url-fetch)
2555 (uri (pypi-uri "scikit-image" version))
2556 (sha256
2557 (base32 "0l1c3rl4s1jyv80i5hns4pgih09zrxfj7lygdc51w8sgyysb7ac6"))))
2558 (build-system python-build-system)
2559 (arguments
2560 ;; TODO: Some tests require running X11 server. Disable them?
2561 '(#:tests? #f))
2562 ;; See DEPENDS.txt for the list of build and run time requiremnts
2563 (propagated-inputs
2564 `(("python-cloudpickle" ,python-cloudpickle)
2565 ("python-dask" ,python-dask)
2566 ("python-matplotlib" ,python-matplotlib)
2567 ("python-networkx" ,python-networkx)
2568 ("python-numpy" ,python-numpy)
2569 ("python-pillow" ,python-pillow)
2570 ("python-pywavelets" ,python-pywavelets)
2571 ("python-scipy" ,python-scipy)
2572 ("python-six" ,python-six)))
2573 (native-inputs
2574 `(("python-cython" ,python-cython)))
2575 (home-page "http://scikit-image.org/")
2576 (synopsis "Image processing in Python")
2577 (description
2578 "Scikit-image is a collection of algorithms for image processing.")
2579 (license license:bsd-3)))
2580
2581 (define-public python2-scikit-image
2582 (package-with-python2 python-scikit-image))
2583
2584 (define-public python-cython
2585 (package
2586 (name "python-cython")
2587 (version "0.28.4")
2588 (source
2589 (origin
2590 (method url-fetch)
2591 (uri (pypi-uri "Cython" version))
2592 (sha256
2593 (base32
2594 "0imw9s2rbrh32clbl10csnwmig9p3nzkrd2baxxxfmnrsc42pb3n"))))
2595 (build-system python-build-system)
2596 ;; we need the full python package and not just the python-wrapper
2597 ;; because we need libpython3.3m.so
2598 (inputs
2599 `(("python" ,python)))
2600 (arguments
2601 `(#:phases
2602 (modify-phases %standard-phases
2603 (add-before 'check 'set-HOME
2604 ;; some tests require access to "$HOME/.cython"
2605 (lambda _ (setenv "HOME" "/tmp") #t))
2606
2607 ;; FIXME: These tests started failing on armhf after the 0.28 update
2608 ;; (commit c69d11c5930), both with an error such as this:
2609 ;; compiling (cpp) and running dictcomp ...
2610 ;; === C/C++ compiler error output: ===
2611 ;; ‘
2612 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2613 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2614 ,@(if (target-arm32?)
2615 `((add-before 'check 'disable-failing-tests
2616 (lambda _
2617 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2618 (for-each (lambda (test)
2619 (format disabled-tests "~a\n" test))
2620 '("memslice" "dictcomp"))
2621 (close-port disabled-tests)))))
2622 '())
2623
2624 (replace 'check
2625 (lambda _
2626 ;; The "with_outer_raising" test fails with Python 3.7. See
2627 ;; https://github.com/cython/cython/issues/2454
2628 (delete-file "tests/run/generators_py.py")
2629 (invoke "python" "runtests.py" "-vv"))))))
2630 (home-page "http://cython.org/")
2631 (synopsis "C extensions for Python")
2632 (description "Cython is an optimising static compiler for both the Python
2633 programming language and the extended Cython programming language. It makes
2634 writing C extensions for Python as easy as Python itself.")
2635 (license license:asl2.0)
2636 (properties `((python2-variant . ,(delay python2-cython))))))
2637
2638 (define-public python2-cython
2639 (package (inherit (package-with-python2
2640 (strip-python2-variant python-cython)))
2641 (name "python2-cython")
2642 (inputs
2643 `(("python-2" ,python-2))))) ; this is not automatically changed
2644
2645 ;; The RPython toolchain currently does not support Python 3.
2646 (define-public python2-rpython
2647 (package
2648 (name "python2-rpython")
2649 (version "0.2.1")
2650 (source
2651 (origin
2652 (method url-fetch)
2653 (uri (pypi-uri "rpython" version))
2654 (sha256
2655 (base32
2656 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2657 (build-system python-build-system)
2658 (arguments `(#:python ,python-2))
2659 (native-inputs
2660 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2661 (home-page "https://rpython.readthedocs.org")
2662 (synopsis "Framework for implementing interpreters and virtual machines")
2663 (description "RPython is a translation and support framework for
2664 producing implementations of dynamic languages, emphasizing a clean separation
2665 between language specification and implementation aspects.")
2666 (license license:expat)))
2667
2668 ;; NOTE: when upgrading numpy please make sure that python-pandas and
2669 ;; python-scipy still build, as these three packages are often used together.
2670 (define-public python-numpy
2671 (package
2672 (name "python-numpy")
2673 (version "1.15.4")
2674 (source
2675 (origin
2676 (method url-fetch)
2677 (uri (string-append
2678 "https://github.com/numpy/numpy/releases/download/v"
2679 version "/numpy-" version ".tar.gz"))
2680 (sha256
2681 (base32
2682 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
2683 (build-system python-build-system)
2684 (inputs
2685 `(("openblas" ,openblas)
2686 ("lapack" ,lapack)))
2687 (native-inputs
2688 `(("python-cython" ,python-cython)
2689 ("python-pytest" ,python-pytest)
2690 ("gfortran" ,gfortran)))
2691 (arguments
2692 `(#:phases
2693 (modify-phases %standard-phases
2694 (add-before 'build 'configure-blas-lapack
2695 (lambda* (#:key inputs #:allow-other-keys)
2696 (call-with-output-file "site.cfg"
2697 (lambda (port)
2698 (format port
2699 "[openblas]
2700 libraries = openblas
2701 library_dirs = ~a/lib
2702 include_dirs = ~a/include
2703
2704 # backslash-n to make emacs happy
2705 \n[lapack]
2706 lapack_libs = lapack
2707 library_dirs = ~a/lib
2708 include_dirs = ~a/include
2709 "
2710 (assoc-ref inputs "openblas")
2711 (assoc-ref inputs "openblas")
2712 (assoc-ref inputs "lapack")
2713 (assoc-ref inputs "lapack"))))
2714 #t))
2715 (add-before 'build 'fix-executable-paths
2716 (lambda* (#:key inputs #:allow-other-keys)
2717 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2718 ;; instead of /bin/sh.
2719 (substitute* "numpy/distutils/exec_command.py"
2720 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2721 (string-append match-start (assoc-ref inputs "bash") match-end)))
2722 ;; Use "gcc" executable, not "cc".
2723 (substitute* "numpy/distutils/system_info.py"
2724 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2725 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2726 #t))
2727 ;; Tests can only be run after the library has been installed and not
2728 ;; within the source directory.
2729 (delete 'check)
2730 (add-after 'install 'check
2731 (lambda* (#:key outputs inputs #:allow-other-keys)
2732 ;; Make installed package available for running the tests
2733 (add-installed-pythonpath inputs outputs)
2734 ;; Make sure "f2py" etc is found.
2735 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
2736 ":" (getenv "PATH")))
2737 (with-directory-excursion "/tmp"
2738 (invoke "python" "-c"
2739 "import numpy; numpy.test(verbose=2)")))))))
2740 (home-page "http://www.numpy.org/")
2741 (synopsis "Fundamental package for scientific computing with Python")
2742 (description "NumPy is the fundamental package for scientific computing
2743 with Python. It contains among other things: a powerful N-dimensional array
2744 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2745 and Fortran code, useful linear algebra, Fourier transform, and random number
2746 capabilities.")
2747 (license license:bsd-3)))
2748
2749 (define-public python2-numpy
2750 (package-with-python2 python-numpy))
2751
2752 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2753 ;; interest only for legacy code going back to NumPy's predecessor
2754 ;; Numeric.
2755 (define-public python2-numpy-1.8
2756 (package (inherit python2-numpy)
2757 (version "1.8.2")
2758 (source
2759 (origin
2760 (method url-fetch)
2761 (uri (string-append
2762 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2763 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2764 (sha256
2765 (base32
2766 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2767 (arguments
2768 (substitute-keyword-arguments (package-arguments python2-numpy)
2769 ((#:phases phases)
2770 `(modify-phases ,phases
2771 (replace 'configure-blas-lapack
2772 (lambda* (#:key inputs #:allow-other-keys)
2773 (call-with-output-file "site.cfg"
2774 (lambda (port)
2775 (format port
2776 "[openblas]
2777 libraries = openblas,lapack
2778 library_dirs = ~a/lib:~a/lib
2779 include_dirs = ~a/include:~a/include
2780 "
2781 (assoc-ref inputs "openblas")
2782 (assoc-ref inputs "lapack")
2783 (assoc-ref inputs "openblas")
2784 (assoc-ref inputs "lapack"))))
2785 #t))))))
2786 (native-inputs
2787 `(("python2-nose" ,python2-nose)))
2788 (description "NumPy is the fundamental package for scientific computing
2789 with Python. It contains among other things: a powerful N-dimensional array
2790 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2791 and Fortran code, useful linear algebra, Fourier transform, and random number
2792 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
2793 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
2794 Numeric.")
2795 (license license:bsd-3)))
2796
2797 (define-public python-munch
2798 (package
2799 (name "python-munch")
2800 (version "2.0.4")
2801 (source
2802 (origin
2803 (method url-fetch)
2804 (uri (pypi-uri "munch" version))
2805 (sha256
2806 (base32
2807 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
2808 (build-system python-build-system)
2809 (home-page "https://github.com/Infinidat/munch")
2810 (synopsis "Dot-accessible dictionary")
2811 (description "Munch is a dot-accessible dictionary similar to JavaScript
2812 objects.")
2813 (license license:expat)))
2814
2815 (define-public python2-munch
2816 (package-with-python2 python-munch))
2817
2818 (define-public python-colormath
2819 (package
2820 (name "python-colormath")
2821 (version "3.0.0")
2822 (source
2823 (origin
2824 (method url-fetch)
2825 (uri (pypi-uri "colormath" version))
2826 (sha256
2827 (base32
2828 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
2829 (build-system python-build-system)
2830 (propagated-inputs
2831 `(("python-networkx" ,python-networkx)
2832 ("python-numpy" ,python-numpy)))
2833 (home-page "https://github.com/gtaylor/python-colormath")
2834 (synopsis "Color math and conversion library")
2835 (description
2836 "This is a Python library for color math and conversions.")
2837 (license license:bsd-3)))
2838
2839 (define-public python2-colormath
2840 (package-with-python2 python-colormath))
2841
2842 (define-public python-spectra
2843 (package
2844 (name "python-spectra")
2845 (version "0.0.11")
2846 (source
2847 (origin
2848 (method url-fetch)
2849 (uri (pypi-uri "spectra" version))
2850 (sha256
2851 (base32
2852 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
2853 (build-system python-build-system)
2854 (arguments
2855 `(#:phases
2856 (modify-phases %standard-phases
2857 (replace 'check
2858 (lambda _
2859 (zero? (system* "nosetests" "-v")))))))
2860 (propagated-inputs
2861 `(("python-colormath" ,python-colormath)))
2862 (native-inputs
2863 `(("python-nose" ,python-nose)))
2864 (home-page "https://github.com/jsvine/spectra")
2865 (synopsis "Color scales and color conversion")
2866 (description
2867 "This package provides a Python library intended to make color math,
2868 color scales, and color space conversion easy. It has support for:
2869
2870 @enumerate
2871 @item Color scales
2872 @item Color ranges
2873 @item Color blending
2874 @item Brightening/darkening colors
2875 @item Saturating/desaturating colors
2876 @item Conversion to/from multiple color spaces.
2877 @end enumerate\n")
2878 (license license:expat)))
2879
2880 (define-public python2-spectra
2881 (package-with-python2 python-spectra))
2882
2883 (define-public python-numpy-documentation
2884 (package
2885 (name "python-numpy-documentation")
2886 (version (package-version python-numpy))
2887 (source (package-source python-numpy))
2888 (build-system python-build-system)
2889 (native-inputs
2890 `(("python-matplotlib" ,python-matplotlib)
2891 ("python-numpy" ,python-numpy)
2892 ("pkg-config" ,pkg-config)
2893 ("python-sphinx" ,python-sphinx)
2894 ("python-numpydoc" ,python-numpydoc)
2895 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
2896 texlive-fonts-cm-super
2897 texlive-fonts-ec
2898 texlive-generic-ifxetex
2899 texlive-generic-pdftex
2900 texlive-latex-amsfonts
2901 texlive-latex-capt-of
2902 texlive-latex-cmap
2903 texlive-latex-environ
2904 texlive-latex-eqparbox
2905 texlive-latex-etoolbox
2906 texlive-latex-expdlist
2907 texlive-latex-fancyhdr
2908 texlive-latex-fancyvrb
2909 texlive-latex-fncychap
2910 texlive-latex-float
2911 texlive-latex-framed
2912 texlive-latex-geometry
2913 texlive-latex-graphics
2914 texlive-latex-hyperref
2915 texlive-latex-mdwtools
2916 texlive-latex-multirow
2917 texlive-latex-needspace
2918 texlive-latex-oberdiek
2919 texlive-latex-parskip
2920 texlive-latex-preview
2921 texlive-latex-tabulary
2922 texlive-latex-threeparttable
2923 texlive-latex-titlesec
2924 texlive-latex-trimspaces
2925 texlive-latex-ucs
2926 texlive-latex-upquote
2927 texlive-latex-url
2928 texlive-latex-varwidth
2929 texlive-latex-wrapfig)))
2930 ("texinfo" ,texinfo)
2931 ("perl" ,perl)
2932 ("scipy-sphinx-theme"
2933 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
2934 (method git-fetch)
2935 (uri (git-reference
2936 (url "https://github.com/scipy/scipy-sphinx-theme.git")
2937 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
2938 (sha256
2939 (base32
2940 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
2941 ,@(package-native-inputs python-numpy)))
2942 (arguments
2943 `(#:tests? #f ; we're only generating the documentation
2944 #:phases
2945 (modify-phases %standard-phases
2946 (delete 'build)
2947 (replace 'install
2948 (lambda* (#:key inputs outputs #:allow-other-keys)
2949 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
2950 (doc (string-append
2951 data "/doc/" ,name "-"
2952 ,(package-version python-numpy)))
2953 (info-reader (string-append data "/info"))
2954 (html (string-append doc "/html"))
2955 (scipy-sphinx-theme "scipy-sphinx-theme")
2956 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
2957 (pyver ,(string-append "PYVER=")))
2958
2959 ;; FIXME: this is needed to for texlive-union to generate
2960 ;; fonts, which are not found.
2961 (setenv "HOME" "/tmp")
2962
2963 (with-directory-excursion "doc"
2964 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
2965 (mkdir-p html)
2966 (system* "make" "html" pyver)
2967 (system* "make" "latex" "PAPER=a4" pyver)
2968 (system* "make" "-C" "build/latex"
2969 "all-pdf" "PAPER=a4" pyver)
2970 ;; FIXME: Generation of the info file fails.
2971 ;; (system* "make" "info" pyver)
2972 ;; (mkdir-p info)
2973 ;; (copy-file "build/texinfo/numpy.info"
2974 ;; (string-append info "/numpy.info"))
2975 (for-each (lambda (file)
2976 (copy-file (string-append "build/latex" file)
2977 (string-append doc file)))
2978 '("/numpy-ref.pdf" "/numpy-user.pdf"))
2979 (with-directory-excursion "build/html"
2980 (for-each (lambda (file)
2981 (let* ((dir (dirname file))
2982 (tgt-dir (string-append html "/" dir)))
2983 (unless (equal? "." dir)
2984 (mkdir-p tgt-dir))
2985 (install-file file html)))
2986 (find-files "." ".*")))))
2987 #t)))))
2988 (home-page (package-home-page python-numpy))
2989 (synopsis "Documentation for the python-numpy package")
2990 (description (package-description python-numpy))
2991 (license (package-license python-numpy))))
2992
2993 (define-public python2-numpy-documentation
2994 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
2995 (package
2996 (inherit numpy-documentation)
2997 (native-inputs `(("python2-functools32" ,python2-functools32)
2998 ,@(package-native-inputs numpy-documentation))))))
2999
3000 (define-public python-pygit2
3001 (package
3002 (name "python-pygit2")
3003 (version "0.27.3")
3004 (source
3005 (origin
3006 (method url-fetch)
3007 (uri (pypi-uri "pygit2" version))
3008 (sha256
3009 (base32
3010 "046ahvsb7a20sgvscqfm3cb32sp3sii4gim9vz7zzrkf7yz16xlv"))))
3011 (build-system python-build-system)
3012 (arguments
3013 '(#:phases
3014 (modify-phases %standard-phases
3015 ;; Remove after the next update. See:
3016 ;; https://github.com/libgit2/pygit2/pull/851
3017 (add-after 'unpack 'compile-with-cffi
3018 (lambda _
3019 (substitute* "setup.py"
3020 (("install_requires")
3021 "setup_requires=['cffi'],\n install_requires"))
3022 #t))
3023 (add-after 'unpack 'fix-dependency-versioning
3024 (lambda _
3025 (substitute* "setup.py"
3026 (("<") "<="))
3027 #t)))))
3028 (propagated-inputs
3029 `(("python-six" ,python-six)
3030 ("python-cffi" ,python-cffi)
3031 ("libgit2" ,libgit2)
3032 ("python-tox" ,python-tox)))
3033 (native-inputs
3034 `(("python-pytest" ,python-pytest)))
3035 (home-page "https://github.com/libgit2/pygit2")
3036 (synopsis "Python bindings for libgit2")
3037 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3038 library, libgit2 implements Git plumbing.")
3039 ;; GPL2.0 only, with linking exception.
3040 (license license:gpl2)))
3041
3042 (define-public python2-pygit2
3043 (package-with-python2 python-pygit2))
3044
3045 (define-public python-pyparsing
3046 (package
3047 (name "python-pyparsing")
3048 (version "2.2.1")
3049 (source
3050 (origin
3051 (method url-fetch)
3052 (uri (pypi-uri "pyparsing" version))
3053 (sha256
3054 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3055 (build-system python-build-system)
3056 (outputs '("out" "doc"))
3057 (arguments
3058 `(#:tests? #f ; no test target
3059 #:phases
3060 (modify-phases %standard-phases
3061 (add-after 'install 'install-doc
3062 (lambda* (#:key outputs #:allow-other-keys)
3063 (let* ((doc (string-append (assoc-ref outputs "doc")
3064 "/share/doc/" ,name "-" ,version))
3065 (html-doc (string-append doc "/html"))
3066 (examples (string-append doc "/examples")))
3067 (mkdir-p html-doc)
3068 (mkdir-p examples)
3069 (for-each
3070 (lambda (dir tgt)
3071 (map (lambda (file)
3072 (install-file file tgt))
3073 (find-files dir ".*")))
3074 (list "docs" "htmldoc" "examples")
3075 (list doc html-doc examples))
3076 #t))))))
3077 (home-page "https://github.com/pyparsing/pyparsing")
3078 (synopsis "Python parsing class library")
3079 (description
3080 "The pyparsing module is an alternative approach to creating and
3081 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3082 of regular expressions. The pyparsing module provides a library of classes
3083 that client code uses to construct the grammar directly in Python code.")
3084 (license license:expat)))
3085
3086 (define-public python2-pyparsing
3087 (package-with-python2 python-pyparsing))
3088
3089 (define-public python-numpydoc
3090 (package
3091 (name "python-numpydoc")
3092 (version "0.8.0")
3093 (source
3094 (origin
3095 (method url-fetch)
3096 (uri (pypi-uri "numpydoc" version))
3097 (sha256
3098 (base32
3099 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3100 (build-system python-build-system)
3101 (propagated-inputs
3102 `(("python-sphinx" ,python-sphinx)))
3103 (native-inputs
3104 `(("python-nose" ,python-nose)))
3105 (home-page "https://pypi.python.org/pypi/numpydoc")
3106 (synopsis
3107 "Numpy's Sphinx extensions")
3108 (description
3109 "Sphinx extension to support docstrings in Numpy format.")
3110 (license license:bsd-2)))
3111
3112 (define-public python2-numpydoc
3113 (package-with-python2 python-numpydoc))
3114
3115 (define-public python-numexpr
3116 (package
3117 (name "python-numexpr")
3118 (version "2.6.5")
3119 (source
3120 (origin
3121 (method url-fetch)
3122 (uri (pypi-uri "numexpr" version))
3123 (sha256
3124 (base32
3125 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3126 (build-system python-build-system)
3127 (arguments `(#:tests? #f)) ; no tests included
3128 (propagated-inputs
3129 `(("python-numpy" ,python-numpy)))
3130 (home-page "https://github.com/pydata/numexpr")
3131 (synopsis "Fast numerical expression evaluator for NumPy")
3132 (description
3133 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3134 expressions that operate on arrays are accelerated and use less memory than
3135 doing the same calculation in Python. In addition, its multi-threaded
3136 capabilities can make use of all your cores, which may accelerate
3137 computations, most specially if they are not memory-bounded (e.g. those using
3138 transcendental functions).")
3139 (license license:expat)))
3140
3141 (define-public python2-numexpr
3142 (package-with-python2 python-numexpr))
3143
3144 (define-public python-cycler
3145 (package
3146 (name "python-cycler")
3147 (version "0.10.0")
3148 (source (origin
3149 (method url-fetch)
3150 (uri (pypi-uri "cycler" version))
3151 (sha256
3152 (base32
3153 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3154 (build-system python-build-system)
3155 (arguments
3156 ;; XXX: The current version requires 'coveralls' which we don't have.
3157 ;; Enable this for the next release which uses 'python-pytest'.
3158 '(#:tests? #f))
3159 (propagated-inputs
3160 `(("python-six" ,python-six)))
3161 (home-page "http://matplotlib.org/cycler/")
3162 (synopsis "Composable keyword argument iterator")
3163 (description
3164 "When using @code{matplotlib} and plotting more than one line, it is
3165 common to want to be able to want to be able to cycle over one or more artist
3166 styles; but the plotting logic can quickly become involved.
3167 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3168 @code{Cycler} class was developed.")
3169 (license license:bsd-3)))
3170
3171 (define-public python2-cycler
3172 (package-with-python2 python-cycler))
3173
3174 (define-public python-colorspacious
3175 (package
3176 (name "python-colorspacious")
3177 (version "1.1.0")
3178 (source
3179 (origin
3180 (method url-fetch)
3181 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3182 version ".tar.gz"))
3183 (file-name (string-append name "-" version))
3184 (sha256
3185 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3186 (build-system python-build-system)
3187 (propagated-inputs
3188 `(("python-numpy" ,python-numpy)))
3189 (native-inputs
3190 `(("python-nose" ,python-nose)))
3191 (arguments
3192 `(#:phases
3193 (modify-phases %standard-phases
3194 (replace 'check
3195 (lambda _
3196 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3197 (home-page "https://github.com/njsmith/colorspacious")
3198 (synopsis "Python library for colorspace conversions")
3199 (description "@code{colorspacious} is a Python library that lets you
3200 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3201 (license license:expat)))
3202
3203 (define-public python2-colorspacious
3204 (package-with-python2 python-colorspacious))
3205
3206 (define-public python-matplotlib
3207 (package
3208 (name "python-matplotlib")
3209 (version "2.2.3")
3210 (source
3211 (origin
3212 (method url-fetch)
3213 (uri (pypi-uri "matplotlib" version))
3214 (sha256
3215 (base32
3216 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3217 (build-system python-build-system)
3218 (propagated-inputs ; the following packages are all needed at run time
3219 `(("python-cycler" ,python-cycler)
3220 ("python-kiwisolver" ,python-kiwisolver)
3221 ("python-pyparsing" ,python-pyparsing)
3222 ("python-pygobject" ,python-pygobject)
3223 ("gobject-introspection" ,gobject-introspection)
3224 ("python-tkinter" ,python "tk")
3225 ("python-dateutil" ,python-dateutil)
3226 ("python-numpy" ,python-numpy)
3227 ("python-pillow" ,python-pillow)
3228 ("python-pytz" ,python-pytz)
3229 ("python-six" ,python-six)
3230 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3231 ;; from 'gtk+') provides the required 'typelib' files used by
3232 ;; 'gobject-introspection'. The location of these files is set with the
3233 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3234 ;; is done automatically by a 'native-search-path' procedure. However,
3235 ;; at run-time the user must set this variable as follows:
3236 ;;
3237 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3238 ("gtk+" ,gtk+)
3239 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3240 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3241 ;; object. For this reason we need to import both libraries.
3242 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3243 ("python-pycairo" ,python-pycairo)
3244 ;; XXX: qtwebkit cannot be built reliably.
3245 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3246 ("python-cairocffi" ,python-cairocffi)))
3247 (inputs
3248 `(("libpng" ,libpng)
3249 ("imagemagick" ,imagemagick)
3250 ("freetype" ,freetype)
3251 ("cairo" ,cairo)
3252 ("glib" ,glib)
3253 ;; FIXME: Add backends when available.
3254 ;("python-wxpython" ,python-wxpython)
3255 ("tcl" ,tcl)
3256 ("tk" ,tk)))
3257 (native-inputs
3258 `(("pkg-config" ,pkg-config)
3259 ("python-nose" ,python-nose)
3260 ("python-mock" ,python-mock)))
3261 (arguments
3262 `(#:phases
3263 (modify-phases %standard-phases
3264 (add-before 'build 'configure-environment
3265 (lambda* (#:key outputs inputs #:allow-other-keys)
3266 (let ((cairo (assoc-ref inputs "cairo"))
3267 (gtk+ (assoc-ref inputs "gtk+")))
3268 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3269 ;; has not effect.
3270 (setenv "LD_LIBRARY_PATH"
3271 (string-append cairo "/lib:" gtk+ "/lib"))
3272 (setenv "HOME" (getcwd))
3273 (call-with-output-file "setup.cfg"
3274 (lambda (port)
3275 (format port "[directories]~%
3276 basedirlist = ~a,~a~%
3277 [rc_options]~%
3278 backend = TkAgg~%"
3279 (assoc-ref inputs "tcl")
3280 (assoc-ref inputs "tk")))))
3281 #t)))))
3282 (home-page "http://matplotlib.org")
3283 (synopsis "2D plotting library for Python")
3284 (description
3285 "Matplotlib is a Python 2D plotting library which produces publication
3286 quality figures in a variety of hardcopy formats and interactive environments
3287 across platforms. Matplotlib can be used in Python scripts, the python and
3288 ipython shell, web application servers, and six graphical user interface
3289 toolkits.")
3290 (license license:psfl)
3291 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3292
3293 (define-public python2-matplotlib
3294 (let ((matplotlib (package-with-python2
3295 (strip-python2-variant python-matplotlib))))
3296 (package (inherit matplotlib)
3297 ;; Make sure to use special packages for Python 2 instead
3298 ;; of those automatically rewritten by package-with-python2.
3299 (propagated-inputs
3300 `(("python2-pycairo" ,python2-pycairo)
3301 ("python2-backports-functools-lru-cache"
3302 ,python2-backports-functools-lru-cache)
3303 ("python2-functools32" ,python2-functools32)
3304 ("python2-pygobject-2" ,python2-pygobject-2)
3305 ("python2-subprocess32" ,python2-subprocess32)
3306 ("python2-tkinter" ,python-2 "tk")
3307 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3308 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3309
3310 (define-public python-matplotlib-documentation
3311 (package
3312 (name "python-matplotlib-documentation")
3313 (version (package-version python-matplotlib))
3314 (source (package-source python-matplotlib))
3315 (build-system python-build-system)
3316 (native-inputs
3317 `(("python-matplotlib" ,python-matplotlib)
3318 ("python-colorspacious" ,python-colorspacious)
3319 ("python-sphinx" ,python-sphinx)
3320 ("python-sphinx-gallery" ,python-sphinx-gallery)
3321 ("python-numpydoc" ,python-numpydoc)
3322 ("python-ipython" ,python-ipython)
3323 ("python-mock" ,python-mock)
3324 ("graphviz" ,graphviz)
3325 ("texlive" ,texlive)
3326 ("texinfo" ,texinfo)
3327 ,@(package-native-inputs python-matplotlib)))
3328 (arguments
3329 `(#:tests? #f ; we're only generating documentation
3330 #:phases
3331 (modify-phases %standard-phases
3332 (replace 'build
3333 (lambda _
3334 (chdir "doc")
3335 ;; Produce pdf in 'A4' format.
3336 (substitute* "conf.py"
3337 (("latex_paper_size = 'letter'") "")
3338 ;; latex_paper_size is deprecated -> set paper size using
3339 ;; latex_elements
3340 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3341 ;; insert at a point where latex_elements{} is defined:
3342 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3343 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3344 (replace 'install
3345 (lambda* (#:key inputs outputs #:allow-other-keys)
3346 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3347 (doc (string-append data "/doc/python-matplotlib-" ,version))
3348 (info (string-append data "/info"))
3349 (html (string-append doc "/html")))
3350 (mkdir-p html)
3351 (mkdir-p info)
3352 (copy-recursively "build/html" html)
3353 (symlink (string-append html "/_images")
3354 (string-append info "/matplotlib-figures"))
3355 (with-directory-excursion "build/texinfo"
3356 (substitute* "matplotlib.texi"
3357 (("@image\\{([^,]*)" all file)
3358 (string-append "@image{matplotlib-figures/" file)))
3359 (symlink (string-append html "/_images")
3360 "./matplotlib-figures")
3361 (system* "makeinfo" "--no-split"
3362 "-o" "matplotlib.info" "matplotlib.texi"))
3363 (copy-file "build/texinfo/matplotlib.info"
3364 (string-append info "/matplotlib.info"))
3365 (copy-file "build/latex/Matplotlib.pdf"
3366 (string-append doc "/Matplotlib.pdf")))
3367 #t)))))
3368 (home-page (package-home-page python-matplotlib))
3369 (synopsis "Documentation for the python-matplotlib package")
3370 (description (package-description python-matplotlib))
3371 (license (package-license python-matplotlib))))
3372
3373 (define-public python2-matplotlib-documentation
3374 (package-with-python2 python-matplotlib-documentation))
3375
3376 (define-public python2-pysnptools
3377 (package
3378 (name "python2-pysnptools")
3379 (version "0.3.13")
3380 (source
3381 (origin
3382 (method url-fetch)
3383 (uri (pypi-uri "pysnptools" version))
3384 (sha256
3385 (base32
3386 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
3387 (build-system python-build-system)
3388 (arguments
3389 `(#:python ,python-2 ; only Python 2.7 is supported
3390 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
3391 (propagated-inputs
3392 `(("python2-numpy" ,python2-numpy)
3393 ("python2-scipy" ,python2-scipy)
3394 ("python2-pandas" ,python2-pandas)))
3395 (native-inputs
3396 `(("python2-cython" ,python2-cython)))
3397 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
3398 (synopsis "Library for reading and manipulating genetic data")
3399 (description
3400 "PySnpTools is a library for reading and manipulating genetic data. It
3401 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3402 those files. It can also efficiently manipulate ranges of integers using set
3403 operators such as union, intersection, and difference.")
3404 (license license:asl2.0)))
3405
3406 (define-public python-scipy
3407 (package
3408 (name "python-scipy")
3409 (version "1.1.0")
3410 (source
3411 (origin
3412 (method url-fetch)
3413 (uri (pypi-uri "scipy" version))
3414 (sha256
3415 (base32
3416 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3417 (build-system python-build-system)
3418 (propagated-inputs
3419 `(("python-numpy" ,python-numpy)
3420 ("python-matplotlib" ,python-matplotlib)
3421 ("python-pyparsing" ,python-pyparsing)))
3422 (inputs
3423 `(("lapack" ,lapack)
3424 ("openblas" ,openblas)))
3425 (native-inputs
3426 `(("python-cython" ,python-cython)
3427 ("python-pytest" ,python-pytest)
3428 ("python-sphinx" ,python-sphinx)
3429 ("python-numpydoc" ,python-numpydoc)
3430 ("gfortran" ,gfortran)
3431 ("perl" ,perl)
3432 ("which" ,which)))
3433 (outputs '("out" "doc"))
3434 (arguments
3435 `(#:phases
3436 (modify-phases %standard-phases
3437 (add-after 'unpack 'disable-broken-tests
3438 (lambda _
3439 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3440 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3441 (string-append indent
3442 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3443 m)))
3444 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3445 (("^def test_parallel_threads\\(\\):" m)
3446 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3447 m)))
3448 #t))
3449 (add-before 'build 'configure-openblas
3450 (lambda* (#:key inputs #:allow-other-keys)
3451 (call-with-output-file "site.cfg"
3452 (lambda (port)
3453 (format port
3454 "[blas]
3455 libraries = openblas
3456 library_dirs = ~a/lib
3457 include_dirs = ~a/include
3458
3459 # backslash-n to make emacs happy
3460 \n[atlas]
3461 library_dirs = ~a/lib
3462 atlas_libs = openblas
3463 "
3464 (assoc-ref inputs "openblas")
3465 (assoc-ref inputs "openblas")
3466 (assoc-ref inputs "openblas"))))
3467 #t))
3468 (add-after 'install 'install-doc
3469 (lambda* (#:key inputs outputs #:allow-other-keys)
3470 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3471 (doc (string-append data "/doc/" ,name "-" ,version))
3472 (html (string-append doc "/html"))
3473 (pyver ,(string-append "PYVER=" (version-major+minor
3474 (package-version python))))
3475 ;; By default it tries to run sphinx-build through the Python
3476 ;; interpreter which won't work with our shell wrapper.
3477 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3478 ;; Make installed package available for building the
3479 ;; documentation
3480 (add-installed-pythonpath inputs outputs)
3481 (with-directory-excursion "doc"
3482 ;; Fix generation of images for mathematical expressions.
3483 (substitute* (find-files "source" "conf\\.py")
3484 (("pngmath_use_preview = True")
3485 "pngmath_use_preview = False"))
3486 (mkdir-p html)
3487 (invoke "make" "html" pyver sphinxbuild)
3488 (with-directory-excursion "build/html"
3489 (for-each (lambda (file)
3490 (let* ((dir (dirname file))
3491 (tgt-dir (string-append html "/" dir)))
3492 (install-file file html)))
3493 (find-files "." ".*")))))
3494 #t))
3495 ;; Tests can only be run after the library has been installed and not
3496 ;; within the source directory.
3497 (delete 'check)
3498 (add-after 'install 'check
3499 (lambda* (#:key inputs outputs #:allow-other-keys)
3500 (add-installed-pythonpath inputs outputs)
3501 (with-directory-excursion "/tmp"
3502 (invoke "python" "-c"
3503 "import scipy; scipy.test(verbose=2)")))))))
3504 (home-page "https://www.scipy.org/")
3505 (synopsis "The Scipy library provides efficient numerical routines")
3506 (description "The SciPy library is one of the core packages that make up
3507 the SciPy stack. It provides many user-friendly and efficient numerical
3508 routines such as routines for numerical integration and optimization.")
3509 (properties `((python2-variant . ,(delay python2-scipy))))
3510 (license license:bsd-3)))
3511
3512 (define-public python2-scipy
3513 (package-with-python2
3514 (strip-python2-variant python-scipy)))
3515
3516 (define-public python-socksipy-branch
3517 (package
3518 (name "python-socksipy-branch")
3519 (version "1.01")
3520 (source
3521 (origin
3522 (method url-fetch)
3523 (uri (pypi-uri "SocksiPy-branch" version))
3524 (sha256
3525 (base32
3526 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3527 (build-system python-build-system)
3528 (arguments
3529 `(#:tests? #f)) ; There are no tests
3530 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3531 (synopsis "Python SOCKS module")
3532 (description
3533 "SocksiPy - A Python SOCKS client module. It provides a
3534 socket-like interface that supports connections to any TCP
3535 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3536 The original version was developed by Dan Haim, this is a
3537 branch created by Mario Vilas to address some open issues,
3538 as the original project seems to have been abandoned circa 2007.")
3539 (license license:bsd-3)))
3540
3541 (define-public python2-socksipy-branch
3542 (package-with-python2 python-socksipy-branch))
3543
3544 (define-public python-pycodestyle
3545 (package
3546 (name "python-pycodestyle")
3547 (version "2.4.0")
3548 (source
3549 (origin
3550 (method url-fetch)
3551 (uri (pypi-uri "pycodestyle" version))
3552 (sha256
3553 (base32
3554 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3555 (build-system python-build-system)
3556 (home-page "https://pycodestyle.readthedocs.io/")
3557 (synopsis "Python style guide checker")
3558 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3559 Python code against some of the style conventions in
3560 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3561 (license license:expat)))
3562
3563 (define-public python2-pycodestyle
3564 (package-with-python2 python-pycodestyle))
3565
3566 (define-public python-multidict
3567 (package
3568 (name "python-multidict")
3569 (version "4.2.0")
3570 (source
3571 (origin
3572 (method url-fetch)
3573 (uri (pypi-uri "multidict" version))
3574 (sha256
3575 (base32
3576 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3577 (build-system python-build-system)
3578 (native-inputs
3579 `(("python-pytest" ,python-pytest)
3580 ("python-pytest-runner" ,python-pytest-runner)))
3581 (home-page "https://github.com/aio-libs/multidict/")
3582 (synopsis "Multidict implementation")
3583 (description "Multidict is dict-like collection of key-value pairs
3584 where key might be occurred more than once in the container.")
3585 (license license:asl2.0)))
3586
3587 (define-public python-orderedmultidict
3588 (package
3589 (name "python-orderedmultidict")
3590 (version "0.7.11")
3591 (source
3592 (origin
3593 (method url-fetch)
3594 (uri (pypi-uri "orderedmultidict" version))
3595 (sha256
3596 (base32
3597 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3598 (build-system python-build-system)
3599 (arguments
3600 `(#:phases
3601 (modify-phases %standard-phases
3602 (add-after 'unpack 'fix-tests
3603 (lambda _
3604 ;; The package uses nosetest for running the tests.
3605 ;; Adding this initfile allows to run the test suite
3606 ;; without requiring nosetest.
3607 (with-output-to-file "tests/__init__.py" newline)
3608 #t)))))
3609 (propagated-inputs
3610 `(("python-six" ,python-six)))
3611 (native-inputs
3612 `(("python-pycodestyle" ,python-pycodestyle)))
3613 (home-page "https://github.com/gruns/orderedmultidict")
3614 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3615 (description "This package contains a library for ordered multivalue
3616 dictionaries. A multivalue dictionary is a dictionary that can store
3617 multiple values for the same key. An ordered multivalue dictionary is a
3618 multivalue dictionary that retains the order of insertions and deletions.")
3619 (license license:unlicense)))
3620
3621 (define-public python2-orderedmultidict
3622 (package-with-python2 python-orderedmultidict))
3623
3624 (define-public python-autopep8
3625 (package
3626 (name "python-autopep8")
3627 (version "1.3.5")
3628 (source
3629 (origin
3630 (method url-fetch)
3631 (uri (pypi-uri "autopep8" version))
3632 (sha256
3633 (base32
3634 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3635 (build-system python-build-system)
3636 (propagated-inputs
3637 `(("python-pycodestyle" ,python-pycodestyle)))
3638 (home-page "https://github.com/hhatto/autopep8")
3639 (synopsis "Format Python code according to the PEP 8 style guide")
3640 (description
3641 "@code{autopep8} automatically formats Python code to conform to
3642 the PEP 8 style guide. It uses the pycodestyle utility to determine
3643 what parts of the code needs to be formatted. @code{autopep8} is
3644 capable of fixing most of the formatting issues that can be reported
3645 by pycodestyle.")
3646 (license (license:non-copyleft
3647 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3648
3649 (define-public python2-autopep8
3650 (package-with-python2 python-autopep8))
3651
3652 (define-public python-distutils-extra
3653 (package
3654 (name "python-distutils-extra")
3655 (version "2.38")
3656 (source
3657 (origin
3658 (method url-fetch)
3659 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3660 version "/+download/python-distutils-extra-"
3661 version ".tar.gz"))
3662 (sha256
3663 (base32
3664 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3665 (build-system python-build-system)
3666 (home-page "https://launchpad.net/python-distutils-extra/")
3667 (synopsis "Enhancements to Python's distutils")
3668 (description
3669 "The python-distutils-extra module enables you to easily integrate
3670 gettext support, themed icons, and scrollkeeper-based documentation into
3671 Python's distutils.")
3672 (license license:gpl2)))
3673
3674 (define-public python2-distutils-extra
3675 (package-with-python2 python-distutils-extra))
3676
3677 (define-public python2-elib.intl
3678 (package
3679 (name "python2-elib.intl")
3680 (version "0.0.3")
3681 (source
3682 (origin
3683 ;; This project doesn't tag releases or publish tarballs, so we take
3684 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3685 (method git-fetch)
3686 (uri (git-reference
3687 (url "https://github.com/dieterv/elib.intl.git")
3688 (commit "d09997cfef")))
3689 (file-name (string-append name "-" version "-checkout"))
3690 (sha256
3691 (base32
3692 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3693 (build-system python-build-system)
3694 (arguments
3695 ;; incompatible with Python 3 (exception syntax)
3696 `(#:python ,python-2
3697 #:tests? #f))
3698 (home-page "https://github.com/dieterv/elib.intl")
3699 (synopsis "Enhanced internationalization for Python")
3700 (description
3701 "The elib.intl module provides enhanced internationalization (I18N)
3702 services for your Python modules and applications.")
3703 (license license:lgpl3+)))
3704
3705 (define-public python-olefile
3706 (package
3707 (name "python-olefile")
3708 (version "0.45.1")
3709 (source
3710 (origin
3711 (method url-fetch)
3712 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3713 version ".tar.gz"))
3714 (file-name (string-append name "-" version ".tar.gz"))
3715 (sha256
3716 (base32
3717 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3718 (build-system python-build-system)
3719 (home-page
3720 "https://www.decalage.info/python/olefileio")
3721 (synopsis "Read and write Microsoft OLE2 files.")
3722 (description
3723 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3724 Storage or Compound Document, Microsoft Office). It is an improved version of
3725 the OleFileIO module from PIL, the Python Image Library.")
3726 (license license:bsd-3)))
3727
3728 (define-public python2-olefile
3729 (package-with-python2 python-olefile))
3730
3731 (define-public python-pillow
3732 (package
3733 (name "python-pillow")
3734 (version "5.4.1")
3735 (source
3736 (origin
3737 (method url-fetch)
3738 (uri (pypi-uri "Pillow" version))
3739 (sha256
3740 (base32
3741 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3742 (build-system python-build-system)
3743 (native-inputs
3744 `(("python-pytest" ,python-pytest)))
3745 (inputs
3746 `(("freetype" ,freetype)
3747 ("lcms" ,lcms)
3748 ("zlib" ,zlib)
3749 ("libjpeg" ,libjpeg)
3750 ("openjpeg" ,openjpeg)
3751 ("libtiff" ,libtiff)
3752 ("libwebp" ,libwebp)))
3753 (propagated-inputs
3754 `(("python-olefile" ,python-olefile)))
3755 (arguments
3756 `(#:phases
3757 (modify-phases %standard-phases
3758 (add-after 'unpack 'patch-ldconfig
3759 (lambda _
3760 (substitute* "setup.py"
3761 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
3762 (delete 'check) ; We must run checks after python-pillow is installed.
3763 (add-after 'install 'check-installed
3764 (lambda* (#:key outputs inputs #:allow-other-keys)
3765 (begin
3766 (setenv "HOME" (getcwd))
3767 ;; Make installed package available for running the tests.
3768 (add-installed-pythonpath inputs outputs)
3769 (invoke "python" "selftest.py" "--installed")
3770 (invoke "python" "-m" "pytest" "-vv")))))))
3771 (home-page "https://python-pillow.org")
3772 (synopsis "Fork of the Python Imaging Library")
3773 (description
3774 "The Python Imaging Library adds image processing capabilities to your
3775 Python interpreter. This library provides extensive file format support, an
3776 efficient internal representation, and fairly powerful image processing
3777 capabilities. The core image library is designed for fast access to data
3778 stored in a few basic pixel formats. It should provide a solid foundation for
3779 a general image processing tool.")
3780 (license (license:x11-style
3781 "http://www.pythonware.com/products/pil/license.htm"
3782 "The PIL Software License"))))
3783
3784 (define-public python2-pillow
3785 (package-with-python2 python-pillow))
3786
3787 (define-public python-pycparser
3788 (package
3789 (name "python-pycparser")
3790 (version "2.18")
3791 (source
3792 (origin
3793 (method url-fetch)
3794 (uri (pypi-uri "pycparser" version))
3795 (sha256
3796 (base32
3797 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
3798 (outputs '("out" "doc"))
3799 (build-system python-build-system)
3800 (native-inputs
3801 `(("pkg-config" ,pkg-config)))
3802 (arguments
3803 `(#:phases
3804 (modify-phases %standard-phases
3805 (replace 'check
3806 (lambda _
3807 (with-directory-excursion "tests"
3808 (invoke "python" "all_tests.py"))
3809 #t))
3810 (add-after 'install 'install-doc
3811 (lambda* (#:key outputs #:allow-other-keys)
3812 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3813 (doc (string-append data "/doc/" ,name "-" ,version))
3814 (examples (string-append doc "/examples")))
3815 (mkdir-p examples)
3816 (for-each (lambda (file)
3817 (copy-file (string-append "." file)
3818 (string-append doc file)))
3819 '("/README.rst" "/CHANGES" "/LICENSE"))
3820 (copy-recursively "examples" examples)))))))
3821 (home-page "https://github.com/eliben/pycparser")
3822 (synopsis "C parser in Python")
3823 (description
3824 "Pycparser is a complete parser of the C language, written in pure Python
3825 using the PLY parsing library. It parses C code into an AST and can serve as
3826 a front-end for C compilers or analysis tools.")
3827 (license license:bsd-3)))
3828
3829 (define-public python2-pycparser
3830 (package-with-python2 python-pycparser))
3831
3832 (define-public python-pywavelets
3833 (package
3834 (name "python-pywavelets")
3835 (version "1.0.1")
3836 (home-page "https://github.com/PyWavelets/pywt")
3837 (source (origin
3838 (method url-fetch)
3839 (uri (pypi-uri "PyWavelets" version))
3840 (sha256
3841 (base32
3842 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
3843 (build-system python-build-system)
3844 (arguments
3845 '(#:modules ((ice-9 ftw)
3846 (srfi srfi-1)
3847 (srfi srfi-26)
3848 (guix build utils)
3849 (guix build python-build-system))
3850 #:phases (modify-phases %standard-phases
3851 (replace 'check
3852 (lambda _
3853 (let ((cwd (getcwd))
3854 (libdir (find (cut string-prefix? "lib." <>)
3855 (scandir "build"))))
3856 (with-directory-excursion (string-append cwd "/build/" libdir)
3857 (invoke "nosetests" "-v" "."))))))))
3858 (native-inputs
3859 `(("python-matplotlib" ,python-matplotlib) ;for tests
3860 ("python-nose" ,python-nose)))
3861 (propagated-inputs
3862 `(("python-numpy" ,python-numpy)))
3863 (synopsis "Wavelet transforms in Python")
3864 (description
3865 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
3866 mathematical basis functions that are localized in both time and frequency.
3867 Wavelet transforms are time-frequency transforms employing wavelets. They are
3868 similar to Fourier transforms, the difference being that Fourier transforms are
3869 localized only in frequency instead of in time and frequency.")
3870 (license license:expat)))
3871
3872 (define-public python2-pywavelets
3873 (package-with-python2 python-pywavelets))
3874
3875 (define-public python-xcffib
3876 (package
3877 (name "python-xcffib")
3878 (version "0.6.0")
3879 (source
3880 (origin
3881 (method url-fetch)
3882 (uri (pypi-uri "xcffib" version))
3883 (sha256
3884 (base32
3885 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
3886 (build-system python-build-system)
3887 (inputs
3888 `(("libxcb" ,libxcb)))
3889 (propagated-inputs
3890 `(("python-cffi" ,python-cffi) ; used at run time
3891 ("python-six" ,python-six)))
3892 (arguments
3893 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
3894 #:tests? #f
3895 #:phases
3896 (modify-phases %standard-phases
3897 (add-after 'unpack 'fix-libxcb-path
3898 (lambda* (#:key inputs #:allow-other-keys)
3899 (let ((libxcb (assoc-ref inputs "libxcb")))
3900 (substitute* '("xcffib/__init__.py")
3901 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
3902 #t)))
3903 (add-after 'install 'install-doc
3904 (lambda* (#:key outputs #:allow-other-keys)
3905 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3906 "/doc/" ,name "-" ,version)))
3907 (mkdir-p doc)
3908 (copy-file "README.md"
3909 (string-append doc "/README.md"))
3910 #t))))))
3911 (home-page "https://github.com/tych0/xcffib")
3912 (synopsis "XCB Python bindings")
3913 (description
3914 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3915 support for Python 3 and PyPy. It is based on cffi.")
3916 (license license:expat)))
3917
3918 (define-public python2-xcffib
3919 (package-with-python2 python-xcffib))
3920
3921 (define-public python-cairocffi
3922 (package
3923 (name "python-cairocffi")
3924 (version "0.9.0")
3925 (source
3926 (origin
3927 (method url-fetch)
3928 (uri (pypi-uri "cairocffi" version))
3929 (sha256
3930 (base32
3931 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
3932 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
3933 (build-system python-build-system)
3934 (outputs '("out" "doc"))
3935 (inputs
3936 `(("glib" ,glib)
3937 ("gtk+" ,gtk+)
3938 ("gdk-pixbuf" ,gdk-pixbuf)
3939 ("cairo" ,cairo)
3940 ("pango" ,pango)))
3941 (native-inputs
3942 `(("pkg-config" ,pkg-config)
3943 ("python-pytest" ,python-pytest)
3944 ("python-pytest-cov" ,python-pytest-cov)
3945 ("python-pytest-runner" ,python-pytest-runner)
3946 ("python-sphinx" ,python-sphinx)
3947 ("python-docutils" ,python-docutils)))
3948 (propagated-inputs
3949 `(("python-xcffib" ,python-xcffib))) ; used at run time
3950 (arguments
3951 `(#:phases
3952 (modify-phases %standard-phases
3953 (add-after 'unpack 'patch-paths
3954 (lambda* (#:key inputs outputs #:allow-other-keys)
3955 (substitute* (find-files "." "\\.py$")
3956 (("dlopen\\(ffi, 'cairo'")
3957 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
3958 "/lib/libcairo.so.2'"))
3959 (("dlopen\\(ffi, 'gdk-3'")
3960 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
3961 "/lib/libgtk-3.so.0'"))
3962 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
3963 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
3964 "/lib/libgdk_pixbuf-2.0.so.0'"))
3965 (("dlopen\\(ffi, 'glib-2.0'")
3966 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
3967 "/lib/libglib-2.0.so.0'"))
3968 (("dlopen\\(ffi, 'gobject-2.0'")
3969 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
3970 "/lib/libgobject-2.0.so.0'"))
3971 (("dlopen\\(ffi, 'pangocairo-1.0'")
3972 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
3973 "/lib/libpangocairo-1.0.so.0'"))
3974 (("dlopen\\(ffi, 'pango-1.0'")
3975 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
3976 "/lib/libpango-1.0.so.0'")))
3977 #t))
3978 (add-after 'install 'install-doc
3979 (lambda* (#:key inputs outputs #:allow-other-keys)
3980 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3981 (doc (string-append data "/doc/" ,name "-" ,version))
3982 (html (string-append doc "/html")))
3983 (setenv "LD_LIBRARY_PATH"
3984 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3985 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3986 (setenv "LANG" "en_US.UTF-8")
3987 (mkdir-p html)
3988 (for-each (lambda (file)
3989 (copy-file (string-append "." file)
3990 (string-append doc file)))
3991 '("/README.rst" "/CHANGES" "/LICENSE"))
3992 (system* "python" "setup.py" "build_sphinx")
3993 (copy-recursively "docs/_build/html" html)
3994 #t))))))
3995 (home-page "https://github.com/Kozea/cairocffi")
3996 (synopsis "Python bindings and object-oriented API for Cairo")
3997 (description
3998 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3999 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4000 graphics library with support for multiple backends including image buffers,
4001 PNG, PostScript, PDF, and SVG file output.")
4002 (license license:bsd-3)))
4003
4004 (define-public python2-cairocffi
4005 (package-with-python2 python-cairocffi))
4006
4007 (define-public python-decorator
4008 (package
4009 (name "python-decorator")
4010 (version "4.3.0")
4011 (source
4012 (origin
4013 (method url-fetch)
4014 (uri (pypi-uri "decorator" version))
4015 (sha256
4016 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4017 (build-system python-build-system)
4018 (home-page "https://pypi.python.org/pypi/decorator/")
4019 (synopsis "Python module to simplify usage of decorators")
4020 (description
4021 "The aim of the decorator module is to simplify the usage of decorators
4022 for the average programmer, and to popularize decorators usage giving examples
4023 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4024 etc. The core of this module is a decorator factory.")
4025 (license license:expat)))
4026
4027 (define-public python2-decorator
4028 (package-with-python2 python-decorator))
4029
4030 (define-public python-drmaa
4031 (package
4032 (name "python-drmaa")
4033 (version "0.7.7")
4034 (source
4035 (origin
4036 (method url-fetch)
4037 (uri (pypi-uri "drmaa" version))
4038 (sha256
4039 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4040 (build-system python-build-system)
4041 ;; The test suite requires libdrmaa which is provided by the cluster
4042 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4043 ;; should be set to the path of the libdrmaa library.
4044 (arguments '(#:tests? #f))
4045 (native-inputs
4046 `(("python-nose" ,python-nose)))
4047 (home-page "https://pypi.python.org/pypi/drmaa")
4048 (synopsis "Python bindings for the DRMAA library")
4049 (description
4050 "A Python package for Distributed Resource Management (DRM) job
4051 submission and control. This package is an implementation of the DRMAA 1.0
4052 Python language binding specification.")
4053 (license license:bsd-3)))
4054
4055 (define-public python2-drmaa
4056 (package-with-python2 python-drmaa))
4057
4058 (define-public python-grako
4059 (package
4060 (name "python-grako")
4061 (version "3.99.9")
4062 (source
4063 (origin
4064 (method url-fetch)
4065 (uri
4066 (pypi-uri "grako" version ".zip"))
4067 (sha256
4068 (base32
4069 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4070 (build-system python-build-system)
4071 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4072 (native-inputs
4073 `(("unzip" ,unzip)
4074 ("python-pytest" ,python-pytest)
4075 ("python-pytest-runner" ,python-pytest-runner)))
4076 (home-page "https://bitbucket.org/neogeny/grako")
4077 (synopsis "EBNF parser generator")
4078 (description
4079 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4080 memoizing PEG/Packrat parser in Python.")
4081 (license license:bsd-3)))
4082
4083 (define-public python2-grako
4084 (package-with-python2 python-grako))
4085
4086 (define-public python-gridmap
4087 (package
4088 (name "python-gridmap")
4089 (version "0.13.0")
4090 (source
4091 (origin
4092 (method url-fetch)
4093 (uri (string-append
4094 "https://github.com/pygridtools/gridmap/archive/v"
4095 version ".tar.gz"))
4096 (file-name (string-append name "-" version ".tar.gz"))
4097 (sha256
4098 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4099 (build-system python-build-system)
4100 (arguments
4101 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4102 (propagated-inputs
4103 `(("python-psutil" ,python-psutil)
4104 ("python-drmaa" ,python-drmaa)
4105 ("python-pyzmq" ,python-pyzmq)))
4106 (home-page "https://github.com/pygridtools/gridmap")
4107 (synopsis "Create jobs on a cluster directly from Python")
4108 (description
4109 "Gridmap is a Python package to allow you to easily create jobs on the
4110 cluster directly from Python. You can directly map Python functions onto the
4111 cluster without needing to write any wrapper code yourself.")
4112 (license license:gpl3+)))
4113
4114 (define-public python2-gridmap
4115 (package-with-python2 python-gridmap))
4116
4117 (define-public python-honcho
4118 (package
4119 (name "python-honcho")
4120 (version "1.0.1")
4121 (source
4122 (origin
4123 (method url-fetch)
4124 (uri (string-append
4125 "https://github.com/nickstenning/honcho/archive/v"
4126 version ".tar.gz"))
4127 (file-name (string-append name "-" version ".tar.gz"))
4128 (sha256
4129 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4130 (build-system python-build-system)
4131 (native-inputs
4132 `(("python-pytest" ,python-pytest)
4133 ("python-mock" ,python-mock)
4134 ("python-tox" ,python-tox)
4135 ("which" ,which))) ;for tests
4136 (propagated-inputs
4137 `(("python-jinja2" ,python-jinja2)))
4138 (arguments
4139 `(#:phases
4140 (modify-phases %standard-phases
4141 (delete 'check)
4142 (add-after 'install 'check
4143 (lambda* (#:key outputs inputs #:allow-other-keys)
4144 ;; fix honcho path in testsuite
4145 (substitute* "tests/conftest.py"
4146 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4147 "/bin/honcho" "'")))
4148 ;; It's easier to run tests after install.
4149 ;; Make installed package available for running the tests
4150 (add-installed-pythonpath inputs outputs)
4151 (invoke "py.test" "-v"))))))
4152 (home-page "https://github.com/nickstenning/honcho")
4153 (synopsis "Manage Procfile-based applications")
4154 (description
4155 "A Procfile is a file which describes how to run an application
4156 consisting of serveral processes. honcho starts all listed processes.
4157 The output of all running processes is collected by honcho and
4158 displayed.")
4159 (license license:expat)))
4160
4161 (define-public python2-honcho
4162 (package-with-python2 python-honcho))
4163
4164 (define-public python-pexpect
4165 (package
4166 (name "python-pexpect")
4167 (version "4.6.0")
4168 (source
4169 (origin
4170 (method url-fetch)
4171 (uri (pypi-uri "pexpect" version))
4172 (sha256
4173 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4174 (build-system python-build-system)
4175 (arguments
4176 `(#:phases
4177 (modify-phases %standard-phases
4178 (add-before 'check 'prepare-tests
4179 (lambda _
4180 (substitute* (find-files "tests")
4181 (("/bin/ls") (which "ls"))
4182 (("/bin/echo") (which "echo"))
4183 (("/bin/which") (which "which"))
4184 ;; Many tests try to use the /bin directory which
4185 ;; is not present in the build environment.
4186 ;; Use one that's non-empty and unlikely to change.
4187 (("/bin'") "/dev'"))
4188 ;; XXX: Socket connection test gets "Connection reset by peer".
4189 ;; Why does it not work? Delete for now.
4190 (delete-file "tests/test_socket.py")
4191 #t))
4192 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4193 (native-inputs
4194 `(("python-nose" ,python-nose)
4195 ("python-pytest" ,python-pytest)
4196 ("man-db" ,man-db)
4197 ("which" ,which)
4198 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4199 (propagated-inputs
4200 `(("python-ptyprocess" ,python-ptyprocess)))
4201 (home-page "http://pexpect.readthedocs.org/")
4202 (synopsis "Controlling interactive console applications")
4203 (description
4204 "Pexpect is a pure Python module for spawning child applications;
4205 controlling them; and responding to expected patterns in their output.
4206 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4207 child application and control it as if a human were typing commands.")
4208 (license license:isc)))
4209
4210 (define-public python2-pexpect
4211 (package-with-python2 python-pexpect))
4212
4213 (define-public python-setuptools-scm
4214 (package
4215 (name "python-setuptools-scm")
4216 (version "3.1.0")
4217 (source (origin
4218 (method url-fetch)
4219 (uri (pypi-uri "setuptools_scm" version))
4220 (sha256
4221 (base32
4222 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4223 (build-system python-build-system)
4224 (home-page "https://github.com/pypa/setuptools_scm/")
4225 (synopsis "Manage Python package versions in SCM metadata")
4226 (description
4227 "Setuptools_scm handles managing your Python package versions in
4228 @dfn{software configuration management} (SCM) metadata instead of declaring
4229 them as the version argument or in a SCM managed file.")
4230 (license license:expat)))
4231
4232 (define-public python2-setuptools-scm
4233 (package-with-python2 python-setuptools-scm))
4234
4235 (define-public python-pathpy
4236 (package
4237 (name "python-pathpy")
4238 (version "11.0.1")
4239 (source
4240 (origin
4241 (method url-fetch)
4242 (uri (pypi-uri "path.py" version))
4243 (sha256
4244 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4245 ;; (outputs '("out" "doc"))
4246 (build-system python-build-system)
4247 (propagated-inputs
4248 `(("python-appdirs" ,python-appdirs)))
4249 (native-inputs
4250 `(("python-setuptools-scm" ,python-setuptools-scm)
4251 ("python-sphinx" ,python-sphinx)
4252 ("python-rst.linker" ,python-rst.linker)
4253 ("python-pytest" ,python-pytest)
4254 ("python-pytest-runner" ,python-pytest-runner)))
4255 (arguments
4256 ;; FIXME: Documentation and tests require "jaraco.packaging".
4257 `(#:tests? #f))
4258 ;; #:phases
4259 ;; (modify-phases %standard-phases
4260 ;; (add-after 'build 'build-doc
4261 ;; (lambda _
4262 ;; (setenv "LANG" "en_US.UTF-8")
4263 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4264 ;; (add-after 'install 'install-doc
4265 ;; (lambda* (#:key outputs #:allow-other-keys)
4266 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4267 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4268 ;; (html (string-append doc "/html")))
4269 ;; (mkdir-p html)
4270 ;; (for-each (lambda (file)
4271 ;; (copy-file file (string-append doc "/" file)))
4272 ;; '("README.rst" "CHANGES.rst"))
4273 ;; (copy-recursively "build/sphinx/html" html)))))))
4274 (home-page "https://github.com/jaraco/path.py")
4275 (synopsis "Python module wrapper for built-in os.path")
4276 (description
4277 "@code{path.py} implements path objects as first-class entities, allowing
4278 common operations on files to be invoked on those path objects directly.")
4279 (license license:expat)))
4280
4281 (define-public python2-pathpy
4282 (package-with-python2 python-pathpy))
4283
4284 (define-public python-simplegeneric
4285 (package
4286 (name "python-simplegeneric")
4287 (version "0.8.1")
4288 (source
4289 (origin
4290 (method url-fetch)
4291 (uri (string-append "https://pypi.python.org/packages/source/s/"
4292 "simplegeneric/simplegeneric-" version ".zip"))
4293 (sha256
4294 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4295 (build-system python-build-system)
4296 (native-inputs
4297 `(("unzip" ,unzip)))
4298 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4299 (synopsis "Python module for simple generic functions")
4300 (description
4301 "The simplegeneric module lets you define simple single-dispatch generic
4302 functions, akin to Python’s built-in generic functions like @code{len()},
4303 @code{iter()} and so on. However, instead of using specially-named methods,
4304 these generic functions use simple lookup tables, akin to those used by
4305 e.g. @code{pickle.dump()} and other generic functions found in the Python
4306 standard library.")
4307 (license license:zpl2.1)))
4308
4309 (define-public python2-simplegeneric
4310 (package-with-python2 python-simplegeneric))
4311
4312 (define-public python-ipython-genutils
4313 ;; TODO: This package is retired, check if can be removed, see description.
4314 (package
4315 (name "python-ipython-genutils")
4316 (version "0.1.0")
4317 (source
4318 (origin
4319 (method url-fetch)
4320 (uri (string-append "https://pypi.python.org/packages/source/i/"
4321 "ipython_genutils/ipython_genutils-"
4322 version ".tar.gz"))
4323 (sha256
4324 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4325 (build-system python-build-system)
4326 (arguments `(#:tests? #f)) ; no tests
4327 (home-page "https://ipython.org")
4328 (synopsis "Vestigial utilities from IPython")
4329 (description
4330 "This package provides retired utilities from IPython. No packages
4331 outside IPython/Jupyter should depend on it.
4332
4333 This package shouldn't exist. It contains some common utilities shared by
4334 Jupyter and IPython projects during The Big Split. As soon as possible, those
4335 packages will remove their dependency on this, and this package will go
4336 away.")
4337 (license license:bsd-3)))
4338
4339 (define-public python2-ipython-genutils
4340 (package-with-python2 python-ipython-genutils))
4341
4342 (define-public python-traitlets
4343 (package
4344 (name "python-traitlets")
4345 (version "4.3.2")
4346 (source
4347 (origin
4348 (method url-fetch)
4349 (uri (pypi-uri "traitlets" version))
4350 (sha256
4351 (base32
4352 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4353 (build-system python-build-system)
4354 (arguments
4355 `(#:phases
4356 (modify-phases %standard-phases
4357 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4358 (propagated-inputs
4359 `(("python-ipython-genutils" ,python-ipython-genutils)
4360 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4361 (native-inputs
4362 `(("python-pytest" ,python-pytest)))
4363 (properties `((python2-variant . ,(delay python2-traitlets))))
4364 (home-page "https://ipython.org")
4365 (synopsis "Configuration system for Python applications")
4366 (description
4367 "Traitlets is a framework that lets Python classes have attributes with
4368 type checking, dynamically calculated default values, and ‘on change’
4369 callbacks. The package also includes a mechanism to use traitlets for
4370 configuration, loading values from files or from command line arguments. This
4371 is a distinct layer on top of traitlets, so you can use traitlets in your code
4372 without using the configuration machinery.")
4373 (license license:bsd-3)))
4374
4375 (define-public python2-traitlets
4376 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4377 (package
4378 (inherit traitlets)
4379 (propagated-inputs
4380 `(("python2-enum34" ,python2-enum34)
4381 ,@(package-propagated-inputs traitlets))))))
4382
4383 (define-public python-jupyter-core
4384 (package
4385 (name "python-jupyter-core")
4386 (version "4.4.0")
4387 (source
4388 (origin
4389 (method url-fetch)
4390 (uri (string-append (pypi-uri "jupyter_core" version)))
4391 (sha256
4392 (base32
4393 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4394 (build-system python-build-system)
4395 ;; FIXME: not sure how to run the tests
4396 (arguments `(#:tests? #f))
4397 (propagated-inputs
4398 `(("python-traitlets" ,python-traitlets)))
4399 (home-page "http://jupyter.org/")
4400 (synopsis "Jupyter base package")
4401 (description
4402 "Jupyter core is the base package on which Jupyter projects rely.")
4403 (license license:bsd-3)))
4404
4405 (define-public python2-jupyter-core
4406 (package-with-python2 python-jupyter-core))
4407
4408 (define-public python-jupyter-client
4409 (package
4410 (name "python-jupyter-client")
4411 (version "5.2.4")
4412 (source
4413 (origin
4414 (method url-fetch)
4415 (uri (pypi-uri "jupyter_client" version))
4416 (sha256
4417 (base32
4418 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4419 (build-system python-build-system)
4420 ;; Tests fail because of missing native python kernel which I assume is
4421 ;; provided by the ipython package, which we cannot use because it would
4422 ;; cause a dependency cycle.
4423 (arguments `(#:tests? #f))
4424 (propagated-inputs
4425 `(("python-pyzmq" ,python-pyzmq)
4426 ("python-traitlets" ,python-traitlets)
4427 ("python-jupyter-core" ,python-jupyter-core)))
4428 (home-page "http://jupyter.org/")
4429 (synopsis "Jupyter protocol implementation and client libraries")
4430 (description
4431 "The @code{jupyter_client} package contains the reference implementation
4432 of the Jupyter protocol. It also provides client and kernel management APIs
4433 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4434 installing @code{kernelspec}s for use with Jupyter frontends.")
4435 (license license:bsd-3)))
4436
4437 (define-public python2-jupyter-client
4438 (package-with-python2 python-jupyter-client))
4439
4440 (define-public python-ipykernel
4441 (package
4442 (name "python-ipykernel")
4443 (version "5.1.0")
4444 (source
4445 (origin
4446 (method url-fetch)
4447 (uri (pypi-uri "ipykernel" version))
4448 (sha256
4449 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4450 (build-system python-build-system)
4451 (arguments
4452 `(#:phases
4453 (modify-phases %standard-phases
4454 (replace 'check
4455 (lambda _
4456 (setenv "HOME" "/tmp")
4457 (invoke "pytest" "-v")
4458 #t)))))
4459 (propagated-inputs
4460 `(("python-ipython" ,python-ipython)
4461 ;; imported at runtime during connect
4462 ("python-jupyter-client" ,python-jupyter-client)))
4463 (native-inputs
4464 `(("python-pytest" ,python-pytest)
4465 ("python-nose" ,python-nose)))
4466 (home-page "https://ipython.org")
4467 (synopsis "IPython Kernel for Jupyter")
4468 (description
4469 "This package provides the IPython kernel for Jupyter.")
4470 (license license:bsd-3)))
4471
4472 (define-public python2-ipykernel
4473 (package-with-python2 python-ipykernel))
4474
4475 (define-public python-send2trash
4476 (package
4477 (name "python-send2trash")
4478 (version "1.5.0")
4479 (source
4480 (origin
4481 (method url-fetch)
4482 (uri (pypi-uri "send2trash" version))
4483 (sha256
4484 (base32
4485 "1ci8vcwjmjlp11ljj1ckrfmml9fkq1mclx2gr53y4zvhgp01q030"))))
4486 (build-system python-build-system)
4487 (home-page "https://github.com/hsoft/send2trash")
4488 (synopsis "Send files to trash")
4489 (description
4490 "This package provides a cross-platform mechanism to send files to the
4491 trash.")
4492 (license license:bsd-3)))
4493
4494 (define-public python2-send2trash
4495 (package-with-python2 python-send2trash))
4496
4497 ;; This is the latest release of the LTS version of ipython with support for
4498 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4499 ;; dropped support for Python 2.7. We may want to rename this package.
4500 (define-public python-ipython
4501 (package
4502 (name "python-ipython")
4503 (version "5.8.0")
4504 (source
4505 (origin
4506 (method url-fetch)
4507 (uri (pypi-uri "ipython" version ".tar.gz"))
4508 (sha256
4509 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4510 (build-system python-build-system)
4511 (outputs '("out" "doc"))
4512 (propagated-inputs
4513 `(("python-pyzmq" ,python-pyzmq)
4514 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4515 ("python-terminado" ,python-terminado)
4516 ("python-matplotlib" ,python-matplotlib)
4517 ("python-numpy" ,python-numpy)
4518 ("python-numpydoc" ,python-numpydoc)
4519 ("python-jinja2" ,python-jinja2)
4520 ("python-mistune" ,python-mistune)
4521 ("python-pexpect" ,python-pexpect)
4522 ("python-pickleshare" ,python-pickleshare)
4523 ("python-simplegeneric" ,python-simplegeneric)
4524 ("python-jsonschema" ,python-jsonschema)
4525 ("python-traitlets" ,python-traitlets)
4526 ("python-nbformat" ,python-nbformat)
4527 ("python-pygments" ,python-pygments)))
4528 (inputs
4529 `(("readline" ,readline)
4530 ("which" ,which)))
4531 (native-inputs
4532 `(("graphviz" ,graphviz)
4533 ("pkg-config" ,pkg-config)
4534 ("python-requests" ,python-requests) ;; for tests
4535 ("python-testpath" ,python-testpath)
4536 ("python-nose" ,python-nose)
4537 ("python-sphinx" ,python-sphinx)
4538 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4539 ;; FIXME: It's possible that a smaller union would work just as well.
4540 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4541 texlive-fonts-ec
4542 texlive-generic-ifxetex
4543 texlive-generic-pdftex
4544 texlive-latex-amsfonts
4545 texlive-latex-capt-of
4546 texlive-latex-cmap
4547 texlive-latex-environ
4548 texlive-latex-eqparbox
4549 texlive-latex-etoolbox
4550 texlive-latex-expdlist
4551 texlive-latex-fancyhdr
4552 texlive-latex-fancyvrb
4553 texlive-latex-fncychap
4554 texlive-latex-float
4555 texlive-latex-framed
4556 texlive-latex-geometry
4557 texlive-latex-graphics
4558 texlive-latex-hyperref
4559 texlive-latex-mdwtools
4560 texlive-latex-multirow
4561 texlive-latex-oberdiek
4562 texlive-latex-parskip
4563 texlive-latex-preview
4564 texlive-latex-tabulary
4565 texlive-latex-threeparttable
4566 texlive-latex-titlesec
4567 texlive-latex-trimspaces
4568 texlive-latex-ucs
4569 texlive-latex-upquote
4570 texlive-latex-url
4571 texlive-latex-varwidth
4572 texlive-latex-wrapfig)))
4573 ("texinfo" ,texinfo)))
4574 (arguments
4575 `(#:phases
4576 (modify-phases %standard-phases
4577 (add-after 'install 'install-doc
4578 (lambda* (#:key inputs outputs #:allow-other-keys)
4579 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4580 (doc (string-append data "/doc/" ,name "-" ,version))
4581 (html (string-append doc "/html"))
4582 (man1 (string-append data "/man/man1"))
4583 (info (string-append data "/info"))
4584 (examples (string-append doc "/examples"))
4585 (python-arg (string-append "PYTHON=" (which "python"))))
4586 (setenv "LANG" "en_US.utf8")
4587 ;; Make installed package available for running the tests
4588 (add-installed-pythonpath inputs outputs)
4589 (with-directory-excursion "docs"
4590 ;; FIXME: pdf fails to build
4591 ;;(system* "make" "pdf" "PAPER=a4")
4592 (system* "make" python-arg "html")
4593 (system* "make" python-arg "info"))
4594 (copy-recursively "docs/man" man1)
4595 (copy-recursively "examples" examples)
4596 (copy-recursively "docs/build/html" html)
4597 ;; (copy-file "docs/build/latex/ipython.pdf"
4598 ;; (string-append doc "/ipython.pdf"))
4599 (mkdir-p info)
4600 (copy-file "docs/build/texinfo/ipython.info"
4601 (string-append info "/ipython.info"))
4602 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4603 #t))
4604 ;; Tests can only be run after the library has been installed and not
4605 ;; within the source directory.
4606 (delete 'check)
4607 (add-after 'install 'check
4608 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4609 (if tests?
4610 (begin
4611 ;; Make installed package available for running the tests
4612 (add-installed-pythonpath inputs outputs)
4613 (setenv "HOME" "/tmp/") ;; required by a test
4614 ;; We only test the core because one of the other tests
4615 ;; tries to import ipykernel.
4616 (invoke "python" "IPython/testing/iptest.py"
4617 "-v" "IPython/core/tests"))
4618 #t)))
4619 (add-before 'check 'fix-tests
4620 (lambda* (#:key inputs #:allow-other-keys)
4621 (substitute* "./IPython/utils/_process_posix.py"
4622 (("/usr/bin/env', 'which") (which "which")))
4623 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4624 (("#!/usr/bin/env python")
4625 (string-append "#!" (which "python"))))
4626 ;; Disable 1 failing test
4627 (substitute* "./IPython/core/tests/test_magic.py"
4628 (("def test_dirops\\(\\):" all)
4629 (string-append "@dec.skipif(True)\n" all)))
4630 ;; This test introduces a circular dependency on ipykernel
4631 ;; (which depends on ipython).
4632 (delete-file "IPython/core/tests/test_display.py")
4633 ;; These tests throw errors for unknown reasons.
4634 (delete-file "IPython/extensions/tests/test_storemagic.py")
4635 (delete-file "IPython/core/tests/test_displayhook.py")
4636 (delete-file "IPython/core/tests/test_interactiveshell.py")
4637 (delete-file "IPython/core/tests/test_pylabtools.py")
4638 (delete-file "IPython/core/tests/test_paths.py")
4639 #t)))))
4640 (home-page "https://ipython.org")
4641 (synopsis "IPython is a tool for interactive computing in Python")
4642 (description
4643 "IPython provides a rich architecture for interactive computing with:
4644 Powerful interactive shells, a browser-based notebook, support for interactive
4645 data visualization, embeddable interpreters and tools for parallel
4646 computing.")
4647 (license license:bsd-3)
4648 (properties `((python2-variant . ,(delay python2-ipython))))))
4649
4650 (define-public python2-ipython
4651 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4652 (package
4653 (inherit ipython)
4654 ;; FIXME: add pyreadline once available.
4655 (propagated-inputs
4656 `(("python2-backports-shutil-get-terminal-size"
4657 ,python2-backports-shutil-get-terminal-size)
4658 ("python2-pathlib2" ,python2-pathlib2)
4659 ,@(package-propagated-inputs ipython)))
4660 (native-inputs
4661 `(("python2-mock" ,python2-mock)
4662 ,@(package-native-inputs ipython))))))
4663
4664 (define-public python-urwid
4665 (package
4666 (name "python-urwid")
4667 (version "2.0.1")
4668 (source
4669 (origin
4670 (method url-fetch)
4671 (uri (pypi-uri "urwid" version))
4672 (sha256
4673 (base32
4674 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4675 (build-system python-build-system)
4676 (home-page "http://urwid.org")
4677 (synopsis "Console user interface library for Python")
4678 (description
4679 "Urwid is a curses-based UI/widget library for Python. It includes many
4680 features useful for text console applications.")
4681 (license license:lgpl2.1+)))
4682
4683 (define-public python2-urwid
4684 (package-with-python2 python-urwid))
4685
4686 (define-public python-urwidtrees
4687 (package
4688 (name "python-urwidtrees")
4689 (version "1.0.2")
4690 (source
4691 (origin
4692 (method url-fetch)
4693 ;; package author intends on distributing via github rather than pypi:
4694 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4695 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4696 version ".tar.gz"))
4697 (file-name (string-append name "-" version ".tar.gz"))
4698 (sha256
4699 (base32
4700 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4701 (build-system python-build-system)
4702 (arguments
4703 '(#:tests? #f)) ; no tests
4704 (propagated-inputs `(("python-urwid" ,python-urwid)))
4705 (home-page "https://github.com/pazz/urwidtrees")
4706 (synopsis "Tree widgets for urwid")
4707 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4708 toolkit. Use it to build trees of widgets.")
4709 (license license:gpl3+)))
4710
4711 (define-public python2-urwidtrees
4712 (package-with-python2 python-urwidtrees))
4713
4714 (define-public python-ua-parser
4715 (package
4716 (name "python-ua-parser")
4717 (version "0.8.0")
4718 (source
4719 (origin
4720 (method url-fetch)
4721 (uri (pypi-uri "ua-parser" version))
4722 (sha256
4723 (base32
4724 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4725 (build-system python-build-system)
4726 (arguments
4727 `(#:tests? #f)) ;no test suite in release
4728 (native-inputs
4729 `(("python-pyyaml" ,python-pyyaml)))
4730 (home-page "https://github.com/ua-parser/uap-python")
4731 (synopsis "User agent parser")
4732 (description
4733 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4734 (license license:asl2.0)))
4735
4736 (define-public python2-ua-parser
4737 (package-with-python2 python-ua-parser))
4738
4739 (define-public python-user-agents
4740 (package
4741 (name "python-user-agents")
4742 (version "1.1.0")
4743 (source
4744 (origin
4745 (method url-fetch)
4746 (uri (pypi-uri "user-agents" version))
4747 (sha256
4748 (base32
4749 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4750 (build-system python-build-system)
4751 (arguments
4752 `(#:tests? #f)) ;missing devices.json test file in release
4753 (propagated-inputs
4754 `(("python-ua-parser" ,python-ua-parser)))
4755 (home-page "https://github.com/selwin/python-user-agents")
4756 (synopsis "User Agent strings parsing library")
4757 (description
4758 "A library to identify devices (phones, tablets) and their capabilities by
4759 parsing (browser/HTTP) user agent strings.")
4760 (license license:expat)))
4761
4762 (define-public python2-user-agents
4763 (package-with-python2 python-user-agents))
4764
4765 (define-public python-dbus
4766 (package
4767 (name "python-dbus")
4768 (version "1.2.8")
4769 (source
4770 (origin
4771 (method url-fetch)
4772 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
4773 "dbus-python-" version ".tar.gz"))
4774 (sha256
4775 (base32
4776 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
4777 (build-system gnu-build-system)
4778 (arguments
4779 '(#:phases
4780 (modify-phases %standard-phases
4781 (add-before
4782 'check 'pre-check
4783 (lambda _
4784 ;; XXX: For the missing '/etc/machine-id'.
4785 (substitute* "test/run-test.sh"
4786 (("DBUS_FATAL_WARNINGS=1")
4787 "DBUS_FATAL_WARNINGS=0"))
4788 #t)))))
4789 (native-inputs
4790 `(("pkg-config" ,pkg-config)))
4791 (inputs
4792 `(("python" ,python-wrapper)
4793 ("dbus-glib" ,dbus-glib)))
4794 (synopsis "Python bindings for D-bus")
4795 (description "python-dbus provides bindings for libdbus, the reference
4796 implementation of D-Bus.")
4797 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4798 (license license:expat)))
4799
4800 (define-public python2-dbus
4801 (package (inherit python-dbus)
4802 (name "python2-dbus")
4803 (inputs `(("python" ,python-2)
4804 ,@(alist-delete "python"
4805 (package-inputs python-dbus)
4806 equal?)))
4807 ;; FIXME: on Python 2, the test_utf8 fails with:
4808 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4809 (arguments `(#:tests? #f))))
4810
4811 (define-public python-lxml
4812 (package
4813 (name "python-lxml")
4814 (version "4.2.5")
4815 (source
4816 (origin
4817 (method url-fetch)
4818 (uri (pypi-uri "lxml" version))
4819 (sha256
4820 (base32
4821 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
4822 (build-system python-build-system)
4823 (inputs
4824 `(("libxml2" ,libxml2)
4825 ("libxslt" ,libxslt)))
4826 (home-page "http://lxml.de/")
4827 (synopsis
4828 "Python XML processing library")
4829 (description
4830 "The lxml XML toolkit is a Pythonic binding for the C libraries
4831 libxml2 and libxslt.")
4832 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4833
4834 (define-public python2-lxml
4835 (package-with-python2 python-lxml))
4836
4837 ;; beautifulsoup4 has a totally different namespace than 3.x,
4838 ;; and pypi seems to put it under its own name, so I guess we should too
4839 (define-public python-beautifulsoup4
4840 (package
4841 (name "python-beautifulsoup4")
4842 (version "4.6.3")
4843 (source
4844 (origin
4845 (method url-fetch)
4846 (uri (pypi-uri "beautifulsoup4" version))
4847 (sha256
4848 (base32
4849 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
4850 (build-system python-build-system)
4851 (arguments
4852 `(#:phases
4853 (modify-phases %standard-phases
4854 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4855 ;; must use this conversion script when building with Python 3. The
4856 ;; conversion script also runs the tests.
4857 ;; For more information, see the file 'convert-py3k' in the source
4858 ;; distribution.
4859 (replace 'check
4860 (lambda _ (invoke "./convert-py3k"))))))
4861 (home-page
4862 "https://www.crummy.com/software/BeautifulSoup/bs4/")
4863 (synopsis
4864 "Python screen-scraping library")
4865 (description
4866 "Beautiful Soup is a Python library designed for rapidly setting up
4867 screen-scraping projects. It offers Pythonic idioms for navigating,
4868 searching, and modifying a parse tree, providing a toolkit for
4869 dissecting a document and extracting what you need. It automatically
4870 converts incoming documents to Unicode and outgoing documents to UTF-8.")
4871 (license license:expat)
4872 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4873
4874 (define-public python2-beautifulsoup4
4875 (package
4876 (inherit (package-with-python2
4877 (strip-python2-variant python-beautifulsoup4)))
4878 (arguments `(#:python ,python-2))))
4879
4880 (define-public python-netifaces
4881 (package
4882 (name "python-netifaces")
4883 (version "0.10.7")
4884 (source
4885 (origin
4886 (method url-fetch)
4887 (uri (pypi-uri "netifaces" version))
4888 (sha256
4889 (base32
4890 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
4891 (build-system python-build-system)
4892 (home-page "https://github.com/al45tair/netifaces")
4893 (synopsis
4894 "Python module for portable network interface information")
4895 (description
4896 "Netifaces is a Python module providing information on network
4897 interfaces in an easy and portable manner.")
4898 (license license:expat)))
4899
4900 (define-public python2-netifaces
4901 (package-with-python2 python-netifaces))
4902
4903 (define-public python-networkx
4904 (package
4905 (name "python-networkx")
4906 (version "2.2")
4907 (source
4908 (origin
4909 (method url-fetch)
4910 (uri (pypi-uri "networkx" version ".zip"))
4911 (sha256
4912 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
4913 (build-system python-build-system)
4914 ;; python-decorator is needed at runtime.
4915 (propagated-inputs
4916 `(("python-decorator" ,python-decorator)))
4917 (native-inputs
4918 `(("python-nose" ,python-nose)
4919 ("unzip" ,unzip)))
4920 (home-page "https://networkx.github.io/")
4921 (synopsis "Python module for creating and manipulating graphs and networks")
4922 (description
4923 "NetworkX is a Python package for the creation, manipulation, and study
4924 of the structure, dynamics, and functions of complex networks.")
4925 (license license:bsd-3)))
4926
4927 (define-public python2-networkx
4928 (package-with-python2 python-networkx))
4929
4930 (define-public python-datrie
4931 (package
4932 (name "python-datrie")
4933 (version "0.7.1")
4934 (source
4935 (origin
4936 (method url-fetch)
4937 (uri (pypi-uri "datrie" version))
4938 (sha256
4939 (base32
4940 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
4941 (build-system python-build-system)
4942 (arguments
4943 `(#:phases (modify-phases %standard-phases
4944 (add-before 'build 'cythonize
4945 (lambda _
4946 ;; Regenerate Cython classes to solve ABI issues with Python
4947 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
4948 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
4949 "src/stdio_ext.pxd" "-a"))))))
4950 (native-inputs
4951 `(("python-cython" ,python-cython)
4952 ("python-hypothesis" ,python-hypothesis)
4953 ("python-pytest" ,python-pytest)
4954 ("python-pytest-runner" ,python-pytest-runner)))
4955 (home-page "https://github.com/kmike/datrie")
4956 (synopsis "Fast, efficiently stored trie for Python")
4957 (description
4958 "This package provides a fast, efficiently stored trie implementation for
4959 Python.")
4960 (license license:lgpl2.1+)))
4961
4962 (define-public snakemake
4963 (package
4964 (name "snakemake")
4965 (version "5.2.4")
4966 (source
4967 (origin
4968 (method url-fetch)
4969 (uri (pypi-uri "snakemake" version))
4970 (sha256
4971 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
4972 (build-system python-build-system)
4973 (arguments
4974 ;; TODO: Package missing test dependencies.
4975 '(#:tests? #f
4976 #:phases
4977 (modify-phases %standard-phases
4978 ;; For cluster execution Snakemake will call Python. Since there is
4979 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
4980 ;; this by calling the snakemake wrapper instead.
4981 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
4982 (lambda* (#:key outputs #:allow-other-keys)
4983 (substitute* "snakemake/executors.py"
4984 (("\\{sys.executable\\} -m snakemake")
4985 (string-append (assoc-ref outputs "out")
4986 "/bin/snakemake")))
4987 #t)))))
4988 (propagated-inputs
4989 `(("python-gitpython" ,python-gitpython)
4990 ("python-wrapt" ,python-wrapt)
4991 ("python-requests" ,python-requests)
4992 ("python-appdirs" ,python-appdirs)
4993 ("python-configargparse" ,python-configargparse)
4994 ("python-datrie" ,python-datrie)
4995 ("python-docutils" ,python-docutils)
4996 ("python-jinja2" ,python-jinja2)
4997 ("python-jsonschema" ,python-jsonschema)
4998 ("python-networkx" ,python-networkx)
4999 ("python-pyyaml" ,python-pyyaml)
5000 ("python-ratelimiter" ,python-ratelimiter)))
5001 (home-page "https://snakemake.readthedocs.io")
5002 (synopsis "Python-based execution environment for make-like workflows")
5003 (description
5004 "Snakemake aims to reduce the complexity of creating workflows by
5005 providing a clean and modern domain specific specification language (DSL) in
5006 Python style, together with a fast and comfortable execution environment.")
5007 (license license:expat)))
5008
5009 ;; This is currently needed for the pigx-* packages.
5010 (define-public snakemake-4
5011 (package (inherit snakemake)
5012 (version "4.4.0")
5013 (source
5014 (origin
5015 (method url-fetch)
5016 (uri (pypi-uri "snakemake" version))
5017 (sha256
5018 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5019 (propagated-inputs
5020 `(("python-wrapt" ,python-wrapt)
5021 ("python-requests" ,python-requests)
5022 ("python-appdirs" ,python-appdirs)
5023 ("python-configargparse" ,python-configargparse)
5024 ("python-pyyaml" ,python-pyyaml)
5025 ("python-ratelimiter" ,python-ratelimiter)))))
5026
5027 (define-public python-pyqrcode
5028 (package
5029 (name "python-pyqrcode")
5030 (version "1.2.1")
5031 (source
5032 (origin
5033 (method url-fetch)
5034 (uri (pypi-uri "PyQRCode" version))
5035 (sha256
5036 (base32
5037 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5038 (build-system python-build-system)
5039 (home-page
5040 "https://github.com/mnooner256/pyqrcode")
5041 (synopsis "QR code generator")
5042 (description
5043 "Pyqrcode is a QR code generator written purely in Python with
5044 SVG, EPS, PNG and terminal output.")
5045 (license license:bsd-3)))
5046
5047 (define-public python-seaborn
5048 (package
5049 (name "python-seaborn")
5050 (version "0.9.0")
5051 (source
5052 (origin
5053 (method url-fetch)
5054 (uri (pypi-uri "seaborn" version))
5055 (sha256
5056 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5057 (build-system python-build-system)
5058 (arguments
5059 `(#:phases
5060 (modify-phases %standard-phases
5061 (add-before 'check 'start-xserver
5062 (lambda* (#:key inputs #:allow-other-keys)
5063 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5064 ;; There must be a running X server and make check doesn't
5065 ;; start one. Therefore we must do it.
5066 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5067 (setenv "DISPLAY" ":1")
5068 #t)))
5069 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5070 (propagated-inputs
5071 `(("python-pandas" ,python-pandas)
5072 ("python-matplotlib" ,python-matplotlib)
5073 ("python-numpy" ,python-numpy)
5074 ("python-scipy" ,python-scipy)))
5075 (native-inputs
5076 `(("python-pytest" ,python-pytest)
5077 ("xorg-server" ,xorg-server)))
5078 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5079 (synopsis "Statistical data visualization")
5080 (description
5081 "Seaborn is a library for making attractive and informative statistical
5082 graphics in Python. It is built on top of matplotlib and tightly integrated
5083 with the PyData stack, including support for numpy and pandas data structures
5084 and statistical routines from scipy and statsmodels.")
5085 (license license:bsd-3)))
5086
5087 (define-public python2-seaborn
5088 (package-with-python2 python-seaborn))
5089
5090 (define-public python-mpmath
5091 (package
5092 (name "python-mpmath")
5093 (version "0.19")
5094 (source (origin
5095 (method url-fetch)
5096 (uri (string-append "http://mpmath.org/files/mpmath-"
5097 version ".tar.gz"))
5098 (sha256
5099 (base32
5100 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5101 (build-system python-build-system)
5102 (arguments
5103 '(#:phases
5104 (modify-phases %standard-phases
5105 (replace 'check
5106 (lambda _
5107 (zero?
5108 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5109 (home-page "http://mpmath.org")
5110 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5111 (description
5112 "@code{mpmath} can be used as an arbitrary-precision substitute for
5113 Python's float/complex types and math/cmath modules, but also does much
5114 more advanced mathematics.")
5115 (license license:bsd-3)))
5116
5117 (define-public python2-mpmath
5118 (package-with-python2 python-mpmath))
5119
5120 (define-public python-bigfloat
5121 (package
5122 (name "python-bigfloat")
5123 (version "0.3.0")
5124 (source
5125 (origin
5126 (method url-fetch)
5127 (uri (pypi-uri "bigfloat" version))
5128 (sha256
5129 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5130 (build-system python-build-system)
5131 (inputs
5132 `(("mpfr" ,mpfr)))
5133 (home-page "https://github.com/mdickinson/bigfloat")
5134 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5135 (description
5136 "This packages provides a Python interface to the MPFR library for
5137 multiprecision arithmetic.")
5138 (license license:lgpl3+)))
5139
5140 (define-public python2-bigfloat
5141 (package-with-python2 python-bigfloat))
5142
5143 (define-public python-sympy
5144 (package
5145 (name "python-sympy")
5146 (version "1.1.1")
5147 (source
5148 (origin
5149 (method url-fetch)
5150 (uri (string-append
5151 "https://github.com/sympy/sympy/releases/download/sympy-"
5152 version "/sympy-" version ".tar.gz"))
5153 (sha256
5154 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5155 (build-system python-build-system)
5156 (arguments
5157 `(#:phases
5158 (modify-phases %standard-phases
5159 ;; Run the core tests after installation. By default it would run
5160 ;; *all* tests, which take a very long time to complete and are known
5161 ;; to be flaky.
5162 (delete 'check)
5163 (add-after 'install 'check
5164 (lambda* (#:key outputs #:allow-other-keys)
5165 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5166 #t)))))
5167 (propagated-inputs
5168 `(("python-mpmath" ,python-mpmath)))
5169 (home-page "http://www.sympy.org/")
5170 (synopsis "Python library for symbolic mathematics")
5171 (description
5172 "SymPy is a Python library for symbolic mathematics. It aims to become a
5173 full-featured computer algebra system (CAS) while keeping the code as simple
5174 as possible in order to be comprehensible and easily extensible.")
5175 (license license:bsd-3)))
5176
5177 (define-public python2-sympy
5178 (package
5179 (inherit (package-with-python2 python-sympy))
5180 (arguments
5181 `(#:phases
5182 (modify-phases %standard-phases
5183 ;; Run the core tests after installation. By default it would run
5184 ;; *all* tests, which take a very long time to complete and are known
5185 ;; to be flaky.
5186 (delete 'check)
5187 (add-after 'install 'check
5188 (lambda* (#:key outputs #:allow-other-keys)
5189 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5190 #t)))))))
5191
5192 (define-public python-q
5193 (package
5194 (name "python-q")
5195 (version "2.6")
5196 (source
5197 (origin
5198 (method url-fetch)
5199 (uri (pypi-uri "q" version))
5200 (sha256
5201 (base32
5202 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5203 (build-system python-build-system)
5204 (home-page "https://github.com/zestyping/q")
5205 (synopsis "Quick-and-dirty debugging output for tired programmers")
5206 (description
5207 "q is a Python module for \"print\" style of debugging Python code. It
5208 provides convenient short API for print out of values, tracebacks, and
5209 falling into the Python interpreter.")
5210 (license license:asl2.0)))
5211
5212 (define-public python2-q
5213 (package-with-python2 python-q))
5214
5215 (define-public python2-xlib
5216 (package
5217 (name "python2-xlib")
5218 (version "0.14")
5219 (source (origin
5220 (method url-fetch)
5221 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5222 "/" version "/"
5223 "python-xlib-" version ".tar.gz"))
5224 (sha256
5225 (base32
5226 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5227 (build-system python-build-system)
5228 (arguments
5229 `(#:python ,python-2 ;Python 2 only
5230 #:tests? #f)) ;no tests
5231 (home-page "http://python-xlib.sourceforge.net/")
5232 (synopsis "Python X11 client library")
5233 (description
5234 "The Python X Library is intended to be a fully functional X client
5235 library for Python programs. It is useful to implement low-level X clients.
5236 It is written entirely in Python.")
5237 (license license:gpl2+)))
5238
5239 (define-public python-singledispatch
5240 (package
5241 (name "python-singledispatch")
5242 (version "3.4.0.3")
5243 (source
5244 (origin
5245 (method url-fetch)
5246 (uri (pypi-uri "singledispatch" version))
5247 (sha256
5248 (base32
5249 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5250 (build-system python-build-system)
5251 (native-inputs
5252 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5253 (home-page
5254 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5255 (synopsis "Backport of singledispatch feature from Python 3.4")
5256 (description
5257 "This library brings functools.singledispatch from Python 3.4 to Python
5258 2.6-3.3.")
5259 (license license:expat)))
5260
5261 (define-public python2-singledispatch
5262 (package-with-python2 python-singledispatch))
5263
5264 ;; the python- version can be removed with python-3.5
5265 (define-public python-backports-abc
5266 (package
5267 (name "python-backports-abc")
5268 (version "0.5")
5269 (source
5270 (origin
5271 (method url-fetch)
5272 (uri (pypi-uri "backports_abc" version))
5273 (sha256
5274 (base32
5275 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5276 (build-system python-build-system)
5277 (home-page "https://github.com/cython/backports_abc")
5278 (synopsis "Backport of additions to the 'collections.abc' module")
5279 (description
5280 "Python-backports-abc provides a backport of additions to the
5281 'collections.abc' module in Python-3.5.")
5282 (license license:psfl)))
5283
5284 (define-public python2-backports-abc
5285 (package-with-python2 python-backports-abc))
5286
5287 (define-public python-backports-csv
5288 (package
5289 (name "python-backports-csv")
5290 (version "1.0.5")
5291 (source
5292 (origin
5293 (method url-fetch)
5294 (uri (pypi-uri "backports.csv" version))
5295 (sha256
5296 (base32
5297 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5298 (build-system python-build-system)
5299 (home-page "https://github.com/ryanhiebert/backports.csv")
5300 (synopsis "Backport of Python 3's csv module for Python 2")
5301 (description
5302 "Provides a backport of Python 3's @code{csv} module for parsing
5303 comma separated values. The API of the @code{csv} module in Python 2
5304 is drastically different from the @code{csv} module in Python 3.
5305 This is due, for the most part, to the difference between str in
5306 Python 2 and Python 3.")
5307 (license license:psfl)))
5308
5309 (define-public python2-backports-csv
5310 (package-with-python2 python-backports-csv))
5311
5312 (define-public python2-backports-shutil-get-terminal-size
5313 (package
5314 (name "python2-backports-shutil-get-terminal-size")
5315 (version "1.0.0")
5316 (source
5317 (origin
5318 (method url-fetch)
5319 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5320 (sha256
5321 (base32
5322 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5323 (build-system python-build-system)
5324 (arguments
5325 `(#:python ,python-2
5326 #:phases
5327 (modify-phases %standard-phases
5328 (replace 'check
5329 (lambda _
5330 (zero? (system* "py.test" "-v")))))))
5331 (native-inputs
5332 `(("python2-pytest" ,python2-pytest)))
5333 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5334 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5335 (description
5336 "This package provides a backport of the @code{get_terminal_size
5337 function} from Python 3.3's @code{shutil}.
5338 Unlike the original version it is written in pure Python rather than C,
5339 so it might be a tiny bit slower.")
5340 (license license:expat)))
5341
5342 (define-public python-waf
5343 (package
5344 (name "python-waf")
5345 (version "2.0.11")
5346 (source (origin
5347 (method url-fetch)
5348 (uri (string-append "https://waf.io/"
5349 "waf-" version ".tar.bz2"))
5350 (sha256
5351 (base32
5352 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5353 (build-system python-build-system)
5354 (arguments
5355 '(#:phases
5356 (modify-phases %standard-phases
5357 (replace 'build
5358 (lambda _
5359 (invoke "python" "waf-light" "configure" "build")))
5360 (replace 'check
5361 (lambda _
5362 (invoke "python" "waf" "--version")))
5363 (replace 'install
5364 (lambda* (#:key outputs #:allow-other-keys)
5365 (let ((out (assoc-ref outputs "out")))
5366 (install-file "waf" (string-append out "/bin")))
5367 #t))
5368 ;; waf breaks when it is wrapped.
5369 (delete 'wrap))))
5370 (home-page "https://waf.io/")
5371 (synopsis "Python-based build system")
5372 (description
5373 "Waf is a Python-based framework for configuring, compiling and installing
5374 applications.")
5375 (license license:bsd-3)))
5376
5377 (define-public python2-waf
5378 (package-with-python2 python-waf))
5379
5380 (define-public python-pyzmq
5381 (package
5382 (name "python-pyzmq")
5383 (version "17.1.2")
5384 (source
5385 (origin
5386 (method url-fetch)
5387 (uri (pypi-uri "pyzmq" version))
5388 (sha256
5389 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5390 (build-system python-build-system)
5391 (arguments
5392 `(#:configure-flags
5393 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5394 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5395 ;; --inplace' for 'python setup.py test' to work.
5396 #:tests? #f))
5397 (inputs
5398 `(("zeromq" ,zeromq)))
5399 (native-inputs
5400 `(("pkg-config" ,pkg-config)
5401 ("python-nose" ,python-nose)))
5402 (home-page "https://github.com/zeromq/pyzmq")
5403 (synopsis "Python bindings for 0MQ")
5404 (description
5405 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5406 (license license:bsd-4)))
5407
5408 (define-public python2-pyzmq
5409 (package-with-python2 python-pyzmq))
5410
5411 (define-public python-pep8
5412 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5413 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5414 ;; some dependents' test suites, and nothing more.
5415 (package
5416 (name "python-pep8")
5417 (version "1.7.0")
5418 (source
5419 (origin
5420 (method url-fetch)
5421 (uri (pypi-uri "pep8" version))
5422 (sha256
5423 (base32
5424 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5425 (build-system python-build-system)
5426 (home-page "https://pep8.readthedocs.org/")
5427 (synopsis "Python style guide checker")
5428 (description
5429 "This tools checks Python code against some of the style conventions in
5430 PEP 8.")
5431 (license license:expat)))
5432
5433 (define-public python2-pep8
5434 (package-with-python2 python-pep8))
5435
5436 (define-public python-pyflakes
5437 (package
5438 (name "python-pyflakes")
5439 (version "2.0.0")
5440 (source
5441 (origin
5442 (method url-fetch)
5443 (uri (pypi-uri "pyflakes" version))
5444 (sha256
5445 (base32
5446 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5447 (build-system python-build-system)
5448 (home-page
5449 "https://github.com/pyflakes/pyflakes")
5450 (synopsis "Passive checker of Python programs")
5451 (description
5452 "Pyflakes statically checks Python source code for common errors.")
5453 (license license:expat)))
5454
5455 (define-public python2-pyflakes
5456 (package-with-python2 python-pyflakes))
5457
5458 (define-public python-mccabe
5459 (package
5460 (name "python-mccabe")
5461 (version "0.6.1")
5462 (source
5463 (origin
5464 (method url-fetch)
5465 (uri (pypi-uri "mccabe" version))
5466 (sha256
5467 (base32
5468 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5469 (build-system python-build-system)
5470 (native-inputs
5471 `(("python-pytest" ,python-pytest-bootstrap)
5472 ("python-pytest-runner" ,python-pytest-runner)))
5473 (home-page "https://github.com/flintwork/mccabe")
5474 (synopsis "McCabe checker, plugin for flake8")
5475 (description
5476 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5477 complexity of Python source code.")
5478 (license license:expat)))
5479
5480 (define-public python2-mccabe
5481 (package-with-python2 python-mccabe))
5482
5483 (define-public python-mccabe-0.2.1
5484 (package (inherit python-mccabe)
5485 (version "0.2.1")
5486 (source
5487 (origin
5488 (method url-fetch)
5489 (uri (pypi-uri "mccabe" version))
5490 (sha256
5491 (base32
5492 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5493
5494 (define-public python2-mccabe-0.2.1
5495 (package-with-python2 python-mccabe-0.2.1))
5496
5497 ;; Flake8 2.4.1 requires an older version of pep8.
5498 ;; This should be removed ASAP.
5499 (define-public python-pep8-1.5.7
5500 (package (inherit python-pep8)
5501 (version "1.5.7")
5502 (source
5503 (origin
5504 (method url-fetch)
5505 (uri (string-append
5506 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5507 version
5508 ".tar.gz"))
5509 (sha256
5510 (base32
5511 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5512 (arguments
5513 ;; XXX Tests not compatible with Python 3.5.
5514 '(#:tests? #f))))
5515
5516 (define-public python2-pep8-1.5.7
5517 (package-with-python2 python-pep8-1.5.7))
5518
5519 ;; Flake8 2.4.1 requires an older version of pyflakes.
5520 ;; This should be removed ASAP.
5521 (define-public python-pyflakes-0.8.1
5522 (package (inherit python-pyflakes)
5523 (version "0.8.1")
5524 (source
5525 (origin
5526 (method url-fetch)
5527 (uri (string-append
5528 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5529 version
5530 ".tar.gz"))
5531 (sha256
5532 (base32
5533 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5534 (arguments
5535 ;; XXX Tests not compatible with Python 3.5.
5536 '(#:tests? #f))))
5537
5538 (define-public python2-pyflakes-0.8.1
5539 (package-with-python2 python-pyflakes-0.8.1))
5540
5541 ;; This package is used by hypothesis which has thousands of dependent packages.
5542 ;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5543 (define-public python-flake8-3.5
5544 (package
5545 (name "python-flake8")
5546 (version "3.5.0")
5547 (source
5548 (origin
5549 (method url-fetch)
5550 (uri (pypi-uri "flake8" version))
5551 (sha256
5552 (base32
5553 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5554 (build-system python-build-system)
5555 (arguments
5556 `(#:phases
5557 (modify-phases %standard-phases
5558 ;; Two errors don't seem to have assigned codes.
5559 (add-after 'unpack 'delete-broken-test
5560 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5561 (add-after 'unpack 'fix-problem-with-pycodestyle
5562 (lambda _
5563 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5564 ;; This should no longer be needed with the next release.
5565 (substitute* "setup.py"
5566 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5567 "PEP8_PLUGIN('break_after_binary_operator'),\
5568 PEP8_PLUGIN('break_before_binary_operator'),"))
5569 #t))
5570 (delete 'check)
5571 (add-after 'install 'check
5572 (lambda* (#:key inputs outputs #:allow-other-keys)
5573 (add-installed-pythonpath inputs outputs)
5574 (invoke "pytest" "-v")
5575 #t)))))
5576 (propagated-inputs
5577 `(("python-pycodestyle" ,python-pycodestyle)
5578 ("python-pyflakes" ,python-pyflakes)
5579 ("python-mccabe" ,python-mccabe)))
5580 (native-inputs
5581 `(("python-mock" ,python-mock)
5582 ("python-pytest" ,python-pytest-bootstrap)
5583 ("python-pytest-runner" ,python-pytest-runner)))
5584 (home-page "https://gitlab.com/pycqa/flake8")
5585 (synopsis
5586 "The modular source code checker: pep8, pyflakes and co")
5587 (description
5588 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5589 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5590 (license license:expat)))
5591
5592 (define-public python2-flake8-3.5
5593 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5594 (package (inherit base)
5595 (propagated-inputs
5596 `(("python2-configparser" ,python2-configparser)
5597 ("python2-enum34" ,python2-enum34)
5598 ,@(package-propagated-inputs base))))))
5599
5600 ;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5601 ;; this newer version. Keep it as a separate variable for now to avoid
5602 ;; rebuilding "python-hypothesis"; this should be removed in the next
5603 ;; rebuild cycle.
5604 (define-public python-flake8
5605 (package
5606 (inherit python-flake8-3.5)
5607 (version "3.6.0")
5608 (source (origin
5609 (method url-fetch)
5610 (uri (pypi-uri "flake8" version))
5611 (sha256
5612 (base32
5613 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5614 (arguments
5615 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5616 ((#:phases phases)
5617 `(modify-phases ,phases
5618 (delete 'delete-broken-test)
5619 (delete 'fix-problem-with-pycodestyle)))))
5620 (properties `((python2-variant . ,(delay python2-flake8))))))
5621
5622 (define-public python2-flake8
5623 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5624 (package (inherit base)
5625 (propagated-inputs
5626 (package-propagated-inputs python2-flake8-3.5)))))
5627
5628 ;; python-hacking requires flake8 <2.6.0.
5629 (define-public python-flake8-2.5
5630 (package
5631 (inherit python-flake8)
5632 (version "2.5.5")
5633 (source (origin
5634 (method url-fetch)
5635 (uri (pypi-uri "flake8" version))
5636 (sha256
5637 (base32
5638 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5639 (propagated-inputs
5640 `(("python-pep8" ,python-pep8)
5641 ,@(package-propagated-inputs python-flake8)))
5642 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5643
5644 (define-public python2-flake8-2.5
5645 (package
5646 (inherit python2-flake8)
5647 (version (package-version python-flake8-2.5))
5648 (source (origin
5649 (inherit (package-source python-flake8-2.5))))
5650 (propagated-inputs
5651 `(("python2-pep8" ,python2-pep8)
5652 ,@(package-propagated-inputs python2-flake8)))))
5653
5654 (define-public python-flake8-polyfill
5655 (package
5656 (name "python-flake8-polyfill")
5657 (version "1.0.2")
5658 (source
5659 (origin
5660 (method url-fetch)
5661 (uri (pypi-uri "flake8-polyfill" version))
5662 (sha256
5663 (base32
5664 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5665 (build-system python-build-system)
5666 (arguments
5667 '(#:phases
5668 (modify-phases %standard-phases
5669 (replace 'check
5670 (lambda _
5671 (setenv "PYTHONPATH"
5672 (string-append (getcwd) "/build/lib:"
5673 (getenv "PYTHONPATH")))
5674 (zero? (system* "py.test" "-v")))))))
5675 (native-inputs
5676 `(("python-flake8" ,python-flake8)
5677 ("python-mock" ,python-mock)
5678 ("python-pep8" ,python-pep8)
5679 ("python-pycodestyle" ,python-pycodestyle)
5680 ("python-pytest" ,python-pytest)))
5681 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5682 (synopsis "Polyfill package for Flake8 plugins")
5683 (description
5684 "This package that provides some compatibility helpers for Flake8
5685 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5686 (license license:expat)))
5687
5688 (define-public python2-flake8-polyfill
5689 (package-with-python2 python-flake8-polyfill))
5690
5691 (define-public python-mistune
5692 (package
5693 (name "python-mistune")
5694 (version "0.8.4")
5695 (source
5696 (origin
5697 (method url-fetch)
5698 (uri (pypi-uri "mistune" version))
5699 (sha256
5700 (base32
5701 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
5702 (build-system python-build-system)
5703 (native-inputs
5704 `(("python-nose" ,python-nose)
5705 ("python-cython" ,python-cython)))
5706 (home-page "https://github.com/lepture/mistune")
5707 (synopsis "Markdown parser in pure Python")
5708 (description "This package provides a fast markdown parser in pure
5709 Python.")
5710 (license license:bsd-3)))
5711
5712 (define-public python2-mistune
5713 (package-with-python2 python-mistune))
5714
5715 (define-public python-markdown
5716 (package
5717 (name "python-markdown")
5718 (version "3.0.1")
5719 (source
5720 (origin
5721 (method url-fetch)
5722 (uri (pypi-uri "Markdown" version))
5723 (sha256
5724 (base32
5725 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
5726 (build-system python-build-system)
5727 (native-inputs
5728 `(("python-nose" ,python-nose)
5729 ("python-pyyaml" ,python-pyyaml)))
5730 (home-page "https://python-markdown.github.io/")
5731 (synopsis "Python implementation of Markdown")
5732 (description
5733 "This package provides a Python implementation of John Gruber's
5734 Markdown. The library features international input, various Markdown
5735 extensions, and several HTML output formats. A command line wrapper
5736 markdown_py is also provided to convert Markdown files to HTML.")
5737 (license license:bsd-3)))
5738
5739 (define-public python2-markdown
5740 (package-with-python2 python-markdown))
5741
5742 (define-public python-ptyprocess
5743 (package
5744 (name "python-ptyprocess")
5745 (version "0.5.2")
5746 (source
5747 (origin
5748 (method url-fetch)
5749 (uri (pypi-uri "ptyprocess" version))
5750 (sha256
5751 (base32
5752 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5753 (build-system python-build-system)
5754 (native-inputs
5755 `(("python-nose" ,python-nose)))
5756 (arguments
5757 `(#:phases
5758 (modify-phases %standard-phases
5759 (replace 'check
5760 (lambda _
5761 (zero? (system* "nosetests")))))))
5762 (home-page "https://github.com/pexpect/ptyprocess")
5763 (synopsis "Run a subprocess in a pseudo terminal")
5764 (description
5765 "This package provides a Python library used to launch a subprocess in a
5766 pseudo terminal (pty), and interact with both the process and its pty.")
5767 (license license:isc)))
5768
5769 (define-public python2-ptyprocess
5770 (package-with-python2 python-ptyprocess))
5771
5772 (define-public python-cram
5773 (package
5774 (name "python-cram")
5775 (version "0.7")
5776 (home-page "https://bitheap.org/cram/")
5777 (source (origin
5778 (method url-fetch)
5779 (uri (list (string-append home-page "cram-"
5780 version ".tar.gz")
5781 (pypi-uri "cram" version)))
5782 (sha256
5783 (base32
5784 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5785 (arguments
5786 '(#:phases
5787 (modify-phases %standard-phases
5788 (add-after 'unpack 'patch-source
5789 (lambda _
5790 (substitute* (find-files "cram" ".*\\.py$")
5791 ;; Replace default shell path.
5792 (("/bin/sh") (which "sh")))
5793 (substitute* (find-files "tests" ".*\\.t$")
5794 (("md5") "md5sum")
5795 (("/bin/bash") (which "bash"))
5796 (("/bin/sh") (which "sh")))
5797 (substitute* "cram/_test.py"
5798 ;; This hack works around a bug triggered by substituting
5799 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5800 ;; "cram -h", which breaks the output at 80 characters. This
5801 ;; causes the line showing the default shell to break into two
5802 ;; lines, but the test expects a single line...
5803 (("env\\['COLUMNS'\\] = '80'")
5804 "env['COLUMNS'] = '160'"))
5805 #t))
5806 (delete 'check)
5807 (add-after 'install 'check
5808 ;; The test phase uses the built library and executable.
5809 ;; It's easier to run it after install since the build
5810 ;; directory contains version-specific PATH.
5811 (lambda* (#:key inputs outputs #:allow-other-keys)
5812 (add-installed-pythonpath inputs outputs)
5813 (setenv "PATH" (string-append (getenv "PATH") ":"
5814 (assoc-ref outputs "out") "/bin"))
5815 (zero? (system* "make" "test")))))))
5816 (build-system python-build-system)
5817 (native-inputs
5818 `(("python-coverage" ,python-coverage)
5819 ("which" ,which)))
5820 (synopsis "Simple testing framework for command line applications")
5821 (description
5822 "Cram is a functional testing framework for command line applications.
5823 Cram tests look like snippets of interactive shell sessions. Cram runs each
5824 command and compares the command output in the test with the command’s actual
5825 output.")
5826 (license license:gpl2+)))
5827
5828 (define-public python2-cram
5829 (package-with-python2 python-cram))
5830
5831 (define-public python-straight-plugin
5832 (package
5833 (name "python-straight-plugin")
5834 (version "1.4.1")
5835 (source
5836 (origin
5837 (method url-fetch)
5838 (uri (pypi-uri "straight.plugin" version))
5839 (sha256
5840 (base32
5841 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5842 (build-system python-build-system)
5843 (home-page "https://github.com/ironfroggy/straight.plugin")
5844 (synopsis "Simple namespaced plugin facility")
5845 (description "Straight Plugin provides a type of plugin you can create from
5846 almost any existing Python modules, and an easy way for outside developers to
5847 add functionality and customization to your projects with their own plugins.")
5848 (license license:expat)))
5849
5850 (define-public python2-straight-plugin
5851 (package-with-python2 python-straight-plugin))
5852
5853 (define-public python-fonttools
5854 (package
5855 (name "python-fonttools")
5856 (version "3.28.0")
5857 (source (origin
5858 (method url-fetch)
5859 (uri (pypi-uri "fonttools" version ".zip"))
5860 (sha256
5861 (base32
5862 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
5863 (build-system python-build-system)
5864 (native-inputs
5865 `(("unzip" ,unzip)
5866 ("python-pytest" ,python-pytest)
5867 ("python-pytest-runner" ,python-pytest-runner)))
5868 (home-page "https://github.com/behdad/fonttools")
5869 (synopsis "Tools to manipulate font files")
5870 (description
5871 "FontTools/TTX is a library to manipulate font files from Python. It
5872 supports reading and writing of TrueType/OpenType fonts, reading and writing
5873 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5874 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5875 from an XML-based format.")
5876 (license license:expat)))
5877
5878 (define-public python2-fonttools
5879 (package-with-python2 python-fonttools))
5880
5881 (define-public python-ly
5882 (package
5883 (name "python-ly")
5884 (version "0.9.5")
5885 (source
5886 (origin
5887 (method url-fetch)
5888 (uri (pypi-uri name version))
5889 (sha256
5890 (base32
5891 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
5892 (build-system python-build-system)
5893 (arguments
5894 ;; FIXME: Some tests need network access.
5895 '(#:tests? #f))
5896 (synopsis "Tool and library for manipulating LilyPond files")
5897 (description "This package provides a Python library to parse, manipulate
5898 or create documents in LilyPond format. A command line program ly is also
5899 provided that can be used to do various manipulations with LilyPond files.")
5900 (home-page "https://pypi.python.org/pypi/python-ly")
5901 (license license:gpl2+)))
5902
5903 (define-public python-appdirs
5904 (package
5905 (name "python-appdirs")
5906 (version "1.4.3")
5907 (source
5908 (origin
5909 (method url-fetch)
5910 (uri (pypi-uri "appdirs" version))
5911 (sha256
5912 (base32
5913 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
5914 (build-system python-build-system)
5915 (home-page "https://github.com/ActiveState/appdirs")
5916 (synopsis
5917 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5918 (description
5919 "This module provides a portable way of finding out where user data
5920 should be stored on various operating systems.")
5921 (license license:expat)))
5922
5923 (define-public python2-appdirs
5924 (package-with-python2 python-appdirs))
5925
5926 (define-public python-llfuse
5927 (package
5928 (name "python-llfuse")
5929 (version "1.3.5")
5930 (source (origin
5931 (method url-fetch)
5932 (uri (pypi-uri "llfuse" version ".tar.bz2"))
5933 (sha256
5934 (base32
5935 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
5936 (build-system python-build-system)
5937 (inputs
5938 `(("fuse" ,fuse)
5939 ("attr" ,attr)))
5940 (native-inputs
5941 `(("pkg-config" ,pkg-config)))
5942 (synopsis "Python bindings for FUSE")
5943 (description
5944 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5945 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5946 (license license:lgpl2.0+)
5947 (properties `((python2-variant . ,(delay python2-llfuse))))))
5948
5949 (define-public python2-llfuse
5950 (package (inherit (package-with-python2
5951 (strip-python2-variant python-llfuse)))
5952 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5953
5954 ;; For attic-0.16
5955 (define-public python-llfuse-0.41
5956 (package (inherit python-llfuse)
5957 (version "0.41.1")
5958 (source (origin
5959 (method url-fetch)
5960 (uri (string-append
5961 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5962 "llfuse-" version ".tar.bz2"))
5963 (sha256
5964 (base32
5965 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5966 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5967 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5968 (license (list license:expat license:lgpl2.0+))))
5969
5970 (define-public python-msgpack
5971 (package
5972 (name "python-msgpack")
5973 (version "0.5.6")
5974 (source (origin
5975 (method url-fetch)
5976 (uri (pypi-uri "msgpack" version))
5977 (sha256
5978 (base32
5979 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
5980 (build-system python-build-system)
5981 (arguments
5982 `(#:modules ((guix build utils)
5983 (guix build python-build-system)
5984 (ice-9 ftw)
5985 (srfi srfi-1)
5986 (srfi srfi-26))
5987 #:phases
5988 (modify-phases %standard-phases
5989 (replace 'check
5990 (lambda _
5991 (let ((cwd (getcwd)))
5992 (setenv "PYTHONPATH"
5993 (string-append cwd "/build/"
5994 (find (cut string-prefix? "lib" <>)
5995 (scandir (string-append cwd "/build")))
5996 ":"
5997 (getenv "PYTHONPATH")))
5998 (invoke "pytest" "-v" "test")))))))
5999 (native-inputs
6000 `(("python-pytest" ,python-pytest)))
6001 (synopsis "MessagePack (de)serializer")
6002 (description "MessagePack is a fast, compact binary serialization format,
6003 suitable for similar data to JSON. This package provides CPython bindings for
6004 reading and writing MessagePack data.")
6005 (home-page "https://pypi.python.org/pypi/msgpack/")
6006 (license license:asl2.0)))
6007
6008 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6009 ;; release 0.5. Some packages like borg still call it by the old name for now.
6010 ;; <https://bugs.gnu.org/30662>
6011 (define-public python-msgpack-transitional
6012 (package
6013 (inherit python-msgpack)
6014 (name "python-msgpack-transitional")
6015 (arguments
6016 (substitute-keyword-arguments (package-arguments python-msgpack)
6017 ((#:phases phases)
6018 `(modify-phases ,phases
6019 (add-after 'unpack 'configure-transitional
6020 (lambda _
6021 ;; Keep using the old name.
6022 (substitute* "setup.py"
6023 (("TRANSITIONAL = False")
6024 "TRANSITIONAL = 1"))
6025 #t))))))))
6026
6027 (define-public python2-msgpack
6028 (package-with-python2 python-msgpack))
6029
6030 (define-public python-netaddr
6031 (package
6032 (name "python-netaddr")
6033 (version "0.7.19")
6034 (source
6035 (origin
6036 (method url-fetch)
6037 (uri (pypi-uri "netaddr" version))
6038 (sha256
6039 (base32
6040 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6041 (build-system python-build-system)
6042 (arguments `(#:tests? #f)) ;; No tests.
6043 (home-page "https://github.com/drkjam/netaddr/")
6044 (synopsis "Pythonic manipulation of network addresses")
6045 (description
6046 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6047 and MAC network addresses.")
6048 (license license:bsd-3)))
6049
6050 (define-public python2-netaddr
6051 (package-with-python2 python-netaddr))
6052
6053 (define-public python-wrapt
6054 (package
6055 (name "python-wrapt")
6056 (version "1.11.1")
6057 (source
6058 (origin
6059 (method url-fetch)
6060 (uri (pypi-uri "wrapt" version))
6061 (sha256
6062 (base32
6063 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
6064 (build-system python-build-system)
6065 (arguments
6066 ;; Tests are not included in the tarball, they are only available in the
6067 ;; git repository.
6068 `(#:tests? #f))
6069 (home-page "https://github.com/GrahamDumpleton/wrapt")
6070 (synopsis "Module for decorators, wrappers and monkey patching")
6071 (description
6072 "The aim of the wrapt module is to provide a transparent object proxy for
6073 Python, which can be used as the basis for the construction of function
6074 wrappers and decorator functions.")
6075 (license license:bsd-2)))
6076
6077 (define-public python2-wrapt
6078 (package-with-python2 python-wrapt))
6079
6080 (define-public python-xlrd
6081 (package
6082 (name "python-xlrd")
6083 (version "1.0.0")
6084 (source (origin
6085 (method url-fetch)
6086 (uri (pypi-uri "xlrd" version))
6087 (sha256
6088 (base32
6089 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6090 (build-system python-build-system)
6091 (arguments
6092 `(#:phases
6093 (modify-phases %standard-phases
6094 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6095 ;; run tests instead for now.
6096 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6097 (native-inputs `(("python-nose" ,python-nose)))
6098 (home-page "http://www.python-excel.org/")
6099 (synopsis "Library for extracting data from Excel files")
6100 (description "This packages provides a library to extract data from
6101 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6102 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6103 Unicode-aware. It is not intended as an end-user tool.")
6104 (license license:bsd-3)))
6105
6106 (define-public python2-xlrd
6107 (package-with-python2 python-xlrd))
6108
6109 (define-public python-prettytable
6110 (package
6111 (name "python-prettytable")
6112 (version "0.7.2")
6113 (source
6114 (origin
6115 (method url-fetch)
6116 (uri (string-append
6117 "https://pypi.python.org/packages/source/P/PrettyTable/"
6118 "prettytable-" version ".tar.bz2"))
6119 (sha256
6120 (base32
6121 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6122 (build-system python-build-system)
6123 (home-page "http://code.google.com/p/prettytable/")
6124 (synopsis "Display tabular data in an ASCII table format")
6125 (description
6126 "A library designed to represent tabular data in visually appealing ASCII
6127 tables. PrettyTable allows for selection of which columns are to be printed,
6128 independent alignment of columns (left or right justified or centred) and
6129 printing of sub-tables by specifying a row range.")
6130 (license license:bsd-3)))
6131
6132 (define-public python2-prettytable
6133 (package-with-python2 python-prettytable))
6134
6135 (define-public python-tables
6136 (package
6137 (name "python-tables")
6138 (version "3.4.4")
6139 (source
6140 (origin
6141 (method url-fetch)
6142 (uri (pypi-uri "tables" version))
6143 (sha256
6144 (base32
6145 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6146 (modules '((guix build utils)))
6147 (snippet
6148 '(begin
6149 ;; Remove pre-compiled .pyc files from source.
6150 (for-each delete-file-recursively
6151 (find-files "." "__pycache__" #:directories? #t))
6152 (for-each delete-file (find-files "." "\\.pyc$"))
6153 #t))))
6154 (build-system python-build-system)
6155 (arguments
6156 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6157 ;; or "check", so we must override the build and check phases.
6158 #:phases
6159 (modify-phases %standard-phases
6160 (add-after 'unpack 'use-gcc
6161 (lambda _
6162 (substitute* "setup.py"
6163 (("compiler = new_compiler\\(\\)" line)
6164 (string-append line
6165 "\ncompiler.set_executables(compiler='gcc',"
6166 "compiler_so='gcc',"
6167 "linker_exe='gcc',"
6168 "linker_so='gcc -shared')")))
6169 #t))
6170 (replace 'build
6171 (lambda* (#:key inputs #:allow-other-keys)
6172 (zero? (system* "python" "setup.py" "build"
6173 (string-append "--hdf5="
6174 (assoc-ref inputs "hdf5"))))))
6175 (replace 'check
6176 (lambda* (#:key inputs #:allow-other-keys)
6177 (zero? (system* "python" "setup.py" "check"
6178 (string-append "--hdf5="
6179 (assoc-ref inputs "hdf5")))))))))
6180 (propagated-inputs
6181 `(("python-numexpr" ,python-numexpr)
6182 ("python-numpy" ,python-numpy)))
6183 (native-inputs
6184 `(("python-cython" ,python-cython)
6185 ("pkg-config" ,pkg-config)))
6186 (inputs
6187 `(("hdf5" ,hdf5)
6188 ("bzip2" ,bzip2)
6189 ("zlib" ,zlib)))
6190 (home-page "http://www.pytables.org/")
6191 (synopsis "Hierarchical datasets for Python")
6192 (description "PyTables is a package for managing hierarchical datasets and
6193 designed to efficiently cope with extremely large amounts of data.")
6194 (license license:bsd-3)))
6195
6196 (define-public python2-tables
6197 (package-with-python2 python-tables))
6198
6199 (define-public python-pyasn1
6200 (package
6201 (name "python-pyasn1")
6202 (version "0.4.3")
6203 (source
6204 (origin
6205 (method url-fetch)
6206 (uri (pypi-uri "pyasn1" version))
6207 (sha256
6208 (base32
6209 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6210 (build-system python-build-system)
6211 (home-page "http://pyasn1.sourceforge.net/")
6212 (synopsis "ASN.1 types and codecs")
6213 (description
6214 "This is an implementation of ASN.1 types and codecs in Python. It is
6215 suitable for a wide range of protocols based on the ASN.1 specification.")
6216 (license license:bsd-2)))
6217
6218 (define-public python2-pyasn1
6219 (package-with-python2 python-pyasn1))
6220
6221 (define-public python-pyasn1-modules
6222 (package
6223 (name "python-pyasn1-modules")
6224 (version "0.2.2")
6225 (source
6226 (origin
6227 (method url-fetch)
6228 (uri (pypi-uri "pyasn1-modules" version))
6229 (sha256
6230 (base32
6231 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6232 (build-system python-build-system)
6233 (propagated-inputs
6234 `(("python-pyasn1" ,python-pyasn1)))
6235 (home-page "https://sourceforge.net/projects/pyasn1/")
6236 (synopsis "ASN.1 codec implementations")
6237 (description
6238 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6239 implementations of ASN.1-based codecs and protocols.")
6240 (license license:bsd-3)))
6241
6242 (define-public python2-pyasn1-modules
6243 (package-with-python2 python-pyasn1-modules))
6244
6245 (define-public python-ipaddress
6246 (package
6247 (name "python-ipaddress")
6248 (version "1.0.22")
6249 (source (origin
6250 (method url-fetch)
6251 (uri (pypi-uri "ipaddress" version))
6252 (sha256
6253 (base32
6254 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6255 (build-system python-build-system)
6256 (home-page "https://github.com/phihag/ipaddress")
6257 (synopsis "IP address manipulation library")
6258 (description
6259 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6260 in Python. This library is used to create, poke at, and manipulate IPv4 and
6261 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6262 module to older versions of Python.")
6263 (license license:psfl)))
6264
6265 (define-public python2-ipaddress
6266 (package-with-python2 python-ipaddress))
6267
6268 (define-public python2-ipaddr
6269 (package
6270 (name "python2-ipaddr")
6271 (version "2.1.11")
6272 (source
6273 (origin
6274 (method url-fetch)
6275 (uri (pypi-uri "ipaddr" version))
6276 (sha256
6277 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6278 (build-system python-build-system)
6279 (arguments
6280 `(#:python ,python-2 ;version 2 only
6281 #:phases
6282 (modify-phases %standard-phases
6283 (replace 'check
6284 (lambda* _
6285 (zero? (system* "python" "ipaddr_test.py")))))))
6286 (home-page "https://github.com/google/ipaddr-py")
6287 (synopsis "IP address manipulation library")
6288 (description
6289 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6290 IPv6 addresses and networks.
6291
6292 For new implementations you may prefer to use the standard module
6293 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6294 versions of Python.")
6295 (license license:asl2.0)))
6296
6297 (define-public python-idna
6298 (package
6299 (name "python-idna")
6300 (version "2.7")
6301 (source
6302 (origin
6303 (method url-fetch)
6304 (uri (pypi-uri "idna" version))
6305 (sha256
6306 (base32
6307 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6308 (build-system python-build-system)
6309 (home-page "https://github.com/kjd/idna")
6310 (synopsis "Internationalized domain names in applications")
6311 (description
6312 "This is a library to support the Internationalised Domain Names in
6313 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6314 protocol is often referred to as “IDNA2008” and can produce different results
6315 from the earlier standard from 2003. The library is also intended to act as a
6316 suitable drop-in replacement for the “encodings.idna” module that comes with
6317 the Python standard library but currently only supports the older 2003
6318 specification.")
6319 (license license:bsd-4)))
6320
6321 (define-public python2-idna
6322 (package-with-python2 python-idna))
6323
6324 (define-public python-idna-ssl
6325 (package
6326 (name "python-idna-ssl")
6327 (version "1.0.1")
6328 (source
6329 (origin
6330 (method url-fetch)
6331 (uri (pypi-uri "idna-ssl" version))
6332 (sha256
6333 (base32
6334 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6335 (build-system python-build-system)
6336 (arguments
6337 `(#:tests? #f)) ;circular dependency with python-aiohttp
6338 (home-page "https://github.com/aio-libs/idna-ssl")
6339 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6340 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6341 domains support.")
6342 (license license:expat)))
6343
6344 (define-public python-pretend
6345 (package
6346 (name "python-pretend")
6347 (version "1.0.9")
6348 (source
6349 (origin
6350 (method url-fetch)
6351 (uri (string-append "https://pypi.python.org/packages/source/p/"
6352 "pretend/pretend-" version ".tar.gz"))
6353 (sha256
6354 (base32
6355 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6356 (build-system python-build-system)
6357 (home-page "https://github.com/alex/pretend")
6358 (synopsis "Library for stubbing in Python")
6359 (description
6360 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6361 technique for writing tests. You may hear the term mixed up with mocks,
6362 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6363 responses, rather than doing any computation.")
6364 (license license:bsd-3)))
6365
6366 (define-public python2-pretend
6367 (package-with-python2 python-pretend))
6368
6369 (define-public python-pip
6370 (package
6371 (name "python-pip")
6372 (version "18.1")
6373 (source
6374 (origin
6375 (method url-fetch)
6376 (uri (pypi-uri "pip" version))
6377 (sha256
6378 (base32
6379 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6380 (build-system python-build-system)
6381 (arguments
6382 '(#:tests? #f)) ; there are no tests in the pypi archive.
6383 (home-page "https://pip.pypa.io/")
6384 (synopsis "Package manager for Python software")
6385 (description
6386 "Pip is a package manager for Python software, that finds packages on the
6387 Python Package Index (PyPI).")
6388 (license license:expat)))
6389
6390 (define-public python2-pip
6391 (package-with-python2 python-pip))
6392
6393 (define-public python-tlsh
6394 (package
6395 (name "python-tlsh")
6396 (version "3.4.5")
6397 (home-page "https://github.com/trendmicro/tlsh")
6398 (source (origin
6399 (method url-fetch)
6400 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6401 version ".tar.gz"))
6402 (sha256
6403 (base32
6404 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6405 (file-name (string-append name "-" version ".tar.gz"))))
6406 (build-system cmake-build-system)
6407 (arguments
6408 '(#:out-of-source? #f
6409 #:phases (modify-phases %standard-phases
6410 (replace
6411 'install
6412 (lambda* (#:key outputs #:allow-other-keys)
6413 ;; Build and install the Python bindings. The underlying
6414 ;; C++ library is apparently not meant to be installed.
6415 (let ((out (assoc-ref outputs "out")))
6416 (with-directory-excursion "py_ext"
6417 (and (system* "python" "setup.py" "build")
6418 (system* "python" "setup.py" "install"
6419 (string-append "--prefix=" out))))))))))
6420 (inputs `(("python" ,python-wrapper))) ;for the bindings
6421 (synopsis "Fuzzy matching library for Python")
6422 (description
6423 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6424 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6425 value which can be used for similarity comparisons. Similar objects have
6426 similar hash values, which allows for the detection of similar objects by
6427 comparing their hash values. The byte stream should have a sufficient amount
6428 of complexity; for example, a byte stream of identical bytes will not generate
6429 a hash value.")
6430 (license license:asl2.0)))
6431
6432 (define-public python2-tlsh
6433 (package
6434 (inherit python-tlsh)
6435 (name "python2-tlsh")
6436 (inputs `(("python" ,python-2)))))
6437
6438 (define-public python-termcolor
6439 (package
6440 (name "python-termcolor")
6441 (version "1.1.0")
6442 (source
6443 (origin
6444 (method url-fetch)
6445 (uri (pypi-uri "termcolor" version))
6446 (sha256
6447 (base32
6448 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6449 (build-system python-build-system)
6450 (arguments
6451 ;; There are no tests.
6452 `(#:tests? #f))
6453 (home-page "https://pypi.python.org/pypi/termcolor")
6454 (synopsis "ANSII Color formatting for terminal output")
6455 (description
6456 "This package provides ANSII Color formatting for output in terminals.")
6457 (license license:expat)))
6458
6459 (define-public python2-termcolor
6460 (package-with-python2 python-termcolor))
6461
6462 (define-public python-libarchive-c
6463 (package
6464 (name "python-libarchive-c")
6465 (version "2.8")
6466 (source (origin
6467 (method url-fetch)
6468 (uri (pypi-uri "libarchive-c" version))
6469 (sha256
6470 (base32
6471 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6472 (build-system python-build-system)
6473 (arguments
6474 '(#:phases (modify-phases %standard-phases
6475 (add-before
6476 'build 'reference-libarchive
6477 (lambda* (#:key inputs #:allow-other-keys)
6478 ;; Retain the absolute file name of libarchive.so.
6479 (let ((libarchive (assoc-ref inputs "libarchive")))
6480 (substitute* "libarchive/ffi.py"
6481 (("find_library\\('archive'\\)")
6482 (string-append "'" libarchive
6483 "/lib/libarchive.so'"))))))
6484 (replace 'check
6485 (lambda _ (invoke "pytest" "-vv"))))))
6486 (native-inputs
6487 `(("python-mock" ,python-mock)
6488 ("python-pytest" ,python-pytest)))
6489 (inputs
6490 `(("libarchive" ,libarchive)))
6491 (home-page "https://github.com/Changaco/python-libarchive-c")
6492 (synopsis "Python interface to libarchive")
6493 (description
6494 "This package provides Python bindings to libarchive, a C library to
6495 access possibly compressed archives in many different formats. It uses
6496 Python's @code{ctypes} foreign function interface (FFI).")
6497 (license license:lgpl2.0+)))
6498
6499 (define-public python2-libarchive-c
6500 (package-with-python2 python-libarchive-c))
6501
6502 (define-public python-file
6503 (package
6504 (inherit file)
6505 (name "python-file")
6506 (build-system python-build-system)
6507 (arguments
6508 '(#:tests? #f ;no tests
6509 #:configure-flags '("--single-version-externally-managed" "--root=/")
6510 #:phases (modify-phases %standard-phases
6511 (add-before 'build 'change-directory
6512 (lambda _
6513 (chdir "python")
6514 #t))
6515 (add-before 'build 'set-library-file-name
6516 (lambda* (#:key inputs #:allow-other-keys)
6517 (let ((file (assoc-ref inputs "file")))
6518 (substitute* "magic.py"
6519 (("find_library\\('magic'\\)")
6520 (string-append "'" file "/lib/libmagic.so'")))
6521 #t))))))
6522 (inputs `(("file" ,file)))
6523 (self-native-input? #f)
6524 (synopsis "Python bindings to the libmagic file type guesser. Note that
6525 this module and the python-magic module both provide a \"magic.py\" file;
6526 these two modules, which are different and were developed separately, both
6527 serve the same purpose: provide Python bindings for libmagic.")))
6528
6529 (define-public python2-file
6530 (package-with-python2 python-file))
6531
6532 (define-public python-debian
6533 (package
6534 (name "python-debian")
6535 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6536 (version "0.1.28")
6537 (source
6538 (origin
6539 (method url-fetch)
6540 (uri (pypi-uri name version))
6541 (sha256
6542 (base32
6543 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6544 (build-system python-build-system)
6545 (propagated-inputs
6546 `(("python-six" ,python-six)))
6547 (synopsis "Debian package related modules")
6548 (description
6549 ;; XXX: Use @enumerate instead of @itemize to work around
6550 ;; <http://bugs.gnu.org/21772>.
6551 "This package provides Python modules that abstract many formats of
6552 Debian-related files, such as:
6553
6554 @enumerate
6555 @item Debtags information;
6556 @item @file{debian/changelog} files;
6557 @item packages files, pdiffs;
6558 @item control files of single or multiple RFC822-style paragraphs---e.g.
6559 @file{debian/control}, @file{.changes}, @file{.dsc};
6560 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6561 contained files and meta-information.
6562 @end enumerate\n")
6563
6564 ;; Modules are either GPLv2+ or GPLv3+.
6565 (license license:gpl3+)))
6566
6567 (define-public python2-debian
6568 (package-with-python2 python-debian))
6569
6570 (define-public python-nbformat
6571 (package
6572 (name "python-nbformat")
6573 (version "4.4.0")
6574 (source
6575 (origin
6576 (method url-fetch)
6577 (uri (pypi-uri "nbformat" version))
6578 (sha256
6579 (base32
6580 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6581 (build-system python-build-system)
6582 (arguments `(#:tests? #f)) ; no test target
6583 (propagated-inputs
6584 `(("python-ipython-genutils" ,python-ipython-genutils)
6585 ("python-jsonschema" ,python-jsonschema)
6586 ("python-jupyter-core" ,python-jupyter-core)
6587 ("python-traitlets" ,python-traitlets)))
6588 (home-page "http://jupyter.org")
6589 (synopsis "Jupyter Notebook format")
6590 (description "This package provides the reference implementation of the
6591 Jupyter Notebook format and Python APIs for working with notebooks.")
6592 (license license:bsd-3)))
6593
6594 (define-public python2-nbformat
6595 (package-with-python2 python-nbformat))
6596
6597 (define-public python-bleach
6598 (package
6599 (name "python-bleach")
6600 (version "1.4.3")
6601 (source
6602 (origin
6603 (method url-fetch)
6604 (uri (pypi-uri "bleach" version))
6605 (sha256
6606 (base32
6607 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6608 (build-system python-build-system)
6609 (propagated-inputs
6610 `(("python-html5lib" ,python-html5lib-0.9)
6611 ("python-six" ,python-six)))
6612 (native-inputs
6613 `(("python-nose" ,python-nose)))
6614 (home-page "https://github.com/jsocol/bleach")
6615 (synopsis "Whitelist-based HTML-sanitizing tool")
6616 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6617 (license license:asl2.0)))
6618
6619 (define-public python2-bleach
6620 (package-with-python2 python-bleach))
6621
6622 (define-public python-entrypoints
6623 (package
6624 (name "python-entrypoints")
6625 (version "0.2.3")
6626 (source
6627 (origin
6628 (method url-fetch)
6629 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6630 version ".tar.gz"))
6631 (file-name (string-append name "-" version ".tar.gz"))
6632 (sha256
6633 (base32
6634 "1pdvgfr5bxyvnfvxbsd3zi0dh3il71pc4k6rinx6zpps91b84a56"))))
6635 (build-system python-build-system)
6636 ;; The package does not come with a setup.py file, so we have to generate
6637 ;; one ourselves.
6638 (arguments
6639 `(#:tests? #f
6640 #:phases
6641 (modify-phases %standard-phases
6642 (add-after 'unpack 'create-setup.py
6643 (lambda _
6644 (call-with-output-file "setup.py"
6645 (lambda (port)
6646 (format port "\
6647 from setuptools import setup
6648 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6649 " ,version))))))))
6650 (home-page "https://github.com/takluyver/entrypoints")
6651 (synopsis "Discover and load entry points from installed Python packages")
6652 (description "Entry points are a way for Python packages to advertise
6653 objects with some common interface. The most common examples are
6654 @code{console_scripts} entry points, which define shell commands by
6655 identifying a Python function to run. The @code{entrypoints} module contains
6656 functions to find and load entry points.")
6657 (license license:expat)))
6658
6659 (define-public python2-entrypoints
6660 (package-with-python2 python-entrypoints))
6661
6662 (define-public python-nbconvert
6663 (package
6664 (name "python-nbconvert")
6665 (version "5.0.0b1")
6666 (source
6667 (origin
6668 (method url-fetch)
6669 (uri (pypi-uri "nbconvert" version))
6670 (sha256
6671 (base32
6672 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6673 (build-system python-build-system)
6674 (arguments
6675 `(;; The "bdist_egg" target is disabled by default, causing the installation
6676 ;; to fail.
6677 #:configure-flags (list "bdist_egg")
6678 ;; FIXME: 5 failures, 40 errors.
6679 #:tests? #f))
6680 ;; #:phases
6681 ;; (modify-phases %standard-phases
6682 ;; (replace 'check
6683 ;; (lambda _
6684 ;; (zero? (system* "py.test" "-v")))))
6685 (native-inputs
6686 `(("python-pytest" ,python-pytest)))
6687 (propagated-inputs
6688 `(("python-bleach" ,python-bleach)
6689 ("python-entrypoints" ,python-entrypoints)
6690 ("python-jinja2" ,python-jinja2)
6691 ("python-jupyter-core" ,python-jupyter-core)
6692 ("python-mistune" ,python-mistune)
6693 ("python-nbformat" ,python-nbformat)
6694 ("python-pygments" ,python-pygments)
6695 ("python-traitlets" ,python-traitlets)))
6696 (home-page "http://jupyter.org")
6697 (synopsis "Converting Jupyter Notebooks")
6698 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6699 notebooks to various other formats via Jinja templates. It allows you to
6700 convert an @code{.ipynb} notebook file into various static formats including:
6701
6702 @enumerate
6703 @item HTML
6704 @item LaTeX
6705 @item PDF
6706 @item Reveal JS
6707 @item Markdown (md)
6708 @item ReStructured Text (rst)
6709 @item executable script
6710 @end enumerate\n")
6711 (license license:bsd-3)))
6712
6713 (define-public python2-nbconvert
6714 (package-with-python2 python-nbconvert))
6715
6716 (define-public python-prometheus-client
6717 (package
6718 (name "python-prometheus-client")
6719 (version "0.5.0")
6720 (source
6721 (origin
6722 (method url-fetch)
6723 (uri (pypi-uri "prometheus_client" version))
6724 (sha256
6725 (base32
6726 "0g7rpv1pq2lab1nfqdx98z9d3bqwc400alg1j4ynrpjkrbsizhg8"))))
6727 (build-system python-build-system)
6728 (arguments '(#:tests? #f)) ; tests are not included
6729 (propagated-inputs
6730 `(("python-twisted" ,python-twisted)))
6731 (home-page "https://github.com/prometheus/client_python")
6732 (synopsis "Python client for the Prometheus monitoring system")
6733 (description
6734 "This package provides a Python client for the Prometheus monitoring
6735 system.")
6736 (license license:asl2.0)))
6737
6738 (define-public python2-prometheus-client
6739 (package-with-python2 python-prometheus-client))
6740
6741 (define-public python-notebook
6742 (package
6743 (name "python-notebook")
6744 (version "5.7.4")
6745 (source (origin
6746 (method url-fetch)
6747 (uri (pypi-uri "notebook" version))
6748 (sha256
6749 (base32
6750 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6751 (build-system python-build-system)
6752 (arguments
6753 `(#:phases
6754 (modify-phases %standard-phases
6755 (replace 'check
6756 (lambda _
6757 ;; These tests require a browser
6758 (delete-file-recursively "notebook/tests/selenium")
6759 ;; Some tests need HOME
6760 (setenv "HOME" "/tmp")
6761 ;; This file contains "warningfilters", which are not supported
6762 ;; by this version of nose.
6763 (delete-file "setup.cfg")
6764 (with-directory-excursion "/tmp"
6765 (invoke "nosetests" "-v"))
6766 #t)))))
6767 (propagated-inputs
6768 `(("python-jupyter-core" ,python-jupyter-core)
6769 ("python-nbformat" ,python-nbformat)
6770 ("python-nbconvert" ,python-nbconvert)
6771 ("python-prometheus-client" ,python-prometheus-client)
6772 ("python-send2trash" ,python-send2trash)
6773 ("python-terminado" ,python-terminado)))
6774 (native-inputs
6775 `(("python-nose" ,python-nose)
6776 ("python-sphinx" ,python-sphinx)
6777 ("python-requests" ,python-requests)))
6778 (home-page "http://jupyter.org/")
6779 (synopsis "Web-based notebook environment for interactive computing")
6780 (description
6781 "The Jupyter HTML notebook is a web-based notebook environment for
6782 interactive computing.")
6783 (properties `((python2-variant . ,(delay python2-notebook))))
6784 (license license:bsd-3)))
6785
6786 (define-public python2-notebook
6787 (let ((base (package-with-python2
6788 (strip-python2-variant python-notebook))))
6789 (package (inherit base)
6790 (native-inputs
6791 `(("python2-mock" ,python2-mock)
6792 ,@(package-native-inputs base)))
6793 (arguments
6794 (substitute-keyword-arguments (package-arguments base)
6795 ((#:phases phases)
6796 `(modify-phases ,phases
6797 (add-before 'check 'disable-test-case
6798 ;; The test requires network access to localhost. Curiously it
6799 ;; fails with Python 2 only. Simply make the test-case return
6800 ;; immediately.
6801 (lambda _
6802 (substitute*
6803 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6804 (("formats = self.nbconvert_api") "return #")))))))))))
6805
6806 (define-public python-widgetsnbextension
6807 (package
6808 (name "python-widgetsnbextension")
6809 (version "3.4.2")
6810 (source
6811 (origin
6812 (method url-fetch)
6813 (uri (pypi-uri "widgetsnbextension" version))
6814 (sha256
6815 (base32
6816 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
6817 (build-system python-build-system)
6818 (propagated-inputs
6819 `(("python-ipykernel" ,python-ipykernel)
6820 ("python-notebook" ,python-notebook)))
6821 (native-inputs
6822 `(("python-certifi" ,python-certifi)
6823 ("python-nose" ,python-nose)))
6824 (home-page "https://ipython.org")
6825 (synopsis "IPython HTML widgets for Jupyter")
6826 (description "This package provides interactive HTML widgets for Jupyter
6827 notebooks.")
6828 (license license:bsd-3)))
6829
6830 (define-public python2-widgetsnbextension
6831 (package-with-python2 python-widgetsnbextension))
6832
6833 (define-public python-ipywidgets
6834 (package
6835 (name "python-ipywidgets")
6836 (version "5.2.2")
6837 (source
6838 (origin
6839 (method url-fetch)
6840 (uri (pypi-uri "ipywidgets" version))
6841 (sha256
6842 (base32
6843 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6844 (build-system python-build-system)
6845 (propagated-inputs
6846 `(("python-ipython" ,python-ipython)
6847 ("python-traitlets" ,python-traitlets)
6848 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6849 (native-inputs
6850 `(("python-nose" ,python-nose)
6851 ("python-pytest" ,python-pytest)))
6852 (home-page "https://ipython.org")
6853 (synopsis "IPython HTML widgets for Jupyter")
6854 (description "Ipywidgets are interactive HTML widgets for Jupyter
6855 notebooks and the IPython kernel. Notebooks come alive when interactive
6856 widgets are used. Users gain control of their data and can visualize changes
6857 in the data.")
6858 (license license:bsd-3)))
6859
6860 (define-public python2-ipywidgets
6861 (package-with-python2 python-ipywidgets))
6862
6863 (define-public python-jupyter-console
6864 (package
6865 (name "python-jupyter-console")
6866 (version "5.2.0")
6867 (source
6868 (origin
6869 (method url-fetch)
6870 (uri (pypi-uri "jupyter_console" version))
6871 (sha256
6872 (base32
6873 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
6874 (build-system python-build-system)
6875 ;; Tests only run in an TTY.
6876 (arguments `(#:tests? #f))
6877 (propagated-inputs
6878 `(("python-ipykernel" ,python-ipykernel)
6879 ("python-jupyter-client" ,python-jupyter-client)
6880 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
6881 ("python-pygments" ,python-pygments)))
6882 (native-inputs
6883 `(("python-nose" ,python-nose)))
6884 (home-page "https://jupyter.org")
6885 (synopsis "Jupyter terminal console")
6886 (description "This package provides a terminal-based console frontend for
6887 Jupyter kernels. It also allows for console-based interaction with non-Python
6888 Jupyter kernels such as IJulia and IRKernel.")
6889 (license license:bsd-3)))
6890
6891 (define-public python2-jupyter-console
6892 (package-with-python2 python-jupyter-console))
6893
6894 ;; The python-ipython and python-jupyter-console require each other. To get
6895 ;; the functionality in both packages working, strip down the
6896 ;; python-jupyter-console package when using it as an input to python-ipython.
6897 (define python-jupyter-console-minimal
6898 (package
6899 (inherit python-jupyter-console)
6900 (name "python-jupyter-console-minimal")
6901 (arguments
6902 (substitute-keyword-arguments
6903 (package-arguments python-jupyter-console)
6904 ((#:phases phases)
6905 `(modify-phases ,phases
6906 (add-after 'install 'delete-bin
6907 (lambda* (#:key outputs #:allow-other-keys)
6908 ;; Delete the bin files, to avoid conflicts in profiles
6909 ;; where python-ipython and python-jupyter-console are
6910 ;; both present.
6911 (delete-file-recursively
6912 (string-append
6913 (assoc-ref outputs "out") "/bin"))))))))
6914 ;; Remove the python-ipython propagated input, to avoid the cycle
6915 (propagated-inputs
6916 (alist-delete
6917 "python-ipython"
6918 (package-propagated-inputs python-jupyter-console)))))
6919
6920 (define-public python-qtconsole
6921 (package
6922 (name "python-qtconsole")
6923 (version "4.4.3")
6924 (source
6925 (origin
6926 (method url-fetch)
6927 (uri (pypi-uri "qtconsole" version))
6928 (sha256
6929 (base32
6930 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
6931 (build-system python-build-system)
6932 (arguments
6933 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
6934 ;; but we only have the LTS version 5.x. This means that there might be
6935 ;; runtime errors, but since this is a dependency of the Jupyter package,
6936 ;; and Jupyter can be used without the qtconsole we can overlook this for
6937 ;; now.
6938 `(#:tests? #f
6939 #:phases
6940 (modify-phases %standard-phases
6941 (add-before 'check 'pre-check
6942 (lambda _
6943 (setenv "QT_QPA_PLATFORM" "offscreen")
6944 #t)))))
6945 (propagated-inputs
6946 `(("python-ipykernel" ,python-ipykernel)
6947 ("python-ipython" ,python-ipython)))
6948 (native-inputs
6949 `(("python-pytest" ,python-pytest)))
6950 (home-page "http://jupyter.org")
6951 (synopsis "Jupyter Qt console")
6952 (description "This package provides a Qt-based console for Jupyter with
6953 support for rich media output.")
6954 (license license:bsd-3)))
6955
6956 (define-public jupyter
6957 (package
6958 (name "jupyter")
6959 (version "1.0.0")
6960 (source
6961 (origin
6962 (method url-fetch)
6963 (uri (pypi-uri "jupyter" version))
6964 (sha256
6965 (base32
6966 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6967 (build-system python-build-system)
6968 (arguments '(#:tests? #f)) ; there are none.
6969 (propagated-inputs
6970 `(("python-ipykernel" ,python-ipykernel)
6971 ("python-ipywidgets" ,python-ipywidgets)
6972 ("python-jupyter-console" ,python-jupyter-console)
6973 ("python-nbconvert" ,python-nbconvert)
6974 ("python-notebook" ,python-notebook)
6975 ("python-qtconsole" ,python-qtconsole)))
6976 (native-search-paths
6977 (list (search-path-specification
6978 (variable "JUPYTER_PATH")
6979 (files '("share/jupyter")))))
6980 (home-page "https://jupyter.org")
6981 (synopsis "Web application for interactive documents")
6982 (description
6983 "The Jupyter Notebook is a web application that allows you to create and
6984 share documents that contain live code, equations, visualizations and
6985 explanatory text. Uses include: data cleaning and transformation, numerical
6986 simulation, statistical modeling, machine learning and much more.")
6987 (license license:bsd-3)))
6988
6989 (define-public python-chardet
6990 (package
6991 (name "python-chardet")
6992 (version "3.0.4")
6993 (source
6994 (origin
6995 (method url-fetch)
6996 (uri (pypi-uri "chardet" version))
6997 (sha256
6998 (base32
6999 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7000 (native-inputs
7001 `(("python-hypothesis" ,python-hypothesis)
7002 ("python-pytest" ,python-pytest)
7003 ("python-pytest-runner" ,python-pytest-runner)))
7004 (build-system python-build-system)
7005 (home-page "https://github.com/chardet/chardet")
7006 (synopsis "Universal encoding detector for Python 2 and 3")
7007 (description
7008 "This package provides @code{chardet}, a Python module that can
7009 automatically detect a wide range of file encodings.")
7010 (license license:lgpl2.1+)))
7011
7012 (define-public python2-chardet
7013 (package-with-python2 python-chardet))
7014
7015 (define-public python-docopt
7016 (package
7017 (name "python-docopt")
7018 (version "0.6.2")
7019 (source
7020 (origin
7021 (method url-fetch)
7022 ;; The release on PyPI does not include tests.
7023 (uri (string-append
7024 "https://github.com/docopt/docopt/archive/"
7025 version ".tar.gz"))
7026 (file-name (string-append name "-" version ".tar.gz"))
7027 (sha256
7028 (base32
7029 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7030 (build-system python-build-system)
7031 (native-inputs
7032 `(("python-pytest" ,python-pytest)))
7033 (arguments
7034 `(#:phases
7035 (modify-phases %standard-phases
7036 (replace 'check
7037 (lambda _ (invoke "py.test"))))))
7038 (home-page "http://docopt.org")
7039 (synopsis "Command-line interface description language for Python")
7040 (description "This library allows the user to define a command-line
7041 interface from a program's help message rather than specifying it
7042 programatically with command-line parsers like @code{getopt} and
7043 @code{argparse}.")
7044 (license license:expat)))
7045
7046 (define-public python2-docopt
7047 (package-with-python2 python-docopt))
7048
7049 (define-public python-pythondialog
7050 (package
7051 (name "python-pythondialog")
7052 (version "3.4.0")
7053 (source
7054 (origin
7055 (method url-fetch)
7056 (uri (pypi-uri "pythondialog" version))
7057 (sha256
7058 (base32
7059 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7060 (build-system python-build-system)
7061 (arguments
7062 `(#:phases
7063 (modify-phases %standard-phases
7064 (add-after 'unpack 'patch-path
7065 (lambda* (#:key inputs #:allow-other-keys)
7066 (let* ((dialog (assoc-ref inputs "dialog")))
7067 ;; Since this library really wants to grovel the search path, we
7068 ;; must hardcode dialog's store path into it.
7069 (substitute* "dialog.py"
7070 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7071 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7072 #t))))
7073 #:tests? #f)) ; no test suite
7074 (propagated-inputs
7075 `(("dialog" ,dialog)))
7076 (home-page "http://pythondialog.sourceforge.net/")
7077 (synopsis "Python interface to the UNIX dialog utility")
7078 (description "A Python wrapper for the dialog utility. Its purpose is to
7079 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7080 This allows one to make simple text-mode user interfaces on Unix-like systems")
7081 (license license:lgpl2.1)
7082 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7083
7084 (define-public python2-pythondialog
7085 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7086 (package
7087 (inherit base)
7088 (version (package-version python-pythondialog))
7089 (source (origin
7090 (method url-fetch)
7091 (uri (pypi-uri "python2-pythondialog" version))
7092 (sha256
7093 (base32
7094 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7095
7096 (define-public python-configobj
7097 (package
7098 (name "python-configobj")
7099 (version "5.0.6")
7100 (source (origin
7101 (method url-fetch)
7102 (uri (string-append
7103 "https://pypi.python.org/packages/source/c/configobj/"
7104 "configobj-" version ".tar.gz"))
7105 (sha256
7106 (base32
7107 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7108 ;; Patch setup.py so it looks for python-setuptools, which is
7109 ;; required to parse the keyword 'install_requires' in setup.py.
7110 (patches (search-patches "python-configobj-setuptools.patch"))))
7111 (build-system python-build-system)
7112 (propagated-inputs
7113 `(("python-six" ,python-six)))
7114 (synopsis "Config file reading, writing and validation")
7115 (description "ConfigObj is a simple but powerful config file reader and
7116 writer: an ini file round tripper. Its main feature is that it is very easy to
7117 use, with a straightforward programmer’s interface and a simple syntax for
7118 config files.")
7119 (home-page "https://github.com/DiffSK/configobj")
7120 (license license:bsd-3)))
7121
7122 (define-public python2-configobj
7123 (package-with-python2 python-configobj))
7124
7125 (define-public python-configargparse
7126 (package
7127 (name "python-configargparse")
7128 (version "0.12.0")
7129 (source (origin
7130 (method url-fetch)
7131 (uri (pypi-uri "ConfigArgParse" version))
7132 (sha256
7133 (base32
7134 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7135 (build-system python-build-system)
7136 (native-inputs
7137 `(("python-pyyaml" ,python-pyyaml)))
7138 (arguments
7139 `(#:phases
7140 (modify-phases %standard-phases
7141 (replace 'check
7142 (lambda _
7143 ;; Bypass setuptools-shim because one test relies on "setup.py"
7144 ;; being the first argument passed to the python call.
7145 ;;
7146 ;; NOTE: Many tests do not run because they rely on Python's
7147 ;; built-in test.test_argparse, but we remove the unit tests from
7148 ;; our Python installation.
7149 (invoke "python" "setup.py" "test"))))))
7150 (synopsis "Replacement for argparse")
7151 (description "A drop-in replacement for argparse that allows options to also
7152 be set via config files and/or environment variables.")
7153 (home-page "https://github.com/bw2/ConfigArgParse")
7154 (license license:expat)))
7155
7156 (define-public python2-configargparse
7157 (package-with-python2 python-configargparse))
7158
7159 (define-public python-argparse-manpage
7160 (package
7161 (name "python-argparse-manpage")
7162 (version "1.1")
7163 (source
7164 (origin
7165 (method url-fetch)
7166 (uri (pypi-uri "argparse-manpage" version))
7167 (sha256
7168 (base32
7169 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7170 (build-system python-build-system)
7171 (home-page "https://github.com/praiskup/argparse-manpage")
7172 (synopsis "Build manual page from Python's ArgumentParser object")
7173 (description
7174 "This package provides tools to build manual pages from Python's
7175 @code{ArgumentParser} object.")
7176 (license license:asl2.0)))
7177
7178 (define-public python2-contextlib2
7179 (package
7180 (name "python2-contextlib2")
7181 (version "0.5.5")
7182 (source
7183 (origin
7184 (method url-fetch)
7185 (uri (pypi-uri "contextlib2" version))
7186 (sha256
7187 (base32
7188 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7189 (build-system python-build-system)
7190 (arguments
7191 `(#:python ,python-2
7192 #:phases
7193 (modify-phases %standard-phases
7194 (replace 'check
7195 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7196 (native-inputs
7197 `(("python2-unittest2" ,python2-unittest2)))
7198 (home-page "http://contextlib2.readthedocs.org/")
7199 (synopsis "Tools for decorators and context managers")
7200 (description "This module is primarily a backport of the Python
7201 3.2 contextlib to earlier Python versions. Like contextlib, it
7202 provides utilities for common tasks involving decorators and context
7203 managers. It also contains additional features that are not part of
7204 the standard library.")
7205 (license license:psfl)))
7206
7207 (define-public python-texttable
7208 (package
7209 (name "python-texttable")
7210 (version "0.8.7")
7211 (source
7212 (origin
7213 (method url-fetch)
7214 (uri (pypi-uri "texttable" version))
7215 (sha256
7216 (base32
7217 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7218 (build-system python-build-system)
7219 (arguments '(#:tests? #f)) ; no tests
7220 (home-page "https://github.com/foutaise/texttable/")
7221 (synopsis "Python module for creating simple ASCII tables")
7222 (description "Texttable is a Python module for creating simple ASCII
7223 tables.")
7224 (license license:lgpl2.1+)))
7225
7226 (define-public python2-texttable
7227 (package-with-python2 python-texttable))
7228
7229 (define-public python-atomicwrites
7230 (package
7231 (name "python-atomicwrites")
7232 (version "1.1.5")
7233 (source (origin
7234 (method url-fetch)
7235 (uri (pypi-uri "atomicwrites" version))
7236 (sha256
7237 (base32
7238 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7239 (build-system python-build-system)
7240 (synopsis "Atomic file writes in Python")
7241 (description "Library for atomic file writes using platform dependent tools
7242 for atomic file system operations.")
7243 (home-page "https://github.com/untitaker/python-atomicwrites")
7244 (license license:expat)))
7245
7246 (define-public python2-atomicwrites
7247 (package-with-python2 python-atomicwrites))
7248
7249 (define-public python-click-threading
7250 (package
7251 (name "python-click-threading")
7252 (version "0.4.4")
7253 (source (origin
7254 (method url-fetch)
7255 (uri (pypi-uri "click-threading" version))
7256 (sha256
7257 (base32
7258 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7259 (build-system python-build-system)
7260 (propagated-inputs
7261 `(("python-click" ,python-click)))
7262 (synopsis "Utilities for multithreading in Click")
7263 (description "This package provides utilities for multithreading in Click
7264 applications.")
7265 (home-page "https://github.com/click-contrib/click-threading")
7266 (license license:expat)))
7267
7268 (define-public python-click-log
7269 (package
7270 (name "python-click-log")
7271 (version "0.3.2")
7272 (source (origin
7273 (method url-fetch)
7274 (uri (pypi-uri "click-log" version))
7275 (sha256
7276 (base32
7277 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7278 (build-system python-build-system)
7279 (propagated-inputs
7280 `(("python-click" ,python-click)))
7281 (synopsis "Logging for click applications")
7282 (description "This package provides a Python library for logging Click
7283 applications.")
7284 (home-page "https://github.com/click-contrib/click-log")
7285 (license license:expat)))
7286
7287 (define-public python-apipkg
7288 (package
7289 (name "python-apipkg")
7290 (version "1.4")
7291 (source (origin
7292 (method url-fetch)
7293 (uri (pypi-uri "apipkg" version))
7294 (sha256
7295 (base32
7296 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7297 (build-system python-build-system)
7298 (native-inputs
7299 `(("python-pytest" ,python-pytest)))
7300 (synopsis "Namespace control and lazy-import mechanism")
7301 (description "With apipkg you can control the exported namespace of a Python
7302 package and greatly reduce the number of imports for your users. It is a small
7303 pure Python module that works on virtually all Python versions.")
7304 (home-page "https://github.com/pytest-dev/apipkg")
7305 (license license:expat)))
7306
7307 (define-public python2-apipkg
7308 (package-with-python2 python-apipkg))
7309
7310 (define-public python-execnet
7311 (package
7312 (name "python-execnet")
7313 (version "1.4.1")
7314 (source (origin
7315 (method url-fetch)
7316 (uri (pypi-uri "execnet" version))
7317 (sha256
7318 (base32
7319 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7320 (build-system python-build-system)
7321 (arguments
7322 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7323 ;; The two test failures are caused by the lack of an `ssh` executable.
7324 ;; The test suite can be run with pytest after the 'install' phase.
7325 #:tests? #f))
7326 (native-inputs
7327 `(("python-pytest" ,python-pytest)
7328 ("python-setuptools-scm" ,python-setuptools-scm)))
7329 (propagated-inputs
7330 `(("python-apipkg" ,python-apipkg)))
7331 (synopsis "Rapid multi-Python deployment")
7332 (description "Execnet provides a share-nothing model with
7333 channel-send/receive communication for distributing execution across many
7334 Python interpreters across version, platform and network barriers. It has a
7335 minimal and fast API targeting the following uses:
7336 @enumerate
7337 @item distribute tasks to (many) local or remote CPUs
7338 @item write and deploy hybrid multi-process applications
7339 @item write scripts to administer multiple environments
7340 @end enumerate")
7341 (home-page "http://codespeak.net/execnet/")
7342 (license license:expat)))
7343
7344 (define-public python2-execnet
7345 (package-with-python2 python-execnet))
7346
7347 (define-public python-icalendar
7348 (package
7349 (name "python-icalendar")
7350 (version "4.0.3")
7351 (source (origin
7352 (method url-fetch)
7353 (uri (pypi-uri "icalendar" version))
7354 (sha256
7355 (base32
7356 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7357 (build-system python-build-system)
7358 (propagated-inputs
7359 `(("python-dateutil" ,python-dateutil)
7360 ("python-pytz" ,python-pytz)))
7361 (synopsis "Python library for parsing iCalendar files")
7362 (description "The icalendar package is a parser/generator of iCalendar
7363 files for use with Python.")
7364 (home-page "https://github.com/collective/icalendar")
7365 (license license:bsd-2)))
7366
7367 (define-public python-sphinxcontrib-newsfeed
7368 (package
7369 (name "python-sphinxcontrib-newsfeed")
7370 (version "0.1.4")
7371 (source (origin
7372 (method url-fetch)
7373 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7374 (sha256
7375 (base32
7376 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7377 (arguments '(#:tests? #f)) ; No tests.
7378 (build-system python-build-system)
7379 (propagated-inputs
7380 `(("python-sphinx" ,python-sphinx)))
7381 (synopsis "News Feed extension for Sphinx")
7382 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7383 Blog, News or Announcements section to a Sphinx website.")
7384 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7385 (license license:bsd-2)))
7386
7387 (define-public python-args
7388 (package
7389 (name "python-args")
7390 (version "0.1.0")
7391 (source (origin
7392 (method url-fetch)
7393 (uri (pypi-uri "args" version))
7394 (sha256
7395 (base32
7396 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7397 (build-system python-build-system)
7398 (home-page "https://github.com/kennethreitz/args")
7399 (synopsis "Command-line argument parser")
7400 (description
7401 "This library provides a Python module to parse command-line arguments.")
7402 (license license:bsd-3)))
7403
7404 (define-public python2-args
7405 (package-with-python2 python-args))
7406
7407 (define-public python-clint
7408 (package
7409 (name "python-clint")
7410 (version "0.5.1")
7411 (source (origin
7412 (method url-fetch)
7413 (uri (pypi-uri "clint" version))
7414 (sha256
7415 (base32
7416 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7417 (build-system python-build-system)
7418 (arguments
7419 '(#:phases
7420 (modify-phases %standard-phases
7421 (replace 'check
7422 (lambda _ (invoke "py.test" "-v"))))))
7423 (native-inputs
7424 `(("python-pytest" ,python-pytest)))
7425 (propagated-inputs
7426 `(("python-args" ,python-args)))
7427 (home-page "https://github.com/kennethreitz/clint")
7428 (synopsis "Command-line interface tools")
7429 (description
7430 "Clint is a Python module filled with a set of tools for developing
7431 command-line applications, including tools for colored and indented
7432 output, progress bar display, and pipes.")
7433 (license license:isc)))
7434
7435 (define-public python2-clint
7436 (package-with-python2 python-clint))
7437
7438 (define-public python-astor
7439 (package
7440 (name "python-astor")
7441 (version "0.5")
7442 (source (origin
7443 (method url-fetch)
7444 (uri (pypi-uri "astor" version))
7445 (sha256
7446 (base32
7447 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7448 (build-system python-build-system)
7449 (home-page "https://github.com/berkerpeksag/astor")
7450 (synopsis "Read and write Python ASTs")
7451 (description
7452 "Astor is designed to allow easy manipulation of Python source via the
7453 Abstract Syntax Tree.")
7454 (license license:bsd-3)))
7455
7456 (define-public python2-astor
7457 (package-with-python2 python-astor))
7458
7459 (define-public python-rply
7460 (package
7461 (name "python-rply")
7462 (version "0.7.5")
7463 (source (origin
7464 (method url-fetch)
7465 (uri (pypi-uri "rply" version))
7466 (sha256
7467 (base32
7468 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7469 (build-system python-build-system)
7470 (propagated-inputs
7471 `(("python-appdirs" ,python-appdirs)))
7472 (home-page "https://github.com/alex/rply")
7473 (synopsis "Parser generator for Python")
7474 (description
7475 "This package provides a pure Python based parser generator, that also
7476 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7477 with a new public API, and RPython support.")
7478 (license license:bsd-3)))
7479
7480 (define-public python2-rply
7481 (package-with-python2 python-rply))
7482
7483 (define-public python-hy
7484 (package
7485 (name "python-hy")
7486 (version "0.13.0")
7487 (source (origin
7488 (method url-fetch)
7489 (uri (pypi-uri "hy" version))
7490 (sha256
7491 (base32
7492 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7493 (build-system python-build-system)
7494 (arguments
7495 '(#:phases
7496 (modify-phases %standard-phases
7497 (replace 'check
7498 (lambda _
7499 ;; Tests require write access to HOME.
7500 (setenv "HOME" "/tmp")
7501 (invoke "nosetests"))))))
7502 (native-inputs
7503 `(("python-coverage" ,python-coverage)
7504 ("python-nose" ,python-nose)))
7505 (propagated-inputs
7506 `(("python-astor" ,python-astor)
7507 ("python-clint" ,python-clint)
7508 ("python-rply" ,python-rply)))
7509 (home-page "http://hylang.org/")
7510 (synopsis "Lisp frontend to Python")
7511 (description
7512 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7513 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7514 Python at your fingertips, in Lisp form.")
7515 (license license:expat)))
7516
7517 (define-public python2-hy
7518 (package-with-python2 python-hy))
7519
7520 (define-public python2-functools32
7521 (package
7522 (name "python2-functools32")
7523 (version "3.2.3-2")
7524 (source
7525 (origin
7526 (method url-fetch)
7527 (uri (pypi-uri "functools32" version))
7528 (sha256
7529 (base32
7530 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7531 (build-system python-build-system)
7532 (arguments
7533 `(#:python ,python-2
7534 #:tests? #f)) ; no test target
7535 (home-page "https://github.com/MiCHiLU/python-functools32")
7536 (synopsis
7537 "Backport of the functools module from Python 3.2.3")
7538 (description
7539 "This package is a backport of the @code{functools} module from Python
7540 3.2.3 for use with older versions of Python and PyPy.")
7541 (license license:expat)))
7542
7543 (define-public python2-subprocess32
7544 (package
7545 (name "python2-subprocess32")
7546 (version "3.2.7")
7547 (source (origin
7548 (method url-fetch)
7549 (uri (pypi-uri "subprocess32" version))
7550 (sha256
7551 (base32
7552 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7553 (patches
7554 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7555 (build-system python-build-system)
7556 (arguments
7557 `(#:python ,python-2
7558 ;; The test suite fails with Python > 2.7.13:
7559 ;; import test.support
7560 ;; ImportError: No module named support
7561 #:tests? #f
7562 #:phases
7563 (modify-phases %standard-phases
7564 (add-after 'unpack 'patch-/bin/sh
7565 (lambda _
7566 (substitute* '("subprocess32.py"
7567 "test_subprocess32.py")
7568 (("/bin/sh") (which "sh")))
7569 #t)))))
7570 (home-page "https://github.com/google/python-subprocess32")
7571 (synopsis "Backport of the subprocess module from Python 3.2")
7572 (description
7573 "This is a backport of the @code{subprocess} standard library module
7574 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7575 new features. On POSIX systems it is guaranteed to be reliable when used
7576 in threaded applications. It includes timeout support from Python 3.3 but
7577 otherwise matches 3.2’s API.")
7578 (license license:psfl)))
7579
7580 (define-public python2-futures
7581 (package
7582 (name "python2-futures")
7583 (version "3.2.0")
7584 (source
7585 (origin
7586 (method url-fetch)
7587 (uri (pypi-uri "futures" version))
7588 (sha256
7589 (base32
7590 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7591 (build-system python-build-system)
7592 (arguments `(#:python ,python-2
7593 ;; FIXME: Python 2.7.14 moved the test.support library,
7594 ;; but our package has not yet been adjusted. Enable
7595 ;; tests when the python2 package has been fixed.
7596 #:tests? #f))
7597 (home-page "https://github.com/agronholm/pythonfutures")
7598 (synopsis
7599 "Backport of the concurrent.futures package from Python 3.2")
7600 (description
7601 "The concurrent.futures module provides a high-level interface for
7602 asynchronously executing callables. This package backports the
7603 concurrent.futures package from Python 3.2")
7604 (license license:bsd-3)))
7605
7606 (define-public python-promise
7607 (package
7608 (name "python-promise")
7609 (version "0.4.2")
7610 (source
7611 (origin
7612 (method url-fetch)
7613 (uri (pypi-uri "promise" version))
7614 (sha256
7615 (base32
7616 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7617 (build-system python-build-system)
7618 ;; Tests wants python-futures, which is a python2 only program, and
7619 ;; can't be found by python-promise at test time.
7620 (arguments `(#:tests? #f))
7621 (home-page "https://github.com/syrusakbary/promise")
7622 (synopsis "Promises/A+ implementation for Python")
7623 (description
7624 "Promises/A+ implementation for Python")
7625 (properties `((python2-variant . ,(delay python2-promise))))
7626 (license license:expat)))
7627
7628 (define-public python2-promise
7629 (let ((promise (package-with-python2
7630 (strip-python2-variant python-promise))))
7631 (package (inherit promise)
7632 (arguments (substitute-keyword-arguments (package-arguments promise)
7633 ((#:tests? _) #t)))
7634 (native-inputs
7635 `(("python2-futures" ,python2-futures)
7636 ("python2-pytest" ,python2-pytest)
7637 ,@(package-native-inputs promise))))))
7638
7639 (define-public python-colorama
7640 (package
7641 (name "python-colorama")
7642 (version "0.3.9")
7643 (source
7644 (origin
7645 (method url-fetch)
7646 (uri (pypi-uri "colorama" version))
7647 (sha256
7648 (base32
7649 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7650 (build-system python-build-system)
7651 (synopsis "Colored terminal text rendering for Python")
7652 (description "Colorama is a Python library for rendering colored terminal
7653 text.")
7654 (home-page "https://pypi.python.org/pypi/colorama")
7655 (license license:bsd-3)))
7656
7657 (define-public python2-colorama
7658 (package-with-python2 python-colorama))
7659
7660 (define-public python-rsa
7661 (package
7662 (name "python-rsa")
7663 (version "3.4.2")
7664 (source
7665 (origin
7666 (method url-fetch)
7667 (uri (pypi-uri "rsa" version))
7668 (sha256
7669 (base32
7670 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7671 (build-system python-build-system)
7672 (propagated-inputs
7673 `(("python-pyasn1" ,python-pyasn1)))
7674 (synopsis "Pure-Python RSA implementation")
7675 (description "Python-RSA is a pure-Python RSA implementation. It supports
7676 encryption and decryption, signing and verifying signatures, and key
7677 generation according to PKCS#1 version 1.5. It can be used as a Python
7678 library as well as on the command line.")
7679 (home-page "https://stuvel.eu/rsa")
7680 (license license:asl2.0)))
7681
7682 (define-public python2-rsa
7683 (package-with-python2 python-rsa))
7684
7685 (define-public python-pluggy
7686 (package
7687 (name "python-pluggy")
7688 (version "0.7.1")
7689 (source
7690 (origin
7691 (method url-fetch)
7692 (uri (pypi-uri "pluggy" version))
7693 (sha256
7694 (base32
7695 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7696 (build-system python-build-system)
7697 (native-inputs
7698 `(("python-setuptools-scm" ,python-setuptools-scm)))
7699 (synopsis "Plugin and hook calling mechanism for Python")
7700 (description "Pluggy is an extraction of the plugin manager as used by
7701 Pytest but stripped of Pytest specific details.")
7702 (home-page "https://pypi.python.org/pypi/pluggy")
7703 (license license:expat)))
7704
7705 (define-public python2-pluggy
7706 (package-with-python2 python-pluggy))
7707
7708 (define-public python-tox
7709 (package
7710 (name "python-tox")
7711 (version "2.8.1")
7712 (source
7713 (origin
7714 (method url-fetch)
7715 (uri (pypi-uri "tox" version))
7716 (sha256
7717 (base32
7718 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7719 (build-system python-build-system)
7720 (arguments
7721 ;; FIXME: Tests require pytest-timeout, which itself requires
7722 ;; pytest>=2.8.0 for installation.
7723 '(#:tests? #f))
7724 (propagated-inputs
7725 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7726 ("python-py" ,python-py)
7727 ("python-virtualenv" ,python-virtualenv)))
7728 (native-inputs
7729 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7730 ("python-pytest" ,python-pytest) ; >= 2.3.5
7731 ("python-setuptools-scm" ,python-setuptools-scm)))
7732 (home-page "http://tox.testrun.org/")
7733 (synopsis "Virtualenv-based automation of test activities")
7734 (description "Tox is a generic virtualenv management and test command line
7735 tool. It can be used to check that a package installs correctly with
7736 different Python versions and interpreters, or run tests in each type of
7737 supported environment, or act as a frontend to continuous integration
7738 servers.")
7739 (license license:expat)))
7740
7741 (define-public python2-tox
7742 (package-with-python2 python-tox))
7743
7744 (define-public python-jmespath
7745 (package
7746 (name "python-jmespath")
7747 (version "0.9.3")
7748 (source
7749 (origin
7750 (method url-fetch)
7751 (uri (pypi-uri "jmespath" version))
7752 (sha256
7753 (base32
7754 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7755 (build-system python-build-system)
7756 (native-inputs
7757 `(("python-nose" ,python-nose)))
7758 (synopsis "JSON Matching Expressions")
7759 (description "JMESPath (pronounced “james path”) is a Python library that
7760 allows one to declaratively specify how to extract elements from a JSON
7761 document.")
7762 (home-page "https://github.com/jmespath/jmespath.py")
7763 (license license:expat)))
7764
7765 (define-public python2-jmespath
7766 (package-with-python2 python-jmespath))
7767
7768 (define-public python-botocore
7769 (package
7770 (name "python-botocore")
7771 (version "1.8.43")
7772 (source
7773 (origin
7774 (method url-fetch)
7775 (uri (pypi-uri "botocore" version))
7776 (sha256
7777 (base32
7778 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7779 (build-system python-build-system)
7780 (arguments
7781 ;; FIXME: Many tests are failing.
7782 '(#:tests? #f))
7783 (propagated-inputs
7784 `(("python-dateutil" ,python-dateutil)
7785 ("python-docutils" ,python-docutils)
7786 ("python-jmespath" ,python-jmespath)))
7787 (native-inputs
7788 `(("python-mock" ,python-mock)
7789 ("python-nose" ,python-nose)
7790 ("behave" ,behave)
7791 ("python-tox" ,python-tox)
7792 ("python-wheel" ,python-wheel)))
7793 (home-page "https://github.com/boto/botocore")
7794 (synopsis "Low-level interface to AWS")
7795 (description "Botocore is a Python library that provides a low-level
7796 interface to the Amazon Web Services (AWS) API.")
7797 (license license:asl2.0)))
7798
7799 (define-public python2-botocore
7800 (package-with-python2 python-botocore))
7801
7802 (define-public python-xdo
7803 (package
7804 (name "python-xdo")
7805 (version "0.3")
7806 (source (origin
7807 (method url-fetch)
7808 (uri (string-append
7809 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7810 "python-xdo_" version ".orig.tar.gz"))
7811 (sha256
7812 (base32
7813 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7814 (build-system python-build-system)
7815 (arguments
7816 '(#:phases
7817 (modify-phases %standard-phases
7818 (add-before 'install 'patch-libxdo-path
7819 ;; Hardcode the path of dynamically loaded libxdo library.
7820 (lambda* (#:key inputs #:allow-other-keys)
7821 (let ((libxdo (string-append
7822 (assoc-ref inputs "xdotool")
7823 "/lib/libxdo.so")))
7824 (substitute* "xdo/_xdo.py"
7825 (("find_library\\(\"xdo\"\\)")
7826 (simple-format #f "\"~a\"" libxdo)))
7827 #t))))
7828 #:tests? #f)) ; no tests provided
7829 (propagated-inputs
7830 `(("python-six" ,python-six)))
7831 (inputs
7832 `(("xdotool" ,xdotool)
7833 ("libX11" ,libx11)))
7834 (home-page "https://tracker.debian.org/pkg/python-xdo")
7835 (synopsis "Python library for simulating X11 keyboard/mouse input")
7836 (description "Provides bindings to libxdo for manipulating X11 via simulated
7837 input. (Note that this is mostly a legacy library; you may wish to look at
7838 python-xdo for newer bindings.)")
7839 (license license:bsd-3)))
7840
7841 (define-public python2-xdo
7842 (package-with-python2 python-xdo))
7843
7844 (define-public python-mako
7845 (package
7846 (name "python-mako")
7847 (version "1.0.7")
7848 (source
7849 (origin
7850 (method url-fetch)
7851 (uri (pypi-uri "Mako" version))
7852 (sha256
7853 (base32
7854 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
7855 (build-system python-build-system)
7856 (propagated-inputs
7857 `(("python-markupsafe" ,python-markupsafe)))
7858 (native-inputs
7859 `(("python-mock" ,python-mock)
7860 ("python-nose" ,python-nose)
7861 ("python-pytest" ,python-pytest)))
7862 (home-page "http://www.makotemplates.org/")
7863 (synopsis "Templating language for Python")
7864 (description "Mako is a templating language for Python that compiles
7865 templates into Python modules.")
7866 (license license:expat)))
7867
7868 (define-public python2-mako
7869 (package-with-python2 python-mako))
7870
7871 (define-public python-waitress
7872 (package
7873 (name "python-waitress")
7874 (version "1.1.0")
7875 (source
7876 (origin
7877 (method url-fetch)
7878 (uri (pypi-uri "waitress" version))
7879 (patches (search-patches "python-waitress-fix-tests.patch"))
7880 (sha256
7881 (base32
7882 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7883 (build-system python-build-system)
7884 (home-page "https://github.com/Pylons/waitress")
7885 (synopsis "Waitress WSGI server")
7886 (description "Waitress is meant to be a production-quality pure-Python WSGI
7887 server with very acceptable performance.")
7888 (license license:zpl2.1)))
7889
7890 (define-public python2-waitress
7891 (package-with-python2 python-waitress))
7892
7893 (define-public python-pyquery
7894 (package
7895 (name "python-pyquery")
7896 (version "1.2.17")
7897 (source
7898 (origin
7899 (method url-fetch)
7900 (uri (pypi-uri "pyquery" version))
7901 (sha256
7902 (base32
7903 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7904 (build-system python-build-system)
7905 (native-inputs
7906 `(("python-webob" ,python-webob)
7907 ("python-webtest" ,python-webtest)))
7908 (propagated-inputs
7909 `(("python-lxml" ,python-lxml)
7910 ("python-cssselect" ,python-cssselect)))
7911 (home-page "https://github.com/gawel/pyquery")
7912 (synopsis "Make jQuery-like queries on xml documents")
7913 (description "pyquery allows you to make jQuery queries on xml documents.
7914 The API is as much as possible the similar to jQuery. pyquery uses lxml for
7915 fast xml and html manipulation.")
7916 (license license:bsd-3)))
7917
7918 (define-public python2-pyquery
7919 (package-with-python2 python-pyquery))
7920
7921 (define-public python-anyjson
7922 (package
7923 (name "python-anyjson")
7924 (version "0.3.3")
7925 (source
7926 (origin
7927 (method url-fetch)
7928 (uri (pypi-uri "anyjson" version))
7929 (sha256
7930 (base32
7931 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7932 (build-system python-build-system)
7933 (arguments
7934 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7935 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7936 ;; whatever) so this transformation needs to be done before the tests
7937 ;; can be run. Maybe we could add a build step to transform beforehand
7938 ;; but it could be annoying/difficult.
7939 ;; We can enable tests for the Python 2 version, though, and do below.
7940 #:tests? #f))
7941 (home-page "https://bitbucket.org/runeh/anyjson/")
7942 (synopsis
7943 "Wraps best available JSON implementation in a common interface")
7944 (description
7945 "Anyjson loads whichever is the fastest JSON module installed
7946 and provides a uniform API regardless of which JSON implementation is used.")
7947 (license license:bsd-3)
7948 (properties `((python2-variant . ,(delay python2-anyjson))))))
7949
7950 (define-public python2-anyjson
7951 (let ((anyjson (package-with-python2
7952 (strip-python2-variant python-anyjson))))
7953 (package
7954 (inherit anyjson)
7955 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7956 #:tests? #t
7957 ,@(package-arguments anyjson)))
7958 (native-inputs `(("python2-nose" ,python2-nose))))))
7959
7960 (define-public python-amqp
7961 (package
7962 (name "python-amqp")
7963 (version "2.3.2")
7964 (source
7965 (origin
7966 (method url-fetch)
7967 (uri (pypi-uri "amqp" version))
7968 (sha256
7969 (base32
7970 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
7971 (build-system python-build-system)
7972 (native-inputs
7973 `(("python-case" ,python-case)
7974 ("python-pytest-sugar" ,python-pytest-sugar)
7975 ("python-mock" ,python-mock)))
7976 (propagated-inputs
7977 `(("python-vine" ,python-vine)))
7978 (home-page "https://github.com/celery/py-amqp")
7979 (synopsis
7980 "Low-level AMQP client for Python (fork of amqplib)")
7981 (description
7982 "This is a fork of amqplib which was originally written by Barry Pederson.
7983 It is maintained by the Celery project, and used by kombu as a pure python
7984 alternative when librabbitmq is not available.")
7985 (license license:lgpl2.1+)
7986 (properties `((python2-variant . ,(delay python2-amqp))))))
7987
7988 (define-public python2-amqp
7989 (let ((amqp (package-with-python2
7990 (strip-python2-variant python-amqp))))
7991 (package
7992 (inherit amqp)
7993 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
7994 ;; unmaintained. Weirdly, does not do this on the python 3
7995 ;; version?
7996 #:tests? #f
7997 ,@(package-arguments amqp))))))
7998
7999 (define-public python-txamqp
8000 (package
8001 (name "python-txamqp")
8002 (version "0.8.2")
8003 (source
8004 (origin
8005 (method url-fetch)
8006 (uri (pypi-uri "txAMQP" version))
8007 (sha256
8008 (base32
8009 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8010 (build-system python-build-system)
8011 (propagated-inputs
8012 `(("python-six" ,python-six)
8013 ("python-twisted" ,python-twisted)))
8014 (home-page "https://github.com/txamqp/txamqp")
8015 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8016 (description
8017 "This package provides a Python library for communicating with AMQP peers
8018 and brokers using the asynchronous networking framework Twisted. It contains
8019 all the necessary code to connect, send and receive messages to/from an
8020 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8021 also includes support for using Thrift RPC over AMQP in Twisted
8022 applications.")
8023 (license license:asl2.0)))
8024
8025 (define-public python2-txamqp
8026 (package-with-python2 python-txamqp))
8027
8028 (define-public python-kombu
8029 (package
8030 (name "python-kombu")
8031 (version "4.2.2")
8032 (source
8033 (origin
8034 (method url-fetch)
8035 (uri (pypi-uri "kombu" version))
8036 (sha256
8037 (base32
8038 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8039 (build-system python-build-system)
8040 (native-inputs
8041 `(("python-mock" ,python-mock)
8042 ("python-case" ,python-case)
8043 ("python-pyro4" ,python-pyro4)
8044 ("python-pytest-sugar" ,python-pytest-sugar)
8045 ("python-pytz" ,python-pytz)))
8046 (propagated-inputs
8047 `(("python-anyjson" ,python-anyjson)
8048 ("python-amqp" ,python-amqp)
8049 ("python-redis" ,python-redis)))
8050 (home-page "https://kombu.readthedocs.io")
8051 (synopsis "Message passing library for Python")
8052 (description "The aim of Kombu is to make messaging in Python as easy as
8053 possible by providing an idiomatic high-level interface for the AMQ protocol,
8054 and also provide proven and tested solutions to common messaging problems.
8055 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8056 message orientation, queuing, routing, reliability and security, for which the
8057 RabbitMQ messaging server is the most popular implementation.")
8058 (license license:bsd-3)
8059 (properties `((python2-variant . ,(delay python2-kombu))))))
8060
8061 (define-public python2-kombu
8062 (let ((kombu (package-with-python2
8063 (strip-python2-variant python-kombu))))
8064 (package
8065 (inherit kombu)
8066 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8067 ;; It works fine on the python3 variant.
8068 #:tests? #f
8069 ,@(package-arguments kombu)))
8070 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8071 ,@(package-native-inputs kombu))))))
8072
8073 (define-public python-billiard
8074 (package
8075 (name "python-billiard")
8076 (version "3.5.0.5")
8077 (source
8078 (origin
8079 (method url-fetch)
8080 (uri (pypi-uri "billiard" version))
8081 (sha256
8082 (base32
8083 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8084 (build-system python-build-system)
8085 (native-inputs
8086 `(("python-case" ,python-case)
8087 ("python-pytest" ,python-pytest)))
8088 (home-page "https://github.com/celery/billiard")
8089 (synopsis
8090 "Python multiprocessing fork with improvements and bugfixes")
8091 (description
8092 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8093 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8094 pyprocessing package. This standalone variant is intended to be compatible with
8095 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8096 (license license:bsd-3)
8097 (properties `((python2-variant . ,(delay python2-billiard))))))
8098
8099 (define-public python2-billiard
8100 (let ((billiard (package-with-python2
8101 (strip-python2-variant python-billiard))))
8102 (package
8103 (inherit billiard)
8104 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8105 ("python2-mock" ,python2-mock)
8106 ,@(package-native-inputs billiard))))))
8107
8108 (define-public python-celery
8109 (package
8110 (name "python-celery")
8111 (version "4.2.1")
8112 (source
8113 (origin
8114 (method url-fetch)
8115 (uri (pypi-uri "celery" version))
8116 (sha256
8117 (base32
8118 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8119 (build-system python-build-system)
8120 (arguments
8121 '(;; TODO The tests fail with Python 3.7
8122 ;; https://github.com/celery/celery/issues/4849
8123 #:tests? #f
8124 #:phases
8125 (modify-phases %standard-phases
8126 (add-after 'unpack 'patch-requirements
8127 (lambda _
8128 (substitute* "requirements/test.txt"
8129 (("pytest>=3\\.0,<3\\.3")
8130 "pytest>=3.0"))
8131 #t)))))
8132 (native-inputs
8133 `(("python-case" ,python-case)
8134 ("python-pytest" ,python-pytest)))
8135 (propagated-inputs
8136 `(("python-pytz" ,python-pytz)
8137 ("python-billiard" ,python-billiard)
8138 ("python-kombu" ,python-kombu)))
8139 (home-page "https://celeryproject.org")
8140 (synopsis "Distributed Task Queue")
8141 (description "Celery is an asynchronous task queue/job queue based on
8142 distributed message passing. It is focused on real-time operation, but
8143 supports scheduling as well. The execution units, called tasks, are executed
8144 concurrently on a single or more worker servers using multiprocessing,
8145 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8146 synchronously (wait until ready).")
8147 (license license:bsd-3)
8148 (properties `((python2-variant . ,(delay python2-celery))))))
8149
8150 (define-public python2-celery
8151 (let ((celery (package-with-python2
8152 (strip-python2-variant python-celery))))
8153 (package
8154 (inherit celery)
8155 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8156 ("python2-mock" ,python2-mock)
8157 ,@(package-native-inputs celery))))))
8158
8159 (define-public python-translitcodec
8160 (package
8161 (name "python-translitcodec")
8162 (version "0.4.0")
8163 (source
8164 (origin
8165 (method url-fetch)
8166 (uri (pypi-uri "translitcodec" version))
8167 (sha256
8168 (base32
8169 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8170 (build-system python-build-system)
8171 (arguments
8172 `(#:tests? #f)) ; no tests provided
8173 (home-page
8174 "https://github.com/claudep/translitcodec")
8175 (synopsis
8176 "Unicode to 8-bit charset transliteration codec")
8177 (description
8178 "This package contains codecs for transliterating ISO 10646 texts into
8179 best-effort representations using smaller coded character sets (ASCII,
8180 ISO 8859, etc.).")
8181 (license license:expat)))
8182
8183 (define-public python2-translitcodec
8184 (package-with-python2 python-translitcodec))
8185
8186 (define-public python-editor
8187 (package
8188 (name "python-editor")
8189 (version "0.5")
8190 (source
8191 (origin
8192 (method url-fetch)
8193 (uri (pypi-uri "python-editor" version))
8194 (sha256
8195 (base32
8196 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8197 (build-system python-build-system)
8198 (home-page
8199 "https://github.com/fmoo/python-editor")
8200 (synopsis
8201 "Programmatically open an editor, capture the result")
8202 (description
8203 "python-editor is a library that provides the editor module for
8204 programmatically interfacing with your system's $EDITOR.")
8205 (license license:asl2.0)))
8206
8207 (define-public python2-editor
8208 (package-with-python2 python-editor))
8209
8210 (define-public python-sphinxcontrib-programoutput
8211 (package
8212 (name "python-sphinxcontrib-programoutput")
8213 (version "0.10")
8214 (source (origin
8215 (method url-fetch)
8216 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8217 (sha256
8218 (base32
8219 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8220 (build-system python-build-system)
8221 (arguments
8222 ;; FIXME: Many tests are failing and the upstream is gone.
8223 '(#:tests? #f))
8224 (propagated-inputs
8225 `(("python-sphinx" ,python-sphinx)))
8226 (synopsis "Sphinx extension to include program output")
8227 (description "A Sphinx extension to literally insert the output of arbitrary
8228 commands into documents, helping you to keep your command examples up to date.")
8229 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8230 (license license:bsd-2)))
8231
8232 (define-public python2-sphinxcontrib-programoutput
8233 (package-with-python2 python-sphinxcontrib-programoutput))
8234
8235 (define-public python-sphinx-repoze-autointerface
8236 (package
8237 (name "python-sphinx-repoze-autointerface")
8238 (version "0.8")
8239 (source (origin
8240 (method url-fetch)
8241 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8242 (sha256
8243 (base32
8244 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8245 (build-system python-build-system)
8246 (arguments '(#:tests? #f)) ; No tests.
8247 (propagated-inputs
8248 `(("python-sphinx" ,python-sphinx)
8249 ("python-zope-interface" ,python-zope-interface)))
8250 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8251 (description "This package defines an extension for the Sphinx documentation
8252 system. The extension allows generation of API documentation by
8253 introspection of @code{zope.interface} instances in code.")
8254 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8255 (license license:repoze)))
8256
8257 (define-public python2-sphinx-repoze-autointerface
8258 (package-with-python2 python-sphinx-repoze-autointerface))
8259
8260 (define-public python-vobject
8261 (package
8262 (name "python-vobject")
8263 (version "0.9.5")
8264 (source (origin
8265 (method url-fetch)
8266 (uri (pypi-uri "vobject" version))
8267 (sha256
8268 (base32
8269 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8270 (build-system python-build-system)
8271 (arguments
8272 '(;; The test suite relies on some non-portable Windows interfaces.
8273 #:tests? #f))
8274 (propagated-inputs
8275 `(("python-dateutil" ,python-dateutil)
8276 ("python-pyicu" ,python-pyicu)))
8277 (synopsis "Parse and generate vCard and vCalendar files")
8278 (description "Vobject is intended to be a full featured Python package for
8279 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8280 are supported and well tested. vCard 3.0 files are supported, and all data
8281 should be imported, but only a few components are understood in a sophisticated
8282 way.")
8283 (home-page "http://eventable.github.io/vobject/")
8284 (license license:asl2.0)))
8285
8286 (define-public python2-vobject
8287 (package-with-python2 python-vobject))
8288
8289 (define-public python-munkres
8290 (package
8291 (name "python-munkres")
8292 (version "1.0.8")
8293 (source (origin
8294 (method url-fetch)
8295 (uri (pypi-uri "munkres" version))
8296 (sha256
8297 (base32
8298 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8299 (build-system python-build-system)
8300 (arguments
8301 '(#:tests? #f)) ; no test suite
8302 (home-page "http://software.clapper.org/munkres/")
8303 (synopsis "Implementation of the Munkres algorithm")
8304 (description "The Munkres module provides an implementation of the Munkres
8305 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8306 useful for solving the Assignment Problem.")
8307 (license license:bsd-3)))
8308
8309 (define-public python2-munkres
8310 (package-with-python2 python-munkres))
8311
8312 (define-public python-whoosh
8313 (package
8314 (name "python-whoosh")
8315 (version "2.7.4")
8316 (source
8317 (origin
8318 (method url-fetch)
8319 (uri (pypi-uri "Whoosh" version))
8320 (sha256
8321 (base32
8322 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8323 (build-system python-build-system)
8324 (native-inputs
8325 `(("python-pytest" ,python-pytest)))
8326 (home-page "https://bitbucket.org/mchaput/whoosh")
8327 (synopsis "Full text indexing, search, and spell checking library")
8328 (description
8329 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8330 checking library.")
8331 (license license:bsd-2)))
8332
8333 (define-public python2-whoosh
8334 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8335 (package (inherit whoosh)
8336 (propagated-inputs
8337 `(("python2-backport-ssl-match-hostname"
8338 ,python2-backport-ssl-match-hostname)
8339 ,@(package-propagated-inputs whoosh))))))
8340
8341 (define-public python-pathlib
8342 (package
8343 (name "python-pathlib")
8344 (version "1.0.1")
8345 (source (origin
8346 (method url-fetch)
8347 (uri (pypi-uri "pathlib" version))
8348 (sha256
8349 (base32
8350 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8351 (build-system python-build-system)
8352 ;; The tests depend on the internal "test" module, which does not provide
8353 ;; a stable interface.
8354 (arguments `(#:tests? #f))
8355 (home-page "https://pathlib.readthedocs.org/")
8356 (synopsis "Object-oriented file system paths")
8357 (description "Pathlib offers a set of classes to handle file system paths.
8358 It offers the following advantages over using string objects:
8359
8360 @enumerate
8361 @item No more cumbersome use of os and os.path functions. Everything can
8362 be done easily through operators, attribute accesses, and method calls.
8363 @item Embodies the semantics of different path types. For example,
8364 comparing Windows paths ignores casing.
8365 @item Well-defined semantics, eliminating any inconsistencies or
8366 ambiguities (forward vs. backward slashes, etc.).
8367 @end enumerate
8368
8369 Note: In Python 3.4, pathlib is now part of the standard library. For other
8370 Python versions please consider python-pathlib2 instead, which tracks the
8371 standard library module. This module (python-pathlib) isn't maintained
8372 anymore.")
8373 (license license:expat)))
8374
8375 (define-public python2-pathlib
8376 (package-with-python2 python-pathlib))
8377
8378 (define-public python2-pathlib2
8379 (package
8380 (name "python2-pathlib2")
8381 (version "2.3.2")
8382 (source (origin
8383 (method url-fetch)
8384 (uri (pypi-uri "pathlib2" version))
8385 (sha256
8386 (base32
8387 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8388 (build-system python-build-system)
8389 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8390 ;; version is 3.4 which already includes this package as part of the
8391 ;; standard library.
8392 (arguments
8393 `(#:python ,python-2))
8394 (propagated-inputs
8395 `(("python2-scandir" ,python2-scandir)
8396 ("python2-six" ,python2-six)))
8397 (home-page "https://pypi.python.org/pypi/pathlib2/")
8398 (synopsis "Object-oriented file system paths - backport of standard
8399 pathlib module")
8400 (description "The goal of pathlib2 is to provide a backport of standard
8401 pathlib module which tracks the standard library module, so all the newest
8402 features of the standard pathlib can be used also on older Python versions.
8403
8404 Pathlib offers a set of classes to handle file system paths. It offers the
8405 following advantages over using string objects:
8406
8407 @enumerate
8408 @item No more cumbersome use of os and os.path functions. Everything can
8409 be done easily through operators, attribute accesses, and method calls.
8410 @item Embodies the semantics of different path types. For example,
8411 comparing Windows paths ignores casing.
8412 @item Well-defined semantics, eliminating any inconsistencies or
8413 ambiguities (forward vs. backward slashes, etc.).
8414 @end enumerate")
8415 (license license:expat)))
8416
8417 (define-public python2-pathlib2-bootstrap
8418 (hidden-package
8419 (package
8420 (inherit python2-pathlib2)
8421 (name "python2-pathlib2-bootstrap")
8422 (propagated-inputs
8423 `(("python2-scandir" ,python2-scandir)
8424 ("python2-six" ,python2-six-bootstrap))))))
8425
8426 (define-public python-jellyfish
8427 (package
8428 (name "python-jellyfish")
8429 (version "0.5.6")
8430 (source (origin
8431 (method url-fetch)
8432 (uri (pypi-uri "jellyfish" version))
8433 (sha256
8434 (base32
8435 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8436 (build-system python-build-system)
8437 (native-inputs
8438 `(("python-pytest" ,python-pytest)))
8439 (home-page "https://github.com/jamesturk/jellyfish")
8440 (synopsis "Approximate and phonetic matching of strings")
8441 (description "Jellyfish uses a variety of string comparison and phonetic
8442 encoding algorithms to do fuzzy string matching.")
8443 (license license:bsd-2)
8444 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8445
8446 (define-public python2-jellyfish
8447 (let ((jellyfish (package-with-python2
8448 (strip-python2-variant python-jellyfish))))
8449 (package (inherit jellyfish)
8450 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8451 ,@(package-native-inputs jellyfish))))))
8452
8453 (define-public python2-unicodecsv
8454 (package
8455 (name "python2-unicodecsv")
8456 (version "0.14.1")
8457 (source (origin
8458 (method url-fetch)
8459 ;; The test suite is not included in the PyPi release.
8460 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8461 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8462 "archive/" version ".tar.gz"))
8463 (file-name (string-append name "-" version ".tar.gz"))
8464 (sha256
8465 (base32
8466 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8467 (build-system python-build-system)
8468 (arguments
8469 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8470 #:python ,python-2))
8471 (native-inputs
8472 `(("python2-unittest2" ,python2-unittest2)))
8473 (home-page "https://github.com/jdunck/python-unicodecsv")
8474 (synopsis "Unicode CSV module for Python 2")
8475 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8476 module, adding support for Unicode strings.")
8477 (license license:bsd-2)))
8478
8479 (define-public python-rarfile
8480 (package
8481 (name "python-rarfile")
8482 (version "2.8")
8483 (source (origin
8484 (method url-fetch)
8485 (uri (pypi-uri "rarfile" version))
8486 (sha256
8487 (base32
8488 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8489 (build-system python-build-system)
8490 (arguments
8491 '(#:phases
8492 (modify-phases %standard-phases
8493 (replace 'check
8494 ;; Many tests fail, but the installation proceeds.
8495 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8496 (native-inputs
8497 `(("which" ,which))) ; required for tests
8498 (propagated-inputs
8499 `(("libarchive" ,libarchive)))
8500 (home-page "https://github.com/markokr/rarfile")
8501 (synopsis "RAR archive reader for Python")
8502 (description "This is Python module for RAR archive reading. The interface
8503 is made as zipfile like as possible.")
8504 (license license:isc)))
8505
8506 (define-public python2-rarfile
8507 (package-with-python2 python-rarfile))
8508
8509 (define-public python-magic
8510 (package
8511 (name "python-magic")
8512 (version "0.4.15")
8513 (source
8514 (origin
8515 (method url-fetch)
8516 (uri (pypi-uri "python-magic" version))
8517 (sha256
8518 (base32
8519 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8520 (file-name (string-append name "-" version "-checkout"))))
8521 (build-system python-build-system)
8522 (arguments
8523 ;; The tests are unreliable, so don't run them. The tests fail
8524 ;; under Python3 because they were written for Python2 and
8525 ;; contain import statements that do not work in Python3. One of
8526 ;; the tests fails under Python2 because its assertions are
8527 ;; overly stringent; it relies on comparing output strings which
8528 ;; are brittle and can change depending on the version of
8529 ;; libmagic being used and the system on which the test is
8530 ;; running. In my case, under GuixSD 0.10.0, only one test
8531 ;; failed, and it seems to have failed only because the version
8532 ;; of libmagic that is packaged in Guix outputs a slightly
8533 ;; different (but not wrong) string than the one that the test
8534 ;; expected.
8535 '(#:tests? #f
8536 #:phases (modify-phases %standard-phases
8537 ;; Replace a specific method call with a hard-coded
8538 ;; path to the necessary libmagic.so file in the
8539 ;; store. If we don't do this, then the method call
8540 ;; will fail to find the libmagic.so file, which in
8541 ;; turn will cause any application using
8542 ;; python-magic to fail.
8543 (add-before 'build 'hard-code-path-to-libmagic
8544 (lambda* (#:key inputs #:allow-other-keys)
8545 (let ((file (assoc-ref inputs "file")))
8546 (substitute* "magic.py"
8547 (("ctypes.util.find_library\\('magic'\\)")
8548 (string-append "'" file "/lib/libmagic.so'")))
8549 #t)))
8550 (add-before 'install 'disable-egg-compression
8551 (lambda _
8552 (let ((port (open-file "setup.cfg" "a")))
8553 (display "\n[easy_install]\nzip_ok = 0\n"
8554 port)
8555 (close-port port)
8556 #t))))))
8557 (inputs
8558 ;; python-magic needs to be able to find libmagic.so.
8559 `(("file" ,file)))
8560 (home-page
8561 "https://github.com/ahupp/python-magic")
8562 (synopsis
8563 "File type identification using libmagic")
8564 (description
8565 "This module uses ctypes to access the libmagic file type
8566 identification library. It makes use of the local magic database and
8567 supports both textual and MIME-type output. Note that this module and
8568 the python-file module both provide a \"magic.py\" file; these two
8569 modules, which are different and were developed separately, both serve
8570 the same purpose: to provide Python bindings for libmagic.")
8571 (license license:expat)))
8572
8573 (define-public python2-magic
8574 (package-with-python2 python-magic))
8575
8576 (define-public python2-s3cmd
8577 (package
8578 (name "python2-s3cmd")
8579 (version "1.6.1")
8580 (source
8581 (origin
8582 (method url-fetch)
8583 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8584 "s3cmd-" version ".tar.gz"))
8585 (sha256
8586 (base32
8587 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8588 (build-system python-build-system)
8589 (arguments
8590 ;; s3cmd is written for python2 only and contains no tests.
8591 `(#:python ,python-2
8592 #:tests? #f))
8593 (propagated-inputs
8594 `(("python2-dateutil" ,python2-dateutil)
8595 ;; The python-file package also provides a magic.py module.
8596 ;; This is an unfortunate state of affairs; however, s3cmd
8597 ;; fails to install if it cannot find specifically the
8598 ;; python-magic package. Thus we include it, instead of using
8599 ;; python-file. Ironically, s3cmd sometimes works better
8600 ;; without libmagic bindings at all:
8601 ;; https://github.com/s3tools/s3cmd/issues/198
8602 ("python2-magic" ,python2-magic)))
8603 (home-page "http://s3tools.org/s3cmd")
8604 (synopsis "Command line tool for S3-compatible storage services")
8605 (description
8606 "S3cmd is a command line tool for uploading, retrieving and managing data
8607 in storage services that are compatible with the Amazon Simple Storage
8608 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8609 GnuPG encryption, and more. It also supports management of Amazon's
8610 CloudFront content delivery network.")
8611 (license license:gpl2+)))
8612
8613 (define-public python-pkgconfig
8614 (package
8615 (name "python-pkgconfig")
8616 (version "1.3.1")
8617 (source
8618 (origin
8619 (method url-fetch)
8620 (uri (pypi-uri "pkgconfig" version))
8621 (sha256
8622 (base32
8623 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8624 (build-system python-build-system)
8625 (native-inputs
8626 `(("python-nose" ,python-nose)))
8627 (inputs
8628 `(("pkg-config" ,pkg-config)))
8629 (arguments
8630 `(#:phases
8631 (modify-phases %standard-phases
8632 (add-before 'build 'patch
8633 ;; Hard-code the path to pkg-config.
8634 (lambda _
8635 (substitute* "pkgconfig/pkgconfig.py"
8636 (("cmd = 'pkg-config")
8637 (string-append "cmd = '" (which "pkg-config"))))
8638 #t))
8639 (replace 'check
8640 (lambda _
8641 (invoke "nosetests" "test.py"))))))
8642 (home-page "https://github.com/matze/pkgconfig")
8643 (synopsis "Python interface for pkg-config")
8644 (description "This module provides a Python interface to pkg-config. It
8645 can be used to find all pkg-config packages, check if a package exists,
8646 check if a package meets certain version requirements, query CFLAGS and
8647 LDFLAGS and parse the output to build extensions with setup.py.")
8648 (license license:expat)))
8649
8650 (define-public python2-pkgconfig
8651 (package-with-python2 python-pkgconfig))
8652
8653 (define-public python-bz2file
8654 (package
8655 (name "python-bz2file")
8656 (version "0.98")
8657 (source
8658 (origin
8659 (method url-fetch)
8660 (uri (pypi-uri "bz2file" version))
8661 (sha256
8662 (base32
8663 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8664 (build-system python-build-system)
8665 (arguments
8666 `(#:tests? #f)) ; Tests use deprecated python modules.
8667 (home-page "https://github.com/nvawda/bz2file")
8668 (synopsis "Read and write bzip2-compressed files")
8669 (description
8670 "Bz2file is a Python library for reading and writing bzip2-compressed
8671 files. It contains a drop-in replacement for the I/O interface in the
8672 standard library's @code{bz2} module, including features from the latest
8673 development version of CPython that are not available in older releases.")
8674 (license license:asl2.0)))
8675
8676 (define-public python2-bz2file
8677 (package-with-python2 python-bz2file))
8678
8679 (define-public python-future
8680 (package
8681 (name "python-future")
8682 (version "0.16.0")
8683 (source
8684 (origin
8685 (method url-fetch)
8686 (uri (pypi-uri "future" version))
8687 (sha256
8688 (base32
8689 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8690 (build-system python-build-system)
8691 ;; Many tests connect to the network or are otherwise flawed.
8692 ;; https://github.com/PythonCharmers/python-future/issues/210
8693 (arguments
8694 `(#:tests? #f))
8695 (home-page "http://python-future.org")
8696 (synopsis "Single-source support for Python 3 and 2")
8697 (description
8698 "@code{python-future} is the missing compatibility layer between Python 2 and
8699 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8700 to support both Python 2 and Python 3 with minimal overhead.")
8701 (license license:expat)))
8702
8703 (define-public python2-future
8704 (package-with-python2 python-future))
8705
8706 (define-public python-cysignals
8707 (package
8708 (name "python-cysignals")
8709 (version "1.9.0")
8710 (source
8711 (origin
8712 (method url-fetch)
8713 (uri (pypi-uri "cysignals" version))
8714 (sha256
8715 (base32
8716 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
8717 (build-system python-build-system)
8718 (native-inputs
8719 `(("python-cython" ,python-cython)
8720 ("python-sphinx" ,python-sphinx)))
8721 (inputs
8722 `(("pari-gp" ,pari-gp)))
8723 (arguments
8724 `(#:modules ((guix build python-build-system)
8725 ((guix build gnu-build-system) #:prefix gnu:)
8726 (guix build utils))
8727 ;; FIXME: Tests are executed after installation and currently fail
8728 ;; when not installing into standard locations; the author is working
8729 ;; on a fix.
8730 #:tests? #f
8731 #:phases
8732 (modify-phases %standard-phases
8733 (add-before
8734 'build 'configure
8735 (assoc-ref gnu:%standard-phases 'configure)))))
8736 (home-page
8737 "https://github.com/sagemath/cysignals")
8738 (synopsis
8739 "Handling of interrupts and signals for Cython")
8740 (description
8741 "The cysignals package provides mechanisms to handle interrupts (and
8742 other signals and errors) in Cython code, using two related approaches,
8743 for mixed Cython/Python code or external C libraries and pure Cython code,
8744 respectively.")
8745 (license license:lgpl3+)))
8746
8747 (define-public python2-cysignals
8748 (package-with-python2 python-cysignals))
8749
8750 (define-public python2-shedskin
8751 (package
8752 (name "python2-shedskin")
8753 (version "0.9.4")
8754 (source
8755 (origin
8756 (method url-fetch)
8757 (uri (string-append "https://github.com/shedskin/shedskin/"
8758 "releases/download/v" version
8759 "/shedskin-" version ".tgz"))
8760 (sha256
8761 (base32
8762 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8763 (build-system python-build-system)
8764 (arguments
8765 `(#:python ,python-2
8766 #:phases (modify-phases %standard-phases
8767 (add-after 'unpack 'fix-resulting-include-libs
8768 (lambda* (#:key inputs #:allow-other-keys)
8769 (let ((libgc (assoc-ref inputs "libgc"))
8770 (pcre (assoc-ref inputs "pcre")))
8771 (substitute* "shedskin/makefile.py"
8772 (("variable == 'CCFLAGS':[ ]*")
8773 (string-append "variable == 'CCFLAGS':\n"
8774 " line += ' -I " pcre "/include"
8775 " -I " libgc "/include'"))
8776 (("variable == 'LFLAGS':[ ]*")
8777 (string-append "variable == 'LFLAGS':\n"
8778 " line += ' -L" pcre "/lib"
8779 " -L " libgc "/lib'")))
8780 #t))))))
8781 (inputs `(("pcre" ,pcre)
8782 ("libgc" ,libgc)))
8783 (home-page "https://shedskin.github.io/")
8784 (synopsis "Experimental Python-2 to C++ Compiler")
8785 (description (string-append "This is an experimental compiler for a subset of
8786 Python. It generates C++ code and a Makefile."))
8787 (license (list license:gpl3 license:bsd-3 license:expat))))
8788
8789 (define-public python2-rope
8790 (package
8791 (name "python2-rope")
8792 (version "0.10.3")
8793 (source
8794 (origin
8795 (method url-fetch)
8796 (uri (pypi-uri "rope" version))
8797 (sha256
8798 (base32
8799 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8800 (arguments
8801 ;; Rope is currently python-2 only.
8802 ;; https://github.com/python-rope/rope/issues/57
8803 `(#:python ,python-2))
8804 (build-system python-build-system)
8805 (native-inputs
8806 `(("python2-unittest2" ,python2-unittest2)))
8807 (home-page "https://github.com/python-rope/rope")
8808 (synopsis "Refactoring library for Python")
8809 (description "Rope is a refactoring library for Python. It facilitates
8810 the renaming, moving and extracting of attributes, functions, modules, fields
8811 and parameters in Python 2 source code. These refactorings can also be applied
8812 to occurrences in strings and comments.")
8813 (license license:gpl2)))
8814
8815 (define-public python-py3status
8816 (package
8817 (name "python-py3status")
8818 (version "3.7")
8819 (source
8820 (origin
8821 (method url-fetch)
8822 (uri (pypi-uri "py3status" version))
8823 (sha256
8824 (base32
8825 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8826 (build-system python-build-system)
8827 (inputs
8828 `(("file" ,file)))
8829 (arguments
8830 '(#:phases
8831 (modify-phases %standard-phases
8832 ;; 'file' is used for detection of configuration file encoding
8833 ;; let's make link the dependency to particular input
8834 (add-before 'build 'patch-file-path
8835 (lambda* (#:key inputs #:allow-other-keys)
8836 (let ((file-path (assoc-ref inputs "file")))
8837 (substitute* "py3status/parse_config.py"
8838 (("\\['file', '-b'")
8839 (string-append "['" file-path "/bin/file', '-b'")))
8840 #t))))
8841 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8842 (home-page "https://github.com/ultrabug/py3status")
8843 (synopsis "Extensible i3status wrapper written in Python")
8844 (description "py3status is an i3status wrapper which extends i3status
8845 functionality in a modular way, allowing you to extend your panel with your
8846 own code, responding to click events and updating clock every second.")
8847 (license license:bsd-3)))
8848
8849 (define-public python-tblib
8850 (package
8851 (name "python-tblib")
8852 (version "1.3.2")
8853 (source (origin
8854 (method url-fetch)
8855 (uri (pypi-uri "tblib" version))
8856 (sha256 (base32
8857 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8858 (build-system python-build-system)
8859 (arguments
8860 `(#:phases
8861 (modify-phases %standard-phases
8862 (add-before 'check 'adjust-tests
8863 (lambda _
8864 (when (which "python3")
8865 ;; Adjust the example output to match that of Python 3.7:
8866 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
8867 (substitute* "README.rst"
8868 (("Exception\\('fail',") "Exception('fail'"))
8869 #t)))
8870 (replace 'check
8871 (lambda _
8872 ;; Upstream runs tests after installation and the package itself
8873 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8874 ;; found.
8875 (setenv "PYTHONPATH"
8876 (string-append (getcwd) "/build/lib:"
8877 (getenv "PYTHONPATH")))
8878 (invoke "py.test" "-vv" "tests" "README.rst"))))))
8879 (native-inputs
8880 `(("python-pytest" ,python-pytest)
8881 ("python-six" ,python-six)))
8882 (home-page "https://github.com/ionelmc/python-tblib")
8883 (synopsis "Traceback serialization library")
8884 (description
8885 "Traceback serialization allows you to:
8886
8887 @enumerate
8888 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
8889 different processes. This allows better error handling when running code over
8890 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8891
8892 @item Parse traceback strings and raise with the parsed tracebacks.
8893 @end enumerate\n")
8894 (license license:bsd-3)))
8895
8896 (define-public python2-tblib
8897 (package-with-python2 python-tblib))
8898
8899 (define-public python-greenlet
8900 (package
8901 (name "python-greenlet")
8902 (version "0.4.15")
8903 (source (origin
8904 (method url-fetch)
8905 (uri (pypi-uri "greenlet" version))
8906 (sha256
8907 (base32
8908 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
8909 (build-system python-build-system)
8910 (home-page "https://greenlet.readthedocs.io/")
8911 (synopsis "Lightweight in-process concurrent programming")
8912 (description
8913 "Greenlet package is a spin-off of Stackless, a version of CPython
8914 that supports micro-threads called \"tasklets\". Tasklets run
8915 pseudo-concurrently (typically in a single or a few OS-level threads) and
8916 are synchronized with data exchanges on \"channels\".")
8917 (license (list license:psfl license:expat))))
8918
8919 (define-public python2-greenlet
8920 (package-with-python2 python-greenlet))
8921
8922 (define-public python-objgraph
8923 (package
8924 (name "python-objgraph")
8925 (version "3.4.0")
8926 (source
8927 (origin
8928 (method url-fetch)
8929 (uri (pypi-uri "objgraph" version))
8930 (sha256
8931 (base32
8932 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
8933 (build-system python-build-system)
8934 (propagated-inputs
8935 `(("python-graphviz" ,python-graphviz)))
8936 (native-inputs
8937 `(("python-mock" ,python-mock)
8938 ("graphviz" ,graphviz)))
8939 (home-page "https://mg.pov.lt/objgraph/")
8940 (synopsis "Draw Python object reference graphs with graphviz")
8941 (description
8942 "This package provides tools to draw Python object reference graphs with
8943 graphviz.")
8944 (license license:expat)))
8945
8946 (define-public python-gevent
8947 (package
8948 (name "python-gevent")
8949 (version "1.3.7")
8950 (source (origin
8951 (method url-fetch)
8952 (uri (pypi-uri "gevent" version))
8953 (sha256
8954 (base32
8955 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
8956 (modules '((guix build utils)))
8957 (snippet
8958 '(begin
8959 ;; unbunding libev and c-ares
8960 (delete-file-recursively "deps")
8961 #t))))
8962 (build-system python-build-system)
8963 (arguments
8964 `(#:modules ((ice-9 ftw)
8965 (ice-9 match)
8966 (srfi srfi-26)
8967 (guix build utils)
8968 (guix build python-build-system))
8969 #:phases (modify-phases %standard-phases
8970 (add-after 'unpack 'unpack-libev
8971 (lambda* (#:key inputs #:allow-other-keys)
8972 (mkdir-p "deps/libev")
8973 ;; FIXME: gevent requires building libev, even though
8974 ;; it only links against the proper one.
8975 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
8976 "--strip-components=1" "-C" "deps/libev")))
8977 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
8978 (lambda _
8979 (substitute* "src/gevent/subprocess.py"
8980 (("/bin/sh") (which "sh")))
8981 (for-each (lambda (file)
8982 (substitute* file
8983 (("/bin/sh") (which "sh"))
8984 (("/bin/true") (which "true"))))
8985 (find-files "src/greentest" "\\.py$"))
8986 #t))
8987 (add-before 'build 'do-not-use-bundled-sources
8988 (lambda* (#:key inputs #:allow-other-keys)
8989 (setenv "CONFIG_SHELL" (which "bash"))
8990 (setenv "LIBEV_EMBED" "false")
8991 (setenv "CARES_EMBED" "false")
8992 (setenv "EMBED" "false")
8993
8994 (let ((greenlet (string-append
8995 (assoc-ref inputs "python-greenlet")
8996 "/include")))
8997 (match (scandir greenlet
8998 (lambda (item)
8999 (string-prefix? "python" item)))
9000 ((python)
9001 (setenv "CPATH"
9002 (string-append greenlet "/" python)))))
9003 #t))
9004 (add-before 'check 'skip-timer-test
9005 (lambda _
9006 ;; XXX: Skip 'TestTimerResolution', which appears to be
9007 ;; unreliable.
9008 (substitute* "src/greentest/test__core_timer.py"
9009 (("not greentest.RUNNING_ON_CI") "False"))
9010 #t))
9011 (replace 'check
9012 (lambda _
9013 ;; Make sure the build directory is on PYTHONPATH.
9014 (setenv "PYTHONPATH"
9015 (string-append
9016 (getenv "PYTHONPATH") ":"
9017 (getcwd) "/build/"
9018 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9019 (with-directory-excursion "src/greentest"
9020 ;; XXX: Many tests require network access. Instead we only
9021 ;; run known-good tests. Unfortunately we cannot use
9022 ;; recursion here since this directory also contains
9023 ;; Python-version-specific subfolders.
9024 (apply invoke "python" "testrunner.py" "--config"
9025 "known_failures.py"
9026 (scandir "." (cut regexp-exec
9027 (make-regexp "test_+(subprocess|core)")
9028 <>)))))))))
9029 (propagated-inputs
9030 `(("python-greenlet" ,python-greenlet)
9031 ("python-objgraph" ,python-objgraph)))
9032 (native-inputs
9033 `(("libev-source" ,(package-source libev))
9034 ("python-six" ,python-six)))
9035 (inputs
9036 `(("c-ares" ,c-ares)
9037 ("libev" ,libev)))
9038 (home-page "http://www.gevent.org/")
9039 (synopsis "Coroutine-based network library")
9040 (description
9041 "gevent is a coroutine-based Python networking library that uses greenlet
9042 to provide a high-level synchronous API on top of the libev event loop.")
9043 (license license:expat)
9044 (properties `((python2-variant . ,(delay python2-gevent))))))
9045
9046 (define-public python2-gevent
9047 (let ((base (package-with-python2
9048 (strip-python2-variant python-gevent))))
9049 (package
9050 (inherit base)
9051 (native-inputs `(,@(package-native-inputs python-gevent)
9052 ("python-mock" ,python2-mock))))))
9053
9054 (define-public python-fastimport
9055 (package
9056 (name "python-fastimport")
9057 (version "0.9.6")
9058 (source
9059 (origin
9060 (method url-fetch)
9061 (uri (pypi-uri "fastimport" version))
9062 (sha256
9063 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9064 (build-system python-build-system)
9065 (home-page "https://github.com/jelmer/python-fastimport")
9066 (synopsis "VCS fastimport parser and generator in Python")
9067 (description "This package provides a parser for and generator of the Git
9068 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9069 format.")
9070 (license license:gpl2+)))
9071
9072 (define-public python2-fastimport
9073 (package-with-python2 python-fastimport))
9074
9075 (define-public python-twisted
9076 (package
9077 (name "python-twisted")
9078 (version "17.1.0")
9079 (source (origin
9080 (method url-fetch)
9081 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9082 (sha256
9083 (base32
9084 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9085 (build-system python-build-system)
9086 (arguments
9087 '(#:tests? #f)) ; FIXME: Some tests are failing.
9088 ;; #:phases
9089 ;; (modify-phases %standard-phases
9090 ;; (replace 'check
9091 ;; (lambda _
9092 ;; (zero? (system* "./bin/trial" "twisted")))))
9093 (propagated-inputs
9094 `(("python-zope-interface" ,python-zope-interface)
9095 ("python-incremental" ,python-incremental)
9096 ("python-constantly" ,python-constantly)
9097 ("python-automat" ,python-automat)))
9098 (home-page "https://twistedmatrix.com/")
9099 (synopsis "Asynchronous networking framework written in Python")
9100 (description
9101 "Twisted is an extensible framework for Python programming, with special
9102 focus on event-based network programming and multiprotocol integration.")
9103 (license license:expat)))
9104
9105 (define-public python2-twisted
9106 (package-with-python2 python-twisted))
9107
9108 (define-public python-pika
9109 (package
9110 (name "python-pika")
9111 (version "0.12.0")
9112 (source
9113 (origin
9114 (method url-fetch)
9115 (uri (pypi-uri "pika" version))
9116 (sha256
9117 (base32
9118 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9119 (build-system python-build-system)
9120 (native-inputs
9121 `(("python-pyev" ,python-pyev)
9122 ("python-tornado" ,python-tornado)
9123 ("python-twisted" ,python-twisted)))
9124 (home-page "https://pika.readthedocs.org")
9125 (synopsis "Pure Python AMQP Client Library")
9126 (description
9127 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9128 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9129 network support library.")
9130 (license license:bsd-3)))
9131
9132 (define-public python2-pika
9133 (package-with-python2 python-pika))
9134
9135 (define-public python-ply
9136 (package
9137 (name "python-ply")
9138 (version "3.10")
9139 (source
9140 (origin
9141 (method url-fetch)
9142 (uri (pypi-uri "ply" version))
9143 (sha256
9144 (base32
9145 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9146 (build-system python-build-system)
9147 (home-page "http://www.dabeaz.com/ply/")
9148 (synopsis "Python Lex & Yacc")
9149 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9150 It uses LR parsing and does extensive error checking.")
9151 (license license:bsd-3)))
9152
9153 (define-public python2-ply
9154 (package-with-python2 python-ply))
9155
9156 (define-public python-tabulate
9157 (package
9158 (name "python-tabulate")
9159 (version "0.7.7")
9160 (source (origin
9161 (method url-fetch)
9162 (uri (pypi-uri "tabulate" version))
9163 (sha256
9164 (base32
9165 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9166 (build-system python-build-system)
9167 (arguments
9168 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9169 ;; and the latest release is not tagged in the upstream repository.
9170 '(#:tests? #f))
9171 (home-page "https://bitbucket.org/astanin/python-tabulate")
9172 (synopsis "Pretty-print tabular data")
9173 (description
9174 "Tabulate is a library and command-line utility to pretty-print tabular
9175 data in Python.")
9176 (license license:expat)))
9177
9178 (define-public python2-tabulate
9179 (package-with-python2 python-tabulate))
9180
9181 (define-public python-kazoo
9182 (package
9183 (name "python-kazoo")
9184 (version "2.4.0")
9185 (source
9186 (origin
9187 (method url-fetch)
9188 (uri (pypi-uri "kazoo" version))
9189 (sha256
9190 (base32
9191 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9192 (build-system python-build-system)
9193 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9194 (propagated-inputs
9195 `(("python-six" ,python-six)))
9196 (home-page "https://kazoo.readthedocs.org")
9197 (synopsis "High-level Zookeeper client library")
9198 (description
9199 "Kazoo is a Python client library for the Apache Zookeeper distributed
9200 application service. It is designed to be easy to use and to avoid common
9201 programming errors.")
9202 (license license:asl2.0)))
9203
9204 (define-public python2-kazoo
9205 (package-with-python2 python-kazoo))
9206
9207 (define-public python-pykafka
9208 (package
9209 (name "python-pykafka")
9210 (version "2.4.0")
9211 (source (origin
9212 (method url-fetch)
9213 (uri (string-append
9214 "https://pypi.python.org/packages/8b/3e/"
9215 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9216 "pykafka-" version ".tar.gz"))
9217 (sha256
9218 (base32
9219 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9220 (build-system python-build-system)
9221 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9222 (propagated-inputs
9223 `(("python-gevent" ,python-gevent)
9224 ("python-kazoo" ,python-kazoo)
9225 ("python-tabulate" ,python-tabulate)))
9226 (inputs
9227 `(("librdkafka" ,librdkafka)))
9228 (home-page "https://pykafka.readthedocs.io/")
9229 (synopsis "Apache Kafka client for Python")
9230 (description
9231 "PyKafka is a client for the Apache Kafka distributed messaging system.
9232 It includes Python implementations of Kafka producers and consumers, which
9233 are optionally backed by a C extension built on librdkafka.")
9234 (license license:asl2.0)))
9235
9236 (define-public python2-pykafka
9237 (package-with-python2 python-pykafka))
9238
9239 (define-public python-wcwidth
9240 (package
9241 (name "python-wcwidth")
9242 (version "0.1.7")
9243 (source
9244 (origin
9245 (method url-fetch)
9246 (uri (pypi-uri "wcwidth" version))
9247 (sha256
9248 (base32
9249 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9250 (build-system python-build-system)
9251 (home-page "https://github.com/jquast/wcwidth")
9252 (synopsis "Measure number of terminal column cells of wide-character codes")
9253 (description "Wcwidth measures the number of terminal column cells of
9254 wide-character codes. It is useful for those implementing a terminal emulator,
9255 or programs that carefully produce output to be interpreted by one. It is a
9256 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9257 specified in POSIX.1-2001 and POSIX.1-2008.")
9258 (license license:expat)))
9259
9260 (define-public python2-wcwidth
9261 (package-with-python2 python-wcwidth))
9262
9263 (define-public python2-jsonrpclib
9264 (package
9265 (name "python2-jsonrpclib")
9266 (version "0.1.7")
9267 (source (origin
9268 (method url-fetch)
9269 (uri (string-append
9270 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9271 "jsonrpclib-" version ".tar.gz"))
9272 (sha256
9273 (base32
9274 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9275 (build-system python-build-system)
9276 (arguments
9277 `(#:tests? #f
9278 #:python ,python-2))
9279 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9280 (synopsis "Implementation of JSON-RPC specification for Python")
9281 (description
9282 "This library is an implementation of the JSON-RPC specification.
9283 It supports both the original 1.0 specification, as well as the
9284 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9285 etc.")
9286 (license license:asl2.0)))
9287
9288 (define-public python-chai
9289 (package
9290 (name "python-chai")
9291 (version "1.1.2")
9292 (source (origin
9293 (method url-fetch)
9294 (uri (pypi-uri "chai" version))
9295 (sha256
9296 (base32
9297 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9298 (build-system python-build-system)
9299 (home-page "https://github.com/agoragames/chai")
9300 (synopsis "Mocking framework for Python")
9301 (description
9302 "Chai provides an api for mocking, stubbing and spying your python
9303 objects, patterned after the Mocha library for Ruby.")
9304 (license license:bsd-3)))
9305
9306 (define-public python2-chai
9307 (package-with-python2 python-chai))
9308
9309 (define-public python-inflection
9310 (package
9311 (name "python-inflection")
9312 (version "0.3.1")
9313 (source
9314 (origin (method url-fetch)
9315 (uri (pypi-uri "inflection" version))
9316 (sha256
9317 (base32
9318 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9319 (build-system python-build-system)
9320 (native-inputs
9321 `(("python-pytest" ,python-pytest)))
9322 (home-page "https://github.com/jpvanhal/inflection")
9323 (synopsis "Python string transformation library")
9324 (description
9325 "Inflection is a string transformation library. It singularizes
9326 and pluralizes English words, and transforms strings from CamelCase to
9327 underscored string.")
9328 (license license:expat)))
9329
9330 (define-public python2-inflection
9331 (package-with-python2 python-inflection))
9332
9333 (define-public python-pylev
9334 (package
9335 (name "python-pylev")
9336 (version "1.3.0")
9337 (source (origin
9338 (method url-fetch)
9339 (uri (pypi-uri "pylev" version))
9340 (sha256
9341 (base32
9342 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9343 (build-system python-build-system)
9344 (home-page "https://github.com/toastdriven/pylev")
9345 (synopsis "Levenshtein distance implementation in Python")
9346 (description "Pure Python Levenshtein implementation, based off the
9347 Wikipedia code samples at
9348 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9349 (license license:bsd-3)))
9350
9351 (define-public python2-pylev
9352 (package-with-python2 python-pylev))
9353
9354 (define-public python-cleo
9355 (package
9356 (name "python-cleo")
9357 (version "0.6.1")
9358 (source (origin
9359 (method url-fetch)
9360 (uri (pypi-uri "cleo" version))
9361 (sha256
9362 (base32
9363 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9364 (build-system python-build-system)
9365 (native-inputs
9366 `(;; For testing
9367 ("python-mock" ,python-mock)
9368 ("python-pytest-mock" ,python-pytest-mock)
9369 ("python-pytest" ,python-pytest)))
9370 (propagated-inputs
9371 `(("python-backpack" ,python-backpack)
9372 ("python-pastel" ,python-pastel)
9373 ("python-pylev" ,python-pylev)))
9374 (home-page "https://github.com/sdispater/cleo")
9375 (synopsis "Command-line arguments library for Python")
9376 (description
9377 "Cleo allows you to create command-line commands with signature in
9378 docstring and colored output.")
9379 (license license:expat)))
9380
9381 (define-public python2-cleo
9382 (package-with-python2 python-cleo))
9383
9384 (define-public python-lazy-object-proxy
9385 (package
9386 (name "python-lazy-object-proxy")
9387 (version "1.3.1")
9388 (source (origin
9389 (method url-fetch)
9390 (uri (pypi-uri "lazy-object-proxy" version))
9391 (sha256
9392 (base32
9393 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9394 (build-system python-build-system)
9395 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9396 (synopsis "Lazy object proxy for python")
9397 (description
9398 "Lazy object proxy is an object that wraps a callable but defers the call
9399 until the object is actually required, and caches the result of said call.")
9400 (license license:bsd-2)))
9401
9402 (define-public python2-lazy-object-proxy
9403 (package-with-python2 python-lazy-object-proxy))
9404
9405 (define-public python-dnspython
9406 (package
9407 (name "python-dnspython")
9408 (version "1.15.0")
9409 (source (origin
9410 (method url-fetch)
9411 (uri (string-append "http://www.dnspython.org/kits/"
9412 version "/dnspython-" version ".tar.gz"))
9413 (sha256
9414 (base32
9415 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9416 (build-system python-build-system)
9417 (arguments '(#:tests? #f)) ; XXX: requires internet access
9418 (home-page "http://www.dnspython.org")
9419 (synopsis "DNS toolkit for Python")
9420 (description
9421 "dnspython is a DNS toolkit for Python. It supports almost all record
9422 types. It can be used for queries, zone transfers, and dynamic updates.
9423 It supports TSIG authenticated messages and EDNS0.")
9424 (license license:expat)))
9425
9426 (define-public python2-dnspython
9427 (package-with-python2 python-dnspython))
9428
9429 (define-public python-email-validator
9430 (package
9431 (name "python-email-validator")
9432 (version "1.0.2")
9433 (source
9434 (origin (method url-fetch)
9435 (uri (pypi-uri "email_validator" version))
9436 (sha256
9437 (base32
9438 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9439 (build-system python-build-system)
9440 (arguments
9441 '(#:phases
9442 (modify-phases %standard-phases
9443 (add-before 'build 'use-dnspython
9444 (lambda _
9445 (substitute* "setup.py"
9446 (("dnspython3") "dnspython"))
9447 #t)))))
9448 (propagated-inputs
9449 `(("python-dnspython" ,python-dnspython)
9450 ("python-idna" ,python-idna)))
9451 (home-page "https://github.com/JoshData/python-email-validator")
9452 (synopsis "Email address validation library for Python")
9453 (description
9454 "This library validates email address syntax and deliverability.")
9455 (license license:cc0)))
9456
9457 (define-public python2-email-validator
9458 (package-with-python2 python-email-validator))
9459
9460 (define-public python-ukpostcodeparser
9461 (package
9462 (name "python-ukpostcodeparser")
9463 (version "1.0.3")
9464 (source (origin
9465 (method url-fetch)
9466 (uri (pypi-uri "UkPostcodeParser" version))
9467 (sha256
9468 (base32
9469 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9470 (build-system python-build-system)
9471 (home-page "https://github.com/hamstah/ukpostcodeparser")
9472 (synopsis "UK Postcode parser for Python")
9473 (description
9474 "This library provides the @code{parse_uk_postcode} function for
9475 parsing UK postcodes.")
9476 (license license:expat)))
9477
9478 (define-public python2-ukpostcodeparser
9479 (package-with-python2 python-ukpostcodeparser))
9480
9481 (define-public python-faker
9482 (package
9483 (name "python-faker")
9484 (version "0.7.9")
9485 (source (origin
9486 (method url-fetch)
9487 (uri (pypi-uri "Faker" version))
9488 (sha256
9489 (base32
9490 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9491 (patches
9492 (search-patches "python-faker-fix-build-32bit.patch"))
9493 (modules '((guix build utils)))
9494 (snippet
9495 '(begin
9496 (for-each delete-file (find-files "." "\\.pyc$"))
9497 #t))))
9498 (build-system python-build-system)
9499 (arguments
9500 '(#:phases
9501 (modify-phases %standard-phases
9502 (replace 'check
9503 (lambda _
9504 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
9505 (native-inputs
9506 `(;; For testing
9507 ("python-email-validator" ,python-email-validator)
9508 ("python-mock" ,python-mock)
9509 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9510 (propagated-inputs
9511 `(("python-dateutil" ,python-dateutil)
9512 ("python-six" ,python-six)))
9513 (home-page "https://github.com/joke2k/faker")
9514 (synopsis "Python package that generates fake data")
9515 (description
9516 "Faker is a Python package that generates fake data such as names,
9517 addresses, and phone numbers.")
9518 (license license:expat)
9519 (properties `((python2-variant . ,(delay python2-faker))))))
9520
9521 (define-public python2-faker
9522 (let ((base (package-with-python2 (strip-python2-variant
9523 python-faker))))
9524 (package
9525 (inherit base)
9526 (propagated-inputs
9527 `(("python2-ipaddress" ,python2-ipaddress)
9528 ,@(package-propagated-inputs base))))))
9529
9530 (define-public python-pyaml
9531 (package
9532 (name "python-pyaml")
9533 (version "18.11.0")
9534 (source (origin
9535 (method url-fetch)
9536 (uri (pypi-uri "pyaml" version))
9537 (sha256
9538 (base32
9539 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9540 (build-system python-build-system)
9541 (native-inputs
9542 `(("python-unidecode" ,python-unidecode)))
9543 (propagated-inputs
9544 `(("python-pyyaml" ,python-pyyaml)))
9545 (home-page "https://github.com/mk-fg/pretty-yaml")
9546 (synopsis "YAML pretty-print library for Python")
9547 (description
9548 "pyaml is a PyYAML based python module to produce pretty and readable
9549 YAML-serialized data.")
9550 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9551
9552 (define-public python2-pyaml
9553 (package-with-python2 python-pyaml))
9554
9555 (define-public python-backpack
9556 (package
9557 (name "python-backpack")
9558 (version "0.1")
9559 (source
9560 (origin
9561 (method url-fetch)
9562 (uri (pypi-uri "backpack" version))
9563 (sha256
9564 (base32
9565 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9566 (build-system python-build-system)
9567 (native-inputs
9568 `(("python-pytest" ,python-pytest)
9569 ("python-nose" ,python-nose)))
9570 (propagated-inputs
9571 `(("python-simplejson" ,python-simplejson)))
9572 (home-page "https://github.com/sdispater/backpack")
9573 (synopsis "Utilities for working with Python collections")
9574 (description "Backpack provides some useful utilities for working with
9575 collections of data.")
9576 (license license:expat)))
9577
9578 (define-public python2-backpack
9579 (package-with-python2 python-backpack))
9580
9581 (define-public python-prompt-toolkit
9582 (package
9583 (name "python-prompt-toolkit")
9584 (version "2.0.7")
9585 (source
9586 (origin
9587 (method url-fetch)
9588 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9589 (sha256
9590 (base32
9591 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9592 (build-system python-build-system)
9593 (arguments
9594 `(#:phases
9595 (modify-phases %standard-phases
9596 (delete 'check)
9597 (add-after 'install 'post-install-check
9598 (lambda* (#:key inputs outputs #:allow-other-keys)
9599 ;; HOME is needed for the test
9600 ;; "test_pathcompleter_can_expanduser".
9601 (setenv "HOME" "/tmp")
9602 (add-installed-pythonpath inputs outputs)
9603 (invoke "py.test"))))))
9604 (propagated-inputs
9605 `(("python-wcwidth" ,python-wcwidth)
9606 ("python-six" ,python-six)
9607 ("python-pygments" ,python-pygments)))
9608 (native-inputs
9609 `(("python-pytest" ,python-pytest)))
9610 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9611 (synopsis "Library for building command line interfaces in Python")
9612 (description
9613 "Prompt-Toolkit is a library for building interactive command line
9614 interfaces in Python. It's like GNU Readline but it also features syntax
9615 highlighting while typing, out-of-the-box multi-line input editing, advanced
9616 code completion, incremental search, support for Chinese double-width
9617 characters, mouse support, and auto suggestions.")
9618 (license license:bsd-3)))
9619
9620 (define-public python2-prompt-toolkit
9621 (package-with-python2 python-prompt-toolkit))
9622
9623 (define-public python-prompt-toolkit-1
9624 (package (inherit python-prompt-toolkit)
9625 (version "1.0.15")
9626 (source
9627 (origin
9628 (method url-fetch)
9629 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9630 (sha256
9631 (base32
9632 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9633
9634 (define-public python2-prompt-toolkit-1
9635 (package-with-python2 python-prompt-toolkit-1))
9636
9637 (define-public python-jedi
9638 (package
9639 (name "python-jedi")
9640 (version "0.13.1")
9641 (source
9642 (origin
9643 (method url-fetch)
9644 (uri (pypi-uri "jedi" version))
9645 (sha256
9646 (base32
9647 "0j11q42g5vjkyhhjpyy8nb0gdxs78m3rpjai7p1hvgpyl9rkyjdp"))))
9648 (build-system python-build-system)
9649 (arguments
9650 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.1 (see:
9651 ;; https://github.com/davidhalter/jedi/issues/1263)
9652 #:tests? #f
9653 #:phases
9654 (modify-phases %standard-phases
9655 (replace 'check
9656 (lambda* (#:key tests? #:allow-other-keys)
9657 (when tests?
9658 (invoke "py.test" "-vv")))))))
9659 (native-inputs
9660 `(("python-pytest" ,python-pytest)
9661 ("python-docopt" ,python-docopt)))
9662 (propagated-inputs
9663 `(("python-parso" ,python-parso)))
9664 (home-page "https://github.com/davidhalter/jedi")
9665 (synopsis "Autocompletion and static analysis library for Python")
9666 (description
9667 "Jedi is a static analysis tool for Python that can be used in Integrated
9668 Development Environments (@dfn{IDE}s) and text editors. It understands Python
9669 on a deeper level than many other static analysis frameworks for Python.
9670
9671 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9672 well.")
9673 (license license:expat)))
9674
9675 (define-public python2-jedi
9676 (package-with-python2 python-jedi))
9677
9678 (define-public ptpython
9679 (package
9680 (name "ptpython")
9681 (version "0.34")
9682 (source (origin
9683 (method url-fetch)
9684 (uri (pypi-uri "ptpython" version))
9685 (sha256
9686 (base32
9687 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9688 (build-system python-build-system)
9689 (arguments
9690 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9691 (propagated-inputs
9692 `(("python-docopt" ,python-docopt)
9693 ("python-jedi" ,python-jedi)
9694 ("python-prompt-toolkit" ,python-prompt-toolkit)
9695 ("python-pygments" ,python-pygments)))
9696 (home-page "https://github.com/jonathanslenders/ptpython")
9697 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9698 (description
9699 "ptpython is a Python read-eval-print loop with IDE-like features.
9700 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9701 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9702 etc.")
9703 (license license:bsd-3)
9704 (properties `((python2-variant . ,(delay ptpython-2))))))
9705
9706 (define-public ptpython-2
9707 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9708 (package
9709 (inherit base)
9710 (name "ptpython2"))))
9711
9712 (define-public python-stem
9713 (package
9714 (name "python-stem")
9715 (version "1.7.0")
9716 (source
9717 (origin
9718 (method url-fetch)
9719 (uri (pypi-uri "stem" version))
9720 (sha256
9721 (base32
9722 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9723 (build-system python-build-system)
9724 (arguments
9725 `(#:phases
9726 (modify-phases %standard-phases
9727 (replace 'check
9728 (lambda _
9729 (invoke "./run_tests.py" "--unit")
9730 #t)))))
9731 (native-inputs
9732 `(("python-mock" ,python-mock)
9733 ("python-pycodestyle" ,python-pycodestyle)
9734 ("python-pyflakes" ,python-pyflakes)))
9735 (home-page "https://stem.torproject.org/")
9736 (synopsis
9737 "Python controller library that allows applications to interact with Tor")
9738 (description
9739 "Stem is a Python controller library for Tor. With it you can use Tor's
9740 control protocol to script against the Tor process and read descriptor data
9741 relays publish about themselves.")
9742 (license license:lgpl3)))
9743
9744 (define-public python2-stem
9745 (package-with-python2 python-stem))
9746
9747 (define-public python-pyserial
9748 (package
9749 (name "python-pyserial")
9750 (version "3.1.1")
9751 (source
9752 (origin
9753 (method url-fetch)
9754 (uri (pypi-uri "pyserial" version))
9755 (sha256
9756 (base32
9757 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9758 (build-system python-build-system)
9759 (arguments
9760 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9761 ;; #:phases
9762 ;; (modify-phases %standard-phases
9763 ;; (replace 'check
9764 ;; (lambda _
9765 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9766 (home-page
9767 "https://github.com/pyserial/pyserial")
9768 (synopsis "Python Serial Port Bindings")
9769 (description "@code{pyserial} provide serial port bindings for Python. It
9770 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9771 and/or Xon/Xoff. The port is accessed in RAW mode.")
9772 (license license:bsd-3)))
9773
9774 (define-public python2-pyserial
9775 (package-with-python2 python-pyserial))
9776
9777 (define-public python-kivy
9778 (package
9779 (name "python-kivy")
9780 (version "1.10.1")
9781 (source
9782 (origin
9783 (method url-fetch)
9784 (uri (pypi-uri "Kivy" version))
9785 (file-name (string-append name "-" version ".tar.gz"))
9786 (sha256
9787 (base32
9788 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9789 (build-system python-build-system)
9790 (arguments
9791 `(#:tests? #f ; Tests require many optional packages
9792 #:phases
9793 (modify-phases %standard-phases
9794 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9795 (lambda* (#:key inputs #:allow-other-keys)
9796 (setenv "KIVY_SDL2_PATH"
9797 (string-append (assoc-ref inputs "sdl-union")
9798 "/include/SDL2"))
9799 #t)))))
9800 (native-inputs
9801 `(("git" ,git)
9802 ("pkg-config" ,pkg-config)
9803 ("python-cython" ,python-cython)))
9804 (inputs
9805 `(("gstreamer" ,gstreamer)
9806 ("mesa" ,mesa)
9807 ("sdl-union"
9808 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9809 (home-page "http://kivy.org")
9810 (synopsis
9811 "Multitouch application framework")
9812 (description
9813 "A software library for rapid development of
9814 hardware-accelerated multitouch applications.")
9815 (license license:expat)))
9816
9817 (define-public python2-kivy
9818 (package-with-python2 python-kivy))
9819
9820 (define-public python-kivy-next
9821 (deprecated-package "python-kivy-next" python-kivy))
9822
9823 (define-public python2-kivy-next
9824 (deprecated-package "python2-kivy-next" python2-kivy))
9825
9826 (define-public python-binaryornot
9827 (package
9828 (name "python-binaryornot")
9829 (version "0.4.4")
9830 (source (origin
9831 (method url-fetch)
9832 (uri (pypi-uri "binaryornot" version))
9833 (sha256
9834 (base32
9835 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
9836 (build-system python-build-system)
9837 (propagated-inputs
9838 `(("python-chardet" ,python-chardet)
9839 ("python-hypothesis" ,python-hypothesis)))
9840 (home-page "https://github.com/audreyr/binaryornot")
9841 (synopsis "Package to check if a file is binary or text")
9842 (description "Ultra-lightweight pure Python package to check if a file is
9843 binary or text.")
9844 (license license:bsd-3)
9845 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9846
9847 (define-public python2-binaryornot
9848 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9849 (package (inherit base)
9850 (propagated-inputs
9851 `(("python2-enum34" ,python2-enum34)
9852 ,@(package-propagated-inputs base))))))
9853
9854 (define-public python-nltk
9855 (package
9856 (name "python-nltk")
9857 (version "3.2.1")
9858 (source (origin
9859 (method url-fetch)
9860 (uri (pypi-uri "nltk" version))
9861 (sha256
9862 (base32
9863 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9864 (build-system python-build-system)
9865 (arguments
9866 '(;; The tests require some extra resources to be downloaded.
9867 ;; TODO Try packaging these resources.
9868 #:tests? #f))
9869 (home-page "http://nltk.org/")
9870 (synopsis "Natural Language Toolkit")
9871 (description "It provides interfaces to over 50 corpora and lexical
9872 resources such as WordNet, along with a suite of text processing libraries
9873 for classification, tokenization, stemming, tagging, parsing, and semantic
9874 reasoning, wrappers for natural language processing libraries.")
9875 (license license:asl2.0)))
9876
9877 (define-public python2-nltk
9878 (package-with-python2 python-nltk))
9879
9880 (define-public python-pymongo
9881 (package
9882 (name "python-pymongo")
9883 (version "3.7.2")
9884 (source (origin
9885 (method url-fetch)
9886 (uri (pypi-uri "pymongo" version))
9887 (sha256
9888 (base32
9889 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
9890 (build-system python-build-system)
9891 (propagated-inputs
9892 `(("python-certifi" ,python-certifi)))
9893 (home-page "https://github.com/mongodb/mongo-python-driver")
9894 (synopsis "Python driver for MongoDB")
9895 (description "Python driver for MongoDB.")
9896 (license license:asl2.0)))
9897
9898 (define-public python2-pymongo
9899 (package-with-python2 python-pymongo))
9900
9901 (define-public python-sh
9902 (package
9903 (name "python-sh")
9904 (version "1.11")
9905 (source (origin
9906 (method url-fetch)
9907 (uri (pypi-uri "sh" version))
9908 (sha256
9909 (base32
9910 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9911 (build-system python-build-system)
9912 (arguments
9913 `(#:tests? #f)) ; no tests
9914 (home-page "https://github.com/amoffat/sh")
9915 (synopsis "Python subprocess interface")
9916 (description "Abstracts process invocation by providing a function
9917 interface for programs.")
9918 (license license:expat)))
9919
9920 (define-public python2-sh
9921 (package-with-python2 python-sh))
9922
9923 (define-public python-consul
9924 (package
9925 (name "python-consul")
9926 (version "0.6.1")
9927 (source
9928 (origin
9929 (method url-fetch)
9930 (uri (pypi-uri "python-consul" version))
9931 (sha256
9932 (base32
9933 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9934 (build-system python-build-system)
9935 (arguments
9936 '(#:tests? #f)) ; The tests are not distributed
9937 (propagated-inputs
9938 `(("python-requests" ,python-requests)
9939 ("python-six" ,python-six)))
9940 (home-page "https://github.com/cablehead/python-consul")
9941 (synopsis "Python client for Consul")
9942 (description
9943 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9944 discovery, monitoring and configuration.")
9945 (license license:expat)))
9946
9947 (define-public python2-consul
9948 (package-with-python2 python-consul))
9949
9950 (define-public python-schematics
9951 (package
9952 (name "python-schematics")
9953 (version "1.1.1")
9954 (source
9955 (origin
9956 (method url-fetch)
9957 (uri (string-append
9958 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9959 (file-name (string-append name "-" version ".tar.gz"))
9960 (sha256
9961 (base32
9962 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9963 (build-system python-build-system)
9964 (propagated-inputs
9965 `(("python-six" ,python-six)))
9966 (arguments
9967 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9968 ; version requirements (eg python-coveralls)
9969 (home-page "https://github.com/schematics/schematics")
9970 (synopsis "Python Data Structures for Humans")
9971 (description "Python Data Structures for Humans.")
9972 (license license:bsd-3)))
9973
9974 (define-public python2-schematics
9975 (package-with-python2 python-schematics))
9976
9977 (define-public python-odfpy
9978 (package
9979 (name "python-odfpy")
9980 (version "1.3.3")
9981 (source (origin
9982 (method url-fetch)
9983 (uri (pypi-uri "odfpy" version))
9984 (sha256
9985 (base32
9986 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
9987 (arguments
9988 `(#:modules ((srfi srfi-1)
9989 (guix build python-build-system)
9990 (guix build utils))
9991 #:phases
9992 (modify-phases %standard-phases
9993 (replace 'check
9994 ;; The test runner invokes python2 and python3 for test*.py.
9995 ;; To avoid having both in inputs, we replicate it here.
9996 (lambda _
9997 (every (lambda (test-file)
9998 (zero? (system* "python" test-file)))
9999 (find-files "tests" "^test.*\\.py$")))))))
10000 (build-system python-build-system)
10001 (home-page "https://github.com/eea/odfpy")
10002 (synopsis "Python API and tools to manipulate OpenDocument files")
10003 (description "Collection of libraries and utility programs written in
10004 Python to manipulate OpenDocument 1.2 files.")
10005 (license
10006 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10007 ;; number of files with other licenses.
10008 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10009
10010 (define-public python2-odfpy
10011 (package-with-python2 python-odfpy))
10012
10013 (define-public python-natsort
10014 (package
10015 (name "python-natsort")
10016 (version "5.4.1")
10017 (source (origin
10018 (method url-fetch)
10019 (uri (pypi-uri "natsort" version))
10020 (sha256
10021 (base32
10022 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10023 (build-system python-build-system)
10024 (arguments
10025 `(#:modules ((guix build utils)
10026 (guix build python-build-system)
10027 (srfi srfi-1)
10028 (srfi srfi-26)
10029 (ice-9 ftw))
10030 #:phases
10031 (modify-phases %standard-phases
10032 (add-before 'check 'set-cachedir
10033 ;; Tests require write access to $HOME by default
10034 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10035 (replace 'check
10036 (lambda _
10037 (let ((cwd (getcwd)))
10038 (setenv "PYTHONPATH"
10039 (string-append
10040 cwd "/build/"
10041 (find (cut string-prefix? "lib" <>)
10042 (scandir (string-append cwd "/build")))
10043 ":"
10044 (getenv "PYTHONPATH")))
10045 (invoke "pytest" "-v")))))))
10046 (native-inputs
10047 `(("python-hypothesis" ,python-hypothesis)
10048 ("python-pytest-cov" ,python-pytest-cov)
10049 ("python-pytest-mock" ,python-pytest-mock)
10050 ("python-pytest" ,python-pytest)))
10051 (propagated-inputs ; TODO: Add python-fastnumbers.
10052 `(("python-pyicu" ,python-pyicu)))
10053 (home-page "https://github.com/SethMMorton/natsort")
10054 (synopsis "Natural sorting for python and shell")
10055 (description
10056 "Natsort lets you apply natural sorting on lists instead of
10057 lexicographical. If you use the built-in @code{sorted} method in python
10058 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10059 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10060 function @code{natsorted} that identifies numbers and sorts them separately
10061 from strings. It can also sort version numbers, real numbers, mixed types
10062 and more, and comes with a shell command @command{natsort} that exposes this
10063 functionality in the command line.")
10064 (license license:expat)
10065 (properties `((python2-variant . ,(delay python2-natsort))))))
10066
10067 (define-public python2-natsort
10068 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10069 (package (inherit base)
10070 (native-inputs
10071 `(("python2-pathlib" ,python2-pathlib)
10072 ,@(package-native-inputs base))))))
10073
10074 (define-public python-glances
10075 (package
10076 (name "python-glances")
10077 (version "3.0.2")
10078 (source
10079 (origin
10080 (method url-fetch)
10081 (uri (pypi-uri "Glances" version))
10082 (sha256
10083 (base32
10084 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10085 (build-system python-build-system)
10086 (propagated-inputs
10087 `(("python-psutil" ,python-psutil)))
10088 (home-page
10089 "https://github.com/nicolargo/glances")
10090 (synopsis
10091 "A cross-platform curses-based monitoring tool")
10092 (description
10093 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10094 Glances uses the PsUtil library to get information from your system. It monitors
10095 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10096 (license license:lgpl3+)))
10097
10098 (define-public python2-glances
10099 (package-with-python2 python-glances))
10100
10101 (define-public python-graphql-core
10102 (package
10103 (name "python-graphql-core")
10104 (version "0.5.3")
10105 (source
10106 (origin
10107 (method url-fetch)
10108 (uri (pypi-uri "graphql-core" version))
10109 (sha256
10110 (base32
10111 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10112 (build-system python-build-system)
10113 (arguments
10114 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10115 #:phases
10116 (modify-phases %standard-phases
10117 (add-after 'unpack 'patch-hardcoded-version
10118 (lambda _ (substitute*
10119 "setup.py"
10120 (("'gevent==1.1rc1'") "'gevent'"))
10121 #t)))))
10122 (native-inputs
10123 `(("python-gevent" ,python-gevent)
10124 ("python-mock" ,python-mock)
10125 ("python-pytest-mock" ,python-pytest-mock)))
10126 (propagated-inputs
10127 `(("python-promise" ,python-promise)
10128 ("python-six" ,python-six)))
10129 (home-page "https://github.com/graphql-python/graphql-core")
10130 (synopsis "GraphQL implementation for Python")
10131 (description
10132 "GraphQL implementation for Python. GraphQL is a data query language and
10133 runtime designed and used to request and deliver data to mobile and web apps.
10134 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10135 to Python.")
10136 (license license:expat)))
10137
10138 (define-public python2-graphql-core
10139 (package-with-python2 python-graphql-core))
10140
10141 (define-public python-graphql-relay
10142 (package
10143 (name "python-graphql-relay")
10144 (version "0.4.5")
10145 (source
10146 (origin
10147 (method url-fetch)
10148 (uri (pypi-uri "graphql-relay" version))
10149 (sha256
10150 (base32
10151 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10152 (build-system python-build-system)
10153 (arguments
10154 '(#:tests? #f)) ; The tests are not distributed
10155 (propagated-inputs
10156 `(("python-graphql-core" ,python-graphql-core)
10157 ("python-promise" ,python-promise)
10158 ("python-six" ,python-six)))
10159 (home-page "https://github.com/graphql-python/graphql-relay-py")
10160 (synopsis "Relay implementation for Python")
10161 (description
10162 "This is a library to allow the easy creation of Relay-compliant servers
10163 using the GraphQL Python reference implementation of a GraphQL server. It
10164 should be noted that the code is a exact port of the original
10165 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10166 from Facebook.")
10167 (license license:expat)))
10168
10169 (define-public python2-graphql-relay
10170 (package-with-python2 python-graphql-relay))
10171
10172 (define-public python-graphene
10173 (package
10174 (name "python-graphene")
10175 (version "0.10.2")
10176 (source
10177 (origin
10178 (method url-fetch)
10179 (uri (pypi-uri "graphene" version))
10180 (sha256
10181 (base32
10182 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10183 (build-system python-build-system)
10184 (propagated-inputs
10185 `(("python-graphql-core" ,python-graphql-core)
10186 ("python-graphql-relay" ,python-graphql-relay)
10187 ("python-iso8601" ,python-iso8601)
10188 ("python-promise" ,python-promise)
10189 ("python-six" ,python-six)))
10190 (arguments
10191 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10192 (home-page "http://graphene-python.org/")
10193 (synopsis "GraphQL Framework for Python")
10194 (description
10195 "Graphene is a Python library for building GraphQL schemas/types.
10196 A GraphQL schema describes your data model, and provides a GraphQL server
10197 with an associated set of resolve methods that know how to fetch data.")
10198 (properties `((python2-variant . ,(delay python2-graphene))))
10199 (license license:expat)))
10200
10201 (define-public python2-graphene
10202 (let ((base (package-with-python2
10203 (strip-python2-variant python-graphene))))
10204 (package (inherit base)
10205 (native-inputs
10206 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10207 ,@(package-native-inputs base))))))
10208
10209 (define-public python-nautilus
10210 (package
10211 (name "python-nautilus")
10212 (version "0.4.9")
10213 (source
10214 (origin
10215 (method url-fetch)
10216 (uri (pypi-uri "nautilus" version))
10217 (sha256
10218 (base32
10219 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10220 (build-system python-build-system)
10221 (arguments `(#:tests? #f)) ; fails to import test modules
10222 (propagated-inputs
10223 `(("python-bcrypt" ,python-bcrypt)
10224 ("python-click" ,python-click)
10225 ("python-consul" ,python-consul)
10226 ("python-graphene" ,python-graphene)
10227 ("python-jinja2" ,python-jinja2)
10228 ("python-peewee" ,python-peewee)
10229 ("python-pika" ,python-pika)
10230 ("python-tornado" ,python-tornado)
10231 ("python-wtforms" ,python-wtforms)))
10232 (native-inputs
10233 `(("python-nose2" ,python-nose2)))
10234 (home-page "https://github.com/AlecAivazis/nautilus")
10235 (synopsis "Library for creating microservice applications")
10236 (description
10237 "Nautilus is a framework for flux based microservices that looks to
10238 provide extendible implementations of common aspects of a cloud so that you can
10239 focus on building massively scalable web applications.")
10240 (license license:expat)))
10241
10242 (define-public python-snowballstemmer
10243 (package
10244 (name "python-snowballstemmer")
10245 (version "1.2.1")
10246 (source (origin
10247 (method url-fetch)
10248 (uri (pypi-uri "snowballstemmer" version))
10249 (sha256
10250 (base32
10251 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10252 (build-system python-build-system)
10253 (arguments
10254 `(;; No tests exist
10255 #:tests? #f))
10256 (home-page "https://github.com/shibukawa/snowball_py")
10257 (synopsis "Snowball stemming library collection for Python")
10258 (description "This package provides 16 word stemmer algorithms generated
10259 from Snowball algorithms. It includes the 15 original ones plus the Poerter
10260 English stemmer.")
10261 (license license:bsd-3)))
10262
10263 (define-public python2-snowballstemmer
10264 (package-with-python2 python-snowballstemmer))
10265
10266 (define-public python-sphinx-cloud-sptheme
10267 (package
10268 (name "python-sphinx-cloud-sptheme")
10269 (version "1.8.0")
10270 (source (origin
10271 (method url-fetch)
10272 (uri (pypi-uri "cloud_sptheme" version))
10273 (sha256
10274 (base32
10275 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10276 (build-system python-build-system)
10277 ;; FIXME: The 'pypi' release archive does not contain tests.
10278 (arguments '(#:tests? #f))
10279 (native-inputs
10280 `(("python-sphinx" ,python-sphinx)))
10281 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10282 (synopsis "'Cloud' theme for Sphinx documenter")
10283 (description "This package contains the \"Cloud\" theme for Sphinx and some
10284 related extensions.")
10285 (license license:bsd-3)))
10286
10287 (define-public python2-sphinx-cloud-sptheme
10288 (package-with-python2 python-sphinx-cloud-sptheme))
10289
10290 (define-public python-sphinx-alabaster-theme
10291 (package
10292 (name "python-sphinx-alabaster-theme")
10293 (version "0.7.12")
10294 (source (origin
10295 (method url-fetch)
10296 (uri (pypi-uri "alabaster" version))
10297 (sha256
10298 (base32
10299 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10300 (build-system python-build-system)
10301 (propagated-inputs
10302 `(("python-pygments" ,python-pygments)))
10303 (home-page "https://alabaster.readthedocs.io/")
10304 (synopsis "Configurable sidebar-enabled Sphinx theme")
10305 (description "Alabaster is a visually (c)lean, responsive, configurable
10306 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10307 (license license:bsd-3)))
10308
10309 (define-public python2-sphinx-alabaster-theme
10310 (package-with-python2 python-sphinx-alabaster-theme))
10311
10312 (define-public python-setproctitle
10313 (package
10314 (name "python-setproctitle")
10315 (version "1.1.10")
10316 (source
10317 (origin
10318 (method url-fetch)
10319 (uri (pypi-uri "setproctitle" version))
10320 (sha256
10321 (base32
10322 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10323 (build-system python-build-system)
10324 (arguments
10325 '(#:phases
10326 (modify-phases %standard-phases
10327 (add-before 'check 'patch-Makefile
10328 ;; Stricly this is only required for the python2 variant.
10329 ;; But adding a phase in an inherited package seems to be
10330 ;; cumbersum. So we patch even for python3.
10331 (lambda _
10332 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10333 (when nose
10334 (substitute* "Makefile"
10335 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10336 (string-append nose "/bin/nosetests "))))
10337 #t)))
10338 (replace 'check
10339 (lambda _
10340 (setenv "PYTHON" (or (which "python3") (which "python")))
10341 (setenv "PYCONFIG" (or (which "python3-config")
10342 (which "python-config")))
10343 (setenv "CC" "gcc")
10344 ;; No need to extend PYTHONPATH to find the built package, since
10345 ;; the Makefile will build anyway
10346 (invoke "make" "check"))))))
10347 (native-inputs
10348 `(("procps" ,procps))) ; required for tests
10349 (home-page
10350 "https://github.com/dvarrazzo/py-setproctitle")
10351 (synopsis
10352 "Setproctitle implementation for Python to customize the process title")
10353 (description "The library allows a process to change its title (as displayed
10354 by system tools such as ps and top).
10355
10356 Changing the title is mostly useful in multi-process systems, for
10357 example when a master process is forked: changing the children's title
10358 allows to identify the task each process is busy with. The technique
10359 is used by PostgreSQL and the OpenSSH Server for example.")
10360 (license license:bsd-3)
10361 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10362
10363 (define-public python2-setproctitle
10364 (let ((base (package-with-python2
10365 (strip-python2-variant python-setproctitle))))
10366 (package
10367 (inherit base)
10368 (native-inputs `(("python2-nose" ,python2-nose)
10369 ,@(package-native-inputs base))))))
10370
10371 (define-public python-validictory
10372 (package
10373 (name "python-validictory")
10374 (version "1.0.1")
10375 (source
10376 (origin
10377 (method url-fetch)
10378 (uri (pypi-uri "validictory" version))
10379 (sha256
10380 (base32
10381 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10382 (build-system python-build-system)
10383 (arguments
10384 '(#:phases
10385 (modify-phases %standard-phases
10386 (add-after 'unpack 'bootstrap
10387 ;; Move the tests out of the package directory to avoid
10388 ;; packaging them.
10389 (lambda* _
10390 (rename-file "validictory/tests" "tests")
10391 (delete-file "tests/__init__.py")))
10392 (replace 'check
10393 (lambda _
10394 ;; Extend PYTHONPATH so the built package will be found.
10395 (setenv "PYTHONPATH"
10396 (string-append (getcwd) "/build/lib:"
10397 (getenv "PYTHONPATH")))
10398 (zero? (system* "py.test" "-vv" )))))))
10399 (native-inputs
10400 `(("python-pytest" ,python-pytest)))
10401 (home-page
10402 "https://github.com/jamesturk/validictory")
10403 (synopsis "General purpose Python data validator")
10404 (description "It allows validation of arbitrary Python data structures.
10405
10406 The schema format is based on the JSON Schema
10407 proposal (http://json-schema.org), so combined with json the library is also
10408 useful as a validator for JSON data.")
10409 (license license:expat)))
10410
10411 (define-public python2-validictory
10412 (package-with-python2 python-validictory))
10413
10414 (define-public python-pyelftools
10415 (package
10416 (name "python-pyelftools")
10417 (version "0.25")
10418 (source
10419 (origin
10420 (method url-fetch)
10421 (uri (pypi-uri "pyelftools" version))
10422 (sha256
10423 (base32
10424 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10425 (build-system python-build-system)
10426 (arguments
10427 `(#:phases
10428 (modify-phases %standard-phases
10429 (add-before 'check 'set-pythonpath
10430 (lambda _
10431 (setenv "PYTHONPATH"
10432 (string-append
10433 (getcwd) "/test/"
10434 ":" (getenv "PYTHONPATH")))
10435 #t)))))
10436 (home-page
10437 "https://github.com/eliben/pyelftools")
10438 (synopsis
10439 "Analyze binary and library file information")
10440 (description "This Python library provides interfaces for parsing and
10441 analyzing two binary and library file formats; the Executable and Linking
10442 Format (ELF), and debugging information in the Debugging With Attributed
10443 Record Format (DWARF).")
10444 (license license:public-domain)))
10445
10446 (define-public python-pyev
10447 (package
10448 (name "python-pyev")
10449 (version "0.9.0")
10450 (source
10451 (origin
10452 (method url-fetch)
10453 (uri (pypi-uri "pyev" version))
10454 (sha256
10455 (base32
10456 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10457 (build-system python-build-system)
10458 (arguments
10459 `(#:tests? #f ; no test suite
10460 #:phases
10461 (modify-phases %standard-phases
10462 (add-after 'unpack 'patch
10463 (lambda* (#:key inputs #:allow-other-keys)
10464 (let ((libev (string-append (assoc-ref inputs "libev")
10465 "/lib/libev.so.4")))
10466 (substitute* "setup.py"
10467 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10468 (string-append "libev_dll_name = \"" libev "\"")))))))))
10469 (inputs
10470 `(("libev" ,libev)))
10471 (home-page "http://pythonhosted.org/pyev/")
10472 (synopsis "Python libev interface")
10473 (description "Pyev provides a Python interface to libev.")
10474 (license license:gpl3)))
10475
10476 (define-public python2-pyev
10477 (package-with-python2 python-pyev))
10478
10479 (define-public python-imagesize
10480 (package
10481 (name "python-imagesize")
10482 (version "1.1.0")
10483 (source
10484 (origin
10485 (method url-fetch)
10486 (uri (pypi-uri "imagesize" version))
10487 (sha256
10488 (base32
10489 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10490 (build-system python-build-system)
10491 (home-page "https://github.com/shibukawa/imagesize_py")
10492 (synopsis "Gets image size of files in various formats in Python")
10493 (description
10494 "This package allows determination of image size from
10495 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10496 (license license:expat)))
10497
10498 (define-public python2-imagesize
10499 (package-with-python2 python-imagesize))
10500
10501 (define-public python-termstyle
10502 (package
10503 (name "python-termstyle")
10504 (version "0.1.11")
10505 (source
10506 (origin
10507 (method url-fetch)
10508 (uri (pypi-uri "termstyle" version))
10509 (sha256
10510 (base32
10511 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10512 (build-system python-build-system)
10513 (arguments
10514 '(#:phases
10515 (modify-phases %standard-phases
10516 (replace 'check
10517 (lambda _
10518 (zero? (system* "python" "test3.py")))))))
10519 (home-page "https://github.com/gfxmonk/termstyle")
10520 (synopsis "Console text coloring for Python")
10521 (description "This package provides console text coloring for Python.")
10522 (license license:bsd-3)))
10523
10524 (define-public python-argcomplete
10525 (package
10526 (name "python-argcomplete")
10527 (version "1.7.0")
10528 (source
10529 (origin
10530 (method url-fetch)
10531 (uri (pypi-uri "argcomplete" version))
10532 (sha256
10533 (base32
10534 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10535 (build-system python-build-system)
10536 (native-inputs
10537 `(("python-pexpect" ,python-pexpect)
10538 ("tcsh" ,tcsh)
10539 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10540 (home-page "https://github.com/kislyuk/argcomplete")
10541 (synopsis "Shell tab completion for Python argparse")
10542 (description "argcomplete provides extensible command line tab completion
10543 of arguments and options for Python scripts using @code{argparse}. It's
10544 particularly useful for programs with many options or sub-parsers that can
10545 dynamically suggest completions; for example, when browsing resources over the
10546 network.")
10547 (license license:asl2.0)))
10548
10549 (define-public python2-argcomplete
10550 (package-with-python2 python-argcomplete))
10551
10552 (define-public python-xopen
10553 (package
10554 (name "python-xopen")
10555 (version "0.3.3")
10556 (source
10557 (origin
10558 (method url-fetch)
10559 (uri (pypi-uri "xopen" version))
10560 (sha256
10561 (base32
10562 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10563 (file-name (string-append name "-" version ".tar.gz"))))
10564 (build-system python-build-system)
10565 (home-page "https://github.com/marcelm/xopen/")
10566 (synopsis "Open compressed files transparently")
10567 (description "This module provides an @code{xopen} function that works like
10568 Python's built-in @code{open} function, but can also deal with compressed files.
10569 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10570 recognized by their file extensions. The focus is on being as efficient as
10571 possible on all supported Python versions.")
10572 (license license:expat)))
10573
10574 (define-public python2-xopen
10575 (let ((base (package-with-python2
10576 (strip-python2-variant python-xopen))))
10577 (package
10578 (inherit base)
10579 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10580 ,@(package-propagated-inputs base))))))
10581
10582 (define-public python-cheetah
10583 (package
10584 (name "python-cheetah")
10585 (version "3.1.0")
10586 (source
10587 (origin
10588 (method url-fetch)
10589 (uri (pypi-uri "Cheetah3" version))
10590 (sha256
10591 (base32
10592 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10593 (build-system python-build-system)
10594 (arguments
10595 `(#:modules ((guix build utils)
10596 (guix build python-build-system)
10597 (ice-9 ftw)
10598 (srfi srfi-1)
10599 (srfi srfi-26))
10600 #:phases (modify-phases %standard-phases
10601 (add-after 'unpack 'use-absolute-python
10602 (lambda _
10603 (substitute* "Cheetah/CheetahWrapper.py"
10604 (("#!/usr/bin/env python")
10605 (string-append "#!" (which "python"))))
10606 #t))
10607 (replace 'check
10608 (lambda _
10609 (let ((cwd (getcwd)))
10610 (setenv "PYTHONPATH"
10611 (string-append
10612 cwd "/build/"
10613 (find (cut string-prefix? "lib" <>)
10614 (scandir (string-append cwd "/build")))
10615 ":" (getenv "PYTHONPATH")))
10616 (setenv "PATH"
10617 (string-append (getenv "PATH")
10618 ":" cwd "/bin"))
10619 (setenv "TMPDIR" "/tmp")
10620
10621 (substitute* "Cheetah/Tests/Test.py"
10622 (("unittest.TextTestRunner\\(\\)")
10623 "unittest.TextTestRunner(verbosity=2)"))
10624
10625 (invoke "python" "Cheetah/Tests/Test.py")))))))
10626 (propagated-inputs
10627 `(("python-markdown" ,python-markdown))) ;optional
10628 (home-page "http://cheetahtemplate.org/")
10629 (synopsis "Template engine")
10630 (description "Cheetah is a text-based template engine and Python code
10631 generator.
10632
10633 Cheetah can be used as a standalone templating utility or referenced as
10634 a library from other Python applications. It has many potential uses,
10635 but web developers looking for a viable alternative to ASP, JSP, PHP and
10636 PSP are expected to be its principle user group.
10637
10638 Features:
10639 @enumerate
10640 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10641 text-based format.
10642 @item Cleanly separates content, graphic design, and program code.
10643 @item Blends the power and flexibility of Python with a simple template language
10644 that non-programmers can understand.
10645 @item Gives template writers full access to any Python data structure, module,
10646 function, object, or method in their templates.
10647 @item Makes code reuse easy by providing an object-orientated interface to
10648 templates that is accessible from Python code or other Cheetah templates.
10649 One template can subclass another and selectively reimplement sections of it.
10650 @item Provides a simple, yet powerful, caching mechanism that can dramatically
10651 improve the performance of a dynamic website.
10652 @item Compiles templates into optimized, yet readable, Python code.
10653 @end enumerate")
10654 (license (license:x11-style "file://LICENSE"))))
10655
10656 (define-public python2-cheetah
10657 (package-with-python2 python-cheetah))
10658
10659 (define-public python-dulwich
10660 (package
10661 (name "python-dulwich")
10662 (version "0.18.6")
10663 (source
10664 (origin
10665 (method url-fetch)
10666 (uri (list (string-append "https://www.dulwich.io/releases/"
10667 "dulwich-" version ".tar.gz")
10668 (pypi-uri "dulwich" version)))
10669 (sha256
10670 (base32
10671 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10672 (build-system python-build-system)
10673 (arguments
10674 `(#:phases
10675 (modify-phases %standard-phases
10676 (add-before 'check 'fix-tests
10677 (lambda* (#:key inputs #:allow-other-keys)
10678 ;; The tests use Popen with a custom environment which doesn't
10679 ;; include PATH.
10680 (substitute* "dulwich/tests/compat/utils.py"
10681 (("'git'") (string-append "'"
10682 (which "git")
10683 "'")))
10684 (substitute* '("dulwich/tests/test_repository.py"
10685 "dulwich/tests/test_hooks.py")
10686 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10687 (setenv "TEST_RUNNER" "unittest")
10688 (setenv "PYTHONHASHSEED" "random")
10689 #t)))))
10690 (propagated-inputs
10691 `(("python-fastimport" ,python-fastimport)))
10692 (native-inputs
10693 `(("python-mock" ,python-mock)
10694 ("python-geventhttpclient" ,python-geventhttpclient)
10695 ("git" ,git)))
10696 (home-page "https://www.dulwich.io/")
10697 (synopsis "Git implementation in Python")
10698 (description "Dulwich is an implementation of the Git file formats and
10699 protocols written in pure Python.")
10700 ;; Can be used with either license.
10701 (license (list license:asl2.0 license:gpl2+))))
10702
10703 (define-public python2-dulwich
10704 (package-with-python2 python-dulwich))
10705
10706 (define-public python-pbkdf2
10707 (package
10708 (name "python-pbkdf2")
10709 (version "1.3")
10710 (source
10711 (origin
10712 (method url-fetch)
10713 (uri (pypi-uri "pbkdf2" version))
10714 (sha256
10715 (base32
10716 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10717 (build-system python-build-system)
10718 (arguments
10719 '(#:phases
10720 (modify-phases %standard-phases
10721 (replace 'check
10722 (lambda _
10723 (setenv "PYTHONPATH"
10724 (string-append (getcwd) "/build/lib:"
10725 (getenv "PYTHONPATH")))
10726 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10727 (propagated-inputs
10728 `(("python-pycrypto" ,python-pycrypto))) ; optional
10729 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10730 (synopsis "Password-based key derivation")
10731 (description "This module implements the password-based key derivation
10732 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10733
10734 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10735 is part of the RSA Public Key Cryptography Standards series. The provided
10736 implementation takes a password or a passphrase and a salt value (and
10737 optionally a iteration count, a digest module, and a MAC module) and provides
10738 a file-like object from which an arbitrarly-sized key can be read.")
10739 (license license:expat)))
10740
10741 (define-public python2-pbkdf2
10742 (package-with-python2 python-pbkdf2))
10743
10744 (define-public python-qrcode
10745 (package
10746 (name "python-qrcode")
10747 (version "6.0")
10748 (source
10749 (origin
10750 (method url-fetch)
10751 (uri (pypi-uri "qrcode" version))
10752 (sha256
10753 (base32
10754 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10755 (build-system python-build-system)
10756 (arguments
10757 ;; FIXME: Tests require packaging 'pymaging'.
10758 '(#:tests? #f))
10759 (propagated-inputs
10760 `(("python-lxml" ,python-lxml) ; for SVG output
10761 ("python-pillow" ,python-pillow) ; for PNG output
10762 ("python-six" ,python-six)))
10763 (inputs
10764 `(;; The setup.cfg file needs to be used, and support for this requires
10765 ;; at least version 30.3.0 of setuptools
10766 ("python-setuptools" ,python-setuptools)))
10767 (home-page "https://github.com/lincolnloop/python-qrcode")
10768 (synopsis "QR Code image generator")
10769 (description "This package provides a pure Python QR Code generator
10770 module. It uses the Python Imaging Library (PIL) to allow for the generation
10771 of QR Codes.
10772
10773 In addition this package provides a command line tool to generate QR codes and
10774 either write these QR codes to a file or do the output as ascii art at the
10775 console.")
10776 (license license:bsd-3)))
10777
10778 (define-public python2-qrcode
10779 (package-with-python2 python-qrcode))
10780
10781 (define-public python-rst2ansi
10782 (package
10783 (name "python-rst2ansi")
10784 (version "0.1.5")
10785 (source
10786 (origin
10787 (method url-fetch)
10788 (uri (pypi-uri "rst2ansi" version))
10789 (sha256
10790 (base32
10791 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10792 (build-system python-build-system)
10793 (propagated-inputs
10794 `(("python-docutils" ,python-docutils)))
10795 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10796 (synopsis "Convert RST to ANSI-decorated console output")
10797 (description
10798 "Python module dedicated to rendering RST (reStructuredText) documents
10799 to ansi-escaped strings suitable for display in a terminal.")
10800 (license license:expat)))
10801
10802 (define-public python-ansi2html
10803 (package
10804 (name "python-ansi2html")
10805 (version "1.2.0")
10806 (source
10807 (origin
10808 (method url-fetch)
10809 (uri (pypi-uri "ansi2html" version))
10810 (sha256
10811 (base32
10812 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10813 (build-system python-build-system)
10814 (native-inputs
10815 `(("python-mock" ,python-mock)
10816 ("python-nose" ,python-nose)))
10817 (propagated-inputs
10818 `(("python-six" ,python-six)))
10819 (home-page "https://github.com/ralphbean/ansi2html")
10820 (synopsis "Convert ANSI-decorated console output to HTML")
10821 (description
10822 "@command{ansi2html} is a Python library and command line utility for
10823 convering text with ANSI color codes to HTML or LaTeX.")
10824 (license license:gpl3+)))
10825
10826 (define-public python2-ansi2html
10827 (package-with-python2 python-ansi2html))
10828
10829 (define-public python-ddt
10830 (package
10831 (name "python-ddt")
10832 (version "1.1.3")
10833 (source
10834 (origin
10835 (method url-fetch)
10836 (uri (pypi-uri "ddt" version))
10837 (sha256
10838 (base32
10839 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10840 (build-system python-build-system)
10841 (native-inputs
10842 `(("python-mock" ,python-mock)
10843 ("python-nose" ,python-nose)))
10844 (propagated-inputs
10845 `(("python-six" ,python-six)
10846 ("python-pyyaml" ,python-pyyaml)))
10847 (home-page "https://github.com/txels/ddt")
10848 (synopsis "Data-Driven Tests")
10849 (description
10850 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10851 running it with different test data, and make it appear as multiple test
10852 cases.")
10853 (license license:expat)))
10854
10855 (define-public python2-ddt
10856 (package-with-python2 python-ddt))
10857
10858 (define-public python-pycountry
10859 (package
10860 (name "python-pycountry")
10861 (version "18.5.26")
10862 (source
10863 (origin
10864 (method url-fetch)
10865 (uri (pypi-uri "pycountry" version))
10866 (sha256
10867 (base32
10868 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10869 (build-system python-build-system)
10870 (home-page "https://bitbucket.org/flyingcircus/pycountry")
10871 (synopsis "ISO databases for languages, countries, currencies, etc.")
10872 (description
10873 "@code{pycountry} provides the ISO databases for the standards:
10874 @enumerate
10875 @item 639-3 (Languages)
10876 @item 3166 (Countries)
10877 @item 3166-3 (Deleted Countries)
10878 @item 3166-2 (Subdivisions of countries)
10879 @item 4217 (Currencies)
10880 @item 15924 (Scripts)
10881 @end enumerate
10882 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
10883 through a Python API.")
10884 (license license:lgpl2.1+)))
10885
10886 (define-public python2-pycountry
10887 (package-with-python2 python-pycountry))
10888
10889 (define-public python-pycosat
10890 (package
10891 (name "python-pycosat")
10892 (version "0.6.1")
10893 (source
10894 (origin
10895 (method url-fetch)
10896 (uri (pypi-uri "pycosat" version))
10897 (sha256
10898 (base32
10899 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10900 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10901 (build-system python-build-system)
10902 (home-page "https://github.com/ContinuumIO/pycosat")
10903 (synopsis "Bindings to picosat (a SAT solver)")
10904 (description
10905 "This package provides efficient Python bindings to @code{picosat} on
10906 the C level. When importing pycosat, the @code{picosat} solver becomes part
10907 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10908 Problem} (SAT) solver.")
10909 (license license:expat)))
10910
10911 (define-public python2-pycosat
10912 (package-with-python2 python-pycosat))
10913
10914 (define-public python2-ruamel.ordereddict
10915 (package
10916 (name "python2-ruamel.ordereddict")
10917 (version "0.4.9")
10918 (source
10919 (origin
10920 (method url-fetch)
10921 (uri (pypi-uri "ruamel.ordereddict" version))
10922 (sha256
10923 (base32
10924 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10925 (build-system python-build-system)
10926 (arguments
10927 `(#:python ,python-2
10928 #:phases
10929 (modify-phases %standard-phases
10930 (delete 'check)
10931 (add-after 'install 'check
10932 (lambda* (#:key inputs outputs #:allow-other-keys)
10933 (add-installed-pythonpath inputs outputs)
10934 (zero? (system* "python" "test/testordereddict.py")))))))
10935 (home-page "https://bitbucket.org/ruamel/ordereddict")
10936 (synopsis "Version of dict that keeps keys in insertion order")
10937 (description
10938 "This is an implementation of an ordered dictionary with @dfn{Key
10939 Insertion Order} (KIO: updates of values do not affect the position of the
10940 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10941 removed and put at the back). The standard library module @code{OrderedDict},
10942 implemented later, implements a subset of @code{ordereddict} functionality.
10943 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10944 Order} (KSO, no sorting function can be specified, but a transform can be
10945 specified to apply on the key before comparison (e.g. @code{string.lower})).")
10946 (license license:expat)))
10947
10948 (define-public python-pypeg2
10949 (package
10950 (name "python-pypeg2")
10951 (version "2.15.2")
10952 (source
10953 (origin
10954 (method url-fetch)
10955 (uri (pypi-uri "pyPEG2" version))
10956 (sha256
10957 (base32
10958 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10959 (build-system python-build-system)
10960 (propagated-inputs `(("python-lxml" ,python-lxml)))
10961 (arguments
10962 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10963 '(#:tests? #f))
10964 (home-page "https://fdik.org/pyPEG/")
10965 (synopsis "Parsering Expression Grammars in Python")
10966 (description "PyPEG is an intrinsic parser interpreter framework for
10967 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10968 parse many formal languages.")
10969 (license license:gpl2)))
10970
10971 (define-public python-incremental
10972 (package
10973 (name "python-incremental")
10974 (version "17.5.0")
10975 (source
10976 (origin
10977 (method url-fetch)
10978 (uri (pypi-uri "incremental" version))
10979 (sha256
10980 (base32
10981 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10982 (build-system python-build-system)
10983 (home-page "https://github.com/hawkowl/incremental")
10984 (synopsis "Library for versioning Python projects")
10985 (description "Incremental is a small library that versions your Python
10986 projects.")
10987 (license license:expat)))
10988
10989 (define-public python2-incremental
10990 (package-with-python2 python-incremental))
10991
10992 (define-public python-invoke
10993 (package
10994 (name "python-invoke")
10995 (home-page "http://www.pyinvoke.org/")
10996 (version "1.1.0")
10997 (source (origin
10998 (method url-fetch)
10999 (uri (pypi-uri "invoke" version))
11000 (sha256
11001 (base32
11002 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11003 (build-system python-build-system)
11004 (arguments
11005 ;; XXX: Requires many dependencies that are not yet in Guix.
11006 `(#:tests? #f))
11007 (synopsis "Pythonic task execution")
11008 (description
11009 "Invoke is a Python task execution tool and library, drawing inspiration
11010 from various sources to arrive at a powerful and clean feature set. It is
11011 evolved from the Fabric project, but focuses on local and abstract concerns
11012 instead of servers and network commands.")
11013 (license license:bsd-3)))
11014
11015 (define-public python2-invoke
11016 (package-with-python2 python-invoke))
11017
11018 (define-public python-automat
11019 (package
11020 (name "python-automat")
11021 (version "0.6.0")
11022 (source (origin
11023 (method url-fetch)
11024 (uri (pypi-uri "Automat" version))
11025 (sha256
11026 (base32
11027 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11028 (build-system python-build-system)
11029 ;; We disable the tests because they require python-twisted, while
11030 ;; python-twisted depends on python-automat. Twisted is optional, but the
11031 ;; tests fail if it is not available. Also see
11032 ;; <https://github.com/glyph/automat/issues/71>.
11033 (arguments '(#:tests? #f))
11034 (native-inputs
11035 `(("python-m2r" ,python-m2r)
11036 ("python-setuptools-scm" ,python-setuptools-scm)
11037 ("python-graphviz" ,python-graphviz)))
11038 (propagated-inputs
11039 `(("python-six" ,python-six)
11040 ("python-attrs" ,python-attrs)))
11041 (home-page "https://github.com/glyph/Automat")
11042 (synopsis "Self-service finite-state machines")
11043 (description "Automat is a library for concise, idiomatic Python
11044 expression of finite-state automata (particularly deterministic finite-state
11045 transducers).")
11046 (license license:expat)))
11047
11048 (define-public python2-automat
11049 (package-with-python2 python-automat))
11050
11051 (define-public python-m2r
11052 (package
11053 (name "python-m2r")
11054 (version "0.1.12")
11055 (source (origin
11056 (method url-fetch)
11057 (uri (pypi-uri "m2r" version))
11058 (sha256
11059 (base32
11060 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11061 (build-system python-build-system)
11062 (propagated-inputs
11063 `(("python-docutils" ,python-docutils)
11064 ("python-mistune" ,python-mistune)))
11065 (native-inputs
11066 `(("python-pygments" ,python-pygments)
11067 ("python-mock" ,python-mock)))
11068 (home-page "https://github.com/miyakogi/m2r")
11069 (synopsis "Markdown to reStructuredText converter")
11070 (description "M2R converts a markdown file including reST markups to valid
11071 reST format.")
11072 (license license:expat)))
11073
11074 (define-public python2-m2r
11075 (package-with-python2 python-m2r))
11076
11077 (define-public python-constantly
11078 (package
11079 (name "python-constantly")
11080 (version "15.1.0")
11081 (source (origin
11082 (method url-fetch)
11083 (uri (pypi-uri "constantly" version))
11084 (sha256
11085 (base32
11086 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11087 (build-system python-build-system)
11088 (home-page "https://github.com/twisted/constantly")
11089 (synopsis "Symbolic constants in Python")
11090 (description "Constantly is a Python library that provides symbolic
11091 constant support. It includes collections and constants with text, numeric,
11092 and bit flag values.")
11093 (license license:expat)))
11094
11095 (define-public python2-constantly
11096 (package-with-python2 python-constantly))
11097
11098 (define-public python-attrs
11099 (package
11100 (name "python-attrs")
11101 (version "18.2.0")
11102 (source (origin
11103 (method url-fetch)
11104 (uri (pypi-uri "attrs" version))
11105 (sha256
11106 (base32
11107 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11108 (build-system python-build-system)
11109 (arguments
11110 `(#:modules ((guix build utils)
11111 (guix build python-build-system)
11112 (ice-9 ftw)
11113 (srfi srfi-1)
11114 (srfi srfi-26))
11115 #:phases (modify-phases %standard-phases
11116 (replace 'check
11117 (lambda _
11118 (let ((cwd (getcwd)))
11119 (setenv "PYTHONPATH"
11120 (string-append
11121 cwd "/build/"
11122 (find (cut string-prefix? "lib" <>)
11123 (scandir (string-append cwd "/build")))
11124 ":"
11125 (getenv "PYTHONPATH")))
11126 (invoke "python" "-m" "pytest")))))))
11127 (native-inputs
11128 `(("python-coverage" ,python-coverage)
11129 ("python-hypothesis" ,python-hypothesis)
11130 ("python-pympler" ,python-pympler)
11131 ("python-pytest" ,python-pytest)
11132 ("python-six" ,python-six)
11133 ("python-sphinx" ,python-sphinx)
11134 ("python-zope-interface" ,python-zope-interface)))
11135 (home-page "https://github.com/python-attrs/attrs/")
11136 (synopsis "Attributes without boilerplate")
11137 (description "@code{attrs} is a Python package with class decorators that
11138 ease the chores of implementing the most common attribute-related object
11139 protocols.")
11140 (license license:expat)))
11141
11142 (define-public python2-attrs
11143 (package-with-python2 python-attrs))
11144
11145 (define-public python-attrs-bootstrap
11146 (package
11147 (inherit python-attrs)
11148 (name "python-attrs-bootstrap")
11149 ;; Keep this on a fixed version so python-attrs can be updated without
11150 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11151 (version "17.4.0")
11152 (source (origin
11153 (method url-fetch)
11154 (uri (pypi-uri "attrs" version))
11155 (sha256
11156 (base32
11157 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11158 (native-inputs `())
11159 (arguments `(#:tests? #f))))
11160
11161 (define-public python2-attrs-bootstrap
11162 (package-with-python2 python-attrs-bootstrap))
11163
11164 (define-public python2-cliapp
11165 (package
11166 (name "python2-cliapp")
11167 (version "1.20170823")
11168 (source
11169 (origin
11170 (method url-fetch)
11171 (uri (string-append
11172 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11173 version ".tar.gz"))
11174 (sha256
11175 (base32
11176 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
11177 (build-system python-build-system)
11178 (arguments
11179 `(#:python ,python-2
11180 #:phases
11181 (modify-phases %standard-phases
11182 ;; check phase needs to be run before the build phase. If not,
11183 ;; coverage-test-runner looks for tests for the built source files,
11184 ;; and fails.
11185 (delete 'check)
11186 (add-before 'build 'check
11187 (lambda _
11188 ;; Disable python3 tests
11189 (substitute* "check"
11190 (("python3") "# python3"))
11191 (zero? (system* "./check")))))))
11192 (native-inputs
11193 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11194 ("python2-pep8" ,python2-pep8)))
11195 (propagated-inputs
11196 `(("python2-pyaml" ,python2-pyaml)))
11197 (home-page "https://liw.fi/cliapp/")
11198 (synopsis "Python framework for command line programs")
11199 (description "@code{python2-cliapp} is a python framework for
11200 command line programs. It contains the typical stuff such programs
11201 need to do, such as parsing the command line for options, and
11202 iterating over input files.")
11203 (license license:gpl2+)))
11204
11205 (define-public python2-ttystatus
11206 (package
11207 (name "python2-ttystatus")
11208 (version "0.35")
11209 (source
11210 (origin
11211 (method url-fetch)
11212 (uri (string-append
11213 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11214 version ".tar.gz"))
11215 (sha256
11216 (base32
11217 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
11218 (build-system python-build-system)
11219 (native-inputs
11220 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11221 ("python2-pep8" ,python2-pep8)))
11222 (arguments
11223 `(#:python ,python-2
11224 #:phases
11225 (modify-phases %standard-phases
11226 ;; check phase needs to be run before the build phase. If not,
11227 ;; coverage-test-runner looks for tests for the built source files,
11228 ;; and fails.
11229 (delete 'check)
11230 (add-before 'build 'check
11231 (lambda _
11232 (zero? (system* "make" "check")))))))
11233 (home-page "https://liw.fi/ttystatus/")
11234 (synopsis "Python library for showing progress reporting and
11235 status updates on terminals")
11236 (description "@code{python2-ttystatus} is a python library for
11237 showing progress reporting and status updates on terminals, for
11238 command line programs. Output is automatically adapted to the width
11239 of the terminal: truncated if it does not fit, and resized if the
11240 terminal size changes.")
11241 (license license:gpl3+)))
11242
11243 (define-public python2-tracing
11244 (package
11245 (name "python2-tracing")
11246 (version "0.10")
11247 (source
11248 (origin
11249 (method url-fetch)
11250 (uri (string-append
11251 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11252 version ".tar.gz"))
11253 (sha256
11254 (base32
11255 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11256 (build-system python-build-system)
11257 (arguments
11258 `(#:python ,python-2))
11259 (home-page "https://liw.fi/tracing/")
11260 (synopsis "Python debug logging helper")
11261 (description "@code{python2-tracing} is a python library for
11262 logging debug messages. It provides a way to turn debugging messages
11263 on and off, based on the filename they occur in. It is much faster
11264 than using @code{logging.Filter} to accomplish the same thing, which
11265 matters when code is run in production mode. The actual logging still
11266 happens using the @code{logging} library.")
11267 (license license:gpl3+)))
11268
11269 (define-public python2-larch
11270 (package
11271 (name "python2-larch")
11272 (version "1.20151025")
11273 (source
11274 (origin
11275 (method url-fetch)
11276 (uri (string-append
11277 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11278 version ".tar.gz"))
11279 (patches (search-patches
11280 "python2-larch-coverage-4.0a6-compatibility.patch"))
11281 (sha256
11282 (base32
11283 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11284 (build-system python-build-system)
11285 (arguments
11286 `(#:python ,python-2
11287 #:phases
11288 (modify-phases %standard-phases
11289 ;; check phase needs to be run before the build phase. If not,
11290 ;; coverage-test-runner looks for tests for the built source files,
11291 ;; and fails.
11292 (delete 'check)
11293 (add-before 'build 'check
11294 (lambda _
11295 (zero? (system* "make" "check")))))))
11296 (native-inputs
11297 `(("cmdtest" ,cmdtest)
11298 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11299 (propagated-inputs
11300 `(("python2-tracing" ,python2-tracing)))
11301 (home-page "https://liw.fi/larch/")
11302 (synopsis "Python copy-on-write B-tree library")
11303 (description "@code{python2-larch} is an implementation of
11304 particular kind of B-tree, based on research by Ohad Rodeh. See
11305 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11306 on the data structure.
11307
11308 The distinctive feature of this B-tree is that a node is never
11309 (conceptually) modified. Instead, all updates are done by
11310 copy-on-write. This makes it easy to clone a tree, and modify only the
11311 clone, while other processes access the original tree.")
11312 (license license:gpl3+)))
11313
11314 (define-public python-astroid
11315 (package
11316 (name "python-astroid")
11317 (version "2.1.0")
11318 (source
11319 (origin
11320 (method url-fetch)
11321 (uri (pypi-uri "astroid" version))
11322 (sha256
11323 (base32
11324 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11325 (build-system python-build-system)
11326 (propagated-inputs
11327 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11328 ("python-six" ,python-six)
11329 ("python-wrapt" ,python-wrapt)))
11330 (native-inputs
11331 `(("python-dateutil" ,python-dateutil)
11332 ("python-nose" ,python-nose)
11333 ("python-pytest" ,python-pytest)
11334 ("python-pytest-runner" ,python-pytest-runner)))
11335 (arguments
11336 `(#:phases
11337 (modify-phases %standard-phases
11338 (add-after 'unpack 'remove-spurious-test
11339 (lambda _
11340 ;; This can be removed after upgrading from python-3.7
11341 ;; https://github.com/PyCQA/astroid/issues/593
11342 ;; https://bugs.python.org/issue34056
11343 (delete-file "astroid/tests/unittest_modutils.py")
11344 #t))
11345 (replace 'check
11346 (lambda _
11347 (invoke "pytest" "astroid"))))))
11348 (home-page "https://github.com/PyCQA/astroid")
11349 (synopsis "Common base representation of python source code for pylint and
11350 other projects")
11351 (description "@code{python-astroid} provides a common base representation
11352 of python source code for projects such as pychecker, pyreverse, pylint, etc.
11353
11354 It provides a compatible representation which comes from the _ast module. It
11355 rebuilds the tree generated by the builtin _ast module by recursively walking
11356 down the AST and building an extended ast. The new node classes have
11357 additional methods and attributes for different usages. They include some
11358 support for static inference and local name scopes. Furthermore, astroid
11359 builds partial trees by inspecting living objects.")
11360 (license license:lgpl2.1+)
11361 (properties `((python2-variant . ,(delay python2-astroid))))))
11362
11363 (define-public python2-astroid
11364 (let ((base (package-with-python2
11365 (strip-python2-variant python-astroid))))
11366 (package (inherit base)
11367 ;; Version 2.x removes python2 support.
11368 (version "1.6.5")
11369 (source
11370 (origin
11371 (method url-fetch)
11372 (uri (pypi-uri "astroid" version))
11373 (sha256
11374 (base32
11375 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11376 (arguments
11377 (substitute-keyword-arguments (package-arguments base)
11378 ((#:phases phases)
11379 `(modify-phases ,phases
11380 (add-after 'unpack 'remove-spurious-test
11381 (lambda _
11382 ;; https://github.com/PyCQA/astroid/issues/276
11383 (delete-file "astroid/tests/unittest_brain.py")
11384 #t))
11385 (replace 'check
11386 (lambda _
11387 (invoke"python" "-m" "unittest" "discover"
11388 "-p" "unittest*.py")))))))
11389 (native-inputs `())
11390 (propagated-inputs
11391 `(("python2-backports-functools-lru-cache"
11392 ,python2-backports-functools-lru-cache)
11393 ("python2-enum34" ,python2-enum34)
11394 ("python2-singledispatch" ,python2-singledispatch)
11395 ,@(package-propagated-inputs base))))))
11396
11397 (define-public python-isort
11398 (package
11399 (name "python-isort")
11400 (version "4.3.4")
11401 (source
11402 (origin
11403 (method git-fetch)
11404 (uri (git-reference
11405 ;; Tests pass only from the Github sources
11406 (url "https://github.com/timothycrosley/isort")
11407 (commit version)))
11408 (file-name (git-file-name name version))
11409 (sha256
11410 (base32
11411 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
11412 (build-system python-build-system)
11413 (native-inputs
11414 `(("python-mock" ,python-mock)
11415 ("python-pytest" ,python-pytest)))
11416 (home-page "https://github.com/timothycrosley/isort")
11417 (synopsis "Python utility/library to sort python imports")
11418 (description "@code{python-isort} is a python utility/library to sort
11419 imports alphabetically, and automatically separated into sections. It
11420 provides a command line utility, a python library and plugins for various
11421 editors.")
11422 (license license:expat)
11423 (properties `((python2-variant . ,(delay python2-isort))))))
11424
11425 (define-public python2-isort
11426 (let ((base (package-with-python2
11427 (strip-python2-variant python-isort))))
11428 (package (inherit base)
11429 (native-inputs
11430 `(("python2-futures" ,python2-futures)
11431 ,@(package-native-inputs base))))))
11432
11433 (define-public python2-backports-functools-lru-cache
11434 (package
11435 (name "python2-backports-functools-lru-cache")
11436 (version "1.5")
11437 (source
11438 (origin
11439 (method url-fetch)
11440 ;; only the pypi tarballs contain the necessary metadata
11441 (uri (pypi-uri "backports.functools_lru_cache" version))
11442 (sha256
11443 (base32
11444 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11445 (build-system python-build-system)
11446 (native-inputs
11447 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11448 (arguments
11449 `(#:python ,python-2))
11450 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11451 (synopsis "Backport of functools.lru_cache from Python 3.3")
11452 (description "@code{python2-backports-functools-lru-cache} is a backport
11453 of @code{functools.lru_cache} from python 3.3.")
11454 (license license:expat)))
11455
11456 (define-public python-configparser
11457 (package
11458 (name "python-configparser")
11459 (version "3.5.0")
11460 (source
11461 (origin
11462 (method url-fetch)
11463 (uri (string-append
11464 "https://bitbucket.org/ambv/configparser/get/"
11465 version ".tar.bz2"))
11466 (file-name (string-append name "-" version ".tar.gz"))
11467 (sha256
11468 (base32
11469 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11470 (build-system python-build-system)
11471 (home-page "http://docs.python.org/py3k/library/configparser.html")
11472 (synopsis "Backport of configparser from python 3.5")
11473 (description "@code{python-configparser} is a backport of
11474 @code{configparser} from Python 3.5 so that it can be used directly
11475 in other versions.")
11476 (license license:expat)))
11477
11478 (define-public python2-configparser
11479 (package-with-python2 python-configparser))
11480
11481 (define-public python-mando
11482 (package
11483 (name "python-mando")
11484 (version "0.6.4")
11485 (source (origin
11486 (method url-fetch)
11487 (uri (pypi-uri "mando" version))
11488 (sha256
11489 (base32
11490 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11491 (build-system python-build-system)
11492 (propagated-inputs
11493 `(("python-rst2ansi" ,python-rst2ansi)
11494 ("python-six" ,python-six)))
11495 (native-inputs
11496 `(("python-pytest" ,python-pytest)))
11497 (home-page "https://mando.readthedocs.org/")
11498 (synopsis
11499 "Wrapper around argparse, allowing creation of complete CLI applications")
11500 (description
11501 "This package is a wrapper around argparse, allowing you to write complete CLI
11502 applications in seconds while maintaining all the flexibility.")
11503 (license license:expat)))
11504
11505 (define-public python2-mando
11506 (package-with-python2 python-mando))
11507
11508 (define-public python-fudge
11509 (package
11510 (name "python-fudge")
11511 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11512 ;; package, which is currently the only use of this package.
11513 (version "0.9.6")
11514 (source
11515 (origin
11516 (method url-fetch)
11517 (uri (pypi-uri "fudge" version))
11518 (sha256
11519 (base32
11520 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11521 (build-system python-build-system)
11522 (arguments
11523 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11524 (home-page "https://github.com/fudge-py/fudge")
11525 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11526 (description
11527 "Fudge is a Python module for using fake objects (mocks and stubs) to
11528 test real ones.
11529
11530 In readable Python code, you declare the methods available on your fake object
11531 and how they should be called. Then you inject that into your application and
11532 start testing. This declarative approach means you don’t have to record and
11533 playback actions and you don’t have to inspect your fakes after running code.
11534 If the fake object was used incorrectly then you’ll see an informative
11535 exception message with a traceback that points to the culprit.")
11536 (license license:expat)))
11537
11538 (define-public python2-fudge
11539 (package-with-python2 python-fudge))
11540
11541 (define-public python-mwclient
11542 (package
11543 (name "python-mwclient")
11544 (version "0.8.4")
11545 (source
11546 (origin
11547 (method url-fetch)
11548 ;; The PyPI version wouldn't contain tests.
11549 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11550 "v" version ".tar.gz"))
11551 (file-name (string-append name "-" version ".tar.gz"))
11552 (sha256
11553 (base32
11554 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11555 (build-system python-build-system)
11556 (propagated-inputs
11557 `(("python-requests" ,python-requests)
11558 ("python-requests-oauthlib"
11559 ,python-requests-oauthlib)
11560 ("python-six" ,python-six)))
11561 (native-inputs
11562 `(("python-mock" ,python-mock)
11563 ("python-pytest" ,python-pytest)
11564 ("python-pytest-pep8" ,python-pytest-pep8)
11565 ("python-pytest-cache" ,python-pytest-cache)
11566 ("python-pytest-cov" ,python-pytest-cov)
11567 ("python-responses" ,python-responses)))
11568 (home-page "https://github.com/btongminh/mwclient")
11569 (synopsis "MediaWiki API client")
11570 (description "This package provides a MediaWiki API client.")
11571 (license license:expat)))
11572
11573 (define-public python2-mwclient
11574 (package-with-python2 python-mwclient))
11575
11576 (define-public python-utils
11577 (package
11578 (name "python-utils")
11579 (version "2.1.0")
11580 (source (origin
11581 (method url-fetch)
11582 (uri (pypi-uri "python-utils" version))
11583 (sha256
11584 (base32
11585 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11586 (build-system python-build-system)
11587 (native-inputs
11588 `(("pytest-runner" ,python-pytest-runner)
11589 ("pytest" ,python-pytest)
11590 ("six" ,python-six)))
11591 (home-page "https://github.com/WoLpH/python-utils")
11592 (synopsis "Convenient utilities not included with the standard Python install")
11593 (description
11594 "Python Utils is a collection of small Python functions and classes which
11595 make common patterns shorter and easier.")
11596 (license license:bsd-2)))
11597
11598 (define-public python2-utils
11599 (package-with-python2 python-utils))
11600
11601 (define-public python-sphinx-me
11602 (package
11603 (name "python-sphinx-me")
11604 (version "0.3")
11605 (source
11606 (origin
11607 (method url-fetch)
11608 (uri (pypi-uri "sphinx-me" version))
11609 (sha256
11610 (base32
11611 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11612 (build-system python-build-system)
11613 (home-page "https://github.com/stephenmcd/sphinx-me")
11614 (synopsis "Create a Sphinx documentation shell")
11615 (description
11616 "Create a Sphinx documentation shell for your project and include the
11617 README file as the documentation index. It handles extracting the required
11618 meta data such as the project name, author and version from your project for
11619 use in your Sphinx docs.")
11620 (license license:bsd-2)))
11621
11622 (define-public python2-sphinx-me
11623 (package-with-python2 python-sphinx-me))
11624
11625 (define-public python-diff-match-patch
11626 (package
11627 (name "python-diff-match-patch")
11628 (version "20121119")
11629 (source
11630 (origin
11631 (method url-fetch)
11632 (uri (pypi-uri "diff-match-patch" version))
11633 (sha256
11634 (base32
11635 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11636 (build-system python-build-system)
11637 (home-page "https://code.google.com/p/google-diff-match-patch")
11638 (synopsis "Synchronize plain text")
11639 (description "Diff Match and Patch libraries offer robust algorithms to
11640 perform the operations required for synchronizing plain text.")
11641 (license license:asl2.0)))
11642
11643 (define-public python2-diff-match-patch
11644 (package-with-python2 python-diff-match-patch))
11645
11646 (define-public python-dirsync
11647 (package
11648 (name "python-dirsync")
11649 (version "2.2.3")
11650 (source
11651 (origin
11652 (method url-fetch)
11653 (uri (pypi-uri "dirsync" version))
11654 (sha256
11655 (base32
11656 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11657 (build-system python-build-system)
11658 (propagated-inputs
11659 `(("six" ,python-six)))
11660 (home-page "https://bitbucket.org/tkhyn/dirsync")
11661 (synopsis "Advanced directory tree synchronisation tool")
11662 (description "Advanced directory tree synchronisation tool.")
11663 (license license:expat)))
11664
11665 (define-public python2-dirsync
11666 (package-with-python2 python-dirsync))
11667
11668 (define-public python-levenshtein
11669 (package
11670 (name "python-levenshtein")
11671 (version "0.12.0")
11672 (source
11673 (origin
11674 (method url-fetch)
11675 (uri (pypi-uri "python-Levenshtein" version))
11676 (sha256
11677 (base32
11678 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11679 (build-system python-build-system)
11680 (home-page "https://github.com/ztane/python-Levenshtein")
11681 (synopsis "Fast computation of Levenshtein distance and string similarity")
11682 (description
11683 "The Levenshtein Python C extension module contains functions for fast computation of
11684 @enumerate
11685 @item Levenshtein (edit) distance, and edit operations
11686 @item string similarity
11687 @item approximate median strings, and generally string averaging
11688 @item string sequence and set similarity
11689 @end enumerate
11690 It supports both normal and Unicode strings.")
11691 (license license:gpl2+)))
11692
11693 (define-public python2-levenshtein
11694 (package-with-python2 python-levenshtein))
11695
11696 (define-public python-scandir
11697 (package
11698 (name "python-scandir")
11699 (version "1.9.0")
11700 (source
11701 (origin
11702 (method url-fetch)
11703 (uri (pypi-uri "scandir" version))
11704 (sha256
11705 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11706 (build-system python-build-system)
11707 (arguments
11708 `(#:phases (modify-phases %standard-phases
11709 (replace 'check
11710 (lambda _
11711 (invoke "python" "test/run_tests.py"))))))
11712 (home-page "https://github.com/benhoyt/scandir")
11713 (synopsis "Directory iteration function")
11714 (description
11715 "Directory iteration function like os.listdir(), except that instead of
11716 returning a list of bare filenames, it yields DirEntry objects that include
11717 file type and stat information along with the name. Using scandir() increases
11718 the speed of os.walk() by 2-20 times (depending on the platform and file
11719 system) by avoiding unnecessary calls to os.stat() in most cases.
11720
11721 This package is part of the Python standard library since version 3.5.")
11722 (license license:bsd-3)))
11723
11724 (define-public python2-scandir
11725 (package-with-python2 python-scandir))
11726
11727 (define-public python2-stemming
11728 (package
11729 (name "python2-stemming")
11730 (version "1.0.1")
11731 (source
11732 (origin
11733 (method url-fetch)
11734 (uri (pypi-uri "stemming" version))
11735 (sha256
11736 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11737 (build-system python-build-system)
11738 (arguments
11739 `(#:python ,python-2))
11740 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11741 (synopsis "Python implementations of various stemming algorithms")
11742 (description
11743 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11744 stemming algorithms for English. These implementations are straightforward and
11745 efficient, unlike some Python versions of the same algorithms available on the
11746 Web. This package is an extraction of the stemming code included in the Whoosh
11747 search engine.")
11748 (license license:public-domain)))
11749
11750 (define-public python-factory-boy
11751 (package
11752 (name "python-factory-boy")
11753 (version "2.8.1")
11754 (source
11755 (origin
11756 (method url-fetch)
11757 (uri (pypi-uri "factory_boy" version))
11758 (sha256
11759 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11760 (build-system python-build-system)
11761 (arguments
11762 ;; Tests are not included in the tarball.
11763 `(#:tests? #f))
11764 (propagated-inputs
11765 `(("faker" ,python-faker)))
11766 (home-page "https://github.com/benhoyt/scandir")
11767 (synopsis "Versatile test fixtures replacement")
11768 (description
11769 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11770
11771 As a fixtures replacement tool, it aims to replace static, hard to maintain
11772 fixtures with easy-to-use factories for complex object.
11773
11774 Instead of building an exhaustive test setup with every possible combination
11775 of corner cases, factory_boy allows you to use objects customized for the
11776 current test, while only declaring the test-specific fields")
11777 (license license:expat)))
11778
11779 (define-public python2-factory-boy
11780 (package-with-python2 python-factory-boy))
11781
11782 (define-public python-translate-toolkit
11783 (package
11784 (name "python-translate-toolkit")
11785 (version "2.1.0")
11786 (source
11787 (origin
11788 (method url-fetch)
11789 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11790 (sha256
11791 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11792 (build-system python-build-system)
11793 (native-inputs
11794 `(("python-pytest" ,python-pytest)
11795 ("python-sphinx" ,python-sphinx)))
11796 (propagated-inputs
11797 `(("python-babel" ,python-babel)
11798 ("python-beautifulsoup4" ,python-beautifulsoup4)
11799 ("python-chardet" ,python-chardet)
11800 ("python-diff-match-patch" ,python-diff-match-patch)
11801 ("python-levenshtein" ,python-levenshtein)
11802 ("python-lxml" ,python-lxml)
11803 ("python-six" ,python-six)
11804 ("python-vobject" ,python-vobject)
11805 ("python-pyyaml" ,python-pyyaml)))
11806 (arguments
11807 ;; TODO: tests are not run, because they end with
11808 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11809 ;; 'parse_funcs'
11810 ;; during test setup.
11811 `(#:tests? #f))
11812 (home-page "http://toolkit.translatehouse.org")
11813 (synopsis "Tools and API for translation and localization engineering")
11814 (description
11815 "Tools and API for translation and localization engineering. It contains
11816 several utilities, as well as an API for building localization tools.")
11817 (license license:gpl2+)))
11818
11819 (define-public python2-translate-toolkit
11820 (package-with-python2 python-translate-toolkit))
11821
11822 (define-public python-packaging
11823 (package
11824 (name "python-packaging")
11825 (version "18.0")
11826 (source
11827 (origin
11828 (method url-fetch)
11829 (uri (pypi-uri "packaging" version))
11830 (sha256
11831 (base32
11832 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
11833 (build-system python-build-system)
11834 (arguments
11835 `(#:phases (modify-phases %standard-phases
11836 (replace 'check
11837 (lambda _ (invoke "py.test" "-vv"))))))
11838 (native-inputs
11839 `(("python-pretend" ,python-pretend)
11840 ("python-pytest" ,python-pytest)))
11841 (propagated-inputs
11842 `(("python-pyparsing" ,python-pyparsing)
11843 ("python-six" ,python-six)))
11844 (home-page "https://github.com/pypa/packaging")
11845 (synopsis "Core utilities for Python packages")
11846 (description "Packaging is a Python module for dealing with Python packages.
11847 It offers an interface for working with package versions, names, and dependency
11848 information.")
11849 ;; From 'LICENSE': This software is made available under the terms of
11850 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11851 ;; Contributions to this software is made under the terms of *both* these
11852 ;; licenses.
11853 (license (list license:asl2.0 license:bsd-2))))
11854
11855 (define-public python2-packaging
11856 (package-with-python2 python-packaging))
11857
11858 (define-public python-relatorio
11859 (package
11860 (name "python-relatorio")
11861 (version "0.8.0")
11862 (source
11863 (origin
11864 (method url-fetch)
11865 (uri (pypi-uri "relatorio" version))
11866 (sha256
11867 (base32
11868 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11869 (build-system python-build-system)
11870 (propagated-inputs
11871 `(("python-lxml" ,python-lxml)
11872 ("python-genshi" ,python-genshi)))
11873 (native-inputs
11874 `(("python-magic" ,python-magic)))
11875 (home-page "https://relatorio.tryton.org/")
11876 (synopsis "Templating library able to output ODT and PDF files")
11877 (description "Relatorio is a templating library which provides a way to
11878 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11879 for more filetypes can be easily added by creating plugins for them.")
11880 (license license:gpl3+)))
11881
11882 (define-public python2-relatorio
11883 (package-with-python2 python-relatorio))
11884
11885 (define-public python-radon
11886 (package
11887 (name "python-radon")
11888 (version "2.2.0")
11889 (source
11890 (origin
11891 (method url-fetch)
11892 (uri (pypi-uri "radon" version))
11893 (sha256
11894 (base32
11895 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11896 (build-system python-build-system)
11897 (arguments
11898 `(#:phases (modify-phases %standard-phases
11899 (replace 'check
11900 (lambda _
11901 (invoke "python" "radon/tests/run.py"))))))
11902 (propagated-inputs
11903 `(("python-colorama" ,python-colorama)
11904 ("python-flake8-polyfill" ,python-flake8-polyfill)
11905 ("python-mando" ,python-mando)))
11906 (native-inputs
11907 `(("python-pytest" ,python-pytest)
11908 ("python-pytest-mock" ,python-pytest-mock)))
11909 (home-page "https://radon.readthedocs.org/")
11910 (synopsis "Code Metrics in Python")
11911 (description "Radon is a Python tool which computes various code metrics.
11912 Supported metrics are:
11913 @itemize @bullet
11914 @item raw metrics: SLOC, comment lines, blank lines, &c.
11915 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11916 @item Halstead metrics (all of them)
11917 @item the Maintainability Index (a Visual Studio metric)
11918 @end itemize")
11919 (license license:expat)))
11920
11921 (define-public python2-radon
11922 (package-with-python2 python-radon))
11923
11924 (define-public python-sure
11925 (package
11926 (name "python-sure")
11927 (version "1.4.11")
11928 (source
11929 (origin
11930 (method url-fetch)
11931 (uri (pypi-uri "sure" version))
11932 (sha256
11933 (base32
11934 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
11935 (build-system python-build-system)
11936 (propagated-inputs
11937 `(("python-mock" ,python-mock)
11938 ("python-six" ,python-six)))
11939 (native-inputs
11940 `(("python-nose" ,python-nose)))
11941 (home-page "https://github.com/gabrielfalcao/sure")
11942 (synopsis "Automated testing library in python for python")
11943 (description
11944 "Sure is a python library that leverages a DSL for writing assertions.
11945 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11946 (license license:gpl3+)))
11947
11948 (define-public python2-sure
11949 (package-with-python2 python-sure))
11950
11951 (define-public python2-couleur
11952 ;; This package does not seem to support python3 at all, hence,
11953 ;; only the python2 variant definition is provided.
11954 (package
11955 (name "python2-couleur")
11956 (version "0.6.2")
11957 (source
11958 (origin
11959 (method url-fetch)
11960 (uri (pypi-uri "couleur" version))
11961 (sha256
11962 (base32
11963 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11964 (build-system python-build-system)
11965 (arguments
11966 `(#:python ,python-2))
11967 (home-page "https://github.com/gabrielfalcao/couleur")
11968 (synopsis
11969 "ANSI terminal tool for python, colored shell and other handy fancy features")
11970 (description
11971 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11972 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11973 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11974 ;; https://github.com/gabrielfalcao/couleur/issues/11
11975 (license license:lgpl3+)))
11976
11977 (define-public python-misaka
11978 (package
11979 (name "python-misaka")
11980 (version "2.1.0")
11981 (source
11982 (origin
11983 (method url-fetch)
11984 (uri (pypi-uri "misaka" version))
11985 (sha256
11986 (base32
11987 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11988 (build-system python-build-system)
11989 (arguments
11990 `(;; Line 37 of setup.py calls self.run_command('develop')
11991 ;; in the 'check' phase. This command seems to be trying
11992 ;; to write to
11993 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
11994 ;; for which it does not have the permission to write.
11995 #:tests? #f))
11996 (propagated-inputs
11997 `(("python-cffi" ,python-cffi)))
11998 (home-page "https://github.com/FSX/misaka")
11999 (synopsis "Python binding for Hoedown")
12000 (description
12001 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12002 library written in C. It features a fast HTML renderer and functionality to make custom
12003 renderers (e.g. man pages or LaTeX).")
12004 (license license:expat)))
12005
12006 (define-public python2-misaka
12007 (package-with-python2 python-misaka))
12008
12009 (define-public python2-steadymark
12010 ;; This is forced into being a python2 only variant
12011 ;; due to its dependence on couleur that has no support
12012 ;; for python3
12013 (package
12014 (name "python2-steadymark")
12015 (version "0.7.3")
12016 (source
12017 (origin
12018 (method url-fetch)
12019 (uri (pypi-uri "steadymark" version))
12020 (sha256
12021 (base32
12022 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12023 (build-system python-build-system)
12024 (native-inputs
12025 `(("python-couleur" ,python2-couleur)
12026 ("python-sure" ,python2-sure)
12027 ("python-misaka" ,python2-misaka)))
12028 (arguments
12029 `(#:python ,python-2
12030 #:phases
12031 (modify-phases %standard-phases
12032 (add-before 'build 'patch-setup-py
12033 (lambda _
12034 ;; Update requirements from dependency==version
12035 ;; to dependency>=version
12036 (substitute* "setup.py"
12037 (("==") ">="))
12038 #t)))))
12039 (home-page "https://github.com/gabrielfalcao/steadymark")
12040 (synopsis "Markdown-based test runner for python")
12041 (description
12042 "@code{Steadymark} allows documentation to be written in github-flavoured
12043 markdown. The documentation may contain snippets of code surrounded by python
12044 code blocks and @code{Steadymark} will find these snippets and run them, making
12045 sure that there are no old malfunctional examples in the documentation examples.")
12046 (license license:expat)))
12047
12048 (define-public python-jsonpointer
12049 (package
12050 (name "python-jsonpointer")
12051 (version "1.10")
12052 (source
12053 (origin
12054 (method url-fetch)
12055 (uri (pypi-uri "jsonpointer" version))
12056 (sha256
12057 (base32
12058 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12059 (build-system python-build-system)
12060 (home-page "https://github.com/stefankoegl/python-json-pointer")
12061 (synopsis "Identify specific nodes in a JSON document")
12062 (description "@code{jsonpointer} allows you to access specific nodes
12063 by path in a JSON document (see RFC 6901).")
12064 (license license:bsd-3)))
12065
12066 (define-public python2-jsonpointer
12067 (package-with-python2 python-jsonpointer))
12068
12069 (define-public python-jsonpatch
12070 (package
12071 (name "python-jsonpatch")
12072 (version "1.16")
12073 (source
12074 (origin
12075 (method url-fetch)
12076 ;; pypi version lacks tests.js
12077 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12078 "archive/v" version ".tar.gz"))
12079 (file-name (string-append name "-" version ".tar.gz"))
12080 (sha256
12081 (base32
12082 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12083 (build-system python-build-system)
12084 (native-inputs
12085 `(("python-jsonpointer" ,python-jsonpointer)))
12086 (home-page "https://github.com/stefankoegl/python-json-patch")
12087 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12088 (description "@code{jsonpatch} is a library and program that allows
12089 applying JSON Patches according to RFC 6902.")
12090 (license license:bsd-3)))
12091
12092 (define-public python2-jsonpatch
12093 (package-with-python2 python-jsonpatch))
12094
12095 (define-public python-jsonpatch-0.4
12096 (package (inherit python-jsonpatch)
12097 (name "python-jsonpatch")
12098 (version "0.4")
12099 (source
12100 (origin
12101 (method url-fetch)
12102 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12103 "archive/v" version ".tar.gz"))
12104 (file-name (string-append name "-" version ".tar.gz"))
12105 (sha256
12106 (base32
12107 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12108
12109 (define-public python2-jsonpatch-0.4
12110 (package-with-python2 python-jsonpatch-0.4))
12111
12112 (define-public python-rfc3986
12113 (package
12114 (name "python-rfc3986")
12115 (version "1.1.0")
12116 (source (origin
12117 (method url-fetch)
12118 (uri (pypi-uri "rfc3986" version))
12119 (sha256
12120 (base32
12121 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12122 (build-system python-build-system)
12123 (arguments
12124 `(#:modules ((guix build utils)
12125 (guix build python-build-system)
12126 (ice-9 ftw)
12127 (srfi srfi-1)
12128 (srfi srfi-26))
12129 #:phases
12130 (modify-phases %standard-phases
12131 (replace 'check
12132 (lambda _
12133 (let ((cwd (getcwd)))
12134 (setenv "PYTHONPATH"
12135 (string-append cwd "/build/"
12136 (find (cut string-prefix? "lib" <>)
12137 (scandir (string-append cwd "/build")))
12138 ":"
12139 (getenv "PYTHONPATH")))
12140 (invoke "pytest" "-v")))))))
12141 (native-inputs
12142 `(("python-pytest" ,python-pytest)))
12143 (home-page "https://rfc3986.readthedocs.io/")
12144 (synopsis "Parse and validate URI references")
12145 (description
12146 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12147 validation and authority parsing. This module also supports RFC@tie{}6874
12148 which adds support for zone identifiers to IPv6 addresses.")
12149 (license license:asl2.0)))
12150
12151 (define-public python2-rfc3986
12152 (package-with-python2 python-rfc3986))
12153
12154 (define-public python-rfc3987
12155 (package
12156 (name "python-rfc3987")
12157 (version "1.3.7")
12158 (source
12159 (origin
12160 (method url-fetch)
12161 (uri (pypi-uri "rfc3987" version))
12162 (sha256
12163 (base32
12164 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12165 (build-system python-build-system)
12166 (home-page "https://pypi.python.org/pypi/rfc3987")
12167 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12168 (description "@code{rfc3987} provides routines for parsing and
12169 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12170 (license license:gpl3+)))
12171
12172 (define-public python2-rfc3987
12173 (package-with-python2 python-rfc3987))
12174
12175 (define-public python-validate-email
12176 (package
12177 (name "python-validate-email")
12178 (version "1.3")
12179 (source
12180 (origin
12181 (method url-fetch)
12182 (uri (pypi-uri "validate_email" version))
12183 (sha256
12184 (base32
12185 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12186 (build-system python-build-system)
12187 (home-page "https://github.com/syrusakbary/validate_email")
12188 (synopsis "Verifies if an email address is valid and really exists")
12189 (description "@code{validate_email} can be used to verify if an email
12190 address is valid and really exists.")
12191 (license license:lgpl3+)))
12192
12193 (define-public python2-validate-email
12194 (package-with-python2 python-validate-email))
12195
12196 (define-public python-flex
12197 (package
12198 (name "python-flex")
12199 (version "6.10.0")
12200 (source
12201 (origin
12202 (method url-fetch)
12203 (uri (pypi-uri "flex" version))
12204 (sha256
12205 (base32
12206 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12207 (build-system python-build-system)
12208 (propagated-inputs
12209 `(("python-click" ,python-click)
12210 ("python-iso8601" ,python-iso8601)
12211 ("python-jsonpointer" ,python-jsonpointer)
12212 ("python-pyyaml" ,python-pyyaml)
12213 ("python-requests" ,python-requests)
12214 ("python-rfc3987" ,python-rfc3987)
12215 ("python-six" ,python-six)
12216 ("python-validate-email" ,python-validate-email)))
12217 (home-page "https://github.com/pipermerriam/flex")
12218 (synopsis "Validates Swagger schemata")
12219 (description "@code{flex} can be used to validate Swagger schemata.")
12220 (license license:bsd-3)))
12221
12222 (define-public python2-flex
12223 (package-with-python2 python-flex))
12224
12225 (define-public python-marshmallow
12226 (package
12227 (name "python-marshmallow")
12228 (version "3.0.0b14")
12229 (source
12230 (origin
12231 (method url-fetch)
12232 (uri (pypi-uri "marshmallow" version))
12233 (sha256
12234 (base32
12235 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12236 (build-system python-build-system)
12237 (propagated-inputs
12238 `(("python-dateutil" ,python-dateutil)
12239 ("python-simplejson" ,python-simplejson)))
12240 (native-inputs
12241 `(("python-pytest" ,python-pytest)
12242 ("python-pytz" ,python-pytz)))
12243 (home-page "https://github.com/marshmallow-code/marshmallow")
12244 (synopsis "Convert complex datatypes to and from native
12245 Python datatypes.")
12246 (description "@code{marshmallow} provides a library for converting
12247 complex datatypes to and from native Python datatypes.")
12248 (license license:expat)))
12249
12250 (define-public python2-marshmallow
12251 (package-with-python2 python-marshmallow))
12252
12253 (define-public python-apispec
12254 (package
12255 (name "python-apispec")
12256 (version "0.25.3")
12257 (source
12258 (origin
12259 (method url-fetch)
12260 (uri (pypi-uri "apispec" version))
12261 (sha256
12262 (base32
12263 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12264 (build-system python-build-system)
12265 (propagated-inputs
12266 `(("python-pyyaml" ,python-pyyaml)))
12267 (native-inputs
12268 `(("python-pytest" ,python-pytest)
12269 ("python-flask" ,python-flask)
12270 ("python-marshmallow" ,python-marshmallow)
12271 ("python-tornado" ,python-tornado)
12272 ("python-bottle" ,python-bottle)
12273 ("python-mock" ,python-mock)))
12274 (home-page "https://github.com/marshmallow-code/apispec")
12275 (synopsis "Swagger 2.0 API specification generator")
12276 (description "@code{python-apispec} is a pluggable API specification
12277 generator. Currently supports the OpenAPI specification (f.k.a.
12278 Swagger 2.0).")
12279 (license license:expat)))
12280
12281 (define-public python2-apispec
12282 (package-with-python2 python-apispec))
12283
12284 (define-public python-flasgger
12285 (package
12286 (name "python-flasgger")
12287 (version "0.6.3")
12288 (source
12289 (origin
12290 (method url-fetch)
12291 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12292 version ".tar.gz"))
12293 (file-name (string-append name "-" version ".tar.gz"))
12294 (sha256
12295 (base32
12296 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12297 (build-system python-build-system)
12298 (arguments
12299 `(#:phases
12300 (modify-phases %standard-phases
12301 (replace 'check
12302 (lambda* (#:key inputs outputs #:allow-other-keys)
12303 (substitute* "Makefile"
12304 (("flake8 flasgger --ignore=F403")
12305 "flake8 flasgger --ignore=E731,F403"))
12306 (setenv "PYTHONPATH" (string-append (getcwd)
12307 ":"
12308 (getenv "PYTHONPATH")))
12309 (zero? (system* "py.test")))))))
12310 (propagated-inputs
12311 `(("python-flask" ,python-flask)
12312 ("python-pyyaml" ,python-pyyaml)
12313 ("python-jsonschema" ,python-jsonschema)
12314 ("python-mistune" ,python-mistune)
12315 ("python-six" ,python-six)))
12316 (native-inputs
12317 `(("python-decorator" ,python-decorator)
12318 ("python-flake8" ,python-flake8)
12319 ("python-flask-restful" ,python-flask-restful)
12320 ("python-flex" ,python-flex)
12321 ("python-pytest" ,python-pytest)
12322 ("python-pytest-cov" ,python-pytest-cov)
12323 ("python-marshmallow" ,python-marshmallow)
12324 ("python-apispec" ,python-apispec)))
12325 (home-page "https://github.com/rochacbruno/flasgger/")
12326 (synopsis "Extract Swagger specs from your Flask project")
12327 (description "@code{python-flasgger} allows extracting Swagger specs
12328 from your Flask project. It is a fork of Flask-Swagger.")
12329 (license license:expat)))
12330
12331 (define-public python2-flasgger
12332 (package-with-python2 python-flasgger))
12333
12334 (define-public python-swagger-spec-validator
12335 (package
12336 (name "python-swagger-spec-validator")
12337 (version "2.1.0")
12338 (source
12339 (origin
12340 (method url-fetch)
12341 (uri (pypi-uri "swagger-spec-validator" version))
12342 (sha256
12343 (base32
12344 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12345 (build-system python-build-system)
12346 (propagated-inputs
12347 `(("python-jsonschema" ,python-jsonschema)
12348 ("python-six" ,python-six)))
12349 (home-page
12350 "https://github.com/Yelp/swagger_spec_validator")
12351 (synopsis "Validation of Swagger specifications")
12352 (description "@code{swagger_spec_validator} provides a library for
12353 validating Swagger API specifications.")
12354 (license license:asl2.0)))
12355
12356 (define-public python2-swagger-spec-validator
12357 (package-with-python2 python-swagger-spec-validator))
12358
12359 (define-public python-apache-libcloud
12360 (package
12361 (name "python-apache-libcloud")
12362 (version "2.4.0")
12363 (source
12364 (origin
12365 (method url-fetch)
12366 (uri (pypi-uri "apache-libcloud" version))
12367 (sha256
12368 (base32
12369 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12370 (build-system python-build-system)
12371 (arguments
12372 `(#:phases
12373 (modify-phases %standard-phases
12374 (add-after 'unpack 'patch-ssh
12375 (lambda* (#:key inputs #:allow-other-keys)
12376 (substitute* "libcloud/compute/ssh.py"
12377 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12378 "/bin/ssh" "'")))
12379 #t))
12380 (add-after 'unpack 'patch-tests
12381 (lambda _
12382 (substitute* "./libcloud/test/test_file_fixtures.py"
12383 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12384 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12385 return (httplib.OK,
12386 \"1234abcd\",
12387 {\"test\": \"value\"},
12388 httplib.responses[httplib.OK])
12389 def _ascii"))
12390 (substitute* "libcloud/test/compute/test_ssh_client.py"
12391 (("class ShellOutSSHClientTests")
12392 "@unittest.skip(\"Guix container doesn't have ssh service\")
12393 class ShellOutSSHClientTests")
12394 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12395 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12396 (("'.xF0', '.x90', '.x8D', '.x88'")
12397 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12398 #t))
12399 (add-before 'check 'copy-secret
12400 (lambda _
12401 (copy-file "libcloud/test/secrets.py-dist"
12402 "libcloud/test/secrets.py")
12403 #t)))))
12404 (inputs
12405 `(("openssh" ,openssh)))
12406 (propagated-inputs
12407 `(("python-paramiko" ,python-paramiko)
12408 ("python-requests" ,python-requests)))
12409 (native-inputs
12410 `(("python-lockfile" ,python-lockfile)
12411 ("python-mock" ,python-mock)
12412 ("python-pytest" ,python-pytest)
12413 ("python-pytest-runner" ,python-pytest-runner)
12414 ("python-requests-mock" ,python-requests-mock)))
12415 (home-page "https://libcloud.apache.org/")
12416 (synopsis "Unified Cloud API")
12417 (description "@code{libcloud} is a Python library for interacting with
12418 many of the popular cloud service providers using a unified API.")
12419 (license license:asl2.0)))
12420
12421 (define-public python2-apache-libcloud
12422 (package-with-python2 python-apache-libcloud))
12423
12424 (define-public python-smmap2
12425 (package
12426 (name "python-smmap2")
12427 (version "2.0.3")
12428 (source
12429 (origin
12430 (method url-fetch)
12431 (uri (pypi-uri "smmap2" version))
12432 (sha256
12433 (base32
12434 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12435 (build-system python-build-system)
12436 (native-inputs
12437 `(("python-nosexcover" ,python-nosexcover)))
12438 (home-page "https://github.com/Byron/smmap")
12439 (synopsis "Python sliding window memory map manager")
12440 (description "@code{smmap2} is a pure Python implementation of a sliding
12441 window memory map manager.")
12442 (license license:bsd-3)))
12443
12444 (define-public python2-smmap2
12445 (package-with-python2 python-smmap2))
12446
12447 (define-public python-regex
12448 (package
12449 (name "python-regex")
12450 (version "2017.06.07")
12451 (source (origin
12452 (method url-fetch)
12453 (uri (pypi-uri "regex" version))
12454 (sha256
12455 (base32
12456 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12457 (build-system python-build-system)
12458 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12459 (synopsis "Alternative regular expression module")
12460 (description "This regular expression implementation is backwards-
12461 compatible with the standard @code{re} module, but offers additional
12462 functionality like full case-folding for case-insensitive matches in Unicode.")
12463 (license license:psfl)))
12464
12465 (define-public python2-regex
12466 (package-with-python2 python-regex))
12467
12468 (define-public python2-pyopengl
12469 (package
12470 (name "python2-pyopengl")
12471 (version "3.1.0")
12472 (source
12473 (origin
12474 (method url-fetch)
12475 (uri (pypi-uri "PyOpenGL" version))
12476 (sha256
12477 (base32
12478 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12479 (arguments
12480 `(#:python ,python-2))
12481 (build-system python-build-system)
12482 (home-page "http://pyopengl.sourceforge.net")
12483 (synopsis "Standard OpenGL bindings for Python")
12484 (description
12485 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12486 related APIs. The binding is created using the standard @code{ctypes}
12487 library.")
12488 (license license:bsd-3)))
12489
12490 (define-public python2-pyopengl-accelerate
12491 (package
12492 (inherit python2-pyopengl)
12493 (name "python2-pyopengl-accelerate")
12494 (version "3.1.0")
12495 (source
12496 (origin
12497 (method url-fetch)
12498 (uri (pypi-uri "PyOpenGL-accelerate" version))
12499 (sha256
12500 (base32
12501 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12502 (synopsis "Acceleration code for PyOpenGL")
12503 (description
12504 "This is the Cython-coded accelerator module for PyOpenGL.")))
12505
12506 (define-public python-rencode
12507 (package
12508 (name "python-rencode")
12509 (version "1.0.5")
12510 (source
12511 (origin
12512 (method url-fetch)
12513 (uri (pypi-uri "rencode" version))
12514 (sha256
12515 (base32
12516 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12517 (build-system python-build-system)
12518 (arguments
12519 `(#:phases
12520 (modify-phases %standard-phases
12521 (add-before 'check 'delete-bogus-test
12522 ;; This test requires /home/aresch/Downloads, which is not provided by
12523 ;; the build environment.
12524 (lambda _
12525 (delete-file "rencode/t.py")
12526 #t)))))
12527 (native-inputs `(("pkg-config" ,pkg-config)
12528 ("python-cython" ,python-cython)))
12529 (home-page "https://github.com/aresch/rencode")
12530 (synopsis "Serialization of heterogeneous data structures")
12531 (description
12532 "The @code{rencode} module is a data structure serialization library,
12533 similar to @code{bencode} from the BitTorrent project. For complex,
12534 heterogeneous data structures with many small elements, r-encoding stake up
12535 significantly less space than b-encodings. This version of rencode is a
12536 complete rewrite in Cython to attempt to increase the performance over the
12537 pure Python module.")
12538 (license license:bsd-3)))
12539
12540 (define-public python2-rencode
12541 (package-with-python2 python-rencode))
12542
12543 (define-public python-xenon
12544 (package
12545 (name "python-xenon")
12546 (version "0.5.4")
12547 (source
12548 (origin
12549 (method url-fetch)
12550 (uri (pypi-uri "xenon" version))
12551 (sha256
12552 (base32
12553 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12554 (build-system python-build-system)
12555 (native-inputs
12556 `(("python-pyyaml" ,python-pyyaml)
12557 ("python-radon" ,python-radon)
12558 ("python-requests" ,python-requests)
12559 ("python-flake8" ,python-flake8)
12560 ("python-tox" ,python-tox)))
12561 (arguments
12562 `(#:phases
12563 (modify-phases %standard-phases
12564 (add-before 'build 'patch-test-requirements
12565 (lambda _
12566 ;; Remove httpretty dependency for tests.
12567 (substitute* "setup.py"
12568 (("httpretty") ""))
12569 #t)))))
12570 (home-page "https://xenon.readthedocs.org/")
12571 (synopsis "Monitor code metrics for Python on your CI server")
12572 (description
12573 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12574 Ideally, @code{xenon} is run every time code is committed. Through command
12575 line options, various thresholds can be set for the complexity of code. It
12576 will fail (i.e. it will exit with a non-zero exit code) when any of these
12577 requirements is not met.")
12578 (license license:expat)))
12579
12580 (define-public python2-xenon
12581 (package-with-python2 python-xenon))
12582
12583 (define-public python-pysocks
12584 (package
12585 (name "python-pysocks")
12586 (version "1.6.8")
12587 (source
12588 (origin
12589 (method url-fetch)
12590 (uri (pypi-uri "PySocks" version))
12591 (sha256
12592 (base32
12593 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12594 (build-system python-build-system)
12595 (arguments `(#:tests? #f))
12596 (home-page "https://github.com/Anorov/PySocks")
12597 (synopsis "SOCKS client module")
12598 (description "@code{pysocks} is an updated and semi-actively maintained
12599 version of @code{SocksiPy} with bug fixes and extra features.")
12600 (license license:bsd-3)))
12601
12602 (define-public python2-pysocks
12603 (package-with-python2 python-pysocks))
12604
12605 (define-public python-pydiff
12606 (package
12607 (name "python-pydiff")
12608 (version "0.2")
12609 (source
12610 (origin
12611 (method url-fetch)
12612 (uri (pypi-uri "pydiff" version))
12613 (sha256
12614 (base32
12615 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12616 (build-system python-build-system)
12617 (home-page "https://github.com/myint/pydiff")
12618 (synopsis "Library to diff two Python files at the bytecode level")
12619 (description
12620 "@code{pydiff} makes it easy to look for actual code changes while
12621 ignoring formatting changes.")
12622 (license license:expat)))
12623
12624 (define-public python2-pydiff
12625 (package-with-python2 python-pydiff))
12626
12627 (define-public python-tqdm
12628 (package
12629 (name "python-tqdm")
12630 (version "4.19.6")
12631 (source
12632 (origin
12633 (method url-fetch)
12634 (uri (pypi-uri "tqdm" version))
12635 (sha256
12636 (base32
12637 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12638 (build-system python-build-system)
12639 (native-inputs
12640 `(("python-flake8" ,python-flake8)
12641 ("python-nose" ,python-nose)
12642 ("python-coverage" ,python-coverage)))
12643 (home-page "https://github.com/tqdm/tqdm")
12644 (synopsis "Fast, extensible progress meter")
12645 (description
12646 "Make loops show a progress bar on the console by just wrapping any
12647 iterable with @code{|tqdm(iterable)|}. Offers many options to define
12648 design and layout.")
12649 (license (list license:mpl2.0 license:expat))))
12650
12651 (define-public python2-tqdm
12652 (package-with-python2 python-tqdm))
12653
12654 (define-public python-pkginfo
12655 (package
12656 (name "python-pkginfo")
12657 (version "1.4.2")
12658 (source
12659 (origin
12660 (method url-fetch)
12661 (uri (pypi-uri "pkginfo" version))
12662 (sha256
12663 (base32
12664 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12665 (build-system python-build-system)
12666 (arguments
12667 ;; The tests are broken upstream.
12668 '(#:tests? #f))
12669 (home-page
12670 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12671 (synopsis
12672 "Query metadatdata from sdists, bdists, and installed packages")
12673 (description
12674 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12675 source distriubtion (an sdist) or a binary distribution (e.g., created by
12676 running bdist_egg). It can also query the EGG-INFO directory of an installed
12677 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12678 created by running @code{python setup.py develop}).")
12679 (license license:expat)))
12680
12681 (define-public python2-pkginfo
12682 (package-with-python2 python-pkginfo))
12683
12684 (define-public python-twine
12685 (package
12686 (name "python-twine")
12687 (version "1.9.1")
12688 (source
12689 (origin
12690 (method url-fetch)
12691 (uri (pypi-uri "twine" version))
12692 (sha256
12693 (base32
12694 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12695 (build-system python-build-system)
12696 (propagated-inputs
12697 `(("python-tqdm" ,python-tqdm)
12698 ("python-pkginfo" ,python-pkginfo)
12699 ("python-requests" ,python-requests)
12700 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12701 (home-page "https://github.com/pypa/twine")
12702 (synopsis "Collection of utilities for interacting with PyPI")
12703 (description
12704 "@code{twine} currently supports registering projects and uploading
12705 distributions. It authenticates the user over HTTPS, allows them to pre-sign
12706 their files and supports any packaging format (including wheels).")
12707 (license license:asl2.0)))
12708
12709 (define-public python2-twine
12710 (package-with-python2 python-twine))
12711
12712 (define-public python-linecache2
12713 (package
12714 (name "python-linecache2")
12715 (version "1.0.0")
12716 (source
12717 (origin
12718 (method url-fetch)
12719 (uri (pypi-uri "linecache2" version))
12720 (sha256
12721 (base32
12722 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12723 (build-system python-build-system)
12724 (arguments
12725 `(;; The tests depend on unittest2, and our version is a bit too old.
12726 #:tests? #f))
12727 (native-inputs
12728 `(("python-pbr" ,python-pbr-minimal)))
12729 (home-page
12730 "https://github.com/testing-cabal/linecache2")
12731 (synopsis "Backports of the linecache module")
12732 (description
12733 "The linecache module allows one to get any line from any file, while
12734 attempting to optimize internally, using a cache, the common case where many
12735 lines are read from a single file.")
12736 (license license:psfl)))
12737
12738 (define-public python2-linecache2
12739 (package-with-python2 python-linecache2))
12740
12741 (define-public python-traceback2
12742 (package
12743 (name "python-traceback2")
12744 (version "1.4.0")
12745 (source
12746 (origin
12747 (method url-fetch)
12748 (uri (pypi-uri "traceback2" version))
12749 (sha256
12750 (base32
12751 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12752 (build-system python-build-system)
12753 (arguments
12754 `(;; python-traceback2 and python-unittest2 depend on one another.
12755 #:tests? #f))
12756 (native-inputs
12757 `(("python-pbr" ,python-pbr-minimal)))
12758 (propagated-inputs
12759 `(("python-linecache2" ,python-linecache2)))
12760 (home-page
12761 "https://github.com/testing-cabal/traceback2")
12762 (synopsis "Backports of the traceback module")
12763 (description
12764 "This module provides a standard interface to extract, format and print
12765 stack traces of Python programs. It exactly mimics the behavior of the Python
12766 interpreter when it prints a stack trace.")
12767 (license license:psfl)))
12768
12769 (define-public python2-traceback2
12770 (package-with-python2 python-traceback2))
12771
12772 (define-public python-ratelimiter
12773 (package
12774 (name "python-ratelimiter")
12775 (version "1.2.0")
12776 (source
12777 (origin
12778 (method url-fetch)
12779 (uri (pypi-uri "ratelimiter" version))
12780 (sha256
12781 (base32
12782 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12783 (build-system python-build-system)
12784 (arguments
12785 '(#:tests? #f)) ; There are no tests in the pypi archive.
12786 (home-page "https://github.com/RazerM/ratelimiter")
12787 (synopsis "Simple rate limiting object")
12788 (description
12789 "The @code{ratelimiter} module ensures that an operation will not be
12790 executed more than a given number of times during a given period.")
12791 (license license:asl2.0)))
12792
12793 (define-public python2-ratelimiter
12794 (package-with-python2 python-ratelimiter))
12795
12796 (define-public python-dukpy
12797 (package
12798 (name "python-dukpy")
12799 (version "0.3")
12800 (source
12801 (origin
12802 (method url-fetch)
12803 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12804 version ".tar.gz"))
12805 (file-name (string-append name "-" version ".tar.gz"))
12806 (sha256
12807 (base32
12808 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12809 (build-system python-build-system)
12810 (home-page "https://github.com/kovidgoyal/dukpy")
12811 (synopsis "Run JavaScript in python")
12812 (description
12813 "dukpy is a JavaScript runtime environment for Python using the duktape
12814 embeddable JavaScript engine.")
12815 ;; Dukpy is licensed under MIT like the embedded duktape library,
12816 ;; with 'errors.c' as GPL3.
12817 (license (list license:expat license:gpl3))))
12818
12819 (define-public python2-dukpy
12820 (package-with-python2 python-dukpy))
12821
12822 (define-public python-jsonrpclib-pelix
12823 (package
12824 (name "python-jsonrpclib-pelix")
12825 (version "0.3.2")
12826 (source
12827 (origin
12828 (method url-fetch)
12829 (uri (pypi-uri "jsonrpclib-pelix" version))
12830 (sha256
12831 (base32
12832 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12833 (build-system python-build-system)
12834 (arguments
12835 `(#:tests? #f)) ; no tests in PyPI tarball
12836 (home-page "https://github.com/tcalmant/jsonrpclib/")
12837 (synopsis "JSON-RPC 2.0 client library for Python")
12838 (description
12839 "This library implements the JSON-RPC v2.0
12840 specification (backwards-compatible) as a client library for Python. This
12841 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12842 services.")
12843 (license license:asl2.0)))
12844
12845 (define-public python2-jsonrpclib-pelix
12846 (package-with-python2 python-jsonrpclib-pelix))
12847
12848 (define-public python-setuptools-scm-git-archive
12849 (package
12850 (name "python-setuptools-scm-git-archive")
12851 (version "1.0")
12852 (source
12853 (origin
12854 (method url-fetch)
12855 (uri (pypi-uri "setuptools_scm_git_archive" version))
12856 (sha256
12857 (base32
12858 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12859 (build-system python-build-system)
12860 (native-inputs
12861 `(("python-pytest" ,python-pytest)))
12862 (propagated-inputs
12863 `(("python-setuptools-scm" ,python-setuptools-scm)))
12864 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12865 (synopsis "Setuptools_scm plugin for git archives")
12866 (description
12867 "The setuptools_scm_git_archive package is a plugin to
12868 setuptools_scm, which supports obtaining versions from git archives that
12869 belong to tagged versions.")
12870 (license license:expat)))
12871
12872 (define-public python2-setuptools-scm-git-archive
12873 (package-with-python2 python-setuptools-scm-git-archive))
12874
12875 (define-public python-pyclipper
12876 (package
12877 (name "python-pyclipper")
12878 (version "1.1.0.post1")
12879 (source
12880 (origin
12881 (method url-fetch)
12882 (uri (pypi-uri "pyclipper" version ".zip"))
12883 (sha256
12884 (base32
12885 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
12886 (modules '((guix build utils)))
12887 (snippet
12888 '(begin
12889 ;; This file is generated by Cython.
12890 (delete-file "pyclipper/pyclipper.cpp") #t))))
12891 (build-system python-build-system)
12892 (arguments
12893 `(#:phases
12894 (modify-phases %standard-phases
12895 (add-before 'build 'cythonize-sources
12896 (lambda _
12897 (with-directory-excursion "pyclipper"
12898 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
12899 (propagated-inputs
12900 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12901 (native-inputs
12902 `(("python-cython" ,python-cython)
12903 ("python-pytest" ,python-pytest)
12904 ("python-pytest-runner" ,python-pytest-runner)
12905 ("python-unittest2" ,python-unittest2)
12906 ("unzip" ,unzip)))
12907 (home-page "https://github.com/greginvm/pyclipper")
12908 (synopsis "Wrapper for Angus Johnson's Clipper library")
12909 (description
12910 "Pyclipper is a Cython wrapper for the C++ translation of the
12911 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
12912 (license license:expat)))
12913
12914 (define-public python2-pyclipper
12915 (package-with-python2 python-pyclipper))
12916
12917 (define-public python2-booleanoperations
12918 (package
12919 (name "python2-booleanoperations")
12920 (version "0.7.1")
12921 (source
12922 (origin
12923 (method url-fetch)
12924 (uri (pypi-uri "booleanOperations" version ".zip"))
12925 (sha256
12926 (base32
12927 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12928 (build-system python-build-system)
12929 (arguments
12930 `(#:python ,python-2))
12931 (native-inputs
12932 `(("unzip" ,unzip)
12933 ("python2-pytest" ,python2-pytest)
12934 ("python2-pytest-runner" ,python2-pytest-runner)))
12935 (propagated-inputs
12936 `(("python-fonttools" ,python2-fonttools)
12937 ("python-pyclipper" ,python2-pyclipper)
12938 ("python-ufolib" ,python2-ufolib)))
12939 (home-page "https://github.com/typemytype/booleanOperations")
12940 (synopsis "Boolean operations on paths")
12941 (description
12942 "BooleanOperations provides a Python library that enables
12943 boolean operations on paths.")
12944 (license license:expat)))
12945
12946 (define-public python-tempdir
12947 (package
12948 (name "python-tempdir")
12949 (version "0.7.1")
12950 (source
12951 (origin
12952 (method url-fetch)
12953 (uri (pypi-uri "tempdir" version))
12954 (sha256
12955 (base32
12956 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12957 (build-system python-build-system)
12958 (home-page "https://pypi.org/project/tempdir/")
12959 (arguments
12960 ;; the package has no tests
12961 '(#:tests? #f))
12962 (synopsis "Python library for managing temporary directories")
12963 (description
12964 "This library manages temporary directories that are automatically
12965 deleted with all their contents when they are no longer needed. It is
12966 particularly convenient for use in tests.")
12967 (license license:expat)))
12968
12969 (define-public python2-tempdir
12970 (package-with-python2 python-tempdir))
12971
12972 (define-public python-activepapers
12973 (package
12974 (name "python-activepapers")
12975 (version "0.2.2")
12976 (source
12977 (origin
12978 (method url-fetch)
12979 (uri (pypi-uri "ActivePapers.Py" version))
12980 (sha256
12981 (base32
12982 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12983 (build-system python-build-system)
12984 (arguments
12985 `(#:modules ((ice-9 ftw)
12986 (srfi srfi-1)
12987 (guix build utils)
12988 (guix build python-build-system))
12989
12990 #:phases
12991 (modify-phases %standard-phases
12992 (add-after 'unpack 'delete-python2-code
12993 (lambda _
12994 (for-each delete-file
12995 '("lib/activepapers/builtins2.py"
12996 "lib/activepapers/standardlib2.py"
12997 "lib/activepapers/utility2.py"))))
12998 (replace 'check
12999 (lambda _
13000 ;; Deactivate the test cases that download files
13001 (setenv "NO_NETWORK_ACCESS" "1")
13002 ;; For some strange reason, some tests fail if nosetests runs all
13003 ;; test modules in a single execution. They pass if each test
13004 ;; module is run individually.
13005 (for-each (lambda (filename)
13006 (invoke "nosetests"
13007 (string-append "tests/" filename)))
13008 (scandir "tests"
13009 (lambda (filename)
13010 (string-suffix? ".py" filename)))))))))
13011 (native-inputs
13012 `(("python-tempdir" ,python-tempdir)
13013 ("python-nose" ,python-nose)))
13014 (propagated-inputs
13015 `(("python-h5py" ,python-h5py)))
13016 (home-page "http://www.activepapers.org/")
13017 (synopsis "Executable papers for scientific computing")
13018 (description
13019 "ActivePapers is a tool for working with executable papers, which
13020 combine data, code, and documentation in single-file packages,
13021 suitable for publication as supplementary material or on repositories
13022 such as figshare or Zenodo.")
13023 (properties `((python2-variant . ,(delay python2-activepapers))))
13024 (license license:bsd-3)))
13025
13026 (define-public python2-activepapers
13027 (let ((base (package-with-python2
13028 (strip-python2-variant python-activepapers))))
13029 (package
13030 (inherit base)
13031 (arguments
13032 (substitute-keyword-arguments (package-arguments base)
13033 ((#:phases phases)
13034 `(modify-phases ,phases
13035 (delete 'delete-python2-code)
13036 (add-after 'unpack 'delete-python3-code
13037 (lambda _
13038 (for-each delete-file
13039 '("lib/activepapers/builtins3.py"
13040 "lib/activepapers/standardlib3.py"
13041 "lib/activepapers/utility3.py")))))))))))
13042
13043 (define-public python-semver
13044 (package
13045 (name "python-semver")
13046 (version "2.7.9")
13047 (source
13048 (origin
13049 (method url-fetch)
13050 (uri (pypi-uri "semver" version))
13051 (sha256
13052 (base32
13053 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13054 (build-system python-build-system)
13055 (arguments
13056 `(#:phases
13057 (modify-phases %standard-phases
13058 (add-after 'unpack 'patch-test-requirements
13059 (lambda _
13060 (substitute* "setup.py"
13061 ;; Our Python is new enough.
13062 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13063 #t)))))
13064 (native-inputs
13065 `(("python-tox" ,python-tox)
13066 ("python-virtualenv" ,python-virtualenv)))
13067 (home-page "https://github.com/k-bx/python-semver")
13068 (synopsis "Python helper for Semantic Versioning")
13069 (description "This package provides a Python library for
13070 @url{Semantic Versioning, http://semver.org/}.")
13071 (license license:bsd-3)))
13072
13073 (define-public python2-semver
13074 (package-with-python2 python-semver))
13075
13076 (define-public python-pyro4
13077 (package
13078 (name "python-pyro4")
13079 (version "4.74")
13080 (source
13081 (origin
13082 (method url-fetch)
13083 (uri (pypi-uri "Pyro4" version))
13084 (sha256
13085 (base32
13086 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13087 (build-system python-build-system)
13088 (propagated-inputs
13089 `(("python-serpent" ,python-serpent)))
13090 (home-page "https://pyro4.readthedocs.io")
13091 (synopsis "Distributed object middleware for Python")
13092 (description
13093 "Pyro enables you to build applications in which objects can talk to each
13094 other over the network. You can just use normal Python method calls to call
13095 objects on other machines, also known as remote procedure calls (RPC).")
13096 (license license:expat)))
13097
13098 (define-public python2-pyro
13099 (package
13100 (name "python2-pyro")
13101 (version "3.16")
13102 (source
13103 (origin
13104 (method url-fetch)
13105 (uri (pypi-uri "Pyro" version))
13106 (file-name (string-append "Pyro-" version ".tar.gz"))
13107 (sha256
13108 (base32
13109 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13110 (build-system python-build-system)
13111 (arguments
13112 ;; Pyro is not compatible with Python 3
13113 `(#:python ,python-2
13114 ;; Pyro has no test cases for automatic execution
13115 #:tests? #f))
13116 (home-page "http://pythonhosted.org/Pyro/")
13117 (synopsis "Distributed object manager for Python")
13118 (description "Pyro is a Distributed Object Technology system
13119 written in Python that is designed to be easy to use. It resembles
13120 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13121 which is a system and language independent Distributed Object Technology
13122 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13123 longer maintained. New projects should use Pyro4 instead, which
13124 is the new Pyro version that is actively developed.")
13125 (license license:expat)))
13126
13127 (define-public python2-scientific
13128 (package
13129 (name "python2-scientific")
13130 (version "2.9.4")
13131 (source
13132 (origin
13133 (method url-fetch)
13134 (uri (string-append "https://bitbucket.org/khinsen/"
13135 "scientificpython/downloads/ScientificPython-"
13136 version ".tar.gz"))
13137 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13138 (sha256
13139 (base32
13140 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13141 (build-system python-build-system)
13142 (inputs
13143 `(("netcdf" ,netcdf)))
13144 (propagated-inputs
13145 `(("python-numpy" ,python2-numpy-1.8)
13146 ("python-pyro" ,python2-pyro)))
13147 (arguments
13148 ;; ScientificPython is not compatible with Python 3
13149 `(#:python ,python-2
13150 #:tests? #f ; No test suite
13151 #:phases
13152 (modify-phases %standard-phases
13153 (replace 'build
13154 (lambda* (#:key inputs #:allow-other-keys)
13155 (zero? (system* "python" "setup.py" "build"
13156 (string-append "--netcdf_prefix="
13157 (assoc-ref inputs "netcdf")))))))))
13158 (home-page "https://bitbucket.org/khinsen/scientificpython")
13159 (synopsis "Python modules for scientific computing")
13160 (description "ScientificPython is a collection of Python modules that are
13161 useful for scientific computing. Most modules are rather general (Geometry,
13162 physical units, automatic derivatives, ...) whereas others are more
13163 domain-specific (e.g. netCDF and PDB support). The library is currently
13164 not actively maintained and works only with Python 2 and NumPy < 1.9.")
13165 (license license:cecill-c)))
13166
13167 (define-public python2-mmtk
13168 (package
13169 (name "python2-mmtk")
13170 (version "2.7.11")
13171 (source
13172 (origin
13173 (method url-fetch)
13174 (uri (string-append "https://bitbucket.org/khinsen/"
13175 "mmtk/downloads/MMTK-" version ".tar.gz"))
13176 (file-name (string-append "MMTK-" version ".tar.gz"))
13177 (sha256
13178 (base32
13179 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13180 (build-system python-build-system)
13181 (native-inputs
13182 `(("netcdf" ,netcdf)))
13183 (propagated-inputs
13184 `(("python-scientific" ,python2-scientific)
13185 ("python-tkinter" ,python-2 "tk")))
13186 (arguments
13187 `(#:python ,python-2
13188 #:tests? #f
13189 #:phases
13190 (modify-phases %standard-phases
13191 (add-before 'build 'includes-from-scientific
13192 (lambda* (#:key inputs #:allow-other-keys)
13193 (mkdir-p "Include/Scientific")
13194 (copy-recursively
13195 (string-append
13196 (assoc-ref inputs "python-scientific")
13197 "/include/python2.7/Scientific")
13198 "Include/Scientific"))))))
13199 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13200 (synopsis "Python library for molecular simulation")
13201 (description "MMTK is a library for molecular simulations with an emphasis
13202 on biomolecules. It provides widely used methods such as Molecular Dynamics
13203 and normal mode analysis, but also basic routines for implementing new methods
13204 for simulation and analysis. The library is currently not actively maintained
13205 and works only with Python 2 and NumPy < 1.9.")
13206 (license license:cecill-c)))
13207
13208 (define-public python-phonenumbers
13209 (package
13210 (name "python-phonenumbers")
13211 (version "8.9.1")
13212 (source
13213 (origin
13214 (method url-fetch)
13215 (uri (pypi-uri "phonenumbers" version))
13216 (sha256
13217 (base32
13218 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13219 (build-system python-build-system)
13220 (home-page
13221 "https://github.com/daviddrysdale/python-phonenumbers")
13222 (synopsis
13223 "Python library for dealing with international phone numbers")
13224 (description
13225 "This package provides a Python port of Google's libphonenumber library.")
13226 (license license:asl2.0)))
13227
13228 (define-public python2-phonenumbers
13229 (package-with-python2 python-phonenumbers))
13230
13231 (define-public python-send2trash
13232 (package
13233 (name "python-send2trash")
13234 (version "1.4.2")
13235 (source
13236 (origin (method url-fetch)
13237 ;; Source tarball on PyPI doesn't include tests.
13238 (uri (string-append "https://github.com/hsoft/send2trash/archive/"
13239 version ".tar.gz"))
13240 (file-name (string-append name "-" version ".tar.gz"))
13241 (sha256
13242 (base32
13243 "0ffyhwjyx61slkdy38iwjc4gmj7fj9gs2q58f075gwvq630pzm9z"))))
13244 (build-system python-build-system)
13245 (arguments
13246 '(#:phases
13247 (modify-phases %standard-phases
13248 (add-before 'check 'pre-check
13249 (lambda _
13250 (mkdir-p "/tmp/foo")
13251 (setenv "HOME" "/tmp/foo")
13252 #t)))))
13253 (home-page "https://github.com/hsoft/send2trash")
13254 (synopsis "Send files to the user's @file{~/Trash} directory")
13255 (description "This package provides a Python library to send files to the
13256 user's @file{~/Trash} directory.")
13257 (license license:bsd-3)))
13258
13259 (define-public python2-send2trash
13260 (package
13261 (inherit (package-with-python2 python-send2trash))
13262 (arguments
13263 (substitute-keyword-arguments (package-arguments python-send2trash)
13264 ((#:phases phases)
13265 `(modify-phases ,phases
13266 (add-before 'check 'setenv
13267 (lambda _
13268 (setenv "PYTHONPATH"
13269 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13270 #t))))))
13271 (properties `((python2-variant . ,(delay python-send2trash))))))
13272
13273 (define-public python-yapf
13274 (package
13275 (name "python-yapf")
13276 (version "0.24.0")
13277 (source
13278 (origin
13279 (method url-fetch)
13280 (uri (pypi-uri "yapf" version))
13281 (sha256
13282 (base32
13283 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13284 (build-system python-build-system)
13285 (home-page "https://github.com/google/yapf")
13286 (synopsis "Formatter for Python code")
13287 (description "YAPF is a formatter for Python code. It's based off of
13288 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13289 takes the code and reformats it to the best formatting that conforms to the
13290 style guide, even if the original code didn't violate the style guide.")
13291 (license license:asl2.0)))
13292
13293 (define-public python2-yapf
13294 (package-with-python2 python-yapf))
13295
13296 (define-public python-gyp
13297 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13298 (revision "0"))
13299 (package
13300 (name "python-gyp")
13301 ;; Google does not release versions,
13302 ;; based on second most recent commit date.
13303 (version (git-version "0.0.0" revision commit))
13304 (source
13305 (origin
13306 ;; Google does not release tarballs,
13307 ;; git checkout is needed.
13308 (method git-fetch)
13309 (uri (git-reference
13310 (url "https://chromium.googlesource.com/external/gyp")
13311 (commit commit)))
13312 (file-name (git-file-name name version))
13313 (sha256
13314 (base32
13315 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13316 (build-system python-build-system)
13317 (home-page "https://gyp.gsrc.io/")
13318 (synopsis "GYP is a Meta-Build system")
13319 (description
13320 "GYP builds build systems for large, cross platform applications.
13321 It can be used to generate XCode projects, Visual Studio projects, Ninja build
13322 files, and Makefiles.")
13323 (license license:bsd-3))))
13324
13325 (define-public python2-gyp
13326 (package-with-python2 python-gyp))
13327
13328 (define-public python-whatever
13329 (package
13330 (name "python-whatever")
13331 (version "0.5")
13332 (source
13333 (origin
13334 (method url-fetch)
13335 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13336 ".tar.gz"))
13337 (sha256
13338 (base32
13339 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13340 (file-name (string-append name "-" version ".tar.gz"))))
13341 (build-system python-build-system)
13342 (arguments
13343 `(#:phases
13344 (modify-phases %standard-phases
13345 (replace 'check
13346 (lambda _
13347 (invoke "py.test"))))))
13348 (native-inputs
13349 `(("python-pytest" ,python-pytest)))
13350 (home-page "http://github.com/Suor/whatever")
13351 (synopsis "Make anonymous functions by partial application of operators")
13352 (description "@code{whatever} provides an easy way to make anonymous
13353 functions by partial application of operators.")
13354 (license license:bsd-3)))
13355
13356 (define-public python2-whatever
13357 (package-with-python2 python-whatever))
13358
13359 (define-public python-funcy
13360 (package
13361 (name "python-funcy")
13362 (version "1.10")
13363 (source
13364 (origin
13365 (method url-fetch)
13366 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13367 ".tar.gz"))
13368 (sha256
13369 (base32
13370 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13371 (file-name (string-append name "-" version ".tar.gz"))))
13372 (build-system python-build-system)
13373 (arguments
13374 `(#:phases
13375 (modify-phases %standard-phases
13376 (replace 'check
13377 (lambda _
13378 (invoke "py.test"))))))
13379 (native-inputs
13380 `(("python-pytest" ,python-pytest)
13381 ("python-whatever" ,python-whatever)))
13382 (home-page "http://github.com/Suor/funcy")
13383 (synopsis "Functional tools")
13384 (description "@code{funcy} is a library that provides functional tools.
13385 Examples are:
13386 @enumerate
13387 @item merge - Merges collections of the same type
13388 @item walk - Type-preserving map
13389 @item select - Selects a part of a collection
13390 @item take - Takes the first n items of a collection
13391 @item first - Takes the first item of a collection
13392 @item remove - Predicated-removes items of a collection
13393 @item concat - Concatenates two collections
13394 @item flatten - Flattens a collection with subcollections
13395 @item distinct - Returns only distinct items
13396 @item split - Predicated-splits a collection
13397 @item split_at - Splits a collection at a given item
13398 @item group_by - Groups items by group
13399 @item pairwise - Pairs off adjacent items
13400 @item partial - Partially-applies a function
13401 @item curry - Curries a function
13402 @item compose - Composes functions
13403 @item complement - Complements a predicate
13404 @item all_fn - \"all\" with predicate
13405 @end enumerate")
13406 (license license:bsd-3)))
13407
13408 (define-public python2-funcy
13409 (package-with-python2 python-funcy))
13410
13411 (define-public python-isoweek
13412 (package
13413 (name "python-isoweek")
13414 (version "1.3.3")
13415 (source
13416 (origin
13417 (method url-fetch)
13418 (uri (pypi-uri "isoweek" version))
13419 (sha256
13420 (base32
13421 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13422 (build-system python-build-system)
13423 (home-page "https://github.com/gisle/isoweek")
13424 (synopsis "Objects representing a week")
13425 (description "The @code{isoweek} module provide the class Week that
13426 implements the week definition of ISO 8601. This standard also defines
13427 a notation for identifying weeks; yyyyWww (where the W is a literal).
13428 Week instances stringify to this form.")
13429 (license license:bsd-3)))
13430
13431 (define-public python2-isoweek
13432 (package-with-python2 python-isoweek))
13433
13434 (define-public python-tokenize-rt
13435 (package
13436 (name "python-tokenize-rt")
13437 (version "2.0.1")
13438 (source
13439 (origin
13440 (method url-fetch)
13441 (uri (pypi-uri "tokenize-rt" version))
13442 (sha256
13443 (base32
13444 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13445 (build-system python-build-system)
13446 (home-page "https://github.com/asottile/tokenize-rt")
13447 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13448 (description
13449 "This Python library is a wrapper around @code{tokenize} from the Python
13450 standard library. It provides two additional tokens @code{ESCAPED_NL} and
13451 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13452 and @code{tokens_to_src} to roundtrip.")
13453 (license license:expat)))
13454
13455 (define-public python-future-fstrings
13456 (package
13457 (name "python-future-fstrings")
13458 (version "0.4.1")
13459 (source
13460 (origin
13461 (method url-fetch)
13462 (uri (pypi-uri "future_fstrings" version))
13463 (sha256
13464 (base32
13465 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13466 (build-system python-build-system)
13467 (propagated-inputs
13468 `(("python-tokenize-rt" ,python-tokenize-rt)))
13469 (home-page "https://github.com/asottile/future-fstrings")
13470 (synopsis "Backport of fstrings to Python < 3.6")
13471 (description
13472 "This package provides a UTF-8 compatible encoding
13473 @code{future_fstrings}, which performs source manipulation. It decodes the
13474 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13475 @code{f} strings.")
13476 (license license:expat)))
13477
13478 (define-public python-typing
13479 (package
13480 (name "python-typing")
13481 (version "3.6.6")
13482 (source
13483 (origin
13484 (method url-fetch)
13485 (uri (pypi-uri "typing" version))
13486 (sha256
13487 (base32
13488 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13489 (build-system python-build-system)
13490 (home-page "https://docs.python.org/3/library/typing.html")
13491 (synopsis "Type hints for Python")
13492 (description "This is a backport of the standard library @code{typing}
13493 module to Python versions older than 3.5. Typing defines a standard notation
13494 for Python function and variable type annotations. The notation can be used
13495 for documenting code in a concise, standard format, and it has been designed
13496 to also be used by static and runtime type checkers, static analyzers, IDEs
13497 and other tools.")
13498 (license license:psfl)))
13499
13500 (define-public python2-typing
13501 (package-with-python2 python-typing))
13502
13503 (define-public bpython
13504 (package
13505 (name "bpython")
13506 (version "0.17.1")
13507 (source
13508 (origin
13509 (method url-fetch)
13510 (uri (pypi-uri "bpython" version))
13511 (sha256
13512 (base32
13513 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13514 (build-system python-build-system)
13515 (arguments
13516 `(#:phases
13517 (modify-phases %standard-phases
13518 (add-after 'unpack 'remove-failing-test
13519 (lambda _
13520 ;; Remove failing test. FIXME: make it pass
13521 (delete-file "bpython/test/test_args.py")
13522 #t))
13523 (add-after 'wrap 'add-aliases
13524 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13525 (lambda* (#:key outputs #:allow-other-keys)
13526 (let ((out (assoc-ref outputs "out")))
13527 (for-each
13528 (lambda (old new)
13529 (symlink old (string-append out "/bin/" new)))
13530 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13531 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13532 #t)))))
13533 (propagated-inputs
13534 `(("python-pygments" ,python-pygments)
13535 ("python-requests" ,python-requests)
13536 ("python-babel" ,python-babel) ; optional, for internationalization
13537 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13538 ("python-greenlet" ,python-greenlet)
13539 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13540 ("python-six" ,python-six)))
13541 (native-inputs
13542 `(("python-sphinx" ,python-sphinx)
13543 ("python-mock" ,python-mock)))
13544 (home-page "https://bpython-interpreter.org/")
13545 (synopsis "Fancy interface to the Python interpreter")
13546 (description "Bpython is a fancy interface to the Python
13547 interpreter. bpython's main features are
13548
13549 @enumerate
13550 @item in-line syntax highlighting,
13551 @item readline-like autocomplete with suggestions displayed as you type,
13552 @item expected parameter list for any Python function,
13553 @item \"rewind\" function to pop the last line of code from memory and
13554 re-evaluate,
13555 @item send the code you've entered off to a pastebin,
13556 @item save the code you've entered to a file, and
13557 @item auto-indentation.
13558 @end enumerate")
13559 (license license:expat)))
13560
13561 (define-public bpython2
13562 (let ((base (package-with-python2
13563 (strip-python2-variant bpython))))
13564 (package (inherit base)
13565 (name "bpython2")
13566 (arguments
13567 `(#:python ,python-2
13568 #:phases
13569 (modify-phases %standard-phases
13570 (add-after 'unpack 'remove-failing-test
13571 (lambda _
13572 ;; Remove failing test. FIXME: make it pass
13573 (delete-file "bpython/test/test_args.py")
13574 ;; Disable failing test-cases (renaming inhibits they are
13575 ;; discovered)
13576 (substitute* "bpython/test/test_curtsies_repl.py"
13577 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13578 (string-append a "xxx_off_" b))
13579 (("^(\\s*def )(test_complex\\W)" _ a b)
13580 (string-append a "xxx_off_" b)))
13581 #t))
13582 (add-before 'build 'rename-scripts
13583 ;; rename the scripts to bypthon2, bpdb2, etc.
13584 (lambda _
13585 (substitute* "setup.py"
13586 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13587 (string-append name "2" rest "\n"))
13588 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13589 (string-append name "2" (or sub "") rest "\n")))
13590 #t))))))))
13591
13592 (define-public python-pyinotify
13593 (package
13594 (name "python-pyinotify")
13595 (version "0.9.6")
13596 (source (origin
13597 (method url-fetch)
13598 (uri (pypi-uri "pyinotify" version))
13599 (sha256
13600 (base32
13601 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13602 (build-system python-build-system)
13603 (arguments `(#:tests? #f)) ;no tests
13604 (home-page "https://github.com/seb-m/pyinotify")
13605 (synopsis "Python library for monitoring inotify events")
13606 (description
13607 "@code{pyinotify} provides a Python interface for monitoring
13608 file system events on Linux.")
13609 (license license:expat)))
13610
13611 (define-public python2-pyinotify
13612 (package-with-python2 python-pyinotify))
13613
13614 ;; Ada parser uses this version.
13615 (define-public python2-quex-0.67.3
13616 (package
13617 (name "python2-quex")
13618 (version "0.67.3")
13619 (source
13620 (origin
13621 (method url-fetch)
13622 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13623 (version-major+minor version)
13624 "/quex-" version ".zip"))
13625 (sha256
13626 (base32
13627 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13628 (build-system python-build-system)
13629 (native-inputs
13630 `(("unzip" ,unzip)))
13631 (arguments
13632 `(#:python ,python-2
13633 #:tests? #f
13634 #:phases
13635 (modify-phases %standard-phases
13636 (delete 'configure)
13637 (delete 'build)
13638 (replace 'install
13639 (lambda* (#:key outputs #:allow-other-keys)
13640 (let* ((out (assoc-ref outputs "out"))
13641 (share/quex (string-append out "/share/quex"))
13642 (bin (string-append out "/bin")))
13643 (copy-recursively "." share/quex)
13644 (mkdir-p bin)
13645 (symlink (string-append share/quex "/quex-exe.py")
13646 (string-append bin "/quex"))
13647 #t))))))
13648 (native-search-paths
13649 (list (search-path-specification
13650 (variable "QUEX_PATH")
13651 (files '("share/quex")))))
13652 (home-page "http://quex.sourceforge.net/")
13653 (synopsis "Lexical analyzer generator in Python")
13654 (description "@code{quex} is a lexical analyzer generator in Python.")
13655 (license license:lgpl2.1+))) ; Non-military
13656
13657 (define-public python2-quex
13658 (package (inherit python2-quex-0.67.3)
13659 (name "python2-quex")
13660 (version "0.68.1")
13661 (source
13662 (origin
13663 (method url-fetch)
13664 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13665 (sha256
13666 (base32
13667 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13668 (file-name (string-append name "-" version ".tar.gz"))))))
13669
13670 (define-public python-more-itertools
13671 (package
13672 (name "python-more-itertools")
13673 (version "4.3.0")
13674 (source
13675 (origin
13676 (method url-fetch)
13677 (uri (pypi-uri "more-itertools" version))
13678 (sha256
13679 (base32
13680 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
13681 (build-system python-build-system)
13682 (arguments
13683 `(,@(if (any (cute string-prefix? <> (or (%current-system)
13684 (%current-target-system)))
13685 '("armhf" "i686"))
13686 '(#:phases
13687 (modify-phases %standard-phases
13688 ;; This is required for 32-bit hardware.
13689 ;; TODO: Try to remove this when upgrading.
13690 (add-after 'unpack 'patch-test
13691 (lambda _
13692 (substitute* "more_itertools/tests/test_more.py"
13693 (("10 \\*\\* 10") "9 ** 9"))
13694 #t))))
13695 '())))
13696 (propagated-inputs
13697 `(("python-six" ,python-six-bootstrap)))
13698 (home-page "https://github.com/erikrose/more-itertools")
13699 (synopsis "More routines for operating on iterables, beyond itertools")
13700 (description "Python's built-in @code{itertools} module implements a
13701 number of iterator building blocks inspired by constructs from APL, Haskell,
13702 and SML. @code{more-itertools} includes additional building blocks for
13703 working with iterables.")
13704 (license license:expat)))
13705
13706 (define-public python2-more-itertools
13707 (package-with-python2 python-more-itertools))
13708
13709 (define-public python-latexcodec
13710 (package
13711 (name "python-latexcodec")
13712 (version "1.0.5")
13713 (source
13714 (origin
13715 (method url-fetch)
13716 (uri (pypi-uri "latexcodec" version))
13717 (sha256
13718 (base32
13719 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13720 (build-system python-build-system)
13721 (inputs
13722 `(("python-six" ,python-six)))
13723 (home-page "https://readthedocs.org/projects/latexcodec/")
13724 (synopsis "Work with LaTeX code in Python")
13725 (description "Lexer and codec to work with LaTeX code in Python.")
13726 (license license:expat)))
13727
13728 (define-public python-pybtex
13729 (package
13730 (name "python-pybtex")
13731 (version "0.21")
13732 (source
13733 (origin
13734 (method url-fetch)
13735 (uri (pypi-uri "pybtex" version))
13736 (sha256
13737 (base32
13738 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13739 (build-system python-build-system)
13740 (native-inputs
13741 `(("python-nose" ,python-nose)))
13742 (inputs
13743 `(("python-latexcodec" ,python-latexcodec)
13744 ("python-pyyaml" ,python-pyyaml)
13745 ("python-six" ,python-six)))
13746 (arguments
13747 `(#:test-target "nosetests"))
13748 (home-page "https://pybtex.org/")
13749 (synopsis "BibTeX-compatible bibliography processor")
13750 (description "Pybtex is a BibTeX-compatible bibliography processor written
13751 in Python. You can simply type pybtex instead of bibtex.")
13752 (license license:expat)))
13753
13754 (define-public python-onetimepass
13755 (package
13756 (name "python-onetimepass")
13757 (version "1.0.1")
13758 (source
13759 (origin
13760 (method url-fetch)
13761 (uri (pypi-uri "onetimepass" version))
13762 (sha256
13763 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13764 (build-system python-build-system)
13765 (propagated-inputs `(("python-six" ,python-six)))
13766 (home-page "https://github.com/tadeck/onetimepass/")
13767 (synopsis "One-time password library")
13768 (description "Python one-time password library for HMAC-based (HOTP) and
13769 time-based (TOTP) passwords.")
13770 (license license:expat)))
13771
13772 (define-public python-parso
13773 (package
13774 (name "python-parso")
13775 (version "0.3.1")
13776 (source
13777 (origin
13778 (method url-fetch)
13779 (uri (pypi-uri "parso" version))
13780 (sha256
13781 (base32
13782 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13783 (native-inputs
13784 `(("python-pytest" ,python-pytest)))
13785 (build-system python-build-system)
13786 (home-page "https://github.com/davidhalter/parso")
13787 (synopsis "Python Parser")
13788 (description "Parso is a Python parser that supports error recovery and
13789 round-trip parsing for different Python versions (in multiple Python versions).
13790 Parso is also able to list multiple syntax errors in your Python file.")
13791 (license license:expat)))
13792
13793 (define-public python2-parso
13794 (package-with-python2 python-parso))
13795
13796 (define-public python-async-generator
13797 (package
13798 (name "python-async-generator")
13799 (version "1.9")
13800 (source
13801 (origin
13802 (method url-fetch)
13803 (uri (pypi-uri "async_generator" version))
13804 (sha256
13805 (base32
13806 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13807 (build-system python-build-system)
13808 (native-inputs
13809 `(("python-pytest" ,python-pytest)))
13810 (home-page "https://github.com/python-trio/async_generator")
13811 (synopsis "Async generators and context managers for Python 3.5+")
13812 (description "@code{async_generator} back-ports Python 3.6's native async
13813 generators and Python 3.7's context managers into Python 3.5.")
13814 ;; Dual licensed.
13815 (license (list license:expat license:asl2.0))))
13816
13817 (define-public python-async-timeout
13818 (package
13819 (name "python-async-timeout")
13820 (version "3.0.1")
13821 (source
13822 (origin
13823 (method url-fetch)
13824 (uri (pypi-uri "async-timeout" version))
13825 (sha256
13826 (base32
13827 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
13828 (build-system python-build-system)
13829 (home-page "https://github.com/aio-libs/async_timeout/")
13830 (synopsis "Timeout context manager for asyncio programs")
13831 (description "@code{async-timeout} provides a timeout timeout context
13832 manager compatible with @code{asyncio}.")
13833 (license license:asl2.0)))
13834
13835 (define-public python-glob2
13836 (package
13837 (name "python-glob2")
13838 (version "0.6")
13839 (source (origin
13840 (method url-fetch)
13841 (uri (string-append
13842 "https://github.com/miracle2k/python-glob2/archive/"
13843 version
13844 ".tar.gz"))
13845 (sha256
13846 (base32
13847 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13848 (file-name (string-append name "-" version ".tar.gz"))))
13849 (build-system python-build-system)
13850 (home-page "https://github.com/miracle2k/python-glob2/")
13851 (synopsis "Extended Version of the python buildin glob module")
13852 (description "This is an extended version of the Python
13853 @url{http://docs.python.org/library/glob.html, built-in glob module} which
13854 adds:
13855
13856 @itemize
13857 @item The ability to capture the text matched by glob patterns, and return
13858 those matches alongside the file names.
13859 @item A recursive @code{**} globbing syntax, akin for example to the
13860 @code{globstar} option of Bash.
13861 @item The ability to replace the file system functions used, in order to glob
13862 on virtual file systems.
13863 @item Compatible with Python 2 and Python 3 (tested with 3.3).
13864 @end itemize
13865
13866 Glob2 currently based on the glob code from Python 3.3.1.")
13867 (license license:bsd-2)))
13868
13869 (define-public python2-glob2
13870 (package-with-python2 python-glob2))
13871
13872 (define-public python-gipc
13873 (package
13874 (name "python-gipc")
13875 (version "0.6.0")
13876 (source
13877 (origin
13878 (method url-fetch)
13879 (uri (pypi-uri "gipc" version ".zip"))
13880 (sha256
13881 (base32
13882 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13883 (build-system python-build-system)
13884 (native-inputs
13885 `(("unzip" ,unzip)))
13886 (propagated-inputs
13887 `(("python-gevent" ,python-gevent)))
13888 (home-page "http://gehrcke.de/gipc")
13889 (synopsis "Child process management in the context of gevent")
13890 (description "Usage of Python's multiprocessing package in a
13891 gevent-powered application may raise problems. With @code{gipc},
13892 process-based child processes can safely be created anywhere within a
13893 gevent-powered application.")
13894 (license license:expat)))
13895
13896 (define-public python2-gipc
13897 (package-with-python2 python-gipc))
13898
13899 (define-public python-fusepy
13900 (package
13901 (name "python-fusepy")
13902 (version "2.0.4")
13903 (source
13904 (origin
13905 (method url-fetch)
13906 (uri (pypi-uri "fusepy" version))
13907 (sha256
13908 (base32
13909 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
13910 (build-system python-build-system)
13911 (arguments
13912 `(#:phases
13913 (modify-phases %standard-phases
13914 (add-before 'build 'set-library-file-name
13915 (lambda* (#:key inputs #:allow-other-keys)
13916 (let ((fuse (assoc-ref inputs "fuse")))
13917 (substitute* "fuse.py"
13918 (("find_library\\('fuse'\\)")
13919 (string-append "'" fuse "/lib/libfuse.so'")))
13920 #t))))))
13921 (propagated-inputs
13922 `(("fuse" ,fuse)))
13923 (home-page "https://github.com/fusepy/fusepy")
13924 (synopsis "Simple ctypes bindings for FUSE")
13925 (description "Python module that provides a simple interface to FUSE and
13926 MacFUSE. The binding is created using the standard @code{ctypes} library.")
13927 (license license:isc)))
13928
13929 (define-public python2-fusepy
13930 (package-with-python2 python-fusepy))
13931
13932 (define-public python2-gdrivefs
13933 (package
13934 (name "python2-gdrivefs")
13935 (version "0.14.9")
13936 (source
13937 (origin
13938 (method url-fetch)
13939 (uri (pypi-uri "gdrivefs" version))
13940 (sha256
13941 (base32
13942 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
13943 (build-system python-build-system)
13944 (arguments
13945 `(#:python ,python-2
13946 #:phases
13947 (modify-phases %standard-phases
13948 (add-before 'build 'patch-setup-py
13949 (lambda _
13950 ;; Update requirements from dependency==version
13951 ;; to dependency>=version
13952 (substitute* "gdrivefs/resources/requirements.txt"
13953 (("==") ">="))
13954 #t)))))
13955 (native-inputs
13956 `(("python2-gipc" ,python2-gipc)
13957 ("python2-gevent" ,python2-gevent)
13958 ("python2-greenlet" ,python2-greenlet)
13959 ("python2-httplib2" ,python2-httplib2)
13960 ("python2-uritemplate" ,python2-uritemplate)
13961 ("python2-oauth2client" ,python2-oauth2client)
13962 ("python2-six" ,python2-six)))
13963 (propagated-inputs
13964 `(("python2-dateutil" ,python2-dateutil)
13965 ("python2-fusepy" ,python2-fusepy)
13966 ("python2-google-api-client" ,python2-google-api-client)))
13967 (home-page "https://github.com/dsoprea/GDriveFS")
13968 (synopsis "Mount Google Drive as a local file system")
13969 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
13970 under Python 2.7.")
13971 (license license:gpl2)))
13972
13973 (define-public pybind11
13974 (package
13975 (name "pybind11")
13976 (version "2.2.4")
13977 (source (origin
13978 (method git-fetch)
13979 (uri (git-reference
13980 (url "https://github.com/pybind/pybind11.git")
13981 (commit (string-append "v" version))))
13982 (sha256
13983 (base32
13984 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
13985 (file-name (git-file-name name version))))
13986 (build-system cmake-build-system)
13987 (native-inputs
13988 `(("python" ,python)
13989 ("python-pytest" ,python-pytest)))
13990 (arguments
13991 `(#:test-target "check"))
13992 (home-page "https://github.com/pybind/pybind11/")
13993 (synopsis "Seamless operability between C++11 and Python")
13994 (description "pybind11 is a lightweight header-only library that exposes
13995 C++ types in Python and vice versa, mainly to create Python bindings of
13996 existing C++ code. Its goals and syntax are similar to the excellent
13997 Boost.Python library by David Abrahams: to minimize boilerplate code in
13998 traditional extension modules by inferring type information using compile-time
13999 introspection.")
14000 (license license:expat)))
14001
14002 (define-public python-fasteners
14003 (package
14004 (name "python-fasteners")
14005 (version "0.14.1")
14006 (source
14007 (origin
14008 (method url-fetch)
14009 (uri (pypi-uri "fasteners" version))
14010 (sha256
14011 (base32
14012 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14013 (build-system python-build-system)
14014 (propagated-inputs
14015 `(("python-monotonic" ,python-monotonic)
14016 ("python-six" ,python-six)
14017 ("python-testtools" ,python-testtools)))
14018 (home-page "https://github.com/harlowja/fasteners")
14019 (synopsis "Python package that provides useful locks")
14020 (description
14021 "This package provides a Python program that provides following locks:
14022
14023 @itemize
14024 @item Locking decorator
14025 @item Reader-writer locks
14026 @item Inter-process locks
14027 @item Generic helpers
14028 @end itemize\n")
14029 (properties `((python2-variant . ,(delay python2-fasteners))))
14030 (license license:asl2.0)))
14031
14032 (define-public python2-fasteners
14033 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14034 (package
14035 (inherit base)
14036 (propagated-inputs
14037 `(("python2-futures" ,python2-futures)
14038 ,@(package-propagated-inputs base))))))
14039
14040 (define-public python-requests-file
14041 (package
14042 (name "python-requests-file")
14043 (version "1.4.3")
14044 (source
14045 (origin
14046 (method url-fetch)
14047 (uri (pypi-uri "requests-file" version))
14048 (sha256
14049 (base32
14050 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14051 (build-system python-build-system)
14052 (propagated-inputs
14053 `(("python-requests" ,python-requests)
14054 ("python-six" ,python-six)))
14055 (home-page
14056 "https://github.com/dashea/requests-file")
14057 (synopsis "File transport adapter for Requests")
14058 (description
14059 "Requests-File is a transport adapter for use with the Requests Python
14060 library to allow local filesystem access via file:// URLs.")
14061 (license license:asl2.0)))
14062
14063 (define-public python2-requests-file
14064 (package-with-python2 python-requests-file))
14065
14066 (define-public python-tldextract
14067 (package
14068 (name "python-tldextract")
14069 (version "2.2.0")
14070 (source
14071 (origin
14072 (method url-fetch)
14073 (uri (pypi-uri "tldextract" version))
14074 (sha256
14075 (base32
14076 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14077 (build-system python-build-system)
14078 (native-inputs
14079 `(("python-pytest" ,python-pytest)
14080 ("python-responses" ,python-responses)))
14081 (propagated-inputs
14082 `(("python-idna" ,python-idna)
14083 ("python-requests" ,python-requests)
14084 ("python-requests-file" ,python-requests-file)))
14085 (home-page
14086 "https://github.com/john-kurkowski/tldextract")
14087 (synopsis
14088 "Separate the TLD from the registered domain and subdomains of a URL")
14089 (description
14090 "TLDExtract accurately separates the TLD from the registered domain and
14091 subdomains of a URL, using the Public Suffix List. By default, this includes
14092 the public ICANN TLDs and their exceptions. It can optionally support the
14093 Public Suffix List's private domains as well.")
14094 (license license:bsd-3)))
14095
14096 (define-public python2-tldextract
14097 (package-with-python2 python-tldextract))
14098
14099 (define-public python-pynamecheap
14100 (package
14101 (name "python-pynamecheap")
14102 (version "0.0.3")
14103 (source
14104 (origin
14105 (method url-fetch)
14106 (uri (pypi-uri "PyNamecheap" version))
14107 (sha256
14108 (base32
14109 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14110 (build-system python-build-system)
14111 (propagated-inputs
14112 `(("python-requests" ,python-requests)))
14113 (home-page
14114 "https://github.com/Bemmu/PyNamecheap")
14115 (synopsis
14116 "Namecheap API client in Python")
14117 (description
14118 "PyNamecheap is a Namecheap API client in Python.")
14119 (license license:expat)))
14120
14121 (define-public python2-pynamecheap
14122 (package-with-python2 python-pynamecheap))
14123
14124 (define-public python-dns-lexicon
14125 (package
14126 (name "python-dns-lexicon")
14127 (version "2.4.0")
14128 (source
14129 (origin
14130 (method url-fetch)
14131 (uri (pypi-uri "dns-lexicon" version))
14132 (sha256
14133 (base32
14134 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14135 (build-system python-build-system)
14136 (arguments
14137 `(#:tests? #f)) ;requires internet access
14138 (propagated-inputs
14139 `(("python-future" ,python-future)
14140 ("python-pynamecheap" ,python-pynamecheap)
14141 ("python-requests" ,python-requests)
14142 ("python-tldextract" ,python-tldextract)
14143 ("python-urllib3" ,python-urllib3)))
14144 (home-page "https://github.com/AnalogJ/lexicon")
14145 (synopsis
14146 "Manipulate DNS records on various DNS providers")
14147 (description
14148 "Lexicon provides a way to manipulate DNS records on multiple DNS
14149 providers in a standardized way. It has a CLI but it can also be used as a
14150 Python library. It was designed to be used in automation, specifically with
14151 Let's Encrypt.")
14152 (license license:expat)))
14153
14154 (define-public python2-dns-lexicon
14155 (package-with-python2 python-dns-lexicon))
14156
14157 (define-public python-commandlines
14158 (package
14159 (name "python-commandlines")
14160 (version "0.4.1")
14161 (source
14162 (origin
14163 (method url-fetch)
14164 (uri (pypi-uri "commandlines" version))
14165 (sha256
14166 (base32
14167 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14168 (build-system python-build-system)
14169 (home-page "https://github.com/chrissimpkins/commandlines")
14170 (synopsis "Command line argument to object parsing library")
14171 (description
14172 "@code{Commandlines} is a Python library for command line application
14173 development that supports command line argument parsing, command string
14174 validation testing and application logic.")
14175 (license license:expat)))
14176
14177 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14178 ;; python-numba. They have a very unflexible relationship.
14179 (define-public python-numba
14180 (package
14181 (name "python-numba")
14182 (version "0.39.0")
14183 (source
14184 (origin
14185 (method url-fetch)
14186 (uri (pypi-uri "numba" version))
14187 (sha256
14188 (base32
14189 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14190 (build-system python-build-system)
14191 (arguments
14192 `(#:modules ((guix build utils)
14193 (guix build python-build-system)
14194 (ice-9 ftw)
14195 (srfi srfi-1)
14196 (srfi srfi-26))
14197 #:phases
14198 (modify-phases %standard-phases
14199 (add-after 'unpack 'disable-proprietary-features
14200 (lambda _
14201 (setenv "NUMBA_DISABLE_HSA" "1")
14202 (setenv "NUMBA_DISABLE_CUDA" "1")
14203 #t))
14204 (add-after 'unpack 'remove-failing-tests
14205 (lambda _
14206 ;; FIXME: these tests fail for unknown reasons:
14207 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14208 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14209 (substitute* "numba/tests/test_dispatcher.py"
14210 (("def test(_non_writable_pycache)" _ m)
14211 (string-append "def guix_skip" m))
14212 (("def test(_non_creatable_pycache)" _ m)
14213 (string-append "def guix_skip" m))
14214 (("def test(_frozen)" _ m)
14215 (string-append "def guix_skip" m)))
14216
14217 ;; These tests fail because we don't run the tests from the build
14218 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14219 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14220 (substitute* "numba/tests/test_pycc.py"
14221 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14222 (string-append "def guix_skip" m)))
14223 #t))
14224 (replace 'check
14225 (lambda _
14226 (let ((cwd (getcwd)))
14227 (setenv "PYTHONPATH"
14228 (string-append cwd "/build/"
14229 (find (cut string-prefix? "lib" <>)
14230 (scandir (string-append cwd "/build")))
14231 ":"
14232 (getenv "PYTHONPATH")))
14233 ;; Something is wrong with the PYTHONPATH when running the
14234 ;; tests from the build directory, as it complains about not being
14235 ;; able to import certain modules.
14236 (with-directory-excursion "/tmp"
14237 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14238 #t)))))
14239 (propagated-inputs
14240 `(("python-llvmlite" ,python-llvmlite)
14241 ("python-numpy" ,python-numpy)
14242 ("python-singledispatch" ,python-singledispatch)))
14243 ;; Needed for tests.
14244 (inputs
14245 `(("python-jinja2" ,python-jinja2)
14246 ("python-pygments" ,python-pygments)))
14247 (home-page "https://numba.pydata.org")
14248 (synopsis "Compile Python code using LLVM")
14249 (description "Numba gives you the power to speed up your applications with
14250 high performance functions written directly in Python. With a few
14251 annotations, array-oriented and math-heavy Python code can be just-in-time
14252 compiled to native machine instructions, similar in performance to C, C++ and
14253 Fortran, without having to switch languages or Python interpreters.
14254
14255 Numba works by generating optimized machine code using the LLVM compiler
14256 infrastructure at import time, runtime, or statically (using the included pycc
14257 tool).")
14258 (license license:bsd-3)))
14259
14260 (define-public python-anndata
14261 (package
14262 (name "python-anndata")
14263 (version "0.6.9")
14264 (source
14265 (origin
14266 (method url-fetch)
14267 (uri (pypi-uri "anndata" version))
14268 (sha256
14269 (base32
14270 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14271 (build-system python-build-system)
14272 (propagated-inputs
14273 `(("python-h5py" ,python-h5py)
14274 ("python-natsort" ,python-natsort)
14275 ("python-pandas" ,python-pandas)
14276 ("python-scipy" ,python-scipy)))
14277 (home-page "https://github.com/theislab/anndata")
14278 (synopsis "Annotated data for data analysis pipelines")
14279 (description "Anndata is a package for simple (functional) high-level APIs
14280 for data analysis pipelines. In this context, it provides an efficient,
14281 scalable way of keeping track of data together with learned annotations and
14282 reduces the code overhead typically encountered when using a mostly
14283 object-oriented library such as @code{scikit-learn}.")
14284 (license license:bsd-3)))
14285
14286 (define-public python-dill
14287 (package
14288 (name "python-dill")
14289 (version "0.2.8.2")
14290 (source
14291 (origin
14292 (method url-fetch)
14293 (uri (pypi-uri "dill" version))
14294 (sha256
14295 (base32
14296 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14297 (build-system python-build-system)
14298 ;; FIXME: The check phase fails with "don't know how to make test".
14299 (arguments '(#:tests? #f))
14300 (home-page "https://pypi.org/project/dill")
14301 (synopsis "Serialize all of Python")
14302 (description "Dill extends Python's @code{pickle} module for serializing
14303 and de-serializing Python objects to the majority of the built-in Python
14304 types. Dill provides the user the same interface as the @code{pickle} module,
14305 and also includes some additional features. In addition to pickling Python
14306 objects, @code{dill} provides the ability to save the state of an interpreter
14307 session in a single command. Hence, it would be feasable to save a
14308 interpreter session, close the interpreter, ship the pickled file to another
14309 computer, open a new interpreter, unpickle the session and thus continue from
14310 the saved state of the original interpreter session.")
14311 (license license:bsd-3)))
14312
14313 (define-public python-multiprocess
14314 (package
14315 (name "python-multiprocess")
14316 (version "0.70.6.1")
14317 (source
14318 (origin
14319 (method url-fetch)
14320 (uri (pypi-uri "multiprocess" version))
14321 (sha256
14322 (base32
14323 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14324 (build-system python-build-system)
14325 (propagated-inputs
14326 `(("python-dill" ,python-dill)))
14327 (home-page "https://pypi.org/project/multiprocess")
14328 (synopsis "Multiprocessing and multithreading in Python")
14329 (description
14330 "This package is a fork of the multiprocessing Python package, a package
14331 which supports the spawning of processes using the API of the standard
14332 library's @code{threading} module.")
14333 (license license:bsd-3)))
14334
14335 (define-public python-toolz
14336 (package
14337 (name "python-toolz")
14338 (version "0.9.0")
14339 (source
14340 (origin
14341 (method url-fetch)
14342 (uri (pypi-uri "toolz" version))
14343 (sha256
14344 (base32
14345 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14346 (build-system python-build-system)
14347 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14348 ;; unregistered loader type"
14349 (arguments '(#:tests? #f))
14350 (home-page "https://github.com/pytoolz/toolz/")
14351 (synopsis "List processing tools and functional utilities")
14352 (description
14353 "This package provides a set of utility functions for iterators,
14354 functions, and dictionaries.")
14355 (license license:bsd-3)))
14356
14357 (define-public python2-toolz
14358 (package-with-python2 python-toolz))
14359
14360 (define-public python-cytoolz
14361 (package
14362 (name "python-cytoolz")
14363 (version "0.9.0.1")
14364 (source
14365 (origin
14366 (method url-fetch)
14367 (uri (pypi-uri "cytoolz" version))
14368 (sha256
14369 (base32
14370 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14371 (build-system python-build-system)
14372 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14373 ;; 'exceptions'"
14374 (arguments '(#:tests? #f))
14375 (propagated-inputs
14376 `(("python-toolz" ,python-toolz)))
14377 (native-inputs
14378 `(("python-cython" ,python-cython)))
14379 (home-page "https://github.com/pytoolz/cytoolz")
14380 (synopsis "High performance functional utilities")
14381 (description
14382 "The cytoolz package implements the same API as provided by toolz. The
14383 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14384 that is accessible to other projects developed in Cython.")
14385 (license license:bsd-3)))
14386
14387 (define-public python-sortedcontainers
14388 (package
14389 (name "python-sortedcontainers")
14390 (version "2.0.4")
14391 (source
14392 (origin
14393 (method url-fetch)
14394 (uri (pypi-uri "sortedcontainers" version))
14395 (sha256
14396 (base32
14397 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14398 (build-system python-build-system)
14399 (native-inputs
14400 `(("python-tox" ,python-tox)))
14401 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14402 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14403 (description
14404 "This package provides a sorted collections library, written in
14405 pure-Python.")
14406 (license license:asl2.0)))
14407
14408 (define-public python-cloudpickle
14409 (package
14410 (name "python-cloudpickle")
14411 (version "0.6.1")
14412 (source
14413 (origin
14414 (method url-fetch)
14415 (uri (pypi-uri "cloudpickle" version))
14416 (sha256
14417 (base32
14418 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14419 (build-system python-build-system)
14420 ;; FIXME: there are 5 errors in 122 tests:
14421 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14422 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14423 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14424 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14425 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14426 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14427 (arguments '(#:tests? #f))
14428 (native-inputs
14429 `(("python-pytest" ,python-pytest)
14430 ("python-mock" ,python-mock)
14431 ("python-tornado" ,python-tornado)))
14432 (home-page "https://github.com/cloudpipe/cloudpickle")
14433 (synopsis "Extended pickling support for Python objects")
14434 (description
14435 "Cloudpickle makes it possible to serialize Python constructs not
14436 supported by the default pickle module from the Python standard library. It
14437 is especially useful for cluster computing where Python expressions are
14438 shipped over the network to execute on remote hosts, possibly close to the
14439 data.")
14440 (license license:bsd-3)))
14441
14442 (define-public python2-cloudpickle
14443 (package-with-python2 python-cloudpickle))
14444
14445 (define-public python-locket
14446 (package
14447 (name "python-locket")
14448 (version "0.2.0")
14449 (source
14450 (origin
14451 (method url-fetch)
14452 (uri (pypi-uri "locket" version))
14453 (sha256
14454 (base32
14455 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14456 (build-system python-build-system)
14457 (home-page "https://github.com/mwilliamson/locket.py")
14458 (synopsis "File-based locks for Python")
14459 (description
14460 "Locket implements a lock that can be used by multiple processes provided
14461 they use the same path.")
14462 (license license:bsd-2)))
14463
14464 (define-public python2-locket
14465 (package-with-python2 python-locket))
14466
14467 (define-public python-blosc
14468 (package
14469 (name "python-blosc")
14470 (version "1.5.1")
14471 (source
14472 (origin
14473 (method url-fetch)
14474 (uri (pypi-uri "blosc" version))
14475 (sha256
14476 (base32
14477 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14478 (build-system python-build-system)
14479 ;; FIXME: all tests pass, but then this error is printed:
14480 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14481 (arguments '(#:tests? #f))
14482 (propagated-inputs
14483 `(("python-numpy" ,python-numpy)))
14484 (home-page "https://github.com/blosc/python-blosc")
14485 (synopsis "Python wrapper for the Blosc data compressor library")
14486 (description "Blosc is a high performance compressor optimized for binary
14487 data. It has been designed to transmit data to the processor cache faster
14488 than the traditional, non-compressed, direct memory fetch approach via a
14489 @code{memcpy()} system call.
14490
14491 Blosc works well for compressing numerical arrays that contains data with
14492 relatively low entropy, like sparse data, time series, grids with
14493 regular-spaced values, etc.
14494
14495 This Python package wraps the Blosc library.")
14496 (license license:bsd-3)))
14497
14498 (define-public python2-blosc
14499 (package-with-python2 python-blosc))
14500
14501 (define-public python-partd
14502 (package
14503 (name "python-partd")
14504 (version "0.3.9")
14505 (source
14506 (origin
14507 (method url-fetch)
14508 (uri (pypi-uri "partd" version))
14509 (sha256
14510 (base32
14511 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14512 (build-system python-build-system)
14513 (propagated-inputs
14514 `(("python-blosc" ,python-blosc)
14515 ("python-locket" ,python-locket)
14516 ("python-numpy" ,python-numpy)
14517 ("python-pandas" ,python-pandas)
14518 ("python-pyzmq" ,python-pyzmq)
14519 ("python-toolz" ,python-toolz)))
14520 (home-page "https://github.com/dask/partd/")
14521 (synopsis "Appendable key-value storage")
14522 (description "Partd stores key-value pairs. Values are raw bytes. We
14523 append on old values. Partd excels at shuffling operations.")
14524 (license license:bsd-3)))
14525
14526 (define-public python2-partd
14527 (package-with-python2 python-partd))
14528
14529 (define-public python-dask
14530 (package
14531 (name "python-dask")
14532 (version "1.0.0")
14533 (source
14534 (origin
14535 (method url-fetch)
14536 (uri (pypi-uri "dask" version))
14537 (sha256
14538 (base32
14539 "1xwz8h020ipwav2p5gcq9pskya1cvzd6hjyvd06dvr3w5lxlmym1"))))
14540 (build-system python-build-system)
14541 ;; A single test out of 5000+ fails. This test is marked as xfail when
14542 ;; pytest-xdist is used.
14543 (arguments
14544 `(#:phases
14545 (modify-phases %standard-phases
14546 (add-after 'unpack 'disable-broken-test
14547 (lambda _
14548 (substitute* "dask/tests/test_threaded.py"
14549 (("def test_interrupt\\(\\)" m)
14550 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14551 m)))
14552 (when (which "python2")
14553 ;; This test fails with recent Pandas:
14554 ;; <https://github.com/dask/dask/issues/3794>.
14555 (substitute* "dask/dataframe/tests/test_dataframe.py"
14556 (("def test_info\\(\\)" m)
14557 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14558 m))))
14559 #t))
14560 (replace 'check
14561 (lambda _ (invoke "pytest" "-vv"))))))
14562 (propagated-inputs
14563 `(("python-cloudpickle" ,python-cloudpickle)
14564 ("python-numpy" ,python-numpy)
14565 ("python-pandas" ,python-pandas)
14566 ("python-partd" ,python-partd)
14567 ("python-toolz" ,python-toolz)
14568 ("python-pyyaml" ,python-pyyaml)))
14569 (native-inputs
14570 `(("python-pytest" ,python-pytest)
14571 ("python-pytest-runner" ,python-pytest-runner)))
14572 (home-page "https://github.com/dask/dask/")
14573 (synopsis "Parallel computing with task scheduling")
14574 (description
14575 "Dask is a flexible parallel computing library for analytics. It
14576 consists of two components: dynamic task scheduling optimized for computation,
14577 and large data collections like parallel arrays, dataframes, and lists that
14578 extend common interfaces like NumPy, Pandas, or Python iterators to
14579 larger-than-memory or distributed environments. These parallel collections
14580 run on top of the dynamic task schedulers. ")
14581 (license license:bsd-3)))
14582
14583 (define-public python2-dask
14584 (package-with-python2 python-dask))
14585
14586 (define-public python-ilinkedlist
14587 (package
14588 (name "python-ilinkedlist")
14589 (version "0.4.0")
14590 (source
14591 (origin
14592 (method url-fetch)
14593 (uri (pypi-uri "ilinkedlist" version))
14594 (sha256
14595 (base32
14596 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14597 (build-system python-build-system)
14598 (native-inputs `(("python-pytest" ,python-pytest)))
14599 (inputs `(("python" ,python)))
14600 (home-page "https://github.com/luther9/ilinkedlist-py")
14601 (synopsis "Immutable linked list library")
14602 (description
14603 "This is a implementation of immutable linked lists for Python. It
14604 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14605 Since a linked list is treated as immutable, it is hashable, and its length
14606 can be retrieved in constant time. Some of the terminology is inspired by
14607 LISP. It is possible to create an improper list by creating a @code{Pair}
14608 with a non-list @code{cdr}.")
14609 (license license:gpl3+)))
14610
14611 (define-public python-readlike
14612 (package
14613 (name "python-readlike")
14614 (version "0.1.3")
14615 (source
14616 (origin
14617 (method url-fetch)
14618 (uri (pypi-uri "readlike" version))
14619 (sha256
14620 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14621 (build-system python-build-system)
14622 (home-page "https://github.com/jangler/readlike")
14623 (synopsis "GNU Readline-like line editing module")
14624 (description
14625 "This Python module provides line editing functions similar to the default
14626 Emacs-style ones of GNU Readline. Unlike the Python standard library's
14627 @code{readline} package, this one allows access to those capabilties in settings
14628 outside of a standard command-line interface. It is especially well-suited to
14629 interfacing with Urwid, due to a shared syntax for describing key inputs.
14630
14631 Currently, all stateless Readline commands are implemented. Yanking and history
14632 are not supported.")
14633 (license license:expat)))
14634
14635 (define-public python2-readlike
14636 (package-with-python2 python-readlike))
14637
14638 (define-public python-reparser
14639 (package
14640 (name "python-reparser")
14641 (version "1.4.3")
14642 (source
14643 (origin
14644 (method url-fetch)
14645 (uri (pypi-uri "ReParser" version))
14646 (sha256
14647 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14648 (build-system python-build-system)
14649 (home-page "https://github.com/xmikos/reparser")
14650 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14651 (description
14652 "This Python library provides a simple lexer/parser for inline markup based
14653 on regular expressions.")
14654 (license license:expat)))
14655
14656 (define-public python2-reparser
14657 (let ((reparser (package-with-python2
14658 (strip-python2-variant python-reparser))))
14659 (package (inherit reparser)
14660 (propagated-inputs
14661 `(("python2-enum34" ,python2-enum34)
14662 ,@(package-propagated-inputs reparser))))))
14663
14664 (define-public python-precis-i18n
14665 (package
14666 (name "python-precis-i18n")
14667 (version "1.0.0")
14668 (source
14669 (origin
14670 (method url-fetch)
14671 (uri (pypi-uri "precis_i18n" version))
14672 (sha256
14673 (base32
14674 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14675 (build-system python-build-system)
14676 (home-page "https://github.com/byllyfish/precis_i18n")
14677 (synopsis "Implementation of the PRECIS framework")
14678 (description
14679 "This module implements the PRECIS Framework as described in RFC 8264,
14680 RFC 8265 and RFC 8266.")
14681 (license license:expat)))
14682
14683 (define-public python-absl-py
14684 (package
14685 (name "python-absl-py")
14686 (version "0.6.1")
14687 (source
14688 (origin
14689 (method url-fetch)
14690 (uri (pypi-uri "absl-py" version))
14691 (sha256
14692 (base32
14693 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14694 (build-system python-build-system)
14695 (propagated-inputs
14696 `(("python-six" ,python-six)))
14697 (home-page "https://github.com/abseil/abseil-py")
14698 (synopsis "Abseil Python common libraries")
14699 (description
14700 "This package provides the Abseil Python Common Libraries, a collection
14701 of Python libraries for building Python applications.")
14702 (license license:asl2.0)))
14703
14704 (define-public python-astor
14705 (package
14706 (name "python-astor")
14707 (version "0.7.1")
14708 (source
14709 (origin
14710 (method url-fetch)
14711 (uri (pypi-uri "astor" version))
14712 (sha256
14713 (base32
14714 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14715 (build-system python-build-system)
14716 ;; FIXME: There are two errors and two test failures.
14717 (arguments `(#:tests? #f))
14718 (home-page "https://github.com/berkerpeksag/astor")
14719 (synopsis "Read/rewrite/write Python ASTs")
14720 (description "Astor is designed to allow easy manipulation of Python
14721 source via the AST.")
14722 (license license:bsd-3)))
14723
14724 (define-public python-grpcio
14725 (package
14726 (name "python-grpcio")
14727 (version "1.17.1")
14728 (source
14729 (origin
14730 (method url-fetch)
14731 (uri (pypi-uri "grpcio" version))
14732 (sha256
14733 (base32
14734 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14735 (build-system python-build-system)
14736 (propagated-inputs
14737 `(("python-six" ,python-six)))
14738 (home-page "https://grpc.io")
14739 (synopsis "HTTP/2-based RPC framework")
14740 (description "This package provides a Python library for communicating
14741 with the HTTP/2-based RPC framework gRPC.")
14742 (license license:asl2.0)))
14743
14744 (define-public python-astunparse
14745 (package
14746 (name "python-astunparse")
14747 (version "1.6.1")
14748 (source
14749 (origin
14750 (method url-fetch)
14751 (uri (pypi-uri "astunparse" version))
14752 (sha256
14753 (base32
14754 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14755 (build-system python-build-system)
14756 (arguments '(#:tests? #f)) ; there are none
14757 (propagated-inputs
14758 `(("python-six" ,python-six)
14759 ("python-wheel" ,python-wheel)))
14760 (home-page "https://github.com/simonpercivall/astunparse")
14761 (synopsis "AST unparser for Python")
14762 (description "This package provides an AST unparser for Python. It is a
14763 factored out version of @code{unparse} found in the Python source
14764 distribution.")
14765 (license license:bsd-3)))
14766
14767 (define-public python-gast
14768 (package
14769 (name "python-gast")
14770 (version "0.2.0")
14771 (source
14772 (origin
14773 (method url-fetch)
14774 (uri (pypi-uri "gast" version))
14775 (sha256
14776 (base32
14777 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14778 (build-system python-build-system)
14779 (propagated-inputs
14780 `(("python-astunparse" ,python-astunparse)))
14781 (home-page "https://pypi.org/project/gast/")
14782 (synopsis "Generic Python AST that abstracts the underlying Python version")
14783 (description
14784 "GAST provides a compatibility layer between the AST of various Python
14785 versions, as produced by @code{ast.parse} from the standard @code{ast}
14786 module.")
14787 (license license:bsd-3)))
14788
14789 (define-public python-wikidata
14790 (package
14791 (name "python-wikidata")
14792 (version "0.6.1")
14793 (source
14794 (origin
14795 (method url-fetch)
14796 (uri (pypi-uri "Wikidata" version))
14797 (sha256
14798 (base32
14799 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14800 (build-system python-build-system)
14801 (propagated-inputs
14802 `(("python-babel" ,python-babel)))
14803 (home-page "https://github.com/dahlia/wikidata")
14804 (synopsis "Wikidata client library")
14805 (description
14806 "This package provides a Python interface to
14807 @url{https://www.wikidata.org/, Wikidata}.")
14808 (properties '((upstream-name . "Wikidata")))
14809 (license license:gpl3+)))
14810
14811 (define-public python-doctest-ignore-unicode
14812 (package
14813 (name "python-doctest-ignore-unicode")
14814 (version "0.1.2")
14815 (source
14816 (origin
14817 (method url-fetch)
14818 (uri (pypi-uri "doctest-ignore-unicode" version))
14819 (sha256
14820 (base32
14821 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
14822 (build-system python-build-system)
14823 (native-inputs
14824 `(("python-nose" ,python-nose)))
14825 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
14826 (synopsis "Ignore Unicode literal prefixes in doctests")
14827 (description
14828 "This package adds support for a flag to ignore Unicode literal prefixes
14829 in doctests.")
14830 (license license:asl2.0)))
14831
14832 (define-public python-attr
14833 (package
14834 (name "python-attr")
14835 (version "0.3.1")
14836 (source
14837 (origin
14838 (method url-fetch)
14839 (uri (pypi-uri "attr" version))
14840 (sha256
14841 (base32
14842 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
14843 (build-system python-build-system)
14844 (home-page "https://github.com/denis-ryzhkov/attr")
14845 (synopsis "Decorator for attributes of target function or class")
14846 (description "Simple decorator to set attributes of target function or
14847 class in a @acronym{DRY, Don't Repeat Yourself} way.")
14848 (license license:expat)))