From cc8ba9270c5803a31d59d5700f5ee26abe69c1af Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 5 Jan 2024 01:32:26 -0500 Subject: [PATCH] Avoid python-build dependency %pyproject_wheel already pulls in setuptools and handles the build without any additional dependencies. python-build is also not included in RHEL. --- 0001-Remove-unnecessary-build-deps.patch | 31 ++++++++++++++++++++++++ scons.spec | 6 +++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 0001-Remove-unnecessary-build-deps.patch diff --git a/0001-Remove-unnecessary-build-deps.patch b/0001-Remove-unnecessary-build-deps.patch new file mode 100644 index 0000000..3e3376a --- /dev/null +++ b/0001-Remove-unnecessary-build-deps.patch @@ -0,0 +1,31 @@ +%pyproject_wheel already pulls in setuptools and handles the build +without any additional dependencies. python-build is also not included +in RHEL. + +pyproject.toml changes are Fedora-specific +setup.cfg changes from commit e27b28c6b3ca8c9155bff38891189eb73deab611 + +diff --git a/pyproject.toml b/pyproject.toml +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,6 +1,3 @@ +-[build-system] +-build-backend = "setuptools.build_meta" +-requires = ["setuptools"] + + # for black and mypy, set the lowest Python version supported + [tool.black] +diff --git a/setup.cfg b/setup.cfg +--- a/setup.cfg ++++ b/setup.cfg +@@ -40,10 +40,6 @@ classifiers = + [options] + zip_safe = False + python_requires = >=3.6 +-install_requires = setuptools +-setup_requires = +- setuptools +- build + include_package_data = True + packages = find: + diff --git a/scons.spec b/scons.spec index f35e933..cb1b902 100644 --- a/scons.spec +++ b/scons.spec @@ -14,6 +14,9 @@ License: MIT URL: http://www.scons.org Source0: %{pypi_source} Source1: https://scons.org/doc/production/scons-doc-%{version}.tar.gz +# Avoid unnecessary dependency on python-build +Patch0: 0001-Remove-unnecessary-build-deps.patch + BuildArch: noarch BuildRequires: make @@ -76,11 +79,10 @@ defined Builder and/or Scanner objects. %if 0%{with prebuilt_doc} %autosetup -n SCons-%{version} -N %setup -n SCons-%{version} -q -T -D -a 1 -cd .. %else %autosetup -N -T -b 0 -cd .. %endif +%autopatch -p1 %generate_buildrequires %pyproject_buildrequires -x tests