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

build(cmake): detect python binary for specified version #20290

Merged
merged 1 commit into from Mar 14, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

build(cmake): detect python binary for specified version

- closes #20268
  • Loading branch information
kwonoj committed Mar 13, 2018
commit 2ddd105f127c2e037beabdc9f57105ca232b2712
@@ -49,7 +49,7 @@ set(bindinggen_deps
${bindings_src}/CodegenRust.py
${bindings_src}/parser/WebIDL.py
)

add_custom_command(
OUTPUT Bindings
COMMAND ${CMAKE_COMMAND} -E make_directory Bindings
@@ -59,9 +59,12 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E make_directory _cache
)

# Specify python 2 as required
find_package( PythonInterp 2 REQUIRED )

add_custom_command(
OUTPUT ParserResults.pkl
COMMAND python -B ${bindings_src}/pythonpath.py -I ${bindings_src}/parser -I ${bindings_src}/ply
COMMAND ${PYTHON_EXECUTABLE} -B ${bindings_src}/pythonpath.py -I ${bindings_src}/parser -I ${bindings_src}/ply
${bindings_src}/GlobalGen.py
--cachedir=_cache
--filelist=webidls.list
@@ -74,7 +77,7 @@ add_custom_command(

add_custom_command(
OUTPUT apis.html
COMMAND python -B ${bindings_src}/pythonpath.py -I ${bindings_src}/parser -I ${bindings_src}/ply
COMMAND ${PYTHON_EXECUTABLE} -B ${bindings_src}/pythonpath.py -I ${bindings_src}/parser -I ${bindings_src}/ply
${bindings_src}/GlobalGen.py
--cachedir=_cache
--filelist=webidls.list
@@ -100,7 +103,7 @@ add_custom_target(generate-bindings ALL)
foreach(binding IN LISTS bindings)
add_custom_command(
OUTPUT Bindings/${binding}Binding.rs
COMMAND python -B ${bindings_src}/pythonpath.py -I ${bindings_src}/parser -I ${bindings_src}/ply
COMMAND ${PYTHON_EXECUTABLE} -B ${bindings_src}/pythonpath.py -I ${bindings_src}/parser -I ${bindings_src}/ply
${bindings_src}/BindingGen.py
${bindings_src}/Bindings.conf
.
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.