Final build tweaks for 2.8.10.1 needed to compensate for Debian/Ubuntu changes in where the pacakges are installed for Python 2.6

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@60786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2009-05-28 17:34:24 +00:00
parent a37af54e73
commit 292500f3f8
4 changed files with 31 additions and 11 deletions

6
debian/changelog vendored
View File

@@ -1,3 +1,9 @@
wxwidgets2.8 (2.8.10.1-1) unstable; urgency=low
* Fixed problems resulting from changes in std Python pkg dir
-- Robin Dunn <robin@alldunn.com> Tue, 19 May 2009 20:29:29 -0700
wxwidgets2.8 (2.8.10.1-0) unstable; urgency=low
* New upstream stable release. See docs/changes.txt for details.

View File

@@ -6,9 +6,13 @@ WXPYTHONDIR="=WXPYDIR"
PYVERS="=PYVERS"
for PY in $PYVERS; do
update-alternatives --install /usr/lib/python$PY/site-packages/wx.pth \
wx-python$PY.pth \
/usr/lib/wx/python$PY/wx=V.pth =PRIO
case $PY in
2.3|2.4|2.5) pylib=/usr/lib/python$PY/site-packages;;
*) pylib=/usr/lib/python$PY/dist-packages;;
esac
mkdir -p $pylib
update-alternatives --install $pylib/wx.pth wx$PY.pth \
/usr/lib/wx/python$PY/wx=V.pth =PRIO
done
#DEBHELPER#

View File

@@ -3,7 +3,7 @@
set -e
for PY in =PYVERS; do
update-alternatives --remove wx-python$PY.pth /usr/lib/wx/python$PY/wx=V.pth
update-alternatives --remove wx$PY.pth /usr/lib/wx/python$PY/wx=V.pth
done
#DEBHELPER#

24
debian/rules vendored
View File

@@ -44,6 +44,10 @@ else
endif
endif
# sitedir: name of the site-packages/dist-packages directory depending on the
# python version. Call as: $(call sitedir, <python version>).
sitedir = $(if $(filter $(subst python,,$(1)), 2.3 2.4 2.5),site,dist)-packages
# 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
@@ -850,6 +854,7 @@ install-gtk-py%-lib:
cd wxPython && \
python$* ./setup.py install \
--prefix=`pwd`/../debian/$(package_gtk_py_lib)/usr \
--install-layout=deb \
WX_CONFIG='$(wxconfig)' \
SYS_WX_CONFIG='$(py_wxconfig)' \
WXPORT=$(pytoolkit) \
@@ -857,22 +862,26 @@ install-gtk-py%-lib:
$(PY_OPENGL) \
FLAVOUR=$(DEBIAN_WXFLAVOUR)
mv debian/$(package_gtk_py_lib)/usr/lib/python$*/site-packages/wx.pth \
mv debian/$(package_gtk_py_lib)/usr/lib/python$*/*-packages/wx.pth \
debian/$(package_gtk_py_lib)/usr/lib/wx/python$*/wx$(release).pth
find debian/$(package_gtk_py_lib)/usr/lib/python$*/site-packages \
-name '*.py?' -exec rm '{}' ';'
find debian/$(package_gtk_py_lib)/usr/lib/python$* -name '*.py?' -exec rm '{}' ';'
rm -f debian/$(package_gtk_py_lib)/usr/lib/python$*/site-packages/$(wxpydir)/wx/tools/XRCed/license.txt
rm -f debian/$(package_gtk_py_lib)/usr/lib/python$*/*-packages/$(wxpydir)/wx/tools/XRCed/license.txt
ifndef DEBIAN_WX_DEFAULT_VERSION
@# Move files out for the wxversion package
DH_OPTIONS=-p$(package_gtk_py_ver) \
dh_movefiles --sourcedir=debian/$(package_gtk_py_lib) \
usr/lib/python$*/site-packages/wxversion.py
usr/lib/python$*/$(call sitedir, $*)/wxversion.py
endif
rm -f debian/$(package_gtk_py_lib)/usr/lib/python$*/site-packages/wxversion.py
rm -f debian/$(package_gtk_py_lib)/usr/lib/python$*/site-packages/wxPython_common*.egg-info
rm -f debian/$(package_gtk_py_lib)/usr/lib/python$*/$(call sitedir, $*)/wxversion.py
rm -f debian/$(package_gtk_py_lib)/usr/lib/python$*/$(call sitedir, $*)/wxPython_common*.egg-info
# Not sure why yet, but for Py2.6 an extra set of .py files are being installed in the
# wrong place, so let's get rid of them if they are there
rm -rf debian/$(package_gtk_py_lib)/usr/lib/python$*/$(call sitedir, $*)/wx
rm -rf debian/$(package_gtk_py_lib)/usr/lib/python$*/$(call sitedir, $*)/wxPython
install-gtk-py-tools: DH_OPTIONS=-p$(package_gtk_py_tools)
@@ -1057,6 +1066,7 @@ binary-arch: build_arch install_arch
dh_installmenu -a
ifdef PY_DBG_OK
rm -rf debian/$(package_gtk_dbg_py)/usr/share/doc/$(package_gtk_dbg_py)
mkdir -p $(package_gtk_py_lib) debian/$(package_gtk_dbg_py)/usr/share/doc
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)