#
# spec file for package python-future
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-future
Version:        0.16.0
Release:        2.2
Summary:        Clean single-source support for Python 3 and 2
License:        MIT
Group:          Development/Languages/Python
Url:            https://python-future.org
Source:         https://files.pythonhosted.org/packages/source/f/future/future-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
Requires(post): update-alternatives
Requires(preun): update-alternatives
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%python_subpackages

%description
Easy, safe support for Python 2/3 compatibility

future is the missing compatibility layer between Python 2 and Python
3. It allows you to use a single, clean Python 3.x-compatible codebase to
support both Python 2 and Python 3 with minimal overhead.


%prep
%setup -q -n future-%{version}


%build
%python_build


%install
%python_install

%python_clone -a %{buildroot}%{_bindir}/futurize
%python_clone -a %{buildroot}%{_bindir}/pasteurize

%{python_expand %fdupes %{buildroot}%{$python_sitearch} }


%post
%{python_install_alternative futurize pasteurize}

%preun
%python_uninstall_alternative futurize


%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE.txt README.rst
%{python_sitelib}/*
%python_alternative %{_bindir}/futurize
%python_alternative %{_bindir}/pasteurize

%changelog
* 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)