Commit Graph

117 Commits

Author SHA1 Message Date
Miro Hrončok
5ffc27bdf7 CI: Don't treat DeprecationWarnings in setuptools_scm's %check as errors 2023-08-30 23:11:42 +02:00
Miro Hrončok
0ae2849f20 CI: Update setuptools to make it build with Python 3.12
This still works on Fedora 37/38. EL 9 uses a different setuptools version for tests.
2023-08-30 23:07:40 +02:00
Miro Hrončok
479a6b3669 CI: Update poetry-core to workaround a weird FTBFS on Fedora 39+
This still builds on previous Fedoras and EPEL 9.
2023-08-30 22:40:37 +02:00
Miro Hrončok
9c358ccecb CI: Update ipykernel to a version that no longer uses the imp module
This still works on Fedora 37 and 38. The c9s package skips this test.
2023-08-30 22:23:25 +02:00
Miro Hrončok
3607591aa8 CI: Apply a FTBFS fix from Fedora 39 to the virtualenv spec 2023-08-30 22:00:18 +02:00
Miro Hrončok
3a8bea86f8 CI: Make pytest build on Fedora 37 to 39 as well as EPEL 9 2023-08-30 21:48:33 +02:00
Miro Hrončok
bd1022e422 CI: Run mock in verbose mode to see the logs 2023-08-21 22:41:19 +02:00
Miro Hrončok
4f16920edb CI: Adjust a couple of specs to allow Python 3.11 builds on RHEL 9
This allows running CI tests as:

    ./mocktest.sh python-isort --define 'python3_pkgversion 3.11'

Which only makes sense in RHEL, and hence is not done here.

The purpose of this change in Fedora is to make the test spec files identical to c9s,
for easier future synchronization.

Related c9s commit:
e8933acb12
2023-06-15 19:03:54 +02:00
Miro Hrončok
d14a2dbc54 Accept multiple values for the same config settings 2023-06-01 21:24:39 +02:00
156e2fc8fe
Allow passing config_settings to the build backend
Resolves: https://bugzilla.redhat.com/2192581
2023-05-31 19:26:32 +00:00
Miro Hrončok
638ba27daf Fix literal % handling in %{pyproject_files} on RPM 4.19
RPM 4.19 now requires 2 %s to escape a single literal % in the filelist.

The test has been adjusted to actually run our code
instead of only verifying the assumptions.
2023-05-31 18:26:51 +02:00
Miro Hrončok
4a38795ceb CI: Make python-virtualenv.spec EL9-compatible
Related: rhbz#2208971
2023-05-30 13:11:13 +02:00
Miro Hrončok
456903666c Redirect stdout to stderr via Shell
Dependencies are recorded to a text file that is catted at the end.

This should prevent subtle bugs like https://bugzilla.redhat.com/2183519 in the future.
2023-04-17 15:32:26 +02:00
Lumir Balhar
1e37a4d872 Remove .dist-info directory at the end of %pyproject_buildrequires
An incomplete .dist-info directory in $PWD can confuse tests in %check.
For example, virtualenv uses importlib.metadata to load its
entry points and it does not work when it finds a virtualenv...dist-info without them.
2023-03-03 10:02:49 +01:00
Miro Hrončok
7600d88d04 CI: Adjust spec conditionals for F35 EOL
Also, use %elif instead of a nested %if.
2023-02-07 16:37:33 +01:00
Miro Hrončok
a4d05ba2c2 Add pyproject-srpm-macros with a minimal %pyproject_buildrequires macro
pyproject-srpm-macros is intended to be installed in the default buildroot.

That way, no explicit BuildRequires for pyproject-rpm-macros are required,
as long as %pyproject_buildrequires is used in %generate_buildrequires.

When only pyproject-srpm-macros is installed, the minimal implementation of
%pyproject_buildrequires generates a dependency on pyproject-rpm-macros.
When pyproject-rpm-macros is installed, it overrides the implementation
of %pyproject_buildrequires with the full one.

Note that in Fedora, pyproject-rpm-macros is required by python3-devel,
but not in RHEL.
This allows us to keep pyproject-rpm-macros in the RHEL CRB repository.
2023-01-20 21:57:49 +01:00
Miro Hrončok
03e6d054b8 CI specs: Never use ! ... as a check (followup)
This is a followup of 6015300d34

