diff --git a/python-pyghmi.spec b/python-pyghmi.spec index 956e26d..66bce7b 100644 --- a/python-pyghmi.spec +++ b/python-pyghmi.spec @@ -1,4 +1,3 @@ -%global with_python3 1 %global sname pyghmi %global common_summary Python General Hardware Management Initiative (IPMI and others) @@ -12,11 +11,10 @@ incorporate the pyghmi library into a Python application. Summary: %{common_summary} Name: python-%{sname} Version: %{?version:%{version}}%{!?version:1.2.4} -Release: 3%{?dist} +Release: 4%{?dist} Source0: http://tarballs.openstack.org/%{sname}/%{sname}-%{version}.tar.gz License: ASL 2.0 Group: Development/Libraries -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Url: https://git.openstack.org/cgit/openstack/pyghmi @@ -24,28 +22,6 @@ Url: https://git.openstack.org/cgit/openstack/pyghmi %description %{common_desc} -%package -n python2-%{sname} -Summary: %{common_summary} -%{?python_provide:%python_provide python2-%{sname}} - -BuildRequires: python2-devel -BuildRequires: python2-pbr -BuildRequires: python2-setuptools - -Requires: python2-cryptography >= 2.1 - -%description -n python2-%{sname} -%{common_desc} - -%package -n python2-%{sname}-tests -Summary: %{common_desc_tests} -Requires: python2-%{sname} = %{version}-%{release} - -%description -n python2-%{sname}-tests -%{common_desc_tests} - -%if 0%{?with_python3} - %package -n python3-%{sname} Summary: %{common_summary} %{?python_provide:%python_provide python3-%{sname}} @@ -53,6 +29,8 @@ Summary: %{common_summary} BuildRequires: python3-devel BuildRequires: python3-pbr BuildRequires: python3-setuptools +BuildRequires: python3-sphinx +BuildRequires: python3-cryptography Requires: python3-cryptography >= 2.1 @@ -66,13 +44,9 @@ Requires: python3-%{sname} = %{version}-%{release} %description -n python3-%{sname}-tests %{common_desc_tests} -%endif # with_python3 - %package -n python-%{sname}-doc Summary: The pyghmi library documentation -BuildRequires: python2-sphinx - %description -n python-%{sname}-doc Documentation for the pyghmi library @@ -80,44 +54,33 @@ Documentation for the pyghmi library %setup -qn %{sname}-%{version} %build -%if 0%{?with_python3} %py3_build -%endif # with_python3 -%py2_build - -# 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} %install -%if 0%{?with_python3} %py3_install # rename python3 binary pushd %{buildroot}/%{_bindir} mv pyghmicons pyghmicons-%{python3_version} ln -s pyghmicons-%{python3_version} pyghmicons-3 +ln -s pyghmicons-3 pyghmicons mv pyghmiutil pyghmiutil-%{python3_version} ln -s pyghmiutil-%{python3_version} pyghmiutil-3 +ln -s pyghmiutil-3 pyghmiutil mv virshbmc virshbmc-%{python3_version} ln -s virshbmc-%{python3_version} virshbmc-3 +ln -s virshbmc-3 virshbmc popd -%endif # with_python3 - -%py2_install - -%if 0%{?with_python3} %files -n python3-%{sname} %license LICENSE -%{_bindir}/pyghmicons-%{python3_version} -%{_bindir}/pyghmicons-3 -%{_bindir}/pyghmiutil-%{python3_version} -%{_bindir}/pyghmiutil-3 -%{_bindir}/virshbmc-%{python3_version} -%{_bindir}/virshbmc-3 +%{_bindir}/pyghmicons* +%{_bindir}/pyghmiutil* +%{_bindir}/virshbmc* %{python3_sitelib}/%{sname} %{python3_sitelib}/%{sname}-*.egg-info %exclude %{python3_sitelib}/%{sname}/tests @@ -125,26 +88,16 @@ popd %files -n python3-%{sname}-tests %license LICENSE %{python3_sitelib}/%{sname}/tests -%endif # with_python3 - -%files -n python2-%{sname} -%license LICENSE -%{_bindir}/pyghmicons -%{_bindir}/pyghmiutil -%{_bindir}/virshbmc -%{python2_sitelib}/%{sname} -%{python2_sitelib}/%{sname}-*.egg-info -%exclude %{python2_sitelib}/%{sname}/tests - -%files -n python2-%{sname}-tests -%license LICENSE -%{python2_sitelib}/%{sname}/tests %files -n python-%{sname}-doc %license LICENSE %doc doc/build/html README.md %changelog +* Thu Oct 11 2018 Zbigniew Jędrzejewski-Szmek - 1.2.4-4 +- Python2 binary package has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + * Tue Aug 14 2018 Ilya Etingof - 1.2.4-3 - Added Python 3 build