[python-zope-interface4] Install as parallel-installable egg.
Ralph Bean
ralph at fedoraproject.org
Thu Dec 6 14:49:52 UTC 2012
commit 5c0c65bddad6a488bbc7ad32e68bed647b5cacdc
Author: Ralph Bean <rbean at redhat.com>
Date: Thu Dec 6 09:49:35 2012 -0500
Install as parallel-installable egg.
python-zope-interface4.spec | 38 +++++++++++++++++++++-----------------
1 files changed, 21 insertions(+), 17 deletions(-)
---
diff --git a/python-zope-interface4.spec b/python-zope-interface4.spec
index e6c1db3..4ad8933 100644
--- a/python-zope-interface4.spec
+++ b/python-zope-interface4.spec
@@ -1,15 +1,18 @@
# Filter private shared library provides
-%filter_provides_in %{python_sitearch}/zope/interface/.*\.so$
+%filter_provides_in %{python_sitelib}/zope.interface-*/zope/interface/.*\.so$
%filter_setup
+%global modname zope.interface
+
+
Name: python-zope-interface4
Version: 4.0.2
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Forward compatible package for 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
+URL: http://pypi.python.org/pypi/%{modname}
+Source0: http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-zope-event
@@ -27,40 +30,41 @@ This is a separate distribution of the zope.interface package used in Zope 3.
This is a forwards compatible package for epel6.
%prep
-%setup -n zope.interface-%{version} -q
+%setup -n %{modname}-%{version} -q
rm -rf %{modname}.egg-info
%build
-CFLAGS="%{optflags}" %{__python} setup.py build
+CFLAGS="%{optflags}" %{__python} setup.py build bdist_egg
%install
-%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+%{__mkdir} -p %{buildroot}%{python_sitelib}
+easy_install -m --prefix %{buildroot}%{_usr} dist/*.egg
# Will put docs in %%{_docdir} instead
-%{__rm} -f %{buildroot}%{python_sitearch}/zope/interface/{,tests/}*.txt
+%{__rm} -f %{buildroot}%{python_sitelib}/%{modname}-%{version}*.egg/zope/interface/{,tests/}*.txt
# C files don't need to be packaged
-%{__rm} -f %{buildroot}%{python_sitearch}/zope/interface/_zope_interface_coptimizations.c
+%{__rm} -f %{buildroot}%{python_sitelib}/%{modname}-%{version}*.egg/zope/interface/_zope_interface_coptimizations.c
# Fix a permissions issue
-chmod a-x %{buildroot}%{python_sitearch}/zope/interface/_zope_interface_coptimizations.so
+find %{buildroot}%{python_sitelib}/%{modname}-%{version}*.egg \
+ -name "*.py" \
+ -exec chmod a-x {} \;
%check
%{__python} setup.py test
%files
%doc README.txt LICENSE.txt CHANGES.txt COPYRIGHT.txt docs/
-%{python_sitearch}/zope/interface/
-# Co-own %%{python_sitearch}/zope/
-%dir %{python_sitearch}/zope/
-%exclude %{python_sitearch}/zope/interface/tests/
-%exclude %{python_sitearch}/zope/interface/common/tests/
-%{python_sitearch}/zope.interface-*.egg-info
-%{python_sitearch}/zope.interface-*-nspkg.pth
+%{python_sitelib}/%{modname}-%{version}*.egg
%changelog
+* Thu Dec 06 2012 Ralph Bean <rbean at redhat.com> - 4.0.2-5
+- Install as a parallel installable egg.
+- Made use of a modname global macro.
+
* Mon Dec 03 2012 Ralph Bean <rbean at redhat.com> - 4.0.2-4
- Fixed rpmlint errors.
- Changed "compat" to "compatible" in summary and description.
More information about the scm-commits
mailing list