[packages/python-pycups] - updated to 1.9.68 - added python3 package
qboosh
qboosh at pld-linux.org
Sat Oct 25 21:43:46 CEST 2014
commit 9a7ae3cef79fb9e798b8c0ea4224fee4775027a1
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Oct 25 21:44:41 2014 +0200
- updated to 1.9.68
- added python3 package
python-pycups.spec | 85 +++++++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 74 insertions(+), 11 deletions(-)
---
diff --git a/python-pycups.spec b/python-pycups.spec
index e2561d6..9531446 100644
--- a/python-pycups.spec
+++ b/python-pycups.spec
@@ -1,29 +1,55 @@
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
%define module pycups
-Summary: Set of Python bindings for the CUPS API
-Summary(pl.UTF-8): Zbiór wiązań Pythona do API CUPS-a
+Summary: Set of Python 2 bindings for the CUPS API
+Summary(pl.UTF-8): Zbiór wiązań Pythona 2 do API CUPS-a
Name: python-%{module}
-Version: 1.9.67
+Version: 1.9.68
Release: 1
License: GPL v2+
Group: Development/Languages/Python
Source0: http://cyberelk.net/tim/data/pycups/pycups-%{version}.tar.bz2
-# Source0-md5: 7275811ac3c0abc2fd50cbad935b09a5
+# Source0-md5: eae8a0a3cb0925eb6b1db8cb4645f3a3
URL: http://cyberelk.net/tim/software/pycups/
BuildRequires: cups-devel >= 1.2.1
BuildRequires: epydoc
+%if %{with python2}
BuildRequires: python-devel >= 1:2.5
+%endif
+%if %{with python3}
+BuildRequires: python3-devel >= 1:3.2
+%endif
BuildRequires: rpm-pythonprov
+Requires: python-modules
Obsoletes: python-cups
-%pyrequires_eq python-modules
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-This package provides Python bindings for the CUPS API, known as
+This package provides Python 2 bindings for the CUPS API, known as
pycups. It was written for use with system-config-printer, but can be
put to other uses as well.
%description -l pl.UTF-8
-Ten pakiet udostępnia wiązania Pythona do API CUPS-a, znane jako
+Ten pakiet udostępnia wiązania Pythona 2 do API CUPS-a, znane jako
+pycups. Został napisany z myślą o pakiecie system-config-printer, ale
+może mieć także inne zastosowania.
+
+%package -n python3-pycups
+Summary: Set of Python 3 bindings for the CUPS API
+Summary(pl.UTF-8): Zbiór wiązań Pythona 3 do API CUPS-a
+Group: Development/Languages/Python
+Requires: python3-modules
+
+%description -n python3-pycups
+This package provides Python 3 bindings for the CUPS API, known as
+pycups. It was written for use with system-config-printer, but can be
+put to other uses as well.
+
+%description -n python3-pycups -l pl.UTF-8
+Ten pakiet udostępnia wiązania Pythona 3 do API CUPS-a, znane jako
pycups. Został napisany z myślą o pakiecie system-config-printer, ale
może mieć także inne zastosowania.
@@ -42,23 +68,60 @@ Dokumentacja do pycupsa.
%setup -q -n %{module}-%{version}
%build
-%{__make} \
- CFLAGS="%{rpmcflags} -fno-strict-aliasing"
+%if %{with python2}
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags} -fno-strict-aliasing" \
+%{__python} setup.py build \
+ --build-base build-2
+%endif
+
+%if %{with python3}
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags} -fno-strict-aliasing" \
+%{__python3} setup.py build \
+ --build-base build-3
+%endif
%{__make} doc
+
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install \
- DESTDIR=$RPM_BUILD_ROOT
+
+%if %{with python2}
+%{__python} setup.py \
+ build --build-base build-2 \
+ install --skip-build \
+ --root=$RPM_BUILD_ROOT \
+ --optimize=2
+
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+ build --build-base build-3 \
+ install --skip-build \
+ --root=$RPM_BUILD_ROOT \
+ --optimize=2
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
%files
%defattr(644,root,root,755)
%doc ChangeLog NEWS README TODO
%attr(755,root,root) %{py_sitedir}/cups.so
%{py_sitedir}/pycups-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-pycups
+%defattr(644,root,root,755)
+%doc ChangeLog NEWS README TODO
+%attr(755,root,root) %{py3_sitedir}/cups.cpython-*.so
+%{py3_sitedir}/pycups-%{version}-py*.egg-info
+%endif
%files doc
%defattr(644,root,root,755)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-pycups.git/commitdiff/9a7ae3cef79fb9e798b8c0ea4224fee4775027a1
More information about the pld-cvs-commit
mailing list