14
0
forked from pool/python-six

Accepting request 458703 from devel:languages:python:singlespec

- update to run tests against python3 as well

- update for multipython build

OBS-URL: https://build.opensuse.org/request/show/458703
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-six?expand=0&rev=46
This commit is contained in:
Jan Matejek
2017-02-17 15:47:03 +00:00
committed by Git OBS Bridge
parent 3f2604065e
commit 3ca5d26bf6
4 changed files with 31 additions and 23 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Oct 5 14:34:05 UTC 2016 - jmatejek@suse.com
- update to run tests against python3 as well
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jan 19 09:07:19 UTC 2016 - toddrme2178@gmail.com Tue Jan 19 09:07:19 UTC 2016 - toddrme2178@gmail.com

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-six-doc # spec file for package python-six-doc
# #
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +16,7 @@
# #
%{?!python_module:%define python_module() python-%1 python3-%1}
Name: python-six-doc Name: python-six-doc
Version: 1.10.0 Version: 1.10.0
Release: 0 Release: 0
@@ -25,12 +26,13 @@ License: MIT
Group: Development/Libraries/Python 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-six BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module six}
# Documentation requirements: # Documentation requirements:
BuildRequires: python-Sphinx
# Test requirements: # Test requirements:
BuildRequires: python-py BuildRequires: %{python_module pytest}
BuildRequires: python-pytest BuildRequires: %{python_module py}
BuildRequires: python-rpm-macros
BuildArch: noarch BuildArch: noarch
%description %description
@@ -56,7 +58,7 @@ cd documentation && make html && rm _build/html/.buildinfo
mkdir test mkdir test
cp test_six.py test cp test_six.py test
pushd test pushd test
py.test test_six.py %python_exec %{_bindir}/py.test test_six.py
popd popd
rm -rf test rm -rf test

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Oct 5 14:33:14 UTC 2016 - jmatejek@suse.com
- update for multipython build
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Feb 9 07:45:20 UTC 2016 - olaf@aepfle.de Tue Feb 9 07:45:20 UTC 2016 - olaf@aepfle.de

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-six # spec file for package python-six
# #
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +16,7 @@
# #
%{?!python_module:%define python_module() python-%1 python3-%1}
Name: python-six Name: python-six
Version: 1.10.0 Version: 1.10.0
Release: 0 Release: 0
@@ -25,16 +26,17 @@ License: MIT
Group: Development/Libraries/Python 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_module base}
%if 0%{?suse_version} <= 1110 BuildRequires: python-rpm-macros
BuildRequires: python-argparse
Requires: python-argparse
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
%if 0%{?suse_version} > 1110 %if 0%{?suse_version} > 1110
BuildArch: noarch BuildArch: noarch
%else
BuildRequires: python-argparse
Requires: python-argparse
%endif %endif
%python_subpackages
%description %description
Six is a Python 2 and 3 compatibility library. It provides utility Six is a Python 2 and 3 compatibility library. It provides utility
functions for smoothing over the differences between the Python functions for smoothing over the differences between the Python
@@ -46,28 +48,22 @@ what is provided.
%setup -q -n six-%{version} %setup -q -n six-%{version}
%build %build
python setup.py build %python_build
# due to cyclic requirements between Sphinx and six, # due to cyclic requirements between Sphinx and six,
# documentation is build in its own package <hpj@urpla.net> # documentation is build in its own package <hpj@urpla.net>
%install %install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} %python_install
# Run tests in -doc package to avoid dependency loop # Run tests in -doc package to avoid dependency loop
# %check # %check
# python test_six.py # python test_six.py
%pre %files %python_files
# 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
%defattr(-,root,root) %defattr(-,root,root)
%doc LICENSE README %doc LICENSE README
%{python_sitelib}/six.py* %{python_sitelib}/six.py*
%pycache_only %{python3_sitelib}/__pycache__/*
%{python_sitelib}/six-%{version}-py*.egg-info %{python_sitelib}/six-%{version}-py*.egg-info
%changelog %changelog