vp-build/srcpkgs/python-cffi/template

46 lines
1.4 KiB
Bash

# Template file for 'python-cffi'
pkgname=python-cffi
version=1.15.0
revision=1
wrksrc="cffi-${version}"
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools libffi-devel"
makedepends="python-devel python3-devel libffi-devel"
depends="python-pycparser"
checkdepends="python-pytest python3-pytest python-pycparser python3-pycparser"
short_desc="C foreign function interface for Python2"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="MIT"
homepage="https://cffi.readthedocs.io/"
changelog="https://cffi.readthedocs.io/en/latest/whatsnew.html"
distfiles="${PYPI_SITE}/c/cffi/cffi-${version}.tar.gz"
checksum=920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954
do_check() {
# glibc libm.so is a GNU ld script that isn't properly handled
# on dlopen; libm symbols required in these tests are missing
local excludes='not sin'
excludes+=' and not test_dlopen'
excludes+=' and not test_function_typedef'
excludes+=' and not test_wraps_from_stdlib'
excludes+=' and not test_stdcall_only_on_windows'
PYTHONPATH="$(cd build-2.7/lib* && pwd)" \
python2 -m pytest c/ testing/ -x -k "$excludes"
PYTHONPATH="$(cd build-${py3_ver}/lib* && pwd)" \
python3 -m pytest c/ testing/ -x -k "$excludes"
}
post_install() {
vlicense LICENSE
}
python3-cffi_package() {
depends="python3-pycparser"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove usr/lib/python3*
vlicense LICENSE
}
}