Files
MINGW-packages/mingw-w64-python-cssselect/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

67 lines
2.4 KiB
Bash

# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=cssselect
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=1.0.1
pkgrel=1
pkgdesc="Caching and sessions WSGI middleware for use with web applications and stand-alone Python scripts and applications (mingw-w64)"
arch=('any')
license=('BSD')
url="https://pypi.python.org/pypi/cssselect"
makedepends=("${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-python3")
_dtoken="77/ff/9c865275cd19290feba56344eba570e719efb7ca5b34d67ed12b22ebbb0d"
source=("https://pypi.python.org/packages/${_dtoken}/${_realname}-${pkgver}.tar.gz")
sha256sums=('73db1c054b9348409e2862fc6c0dde5c4e4fbe4da64c5c5a9e05fbea45744077')
prepare() {
cd "${srcdir}"
sed -e "s|# coding: utf8|# -*- encoding:utf-8 -*-|g" -i ${_realname}-${pkgver}/setup.py
cp -r ${_realname}-${pkgver} build-python2
cp -r ${_realname}-${pkgver} build-python3
}
build() {
cd "${srcdir}/build-python2"
${MINGW_PREFIX}/bin/python2 setup.py build
cd "${srcdir}/build-python3"
${MINGW_PREFIX}/bin/python3 setup.py build
}
package_python2-cssselect() {
pkgdesc="A Python2 library that parses CSS3 Selectors and translates them to XPath 1.0"
depends=("${MINGW_PACKAGE_PREFIX}-python2>")
cd "${srcdir}/build-python2"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=;--install-purelib=;--install-data=" \
${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" --optimize=1
install -D -m644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE"
}
package_python3-cssselect() {
pkgdesc="A Python3 library that parses CSS3 Selectors and translates them to XPath 1.0"
depends=("${MINGW_PACKAGE_PREFIX}-python3")
cd "${srcdir}/build-python3"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=;--install-purelib=;--install-data=" \
${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" --optimize=1
install -D -m644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE"
}
package_mingw-w64-i686-python2-cssselect() {
package_python2-cssselect
}
package_mingw-w64-i686-python3-cssselect() {
package_python3-cssselect
}
package_mingw-w64-x86_64-python2-cssselect() {
package_python2-cssselect
}
package_mingw-w64-x86_64-python3-cssselect() {
package_python3-cssselect
}