DEB sip4-tqt: Prefer dist-packages folder for a particular version of Python before shared.

Use sysconfig instead of distutil to detect paths.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/271/head
Slávek Banko 11 months ago
parent 0447d3dc69
commit 3e3beab0c7
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -115,11 +115,11 @@ install-arch-3.%:
install -m 644 -o root -g root debian/sip_tqt_config_py3.py debian/python3-sip-tqt/usr/lib/python3.$*/dist-packages/sip_tqt_config.py install -m 644 -o root -g root debian/sip_tqt_config_py3.py debian/python3-sip-tqt/usr/lib/python3.$*/dist-packages/sip_tqt_config.py
install -m 644 -o root -g root build-3.$*/sip_tqt_config.py debian/python3-sip-tqt/usr/lib/python3.$*/dist-packages/sip_tqt_config_nd.py install -m 644 -o root -g root build-3.$*/sip_tqt_config.py debian/python3-sip-tqt/usr/lib/python3.$*/dist-packages/sip_tqt_config_nd.py
install -m 644 -o root -g root dbg-build-3.$*/sip_tqt_config.py debian/python3-sip-tqt-dbg/usr/lib/python3.$*/dist-packages/sip_tqt_config_d.py install -m 644 -o root -g root dbg-build-3.$*/sip_tqt_config.py debian/python3-sip-tqt-dbg/usr/lib/python3.$*/dist-packages/sip_tqt_config_d.py
mkdir -p debian/python3-sip-tqt-dev$$(python3.$* -c 'from distutils import sysconfig; print (sysconfig.get_python_inc())') mkdir -p debian/python3-sip-tqt-dev$$(python3.$* -c 'import sysconfig; print (sysconfig.get_path("include"))')
install -m 644 -o root -g root siplib/sip-tqt.h debian/python3-sip-tqt-dev$$(python3.$* -c 'from distutils import sysconfig; print (sysconfig.get_python_inc())')/ install -m 644 -o root -g root siplib/sip-tqt.h debian/python3-sip-tqt-dev$$(python3.$* -c 'import sysconfig; print (sysconfig.get_path("include"))')/
mkdir -p debian/python3-sip-tqt-dev/$$(python3.$*-dbg -c 'from distutils import sysconfig; print (sysconfig.get_python_inc())') mkdir -p debian/python3-sip-tqt-dev/$$(python3.$*-dbg -c 'import sysconfig; print (sysconfig.get_path("include"))')
ln -s ../$$(python3.$* -c 'from distutils import sysconfig; print (sysconfig.get_python_inc())' | xargs basename)/sip-tqt.h \ ln -s ../$$(python3.$* -c 'import sysconfig; print (sysconfig.get_path("include"))' | xargs basename)/sip-tqt.h \
debian/python3-sip-tqt-dev/$$(python3.$*-dbg -c 'from distutils import sysconfig; print (sysconfig.get_python_inc())')/sip-tqt.h debian/python3-sip-tqt-dev/$$(python3.$*-dbg -c 'import sysconfig; print (sysconfig.get_path("include"))')/sip-tqt.h
mkdir -p debian/python3-sip-tqt-dev/usr/lib/python3.$*/dist-packages mkdir -p debian/python3-sip-tqt-dev/usr/lib/python3.$*/dist-packages
install -m 644 -o root -g root sip_tqt_distutils.py debian/python3-sip-tqt-dev/usr/lib/python3.$*/dist-packages install -m 644 -o root -g root sip_tqt_distutils.py debian/python3-sip-tqt-dev/usr/lib/python3.$*/dist-packages

@ -1,6 +1,10 @@
# import the sip_tqt_config.py for the normal or the debug build # import the sip_tqt_config.py for the normal or the debug build
import os
import sys import sys
import sysconfig
sys.path.insert(0, os.path.join(sysconfig.get_path('platstdlib'), 'dist-packages'))
if 'd' in sys.abiflags: if 'd' in sys.abiflags:
try: try:

@ -119,11 +119,11 @@ install-arch-3.%:
install -m 644 -o root -g root debian/sip_tqt_config_py3.py debian/python3-sip-tqt/usr/lib/python3.$*/dist-packages/sip_tqt_config.py install -m 644 -o root -g root debian/sip_tqt_config_py3.py debian/python3-sip-tqt/usr/lib/python3.$*/dist-packages/sip_tqt_config.py
install -m 644 -o root -g root build-3.$*/sip_tqt_config.py debian/python3-sip-tqt/usr/lib/python3.$*/dist-packages/sip_tqt_config_nd.py install -m 644 -o root -g root build-3.$*/sip_tqt_config.py debian/python3-sip-tqt/usr/lib/python3.$*/dist-packages/sip_tqt_config_nd.py
# install -m 644 -o root -g root dbg-build-3.$*/sip_tqt_config.py debian/python3-sip-tqt-dbg/usr/lib/python3.$*/dist-packages/sip_tqt_config_d.py # install -m 644 -o root -g root dbg-build-3.$*/sip_tqt_config.py debian/python3-sip-tqt-dbg/usr/lib/python3.$*/dist-packages/sip_tqt_config_d.py
mkdir -p debian/python3-sip-tqt-dev$$(python3.$* -c 'from distutils import sysconfig; print (sysconfig.get_python_inc())') mkdir -p debian/python3-sip-tqt-dev$$(python3.$* -c 'import sysconfig; print (sysconfig.get_path("include"))')
install -m 644 -o root -g root siplib/sip-tqt.h debian/python3-sip-tqt-dev$$(python3.$* -c 'from distutils import sysconfig; print (sysconfig.get_python_inc())')/ install -m 644 -o root -g root siplib/sip-tqt.h debian/python3-sip-tqt-dev$$(python3.$* -c 'import sysconfig; print (sysconfig.get_path("include"))')/
# mkdir -p debian/python3-sip-tqt-dev/$$(python3.$*-dbg -c 'from distutils import sysconfig; print (sysconfig.get_python_inc())') # mkdir -p debian/python3-sip-tqt-dev/$$(python3.$*-dbg -c 'import sysconfig; print (sysconfig.get_path("include"))')
# ln -s ../$$(python3.$* -c 'from distutils import sysconfig; print (sysconfig.get_python_inc())' | xargs basename)/sip-tqt.h \ # ln -s ../$$(python3.$* -c 'import sysconfig; print (sysconfig.get_path("include"))' | xargs basename)/sip-tqt.h \
# debian/python3-sip-tqt-dev/$$(python3.$*-dbg -c 'from distutils import sysconfig; print (sysconfig.get_python_inc())')/sip-tqt.h # debian/python3-sip-tqt-dev/$$(python3.$*-dbg -c 'import sysconfig; print (sysconfig.get_path("include"))')/sip-tqt.h
mkdir -p debian/python3-sip-tqt-dev/usr/lib/python3.$*/dist-packages mkdir -p debian/python3-sip-tqt-dev/usr/lib/python3.$*/dist-packages
install -m 644 -o root -g root sip_tqt_distutils.py debian/python3-sip-tqt-dev/usr/lib/python3.$*/dist-packages install -m 644 -o root -g root sip_tqt_distutils.py debian/python3-sip-tqt-dev/usr/lib/python3.$*/dist-packages

