cf52b8b
%global _description \
cf52b8b
future is the missing compatibility layer between Python 2 and \
cf52b8b
Python 3. It allows you to use a single, clean Python 3.x-compatible \
82cae67
code base to support both Python 2 and Python 3 with minimal overhead. \
cf52b8b
\
cf52b8b
It provides ``future`` and ``past`` packages with backports and forward \
cf52b8b
ports of features from Python 3 and 2. It also comes with ``futurize`` and \
cf52b8b
``pasteurize``, customized 2to3-based scripts that helps you to convert \
cf52b8b
either Py2 or Py3 code easily to support both Python 2 and 3 in a single \
82cae67
clean Py3-style code base, module by module.
82cae67
82cae67
%global pypi_name future
cf52b8b
4c4d6ea
Name: future
4c4d6ea
Summary: Easy, clean, reliable Python 2/3 compatibility
82cae67
Version: 1.0.0
82cae67
Release: %autorelease
82cae67
License: MIT-0
4c4d6ea
URL: http://python-future.org/
82cae67
Source0: https://github.com/PythonCharmers/python-future/archive/refs/tags/v%{version}/python-future-%{version}.tar.gz
4c4d6ea
BuildArch: noarch
4c4d6ea
82cae67
BuildRequires: pyproject-rpm-macros
82cae67
BuildRequires: python3-devel
82cae67
BuildRequires: python3dist(pytest)
ed0deff
82cae67
Patch0: future-1.0.0-PR635.patch
82cae67
Patch1: future-1.0.0-PR636.patch
82cae67
Patch2: future-1.0.0-skip_tests_with_connection_errors.patch
82cae67
Patch3: future-1.0.0-fix_setup.patch
d266c66
4c4d6ea
%description
cf52b8b
%{_description}
4c4d6ea
c6bd85c
%package -n python%{python3_pkgversion}-%{name}
4c4d6ea
Summary: Easy, clean, reliable Python 2/3 compatibility
9b0d5d8
82cae67
%py_provides python3-%{name}
82cae67
%py_provides %{name}
82cae67
c6bd85c
c6bd85c
%description -n python%{python3_pkgversion}-%{name}
cf52b8b
%{_description}
4c4d6ea
4c4d6ea
%prep
82cae67
%autosetup -n python-future-%{version} -p1
4c4d6ea
82cae67
%generate_buildrequires
82cae67
%pyproject_buildrequires -x tests
ddff526
4c4d6ea
%build
82cae67
%pyproject_wheel
4c4d6ea
4c4d6ea
%install
82cae67
%pyproject_install
82cae67
%pyproject_save_files %{pypi_name} libfuturize libpasteurize past
ddff526
82cae67
%py3_shebang_fix %{buildroot}%{python3_sitelib}/%{pypi_name}/backports/test/pystone.py
82cae67
chmod a+x %{buildroot}%{python3_sitelib}/%{pypi_name}/backports/test/pystone.py
4c4d6ea
82cae67
%check
82cae67
%pytest -k "not recursion_limit"
ddff526
82cae67
%files -n python3-%{name} -f %{pyproject_files}
07dcb1e
%doc README.rst
e19505e
%{_bindir}/futurize
e19505e
%{_bindir}/pasteurize
4c4d6ea
4c4d6ea
%changelog
82cae67
%autochangelog