Skip to content

Commit

Permalink
improving pip detection
Browse files Browse the repository at this point in the history
  • Loading branch information
asmodehn committed Aug 29, 2016
1 parent 4e8e16b commit 2ae292b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
9 changes: 8 additions & 1 deletion cmake/catkin-pip-prefix.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ function(find_catkin_system_pip)
set(CATKIN_SYS_PIP_VERSION_MINOR ${CATKIN_SYS_PIP_VERSION_MINOR} CACHE STRING "Minor version of pip detected on the system" )
list(GET VERSION_LIST 2 CATKIN_SYS_PIP_VERSION_PATCH)
set(CATKIN_SYS_PIP_VERSION_PATCH ${CATKIN_SYS_PIP_VERSION_PATCH} CACHE STRING "Patch version of pip detected on the system" )

# TODO Detect debian "--system"
# ros@ros-Kinetic-VM:~/Project$ pip install --help | grep -e "--system"
# --system Install using the system scheme (overrides --user on Debian systems)
# ros@ros-Kinetic-VM:~/Project$ pip install --help | grep -e "--system" | wc -l
# 1

endif()
else(CATKIN_SYS_PIP)
message( FATAL_ERROR "pip system command not found. Make sure you have installed the python-pip package on your system.")
Expand Down Expand Up @@ -101,7 +108,7 @@ function(catkin_pip_setup_prefix ws_prefix)

message(STATUS " ... Retrieving catkin_pip requirements using system pip ...")

if (${CATKIN_SYS_PIP_VERSION} VERSION_LESS 7.0.0)
if (${CATKIN_SYS_PIP_VERSION} VERSION_LESS 6.0.0)
# We need to find a pip command that works for old pip versions (indigo supports trusty which is pip v1.5.4)
# Note --target here means we cannot check if a package is already installed or not before installing, using old pip.
# which means we have to reinstall dependencies everytime and specify --exists-action w to avoid "already exists" errors
Expand Down
8 changes: 7 additions & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@
<buildtool_depend>catkin</buildtool_depend>

<depend version_gte="2.7.5">python</depend>
<depend version_gte="1.5.4">python-pip</depend>
<!-- saucy 1.4.1 -->
<!-- trusty 1.5.4-1ubuntu4 -->
<!-- utopic 1.5.6-2 -->
<!-- vivid 1.5.6-5ubuntu2 -->
<!-- wily 1.5.6-7ubuntu1.2 -->
<!-- xenial 8.1.1-2ubuntu0.2 -->
<depend version_gte="1.4.1">python-pip</depend>

<test_depend version_gte="1.9.1">git</test_depend>
</package>

0 comments on commit 2ae292b

Please sign in to comment.