@ -1,6 +1,10 @@
# import the sip_tqt_config.py for the normal or the debug build # import the sip_tqt_config.py for the normal or the debug build
import os
import sys import sys
import sysconfig
sys.path.insert(0, os.path.join(sysconfig.get_path('platstdlib'), 'dist-packages'))
if 'd' in sys.abiflags: if 'd' in sys.abiflags:
try: try:

@ -115,11 +115,11 @@ install-arch-3.%:
install -m 644 -o root -g root debian/sip_tqt_config_py3.py debian/python3-sip-tqt/usr/lib/python3.$*/dist-packages/sip_tqt_config.py install -m 644 -o root -g root debian/sip_tqt_config_py3.py debian/python3-sip-tqt/usr/lib/python3.$*/dist-packages/sip_tqt_config.py
install -m 644 -o root -g root build-3.$*/sip_tqt_config.py debian/python3-sip-tqt/usr/lib/python3.$*/dist-packages/sip_tqt_config_nd.py install -m 644 -o root -g root build-3.$*/sip_tqt_config.py debian/python3-sip-tqt/usr/lib/python3.$*/dist-packages/sip_tqt_config_nd.py
install -m 644 -o root -g root dbg-build-3.$*/sip_tqt_config.py debian/python3-sip-tqt-dbg/usr/lib/python3.$*/dist-packages/sip_tqt_config_d.py install -m 644 -o root -g root dbg-build-3.$*/sip_tqt_config.py debian/python3-sip-tqt-dbg/usr/lib/python3.$*/dist-packages/sip_tqt_config_d.py
mkdir -p debian/python3-sip-tqt-dev$$(python3.$* -c 'from distutils import sysconfig; print (sysconfig.get_python_inc())') mkdir -p debian/python3-sip-tqt-dev$$(python3.$* -c 'import sysconfig; print (sysconfig.get_path("include"))')
install -m 644 -o root -g root siplib/sip-tqt.h debian/python3-sip-tqt-dev$$(python3.$* -c 'from distutils import sysconfig; print (sysconfig.get_python_inc())')/ install -m 644 -o root -g root siplib/sip-tqt.h debian/python3-sip-tqt-dev$$(python3.$* -c 'import sysconfig; print (sysconfig.get_path("include"))')/
mkdir -p debian/python3-sip-tqt-dev/$$(python3.$*-dbg -c 'from distutils import sysconfig; print (sysconfig.get_python_inc())') mkdir -p debian/python3-sip-tqt-dev/$$(python3.$*-dbg -c 'import sysconfig; print (sysconfig.get_path("include"))')
ln -s ../$$(python3.$* -c 'from distutils import sysconfig; print (sysconfig.get_python_inc())' | xargs basename)/sip-tqt.h \ ln -s ../$$(python3.$* -c 'import sysconfig; print (sysconfig.get_path("include"))' | xargs basename)/sip-tqt.h \
debian/python3-sip-tqt-dev/$$(python3.$*-dbg -c 'from distutils import sysconfig; print (sysconfig.get_python_inc())')/sip-tqt.h debian/python3-sip-tqt-dev/$$(python3.$*-dbg -c 'import sysconfig; print (sysconfig.get_path("include"))')/sip-tqt.h
mkdir -p debian/python3-sip-tqt-dev/usr/lib/python3.$*/dist-packages mkdir -p debian/python3-sip-tqt-dev/usr/lib/python3.$*/dist-packages
install -m 644 -o root -g root sip_tqt_distutils.py debian/python3-sip-tqt-dev/usr/lib/python3.$*/dist-packages install -m 644 -o root -g root sip_tqt_distutils.py debian/python3-sip-tqt-dev/usr/lib/python3.$*/dist-packages

@ -1,6 +1,10 @@
# import the sip_tqt_config.py for the normal or the debug build # import the sip_tqt_config.py for the normal or the debug build
import os
import sys import sys
import sysconfig
sys.path.insert(0, os.path.join(sysconfig.get_path('platstdlib'), 'dist-packages'))
if 'd' in sys.abiflags: if 'd' in sys.abiflags:
try: try:

Loading…
Cancel
Save