DEB pytde: Build for all installed pythons, instead of just default.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/202/head
Slávek Banko 2 years ago
parent 808a6a0f0b
commit d4a1c19304
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -26,6 +26,14 @@ export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DH_OPTIONS export DH_OPTIONS
-include /usr/share/python3/python.mk
ifeq (,$(py_sitename))
py_sitename = site-packages
py_libdir = /usr/lib/python$(subst python,,$(1))/site-packages
py_sitename_sh = $(py_sitename)
py_libdir_sh = $(py_libdir)
endif
export TQTDIR=/usr/share/tqt3 export TQTDIR=/usr/share/tqt3
export QMAKESPEC=$(TQTDIR)/mkspecs/linux-g++ export QMAKESPEC=$(TQTDIR)/mkspecs/linux-g++
@ -37,8 +45,7 @@ else
CXXFLAGS += -O2 CXXFLAGS += -O2
endif endif
PYTHONS := $(shell py3versions -vd) PYTHONS := $(shell py3versions -vr)
DBG_PYTHONS := $(shell py3versions -vd)
GCCVER := $(shell gcc --version | sed -n '/^gcc (GCC)/s/.*(GCC) \(...\).*/\1/p') GCCVER := $(shell gcc --version | sed -n '/^gcc (GCC)/s/.*(GCC) \(...\).*/\1/p')
ifneq (,$(filter $(GCCVER),4.2 4.3)) ifneq (,$(filter $(GCCVER),4.2 4.3))
@ -49,13 +56,14 @@ endif
.PRECIOUS: build-%/configure-stamp dbg-build-%/configure-stamp .PRECIOUS: build-%/configure-stamp dbg-build-%/configure-stamp
configure: $(PYTHONS:%=build-%/configure-stamp) $(DBG_PYTHONS:%=dbg-build-%/configure-stamp) configure: $(PYTHONS:%=build-%/configure-stamp) $(PYTHONS:%=dbg-build-%/configure-stamp)
build-%/configure-stamp: build-%/configure-stamp:
dh_testdir dh_testdir
mkdir -p build-$* mkdir -p build-$*
cd build-$* && python$* ../configure.py \ cd build-$* && python$* ../configure.py \
-c -u -k /opt/trinity -o /opt/trinity/include -n /opt/trinity/lib \ -c -u -k /opt/trinity -o /opt/trinity/include -n /opt/trinity/lib \
-d /usr/lib/python$*/$(call py_sitename,$*) \
-v /usr/share/sip-tqt/trinity -j $(SPLIT) -v /usr/share/sip-tqt/trinity -j $(SPLIT)
touch $@ touch $@
@ -64,10 +72,11 @@ dbg-build-%/configure-stamp:
mkdir -p dbg-build-$* mkdir -p dbg-build-$*
cd dbg-build-$* && python$*-dbg ../configure.py \ cd dbg-build-$* && python$*-dbg ../configure.py \
-c -u -k /opt/trinity -o /opt/trinity/include -n /opt/trinity/lib \ -c -u -k /opt/trinity -o /opt/trinity/include -n /opt/trinity/lib \
-d /usr/lib/python$*/$(call py_sitename,$*) \
-v /usr/share/sip-tqt/trinity -j $(SPLIT) -v /usr/share/sip-tqt/trinity -j $(SPLIT)
touch $@ touch $@
build build-arch: $(PYTHONS:%=build-%/build-stamp) $(DBG_PYTHONS:%=dbg-build-%/build-stamp) build build-arch: $(PYTHONS:%=build-%/build-stamp) $(PYTHONS:%=dbg-build-%/build-stamp)
build-indep: build-indep:
build-%/build-stamp: build-%/configure-stamp build-%/build-stamp: build-%/configure-stamp
@ -84,7 +93,7 @@ clean:
dh_testdir dh_testdir
dh_testroot dh_testroot
rm -f *-stamp rm -f *-stamp
rm -rf $(PYTHONS:%=build-%) $(DBG_PYTHONS:%=dbg-build-%) rm -rf $(PYTHONS:%=build-%) $(PYTHONS:%=dbg-build-%)
# remove autogenerated *mod.sip files and clean up sources # remove autogenerated *mod.sip files and clean up sources
for moddir in sip/*;\ for moddir in sip/*;\
@ -109,10 +118,6 @@ install-indep:
mkdir -p debian/pytde-dev/$$pylib;\ mkdir -p debian/pytde-dev/$$pylib;\
install -m 644 -o root -g root debian/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig.py;\ install -m 644 -o root -g root debian/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig.py;\
install -m 644 -o root -g root build-$$version/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig_nd.py;\ install -m 644 -o root -g root build-$$version/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig_nd.py;\
done
for version in ${DBG_PYTHONS};\
do\
pylib=$$(python$$version -c 'from distutils import sysconfig; print (sysconfig.get_python_lib())');\
install -m 644 -o root -g root dbg-build-$$version/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig_d.py;\ install -m 644 -o root -g root dbg-build-$$version/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig_d.py;\
done done
@ -125,10 +130,6 @@ install-arch:
for version in ${PYTHONS};\ for version in ${PYTHONS};\
do\ do\
$(MAKE) -C build-$$version install DESTDIR=$(CURDIR)/debian/tmp;\ $(MAKE) -C build-$$version install DESTDIR=$(CURDIR)/debian/tmp;\
done
set -e; \
for version in ${DBG_PYTHONS}; do \
$(MAKE) -C dbg-build-$$version install DESTDIR=$(CURDIR)/debian/python3-pytde-dbg;\ $(MAKE) -C dbg-build-$$version install DESTDIR=$(CURDIR)/debian/python3-pytde-dbg;\
done done

@ -25,6 +25,15 @@ export DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DH_OPTIONS export DH_OPTIONS
-include /usr/share/python3/python.mk
ifeq (,$(py_sitename))
py_sitename = site-packages
py_libdir = /usr/lib/python$(subst python,,$(1))/site-packages
py_sitename_sh = $(py_sitename)
py_libdir_sh = $(py_libdir)
endif
export TQTDIR=/usr/share/tqt3 export TQTDIR=/usr/share/tqt3
export QMAKESPEC=$(TQTDIR)/mkspecs/dilos-g++ export QMAKESPEC=$(TQTDIR)/mkspecs/dilos-g++
@ -36,8 +45,7 @@ else
CXXFLAGS += -O2 CXXFLAGS += -O2
endif endif
PYTHONS := $(shell py3versions -vd) PYTHONS := $(shell py3versions -vr)
#DBG_PYTHONS := $(shell py3versions -vd)
GCCVER := $(shell gcc --version | sed -n '/^gcc (GCC)/s/.*(GCC) \(...\).*/\1/p') GCCVER := $(shell gcc --version | sed -n '/^gcc (GCC)/s/.*(GCC) \(...\).*/\1/p')
ifneq (,$(filter $(GCCVER),4.2 4.3)) ifneq (,$(filter $(GCCVER),4.2 4.3))
@ -50,13 +58,14 @@ endif
# dbg-build-%/configure-stamp # dbg-build-%/configure-stamp
configure: $(PYTHONS:%=build-%/configure-stamp) configure: $(PYTHONS:%=build-%/configure-stamp)
# $(DBG_PYTHONS:%=dbg-build-%/configure-stamp) # $(PYTHONS:%=dbg-build-%/configure-stamp)
build-%/configure-stamp: build-%/configure-stamp:
dh_testdir dh_testdir
mkdir -p build-$* mkdir -p build-$*
cd build-$* && python$* ../configure.py \ cd build-$* && python$* ../configure.py \
-c -u -k /usr -o /usr/include -n /usr/lib/$(DEB_HOST_MULTIARCH) \ -c -u -k /usr -o /usr/include -n /usr/lib/$(DEB_HOST_MULTIARCH) \
-d /usr/lib/python$*/$(call py_sitename,$*) \
-v /usr/share/sip-tqt/trinity -j $(SPLIT) -v /usr/share/sip-tqt/trinity -j $(SPLIT)
touch $@ touch $@
@ -65,11 +74,12 @@ dbg-build-%/configure-stamp:
mkdir -p dbg-build-$* mkdir -p dbg-build-$*
cd dbg-build-$* && python$*-dbg ../configure.py \ cd dbg-build-$* && python$*-dbg ../configure.py \
-c -u -k /usr -o /usr/include -n /usr/lib \ -c -u -k /usr -o /usr/include -n /usr/lib \
-d /usr/lib/python$*/$(call py_sitename,$*) \
-v /usr/share/sip-tqt/trinity -j $(SPLIT) -v /usr/share/sip-tqt/trinity -j $(SPLIT)
touch $@ touch $@
build build-arch: $(PYTHONS:%=build-%/build-stamp) build build-arch: $(PYTHONS:%=build-%/build-stamp)
# $(DBG_PYTHONS:%=dbg-build-%/build-stamp) # $(PYTHONS:%=dbg-build-%/build-stamp)
build-indep: build-indep:
build-%/build-stamp: build-%/configure-stamp build-%/build-stamp: build-%/configure-stamp
@ -86,7 +96,7 @@ clean:
dh_testdir dh_testdir
dh_testroot dh_testroot
rm -f *-stamp rm -f *-stamp
rm -rf $(PYTHONS:%=build-%) $(DBG_PYTHONS:%=dbg-build-%) rm -rf $(PYTHONS:%=build-%) $(PYTHONS:%=dbg-build-%)
# remove autogenerated *mod.sip files and clean up sources # remove autogenerated *mod.sip files and clean up sources
for moddir in sip/*;\ for moddir in sip/*;\
@ -112,11 +122,7 @@ install-indep:
install -m 644 -o root -g root debian/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig.py;\ install -m 644 -o root -g root debian/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig.py;\
install -m 644 -o root -g root build-$$version/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig_nd.py;\ install -m 644 -o root -g root build-$$version/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig_nd.py;\
done done
# for version in ${DBG_PYTHONS};\
# do\
# pylib=$$(python$$version -c 'from distutils import sysconfig; print (sysconfig.get_python_lib())');\
# install -m 644 -o root -g root dbg-build-$$version/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig_d.py;\ # install -m 644 -o root -g root dbg-build-$$version/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig_d.py;\
# done
install-arch: install-arch:
dh_testdir dh_testdir
@ -128,11 +134,7 @@ install-arch:
do\ do\
$(MAKE) -C build-$$version install DESTDIR=$(CURDIR)/debian/tmp;\ $(MAKE) -C build-$$version install DESTDIR=$(CURDIR)/debian/tmp;\
done done
# set -e; \
# for version in ${DBG_PYTHONS}; do \
# $(MAKE) -C dbg-build-$$version install DESTDIR=$(CURDIR)/debian/python3-pytde-dbg;\ # $(MAKE) -C dbg-build-$$version install DESTDIR=$(CURDIR)/debian/python3-pytde-dbg;\
# done
dh_install -a --sourcedir=$(CURDIR)/debian/tmp dh_install -a --sourcedir=$(CURDIR)/debian/tmp

@ -26,6 +26,14 @@ export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DH_OPTIONS export DH_OPTIONS
-include /usr/share/python3/python.mk
ifeq (,$(py_sitename))
py_sitename = site-packages
py_libdir = /usr/lib/python$(subst python,,$(1))/site-packages
py_sitename_sh = $(py_sitename)
py_libdir_sh = $(py_libdir)
endif
export TQTDIR=/usr/share/tqt3 export TQTDIR=/usr/share/tqt3
export QMAKESPEC=$(TQTDIR)/mkspecs/linux-g++ export QMAKESPEC=$(TQTDIR)/mkspecs/linux-g++
@ -37,8 +45,7 @@ else
CXXFLAGS += -O2 CXXFLAGS += -O2
endif endif
PYTHONS := $(shell py3versions -vd) PYTHONS := $(shell py3versions -vr)
DBG_PYTHONS := $(shell py3versions -vd)
GCCVER := $(shell gcc --version | sed -n '/^gcc (GCC)/s/.*(GCC) \(...\).*/\1/p') GCCVER := $(shell gcc --version | sed -n '/^gcc (GCC)/s/.*(GCC) \(...\).*/\1/p')
ifneq (,$(filter $(GCCVER),4.2 4.3)) ifneq (,$(filter $(GCCVER),4.2 4.3))
@ -49,13 +56,14 @@ endif
.PRECIOUS: build-%/configure-stamp dbg-build-%/configure-stamp .PRECIOUS: build-%/configure-stamp dbg-build-%/configure-stamp
configure: $(PYTHONS:%=build-%/configure-stamp) $(DBG_PYTHONS:%=dbg-build-%/configure-stamp) configure: $(PYTHONS:%=build-%/configure-stamp) $(PYTHONS:%=dbg-build-%/configure-stamp)
build-%/configure-stamp: build-%/configure-stamp:
dh_testdir dh_testdir
mkdir -p build-$* mkdir -p build-$*
cd build-$* && python$* ../configure.py \ cd build-$* && python$* ../configure.py \
-c -u -k /opt/trinity -o /opt/trinity/include -n /opt/trinity/lib \ -c -u -k /opt/trinity -o /opt/trinity/include -n /opt/trinity/lib \
-d /usr/lib/python$*/$(call py_sitename,$*) \
-v /usr/share/sip-tqt/trinity -j $(SPLIT) -v /usr/share/sip-tqt/trinity -j $(SPLIT)
touch $@ touch $@
@ -64,10 +72,11 @@ dbg-build-%/configure-stamp:
mkdir -p dbg-build-$* mkdir -p dbg-build-$*
cd dbg-build-$* && python$*-dbg ../configure.py \ cd dbg-build-$* && python$*-dbg ../configure.py \
-c -u -k /opt/trinity -o /opt/trinity/include -n /opt/trinity/lib \ -c -u -k /opt/trinity -o /opt/trinity/include -n /opt/trinity/lib \
-d /usr/lib/python$*/$(call py_sitename,$*) \
-v /usr/share/sip-tqt/trinity -j $(SPLIT) -v /usr/share/sip-tqt/trinity -j $(SPLIT)
touch $@ touch $@
build build-arch: $(PYTHONS:%=build-%/build-stamp) $(DBG_PYTHONS:%=dbg-build-%/build-stamp) build build-arch: $(PYTHONS:%=build-%/build-stamp) $(PYTHONS:%=dbg-build-%/build-stamp)
build-indep: build-indep:
build-%/build-stamp: build-%/configure-stamp build-%/build-stamp: build-%/configure-stamp
@ -84,7 +93,7 @@ clean:
dh_testdir dh_testdir
dh_testroot dh_testroot
rm -f *-stamp rm -f *-stamp
rm -rf $(PYTHONS:%=build-%) $(DBG_PYTHONS:%=dbg-build-%) rm -rf $(PYTHONS:%=build-%) $(PYTHONS:%=dbg-build-%)
# remove autogenerated *mod.sip files and clean up sources # remove autogenerated *mod.sip files and clean up sources
for moddir in sip/*;\ for moddir in sip/*;\
@ -109,10 +118,6 @@ install-indep:
mkdir -p debian/pytde-dev/$$pylib;\ mkdir -p debian/pytde-dev/$$pylib;\
install -m 644 -o root -g root debian/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig.py;\ install -m 644 -o root -g root debian/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig.py;\
install -m 644 -o root -g root build-$$version/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig_nd.py;\ install -m 644 -o root -g root build-$$version/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig_nd.py;\
done
for version in ${DBG_PYTHONS};\
do\
pylib=$$(python$$version -c 'from distutils import sysconfig; print (sysconfig.get_python_lib())');\
install -m 644 -o root -g root dbg-build-$$version/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig_d.py;\ install -m 644 -o root -g root dbg-build-$$version/pytdeconfig.py debian/pytde-dev/$$pylib/pytdeconfig_d.py;\
done done
@ -125,10 +130,6 @@ install-arch:
for version in ${PYTHONS};\ for version in ${PYTHONS};\
do\ do\
$(MAKE) -C build-$$version install DESTDIR=$(CURDIR)/debian/tmp;\ $(MAKE) -C build-$$version install DESTDIR=$(CURDIR)/debian/tmp;\
done
set -e; \
for version in ${DBG_PYTHONS}; do \
$(MAKE) -C dbg-build-$$version install DESTDIR=$(CURDIR)/debian/python3-pytde-dbg;\ $(MAKE) -C dbg-build-$$version install DESTDIR=$(CURDIR)/debian/python3-pytde-dbg;\
done done

Loading…
Cancel
Save