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.
49 lines
1.8 KiB
Bash
49 lines
1.8 KiB
Bash
# Maintainer: Antoine Martin <antoine@xpra.org>
|
|
# Contributor: Jelle van der Waa <jelle@archlinux.org>
|
|
# Contributor: Maxim Andersson <thesilentboatman@gmail.com>
|
|
|
|
_realname=zeroconf
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=0.145.0
|
|
pkgrel=1
|
|
pkgdesc="A pure python implementation of multicast DNS service discovery (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
msys2_references=(
|
|
'purl: pkg:pypi/zeroconf'
|
|
)
|
|
url="https://github.com/python-zeroconf/python-zeroconf"
|
|
license=('spdx:LGPL-2.1-or-later')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python"
|
|
"${MINGW_PACKAGE_PREFIX}-python-ifaddr")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python-poetry-core"
|
|
"${MINGW_PACKAGE_PREFIX}-cython"
|
|
"${MINGW_PACKAGE_PREFIX}-cc")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest")
|
|
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
|
|
sha256sums=('846ffc6f22e2f9f5a8bdf7b9c201ed926f7414f65636a496e76c5be662b82190')
|
|
|
|
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() {
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
pytest -k 'not test_integration_with_listener_ipv6' tests || warning "Tests failed"
|
|
}
|
|
|
|
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 README.rst "${pkgdir}${MINGW_PREFIX}/share/doc/python-zeroconf/README"
|
|
}
|