%{!?upstream_version: %global upstream_version %{version}%{?milestone}} # Python3 support in OpenStack starts with version 3.5, # which is only in Fedora 24+ %if 0%{?fedora} >= 24 %global with_python3 2 %endif %global library osc-lib %global module osc_lib Name: python-%{library} Version: 1.2.0 Release: 5%{?dist} Summary: OpenStack library for writing OSC plugins License: ASL 2.0 URL: https://github.com/openstack/%{library}/ Source0: http://tarballs.openstack.org/%{library}/%{library}-%{upstream_version}.tar.gz BuildArch: noarch %package -n python-%{library}-tests Summary: OpenStack osc-lib library tests %{?python_provide:%python_provide python-%{library}-tests} Requires: python-coverage Requires: python-fixtures Requires: python-mock Requires: python-oslotest Requires: python-requests-mock Requires: python-os-testr Requires: python-testrepository Requires: python-testtools Requires: python-osprofiler BuildRequires: python-mock BuildRequires: python-setuptools %description -n python-%{library}-tests osc-lib is a package of common support modules for writing OSC plugins. This package contains the osc-lib library test files. %if 0%{?with_python3} %package -n python3-%{library}-tests Summary: OpenStack osc-lib library tests %{?python_provide:%python_provide python3-%{library}-tests} Requires: python3-coverage Requires: python3-fixtures Requires: python3-mock Requires: python3-oslotest Requires: python3-requests-mock Requires: python3-os-testr Requires: python3-testrepository Requires: python3-testtools Requires: python3-osprofiler BuildRequires: python3-setuptools BuildRequires: python3-mock %description -n python3-%{library}-tests osc-lib is a package of common support modules for writing OSC plugins. This package contains the osc-lib library test files. %endif # with_python3 %description osc-lib is a package of common support modules for writing OSC plugins. %prep %autosetup -n %{library}-%{upstream_version} # Let's handle dependencies ourseleves rm -f *requirements.txt %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif %files -n python-%{library}-tests %license LICENSE %{python2_sitelib}/%{module}/tests %{python2_sitelib}/%{module}-*.egg-info %if 0%{?with_python3} %files -n python3-%{library}-tests %license LICENSE %{python3_sitelib}/%{module}/tests %{python3_sitelib}/%{module}-*.egg-info %endif # with_python3 %changelog * Sat Feb 11 2017 Fedora Release Engineering - 1.2.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 1.2.0-3 - Rebuild for Python 3.6 * Thu Dec 1 2016 Alfredo Moralejo - 1.2.0-2 - python2-osc-lib-tests now provides python-osc-lib-tests - Testing requirements have been added as "Requires" to -tests subpackage. * Fri Oct 21 2016 Javier Peña - 1.2.0-1 - Updated to upstream version 1.2.0 * Mon Sep 12 2016 Haïkel Guémar - 1.1.0-2 - Removed unneeded BR/R on backports-ssl_match_hostname * Sun Sep 11 2016 Haikel Guemar 1.1.0-1 - Update to 1.1.0