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,44 +2,39 @@
|
||||
|
||||
_realname=setuptools-scm
|
||||
pkgbase="python-${_realname}"
|
||||
pkgname=("python3-${_realname}" "python2-${_realname}")
|
||||
pkgname=("python-${_realname}")
|
||||
pkgver=3.3.3
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Handles managing your python package versions in scm metadata"
|
||||
arch=('any')
|
||||
license=('MIT')
|
||||
url='https://github.com/pypa/setuptools_scm'
|
||||
makedepends=('python3-setuptools' 'python2-setuptools')
|
||||
depends=('python')
|
||||
makedepends=('python3-setuptools')
|
||||
provides=("python3-${_realname}")
|
||||
replaces=("python3-${_realname}")
|
||||
conflicts=("python3-${_realname}")
|
||||
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname/-/_}-${pkgver}.tar.gz"
|
||||
0001-python-setuptools-scm-3.1.0-fix-path-error.patch)
|
||||
sha256sums=('bd25e1fb5e4d603dcf490f1fde40fb4c595b357795674c3e5cb7f6217ab39ea5'
|
||||
'3a936600ebceccf2315fe76a79e90e4fdcfe2a936b442f6321b2d76a8e9902b1')
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}/${_realname/-/_}-${pkgver}
|
||||
patch -p1 -i ${srcdir}/0001-python-setuptools-scm-3.1.0-fix-path-error.patch
|
||||
cd ..
|
||||
cd "${srcdir}/${_realname/-/_}-${pkgver}"
|
||||
|
||||
for pver in {2,3}; do
|
||||
rm -rf python${pver}-build-${CARCH} | true
|
||||
cp -r "${_realname/-/_}-${pkgver}" "python${pver}-build-${CARCH}"
|
||||
done
|
||||
patch -p1 -i ${srcdir}/0001-python-setuptools-scm-3.1.0-fix-path-error.patch
|
||||
}
|
||||
|
||||
package_python3-setuptools-scm() {
|
||||
depends=('python3')
|
||||
build() {
|
||||
cd "${srcdir}/${_realname/-/_}-${pkgver}"
|
||||
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${_realname/-/_}-${pkgver}"
|
||||
|
||||
cd "${srcdir}"/python3-build-${CARCH}
|
||||
python3 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
|
||||
|
||||
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/python3-${_realname}/LICENSE"
|
||||
}
|
||||
|
||||
package_python2-setuptools-scm() {
|
||||
depends=('python2')
|
||||
|
||||
cd "${srcdir}"/python2-build-${CARCH}
|
||||
python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
|
||||
|
||||
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/python2-${_realname}/LICENSE"
|
||||
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user