Skip to content

Commit

Permalink
ci: Packit configuration update (#799)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
LecrisUT authored Aug 30, 2024
1 parent 1124da7 commit d8cb8fa
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 70 deletions.
7 changes: 7 additions & 0 deletions .distro/plans/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
adjust+:
# Cannot use initiator: fedora-ci reliably yet
when: initiator is not defined or initiator != packit
discover+:
how: fmf
dist-git-source: true
dist-git-extract: scikit_build_core-*/
4 changes: 0 additions & 4 deletions .distro/plans/main.fmf.dist-git

This file was deleted.

14 changes: 0 additions & 14 deletions .distro/plans/rpminspect.fmf

This file was deleted.

5 changes: 0 additions & 5 deletions .distro/plans/rpmlint.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,3 @@ discover:
ref: main
execute:
how: tmt

adjust:
when: distro < fedora-39
because: Rpmlint does not have spellcheck
enabled: false
16 changes: 15 additions & 1 deletion .distro/python-scikit-build-core.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Testing dependencies not satisfied on epel
# build, cattrs, hatch-fancy-pypi-readme, pytest-subprocess
%if 0%{?el10}
%bcond_with tests
%else
%bcond_without tests
%endif

%global debug_package %{nil}

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


%generate_buildrequires
%pyproject_buildrequires -x test,test-meta,test-numpy,pyproject
%pyproject_buildrequires %{?with_tests:-x test,test-meta,test-numpy}


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


%check
%pyproject_check_import
%if %{with tests}
%pytest \
-m "not network"
%endif


%files -n python3-scikit-build-core -f %{pyproject_files}
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,6 @@ ehthumbs.db
Thumbs.db

.idea/
# tmt setup
/.distro/main.fmf
/.distro/plans/main.fmf
/.distro/tests/main.fmf

/docs/**/build
.vscode/
70 changes: 28 additions & 42 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -1,67 +1,53 @@
# See the documentation for more information:
# https://packit.dev/docs/configuration/

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

files_to_sync:
- src: .distro/python-scikit-build-core.spec
dest: python-scikit-build-core.spec
- .packit.yaml
- src: .distro/python-scikit-build-core.rpmlintrc
dest: python-scikit-build-core.rpmlintrc
# tmt setup
- src: .distro/.fmf/
dest: .fmf/
- src: .distro/plans/
dest: plans/
- src: .distro/
dest: ./
delete: true
filters:
- "- main.fmf.dist-git"
- "- rpminspect.fmf"
- "- rpmlint.fmf"
- src: .distro/tests/
dest: tests/
- src: .distro/plans/main.fmf.dist-git
dest: plans/main.fmf
upstream_package_name: scikit_build_core
- "protect .git*"
- "protect sources"
- "protect changelog"
- "- plans/rpmlint.fmf"
- .packit.yaml

upstream_package_name: scikit-build-core
specfile_path: .distro/python-scikit-build-core.spec
downstream_package_name: python-scikit-build-core
update_release: false
upstream_tag_template: v{version}

targets: &targets
- fedora-all-x86_64
- fedora-all-aarch64
- epel-10-x86_64
- epel-10-aarch64

jobs:
- &copr_build
job: copr_build
trigger: pull_request
- &tests
job: tests
trigger: pull_request
fmf_path: .distro
targets:
- fedora-all-x86_64
- fedora-all-aarch64
- <<: *copr_build
trigger: release
owner: "@scikit-build"
project: release
targets: &targets
- fedora-all-x86_64
- fedora-all-aarch64
- &tests
job: tests
- <<: *tests
trigger: release
targets: *targets
fmf_path: .distro
- <<: *copr_build
trigger: commit
branch: main
owner: "@scikit-build"
project: nightly
- <<: *tests
trigger: commit
branch: main
- <<: *copr_build
trigger: pull_request
project: scikit-build-core
update_release: true
release_suffix: "{PACKIT_RPMSPEC_RELEASE}"
- <<: *tests
trigger: pull_request
- job: propose_downstream
trigger: release
dist_git_branches:
# TODO: Switch to fedora-development and fedora-latest
# There is an issue that the commits diverge on different PRs. In the meantime will create PRs on branched fedora
# manually
# https://github.com/packit/packit/issues/1724
- fedora-rawhide
- job: koji_build
trigger: commit
Expand Down

0 comments on commit d8cb8fa

Please sign in to comment.