From c46677f299951ea6257779b4c7139cc95b3af273 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Fri, 10 Aug 2018 03:48:34 +0200 Subject: [PATCH] xbps-src: do not hardcode python3 version --- srcpkgs/gdb/template | 6 +++--- srcpkgs/kdevelop-python/template | 3 +-- srcpkgs/kitty/template | 2 +- srcpkgs/python-hypothesis/template | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template index f12c1d9f1ef..f8bab16133f 100644 --- a/srcpkgs/gdb/template +++ b/srcpkgs/gdb/template @@ -19,9 +19,9 @@ distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.xz" checksum=97dcc3169bd430270fc29adb65145846a58c1b55cdbb73382a4a89307bdad03c if [ "${CROSS_BUILD}" ]; then - # Make python2.7 detection work in cross builds - CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/python3.6m" - CXXFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/python3.6m" + # Make python3.x detection work in cross builds + CFLAGS+=" -I${XBPS_CROSS_BASE}/${py3_inc}" + CXXFLAGS+=" -I${XBPS_CROSS_BASE}/${py3_inc}" fi # Package build options build_options="gdbserver static python" diff --git a/srcpkgs/kdevelop-python/template b/srcpkgs/kdevelop-python/template index a173a7bd583..1267ede1410 100644 --- a/srcpkgs/kdevelop-python/template +++ b/srcpkgs/kdevelop-python/template @@ -9,8 +9,7 @@ makedepends="python3-devel qt5-devel knewstuff-devel kitemmodels-devel threadweaver-devel ktexteditor-devel kcmutils-devel knotifyconfig-devel grantlee5-devel kdevelop-devel" pycompile_dirs="usr/share/kdevpythonsupport" -pycompile_version="3.6" -python_version="3" +pycompile_version="$py3_ver" short_desc="Python 3 language and Django project support for KDevelop" maintainer="yopito " license="LGPL-2" diff --git a/srcpkgs/kitty/template b/srcpkgs/kitty/template index 8a561922bc2..e21e6169478 100644 --- a/srcpkgs/kitty/template +++ b/srcpkgs/kitty/template @@ -21,7 +21,7 @@ fi do_build() { if [ -n "$CROSS_BUILD" ]; then - export CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/python3.6m" + export CFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}" sed -i "s|-fpie|-fpie ${CFLAGS}|g" setup.py fi case "$XBPS_TARGET_MACHINE" in diff --git a/srcpkgs/python-hypothesis/template b/srcpkgs/python-hypothesis/template index 0ef3c68f013..ae5fc9b0f06 100644 --- a/srcpkgs/python-hypothesis/template +++ b/srcpkgs/python-hypothesis/template @@ -28,7 +28,7 @@ do_check() { # Add variables that will be used by python to find the local # hypothesis build - PY3PATH="${PWD}/build-3.6/lib" + PY3PATH="${PWD}/build-${py3_ver}/lib" PY2PATH="${PWD}/build-2.7/lib" PYTHONPATH="${PY3PATH}" python3 -m pytest tests/cover