# sitelib for noarch packages, sitearch for others (remove the unneeded one) %{!?__python2: %global __python2 %__python} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %global srcname pyradio %global debug_package %{nil} Name: %{srcname} Version: 0.8.3 Release: 1%{?dist} Summary: Command line internet radio player License: MIT URL: https://github.com/coderholic/pyradio/ Source0: https://github.com/coderholic/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: python3-devel %description Command line internet radio player. %package -n python3-%{srcname} Summary: Command line internet radio player %description -n python3-%{srcname} Command line internet radio player. %prep %autosetup -n %{srcname}-%{version} %build %py3_build %install rm -rf $RPM_BUILD_ROOT # Must do the python3 install first because the scripts in /usr/bin are # overwritten with every setup.py install (and we want the python2 version # to be the default for now). %py3_install %check #pushd python2 #%{__python2} setup.py test #popd # #%if %{with python3} #pushd python3 #%{__python3} setup.py test #popd #%endif %files -n python3-%{srcname} %license LICENCE %doc README.md build.md # For noarch packages: sitelib %{_bindir}/pyradio %{python3_sitelib}/* # For arch-specific packages: sitearch %changelog * Tue Nov 5 2019 L.L.Robinson -