More improvements to the spec file

This commit is contained in:
Fabio Alessandro Locati 2016-01-06 18:47:40 +01:00
parent 4642dcb6bc
commit 1bd9c0d694

View File

@ -108,34 +108,21 @@ It has lots of other features though:
* A powerful unrepr mode for storing basic datatypes
%endif
%prep
%setup -q -n %{pypi_name}-%{version}
%setup -n %{pypi_name}-%{version}
cp %{SOURCE1} .
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
%build
%{__python} setup.py build
%py2_build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif
%py3_build
%endif # with_python3
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install --skip-build --root=$RPM_BUILD_ROOT
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
%endif
%py3_install
%endif # with_python3
%py2_install
#%check
# this needs to be set for tests.test_configobj.test_options_deprecation
@ -153,24 +140,20 @@ popd
#popd
#%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
# no docs untile upstream puts them in sdist again:
# https://github.com/DiffSK/configobj/issues/63
%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%files -n python2-%{pypi_name}
%{!?_licensedir:%global license %doc}
%doc
%license LICENSE
%{python_sitelib}/*
%{python2_sitelib}/*
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%if 0%{?with_python3}
%files -n python3-configobj
%defattr(-,root,root,-)
%files -n python3-%{pypi_name}
%doc
%license LICENSE
%{python3_sitelib}/*
%endif
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%endif # with_python3
%changelog
* Wed Jan 06 2016 Fabio Alessandro Locati <fabio@locati.cc> - 5.0.6-1