diff --git a/python-rpmfluff.spec b/python-rpmfluff.spec index 8366965..8ab4481 100644 --- a/python-rpmfluff.spec +++ b/python-rpmfluff.spec @@ -1,5 +1,9 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%if 0%{?fedora} +%global with_python3 1 +%endif + Name: python-rpmfluff Version: 0.4.3 Release: 3%{?dist} @@ -26,6 +30,7 @@ It can also be used to construct test cases for package management software such as rpm and yum. +%if 0%{?with_python3} %package -n python3-rpmfluff Summary: Lightweight way of building RPMs, and sabotaging them BuildRequires: python3 @@ -44,6 +49,7 @@ It can also be used to construct test cases for package management software such as rpm and yum. This is the Python 3 version of the package. +%endif %prep %setup -qc @@ -63,9 +69,11 @@ pushd python2 %{__python2} setup.py build popd +%if 0%{?with_python3} pushd python3 %{__python3} setup.py build popd +%endif %install @@ -74,9 +82,11 @@ pushd python2 %{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT popd +%if 0%{?with_python3} pushd python3 %{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT popd +%endif %clean @@ -91,6 +101,7 @@ rm -rf $RPM_BUILD_ROOT %{python2_sitelib}/rpmfluff*.egg-info +%if 0%{?with_python3} %files -n python3-rpmfluff %defattr(-,root,root,-) %doc README @@ -98,6 +109,7 @@ rm -rf $RPM_BUILD_ROOT %{python3_sitelib}/rpmfluff.py* %{python3_sitelib}/__pycache__/rpmfluff.* %{python3_sitelib}/rpmfluff*.egg-info +%endif %changelog * Thu Feb 04 2016 Fedora Release Engineering - 0.4.3-3