This particular instance was not discovered before due to the macro.
2023-01-14 23:57:54 +01:00
Miro Hrončok
d311a522b7 CI: Adjust %toxenv tests for tox 4 2023-01-14 23:57:54 +01:00
Miro Hrončok
2c69069593 CI: Manually BR pkg_resources from dns-lexicon to fix FTBFS
setuptools (pkg_resources) were transitively pulled in by tox
2023-01-14 23:57:54 +01:00
Miro Hrončok
e5c4bb2455 CI: Keep patches near the specs to ease using the script from other dist-gits
That way, if a package (such as python-tox) uses it,
the patches in dist-git are available.
In the future, it also allows us to add patches without URLs to our tested spec files.
2023-01-09 17:27:31 +01:00
Miro Hrončok
cb40ce3612 CI: Adjust setuptools versions to make the CI mockbuilds work on Fedora 36 and 38 2022-12-15 18:40:24 +01:00
Karolina Surma
516e1511a7 Filter discovered modules to match the given %pyproject_save_files globs
When certain modules are deliberately not included into the built RPM,
they shouldn't be listed in the list of qualified module names which are
used by %pyproject_check_import to test importability of the
distribution.
Resolves: https://bugzilla.redhat.com/2127958
2022-10-03 13:22:48 +02:00
Miro Hrončok
92ad52e5d4 %pyproject_save_files: Support License-Files installed into the *Root License Directory* from PEP 369
Files still need to be marked as License-File to be considered %license,
but if their path in METADATA is specified relative to dist-info/licenses,
they are correctly recognised.

This makes License-Files specified by hatchling 1.9.0+ marked as %license.
2022-09-19 18:22:03 +02:00
Miro Hrončok
b2bb5439dc CI: Invoke mock with --isolation=simple to workaround problems with systemd-nspawn
See https://pagure.io/fedora-ci/general/issue/217
2022-08-17 16:57:03 +02:00
Miro Hrončok
db73e5a026 CI: Apply the hack in python-ldap.spec also on RHEL 9 2022-08-16 16:33:33 +02:00
Miro Hrončok
c839a6f8aa CI: On CentOS Stream, use EPEL Next, not EPEL proper
Also, make sure to never pull from EPEL's Koji repo,
as is also exposes RHEL packages in the metadata, but they error 403.

    [MIRROR] libgcrypt-1.10.0-4.el9_0.x86_64.rpm: Status code: 403 for https://infrastructure.fedoraproject.org/repo/rhel/rhel9/x86_64/rhel-9-for-x86_64-baseos-rpms/Packages/l/libgcrypt-1.10.0-4.el9_0.x86_64.rpm

We just pull from the CentOS Stream Koji repo and EPEL Next Koji repo.
See the mock config for centos-stream+epel-next-9.
2022-08-16 16:33:19 +02:00
Karolina Surma
3d854401bd CI: Patch httpbin to build it in Rawhide with werkzeug 2022-08-10 09:12:40 +02:00
Miro Hrončok
111dd87a26 Fix CI tests for setuptools 61+ 2022-07-14 23:50:38 +02:00
Miro Hrončok
5b7df3cdd7 %pyproject_buildrequires: Support Package information on ELF objects
When extension modules are built in %pyproject_buildrequires,
we need to create the package note file.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2097535

This is tested via python-ldap -- %pyproject_buildrequires -w fails without the fix.

Neither python-markupsafe nor python-mistune can be used as a test
because they only warn when the extension module cannot be built
because they fallback to pure Python.
2022-06-17 11:03:18 +02:00
Owen W. Taylor
946c8726cf %pyproject_install: pass %{_prefix} explicitly to pip install
This makes things work for %{_prefix} other than user, when combined
with a change in python-rpm-macros to the definition of python3_sitelib/python3_sitearch.

