You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20950 lines
752 KiB

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2016, 2020 Christopher Allan Webber <cwebber@dustycloud.org>
;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
;;; Copyright © 2016, 2018, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
;;; Copyright © 2016 David Craven <david@craven.ch>
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
;;; Copyright © 2017, 2020 Roel Janssen <roel@gnu.org>
;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2019 Sam <smbaines8@gmail.com>
;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages python-xyz)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
#:use-module (gnu packages adns)
#:use-module (gnu packages attr)
#:use-module (gnu packages backup)
#:use-module (gnu packages bash)
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
#:use-module (gnu packages crypto)
#:use-module (gnu packages databases)
#:use-module (gnu packages dbm)
#:use-module (gnu packages enchant)
#:use-module (gnu packages file)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gcc)
#:use-module (gnu packages geo)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages graphics)
#:use-module (gnu packages gsasl)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages gtk)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages kerberos)
#:use-module (gnu packages libevent)
#:use-module (gnu packages libffi)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
#:use-module (gnu packages man)
#:use-module (gnu packages maths)
#:use-module (gnu packages monitoring)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages networking)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages openstack)
#:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
#:use-module (gnu packages photo)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-compression)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-web)
#:use-module (gnu packages qt)
#:use-module (gnu packages readline)
#:use-module (gnu packages sdl)
#:use-module (gnu packages search)
#:use-module (gnu packages shells)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages ssh)
#:use-module (gnu packages terminals)
#:use-module (gnu packages tex)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages time)
#:use-module (gnu packages tls)
#:use-module (gnu packages version-control)
#:use-module (gnu packages video)
#:use-module (gnu packages web)
#:use-module (gnu packages base)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages tcl)
#:use-module (gnu packages bdw-gc)
#:use-module (gnu packages serialization)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix hg-download)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26))
(define-public python-tenacity
(package
(name "python-tenacity")
(version "6.1.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "tenacity" version))
(sha256
(base32
"1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
(build-system python-build-system)
(native-inputs
`(("python-setuptools-scm" ,python-setuptools-scm)
("python-sphinx" ,python-sphinx)
("python-tornado" ,python-tornado)
("python-pytest" ,python-pytest)))
(propagated-inputs
`(("python-six" ,python-six)))
(arguments
`(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "pytest")
#t)))))
(home-page "https://github.com/jd/tenacity")
(synopsis "Retrying library for python")
(description "Tenacity is a general-purpose python library to simplify the
task of adding retry behavior to just about anything.")
(license license:asl2.0)))
(define-public python-colorlog
(package
(name "python-colorlog")
(version "4.1.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "colorlog" version))
(sha256
(base32
"1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)))
(arguments
`(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
;; Extend PYTHONPATH so the built package will be found.
(setenv "PYTHONPATH"
(string-append (getcwd) "/build/lib:"
(getenv "PYTHONPATH")))
(invoke "pytest" "-p" "no:logging")
#t)))))
(home-page "https://github.com/borntyping/python-colorlog")
(synopsis "Log formatting with colors for python")
(description "The @code{colorlog.ColoredFormatter} is a formatter for use
with Python's logging module that outputs records using terminal colors.")
(license license:expat)))
(define-public python-pyprind
(package
(name "python-pyprind")
(version "2.11.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "PyPrind" version))
(sha256
(base32
"0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
(build-system python-build-system)
(propagated-inputs
`(("python-psutil" ,python-psutil)))
(home-page "https://github.com/rasbt/pyprind")
(synopsis "Python Progress Bar and Percent Indicator Utility")
(description "The PyPrind (Python Progress Indicator) module provides a
progress bar and a percentage indicator object that let you track the progress
of a loop structure or other iterative computation.")
(license license:bsd-3)))
(define-public python-gphoto2
(package
(name "python-gphoto2")
(version "2.2.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "gphoto2" version))
(sha256
(base32
"118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
(build-system python-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
`(("libgphoto2" ,libgphoto2)))
(home-page "https://github.com/jim-easterbrook/python-gphoto2")
(synopsis "Python interface to libgphoto2")
(description "@code{python-gphoto2} is a comprehensive Python interface
(or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
automatically generate the interface code.")
(license license:gpl3+)))
(define-public python-colour
(package
(name "python-colour")
(version "0.1.5")
(source (origin
(method url-fetch)
(uri (pypi-uri "colour" version))
(sha256
(base32
"1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
(build-system python-build-system)
(native-inputs
`(("python-d2to1" ,python-d2to1)))
(home-page "https://github.com/vaab/colour")
(synopsis "Convert and manipulate various color representations")
(description "Pythonic way to manipulate color representations (HSL, RVB,
web, X11, ...).")
(license license:expat)))
(define-public python-d2to1
(package
(name "python-d2to1")
(version "0.2.12.post1")
(source (origin
(method url-fetch)
(uri (pypi-uri "d2to1" version))
(sha256
(base32
"09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
(build-system python-build-system)
(native-inputs
`(("python-nose" ,python-nose)))
(home-page "https://github.com/embray/d2to1")
(synopsis "Allows for distutils2-like setup.cfg files as package metadata
in python")
(description "The python package d2to1 (the d is for distutils) allows
using distutils2-like setup.cfg files for a package's metadata with a
distribute/setuptools setup.py script.")
(license license:bsd-2)))
(define-public python-rawkit
(package
(name "python-rawkit")
(version "0.6.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "rawkit" version))
(sha256
(base32
"0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)
("python-mock" ,python-mock)))
(inputs
`(("libraw" ,libraw)))
(home-page "https://rawkit.readthedocs.io")
(synopsis "Ctypes-based LibRaw binding for Python")
(description "The rawkit package provides two modules: rawkit and libraw.
The rawkit module provides a high-level Pythonic interface for developing raw
photos, while the libraw module provides a CTypes based interface for
interacting with the low-level LibRaw C APIs.")
(license license:expat)))
(define-public python-easygui
(package
(name "python-easygui")
(version "0.98.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "easygui" version))
(sha256
(base32
"1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
(build-system python-build-system)
(propagated-inputs
`(("python-tkinter" ,python "tk")))
(home-page "https://github.com/robertlugg/easygui")
(synopsis "GUI programming module for Python")
(description "EasyGUI is a module for very simple, very easy GUI
programming in Python. EasyGUI is different from other GUI generators in that
EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
simple function calls.")
(license license:bsd-3)))
(define-public python-pymediainfo
(package
(name "python-pymediainfo")
(version "4.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pymediainfo" version))
(sha256
(base32
"0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
(build-system python-build-system)
(native-inputs
`(("python-setuptools-scm" ,python-setuptools-scm)
("python-pytest" ,python-pytest)))
(inputs
`(("libmediainfo" ,libmediainfo)))
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-libmediainfo
(lambda _
(substitute* "pymediainfo/__init__.py"
(("libmediainfo.so.0")
(string-append (assoc-ref %build-inputs "libmediainfo")
"/lib/libmediainfo.so.0")))
#t))
(replace 'check
(lambda _
;; Extend PYTHONPATH so the built package will be found.
(setenv "PYTHONPATH"
(string-append (getcwd) "/build/lib:"
(getenv "PYTHONPATH")))
;; Skip the only failing test "test_parse_url"
(invoke "pytest" "-vv" "-k" "not test_parse_url")
#t)))))
(home-page
"https://github.com/sbraz/pymediainfo")
(synopsis
"Python wrapper for the mediainfo library")
(description
"Python wrapper for the mediainfo library to access the technical and tag
data for video and audio files.")
(license license:expat)))
(define-public python-psutil
(package
(name "python-psutil")
(version "5.7.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "psutil" version))
(sha256
(base32 "1svv985vmqsls35kmvp3vhh26nsgz229324s9k29awf6qgqhm6ch"))))
(build-system python-build-system)
(arguments
;; FIXME: some tests do not return and time out. Some tests fail because
;; some processes survive kill().
'(#:tests? #f))
(home-page "https://www.github.com/giampaolo/psutil")
(synopsis "Library for retrieving information on running processes")
(description
"psutil (Python system and process utilities) is a library for retrieving
information on running processes and system utilization (CPU, memory, disks,
network) in Python. It is useful mainly for system monitoring, profiling and
limiting process resources and management of running processes. It implements
many functionalities offered by command line tools such as: ps, top, lsof,
netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
pidof, tty, taskset, pmap.")
(properties `((python2-variant . ,(delay python2-psutil))))
(license license:bsd-3)))
(define-public python2-psutil
(let ((base (package-with-python2 (strip-python2-variant python-psutil))))
(package
(inherit base)
(propagated-inputs
`(("python2-enum34" ,python2-enum34) ;optional
,@(package-propagated-inputs base))))))
(define-public python-shapely
(package
(name "python-shapely")
(version "1.6.4.post2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "Shapely" version))
(sha256
(base32
"03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
(build-system python-build-system)
(native-inputs
`(("python-cython" ,python-cython)
("python-matplotlib" ,python-matplotlib)
("python-pytest" ,python-pytest)
("python-pytest-cov" ,python-pytest-cov)))
(inputs
`(("geos" ,geos)))
(propagated-inputs
`(("python-numpy" ,python-numpy)))
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-geos-path
(lambda* (#:key inputs #:allow-other-keys)
(let ((geos (assoc-ref inputs "geos"))
(glibc (assoc-ref inputs ,(if (%current-target-system)
"cross-libc" "libc"))))
(substitute* "shapely/geos.py"
(("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
(string-append "_lgeos = load_dll('geos_c', fallbacks=['"
geos "/lib/libgeos_c.so'])"))
(("free = load_dll\\('c'\\)\\.free")
(string-append "free = load_dll('c', fallbacks=['"
glibc "/lib/libc.so.6']).free"))))
#t)))))
(home-page "https://github.com/Toblerity/Shapely")
(synopsis "Library for the manipulation and analysis of geometric objects")
(description "Shapely is a Python package for manipulation and analysis of
planar geometric objects. It is based on the @code{GEOS} library.")
(license license:bsd-3)))
(define-public python-shortuuid
(package
(name "python-shortuuid")
(version "0.5.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "shortuuid" version))
(sha256
(base32
"1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
(build-system python-build-system)
(native-inputs
`(("python-pep8" ,python-pep8)))
(home-page "https://github.com/skorokithakis/shortuuid")
(synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
(description
"@code{shortuuid} is a Python library for generating concise, unambiguous
and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
module and then similar looking characters are removed.")
(license license:bsd-3)))
(define-public python-logwrap
(package
(name "python-logwrap")
(version "3.2.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "logwrap" version ".zip"))
(sha256
(base32
"1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
(build-system python-build-system)
(propagated-inputs
`(("python-six" ,python-six)
("python-typing" ,python-typing)))
(native-inputs
`(("unzip" ,unzip)
("python-cython" ,python-cython)
("python-pytest" ,python-pytest)
("python-pytest-cov" ,python-pytest-cov)
("python-pytest-runner" ,python-pytest-runner)))
(home-page "https://github.com/penguinolog/logwrap")
(synopsis "Decorator for logging function arguments")
(description "This package provides a decorator to log function arguments
and function call return values in a human-readable way.")
(license license:asl2.0)))
(define-public python2-shapely
(package-with-python2 python-shapely))
(define-public python-clyent
(package
(name "python-clyent")
(version "1.2.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "clyent" version))
(sha256
(base32
"1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
(build-system python-build-system)
(native-inputs
`(("python-mock" ,python-mock)))
(home-page "https://github.com/Anaconda-Platform/clyent")
(synopsis "Command line client library")
(description "Clyent is a Python command line utility library. It is used
by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
(license license:bsd-3)))
(define-public python2-clyent
(package-with-python2 python-clyent))
(define-public python-babel
(package
(name "python-babel")
(version "2.8.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "Babel" version))
(sha256
(base32
"0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
(build-system python-build-system)
(native-inputs
`(("python-freezegun" ,python-freezegun)
("python-pytest" ,python-pytest)))
(propagated-inputs
`(("python-pytz" ,python-pytz)))
(arguments
`(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "pytest" "-vv" "-k"
(string-append
;; XXX: These tests fail when using Pytest 4.x and
;; Babel 2.6.0. Try removing this for later versions.
"not test_no_inherit_metazone_marker_never_in_output"
" and not test_smoke_dates"
" and not test_smoke_numbers")))))))
(home-page "http://babel.pocoo.org/")
(synopsis
"Tools for internationalizing Python applications")
(description
"Babel is composed of two major parts:
- tools to build and work with gettext message catalogs
- a Python interface to the CLDR (Common Locale Data Repository), providing
access to various locale display names, localized number and date formatting,
etc. ")
(license license:bsd-3)))
(define-public python2-babel
(package-with-python2 python-babel))
;; Sphinx < 2.0 requires this version. Remove once no longer needed.
(define-public python2-babel-2.6
(package
(inherit python2-babel)
(version "2.6.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "Babel" version))
(sha256
(base32
"08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
(define-public python2-backport-ssl-match-hostname
(package
(name "python2-backport-ssl-match-hostname")
(version "3.5.0.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "backports.ssl_match_hostname" version))
(sha256
(base32
"1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
(build-system python-build-system)
(arguments
`(#:python ,python-2
#:tests? #f)) ; no test target
(home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
(synopsis "Backport of ssl.match_hostname() function from Python 3.5")
(description
"This backport brings the ssl.match_hostname() function to users of
earlier versions of Python. The function checks the hostname in the
certificate returned by the server to which a connection has been established,
and verifies that it matches the intended target hostname.")
(license license:psfl)))
(define-public python-bitarray
(package
(name "python-bitarray")
(version "1.4.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "bitarray" version))
(sha256
(base32
"177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
(build-system python-build-system)
(home-page "https://github.com/ilanschnell/bitarray")
(synopsis "Efficient arrays of booleans")
(description "This package provides an object type which efficiently
represents an array of booleans. Bitarrays are sequence types and behave very
much like usual lists. Eight bits are represented by one byte in a contiguous
block of memory. The user can select between two representations:
little-endian and big-endian. All of the functionality is implemented in C.
Methods for accessing the machine representation are provided. This can be
useful when bit level access to binary files is required, such as portable
bitmap image files. Also, when dealing with compressed data which uses
variable bit length encoding, you may find this module useful.")
(license license:psfl)))
(define-public python-boolean.py
(package
(name "python-boolean.py")
(version "3.6")
(source
(origin
;; There's no source tarball on PyPI.
(method git-fetch)
(uri (git-reference
(url "https://github.com/bastikr/boolean.py")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
(build-system python-build-system)
(home-page "https://github.com/bastikr/boolean.py")
(synopsis "Boolean algebra in one Python module")
(description
"This is a small Python library that implements boolean algebra.
It defines two base elements, @code{TRUE} and @code{FALSE}, and a
@code{Symbol} class that can take on one of these two values. Calculations
are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
compositions like @code{XOR} and @code{NAND} are emulated on top of them.
Expressions are constructed from parsed strings or directly in Python.")
(license license:bsd-2)))
(define-public python-hdf4
(package
(name "python-hdf4")
(version "0.9")
(source
(origin
(method url-fetch)
(uri (pypi-uri name version))
(sha256
(base32
"1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
(build-system python-build-system)
(native-inputs `(("nose" ,python-nose)))
(propagated-inputs `(("numpy" ,python-numpy)))
(inputs
`(("hdf4" ,hdf4)
("libjpeg" ,libjpeg-turbo)
("zlib" ,zlib)))
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
;; on to import numpy. Somehow this works on their CI system.
;; Let's just manage PYTHONPATH here instead.
(substitute* "runexamples.sh"
(("export PYTHONPATH=.*") ""))
(setenv "PYTHONPATH"
(string-append (getcwd) ":"
(getenv "PYTHONPATH")))
(invoke "./runexamples.sh")
(invoke "nosetests" "-v"))))))
(home-page "https://github.com/fhs/python-hdf4")
(synopsis "Python interface to the NCSA HDF4 library")
(description
"Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
NetCDF files can also be read and modified. Python-HDF4 is a fork of
@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
(license license:expat)))
(define-public python2-hdf4
(package-with-python2 python-hdf4))
(define-public python-h5py
(package
(name "python-h5py")
(version "2.10.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "h5py" version))
(sha256
(base32
"0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
(build-system python-build-system)
(arguments
`(#:tests? #f ; no test target
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-hdf5-paths
(lambda* (#:key inputs #:allow-other-keys)
(let ((prefix (assoc-ref inputs "hdf5")))
(substitute* "setup_build.py"
(("\\['/opt/local/lib', '/usr/local/lib'\\]")
(string-append "['" prefix "/lib" "']"))
(("'/opt/local/include', '/usr/local/include'")
(string-append "'" prefix "/include" "'")))
(substitute* "setup_configure.py"
(("\\['/usr/local/lib', '/opt/local/lib'\\]")
(string-append "['" prefix "/lib" "']")))
#t))))))
(propagated-inputs
`(("python-six" ,python-six)
("python-numpy" ,python-numpy)))
(inputs
`(("hdf5" ,hdf5-1.10)))
(native-inputs
`(("python-cython" ,python-cython)
("python-pkgconfig" ,python-pkgconfig)
("pkg-config" ,pkg-config)))
(home-page "https://www.h5py.org/")
(synopsis "Read and write HDF5 files from Python")
(description
"The h5py package provides both a high- and low-level interface to the
HDF5 library from Python. The low-level interface is intended to be a
complete wrapping of the HDF5 API, while the high-level component supports
access to HDF5 files, datasets and groups using established Python and NumPy
concepts.")
(license license:bsd-3)))
(define-public python2-h5py
(package-with-python2 python-h5py))
(define-public python-sh
(package
(name "python-sh")
(version "1.12.14")
(source
(origin
(method url-fetch)
(uri (pypi-uri "sh" version))
(sha256
(base32
"1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
(setenv "HOME" "/tmp")
(invoke "python" "sh.py" "test"))))))
(native-inputs
`(("python-coverage" ,python-coverage)))
(home-page "https://github.com/amoffat/sh")
(synopsis "Python subprocess replacement")
(description "This package provides a replacement for Python's
@code{subprocess} feature.")
(license license:expat)))
(define-public python2-sh
(package-with-python2 python-sh))
(define-public python-cftime
(package
(name "python-cftime")
(version "1.0.4.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "cftime" version))
(sha256
(base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
(build-system python-build-system)
(propagated-inputs
`(("python-numpy" ,python-numpy)))
(native-inputs
`(("python-coveralls" ,python-coveralls)
("python-cython" ,python-cython)
("python-pytest-cov" ,python-pytest-cov)))
(home-page "https://github.com/Unidata/cftime")
(synopsis "Library for time handling")
(description
"This package provides time-handling functionality that used to be part
of the netcdf4 package before.")
;; This package claims to include code under the GPLv3 but is released
;; under ISC.
(license (list license:isc license:gpl3+))))
(define-public python-netcdf4
(package
(name "python-netcdf4")
(version "1.5.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "netCDF4" version))
(sha256
(base32
"1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'configure-locations
(lambda* (#:key inputs #:allow-other-keys)
(setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
#t)))))
(native-inputs
`(("python-cython" ,python-cython)))
(propagated-inputs
`(("python-numpy" ,python-numpy)
("python-cftime" ,python-cftime)))
(inputs
`(("netcdf" ,netcdf)
("hdf4" ,hdf4)
("hdf5" ,hdf5)))
(home-page "https://github.com/Unidata/netcdf4-python")
(synopsis "Python/numpy interface to the netCDF library")
(description "Netcdf4-python is a Python interface to the netCDF C
library. netCDF version 4 has many features not found in earlier
versions of the library and is implemented on top of HDF5. This module
can read and write files in both the new netCDF 4 and the old netCDF 3
format, and can create files that are readable by HDF5 clients. The
API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
to users of that module.")
;; The software is mainly ISC, but includes some files covered
;; by the Expat license.
(license (list license:isc license:expat))))
(define-public python2-netcdf4
(package-with-python2 python-netcdf4))
(define-public python-license-expression
(package
(name "python-license-expression")
(version "0.999")
(source
(origin
(method url-fetch)
(uri (pypi-uri "license-expression" version))
(sha256
(base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
(build-system python-build-system)
(propagated-inputs
`(("python-boolean.py" ,python-boolean.py)))
(home-page "https://github.com/nexB/license-expression")
(synopsis "Apply boolean logic to license expressions")
(description
"This Python module defines a tiny language to evaluate and compare
license expressions using boolean logic. Logical combinations of licenses can
be tested for equality, containment, and equivalence. They can be normalised
and simplified. It supports SPDX license expressions as well as other naming
conventions and aliases in the same expression.")
(license license:gpl2+)))
(define-public python-lockfile
(package
(name "python-lockfile")
(version "0.12.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "lockfile" version))
(sha256
(base32
"16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
(build-system python-build-system)
(arguments '(#:test-target "check"))
(native-inputs
`(("python-pbr" ,python-pbr)))
(home-page "https://launchpad.net/pylockfile")
(synopsis "Platform-independent file locking module")
(description
"The lockfile package exports a LockFile class which provides a simple
API for locking files.")
(license license:expat)))
(define-public python2-lockfile
(package-with-python2 python-lockfile))
(define-public python-filelock
(package
(name "python-filelock")
(version "3.0.12")
(source
(origin
(method url-fetch)
(uri (pypi-uri "filelock" version))
(sha256
(base32
"0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
(build-system python-build-system)
(home-page
"https://github.com/benediktschmitt/py-filelock")
(synopsis "Platform independent file lock")
(description "@code{filelock} contains a single module implementing
a platform independent file lock in Python, which provides a simple way of
inter-process communication.")
(license license:unlicense)))
(define-public python-semantic-version
(package
(name "python-semantic-version")
(version "2.6.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "semantic_version" version))
(sha256
(base32
"1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
(build-system python-build-system)
(arguments
`(#:tests? #f)) ; PyPI tarball lacks tests
(home-page "https://github.com/rbarrois/python-semanticversion")
(synopsis "Semantic versioning module for Python")
(description
"The @code{semantic_version} class is a small library for handling
@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
It can compare versions, generate a new version that represents a bump in one of
the version levels, and check whether any given string is a proper semantic
version identifier.")
(license license:bsd-3)))
(define-public python2-semantic-version
(package-with-python2 python-semantic-version))
(define-public python-serpent
(package
(name "python-serpent")
(version "1.28")
(source
(origin
(method url-fetch)
(uri (pypi-uri "serpent" version))
(sha256
(base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
(build-system python-build-system)
(native-inputs
`(("python-attrs" ,python-attrs)
("python-pytz" ,python-pytz)))
(home-page "https://github.com/irmen/Serpent")
(synopsis "Serializer for literal Python expressions")
(description
"Serpent provides @code{ast.literal_eval()}-compatible object tree
serialization. It serializes an object tree into bytes (an utf-8 encoded
string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
to rebuild the original object tree.
Because only safe literals are encoded, it is safe to send serpent data to
other machines, such as over the network.")
(properties `((python2-variant . ,(delay python2-serpent))))
(license license:expat)))
(define-public python2-serpent
(let ((base (package-with-python2 (strip-python2-variant python-serpent))))
(package
(inherit base)
(propagated-inputs
`(("python-enum34" ,python2-enum34)
,@(package-propagated-inputs base))))))
(define-public python-setuptools
(package
(name "python-setuptools")
(version "41.0.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "setuptools" version ".zip"))
(sha256
(base32
"04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
(modules '((guix build utils)))
(snippet
'(begin
;; Remove included binaries which are used to build self-extracting
;; installers for Windows.
;; TODO: Find some way to build them ourself so we can include them.
(for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
#t))))
(build-system python-build-system)
;; FIXME: Tests require pytest, which itself relies on setuptools.
;; One could bootstrap with an internal untested setuptools.
(arguments
`(#:tests? #f))
(home-page "https://pypi.org/project/setuptools/")
(synopsis
"Library designed to facilitate packaging Python projects")
(description
"Setuptools is a fully-featured, stable library designed to facilitate
packaging Python projects, where packaging includes:
Python package and module definitions,
distribution package metadata,
test hooks,
project installation,
platform-specific details,
Python 3 support.")
;; TODO: setuptools now bundles the following libraries:
;; packaging, pyparsing, six and appdirs. How to unbundle?
(license (list license:psfl ; setuptools itself
license:expat ; six, appdirs, pyparsing
license:asl2.0 ; packaging is dual ASL2/BSD-2
license:bsd-2))))
(define-public python2-setuptools
(package-with-python2 python-setuptools))
;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
(define-public python-setuptools-for-tensorflow
(hidden-package
(package
(inherit python-setuptools)
(version "39.1.0")
(source (origin
(inherit (package-source python-setuptools))
(uri (pypi-uri "setuptools" version ".zip"))
(sha256
(base32
"1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
(define-public python-uniseg
(package
(name "python-uniseg")
(version "0.7.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "uniseg" version ".zip"))
(sha256
(base32
"05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
(build-system python-build-system)
(arguments
'(#:tests? #f)) ; The test suite requires network access.
(native-inputs
`(("unzip" ,unzip)))
(home-page
"https://bitbucket.org/emptypage/uniseg-python")
(synopsis
"Python library to determine Unicode text segmentations")
(description
"Uniseg is a Python package used to determine Unicode text segmentations.
Supported segmentations include:
@enumerate
@item @dfn{Code point} (any value in the Unicode codespace)
@item @dfn{Grapheme cluster} (user-perceived character made of a single or
multiple Unicode code points, e.g. \"G\" + acute-accent)
@item Word break
@item Sentence break
@item Line break
@end enumerate")
(license license:expat)))
(define-public python2-uniseg
(package-with-python2 python-uniseg))
(define-public python-humanfriendly
(package
(name "python-humanfriendly")
(version "8.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "humanfriendly" version))
(sha256
(base32
"04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
(build-system python-build-system)
(arguments
`(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
#:tests? #f))
(home-page "https://humanfriendly.readthedocs.io")
(synopsis "Human-friendly input and output in Python")
(description
"The functions and classes in @code{humanfriendly} can be used to make
text interfaces more user-friendly. It includes tools to parse and format
numbers, file sizes, and timespans, timers for long-running operations, menus
to allow the user to choose from a list of options, and terminal interaction
helpers.")
(properties `((python2-variant . ,(delay python2-humanfriendly))))
(license license:expat)))
(define-public python2-humanfriendly
(let ((base (package-with-python2
(strip-python2-variant python-humanfriendly))))
(package (inherit base)
(propagated-inputs
`(("python2-monotonic" ,python2-monotonic)
,@(package-propagated-inputs base))))))
(define-public python-textparser
(package
(name "python-textparser")
(version "0.23.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "textparser" version))
(sha256
(base32
"0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
(build-system python-build-system)
(home-page "https://github.com/eerimoq/textparser")
(synopsis "Fast text parser for Python")
(description "This library provides a text parser written in the Python
language. It aims to be fast.")
(license license:expat)))
(define-public python-aenum
(package
(name "python-aenum")
(version "2.2.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "aenum" version))
(sha256
(base32
"1s3008rklv4n1kvmq6xdbdfyrpl0gf1rhqasmd27s5kwyjmlqcx4"))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
(format #t "current working dir ~s~%" (getcwd))
(setenv "PYTHONPATH"
(string-append ".:" (getenv "PYTHONPATH")))
;; We must run the test suite module directly, as it
;; fails to define the 'tempdir' variable in scope for
;; the tests otherwise
;; (see:https://bitbucket.org/stoneleaf/aenum/\
;; issues/32/running-tests-with-python-setuppy-test).
(invoke "python3" "aenum/test.py")
;; This one fails with "NameError: name
;; 'test_pickle_dump_load' is not defined" (see:
;; https://bitbucket.org/stoneleaf/aenum/issues/33
;; /error-running-the-test_v3py-test-suite).
;; (invoke "python3" "aenum/test_v3.py")
#t)))))
(home-page "https://bitbucket.org/stoneleaf/aenum")
(synopsis "Advanced enumerations, namedtuples and constants for Python")
(description "The aenum library includes an @code{Enum} base class, a
metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
class.")
(license license:bsd-3)))
(define-public python-can
(package
(name "python-can")
(version "3.3.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "python-can" version))
(sha256
(base32
"123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
(add-after 'unpack 'relax-version-requirements
(lambda _
(substitute* "setup.py"
(("mock~=2\\.0") "mock")
(("coverage<5") "coverage")
(("pytest~=4\\.3") "pytest")
(("hypothesis~=4\\.56") "hypothesis"))
#t))
(add-after 'unpack 'fix-broken-tests
;; The tests try to run two scripts it expects should be
;; in PATH, but they aren't at this time (see:
;; https://github.com/hardbyte/python-can/issues/805).
(lambda _
(substitute* "test/test_scripts.py"
(("\"can_logger\\.py --help\"") "")
(("\"can_player\\.py --help\"") ""))
#t)))))
(propagated-inputs
`(("python-aenum" ,python-aenum)
("python-wrapt" ,python-wrapt)))
(native-inputs
`(("python-codecov" ,python-codecov)
("python-coverage" ,python-coverage)
("python-future" ,python-future)
("python-hypothesis" ,python-hypothesis)
("python-mock" ,python-mock)
("python-pyserial" ,python-pyserial)
("python-pytest" ,python-pytest)
("python-pytest-cov" ,python-pytest-cov)
("python-pytest-runner" ,python-pytest-runner)
("python-pytest-timeout" ,python-pytest-timeout)))
(home-page "https://github.com/hardbyte/python-can")
(synopsis "Controller Area Network (CAN) interface module for Python")
(description "This package defines the @code{can} module, which provides
controller area network (CAN) support for Python developers; providing common
abstractions to different hardware devices, and a suite of utilities for
sending and receiving messages on a CAN bus.")
(license license:lgpl3+)))
(define-public python-diskcache
(package
(name "python-diskcache")
(version "4.1.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "diskcache" version))
(sha256
(base32
"1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
(build-system python-build-system)
(arguments
`(#:tests? #f)) ;test suite not included in the release
(home-page "http://www.grantjenks.com/docs/diskcache/")
(synopsis "Disk and file backed cache library")
(description "DiskCache is a disk and file backed persistent cache.")
(license license:asl2.0)))
(define-public python-bitstruct
(package
(name "python-bitstruct")
(version "8.9.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "bitstruct" version))
(sha256
(base32
"1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
(build-system python-build-system)
(home-page "https://github.com/eerimoq/bitstruct")
(synopsis "Python values to and C bit field structs converter")
(description "This module performs conversions between Python values and C
bit field structs represented as Python byte strings. It is intended to have
a similar interface as the @code{struct} module from Python, but working on
bits instead of primitive data types like @code{char}, @code{int}, etc.")
(license license:expat)))
(define-public python-cantools
(package
(name "python-cantools")
(version "33.1.1")
(source
(origin
;; We take the sources from the Git repository as the documentation is
;; not included with the PyPI archive.
(method git-fetch)
(uri (git-reference
(url "https://github.com/eerimoq/cantools")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'build 'build-doc
(lambda _
;; See: https://github.com/eerimoq/cantools/issues/190.
(substitute* "README.rst"
(("https://github.com/eerimoq/cantools/raw/master\
/docs/monitor.png")
"monitor.png"))
(with-directory-excursion "docs"
(invoke "make" "man" "info"))))
(add-after 'install 'install-doc
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(info (string-append out "/share/info"))
(man1 (string-append out "/share/man/man1")))
(format #t "CWD: ~s~%" (getcwd))
(install-file "docs/_build/texinfo/cantools.info" info)
(install-file "docs/_build/man/cantools.1" man1)
#t))))))
(native-inputs
`(("sphinx" ,python-sphinx)
("texinfo" ,texinfo)))
(propagated-inputs
`(("python-bitstruct" ,python-bitstruct)
("python-can" ,python-can)
("python-diskcache" ,python-diskcache)
("python-textparser" ,python-textparser)))
(home-page "https://github.com/eerimoq/cantools")
(synopsis "Tools for the Controller Area Network (CAN) bus protocol")
(description "This package includes Controller Area Network (CAN) related
tools that can be used to:
@itemize
@item parse DBC, KCD, SYM, ARXML 4 and CDD files
@item encode and decode CAN messages
@item multiplex simple and extended signals
@item diagnose DID encoding and decoding
@item dump the CAN decoder output
@item test CAN nodes
@item generate C source code
@item monitor the CAN bus
@end itemize")
(license license:expat)))
(define-public python-capturer
(package
(name "python-capturer")
(version "2.4")
(source
(origin
(method url-fetch)
(uri (pypi-uri "capturer" version))
(sha256
(base32
"05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
(build-system python-build-system)
(arguments
`(#:tests? #f))
(propagated-inputs
`(("python-humanfriendly" ,python-humanfriendly)))
(home-page "https://capturer.readthedocs.io")
(synopsis "Capture stdout and stderr streams of the current process")
(description
"The capturer package makes it easy to capture the stdout and stderr
streams of the current process and subprocesses. Output can be relayed
to the terminal in real time but is also available to the Python program
for additional processing.")
(license license:expat)))
(define-public python2-capturer
(package-with-python2 python-capturer))
(define-public python-case
(package
(name "python-case")
(version "1.5.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "case" version))
(sha256
(base32
"1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
(build-system python-build-system)
(propagated-inputs
`(("python-mock" ,python-mock)
("python-nose" ,python-nose)
("python-six" ,python-six)
("python-unittest2" ,python-unittest2)))
(native-inputs
`(("python-coverage" ,python-coverage)))
(home-page "https://github.com/celery/case")
(synopsis "Unittest utilities and convenience methods")
(description
"The @code{case} package provides utilities on top of unittest, including
some helpful Python 2 compatibility convenience methods.")
(license license:bsd-3)))
(define-public python-verboselogs
(package
(name "python-verboselogs")
(version "1.7")
(source
(origin
(method url-fetch)
(uri (pypi-uri "verboselogs" version))
(sha256
(base32
"09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
;; Do not run pylint plugin test, as astroid is an old
;; unsupported version.
(invoke "pytest" "-v" "-k" "not test_pylint_plugin"
"verboselogs/tests.py"))))))
(native-inputs
`(("python-mock" ,python-mock)
("python-pytest" ,python-pytest)))
(home-page "https://verboselogs.readthedocs.io")
(synopsis "Verbose logging level for Python's logging module")
(description
"The @code{verboselogs} package extends Python's @code{logging} module to
add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
(license license:expat)))
(define-public python2-verboselogs
(package-with-python2 python-verboselogs))
(define-public python-coloredlogs
(package
(name "python-coloredlogs")
(version "10.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "coloredlogs" version))
(sha256
(base32
"0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
(build-system python-build-system)
(arguments
`(;Tests require some updated modules
#:tests? #f))
(propagated-inputs
`(("python-capturer" ,python-capturer)))
(home-page "https://coloredlogs.readthedocs.io")
(synopsis "Colored stream handler for Python's logging module")
(description
"The @code{coloredlogs} package enables colored terminal output for
Python's logging module. The @code{ColoredFormatter} class inherits from
@code{logging.Formatter} and uses ANSI escape sequences to render your logging
messages in color.")
(license license:expat)))
(define-public python2-coloredlogs
(package-with-python2 python-coloredlogs))
(define-public python-editorconfig
(package
(name "python-editorconfig")
(version "0.12.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "EditorConfig" version))
(sha256
(base32
"0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
(build-system python-build-system)
(home-page "https://editorconfig.org/")
(synopsis "EditorConfig bindings for python")
(description "The EditorConfig project consists of a file format for
defining coding styles and a collection of text editor plugins that enable
editors to read the file format and adhere to defined styles. EditorConfig
files are easily readable and they work nicely with version control systems.")
;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
(license (list license:bsd-2 license:psfl))))
(define-public python-et-xmlfile
(package
(name "python-et-xmlfile")
(version "1.0.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "et_xmlfile" version))
(sha256
(base32
"0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "pytest"))))))
(native-inputs
`(("python-pytest" ,python-pytest)
("python-lxml" ,python-lxml))) ;used for the tests
(home-page "https://bitbucket.org/openpyxl/et_xmlfile")
(synopsis "Low memory implementation of @code{lxml.xmlfile}")
(description "This Python library is based upon the @code{xmlfile} module
from @code{lxml}. It aims to provide a low memory, compatible implementation
of @code{xmlfile}.")
(license license:expat)))
(define-public python2-et-xmlfile
(package-with-python2 python-et-xmlfile))
(define-public python-openpyxl
(package
(name "python-openpyxl")
(version "2.6.2")
(source
(origin
;; We use the upstream repository, as the tests are not included in the
;; PyPI releases.
(method hg-fetch)
(uri (hg-reference
(url "https://bitbucket.org/openpyxl/openpyxl")
(changeset version)))
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "pytest"))))))
(native-inputs
;; For the test suite.
`(("python-lxml" ,python-lxml)
("python-pillow" ,python-pillow)
("python-pytest" ,python-pytest)))
(propagated-inputs
`(("python-et-xmlfile" ,python-et-xmlfile)
("python-jdcal" ,python-jdcal)))
(home-page "https://openpyxl.readthedocs.io")
(synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
(description "This Python library allows reading and writing to the Excel XLSX, XLSM,
XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
standard.")
(license license:expat)))
(define-public python-eventlet
(package
(name "python-eventlet")
(version "0.25.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "eventlet" version))
(sha256
(base32
"1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
(build-system python-build-system)
(propagated-inputs
`(("python-greenlet" ,python-greenlet)))
(arguments
;; TODO: Requires unpackaged 'enum-compat'.
'(#:tests? #f))
(home-page "https://eventlet.net")
(synopsis "Concurrent networking library for Python")
(description
"Eventlet is a concurrent networking library for Python that
allows you to change how you run your code, not how you write it.
It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
Coroutines ensure that the developer uses a blocking style of programming
that is similar to threading, but provide the benefits of non-blocking I/O.
The event dispatch is implicit, which means you can easily use @code{Eventlet}
from the Python interpreter, or as a small part of a larger application.")
(license license:expat)))
(define-public python2-eventlet
(let ((base (package-with-python2
(strip-python2-variant python-eventlet))))
(package (inherit base)
(propagated-inputs
`(("python2-enum34" ,python2-enum34)
,@(package-propagated-inputs base))))))
(define-public python-six
(package
(name "python-six")
(version "1.14.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "six" version))
(sha256
(base32
"02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "py.test" "-v"))))))
(native-inputs
`(("python-pytest" ,python-pytest-bootstrap)))
(home-page "https://pypi.org/project/six/")
(synopsis "Python 2 and 3 compatibility utilities")
(description
"Six is a Python 2 and 3 compatibility library. It provides utility
functions for smoothing over the differences between the Python versions with
the goal of writing Python code that is compatible on both Python versions.
Six supports every Python version since 2.5. It is contained in only one
Python file, so it can be easily copied into your project.")
(license license:x11)))
(define-public python2-six
(package-with-python2 python-six))
(define-public python-six-bootstrap
(package
(inherit python-six)
(name "python-six-bootstrap")
(native-inputs `())
(arguments `(#:tests? #f))))
(define-public python2-six-bootstrap
(package-with-python2 python-six-bootstrap))
(define-public python-schedule
(package
(name "python-schedule")
(version "0.4.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "schedule" version))
(sha256
(base32
"0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)
("python-mock" ,python-mock)))
(home-page "https://github.com/dbader/schedule")
(synopsis "Schedule periodic function calls in Python")
(description
"Schedule is an in-process scheduler for periodic jobs that uses the
builder pattern for configuration. Schedule lets you run Python functions (or
any other callable) periodically at pre-determined intervals using a simple,
human-friendly syntax.")
(license license:expat)))
(define-public python2-schedule
(package-with-python2 python-schedule))
(define-public python-mechanize
(package
(name "python-mechanize")
(version "0.4.5")
(source
(origin
(method url-fetch)
(uri (pypi-uri "mechanize" version))
(sha256
(base32
"1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
(build-system python-build-system)
(propagated-inputs
`(("python-html5lib" ,python-html5lib)))
(home-page "https://github.com/python-mechanize/mechanize")
(synopsis
"Stateful programmatic web browsing in Python")
(description
"Mechanize implements stateful programmatic web browsing in Python,
after Andy Lester’s Perl module WWW::Mechanize.")
(license license:bsd-3)))
(define-public python2-mechanize
(package-with-python2 python-mechanize))
(define-public python-simplejson
(package
(name "python-simplejson")
(version "3.17.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "simplejson" version))
(sha256
(base32
"108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
(build-system python-build-system)
(home-page "http://simplejson.readthedocs.org/en/latest/")
(synopsis
"Json library for Python")
(description
"JSON (JavaScript Object Notation) is a subset of JavaScript
syntax (ECMA-262 3rd edition) used as a lightweight data interchange
format.
Simplejson exposes an API familiar to users of the standard library marshal
and pickle modules. It is the externally maintained version of the json
library contained in Python 2.6, but maintains compatibility with Python 2.5
and (currently) has significant performance advantages, even without using
the optional C extension for speedups. Simplejson is also supported on
Python 3.3+.")
(license license:x11)))
(define-public python2-simplejson
(package-with-python2 python-simplejson))
(define-public python-pyicu
(package
(name "python-pyicu")
(version "2.4.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "PyICU" version))
(sha256
(base32
"075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
(build-system python-build-system)
(inputs
`(("icu4c" ,icu4c)))
(native-inputs
`(("python-pytest" ,python-pytest)
("python-six" ,python-six)))
(home-page "https://github.com/ovalhub/pyicu")
(synopsis "Python extension wrapping the ICU C++ API")
(description
"PyICU is a python extension wrapping the ICU C++ API.")
(license license:x11)))
(define-public python2-pyicu
(package-with-python2 python-pyicu))
(define-public python-dogtail
(package
(name "python-dogtail")
(version "0.9.11")
(source (origin
(method url-fetch)
(uri
(string-append
"https://gitlab.com/dogtail/dogtail/-/raw/released/"
"dogtail-" version ".tar.gz"))
(sha256
(base32
"0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
(build-system python-build-system)
(arguments
`(#:tests? #f ; TODO Launching dbus for the tests
; fails
#:phases
(modify-phases %standard-phases
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(system "Xvfb :1 &")
(setenv "DISPLAY" ":1")
(invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
#t)))))
(propagated-inputs
`(("python-pygobject" ,python-pygobject)
("python-pycairo" ,python-pycairo)
("python-pyatspi" ,python-pyatspi)))
(native-inputs
`(("python-nose" ,python-nose)
("gtk+" ,gtk+)
("xvfb" ,xorg-server)
("dbus" ,dbus)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gobject-introspection" ,gobject-introspection)))
(home-page "https://gitlab.com/dogtail/dogtail/")
(synopsis "GUI test tool and automation framework written in Python")
(description
"Dogtail is a GUI test tool and automation framework written in Python.
It uses Accessibility (a11y) technologies to communicate with desktop
applications. dogtail scripts are written in Python and executed like any
other Python program.")
(license license:gpl2+)))
(define-public python2-dogtail
(package-with-python2 python-dogtail))
(define-public python-empy
(package
(name "python-empy")
(version "3.3.3")
(source (origin
(method url-fetch)
(uri (string-append "http://www.alcyone.com/software/empy/empy-"
version ".tar.gz"))
(sha256
(base32
"1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
(build-system python-build-system)
(arguments
`(#:tests? #f)) ; python2 only
(home-page "http://www.alcyone.com/software/empy/")
(synopsis "Templating system for Python")
(description
"EmPy is a system for embedding Python expressions and statements in
template text; it takes an EmPy source file, processes it, and produces
output. This is accomplished via expansions, which are special signals to the
EmPy system and are set off by a special prefix (by default the at sign, @@).
EmPy can expand arbitrary Python expressions and statements in this way, as
well as a variety of special forms. Textual data not explicitly delimited in
this way is sent unaffected to the output, allowing Python to be used in
effect as a markup language. Also supported are callbacks via hooks,
recording and playback via diversions, and dynamic, chainable filters. The
system is highly configurable via command line options and embedded
commands.")
(license license:lgpl2.1+)))
(define-public python2-empy
(let ((base (package-with-python2 (strip-python2-variant python-empy))))
(package
(inherit base)
(arguments `(,@(package-arguments base)
#:tests? #t)))))
(define-public python2-element-tree
(package
(name "python2-element-tree")
(version "1.2.6")
(source (origin
(method url-fetch)
(uri (string-append
"http://effbot.org/media/downloads/elementtree-"
version "-20050316.tar.gz"))
(sha256
(base32
"016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
(build-system python-build-system)
(arguments
`(#:python ,python-2 ; seems to be part of Python 3
#:tests? #f)) ; no 'test' sub-command
(synopsis "Toolkit for XML processing in Python")
(description
"ElementTree is a Python library supporting lightweight XML processing.")
(home-page "https://effbot.org/zone/element-index.htm")
(license (license:x11-style
"http://docs.python.org/2/license.html"
"Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
(define-public python2-pybugz
(package
(name "python2-pybugz")
(version "0.6.11")
(source (origin
(method url-fetch)
(uri (string-append
"http://bits.liquidx.net/projects/pybugz/pybugz-"
version ".tar.gz"))
(sha256
(base32
"17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
(patches (search-patches "pybugz-stty.patch"
"pybugz-encode-error.patch"))))
(build-system python-build-system)
(arguments
`(#:python ,python-2 ; SyntaxError with Python 3
#:tests? #f)) ; no 'test' sub-command
(propagated-inputs
`(("element-tree" ,python2-element-tree)))
(synopsis "Python and command-line interface to Bugzilla")
(description
"PyBugz is a Python library and command-line tool to query the Bugzilla
bug tracking system. It is meant as an aid to speed up interaction with the
bug tracker.")
(home-page "http://www.liquidx.net/pybugz/")
(license license:gpl2)))
(define-public python2-enum
(package
(name "python2-enum")
(version "0.4.6")
(source (origin
(method url-fetch)
(uri (pypi-uri "enum" version))
(sha256
(base32
"13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
(build-system python-build-system)
(arguments
`(#:python ,python-2))
(home-page "https://pypi.org/project/enum/")
(synopsis "Robust enumerated type support in Python")
(description
"This provides a module for robust enumerations in Python. It has
been superseded by the Python standard library and is provided only for
compatibility.")
;; Choice of either license.
(license (list license:gpl3+ license:psfl))))
(define-public python-enum34
(package
(name "python-enum34")
(version "1.1.6")
(source
(origin
(method url-fetch)
(uri (pypi-uri "enum34" version))
(sha256
(base32
"1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
(build-system python-build-system)
(home-page "https://pypi.org/project/enum34/")
(synopsis "Backported Python 3.4 Enum")
(description
"Enum34 is the new Python stdlib enum module available in Python 3.4
backported for previous versions of Python from 2.4 to 3.3.")
(license license:bsd-3)))
(define-public python2-enum34
(package-with-python2 python-enum34))
(define-public python-parse-type
(package
(name "python-parse-type")
(version "0.4.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "parse_type" version))
(sha256
(base32
"0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
(build-system python-build-system)
(propagated-inputs
`(("python-six" ,python-six)
("python-parse" ,python-parse)))
(native-inputs
`(("python-pytest" ,python-pytest)
("python-pytest-runner" ,python-pytest-runner)))
(home-page "https://github.com/jenisys/parse_type")
(synopsis "Extended parse module")
(description
"Parse_type extends the python parse module.")
(properties
`((python2-variant . ,(delay python2-parse-type))))
(license license:bsd-3)))
(define-public python2-parse-type
(let ((base (package-with-python2
(strip-python2-variant python-parse-type))))
(package (inherit base)
(propagated-inputs
`(("python2-enum34" ,python2-enum34)
,@(package-propagated-inputs base))))))
(define-public python-parse
(package
(name "python-parse")
(version "1.8.4")
(source
(origin
(method url-fetch)
(uri (pypi-uri "parse" version))
(sha256
(base32
"0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _ (invoke "python" "test_parse.py"))))))
(home-page "https://github.com/r1chardj0n3s/parse")
(synopsis "Parse strings")
(description
"Parse strings using a specification based on the Python @code{format()}
syntax.")
(license license:x11)))
(define-public python-polib
(package
(name "python-polib")
(version "1.0.8")
(source (origin
(method url-fetch)
(uri (pypi-uri "polib" version))
(sha256
(base32
"1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
(build-system python-build-system)
(home-page "https://bitbucket.org/izi/polib/wiki/Home")
(synopsis "Manipulate, create and modify gettext files")
(description "Polib can manipulate any gettext format (po, pot and mo)
files. It can be used to create po files from scratch or to modify
existing ones.")
(license license:expat)))
(define-public python2-polib
(let ((base (package-with-python2 (strip-python2-variant python-polib))))
(package
(inherit base)
(arguments `(,@(package-arguments base)
;; Tests don't work with python2.
#:tests? #f)))))
(define-public python-poyo
(package
(name "python-poyo")
(version "0.5.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "poyo" version))
(sha256
(base32
"1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
(build-system python-build-system)
(home-page "https://github.com/hackebrot/poyo")
(synopsis "Lightweight YAML Parser for Python")
(description
"This package provides a lightweight YAML Parser for Python. It supports
only a chosen subset of the YAML format that is required to parse cookiecutter
user configuration files. It does not have support for serializing into YAML
and is not compatible with JSON.")
(license license:expat)))
(define-public scons
(package
(name "scons")
(version "3.0.4")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/SCons/scons")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
(build-system python-build-system)
(arguments
`(#:use-setuptools? #f ; still relies on distutils
#:tests? #f ; no 'python setup.py test' command
#:phases
(modify-phases %standard-phases
(add-before 'build 'bootstrap
(lambda _
(substitute* "src/engine/SCons/compat/__init__.py"
(("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
"sys.modules[new] = __import__(old)"))
(substitute* "src/engine/SCons/Platform/__init__.py"
(("mod = imp.load_module\\(full_name, file, path, desc\\)")
"mod = __import__(full_name)"))
(invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
(chdir "build/scons")
#t)))))
(home-page "https://scons.org/")
(synopsis "Software construction tool written in Python")
(description
"SCons is a software construction tool. Think of SCons as an improved,
cross-platform substitute for the classic Make utility with integrated
functionality similar to autoconf/automake and compiler caches such as ccache.
In short, SCons is an easier, more reliable and faster way to build
software.")
(license license:x11)))
(define-public scons-python2
(package
(inherit (package-with-python2 scons))
(name "scons-python2")))
(define-public python-extras
(package
(name "python-extras")
(version "1.0.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "extras" version))
(sha256
(base32
"0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
(build-system python-build-system)
(arguments
;; FIXME: Circular dependency on testtools.
'(#:tests? #f))
(home-page "https://github.com/testing-cabal/extras")
(synopsis "Useful extensions to the Python standard library")
(description
"Extras is a set of extensions to the Python standard library.")
(license license:expat)))
(define-public python2-extras
(package-with-python2 python-extras))
(define-public python-mimeparse
(package
(name "python-mimeparse")
(version "1.6.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "python-mimeparse" version))
(sha256
(base32
"0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "./mimeparse_test.py"))))))
(home-page
"https://github.com/dbtsai/python-mimeparse")
(synopsis "Python library for parsing MIME types")
(description
"Mimeparse provides basic functions for parsing MIME type names and
matching them against a list of media-ranges.")
(license license:expat)))
(define-public python2-mimeparse
(package-with-python2 python-mimeparse))
(define-public python-miniboa
(package
(name "python-miniboa")
(version "1.0.7")
(source
(origin
(method url-fetch)
(uri (pypi-uri "miniboa" version))
(sha256
(base32
"09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
(build-system python-build-system)
(home-page "https://github.com/shmup/miniboa")
(synopsis "Simple, single-threaded Telnet server")
(description
"Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
server.")
(license license:asl2.0)))
(define-public python2-miniboa
(package-with-python2 python-miniboa))
(define-public python-pafy
(package
(name "python-pafy")
(version "0.5.3.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pafy" version))
(sha256
(base32
"1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
(build-system python-build-system)
(arguments
`(#:tests? #f)) ; Currently pafy can not find itself in the tests
(propagated-inputs
;; Youtube-dl is a python package which is imported in the file
;; "backend_youtube_dl.py", therefore it needs to be propagated.
`(("youtube-dl" ,youtube-dl)))
(home-page "https://np1.github.io/pafy/")
(synopsis "Retrieve YouTube content and metadata")
(description
"@code{pafy} is a python library to retrieve YouTube content and metadata.")
(license license:lgpl3+)))
(define-public python2-funcsigs
(package
(name "python2-funcsigs")
(version "1.0.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "funcsigs" version))
(sha256
(base32
"0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
(build-system python-build-system)
(arguments
`(#:python ,python-2))
(native-inputs
`(("python2-unittest2" ,python2-unittest2)))
(home-page "http://funcsigs.readthedocs.org")
(synopsis "Python function signatures from PEP362")
(description
"Backport of @code{funcsigs} which was introduced in Python 3.3.")
(license license:asl2.0)))
(define-public python2-funcsigs-bootstrap
(package
(inherit python2-funcsigs)
(name "python2-funcsigs-bootstrap")
(native-inputs `())
(arguments
`(#:tests? #f
,@(package-arguments python2-funcsigs)))))
(define-public python-py
(package
(name "python-py")
(version "1.8.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "py" version))
(sha256
(base32
"1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
(build-system python-build-system)
(arguments
;; FIXME: "ImportError: 'test' module incorrectly imported from
;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
;; Is this module globally installed?"
'(#:tests? #f))
(native-inputs
`(("python-setuptools-scm" ,python-setuptools-scm)))
(home-page "https://github.com/pytest-dev/py")
(synopsis "Python library for parsing, I/O, instrospection, and logging")
(description
"Py is a Python library for file name parsing, .ini file parsing, I/O,
code introspection, and logging.")
(license license:expat)))
(define-public python2-py
(package-with-python2 python-py))
;; Recent versions of python-fixtures and python-testrepository need
;; python-pbr for packaging, which itself needs these two packages for
;; testing.
;; To fix this circular dependency, we use a build of python-pbr, based on the
;; same source, just without any test dependencies and with tests disabled.
;; python-pbr-minmal is then used to package python-fixtures and
;; python-testrepository.
;; Strictly speaking we currently could remove the test-requirements from the
;; normal python-pbr package (and save this package) since test are disabled
;; there anyway. But this may change in future.
(define-public python-pbr-minimal
(package
(name "python-pbr-minimal")
(version "3.0.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pbr" version))
(sha256
(base32
"14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
(build-system python-build-system)
(arguments
`(#:tests? #f))
(home-page "https://docs.openstack.org/pbr/latest/")
(synopsis "Minimal build of python-pbr used for bootstrapping")
(description
"Used only for bootstrapping python2-pbr, you should not need this.")
(license license:asl2.0)))
(define-public python2-pbr-minimal
(package-with-python2 python-pbr-minimal))
(define-public python-pbr
(package
(inherit python-pbr-minimal)
(name "python-pbr")
(arguments
`(#:tests? #f)) ;; Most tests seem to use the Internet.
(propagated-inputs
`(("git" ,git))) ;; pbr actually uses the "git" binary.
(native-inputs
`(("python-fixtures" ,python-fixtures-bootstrap)
;; discover, coverage, hacking, subunit
("python-mock" ,python-mock)
("python-six" ,python-six)
("python-sphinx" ,python-sphinx)
("python-testrepository" ,python-testrepository-bootstrap)
("python-testresources" ,python-testresources-bootstrap)
("python-testscenarios" ,python-testscenarios-bootstrap)
("python-testtools" ,python-testtools-bootstrap)
("python-virtualenv" ,python-virtualenv)))
(synopsis "Enhance the default behavior of Python’s setuptools")
(description
"Python Build Reasonableness (PBR) is a library that injects some useful
and sensible default behaviors into your setuptools run. It will set
versions, process requirements files and generate AUTHORS and ChangeLog file
from git information.
")))
(define-public python2-pbr
(package-with-python2 python-pbr))
(define-public python-pyrsistent
(package
(name "python-pyrsistent")
(version "0.16.0")
(home-page "https://github.com/tobgu/pyrsistent")
(source (origin
(method url-fetch)
(uri (pypi-uri "pyrsistent" version))
(sha256
(base32
"1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
(build-system python-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
;; The package works fine with newer Pytest and Hypothesis, but
;; has pinned older versions to stay compatible with Python 2.
(add-before 'check 'loosen-pytest-requirement
(lambda _
(substitute* "setup.py"
(("pytest<5") "pytest")
(("hypothesis<5") "hypothesis"))
#t)))))
(native-inputs
`(("python-hypothesis" ,python-hypothesis)
("python-pytest" ,python-pytest)
("python-pytest-runner" ,python-pytest-runner)))
(propagated-inputs
`(("python-six" ,python-six)))
(synopsis "Persistent data structures for Python")
(description
"Pyrsistent is a number of persistent collections (by some referred to as
functional data structures). Persistent in the sense that they are immutable.
All methods on a data structure that would normally mutate it instead return a
new copy of the structure containing the requested updates. The original
structure is left untouched.")
(license license:expat)))
(define-public python2-pyrsistent
(package-with-python2 python-pyrsistent))
(define-public python-exif-read
(package
(name "python-exif-read")
(version "2.1.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "ExifRead" version))
(sha256
(base32
"1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
(build-system python-build-system)
(arguments `(#:tests? #f)) ; no tests
(home-page "https://github.com/ianare/exif-py")
(synopsis "Python library to extract EXIF data from image files")
(description
"ExifRead is a Python library to extract EXIF data from tiff and jpeg
files.")
(license license:bsd-3)))
(define-public python2-exif-read
(package-with-python2 python-exif-read))
(define-public python-pyld
(package
(name "python-pyld")
(version "1.0.5")
(source (origin
(method url-fetch)
(uri (pypi-uri "PyLD" version))
(sha256
(base32
"1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
(build-system python-build-system)
(home-page "https://github.com/digitalbazaar/pyld")
(synopsis "Python implementation of the JSON-LD specification")
(description
"PyLD is an implementation of the JSON-LD specification.")
(license license:bsd-3)))
(define-public python2-pyld
(package-with-python2 python-pyld))
(define-public python-cli-helpers
(package
(name "python-cli-helpers")
(version "2.0.1")
(source
(origin
;; There's no source tarball on PyPI.
(method git-fetch)
(uri (git-reference
(url "https://github.com/dbcli/cli_helpers")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)))
(propagated-inputs
`(("python-wcwidth" ,python-wcwidth)
("python-configobj" ,python-configobj)
("python-tabulate" ,python-tabulate)
("python-terminaltables" ,python-terminaltables)))
(home-page "https://github.com/dbcli/cli_helpers")
(synopsis "Helpers for building command-line apps")
(description
"CLI Helpers is a Python package that makes it easy to perform common
tasks when building command-line apps. It's a helper library for command-line
interfaces.")
(license license:bsd-3)))
(define-public python-click
(package
(name "python-click")
(version "7.1.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "click" version))
(sha256
(base32
"06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-paths
(lambda* (#:key inputs #:allow-other-keys)
(let ((glibc (assoc-ref inputs ,(if (%current-target-system)
"cross-libc" "libc"))))
(substitute* "src/click/_unicodefun.py"
(("'locale'")
(string-append "'" glibc "/bin/locale'"))))
#t))
(replace 'check
(lambda _
(setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
(invoke "python" "-m" "pytest"))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(home-page "https://palletsprojects.com/p/click/")
(synopsis "Command line library for Python")
(description
"Click is a Python package for creating command line interfaces in a
composable way with as little code as necessary. Its name stands for
\"Command Line Interface Creation Kit\". It's highly configurable but comes
with sensible defaults out of the box.")
(license license:bsd-3)))
(define-public python2-click
(package-with-python2 python-click))
(define-public python-click-5
(package (inherit python-click)
(name "python-click")
(version "5.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "click" version))
(sha256
(base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
(arguments `())))
(define-public python-wheel
(package
(name "python-wheel")
(version "0.33.6")
(source
(origin
(method url-fetch)
(uri (pypi-uri "wheel" version))
(sha256
(base32
"0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
(build-system python-build-system)
(arguments
;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
;; fails to find the newly-built bdist_wheel library, even though it is
;; available on PYTHONPATH. What search path is consulted by setup.py?
'(#:tests? #f))
(home-page "https://bitbucket.org/pypa/wheel/")
(synopsis "Format for built Python packages")
(description
"A wheel is a ZIP-format archive with a specially formatted filename and
the @code{.whl} extension. It is designed to contain all the files for a PEP
376 compatible install in a way that is very close to the on-disk format. Many
packages will be properly installed with only the @code{Unpack} step and the
unpacked archive preserves enough information to @code{Spread} (copy data and
scripts to their final locations) at any later time. Wheel files can be
installed with a newer @code{pip} or with wheel's own command line utility.")
(license license:expat)))
(define-public python2-wheel
(package-with-python2 python-wheel))
(define-public python-vcversioner
(package
(name "python-vcversioner")
(version "2.16.0.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "vcversioner" version))
(sha256
(base32
"16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
(build-system python-build-system)
(synopsis "Python library for version number discovery")
(description "Vcversioner is a Python library that inspects tagging
information in a variety of version control systems in order to discover
version numbers.")
(home-page "https://github.com/habnabit/vcversioner")
(license license:isc)))
(define-public python2-vcversioner
(package-with-python2 python-vcversioner))
(define-public python-jdcal
(package
(name "python-jdcal")
(version "1.4")
(source
(origin
(method url-fetch)
(uri (pypi-uri "jdcal" version))
(sha256
(base32
"1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "pytest"))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(home-page "https://github.com/phn/jdcal")
(synopsis "Functions to convert between Julian dates Gregorian dates")
(description "This Python library provides functions for converting
between Julian dates and Gregorian dates.")
(license license:bsd-2)))
(define-public python2-jdcal
(package-with-python2 python-jdcal))
(define-public python-jsondiff
(package
(name "python-jsondiff")
(version "1.2.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "jsondiff" version))
(sha256
(base32
"00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
(build-system python-build-system)
(native-inputs
`(("python-nose" ,python-nose)
("python-nose-random" ,python-nose-random)))
(home-page
"https://github.com/fzumstein/jsondiff")
(synopsis "Compare JSON and JSON-like structures in Python")
(description "@code{jsondiff} is a Python library which lets you
compare, diff, and patch JSON and JSON-like structures in Python.")
(license license:expat)))
(define-public python-jsonschema
(package
(name "python-jsonschema")
(version "3.2.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "jsonschema" version))
(sha256
(base32
"0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda* (#:key inputs outputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
(setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
(invoke "trial" "jsonschema"))))))
(native-inputs
`(("python-setuptools_scm" ,python-setuptools-scm)
("python-twisted" ,python-twisted)))
(propagated-inputs
`(("python-attrs" ,python-attrs)
("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
("python-pyrsistent" ,python-pyrsistent)
("python-six" ,python-six)))
(home-page "https://github.com/Julian/jsonschema")
(synopsis "Implementation of JSON Schema for Python")
(description
"Jsonschema is an implementation of JSON Schema for Python.")
(license license:expat)
(properties `((python2-variant . ,(delay python2-jsonschema))))))
(define-public python2-jsonschema
(let ((jsonschema (package-with-python2
(strip-python2-variant python-jsonschema))))
(package (inherit jsonschema)
(propagated-inputs
`(("python2-functools32" ,python2-functools32)
,@(package-propagated-inputs jsonschema))))))
(define-public python-schema
(package
(name "python-schema")
(version "0.6.6")
(source
(origin
(method url-fetch)
(uri (pypi-uri "schema" version))
(sha256
(base32
"1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)))
(home-page "https://github.com/keleshev/schema")
(synopsis "Simple data validation library")
(description
"@code{python-schema} is a library for validating Python data
structures, such as those obtained from config-files, forms, external
services or command-line parsing, converted from JSON/YAML (or
something else) to Python data-types.")
(license license:psfl)))
(define-public python2-schema
(package-with-python2 python-schema))
(define-public python-schema-0.5
(package (inherit python-schema)
(version "0.5.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "schema" version))
(sha256
(base32
"10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
(define-public python2-schema-0.5
(package-with-python2 python-schema-0.5))
(define-public python-kitchen
(package
(name "python-kitchen")
(version "1.2.5")
(source
(origin
(method url-fetch)
(uri (pypi-uri "kitchen" version))
(sha256
(base32
"1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
(build-system python-build-system)
(propagated-inputs
`(("python-chardet" ,python-chardet)))
(home-page "https://github.com/fedora-infra/kitchen")
(synopsis "Python API for snippets")
(description "@code{kitchen} module provides a python API for all sorts of
little useful snippets of code that everybody ends up writing for their projects
but never seem big enough to build an independent release. Use kitchen and stop
cutting and pasting that code over and over.")
(license (list license:lgpl2.1+
;; subprocess.py, test_subprocess.py,
;; kitchen/pycompat25/defaultdict.py:
license:psfl))))
(define-public python2-kitchen
(package-with-python2 python-kitchen))
(define-public python-unidecode
(package
(name "python-unidecode")
(version "1.1.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "Unidecode" version))
(sha256
(base32
"1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
(build-system python-build-system)
(home-page "https://pypi.org/project/Unidecode/")
(synopsis "ASCII transliterations of Unicode text")
(description
"Unidecode provides ASCII transliterations of Unicode text. Unidecode is
useful when integrating with legacy code that doesn't support Unicode, or for
ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
machine identifiers from human-readable Unicode strings that should still be
somewhat intelligible.")
(license license:gpl2+)))
(define-public python2-unidecode
(package-with-python2 python-unidecode))
(define-public python-text-unidecode
(package
(name "python-text-unidecode")
(version "1.3")
(source (origin
(method url-fetch)
(uri (pypi-uri "text-unidecode" version))
(sha256
(base32
"14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
(build-system python-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
(setenv "PYTHONPATH"
(string-append "./build/lib:"
(getenv "PYTHONPATH")))
(invoke "pytest" "-vv"))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(home-page "https://github.com/kmike/text-unidecode/")
(synopsis "Decode Unicode data")
(description
"@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
Perl library. It can create ASCII representations of Unicode data. In general
users should prefer the @code{python-unidecode} package which offers better
memory usage and transliteration quality.")
;; The user can choose either license.
(license (list license:clarified-artistic license:gpl2+))))
(define-public python2-text-unidecode
(package-with-python2 python-text-unidecode))
(define-public python-pyjwt
(package
(name "python-pyjwt")
(version "1.7.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "PyJWT" version))
(sha256
(base32
"15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
(modules '((guix build utils)))
(snippet
'(begin
(for-each delete-file-recursively
(find-files "." "\\.pyc$"))
#t))))
(build-system python-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
;; Mimic upstream commit 3a20892442b34c7 to get
;; rid of dependency on pytest-runner < 5.0.
;; Remove substitution for PyJWT > 1.7.1.
(substitute* "setup.py"
((".*pytest-runner.*")
""))
(invoke "pytest" "-vv"))))))
(native-inputs
`(("python-pytest" ,python-pytest)
("python-pytest-cov" ,python-pytest-cov)))
(home-page "https://github.com/progrium/pyjwt")
(synopsis "JSON Web Token implementation in Python")
(description
"PyJWT is a JSON Web Token implementation written in Python.")
(license license:expat)))