42 lines
1.5 KiB
Bash
42 lines
1.5 KiB
Bash
# This is an example PKGBUILD file. Use this as a start to creating your own,
|
|
# and remove these comments. For more information, see 'man PKGBUILD'.
|
|
# NOTE: Please fill out the license field for your package! If it is unknown,
|
|
# then please put 'unknown'.
|
|
|
|
# Maintainer: Future Linux Team <future_linux@163.com>
|
|
pkgname=python-wheel
|
|
pkgver=0.44.0
|
|
pkgrel=1
|
|
pkgdesc="A built-package format for Python"
|
|
arch=('x86_64')
|
|
url="https://pypi.org/project/wheel/"
|
|
license=('MIT')
|
|
depends=('python-packaging')
|
|
makedepends=('python-build' 'python-flit-core' 'python-installer')
|
|
source=(https://pypi.org/packages/source/w/${pkgname#*-}/${pkgname#*-}-${pkgver}.tar.gz)
|
|
sha256sums=(a29c3f2817e95ab89aa4660681ad547c0e9547f20e75b0562fe7723c9a2a9d49)
|
|
|
|
prepare() {
|
|
cd ${pkgname#*-}-${pkgver}
|
|
|
|
# https://github.com/pypa/wheel/pull/365 but why?
|
|
rm -r src/wheel/vendored
|
|
sed -i 's/from .vendored.packaging.requirements import Requirement/from packaging.requirements import Requirement/' src/wheel/metadata.py
|
|
sed -i 's/from .vendored.packaging import tags/from packaging import tags/' src/wheel/bdist_wheel.py
|
|
sed -i 's/from .vendored.packaging import version as _packaging_version/from packaging import version as _packaging_version/' src/wheel/bdist_wheel.py
|
|
sed -i 's/from wheel.vendored.packaging import tags/from packaging import tags/' tests/test_bdist_wheel.py
|
|
|
|
}
|
|
|
|
build() {
|
|
cd ${pkgname#*-}-${pkgver}
|
|
|
|
python3 -m build --wheel --no-isolation
|
|
}
|
|
|
|
package() {
|
|
cd ${pkgname#*-}-${pkgver}
|
|
|
|
python3 -m installer -d ${pkgdir} dist/*.whl
|
|
}
|