Hello. I've just located
https://github.com/rpm-software-management/rpm/issues/1087 in
https://fedoraproject.org/wiki/Changes/RPM-4.20 and I've read
https://rpm-software-management.github.io/rpm/manual/buildsystem.html
I am trying to understand how to use this, so let's dive in.
Suppose I currently have this specfile simplified from
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_example_spec_file
```spec
Name: python-pello
Version: 1.0.4
Release: 1%{?dist}
Summary: Example Python library
License: MIT-0
URL: https://github.com/fedora-python/Pello
Source: %{url}/archive/v%{version}/Pello-%{version}.tar.gz
BuildArch: noarch
%description
...
%package -n python3-pello
Summary: %{summary}
Recommends: python3-pello+color
%description -n python3-pello
...
%pyproject_extras_subpkg -n python3-pello color
%prep
%autosetup -p1 -n Pello-%{version}
%generate_buildrequires
%pyproject_buildrequires -t
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files -l pello
%check
%pyproject_check_import
%tox
%files -n python3-pello -f %{pyproject_files}
%doc README.md
%{_bindir}/pello_greeting
%changelog
```
---
If I defined the following macros (in any macro file?):
```spec
%buildsystem_pyproject_generate_buildrequires(rRxtNwe:C:)
%pyproject_buildrequires %**
%buildsystem_pyproject_build(C:) %pyproject_wheel %**
%buildsystem_pyproject_install(l) %pyproject_install %["%**" == "" ? "" : "\
%pyproject_save_files %**"]
%buildsystem_pyproject_check(e:t) %pyproject_check_import %**
```
The spec could be simplified as such:
```spec
Name: python-pello
Version: 1.0.4
Release: 1%{?dist}
Summary: Example Python library
License: MIT-0
URL: https://github.com/fedora-python/Pello
Source: %{url}/archive/v%{version}/Pello-%{version}.tar.gz
BuildArch: noarch
BuildSystem: pyproject
BuildOption(prep): -n Pello-%{version}
BuildOption(install): -l pello
%description
...
%package -n python3-pello
Summary: %{summary}
Recommends: python3-pello+color
%description -n python3-pello
...
%pyproject_extras_subpkg -n python3-pello color
%check -a
%tox
%files -n python3-pello -f %{pyproject_files}
%doc README.md
%{_bindir}/pello_greeting
%changelog
```
Is that assumption correct?
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2997
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/repo-discussions/2...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint