Skip to content

Commit

Permalink
use same python executable in subprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
pilt committed Mar 21, 2015
1 parent fa3cb33 commit 464910c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions CMakeLists.txt
Expand Up @@ -15,9 +15,15 @@ add_subdirectory (libjpeg)
add_subdirectory (JpegEncoderEXIF)
add_subdirectory (bindings)

find_program(PYTHON "python")
option(PY "PY" "")

set(BINDINGS_VERSION "0.1.3")
if( "${PY}" STREQUAL "" )
find_program(PYTHON "python")
else()
set(PYTHON "${PY}")
endif()

set(BINDINGS_VERSION "0.1.4")

if (PYTHON)
set(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/bindings.py.cmake")
Expand Down
2 changes: 1 addition & 1 deletion setup.py.cmake
Expand Up @@ -23,7 +23,7 @@ class install(_install):


def _delegate():
_run("cmake .")
_run("cmake -DPY='{}' .".format(sys.executable))
_run("make bindings_distutils")
sys.stderr.write("delegating to bindings.py... \n")
sys.stderr.flush()
Expand Down

0 comments on commit 464910c

Please sign in to comment.