python-protobuf: compile C++ extension by default
This commit is contained in:
parent
04dcc8be41
commit
689c871abe
|
@ -1,11 +1,10 @@
|
||||||
# Template file for 'python-protobuf'
|
# Template file for 'python-protobuf'
|
||||||
pkgname=python-protobuf
|
pkgname=python-protobuf
|
||||||
version=3.13.0
|
version=3.13.0
|
||||||
revision=1
|
revision=2
|
||||||
archs=noarch
|
|
||||||
wrksrc="${pkgname#*-}-${version}"
|
wrksrc="${pkgname#*-}-${version}"
|
||||||
build_style=python-module
|
build_style=python-module
|
||||||
hostmakedepends="python-setuptools python3-setuptools"
|
hostmakedepends="python-setuptools python3-setuptools python-wheel python3-wheel"
|
||||||
depends="python-setuptools python-six"
|
depends="python-setuptools python-six"
|
||||||
short_desc="Python2 bindings for Google Protocol Buffers"
|
short_desc="Python2 bindings for Google Protocol Buffers"
|
||||||
maintainer="Andrew J. Hesford <ajh@sideband.org>"
|
maintainer="Andrew J. Hesford <ajh@sideband.org>"
|
||||||
|
@ -14,13 +13,22 @@ homepage="https://developers.google.com/protocol-buffers/"
|
||||||
distfiles="${PYPI_SITE}/p/protobuf/protobuf-${version}.tar.gz"
|
distfiles="${PYPI_SITE}/p/protobuf/protobuf-${version}.tar.gz"
|
||||||
checksum=6a82e0c8bb2bf58f606040cc5814e07715b2094caeba281e2e7d0b0e2e397db5
|
checksum=6a82e0c8bb2bf58f606040cc5814e07715b2094caeba281e2e7d0b0e2e397db5
|
||||||
|
|
||||||
|
build_options="cppext"
|
||||||
|
build_options_default="cppext"
|
||||||
|
desc_option_cppext="Build C++ extension to improve performance"
|
||||||
|
|
||||||
|
if [ "$build_option_cppext" ]; then
|
||||||
|
make_build_args="--cpp_implementation"
|
||||||
|
make_install_args="--cpp_implementation"
|
||||||
|
makedepends+=" python-devel python3-devel protobuf-devel"
|
||||||
|
fi
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
sed -n 1,29p google/protobuf/__init__.py >LICENSE
|
sed -n 1,29p google/protobuf/__init__.py >LICENSE
|
||||||
vlicense LICENSE
|
vlicense LICENSE
|
||||||
}
|
}
|
||||||
|
|
||||||
python3-protobuf_package() {
|
python3-protobuf_package() {
|
||||||
archs=noarch
|
|
||||||
depends="python3-setuptools python3-six"
|
depends="python3-setuptools python3-six"
|
||||||
short_desc="${short_desc/Python2/Python3}"
|
short_desc="${short_desc/Python2/Python3}"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
|
|
Loading…
Reference in New Issue