Re: New python distutils class
On Tue, 13 Jun 2006, Marc Dequènes wrote:
> Coin,
[...]
> You can find the current class here :
> http://perso.duckcorp.org/duck/soya-new-policy/
Some things to fix:
> cdbs_python_build_versions := $(patsubst python%, %, $(shell pyversions -r debian/control | grep -E "^python[0-9.]+( python[0-9.]+)*$$"))
You shouldn't be removing "python" here because "pyversions" may return "python"
(without any version) if XS-Python-Version is "current".
This means that:
> common-build-arch common-build-indep:: $(addprefix python-build-stamp-, $(cdbs_python_build_versions))
> python-build-stamp-%:
> cd $(DEB_SRCDIR) && python$* $(DEB_PYTHON_SETUP_CMD) build $(DEB_PYTHON_BUILD_ARGS)
> touch $@
This needs to be changed (use "$*" instead of "python$*") and likewise for "python-install-%:"
and "python-clean-%".
Then:
> binary-install/$(DEB_PYTHON_MODULE_PACKAGE) :: binary-install/%:
> ifeq (, $(cdbs_python_use_python_central))
> dh_pysupport
> else
> dh_pycentral
> endif
> dh_python -p$(DEB_PYTHON_MODULE_PACKAGE) $(DEB_PYTHON_PRIVATE_MODULES_DIRS)
> endif
You obviously need to give the same "-p$(DEB_PYTHON_MODULE_PACKAGE)" to dh_pycentral
and dh_python. And dh_pysupport also needs the $(DEB_PYTHON_PRIVATE_MODULES_DIRS).
Concerning:
> # TODO: detect if $(DEB_PYTHON_MODULE_PACKAGE) is an archall package to build only for current version
Here's a bit of perl that you can use to extract the Architecture: field
of a given binary package. (Not very nice but hey)
perl -e '$/=""; $_=(grep {/^Package: python-imaging-doc$/m;} (<>))[0];
/^Architecture: (.*)$/m && print $1' debian/control
Replace python-imaging-doc by $(DEB_PYTHON_MODULE_PACKAGE) and escape
everything properly...
Cheers,
--
Raphaël Hertzog
Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/
Reply to: