%global modname anytree Name: python-anytree Version: 2.7.2 Release: 1%{?dist} Summary: Powerful and Lightweight Python Tree Data Structure License: ASL 2.0 URL: https://pypi.io/project/anytree Source0: %pypi_source %{modname} # This is missing from the source tree: https://github.com/c0fec0de/anytree/pull/104 Source1: https://raw.githubusercontent.com/lkundrak/anytree/%{version}/LICENSE BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools %description Powerful and Lightweight Python Tree Data Structure with various plugins. %package -n python3-anytree Summary: Powerful and Lightweight Python Tree Data Structure %description -n python3-anytree Powerful and Lightweight Python Tree Data Structure with various plugins. %prep %setup -q -n %{modname}-%{version} rm -r %{modname}.egg-info install -pm644 %{SOURCE1} LICENSE %build %{__python3} setup.py build %install %{__python3} setup.py install -O1 --skip-build --root=%{buildroot} %files -n python3-anytree %{python3_sitelib}/%{modname}/ %{python3_sitelib}/%{modname}-%{version}* %doc README.rst %doc LICENSE %changelog * Sun Nov 03 2019 Lubomir Rintel - 2.7.2-1 - Initial packaging