python3Packages.mmengine: fix on python 3.13
This commit is contained in:
@@ -52,10 +52,22 @@ buildPythonPackage rec {
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace tests/test_config/test_lazy.py \
|
||||
--replace-fail "import numpy.compat" ""
|
||||
'';
|
||||
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 ];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user