[packages/python-pyxdg] - updated 0.25 - added python3 package

qboosh qboosh at pld-linux.org
Sun Jul 20 09:04:01 CEST 2014


commit 0a86f25e8bd905594aa0c2053c22cc06eae6c9be
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jul 20 09:09:04 2014 +0200

    - updated 0.25
    - added python3 package

 python-pyxdg.spec | 120 ++++++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 95 insertions(+), 25 deletions(-)
---
diff --git a/python-pyxdg.spec b/python-pyxdg.spec
index 2cd56b8..05bb4a0 100644
--- a/python-pyxdg.spec
+++ b/python-pyxdg.spec
@@ -1,61 +1,131 @@
+#
+# Conditional build:
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
+
 %define		module	pyxdg
-Summary:	Python implementations of freedesktop.org standards
-Summary(pl.UTF-8):	Implementacje standardów freedesktop.org w języku Python
+Summary:	Python 2 implementations of freedesktop.org standards
+Summary(pl.UTF-8):	Implementacje standardów freedesktop.org w języku Python 2
 Name:		python-%{module}
-Version:	0.19
-Release:	2
-License:	LGPL
+Version:	0.25
+Release:	1
+License:	LGPL v2
 Group:		Libraries/Python
-Source0:	http://www.freedesktop.org/~lanius/%{module}-%{version}.tar.gz
-# Source0-md5:	9f33542e846d0fc1e0bfa992a8555b0a
+Source0:	http://people.freedesktop.org/~takluyver/%{module}-%{version}.tar.gz
+# Source0-md5:	bedcdb3a0ed85986d40044c87f23477c
 URL:		http://freedesktop.org/Software/pyxdg
-BuildRequires:	python-devel >= 1:2.4
+%{?with_python2:BuildRequires:	python-devel >= 1:2.6}
+%{?with_python3:BuildRequires:	python3-devel >= 1:3.2}
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.219
-%pyrequires_eq	python-modules
+Requires:	python-modules
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-PyXDG is a python module to access freedesktop.org standards. The
+PyXDG is a Python module to access freedesktop.org standards. The
 package contains:
 
-  - Implementation of the XDG-Base-Directory Standard
-  - Implementation of the XDG-Desktop Standard
-  - Implementation of the XDG-Menu Standard
-  - Implementation of the XDG-Icon-Theme Standard
-  - Implementation of the XDG-Shared MIME-info Database
-  - Implementation of the XDG-Recent File Storage Specification
+ - Implementation of the XDG-Base-Directory Standard
+ - Implementation of the XDG-Desktop Standard
+ - Implementation of the XDG-Menu Standard
+ - Implementation of the XDG-Icon-Theme Standard
+ - Implementation of the XDG-Shared MIME-info Database
+ - Implementation of the XDG-Recent File Storage Specification
 
 %description -l pl.UTF-8
 PyXDG jest modułem języka Python, pozwalającym na wykorzystywanie
 standardów freedesktop.org. Pakiet zawiera:
 
-  - Implementację standardu XDG-Base-Directory
-  - Implementację standardu XDG-Desktop
-  - Implementację standardu XDG-Menu
-  - Implementację standardu XDG-Icon-Theme
-  - Implementację bazy XDG-Shared MIME-info
-  - Implementację specyfikacji XDG-Recent File Storage
+ - Implementację standardu XDG-Base-Directory
+ - Implementację standardu XDG-Desktop
+ - Implementację standardu XDG-Menu
+ - Implementację standardu XDG-Icon-Theme
+ - Implementację bazy XDG-Shared MIME-info
+ - Implementację specyfikacji XDG-Recent File Storage
+
+%package -n python3-pyxdg
+Summary:	Python 3 implementations of freedesktop.org standards
+Summary(pl.UTF-8):	Implementacje standardów freedesktop.org w języku Python 3
+Group:		Libraries/Python
+Requires:	python3-modules
+
+%description -n python3-pyxdg
+PyXDG is a Python module to access freedesktop.org standards. The
+package contains:
+
+ - Implementation of the XDG-Base-Directory Standard
+ - Implementation of the XDG-Desktop Standard
+ - Implementation of the XDG-Menu Standard
+ - Implementation of the XDG-Icon-Theme Standard
+ - Implementation of the XDG-Shared MIME-info Database
+ - Implementation of the XDG-Recent File Storage Specification
+
+%description -n python3-pyxdg -l pl.UTF-8
+PyXDG jest modułem języka Python, pozwalającym na wykorzystywanie
+standardów freedesktop.org. Pakiet zawiera:
+
+ - Implementację standardu XDG-Base-Directory
+ - Implementację standardu XDG-Desktop
+ - Implementację standardu XDG-Menu
+ - Implementację standardu XDG-Icon-Theme
+ - Implementację bazy XDG-Shared MIME-info
+ - Implementację specyfikacji XDG-Recent File Storage
 
 %prep
 %setup -q -n %{module}-%{version}
 
 %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 --optimize=2 --root=$RPM_BUILD_ROOT
+
+%if %{with python2}
+%{__python} setup.py \
+	build \
+		--build-base build-2 \
+	install \
+		--optimize=2 \
+		--root=$RPM_BUILD_ROOT
 %py_postclean
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+	build \
+		--build-base build-3 \
+	install \
+		--optimize=2 \
+		--root=$RPM_BUILD_ROOT
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS COPYING ChangeLog README TODO
+%doc AUTHORS ChangeLog README TODO
 %dir %{py_sitescriptdir}/xdg
 %{py_sitescriptdir}/xdg/*.py[co]
-%if "%{py_ver}" > "2.4"
 %{py_sitescriptdir}/pyxdg-%{version}-py*.egg-info
 %endif
+
+%if %{with python3}
+%files -n python3-pyxdg
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog README TODO
+%dir %{py3_sitescriptdir}/xdg
+%{py3_sitescriptdir}/xdg/*.py
+%{py3_sitescriptdir}/xdg/__pycache__
+%{py3_sitescriptdir}/pyxdg-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pyxdg.git/commitdiff/0a86f25e8bd905594aa0c2053c22cc06eae6c9be



More information about the pld-cvs-commit mailing list