eh heh -- since requested the dirty and ugly one, here is the starting point (patch on top of "compiled" .mk files, not .mk.in... sorry -- not that advanced yet ;) )
it does 1. check if python-(all-)dbg in build-depends (please please make it proper -- now it is ugly pipe) 2. if it is defined -- it adds into the loop installation using corresponding python%-dbg compiler thus building necessary _d.so TODO: Check if python-MODULE-dbg is defined, complain otherwise and move those _d.so into that package instead (could probably be achieved via customization of --install-platlib option for that call of setup.py) On Thu, 13 Oct 2011, Jonas Smedegaard wrote: > On 11-10-13 at 09:41am, Yaroslav Halchenko wrote: > > indeed having this functionality would be really nice ;) > Thanks for the encouragement. > Contributions - even crude messy code or even pseudo-code - is even more > appreciated! > Regards, > - Jonas -- =------------------------------------------------------------------= Keep in touch www.onerussian.com Yaroslav Halchenko www.ohloh.net/accounts/yarikoptic
From dce6cf6321d07cc78cae1e7e99d8452fb11e3c38 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko <deb...@onerussian.com> Date: Thu, 13 Oct 2011 18:27:24 -0400 Subject: [PATCH] NF: very cruel hack to start automagic building of extensions against python%-dbg --- class/python-distutils.mk | 4 +++- class/python-vars.mk | 5 +++++ 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/class/python-distutils.mk b/class/python-distutils.mk index 50c6975..8bab427 100644 --- a/class/python-distutils.mk +++ b/class/python-distutils.mk @@ -121,11 +121,13 @@ $(patsubst %,install/%,$(cdbs_python_indep_packages)) :: install/%: python-insta $(patsubst %,install/%,$(cdbs_python_arch_packages)) :: install/%: $(addprefix python-install-, $(cdbs_python_build_versions)) set -e; for buildver in $(cdbs_curpythonbuildversions); do \ cd $(CURDIR) && cd $(cdbs_python_distutils_srcdir) && \ - $(call cdbs_python_binary,python$$buildver) $(cdbs_python_setup_cmd) install \ + for dbgsuf in $(if $(cdbs_python_builddeps_debugpkg), "" "-dbg", ""); do \ + $(call cdbs_python_binary,python$$buildver)$$dbgsuf $(cdbs_python_setup_cmd) install \ --root="$(cdbs_python_destdir)" \ --install-purelib=$(call cdbs_expand_python_distutils_installdir,python$$buildver) \ --install-platlib=$(call cdbs_expand_python_distutils_installdir,python$$buildver) \ $(cdbs_python_install_args); \ + done; \ done # Deprecated targets. You should use above targets instead. diff --git a/class/python-vars.mk b/class/python-vars.mk index 37afd3d..478d981 100644 --- a/class/python-vars.mk +++ b/class/python-vars.mk @@ -121,4 +121,9 @@ $(if $(cdbs_python_pycentral),$(if $(cdbs_python_build_versions),,$(error invali $(if $(cdbs_python2),$(if $(cdbs_python_build_versions),,$(error invalid setting for X-Python-Version))) $(if $(cdbs_python3),$(if $(cdbs_python3_build_versions),,$(error invalid setting for X-Python3-Version))) +# do we have python-*-dbg in the build-depends? i.e. are we requested +# to build python extensions against python%-dbg? +# TODO: make it sane shell or use some tool (?) +cdbs_python_builddeps_debugpkg = $(shell bash -c "sed -ne '/^Build-Depends/,/^\([^ \t].*\|\)$$/p' debian/control | grep 'python-\(all-\)*dbg' | sed -e 's,.*\(python-\(all-\)*dbg\).*,\1,g'") + endif -- 1.7.7
signature.asc
Description: Digital signature