diff --git a/.gitignore b/.gitignore index c123773..ae64da5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ zope.interface-3.6.1.tar.gz /zope.interface-3.7.0.tar.gz +/zope.interface-4.0.2.tar.gz diff --git a/python-zope-interface.spec b/python-zope-interface.spec index 3153100..c0c10e1 100644 --- a/python-zope-interface.spec +++ b/python-zope-interface.spec @@ -2,9 +2,13 @@ %filter_provides_in %{python_sitearch}/zope/interface/.*\.so$ %filter_setup +%if 0%{?fedora} > 12 || 0%{?rhel} > 6 +%global with_python3 1 +%endif + Name: python-zope-interface -Version: 3.7.0 -Release: 2%{?dist} +Version: 4.0.2 +Release: 1%{?dist} Summary: Zope 3 Interface Infrastructure Group: Development/Libraries License: ZPLv2.1 @@ -15,19 +19,64 @@ BuildRequires: python-setuptools # since F14 Obsoletes: python-zope-filesystem <= 1-8 +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%endif + %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_python3} +%package -n python3-zope-interface +Summary: Zope 3 Interface Infrastructure +Group: Development/Libraries + +%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 %setup -n zope.interface-%{version} -q +rm -rf %{modname}.egg-info + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif + %build CFLAGS="%{optflags}" %{__python} setup.py build +%if 0%{?with_python3} +pushd %{py3dir} +CFLAGS="%{optflags}" %{__python3} setup.py build +popd +%endif + + %install +# python3 block +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install -O1 --skip-build --root %{buildroot} + +# Will put docs in %%{_docdir} instead +%{__rm} -f %{buildroot}%{python3_sitearch}/zope/interface/{,tests/}*.txt + +# C files don't need to be packaged +%{__rm} -f %{buildroot}%{python3_sitearch}/zope/interface/_zope_interface_coptimizations.c +popd +%endif + +# do it again for python2 %{__python} setup.py install -O1 --skip-build --root %{buildroot} # Will put docs in %%{_docdir} instead @@ -36,21 +85,18 @@ CFLAGS="%{optflags}" %{__python} setup.py build # C files don't need to be packaged %{__rm} -f %{buildroot}%{python_sitearch}/zope/interface/_zope_interface_coptimizations.c -# deal with documentation -%{__mkdir_p} %{buildroot}%{_docdir}/%{name}-%{version}/ -%{__cp} -p src/zope/interface/*.txt src/zope/interface/tests/*.txt \ - %{buildroot}%{_docdir}/%{name}-%{version} -%{__mv} %{buildroot}%{_docdir}/%{name}-%{version}/README{,-development}.txt -%{__cp} -p CHANGES.txt COPYRIGHT.txt LICENSE.txt README.txt \ - %{buildroot}%{_docdir}/%{name}-%{version}/ - - %check %{__python} setup.py test +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py test +popd +%endif + %files %defattr(-,root,root,-) -%{_docdir}/%{name}-%{version}/ +%doc README.txt LICENSE.txt CHANGES.txt COPYRIGHT.txt docs/ %{python_sitearch}/zope/interface/ # Co-own %%{python_sitearch}/zope/ %dir %{python_sitearch}/zope/ @@ -59,7 +105,22 @@ CFLAGS="%{optflags}" %{__python} setup.py build %{python_sitearch}/zope.interface-*.egg-info %{python_sitearch}/zope.interface-*-nspkg.pth +%files -n python3-zope-interface +%doc README.txt LICENSE.txt CHANGES.txt COPYRIGHT.txt docs/ +%{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 + %changelog +* Wed Nov 28 2012 Ralph Bean - 4.0.2-1 +- Latest upstream release. +- Python3 subpackage. +- Rearrange the way we package docs. + * Sat Jul 21 2012 Fedora Release Engineering - 3.7.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild diff --git a/sources b/sources index f677bdc..e1109a6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8f3e942e9556ed27ac1a71ee85bf697f zope.interface-3.7.0.tar.gz +961195078205f3af50eaa6b639428310 zope.interface-4.0.2.tar.gz