2013-03-06 08:55:39 +00:00
|
|
|
# Template file for 'python-Pygments'
|
|
|
|
pkgname=python-Pygments
|
|
|
|
version=1.6
|
2014-07-03 14:57:07 +00:00
|
|
|
revision=4
|
|
|
|
noarch=yes
|
2013-03-06 08:55:39 +00:00
|
|
|
wrksrc="Pygments-${version}"
|
2014-07-03 14:57:07 +00:00
|
|
|
python_versions="2.7 3.4"
|
2013-03-06 08:55:39 +00:00
|
|
|
build_style=python-module
|
2014-06-18 10:31:33 +00:00
|
|
|
hostmakedepends="python-setuptools python3.4-setuptools"
|
|
|
|
makedepends="python-devel python3.4-devel"
|
2014-07-03 14:57:07 +00:00
|
|
|
depends="python"
|
2014-01-01 15:10:11 +00:00
|
|
|
pycompile_module="pygments"
|
2014-06-06 08:56:23 +00:00
|
|
|
short_desc="Python2 syntax highlighter"
|
2013-03-06 08:55:39 +00:00
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
homepage="http://pygments.org/"
|
|
|
|
license="BSD"
|
|
|
|
distfiles="http://pypi.python.org/packages/source/P/Pygments/Pygments-${version}.tar.gz"
|
|
|
|
checksum=799ed4caf77516e54440806d8d9cd82a7607dfdf4e4fb643815171a4b5c921c0
|
2014-06-06 08:56:23 +00:00
|
|
|
|
2014-07-03 14:57:07 +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
|
|
|
|
sed -i 's,pygmentize ,pygmentize3 ,' 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}
|
|
|
|
}
|
|
|
|
|
2014-06-18 10:31:33 +00:00
|
|
|
python3.4-Pygments_package() {
|
2014-06-06 08:56:23 +00:00
|
|
|
noarch="yes"
|
2014-06-18 10:31:33 +00:00
|
|
|
depends="python3.4"
|
|
|
|
pycompile_version="3.4"
|
|
|
|
pycompile_module="pygments"
|
|
|
|
short_desc="${short_desc/Python2/Python3.4}"
|
2014-06-06 08:56:23 +00:00
|
|
|
pkg_install() {
|
2014-07-03 14:57:07 +00:00
|
|
|
vmove usr/bin/pygmentize3
|
|
|
|
vmove usr/lib/python3.4
|
2014-06-06 08:56:23 +00:00
|
|
|
}
|
|
|
|
}
|