!1 python-zope-interface: Package init

Merge pull request !1 from Grooooot/master
This commit is contained in:
openeuler-ci-bot 2020-02-19 16:21:40 +08:00 committed by Gitee
commit 9685901b84
2 changed files with 112 additions and 0 deletions

112
python-zope-interface.spec Normal file
View File

@ -0,0 +1,112 @@
%global with_python2 1
%global with_python3 1
Name: python-zope-interface
Version: 4.5.0
Release: 3
Summary: Zope 3 Interface Infrastructure
Group: Development/Libraries
License: ZPLv2.1
URL: https://pypi.io/project/zope.interface
Source0: https://pypi.io/packages/source/z/zope.interface/zope.interface-%{version}.tar.gz
%description
Interfaces are a mechanism for labeling objects as conforming to a given API
or contract.
This is a separate distribution of the zope.interface package used in Zope 3.
%if 0%{?with_python2}
%package -n python2-zope-interface
Summary: Zope 3 Interface Infrastructure
%{?python_provide:%python_provide python2-zope-interface}
BuildRequires: gcc python2-devel python2-setuptools python2-nose python2-zope-event
Requires: python2-zope-event
Obsoletes: python-zope-filesystem <= 1-8
%description -n python2-zope-interface
Interfaces are a mechanism for labeling objects as conforming to a given API
or contract.
This is a separate distribution of the zope.interface package used in Zope 3.
%endif
%if 0%{?with_python3}
%package -n python3-zope-interface
Summary: Zope 3 Interface Infrastructure
%{?python_provide:%python_provide python3-zope-interface}
BuildRequires: python3-devel python3-setuptools python3-nose python3-zope-event
Requires: python3-zope-event
%description -n python3-zope-interface
Interfaces are a mechanism for labeling objects as conforming to a given API
or contract.
This is a separate distribution of the zope.interface package used in Zope 3.
%endif
%prep
%autosetup -n zope.interface-%{version}
rm -rf %{modname}.egg-info
%build
%if 0%{?with_python2}
%py2_build
%endif
%if 0%{?with_python3}
%py3_build
%endif
%install
%if 0%{?with_python2}
%py2_install
%{__rm} -f %{buildroot}%{python2_sitearch}/zope/interface/{,tests/}*.txt
%{__rm} -f %{buildroot}%{python2_sitearch}/zope/interface/_zope_interface_coptimizations.c
%endif
%if 0%{?with_python3}
%py3_install
%{__rm} -f %{buildroot}%{python3_sitearch}/zope/interface/{,tests/}*.txt
%{__rm} -f %{buildroot}%{python3_sitearch}/zope/interface/_zope_interface_coptimizations.c
%endif
%check
%if 0%{?with_python3}
PYTHONPATH=$(pwd) nosetests-2
%endif
%if 0%{?with_python3}
PYTHONPATH=$(pwd) nosetests-3
%endif
%if 0%{?with_python2}
%files -n python2-zope-interface
%doc README.rst CHANGES.rst COPYRIGHT.txt docs/
%license LICENSE.txt
%{python2_sitearch}/zope/interface/
%dir %{python2_sitearch}/zope/
%exclude %{python2_sitearch}/zope/interface/tests/
%exclude %{python2_sitearch}/zope/interface/common/tests/
%{python2_sitearch}/zope.interface-*.egg-info
%{python2_sitearch}/zope.interface-*-nspkg.pth
%endif
%if 0%{?with_python3}
%files -n python3-zope-interface
%doc README.rst CHANGES.rst COPYRIGHT.txt docs/
%license LICENSE.txt
%{python3_sitearch}/zope/interface/
# Co-own %%{python3_sitearch}/zope/
%dir %{python3_sitearch}/zope/
%exclude %{python3_sitearch}/zope/interface/tests/
%exclude %{python3_sitearch}/zope/interface/common/tests/
%{python3_sitearch}/zope.interface-*.egg-info
%{python3_sitearch}/zope.interface-*-nspkg.pth
%endif
%changelog
* Wed Feb 12 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.5.0-3
- Package init

BIN
zope.interface-4.5.0.tar.gz Normal file

Binary file not shown.