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

see if we can support modifying the PYTHONPATH env var from cmake. #7

Closed
cyrush opened this issue Jul 18, 2016 · 4 comments
Closed
Labels

Comments

@cyrush
Copy link
Member

cyrush commented Jul 18, 2016

two use cases:

  1. if they can set additional python paths in a host-config this could help folks configure python packages (eg: numpy) without env vars & we could do this per platform in an centralized way.

  2. if we can figure out the best way to support PYTHONPATH env var for custom commands, this could also help us avoid the python module warning "you are installing your module to a place that isn't in your sys.path()" that shows up when we build the conduit python module

@cyrush
Copy link
Member Author

cyrush commented Jul 18, 2016

in future versions of cmake we may be able to use cmake -E env

add_custom_command(OUTPUT  ${CMAKE_CURRENT_BINARY_DIR}/build
        COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${CMAKE_BINARY_DIR}/${dest_dir} 
        ${PYTHON_EXECUTABLE} ${setup_file} -v
        build
        --build-base=${CMAKE_CURRENT_BINARY_DIR}/build
        install
        --install-purelib=${CMAKE_BINARY_DIR}/${dest_dir}
        DEPENDS  ${setup_file} ${ARGN}
        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

@cyrush
Copy link
Member Author

cyrush commented Jul 18, 2016

Will setting CMake Python Module dir help?

@cyrush cyrush added the feature label Jul 18, 2016
@cyrush
Copy link
Member Author

cyrush commented Sep 13, 2016

on linux and osx, we can use shell syntax to set the python path env var,

for example instead of
${PYTHON_EXECUTABLE} ${setup_file} -v

use:
PYTHONPATH=${CMAKE_BINARY_DIR}/${dest_dir} ${PYTHON_EXECUTABLE} ${setup_file} -v

it's not clear if this helps us on windows

@cyrush
Copy link
Member Author

cyrush commented Nov 2, 2020

closing this, it's a build time message -- and has never lead to a real issue.

We expect to build in our own location, we can recast this as just a friendly reminder we are doing so.

@cyrush cyrush closed this as completed Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant