15
0

- 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
This commit is contained in:
Sascha Peilicke
2013-05-03 09:41:42 +00:00
committed by Git OBS Bridge
parent 1a276a3119
commit b4f99379e0
4 changed files with 25 additions and 23 deletions

View File

@@ -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