-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from asmodehn/separate_catkin_pip_env
separating catkin_pip environment with workspace environment.
- Loading branch information
Showing
11 changed files
with
66 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
# Careful : env.sh *executes* it during cmake configure, but setup.sh source it ! | ||
# If using a sh script, this can make a lot of issues... | ||
# Reference to address these from a Bourne shell http://stackoverflow.com/a/29835459 | ||
|
||
# For catkin it is simpler to do add site-packages to PYTHONPATH in _setup_util.py.in than us doing it from here... | ||
# but until catkin does this by default, the proper way from outside catkin is probably a env-hook | ||
|
||
##Documentation: | ||
# The colon command simply has its arguments evaluated and then succeeds. | ||
# It is the original shell comment notation (before '#' to end of line). For a long time, Bourne shell scripts had a colon as the first character. | ||
# The C Shell would read a script and use the first character to determine whether it was for the C Shell (a '#' hash) or the Bourne shell (a ':' colon). | ||
# Then the kernel got in on the act and added support for '#!/path/to/program' and the Bourne shell got '#' comments, and the colon convention went by the wayside. | ||
# But if you come across a script that starts with a colon (Like this one), now you will know why. ~ Jonathan Leffler | ||
|
||
# We should enable site-package only on devel space. | ||
# Install space should behave like packages, everything in debian layout. | ||
|
||
# finding our useful script from catkin_pip using rospack (work from source or bin package) | ||
CATKIN_PIP_SCRIPTS="$(rospack find catkin_pip)/scripts" | ||
echo "Catkin-pip scripts found in $CATKIN_PIP_SCRIPTS" | ||
|
||
# We need ONLY the catkin_pip_env | ||
# Careful : echo is only possible if we are a bash script (not used by env.sh) | ||
echo "Prepending @CATKIN_PIP_ENV@/@CATKIN_PIP_PYTHON_INSTALL_DIR@ to PYTHONPATH" | ||
PYTHONPATH=$("${CATKIN_PIP_SCRIPTS}"/pythonpath_prepend.bash "@CATKIN_PIP_ENV@/@CATKIN_PIP_PYTHON_INSTALL_DIR@") | ||
|
||
# to avoid side effect with multiple workspace having different version of catkin_pip | ||
unset CATKIN_PIP_SCRIPTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,25 +9,33 @@ if [ -n "$DESTDIR" ] ; then | |
/bin/echo "otherwise python's distutils will bork things." | ||
exit 1 | ||
esac | ||
DESTDIR_ARG="--single-version-externally-managed --root=$DESTDIR" | ||
DESTDIR_ARG="--root=$DESTDIR" | ||
else | ||
DESTDIR_ARG="--record=@CMAKE_INSTALL_PREFIX@/@[email protected]" | ||
fi | ||
|
||
echo_and_run() { echo "+ $@" ; "$@" ; } | ||
|
||
echo_and_run cd "@INSTALL_CMD_WORKING_DIRECTORY@" | ||
|
||
# snsure that Python install destination exists | ||
echo_and_run mkdir -p "$DESTDIR@CMAKE_INSTALL_PREFIX@/@PYTHON_INSTALL_DIR@" | ||
# Ensure that Python install destination exists | ||
# Not needed with latest setuptools ? | ||
#echo_and_run mkdir -p "$DESTDIR@CMAKE_INSTALL_PREFIX@/@PYTHON_INSTALL_DIR@" | ||
|
||
# Verifying setuptools version | ||
echo_and_run /usr/bin/env \ | ||
PYTHONPATH="@CATKIN_PIP_ENV@/@CATKIN_PIP_PYTHON_INSTALL_DIR@:@CMAKE_INSTALL_PREFIX@/@PYTHON_INSTALL_DIR@:@CMAKE_BINARY_DIR@/@PYTHON_INSTALL_DIR@:$PYTHONPATH" \ | ||
python -c "import setuptools; print 'setuptools from {0} version {1}'.format(setuptools.__file__, setuptools.__version__)" | ||
|
||
# Note that PYTHONPATH is pulled from the environment to support installing | ||
# into one location when some dependencies were installed in another | ||
# location, #123. | ||
# One of these locations must be the catkin_pip_env with the latest setuptools version to install packages with recent setuptools. | ||
echo_and_run /usr/bin/env \ | ||
PYTHONPATH="@CMAKE_INSTALL_PREFIX@/@PYTHON_INSTALL_DIR@:@CMAKE_BINARY_DIR@/@PYTHON_INSTALL_DIR@:$PYTHONPATH" \ | ||
CATKIN_BINARY_DIR="@CMAKE_BINARY_DIR@" \ | ||
PYTHONPATH="@CATKIN_PIP_ENV@/@CATKIN_PIP_PYTHON_INSTALL_DIR@:@CMAKE_INSTALL_PREFIX@/@PYTHON_INSTALL_DIR@:@CMAKE_BINARY_DIR@/@PYTHON_INSTALL_DIR@:$PYTHONPATH" \ | ||
"@PYTHON_EXECUTABLE@" \ | ||
"@CATKIN_PIP_PACKAGE_PATH@/setup.py" \ | ||
build --build-base "@CMAKE_CURRENT_BINARY_DIR@" \ | ||
install \ | ||
install --single-version-externally-managed \ | ||
$DESTDIR_ARG \ | ||
@SETUPTOOLS_ARG_EXTRA@ --prefix="@CMAKE_INSTALL_PREFIX@" --install-scripts="@CMAKE_INSTALL_PREFIX@/@CATKIN_GLOBAL_BIN_DESTINATION@" |