Control: tags 1146464 + patch Control: tags 1146464 + pending Dear maintainer,
I've prepared an NMU for ros2-colcon-core (versioned as 0.20.1-1.1) and uploaded it to DELAYED/2. Please feel free to tell me if I should cancel it. cu Adrian
diffstat for ros2-colcon-core-0.20.1 ros2-colcon-core-0.20.1 changelog | 7 patches/0001-Fall-back-when-setuptools-is-too-recent-for-symlink-.patch | 78 ++++++++++ patches/0002-Adjust-Python-build-tests-to-support-setuptools-80-7.patch | 37 ++++ patches/series | 2 4 files changed, 124 insertions(+) diff -Nru ros2-colcon-core-0.20.1/debian/changelog ros2-colcon-core-0.20.1/debian/changelog --- ros2-colcon-core-0.20.1/debian/changelog 2026-04-10 16:52:14.000000000 +0300 +++ ros2-colcon-core-0.20.1/debian/changelog 2026-10-16 19:48:25.000000000 +0300 @@ -1,3 +1,10 @@ +ros2-colcon-core (0.20.1-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Backport upstream fixes for recent setuptools. (Closes: #1146464) + + -- Adrian Bunk <[email protected]> Fri, 16 Oct 2026 19:48:25 +0300 + ros2-colcon-core (0.20.1-1) unstable; urgency=medium * New upstream version 0.20.1 diff -Nru ros2-colcon-core-0.20.1/debian/patches/0001-Fall-back-when-setuptools-is-too-recent-for-symlink-.patch ros2-colcon-core-0.20.1/debian/patches/0001-Fall-back-when-setuptools-is-too-recent-for-symlink-.patch --- ros2-colcon-core-0.20.1/debian/patches/0001-Fall-back-when-setuptools-is-too-recent-for-symlink-.patch 1970-01-01 02:00:00.000000000 +0200 +++ ros2-colcon-core-0.20.1/debian/patches/0001-Fall-back-when-setuptools-is-too-recent-for-symlink-.patch 2026-10-16 19:48:25.000000000 +0300 @@ -0,0 +1,78 @@ +From d004c041c579208b4840743c94b655ffbea2e0fc Mon Sep 17 00:00:00 2001 +From: Scott K Logan <[email protected]> +Date: Fri, 29 May 2026 13:42:19 -0500 +Subject: Fall back when setuptools is too recent for symlink install (#735) + +The latest releases of setuptools drop support for the `--editable` +option to the `develop` verb, which colcon relies on when performing a +`--symlink-install`. While colcon declares incompatibility with newer +setuptools versions, it's certainly possible to end up in a situation +where colcon is used with newer setuptools versions. When that happens, +we should behave similarly to how colcon handles versions of setuptools +which are too old to support `--symlink-install` and fall back to a full +install. +--- + colcon_core/task/python/build.py | 38 +++++++++++++++++++++++++++++++- + 1 file changed, 37 insertions(+), 1 deletion(-) + +diff --git a/colcon_core/task/python/build.py b/colcon_core/task/python/build.py +index 30b2ae8..8e25937 100644 +--- a/colcon_core/task/python/build.py ++++ b/colcon_core/task/python/build.py +@@ -96,7 +96,23 @@ class PythonBuildTask(TaskExtensionPoint): + available_commands = await self._get_available_commands( + args.path, env) + +- if not args.symlink_install or 'develop' not in available_commands: ++ symlink_install = False ++ if args.symlink_install: ++ if 'develop' in available_commands: ++ available_options = await self._get_available_options( ++ args.path, env, 'develop') ++ if '--editable' in available_options: ++ symlink_install = True ++ else: ++ logger.info( ++ "No '--editable' capability in setuptools, falling " ++ 'back to full install') ++ else: ++ logger.info( ++ "No 'develop' capability in setuptools, falling back to " ++ 'full install') ++ ++ if not symlink_install: + rc = await self._undo_develop(pkg, args, env) + if rc: + return rc +@@ -205,8 +221,28 @@ class PythonBuildTask(TaskExtensionPoint): + continue + commands.add( + line[2:index].decode(locale.getpreferredencoding(False))) ++ logger.debug(f"Available setuptools commands: {', '.join(commands)}") + return commands + ++ async def _get_available_options(self, path, env, command): ++ output = await check_output( ++ _PYTHON_CMD + ['setup.py', '--help', command], cwd=path, env=env) ++ options = set() ++ for line in output.splitlines(): ++ if not line.startswith(b' --'): ++ continue ++ try: ++ index = line.index(b' ', 4) ++ except ValueError: ++ continue ++ if index == 4: ++ continue ++ options.add( ++ line[2:index].decode(locale.getpreferredencoding(False))) ++ logger.debug( ++ f"Available setuptools '{command}' options: {', '.join(options)}") ++ return options ++ + async def _undo_develop(self, pkg, args, env): + """ + Undo a previously run 'develop' command. +-- +2.47.3 + diff -Nru ros2-colcon-core-0.20.1/debian/patches/0002-Adjust-Python-build-tests-to-support-setuptools-80-7.patch ros2-colcon-core-0.20.1/debian/patches/0002-Adjust-Python-build-tests-to-support-setuptools-80-7.patch --- ros2-colcon-core-0.20.1/debian/patches/0002-Adjust-Python-build-tests-to-support-setuptools-80-7.patch 1970-01-01 02:00:00.000000000 +0200 +++ ros2-colcon-core-0.20.1/debian/patches/0002-Adjust-Python-build-tests-to-support-setuptools-80-7.patch 2026-10-16 19:48:25.000000000 +0300 @@ -0,0 +1,37 @@ +From edd00075f057204eb820b630643ff8eb7ce5bd5d Mon Sep 17 00:00:00 2001 +From: Scott K Logan <[email protected]> +Date: Tue, 21 Jul 2026 15:28:12 -0500 +Subject: Adjust Python build tests to support setuptools >= 80 (#737) + +We should assert the behavior that we want colcon to exhibit (even +though I'm not happy about it). + +Fixes c0dbc292b823101d3de71da7bd3d91fdb0b39258 +--- + test/test_build_python.py | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/test/test_build_python.py b/test/test_build_python.py +index 89092b8..8ac1a4c 100644 +--- a/test/test_build_python.py ++++ b/test/test_build_python.py +@@ -55,6 +55,16 @@ def _test_build_package( + if setup_cfg and data_files: + pytest.importorskip('setuptools', minversion='40.5.0') + ++ if symlink_install: ++ try: ++ pytest.importorskip('setuptools', minversion='80') ++ except pytest.skip.Exception: # noqa: B902 ++ pass ++ else: ++ # We expect setuptools >= 80 to fall back to standard ++ # install behavior. ++ symlink_install = False ++ + event_loop = new_event_loop() + asyncio.set_event_loop(event_loop) + try: +-- +2.47.3 + diff -Nru ros2-colcon-core-0.20.1/debian/patches/series ros2-colcon-core-0.20.1/debian/patches/series --- ros2-colcon-core-0.20.1/debian/patches/series 2026-04-10 16:52:14.000000000 +0300 +++ ros2-colcon-core-0.20.1/debian/patches/series 2026-10-16 19:48:25.000000000 +0300 @@ -2,3 +2,5 @@ 0002-Ignore-DeprecationWarning-about-pkg_resources.patch 0003-Use-pristine-home-directory-for-Python-tests.patch 0004-Drop-setuptools-from-install_requires.patch +0001-Fall-back-when-setuptools-is-too-recent-for-symlink-.patch +0002-Adjust-Python-build-tests-to-support-setuptools-80-7.patch

