Skip to content

[pybind11] Modernize port + better python dependency handling#9979

Closed
theblackunknown wants to merge 2 commits intomicrosoft:masterfrom
theblackunknown:integration-pybind11
Closed

[pybind11] Modernize port + better python dependency handling#9979
theblackunknown wants to merge 2 commits intomicrosoft:masterfrom
theblackunknown:integration-pybind11

Conversation

@theblackunknown
Copy link
Contributor

Modernize port

Avoid using system python, instead leverage python3 port to keep everything consistent
I did not tackled the hardcoded python version, another PR is welcome to tackle this

NOTE: This PR relies on #9978 , so it needs to be rebased/udpated once it will be merged

What does your PR fix?
No logged issue, but the problem arose when trying to use this port to build Python extensions using pybind11 on Linux :

  • Dependency on system Python is not always good (e.g. missing shared libraries)
  • Shared library are needed, even when we are using VCPKG_LIBRARY_LINKAGE as static

Which triplets are supported/not supported? Have you updated the CI baseline?
No CI update, works at least with windows & linux

Does your PR follow the maintainer guide?
It should !

@LilyWangL LilyWangL self-assigned this Feb 10, 2020
@LilyWangL
Copy link
Contributor

/azp run

@LilyWangL
Copy link
Contributor

@theblackunknown Thanks for your PR. This PR build failed on Linux with this error:

CMake Error at tools/FindPythonLibsNew.cmake:96 (message):
  Python config failure:

  Traceback (most recent call last):

    File "<string>", line 1, in <module>

  ImportError: cannot import name 'sysconfig'

Call Stack (most recent call first):
  /ci/myagent/_work/3/s/scripts/buildsystems/vcpkg.cmake:285 (_find_package)
  tools/pybind11Tools.cmake:16 (find_package)
  CMakeLists.txt:33 (include)

And this PR build failed on Windows with this error:

CMake Error at tools/FindPythonLibsNew.cmake:161 (message):
  Python libraries not found
Call Stack (most recent call first):
  C:/vsts/_work/3/s/scripts/buildsystems/vcpkg.cmake:285 (_find_package)
  tools/pybind11Tools.cmake:16 (find_package)
  CMakeLists.txt:33 (include)

Could you please cotinue to fix this PR?

@theblackunknown
Copy link
Contributor Author

theblackunknown commented Feb 25, 2020

Hi @LilyWangL, this PR is in draft because it needs #9978 to be approved and merged first
So I would not expect it to work in the meantime

I'll update this one and ping you once it is merged

@LilyWangL
Copy link
Contributor

Hi @LilyWangL, this PR is in draft because it needs #9978 to be approved and merged first
So I would not expect it to work in the meantime

I'll update this one and ping you once it is merged

OK.

* Fixed incorrect referred python lib
* Search Python in a cross platform
* WIP
@LilyWangL
Copy link
Contributor

@theblackunknown This port build failed on Linux and Windows. You can click Details to check the CI testing error log.

@LilyWangL
Copy link
Contributor

Pinging @theblackunknown for response. Is work still being done for this PR?

@theblackunknown
Copy link
Contributor Author

@LilyWangL yes I am still working on it however it is a slow progress with the recent events

@LilyWangL
Copy link
Contributor

Any progress?

@theblackunknown
Copy link
Contributor Author

Hi @LilyWangL, I hardly find time those days to progress on this PR
If you want to make a bit of cleaning on this repo PRs, I am fine to close it and re-submit it later
What do you think ?

@LilyWangL
Copy link
Contributor

Hi @LilyWangL, I hardly find time those days to progress on this PR
If you want to make a bit of cleaning on this repo PRs, I am fine to close it and re-submit it later
What do you think ?

Thanks for your reply. I am closing this PR for now, if you have time to handle this PR please reopen it.

@LilyWangL LilyWangL closed this May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants