vp-build/srcpkgs/python-lz4/template

45 lines
1.1 KiB
Bash

# Template file for 'python-lz4'
pkgname=python-lz4
version=2.1.2
revision=1
wrksrc="lz4-${version}"
build_style=python-module
pycompile_module="lz4"
hostmakedepends="pkg-config python-setuptools python3-setuptools
python-pkgconfig python3-pkgconfig"
makedepends="python-devel python3-devel liblz4-devel"
depends="python-future"
checkdepends="python3-pytest python3-psutil"
short_desc="LZ4 bindings for Python2"
maintainer="Oliver Kiddle <okiddle@yahoo.co.uk>"
license="BSD-3-Clause"
homepage="https://github.com/python-lz4/python-lz4"
changelog="https://github.com/python-lz4/python-lz4/releases"
distfiles="${PYPI_SITE}/l/lz4/lz4-${version}.tar.gz"
checksum=ec265f7c3fc3df706e9579bde632ceeef9278858d7ae87c376a2954d11e9ea39
pre_build() {
sed -i setup.py \
-e '/setup_requires=/,+4d' \
-e '/use_scm_version=/,+2d' \
-e "/name=/ a\
version='${version}',"
}
do_check() {
python3 -m pytest
}
post_install() {
vlicense LICENSE
}
python3-lz4_package() {
pycompile_module="lz4"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove usr/lib/python3*
vlicense LICENSE
}
}