2015-12-17 13:37:13 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-future
|
|
|
|
#
|
2019-12-05 14:38:26 +00:00
|
|
|
# Copyright (c) 2019 SUSE LLC
|
2015-12-17 13:37:13 +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.
|
|
|
|
|
2019-12-05 14:38:26 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-09-12 11:13:09 +00:00
|
|
|
#
|
2015-12-17 13:37:13 +00:00
|
|
|
|
|
|
|
|
2017-04-06 16:24:43 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2015-12-17 13:37:13 +00:00
|
|
|
Name: python-future
|
2019-12-05 14:38:26 +00:00
|
|
|
Version: 0.18.2
|
2015-12-17 13:37:13 +00:00
|
|
|
Release: 0
|
2018-11-16 19:27:55 +00:00
|
|
|
Summary: Single-source support for Python 3 and 2
|
2019-10-14 07:14:40 +00:00
|
|
|
# See https://github.com/PythonCharmers/python-future/issues/242 for PSF licensing
|
2019-12-05 14:38:26 +00:00
|
|
|
License: MIT AND Python-2.0
|
|
|
|
URL: https://python-future.org
|
2018-11-16 19:27:55 +00:00
|
|
|
Source0: https://files.pythonhosted.org/packages/source/f/future/future-%{version}.tar.gz
|
|
|
|
Source100: python-future-rpmlintrc
|
2019-10-02 14:11:43 +00:00
|
|
|
# PATCH-FIX-UPSTREAM python38-pow.patch gh#PythonCharmers/python-future#474 mcepl@suse.com
|
2019-10-14 07:14:40 +00:00
|
|
|
Patch0: python38-pow.patch
|
2019-12-05 14:38:26 +00:00
|
|
|
# UPSTREAM ISSUE gh#PythonCharmers/python-future#508
|
2019-10-14 07:14:40 +00:00
|
|
|
Patch1: future-correct-mimetype.patch
|
2019-03-11 11:22:35 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2019-10-02 14:11:43 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2016-09-12 11:13:09 +00:00
|
|
|
BuildRequires: fdupes
|
2017-04-06 16:24:43 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-10-02 14:11:43 +00:00
|
|
|
BuildRequires: python3-dbm
|
2015-12-17 13:37:13 +00:00
|
|
|
Requires(post): update-alternatives
|
2017-04-06 16:24:43 +00:00
|
|
|
Requires(preun): update-alternatives
|
2015-12-17 13:37:13 +00:00
|
|
|
BuildArch: noarch
|
2017-04-06 16:24:43 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
2015-12-17 13:37:13 +00:00
|
|
|
%description
|
2018-11-16 19:27:55 +00:00
|
|
|
Future is a compatibility layer between Python 2 and Python 3.
|
|
|
|
It allows you to use a single Python 3.x-compatible codebase to
|
|
|
|
support both Python 2 and Python 3.
|
2017-04-06 16:24:43 +00:00
|
|
|
|
2015-12-17 13:37:13 +00:00
|
|
|
%prep
|
|
|
|
%setup -q -n future-%{version}
|
2019-10-02 14:11:43 +00:00
|
|
|
%autopatch -p1
|
2018-11-16 19:27:55 +00:00
|
|
|
sed -i -e '/^#!\//, 1d' src/future/backports/test/pystone.py
|
2017-04-06 16:24:43 +00:00
|
|
|
|
2015-12-17 13:37:13 +00:00
|
|
|
%build
|
2017-04-06 16:24:43 +00:00
|
|
|
%python_build
|
|
|
|
|
2015-12-17 13:37:13 +00:00
|
|
|
%install
|
2017-04-06 16:24:43 +00:00
|
|
|
%python_install
|
|
|
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/futurize
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pasteurize
|
2015-12-17 13:37:13 +00:00
|
|
|
|
2018-11-16 19:27:55 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2015-12-17 13:37:13 +00:00
|
|
|
|
|
|
|
%post
|
2017-04-06 16:24:43 +00:00
|
|
|
%{python_install_alternative futurize pasteurize}
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%python_uninstall_alternative futurize
|
2015-12-17 13:37:13 +00:00
|
|
|
|
2019-03-11 11:22:35 +00:00
|
|
|
%check
|
|
|
|
# test_moves_urllib_request_http or test_urllib_request_http require internet
|
|
|
|
# test_geturl or test_main fail only on Leap 42.3 and SLE 12 SP4
|
|
|
|
%{python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m pytest \
|
|
|
|
-k 'not (test_moves_urllib_request_http or test_urllib_request_http or test_geturl or test_main)'
|
|
|
|
}
|
|
|
|
|
2017-04-06 16:24:43 +00:00
|
|
|
%files %{python_files}
|
2018-11-16 19:27:55 +00:00
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE.txt
|
2017-04-06 16:24:43 +00:00
|
|
|
%python_alternative %{_bindir}/futurize
|
|
|
|
%python_alternative %{_bindir}/pasteurize
|
2018-11-16 19:27:55 +00:00
|
|
|
%{python_sitelib}/*
|
2015-12-17 13:37:13 +00:00
|
|
|
|
|
|
|
%changelog
|