53 lines
1.3 KiB
Bash
53 lines
1.3 KiB
Bash
# Template file for 'python-sqlparse'
|
|
pkgname=python-sqlparse
|
|
version=0.1.16
|
|
revision=1
|
|
noarch=yes
|
|
wrksrc="sqlparse-${version}"
|
|
python_versions="2.7 3.4"
|
|
hostmakedepends="python-setuptools python3.4-setuptools"
|
|
depends="python"
|
|
pycompile_module="sqlparse"
|
|
short_desc="Non-validating SQL parser for Python2"
|
|
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
|
homepage="https://github.com/andialbrecht/sqlparse"
|
|
license="BSD"
|
|
distfiles="${PYPI_SITE}/s/sqlparse/sqlparse-${version}.tar.gz"
|
|
checksum=678c6c36ca4b01405177da8b84eecf92ec92c9f6c762396c965bb5d305f20f81
|
|
|
|
pre_build() {
|
|
cp -a ${wrksrc} /tmp/${pkgname#*-}-2.7
|
|
cp -a ${wrksrc} /tmp/${pkgname#*-}-3.4
|
|
mv /tmp/${pkgname#*-}-{2.7,3.4} ${wrksrc}
|
|
|
|
cd ${pkgname#*-}-3.4
|
|
mv bin/sqlformat{,3}
|
|
sed -i 's,\(bin/sqlformat\),\13,' setup.py
|
|
}
|
|
do_build() {
|
|
for pyver in $python_versions; do
|
|
cd ${wrksrc}/${pkgname#*-}-${pyver}
|
|
python${pyver} setup.py build
|
|
done
|
|
}
|
|
do_install() {
|
|
for pyver in $python_versions; do
|
|
cd ${wrksrc}/${pkgname#*-}-${pyver}
|
|
python${pyver} setup.py install --root=${DESTDIR}
|
|
done
|
|
vlicense COPYING LICENSE
|
|
}
|
|
|
|
python3.4-sqlparse_package() {
|
|
noarch=yes
|
|
depends="python3.4"
|
|
pycompile_version="3.4"
|
|
pycompile_module="sqlparse"
|
|
short_desc="${short_desc/Python2/Python3.4}"
|
|
pkg_install() {
|
|
vmove usr/bin/sqlformat3
|
|
vmove usr/lib/python3.4
|
|
vlicense COPYING LICENSE
|
|
}
|
|
}
|