https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/KEQMMNJ4HTTHSQLK6P4DJJTVPA36SS3W/

Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
2022-06-08 14:11:27 +02:00
Miro Hrončok
e31d5d5683 CI and docs: Remove Fedora 34 conditionals and mentions
Fedora 34 is end of life.
2022-06-06 05:51:34 +00:00
Miro Hrončok
dbe0eb9497 CI: Enable hatchling test for Fedora 35 and EPEL 9
https://bodhi.fedoraproject.org/updates/FEDORA-2022-c0d0bd9fa8
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-b15c2993fe
2022-05-06 14:02:36 +02:00
Miro Hrončok
40f6765e0e Allow building wheels in %pyproject_buildrequires to support other build backends
The hook is optional, see https://www.python.org/dev/peps/pep-0517/#prepare-metadata-for-build-wheel

> If a build frontend needs this information and the method is not defined,
> it should call build_wheel and look at the resulting metadata directly.

This is not yet automatically detected because the feature is provisional.
Use `%pyproject_buildrequires -w` to opt-in.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2076994
2022-04-29 12:42:37 +02:00
Miro Hrončok
2998811594 CI: More retrying for dnf, apparently 5 times 20 seconds is not enough 2022-04-27 10:34:30 +02:00
Miro Hrončok
6d0900f5b5 %pyproject_save_files: Support nested directories in dist-info 2022-04-27 10:34:03 +02:00
Miro Hrončok
6015300d34 CI specs: Never use ! ... as a check
See https://lists.fedoraproject.org/archives/list/packaging@lists.fedoraproject.org/thread/TFQGD7CSTD5WVKVT3WDIGF5D6DID5NK6/
2022-04-12 14:58:09 +02:00
Miro Hrončok
8e9b0a2a0d CI: Move one %files section to test different order 2022-03-22 18:59:53 +01:00
Miro Hrončok
50b5e637bf CI: Make most of the tests work on EPEL 9 2022-03-17 17:59:38 +01:00
Miro Hrončok
ed8ae6b328 CI: Determine mock chroot for centos-stream+epel, try not to break Fedora 2022-03-17 17:03:02 +01:00
Miro Hrončok
b88716ab8b CI tests: Workaround python-ldap missing support fro OpenLDAP 2.5+ 2022-02-22 20:49:52 +01:00
Miro Hrončok
e82e802470 CI tests: Sed ipykernel to declare missing dependency on ipython_genutils 2022-02-22 20:35:52 +01:00
Miro Hrončok
5cffd20919 Make the whitespace identical to c9s to avoid further conflicts 2022-02-02 21:24:10 +01:00
Karolina Surma
c3a20e9a33 Include compressed manpages correctly in the RPM package
Compressed manpages have different extension than those listed in the RECORD file,
so they were not recognized when %%pyproject_save_files '+auto' flag
was provided.
To enable the path recognition, if the manpage extension matches the one
listed in brp-compres, the extension is removed, and an asterisk is now added
to the manpages filenames.
Source: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages
Fixes: https://bugzilla.redhat.com/2033254
2022-01-20 19:57:47 +01:00
Miro Hrončok
8c8afba774 %pyproject_buildrequires: Make -r (include runtime) the default, use -R to opt-out
See the proposal:
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/2R6NKELTHAWE6PI3CCZBVW5PMGO5VPDG/

 - -N now implies -R
 - the macro still guards against -Nr and now also against -Rr
2022-01-18 17:50:00 +01:00
Miro Hrončok
55905e4681 Define provisional %pyproject_build_lib 2021-12-10 12:40:50 +01:00
Miro Hrončok
25646ef7c1 CI tests: Update setuptools_scm to fix FTBFS on rawhide 2021-11-29 16:52:09 +01:00
Miro Hrončok
d5f4f199b6 CI tests: Remove Fedora 33 compatibility shims, as F33 reaches EOL 2021-11-29 15:12:43 +01:00
Karolina Surma
c1baa534b6 Introduce %%pyproject_check_import
%%pyproject_save_files newly saves also a list of importable modules.
The list is used by %%pyproject_check_import to invoke the import test
on each module name.
%%pyproject_check_import accepts two options:
-t: filter only top-level modules
-e: exclude module names matching the given glob from the import check
2021-10-29 08:40:42 +02:00
Miro Hrončok
cefe82ed0d CI: Update the dns-lexiocn package so it also builds on Fedora 36+ 2021-10-25 16:24:32 +02:00
Miro Hrončok
6bbba680f4 Fedora CI: Update pytest so it still builds on Fedora 36 with pluggy 1.0 2021-09-09 12:12:13 +02:00