diff --git a/pywbem.spec b/pywbem.spec index fdab326..e0e460a 100644 --- a/pywbem.spec +++ b/pywbem.spec @@ -8,7 +8,7 @@ Name: pywbem Version: 0.12.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python WBEM client interface and related utilities Group: Development/Libraries License: LGPLv2 @@ -81,7 +81,9 @@ twisted.protocols.http.HTTPClient base class. %setup -q -n %{name}-%{version} %build +%if %{with python2} cp -a . %{py2_build_dir} +%endif PBR_VERSION="%{version}" CFLAGS="%{optflags}" %{__python3} setup.py build @@ -93,28 +95,26 @@ popd %install rm -rf %{buildroot} -env PYTHONPATH=%{buildroot}/%{python3_sitelib} \ - PBR_VERSION="%{version}" \ - %{__python3} setup.py install -O1 --skip-build --root %{buildroot} -install -m644 LICENSE.txt \ - %{buildroot}/%{python3_sitelib}/pywbem/LICENSE.txt -rm -rf %{buildroot}/usr/bin/*.bat - %if %{with python2} pushd %{py2_build_dir} env PYTHONPATH=%{buildroot}/%{python2_sitelib} \ PBR_VERSION="%{version}" \ %{__python2} setup.py install -O1 --skip-build --root %{buildroot} -install -m644 LICENSE.txt \ - %{buildroot}/%{python2_sitelib}/pywbem/LICENSE.txt install -m644 attic/twisted_client.py \ %{buildroot}/%{python2_sitelib}/pywbem/twisted_client.py rm -rf %{buildroot}/usr/bin/ popd %endif +env PYTHONPATH=%{buildroot}/%{python3_sitelib} \ + PBR_VERSION="%{version}" \ + %{__python3} setup.py install -O1 --skip-build --root %{buildroot} +rm -rf %{buildroot}/usr/bin/*.bat + + %if %{with python2} %files -n python2-pywbem +%license LICENSE.txt %{python2_sitelib}/*.egg-info %{python2_sitelib}/pywbem/ %{python2_sitelib}/pywbem_mock/ @@ -124,6 +124,7 @@ popd %endif %files -n python3-pywbem +%license LICENSE.txt %{python3_sitelib}/*.egg-info %{python3_sitelib}/pywbem/ %{python3_sitelib}/pywbem_mock/ @@ -133,6 +134,10 @@ popd %doc README.rst %changelog +* Fri May 18 2018 Gris Ge - 0.12.2-3 +- Fix build failure on F28- where python2 is enabled. + Use %license macro. + * Fri May 18 2018 Gris Ge - 0.12.2-2 - Remove python2 for F29+. Add missing python3-pbr runtime requirement.