From a00386779fed54898a3ebdda0bbddb90e6ce10ab Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Thu, 12 Sep 2024 10:29:56 +0200 Subject: [PATCH 1/5] Fix downstream tmt test Signed-off-by: Cristian Le --- .distro/plans/smoke.fmf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.distro/plans/smoke.fmf b/.distro/plans/smoke.fmf index 57874e55..3a47306a 100644 --- a/.distro/plans/smoke.fmf +++ b/.distro/plans/smoke.fmf @@ -1,3 +1,6 @@ +/: + inherit: false + summary: Basic smoke tests discover: From b483457c342b5843dc8146f01fc925779e2ca621 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Thu, 12 Sep 2024 10:36:29 +0200 Subject: [PATCH 2/5] Reformat fmf files to be more yaml-like Signed-off-by: Cristian Le --- .distro/plans/examples.fmf | 3 +-- .distro/plans/smoke.fmf | 3 +-- .distro/tests/smoke.fmf | 1 + docs/examples/downstream/nanobind_example/main.fmf | 3 +-- docs/examples/downstream/pybind11_example/main.fmf | 3 +-- docs/examples/getting_started/abi3/main.fmf | 3 +-- docs/examples/getting_started/c/main.fmf | 3 +-- docs/examples/getting_started/cython/main.fmf | 3 +-- docs/examples/getting_started/fortran/main.fmf | 3 +-- docs/examples/getting_started/nanobind/main.fmf | 3 +-- docs/examples/getting_started/pybind11/main.fmf | 3 +-- docs/examples/getting_started/swig/main.fmf | 3 +-- 12 files changed, 12 insertions(+), 22 deletions(-) diff --git a/.distro/plans/examples.fmf b/.distro/plans/examples.fmf index d6f69135..96d0d552 100644 --- a/.distro/plans/examples.fmf +++ b/.distro/plans/examples.fmf @@ -1,5 +1,4 @@ -summary: - Documentation examples +summary: Documentation examples discover+: how: fmf filter: "tag: examples" diff --git a/.distro/plans/smoke.fmf b/.distro/plans/smoke.fmf index 3a47306a..5de047e6 100644 --- a/.distro/plans/smoke.fmf +++ b/.distro/plans/smoke.fmf @@ -1,8 +1,7 @@ /: inherit: false -summary: - Basic smoke tests +summary: Basic smoke tests discover: how: fmf filter: "tag: smoke" diff --git a/.distro/tests/smoke.fmf b/.distro/tests/smoke.fmf index 32359ea1..a5f558ed 100644 --- a/.distro/tests/smoke.fmf +++ b/.distro/tests/smoke.fmf @@ -5,4 +5,5 @@ path: / # Define tests /version: + summary: Read version test: python3 -c "import scikit_build_core; print(scikit_build_core.__version__)" diff --git a/docs/examples/downstream/nanobind_example/main.fmf b/docs/examples/downstream/nanobind_example/main.fmf index 87076756..2a12130f 100644 --- a/docs/examples/downstream/nanobind_example/main.fmf +++ b/docs/examples/downstream/nanobind_example/main.fmf @@ -1,5 +1,4 @@ -summary: - Nanobind downstream example +summary: Nanobind downstream example adjust: enabled: false because: Nanobind is not yet packaged on Fedora diff --git a/docs/examples/downstream/pybind11_example/main.fmf b/docs/examples/downstream/pybind11_example/main.fmf index a1537669..c0cbbe0e 100644 --- a/docs/examples/downstream/pybind11_example/main.fmf +++ b/docs/examples/downstream/pybind11_example/main.fmf @@ -1,5 +1,4 @@ -summary: - Pybind downstream example +summary: Pybind downstream example require+: - gcc-c++ - pybind11-devel diff --git a/docs/examples/getting_started/abi3/main.fmf b/docs/examples/getting_started/abi3/main.fmf index 2f802f46..70d87b70 100644 --- a/docs/examples/getting_started/abi3/main.fmf +++ b/docs/examples/getting_started/abi3/main.fmf @@ -1,2 +1 @@ -summary: - Abi3 example project +summary: Abi3 example project diff --git a/docs/examples/getting_started/c/main.fmf b/docs/examples/getting_started/c/main.fmf index 29dfa4f5..70765c17 100644 --- a/docs/examples/getting_started/c/main.fmf +++ b/docs/examples/getting_started/c/main.fmf @@ -1,2 +1 @@ -summary: - C example project +summary: C example project diff --git a/docs/examples/getting_started/cython/main.fmf b/docs/examples/getting_started/cython/main.fmf index 5c45fc9e..ea1e375e 100644 --- a/docs/examples/getting_started/cython/main.fmf +++ b/docs/examples/getting_started/cython/main.fmf @@ -1,4 +1,3 @@ -summary: - Cython example project +summary: Cython example project require+: - python3-cython diff --git a/docs/examples/getting_started/fortran/main.fmf b/docs/examples/getting_started/fortran/main.fmf index 4ee34e63..1bf9c545 100644 --- a/docs/examples/getting_started/fortran/main.fmf +++ b/docs/examples/getting_started/fortran/main.fmf @@ -1,5 +1,4 @@ -summary: - F2PY example project +summary: F2PY example project require+: - gcc-gfortran - python3-numpy diff --git a/docs/examples/getting_started/nanobind/main.fmf b/docs/examples/getting_started/nanobind/main.fmf index fea0ee29..97564313 100644 --- a/docs/examples/getting_started/nanobind/main.fmf +++ b/docs/examples/getting_started/nanobind/main.fmf @@ -1,5 +1,4 @@ -summary: - Nanobind example project +summary: Nanobind example project adjust: enabled: false because: Nanobind is not yet packaged on Fedora diff --git a/docs/examples/getting_started/pybind11/main.fmf b/docs/examples/getting_started/pybind11/main.fmf index 28197eea..6cd5a544 100644 --- a/docs/examples/getting_started/pybind11/main.fmf +++ b/docs/examples/getting_started/pybind11/main.fmf @@ -1,5 +1,4 @@ -summary: - Pybind example project +summary: Pybind example project require+: - gcc-c++ - pybind11-devel diff --git a/docs/examples/getting_started/swig/main.fmf b/docs/examples/getting_started/swig/main.fmf index 9d977fff..ba84f71a 100644 --- a/docs/examples/getting_started/swig/main.fmf +++ b/docs/examples/getting_started/swig/main.fmf @@ -1,4 +1,3 @@ -summary: - Swig example project +summary: Swig example project require+: - swig From e9532323665d396596cf67faa2392c524a655194 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Thu, 12 Sep 2024 10:41:01 +0200 Subject: [PATCH 3/5] Run example tests in venv Signed-off-by: Cristian Le --- docs/examples/test.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/examples/test.sh b/docs/examples/test.sh index 124ca280..c7fc6e8d 100755 --- a/docs/examples/test.sh +++ b/docs/examples/test.sh @@ -12,13 +12,15 @@ rlJournalStart fi rlRun "pushd $tmp" rlRun "tree" 0 "Show directory tree" + rlRun "python3 -m venv .venv --system-site-packages" 0 "Create venv with system packages" + rlRun "source .venv/bin/activate" 0 "Activate venv" rlRun "set -o pipefail" rlPhaseEnd rlPhaseStartTest - rlRun "pip install --user . --config-settings=cmake.verbose=true --no-index --no-build-isolation" 0 "Build the python project" + rlRun "pip install . -v --config-settings=cmake.verbose=true --no-index --no-build-isolation" 0 "Build the python project" if [ "${HAS_PYTEST}" == True ]; then - rlRun "pytest" 0 "Run built-in pytest" + rlRun "python3 -m pytest" 0 "Run built-in pytest" else rlRun "python3 test.py" 0 "Test project is installed correctly" fi From c1ac625cc3a8e0459065e3f8424af33d07373039 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Thu, 12 Sep 2024 10:51:32 +0200 Subject: [PATCH 4/5] Use provides namespaces Signed-off-by: Cristian Le --- docs/examples/downstream/nanobind_example/main.fmf | 2 +- docs/examples/downstream/pybind11_example/main.fmf | 2 +- docs/examples/getting_started/cython/main.fmf | 2 +- docs/examples/getting_started/fortran/main.fmf | 2 +- docs/examples/getting_started/nanobind/main.fmf | 2 +- docs/examples/getting_started/pybind11/main.fmf | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/examples/downstream/nanobind_example/main.fmf b/docs/examples/downstream/nanobind_example/main.fmf index 2a12130f..7365fa7f 100644 --- a/docs/examples/downstream/nanobind_example/main.fmf +++ b/docs/examples/downstream/nanobind_example/main.fmf @@ -3,4 +3,4 @@ adjust: enabled: false because: Nanobind is not yet packaged on Fedora #require+: -# - python3-nanobind +# - python3dist(nanobind) diff --git a/docs/examples/downstream/pybind11_example/main.fmf b/docs/examples/downstream/pybind11_example/main.fmf index c0cbbe0e..f0732e32 100644 --- a/docs/examples/downstream/pybind11_example/main.fmf +++ b/docs/examples/downstream/pybind11_example/main.fmf @@ -1,4 +1,4 @@ summary: Pybind downstream example require+: - gcc-c++ - - pybind11-devel + - python3dist(pybind11) diff --git a/docs/examples/getting_started/cython/main.fmf b/docs/examples/getting_started/cython/main.fmf index ea1e375e..4c81569b 100644 --- a/docs/examples/getting_started/cython/main.fmf +++ b/docs/examples/getting_started/cython/main.fmf @@ -1,3 +1,3 @@ summary: Cython example project require+: - - python3-cython + - python3dist(cython) diff --git a/docs/examples/getting_started/fortran/main.fmf b/docs/examples/getting_started/fortran/main.fmf index 1bf9c545..0bf94bfc 100644 --- a/docs/examples/getting_started/fortran/main.fmf +++ b/docs/examples/getting_started/fortran/main.fmf @@ -1,5 +1,5 @@ summary: F2PY example project require+: - gcc-gfortran - - python3-numpy + - python3dist(numpy) - python3-numpy-f2py diff --git a/docs/examples/getting_started/nanobind/main.fmf b/docs/examples/getting_started/nanobind/main.fmf index 97564313..9f8391d4 100644 --- a/docs/examples/getting_started/nanobind/main.fmf +++ b/docs/examples/getting_started/nanobind/main.fmf @@ -3,4 +3,4 @@ adjust: enabled: false because: Nanobind is not yet packaged on Fedora #require+: -# - python3-nanobind +# - python3dist(nanobind) diff --git a/docs/examples/getting_started/pybind11/main.fmf b/docs/examples/getting_started/pybind11/main.fmf index 6cd5a544..2308fa3f 100644 --- a/docs/examples/getting_started/pybind11/main.fmf +++ b/docs/examples/getting_started/pybind11/main.fmf @@ -1,4 +1,4 @@ summary: Pybind example project require+: - gcc-c++ - - pybind11-devel + - python3dist(pybind11) From 63acea607fb4a59e9f6e1d6495dcf947450ba2a5 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Wed, 2 Oct 2024 10:37:44 +0200 Subject: [PATCH 5/5] Update test flags to `build.verbose` Signed-off-by: Cristian Le --- docs/examples/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/test.sh b/docs/examples/test.sh index c7fc6e8d..afcee161 100755 --- a/docs/examples/test.sh +++ b/docs/examples/test.sh @@ -18,7 +18,7 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest - rlRun "pip install . -v --config-settings=cmake.verbose=true --no-index --no-build-isolation" 0 "Build the python project" + rlRun "pip install . -v --config-settings=build.verbose=true --no-index --no-build-isolation" 0 "Build the python project" if [ "${HAS_PYTEST}" == True ]; then rlRun "python3 -m pytest" 0 "Run built-in pytest" else