73 lines
2.3 KiB
Bash
73 lines
2.3 KiB
Bash
# Maintainer: Ryuta Suzuki <oroppas@gmail.com>
|
|
|
|
_realname=pathlib2
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-${_realname}")
|
|
pkgver=2.3.5
|
|
pkgrel=1
|
|
pkgdesc="This module offers a set of classes featuring all the common operations on paths in an easy, object-oriented way (mingw-w64)"
|
|
url="https://pypi.org/project/pathlib2/"
|
|
arch=('any')
|
|
license=('MIT')
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-setuptools")
|
|
source=("https://pypi.io/packages/source/p/${_realname}/${_realname}-${pkgver}.tar.gz")
|
|
sha256sums=('6cd9a47b597b37cc57de1c05e56fb1a1c9cc9fab04fe78c29acd090418529868')
|
|
|
|
prepare() {
|
|
cd "${srcdir}"
|
|
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
|
|
}
|
|
|
|
package_python3-pathlib2() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python3"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-scandir")
|
|
|
|
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 LICENSE.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE.txt"
|
|
}
|
|
|
|
package_python2-pathlib2() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python2"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-scandir")
|
|
|
|
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 LICENSE.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE.txt"
|
|
}
|
|
|
|
package_mingw-w64-i686-python2-pathlib2() {
|
|
package_python2-pathlib2
|
|
}
|
|
|
|
package_mingw-w64-i686-python3-pathlib2() {
|
|
package_python3-pathlib2
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python2-pathlib2() {
|
|
package_python2-pathlib2
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python3-pathlib2() {
|
|
package_python3-pathlib2
|
|
}
|
|
|
|
# vim:set ts=2 sw=2 et:
|