[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Status of cross-building Python extension modules

Hi Dima,

On Sat, Dec 25, 2021 at 10:06:25PM -0800, Dima Kogan wrote:
> The biggest issue here is that the override_dh_auto_install-indep rule
> needs the the override_dh_auto_install-arch products. So Make needs to
> have some extra dependency. And when cross-building we need to make sure
> somehow that only arch:any products are being built. Suggestions?

A common solution to this problem is avoiding -indep/-arch suffixes.
Then you have a common sequence and can order within. You get to
conditionalize in a different way though:

DOPACKAGES:=$(shell dh_listpackages)

ifneq (,$(filter somepackage,$(DOPACKAGES)))
	foo # only to be run when building somepackage

It's a bit harder to read, admittedly. On the upside, it works fully
transparently with build profiles as dh_listpackages only emits those
packages that are actually being built for the selected profiles.

If that doesn't work for you, please come back.

> == mrcal ==
> Grab it with
>   debcheckout git@salsa.debian.org:science-team/mrcal.git
> This package has a number of Build-Depends that are only needed for
> testing. If testing is only happening when we can run the host Python
> without emulation, I'd like the build to not require these dependencies.
> You said to do this with build profiles, and I haven't yet looked at
> what that would entail, exactly. All the "python-..." Build-Depends are
> for testing. The only one needed for building is libpython3-all-dev.

A lot of packages cannot be cross built when enabling testing due to
their excessive test Build-Depends. I don't think anyone is working on
this. Cross building with emulated unit testing is not really something
that people care about (at least I don't). So you should be able to just
add <!nocheck> to all your python-* dependencies and be done here.

If that doesn't work for you, please come back.


Reply to: