Python 2 Removal - Round 3 (#1878)
* python-appdirs: Drop Python 2 package * python-packaging: Drop Python 2 package and drop the check depends and function, all those packages don't exist.. * python-pyparsing: Drop Python 2 package * python2-pytest: Remove package * python-atomicwrites: Drop Python 2 package * python-pytest-runner: Drop Python 2 package * python-attrs: Drop Python 2 package * python-pluggy: Drop Python 2 package * python-py: Drop Python 2 package * python2-more-itertools: Drop package * python-setuptools-scm: Drop Python 2 package
This commit is contained in:
@@ -2,58 +2,43 @@
|
||||
|
||||
_realname=pluggy
|
||||
pkgbase=python-pluggy
|
||||
pkgname=(python2-${_realname} python3-${_realname})
|
||||
pkgname=(python-${_realname})
|
||||
pkgver=0.13.0
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Plugin and hook calling mechanisms for python"
|
||||
arch=('any')
|
||||
url="https://www.pluggypayments.com/docs/python"
|
||||
license=('MIT')
|
||||
makedepends=('python2-setuptools-scm' 'python3-setuptools-scm')
|
||||
checkdepends=('python2-pytest-runner' 'python3-pytest-runner')
|
||||
depends=('python')
|
||||
makedepends=('python3-setuptools' 'python3-setuptools-scm')
|
||||
checkdepends=('python3-pytest-runner')
|
||||
provides=("python3-${_realname}")
|
||||
replaces=("python3-${_realname}")
|
||||
conflicts=("python3-${_realname}")
|
||||
source=("$pkgbase-$pkgver.tar.gz::https://github.com/pytest-dev/pluggy/archive/$pkgver.tar.gz")
|
||||
sha512sums=('cc946bf3e003e0c6fd04d113682560c6e2c84ffa790a6177f43cd5754d25248bae33af6aa77d86c938cea31bc386af9ada88d61499071a6216da1fd94bc11773')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"
|
||||
for builddir in python{2,3}-build-${CARCH}; do
|
||||
rm -rf ${builddir} | true
|
||||
cp -r "${_realname}-${pkgver}" "${builddir}"
|
||||
done
|
||||
# Set version for setuptools_scm
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
|
||||
}
|
||||
|
||||
build() {
|
||||
for pver in {2,3}; do
|
||||
msg "Python ${pver} build for ${CARCH}"
|
||||
cd "${srcdir}/python${pver}-build-${CARCH}"
|
||||
python${pver} setup.py build
|
||||
done
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
for pver in {2,3}; do
|
||||
msg "Python ${pver} test for ${CARCH}"
|
||||
cd "${srcdir}/python${pver}-build-${CARCH}"
|
||||
python${pver} setup.py pytest
|
||||
done
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
python3 setup.py pytest
|
||||
}
|
||||
|
||||
package_python3-pluggy() {
|
||||
depends=('python3')
|
||||
package() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
cd "${srcdir}/python3-build-${CARCH}"
|
||||
python3 setup.py install -O1 --root "$pkgdir" --optimize=1 --skip-build
|
||||
|
||||
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
||||
}
|
||||
|
||||
package_python2-pluggy() {
|
||||
depends=('python2')
|
||||
|
||||
cd "${srcdir}/python2-build-${CARCH}"
|
||||
python2 setup.py install -O1 --root "$pkgdir" --optimize=1 --skip-build
|
||||
|
||||
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user