%global pythonver %(python -c "import sys; print sys.version[:3]" 2>/dev/null || echo 0.0) %{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" 2>/dev/null)} Name: python-zope-interface Version: 3.8.0 Release: 1.0.cf%{?dist} Summary: Zope 3 Interface Infrastructure Group: Development/Libraries License: ZPLv2.1 URL: http://pypi.python.org/pypi/zope.interface Source0: http://pypi.python.org/packages/source/z/zope.interface/zope.interface-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildRequires: python2-devel >= 2.5 # zope.interface 3.5.0 onwards won't build the C extension if distutils are used BuildRequires: python-setuptools Obsoletes: python-zope-filesystem < 1.0001 Provides: python-zope-filesystem = 1.0001 # Don't want provides for python shared objects %{?filter_provides_in: %filter_provides_in %{python_sitearch}/zope/.*\.so} %{?filter_setup} %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. %prep %setup -n zope.interface-%{version} -q # Avoid documentation name collision cp -p src/zope/interface/README.txt README-development.txt %build CFLAGS="%{optflags}" python setup.py build %install rm -rf %{buildroot} python setup.py install -O1 --skip-build --root %{buildroot} # Will put docs in %%{_docdir} instead rm -f %{buildroot}%{python_sitearch}/zope/interface/{,tests/}*.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 # See if there's any egg-info or namespace details ( [ -d %{buildroot}%{python_sitearch}/zope.interface-%{version}-py*.egg-info ] && echo %{buildroot}%{python_sitearch}/zope.interface-%{version}-py*.egg-info/ [ -f %{buildroot}%{python_sitearch}/zope.interface-%{version}-py*-nspkg.pth ] && echo %{buildroot}%{python_sitearch}/zope.interface-%{version}-py*-nspkg.pth ) | sed -e 's|^%{buildroot}||' > egg-info %check python setup.py test %clean rm -rf %{buildroot} %files -f egg-info %defattr(-,root,root,-) %doc CHANGES.txt COPYRIGHT.txt LICENSE.txt README*.txt %doc src/zope/interface/*.txt src/zope/interface/tests/*.txt %{python_sitearch}/zope/ %changelog * Thu Sep 22 2011 Paul Howarth - 3.8.0-1.0.cf - update to 3.8.0 - new module zope.interface.registry; this is code moved from zope.component.registry that implements a basic non-peristent component registry as zope.interface.registry.Components, and was moved from zope.component to make porting systems (such as Pyramid) that rely only on a basic component registry to Python 3 possible without needing to port the entirety of the zope.component package (backwards compatibility import shims have been left behind in zope.component, so this change will not break any existing code) - new tests_require dependency: zope.event to test events sent by the Components implementation; the zope.interface package does not have a hard dependency on zope.event, but if zope.event is importable, it will send component registration events when methods of an instance of zope.interface.registry.Components are called - new interfaces added to support the zope.interface.registry.Components addition: ComponentLookupError, Invalid, IObjectEvent, ObjectEvent, IComponentLookup, IRegistration, IUtilityRegistration, IAdapterRegistration, ISubscriptionAdapterRegistration, IHandlerRegistration, IRegistrationEvent, RegistrationEvent, IRegistered, Registered, IUnregistered, Unregistered, IComponentRegistry and IComponents - No longer Python 2.4 compatible (tested under 2.5, 2.6, 2.7 and 3.2) - BR: python2-devel ≥ 2.5 rather than 2.4 - drop patch for python 2.4 support * Sun Aug 14 2011 Paul Howarth - 3.7.0-1.0.cf - update to 3.7.0 - LP#825249 - fix test_hash_missing_required_attrs - drop upstreamed patch for test_hash_missing_required_attrs - update patch for test_hash_missing_required_attrs with python 2.4 * Fri Aug 12 2011 Paul Howarth - 3.6.5-1.0.cf - update to 3.6.5 - LP#811792: Work around buggy behaviour in some subclasses of zope.interface.interface.InterfaceClass, which invoke __hash__ before initializing __module__ and __name__; the workaround returns a fixed constant hash in such cases, and issues a UserWarning - LP#804832: Under PyPy, zope.interface should not build its C extension; also prevent attempting to build it under Jython - Add a tox.ini for easier xplatform testing - Fix testing deprecation warnings issued when tested under Py3K - add patch to fix broken new test test_hash_missing_required_attrs - add another patch to skip that test entirely if we have python 2.4, as it uses the "with" statement introduced in python 2.5 * Fri Aug 12 2011 Paul Howarth - 3.6.4-1.0.cf - update to 3.6.4 - LP#804951: InterfaceClass instances were unhashable under Python 3.x * Fri May 27 2011 Paul Howarth - 3.6.3-1.0.cf - update to 3.6.3 - LP#570942: now correctly compare interfaces from different modules but with the same names * Wed May 18 2011 Paul Howarth - 3.6.2-1.0.cf - update to 3.6.2 - moved detailed documentation out-of-line from PyPI page, linking instead to http://docs.zope.org/zope.interface - fixes for small issues when running tests under Python 3.2 using zope.testrunner - LP#675064: specify return value type for C optimizations module init under Python 3: undeclared value caused warnings, and segfaults on some 64-bit architectures - setup.py now raises RuntimeError if you don't have Distutils installed when running under Python 3 - nobody else likes macros for commands * Mon Oct 4 2010 Paul Howarth - 3.6.1-7.0.cf - obsolete/provide python-zope-filesystem * Fri Oct 1 2010 Paul Howarth - 3.6.1-6.0.cf - put the text files back in %%{_docdir} - sheesh! * Wed Sep 15 2010 Paul Howarth - 3.6.1-4.0.cf - BR: python2-devel rather than just python-devel - don't move the text files * Mon Sep 13 2010 Paul Howarth - 3.6.1-3.0.cf - cater for egg-info and namespace data more tidily - own directory %%{python_sitearch}/zope/ - drop dependency on deprecated python-zope-filesystem package - BR: python-setuptools rather than python-setuptools-devel * Wed Jul 28 2010 Paul Howarth - 3.6.1-2.0.cf - rebuild for python 2.7 in Rawhide * Tue Jun 22 2010 Paul Howarth - 3.6.1-1.1.cf - include the tests - run the test suite in %%check - include upstream CHANGES/COPYRIGHT/LICENSE files * Fri Jun 18 2010 Paul Howarth - 3.6.1-1.0.cf - update to 3.6.1 - filter provides for private shared objects * Sun Jul 5 2009 Paul Howarth - 3.5.2-1.0.CF - update to 3.5.2 * Mon Jun 8 2009 Paul Howarth - 3.5.1-3.0.CF - BR: python-setuptools-devel to get egg-info * Mon Apr 6 2009 Paul Howarth - 3.5.1-2.0.CF - update to 3.5.1 - upstream release is now a tarball rather than a zipfile * Thu Jan 15 2009 Paul Howarth - 3.5.0-3.0.CF - re-import from Fedora - buildreq python-devel >= 2.4; incompatible with earlier python versions * Wed Dec 17 2008 Conrad Meyer - 3.5.0-3 - make compatible with the new python-zope-filesystem. * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 3.5.0-2 - rebuild for Python 2.6 * Sat Nov 15 2008 Felix Schwarz 3.5.0-1 - update to 3.5.0 * Mon Mar 31 2008 Paul Howarth 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 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 3.0.1-10 - rebuild with gcc 4.3.0 for Fedora 9 * Fri Jan 4 2008 Paul Howarth 3.0.1-9 - tweak %%files list to pull in egg info file when necessary - fix permissions on shared objects (silence rpmlint) * Wed Aug 29 2007 Paul Howarth 3.0.1-8 - update license tag to ZPLv2.1 in anticipation of this tag being approved * Sat Dec 9 2006 Paul Howarth 3.0.1-7 - rebuild against python 2.5 for Rawhide * Tue Oct 31 2006 Paul Howarth 3.0.1-6 - add %%check section * Wed Sep 20 2006 Paul Howarth 3.0.1-5 - dispense with %%{pybasever} macro and python-abi dependency, not needed from FC4 onwards - include ZPL 2.1 license text - add reference in %%description to origin of patch - change License: tag from "ZPL 2.1" to "Zope Public License" to shut rpmlint up * Thu Aug 31 2006 Paul Howarth 3.0.1-4 - files list simplified as .pyo files are no longer %%ghost-ed * Tue May 9 2006 Paul Howarth 3.0.1-3 - import from PyVault Repository - rewrite in Fedora Extras style * Tue Aug 23 2005 Jeff Pitman 3.0.1-2 - add bug fix for gcc 4 * Mon Feb 07 2005 Jeff Pitman 3.0.1-1 - new rpm