python-soupsieve: update to 2.3.2.post1

This commit is contained in:
مهدي شينون (Mehdi Chinoune)
2022-07-29 18:22:22 +01:00
committed by GitHub
parent 6d257a9f66
commit 1fe175ec35

View File

@@ -6,23 +6,27 @@ 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=2.3.1
pkgrel=2
pkgver=2.3.2.post1
pkgrel=1
pkgdesc="A CSS4 selector implementation for Beautiful Soup (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url='https://github.com/facelessuser/soupsieve'
license=('MIT')
depends=("${MINGW_PACKAGE_PREFIX}-python")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-hatchling")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-beautifulsoup4"
"${MINGW_PACKAGE_PREFIX}-python-coverage"
"${MINGW_PACKAGE_PREFIX}-python-html5lib"
"${MINGW_PACKAGE_PREFIX}-python-lxml"
"${MINGW_PACKAGE_PREFIX}-python-mypy"
"${MINGW_PACKAGE_PREFIX}-python-pytest"
"${MINGW_PACKAGE_PREFIX}-python-pytest-cov")
options=('staticlibs' 'strip' '!debug')
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/facelessuser/soupsieve/archive/${pkgver}.tar.gz")
sha256sums=('ba774446d8d41a5388432b5a367289e89330eef590f195e6c9e3f5cf7d616a60')
sha256sums=('2f6a3926d6ee7e360654263b514c2fe850e2fecb48cee3e4a3d8afbcf059830f')
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
@@ -43,37 +47,26 @@ del_file_exists() {
}
# =========================================== #
prepare() {
cd "${srcdir}"
pushd "${_realname}-${pkgver}"
# apply_patch_with_msg 0001-A-really-important-fix.patch \
# 0002-A-less-important-fix.patch
popd
rm -rf python-build-${CARCH} | true
cp -r "${_realname}-${pkgver}" "python-build-${CARCH}"
# Set version for setuptools_scm
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
}
build() {
msg "Python build for ${CARCH}"
cd "${srcdir}/python-build-${CARCH}"
${MINGW_PREFIX}/bin/python setup.py build
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
msg "Python test for ${CARCH}"
cd "${srcdir}/python-build-${CARCH}"
${MINGW_PREFIX}/bin/py.test
cd "${srcdir}/python-build-${MSYSTEM}"
# The test command will usually depend upon what is contained in the tox.ini file
# or in the [testenv:py] section of the pyproject.toml file.
${MINGW_PREFIX}/bin/python -m pytest
}
package() {
cd "${srcdir}/python-build-${CARCH}"
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
cd "${srcdir}/python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
--destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE.md "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}