Skip to content
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

Support building with embedded python #46

Merged
merged 1 commit into from May 15, 2019

Conversation

Projects
None yet
2 participants
@jherico
Copy link
Contributor

commented May 14, 2019

The CMake logic uses the environment variable PYTHONPATH to allow the src_genxr.py and genxr.py scripts to execute using local modules like reg.

However, vcpkg will use an embedded version of Python if a conventional version is not found on the host system, and the embedded version of Python will not respect the PYTHONPATH env variable.

This PR modifies the scripts to internally modify the sys.path array with the required paths, defined here as relative paths to the root of the repository.

This removes the need for defining PYTHONPATH in the CMake files, but PR hasn't done so.

@rpavlik
Copy link
Contributor

left a comment

If it's easier, I think it's OK to use pathlib if you like - I have already used it elsewhere in the scripts. On the other hand, if this works, then great :) Just one little nitpick noted.

Show resolved Hide resolved specification/scripts/genxr.py Outdated

@jherico jherico force-pushed the jherico:fix/embedded_python branch from a31ad90 to acf0885 May 14, 2019

@rpavlik

This comment has been minimized.

Copy link
Contributor

commented May 15, 2019

Thanks for your contribution!

@rpavlik rpavlik merged commit c13b518 into KhronosGroup:master May 15, 2019

1 check passed

license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.