Python 2 Removal - Round 1 (#1866)
* gpgme: Drop the Python 2 package * dtc: Build with Python 3 The package in the repo is already build using Python 3, so this basically just fixes the dependency list. * Drop jhbuild-git This is a really old version and upstream doesn't target cygwin, so just drop it. * python-colorama: Drop Python 2 package * python-mako: Drop Python 2 package * python-pyalpm: Update to 0.9.1 and drop Python 2 package 0.8 did no longer build with the current pacman so I had to update as well to drop Python 2. * python-pygments: Drop Python 2 package * python2-pathlib: Remove package Unused * python2-scandir: Remove package Unused * python-beaker: Drop Python 2 package * python-markupsafe: Drop Python 2 package * python-mock: Drop Python 2 package * python2-funcsigs: Remove package Unused * python-nose: Drop Python 2 package Also adds a conflict with python2-nose because the man pages and main script got moved to the Python 3 package. * python2-unittest2: Remove package Unused * python2-traceback2: Remove package Unused * python2-linecache2: Remove package Unused * python-pbr: Drop Python 2 package
This commit is contained in:
@@ -2,47 +2,33 @@
|
||||
|
||||
_realname=beaker
|
||||
pkgbase="python-${_realname}"
|
||||
pkgname=("python3-${_realname}" "python2-${_realname}")
|
||||
pkgname=("python-${_realname}")
|
||||
pkgver=1.11.0
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Caching and sessions WSGI middleware for use with web applications and stand-alone Python scripts and applications"
|
||||
arch=('i686' 'x86_64')
|
||||
license=('PSF')
|
||||
url="http://beaker.groovie.org/"
|
||||
depends=("python2-setuptools" "python3-setuptools")
|
||||
depends=("python" "python3-setuptools")
|
||||
provides=("python3-${_realname}")
|
||||
conflicts=("python3-${_realname}")
|
||||
replaces=("python3-${_realname}")
|
||||
source=("${_realname}-${pkgver}.tar.gz"::https://github.com/bbangert/beaker/archive/${pkgver}.tar.gz)
|
||||
sha256sums=('5298f2d3be7b3ad8f299c9cc69b57907613412f397feb8c322896dbc857f5218')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"
|
||||
|
||||
cp -a ${_realname}-${pkgver}{,-python2}
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
}
|
||||
|
||||
build() {
|
||||
# Build python 3 module
|
||||
cd "${srcdir}"/${_realname}-${pkgver}
|
||||
sed -i "s#/usr/bin/python#/usr/bin/python3#" beaker/crypto/pbkdf2.py
|
||||
python3 setup.py build
|
||||
|
||||
# Build python 2 module
|
||||
cd ../${_realname}-${pkgver}-python2
|
||||
sed -i "s#/usr/bin/python#/usr/bin/python2#" beaker/crypto/pbkdf2.py
|
||||
python2 setup.py build
|
||||
}
|
||||
|
||||
package_python3-beaker() {
|
||||
depends=('python>=3.3')
|
||||
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
python3 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
|
||||
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python3-beaker/LICENSE"
|
||||
|
||||
/usr/bin/python setup.py build
|
||||
}
|
||||
|
||||
package_python2-beaker() {
|
||||
depends=('python2>=2.7' 'python2-funcsigs')
|
||||
package() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
cd "${srcdir}/${_realname}-${pkgver}-python2"
|
||||
python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
|
||||
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python2-beaker/LICENSE"
|
||||
/usr/bin/python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
|
||||
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python-beaker/LICENSE"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user