Commit Graph

799 Commits

Author SHA1 Message Date
Miro Hrončok f6b4d318e9 Enable https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup on power and arm
https://bugzilla.redhat.com/show_bug.cgi?id=1795575 is "fixed for almost a month"
2020-03-02 17:51:52 +01:00
Marcel Plch 2d49fce8f2 Merge #23 `Update to 3.9.0a4` 2020-03-02 12:07:28 +00:00
Marcel Plch 1206bb9631 Update to 3.9.0a4
Patches 340 and 341 got upstreamed and are no longer present.
2020-03-02 13:05:38 +01:00
Miro Hrončok 093c1453a5 Hardlink duplicated bytecode cache files by --hardlink-dupes instead of BRP script
This is explained in https://discuss.python.org/t/3014
                 and https://github.com/fedora-python/compileall2/issues/16

The %__brp_python_hardlink script already does this by Shell, this should be slightly faster.

Also, this is more explicit.
2020-02-27 13:53:51 +00:00
Miro Hrončok 088c30cb53 Update the ensurepip module to work with setuptools >= 45
setuptools 45.x is Python 3 only and changed the name of the wheel
2020-02-25 16:33:50 +00:00
Nicolas Chauvet eecc383e09 Use __isa_bits instead of crafted value
This is easier to read and the appropriate macro to use here

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
2020-02-24 22:06:46 +01:00
Lumir Balhar 42de082336 Use compileall2 module for byte-compilation in the python3 package 2020-02-03 22:34:09 +01:00
Tomas Orsava d8879e2d28 De-hardcode py_SOVERSION in the files section 2020-02-03 22:34:04 +01:00
Miro Hrončok 33b3a95c1e Temporarily don't use -fno-semantic-interposition on power and arm
Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1795575
2020-01-30 11:24:01 +01:00
Victor Stinner f4a58d6359 Run the test suite with --timeout=1800 2020-01-29 15:58:24 +01:00
Victor Stinner 0ae3172083 Update to Python 3.9.0a3
Added patches 340 and 341 (backports from master)
2020-01-29 15:58:02 +01:00
Charalampos Stratakis 78bc51a18d Package __init__.py within ensurepip's bundled directory
when not using the system installed rpmwheels

Upstream change: https://bugs.python.org/issue37449
2020-01-03 14:25:58 +01:00
Miro Hrončok d33516835b Rebased to Python 3.9.0a2
No patches changes since 3.9.0a1.
2019-12-19 12:25:44 +01:00
Charalampos Stratakis 620353def6 Build Python with -fno-semantic-interposition
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
2019-12-04 16:36:18 +01:00
Miro Hrončok fc7d3985d4 Reintroduce the OPENSSL_CONF=/non-existing-file workaround
Since crypto-policies-20191002-1.gitc93dc99.fc32, the maximum version of TLS
is customized in Fedora as well.

See https://bugzilla.redhat.com/show_bug.cgi?id=1778357
and https://bugs.python.org/issue38815

This reverts commit b33b4a5162e2b5873c5846dcba882f3569ab76cd.
2019-12-03 19:09:16 +01:00
Miro Hrončok 9885fc6e12 Recommend python3-tkinter when tk is installed
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.
2019-11-30 01:15:55 +01:00
Tomas Orsava 83f99db714 New bcond main_python
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.
2019-11-30 01:14:44 +01:00
Miro Hrončok 85bf9e384b Debootstrap Python 3.9
This reverts commit d126d7b2af.

No rebuild is needed, the bootstrapped build should be identical.
2019-11-28 15:53:58 +01:00
Miro Hrončok a6d1cbb1a9 Don't remove the test.test_tools module
The test should now be properly skipped with installed Python and
some other tests import from test.test_tools.
2019-11-28 10:29:11 +01:00
Miro Hrončok 1639fefb13 Fedora CI: Update the test machine before testing
This is required to fetch latest updates and test with recent packages.
2019-11-28 02:44:22 +01:00
Miro Hrončok 1a985bb5d6 Fix incorrectly rebased RPM wheels patch 2019-11-26 01:08:45 +01:00
Miro Hrončok d126d7b2af Bootstrap Python 3.9 2019-11-25 20:22:21 +01:00
Miro Hrončok b180b3028c Rebased to Python 3.9.0a1
Actually rebased patches: 102, 189

New patches at https://github.com/fedora-python/cpython/tree/fedora-3.9
2019-11-25 14:30:40 +01:00
Miro Hrončok 6b5182a34c Add "downstream only" explanations to various patches
Suggested by Neal Gompa in https://bugzilla.redhat.com/show_bug.cgi?id=1774417
2019-11-25 14:30:08 +01:00
Miro Hrončok 853a0fc587 Verify upstream sources with GPG
This is now a recommended thing to do:
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_source_file_verification

