void-packages/srcpkgs/python-sqlparse/template

58 lines
1.4 KiB
Bash
Raw Normal View History

2014-11-11 22:13:45 +00:00
# Template file for 'python-sqlparse'
pkgname=python-sqlparse
2014-12-01 21:44:14 +00:00
version=0.1.14
2014-11-11 22:13:45 +00:00
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"
2014-12-01 21:44:14 +00:00
checksum=e561e31853ab9f3634a1a2bd53035f9e47dfb203d56b33cc6569047ba087daf0
2014-11-11 22:13:45 +00:00
post_extract() {
cp -a ${wrksrc} /tmp/python2.7-build
cp -a ${wrksrc} /tmp/python3.4-build
mv /tmp/python{2.7,3.4}-build ${wrksrc}
}
pre_build() {
cd ${wrksrc}/python3.4-build
mv bin/sqlformat{,3}
sed -i 's,#!/usr/bin/env python,&3.4,' bin/sqlformat3
sed -i "s,'bin/sqlformat','bin/sqlformat3'," setup.py
}
do_build() {
cd ${wrksrc}/python2.7-build
python setup.py build
cd ${wrksrc}/python3.4-build
python3.4 setup.py build
}
do_install() {
cd ${wrksrc}/python2.7-build
python setup.py install --root=${DESTDIR}
cd ${wrksrc}/python3.4-build
python3.4 setup.py install --root=${DESTDIR}
}
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
}
}