commit 29400e4b3a1eb88add880b7330573fc4d1a555dd Author: Keke Ming Date: Mon Feb 23 16:09:21 2026 +0800 add python-future diff --git a/python-future.spec b/python-future.spec new file mode 100644 index 0000000..d2905a3 --- /dev/null +++ b/python-future.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# SPDX-FileContributor: Jvle +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname future + +Name: python-%{srcname} +Version: 1.0.0 +Release: %autorelease +Summary: Clean single-source support for Python 3 and 2 +License: PSF-2.0 +URL: https://python-future.org/ +VCS: git:https://github.com/PythonCharmers/python-future +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/f/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +BuildOption(install): -l %{srcname} past + +BuildRequires: pkgconfig(python3) +BuildRequires: pyproject-rpm-macros +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(pip) +BuildRequires: python3dist(wheel) +BuildRequires: python3dist(pytest) +BuildRequires: python3-tkinter +BuildRequires: python3-test + +Provides: python3-%{srcname} = %{version}-%{release} +%python_provide python3-%{srcname} + +%description +Easy, safe support for Python 3/2 compatibility. + +%prep +%autosetup -n %{srcname}-%{version} + +%generate_buildrequires +%pyproject_buildrequires + +%install -p +rm -rf %{buildroot}%{python3_sitelib}/future/moves/tkinter +rm -rf %{buildroot}%{python3_sitelib}/future/moves/winreg.py +rm -rf %{buildroot}%{python3_sitelib}/past/translation +rm -f tests/test_past/test_translation.py + +%check +%pytest tests/test_past + +%files -f %{pyproject_files} +%doc README.rst docs/_themes/LICENSE LICENSE.txt + +%changelog +%{?autochangelog}