SPECS/python-zope.interface/python-zope.inetrface.spec
a8406018
 %{!?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())")}
 
8b5cb8b1
 Name:           python-zope.interface
a8406018
 Version:        4.3.3
a848bcf8
 Release:        2%{?dist}
8b5cb8b1
 Url:            https://github.com/zopefoundation/zope.interface
 Summary:        Interfaces for Python
 License:        ZPL 2.1
 Group:          Development/Languages/Python
 Source0:        https://pypi.python.org/packages/source/z/zope.interface/zope.interface-%{version}.tar.gz
a8406018
 %define sha1    zope.interface=66bd8e4af0f16468914fefc90ba9cca23e66cd9d
8b5cb8b1
 
a8406018
 BuildRequires:  python2-devel
 BuildRequires:  python2-libs
 BuildRequires:  python-setuptools
8b5cb8b1
 
 Requires:       python2
a8406018
 Requires:       python2-libs
8b5cb8b1
 
 %description
 This package is intended to be independently reusable in any Python project. It is maintained by the Zope Toolkit project.
 
 This package provides an implementation of “object interfaces” for Python. Interfaces are a mechanism for labeling objects as conforming to a given API or contract. So, this package can be considered as implementation of the Design By Contract methodology support in Python.
 
 For detailed documentation, please see http://docs.zope.org/zope.interface
 
a8406018
 %package -n     python3-zope.interface
 Summary:        python-zope.interface
 BuildRequires:  python3
 BuildRequires:  python3-devel
 BuildRequires:  python3-libs
a848bcf8
 BuildRequires:  python3-setuptools
 BuildRequires:  python3-xml
a8406018
 Requires:       python3
 Requires:       python3-libs
 
 %description -n python3-zope.interface
 
 Python 3 version.
8b5cb8b1
 %prep
 %setup -q -n zope.interface-%{version}
a8406018
 rm -rf ../p3dir
 cp -a . ../p3dir
8b5cb8b1
 
 %build
a8406018
 python2 setup.py build
 pushd ../p3dir
 python3 setup.py build
 popd
8b5cb8b1
 
 %install
a8406018
 python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
 pushd ../p3dir
 python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
 popd
 
8b5cb8b1
 
d5255775
 %check
a8406018
 python2 setup.py test
 pushd ../p3dir
 python3 setup.py test
 popd
d5255775
 
8b5cb8b1
 %files
 %defattr(-,root,root)
a8406018
 %{python2_sitelib}/*
 
 %files -n python3-zope.interface
 %defattr(-,root,root,-)
 %{python3_sitelib}/*
8b5cb8b1
 
 %changelog
a848bcf8
 *   Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 4.3.3-2
 -   Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
 *   Mon Mar 13 2017 Xiaolin Li <xiaolinl@vmware.com> 4.3.3-1
 -   Updated to version 4.3.3.
 *   Mon Oct 04 2016 ChangLee <changlee@vmware.com> 4.1.3-3
 -   Modified %check
a8406018
 *   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.1.3-2
 -   GA - Bump release of all rpms
a848bcf8
 *   Tue Oct 27 2015 Mahmoud Bassiouny <mbassiouny@vmware.com>
 -   Initial packaging for Photon