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,60 +2,30 @@
|
||||
|
||||
_realname=attrs
|
||||
pkgbase=python-attrs
|
||||
pkgname=("python2-${_realname}" "python3-${_realname}")
|
||||
pkgname=("python-${_realname}")
|
||||
pkgver=19.3.0
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Attributes without boilerplate."
|
||||
arch=('any')
|
||||
license=('MIT')
|
||||
url="https://attrs.readthedocs.org/"
|
||||
makedepends=('python2-setuptools' 'python3-setuptools')
|
||||
#checkdepends=('python2-pytest-runner' 'python3-pytest-runner'
|
||||
# 'python2-zope-interface'
|
||||
# 'python3-zope-interface'
|
||||
# 'python2-hypothesis'
|
||||
# 'python3-hypothesis')
|
||||
depends=('python')
|
||||
makedepends=('python3-setuptools')
|
||||
provides=("python3-${_realname}")
|
||||
replaces=("python3-${_realname}")
|
||||
conflicts=("python3-${_realname}")
|
||||
source=("https://pypi.io/packages/source/a/attrs/attrs-$pkgver.tar.gz")
|
||||
sha512sums=('b5b641e6732156d1454ed6c49e3a6b29200a8d3f1515fb59aeb85fcb5e9ab6a1d760904de45083cae5250e7bf1a7aa2c1f3ede217240a63f989ae4bb484f2511')
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
package_python3-attrs() {
|
||||
depends=('python3')
|
||||
package() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
cd "${srcdir}/python3-build-${CARCH}"
|
||||
python3 setup.py install --root="$pkgdir" --optimize=1 --skip-build
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
|
||||
package_python2-attrs() {
|
||||
depends=('python2')
|
||||
|
||||
cd "${srcdir}/python2-build-${CARCH}"
|
||||
python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user