python3Packages.mmengine: remove failing numpy.compat import (#419607)
This commit is contained in:
commit
ffd3e8f24a
@ -48,9 +48,16 @@ buildPythonPackage rec {
|
|||||||
hash = "sha256-NNF9sLJWV1q6uBE73LUW4UWwYm4TBMTBJjJkFArBmsc=";
|
hash = "sha256-NNF9sLJWV1q6uBE73LUW4UWwYm4TBMTBJjJkFArBmsc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch =
|
||||||
|
# Fails in python >= 3.13
|
||||||
|
# exec(compile(f.read(), version_file, "exec")) does not populate the locals() namesp
|
||||||
|
# In python 3.13, the locals() dictionary in a function does not automatically update with
|
||||||
|
# changes made by exec().
|
||||||
|
# https://peps.python.org/pep-0558/
|
||||||
|
''
|
||||||
substituteInPlace setup.py \
|
substituteInPlace setup.py \
|
||||||
--replace-fail "cpu_use = 4" "cpu_use = $NIX_BUILD_CORES"
|
--replace-fail "cpu_use = 4" "cpu_use = $NIX_BUILD_CORES" \
|
||||||
|
--replace-fail "return locals()['__version__']" "return '${version}'"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|||||||
@ -52,6 +52,23 @@ buildPythonPackage rec {
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postPatch =
|
||||||
|
# Fails in python >= 3.13
|
||||||
|
# exec(compile(f.read(), version_file, "exec")) does not populate the locals() namesp
|
||||||
|
# In python 3.13, the locals() dictionary in a function does not automatically update with
|
||||||
|
# changes made by exec().
|
||||||
|
# https://peps.python.org/pep-0558/
|
||||||
|
''
|
||||||
|
substituteInPlace setup.py \
|
||||||
|
--replace-fail \
|
||||||
|
"return locals()['__version__']" \
|
||||||
|
"return '${version}'"
|
||||||
|
''
|
||||||
|
+ ''
|
||||||
|
substituteInPlace tests/test_config/test_lazy.py \
|
||||||
|
--replace-fail "import numpy.compat" ""
|
||||||
|
'';
|
||||||
|
|
||||||
build-system = [ setuptools ];
|
build-system = [ setuptools ];
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user