This allows us to include a version and we already use PURL for other things, so might as well remove the pypi special case. Normalize the names, since that is required for PURLs.
67 lines
2.1 KiB
Bash
67 lines
2.1 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=dnspython
|
|
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=2.7.0
|
|
pkgrel=1
|
|
pkgdesc="A DNS toolkit for Python (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url='https://www.dnspython.org/'
|
|
msys2_repository_url="https://github.com/rthalley/dnspython"
|
|
msys2_references=(
|
|
'purl: pkg:pypi/dnspython'
|
|
)
|
|
license=('spdx:ISC')
|
|
depends=(
|
|
"${MINGW_PACKAGE_PREFIX}-python"
|
|
)
|
|
optdepends=(
|
|
"${MINGW_PACKAGE_PREFIX}-python-cryptography: DNSSEC support"
|
|
"${MINGW_PACKAGE_PREFIX}-python-requests-toolbelt: DoH support"
|
|
"${MINGW_PACKAGE_PREFIX}-python-idna: support for updated IDNA 2008"
|
|
#"${MINGW_PACKAGE_PREFIX}-python-curio: async support"
|
|
#"${MINGW_PACKAGE_PREFIX}-python-trio: async support"
|
|
#"${MINGW_PACKAGE_PREFIX}-python-sniffio: async support"
|
|
)
|
|
makedepends=(
|
|
"${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-hatchling"
|
|
)
|
|
checkdepends=(
|
|
"${MINGW_PACKAGE_PREFIX}-python-idna"
|
|
"${MINGW_PACKAGE_PREFIX}-python-cryptography"
|
|
#"${MINGW_PACKAGE_PREFIX}-python-trio"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pytest"
|
|
)
|
|
source=(https://pypi.io/packages/source/${_realname:0:1}/${_realname}/${_realname}-${pkgver}.tar.gz)
|
|
sha256sums=('ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1')
|
|
|
|
build() {
|
|
cd "${srcdir}"
|
|
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
|
|
|
|
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
check() {
|
|
cd "${_realname}-${pkgver}"
|
|
|
|
pytest
|
|
}
|
|
|
|
package() {
|
|
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"
|
|
}
|