58 lines
1.6 KiB
RPMSpec
58 lines
1.6 KiB
RPMSpec
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
|
|
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
|
|
# SPDX-FileContributor: Jvle <keke.oerv@isrc.iscas.ac.cn>
|
|
#
|
|
# 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}
|