%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} %{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} Summary: pyVmomi is the Python SDK for the VMware vSphere API that allows you to manage ESX, ESXi, and vCenter. Name: python-pyvmomi Version: 6.5 Release: 2%{?dist} License: OSI Approved :: Apache Software License Group: Development/Languages/Python Vendor: VMware, Inc. Distribution: Photon Url: https://pypi.python.org/pypi/pyvmomi Source0: pyvmomi-%{version}.tar.gz %define sha1 pyvmomi=3fd28a2f0f9d0c771bece4a7dab8fcb140942cbc BuildRequires: python2 BuildRequires: python2-libs BuildRequires: python2-devel BuildRequires: python-setuptools Requires: python2 Requires: python2-libs BuildArch: noarch %description pyVmomi is the Python SDK for the VMware vSphere API that allows you to manage ESX, ESXi, and vCenter. %package -n python3-pyvmomi Summary: python-pyvmomi BuildRequires: python3-devel BuildRequires: python3-libs BuildRequires: python3-setuptools BuildRequires: python3-xml Requires: python3 Requires: python3-libs %description -n python3-pyvmomi Python 3 version. %prep %setup -q -n pyvmomi-%{version} %build python2 setup.py build python3 setup.py build %install python2 setup.py install --prefix=%{_prefix} --root=%{buildroot} python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} %check python2 setup.py test python3 setup.py test %files %defattr(-,root,root) %{python2_sitelib}/* %files -n python3-pyvmomi %defattr(-,root,root) %{python3_sitelib}/* %changelog * Wed Jun 07 2017 Xiaolin Li 6.5-2 - Add python3-setuptools and python3-xml to python3 sub package Buildrequires. * Mon Mar 06 2017 Xiaolin Li 6.5-1 - Initial packaging for Photon.