diff --git a/python-keyring.spec b/python-keyring.spec index caf92f4..7db127d 100644 --- a/python-keyring.spec +++ b/python-keyring.spec @@ -3,12 +3,37 @@ Name: python-keyring Version: 9.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Store and access your passwords safely License: MIT and Python URL: https://github.com/jaraco/keyring Source0: https://files.pythonhosted.org/packages/source/k/keyring/keyring-%{version}.tar.gz BuildArch: noarch + +%global desc The Python keyring lib provides a easy way to access the system keyring\ +service from python. It can be used in any application that needs safe\ +password storage.\ +\ +The keyring services supported by the Python keyring lib:\ +\ +* **OSXKeychain**: supports the Keychain service in Mac OS X.\ +* **KDEKWallet**: supports the KDE's Kwallet service.\ +* **GnomeKeyring**: for GNOME environment.\ +* **SecretServiceKeyring**: for newer GNOME and KDE environments.\ +* **WinVaultKeyring**: supports the Windows Credential Vault\ +\ +Besides these native password storing services provided by operating systems.\ +Python keyring lib also provides following build-in keyrings.\ +\ +* **Win32CryptoKeyring**: for Windows 2k+.\ +* **CryptedFileKeyring**: a command line interface keyring base on PyCrypto.\ +* **UncryptedFileKeyring**: a keyring which leaves passwords directly in file. + +%description +%desc + +%package -n python2-keyring +Summary: Python 2 library to access the system keyring service BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python2-setuptools_scm @@ -23,61 +48,31 @@ BuildRequires: python2-pytest-cov BuildRequires: python2-pytest-flakes %endif +%{?python_provide:%python_provide python2-keyring} + Obsoletes: %{name}-kwallet < %{version}-%{release} Obsoletes: %{name}-gnome < %{version}-%{release} -%description -The Python keyring lib provides a easy way to access the system keyring -service from python. It can be used in any application that needs safe -password storage. - -The keyring services supported by the Python keyring lib: - -* **OSXKeychain**: supports the Keychain service in Mac OS X. -* **KDEKWallet**: supports the KDE's Kwallet service. -* **GnomeKeyring**: for GNOME environment. -* **SecretServiceKeyring**: for newer GNOME and KDE environments. -* **WinVaultKeyring**: supports the Windows Credential Vault - -Besides these native password storing services provided by operating systems. -Python keyring lib also provides following build-in keyrings. - -* **Win32CryptoKeyring**: for Windows 2k+. -* **CryptedFileKeyring**: a command line interface keyring base on PyCrypto. -* **UncryptedFileKeyring**: a keyring which leaves passwords directly in file. +%description -n python2-keyring +%desc %if 0%{?with_python3} -%package -n python3-keyring +%package -n python%{python3_pkgversion}-keyring Summary: Python 3 library to access the system keyring service -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-setuptools_scm +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-setuptools_scm %if 0%{?with_tests} -BuildRequires: python3-pytest -BuildRequires: python3-pytest-cache -BuildRequires: python3-pytest-cov -BuildRequires: python3-pytest-flakes +BuildRequires: python%{python3_pkgversion}-pytest +BuildRequires: python%{python3_pkgversion}-pytest-cache +BuildRequires: python%{python3_pkgversion}-pytest-cov +BuildRequires: python%{python3_pkgversion}-pytest-flakes %endif -%description -n python3-keyring -The Python keyring lib provides a easy way to access the system keyring -service from python. It can be used in any application that needs safe -password storage. - -The keyring services supported by the Python keyring lib: - -* **OSXKeychain**: supports the Keychain service in Mac OS X. -* **KDEKWallet**: supports the KDE's Kwallet service. -* **GnomeKeyring**: for GNOME environment. -* **SecretServiceKeyring**: for newer GNOME and KDE environments. -* **WinVaultKeyring**: supports the Windows Credential Vault - -Besides these native password storing services provided by operating systems. -Python keyring lib also provides following build-in keyrings. +%{?python_provide:%python_provide python%{python3_pkgversion}-keyring} -* **Win32CryptoKeyring**: for Windows 2k+. -* **CryptedFileKeyring**: a command line interface keyring base on PyCrypto. -* **UncryptedFileKeyring**: a keyring which leaves passwords directly in file. +%description -n python%{python3_pkgversion}-keyring +%desc %endif %prep @@ -89,49 +84,38 @@ sed -i '1{\@^#!/usr/bin/env python@d}' keyring/cli.py sed -i -e "\@use_vcs_version@s/^.*$/\tversion = \"%{version}\",/g" \ -e {/\'hgtools\'/d} setup.py -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif - %build -%{__python2} setup.py build +%py2_build %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py build -popd +%py3_build %endif %install %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install -O1 --skip-build --root %{buildroot} +%py3_install cp -a %{buildroot}%{_bindir}/keyring %{buildroot}%{_bindir}/keyring-%{python3_version} -popd %endif -%{__python2} setup.py install -O1 --skip-build --root %{buildroot} +%py2_install # Failed on Koji due to X environment not available. %check %if 0%{?with_tests} %if 0%{?with_python3} -pushd %{py3dir} %{__python3} setup.py test nosetests-%{python3_version} -popd %endif %{__python2} setup.py test -nosetests +nosetests-%{python2_version} %endif -%files +%files -n python2-keyring %doc CHANGES.rst README.rst %{_bindir}/keyring %{python2_sitelib}/keyring %{python2_sitelib}/keyring-%{version}-py%{python2_version}.egg-info %if 0%{?with_python3} -%files -n python3-keyring +%files -n python%{python3_pkgversion}-keyring %doc CHANGES.rst README.rst %{_bindir}/keyring-%{python3_version} %{python3_sitelib}/keyring-%{version}-py%{python3_version}.egg-info @@ -139,11 +123,16 @@ nosetests %endif %changelog +* Mon Nov 21 2016 Orion Poplawski - 9.0-3 +- Enable python 3 build for EPEL +- Ship python2-keyring +- Modernize spec + * Tue Jul 19 2016 Fedora Release Engineering - 9.0-2 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Mon May 02 2016 Matthias Runge - 9.0-1 -- update to 9.0.1, resolves rhbz#1271641, rhbz#1195985 +- update to 9.0, resolves rhbz#1271641, rhbz#1195985 * Thu Feb 04 2016 Fedora Release Engineering - 5.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild