Files
MINGW-packages/mingw-w64-python-path/PKGBUILD
Christoph Reiter 4d8828efed Make pkgbase of all packages match the name of the PKGBUILD directory (#2878)
This either changes the pkgbase to match the directory name
or the other way around.

The motivation for this is to make it possible to automatically generate
an URL to the PKGBUILD file from the package information alone.
2017-09-12 14:25:41 +03:00

83 lines
2.5 KiB
Bash

# Maintainer: Ryuta Suzuki <oroppas@gmail.com>
_realname=path.py
pkgbase=mingw-w64-python-path
pkgname=("${MINGW_PACKAGE_PREFIX}-python3-path"
"${MINGW_PACKAGE_PREFIX}-python2-path")
pkgver=10.3.1
pkgrel=1
pkgdesc="File system based database that uses python pickles (mingw-w64)"
url="https://github.com/jaraco/path.py"
arch=('any')
license=('MIT')
makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools"
"${MINGW_PACKAGE_PREFIX}-python2-setuptools"
"${MINGW_PACKAGE_PREFIX}-python3-colorama"
"${MINGW_PACKAGE_PREFIX}-python2-colorama")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest"
"${MINGW_PACKAGE_PREFIX}-python2-pytest"
"${MINGW_PACKAGE_PREFIX}-python3-py"
"${MINGW_PACKAGE_PREFIX}-python2-py")
source=("https://files.pythonhosted.org/packages/source/p/path.py/${_realname}-${pkgver}.tar.gz")
sha256sums=('6a443147d40079534f25d962c0b3b3a2f90b18b83b2e2987cbbbe218b6b6cdea')
prepare() {
cp -a ${_realname}-${pkgver}{,-py2}
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
}
build() {
cd ${srcdir}/${_realname}-${pkgver}
python3 setup.py build
cd ${srcdir}/${_realname}-${pkgver}-py2
python2 setup.py build
}
#check() {
# cd ${srcdir}/${_realname}-${pkgver}
# py.test-3.6
#
# cd ${srcdir}/${_realname}-${pkgver}-py2
# py.test-2.7
#}
package_python3-path() {
depends=("${MINGW_PACKAGE_PREFIX}-python3")
cd ${srcdir}/${_realname}-${pkgver}
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python3 setup.py install --root=${pkgdir} --prefix=${MINGW_PREFIX} --optimize=1
install -d ${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}
head -n 21 path.py > ${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE
}
package_python2-path() {
depends=("${MINGW_PACKAGE_PREFIX}-python2")
cd ${srcdir}/${_realname}-${pkgver}-py2
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python2 setup.py install --root=${pkgdir} --prefix=${MINGW_PREFIX} --optimize=1
install -d ${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}
head -n 21 path.py > ${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE
}
package_mingw-w64-i686-python2-path() {
package_python2-path
}
package_mingw-w64-i686-python3-path() {
package_python3-path
}
package_mingw-w64-x86_64-python2-path() {
package_python2-path
}
package_mingw-w64-x86_64-python3-path() {
package_python3-path
}
# vim:set ts=2 sw=2 et: