Import from Centos
This commit is contained in:
parent
d940b72b39
commit
ef49201830
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/pyghmi-1.0.12.tar.gz
|
/pyghmi-1.0.12.tar.gz
|
||||||
/pyghmi-1.0.22.tar.gz
|
/pyghmi-1.0.22.tar.gz
|
||||||
|
/pyghmi-1.2.16.tar.gz
|
||||||
|
@ -1,62 +1,208 @@
|
|||||||
|
%{?python_enable_dependency_generator}
|
||||||
%global sname pyghmi
|
%global sname pyghmi
|
||||||
|
%global common_summary Python General Hardware Management Initiative (IPMI and others)
|
||||||
|
|
||||||
|
%global common_desc This is a pure Python implementation of IPMI protocol. \
|
||||||
|
\
|
||||||
|
The included pyghmicons and pyghmiutil scripts demonstrate how one may \
|
||||||
|
incorporate the pyghmi library into a Python application.
|
||||||
|
|
||||||
|
%global common_desc_tests Tests for the pyghmi library
|
||||||
|
|
||||||
|
# Enable python3 build in fedora and rhel>7 and python2 only for rhel=7
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||||
|
%global with_python3 1
|
||||||
|
%global with_python2 0
|
||||||
|
%else
|
||||||
|
%global with_python3 0
|
||||||
|
%global with_python2 1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Summary: %{common_summary}
|
||||||
Name: python-%{sname}
|
Name: python-%{sname}
|
||||||
Version: 1.0.22
|
Version: %{?version:%{version}}%{!?version:1.2.16}
|
||||||
Release: 2%{?dist}
|
Release: 4%{?dist}
|
||||||
Provides: python3-pyghmi = %{version}-%{release}
|
|
||||||
Summary: Python General Hardware Management Initiative (IPMI and others)
|
|
||||||
|
|
||||||
License: ASL 2.0
|
|
||||||
URL: https://github.com/stackforge/pyghmi
|
|
||||||
Source0: http://tarballs.openstack.org/%{sname}/%{sname}-%{version}.tar.gz
|
Source0: http://tarballs.openstack.org/%{sname}/%{sname}-%{version}.tar.gz
|
||||||
|
License: ASL 2.0
|
||||||
|
Prefix: %{_prefix}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
Url: https://git.openstack.org/cgit/openstack/pyghmi
|
||||||
|
|
||||||
%global _description\
|
%description
|
||||||
This is a pure python implementation of the IPMI protocol.\
|
%{common_desc}
|
||||||
|
|
||||||
%description %_description
|
%if 0%{?with_python2}
|
||||||
|
%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}
|
||||||
|
|
||||||
|
%endif # with_python2
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
|
||||||
%package -n python3-%{sname}
|
%package -n python3-%{sname}
|
||||||
Summary: Python General Hardware Management Initiative (IPMI and others)
|
Summary: %{common_summary}
|
||||||
|
%{?python_provide:%python_provide python3-%{sname}}
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
|
||||||
BuildRequires: python3-pbr
|
BuildRequires: python3-pbr
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
|
||||||
Requires: python3-crypto >= 2.6
|
Requires: python3-cryptography >= 2.1
|
||||||
|
|
||||||
%description -n python3-%{sname} %_description
|
%description -n python3-%{sname}
|
||||||
|
%{common_desc}
|
||||||
|
|
||||||
|
%package -n python3-%{sname}-tests
|
||||||
|
Summary: %{common_desc_tests}
|
||||||
|
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
|
||||||
|
|
||||||
|
%if 0%{?with_python2}
|
||||||
|
BuildRequires: python2-sphinx
|
||||||
|
BuildRequires: python2-openstackdocstheme
|
||||||
|
%else
|
||||||
|
BuildRequires: python3-sphinx
|
||||||
|
BuildRequires: python3-openstackdocstheme
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description -n python-%{sname}-doc
|
||||||
|
Documentation for the pyghmi library
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{sname}-%{version}
|
%setup -qn %{sname}-%{version}
|
||||||
|
|
||||||
# Remove bundled egg-info
|
|
||||||
rm -rf %{sname}.egg-info
|
|
||||||
|
|
||||||
# Remove the requirements file so that pbr hooks don't add it
|
|
||||||
# to distutils requires_dist config
|
|
||||||
rm -rf {test-,}requirements.txt
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python3} setup.py build
|
%if 0%{?with_python3}
|
||||||
|
%py3_build
|
||||||
|
%{__python3} setup.py build_sphinx -b html
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
|
%if 0%{?with_python2}
|
||||||
|
%py2_build
|
||||||
|
%{__python2} setup.py build_sphinx -b html
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# remove the sphinx-build leftovers
|
||||||
|
rm -rf doc/build/html/.{doctrees,buildinfo}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python3} setup.py install --skip-build --root %{buildroot}
|
%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
|
||||||
|
|
||||||
|
%if 0%{?with_python2}
|
||||||
|
%py2_install
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
%files -n python3-%{sname}
|
%files -n python3-%{sname}
|
||||||
%doc README LICENSE
|
%license LICENSE
|
||||||
%{python3_sitelib}/pyghmi
|
%{_bindir}/pyghmicons*
|
||||||
%{python3_sitelib}/*.egg-info
|
%{_bindir}/pyghmiutil*
|
||||||
|
%{_bindir}/virshbmc*
|
||||||
|
%{_bindir}/fakebmc
|
||||||
|
%{python3_sitelib}/%{sname}
|
||||||
|
%{python3_sitelib}/%{sname}-*.egg-info
|
||||||
|
%exclude %{python3_sitelib}/%{sname}/tests
|
||||||
|
|
||||||
|
%files -n python3-%{sname}-tests
|
||||||
|
%license LICENSE
|
||||||
|
%{python3_sitelib}/%{sname}/tests
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
|
%if 0%{?with_python2}
|
||||||
|
%files -n python2-%{sname}
|
||||||
|
%license LICENSE
|
||||||
%{_bindir}/pyghmicons
|
%{_bindir}/pyghmicons
|
||||||
%{_bindir}/pyghmiutil
|
%{_bindir}/pyghmiutil
|
||||||
%{_bindir}/virshbmc
|
%{_bindir}/virshbmc
|
||||||
|
%{_bindir}/fakebmc
|
||||||
|
%{python2_sitelib}/%{sname}
|
||||||
|
%{python2_sitelib}/%{sname}-*.egg-info
|
||||||
|
%exclude %{python2_sitelib}/%{sname}/tests
|
||||||
|
|
||||||
|
%files -n python2-%{sname}-tests
|
||||||
|
%license LICENSE
|
||||||
|
%{python2_sitelib}/%{sname}/tests
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files -n python-%{sname}-doc
|
||||||
|
%license LICENSE
|
||||||
|
%doc doc/build/html README.md
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Jan 18 2019 Shreshtha Joshi <shrjoshi@redhat.com> - 1.0.22-2
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.2.16-4
|
||||||
- RHEL8-isms
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||||
|
|
||||||
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.2.16-3
|
||||||
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.16-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Feb 05 2019 Alfredo Moralejo <amoralej@redhat.com> - 1.2.16-1
|
||||||
|
- Updated to 1.2.16.
|
||||||
|
|
||||||
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.4-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Oct 11 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 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 <etingof@gmail.com> - 1.2.4-3
|
||||||
|
- Added Python 3 build
|
||||||
|
|
||||||
|
* Mon Aug 13 2018 Ilya Etingof <etingof@gmail.com> - 1.2.4-1
|
||||||
|
- Upstream 1.2.4
|
||||||
|
|
||||||
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.22-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.0.22-3
|
||||||
|
- Update Python 2 dependency declarations to new packaging standards
|
||||||
|
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||||
|
|
||||||
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.22-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
* Thu Oct 5 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 1.0.22-1
|
* Thu Oct 5 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 1.0.22-1
|
||||||
- Upstream 1.0.22
|
- Upstream 1.0.22
|
||||||
|
Loading…
Reference in New Issue
Block a user