DEB pytde: Fix support for multiple Python3 installed in parallel.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/274/head
Slávek Banko 10 months ago
parent 72f1328d20
commit 639b8c3e80
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -1,11 +1,17 @@
# import the sipconfig.py for the normal or the debug build # import the sipconfig.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:
from pytdeconfig_d import * from pytdeconfig_d import *
from pytdeconfig_d import _pkg_config, _default_macros
except ImportError as msg: except ImportError as msg:
raise ImportError('No module named pytdeconfig; package python-trinity-dbg not installed') raise ImportError('No module named pytdeconfig; package python3-pytde-dbg not installed')
else: else:
from pytdeconfig_nd import * from pytdeconfig_nd import *
from pytdeconfig_nd import _pkg_config, _default_macros

@ -114,7 +114,7 @@ install-indep:
dh_install -i -X'\.diff$$' -X'\.in$$' -X'\.html$$' dh_install -i -X'\.diff$$' -X'\.in$$' -X'\.html$$'
for version in ${PYTHONS};\ for version in ${PYTHONS};\
do\ do\
pylib=$$(python$$version -c 'from distutils import sysconfig; print (sysconfig.get_python_lib())');\ pylib=$$(python$$version -c "import sysconfig; print(sysconfig.get_path('platstdlib'))");\
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;\

@ -1,11 +1,17 @@
# import the sipconfig.py for the normal or the debug build # import the sipconfig.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:
from pytdeconfig_d import * from pytdeconfig_d import *
from pytdeconfig_d import _pkg_config, _default_macros
except ImportError as msg: except ImportError as msg:
raise ImportError('No module named pytdeconfig; package python-trinity-dbg not installed') raise ImportError('No module named pytdeconfig; package python3-pytde-dbg not installed')
else: else:
from pytdeconfig_nd import * from pytdeconfig_nd import *
from pytdeconfig_nd import _pkg_config, _default_macros

@ -117,7 +117,7 @@ install-indep:
dh_install -i -X'\.diff$$' -X'\.in$$' -X'\.html$$' dh_install -i -X'\.diff$$' -X'\.in$$' -X'\.html$$'
for version in ${PYTHONS};\ for version in ${PYTHONS};\
do\ do\
pylib=$$(python$$version -c 'from distutils import sysconfig; print (sysconfig.get_python_lib())');\ pylib=$$(python$$version -c "import sysconfig; print(sysconfig.get_path('platstdlib'))");\
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;\

@ -1,11 +1,17 @@
# import the sipconfig.py for the normal or the debug build # import the sipconfig.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:
from pytdeconfig_d import * from pytdeconfig_d import *
from pytdeconfig_d import _pkg_config, _default_macros
except ImportError as msg: except ImportError as msg:
raise ImportError('No module named pytdeconfig; package python-trinity-dbg not installed') raise ImportError('No module named pytdeconfig; package python3-pytde-dbg not installed')
else: else:
from pytdeconfig_nd import * from pytdeconfig_nd import *
from pytdeconfig_nd import _pkg_config, _default_macros

@ -114,7 +114,7 @@ install-indep:
dh_install -i -X'\.diff$$' -X'\.in$$' -X'\.html$$' dh_install -i -X'\.diff$$' -X'\.in$$' -X'\.html$$'
for version in ${PYTHONS};\ for version in ${PYTHONS};\
do\ do\
pylib=$$(python$$version -c 'from distutils import sysconfig; print (sysconfig.get_python_lib())');\ pylib=$$(python$$version -c "import sysconfig; print(sysconfig.get_path('platstdlib'))");\
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;\

Loading…
Cancel
Save