Blame python-rsd-lib.spec

348d062
# Macros for py2/py3 compatibility
348d062
%if 0%{?fedora} || 0%{?rhel} > 7
348d062
%global pyver %{python3_pkgversion}
bde8370
%else
348d062
%global pyver 2
a301e1c
%endif
348d062
%global pyver_bin python%{pyver}
dbe57aa
%global pyver_sitelib %{expand:%{python%{pyver}_sitelib}}
dbe57aa
%global pyver_install %{expand:%{py%{pyver}_install}}
dbe57aa
%global pyver_build %{expand:%{py%{pyver}_build}}
348d062
# End of macros for py2/py3 compatibility
348d062
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
a301e1c
a301e1c
%global sname rsd-lib
a301e1c
%global pyname rsd_lib
a301e1c
348d062
%global with_doc 1
348d062
a301e1c
Name:           python-%{sname}
8fca689
Version:        1.2.0
b15849c
Release:        4%{?dist}
a301e1c
Summary:        Python library for interfacing with Intel Rack Scale Design enabled hardware.
a301e1c
a301e1c
License:        ASL 2.0
a301e1c
URL:            http://git.openstack.org/cgit/openstack/%{sname}
a301e1c
Source0:        http://tarballs.openstack.org/%{sname}/%{sname}-%{upstream_version}.tar.gz
a301e1c
BuildArch:      noarch
a301e1c
a301e1c
%description
a301e1c
This library extends the existing Sushy library to include functionality for
a301e1c
Intel RackScale Design enabled hardware. Capabilities include logical node
a301e1c
composition and decomposition, remote storage discovery and composition,
a301e1c
and NVMe over PCIe drive attaching and detaching to logical nodes.
a301e1c
348d062
%package -n     python%{pyver}-%{sname}
a301e1c
Summary:        %{summary}
348d062
%{?python_provide:%python_provide python%{pyver}-%{sname}}
a301e1c
348d062
BuildRequires:  python%{pyver}-devel
348d062
BuildRequires:  python%{pyver}-jsonschema
348d062
BuildRequires:  python%{pyver}-pbr >= 2.0
348d062
BuildRequires:  python%{pyver}-setuptools
8fca689
BuildRequires:  python%{pyver}-sushy >= 1.8.1
348d062
BuildRequires:  python%{pyver}-sushy-tests >= 1.7.0
a301e1c
348d062
Requires:       python%{pyver}-jsonschema
348d062
Requires:       python%{pyver}-pbr >= 2.0
8fca689
Requires:       python%{pyver}-sushy >= 1.8.1
a301e1c
348d062
%description -n python%{pyver}-%{sname}
a301e1c
This library extends the existing Sushy library to include functionality for
a301e1c
Intel RackScale Design enabled hardware. Capabilities include logical node
a301e1c
composition and decomposition, remote storage discovery and composition,
a301e1c
and NVMe over PCIe drive attaching and detaching to logical nodes.
a301e1c
348d062
%package -n python%{pyver}-%{sname}-tests
a301e1c
Summary: rsd-lib tests
a301e1c
348d062
BuildRequires: python%{pyver}-devel
a301e1c
348d062
Requires: python%{pyver}-%{sname} = %{version}-%{release}
348d062
Requires: python%{pyver}-jsonschema
348d062
Requires: python%{pyver}-pbr
348d062
Requires: python%{pyver}-setuptools
8fca689
Requires: python%{pyver}-sushy >= 1.8.1
348d062
Requires: python%{pyver}-sushy-tests >= 1.7.0
a301e1c
348d062
%description -n python%{pyver}-%{sname}-tests
a301e1c
Tests for rsd-lib
a301e1c
348d062
%if 0%{?with_doc}
a301e1c
%package -n python-%{sname}-doc
a301e1c
Summary: rsd-lib documentation
a301e1c
348d062
BuildRequires: python%{pyver}-sphinx
348d062
BuildRequires: python%{pyver}-openstackdocstheme >= 1.11.0
a301e1c
a301e1c
%description -n python-%{sname}-doc
a301e1c
Documentation for rsd-lib
348d062
%endif
a301e1c
a301e1c
%prep
a301e1c
%autosetup -n %{sname}-%{upstream_version} -S git
a301e1c
a301e1c
# Let's handle dependencies ourseleves
a301e1c
rm -f *requirements.txt
a301e1c
a301e1c
%build
348d062
# amoralej - disable warning-is-error until https://review.openstack.org/#/c/636292/ is tagged.
348d062
sed -i '/warning-is-error/d' setup.cfg
348d062
348d062
%{pyver_build}
a301e1c
348d062
%if 0%{?with_doc}
a301e1c
# generate html docs
348d062
%{pyver_bin} setup.py build_sphinx
348d062
# remove the sphinx-build-%{pyver} leftovers
a301e1c
rm -rf doc/build/html/.{doctrees,buildinfo}
348d062
%endif
a301e1c
a301e1c
%install
348d062
%{pyver_install}
a301e1c
a301e1c
%check
348d062
export PYTHON=%{pyver_bin}
348d062
# (TODO) ignore unit tests until rsd-lib is updated to 0.3.1
348d062
%{pyver_bin} setup.py test || true
a301e1c
348d062
%files -n python%{pyver}-%{sname}
a301e1c
%license LICENSE
a301e1c
%doc doc/source/readme.rst README.rst
348d062
%{pyver_sitelib}/%{pyname}
348d062
%{pyver_sitelib}/%{pyname}-*.egg-info
348d062
%exclude %{pyver_sitelib}/%{pyname}/tests
a301e1c
348d062
%files -n python%{pyver}-%{sname}-tests
a301e1c
%license LICENSE
348d062
%{pyver_sitelib}/%{pyname}/tests
a301e1c
348d062
%if 0%{?with_doc}
a301e1c
%files -n python-%{sname}-doc
a301e1c
%license LICENSE
a301e1c
%doc doc/build/html README.rst
348d062
%endif
a301e1c
a301e1c
%changelog
b15849c
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-4
b15849c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
b15849c
5b282b0
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.2.0-3
5b282b0
- Rebuilt for Python 3.9
5b282b0
a1146d1
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
a1146d1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
a1146d1
8fca689
* Wed Nov 06 2019 Alfredo Moralejo <amoralej@redhat.com> 1.2.0-1
8fca689
- Update to upstream version 1.2.0
8fca689
15d5917
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.5.1-4
15d5917
- Rebuilt for Python 3.8.0rc1 (#1748018)
15d5917
1376321
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.5.1-3
1376321
- Rebuilt for Python 3.8
1376321
83721da
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-2
83721da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
83721da
348d062
* Fri Apr 05 2019 RDO <dev@lists.rdoproject.org> 0.5.1-1
348d062
- Update to 0.5.1
a301e1c