@@ -151,19 +151,40 @@ jobs:
151151 $activationIndex = $content.IndexOf("[activation]")
152152 if ($activationIndex -ge 0) {
153153 $content = $content[0..($activationIndex - 1)]
154- $content | Set-Content $generatedManifest
155154 }
155+ # Drop the ros-<distro>-*/ros2-* conda packages pixi-ros adds: they're already
156+ # provided by the downloaded official Windows binary (our actual underlay), and
157+ # installing them here only risks pulling in a python/numpy ABI that the official
158+ # binary's exported CMake configs (which hardcode an absolute build-time path)
159+ # weren't built with.
160+ $content = $content | Where-Object { $_ -notmatch '^ros-[a-z0-9]+-\S+\s*=' -and $_ -notmatch '^ros2-\S+\s*=' }
161+ $content | Set-Content $generatedManifest
162+
156163 $ErrorActionPreference = 'Stop'
164+ # Must match the python ABI (and numpy major version, via its include-dir layout)
165+ # that the official ROS Windows binary for this distro was actually built with,
166+ # confirmed from real link/CMake errors against each binary (see repo memory).
157167 $pythonVersion = switch ('${{ matrix.distro }}') {
158- 'humble' { '3.11 .*' }
168+ 'humble' { '3.10 .*' }
159169 'jazzy' { '3.12.*' }
160170 'kilted' { '3.12.*' }
161171 'lyrical' { '3.14.*' }
162172 'rolling' { '3.14.*' }
163173 default { throw "No Python version configured for ROS distro ${{ matrix.distro }}" }
164174 }
175+ $numpyVersion = switch ('${{ matrix.distro }}') {
176+ 'humble' { '<2' }
177+ default { $null }
178+ }
179+
180+ pixi add --manifest-path $generatedManifest --no-install tinyxml2
181+ if ($LASTEXITCODE -ne 0) { throw "pixi add tinyxml2 failed to solve (exit $LASTEXITCODE)" }
165182 pixi add --manifest-path $generatedManifest --no-install "python==$pythonVersion"
166183 if ($LASTEXITCODE -ne 0) { throw "pixi add python==$pythonVersion failed to solve (exit $LASTEXITCODE)" }
184+ if ($numpyVersion) {
185+ pixi add --manifest-path $generatedManifest --no-install "numpy$numpyVersion"
186+ if ($LASTEXITCODE -ne 0) { throw "pixi add numpy$numpyVersion failed to solve (exit $LASTEXITCODE)" }
187+ }
167188 pixi add --manifest-path $generatedManifest --no-install rosinstall_generator
168189 if ($LASTEXITCODE -ne 0) { throw "pixi add rosinstall_generator failed to solve (exit $LASTEXITCODE)" }
169190 pixi add --manifest-path $generatedManifest --no-install --pypi vcstool
0 commit comments