Skip to content

Commit

Permalink
ensure that Python install destination exists
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Jan 21, 2016
1 parent eaba48d commit f20c473
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/templates/python_distutils_install.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ echo_and_run() { echo "+ $@" ; "$@" ; }

echo_and_run cd "@INSTALL_CMD_WORKING_DIRECTORY@"

# snsure that Python install destination exists
echo_and_run mkdir -p "@CMAKE_INSTALL_PREFIX@/@PYTHON_INSTALL_DIR@"

# Note that PYTHONPATH is pulled from the environment to support installing
# into one location when some dependencies were installed in another
# location, #123.
Expand Down

6 comments on commit f20c473

@mikepurvis
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dirk-thomas This change breaks DESTDIR for me.

@wjwwood
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikepurvis That's not much to go on, can you explain how you think it is causing DESTDIR not to work?

@dirk-thomas
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I can see that happening. Can you please give it a try with the following line instead:

echo_and_run mkdir -p "$DESTDIR@CMAKE_INSTALL_PREFIX@/@PYTHON_INSTALL_DIR@"

@mikepurvis
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That fixes it, thanks. 👍

@wjwwood
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I'm curious why what we pass to the setup.py doesn't need to be adjusted too:

f20c473#diff-227e03260c0f962311819d32ab4341b6R33

Does the setup.py respect DESTDIR implicitly?

@dirk-thomas
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wjwwood We explicitly pass --root=... for that: f20c473#diff-227e03260c0f962311819d32ab4341b6R12

@mikepurvis I created PR #776 with the patch. Thanks for reporting!

Please sign in to comment.