[packages/python-zope.interface] renamed, python3 support added

jajcus jajcus at pld-linux.org
Tue Dec 27 14:55:31 CET 2016


commit 1bc0acd1c3071cd710fe1af562615d12f4d846d9
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Tue Dec 27 14:54:02 2016 +0100

    renamed, python3 support added
    
    - Zope-Interface renamed to python-zope.interface
    - Python3 package built
    - test not removed on install - it is good to be able to test installed
      package and sometimes other packages need the test modules

 Zope-Interface.spec        |  57 ----------------------
 python-zope.interface.spec | 115 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 115 insertions(+), 57 deletions(-)
---
diff --git a/Zope-Interface.spec b/Zope-Interface.spec
deleted file mode 100644
index 6662b5f..0000000
--- a/Zope-Interface.spec
+++ /dev/null
@@ -1,57 +0,0 @@
-Summary:	Python 'interface' concept implementation
-Summary(pl.UTF-8):	Implementacja interfejsów dla języka Python
-Name:		Zope-Interface
-Version:	4.0.3
-Release:	2
-License:	ZPL 2.1
-Group:		Libraries/Python
-Source0:	http://pypi.python.org/packages/source/z/zope.interface/zope.interface-%{version}.tar.gz
-# Source0-md5:	1ddd308f2c83703accd1696158c300eb
-URL:		http://docs.zope.org/zope.interface/
-BuildRequires:	python
-BuildRequires:	python-devel
-BuildRequires:	python-setuptools
-BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.710
-Requires:	python-modules
-# set this requirement explicitly, so people know where %py_sitedir/zope can be found
-Requires:	Zope-dirs
-Provides:	ZopeInterface
-Obsoletes:	ZopeInterface
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-Python 'interface' concept implementation.
-
-%description -l pl.UTF-8
-Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
-języka Python.
-
-%prep
-%setup -q -n zope.interface-%{version}
-
-%build
-%py_build
-
-%install
-rm -rf $RPM_BUILD_ROOT
-%py_install
-
-%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/zope/interface/*.c
-%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/zope/interface/common/tests
-%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/zope/interface/tests
-
-%py_postclean
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(644,root,root,755)
-%doc CHANGES.txt
-%dir %{py_sitedir}/zope/interface
-%{py_sitedir}/zope/interface/*.py[co]
-%attr(755,root,root) %{py_sitedir}/zope/interface/_zope_interface_coptimizations.so
-%{py_sitedir}/zope/interface/common
-%{py_sitedir}/zope.interface-*.egg-info
-%{py_sitedir}/zope.interface-*-nspkg.pth
diff --git a/python-zope.interface.spec b/python-zope.interface.spec
new file mode 100644
index 0000000..7e04c26
--- /dev/null
+++ b/python-zope.interface.spec
@@ -0,0 +1,115 @@
+#
+# Conditional build:
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
+
+# NOTE: 'module' should match the python import path, not the egg name
+%define 	module	zope.interface
+Summary:	Python 'interface' concept implementation
+Summary(pl.UTF-8):	Implementacja interfejsów dla języka Python
+Name:		python-%{module}
+Version:	4.0.3
+Release:	1
+License:	ZPL 2.1
+Group:		Libraries/Python
+Source0:	http://pypi.python.org/packages/source/z/zope.interface/zope.interface-%{version}.tar.gz
+# Source0-md5:	1ddd308f2c83703accd1696158c300eb
+URL:		http://docs.zope.org/zope.interface/
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.710
+%if %{with python2}
+BuildRequires:	python
+BuildRequires:	python-devel
+BuildRequires:	python-setuptools
+%endif
+%if %{with python3}
+BuildRequires:	python3
+BuildRequires:	python3-devel
+BuildRequires:	python3-setuptools
+%endif
+Requires:	python-modules
+Requires:	python-zope-base
+Provides:	ZopeInterface
+Provides:	Zope-Interface
+Obsoletes:	ZopeInterface
+Obsoletes:	Zope-Interface
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Python 'interface' concept implementation.
+
+%description -l pl.UTF-8
+Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
+języka Python.
+
+%package -n python3-%{module}
+Summary:	Python 'interface' concept implementation
+Summary(pl.UTF-8):	Implementacja interfejsów dla języka Python
+Group:		Libraries/Python
+Requires:	python3-modules
+Requires:	python3-zope-base
+
+%description -n python3-%{module}
+Python 'interface' concept implementation.
+
+%description -n python3-%{module} -l pl.UTF-8
+Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
+języka Python.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+%build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
+%py_install
+
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/zope/interface/*.c
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/zope/interface/*.c
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc CHANGES.txt
+%dir %{py_sitedir}/zope/interface
+%{py_sitedir}/zope/interface/*.py[co]
+%attr(755,root,root) %{py_sitedir}/zope/interface/_zope_interface_coptimizations.so
+%{py_sitedir}/zope/interface/common
+%{py_sitedir}/zope/interface/tests
+%{py_sitedir}/zope.interface-*.egg-info
+%{py_sitedir}/zope.interface-*-nspkg.pth
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc CHANGES.txt
+%dir %{py3_sitedir}/zope/interface
+%{py3_sitedir}/zope/interface/*.py
+%{py3_sitedir}/zope/interface/__pycache__
+%attr(755,root,root) %{py3_sitedir}/zope/interface/_zope_interface_coptimizations*.so
+%{py3_sitedir}/zope/interface/common
+%{py3_sitedir}/zope/interface/tests
+%{py3_sitedir}/zope.interface-*.egg-info
+%{py3_sitedir}/zope.interface-*-nspkg.pth
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-zope.interface.git/commitdiff/1bc0acd1c3071cd710fe1af562615d12f4d846d9



More information about the pld-cvs-commit mailing list