[catkin] 01/03: Imported Upstream version 0.6.9

Jochen Sprickerhof jspricke-guest at moszumanska.debian.org
Tue Dec 9 12:24:30 UTC 2014


This is an automated email from the git hooks/post-receive script.

jspricke-guest pushed a commit to branch master
in repository catkin.

commit 44907ec25f63b36e5442518e3fd6032ef72ff348
Author: Jochen Sprickerhof <git at jochen.sprickerhof.de>
Date:   Tue Dec 9 11:44:27 2014 +0100

    Imported Upstream version 0.6.9
---
 .travis.yml                                    |   3 +
 CHANGELOG.rst                                  |  85 +++++++++------
 CMakeLists.txt                                 |  11 +-
 bin/catkin_make                                |   2 +-
 bin/catkin_prepare_release                     |  73 ++++++++++---
 cmake/Modules/eigen-config-version.cmake       |  15 ---
 cmake/Modules/eigen-config.cmake               |  41 --------
 cmake/all.cmake                                |   2 -
 cmake/catkin_generate_environment.cmake        |  28 ++++-
 cmake/em_expand.cmake                          |   6 +-
 cmake/empy.cmake                               |  25 +++--
 cmake/parse_arguments.cmake                    |  43 --------
 cmake/python.cmake                             |  18 ----
 cmake/templates/_setup_util.py                 | 140 -------------------------
 cmake/templates/_setup_util.py.in              |  35 ++++---
 cmake/test/download_test_data.cmake            |  11 --
 cmake/test/gtest.cmake                         |   5 -
 cmake/test/nosetests.cmake                     |  26 ++---
 cmake/tools/doxygen.cmake                      |   7 +-
 doc/adv_user_guide/adv_user_guide.rst          |   1 +
 doc/adv_user_guide/catkin_migration_indigo.rst |  24 +++++
 doc/conf.py                                    |   2 +-
 doc/dev_guide/generated_cmake_api.rst          |  35 -------
 doc/howto/format1/installing_python.rst        |  17 +--
 doc/index.rst                                  |  13 +--
 doc/user_guide/setup_dot_py.rst                |   2 +-
 package.xml                                    |  27 ++---
 python/catkin/builder.py                       |  64 ++++++++---
 test/local_tests/test_with_mock_workspace.py   |   2 +-
 test/unit_tests/test_builder.py                |  32 +++++-
 test/unit_tests/test_parse_package_xml.py      |  28 ++---
 test/unit_tests/test_setup_util.py             |   9 +-
 32 files changed, 347 insertions(+), 485 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index cee0b78..89afaa5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,11 @@
 language: python
 python:
   - "2.7_with_system_site_packages"
+  - "3.3"
 # command to install dependencies
 install:
+  # fetch "normal" debian python for 3.3
+  - if [ "$TRAVIS_PYTHON_VERSION" == "3.3" ]; then sudo add-apt-repository -y ppa:fkrull/deadsnakes && sudo apt-get -y update && sudo apt-get install python3.3 python3.3-dev && virtualenv -p /usr/bin/python3.3 ~/virtualenvs/3.3_debian && source ~/virtualenvs/3.3_debian/bin/activate; fi
   - pip install argparse catkin-pkg empy mock nose
 # command to run tests
 script:
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 66cba35..f1c5d78 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -2,66 +2,85 @@
 Changelog for package catkin
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-0.5.89 (2014-08-18)
--------------------
+0.6.9 (2014-07-11)
+------------------
+* fix regression from 0.6.8 (`#676 <https://github.com/ros/catkin/issues/676>`_)
+
+0.6.8 (2014-07-10)
+------------------
 * make nosetests --xunit-file argument an absolute path to work around nose bug 779 (`#659 <https://github.com/ros/catkin/issues/659>`_)
 * fix handling of CMake packages which do not install any files (`#665 <https://github.com/ros/catkin/issues/665>`_)
 * fix gtest on Arch Linux and others (`#663 <https://github.com/ros/catkin/issues/663>`_)
 * improve generation of .catkin marker file (`#671 <https://github.com/ros/catkin/issues/671>`_, `#676 <https://github.com/ros/catkin/issues/676>`_)
 * escape messages to avoid CMake warning (`#667 <https://github.com/ros/catkin/issues/667>`_)
+* fix CMake warning for doxygen target with CMake 3 (`#660 <https://github.com/ros/catkin/issues/660>`_)
 * avoid using ARGN for efficiency (`#669 <https://github.com/ros/catkin/issues/669>`_)
 
-0.5.88 (2014-06-16)
--------------------
+0.6.7 (2014-06-16)
+------------------
 * reset CATKIN_SHELL in devel space generated env.sh files (`#652 <https://github.com/ros/catkin/issues/652>`_, `#655 <https://github.com/ros/catkin/issues/655>`_)
 * ignore cd path echo when using CDPATH (`#654 <https://github.com/ros/catkin/issues/654>`_)
+* use PYTHON_EXECUTABLE for _setup_util.py (`#646 <https://github.com/ros/catkin/issues/646>`_)
 * expose PYTHON_EXECUTABLE to environment hook .em templates (`#645 <https://github.com/ros/catkin/issues/645>`_)
+* catkin_prepare_release:
 
+  * add --no-push to catkin_prepare_release (`#657 <https://github.com/ros/catkin/issues/657>`_)
+  * flush stdin before asking for input (`#658 <https://github.com/ros/catkin/issues/658>`_)
 
-0.5.87 (2014-06-02)
--------------------
+0.6.6 (2014-06-02)
+------------------
+* fix rollback of environment when workspace has been deleted (`#641 <https://github.com/ros/catkin/issues/641>`_)
+* fix argument handling when cm / cmi is invoked in a symlinked folder (`#638 <https://github.com/ros/catkin/issues/638>`_)
+
+0.6.5 (2014-05-25)
+------------------
+* fix regression in catkin_make_isolated from 0.6.4 (`#624 <https://github.com//ros/catkin/issues/624>`_)
+* fix problem when catkin_make / catkin_make_isolated is invoked in a symlinked folder (`#638 <https://github.com//ros/catkin/issues/638>`_)
+
+0.6.4 (2014-05-07)
+------------------
+* add architecture independent flag in package.xml (`#625 <https://github.com/ros/catkin/issues/625>`_)
 * add error message for circular dependencies in catkin_make_isolated and catkin_topological_order (`#607 <https://github.com/ros/catkin/issues/607>`_, `#608 <https://github.com/ros/catkin/issues/608>`_)
+* add multiarch support for catkin environment files (`#545 <https://github.com/ros/catkin/issues/545>`_)
 * add workspace marker file for catkin_make / catkin_make_isolated (`#304 <https://github.com/ros/catkin/issues/304>`_)
 * allow better performance for repeated invocations of find_in_workspaces()
 * consider test_depends for topolocial order (`#612 <https://github.com/ros/catkin/issues/612>`_)
+* invoke empy with specific Python interpreter (`#620 <https://github.com/ros/catkin/issues/620>`_)
 * support setting ${PROJECT_NAME}_LIBRARIES before invoking catkin_package() (`#609 <https://github.com/ros/catkin/issues/609>`_)
-
+* update package manifest to format 2 (`#619 <https://github.com/ros/catkin/issues/619>`_)
 * fixes:
 
-  * fix rollback of environment when workspace has been deleted (`#641 <https://github.com/ros/catkin/issues/641>`_)
-  * fix argument handling when cm / cmi is invoked in a symlinked folder (`#638 <https://github.com/ros/catkin/issues/638>`_)
   * fix catkin_find to not return path with '/.' suffix (`#621 <https://github.com/ros/catkin/issues/621>`_)
   * fix python path setting for plain cmake workspaces (`#618 <https://github.com/ros/catkin/issues/618>`_)
+  * improve unicode handling (`#615 <https://github.com/ros/catkin/issues/615>`_)
   * replace CMake usage of IMPORTED_IMPLIB with IMPORTED_LOCATION (`#616 <https://github.com/ros/catkin/issues/616>`_)
   * do not call chpwd hooks in setup.zsh (`#613 <https://github.com/ros/catkin/issues/613>`_)
   * set catkin_* variables only when find_package(catkin COMPONENTS ...) (`#629 <https://github.com/ros/catkin/issues/629>`_)
-  * remove invalid symbolic links of workspace level CMakeLists.txt file (`#591 <https://github.com/ros/catkin/issues/591>`_)
-  * fix gtest include dir when using gtest inside the workspace (`#585 <https://github.com/ros/catkin/issues/585>`_)
 
