Files
MINGW-packages/mingw-w64-python2-pathlib/PKGBUILD
J. Peter Mugaas 4999cff9fc Some packages for running python-pytest-benchmark - needed to test py… (#4306)
* Some packages for running python-pytest-benchmark - needed to test python-hypothesis
python2-pathlib - 1.0.1 - new package for building and use by python-pytest-benchmark
python-pytest-runner - 4.2 - clarified and corrected dependencies and build requirements
python2-statistics - 1.0.3.5 - New package  for building and use by python-pytest-benchmark
python-py-cpuinfo - 4.0.8 - New package  for building and use by python-pytest-benchmark

* Various fixes suggested Alexpux
2018-08-25 20:42:58 +03:00

38 lines
1.4 KiB
Bash

# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
_realname=pathlib
pkgbase=mingw-w64-python2-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-python2-${_realname}"
pkgver=1.0.1
pkgrel=1
pkgdesc="This module offers a set of classes featuring all the common operations on paths in an easy, object-oriented way"
arch=('any')
url="https://pathlib.readthedocs.org/en/${pkgver}/"
license=('MIT')
depends=("${MINGW_PACKAGE_PREFIX}-python2")
makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools")
source=("https://files.pythonhosted.org/packages/source/p/pathlib/pathlib-${pkgver}.tar.gz")
sha512sums=('d85e45dfcc85ce75a7e7b609163dc8c75c688f279c1833510185f280af5501e473376dc09bddc6a804d1fcc3177a939db85af37b7b8d5b183b9bc2b85b3b0f8b')
prepare() {
cd "${srcdir}"
rm -rf python2-build-${CARCH}| true
cp -r "${_realname}-${pkgver}" "python2-build-${CARCH}"
# Set version for setuptools_scm
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
}
build() {
msg "Python 2 build for ${CARCH}"
cd "${srcdir}/python2-build-${CARCH}"
${MINGW_PREFIX}/bin/python2 setup.py build
}
package() {
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.txt "$pkgdir${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE.txt"
}