forked from msys2/MINGW-packages
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add python-zeroconf * address review issues and more: * use correct prefixed package name * use correct MINGW_PREFIX for install * add INSTALL and README files in share/licenses and share/doc respectively * add commented-out test code for python2 (requires fix to python2-mock package to run) * use named archive when downloading source
- Loading branch information
Showing
3 changed files
with
91 additions
and
91 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Maintainer: Antoine Martin <[email protected]> | ||
# Contributor: ZaZam <zazaamm æt gmail døt com> | ||
# Contributor: Yegorius <[email protected]> | ||
|
||
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 . | ||
} |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Maintainer: Antoine Martin <[email protected]> | ||
# Contributor: Jelle van der Waa <[email protected]> | ||
# Contributor: Maxim Andersson <[email protected]> | ||
|
||
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 . | ||
} |