File python-osc-lib.spec of Package python-osc-lib
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
%global library osc-lib
%global module osc_lib
%global pkg_name osc-lib
%global common_desc osc-lib is a package of common support modules for writing OSC plugins.
%global with_doc 0
Name: python-%{pkg_name}
Version: 2.2.0
Release: 2%{?dist}
Summary: OpenStack library for writing OSC plugins
License: Apache-2.0
URL: https://github.com/openstack/%{library}/
Source0: https://tarballs.openstack.org/%{library}/%{library}-%{upstream_version}.tar.gz
# Patch001: 0001-Replace-assertItemsEqual-with-assertCountEqual.patch
BuildArch: noarch
%package -n python3-%{pkg_name}
Summary: OpenStack library for writing OSC plugins
%{?python_provide:%python_provide python3-%{pkg_name}}
BuildRequires: python3-devel
BuildRequires: python3-pbr
BuildRequires: python3-setuptools
BuildRequires: git
BuildRequires: python3-oslo-i18n
BuildRequires: python3-keystoneauth1
#BuildRequires: python%{pyver}-mock
#BuildRequires: python%{pyver}-fixtures
#BuildRequires: python%{pyver}-oslotest
#BuildRequires: python%{pyver}-os-testr
#BuildRequires: python%{pyver}-testtools
BuildRequires: python3-oslo-utils
#BuildRequires: python%{pyver}-os-client-config
BuildRequires: python3-openstacksdk
#BuildRequires: python%{pyver}-requests
BuildRequires: python3-stevedore
BuildRequires: python3-cliff
#BuildRequires: python%{pyver}-testrepository
#BuildRequires: python%{pyver}-requests-mock
#BuildRequires: python%{pyver}-simplejson
#Requires: python%{pyver}-six >= 1.10.0
Requires: python3-pbr >= 2.0.0
Requires: python3-keystoneauth1 >= 3.14.0
Requires: python3-openstacksdk >= 0.15.0
#Requires: python%{pyver}-os-client-config >= 1.28.0
Requires: python3-oslo-i18n >= 3.15.3
Requires: python3-oslo-utils >= 3.33.0
Requires: python3-stevedore >= 1.20.0
Requires: python3-cliff >= 3.2.0
Requires: python3-simplejson >= 3.5.1
%description -n python3-%{pkg_name}
%{common_desc}
#%package -n python%{pyver}-%{library}-tests
#Summary: OpenStack osc-lib library tests
#%{?python_provide:%python_provide python%{pyver}-%{library}-tests}
#Requires: python%{pyver}-%{library} = %{version}-%{release}
#Requires: python%{pyver}-fixtures
#Requires: python%{pyver}-mock
#Requires: python%{pyver}-oslotest
#Requires: python%{pyver}-os-testr
#Requires: python%{pyver}-testtools
#Requires: python%{pyver}-requests-mock
#Requires: python%{pyver}-testrepository
#%description -n python%{pyver}-%{library}-tests
#%{common_desc}
#This package contains the osc-lib library test files.
#%if 0%{?with_doc}
#%package -n python-%{library}-doc
#Summary: OpenStack osc-lib library documentation
#BuildRequires: python%{pyver}-sphinx
#BuildRequires: python%{pyver}-openstackdocstheme
#BuildRequires: python%{pyver}-sphinxcontrib-apidoc
#%description -n python-%{library}-doc
#%{common_desc}
#This package contains the documentation.
#%endif
%description
%{common_desc}
%prep
%autosetup -n %{library}-%{upstream_version} -S git
# Let's handle dependencies ourseleves
rm -f *requirements.txt
%build
%{py3_build}
%if 0%{?with_doc}
# generate html docs
export PYTHONPATH=.
sphinx-build-3 -b html doc/source doc/build/html
# remove the sphinx-build-%{pyver} leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%endif
%install
%{py3_install}
%check
#PYTHON=python3 %{pyver_bin} setup.py test
%files -n python3-%{pkg_name}
%license LICENSE
%{python3_sitelib}/%{module}
%{python3_sitelib}/%{module}-*.egg-info
%exclude %{python3_sitelib}/%{module}/tests
#%files -n python3-%{library}-tests
#%license LICENSE
#%{pyver_sitelib}/%{module}/tests
%if 0%{?with_doc}
%files -n python-%{pkg_name}-doc
%license LICENSE
%doc doc/build/html README.rst
%endif
%changelog
* Wed Aug 05 2020 Artem Goncharov <artem.goncharov@t-systems.com>
- update to 2.2.0
* Fri Mar 13 2020 Alfredo Moralejo <amoralej@redhat.com> - 1.14.1-4
- Replace assertItemsEqual with assertCountEqual
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Nov 06 2019 Alfredo Moralejo <amoralej@redhat.com> 1.14.1-2
- Update to upstream version 1.14.1
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.12.1-5
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.12.1-4
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu May 09 2019 Alfredo Moralejo <amoralej@lists.rdoproject.org> 1.12.1-2
- Remove osprofile as requirement for tests subpackage.
* Fri Mar 08 2019 RDO <dev@lists.rdoproject.org> 1.12.1-1
- Update to 1.12.1