-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Remove include Python.h #8413
Remove include Python.h #8413
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/8413
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit e50bdb7 with merge base e4d2d1a (): NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
Stamp
Hey @NicolasHug! You merged this PR, but no labels were added. |
Reviewed By: vmoens Differential Revision: D57565241 fbshipit-source-id: 47c428651d5ca5a9d33a6c83fa5d64b08ff23a06
Closes #3965
For some reason, on Windows we need to define the
PyInit_video_reader
PyInit_image
andPyInit__C
symbols, otherwise the windows linker fails with something likeTo avoid that we were defining the symbols as
But that
PyMODINIT_FUNC
forced us to includePython.h
and take a dependency on Libpython. (BTW, we probably never needed to link to libpython like we did in the CMakeFile.txt, we probably only needed the headers, but that's another story.)This PR changes this
PyMODINIT_FUNC
into avoid*
, which seems to work. In reality,PyMODINIT_FUNC
isPyObject_t*
.