Commit Graph

144 Commits

Author SHA1 Message Date
Miro Hrončok
5c0cb835f5 CI: Update epel-release link 2024-11-13 14:54:27 +01:00
Miro Hrončok
2c94825e15 CI: EL10-only: Skip tests we cannot run yet 2024-11-13 14:54:22 +01:00
Miro Hrončok
6b34a76d69 Merge fedora/rawhide into c10s 2024-11-13 14:54:12 +01:00
Miro Hrončok
8a41ec5715 Don't generate a dependency on pip when %pyproject_buildrequires -N is used
- Fixes: rhbz#2294510
2024-09-23 14:39:00 +02:00
Karolina Surma
9f43e2a760 Add a possibility to read runtime dependencies from pyproject.toml
This adds a new flag, -p, to %pyproject_buildrequires.
When set, the runtime dependencies are read from the pyproject.toml's
[project] table.

See: https://bugzilla.redhat.com/2261939

pyproject_buildrequires.py already had a short `-p` option for
--python3_pkgversion (hidden from the macro users).
This change removes the one-letter option and leaves the long-one.
`-p` is now reused for reading dependencies from pyproject.toml
and made visible to the macro users.
2024-09-23 11:48:20 +02:00
Miro Hrončok
d6fe948530 CI: EL10-only: Skip tests we cannot run yet 2024-09-09 09:45:26 +02:00
Miro Hrončok
aa8e970951 CI: EL10-only: Install epel-release from Koji 2024-09-09 09:45:26 +02:00
Miro Hrončok
ab3dc0126a CI: Update setuptools_scm to a version that can be tested on EL9, EL10, Fedora 39-42 2024-09-07 12:42:44 +02:00
Miro Hrončok
459cda2e67 CI: python-ipykernel: Drop unneeded python3-ipyparallel dependency
It is not available in EPEL 10 and we can avoid it by excluding more imports,
which is what this spec file tests anyway.
2024-09-07 12:42:44 +02:00
Miro Hrončok
89374b9107 CI: python-virtualenv: Drop an unused dependency on python3-flaky
We don't have flaky in EL 10 yet.
2024-09-07 12:42:44 +02:00
Miro Hrončok
4a4614d13a CI: Use poetry-core in python-clikit.spec for EL10 compatibility 2024-09-07 12:42:44 +02:00
Miro Hrončok
32a3b5613f CI: Use flit_core in python-entrypoints.spec for EL10 compatibility 2024-09-07 12:42:44 +02:00
Miro Hrončok
049eb198d0 CI: Make python-pytest.spec build on EL 10 (but not on EL 9 anymore) 2024-09-07 12:42:44 +02:00
Miro Hrončok
dddc9bf556 CI: Use tomli rather than toml in fake-requirements.spec
toml is deprecated and not available on EL10.
2024-09-07 12:42:44 +02:00
Miro Hrončok
6f1ac1b126 CI: There is no EPEL 10 Next, use plain EPEL mock chroots on RHEL 10+ 2024-08-20 11:47:19 +02:00
Miro Hrončok
7c4ffdcf84 CI: Make python-pluggy build on Fedora 41+ 2024-08-05 18:21:41 +02:00
Miro Hrončok
3539b832c8 CI: Allow platformdirs 4 in python-virtualenv.spec 2024-07-25 11:54:55 +02:00
Miro Hrončok
e7b37d02f8 Add a provisional RPM Declarative Buildsystem (RPM 4.20+) 2024-07-25 11:54:55 +02:00
Miro Hrončok
6d455af4dc Properly escape weird characters from paths in %{pyproject_files} (RPM 4.19+ only) 2024-07-02 23:53:19 +02:00
Miro Hrončok
fa7c91c65d CI: Regardless of the package manager, use dnf.conf in mock config
After https://github.com/rpm-software-management/mock/pull/1332

We saw:

    ERROR: Config error: /tmp/fedora-39-x86_64-ci.cfg: '{% if releasever|int >= 40 %}dnf5{% else %}dnf{% endif %}.conf'

We cannot use the templated value of package_manager in a key.

The rawhide mock config uses dnf.conf anyway, despite using dnf5.

Reported to mock in https://github.com/rpm-software-management/mock/issues/1357
2024-04-11 13:32:17 +02:00
Miro Hrončok
3667fcd240 Revert "CI: Use DNF 4 in mock to workaround dnf5#1084"
This reverts commit 1d00ed8155.

https://github.com/rpm-software-management/dnf5/issues/1084 is fixed
2024-02-06 10:48:01 +01:00
Miro Hrončok
5aca0a6034 Namespace pyproject-rpm-macros generated text files with %{python3_pkgversion} 2024-01-26 09:45:58 +01:00
Miro Hrončok
f987ccf2ee CI: Skip httpbin %tox on F40+ 2024-01-26 09:45:58 +01:00
Miro Hrončok
1d00ed8155 CI: Use DNF 4 in mock to workaround dnf5#1084
mock-core-configs-39.3 switched the package manager for Fedora 40 to dnf5
  https://fedoraproject.org/wiki/Changes/BuildWithDNF5

dnf5 builddep cannot handle BuildRequires with square brackets,
e.g. with Python extras, leading to errors like:

  No match for argument: python3dist(setuptools-scm[toml]) >= 5
  No match for argument: python3dist(raven[flask])
  No match for argument: python3dist(ini2toml[lite]) >= 0.9

This is reported: https://github.com/rpm-software-management/dnf5/issues/1084

Until it is fixed, we explicitly use the "dnf" (i.e. DNF 4) package manager in mock,
even on Fedora 40+.
2023-12-11 15:09:35 +01:00
Miro Hrončok
f39261901c Add the -l/-L flag to %pyproject_save_files
- The -l flag can be used to assert at least 1 License-File was detected
- The -L flag explicitly disables this check (which remains the default)

Co-Authored-By: Maxwell G <maxwell@gtmx.me>
2023-12-11 13:16:09 +01:00
Karolina Surma
97a7574518 Add %_pyproject_check_import_allow_no_modules
Macro which allows to pass the import check even if no Python modules
are detected in the package.
Only to be used in the automated environments.

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2023-09-26 10:23:49 +00:00
Miro Hrončok
4b32bbb939 Use %rpmversion to check if we are on RPM 4.19+ 2023-08-31 09:28:36 +00:00
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