%global srcname softlayer %global gh_name softlayer-python %global desc This library provides a simple Python client to interact \ with SoftLayer's XML-RPC API. Name: python-%{srcname} Version: 5.3.2 Release: 2%{?dist} Summary: SoftLayer API Python Client and library License: MIT URL: http://softlayer.github.io/softlayer-python/ Source0: https://github.com/softlayer/softlayer-python/archive/v%{version}/%{gh_name}-%{version}.tar.gz BuildArch: noarch %description %{desc} %package -n python2-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python2-%{srcname}} BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python2-six BuildRequires: python-prettytable BuildRequires: python2-click BuildRequires: python2-requests BuildRequires: python2-prompt_toolkit BuildRequires: python2-pygments BuildRequires: python2-pytest BuildRequires: python2-pytest-cov BuildRequires: python2-mock BuildRequires: python-testtools Requires: python2-six Requires: python-prettytable Requires: python2-click Requires: python2-requests Requires: python2-prompt_toolkit Requires: python2-pygments %description -n python2-%{srcname} %{desc} Python 2 sub-package. %package -n python3-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python3-%{srcname}} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-six BuildRequires: python3-prettytable BuildRequires: python3-click BuildRequires: python3-requests BuildRequires: python3-prompt_toolkit BuildRequires: python3-pygments BuildRequires: python3-pytest BuildRequires: python3-pytest-cov BuildRequires: python3-mock BuildRequires: python3-testtools Requires: python3-six Requires: python3-prettytable Requires: python3-click Requires: python3-requests Requires: python3-prompt_toolkit Requires: python3-pygments %description -n python3-%{srcname} %{desc} Python 3 sub-package. %prep %autosetup -n %{gh_name}-%{version} %build %py2_build %py3_build %install %py2_install %py3_install # Remove the installed tests rm -rf %{buildroot}%{python2_sitelib}/tests rm -rf %{buildroot}%{python3_sitelib}/tests # sl is deprecated rm -f %{buildroot}/%{_bindir}/sl %check # Remove failing tests rm -f tests/CLI/modules/sshkey_tests.py rm -f tests/CLI/helper_tests.py rm -f tests/managers/vs_tests.py %{__python2} setup.py test %{__python3} setup.py test %files -n python2-%{srcname} %doc README.rst CHANGELOG.md %license LICENSE %{python2_sitelib}/SoftLayer-%{version}-py%{python2_version}.egg-info/ %{python2_sitelib}/SoftLayer/ %files -n python3-%{srcname} %doc README.rst CHANGELOG.md %license LICENSE %{python3_sitelib}/SoftLayer-%{version}-py%{python3_version}.egg-info/ %{python3_sitelib}/SoftLayer/ %{_bindir}/slcli # sl is deprecated #%%{_bindir}/sl %changelog * Wed Jan 03 2018 Athmane Madjoudj - 5.3.2-2 - Exclude more tests failing in Fedora buildsys * Sun Dec 24 2017 Athmane Madjoudj - 5.3.2-1 - Update to 5.3.2 - Exclude tests failing in Fedora buildsys * Mon Dec 18 2017 Athmane Madjoudj - 5.3.1-1 - Initial spec.