On Mon, Jan 16, 2023 at 10:02 PM Miro HronĨok <mhroncok(a)redhat.com> wrote:
On 16. 01. 23 21:37, Fabio Valentini wrote:
> Isn't the problem here that building Python extensions needs to work
> correctly in two - possibly conflicting - scenarios:
>
> - in RPM packages, where using system compiler flags is a MUST
Yes and packages get *all* the Fedora RPM flags that way via:
-
https://fedoraproject.org/wiki/Changes/SetBuildFlagsBuildCheck
- %py3_build, %pyproject_wheel, etc.
> - when user installs Python packages manually, for example with pip in
> a venv, where using system compiler flags isn't necessary (or
> necessarily a good idea)
This is the case this thread is about.
Ok, thanks for the explanation!
In that case, I think it would make sense to have C / C++ compiler
flags for user-installed Python packages to fall back to GCC defaults
(same as for user-compiled C / C++ code), and only add flags that are
necessary for compatibility with system Python (looks like this is
only "-fexceptions"?).
Fabio