From 27879e5c26ca6eca1564471a1c97bf27ad083920 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Mon, 8 Jul 2024 14:45:10 +0200 Subject: [PATCH 01/11] packit: Move targets to top-level Signed-off-by: Cristian Le --- .packit.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index 1bbeab0d..63cb3812 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -27,19 +27,19 @@ downstream_package_name: python-scikit-build-core update_release: false upstream_tag_template: v{version} +targets: &targets + - fedora-all-x86_64 + - fedora-all-aarch64 + jobs: - &copr_build job: copr_build trigger: release owner: "@scikit-build" project: release - targets: &targets - - fedora-all-x86_64 - - fedora-all-aarch64 - &tests job: tests trigger: release - targets: *targets fmf_path: .distro - <<: *copr_build trigger: commit From 583c85ba9ffb366294ddc4e2722ea6474dff1b58 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Mon, 8 Jul 2024 14:48:56 +0200 Subject: [PATCH 02/11] packit: Simplify files_to_sync Signed-off-by: Cristian Le --- .distro/plans/main.fmf | 7 +++++++ .distro/plans/main.fmf.dist-git | 4 ---- .gitignore | 4 ---- .packit.yaml | 26 +++++++++----------------- 4 files changed, 16 insertions(+), 25 deletions(-) create mode 100644 .distro/plans/main.fmf delete mode 100644 .distro/plans/main.fmf.dist-git diff --git a/.distro/plans/main.fmf b/.distro/plans/main.fmf new file mode 100644 index 00000000..a031810f --- /dev/null +++ b/.distro/plans/main.fmf @@ -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-*/ diff --git a/.distro/plans/main.fmf.dist-git b/.distro/plans/main.fmf.dist-git deleted file mode 100644 index 691879a5..00000000 --- a/.distro/plans/main.fmf.dist-git +++ /dev/null @@ -1,4 +0,0 @@ -discover: - how: fmf - dist-git-source: true - dist-git-extract: scikit_build_core-*/ diff --git a/.gitignore b/.gitignore index c6deacac..5a06acfb 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ diff --git a/.packit.yaml b/.packit.yaml index 63cb3812..16713b5a 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -4,24 +4,16 @@ 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 + - "protect .git*" + - "protect sources" + - "protect changelog" + - "- plans/rpminspect.fmf" + - "- plans/rpmlint.fmf" + - .packit.yaml upstream_package_name: scikit_build_core downstream_package_name: python-scikit-build-core update_release: false From 84d806d12170c9a70a1759d03685c4322b6bb3d9 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Mon, 8 Jul 2024 14:51:27 +0200 Subject: [PATCH 03/11] packit: Reconfigure copr projects Signed-off-by: Cristian Le --- .packit.yaml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index 16713b5a..f99f4bab 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -16,7 +16,6 @@ files_to_sync: - .packit.yaml upstream_package_name: scikit_build_core downstream_package_name: python-scikit-build-core -update_release: false upstream_tag_template: v{version} targets: &targets @@ -26,34 +25,28 @@ targets: &targets jobs: - &copr_build job: copr_build + trigger: pull_request + - &tests + job: tests + trigger: pull_request + fmf_path: .distro + - <<: *copr_build trigger: release owner: "@scikit-build" project: release - - &tests - job: tests + - <<: *tests trigger: release - 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 From a9fc14b561f53bdf6aa5f488c589f7d057fdb474 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Mon, 8 Jul 2024 14:52:57 +0200 Subject: [PATCH 04/11] packit: Minor cleanup Signed-off-by: Cristian Le --- .packit.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index f99f4bab..c6708ec1 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -1,8 +1,3 @@ -# See the documentation for more information: -# https://packit.dev/docs/configuration/ - -specfile_path: .distro/python-scikit-build-core.spec - files_to_sync: - src: .distro/ dest: ./ @@ -14,7 +9,9 @@ files_to_sync: - "- plans/rpminspect.fmf" - "- plans/rpmlint.fmf" - .packit.yaml -upstream_package_name: scikit_build_core + +upstream_package_name: scikit-build-core +specfile_path: .distro/python-scikit-build-core.spec downstream_package_name: python-scikit-build-core upstream_tag_template: v{version} From 3c0aa2d72fb62fed742e6349a93ef2784057e21b Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Fri, 30 Aug 2024 14:31:50 +0200 Subject: [PATCH 05/11] packit: Temporarily remove rpminspect check Signed-off-by: Cristian Le --- .distro/plans/rpminspect.fmf | 14 -------------- .packit.yaml | 1 - 2 files changed, 15 deletions(-) delete mode 100644 .distro/plans/rpminspect.fmf diff --git a/.distro/plans/rpminspect.fmf b/.distro/plans/rpminspect.fmf deleted file mode 100644 index c3a58593..00000000 --- a/.distro/plans/rpminspect.fmf +++ /dev/null @@ -1,14 +0,0 @@ -plan: - import: - url: https://github.com/packit/tmt-plans - ref: main - name: /plans/rpminspect -environment: - # upstream is excluded here because it triggers "Unexpected changed source archive content" - # This happens when the released version already contains the package version: - # https://github.com/packit/tmt-plans/issues/13 - RPMINSPECT_EXCLUDE: metadata,upstream -adjust: - when: distro == fedora-rawhide - because: Recently rpminspect fails to get the distro-tag - enabled: false diff --git a/.packit.yaml b/.packit.yaml index c6708ec1..d4a486b4 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -6,7 +6,6 @@ files_to_sync: - "protect .git*" - "protect sources" - "protect changelog" - - "- plans/rpminspect.fmf" - "- plans/rpmlint.fmf" - .packit.yaml From d058de7bc262d6d6cd95f5d1665f6226494812e4 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Fri, 30 Aug 2024 14:32:41 +0200 Subject: [PATCH 06/11] chore: Remove rpmlint distro check Signed-off-by: Cristian Le --- .distro/plans/rpmlint.fmf | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.distro/plans/rpmlint.fmf b/.distro/plans/rpmlint.fmf index a8d3df7c..1d28ff95 100644 --- a/.distro/plans/rpmlint.fmf +++ b/.distro/plans/rpmlint.fmf @@ -8,8 +8,3 @@ discover: ref: main execute: how: tmt - -adjust: - when: distro < fedora-39 - because: Rpmlint does not have spellcheck - enabled: false From 2a881444a417ac29b586effd20fc0e1eb56ef80c Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Mon, 8 Jul 2024 14:55:13 +0200 Subject: [PATCH 07/11] packit: Add epel-10 target Signed-off-by: Cristian Le --- .packit.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.packit.yaml b/.packit.yaml index d4a486b4..9fe573c5 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -17,6 +17,8 @@ upstream_tag_template: v{version} targets: &targets - fedora-all-x86_64 - fedora-all-aarch64 + - epel-10-x86_64 + - epel-10-aarch64 jobs: - &copr_build From b607ee3a6c454bf3a32432df9dfbf6f7e75a297f Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Fri, 30 Aug 2024 14:58:03 +0200 Subject: [PATCH 08/11] Temporarily disable epel-10 testing Signed-off-by: Cristian Le --- .distro/python-scikit-build-core.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.distro/python-scikit-build-core.spec b/.distro/python-scikit-build-core.spec index 2c502e04..3b4fef3a 100644 --- a/.distro/python-scikit-build-core.spec +++ b/.distro/python-scikit-build-core.spec @@ -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 @@ -55,7 +63,7 @@ It makes sure the dependencies are installed. %generate_buildrequires -%pyproject_buildrequires -x test,test-meta,test-numpy,pyproject +%pyproject_buildrequires -x pyproject%{?with_tests:,test,test-meta,test-numpy} %build @@ -68,8 +76,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} From 89862e36d148acb744e7c5021fc53356dc542fa9 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Fri, 30 Aug 2024 15:19:02 +0200 Subject: [PATCH 09/11] Disable testing-farm for epel-10 Does not seem to be ready yet Signed-off-by: Cristian Le --- .packit.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.packit.yaml b/.packit.yaml index 9fe573c5..d2b07116 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -28,6 +28,9 @@ jobs: job: tests trigger: pull_request fmf_path: .distro + targets: + - fedora-all-x86_64 + - fedora-all-aarch64 - <<: *copr_build trigger: release owner: "@scikit-build" From 7e3d62b56f14cc23910233d7aab598dfbc983e22 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Fri, 30 Aug 2024 15:13:57 +0200 Subject: [PATCH 10/11] Remove `python3-scikit-build-core+pyproject` subpackage Signed-off-by: Cristian Le --- .distro/python-scikit-build-core.rpmlintrc | 2 -- .distro/python-scikit-build-core.spec | 28 +++++++++------------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/.distro/python-scikit-build-core.rpmlintrc b/.distro/python-scikit-build-core.rpmlintrc index 8d11c14b..8a21da82 100644 --- a/.distro/python-scikit-build-core.rpmlintrc +++ b/.distro/python-scikit-build-core.rpmlintrc @@ -1,3 +1 @@ -addFilter("python.?-scikit-build-core\+pyproject.* spelling-error \('[Mm]etapackage") -addFilter("python.?-scikit-build-core\+.* no-documentation") addFilter("python.?-scikit-build-core.* files-duplicate .*__init__.py .*") diff --git a/.distro/python-scikit-build-core.spec b/.distro/python-scikit-build-core.spec index 3b4fef3a..8b0ddc39 100644 --- a/.distro/python-scikit-build-core.spec +++ b/.distro/python-scikit-build-core.spec @@ -35,27 +35,21 @@ A next generation Python CMake adapter and Python API for plugins Summary: %{summary} Requires: cmake Recommends: (ninja-build or make) -Recommends: python3-scikit-build-core+pyproject = %{version}-%{release} Suggests: ninja-build Suggests: gcc -BuildArch: noarch -%description -n python3-scikit-build-core %_description - -# Add %%pyproject_extras_subpkg results manually because BuildArch: noarch is not injected -# https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/174 -# %%pyproject_extras_subpkg -n python3-scikit-build-core pyproject - -%package -n python3-scikit-build-core+pyproject -Summary: Metapackage for python3-scikit-build-core: pyproject extras -Requires: python3-scikit-build-core = %{?epoch:%{epoch}:}%{version}-%{release} BuildArch: noarch -%description -n python3-scikit-build-core+pyproject -This is a metapackage bringing in pyproject extras requires for -python3-scikit-build-core. -It makes sure the dependencies are installed. -%files -n python3-scikit-build-core+pyproject -f %{_pyproject_ghost_distinfo} +# Deprecated extras/optional-dependencies +# Provides python3dist() do not seem to be generated, defining them manually +# Note: the version can be a bit off if the python metadata version is different than RPM. +# It shouldn't be an issue in this package. +%py_provides python3-scikit-build-core+pyproject +Provides: python3dist(scikit-build-core[pyproject]) = %{version} +Provides: python%{python3_version}dist(scikit-build-core[pyproject]) = %{version} +Obsoletes: python3-scikit-build-core+pyproject < 0.11.0-1%{?dist} + +%description -n python3-scikit-build-core %_description %prep @@ -63,7 +57,7 @@ It makes sure the dependencies are installed. %generate_buildrequires -%pyproject_buildrequires -x pyproject%{?with_tests:,test,test-meta,test-numpy} +%pyproject_buildrequires %{?with_tests:-x test,test-meta,test-numpy} %build From ae995252655ba8ccf501dfc79ded59c8cfaa732f Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Fri, 30 Aug 2024 19:08:47 +0200 Subject: [PATCH 11/11] Revert "Remove `python3-scikit-build-core+pyproject` subpackage" This reverts commit 7e3d62b56f14cc23910233d7aab598dfbc983e22. Signed-off-by: Cristian Le --- .distro/python-scikit-build-core.rpmlintrc | 2 ++ .distro/python-scikit-build-core.spec | 29 ++++++++++++++-------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.distro/python-scikit-build-core.rpmlintrc b/.distro/python-scikit-build-core.rpmlintrc index 8a21da82..8d11c14b 100644 --- a/.distro/python-scikit-build-core.rpmlintrc +++ b/.distro/python-scikit-build-core.rpmlintrc @@ -1 +1,3 @@ +addFilter("python.?-scikit-build-core\+pyproject.* spelling-error \('[Mm]etapackage") +addFilter("python.?-scikit-build-core\+.* no-documentation") addFilter("python.?-scikit-build-core.* files-duplicate .*__init__.py .*") diff --git a/.distro/python-scikit-build-core.spec b/.distro/python-scikit-build-core.spec index 8b0ddc39..50aaeedc 100644 --- a/.distro/python-scikit-build-core.spec +++ b/.distro/python-scikit-build-core.spec @@ -35,21 +35,30 @@ A next generation Python CMake adapter and Python API for plugins Summary: %{summary} Requires: cmake Recommends: (ninja-build or make) +Recommends: python3-scikit-build-core+pyproject = %{version}-%{release} Suggests: ninja-build Suggests: gcc - BuildArch: noarch +%description -n python3-scikit-build-core %_description -# Deprecated extras/optional-dependencies -# Provides python3dist() do not seem to be generated, defining them manually -# Note: the version can be a bit off if the python metadata version is different than RPM. -# It shouldn't be an issue in this package. -%py_provides python3-scikit-build-core+pyproject -Provides: python3dist(scikit-build-core[pyproject]) = %{version} -Provides: python%{python3_version}dist(scikit-build-core[pyproject]) = %{version} -Obsoletes: python3-scikit-build-core+pyproject < 0.11.0-1%{?dist} -%description -n python3-scikit-build-core %_description +# Add %%pyproject_extras_subpkg results manually because BuildArch: noarch is not injected +# https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/174 +# %%pyproject_extras_subpkg -n python3-scikit-build-core pyproject + +%package -n python3-scikit-build-core+pyproject +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. +It makes sure the dependencies are installed. + +%files -n python3-scikit-build-core+pyproject -f %{_pyproject_ghost_distinfo} %prep