Unable to install Pymem3DG from Pypi
Summary
Latest version of Pymem3DG hosted on Pypi is unable to be built (tested on OSx ARM-64bit)
Mem3DG version
PyMem3DG 0.0.7? Hard to tell, because installation fails.
Steps to reproduce
python1.0 -m pip install pymem3dg
Bug occurs because:
CMake Error at /var/folders/5t/47gxcbn94td37pk5hmkwszl00000gr/T/tmpjmrpe57f/build/python_src/pybind11-src/CMakeLists.txt:8 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.
This can be resolved C++ side by executing with -DCMAKE_POLICY_VERSION_MINIMUM=3.5, but I could not find a way to pass that down through pip / uv.
Possible fixes
It appears that some underlying dependency is requesting a cmake version less than 3.5, but I've not been able to determine what / where the dependency is located. Unless I'm missing something, pybind11 shouldn't be causing this issue, as it's CMakeLists.txt has a higher minimum version.
Thanks for the report. It could be from a dependency of a dependency. We're using scikit-build-core to handle cmake configuration. You maybe able to pass the flag through scikit-build-core to cmake by adding this flag to your pip call --config-settings=cmake.args=-DCMAKE_POLICY_VERSION_MINIMUM=3.5. Please let me know if this works in the meantime.
Another alternative could be to downgrade your cmake version (even temporarily). Cmake is a build time dependency and its version could also be limited by setting in pyproject.toml.
To fix on PyPI we'll have to release a new version of Mem3DG in the longer term.
Thanks for the report. It could be from a dependency of a dependency. We're using scikit-build-core to handle cmake configuration. You maybe able to pass the flag through scikit-build-core to cmake by adding this flag to your pip call
--config-settings=cmake.args=-DCMAKE_POLICY_VERSION_MINIMUM=3.5. Please let me know if this works in the meantime.Another alternative could be to downgrade your cmake version (even temporarily). Cmake is a build time dependency and its version could also be limited by setting in
pyproject.toml.To fix on PyPI we'll have to release a new version of Mem3DG in the longer term.
@ctlee
--config-settings=cmake.args=-DCMAKE_POLICY_VERSION_MINIMUM=3.5 worked like a charm, thank you!
I can't seem to find a way to (temporarily) encode either workaround into a pyproject file (e.g. having issues with installing older versions of cmake), but I think I can just wait for a new release.