@ -1,28 +1,30 @@
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
Name: python-zope-interface
Version: 3.0 .1
Release: 10 %{?dist}
Summary: Zope interfaces packag e
Version: 3.4 .1
Release: 1%{?dist}
Summary: Zope 3 Interface Infrastructur e
Group: Development/Libraries
License: ZPLv2.1
URL: http://zope.org/Products/ZopeI nterface
Source0: http://zope.org/Products/ZopeInterface/3.0.1final/ZopeInterface-%{version}.t gz
URL: http://pypi.python.org/pypi/zope.i nterface
Source0: http://pypi.python.org/packages/source/z/zope.interface/zope.interface-%{version}.tar. gz
Source1: ZPL-2.1.txt
Patch0: ZopeInterface-3.0.1-declbug.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel
%description
This is a separate distribution of the zope.interface package used in Zope 3.
Interfaces are a mechanism for labeling objects as conforming to a given API
or contract.
It includes a patch to fix compilation on gcc 4.x, as described here:
http://www.zope.org/Collectors/Zope3-dev/366/
This is a separate distribution of the zope.interface package used in Zope 3.
%prep
%setup -n ZopeI nterface-%{version} -q
%setup -n zope.i nterface-%{version} -q
%{__cp} -a %{SOURCE1} .
%patch0 -p1
# Tests require additional modules and shouldn't be packaged
%{__rm} -rfv src/zope/interface/tests/
%{__rm} -rfv src/zope/interface/common/tests/
%build
CFLAGS="%{optflags}" %{__python} setup.py build
@ -30,20 +32,43 @@ CFLAGS="%{optflags}" %{__python} setup.py build
%install
%{__rm} -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
/usr/bin/find %{buildroot} -name \*.so -exec %{__chmod} 755 {} \;
# Will put docs in %{_docdir} instead
%{__rm} -f %{buildroot}%{python_sitearch}/zope/interface/*.txt
# C files don't need to be packaged
%{__rm} -f %{buildroot}%{python_sitearch}/zope/interface/_zope_interface_coptimizations.c
# Fix permissions of shared objects to placate rpmlint
%{__chmod} 755 %{buildroot}%{python_sitearch}/zope/interface/_zope_interface_coptimizations.so
%check
cd ./build/lib.* && PYTHONPATH=$(pwd) %{__python} ./zope/testing/tests.py
# Skipped; would require zope.testing, which isn't in Fedora yet
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc README.txt ZPL-2.1.txt
%doc ZPL-2.1.txt src/zope/interface/*.txt
%{python_sitearch}/zope*
%changelog
* Mon Mar 31 2008 Paul Howarth <paul@city-fan.org> 3.4.1-1
- update to 3.4.1
- incorporate suggestions from Felix Schwarz:
- new summary and description
- new upstream URL (old one out of date)
- don't package test files
- include more documentation
* Mon Mar 31 2008 Paul Howarth <paul@city-fan.org> 3.3.0-1
- update to 3.3.0
- update source URL to include versioned directory and new tarball name
- drop the gcc 4.x compatibility patch, no longer needed
- don't run the test suite as it now depends on zope.testing
- exclude _zope_interface_coptimizations.c source from the binary package
* Thu Feb 14 2008 Paul Howarth <paul@city-fan.org> 3.0.1-10
- rebuild with gcc 4.3.0 for Fedora 9