Use the new flit_core.wheel command for bootstrapping

This commit is contained in:
Christoph Reiter
2022-07-27 09:43:53 +02:00
parent c7bd51f58c
commit 19c6099c95
2 changed files with 9 additions and 8 deletions

View File

@@ -3,7 +3,7 @@
_realname=installer
pkgname="python-${_realname}"
pkgver=0.5.1
pkgrel=1
pkgrel=2
pkgdesc="A low-level library for installing from a Python wheel distribution"
arch=('any')
url='https://github.com/pypa/installer'
@@ -18,8 +18,7 @@ sha256sums=('f970995ec2bb815e2fdaf7977b26b2091e1e386f0f42eafd5ac811953dc5d445')
build() {
cd "${srcdir}/${_realname}-${pkgver}"
mkdir -p dist
python -c "from flit_core import buildapi; buildapi.build_wheel('dist/')"
python -m flit_core.wheel
}
package() {

View File

@@ -4,26 +4,28 @@ _realname=pep517
pkgname="python-${_realname}"
pkgver=0.12.0
pkgrel=1
pkgrel=2
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-setuptools")
makedepends=(
"python-flit-core"
"python-installer"
)
source=("https://pypi.io/packages/source/p/pep517/pep517-${pkgver}.tar.gz")
sha256sums=('931378d93d11b298cf511dd634cf5ea4cb249a28ef84160b3247ee9afb4e8ab0')
build() {
cd "${_realname}-${pkgver}"
python setup.py build
python -m flit_core.wheel
}
package() {
cd "${_realname}-${pkgver}"
python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/python-${_realname}/LICENSE"
}