python-wheel: update to 0.38.4
This commit is contained in:
committed by
مهدي شينون (Mehdi Chinoune)
parent
4f2c52e479
commit
e9206bfb3b
@@ -1,44 +1,54 @@
|
||||
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
||||
|
||||
_bootstrapping=no
|
||||
|
||||
_pyname=wheel
|
||||
_realname=${_pyname}
|
||||
_realname=wheel
|
||||
pkgbase=mingw-w64-python-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
||||
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
pkgver=0.37.1
|
||||
pkgrel=4
|
||||
pkgver=0.38.4
|
||||
pkgrel=1
|
||||
pkgdesc="A built-package format for Python (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
||||
url="https://pypi.python.org/pypi/wheel"
|
||||
url="https://github.com/pypa/wheel"
|
||||
license=('spdx:MIT')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python")
|
||||
if [[ "${_bootstrapping}" == "no" ]]; then
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-installer")
|
||||
fi
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-packaging")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools")
|
||||
options=('!strip')
|
||||
source=("https://pypi.debian.net/wheel/wheel-${pkgver}-py2.py3-none-any.whl"
|
||||
"install_wheel.py")
|
||||
sha256sums=('4bdcd7d840138086126cd09254dc6195fb4fc6f01c050a1d7236f2630db1d22a'
|
||||
'668e64f912d6360330c403edb6100b21f6aa6dd6a7803d342fab8c35d8176ad9')
|
||||
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
|
||||
sha256sums=('965f5259b566725405b05e7cf774052044b1ed30119b5d586b2703aafe8719ac')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"/${_realname}-${pkgver}
|
||||
|
||||
# https://github.com/pypa/wheel/pull/365
|
||||
rm -r src/wheel/vendored
|
||||
sed -i 's/from .vendored.packaging import tags/from packaging import tags/' src/wheel/bdist_wheel.py
|
||||
sed -i 's/from wheel.vendored.packaging import tags/from packaging import tags/' tests/test_bdist_wheel.py
|
||||
|
||||
cd "${srcdir}"
|
||||
rm -rf python-build-${MSYSTEM} | true
|
||||
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
|
||||
}
|
||||
|
||||
build() {
|
||||
msg "Python build for ${MSYSTEM}"
|
||||
cd "${srcdir}/python-build-${MSYSTEM}"
|
||||
${MINGW_PREFIX}/bin/python setup.py build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/python-build-${MSYSTEM}"
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
||||
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
|
||||
--root="${pkgdir}" --optimize=1 --skip-build
|
||||
|
||||
if [[ "${_bootstrapping}" == "no" ]]; then
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
||||
python -m installer --prefix=${MINGW_PREFIX} --destdir="${pkgdir}" *.whl
|
||||
else
|
||||
_pythonpath=`python -c "import sysconfig; print(sysconfig.get_path('platlib'))"`
|
||||
_site_packages="${pkgdir}$(cygpath ${_pythonpath})"
|
||||
mkdir -p "$_site_packages"
|
||||
python "${srcdir}/install_wheel.py" -i"${_site_packages}" *.whl
|
||||
MSYS2_ARG_CONV_EXCL="-p" python -m compileall \
|
||||
-o 0 -o 1 -q -s"${pkgdir}" -p"/" "${pkgdir}${MINGW_PREFIX}/lib/python"*
|
||||
fi
|
||||
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*-script.py; do
|
||||
# Remove shebang line
|
||||
sed -e '1 { s/^#!.*$// }' -i "${_f}"
|
||||
done
|
||||
|
||||
install -Dm644 *.dist-info/LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/COPYING"
|
||||
install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user