Comment 25 for bug 2002043

Revision history for this message
Robby Pocase (rpocase) wrote :

@vorlon - adding to Fabio's question. I agree with your reasoning that the workarounds should be reasonably easy for a knowledgeable user. We should enable end users to apply the same fix since they may be affected without realizing it. While we shouldn't encourage users to stay on 2.7, there are apps that either won't transition or still have a large amount of work to do so. For Jammy, I believe these apps can be effectively guaranteed security patches until 2032.

I believe the path below avoids the regression concerns. Its a bit ugly, but it at least won't outlive Jammy. None of this is ideal, but I think solves both sides of the equation.

* Add a feature flag that applies the proposed fix when present. This should be the default to satisfy the initial bug report constraint. Maybe UBUNTU_APPLY_DEFAULT_PYTHON_CFLAGS_ON_EXTENSIONS? Extremely verbose, but very little chance of someone accidentally disabling it. We should also print when its used so users have a launchpad issue to reference if it happens to cause a regression for a out of distro package compilation.
* Prevent applying the above feature flag for packages that already exist in the archive. This is a static list that is very unlikely to change. This does assume that distutils.sysconfig has a mechanism to introspect the package currently being built. Public API hints that it MAY be possible, but I haven't done thorough inspection across the ecosystem of callers.

Would you support a solution similar to the above?