diff options
author | Robin Lee <robinlee.sysu@gmail.com> | 2010-06-17 22:18:59 +0800 |
---|---|---|
committer | Robin Lee <robinlee.sysu@gmail.com> | 2010-06-17 22:18:59 +0800 |
commit | bc057b279eb24cbf66ad6ff917b46fc0e375af8b (patch) | |
tree | c7d1a5836df04c6ed399ea8556d37dc734156919 /python-ExtensionClass | |
parent | 839c24b70dac3d1c5e0fec4e76911534091501c2 (diff) | |
download | zope-rpm-bc057b279eb24cbf66ad6ff917b46fc0e375af8b.tar.gz zope-rpm-bc057b279eb24cbf66ad6ff917b46fc0e375af8b.tar.xz zope-rpm-bc057b279eb24cbf66ad6ff917b46fc0e375af8b.zip |
most of the denpendencies of Zope 2.12
Diffstat (limited to 'python-ExtensionClass')
-rw-r--r-- | python-ExtensionClass/F-13/ExtensionClass-2.13.1-tp_basicsize.patch | 35 | ||||
-rw-r--r-- | python-ExtensionClass/F-13/python-ExtensionClass.spec | 98 |
2 files changed, 133 insertions, 0 deletions
diff --git a/python-ExtensionClass/F-13/ExtensionClass-2.13.1-tp_basicsize.patch b/python-ExtensionClass/F-13/ExtensionClass-2.13.1-tp_basicsize.patch new file mode 100644 index 0000000..5dbf641 --- /dev/null +++ b/python-ExtensionClass/F-13/ExtensionClass-2.13.1-tp_basicsize.patch @@ -0,0 +1,35 @@ +diff -Naur ExtensionClass-2.13.1/src/ExtensionClass/_ExtensionClass.c ExtensionClass-2.13.1.new/src/ExtensionClass/_ExtensionClass.c +--- ExtensionClass-2.13.1/src/ExtensionClass/_ExtensionClass.c 2010-04-07 17:04:20.000000000 +0800 ++++ ExtensionClass-2.13.1.new/src/ExtensionClass/_ExtensionClass.c 2010-06-14 21:03:12.982523032 +0800 +@@ -820,6 +820,7 @@ + typ->tp_base = &NoInstanceDictionaryBaseType; + else + typ->tp_base = &BaseType; ++ typ->tp_basicsize+= typ->tp_base->tp_basicsize; + + if (typ->tp_new == NULL) + typ->tp_new = PyType_GenericNew; +@@ -935,6 +936,7 @@ + + ExtensionClassType.ob_type = &PyType_Type; + ExtensionClassType.tp_base = &PyType_Type; ++ ExtensionClassType.tp_basicsize = PyType_Type.tp_basicsize; + ExtensionClassType.tp_traverse = PyType_Type.tp_traverse; + ExtensionClassType.tp_clear = PyType_Type.tp_clear; + +@@ -944,6 +946,7 @@ + + BaseType.ob_type = &ExtensionClassType; + BaseType.tp_base = &PyBaseObject_Type; ++ BaseType.tp_basicsize = PyBaseObject_Type.tp_basicsize; + BaseType.tp_new = PyType_GenericNew; + + if (PyType_Ready(&BaseType) < 0) +@@ -951,6 +954,7 @@ + + NoInstanceDictionaryBaseType.ob_type = &ExtensionClassType; + NoInstanceDictionaryBaseType.tp_base = &BaseType; ++ NoInstanceDictionaryBaseType.tp_basicsize = BaseType.tp_basicsize; + NoInstanceDictionaryBaseType.tp_new = PyType_GenericNew; + + if (PyType_Ready(&NoInstanceDictionaryBaseType) < 0) diff --git a/python-ExtensionClass/F-13/python-ExtensionClass.spec b/python-ExtensionClass/F-13/python-ExtensionClass.spec new file mode 100644 index 0000000..55a7d96 --- /dev/null +++ b/python-ExtensionClass/F-13/python-ExtensionClass.spec @@ -0,0 +1,98 @@ +%include %{_rpmconfigdir}/macros.python +%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%endif +%global modname ExtensionClass +%global version 2.13.2 +%global release 1 + +Summary: Metaclass for subclassable extension types +Name: python-%{modname} +Version: %{version} +Release: %{release}%{?dist} +Source0: http://pypi.python.org/packages/source/E/%{modname}/%{modname}-%{version}.zip +# lp587760, patch provided by Artur Zaprzała <https://launchpad.net/~arturz> +#Patch0: ExtensionClass-2.13.1-tp_basicsize.patch +License: ZPLv2.1 +Group: Development/Libraries +URL: http://pypi.python.org/pypi/ExtensionClass + +BuildRequires: python2-devel +BuildRequires: python-setuptools + +%description +ExtensionClass and ExtensionClass-related packages +================================================== + +ExtensionClass +-------------- + +This package provides a metaclass that allows classes implemented in +extension modules to be subclassed in Python. Unless you need +ExtensionClasses for legacy applications (e.g. Zope 2), you probably +want to use Python's new-style classes (available since Python 2.2). + +ComputedAttribute +----------------- + +This package provides a way to attach attributes to an +ExtensionClass or instance that are computed by calling a +callable. This works very much like property known from new-style +classes, except that a ComputedAttribute can also be attached to +an instance and that it honors ExtensionClass semantics (which is +useful for retaining Acquisition wrappers, for example). + +MethodObject +------------ + +This package lets you attach additional "methods" to ExtensionClasses. +These "methods" are actually implemented by subclassing the +MethodObject.Method class and implementing the __call__ method +there. Instances of those classes will be bound to the instances +they're attached to and will receive that instance object as a first +parameter (after self). + +%package devel +Summary: Developer files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: python2-devel +BuildArch: noarch +%description devel +Files for developing applications using %{name}. + +%prep +%setup -q -n %{modname}-%{version} +#%patch0 -p1 -b .tp_basicsize + +%build +env CFLAGS="$RPM_OPT_FLAGS" python setup.py build + +%install +rm -rf $RPM_BUILD_ROOT +python setup.py install --root=$RPM_BUILD_ROOT +# remove contained source file(s) +find $RPM_BUILD_ROOT -name '*.c' -type f -print0 | xargs -0 rm -fv +# deal with header file(s) +mkdir -p $RPM_BUILD_ROOT%{_includedir}/python%{py_ver}/%{modname}/ +mv $RPM_BUILD_ROOT%{python_sitearch}/%{modname}/%{modname}.h \ + $RPM_BUILD_ROOT%{_includedir}/python%{py_ver}/%{modname}/ + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%doc CHANGES.txt COPYRIGHT.txt LICENSE.txt README.txt +%{python_sitearch}/%{modname}/ +%{python_sitearch}/%{modname}-*.egg-info +%{python_sitearch}/ComputedAttribute/ +%{python_sitearch}/MethodObject/ + +%files devel +%defattr(-,root,root,-) +%{_includedir}/python%{py_ver}/%{modname}/ + +%changelog +* Thu Jun 17 2010 Robin Lee <robinlee.sysu@gmail.com> - 2.13.2-1 +- Initial packaging |