]> git.pld-linux.org Git - packages/python-zope.event.git/commitdiff
Python3 support added auto/th/python-zope.event-4.3.0-1
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Fri, 4 May 2018 08:16:45 +0000 (10:16 +0200)
committerJacek Konieczny <j.konieczny@eggsoft.pl>
Fri, 4 May 2018 08:16:45 +0000 (10:16 +0200)
python-zope.event.spec

index bdf425ad9612f57144ce6b05a08d2d4a6ab8a69e..2ab70f94b08f811672092fe88876c9ecff8666b2 100644 (file)
@@ -1,3 +1,8 @@
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
 %define        module zope.event
 Summary:       Simple event system
 Summary(pl.UTF-8):     Prosty system zdarzeń
@@ -9,9 +14,16 @@ Group:                Libraries/Python
 Source0:       https://files.pythonhosted.org/packages/source/z/zope.event/zope.event-%{version}.tar.gz
 # Source0-md5: 8ca737960741c6fd112972f3313303bd
 URL:           http://www.zope.org/
+%if %{with python2}
 BuildRequires: python >= 1:2.5
 BuildRequires: python-devel >= 1:2.5
 BuildRequires: python-setuptools
+%endif
+%if %{with python3}
+BuildRequires: python3
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+%endif
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.710
 %pyrequires_eq python-modules
@@ -34,27 +46,70 @@ Pakiet zope.event udostępnia prosty system zdarzeń. Zawiera:
   system przekazywania zdarzeń oparty na typach, zbudowany w oparciu o
   zope.event, można znaleźć w zope.component)
 
+%package -n python3-%{module}
+Summary:       Simple event system
+Summary(pl.UTF-8):     Prosty system zdarzeń
+Group:         Libraries/Python
+
+%description -n python3-%{module}
+The zope.event package provides a simple event system. It provides:
+- an event publishing system
+- a very simple event-dispatching system on which more sophisticated
+  event dispatching systems can be built. (For example, a type-based
+  event dispatching system that builds on zope.event can be found in
+  zope.component)
+
+%description -n python3-%{module} -l pl.UTF-8
+Pakiet zope.event udostępnia prosty system zdarzeń. Zawiera:
+- system publikacji zdarzeń
+- bardzo prosty system przekazywania zdarzeń, w oparciu o który można
+  stworzyć bardziej wyszukane systemy przekazywania zdarzeń (na przykład
+  system przekazywania zdarzeń oparty na typach, zbudowany w oparciu o
+  zope.event, można znaleźć w zope.component)
+
 %prep
 %setup -q -n %{module}-%{version}
 
 %build
-%py_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 \
-       --install-purelib=%{py_sitedir} \
-       --optimize 2 \
-       --root=$RPM_BUILD_ROOT
+       --install-purelib=%{py_sitedir}
 
 %py_postclean
+%endif
+
+%if %{with python3}
+%py3_install \
+       --install-purelib=%{py3_sitedir}
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
+%if %{with python2}
 %{py_sitedir}/zope/event
 %{py_sitedir}/zope.event-*.egg-info
 %{py_sitedir}/zope.event-*-nspkg.pth
+%endif
+
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%if %{with python3}
+%{py3_sitedir}/zope/event
+%{py3_sitedir}/zope.event-*.egg-info
+%{py3_sitedir}/zope.event-*-nspkg.pth
+%endif
This page took 0.105548 seconds and 4 git commands to generate.