public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/pyproject-rpm-macros] f44: CI: Replace packages in double-install.spec with packages with extras
@ 2026-07-10 10:49 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-07-10 10:49 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/pyproject-rpm-macros
            Branch : f44
            Commit : 0e7ebe43dd74d5ef2e3769d66afaffb38a59f453
            Author : Miro Hrončok <miro@hroncok.cz>
            Date   : 2026-07-09T12:19:57+02:00
            Stats  : +40/-38 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/pyproject-rpm-macros/c/0e7ebe43dd74d5ef2e3769d66afaffb38a59f453?branch=f44

            Log:
            CI: Replace packages in double-install.spec with packages with extras

This allows us to test %pyproject_extras_subpkg -D.

Assisted-By: Claude Opus 4.6

---
diff --git a/tests/double-install.spec b/tests/double-install.spec
index 3bef819..cec520a 100644
--- a/tests/double-install.spec
+++ b/tests/double-install.spec
@@ -1,36 +1,39 @@
 Name:           double-install
 Version:        0
 Release:        0%{?dist}
-Summary:        Install 2 wheels
-License:        BSD-3-Clause AND MIT
-%global         markupsafe_version 2.0.1
-%global         tldr_version 0.4.4
-Source1:        https://github.com/pallets/markupsafe/archive/%{markupsafe_version}/MarkupSafe-%{markupsafe_version}.tar.gz
-Source2:        %{pypi_source tldr %{tldr_version}}
-
-BuildRequires:  gcc
+Summary:        Install 2 wheels with extras subpackages
+License:        MIT
+%global         markdown_it_py_version 3.0.0
+%global         setuptools_scm_version 6.3.2
+Source1:        https://github.com/executablebooks/markdown-it-py/archive/v%{markdown_it_py_version}/markdown-it-py-%{markdown_it_py_version}.tar.gz
+Source2:        %{pypi_source setuptools_scm %{setuptools_scm_version}}
+
+BuildArch:      noarch
 BuildRequires:  python3-devel
 
 %description
 This package tests that we can build and install 2 wheels at once.
-One of them is "noarch" and one has an extension module.
 This also tests the -d option for %%pyproject_buildrequires/%%pyproject_wheel
-and the -D option for %%pyproject_save_files/%%pyproject_check_import.
+and the -D option for %%pyproject_save_files/%%pyproject_check_import/%%pyproject_extras_subpkg.
 
 
-%package -n python3-double-markupsafe
-Summary:        MarkupSafe from double-install test
+%package -n python3-double-markdown-it-py
+Summary:        markdown-it-py from double-install test
 
-%description -n python3-double-markupsafe
-MarkupSafe subpackage.
+%description -n python3-double-markdown-it-py
+markdown-it-py subpackage.
 
+# Note: Throughout this spec, we use mixed case and -_ inconsistently in -D to assert it is correctly normalized
+%pyproject_extras_subpkg -n python3-double-markdown-it-py -D MARKDOWN-it_py linkify
 
-%package -n python3-double-tldr
-Summary:        tldr from double-install test
-BuildArch:      noarch
 
-%description -n python3-double-tldr
-tldr subpackage.
+%package -n python3-double-setuptools-scm
+Summary:        setuptools_scm from double-install test
+
+%description -n python3-double-setuptools-scm
+setuptools_scm subpackage.
+
+%pyproject_extras_subpkg -n python3-double-setuptools-scm -D Setuptools_scm toml
 
 
 %prep
@@ -40,13 +43,13 @@ tar xf %{SOURCE2}
 
 
 %generate_buildrequires
-%pyproject_buildrequires --no-runtime --directory markupsafe-%{markupsafe_version}
-%pyproject_buildrequires --directory tldr-%{tldr_version}
+%pyproject_buildrequires --extras linkify --pyproject-dependencies --directory markdown-it-py-%{markdown_it_py_version}
+%pyproject_buildrequires --extras toml --directory setuptools_scm-%{setuptools_scm_version}
 
 
 %build
-%pyproject_wheel --directory markupsafe-%{markupsafe_version}
-%pyproject_wheel --directory tldr-%{tldr_version}
+%pyproject_wheel --directory markdown-it-py-%{markdown_it_py_version}
+%pyproject_wheel --directory setuptools_scm-%{setuptools_scm_version}
 
 
 %install
@@ -55,29 +58,28 @@ set -o pipefail
 # This should install both the wheels:
 %pyproject_install
 ) 2>&1 | tee install.log
-%pyproject_save_files --dist-name markupsafe markupsafe
-%pyproject_save_files -D tldr tldr +auto
+%pyproject_save_files --dist-name markdown-it_Py markdown_it --no-assert-license
+%pyproject_save_files -D setuptools--SCM -l setuptools_scm
 
 
 %check
+%pyproject_check_import -D markdown_IT-py
+%pyproject_check_import -D setuptoolS-_scm
+
 # Internal check for the value of %%{pyproject_build_lib}
-cd markupsafe-%{markupsafe_version}
-%if 0%{?rhel} == 9
-test "%{pyproject_build_lib}" == "%{_builddir}/%{buildsubdir}/markupsafe-%{markupsafe_version}/build/lib.%{python3_platform}-%{python3_version}"
-%else
-test "%{pyproject_build_lib}" == "%{_builddir}/%{buildsubdir}/markupsafe-%{markupsafe_version}/build/lib.%{python3_platform}-cpython-%{python3_version_nodots}"
-%endif
-cd ../tldr-%{tldr_version}
-test "%{pyproject_build_lib}" == "%{_builddir}/%{buildsubdir}/tldr-%{tldr_version}/build/lib"
+cd setuptools_scm-%{setuptools_scm_version}
+test "%{pyproject_build_lib}" == "%{_builddir}/%{buildsubdir}/setuptools_scm-%{setuptools_scm_version}/build/lib"
 cd ..
 # Internal regression check for %%pyproject_install with multiple wheels
 grep 'binary operator expected' install.log && exit 1 || true
 grep 'too many arguments' install.log && exit 1 || true
-# Check that %%pyproject_check_import -D works
-%pyproject_check_import -D markupsafe
-%pyproject_check_import -D tldr
+
+# Internal check: per-package ghost distinfo files should exist with correct content
+test "$(cat %{_pyproject_ghost_distinfo -D markdown-it-py})" == "%ghost %dir %{python3_sitelib}/markdown_it_py-%{markdown_it_py_version}.dist-info"
+test "$(cat %{_pyproject_ghost_distinfo -D setuptools-scm})" == "%ghost %dir %{python3_sitelib}/setuptools_scm-%{setuptools_scm_version}.dist-info"
 
 
-%files -n python3-double-markupsafe -f %{pyproject_files -D markupsafe}
+%files -n python3-double-markdown-it-py -f %{pyproject_files -D Markdown_it-py}
+%{_bindir}/markdown-it
 
-%files -n python3-double-tldr -f %{pyproject_files --dist-name tldr}
+%files -n python3-double-setuptools-scm -f %{pyproject_files --dist-name setuptools_scm}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-10 10:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-10 10:49 [rpms/pyproject-rpm-macros] f44: CI: Replace packages in double-install.spec with packages with extras 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox