Tomáš Chvátal 2018-08-06 10:29:46 +00:00 committed by Git OBS Bridge
parent 7629c27232
commit 7830cda8ef

View File

@ -56,7 +56,6 @@ BuildRequires: %{python_module virtualenv >= 14.0.6}
BuildRequires: %{python_module wheel} BuildRequires: %{python_module wheel}
BuildRequires: git BuildRequires: git
BuildRequires: gpg2 BuildRequires: gpg2
Requires: this-is-only-for-build-envs
%endif %endif
%python_subpackages %python_subpackages
@ -80,11 +79,13 @@ chmod -x pbr/tests/testpackage/setup.py
%python_build %python_build
%install %install
%if !%{with test}
%python_install %python_install
%python_expand rm -rf %{buildroot}%{$python_sitelib}/pbr/tests %python_expand rm -rf %{buildroot}%{$python_sitelib}/pbr/tests
%python_clone -a %{buildroot}%{_bindir}/pbr %python_clone -a %{buildroot}%{_bindir}/pbr
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test} %if %{with test}
%check %check
@ -94,17 +95,21 @@ $python %{_bindir}/testr run --parallel
} }
%endif %endif
%if !%{with test}
%post %post
%python_install_alternative pbr %python_install_alternative pbr
%postun %postun
%python_uninstall_alternative pbr %python_uninstall_alternative pbr
%endif
%files %{python_files} %files %{python_files}
%license LICENSE %license LICENSE
%if !%{with test}
%doc AUTHORS ChangeLog CONTRIBUTING.rst README.rst %doc AUTHORS ChangeLog CONTRIBUTING.rst README.rst
%python_alternative %{_bindir}/pbr %python_alternative %{_bindir}/pbr
%{python_sitelib}/pbr %{python_sitelib}/pbr
%{python_sitelib}/pbr-%{version}-py%{python_version}.egg-info %{python_sitelib}/pbr-%{version}-py%{python_version}.egg-info
%endif
%changelog %changelog