Accepting request 320370 from devel:languages:python

1

OBS-URL: https://build.opensuse.org/request/show/320370
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-six?expand=0&rev=21
This commit is contained in:
Dominique Leuenberger 2015-08-06 22:23:42 +00:00 committed by Git OBS Bridge
commit 4d7c9d6d15
2 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Tue Aug 4 07:50:17 UTC 2015 - dimstar@opensuse.org
- Delete the system egg-info during pre phase: older versions of
the package installed it as a directory, the latest update
creates a file, and rpm has known issues with replacing this.
-------------------------------------------------------------------
Wed Jul 29 13:01:56 UTC 2015 - toddrme2178@gmail.com
- Make tests conditional to avoid dependency loop.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Apr 16 10:41:33 UTC 2015 - hpj@urpla.net Thu Apr 16 10:41:33 UTC 2015 - hpj@urpla.net

View File

@ -16,6 +16,10 @@
# #
# NOTE(saschpe): git invocation and pythonpath issues with testrepository
# enable testing with a build conditional (off by default):
%bcond_with test
Name: python-six Name: python-six
Version: 1.9.0 Version: 1.9.0
Release: 0 Release: 0
@ -26,9 +30,11 @@ Group: Development/Libraries/Python
Source: http://pypi.python.org/packages/source/s/six/six-%{version}.tar.gz Source: http://pypi.python.org/packages/source/s/six/six-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel BuildRequires: python-devel
%if %{with test}
# Test requirements: # Test requirements:
BuildRequires: python-py BuildRequires: python-py
BuildRequires: python-pytest BuildRequires: python-pytest
%endif
%if 0%{?suse_version} <= 1110 %if 0%{?suse_version} <= 1110
BuildRequires: python-argparse BuildRequires: python-argparse
Requires: python-argparse Requires: python-argparse
@ -56,8 +62,17 @@ python setup.py build
%install %install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%if %{with test}
%check %check
python test_six.py python test_six.py
%endif
%pre
# previous versions of the package installed .egg-info as a directory,
# the new update now installs it as a file. Clean out the directory, should it exist.
if [ -d %{python_sitelib}/six-%{version}-py%{py_ver}.egg-info ]; then
rm -rf %{python_sitelib}/six-%{version}-py%{py_ver}.egg-info
fi
%files %files
%defattr(-,root,root) %defattr(-,root,root)