From 30251992771fecce120265f5884586f1ec966012 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Jul 18 2022 18:36:04 +0000 Subject: Fix FTBFS with pip >= 21.1 --- diff --git a/cantera.spec b/cantera.spec index e31fde5..2b1863b 100644 --- a/cantera.spec +++ b/cantera.spec @@ -16,6 +16,10 @@ Patch0: cantera-test-ppc64le-aarch64-s390x.patch # implement patch until upstream releases fix Patch1: cantera-py311-deprecated-U.patch +# Fix failure to build with pip >= 21.1 +# Fixed upstream: https://github.com/Cantera/cantera/pull/1272 +Patch2: fix-pip-build-21.1.patch + BuildRequires: boost-devel BuildRequires: eigen3-devel BuildRequires: fmt-devel @@ -99,6 +103,7 @@ Summary: Static libraries for Cantera %setup -n %{name}-%{version} %patch0 -p0 %patch1 -p1 +%patch2 -p1 %build %set_build_flags diff --git a/fix-pip-build-21.1.patch b/fix-pip-build-21.1.patch new file mode 100644 index 0000000..c1d66d2 --- /dev/null +++ b/fix-pip-build-21.1.patch @@ -0,0 +1,22 @@ +diff --git a/interfaces/cython/SConscript b/interfaces/cython/SConscript +index 07d383a..8909146 100644 +--- a/interfaces/cython/SConscript ++++ b/interfaces/cython/SConscript +@@ -107,7 +107,7 @@ ext = localenv.LoadableModule(f"cantera/_cantera{module_ext}", + obj, LIBPREFIX="", SHLIBSUFFIX=module_ext, + SHLIBPREFIX="", LIBSUFFIXES=[module_ext]) + +-build_cmd = ("$python_cmd_esc -m pip wheel -v --no-build-isolation --use-feature=in-tree-build --no-deps " ++build_cmd = ("$python_cmd_esc -m pip wheel -v --no-build-isolation --no-deps " + "--wheel-dir=build/python/dist build/python") + plat = info['plat'].replace('-', '_').replace('.', '_') + wheel_name = (f"Cantera-{env['cantera_version']}-cp{py_version_nodot}" +@@ -172,7 +172,7 @@ if env["stage_dir"]: + + install_cmd.append(f"--root={stage_dir.resolve()}") + +-install_cmd.extend(("--no-build-isolation", "--use-feature=in-tree-build", "--no-deps", "-v", "--force-reinstall", ++install_cmd.extend(("--no-build-isolation", "--no-deps", "-v", "--force-reinstall", + "build/python")) + if localenv['PYTHON_INSTALLER'] == 'direct': + mod_inst = install(localenv.Command, 'dummy', mod,