diff --git a/python-mistralclient.spec b/python-mistralclient.spec index 6c6dbe9..0a525a3 100644 --- a/python-mistralclient.spec +++ b/python-mistralclient.spec @@ -1,10 +1,7 @@ %global pypi_name mistralclient %global cliname mistral -%{!?python2_shortver: %global python2_shortver %(%{__python2} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')} - %if 0%{?fedora} -%global with_python3 1 %{!?python3_shortver: %global python3_shortver %(%{__python3} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')} %endif @@ -16,7 +13,7 @@ and Command Line Interface (CLI) library. Name: python-%{pypi_name} Version: 3.2.0 -Release: 3 +Release: 4 Summary: Python client for Mistral REST API License: ASL 2.0 @@ -28,39 +25,6 @@ BuildArch: noarch %description %{common_desc} -%package -n python2-%{pypi_name} - -BuildRequires: python2-devel -BuildRequires: python2-setuptools -BuildRequires: python2-pbr -BuildRequires: git - -Requires: python2-osc-lib >= 1.8.0 -Requires: python2-oslo-i18n >= 3.15.3 -Requires: python2-oslo-utils >= 3.33.0 -Requires: python2-osprofiler -Requires: python2-pbr -Requires: python2-requests >= 2.14.2 -Requires: python2-six >= 1.10.0 -Requires: python2-stevedore >= 1.20.0 -Requires: python2-keystoneauth1 >= 3.3.0 -%if 0%{?fedora} > 0 -Requires: python2-cliff >= 2.8.0 -Requires: python2-pyyaml >= 3.10 -%else -Requires: python-cliff >= 2.8.0 -Requires: PyYAML >= 3.10 -%endif - -Summary: Python client for Mistral REST API -%{?python_provide:%python_provide python2-%{pypi_name}} - -%description -n python2-%{pypi_name} -%{common_desc} - - -# Python3 package -%if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: Python client for Mistral REST API %{?python_provide:%python_provide python3-%{pypi_name}} @@ -83,7 +47,6 @@ Requires: python3-keystoneauth1 >= 3.3.0 %description -n python3-%{pypi_name} %{common_desc} -%endif %if 0%{?fedora} == 0 @@ -91,25 +54,18 @@ Requires: python3-keystoneauth1 >= 3.3.0 %package -n python-%{pypi_name}-doc Summary: Documentation for python client for Mistral REST API -BuildRequires: python2-sphinx -BuildRequires: python2-openstackdocstheme -BuildRequires: python2-tempest -BuildRequires: python2-oslotest -BuildRequires: python2-stevedore -BuildRequires: python2-oslo-utils -BuildRequires: python2-oslo-i18n -BuildRequires: python2-osc-lib -BuildRequires: python2-osprofiler -%if 0%{?fedora} > 0 -BuildRequires: python2-pyyaml -BuildRequires: python2-cliff -BuildRequires: python2-requests-mock -%else -BuildRequires: PyYAML -BuildRequires: python-cliff -BuildRequires: python-requests-mock -%endif - +BuildRequires: python3-sphinx +BuildRequires: python3-openstackdocstheme +BuildRequires: python3-tempest +BuildRequires: python3-oslotest +BuildRequires: python3-stevedore +BuildRequires: python3-oslo-utils +BuildRequires: python3-oslo-i18n +BuildRequires: python3-osc-lib +BuildRequires: python3-osprofiler +BuildRequires: python3-pyyaml +BuildRequires: python3-cliff +BuildRequires: python3-requests-mock %description -n python-%{pypi_name}-doc %{common_desc} @@ -125,63 +81,31 @@ rm -rf %{pypi_name}.egg-info rm -f test-requirements.txt requirements.txt %build -%{__python2} setup.py build -%if 0%{?with_python3} %py3_build -%endif %if 0%{?fedora} == 0 # generate html docs -%{__python2} setup.py build_sphinx -b html +%{__python3} setup.py build_sphinx -b html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} %endif %install -%if 0%{?with_python3} %py3_install -mv %{buildroot}%{_bindir}/%{cliname} %{buildroot}%{_bindir}/python3-%{cliname} -%endif -%{__python2} setup.py install --skip-build --root %{buildroot} - -# rename binaries, make compat symlinks -pushd %{buildroot}%{_bindir} -for i in %{cliname}-{2,%{?python2_shortver}}; do - ln -s %{cliname} $i -done -%if 0%{?with_python3} -for i in %{cliname}-{3,%{?python3_shortver}}; do - ln -s python3-%{cliname} $i -done -%endif -popd + # Install bash completion scripts mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/ install -m 644 -T tools/mistral.bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/python-mistralclient - -%files -n python2-%{pypi_name} -%license LICENSE -%doc README.rst -%{python2_sitelib}/%{pypi_name} -%{python2_sitelib}/python_%{pypi_name}-*-py?.?.egg-info -%{_bindir}/mistral -%{_bindir}/mistral-2* -%{_sysconfdir}/bash_completion.d/python-mistralclient - - -# Files for python3 -%if 0%{?with_python3} %files -n python3-%{pypi_name} %license LICENSE %doc README.rst -%{_bindir}/python3-mistral* -%{_bindir}/mistral-3* +%{_bindir}/mistral %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/python_%{pypi_name}-*-py?.?.egg-info -%endif +%{_sysconfdir}/bash_completion.d/python-mistralclient %if 0%{?fedora} == 0 %files -n python-%{pypi_name}-doc @@ -191,6 +115,10 @@ install -m 644 -T tools/mistral.bash_completion %{buildroot}%{_sysconfdir}/bash_ %changelog +* Mon Nov 19 2018 Miro HronĨok - 3.2.0-4 +- Subpackage python2-mistralclient has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + * Sat Jul 14 2018 Fedora Release Engineering - 3.2.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild