Skip to content

Commit d8cb8fa

Browse files
authored
ci: Packit configuration update (#799)
Primarily some cleanups: - Moved how the [copr projects](https://copr.fedorainfracloud.org/groups/g/scikit-build/coprs/) are handled. This should make it more usable if people want to use the projects to check if the spec files build well - Retire `scikit-build-core` project, instead use the auto-generated project by packit - Make sure `nightly` project is well ordered (previously they had the same NVR (name-version-release) so it would pick randomly any build from there) - Disabled `rpminspect`. I will look into unifying with downstream's implementation - Cleanups in `packit.yaml` to make it simpler - Added epel-10 as a build target - Removed `python3-scikit-build-core+pyproject` sub-package since it really has no effect now - ~~Included `hatchling` tests to the test environment~~. Postponed because F40, F39 does not satisfy requirement --- Ideally we would want both epel-9 and epel-10 as build targets with tests enabled, but there are some issues encountered: **epel-10:** - Missing test dependencies (may be satisfied later on) **epel-9:** - Build failure because `setuptools-scm` can't determine version from git-archive (can be workaround) - `exceptiongroup`: not packaged Further blocked by `flit-scm` -> `setuptools-scm` -> `setuptools`, the last being a major blocker for a lot of stuff getting on EPEL9 - `packaging >=21.3` vs `20.9` - Missing test dependencies --------- Signed-off-by: Cristian Le <[email protected]>
1 parent 1124da7 commit d8cb8fa

File tree

7 files changed

+50
-70
lines changed

7 files changed

+50
-70
lines changed

.distro/plans/main.fmf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
adjust+:
2+
# Cannot use initiator: fedora-ci reliably yet
3+
when: initiator is not defined or initiator != packit
4+
discover+:
5+
how: fmf
6+
dist-git-source: true
7+
dist-git-extract: scikit_build_core-*/

.distro/plans/main.fmf.dist-git

Lines changed: 0 additions & 4 deletions
This file was deleted.

.distro/plans/rpminspect.fmf

Lines changed: 0 additions & 14 deletions
This file was deleted.

.distro/plans/rpmlint.fmf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,3 @@ discover:
88
ref: main
99
execute:
1010
how: tmt
11-
12-
adjust:
13-
when: distro < fedora-39
14-
because: Rpmlint does not have spellcheck
15-
enabled: false

.distro/python-scikit-build-core.spec

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# Testing dependencies not satisfied on epel
2+
# build, cattrs, hatch-fancy-pypi-readme, pytest-subprocess
3+
%if 0%{?el10}
4+
%bcond_with tests
5+
%else
6+
%bcond_without tests
7+
%endif
8+
19
%global debug_package %{nil}
210

311
Name: python-scikit-build-core
@@ -42,6 +50,9 @@ BuildArch: noarch
4250
Summary: Metapackage for python3-scikit-build-core: pyproject extras
4351
Requires: python3-scikit-build-core = %{?epoch:%{epoch}:}%{version}-%{release}
4452
BuildArch: noarch
53+
# Deprecated empty extras package
54+
# Note: Cannot use Obsoletes + Provides here. python3dist() does not seem to be picked up
55+
Provides: deprecated()
4556
%description -n python3-scikit-build-core+pyproject
4657
This is a metapackage bringing in pyproject extras requires for
4758
python3-scikit-build-core.
@@ -55,7 +66,7 @@ It makes sure the dependencies are installed.
5566

5667

5768
%generate_buildrequires
58-
%pyproject_buildrequires -x test,test-meta,test-numpy,pyproject
69+
%pyproject_buildrequires %{?with_tests:-x test,test-meta,test-numpy}
5970

6071

6172
%build
@@ -68,8 +79,11 @@ It makes sure the dependencies are installed.
6879

6980

7081
%check
82+
%pyproject_check_import
83+
%if %{with tests}
7184
%pytest \
7285
-m "not network"
86+
%endif
7387

7488

7589
%files -n python3-scikit-build-core -f %{pyproject_files}

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,6 @@ ehthumbs.db
170170
Thumbs.db
171171

172172
.idea/
173-
# tmt setup
174-
/.distro/main.fmf
175-
/.distro/plans/main.fmf
176-
/.distro/tests/main.fmf
177173

178174
/docs/**/build
179175
.vscode/

.packit.yaml

Lines changed: 28 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,53 @@
1-
# See the documentation for more information:
2-
# https://packit.dev/docs/configuration/
3-
4-
specfile_path: .distro/python-scikit-build-core.spec
5-
61
files_to_sync:
7-
- src: .distro/python-scikit-build-core.spec
8-
dest: python-scikit-build-core.spec
9-
- .packit.yaml
10-
- src: .distro/python-scikit-build-core.rpmlintrc
11-
dest: python-scikit-build-core.rpmlintrc
12-
# tmt setup
13-
- src: .distro/.fmf/
14-
dest: .fmf/
15-
- src: .distro/plans/
16-
dest: plans/
2+
- src: .distro/
3+
dest: ./
4+
delete: true
175
filters:
18-
- "- main.fmf.dist-git"
19-
- "- rpminspect.fmf"
20-
- "- rpmlint.fmf"
21-
- src: .distro/tests/
22-
dest: tests/
23-
- src: .distro/plans/main.fmf.dist-git
24-
dest: plans/main.fmf
25-
upstream_package_name: scikit_build_core
6+
- "protect .git*"
7+
- "protect sources"
8+
- "protect changelog"
9+
- "- plans/rpmlint.fmf"
10+
- .packit.yaml
11+
12+
upstream_package_name: scikit-build-core
13+
specfile_path: .distro/python-scikit-build-core.spec
2614
downstream_package_name: python-scikit-build-core
27-
update_release: false
2815
upstream_tag_template: v{version}
2916

17+
targets: &targets
18+
- fedora-all-x86_64
19+
- fedora-all-aarch64
20+
- epel-10-x86_64
21+
- epel-10-aarch64
22+
3023
jobs:
3124
- &copr_build
3225
job: copr_build
26+
trigger: pull_request
27+
- &tests
28+
job: tests
29+
trigger: pull_request
30+
fmf_path: .distro
31+
targets:
32+
- fedora-all-x86_64
33+
- fedora-all-aarch64
34+
- <<: *copr_build
3335
trigger: release
3436
owner: "@scikit-build"
3537
project: release
36-
targets: &targets
37-
- fedora-all-x86_64
38-
- fedora-all-aarch64
39-
- &tests
40-
job: tests
38+
- <<: *tests
4139
trigger: release
42-
targets: *targets
43-
fmf_path: .distro
4440
- <<: *copr_build
4541
trigger: commit
4642
branch: main
43+
owner: "@scikit-build"
4744
project: nightly
4845
- <<: *tests
4946
trigger: commit
5047
branch: main
51-
- <<: *copr_build
52-
trigger: pull_request
53-
project: scikit-build-core
54-
update_release: true
55-
release_suffix: "{PACKIT_RPMSPEC_RELEASE}"
56-
- <<: *tests
57-
trigger: pull_request
5848
- job: propose_downstream
5949
trigger: release
6050
dist_git_branches:
61-
# TODO: Switch to fedora-development and fedora-latest
62-
# There is an issue that the commits diverge on different PRs. In the meantime will create PRs on branched fedora
63-
# manually
64-
# https://github.com/packit/packit/issues/1724
6551
- fedora-rawhide
6652
- job: koji_build
6753
trigger: commit

0 commit comments

Comments
 (0)