Open Mizux opened 2 years ago
(Conda-forge maintainer here)
For 0.
Yes it's not needed. I had seen it suggested as a way to get it formatted but it seems like it's the same. Pypa is also currently working on a --json
flag.
ref: https://github.com/pypa/pip/issues/5261
For 1.:
I'm currently just replacing the installation part with
message(FATAL_ERROR "Can't find python module \"${MODULE_NAME}\", please install it using your system package manager.")
Installation: https://github.com/google/or-tools/blob/86d4c543f717fa8716a9d66c25143660668bf825/cmake/python.cmake#L42-L46
As a quick fix.
For 3)
I like poetry as a build backend: https://github.com/python-poetry/poetry-core
After few discussions with conda-forge maintainer few things to improve:
__version__
in CheckPythonModule (not available forabsl
,mypy_protobuf
etc...) (v9.2)FindORTOOLS.cmake
setup.py
to anpyproject.toml
file (see PEP 621, PEP 518)ps: feel free to give feedback and I will add them to this list.
DevNote
You can (re)read the thread on or-tools integration to conda forge, TLDR: it wasn't as smooth as it should have so let's fix what we can on the or-tools cmake side if possible... src: https://github.com/conda-forge/staged-recipes/pull/16147
Some preliminary PoC can be done using https://github.com/Mizux/python-native which compile in few dozen of seconds contrary to ortools...
For 0. could use:
src: https://github.com/conda-forge/staged-recipes/pull/16147#issuecomment-945934282 note:
--files
seems not needed.For 1. https://github.com/google/or-tools/blob/86d4c543f717fa8716a9d66c25143660668bf825/ortools/python/setup.py.in#L49 basically replace this or adding a "is external lib" check then do nothing -> which could be done by checking property IMPORTED ? https://cmake.org/cmake/help/latest/prop_tgt/IMPORTED.html