%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %define python_abi %(%{__python} -c "import sys; print sys.version[:3]") %define srcname PyProtocols %define alphatag a0dev_r2082 %define srcver 1.0%{?alphatag} %define eggver 1.0a0 Name: python-protocols Version: 1.0 Release: 0.3.%{alphatag} Summary: Open Protocols and Component Adaptation for Python Group: Development/Libraries License: Python License or Zope Public License v 2.1 URL: http://peak.telecommunity.com/PyProtocols.html #Source0: http://peak.telecommunity.com/dist/%{srcname}-%{version}.tar.gz Source0: http://www.turbogears.org/download/eggs/%{srcname}-%{srcver}.zip BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel python-setuptools Requires: python-abi = %{python_abi} %description PyProtocols is an implementation of PEP 246 allowing Python programmers to define Interfaces and adapters between them, thereby reducing or eliminating fragile 'isinstance' if type() comparisons. %prep %setup -q -n %{srcname}-%{srcver} %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT --single-version-externally-managed %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc README.txt CHANGES.txt docs/* %dir %{python_sitearch}/protocols %{python_sitearch}/protocols/*.so %{python_sitearch}/protocols/*.py %{python_sitearch}/protocols/*.pyc %{python_sitearch}/protocols/*.pyo %{python_sitearch}/protocols/*/*.py %{python_sitearch}/protocols/*/*.pyc %{python_sitearch}/protocols/*/*.pyo %dir %{python_sitearch}/%{srcname}-%{eggver}-py%{python_abi}.egg-info %{python_sitearch}/%{srcname}-%{eggver}-py%{python_abi}.egg-info/* %changelog * Tue Dec 18 2007 Toshio Kuratomi 1.0-0.3-a0dev_r2082 - Initial EL-4 build. * Fri Aug 11 2006 Shahms E. King 1.0-0.2.a0dev_r2082 - Include, don't ghost .pyo files per new guidelines * Wed Apr 19 2006 Shahms E. King 1.0-0.1.a0dev_r2082 - Update to new upstream location and snapshot version * Mon Feb 13 2006 Shahms E. King 0.9.3-7 - Rebuild for FC5 * Tue Jan 31 2006 Shahms E. King 0.9.3-6 - BuildRequires setuptools, rather than including it * Thu May 12 2005 Shahms E. King 0.9.3-4 - rebuilt, add dist tag * Fri Apr 7 2005 Michael Schwendt - rebuilt * Mon Mar 21 2005 Shahms E. King - 0.9.3-3 - Replace python_sitelib with python_sitearch - Other misc. specfile cleanups * Tue Mar 01 2005 Shahms E. King 0.9.3-2 - Clean up spec file * Tue Aug 31 2004 Shahms E. King - - Update to 0.9.3 * Fri Jul 30 2004 Shahms E. King - - Update to 0.9.3rc2 * Thu May 27 2004 Shahms King - - Initial Release