mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 20:06:43 +02:00
community/py-sqlparse: fix conflict in /usr/bin between py2 and py3
This commit is contained in:
parent
dbee2cf6f3
commit
2b8264d60c
@ -8,6 +8,7 @@ pkgdesc="A non-validating SQL parser module for Python"
|
||||
url="https://sqlparse.readthedocs.io"
|
||||
arch="noarch"
|
||||
license="BSD"
|
||||
depends="py3-${pkgname#py-}"
|
||||
makedepends="python2-dev py-setuptools python3-dev"
|
||||
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
|
||||
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
|
||||
@ -20,7 +21,8 @@ build() {
|
||||
}
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir"
|
||||
mkdir -p "$pkgdir"/usr/bin
|
||||
ln -s sqlformat-3 "$pkgdir"/usr/bin/sqlformat
|
||||
}
|
||||
|
||||
_py2() {
|
||||
@ -34,12 +36,18 @@ _py3() {
|
||||
|
||||
_py() {
|
||||
local python="$1"
|
||||
local pyver="${1:6:1}"
|
||||
pkgdesc="$pkgdesc (for $python)"
|
||||
depends="$depends $python"
|
||||
install_if="$pkgname=$pkgver-r$pkgrel $python"
|
||||
|
||||
cd "$builddir"
|
||||
$python setup.py install --prefix=/usr --root="$subpkgdir"
|
||||
|
||||
# Add version suffix to executable files.
|
||||
local path; for path in "$subpkgdir"/usr/bin/*; do
|
||||
mv "$path" "$path-$pyver" || return 1
|
||||
done
|
||||
}
|
||||
|
||||
md5sums="ec1bab3438f358b6be72fc1912bbd648 sqlparse-0.2.2.tar.gz"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user