Regardless if it adds actual security, it should prevent problems like this one:
https://mail.python.org/archives/list/python-dev@python.org/message/OYNQS2BZYABXACBRHBHV4RCEPQU5R6EP/
2019-11-20 10:00:34 +01:00
Miro Hrončok e0704196d3 Update to Python 3.8.0 final 2019-10-15 19:44:59 +02:00
Miro Hrončok 0c70c9d269 Pass -Og to EXTRA_CFLAGS as well as to CFLAGS_NODIST
- 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
2019-10-15 19:44:59 +02:00
Charalampos Stratakis 2eefe4e7c0 Make the debug build compile with -Og
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
2019-10-14 22:53:22 +02:00
Miro Hrončok 8e2dbb0fbf Rebased to Python 3.8.0rc1
Rebased patches: 102
Removed patches already merged upstream: 331
2019-10-02 07:40:12 +02:00
Kalev Lember 06c7812898 Avoid using _prefix macro for /usr/lib/debug dir
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
2019-10-02 07:38:14 +02:00
Miro Hrončok 4352870f13 Rebased to Python 3.8.0b4
Patch 189 rebased for new setuptools/pip version.

Patch 331 added to fix clang: https://bugzilla.redhat.com/show_bug.cgi?id=1715016

importlib.metadata is now a simple module, not a folder.
2019-08-31 14:23:37 +02:00
Miro Hrončok 8f6e3122a8 Enable Profile-guided optimization for all arches, not just x86
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
2019-08-31 14:22:01 +02:00
Miro Hrončok e9ba67b74b Conditionalize python3-devel runtime dependencies on RPM packages and setuptools
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).
2019-08-12 15:54:51 +02:00
Miro Hrončok 2d970f424c Stop disabling test_asyncio, the problem was fixed 2019-08-09 21:04:49 +02:00
Miro Hrončok 2d19c7ecdc Skip test_gdb everywhere
https://bugzilla.redhat.com/show_bug.cgi?id=1734327

Also remove a note about test_gdb skipped on armv7hl, that one was fixed:

https://bugzilla.redhat.com/show_bug.cgi?id=1196181
2019-08-09 20:59:30 +02:00
Miro Hrončok 29530ba2a8 Update to 3.8.0b3 2019-07-29 23:47:30 +00:00
Petr Viktorin 69c2d11d9a Update python-debug description for Python 3.8 ABI unification 2019-07-29 16:42:16 +02:00
Fedora Release Engineering d35394ed78 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-26 17:27:40 +00:00
Miro Hrončok ff90d23b8f Keep the LICENSE.txt file in lib/pythonX.Y dir
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.
2019-07-15 14:27:11 +00:00
Miro Hrončok 9213c03924 Restore pyc to TIMESTAMP invalidation mode as default in rpmbubild
See https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/57#comment-27426
2019-07-15 15:38:52 +02:00
Lumir Balhar 7bf69ee163 Move test.support module to python3-test subpackage
More info: https://fedoraproject.org/wiki/Changes/Move_test.support_module_to_python3-test_subpackage
2019-07-15 15:21:13 +02:00
Miro Hrončok 988896a172 Python now means Python 3
- https://fedoraproject.org/wiki/Changes/Python_means_Python3
- The python-unversioned-command package is no longer Python 2, but 3
- The python, pydoc, python-config, python-debug, idle, pygettext.py and
  msgfmt.py commands are now in python3
2019-07-15 15:17:06 +02:00
Miro Hrončok b9306b1085 Add %python_provide provides
This allows easier compatibility back and forth once (and if)
https://fedoraproject.org/wiki/Changes/Python_means_Python3
happens. This is not the full implementation of the change,
as the python-unversioned package still needs to be added.

This is currently a no-op as %python_provide does nothing
for python3.
2019-07-09 19:59:58 +02:00
Miro Hrončok bc1bef742b Remove the OPENSSL_CONF=/non-existing-file workaround
The test was fixed upstream to expect different config on Fedora.

Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1618753

(Note that we still keep that on the CI for older Python versions.)
2019-07-08 11:48:41 +02:00
Miro Hrončok f16aa02ebf Remove patch 316
The patch landed in Python in be5bb52f5f2d4da4b9d6f42399f7275ab47910f3

However patch 316 still applied cleanly.
Removing it doesn't make any difference, so not bumping anything.
2019-07-08 09:52:41 +02:00
Miro Hrončok 13257b57b3 Update to 3.8.0b2 2019-07-05 12:10:54 +02:00
Miro Hrončok b6a6e97b8f Don't skip so many tests on the CI
test_wsgiref is tracked in https://bugs.python.org/issue37411
2019-06-28 13:13:03 +02:00
Miro Hrončok 949410ed57 Fedora CI: Provision 3 GiB of RAM 2019-06-28 13:13:03 +02:00
Victor Stinner 17d397670a Skip test_distutils if bootstraping, use python3.X for regen-all 2019-06-26 12:08:56 +02:00
Victor Stinner 3a6f3f6941 Reenable test_distutils and test_bdist_rpm
Resolves: rhbz#1685557
2019-06-11 15:01:33 +02:00