void-packages/srcpkgs/python-Cython/template

45 lines
1.1 KiB
Bash

# Template file for 'python-Cython'
pkgname=python-Cython
version=0.23
revision=1
wrksrc="Cython-${version}"
build_style=python-module
python_versions="2.7 3.4"
hostmakedepends="python-devel python3.4-devel"
makedepends="${hostmakedepends}"
pycompile_module="Cython pyximport cython.py"
short_desc="C-Extensions for Python2"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="http://cython.org"
license="Apache-2.0"
distfiles="http://www.cython.org/release/Cython-${version}.tar.gz"
checksum=9fd01e8301c24fb3ba0411ad8eb16f5d9f9f8e66b1281fbe7aba2a9bd9d343dc
pre_build() {
# Fix non-executable scripts
sed -i '/^#!.*python$/d' Cython/{Build/Cythonize,Debugger/{libpython,Cygdb}}.py cython.py
}
# Skip build phase, otherwise Cython gets confused when cross compiling
do_build() {
:
}
post_install() {
rm -f ${DESTDIR}/usr/bin/*
for f in build-2.7/scripts-2.7/*; do
vbin ${f}
done
for f in build-3.4/scripts-3.4/*; do
vbin ${f}{,3}
done
}
python3.4-Cython_package() {
pycompile_version="3.4"
pycompile_module="Cython pyximport cython.py"
short_desc="${short_desc/Python2/Python3.4}"
pkg_install() {
vmove usr/bin/*3
vmove usr/lib/python3.4
}
}