diff --git a/python-Durus.changes b/python-Durus.changes index f32625c..6883f28 100644 --- a/python-Durus.changes +++ b/python-Durus.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 24 13:37:52 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + ------------------------------------------------------------------- Sun Apr 14 14:00:06 UTC 2013 - p.drouand@gmail.com @@ -14,3 +19,4 @@ Wed Sep 22 09:41:26 UTC 2011 - saschpe@suse.de - Initial version + diff --git a/python-Durus.spec b/python-Durus.spec index d67a5e2..6ea39cc 100644 --- a/python-Durus.spec +++ b/python-Durus.spec @@ -1,7 +1,7 @@ # # spec file for package python-Durus # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,23 +16,26 @@ # +%define oldpython python +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-Durus Version: 3.9 Release: 0 -Url: http://www.mems-exchange.org/software/durus/ Summary: A Python Object Database License: CNRI-Python Group: Development/Languages/Python -Source: Durus-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel -BuildRequires: python-nose -%if 0%{?suse_version} -%py_requires +Url: http://www.mems-exchange.org/software/durus/ +Source: https://files.pythonhosted.org/packages/source/D/Durus/Durus-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module nose} +BuildRequires: python-rpm-macros +%ifpython2 +Provides: %{oldpython}-durus = %{version} +Obsoletes: %{oldpython}-durus < %{version} %endif -Provides: python-durus = %{version} -Obsoletes: python-durus < %{version} -%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +Requires(post): update-alternatives +Requires(postun): update-alternatives +%python_subpackages %description Serves and manages changes to persistent objects being used in @@ -43,18 +46,26 @@ multiple client processes. sed -i "1d" {db_renumber,__main__}.py # Fix non-executable scripts %build -CFLAGS="%{optflags}" python setup.py build +export CFLAGS="%{optflags}" +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_clone -a %{buildroot}%{_bindir}/durus + +%post +%python_install_alternative durus + +%postun +%python_uninstall_alternative durus %check -nosetests +%python_expand nosetests-%{$python_bin_suffix} -%files +%files %{python_files} %defattr(-,root,root,-) %doc ACKS.txt CHANGES.txt LICENSE.txt README.txt doc/FAQ.txt -%{_bindir}/durus +%python_alternative %{_bindir}/durus %{python_sitearch}/* %changelog