commit df903a44711c8560bd103b768759971d96293f1f
Author: Jakub Bogusz <[email protected]>
Date:   Sun Apr 13 09:01:41 2014 +0200

    - updated to 0.3
    - added python3 module

 python-pygpgme.spec | 102 ++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 87 insertions(+), 15 deletions(-)
---
diff --git a/python-pygpgme.spec b/python-pygpgme.spec
index fafb752..8dbf965 100644
--- a/python-pygpgme.spec
+++ b/python-pygpgme.spec
@@ -1,53 +1,125 @@
-Summary:       A Python wrapper for the GPGME library
-Summary(pl.UTF-8):     Pythonowy interfejs do biblioteki GPGME
+#
+# conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+#
+Summary:       A Python 2 wrapper for the GPGME library
+Summary(pl.UTF-8):     Interfejs Pythona 2 do biblioteki GPGME
 Name:          python-pygpgme
-Version:       0.2
+Version:       0.3
 Release:       1
 License:       LGPL v2.1+
 Group:         Libraries/Python
-Source0:       
http://pypi.python.org/packages/source/p/pygpgme/pygpgme-%{version}.tar.gz
-# Source0-md5: 674e3f5374efa2aaac7ab420810c91e6
+Source0:       
https://pypi.python.org/packages/source/p/pygpgme/pygpgme-%{version}.tar.gz
+# Source0-md5: d38355af73f0352cde3d410b25f34fd0
 URL:           https://launchpad.net/products/pygpgme
-BuildRequires: python-devel >= 1:2.4
 BuildRequires: gpgme-devel
-BuildRequires: python-modules
+%if %{with python2}
+BuildRequires: python-devel >= 1:2.4
+BuildRequires: python-modules >= 1:2.4
+%endif
+%if %{with python3}
+BuildRequires: python3-devel >= 3.2
+BuildRequires: python3-modules >= 3.2
+%endif
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.219
-%pyrequires_eq python-modules
+BuildRequires: rpmbuild(macros) >= 1.612
+Requires:      python-modules
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 PyGPGME is a Python module that lets you sign, verify, encrypt and
 decrypt messages using the OpenPGP format.
 
+This package contains Python 2 module.
+
 %description -l pl.UTF-8
 PyGPGME to moduł Pythona pozwalający podpisywać, weryfikować,
 szyfrować i odszyfrowywać wiadomości w formacie OpenPGP.
 
+Ten pakiet zawiera moduł Pythona 2.
+
+%package -n python3-pygpgme
+Summary:       A Python 3 wrapper for the GPGME library
+Summary(pl.UTF-8):     Interfejs Pythona 3 do biblioteki GPGME
+Group:         Libraries/Python
+Requires:      python3-modules
+
+%description -n python3-pygpgme
+PyGPGME is a Python module that lets you sign, verify, encrypt and
+decrypt messages using the OpenPGP format.
+
+This package contains Python 3 module.
+
+%description -n python3-pygpgme -l pl.UTF-8
+PyGPGME to moduł Pythona pozwalający podpisywać, weryfikować,
+szyfrować i odszyfrowywać wiadomości w formacie OpenPGP.
+
+Ten pakiet zawiera moduł Pythona 3.
+
 %prep
 %setup -q -n pygpgme-%{version}
 
 %build
-%{__python} setup.py build
+%if %{with python2}
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags}" \
+%{__python} setup.py build \
+       --build-base build-2
+%endif
+
+%if %{with python3}
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags}" \
+%{__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
-%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/gpgme/tests
+%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 README
+%doc NEWS README
 %dir %{py_sitedir}/gpgme
 %attr(755,root,root) %{py_sitedir}/gpgme/_gpgme.so
 %{py_sitedir}/gpgme/*.py[co]
 %if "%{py_ver}" > "2.4"
 %{py_sitedir}/pygpgme-%{version}-py*.egg-info
 %endif
+%endif
+
+%if %{with python3}
+%files -n python3-pygpgme
+%defattr(644,root,root,755)
+%doc NEWS README
+%dir %{py3_sitedir}/gpgme
+%attr(755,root,root) %{py3_sitedir}/gpgme/_gpgme.cpython-*.so
+%{py3_sitedir}/gpgme/*.py
+%{py3_sitedir}/gpgme/__pycache__
+%{py3_sitedir}/pygpgme-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pygpgme.git/commitdiff/df903a44711c8560bd103b768759971d96293f1f

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

Reply via email to