-0.5.86 (2014-03-03)
--------------------
-* rewrite exported include dirs when pointing to absolute source / build / devel space (`#600 <https://github.com/ros/catkin/issues/600>`_)
+0.6.3 (2014-03-04)
+------------------
+* allow passing absolute INCLUDE_DIRS via catkin_package() into CMake config file in install space (`#600 <https://github.com/ros/catkin/issues/600>`_, `#601 <https://github.com/ros/catkin/issues/601>`_)
 * improve error messages for wrong include dirs
 
-0.5.85 (2014-02-28)
--------------------
-* fix bug in string length calculation (regression from 0.5.84, `#601 <https://github.com/ros/catkin/issues/601>`_)
-
-0.5.84 (2014-02-27)
--------------------
-* fix handling include directories for generated header in devel space (regression from 0.5.83, `#600 <https://github.com/ros/catkin/issues/600>`_)
-
-0.5.83 (2014-02-27)
--------------------
-* allow passing absolute INCLUDE_DIRS via catkin_package() into CMake config file in install space (`#600 <https://github.com/ros/catkin/issues/600>`_)
-
-0.5.82 (2014-02-25)
--------------------
-* fix detection of Python version for CMake 2.8.6 and older (regression from 0.5.78, `#570 <https://github.com/ros/catkin/issues/570>`_)
-
-0.5.81 (2014-01-30)
--------------------
-* fix generated find_package() logic when used from dry packages: remove debug_message usage from generated pkgConfig.cmake files (`#583 <https://github.com/ros/catkin/issues/583>`_)
+0.6.2 (2014-02-24)
+------------------
+* use underlay workspaces when calculating topological order (`#590 <https://github.com/ros/catkin/issues/590>`_)
+* remove restriction to run unit test single threaded (`#597 <https://github.com/ros/catkin/issues/597>`_)
+* support using nosetests with Python3 (`#593 <https://github.com/ros/catkin/issues/593>`_)
+* remove invalid symbolic links of workspace level CMakeLists.txt file (`#591 <https://github.com/ros/catkin/issues/591>`_)
+* remove debug_message usage from generated pkgConfig.cmake files (`#583 <https://github.com/ros/catkin/issues/583>`_)
+* use catkin_install_python() to install Python scripts (`#596 <https://github.com/ros/catkin/issues/596>`_)
+* fix unicode error with japanese LANG (`#578 <https://github.com/ros/catkin/issues/578>`_)
+* fix gtest include dir when using gtest inside the workspace (`#585 <https://github.com/ros/catkin/issues/585>`_)
+
+0.6.1 (2014-01-29)
+------------------
+* remove more obsolete files (`#582 <https://github.com/ros/catkin/issues/582>`_)
+
+0.6.0 (2014-01-29)
+------------------
+* remove deprecated functionality (`#582 <https://github.com/ros/catkin/issues/582>`_)
+* remove eigen CMake config files (`#492 <https://github.com/ros/catkin/issues/492>`_)
 * fix EXPORTED_TARGETS argument for catkin_package() (`#581 <https://github.com/ros/catkin/issues/581>`_)
 
 0.5.80 (2014-01-27)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 41b3f63..8256b4c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,20 +14,11 @@ install(FILES LICENSE
   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
 )
 
-# for convenience we provide eigen-config(-version).cmake files
-file(COPY cmake/Modules/eigen-config.cmake cmake/Modules/eigen-config-version.cmake
-  DESTINATION ${CATKIN_DEVEL_PREFIX}/share/eigen/cmake
-)
-install(FILES cmake/Modules/eigen-config.cmake cmake/Modules/eigen-config-version.cmake
-  DESTINATION share/eigen/cmake
-)
-
 # install cmake files for catkin (except some files only used at build time of catkin)
 install(DIRECTORY cmake
   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
   USE_SOURCE_PERMISSIONS
-  PATTERN "catkinConfig.cmake.in" EXCLUDE
-  PATTERN "Modules" EXCLUDE)
+  PATTERN "catkinConfig.cmake.in" EXCLUDE)
 
 catkin_python_setup()
 
diff --git a/bin/catkin_make b/bin/catkin_make
index 554cd34..6b2d1ef 100755
--- a/bin/catkin_make
+++ b/bin/catkin_make
@@ -169,7 +169,7 @@ def main():
 
     # invoke make
     cmd = ['make']
-    cmd.extend(handle_make_arguments(args.make_args, force_single_threaded_when_running_tests=True))
+    cmd.extend(handle_make_arguments(args.make_args))
     try:
         if not args.pkg:
             make_paths = [build_path]
diff --git a/bin/catkin_prepare_release b/bin/catkin_prepare_release
index 67b6c73..837de11 100755
--- a/bin/catkin_prepare_release
+++ b/bin/catkin_prepare_release
@@ -37,6 +37,7 @@ def prompt_continue(msg, default):
         msg += fmt(' @{yf}[y/N]@{reset}?')
 
     while True:
+        _flush_stdin()
         response = raw_input(msg)
         if not response:
             response = 'y' if default else 'n'
@@ -49,6 +50,15 @@ def prompt_continue(msg, default):
         print(fmt("@{yf}Response '@{boldon}%s@{boldoff}' was not recognized, please use one of the following options: %s" % (response, ', '.join([('@{boldon}%s@{boldoff}' % x) for x in ['y', 'Y', 'n', 'N']]))), file=sys.stderr)
 
 
+def _flush_stdin():
+    try:
+        from termios import tcflush, TCIFLUSH
+        tcflush(sys.stdin, TCIFLUSH)
+    except ImportError:
+        # fallback if not supported on some platforms
+        pass
+
+
 def get_git_remote_and_branch(base_path):
     cmd_branch = [_find_executable('git'), 'rev-parse', '--abbrev-ref', 'HEAD']
     try:
@@ -183,6 +193,7 @@ def main():
         description='Runs the commands to bump the version number, commit the modified %s files and create a tag in the repository.' % PACKAGE_MANIFEST_FILENAME)
     parser.add_argument('--bump', choices=('major', 'minor', 'patch'), default='patch', help='Which part of the version number to bump? (default: %(default)s)')
     parser.add_argument('--no-color', action='store_true', default=False, help='Disables colored output')
