From 6aae3855401009edcc83bd15780c1fd1974dff20 Mon Sep 17 00:00:00 2001 From: Keke Ming Date: Mon, 23 Feb 2026 16:09:21 +0800 Subject: [PATCH] add python-future --- python-future.spec | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 python-future.spec diff --git a/python-future.spec b/python-future.spec new file mode 100644 index 0000000..5d0e2db --- /dev/null +++ b/python-future.spec @@ -0,0 +1,60 @@ +# 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 + +%check +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 +%pytest tests/test_past + +%files -f %{pyproject_files} +%doc README.rst docs/_themes/LICENSE LICENSE.txt +%{_bindir}/futurize +%{_bindir}/pasteurize +%{python3_sitelib}/%{srcname}-%{version}-py*.*.egg-info +%{python3_sitelib}/%{srcname} +%{python3_sitelib}/past + +%changelog +%{?autochangelog} \ No newline at end of file