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:
Christoph Reiter
2020-03-02 05:42:46 +01:00
committed by GitHub
parent 3dd8554f8e
commit 6e8e09c966
11 changed files with 118 additions and 368 deletions

View File

@@ -2,52 +2,30 @@
_realname=packaging
pkgbase="python-${_realname}"
pkgname=("python3-${_realname}" "python2-${_realname}")
pkgname=("python-${_realname}")
pkgver=19.2
pkgrel=1
pkgrel=2
pkgdesc="Core utilities for Python packages"
arch=('any')
url="https://github.com/pypa/packaging"
license=('Apache')
makedepends=('python3-setuptools' 'python2-setuptools' 'python3-pyparsing' 'python2-pyparsing' 'python2-six' 'python3-six' 'git')
checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-pretend' 'python2-pretend' 'python-coverage' 'python2-coverage')
depends=('python3-attrs' 'python3-pyparsing' 'python3-six')
makedepends=('python3-setuptools' 'git')
provides=("python3-${_realname}")
replaces=("python3-${_realname}")
conflicts=("python3-${_realname}")
source=("https://pypi.io/packages/source/p/packaging/packaging-${pkgver}.tar.gz")
sha256sums=('28b924174df7a2fa32c1953825ff29c61e2f5e082343165438812f00d3a7fc47')
prepare() {
cp -a packaging-${pkgver}{,-py2}
}
build() {
# Build python 3 module
cd "${srcdir}"/packaging-${pkgver}
python3 setup.py build
# Build python 2 module
cd "${srcdir}"/packaging-${pkgver}-py2
python2 setup.py build
}
check() {
# Check python3 module
package() {
cd "${srcdir}"/packaging-${pkgver}
python3 setup.py ptr
# Check python2 module
cd "${srcdir}"/packaging-${pkgver}-py2
python2 setup.py ptr
}
package_python3-packaging() {
depends=('python3-attrs' 'python3-pyparsing' 'python3-six')
cd "${srcdir}"/packaging-${pkgver}
python3 setup.py install --root "${pkgdir}"
}
package_python2-packaging() {
depends=('python2-attrs' 'python2-pyparsing' 'python2-six')
cd "${srcdir}"/packaging-${pkgver}-py2
python2 setup.py install --root "${pkgdir}"
}