* python-watchdog - 0.9.0- - new package * python-webcolors - 1,8.1 - new package to validate python-jsonschema
83 lines
2.6 KiB
Bash
83 lines
2.6 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=webcolors
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
|
pkgver=1.8.1
|
|
pkgrel=1
|
|
pkgdesc="A library for working with color names and color value formats defined by the HTML and CSS specifications for use in documents on the Web (mingw-w64)"
|
|
arch=('any')
|
|
url='https://github.com/ubernostrum/webcolors'
|
|
license=('BSD')
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python2"
|
|
"${MINGW_PACKAGE_PREFIX}-python3"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-setuptools")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python2-pytest"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-pytest")
|
|
options=('staticlibs' 'strip' '!debug')
|
|
source=("https://pypi.io/packages/source/w/webcolors/webcolors-$pkgver.tar.gz")
|
|
sha512sums=('45ddb4ec030206c3ff1edb7de6b8ec1b5f2f9ef5068f37a7c43b66531a2dc6b290cced2af1ca18794aaa9ba17f297022b2f9cc7a92a74ee9b68f758abf7c104e')
|
|
|
|
prepare() {
|
|
cd "${srcdir}"
|
|
for builddir in python{2,3}-build-${CARCH}; do
|
|
rm -rf ${builddir} | true
|
|
cp -r "${_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
|
|
|
|
msg "Python 3 test for ${CARCH}"
|
|
cd "${srcdir}/python3-build-${CARCH}"
|
|
${MINGW_PREFIX}/bin/py.test
|
|
}
|
|
|
|
package_python3-webcolors() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python3")
|
|
|
|
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
|
|
}
|
|
|
|
package_python2-webcolors() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python2")
|
|
|
|
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
|
|
}
|
|
|
|
package_mingw-w64-i686-python2-webcolors() {
|
|
package_python2-webcolors
|
|
}
|
|
|
|
package_mingw-w64-i686-python3-webcolors() {
|
|
package_python3-webcolors
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python2-webcolors() {
|
|
package_python2-webcolors
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python3-webcolors() {
|
|
package_python3-webcolors
|
|
}
|