Files
python3-pyp2spec-rpm/pyp2spec.spec
T
demus c347a40712
Build and provide rpm of python3-pyp2spec-rpm / rpmbuild (release) Failing after 48s
Convert to %autorelease and %autochangelog
[skip changelog]
2025-04-07 20:42:59 +02:00

60 lines
1.2 KiB
RPMSpec

Name: pyp2spec
Version: 0.12.1
Release: %autorelease
Summary: Generate Fedora RPM spec files for Python projects
# Code is MIT, templates and files generated by the tool MIT-0
License: MIT AND MIT-0
URL: https://github.com/danieldemus/pyp2spec
Source0: %{pypi_source pyp2spec}
BuildArch: noarch
BuildRequires: python3-devel
%description
pyp2spec is a tech preview. It is a tool generating Fedora RPM spec files
for Python distributions. It utilizes the benefits of pyproject-rpm-macros.
%prep
%autosetup -p1 -n pyp2spec-%{version}
## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 1;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
%generate_buildrequires
%pyproject_buildrequires -t
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files pyp2spec -l
%check
%tox
%files -f %{pyproject_files}
%doc README.md
%{_bindir}/pyp2spec
%{_bindir}/conf2spec
%{_bindir}/pyp2conf
%changelog
%autochangelog