%if 0%{?rhel} && 0%{?rhel} <= 7 %bcond_with python3 %else %bcond_without python3 %endif %global pypi_name pyvmomi Name: python-%{pypi_name} Version: 6.5 Release: 1%{?dist} Summary: VMware vSphere Python SDK License: ASL 2.0 URL: https://github.com/vmware/pyvmomi Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %description pyVmomi is the Python SDK for the VMware vSphere API that allows you to manage ESX, ESXi, and vCenter. %package -n python2-%{pypi_name} Summary: VMware vSphere Python SDK BuildRequires: python2-devel BuildRequires: python-testtools >= 0.9.34 BuildRequires: python-vcrpy %if 0%{?rhel} && 0%{?rhel} <= 7 BuildRequires: python-setuptools BuildRequires: python-requests BuildRequires: python-six %else BuildRequires: python2-setuptools BuildRequires: python2-requests BuildRequires: python2-six %endif Requires: python-requests Requires: python-six %{?python_provide:%python_provide python2-%{pypi_name}} Provides: python2-pyvim %description -n python2-%{pypi_name} pyVmomi is the Python SDK for the VMware vSphere API that allows you to manage ESX, ESXi, and vCenter. %if %{with python3} %package -n python3-%{pypi_name} Summary: VMware vSphere Python SDK BuildRequires: python3-setuptools BuildRequires: python3-devel BuildRequires: python3-testtools >= 0.9.34 BuildRequires: python3-vcrpy BuildRequires: python3-requests BuildRequires: python3-six Requires: python3-requests Requires: python3-six %{?python_provide:%python_provide python3-%{pypi_name}} Provides: python3-pyvim %description -n python3-%{pypi_name} pyVmomi is the Python SDK for the VMware vSphere API that allows you to manage ESX, ESXi, and vCenter. %endif %prep %autosetup -n %{pypi_name}-%{version} %build %py2_build %{?with_python3: %py3_build} %install %py2_install %{?with_python3: %py3_install} %check %{__python2} setup.py test %{?with_python3: %{__python3} setup.py test} %files -n python2-%{pypi_name} %license LICENSE.txt %doc README.rst tests/README.rst %{python2_sitelib}/pyVmomi %{python2_sitelib}/pyVim %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %if %{with python3} %files -n python3-%{pypi_name} %license LICENSE.txt %doc README.rst tests/README.rst %{python3_sitelib}/pyVmomi %{python3_sitelib}/pyVim %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %endif %changelog * Tue Dec 13 2016 Fabio Alessandro Locati - 6.5 - Update to 6.5 * Thu Sep 08 2016 Fabio Alessandro Locati - 6.0.0.2016.6-1 - Update to version 6.0.0.2016.6 - Simplify the SPEC file * Tue Jul 19 2016 Fedora Release Engineering - 5.5.0.2014.1.1-6 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 5.5.0.2014.1.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Nov 10 2015 Fedora Release Engineering - 5.5.0.2014.1.1-4 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Thu Jun 18 2015 Fedora Release Engineering - 5.5.0.2014.1.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Mon Sep 22 2014 Michael Rice - 5.5.0.2014.1.1-3 - Changed spec to work on EPEL * Thu Sep 18 2014 Michael Rice - 5.5.0.2014.1.1-2 - Changes to spec from review suggestions * Sun Aug 31 2014 Michael Rice - 5.5.0.2014.1.1-1 - Bugfix release from upstream. * Fri Aug 22 2014 Michael Rice - 5.5.0.2014.1-2 - Changes to spec file based on bugzilla package review. * Wed Aug 20 2014 Michael Rice - 5.5.0.2014.1-1 - Initial RPM build.