diff --git a/python-SecretStorage.changes b/python-SecretStorage.changes index 5fb4565..57807a9 100644 --- a/python-SecretStorage.changes +++ b/python-SecretStorage.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon May 1 17:22:53 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version. +- Fix source URL. + ------------------------------------------------------------------- Thu Jan 19 10:21:21 UTC 2017 - bwiedemann@suse.com diff --git a/python-SecretStorage.spec b/python-SecretStorage.spec index 48cccf5..452ebee 100644 --- a/python-SecretStorage.spec +++ b/python-SecretStorage.spec @@ -16,6 +16,9 @@ # +%bcond_without tests + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-SecretStorage Version: 2.3.1 Release: 0 @@ -23,24 +26,29 @@ Summary: Python bindings to FreeDesktoporg Secret Service API License: BSD-3-Clause Group: Development/Languages/Python Url: https://github.com/mitya57/secretstorage -# NOTE(toabctl): For whatever reason, the pypi.io url is not working... -#Source: https://pypi.io/packages/source/s/SecretStorage/SecretStorage-%{version}.tar.gz -Source: https://pypi.python.org/packages/a5/a5/0830cfe34a4cfd0d1c3c8b614ede1edb2aaf999091ac8548dd19cb352e79/SecretStorage-2.3.1.tar.gz +Source: https://files.pythonhosted.org/packages/source/s/SecretStorage/SecretStorage-%{version}.tar.gz +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module cryptography} BuildRequires: dbus-1-python -BuildRequires: python-devel -BuildRequires: python-setuptools -Requires: dbus-1-python -BuildRequires: python-cryptography -Requires: python-cryptography +BuildRequires: dbus-1-python3 # Testing requirements +%if %{with tests} BuildRequires: dbus-1-x11 BuildRequires: gnome-keyring -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else -BuildArch: noarch %endif +Requires: python-cryptography +%ifpython2 +Requires: dbus-1-python +%endif +%ifpython2 +Requires: dbus-1-python3 +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch +%python_subpackages %description This module provides a way for securely storing passwords and other secrets. @@ -65,17 +73,18 @@ The documentation can be found on `pythonhosted.org`_. %setup -q -n SecretStorage-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} %check # gnome-keyring "forgets" to create this directory under certain conditions mkdir -p $HOME/.cache -dbus-run-session -- python -m unittest discover -s tests +%python_expand dbus-run-session -- $python -m unittest discover -s tests -%files +%files %{python_files} %defattr(-,root,root,-) %doc changelog README.rst LICENSE %{python_sitelib}/*