Remove redundant macro definitions

This commit is contained in:
Miro Hrončok 2023-11-21 11:48:33 +01:00
parent 7c7693548a
commit eaec904684

View File

@ -1,14 +1,11 @@
%global srcname psutil Name: python-psutil
%global sum A process and system utilities module for Python
Name: python-%{srcname}
Version: 5.9.5 Version: 5.9.5
Release: 2%{?dist} Release: 2%{?dist}
Summary: %{sum} Summary: A process and system utilities module for Python
License: BSD-3-Clause License: BSD-3-Clause
URL: https://github.com/giampaolo/psutil URL: https://github.com/giampaolo/psutil
Source0: %{url}/archive/release-%{version}/%{srcname}-%{version}.tar.gz Source0: %{url}/archive/release-%{version}/psutil-%{version}.tar.gz
# #
# skip 2 tests that fail in mock chroots # skip 2 tests that fail in mock chroots
# #
@ -42,7 +39,7 @@ ifconfig, nice, ionice, iostat, iotop, uptime, pidof, tty, who, taskset, pmap.
%package -n python%{python3_pkgversion}-psutil %package -n python%{python3_pkgversion}-psutil
Summary: %{sum} Summary: %{summary}
%description -n python%{python3_pkgversion}-psutil %description -n python%{python3_pkgversion}-psutil
@ -53,14 +50,14 @@ command line tools such as: ps, top, df, kill, free, lsof, free, netstat,
ifconfig, nice, ionice, iostat, iotop, uptime, pidof, tty, who, taskset, pmap. ifconfig, nice, ionice, iostat, iotop, uptime, pidof, tty, who, taskset, pmap.
%package -n python%{python3_pkgversion}-psutil-tests %package -n python%{python3_pkgversion}-psutil-tests
Summary: %{sum}, test suite Summary: %{summary}, test suite
Requires: python%{python3_pkgversion}-psutil%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: python%{python3_pkgversion}-psutil%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description -n python%{python3_pkgversion}-psutil-tests %description -n python%{python3_pkgversion}-psutil-tests
The test suite for psutil. The test suite for psutil.
%prep %prep
%autosetup -p1 -n %{srcname}-release-%{version} %autosetup -p1 -n psutil-release-%{version}
# Remove shebangs # Remove shebangs
find psutil -name \*.py | while read file; do find psutil -name \*.py | while read file; do
@ -90,15 +87,15 @@ done
make test APPVEYOR=1 PYTHON=%{__python3} PYTHONPATH=%{buildroot}/%{python3_sitearch} make test APPVEYOR=1 PYTHON=%{__python3} PYTHONPATH=%{buildroot}/%{python3_sitearch}
%endif %endif
%files -n python%{python3_pkgversion}-%{srcname} %files -n python%{python3_pkgversion}-psutil
%license LICENSE %license LICENSE
%doc CREDITS HISTORY.rst README.rst %doc CREDITS HISTORY.rst README.rst
%{python3_sitearch}/%{srcname}/ %{python3_sitearch}/psutil/
%{python3_sitearch}/%{srcname}-%{version}-py%{python3_version}.egg-info/ %{python3_sitearch}/psutil-%{version}-py%{python3_version}.egg-info/
%exclude %{python3_sitearch}/%{srcname}/tests %exclude %{python3_sitearch}/psutil/tests
%files -n python%{python3_pkgversion}-%{srcname}-tests %files -n python%{python3_pkgversion}-psutil-tests
%{python3_sitearch}/%{srcname}/tests/ %{python3_sitearch}/psutil/tests/
%changelog %changelog