python3Packages.duckdb: fix eval (#426973)

This commit is contained in:
K900
2025-07-20 20:16:32 +03:00
committed by GitHub
@@ -25,19 +25,21 @@ buildPythonPackage rec {
;
pyproject = true;
postPatch = (duckdb.postPatch or "") + ''
# we can't use sourceRoot otherwise patches don't apply, because the patches apply to the C++ library
cd tools/pythonpkg
postPatch =
(duckdb.postPatch or "")
+ ''
# we can't use sourceRoot otherwise patches don't apply, because the patches apply to the C++ library
cd tools/pythonpkg
# 1. let nix control build cores
# 2. default to extension autoload & autoinstall disabled
substituteInPlace setup.py \
--replace-fail "ParallelCompile()" 'ParallelCompile("NIX_BUILD_CORES")' \
--replace-fail "define_macros.extend([('DUCKDB_EXTENSION_AUTOLOAD_DEFAULT', '1'), ('DUCKDB_EXTENSION_AUTOINSTALL_DEFAULT', '1')])" "pass"
# 1. let nix control build cores
# 2. default to extension autoload & autoinstall disabled
substituteInPlace setup.py \
--replace-fail "ParallelCompile()" 'ParallelCompile("NIX_BUILD_CORES")' \
--replace-fail "define_macros.extend([('DUCKDB_EXTENSION_AUTOLOAD_DEFAULT', '1'), ('DUCKDB_EXTENSION_AUTOINSTALL_DEFAULT', '1')])" "pass"
substituteInPlace pyproject.toml \
--replace-fail 'setuptools_scm>=6.4,<8.0' 'setuptools_scm'
'';
substituteInPlace pyproject.toml \
--replace-fail 'setuptools_scm>=6.4,<8.0' 'setuptools_scm'
'';
env = {
DUCKDB_BUILD_UNITY = 1;