!1 python-os-resource-classes:Add source packages and spec file

From: @zhangy1317
Reviewed-by: @joec88
Signed-off-by: @joec88
This commit is contained in:
openeuler-ci-bot 2021-01-26 17:12:58 +08:00 committed by Gitee
commit 8ddee2188e
2 changed files with 98 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,98 @@
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
%global with_doc 1
Name: python-os-resource-classes
Version: 1.0.0
Release: 1%{?dist}
Summary: A library containing standardized resource class names in the Placement service.
License: Apache-2.0
URL: https://opendev.org/openstack/os-resource-classes
Source0: http://tarballs.openstack.org/os-resource-classes/os-resource-classes-1.0.0.tar.gz
BuildArch: noarch
BuildRequires: git
BuildRequires: openstack-macros
%description
A library containing standardized resource class names in the Placement service.
%package -n python3-os-resource-classes
Summary: A library containing standardized resource class names in the Placement service.
%{?python_provide:%python_provide python3-os-resource-classes}
Requires: python3-pbr >= 2.0
BuildRequires: python3-devel
BuildRequires: python3-pbr
BuildRequires: python3-pip
BuildRequires: python3-setuptools
%description -n python3-os-resource-classes
A library containing standardized resource class names in the Placement service.
%package -n python3-os-resource-classes-tests
Summary: A library containing standardized resource class names in the Placement service.
BuildRequires: python3-coverage
BuildRequires: python3-subunit
BuildRequires: python3-oslotest
BuildRequires: python3-testtools
BuildRequires: python3-stestr
Requires: python3-coverage >= 4.0
Requires: python3-os-resource-classes = %{version}-%{release}
Requires: python3-subunit
Requires: python3-oslotest
Requires: python3-testtools
Requires: python3-stestr
%description -n python3-os-resource-classes-tests
This package contains tests for python os-resource-classes library.
%if 0%{?with_doc}
%package -n python-os-resource-classes-doc
Summary: os-resource-classes documentation
BuildRequires: python3-sphinx
BuildRequires: python3-openstackdocstheme
%description -n python-os-resource-classes-doc
Documentation for os-resource-classes
%endif
%prep
%autosetup -n os-resource-classes-1.0.0 -S git
rm -rf os_resource_classes.egg-info
%py_req_cleanup
%build
%{py3_build}
%if 0%{?with_doc}
sphinx-build-3 -W -b html doc/source doc/build/html
rm -rf doc/build/html/.{doctrees,buildinfo}
%endif
%install
%{py3_install}
%check
%{__python3} setup.py test
%files -n python3-os-resource-classes
%license LICENSE
%doc README.rst
%{python3_sitelib}/os_resource_classes
%{python3_sitelib}/os_resource_classes-1.0.0-py?.?.egg-info
%exclude %{python3_sitelib}/os_resource_classes/tests
%files -n python3-os-resource-classes-tests
%{python3_sitelib}/os_resource_classes/tests
%changelog
* Tue Jan 12 2021 zhangy <zhangy1317@foxmail.com> 2021.1.12
- Update to 2021.1.12