-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[onnx,onnx-optimizier] Remove "python3" dependency and "pybind11" feature #43236
base: master
Are you sure you want to change the base?
Conversation
* use requiremens-min.txt to install other python dependencies * get pybind11 directory in portfile.cmake
ports/onnx/portfile.cmake
Outdated
if("pybind11" IN_LIST FEATURES) | ||
x_vcpkg_get_python_packages(PYTHON_VERSION 3 OUT_PYTHON_VAR PYTHON3 | ||
REQUIREMENTS_FILE "${SOURCE_PATH}/requirements-min.txt" | ||
PACKAGES "pybind11" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is effectively vendoring pybind11.
If you want to use system python, use empty overlay for python3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest removal of the pybind11
feature. Updated the PR note above.
Would you check it?
If reviewers think |
https://github.com/onnx/onnx/blob/321c1dc21b531ecb13965a3e912c6a4f60c6c206/INSTALL.md?plain=1#L216
As such it requires python3 build by vcpkg. |
Changes
python3
dependency inonnx
installtionpybind11
feature ofonnx
andonnx-optimizer
There are some concerns about
pybind11
feature of 2 ports.BUILD_ONNX_PYTHON
, we have to installpybind11
andprotobuf
python packagevcpkg-get-python-packages
, but it can only"supports": "native"
onnx
andonnx-optimizer
doesn't install python module(binary) in CMake buildprotobuf[python]
. The source is using Bazel build forprotobuf_python
https://github.com/protocolbuffers/protobuf/blob/e3ac4c9342e5393e3fa974a420fc1bbc68e7397a/BUILD.bazel#L396-L400
it seems like there is no use of
onnx-optmizier[pybind11]
andonnx[pybind11]
.And they became fragile to be maintained. I suggest removal of the
pybind11
feature.References
Start of
pybind11
featureChecklist
./vcpkg x-add-version --all
and committing the result.