Merged update from upstream sources
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/python-six.git#5b8bf1840044c9c5712d5a4b0ebb65757ca96f45
This commit is contained in:
parent
14b6f114fc
commit
c589ab20f9
@ -1,60 +1,22 @@
|
|||||||
%global modname six
|
# tests are enabled by default
|
||||||
|
|
||||||
# tests are enabled by default, but on Fedora 32+, Python 2 tests are skipped
|
|
||||||
%bcond_without tests
|
%bcond_without tests
|
||||||
|
|
||||||
# python2 is enabled by default, Fedora 32+ exception is for offlineimap
|
%global python_wheelname six-%{version}-py2.py3-none-any.whl
|
||||||
# https://pagure.io/fesco/issue/2274
|
|
||||||
# The exception applies to Fedora only and has no target release yet
|
|
||||||
%if 0%{?fedora}
|
|
||||||
%bcond_without python2
|
|
||||||
%else
|
|
||||||
%bcond_with python2
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%global python_wheelname %{modname}-%{version}-py2.py3-none-any.whl
|
Name: python-six
|
||||||
|
|
||||||
Name: python-%{modname}
|
|
||||||
Version: 1.15.0
|
Version: 1.15.0
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: Python 2 and 3 compatibility utilities
|
Summary: Python 2 and 3 compatibility utilities
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://pypi.python.org/pypi/six
|
URL: https://pypi.python.org/pypi/six
|
||||||
Source0: %{pypi_source %{modname}}
|
Source0: %{pypi_source six}
|
||||||
|
|
||||||
# Backported from upstream PR: https://github.com/benjaminp/six/pull/343
|
# Backported from upstream PR: https://github.com/benjaminp/six/pull/343
|
||||||
Patch0: py310.patch
|
Patch0: py310.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%global _description \
|
|
||||||
%%{name} provides simple utilities for wrapping over differences between\
|
|
||||||
Python 2 and Python 3.
|
|
||||||
|
|
||||||
%description %{_description}
|
|
||||||
|
|
||||||
%if %{with python2}
|
|
||||||
%package -n python2-%{modname}
|
|
||||||
Summary: %{summary}
|
|
||||||
%{?python_provide:%python_provide python2-%{modname}}
|
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildRequires: python2-setuptools
|
|
||||||
|
|
||||||
%if %{with tests} && 0%{?fedora} < 32
|
|
||||||
BuildRequires: python2-pytest
|
|
||||||
BuildRequires: python2-tkinter
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description -n python2-%{modname} %{_description}
|
|
||||||
Python 2 version.
|
|
||||||
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%package -n python%{python3_pkgversion}-%{modname}
|
|
||||||
Summary: %{summary}
|
|
||||||
%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}}
|
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||||
BuildRequires: python%{python3_pkgversion}-pip
|
BuildRequires: python%{python3_pkgversion}-pip
|
||||||
@ -65,55 +27,47 @@ BuildRequires: python3-pytest
|
|||||||
BuildRequires: python3-tkinter
|
BuildRequires: python3-tkinter
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description -n python%{python3_pkgversion}-%{modname} %{_description}
|
%global _description %{expand:
|
||||||
Python 3 version.
|
%{name} provides simple utilities for wrapping over differences between
|
||||||
|
Python 2 and Python 3.}
|
||||||
|
|
||||||
|
%description %{_description}
|
||||||
|
|
||||||
|
|
||||||
|
%package -n python%{python3_pkgversion}-six
|
||||||
|
Summary: %{summary}
|
||||||
|
|
||||||
|
%description -n python%{python3_pkgversion}-six %{_description}
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n %{modname}-%{version}
|
%autosetup -p1 -n six-%{version}
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{with python2}
|
|
||||||
%py2_build
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%py3_build_wheel
|
%py3_build_wheel
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if %{with python2}
|
|
||||||
%py2_install
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%py3_install_wheel %{python_wheelname}
|
%py3_install_wheel %{python_wheelname}
|
||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
%if %{with python2} && 0%{?fedora} < 32
|
%pytest -rfsxX test_six.py
|
||||||
PYTHONPATH=%{buildroot}%{python2_sitelib} pytest-2 -rfsxX test_six.py
|
|
||||||
%endif
|
|
||||||
PYTHONPATH=%{buildroot}%{python3_sitelib} pytest-3 -rfsxX test_six.py
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%if %{with python2}
|
%files -n python%{python3_pkgversion}-six
|
||||||
%files -n python2-%{modname}
|
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.rst documentation/index.rst
|
%doc README.rst documentation/index.rst
|
||||||
%{python2_sitelib}/%{modname}-*.egg-info/
|
%{python3_sitelib}/six-*.dist-info/
|
||||||
%{python2_sitelib}/%{modname}.py*
|
%pycached %{python3_sitelib}/six.py
|
||||||
%endif
|
|
||||||
|
|
||||||
%files -n python%{python3_pkgversion}-%{modname}
|
|
||||||
%license LICENSE
|
|
||||||
%doc README.rst documentation/index.rst
|
|
||||||
%{python3_sitelib}/%{modname}-*.dist-info/
|
|
||||||
%{python3_sitelib}/%{modname}.py
|
|
||||||
%{python3_sitelib}/__pycache__/%{modname}.*
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 15 2021 Miro Hrončok <mhroncok@redhat.com> - 1.15.0-5
|
||||||
|
- Remove python2-six
|
||||||
|
|
||||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-4
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user