python-zope-interface: Package init
Signed-off-by: Grooooot <isula@huawei.com>
This commit is contained in:
parent
b523111a81
commit
ad3c362acc
112
python-zope-interface.spec
Normal file
112
python-zope-interface.spec
Normal 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
BIN
zope.interface-4.5.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user