python311Packages.duckdb: fix setup.py substitutions, use scm pretend version

replacement in setup.py is now indented in an if statement so replace
with 'pass' rather than an empty string to fix parse errors

OVERRIDE_GIT_DESCRIBE broke and no longer defines the version and thus
requires SETUPTOOLS_SCM_PRETEND_VERSION
This commit is contained in:
annalee 2024-04-21 17:14:17 +00:00
parent 6ae6cd344d
commit a7d41d4e02
No known key found for this signature in database

View File

@ -25,7 +25,7 @@ buildPythonPackage rec {
# 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')])" ""
--replace-fail "define_macros.extend([('DUCKDB_EXTENSION_AUTOLOAD_DEFAULT', '1'), ('DUCKDB_EXTENSION_AUTOINSTALL_DEFAULT', '1')])" "pass"
'';
env = {
@ -34,8 +34,6 @@ buildPythonPackage rec {
OVERRIDE_GIT_DESCRIBE="v${version}-0-g${rev}";
};
dontPretendSetuptoolsSCMVersion = true;
nativeBuildInputs = [
pybind11
setuptools-scm