-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use PEP 517 for building if supported (10/10)
- Loading branch information
1 parent
d36d84e
commit 9c4daa8
Showing
20 changed files
with
266 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,42 @@ | ||
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net> | ||
|
||
_realname=ukpostcodeparser | ||
_pyname=UkPostcodeParser | ||
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=1.1.2 | ||
pkgrel=5 | ||
pkgrel=6 | ||
pkgdesc="UK Postcode parser (mingw-w64)" | ||
arch=('any') | ||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64') | ||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64') | ||
url='/~https://github.com/hamstah/ukpostcodeparser' | ||
license=('MIT') | ||
msys2_references=( | ||
'pypi: UkPostcodeParser' | ||
) | ||
license=('spdx:MIT') | ||
depends=("${MINGW_PACKAGE_PREFIX}-python") | ||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools") | ||
source=("${_realname}-${pkgver}.tar.gz"::"/~https://github.com/hamstah/ukpostcodeparser/archive/v${pkgver}.tar.gz") | ||
sha512sums=('8113522b728c095f937a9f53f21c369130e3e63c4fc3546dbea4ad1c53648742fb0e766b1254c76ee65d69dec585f1a90caa7d39ca540de1765ff5f989a702de') | ||
|
||
prepare() { | ||
cd "${srcdir}" | ||
rm -rf "python-build-${MSYSTEM}" | true | ||
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" | ||
|
||
# Set version for setuptools_scm | ||
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver} | ||
} | ||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build" | ||
"${MINGW_PACKAGE_PREFIX}-python-installer" | ||
"${MINGW_PACKAGE_PREFIX}-python-setuptools") | ||
source=("https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz") | ||
sha256sums=('930264efa293db80af0103a4fe9c161b06365598d24bb6fe5403f3f57c70530e') | ||
|
||
build() { | ||
msg "Python build for ${MSYSTEM}" | ||
cd "${srcdir}/python-build-${MSYSTEM}" | ||
${MINGW_PREFIX}/bin/python setup.py build | ||
cp -r "${_pyname}-${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 ${MSYSTEM}" | ||
cd "${srcdir}/python-build-${MSYSTEM}" | ||
${MINGW_PREFIX}/bin/python -m unittest discover -s ukpostcodeparser/test -p '*.py' || warning "Tests failed" | ||
} | ||
|
||
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 | ||
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 "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.