After few discussions with conda-forge maintainer few things to improve:
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: conda-forge/staged-recipes#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:
import subprocess, sys
from email.parser import BytesHeaderParser
p = subprocess.run([sys.executable, '-m', 'pip', 'show', 'pip', '--files'], stdout=subprocess.PIPE)
h = BytesHeaderParser().parsebytes(p.stdout)
print(h['Version'])
21.3
src: conda-forge/staged-recipes#16147 (comment)
note: --files seems not needed.
For 1.
|
'@PROJECT_NAME@':[$<$<STREQUAL:$<TARGET_PROPERTY:@PYTHON_PROJECT@,TYPE>,SHARED_LIBRARY>:'.libs/*', '../$<TARGET_SONAME_FILE_NAME:@PYTHON_PROJECT@>'>], |
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
After few discussions with conda-forge maintainer few things to improve:
__version__in CheckPythonModule (not available forabsl,mypy_protobufetc...) (v9.2)FindORTOOLS.cmakesetup.pyto anpyproject.tomlfile (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: conda-forge/staged-recipes#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: conda-forge/staged-recipes#16147 (comment)
note:
--filesseems not needed.For 1.
or-tools/ortools/python/setup.py.in
Line 49 in 86d4c54