# # spec file for package python-future # # Copyright (c) 2019 SUSE LLC # # 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. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-future Version: 0.18.2 Release: 1.3 Summary: Single-source support for Python 3 and 2 # See https://github.com/PythonCharmers/python-future/issues/242 for PSF licensing License: MIT AND Python-2.0 URL: https://python-future.org Source0: https://files.pythonhosted.org/packages/source/f/future/future-%{version}.tar.gz Source100: python-future-rpmlintrc # PATCH-FIX-UPSTREAM python38-pow.patch gh#PythonCharmers/python-future#474 mcepl@suse.com Patch0: python38-pow.patch # UPSTREAM ISSUE gh#PythonCharmers/python-future#508 Patch1: future-correct-mimetype.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-dbm Requires(post): update-alternatives Requires(preun): update-alternatives BuildArch: noarch %python_subpackages %description 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. %prep %setup -q -n future-%{version} %autopatch -p1 sed -i -e '/^#!\//, 1d' src/future/backports/test/pystone.py %build %python_build %install %python_install %python_clone -a %{buildroot}%{_bindir}/futurize %python_clone -a %{buildroot}%{_bindir}/pasteurize %python_expand %fdupes %{buildroot}%{$python_sitelib} %post %{python_install_alternative futurize pasteurize} %preun %python_uninstall_alternative futurize %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)' } %files %{python_files} %doc README.rst %license LICENSE.txt %python_alternative %{_bindir}/futurize %python_alternative %{_bindir}/pasteurize %{python_sitelib}/* %changelog * Thu Dec 5 2019 Matej Cepl - Update to 0.18.2: - Fix min/max functions with generators, and 'None' default (PR #514) - Use BaseException in raise_() (PR #515) - Fix builtins.round() for Decimals (Issue #501) - Fix raise_from() to prevent failures with immutable classes (PR #518) - Make FixInput idempotent (Issue #427) - Fix type in newround (PR #521) - Support mimetype guessing in urllib2 for Py3.8+ (Issue #508) - fix for raise_() when passed an exception that's not an Exception (e.g. BaseException subclasses) - Rebase future-correct-mimetype.patch to revert incorrect fix in gh#PythonCharmers/python-future#508 * Mon Oct 14 2019 Steve Kowalik - Update to 0.18.0. - Remove python38-compat.patch, already included. - Add future-correct-mimetype.patch, since Python 3.8 is able to detect the MIME type now. * Wed Oct 2 2019 Matej Cepl - Add python38-compat.patch to fix compatibility with Python 3.8 gh#PythonCharmers/python-future#447 - Add python38-pow.patch not to expect exception on new available parameters for Python 3.8. gh#PythonCharmers/python-future#474 * Tue May 7 2019 John Vandenberg - Change License from MIT to MIT and Python-2.0 * Mon Mar 11 2019 John Vandenberg - Activate test suite * Tue Dec 4 2018 Matej Cepl - Remove superfluous devel dependency for noarch package * Fri Nov 16 2018 Todd R - Update to version 0.17.1 * This release address a packaging error because of an erroneous declaration that any built wheels are universal. - Update to version 0.17.0 * Fix ``from collections import ChainMap`` after install_aliases() (issue #226) * Fix multiple import from ``__future__`` bug in futurize (issue #113) * Add support for proper %%s formatting of newbytes * Properly implement iterator protocol for newrange object * Fix ``past.translation`` on read-only file systems * Fix Tkinter import bug introduced in Python 2.7.4 (issue #262) * Correct TypeError to ValueError in a specific edge case for newrange * Support inequality tests betwen newstrs and newbytes * Add type check to __get__ in newsuper * Fix fix_divsion_safe to support better conversion of complex expressions, and skip obvious float division. * Thu Apr 6 2017 toddrme2178@gmail.com - Implement single-spec version * Fri Nov 25 2016 mimi.vx@gmail.com - update to 0.16.0 * Fix newbytes constructor bug. * Fix semantics of bool() with newobject. * Fix standard_library.install_aliases() on PyPy * Fix assertRaises for pow and compile` on Python 3.5. * Fix return argument of future.utils.ensure_new_type if conversion to new type does not exist. * Add missing cmp_to_key for Py2.6. * Allow the old_div fixer to be disabled. * Improve compatibility with Google App Engine. * Add some missing imports to the tkinter and tkinter.filedialog package namespaces * Fix raise_from on PY3 when the exception cannot be recreated from its repr. * Tue Oct 11 2016 ms@suse.com - Tracker changelog entry to add python-future to SLE12 (bnc#999200) * Wed Sep 21 2016 okurz@suse.com - Fix rpm uninstall warnings by removing alternatives in postun as discussed in https://build.opensuse.org/request/show/427095 * Thu Sep 15 2016 toddrme2178@gmail.com - Fix update-alternatives usage. * Fri Sep 9 2016 glin@suse.com - Remove %%ghost from %%{_bindir}/futurize and %%{_bindir}/pasteurize (fate#320644) * Mon Dec 14 2015 glin@suse.com - initial import: 0.15.2 (fate#320644)