[pygpgme] New upstream release
Toshio くらとみ
toshio at fedoraproject.org
Fri May 18 19:10:57 UTC 2012
commit 46fa67de389ee23c201baae3dffe6125d38f3115
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date: Fri May 18 12:10:49 2012 -0700
New upstream release
- Build a python3 subpackage
- Run the test suite even though we ignore the output
.gitignore | 1 +
pygpgme.spec | 72 ++++++++++++++++++++++++++++++++++++++++++++-------------
sources | 2 +-
3 files changed, 57 insertions(+), 18 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 99e35d6..39747b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
pygpgme-0.1.tar.gz
/pygpgme-0.1.tar.gz
/pygpgme-0.2.tar.gz
+/pygpgme-0.3.tar.gz
diff --git a/pygpgme.spec b/pygpgme.spec
index c24e626..bcf3081 100644
--- a/pygpgme.spec
+++ b/pygpgme.spec
@@ -1,13 +1,17 @@
+%if 0%{?fedora} || 0%{?rhel} > 6
+%global with_python3 1
+%else
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+%endif
Name: pygpgme
-Version: 0.2
-Release: 2%{?dist}
+Version: 0.3
+Release: 1%{?dist}
Summary: Python module for working with OpenPGP messages
Group: Development/Languages
License: LGPLv2+
-URL: http://cheeseshop.python.org/pypi/pygpgme/0.1
+URL: http://cheeseshop.python.org/pypi/pygpgme
# pygpgme is being developed for Ubuntu and built for Ubuntu out of
# launchpad's source control. if we need to create a snapshot, here's how:
#
@@ -19,14 +23,13 @@ URL: http://cheeseshop.python.org/pypi/pygpgme/0.1
# tarball is in dist/pygpgme-0.1.tar.gz
#Source0: pygpgme-0.1.tar.gz
Source0: http://cheeseshop.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
-# Patch to make generating a tarball (sdist) work. Applied prior to creating
-# the Source0. Submitted upstream.
-Source1: pygpgme-examples.patch
-# The examples files that weren't included in upstream's release:
-Source2: encrypt.py
BuildRequires: python2-devel
BuildRequires: gpgme-devel
+%if 0%{?with_python3}
+BuildRequires: python3-devel
+%endif
+
%filter_provides_in %{python_sitearch}/gpgme/_gpgme.so
%filter_setup
@@ -35,42 +38,77 @@ PyGPGME is a Python module that lets you sign, verify, encrypt and decrypt
files using the OpenPGP format. It is built on top of GNU Privacy Guard and
the GPGME library.
+%if 0%{?with_python3}
+%package -n python3-pygpgme
+Summary: Python3 module for working with OpenPGP messages
+Group: Development/Languages
+
+%description -n python3-pygpgme
+PyGPGME is a Python module that lets you sign, verify, encrypt and decrypt
+files using the OpenPGP format. It is built on top of GNU Privacy Guard and
+the GPGME library. This package installs the module for use with python3.
+%endif
+
%prep
%setup -q
-mkdir examples
-cp -pr %{SOURCE2} examples/
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif
%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
%install
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
chmod 0755 $RPM_BUILD_ROOT%{python_sitearch}/gpgme/_gpgme.so
-# No need to ship the tests
-mv $RPM_BUILD_ROOT%{python_sitearch}/gpgme/tests/ .
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
+chmod 0755 $RPM_BUILD_ROOT%{python3_sitearch}/gpgme/*.so
+popd
+%endif # with_python3
%clean
rm -rf $RPM_BUILD_ROOT
-### Can't enable the tests because they depend on importing a private key.
+%check
+### Can't run the tests unconditionally because they depend on importing a private key.
# gpg2 on which our gpgme library depends does not import private keys so this
# won't work. The issue in the real world is not so big as we don't
# manipulate private keys outside of a keyring that often.
-#%check
+# We'll run this and ignore errors so we can manually look for problems more easily
# Use the installed gpgme because it has the built compiled module
-#mv gpgme gpgme.bak
-#ln -s $RPM_BUILD_ROOT%{python_sitearch}/gpgme .
-#python test_all.py
+mv gpgme gpgme.bak
+ln -s $RPM_BUILD_ROOT%{python_sitearch}/gpgme .
+make check || :
%files
%defattr(-,root,root,-)
%doc README PKG-INFO examples tests
%{python_sitearch}/*
+%if 0%{?with_python3}
+%files -n python3-pygpgme
+%defattr(-,root,root,-)
+%doc README PKG-INFO examples tests
+%{python3_sitearch}/*
+%endif # with_python3
%changelog
+* Tue May 15 2012 Toshio Kuratomi <toshio at fedoraproject.org> - 0.3-1
+- New upstream release
+- Build a python3 subpackage
+- Run the test suite even though we ignore the output
+
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/sources b/sources
index 6b6fd0a..86def44 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-674e3f5374efa2aaac7ab420810c91e6 pygpgme-0.2.tar.gz
+d38355af73f0352cde3d410b25f34fd0 pygpgme-0.3.tar.gz
More information about the scm-commits
mailing list