| |
@@ -1,3 +1,7 @@
|
| |
+ %bcond docs %{undefined rhel}
|
| |
+ %bcond pbr %{undefined rhel}
|
| |
+ %bcond tests %{undefined rhel}
|
| |
+
|
| |
%global sname pyghmi
|
| |
%global common_summary Python General Hardware Management Initiative (IPMI and others)
|
| |
|
| |
@@ -11,13 +15,17 @@
|
| |
Summary: %{common_summary}
|
| |
Name: python-%{sname}
|
| |
Version: %{?version:%{version}}%{!?version:1.5.69}
|
| |
- Release: 1%{?dist}
|
| |
+ Release: 2%{?dist}
|
| |
Source0: https://tarballs.opendev.org/x/%{sname}/%{sname}-%{version}.tar.gz
|
| |
License: ASL 2.0
|
| |
Prefix: %{_prefix}
|
| |
BuildArch: noarch
|
| |
Url: https://opendev.org/x/pyghmi
|
| |
|
| |
+ ## RHEL-specific patches
|
| |
+ Patch1000: nopbr.patch
|
| |
+ Patch1001: setup.patch
|
| |
+
|
| |
%description
|
| |
%{common_desc}
|
| |
|
| |
@@ -26,10 +34,14 @@
|
| |
%{?python_provide:%python_provide python3-%{sname}}
|
| |
|
| |
BuildRequires: python3-devel
|
| |
+ %if %{with pbr}
|
| |
BuildRequires: python3-pbr
|
| |
+ %endif
|
| |
BuildRequires: python3-setuptools
|
| |
+ %if %{with tests}
|
| |
BuildRequires: python3-oslotest
|
| |
BuildRequires: python3-stestr
|
| |
+ %endif
|
| |
|
| |
BuildRequires: python3-cryptography
|
| |
BuildRequires: python3-six
|
| |
@@ -49,6 +61,7 @@
|
| |
%description -n python3-%{sname}-tests
|
| |
%{common_desc_tests}
|
| |
|
| |
+ %if %{with docs}
|
| |
%package -n python-%{sname}-doc
|
| |
Summary: The pyghmi library documentation
|
| |
|
| |
@@ -57,22 +70,35 @@
|
| |
|
| |
%description -n python-%{sname}-doc
|
| |
Documentation for the pyghmi library
|
| |
+ %endif
|
| |
|
| |
%prep
|
| |
%setup -qn %{sname}-%{version}
|
| |
+ %if %{without pbr}
|
| |
+ %patch1000 -p1
|
| |
+ %patch1001 -p1
|
| |
+ sed -i s/@@REDHATVERSION@@/%{version}/ pyghmi/version.py
|
| |
+ sed -e "s/#VERSION#/%{version}/" setup.py.tmpl > setup.py
|
| |
+ %endif
|
| |
|
| |
%build
|
| |
%py3_build
|
| |
+ %if %{with docs}
|
| |
sphinx-build -b html doc/source doc/build/html
|
| |
|
| |
# remove the sphinx-build leftovers
|
| |
rm -rf doc/build/html/.{doctrees,buildinfo}
|
| |
+ %endif
|
| |
|
| |
%install
|
| |
%py3_install
|
| |
|
| |
%check
|
| |
+ %if %{with tests}
|
| |
stestr run
|
| |
+ %else
|
| |
+ %py3_check_import %{sname} %{sname}.cmd %{sname}.ipmi %{sname}.ipmi.oem %{sname}.ipmi.oem.lenovo %{sname}.ipmi.private %{sname}.redfish %{sname}.redfish.oem %{sname}.redfish.oem.dell %{sname}.redfish.oem.lenovo %{sname}.util
|
| |
+ %endif
|
| |
|
| |
%files -n python3-%{sname}
|
| |
%license LICENSE
|
| |
@@ -88,11 +114,16 @@
|
| |
%license LICENSE
|
| |
%{python3_sitelib}/%{sname}/tests
|
| |
|
| |
+ %if %{with docs}
|
| |
%files -n python-%{sname}-doc
|
| |
%license LICENSE
|
| |
%doc doc/build/html README.md
|
| |
+ %endif
|
| |
|
| |
%changelog
|
| |
+ * Thu May 02 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 1.5.69-2
|
| |
+ - Limit dependencies in RHEL builds
|
| |
+
|
| |
* Sun Apr 21 2024 Dmitry Tantsur <dtantsur@proton.me> - 1.5.69-1
|
| |
- Update to 1.5.69
|
| |
|
| |
When built for RHEL or ELN, the OpenStack-related dependencies are not available. This is based on the changes already in c9s.