diff --git a/mingw-w64-python-zeroconf/PKGBUILD b/mingw-w64-python-zeroconf/PKGBUILD deleted file mode 100644 index 41f4af2b0a313..0000000000000 --- a/mingw-w64-python-zeroconf/PKGBUILD +++ /dev/null @@ -1,91 +0,0 @@ -# Maintainer: Smo - -_realname=zeroconf -pkgbase=mingw-w64-python-${_realname} -pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=0.21.3 -pkgrel=2 -pkgdesc="A pure python implementation of multicast DNS service discovery (mingw-w64)" -arch=('any') -url='https://github.com/jstasiak/python-zeroconf' -license=('GPLv2') -makedepends=("${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-python2-ifaddr" - "${MINGW_PACKAGE_PREFIX}-python2-setuptools" - "${MINGW_PACKAGE_PREFIX}-python2-typing" - "${MINGW_PACKAGE_PREFIX}-python3" - "${MINGW_PACKAGE_PREFIX}-python3-ifaddr" - "${MINGW_PACKAGE_PREFIX}-python3-setuptools") -options=('staticlibs' 'strip' '!debug') -source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/jstasiak/python-zeroconf/archive/${pkgver}.tar.gz") -sha512sums=('2d42baf12bc44c05c45a8491d840422e8596d9748d8292d52d45a8cce559b867485174d99204826c7ea1d92711133c2b2e7082cea175dd00017c0e959845e611') - -prepare() { - cd "${srcdir}" - for builddir in python{2,3}-build-${CARCH}; do - rm -rf ${builddir} | true - cp -r "python-${_realname}-${pkgver}" "${builddir}" - done - # Set version for setuptools_scm - export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver -} - -build() { - for pver in {2,3}; do - msg "Python ${pver} build for ${CARCH}" - cd "${srcdir}/python${pver}-build-${CARCH}" - ${MINGW_PREFIX}/bin/python${pver} setup.py build - done -} - -check() { -# msg "Python 2 test for ${CARCH}" -# cd "${srcdir}/python2-build-${CARCH}" -# ${MINGW_PREFIX}/bin/py.test2 . || warning "Tests failed" - - msg "Python 3 test for ${CARCH}" - cd "${srcdir}/python3-build-${CARCH}" - ${MINGW_PREFIX}/bin/py.test . || warning "Tests failed" - -} - -package_python3-zeroconf() { - depends=("${MINGW_PACKAGE_PREFIX}-python3" - "${MINGW_PACKAGE_PREFIX}-python3-ifaddr") - - cd "${srcdir}/python3-build-${CARCH}" - MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ - --root="${pkgdir}" --optimize=1 --skip-build - - install -Dm644 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/COPYING" -} - -package_python2-zeroconf() { - depends=("${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-python2-ifaddr" - "${MINGW_PACKAGE_PREFIX}-python2-typing") - - cd "${srcdir}/python2-build-${CARCH}" - MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ - --root="${pkgdir}" --optimize=1 --skip-build - - install -Dm644 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/COPYING" -} - -package_mingw-w64-i686-python2-zeroconf() { - package_python2-zeroconf -} - -package_mingw-w64-i686-python3-zeroconf() { - package_python3-zeroconf -} - -package_mingw-w64-x86_64-python2-zeroconf() { - package_python2-zeroconf -} - -package_mingw-w64-x86_64-python3-zeroconf() { - package_python3-zeroconf -} diff --git a/mingw-w64-python2-zeroconf/PKGBUILD b/mingw-w64-python2-zeroconf/PKGBUILD new file mode 100644 index 0000000000000..490946870af1d --- /dev/null +++ b/mingw-w64-python2-zeroconf/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: Antoine Martin +# Contributor: ZaZam +# Contributor: Yegorius + +pkgname="${MINGW_PACKAGE_PREFIX}-python2-zeroconf" +_srcname=python-zeroconf +pkgver=0.19.1 +pkgrel=1 +pkgdesc="A pure python implementation of multicast DNS service discovery" +arch=('any') +url="https://github.com/jstasiak/python-zeroconf" +license=('LGPL') +depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-netifaces" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python2-enum34") +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools") +#checks are skipped at the moment: +#checkdepends=("${MINGW_PACKAGE_PREFIX}-python2-mock") +source=("${_srcname}-${pkgver}.tar.gz"::"https://github.com/jstasiak/${_srcname}/archive/${pkgver}.tar.gz") +sha256sums=('ca8952a3eb04818dcb566e1344f2f15b5dd6d487770384651cdfae777d5eb848') + +prepare() { + cd "${srcdir}/${_srcname}-${pkgver}" + + # No need for enum-compat if depend on enum34 + sed -i "s/'enum-compat',//" setup.py +} + +build() { + cd "${srcdir}/${_srcname}-${pkgver}" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py build +} + +package() { + cd "${srcdir}/${_srcname}-${pkgver}" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ + --root="$pkgdir" --optimize=1 + install -Dm644 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-zeroconf/COPYING" + install -Dm644 README.rst "${pkgdir}${MINGW_PREFIX}/share/doc/python2-zeroconf/README" +} + +check() { + echo "test skipped because python-mock currently fails to import" + echo "see 'python2 -c \"from mock import patch\"'" + #cd "${srcdir}/${_srcname}-${pkgver}" + #py.test . +} diff --git a/mingw-w64-python3-zeroconf/PKGBUILD b/mingw-w64-python3-zeroconf/PKGBUILD new file mode 100644 index 0000000000000..fd58600ccf320 --- /dev/null +++ b/mingw-w64-python3-zeroconf/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Antoine Martin +# Contributor: Jelle van der Waa +# Contributor: Maxim Andersson + +pkgname="${MINGW_PACKAGE_PREFIX}-python3-zeroconf" +_srcname=python-zeroconf +pkgver=0.21.3 +pkgrel=1 +pkgdesc="A pure python implementation of multicast DNS service discovery" +arch=('any') +url="https://github.com/jstasiak/python-zeroconf" +license=('LGPL') +depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-netifaces" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python3-ifaddr") +makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest") +source=("${_srcname}-${pkgver}.tar.gz"::"https://github.com/jstasiak/${_srcname}/archive/${pkgver}.tar.gz") +sha256sums=('8c3aaed98f950b56c6e1aa440b56e0d48af49565cb4d7830a82cb3b01088aad8') + +build() { + cd "${srcdir}/${_srcname}-${pkgver}" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py build +} + +package() { + cd "${srcdir}/${_srcname}-${pkgver}" + + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 --skip-build + install -Dm644 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-zeroconf/COPYING" + install -Dm644 README.rst "${pkgdir}${MINGW_PREFIX}/share/doc/python3-zeroconf/README" +} + +check() { + cd "${srcdir}/${_srcname}-${pkgver}" + py.test . +}