python-distro/python-distro.spec

60 lines
1.6 KiB
RPMSpec

Name: python-distro
Version: 1.5.0
Release: 1mamba
Summary: An OS platform information API
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/nir0s/distro
Source: https://pypi.debian.net/distro/distro-%{version}.tar.gz
License: Apache License 2.0
## AUTOBUILDREQ-BEGIN
BuildRequires: libpython-devel
## AUTOBUILDREQ-END
Requires: python >= %python_version
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
%{summary}.
%if 0%{?with_pyver}
%pyver_package
%endif
%prep
%setup -q -n distro-%{version}
%build
CFLAGS="%{optflags}" %{__python} setup.py build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} setup.py install \
-O1 --skip-build \
--root="%{buildroot}" \
--install-headers=%{python_inc} \
--install-lib=%{python_sitearch} \
--record=%{name}.filelist
sed -i "s,.*/man/.*,&.gz," %{name}.filelist
%if "%{?pyappend}" != "py3"
rm -f %{buildroot}%{_bindir}/distro
sed -i "/\/usr\/bin\/distro/d" %{name}.filelist
%endif
%files %{?pyappend} -f %{name}.filelist
%defattr(-,root,root)
%doc LICENSE
%changelog
* Sun Apr 26 2020 Automatic Build System <autodist@mambasoft.it> 1.5.0-1mamba
- automatic version update by autodist
* Sat Apr 11 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 1.4.0-2mamba
- fix conflicting /usr/bin/distro file
* Wed Oct 23 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 1.4.0-1mamba
- package created using the webbuild interface