commit 4bdc25591ad0a42befd3599c8951d62938840c77
Author: Jan Rękorajski <[email protected]>
Date:   Wed Feb 26 14:51:35 2014 +0100

    - added python3 module
    - rel 2

 python-pyglet.spec | 66 +++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 60 insertions(+), 6 deletions(-)
---
diff --git a/python-pyglet.spec b/python-pyglet.spec
index c6a3d3e..ad15c99 100644
--- a/python-pyglet.spec
+++ b/python-pyglet.spec
@@ -1,15 +1,27 @@
-%define        module  pyglet
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+%define                module  pyglet
 Summary:       A cross-platform windowing and multimedia library for Python
 Summary(pl.UTF-8):     Międzyplatformowa biblioteka Pythona do obsługi okien i 
multimediów
 Name:          python-%{module}
 Version:       1.1.4
-Release:       1
+Release:       2
 License:       BSD
 Group:         Development/Languages/Python
 Source0:       http://pyglet.googlecode.com/files/%{module}-%{version}.tar.gz
 # Source0-md5: b2363642dc3832e95dc4e63a6793467f
 URL:           http://www.pyglet.org/
+%if %{with python2}
 BuildRequires: python-devel >= 1:2.5
+%endif
+%if %{with python3}
+BuildRequires: python3-devel
+BuildRequires: python3-distribute
+BuildRequires: python3-modules
+%endif
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.219
 Requires:      python-PyOpenAL
@@ -25,25 +37,58 @@ developing games and other visually-rich applications.
 pyglet dostarcza interfejs do programowania zorientowanego obiektowo
 dla rozwoju gier i innych aplikacji wizualnych.
 
+%package -n python3-%{module}
+Summary:       A cross-platform windowing and multimedia library for Python
+Summary(pl.UTF-8):     Międzyplatformowa biblioteka Pythona do obsługi okien i 
multimediów
+Group:         Libraries/Python
+Requires:      python3-PyOpenAL
+Requires:      python3-PyOpenGL
+
+%description -n python3-%{module}
+pyglet provides an object-oriented programming interface for
+developing games and other visually-rich applications.
+
+%description -n python3-%{module} -l pl.UTF-8
+pyglet dostarcza interfejs do programowania zorientowanego obiektowo
+dla rozwoju gier i innych aplikacji wizualnych.
+
 %prep
 %setup -q -n %{module}-%{version}
 
 %build
-%{__python} setup.py build
+%if %{with python2}
+%{__python} setup.py build --build-base build-2
+%endif
+
+%if %{with python3}
+%{__python3} setup.py build --build-base build-3
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install \
+
+%if %{with python2}
+%{__python} setup.py \
+       build --build-base build-2 \
+       install --skip-build \
        --optimize=2 \
        --root=$RPM_BUILD_ROOT
 
-%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
-%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
 %py_postclean
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+       build --build-base build-3 \
+       install --skip-build \
+       --optimize=2 \
+       --root=$RPM_BUILD_ROOT
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc CHANGELOG NOTICE README PKG-INFO doc examples
@@ -66,3 +111,12 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{py_sitescriptdir}/%{module}/window
 %{py_sitescriptdir}/pyglet/window/*
 %{py_sitescriptdir}/*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc CHANGELOG NOTICE README PKG-INFO doc examples
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pyglet.git/commitdiff/4bdc25591ad0a42befd3599c8951d62938840c77

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to