2021-01-14 16:27:39 -05:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
|
|
|
;;; Copyright © 2015, 2020 Efraim Flashner <efraim@flashner.co.il>
|
|
|
|
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
|
|
|
|
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
|
|
|
|
;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
|
2021-01-15 07:57:03 -05:00
|
|
|
;;; Copyright © 2018, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
2021-03-28 17:27:39 -04:00
|
|
|
;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
2021-04-13 05:33:06 -04:00
|
|
|
;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
|
2021-01-14 16:27:39 -05:00
|
|
|
;;;
|
|
|
|
;;; 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-build)
|
2021-10-01 15:49:13 -04:00
|
|
|
#:use-module (gnu packages)
|
2021-01-14 16:27:39 -05:00
|
|
|
#:use-module ((guix licenses) #:prefix license:)
|
|
|
|
#:use-module (guix build-system python)
|
|
|
|
#:use-module (guix download)
|
|
|
|
#:use-module (guix packages))
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
;;;
|
|
|
|
;;; Python packages to build... Python packages. Since they are bound to be
|
|
|
|
;;; relied on by many, their dependencies should be kept minimal, and this
|
|
|
|
;;; module should not depend on other modules containing Python packages.
|
|
|
|
;;;
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
(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))
|
|
|
|
|
|
|
|
;;; XXX: Not really at home, but this seems the best place to prevent circular
|
|
|
|
;;; module dependencies.
|
|
|
|
(define-public python-toml
|
|
|
|
(package
|
|
|
|
(name "python-toml")
|
2021-03-28 17:27:39 -04:00
|
|
|
(version "0.10.2")
|
2021-01-14 16:27:39 -05:00
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "toml" version))
|
|
|
|
(sha256
|
2021-03-28 17:27:39 -04:00
|
|
|
(base32 "13z6rff86bzdpl094x0vmfvls779931xj90dlbs9kpfm138s3gdk"))))
|
2021-01-14 16:27:39 -05:00
|
|
|
(build-system python-build-system)
|
|
|
|
(arguments
|
|
|
|
`(#:tests? #f)) ;no tests suite in release
|
|
|
|
(home-page "https://github.com/uiri/toml")
|
|
|
|
(synopsis "Library for TOML")
|
|
|
|
(description
|
|
|
|
"@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
|
|
|
|
Language (TOML) configuration files.")
|
|
|
|
(license license:expat)))
|
2021-01-14 16:27:39 -05:00
|
|
|
|
2021-04-13 05:33:06 -04:00
|
|
|
(define-public python-pytoml
|
|
|
|
(package
|
|
|
|
(name "python-pytoml")
|
|
|
|
(version "0.1.21")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "pytoml" version))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"1rv1byiw82k7mj6aprcrqi2vdabs801y97xhfnrz7kxds34ggv4f"))))
|
|
|
|
(build-system python-build-system)
|
|
|
|
(home-page "https://github.com/avakar/pytoml")
|
|
|
|
(synopsis "Parser for TOML")
|
|
|
|
(description "This package provides a Python parser for TOML-0.4.0.")
|
|
|
|
(license license:expat)))
|
2021-01-14 16:27:39 -05:00
|
|
|
|
2021-10-01 15:49:13 -04:00
|
|
|
(define-public python-six-bootstrap
|
|
|
|
(package
|
|
|
|
(name "python-six-bootstrap")
|
|
|
|
(version "1.15.0")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "six" version))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"0n82108wxn5giff50hd9ykjhd3zl7cndabdasi6568yvbh1rqqrh"))))
|
|
|
|
(build-system python-build-system)
|
|
|
|
(arguments `(#:tests? #f)) ;to avoid pytest dependency
|
|
|
|
(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-bootstrap
|
|
|
|
(package-with-python2 python-six-bootstrap))
|
|
|
|
|
2021-01-14 16:27:39 -05:00
|
|
|
(define-public python-pep517-bootstrap
|
|
|
|
(hidden-package
|
|
|
|
(package
|
|
|
|
(name "python-pep517-bootstrap")
|
|
|
|
(version "0.9.1")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "pep517" version))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"0zqidxah03qpnp6zkg3zd1kmd5f79hhdsfmlc0cldaniy80qddxf"))))
|
|
|
|
(build-system python-build-system)
|
|
|
|
(arguments
|
|
|
|
`(#:tests? #f)) ;to avoid circular dependencies
|
|
|
|
(propagated-inputs
|
|
|
|
`(("python-toml" ,python-toml)
|
|
|
|
("python-wheel" ,python-wheel)))
|
|
|
|
(home-page "https://github.com/pypa/pep517")
|
|
|
|
(synopsis "Wrappers to build Python packages using PEP 517 hooks")
|
|
|
|
(description
|
|
|
|
"Wrappers to build Python packages using PEP 517 hooks.")
|
|
|
|
(license license:expat))))
|
|
|
|
|
2021-10-01 15:49:13 -04:00
|
|
|
(define-public python-pyparsing
|
|
|
|
(package
|
|
|
|
(name "python-pyparsing")
|
|
|
|
(version "2.4.7")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "pyparsing" version))
|
|
|
|
(sha256
|
|
|
|
(base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))
|
|
|
|
(build-system python-build-system)
|
|
|
|
(outputs '("out" "doc"))
|
|
|
|
(arguments
|
|
|
|
`(#:tests? #f ;no test target
|
|
|
|
#:phases
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
(add-after 'install 'install-doc
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
(let* ((doc (string-append (assoc-ref outputs "doc")
|
|
|
|
"/share/doc/" ,name "-" ,version))
|
|
|
|
(html-doc (string-append doc "/html"))
|
|
|
|
(examples (string-append doc "/examples")))
|
|
|
|
(mkdir-p html-doc)
|
|
|
|
(mkdir-p examples)
|
|
|
|
(for-each
|
|
|
|
(lambda (dir tgt)
|
|
|
|
(map (lambda (file)
|
|
|
|
(install-file file tgt))
|
|
|
|
(find-files dir ".*")))
|
|
|
|
(list "docs" "htmldoc" "examples")
|
|
|
|
(list doc html-doc examples))))))))
|
|
|
|
(home-page "https://github.com/pyparsing/pyparsing")
|
|
|
|
(synopsis "Python parsing class library")
|
|
|
|
(description
|
|
|
|
"The pyparsing module is an alternative approach to creating and
|
|
|
|
executing simple grammars, vs. the traditional lex/yacc approach, or the use
|
|
|
|
of regular expressions. The pyparsing module provides a library of classes
|
|
|
|
that client code uses to construct the grammar directly in Python code.")
|
|
|
|
(license license:expat)))
|
|
|
|
|
|
|
|
(define-public python-pyparsing-2.4.7
|
|
|
|
(package
|
|
|
|
(inherit python-pyparsing)
|
|
|
|
(version "2.4.7")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "pyparsing" version))
|
|
|
|
(sha256
|
|
|
|
(base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
|
|
|
|
|
|
|
|
(define-public python2-pyparsing
|
|
|
|
(package-with-python2 python-pyparsing))
|
|
|
|
|
|
|
|
(define-public python-packaging-bootstrap
|
|
|
|
(package
|
|
|
|
(name "python-packaging-bootstrap")
|
|
|
|
(version "20.0")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "packaging" version))
|
|
|
|
;; XXX: The URL in the patch file is wrong, it should be
|
|
|
|
;; <https://github.com/pypa/packaging/pull/256>.
|
|
|
|
(patches (search-patches "python-packaging-test-arch.patch"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
|
|
|
|
(build-system python-build-system)
|
|
|
|
(arguments `(#:tests? #f)) ;disabled to avoid extra dependencies
|
|
|
|
(propagated-inputs
|
|
|
|
`(("python-pyparsing" ,python-pyparsing)
|
|
|
|
("python-six-bootstrap" ,python-six-bootstrap)))
|
|
|
|
(home-page "https://github.com/pypa/packaging")
|
|
|
|
(synopsis "Core utilities for Python packages")
|
|
|
|
(description "Packaging is a Python module for dealing with Python packages.
|
|
|
|
It offers an interface for working with package versions, names, and dependency
|
|
|
|
information.")
|
|
|
|
;; From 'LICENSE': This software is made available under the terms of
|
|
|
|
;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
|
|
|
|
;; Contributions to this software is made under the terms of *both* these
|
|
|
|
;; licenses.
|
|
|
|
(license (list license:asl2.0 license:bsd-2))))
|
|
|
|
|
|
|
|
(define-public python2-packaging-bootstrap
|
|
|
|
(package-with-python2 python-packaging-bootstrap))
|
|
|
|
|
2021-01-15 07:57:03 -05:00
|
|
|
;;; The name 'python-pypa-build' is chosen rather than 'python-build' to avoid
|
|
|
|
;;; a name clash with python-build from (guix build-system python).
|
|
|
|
(define-public python-pypa-build
|
|
|
|
(package
|
|
|
|
(name "python-pypa-build")
|
|
|
|
(version "0.1.0")
|
|
|
|
(source (origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "build" version))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"1d6m21lijwm04g50nwgsgj7x3vhblzw7jv05ah8psqgzk20bbch8"))))
|
|
|
|
(build-system python-build-system)
|
|
|
|
(arguments
|
2021-02-03 17:52:35 -05:00
|
|
|
`(#:tests? #f ;to tests in the PyPI release
|
|
|
|
#:phases (modify-phases %standard-phases
|
|
|
|
(add-after 'unpack 'relax-requirements
|
|
|
|
(lambda _
|
|
|
|
(substitute* "setup.cfg"
|
|
|
|
;; Drop the requirement on python-packaging, which is
|
|
|
|
;; not required.
|
|
|
|
((".*packaging.*")
|
|
|
|
"")))))))
|
2021-01-15 07:57:03 -05:00
|
|
|
(propagated-inputs
|
|
|
|
`(("python-pep517", python-pep517-bootstrap)
|
|
|
|
("python-toml" ,python-toml)))
|
|
|
|
(home-page "https://pypa-build.readthedocs.io/en/latest/")
|
|
|
|
(synopsis "Simple Python PEP 517 package builder")
|
|
|
|
(description "The @command{build} command invokes the PEP 517 hooks to
|
|
|
|
build a distribution package. It is a simple build tool and does not perform
|
|
|
|
any dependency management. It aims to keep dependencies to a minimum, in
|
|
|
|
order to make bootstrapping easier.")
|
|
|
|
(license license:expat)))
|
|
|
|
|
2021-01-14 16:27:39 -05:00
|
|
|
(define-public python-poetry-core
|
|
|
|
(package
|
|
|
|
(name "python-poetry-core")
|
2021-04-15 08:47:45 -04:00
|
|
|
(version "1.0.3")
|
2021-01-14 16:27:39 -05:00
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "poetry-core" version))
|
|
|
|
(sha256
|
2021-04-15 08:47:45 -04:00
|
|
|
(base32 "1ichii48zkywcnj8v3bcn9vk09v69jv6h65805w21hwz4hlcj593"))))
|
2021-01-14 16:27:39 -05:00
|
|
|
(build-system python-build-system)
|
|
|
|
(home-page "https://github.com/python-poetry/poetry-core")
|
|
|
|
(synopsis "Poetry PEP 517 build back-end")
|
|
|
|
(description
|
|
|
|
"The @code{poetry-core} module provides a PEP 517 build back-end
|
|
|
|
implementation developed for Poetry. This project is intended to be
|
|
|
|
a light weight, fully compliant, self-contained package allowing PEP 517
|
|
|
|
compatible build front-ends to build Poetry managed projects.")
|
|
|
|
(license license:expat)))
|