diff --git a/python-build/001-use-flit.patch b/python-build/001-use-flit.patch deleted file mode 100644 index 4baf56cb..00000000 --- a/python-build/001-use-flit.patch +++ /dev/null @@ -1,110 +0,0 @@ -From de60f38c13618572502365090e21715940e575cd Mon Sep 17 00:00:00 2001 -From: layday -Date: Thu, 12 May 2022 23:32:19 +0300 -Subject: [PATCH] infra: switch to flit - ---- - CHANGELOG.rst | 10 +++++ - pyproject.toml | 78 ++++++++++++++++++++++++++++++++++-- - setup.cfg | 74 ---------------------------------- - setup.py | 4 -- - tests/test_integration.py | 4 +- - tests/test_self_packaging.py | 14 +------ - 6 files changed, 88 insertions(+), 96 deletions(-) - delete mode 100644 setup.cfg - delete mode 100644 setup.py - -diff --git a/pyproject.toml b/pyproject.toml -index a4f7f4d7..86f801e3 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -1,6 +1,79 @@ - [build-system] --requires = ["setuptools >=42.0"] --build-backend = "setuptools.build_meta" -+requires = ["flit-core >= 3.4"] -+build-backend = "flit_core.buildapi" -+ -+[project] -+name = "build" -+version = "0.9.0" -+description = "A simple, correct PEP 517 build frontend" -+readme = "README.md" -+requires-python = ">= 3.6" -+license.file = "LICENSE" -+authors = [ -+ { name = "Filipe Laíns", email = "lains@riseup.net" }, -+ { name = "Bernát Gábor", email = "gaborjbernat@gmail.com" }, -+ { name = "layday", email = "layday@protonmail.com" }, -+ { name = "Henry Schreiner", email = "henryschreineriii@gmail.com" }, -+] -+classifiers = [ -+ "License :: OSI Approved :: MIT License", -+ "Programming Language :: Python :: 3", -+ "Programming Language :: Python :: 3 :: Only", -+ "Programming Language :: Python :: 3.6", -+ "Programming Language :: Python :: 3.7", -+ "Programming Language :: Python :: 3.8", -+ "Programming Language :: Python :: 3.9", -+ "Programming Language :: Python :: 3.10", -+ "Programming Language :: Python :: 3.11", -+ "Programming Language :: Python :: Implementation :: CPython", -+ "Programming Language :: Python :: Implementation :: PyPy", -+] -+urls.homepage = "https://github.com/pypa/build" -+urls.changelog = "https://pypa-build.readthedocs.io/en/stable/changelog.html" -+ -+dependencies = [ -+ "packaging >= 19.0", -+ "pep517 >= 0.9.1", -+ # not actually a runtime dependency, only supplied as there is not "recommended dependency" support -+ 'colorama; os_name == "nt"', -+ 'importlib-metadata >= 0.22; python_version < "3.8"', -+ # toml can be used instead -- in case it makes bootstrapping easier -+ 'tomli >= 1.0.0; python_version < "3.11"', -+] -+ -+[project.optional-dependencies] -+docs = [ -+ "furo >= 2021.08.31", -+ "sphinx ~= 4.0", -+ "sphinx-argparse-cli >= 1.5", -+ "sphinx-autodoc-typehints >= 1.10", -+] -+test = [ -+ "filelock >= 3", -+ "pytest >= 6.2.4", -+ "pytest-cov >= 2.12", -+ "pytest-mock >= 2", -+ "pytest-rerunfailures >= 9.1", -+ "pytest-xdist >= 1.34", -+ "toml >= 0.10.0", -+ "wheel >= 0.36.0", -+ 'setuptools >= 42.0.0; python_version < "3.10"', -+ 'setuptools >= 56.0.0; python_version >= "3.10"', -+] -+typing = [ -+ "importlib-metadata >= 4.6.4", -+ "mypy == 0.942", -+ "typing-extensions >= 3.7.4.3", -+] -+virtualenv = [ -+ "virtualenv >= 20.0.35", -+] -+ -+[project.scripts] -+pyproject-build = "build.__main__:entrypoint" -+ -+[project.entry-points."pipx.run"] -+build = "build.__main__:entrypoint" - - [tool.coverage.run] - source = [ -@@ -49,7 +122,6 @@ strict = true - show_error_codes = true - enable_error_code = ["ignore-without-code", "truthy-bool", "redundant-expr"] - -- - [[tool.mypy.overrides]] - module = [ - "colorama", # Optional dependency diff --git a/python-build/PKGBUILD b/python-build/PKGBUILD index 5c92b61a..59000f97 100644 --- a/python-build/PKGBUILD +++ b/python-build/PKGBUILD @@ -2,30 +2,21 @@ _realname=build pkgname="python-${_realname}" -pkgver=0.9.0 -pkgrel=2 -pkgdesc="A simple, correct PEP517 package builder" +pkgver=0.10.0 +pkgrel=1 +pkgdesc="A simple, correct Python build frontend" arch=('any') url='https://github.com/pypa/build' license=('spdx:MIT') depends=("python-packaging" - "python-pep517" + "python-pyproject-hooks" "python-tomli") makedepends=( "python-flit-core" "python-installer" ) -source=("${_realname}-$pkgver.tar.gz"::"https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz" - "001-use-flit.patch") -sha256sums=('1a07724e891cbd898923145eb7752ee7653674c511378eb9c7691aab1612bc3c' - 'ae7f1a3a1f39e517d280a6015dc9cde0e09155ad8ca86f3ba28614b8d42022f9') - -prepare() { - cd "${srcdir}/${_realname}-${pkgver}" - - # https://github.com/pypa/build/pull/471 - patch -Np1 -i "${srcdir}/001-use-flit.patch" -} +source=("${_realname}-$pkgver.tar.gz"::"https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz") +sha256sums=('d5b71264afdb5951d6704482aac78de887c80691c52b88a9ad195983ca2c9269') build() { cd "${srcdir}/${_realname}-${pkgver}" diff --git a/python-pep517/PKGBUILD b/python-pep517/PKGBUILD deleted file mode 100644 index e59318c6..00000000 --- a/python-pep517/PKGBUILD +++ /dev/null @@ -1,31 +0,0 @@ -# Maintainer: Christoph Reiter s - -_realname=pep517 - -pkgname="python-${_realname}" -pkgver=0.13.0 -pkgrel=1 -pkgdesc="Wrappers to build Python packages using PEP 517 hooks" -arch=('any') -url="https://github.com/pypa/pep517" -license=('spdx:MIT') -depends=("python-tomli") -makedepends=( - "python-flit-core" - "python-installer" -) -source=("https://pypi.io/packages/source/p/pep517/pep517-${pkgver}.tar.gz") -sha256sums=('ae69927c5c172be1add9203726d4b84cf3ebad1edcd5f71fcdc746e66e829f59') - -build() { - cd "${_realname}-${pkgver}" - - python -m flit_core.wheel -} - -package() { - cd "${_realname}-${pkgver}" - - python -m installer --destdir="${pkgdir}" dist/*.whl - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/python-${_realname}/LICENSE" -} diff --git a/python-pyproject-hooks/PKGBUILD b/python-pyproject-hooks/PKGBUILD new file mode 100644 index 00000000..951c21c7 --- /dev/null +++ b/python-pyproject-hooks/PKGBUILD @@ -0,0 +1,28 @@ +# Maintainer: Christoph Reiter + +_name=pyproject_hooks +pkgname=python-pyproject-hooks +pkgver=1.0.0 +pkgrel=1 +pkgdesc="A low-level library for calling build-backends in pyproject.toml-based project" +arch=(any) +url="https://github.com/pypa/pyproject-hooks" +license=('spdx:MIT') +depends=(python python-tomli) +makedepends=(python-installer python-flit-core) +source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz) +sha256sums=('f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5') + +build() { + cd $_name-$pkgver + + python -m flit_core.wheel +} + +package() { + cd $_name-$pkgver + + python -m installer --destdir="$pkgdir" dist/*.whl + + install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" +}