diff --git a/.gitignore b/.gitignore index ad79eae..4ee60cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /python-gnupg-0.3.5.tar.gz /python-gnupg-0.3.6.tar.gz /python-gnupg-0.3.7.tar.gz +/python-gnupg-0.3.8.tar.gz diff --git a/python-gnupg-0.3.5-export.patch b/python-gnupg-0.3.5-export.patch deleted file mode 100644 index 411a947..0000000 --- a/python-gnupg-0.3.5-export.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- python-gnupg-0.3.5-orig/gnupg.py 2013-08-30 13:10:36.000000000 -0400 -+++ python-gnupg-0.3.5/gnupg.py 2013-12-31 16:31:11.044804846 -0500 -@@ -994,16 +994,22 @@ - self._collect_output(p, result, stdin=p.stdin) - return result - -- def export_keys(self, keyids, secret=False): -- "export the indicated keys. 'keyid' is anything gpg accepts" -+ def export_keys(self, keyids, secret=False, minimal=False, armor=True): -+ "export the indicated keys. 'keyid' is anything gpg accepts. armor=, secret= and minimal= bools can be passed" - which='' -+ eoptions='' -+ earmor='' - if secret: - which='-secret-key' -+ if minimal: -+ eoptions = "--export-options export-minimal" -+ if armor: -+ earmor='--armor' - if _is_sequence(keyids): - keyids = ' '.join([shell_quote(k) for k in keyids]) - else: - keyids = shell_quote(keyids) -- args = ['--armor --export%s %s' % (which, keyids)] -+ args = ['%s --export%s %s %s' % (earmor, which, eoptions, keyids)] - p = self._open_subprocess(args) - # gpg --export produces no status-fd output; stdout will be - # empty in case of failure -@@ -1011,7 +1017,8 @@ - result = self.result_map['delete'](self) # any result will do - self._collect_output(p, result, stdin=p.stdin) - logger.debug('export_keys result: %r', result.data) -- return result.data.decode(self.encoding, self.decode_errors) -+ #return result.data.decode(self.encoding, self.decode_errors) -+ return result.data - - def list_keys(self, secret=False): - """ list the keys currently in the keyring diff --git a/python-gnupg.spec b/python-gnupg.spec index fea1769..39f1384 100644 --- a/python-gnupg.spec +++ b/python-gnupg.spec @@ -1,34 +1,88 @@ +%if 0%{?rhel} +%global with_python3 0 +%{!?__python2: %global __python2 /usr/bin/python2} +%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}} +%{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}} +%else +%global with_python3 1 +%endif + Name: python-gnupg -Version: 0.3.7 -Release: 3%{?dist} -Summary: Python module for GnuPG +Version: 0.3.8 +Release: 1%{?dist} +Summary: A wrapper for the Gnu Privacy Guard (GPG or GnuPG) Group: Development/Languages + License: BSD -URL: http://pythonhosted.org/python-gnupg/ +URL: http://pythonhosted.org/python-gnupg Source0: https://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz - BuildArch: noarch + BuildRequires: python2-devel +BuildRequires: python-setuptools +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%endif # with_python3 Requires: gnupg %description GnuPG bindings for python. This uses the gpg command. +%package -n python2-gnupg +Summary: A wrapper for the Gnu Privacy Guard (GPG or GnuPG) +%{?python_provide:%python_provide python2-%{name}} +%{?el6:Provides: python-%{name}} + +%description -n python2-gnupg +GnuPG bindings for python. This uses the gpg command. + +%package -n python3-gnupg +Summary: A wrapper for the Gnu Privacy Guard (GPG or GnuPG) +%{?python_provide:%python_provide python3-%{name}} + +%description -n python3-gnupg +GnuPG bindings for python. This uses the gpg command. + %prep -%setup -q +%autosetup -n %{name}-%{version} %build -%{__python2} setup.py build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif # with_python3 %install -%{__python2} setup.py install -O1 --skip-build --root %{buildroot} - -%files -%doc PKG-INFO LICENSE.txt README.rst -%{python_sitelib}/gnupg*.py* -%{python_sitelib}/python_gnupg-%{version}-py*.egg-info +%py2_install +%if 0%{?with_python3} +%py3_install +%endif # with_python3 + +%files -n python2-gnupg +%{!?_licensedir:%global license %doc} +%doc README.rst +%license LICENSE.txt +%{python2_sitelib}/gnupg.py* +%{python2_sitelib}/python_gnupg-%{version}-py?.?.egg-info + +%if 0%{?with_python3} +%files -n python3-gnupg +%doc README.rst +%license LICENSE.txt +%{python3_sitelib}/__pycache__/* +%{python3_sitelib}/gnupg.py +%{python3_sitelib}/python_gnupg-%{version}-py?.?.egg-info +%endif # with_python3 %changelog +* Sun Feb 07 2016 Fabio Alessandro Locati - 0.3.8-1 +- Enable python3 compilation +- Move to current python standard +- Update 0.3.8 + * Thu Feb 04 2016 Fedora Release Engineering - 0.3.7-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 9ca4af9..5b1d878 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ce600421b8168bd7d9470d6b451594d5 python-gnupg-0.3.7.tar.gz +54d312056cb8903358bdd0a18522f702 python-gnupg-0.3.8.tar.gz