Merge pull request #6007 from JPeterMugaas/python-colour
python-colour -0.3.11 - attempt to fix https://github.com/msys2/MINGW…
This commit is contained in:
@@ -4,43 +4,76 @@ _realname=colour
|
||||
pkgbase=mingw-w64-python-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
pkgver=0.3.11
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Python library for a multitude of colour science applications (mingw-w64)"
|
||||
arch=('any')
|
||||
license=('BSD-3-Clause')
|
||||
url="https://pypi.python.org/pypi/colour-science"
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python2-numpy"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-numpy"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2-scipy"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-scipy"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2-six"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-six")
|
||||
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python2-pip"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-pip")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python2-scipy"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2-setuptools"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2-six"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-scipy"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-setuptools"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-six")
|
||||
checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-nose")
|
||||
options=('staticlibs')
|
||||
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/colour-science/colour/archive/v${pkgver}.tar.gz")
|
||||
sha256sums=('df048ca5097a44833039a0392b9f7af649a220204c2e8252fd8639dfce4add3e')
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}
|
||||
cp -r ${_realname}-${pkgver} python2-build
|
||||
cp -r ${_realname}-${pkgver} python3-build
|
||||
for builddir in python{2,3}-build-${CARCH}; do
|
||||
rm -rf ${builddir} | true
|
||||
cp -r "${_realname}-${pkgver}" "${builddir}"
|
||||
done
|
||||
}
|
||||
|
||||
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() {
|
||||
# Python2 tests don't do well and use an old version
|
||||
# of matplotlib. It may or may not be worth fixing.
|
||||
|
||||
# for pver in {2,3}; do
|
||||
# msg "Python ${pver} test for ${CARCH}"
|
||||
# cd "${srcdir}/python${pver}-build-${CARCH}"
|
||||
# ${MINGW_PREFIX}/bin/nosetests${pver}
|
||||
# done
|
||||
|
||||
msg "Python 3 test for ${CARCH}"
|
||||
cd "${srcdir}/python3-build-${CARCH}"
|
||||
${MINGW_PREFIX}/bin/nosetests3
|
||||
}
|
||||
|
||||
package_python2-colour() {
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python2")
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python2"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2-scipy"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2-six")
|
||||
|
||||
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
|
||||
|
||||
cd "${srcdir}/python2-build"
|
||||
pip2 install .
|
||||
install -Dm644 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/COPYING"
|
||||
}
|
||||
|
||||
package_python3-colour() {
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python3")
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python3"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-scipy"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-six")
|
||||
|
||||
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
|
||||
|
||||
cd "${srcdir}/python3-build"
|
||||
pip3 install .
|
||||
install -Dm644 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/COPYING"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user