From b4f99379e05b59f8c65bfce2a942f3fc0ec1c2841cab297240dd69b42745b095 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Fri, 3 May 2013 09:41:42 +0000 Subject: [PATCH] - Fixed the obsoletes to '<' after last version update - Provides/obsoletes for python3-minimock is useless, that package never existed - Removing __pycache__ is actually wrong - "-rm docs/.changelog.rst.un~ # Remove junk" was bogus - No need to buildrequire python3, usually you only need that when requiring the _ssl module (as Jan if in doubt) - No need to buildrequire python3-2to3, it's in python3-devel nowadays OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-MiniMock?expand=0&rev=13 --- python-MiniMock.changes | 5 +++++ python-MiniMock.spec | 15 ++++++--------- python3-MiniMock.changes | 11 +++++++++++ python3-MiniMock.spec | 17 +++-------------- 4 files changed, 25 insertions(+), 23 deletions(-) diff --git a/python-MiniMock.changes b/python-MiniMock.changes index c400b7b..5ad7a9e 100644 --- a/python-MiniMock.changes +++ b/python-MiniMock.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 3 09:26:17 UTC 2013 - speilicke@suse.com + +- Fixed the obsoletes to '<' after last version update + ------------------------------------------------------------------- Mon Apr 29 12:29:43 UTC 2013 - dmueller@suse.com diff --git a/python-MiniMock.spec b/python-MiniMock.spec index f080d0d..cce4988 100644 --- a/python-MiniMock.spec +++ b/python-MiniMock.spec @@ -27,16 +27,13 @@ Source: http://pypi.python.org/packages/source/M/MiniMock/MiniMock-%{ver BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-devel BuildRequires: python-distribute -%if 0%{?suse_version} -%py_requires -%if 0%{?suse_version} > 1110 +Provides: python-minimock = %{version} +Obsoletes: python-minimock < %{version} +%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 -%endif -Provides: python-minimock = %{version} -#TODO: Change back to '<' after version update: -Obsoletes: python-minimock <= %{version} -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %description Minimock is a simple library for doing Mock objects with doctest. @@ -53,7 +50,7 @@ python setup.py install --prefix=%{_prefix} --root=%{buildroot} %files %defattr(-,root,root,-) -%doc docs/* +%doc docs/license.txt %{python_sitelib}/minimock.py* %{python_sitelib}/MiniMock-%{version}-py%{py_ver}.egg-info diff --git a/python3-MiniMock.changes b/python3-MiniMock.changes index 89ea8e9..76b9f74 100644 --- a/python3-MiniMock.changes +++ b/python3-MiniMock.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri May 3 09:27:12 UTC 2013 - speilicke@suse.com + +- Provides/obsoletes for python3-minimock is useless, that package + never existed +- Removing __pycache__ is actually wrong +- "-rm docs/.changelog.rst.un~ # Remove junk" was bogus +- No need to buildrequire python3, usually you only need that when + requiring the _ssl module (as Jan if in doubt) +- No need to buildrequire python3-2to3, it's in python3-devel nowadays + ------------------------------------------------------------------- Mon Apr 29 12:29:43 UTC 2013 - dmueller@suse.com diff --git a/python3-MiniMock.spec b/python3-MiniMock.spec index 71b5fbb..b06c881 100644 --- a/python3-MiniMock.spec +++ b/python3-MiniMock.spec @@ -25,14 +25,8 @@ License: MIT Group: Development/Languages/Python Source: http://pypi.python.org/packages/source/M/MiniMock/MiniMock-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python3 -BuildRequires: python3-2to3 BuildRequires: python3-devel BuildRequires: python3-distribute -Provides: python3-minimock = %{version} -#TODO: Change back to '<' after version update: -Obsoletes: python3-minimock <= %{version} -Requires: python(abi) = %{py3_ver} BuildArch: noarch %description @@ -41,22 +35,17 @@ When using doctest, mock objects can be very simple. %prep %setup -q -n MiniMock-%{version} -rm docs/.changelog.rst.un~ # Remove junk +2to3 -w -n . %build -2to3 -w -n . python3 setup.py build %install python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} -if [ -d "%{buildroot}%{python3_sitelib}/__pycache__" ]; then - rm -r %{buildroot}%{python3_sitelib}/__pycache__ -fi %files %defattr(-,root,root,-) -%doc docs/* -%{python3_sitelib}/minimock.py* -%{python3_sitelib}/MiniMock-%{version}-py%{py3_ver}.egg-info +%doc docs/license.txt +%{python3_sitelib}/* %changelog