- Fix small mistakes around main_python bcond
- Merge two main_python ǐf blocks
- Declare not supported combination of flatpackage enabled and main_python enabled
The compiler flag has been added to CFLAGS_NODIST and
LDFLAGS_NODIST. This will compile the core interpreter
and the stdlib modules with -fno-semantic-interposition
but will not affect user build and rpm C extension modules
compiled by distutils.
This has the effect of speeding up the interpreter up to
27%, depending on the workload, with the drawback of disabling
the capability of using LD_PRELOAD to override symbols in
libpython.
https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup
The tkinter module is part of the Python's standard library, however it is in
a separate subpackage to save an unwanted dependency on tk.
When tk is installed, we recommend the subpackage to provide more upstream-like
experience, but still provide a way out.
The bcond flatpackage assumed that if building *without* flatpackage,
that we want to build the main Python for the distribution. However, in
some instances we want a non-flatpackage build of Python that is *not*
the main Python in the distro.
Therefore I have split the main-Python setting into its own bcond.
- to CFLAGS_NODIST to take precedence as CFLAGS_NODIST go after EXTRA_CFLAGS
- to EXTRA_CFLAGS to "bake it in" and build extension modules with -Og
- call make regen-all with the same flags, as it invokes gcc as well
Due to Python's handling of CFLAGS and the way we
were passing extra compiler flags through the SPEC
the -Og flag for the debug build was overridden by
the -O2 flag, resulting in various side effects.
See: https://bugs.python.org/issue37631
Resolves: rhbz#1678277
In case of flatpak module builds, _prefix is redefined as /app.
rpm-build however hardcodes /usr/lib/debug without using the _prefix
macro, so do the same here to match this.
This fixes building Python as a flatpak module.
https://bugzilla.redhat.com/show_bug.cgi?id=1737933#c14
This increases the build time (to ~2 hours on armv7hl Koji),
but should bring more optimized Python to architectures other than x86.
The build time overhead is not so big on Python 3.8,
as only a limited number of tests is used.
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1741015
Installing python3-devel currently brings in:
- annobin
- dwz
- efi-srpm-macros
- fpc-srpm-macros
- ghc-srpm-macros
- gnat-srpm-macros
- go-srpm-macros
- nim-srpm-macros
- ocaml-srpm-macros
- openblas-srpm-macros
- perl-srpm-macros
- python-rpm-macros
- python-srpm-macros
- python3-rpm-generators
- python3-rpm-macros
- qt5-srpm-macros
- redhat-rpm-config
- rust-srpm-macros
For somebody who needs python3-devel to build extension modules,
those are all useless, so we conditionalize it on rpm-build.
Based on the reason for setuptools dependency, we do the same here
(but note that python3 already recommends it).
The license() builtin tries to read it and virtualenv tries to copy it.
See https://github.com/pypa/virtualenv/issues/1352
Up until now, the license() builtin juts felt back to:
See https://www.python.org/psf/license/
However it should output the full license text.
Virtualenv ~16.6 warns:
No LICENSE.txt / LICENSE found in source
Technically, it is probably possible to install the package without
%license files, but that would simply resort to the previous noncritical
behavior.
This fix is not critical and hence it doesn't bump release, for easier
backporting to all our Python packages.