2012-06-06 08:39:34 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-six
|
|
|
|
#
|
2020-01-02 10:36:17 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2012-06-06 08:39:34 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-09-03 18:19:29 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-06-06 08:39:34 +00:00
|
|
|
#
|
|
|
|
|
2016-02-09 09:48:53 +00:00
|
|
|
|
2017-02-24 14:34:14 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2018-12-10 08:22:48 +00:00
|
|
|
# This is not only because of dependency of testsuite, but mostly
|
|
|
|
# because of cyclical dependencies between six and Sphinx.
|
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%bcond_without test
|
2019-06-11 07:01:25 +00:00
|
|
|
%define psuffix -test
|
2018-12-10 08:22:48 +00:00
|
|
|
%else
|
|
|
|
%bcond_with test
|
2019-06-11 07:01:25 +00:00
|
|
|
%define psuffix %{nil}
|
2018-12-10 08:22:48 +00:00
|
|
|
%endif
|
2020-03-09 20:54:55 +00:00
|
|
|
Name: python-six%{psuffix}
|
2020-01-21 11:18:42 +00:00
|
|
|
Version: 1.14.0
|
2012-06-06 08:39:34 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Python 2 and 3 compatibility utilities
|
|
|
|
License: MIT
|
|
|
|
Group: Development/Libraries/Python
|
2018-08-10 13:08:40 +00:00
|
|
|
URL: http://pypi.python.org/pypi/six/
|
2017-09-28 07:48:29 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/s/six/six-%{version}.tar.gz
|
2020-03-10 07:54:18 +00:00
|
|
|
BuildRequires: %{python_module base}
|
2018-12-10 10:50:09 +00:00
|
|
|
BuildRequires: fdupes
|
2017-02-17 15:47:03 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-06-11 07:01:25 +00:00
|
|
|
BuildArch: noarch
|
2018-12-10 08:22:48 +00:00
|
|
|
%if %{with test}
|
2020-01-02 10:36:17 +00:00
|
|
|
BuildRequires: %{python_module dbm}
|
2018-12-10 08:22:48 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module py}
|
|
|
|
BuildRequires: python3-Sphinx
|
|
|
|
%endif
|
2017-02-17 15:47:03 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
2012-06-06 08:39:34 +00:00
|
|
|
%description
|
2017-09-28 06:01:51 +00:00
|
|
|
Six is a Python 2 and 3 compatibility library. It provides utility
|
|
|
|
functions for smoothing over the differences between the Python
|
|
|
|
versions with the goal of writing Python code that is compatible on
|
|
|
|
both Python versions. See the documentation for more information on
|
2012-06-06 08:39:34 +00:00
|
|
|
what is provided.
|
|
|
|
|
2018-12-10 08:22:48 +00:00
|
|
|
%package -n python-six-doc
|
2019-06-11 07:01:25 +00:00
|
|
|
Summary: Documentation files for %{name}
|
2018-12-10 08:22:48 +00:00
|
|
|
Group: Documentation/HTML
|
2019-06-11 07:01:25 +00:00
|
|
|
Provides: %{python_module six-doc = %{version}}
|
2018-12-10 08:22:48 +00:00
|
|
|
|
2018-12-10 10:50:09 +00:00
|
|
|
%description -n python-six-doc
|
2018-12-10 08:22:48 +00:00
|
|
|
Six is a Python 2 and 3 compatibility library. It provides utility
|
|
|
|
functions for smoothing over the differences between the Python
|
|
|
|
versions with the goal of writing Python code that is compatible on
|
|
|
|
both Python versions.
|
|
|
|
|
|
|
|
This package provides documentation for %{name}.
|
|
|
|
|
2012-06-06 08:39:34 +00:00
|
|
|
%prep
|
2013-07-30 07:40:02 +00:00
|
|
|
%setup -q -n six-%{version}
|
2012-06-06 08:39:34 +00:00
|
|
|
|
|
|
|
%build
|
2017-02-17 15:47:03 +00:00
|
|
|
%python_build
|
2020-01-02 10:36:17 +00:00
|
|
|
%if %{with test}
|
2018-12-10 08:22:48 +00:00
|
|
|
cd documentation && make html && rm _build/html/.buildinfo
|
|
|
|
%endif
|
2012-06-06 08:39:34 +00:00
|
|
|
|
|
|
|
%install
|
2018-12-10 08:22:48 +00:00
|
|
|
%if ! %{with test}
|
2017-02-17 15:47:03 +00:00
|
|
|
%python_install
|
2018-12-10 10:50:09 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2020-03-10 07:54:18 +00:00
|
|
|
# add the setuptools egg-info directory
|
|
|
|
%{python_expand rm %{buildroot}%{$python_sitelib}/six-%{version}-py%{$python_version}.egg-info
|
|
|
|
mkdir -p %{buildroot}%{$python_sitelib}/six-%{version}-py%{$python_version}.egg-info/
|
|
|
|
cp six.egg-info/* %{buildroot}%{$python_sitelib}/six-%{version}-py%{$python_version}.egg-info/
|
|
|
|
}
|
2018-12-10 08:22:48 +00:00
|
|
|
%endif
|
2012-06-06 08:39:34 +00:00
|
|
|
|
2018-12-10 08:22:48 +00:00
|
|
|
%check
|
|
|
|
%if %{with test}
|
2019-06-11 07:01:25 +00:00
|
|
|
%pytest test_six.py
|
2018-12-10 08:22:48 +00:00
|
|
|
%endif
|
2013-07-30 07:40:02 +00:00
|
|
|
|
2019-01-25 23:41:08 +00:00
|
|
|
%pre
|
2020-03-09 20:54:55 +00:00
|
|
|
# handle distutils (file) to setuptools transition (directory)
|
|
|
|
if [ -f %{python_sitelib}/six-*-py%{python_version}.egg-info ]; then
|
|
|
|
rm -vf %{python_sitelib}/six-*-py%{python_version}.egg-info
|
2017-10-16 16:50:46 +00:00
|
|
|
fi
|
|
|
|
|
2019-06-11 07:01:25 +00:00
|
|
|
%if !%{with test}
|
2018-08-10 13:08:40 +00:00
|
|
|
%files %{python_files}
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.rst CHANGES
|
2013-07-30 07:40:02 +00:00
|
|
|
%{python_sitelib}/six.py*
|
2017-02-17 15:47:03 +00:00
|
|
|
%pycache_only %{python3_sitelib}/__pycache__/*
|
2016-01-19 09:29:45 +00:00
|
|
|
%{python_sitelib}/six-%{version}-py*.egg-info
|
2019-06-11 07:01:25 +00:00
|
|
|
%else
|
|
|
|
%files -n python-six-doc
|
|
|
|
%license LICENSE
|
|
|
|
%doc documentation/_build/html
|
2018-12-10 08:22:48 +00:00
|
|
|
%endif
|
2012-06-06 08:39:34 +00:00
|
|
|
|
|
|
|
%changelog
|