SPECS/python-configobj/python-configobj.spec
8c807974
 %{!?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())")}
 
f4d17450
 Name:           python-configobj
 Version:        5.0.6
8c807974
 Release:        3%{?dist}
f4d17450
 Summary:        Config file reading, writing and validation
 License:        BSD
 Group:          Development/Languages/Python
 Url:            https://pypi.python.org/packages/source/c/configobj/configobj-%{version}.tar.gz
 Source0:        configobj-%{version}.tar.gz
3cc43c92
 %define sha1 configobj=add3ae15e3f0d2d28d37370dcad930243cb4145c
f4d17450
 
8c807974
 BuildRequires:  python2
 BuildRequires:  python2-libs
 BuildRequires:  python-setuptools
f4d17450
 
8c807974
 Requires:       python-six
f4d17450
 
 BuildArch:      noarch
 
 %description
 ConfigObj is a simple but powerful config file reader and writer: an ini file round tripper. Its main feature is that it is very easy to use, with a straightforward programmer’s interface and a simple syntax for config files.
 
8c807974
 %package -n     python3-configobj
 Summary:        python-configobj
 
 BuildRequires:  python3
 BuildRequires:  python3-devel
 BuildRequires:  python3-libs
 
 Requires:       python3-six
 
 %description -n python3-configobj
 Python 3 version.
 
f4d17450
 %prep
 %setup -n configobj-%{version}
8c807974
 rm -rf ../p3dir
 cp -a . ../p3dir
f4d17450
 
 %build
8c807974
 python2 setup.py build
 pushd ../p3dir
 python3 setup.py build
 popd
f4d17450
 
 %install
8c807974
 python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
 pushd ../p3dir
 python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
 popd
 
 %check
 python2 validate.py
 pushd ../p3dir
 python3 validate.py
 popd
f4d17450
 
 %files
 %defattr(-,root,root,-)
8c807974
 %{python2_sitelib}/*
 
 
 %files -n python3-configobj
 %defattr(-,root,root)
 %{python3_sitelib}/*
f4d17450
 
 %changelog
8c807974
 *   Wed May 24 2017 Kumar Kaushik <kaushikk@vmware.com> 5.0.6-3
 -   Adding python 3 support.
 *   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 5.0.6-2
 -   GA - Bump release of all rpms
 *   Wed Mar 04 2015 Mahmoud Bassiouny <mbassiouny@vmware.com>
 -   Initial packaging for Photon