python-slugify: update to 8.0.3

This commit is contained in:
Mehdi Chinoune
2024-02-08 06:57:38 +00:00
committed by مهدي شينون (Mehdi Chinoune)
parent c45c89381e
commit 7e98ea4c03
2 changed files with 16 additions and 17 deletions

View File

@@ -8,7 +8,7 @@ pkgver=2.5.0
pkgrel=1
pkgdesc='A command-line utility that creates projects from project templates, e.g. creating a Python package project from a Python package project template. (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
msys2_references=(
'archlinux: python-cookiecutter'
'pypi: cookiecutter'

View File

@@ -4,11 +4,11 @@ _pyname=python-slugify
_realname=slugify
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=8.0.1
pkgrel=2
pkgver=8.0.3
pkgrel=1
pkgdesc='A Python Slugify application that handles Unicode (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
msys2_references=(
'pypi: python-slugify'
)
@@ -19,33 +19,32 @@ depends=(
"${MINGW_PACKAGE_PREFIX}-python-text-unidecode"
)
makedepends=(
"${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-python-wheel"
)
source=("${_pyname}-${pkgver}.tar.gz::https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
sha256sums=('ce0d46ddb668b3be82f4ed5e503dbc33dd815d83e2eb6824211310d3fb172a27')
options=(!strip)
source=("https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
sha256sums=('e04cba5f1c562502a1175c84a8bc23890c54cdaf23fccaaf0bf78511508cabed')
prepare() {
cd "$srcdir"
rm -rf python-build-${MSYSTEM} | true
cp -r "${_pyname//_/-}-$pkgver" "python-build-${MSYSTEM}"
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
}
build() {
msg "Python build for ${MSYSTEM}"
cd "${srcdir}/python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python setup.py build
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
}
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
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*-script.py; do
# Remove shebang line
sed -e '1 { s/^#!.*$// }' -i "${_f}"
done
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
--destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}