Fix the building of debug python package if the debian/ubuntu system supports it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@47870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -1,6 +1,8 @@
|
||||
wxwidgets2.8 (2.8.4.2-0) unstable; urgency=low
|
||||
|
||||
* Pacakges now support all Python versions in `pyversions -r`
|
||||
* If the system Python supports it a debug wxPython package is built that
|
||||
can be installed side-by-side with the non-debug package
|
||||
* Added colour normalization to PNM image handler (Ray Johnston).
|
||||
* Fixed selecting part of word from right to left in wxHTML (Michael Hieke).
|
||||
* Selecting text in wxHTML with character precision was made easier, it's
|
||||
|
54
debian/rules
vendored
54
debian/rules
vendored
@@ -29,16 +29,37 @@ endif
|
||||
|
||||
|
||||
# Find the python version(s) to build for
|
||||
PYVERS := $(shell pyversions -vr || pyversions -vs)
|
||||
PYVERS := $(shell pyversions -vr 2> /dev/null || pyversions -vs 2> /dev/null)
|
||||
ifeq ($(strip $(PYVERS)),)
|
||||
PYVERS := $(shell python -c 'import sys; print sys.version[:3]')
|
||||
NO_PYCENTRAL = 1
|
||||
PY_BUILD_DEPS = python$(PYVERS), python$(PYVERS)-dbg, python$(PYVERS)-dev
|
||||
else
|
||||
DEB_PYTHON_SYSTEM=pycentral
|
||||
PY_BUILD_DEPS = python-all, python-all-dbg, python-all-dev, python-central
|
||||
PY_BUILD_DEPS = python-all, python-all-dev, python-dbg, python-central
|
||||
endif
|
||||
|
||||
|
||||
# The python-dbg on Dapper had a configuration bug that makes trying
|
||||
# to use distutils with it error out. The problem seems to be that
|
||||
# the exec_prefix was set wrong. Try to detect that so we can skip
|
||||
# building the py -dbg pacakge there.
|
||||
ifeq (/usr, $(shell python-dbg -c "import sys;print sys.exec_prefix" 2> /dev/null))
|
||||
|
||||
# Also check if this python will put the _d on the end of the
|
||||
# extension modules as this is needed to allow them to be installed
|
||||
# side-by-side with the non-debug package. Ubuntu appears to be
|
||||
# handling this by adding a sys.pydebug attribute that is checked for
|
||||
# in distutils to know which config dir to use. We can use the same
|
||||
# thing here, but there should probably be a safer way to do it.
|
||||
ifeq (True, $(shell python-dbg -c "import sys; print hasattr(sys,'pydebug') and sys.pydebug" 2> /dev/null))
|
||||
|
||||
# This means it is ok to try and build the dbg wxPython package
|
||||
PY_DBG_OK = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# If another source package is to supply the common binary packages
|
||||
# for a particular Debian release, then define this variable to indicate
|
||||
# the $(release) that is expected to provide it. Do not define it at
|
||||
@@ -192,9 +213,14 @@ package_headers_msw := wx$(release)-headers-msw
|
||||
extra_packages := $(package_msw_dev) $(package_msw_dbg) $(package_headers_msw)
|
||||
|
||||
ifdef DEBIAN_WX_DEFAULT_VERSION
|
||||
extra_packages += $(common_packages)
|
||||
extra_packages += $(common_packages)
|
||||
endif
|
||||
|
||||
ifndef PY_DBG_OK
|
||||
extra_packages += $(package_gtk_dbg_py)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Build directories
|
||||
@@ -234,7 +260,11 @@ objdirs := $(objdir_wxbase_shared) $(objdir_wxbase_debug) \
|
||||
build_arch_stamps = build-wxbase-shared-stamp build-wxbase-debug-stamp \
|
||||
build-gtk-shared-stamp build-gtk-shared-contrib-stamp \
|
||||
build-gtk-debug-stamp build-gtk-debug-contrib-stamp \
|
||||
build-i18n-stamp build-gtk-py-stamp build-gtk-dbg-py-stamp
|
||||
build-i18n-stamp build-gtk-py-stamp
|
||||
|
||||
ifdef PY_DBG_OK
|
||||
build_arch_stamps += build-gtk-dbg-py-stamp
|
||||
endif
|
||||
|
||||
build_indep_stamps = build-examples-stamp build-doc-stamp
|
||||
|
||||
@@ -247,12 +277,17 @@ build_stamps := $(build_stamps_native) $(build_cross_stamps)
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Install targets:
|
||||
|
||||
install_all_arch = install-wxbase-lib install-wxbase-dev install-wxbase-dbg \
|
||||
install-gtk-lib install-gtk-dev install-gtk-dbg \
|
||||
install-headers install-i18n install-gtk-py install-gtk-dbg-py
|
||||
install-headers install-i18n install-gtk-py
|
||||
|
||||
ifndef DEBIAN_WX_DEFAULT_VERSION
|
||||
install_all_arch += install-common
|
||||
install_all_arch += install-common
|
||||
endif
|
||||
|
||||
ifdef PY_DBG_OK
|
||||
install_all_arch += install-gtk-dbg-py
|
||||
endif
|
||||
|
||||
install_all_indep = install-examples install-doc
|
||||
@@ -1020,6 +1055,7 @@ endif
|
||||
dh_builddeb -i
|
||||
|
||||
|
||||
binary-arch: DH_OPTIONS=$(addprefix -N,$(extra_packages))
|
||||
binary-arch: build_arch install_arch
|
||||
dh_testdir -a
|
||||
dh_testroot -a
|
||||
@@ -1027,10 +1063,12 @@ binary-arch: build_arch install_arch
|
||||
dh_installchangelogs -a
|
||||
dh_installexamples -a
|
||||
dh_installmenu -a
|
||||
|
||||
ifdef PY_DBG_OK
|
||||
rm -rf debian/$(package_gtk_dbg_py)/usr/share/doc/$(package_gtk_dbg_py)
|
||||
ln -s $(package_gtk_py_lib) debian/$(package_gtk_dbg_py)/usr/share/doc/$(package_gtk_dbg_py)
|
||||
|
||||
else
|
||||
rm -rf debian/$(package_gtk_dbg_py)
|
||||
endif
|
||||
ifdef NO_PYCENTRAL
|
||||
dh_python -a
|
||||
else
|
||||
|
Reference in New Issue
Block a user