+    parser.add_argument('--no-push', action='store_true', default=False, help='Disables pushing to remote repository')
     parser.add_argument('-t', '--tag-prefix', default='', 
                         help='Add this prefix to the created release tag')
     parser.add_argument('-y', '--non-interactive', action='store_true', default=False,
@@ -289,7 +300,8 @@ def main():
             raise RuntimeError(fmt("@{rf}Aborted release, populate the changelog with '@{boldon}catkin_generate_changelog@{boldoff}' and review / clean up the content."))
 
     # verify that repository is pushable (if the vcs supports dry run of push)
-    try_repo_push(base_path, vcs_type)
+    if not args.no_push:
+        try_repo_push(base_path, vcs_type)
 
     # check for staged changes and modified and untracked files
     print(fmt('@{gf}Checking if working copy is clean (no staged changes, no modified files, no untracked files)...'))
@@ -311,18 +323,28 @@ def main():
     update_versions(packages.keys(), new_version)
     print(fmt("@{gf}Bump version@{reset} of all packages from '@{bf}%s@{reset}' to '@{bf}@{boldon}%s@{boldoff}@{reset}'" % (old_version, new_version)))
 
+    pushed = None
     if vcs_type in ['svn']:
         # for svn everything affects the remote repository immediately
         commands = []
         commands.append(commit_files(base_path, vcs_type, packages, missing_changelogs_but_forthcoming, tag_name, dry_run=True))
         commands.append(tag_svn_cmd)
-        print(fmt('@{gf}The following commands will be executed to commit the changes and tag the new version:'))
+        if not args.no_push:
+            print(fmt('@{gf}The following commands will be executed to commit the changes and tag the new version:'))
+        else:
+            print(fmt('@{gf}You can use the following commands to manually commit the changes and tag the new version:'))
         for cmd in commands:
             print(fmt('  @{bf}@{boldon}%s@{boldoff}' % ' '.join(cmd)))
-        if not args.non_interactive and not prompt_continue('Perform commands which will modify the repository', default=True):
-            raise RuntimeError(fmt('@{rf}Skipping commands, to finish the release execute the commands manually.'))
-        commit_files(base_path, vcs_type, packages, missing_changelogs_but_forthcoming, tag_name)
-        tag_repository(base_path, vcs_type, tag_name, args.tag_prefix != '')
+
+        if not args.no_push:
+            if not args.non_interactive:
+                # confirm before modifying repository
+                if not prompt_continue('Execute commands which will modify the repository', default=True):
+                    pushed = False
+            if pushed is None:
+                commit_files(base_path, vcs_type, packages, missing_changelogs_but_forthcoming, tag_name)
+                tag_repository(base_path, vcs_type, tag_name, args.tag_prefix != '')
+                pushed = True
 
     else:
         # for other vcs types the changes are first done locally
@@ -332,16 +354,35 @@ def main():
         print(fmt("@{gf}Creating tag '@{boldon}%s@{boldoff}'..." % (tag_name)))
         tag_repository(base_path, vcs_type, tag_name, args.tag_prefix != '')
 
-        # confirm commands to push to remote repository
-        commands = push_changes(base_path, vcs_type, dry_run=True)
-        print(fmt('@{gf}The following commands will be executed to push the changes and tag to the remote repository:'))
-        for cmd in commands:
-            print(fmt('  @{bf}@{boldon}%s@{boldoff}' % ' '.join(cmd)))
-        if not args.non_interactive and not prompt_continue('Push the local commits and tags to the remote repository', default=True):
-            raise RuntimeError(fmt('@{rf}Skipping push, to finish the release execute the commands manually.'))
-        push_changes(base_path, vcs_type)
-
-    print(fmt("@{gf}The source repository has been released successfully. The next step will be '@{boldon}bloom-release@{boldoff}'."))
+        try:
+            commands = push_changes(base_path, vcs_type, dry_run=True)
+        except RuntimeError as e:
+            print(fmt('@{yf}Warning: could not determine commands to push the changes and tag to the remote repository. Do you have a remote configured for the current branch?'))
+        else:
+            if not args.no_push:
+                print(fmt('@{gf}The following commands will be executed to push the changes and tag to the remote repository:'))
+            else:
+                print(fmt('@{gf}You can use the following commands to manually push the changes to the remote repository:'))
+            for cmd in commands:
+                print(fmt('  @{bf}@{boldon}%s@{boldoff}' % ' '.join(cmd)))
+
+            if not args.no_push:
+                if not args.non_interactive:
+                    # confirm commands to push to remote repository
+                    if not prompt_continue('Execute commands to push the local commits and tags to the remote repository', default=True):
+                        pushed = False
+                if pushed is None:
+                    push_changes(base_path, vcs_type)
+                    pushed = True
+
+    if pushed:
+        print(fmt("@{gf}The source repository has been released successfully. The next step will be '@{boldon}bloom-release@{boldoff}'."))
+    else:
+        msg = "The release of the source repository has been prepared successfully but the changes have not been pushed yet. After pushing the changes manually the next step will be '@{boldon}bloom-release@{boldoff}'."
+        if args.no_push or pushed is False:
+            print(fmt('@{yf}%s' % msg))
+        else:
+            raise RuntimeError(fmt('@{rf}%s' % msg))
 
 
 if __name__ == '__main__':
diff --git a/cmake/Modules/eigen-config-version.cmake b/cmake/Modules/eigen-config-version.cmake
deleted file mode 100644
index 5db5eda..0000000
--- a/cmake/Modules/eigen-config-version.cmake
+++ /dev/null
@@ -1,15 +0,0 @@
-set(PACKAGE_VERSION_EXACT False)
-set(PACKAGE_VERSION_COMPATIBLE False)
-if("${PACKAGE_FIND_VERSION}" STREQUAL "")
-  set(PACKAGE_VERSION_COMPATIBLE TRUE)
-  return()
-endif()
-
-if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "")
-  set(PACKAGE_VERSION_EXACT True)
-  set(PACKAGE_VERSION_COMPATIBLE True)
-endif()
-
-if("${PACKAGE_FIND_VERSION}" VERSION_LESS "")
-  set(PACKAGE_VERSION_COMPATIBLE True)
-endif()
diff --git a/cmake/Modules/eigen-config.cmake b/cmake/Modules/eigen-config.cmake
deleted file mode 100644
index 1e7d48b..0000000
--- a/cmake/Modules/eigen-config.cmake
+++ /dev/null
@@ -1,41 +0,0 @@
-# - Try to find Eigen3 lib
-#
-# This module supports requiring a minimum version, e.g. you can do
-#   find_package(Eigen3 3.1.2)
-# to require version 3.1.2 or newer of Eigen3.
-#
-# Once done this will define
-#
-#  Eigen_FOUND - system has eigen lib with correct version
-#  Eigen_INCLUDE_DIR - the eigen include directory
-#  Eigen_VERSION - eigen version
-
-# Copyright (c) 2006, 2007 Montel Laurent, <montel at kde.org>
-# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael at free.fr>
-# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1 at gmail.com>
-# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
-
-find_package(PkgConfig)
-pkg_check_modules(PC_EIGEN eigen3)
-set(EIGEN_DEFINITIONS ${PC_EIGEN_CFLAGS_OTHER})
-
-find_path(EIGEN_INCLUDE_DIR Eigen/Core
-    HINTS ${PC_EIGEN_INCLUDEDIR} ${PC_EIGEN_INCLUDE_DIRS} "${EIGEN_ROOT}" "$ENV{EIGEN_ROOT}"
-    PATHS "$ENV{PROGRAMFILES}/Eigen" "$ENV{PROGRAMW6432}/Eigen"
-          "$ENV{PROGRAMFILES}/Eigen 3.0.0" "$ENV{PROGRAMW6432}/Eigen 3.0.0"
-    PATH_SUFFIXES eigen3 include/eigen3 include)
-
-set(EIGEN_INCLUDE_DIRS ${EIGEN_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Eigen DEFAULT_MSG EIGEN_INCLUDE_DIR)
-
-mark_as_advanced(EIGEN_INCLUDE_DIR)
-
-if(EIGEN_FOUND)
-  message(STATUS "Eigen found (include: ${EIGEN_INCLUDE_DIRS})")
-endif(EIGEN_FOUND)
-
-
-set(Eigen_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS})
-set(Eigen_FOUND ${EIGEN_FOUND})
diff --git a/cmake/all.cmake b/cmake/all.cmake
index 6a5170a..7118a6d 100644
--- a/cmake/all.cmake
+++ b/cmake/all.cmake
@@ -127,7 +127,6 @@ foreach(filename
     list_append_deduplicate
     list_append_unique
     list_insert_in_workspace_order
-    parse_arguments
     safe_execute_process
     stamp
     string_starts_with
@@ -136,7 +135,6 @@ foreach(filename
     platform/windows
     test/tests # defines CATKIN_ENABLE_TESTING, required by other test functions
     test/catkin_download_test_data
-    test/download_test_data
     test/gtest
     test/nosetests
     tools/doxygen
diff --git a/cmake/catkin_generate_environment.cmake b/cmake/catkin_generate_environment.cmake
index e42ce26..912078b 100644
--- a/cmake/catkin_generate_environment.cmake
+++ b/cmake/catkin_generate_environment.cmake
@@ -10,6 +10,32 @@ function(catkin_generate_environment)
     file(WRITE "${CMAKE_BINARY_DIR}/CATKIN_IGNORE" "")
   endif()
 
+  # get multiarch name
+  set(CATKIN_LIB_ENVIRONMENT_PATHS "'${CATKIN_GLOBAL_LIB_DESTINATION}'")
+  set(CATKIN_PKGCONFIG_ENVIRONMENT_PATHS "os.path.join('${CATKIN_GLOBAL_LIB_DESTINATION}', 'pkgconfig')")
+  if (UNIX AND NOT APPLE)
+    # Two step looking for multiarch support: check for gcc -print-multiarch
+    # and, if failed, try to run dpkg-architecture
+    execute_process(COMMAND gcc -print-multiarch
+                    OUTPUT_VARIABLE CATKIN_MULTIARCH
+                    OUTPUT_STRIP_TRAILING_WHITESPACE
+                    ERROR_QUIET
+    )
+    if ("${CATKIN_MULTIARCH}" STREQUAL "")
+      execute_process(COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
+                      OUTPUT_VARIABLE CATKIN_MULTIARCH
+                      OUTPUT_STRIP_TRAILING_WHITESPACE
+                      ERROR_QUIET
+      )
+    endif()
+    if (NOT "${CATKIN_MULTIARCH}" STREQUAL "")
+      set(CATKIN_LIB_ENVIRONMENT_PATHS
+        "[${CATKIN_LIB_ENVIRONMENT_PATHS}, os.path.join('${CATKIN_GLOBAL_LIB_DESTINATION}', '${CATKIN_MULTIARCH}')]")
+      set(CATKIN_PKGCONFIG_ENVIRONMENT_PATHS
+        "[${CATKIN_PKGCONFIG_ENVIRONMENT_PATHS}, os.path.join('${CATKIN_GLOBAL_LIB_DESTINATION}', '${CATKIN_MULTIARCH}', 'pkgconfig')]")
+    endif()
+  endif()
+
   # generate Python setup util
   atomic_configure_file(${catkin_EXTRAS_DIR}/templates/_setup_util.py.in
     ${CATKIN_DEVEL_PREFIX}/_setup_util.py
@@ -62,7 +88,7 @@ function(catkin_generate_environment)
     configure_file(${catkin_EXTRAS_DIR}/templates/_setup_util.py.in
       ${CMAKE_BINARY_DIR}/catkin_generated/installspace/_setup_util.py
       @ONLY)
-    install(PROGRAMS
+    catkin_install_python(PROGRAMS
       ${CMAKE_BINARY_DIR}/catkin_generated/installspace/_setup_util.py
       DESTINATION ${CMAKE_INSTALL_PREFIX})
   endif()
diff --git a/cmake/em_expand.cmake b/cmake/em_expand.cmake
index d8711ab..0cca5f4 100644
--- a/cmake/em_expand.cmake
+++ b/cmake/em_expand.cmake
@@ -14,8 +14,10 @@ macro(em_expand context_in context_out em_file_in file_out)
   endif()
 
   debug_message(2 "Evaluate template '${em_file_in}' to '${file_out}' (with context from '${context_out}')")
-  assert(EMPY_EXECUTABLE)
-  set(command ${EMPY_EXECUTABLE})
+  assert(EMPY_SCRIPT)
+  # since empy contains a specific python version in its shebang line
+  # override the used python version by invoking it explicitly
+  set(command "${PYTHON_EXECUTABLE};${EMPY_SCRIPT}")
   # prepend environment if set
   if(CATKIN_ENV)
     set(command ${CATKIN_ENV} ${command})
diff --git a/cmake/empy.cmake b/cmake/empy.cmake
index 06d84ab..22b7a0a 100644
--- a/cmake/empy.cmake
+++ b/cmake/empy.cmake
@@ -20,17 +20,20 @@ function(find_python_module module)
   find_package_handle_standard_args(PY_${module} DEFAULT_MSG PY_${module_upper})
 endfunction(find_python_module)
 
-find_program(EMPY_EXECUTABLE empy)
-if(NOT EMPY_EXECUTABLE)
-  # On OSX, there's an em.py, but not executable empy
-  find_python_module(em)
-  if(NOT PY_EM)
-    message(FATAL_ERROR "Unable to find either executable 'empy' or Python module 'em'... try installing package 'python-empy'")
+if(NOT EMPY_SCRIPT)
+  find_program(EMPY_EXECUTABLE empy)
+  if(NOT EMPY_EXECUTABLE)
+    # On OSX, there's an em.py, but not an executable empy script
+    find_python_module(em)
+    if(NOT PY_EM)
+      message(FATAL_ERROR "Unable to find either executable 'empy' or Python module 'em'... try installing the package 'python-empy'")
+    endif()
+    # ensure to use cmake-style path separators on Windows
+    file(TO_CMAKE_PATH "${PY_EM}" EMPY_SCRIPT)
   else()
-    file(TO_CMAKE_PATH "${PY_EM}" PY_EM)
-    set(EMPY_EXECUTABLE "${PYTHON_EXECUTABLE};${PY_EM}" CACHE STRING "Executable string for empy" FORCE)
+    # ensure to use cmake-style path separators on Windows
+    file(TO_CMAKE_PATH "${EMPY_EXECUTABLE}" EMPY_SCRIPT)
   endif()
-else()
-  # ensure to use cmake-style path separators on Windows
-  file(TO_CMAKE_PATH "${EMPY_EXECUTABLE}" EMPY_EXECUTABLE)
+  set(EMPY_SCRIPT "${EMPY_SCRIPT}" CACHE STRING "Empy script" FORCE)
 endif()
+message(STATUS "Using empy: ${EMPY_SCRIPT}")
diff --git a/cmake/parse_arguments.cmake b/cmake/parse_arguments.cmake
deleted file mode 100644
index 752356a..0000000
--- a/cmake/parse_arguments.cmake
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# parse_arguments() taken from
-# http://www.itk.org/Wiki/CMakeMacroParseArguments
-#
-# @deprecated use CMakeParseArguments instead
-#
-macro(parse_arguments prefix arg_names option_names)
-  message(WARNING "parse_arguments(prefix args options ${ARGN}) is deprecated. Use the corresponding CMake function instead:")
-  message("  call 'include(CMakeParseArguments)' to include the CMake function")
-  message("  Update the signature:")
-  message("  instead of 'parse_arguments(prefix option_names arg_names ${ARGN})'")
-  message("  it is 'cmake_parse_arguments(prefix option_names single_arg_names multi_arg_names ${ARGN}))")
-  message("  and the variable containing not matched arguments must be changed form 'prefix_DEFAULT_ARGS' to 'prefix_UNPARSED_ARGUMENTS'")
-
-  set(DEFAULT_ARGS)
-  foreach(arg_name ${arg_names})
-    set(${prefix}_${arg_name})
-  endforeach()
-  foreach(option ${option_names})
-    set(${prefix}_${option} FALSE)
-  endforeach()
-
-  set(current_arg_name DEFAULT_ARGS)
-  set(current_arg_list)
-  foreach(arg ${ARGN})
-    set(larg_names ${arg_names})
-    list(FIND larg_names "${arg}" is_arg_name)
-    if(is_arg_name GREATER -1)
-      set(${prefix}_${current_arg_name} ${current_arg_list})
-      set(current_arg_name ${arg})
-      set(current_arg_list)
-    else()
-      set(loption_names ${option_names})
-      list(FIND loption_names "${arg}" is_option)
-      if(is_option GREATER -1)
-        set(${prefix}_${arg} TRUE)
-      else()
-        set(current_arg_list ${current_arg_list} ${arg})
-      endif()
-    endif()
-  endforeach()
-  set(${prefix}_${current_arg_name} ${current_arg_list})
-endmacro()
diff --git a/cmake/python.cmake b/cmake/python.cmake
index 5b975d9..70f3d26 100644
--- a/cmake/python.cmake
+++ b/cmake/python.cmake
@@ -8,24 +8,6 @@ endif()
 find_package(PythonInterp REQUIRED)
 message(STATUS "Using PYTHON_EXECUTABLE: ${PYTHON_EXECUTABLE}")
 
-# in CMake 2.8.6 and older PythonInterp does not set the version variables
-if(NOT PYTHON_VERSION_MAJOR OR NOT PYTHON_VERSION_MINOR)
-  message(STATUS "Alternative approach to get Python version since find_package(PythonInterp) does not return it")
-  execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "from sys import version_info; print('%u;%u' % (version_info[0], version_info[1]))"
-    RESULT_VARIABLE _res
-    OUTPUT_VARIABLE _out
-    ERROR_VARIABLE _err
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-    ERROR_STRIP_TRAILING_WHITESPACE
-  )
-  if(NOT _res EQUAL 0)
-    message(FATAL_ERROR "Determine Python version failed")
-  endif()
-  list(GET _out 0 PYTHON_VERSION_MAJOR)
-  list(GET _out 1 PYTHON_VERSION_MINOR)
-endif()
-message(STATUS "Python version: ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
-
 set(_PYTHON_PATH_VERSION_SUFFIX "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
 
 set(enable_setuptools_deb_layout OFF)
diff --git a/cmake/templates/_setup_util.py b/cmake/templates/_setup_util.py
deleted file mode 100644
index bbe9031..0000000
--- a/cmake/templates/_setup_util.py
+++ /dev/null
@@ -1,140 +0,0 @@
-#!/usr/bin/env python
-
-# Software License Agreement (BSD License)
-#
-# Copyright (c) 2012, Willow Garage, Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-#  * Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-#  * Redistributions in binary form must reproduce the above
-#    copyright notice, this list of conditions and the following
-#    disclaimer in the documentation and/or other materials provided
-#    with the distribution.
-#  * Neither the name of Willow Garage, Inc. nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-'''This file only exists for backward compatibility with workspaces built with catkin 0.5.58 or older.'''
-
-from __future__ import print_function
-import argparse
-import os
-import sys
-
-CATKIN_MARKER_FILE = '.catkin'
-
-
-def get_workspaces(include_fuerte=False):
-    '''
-    Based on CMAKE_PREFIX_PATH return all catkin workspaces
-
-    :param include_fuerte: The flag if paths starting with '/opt/ros/fuerte' should be considered workspaces, ``bool``
-    '''
-    # get all cmake prefix paths
-    env_name = 'CMAKE_PREFIX_PATH'
-    paths = [path for path in os.environ.get(env_name, '').split(os.pathsep) if path]
-    # remove non-workspace paths
-    workspaces = [path for path in paths if os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE)) or (include_fuerte and path.startswith('/opt/ros/fuerte'))]
-    return workspaces
-
-
-def get_reversed_workspaces(exclude=None):
-    '''Return a newline separated list of workspaces in CMAKE_PREFIX_PATH in reverse order and remove any occurrences of EXCLUDE.'''
-    paths = [p for p in reversed(get_workspaces()) if p != exclude]
-    return '\n'.join(paths)
-
-
-def prefix_env(name, new_paths_str):
-    '''
-    Return the prefix to prepend to the environment variable NAME, adding any path in NEW_PATHS_STR without creating duplicate or empty items.
-    '''
-    environ_paths = [i for i in os.environ.get(name, '').split(os.pathsep) if i]
-    checked_paths = []
-    new_paths = [v for v in new_paths_str.split(os.pathsep) if v != '']
-    for path in new_paths:
-        # exclude any path already in env and any path we already added
-        if path not in environ_paths and path not in checked_paths:
-            checked_paths.append(path)
-    prefix_str = os.pathsep.join(checked_paths)
-    if prefix_str != '' and environ_paths:
-        prefix_str += os.pathsep
-    return prefix_str
-
-
-def remove_from_env(name, subfolder):
-    '''
-    For each catkin workspace in CMAKE_PREFIX_PATH remove the first entry from env[NAME] matching workspace + subfolder.
-
-    :param subfolder: str '' or subfoldername that may start with '/'
-    :returns: the updated value of the environment variable.
-    '''
-    env_paths = [path for path in os.environ.get(name, '').split(os.pathsep) if path]
-    if subfolder:
-        if subfolder.startswith(os.path.sep) or (os.path.altsep and subfolder.startswith(os.path.altsep)):
-            subfolder = subfolder[1:]
-        if subfolder.endswith(os.path.sep) or (os.path.altsep and subfolder.endswith(os.path.altsep)):
-            subfolder = subfolder[:-1]
-    for ws_path in get_workspaces(include_fuerte=True):
-        path_to_find = os.path.join(ws_path, subfolder) if subfolder else ws_path
-        path_to_remove = None
-        for env_path in env_paths:
-            env_path_clean = env_path[:-1] if env_path and env_path[-1] in [os.path.sep, os.path.altsep] else env_path
-            if env_path_clean == path_to_find:
-                path_to_remove = env_path
-                break
-        if path_to_remove:
-            env_paths.remove(path_to_remove)
-    return os.pathsep.join(env_paths)
-
-
-def _parse_arguments():
-    parser = argparse.ArgumentParser(description='Generates code blocks for the setup.SHELL script.')
-    group = parser.add_mutually_exclusive_group(required=True)
-    group.add_argument('--get-reversed-workspaces', action='store_true', help='Get workspaces based on CMAKE_PREFIX_PATH in reverse order')
-    group.add_argument('--prefix', action='store_true', help='Prepend a unique value to an environment variable')
-    group.add_argument('--remove', action='store_true', help='Remove the prefix for each workspace in CMAKE_PREFIX_PATH from the environment variable')
-    parser.add_argument('--name', nargs='?', help='The name of the environment variable')
-    parser.add_argument('--value', help='The value')
-    args = parser.parse_args()
-
-    # verify correct argument combination
-    if (args.prefix or args.remove) and args.name is None:
-        raise RuntimeError('Argument "--name" must be passed for "%s"' % ('--prefix' if args.prefix else '--remove'))
-    if args.get_reversed_workspaces and args.name is not None:
-        raise RuntimeError('Argument "--name" must not be passed for "--get-reversed-workspaces"')
-
-    return args
-
-
-if __name__ == '__main__':
-    try:
-        args = _parse_arguments()
-    except Exception as e:
-        print(e, file=sys.stderr)
-        sys.exit(1)
-
-    # dispatch to requested operation
-    if args.get_reversed_workspaces:
-        print(get_reversed_workspaces(args.value))
-    elif args.prefix:
-        print(prefix_env(args.name, args.value))
-    elif args.remove:
-        print(remove_from_env(args.name, args.value))
diff --git a/cmake/templates/_setup_util.py.in b/cmake/templates/_setup_util.py.in
index 55bf788..46c8628 100755
--- a/cmake/templates/_setup_util.py.in
+++ b/cmake/templates/_setup_util.py.in
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!@PYTHON_EXECUTABLE@
 
 # Software License Agreement (BSD License)
 #
@@ -52,9 +52,9 @@ IS_WINDOWS = (system == 'Windows')
 ENV_VAR_SUBFOLDERS = {
     'CMAKE_PREFIX_PATH': '',
     'CPATH': 'include',
-    'LD_LIBRARY_PATH' if not IS_DARWIN else 'DYLD_LIBRARY_PATH': '@CATKIN_GLOBAL_LIB_DESTINATION@',
+    'LD_LIBRARY_PATH' if not IS_DARWIN else 'DYLD_LIBRARY_PATH': @CATKIN_LIB_ENVIRONMENT_PATHS@,
     'PATH': '@CATKIN_GLOBAL_BIN_DESTINATION@',
-    'PKG_CONFIG_PATH': 'lib/pkgconfig',
+    'PKG_CONFIG_PATH': @CATKIN_PKGCONFIG_ENVIRONMENT_PATHS@,
     'PYTHONPATH': '@PYTHON_INSTALL_DIR@',
 }
 
@@ -68,11 +68,14 @@ def rollback_env_variables(environ, env_var_subfolders):
     lines = []
     unmodified_environ = copy.copy(environ)
     for key in sorted(env_var_subfolders.keys()):
-        subfolder = env_var_subfolders[key]
-        value = _rollback_env_variable(unmodified_environ, key, subfolder)
-        if value is not None:
-            environ[key] = value
-            lines.append(assignment(key, value))
+        subfolders = env_var_subfolders[key]
+        if not isinstance(subfolders, list):
+            subfolders = [subfolders]
+        for subfolder in subfolders:
+            value = _rollback_env_variable(unmodified_environ, key, subfolder)
+            if value is not None:
+                environ[key] = value
+                lines.append(assignment(key, value))
     if lines:
         lines.insert(0, comment('reset environment variables by unrolling modifications based on all workspaces in CMAKE_PREFIX_PATH'))
     return lines
@@ -143,7 +146,7 @@ def prepend_env_variables(environ, env_var_subfolders, workspaces):
     return lines
 
 
-def _prefix_env_variable(environ, name, paths, subfolder):
+def _prefix_env_variable(environ, name, paths, subfolders):
     '''
     Return the prefix to prepend to the environment variable NAME, adding any path in NEW_PATHS_STR without creating duplicate or empty items.
     '''
@@ -151,11 +154,15 @@ def _prefix_env_variable(environ, name, paths, subfolder):
     environ_paths = [path for path in value.split(os.pathsep) if path]
     checked_paths = []
     for path in paths:
-        if subfolder:
-            path = os.path.join(path, subfolder)
-        # exclude any path already in env and any path we already added
-        if path not in environ_paths and path not in checked_paths:
-            checked_paths.append(path)
+        if not isinstance(subfolders, list):
+            subfolders = [subfolders]
+        for subfolder in subfolders:
+            path_tmp = path
+            if subfolder:
+                path_tmp = os.path.join(path_tmp, subfolder)
+            # exclude any path already in env and any path we already added
+            if path_tmp not in environ_paths and path_tmp not in checked_paths:
+                checked_paths.append(path_tmp)
     prefix_str = os.pathsep.join(checked_paths)
     if prefix_str != '' and environ_paths:
         prefix_str += os.pathsep
diff --git a/cmake/test/download_test_data.cmake b/cmake/test/download_test_data.cmake
deleted file mode 100644
index da7e6fa..0000000
--- a/cmake/test/download_test_data.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-_generate_function_if_testing_is_disabled("download_test_data")
-
-# download data on the tests target
-function(download_test_data _url _filename _md5)
-  _warn_if_skip_testing("download_test_data")
-
-  # create a legal target name, in case the target name has slashes in it
-  string(REPLACE "/" "_" _testname download_data_${_filename})
-  message(WARNING "download_test_data() is deprecated, please use catkin_download_test_data() instead.\nUse the following signature:\ncatkin_download_test_data(${_testname} ${_url} FILENAME ${_filename} MD5 ${_md5})")
-  catkin_download_test_data(${_testname} ${_url} FILENAME ${_filename} MD5 ${_md5})
-endfunction()
diff --git a/cmake/test/gtest.cmake b/cmake/test/gtest.cmake
index 0edc36a..c834722 100644
--- a/cmake/test/gtest.cmake
+++ b/cmake/test/gtest.cmake
@@ -58,11 +58,6 @@ function(catkin_add_gtest target)
   catkin_run_tests_target("gtest" ${target} "gtest-${target}.xml" COMMAND ${cmd} DEPENDENCIES ${target} WORKING_DIRECTORY ${_gtest_WORKING_DIRECTORY})
 endfunction()
 
-function(add_gtest)
-  message(WARNING "add_gtest() is deprecated, please rename the function call to catkin_add_gtest()")
-  catkin_add_gtest(${ARGN})
-endfunction()
-
 find_package(GTest QUIET)
 if(NOT GTEST_FOUND)
   # only add gtest directory once per workspace
diff --git a/cmake/test/nosetests.cmake b/cmake/test/nosetests.cmake
index 8c5af24..fee3809 100644
--- a/cmake/test/nosetests.cmake
+++ b/cmake/test/nosetests.cmake
@@ -82,18 +82,20 @@ function(catkin_add_nosetests path)
   catkin_run_tests_target("nosetests" ${output_file_name} "nosetests-${output_file_name}.xml" COMMAND ${cmd} DEPENDENCIES ${_nose_DEPENDENCIES} WORKING_DIRECTORY ${_nose_WORKING_DIRECTORY})
 endfunction()
 
-function(add_nosetests)
-  message(WARNING "add_nosetests() is deprecated, please rename the function call to catkin_add_nosetests()")
-  catkin_add_nosetests(${ARGN})
-endfunction()
-
-find_program(NOSETESTS nosetests)
-if(NOT nosetests_path)
-  # retry with name including major version number
-  find_program(NOSETESTS NAMES nosetests2 nosetests-2)
-endif()
-if(NOT NOSETESTS)
-  message(WARNING "nosetests not found, Python tests can not be run (try installing package 'python-nose')")
+find_program(NOSETESTS NAMES
+  "nosetests${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
+  "nosetests-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
+  "nosetests${PYTHON_VERSION_MAJOR}"
+  "nosetests-${PYTHON_VERSION_MAJOR}"
+  "nosetests")
+if(NOSETESTS)
+  message(STATUS "Using Python nosetests: ${NOSETESTS}")
+else()
+  if("${PYTHON_VERSION_MAJOR}" STREQUAL "3")
+    message(WARNING "nosetests not found, Python tests can not be run (try installing package 'python3-nose')")
+  else()
+    message(WARNING "nosetests not found, Python tests can not be run (try installing package 'python-nose')")
+  endif()
 endif()
 
 macro(_strip_path_prefix var value prefix)
diff --git a/cmake/tools/doxygen.cmake b/cmake/tools/doxygen.cmake
index 79179d6..e8ed5d7 100644
--- a/cmake/tools/doxygen.cmake
+++ b/cmake/tools/doxygen.cmake
@@ -37,11 +37,8 @@ if (DOXYGEN_EXECUTABLE)
   set(DOXYGEN_FOUND TRUE CACHE BOOL "Doxygen found")
 endif()
 
-GET_TARGET_PROPERTY(doxygen_catkin_property doxygen "catkin")
-if (doxygen_catkin_property)
-else()
-  add_custom_target(doxygen COMMENT "doxygen found")
-  set_target_properties(doxygen PROPERTIES "catkin" "found")
+if(NOT TARGET doxygen)
+  add_custom_target(doxygen)
 endif()
 
 macro(catkin_doxygen TARGET_NAME SEARCH_DIRS)
diff --git a/doc/adv_user_guide/adv_user_guide.rst b/doc/adv_user_guide/adv_user_guide.rst
index cd1b25c..ae81dd4 100644
--- a/doc/adv_user_guide/adv_user_guide.rst
+++ b/doc/adv_user_guide/adv_user_guide.rst
@@ -6,5 +6,6 @@ This section of the documentation is provided for advanced users.
 .. toctree::
    :maxdepth: 2
 
+   catkin_migration_indigo
    catkin_migration
    builddocs
diff --git a/doc/adv_user_guide/catkin_migration_indigo.rst b/doc/adv_user_guide/catkin_migration_indigo.rst
new file mode 100644
index 0000000..bc68617
--- /dev/null
+++ b/doc/adv_user_guide/catkin_migration_indigo.rst
@@ -0,0 +1,24 @@
+Updating a catkin package for Indigo
+====================================
+
+If your catkin package is working in Groovy/Hydro it should be easy
+to get it working in Indigo too.
+
+Removed deprecated functions
+----------------------------
+
+The following CMake functions and macros which were deprecated before
+have been removed from catkin in Indigo. Please replace them with
+their replacement:
+
+* ``add_gtest(..)`` => ``catkin_add_gtest(..)``
+* ``add_nosetests(..)`` => ``catkin_add_nosetests(..)``
+* ``download_test_data(url md5)`` => ``catkin_download_test_data(target url MD5 md5)``
+* ``parse_arguments(..)`` => ``cmake_parse_arguments(..)``
+
+Removed Eigen CMake config file
+-------------------------------
+
+The previously provided CMake config file for Eigen has been removed.
+Instead you might want to use the CMake module provided by the
+`cmake_modules <http://wiki.ros.org/cmake_modules>`_ package.
diff --git a/doc/conf.py b/doc/conf.py
index 86ff8e3..471d70d 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -217,7 +217,7 @@ latex_documents = [
 #latex_use_modindex = True
 
 intersphinx_mapping = {
-    'genmsg': ('http://docs.ros.org/hydro/api/genmsg/html', None),
+    'genmsg': ('http://docs.ros.org/indigo/api/genmsg/html', None),
     'vcstools': ('http://docs.ros.org/independent/api/vcstools/html', None),
     'rosinstall': ('http://docs.ros.org/independent/api/rosinstall/html', None),
     'rospkg': ('http://docs.ros.org/independent/api/rospkg/html', None),
diff --git a/doc/dev_guide/generated_cmake_api.rst b/doc/dev_guide/generated_cmake_api.rst
index aa2e6bb..8bc9972 100644
--- a/doc/dev_guide/generated_cmake_api.rst
+++ b/doc/dev_guide/generated_cmake_api.rst
@@ -452,7 +452,6 @@ Non-public CMake functions / macros
  * :cmake:macro:`catkin_workspace`
  * :cmake:macro:`list_append_deduplicate`
  * :cmake:macro:`list_append_unique`
- * :cmake:macro:`parse_arguments`
  * :cmake:macro:`stamp`
  * :cmake:macro:`string_starts_with`
 
@@ -607,22 +606,6 @@ Non-public CMake functions / macros
    unstable.
 
 
-.. _`parse_arguments_ref`:
-
-`parse_arguments`
------------------
-
-.. cmake:macro:: parse_arguments(prefix, arg_names, option_names)
-
- *[macro defined in parse_arguments.cmake]*
-
-
- parse_arguments() taken from
- http://www.itk.org/Wiki/CMakeMacroParseArguments
-
- @deprecated use CMakeParseArguments instead
-
-
 .. _`stamp_ref`:
 
 `stamp`
@@ -690,24 +673,6 @@ Not documented CMake functions / macros
 
  *[macro defined in test/nosetests.cmake]*
 
-.. _`add_gtest_ref`:
-
-`add_gtest`
------------
-
-.. cmake:macro:: add_gtest()
-
- *[function defined in test/gtest.cmake]*
-
-.. _`add_nosetests_ref`:
-
-`add_nosetests`
----------------
-
-.. cmake:macro:: add_nosetests()
-
- *[function defined in test/nosetests.cmake]*
-
 .. _`assert_ref`:
 
 `assert`
diff --git a/doc/howto/format1/installing_python.rst b/doc/howto/format1/installing_python.rst
index 68d72cd..6d6381e 100644
--- a/doc/howto/format1/installing_python.rst
+++ b/doc/howto/format1/installing_python.rst
@@ -21,19 +21,10 @@ install in the global ``bin/`` directory.
 Standard ROS practice is to place all your executable Python programs
 in a ``scripts/`` subdirectory.  To keep the user API clean,
 executable script names generally do not include a ``.py`` suffix.
-Your ``CMakeLists.txt`` can conveniently install all the scripts in
-that directory::
-
-  install(DIRECTORY scripts/
-          DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
-          USE_SOURCE_PERMISSIONS
-          PATTERN ".svn" EXCLUDE)
-
-The ``PATTERN ".svn" EXCLUDE`` is only needed if you use a Subversion_
-repository.  For other types of repositories, it can be omitted.
-
-Other directory names are allowed.  If you mixed the scripts with
-other files, you should install them one by one::
+Your ``CMakeLists.txt`` should install all the scripts explictly
+using the special install function ``catkin_install_python``.
+This will make sure that shebang lines are updated to use the
+specific Python version used at configure time::
 
   catkin_install_python(PROGRAMS scripts/your_node1 scripts/your_node2
                         DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
diff --git a/doc/index.rst b/doc/index.rst
index b734931..36f6d68 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -8,22 +8,23 @@ and associated code used to build packages used in `ROS
 It was initially introduced as part of the ROS Fuerte_ release where
 it was used for a small set of base packages.  For Groovy_ and Hydro_
 it was significantly modified, and used by many more packages.  All
-released Hydro packages are now built using catkin, although existing
+released Hydro packages were built using catkin, although existing
 `rosbuild <http://wiki.ros.org/rosbuild>`_ packages can still be built
-from source on top of Hydro.  Indigo_ is very similar, except for some
-deprecated features that were removed.
+from source on top of the catkin packages.  Indigo_ is very similar,
+except for some deprecated features that were removed.
 
 .. note::
 
-   This document covers both the Groovy_ and Hydro_ versions.  The
-   Indigo_ version is `documented separately
-   <http://docs.ros.org/indigo/api/catkin/html/>`_.
+   This document covers the Indigo_ version.  The Groovy_ and Hydro_
+   versions are `documented separately
+   <http://docs.ros.org/hydro/api/catkin/html/>`_.
 
 .. _Fuerte: http://wiki.ros.org/fuerte
 .. _Groovy: http://wiki.ros.org/groovy
 .. _Hydro: http://wiki.ros.org/hydro
 .. _Indigo: http://wiki.ros.org/indigo
 
+
 Contents
 --------
 
diff --git a/doc/user_guide/setup_dot_py.rst b/doc/user_guide/setup_dot_py.rst
index 7552495..f536cff 100644
--- a/doc/user_guide/setup_dot_py.rst
+++ b/doc/user_guide/setup_dot_py.rst
@@ -97,7 +97,7 @@ one distributes to pypi.
   installing such python scripts is to add the following to
   the CMakeLists.txt::
 
-    install(PROGRAMS scripts/myscript
+    catkin_install_python(PROGRAMS scripts/myscript
       DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
 
 
diff --git a/package.xml b/package.xml
index e8ce7d4..7c2708a 100644
--- a/package.xml
+++ b/package.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
-<package>
+<package format="2">
   <name>catkin</name>
-  <version>0.5.89</version>
+  <version>0.6.9</version>
   <description>Low-level build system macros and infrastructure for ROS.</description>
   <maintainer email="dthomas at osrfoundation.org">Dirk Thomas</maintainer>
   <license>BSD</license>
@@ -15,22 +15,23 @@
   <author>Brian Gerkey</author>
   <author>Dirk Thomas</author>
 
-  <build_depend>gtest</build_depend>
-  <build_depend>python-argparse</build_depend>
-  <build_depend version_gte="0.2.2">python-catkin-pkg</build_depend>
+  <buildtool_depend>cmake</buildtool_depend>
+  <buildtool_export_depend>cmake</buildtool_export_depend>
+
+  <depend>python-argparse</depend>
+  <depend version_gte="0.2.2">python-catkin-pkg</depend>
+
   <build_depend>python-empy</build_depend>
-  <build_depend>python-nose</build_depend>
 
-  <buildtool_depend>cmake</buildtool_depend>
+  <build_export_depend>gtest</build_export_depend>
+  <build_export_depend>python-empy</build_export_depend>
+  <build_export_depend>python-nose</build_export_depend>
 
-  <run_depend>cmake</run_depend>
-  <run_depend>gtest</run_depend>
-  <run_depend>python-argparse</run_depend>
-  <run_depend version_gte="0.2.0">python-catkin-pkg</run_depend>
-  <run_depend>python-empy</run_depend>
-  <run_depend>python-nose</run_depend>
+  <test_depend>python-mock</test_depend>
+  <test_depend>python-nose</test_depend>
 
   <export>
     <rosdoc config="rosdoc.yaml"/>
+    <architecture_independent/>
   </export>
 </package>
diff --git a/python/catkin/builder.py b/python/catkin/builder.py
index 5c18d65..faa3cf7 100644
--- a/python/catkin/builder.py
+++ b/python/catkin/builder.py
@@ -39,7 +39,7 @@ import platform
 import re
 import stat
 try:
-    from cStringIO import StringIO
+    from StringIO import StringIO
 except ImportError:
     from io import StringIO
 import subprocess
@@ -202,11 +202,24 @@ def run_command(cmd, cwd, quiet=False, colorize=False, add_env=None):
         while True:
             line = proc.stdout.readline()
             try:
-                # in case the input is already unicode
-                line = line.encode('utf8')
-            except (AttributeError, UnicodeDecodeError):
+                # try decoding in case the output is encoded
+                line = line.decode('utf8', 'replace')
+            except (AttributeError, UnicodeEncodeError):
+                # do nothing for Python 3 when line is already a str
+                # or when the string can't be decoded
                 pass
-            line = line.decode('utf8', 'replace')
+
+            # ensure that it is convertable to the target encoding
+            encoding = 'utf8'
+            try:
+                if out.encoding:
+                    encoding = out.encoding
+            except AttributeError:
+                # do nothing for Python 2
+                pass
+            line = line.encode(encoding, 'replace')
+            line = line.decode(encoding, 'replace')
+
             if proc.returncode is not None or not line:
                 break
             try:
@@ -246,6 +259,25 @@ def isolation_print_command(cmd, path=None, add_env=None):
     )
 
 
+def get_multiarch():
+    if not sys.platform.lower().startswith('linux'):
+        return ''
+    # this function returns the suffix for lib directories on supported systems or an empty string
+    # it uses two step approach to look for multiarch: first run gcc -print-multiarch and if
+    # failed try to run dpkg-architecture
+    p = subprocess.Popen(
+        ['gcc', '-print-multiarch'],
+        stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+    out, err = p.communicate()
+    if p.returncode != 0:
+        out, err = subprocess.Popen(
+            ['dpkg-architecture', '-qDEB_HOST_MULTIARCH'],
+            stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
+
+    # be sure of returning empty string or a valid multiarch tuple format
+    assert(not out.strip() or out.strip().count('-') == 2);
+    return out.strip()
+
 def get_python_install_dir():
     # this function returns the same value as the CMake variable PYTHON_INSTALL_DIR from catkin/cmake/python.cmake
     python_install_dir = 'lib'
@@ -261,16 +293,9 @@ def get_python_install_dir():
     return python_install_dir
 
 
-def handle_make_arguments(input_make_args, force_single_threaded_when_running_tests=False):
+def handle_make_arguments(input_make_args):
     make_args = list(input_make_args)
 
-    if force_single_threaded_when_running_tests:
-        # force single threaded execution when running test since rostest does not support multiple parallel runs
-        run_tests = [a for a in make_args if a.startswith('run_tests')]
-        if run_tests:
-            print('Forcing "-j1" for running unit tests.')
-            make_args.append('-j1')
-
     # If no -j/--jobs/-l/--load-average flags are in make_args
     if not extract_jobs_flags(' '.join(make_args)):
         # If -j/--jobs/-l/--load-average are in MAKEFLAGS
@@ -378,7 +403,7 @@ def build_catkin_package(
 
     # Run make
     make_cmd = ['make']
-    make_cmd.extend(handle_make_arguments(make_args, force_single_threaded_when_running_tests=True))
+    make_cmd.extend(handle_make_arguments(make_args))
     isolation_print_command(' '.join(make_cmd), build_dir)
     if last_env is not None:
         make_cmd = [last_env] + make_cmd
@@ -526,9 +551,12 @@ exec "$@"
         subs['ld_path'] = os.path.join(install_target, 'lib') + ":"
         pythonpath = os.path.join(install_target, get_python_install_dir())
         subs['pythonpath'] = pythonpath + ':'
-        subs['pkgcfg_path'] = os.path.join(install_target, 'lib', 'pkgconfig')
-        subs['pkgcfg_path'] += ":"
+        subs['pkgcfg_path'] = os.path.join(install_target, 'lib', 'pkgconfig') + ":"
         subs['path'] = os.path.join(install_target, 'bin') + ":"
+        arch = get_multiarch()
+        if arch:
+            subs['ld_path'] += os.path.join(install_target, 'lib', arch) + ":"
+            subs['pkgcfg_path'] += os.path.join(install_target, 'lib', arch, 'pkgconfig') + ":"
         if not os.path.exists(os.path.dirname(new_setup_path)):
             os.mkdir(os.path.dirname(new_setup_path))
         with open(new_setup_path, 'w') as file_handle:
@@ -901,8 +929,10 @@ def build_workspace_isolated(
             if 'CMAKE_PREFIX_PATH' in os.environ.keys():
                 variables = {
                     'CATKIN_GLOBAL_BIN_DESTINATION': 'bin',
-                    'CATKIN_GLOBAL_LIB_DESTINATION': 'lib',
+                    'CATKIN_LIB_ENVIRONMENT_PATHS': "'lib'",
+                    'CATKIN_PKGCONFIG_ENVIRONMENT_PATHS': "os.path.join('lib', 'pkgconfig')",
                     'CMAKE_PREFIX_PATH_AS_IS': ';'.join(os.environ['CMAKE_PREFIX_PATH'].split(os.pathsep)),
+                    'PYTHON_EXECUTABLE': sys.executable,
                     'PYTHON_INSTALL_DIR': get_python_install_dir(),
                 }
                 with open(generated_setup_util_py, 'w') as f:
diff --git a/test/local_tests/test_with_mock_workspace.py b/test/local_tests/test_with_mock_workspace.py
index c057352..29fe8c9 100644
--- a/test/local_tests/test_with_mock_workspace.py
+++ b/test/local_tests/test_with_mock_workspace.py
@@ -76,7 +76,7 @@ class MockTest(AbstractCatkinWorkspaceTest):
                          expect=fail)
         print("failed as expected, out=", out)
 
-        self.assertTrue("catkin_package() PROJECT_NAME is set to 'Project'" in out, out)
+        self.assertTrue(b"catkin_package() PROJECT_NAME is set to 'Project'" in out, out)
         # assert 'You must call project() with the same name before.' in out
 
     # Test was not finished apparently
diff --git a/test/unit_tests/test_builder.py b/test/unit_tests/test_builder.py
index 539868b..a2fdaa6 100644
--- a/test/unit_tests/test_builder.py
+++ b/test/unit_tests/test_builder.py
@@ -14,7 +14,7 @@ except ImportError as e:
 class BuilderTest(unittest.TestCase):
     # TODO: Add tests for catkin_make and catkin_make_isolated
 
-    def test_run_command_unicode(self):
+    def test_run_command_unicode_string(self):
         backup_Popen = catkin.builder.subprocess.Popen
 
         class StdOut(object):
@@ -43,6 +43,36 @@ class BuilderTest(unittest.TestCase):
         finally:
             catkin.builder.subprocess.Popen = backup_Popen
 
+    def test_run_command_unicode_bytes(self):
+        backup_Popen = catkin.builder.subprocess.Popen
+
+        class StdOut(object):
+            def __init__(self, popen):
+                self.__popen = popen
+
+            def readline(self):
+                self.__popen.returncode = 0
+                try:
+                    # for Python 2 compatibility only
+                    s = unichr(2018)
+                except NameError:
+                    s = chr(2018)
+                return s.encode('utf8')
+
+        class MockPopen(object):
+            def __init__(self, *args, **kwargs):
+                self.returncode = None
+                self.stdout = StdOut(self)
+
+            def wait(self):
+                return True
+
+        try:
+            catkin.builder.subprocess.Popen = MockPopen
+            catkin.builder.run_command(['false'], os.getcwd(), True, True)
+        finally:
+            catkin.builder.subprocess.Popen = backup_Popen
+
     def test_extract_jobs_flags(self):
         valid_mflags = [
             '-j8 -l8', 'j8 ', '-j', 'j', '-l8', 'l8',
diff --git a/test/unit_tests/test_parse_package_xml.py b/test/unit_tests/test_parse_package_xml.py
index a9a16b4..46be6aa 100644
--- a/test/unit_tests/test_parse_package_xml.py
+++ b/test/unit_tests/test_parse_package_xml.py
@@ -24,13 +24,13 @@ class ParsePackageXmlTest(unittest.TestCase):
         pack.run_depends = ['rd1', 'rd2']
         pack.exports = []
         result = _get_output(pack)
-        self.assertEqual(['set(_CATKIN_CURRENT_PACKAGE "foopack")',
-                          'set(foopack_MAINTAINER "m1, m2")',
-                          'set(foopack_DEPRECATED "")',
-                          'set(foopack_VERSION "0.1.2")',
-                          'set(foopack_BUILD_DEPENDS "bd1" "bd2")',
-                          'set(foopack_RUN_DEPENDS "rd1" "rd2")',
-                          'set(foopack_BUILDTOOL_DEPENDS "catkin")'], result)
+        self.assertEqual(set(['set(_CATKIN_CURRENT_PACKAGE "foopack")',
+                              'set(foopack_MAINTAINER "m1, m2")',
+                              'set(foopack_DEPRECATED "")',
+                              'set(foopack_VERSION "0.1.2")',
+                              'set(foopack_BUILD_DEPENDS "bd1" "bd2")',
+                              'set(foopack_RUN_DEPENDS "rd1" "rd2")',
+                              'set(foopack_BUILDTOOL_DEPENDS "catkin")']), set(result))
 
     def test_main(self):
         try:
@@ -53,12 +53,12 @@ class ParsePackageXmlTest(unittest.TestCase):
             self.assertTrue(os.path.isfile(check_file))
             with open(check_file, 'r') as fhand:
                 contents = fhand.read()
-            self.assertEqual('''set(_CATKIN_CURRENT_PACKAGE "foopack")
-set(foopack_MAINTAINER "foo <foo at bar.com>")
-set(foopack_DEPRECATED "")
-set(foopack_VERSION "0.1.2")
-set(foopack_BUILD_DEPENDS "bd1" "bd2")
-set(foopack_RUN_DEPENDS "rd1" "rd2")
-set(foopack_BUILDTOOL_DEPENDS )''', contents)
+            self.assertEqual(set(['set(_CATKIN_CURRENT_PACKAGE "foopack")',
+                                  'set(foopack_MAINTAINER "foo <foo at bar.com>")',
+                                  'set(foopack_DEPRECATED "")',
+                                  'set(foopack_VERSION "0.1.2")',
+                                  'set(foopack_BUILD_DEPENDS "bd1" "bd2")',
+                                  'set(foopack_RUN_DEPENDS "rd1" "rd2")',
+                                  'set(foopack_BUILDTOOL_DEPENDS )']), set(contents.splitlines()))
         finally:
             shutil.rmtree(rootdir)
diff --git a/test/unit_tests/test_setup_util.py b/test/unit_tests/test_setup_util.py
index ab5e657..9ec123f 100644
--- a/test/unit_tests/test_setup_util.py
+++ b/test/unit_tests/test_setup_util.py
@@ -1,5 +1,6 @@
 import os
 import shutil
+import sys
 import tempfile
 import unittest
 
@@ -7,17 +8,19 @@ from catkin_pkg.cmake import configure_file
 
 data = configure_file(os.path.join(os.path.dirname(__file__), '..', '..', 'cmake', 'templates', '_setup_util.py.in'),
                       {
-                          'CATKIN_GLOBAL_LIB_DESTINATION': 'lib',
+                          'CATKIN_LIB_ENVIRONMENT_PATHS': "'lib'",
+                          'CATKIN_PKGCONFIG_ENVIRONMENT_PATHS': "os.path.join('lib', 'pkgconfig')",
                           'CATKIN_GLOBAL_BIN_DESTINATION': 'bin',
+                          'PYTHON_EXECUTABLE': sys.executable,
                           'PYTHON_INSTALL_DIR': 'pythonX.Y/packages',
                           'CMAKE_PREFIX_PATH_AS_IS': '',
                       })
-with tempfile.TemporaryFile() as setup_util_file:
+with tempfile.NamedTemporaryFile('w+') as setup_util_file:
     setup_util_file.write(data)
     setup_util_file.seek(0)
 
     import imp
-    imp.load_source('setup_util', '/somewhere/_setup_util.py', setup_util_file)
+    imp.load_source('setup_util', setup_util_file.name, setup_util_file.file)
 
 import setup_util
 from setup_util import _get_workspaces, _prefix_env_variable, _rollback_env_variable, CATKIN_MARKER_FILE

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ros/catkin.git



More information about the debian-science-commits mailing list