Skip to content

Commit 5433fd8

Browse files
committed
Add build files 2025-01-10-0240
1 parent 983e699 commit 5433fd8

File tree

1,957 files changed

+207481
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,957 files changed

+207481
-0
lines changed

Diff for: .github/workflows/linux.yml

+3,523
Large diffs are not rendered by default.

Diff for: activate.bat

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
:: Generated by vinca http://github.com/RoboStack/vinca.
2+
:: DO NOT EDIT!
3+
@if not defined CONDA_PREFIX goto:eof
4+
5+
@REM Don't do anything when we are in conda build.
6+
@if defined SYS_PREFIX exit /b 0
7+
8+
@set "QT_PLUGIN_PATH=%CONDA_PREFIX%\Library\plugins"
9+
10+
@call "%CONDA_PREFIX%\Library\local_setup.bat"
11+
@set PYTHONHOME=
12+
@set "ROS_OS_OVERRIDE=conda:win64"
13+
@set "ROS_ETC_DIR=%CONDA_PREFIX%\Library\etc\ros"
14+
@set "AMENT_PREFIX_PATH=%CONDA_PREFIX%\Library"
15+
@set "AMENT_PYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe"

Diff for: activate.ps1

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Generated by vinca http://github.com/RoboStack/vinca.
2+
# DO NOT EDIT!
3+
if ($null -eq ${env:CONDA_PREFIX}) { Exit }
4+
5+
# Don't do anything when we are in conda build.
6+
if ($null -ne ${env:SYS_PREFIX}) { Exit 0 }
7+
8+
$Env:QT_PLUGIN_PATH="${env:CONDA_PREFIX}\Library\plugins"
9+
10+
& "${env:CONDA_PREFIX}\Library\local_setup.ps1"
11+
12+
$Env:PYTHONHOME=''
13+
$Env:ROS_OS_OVERRIDE='conda:win64'
14+
$Env:ROS_ETC_DIR="${env:CONDA_PREFIX}\Library\etc\ros"
15+
$Env:AMENT_PREFIX_PATH="${env:CONDA_PREFIX}\Library"
16+
$Env:AMENT_PYTHON_EXECUTABLE="${env:CONDA_PREFIX}\python.exe"

Diff for: activate.sh

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Generated by vinca http://github.com/RoboStack/vinca.
2+
# DO NOT EDIT!
3+
# if [ -z "${CONDA_PREFIX}" ]; then
4+
# exit 0;
5+
# fi
6+
7+
# Not sure if this is necessary on UNIX?
8+
# export QT_PLUGIN_PATH=$CONDA_PREFIX\plugins
9+
10+
if [ "$CONDA_BUILD" = "1" -a "$target_platform" != "$build_platform" ]; then
11+
# ignore sourcing
12+
echo "Not activating ROS when cross-compiling";
13+
else
14+
source $CONDA_PREFIX/setup.sh
15+
fi
16+
17+
case "$OSTYPE" in
18+
darwin*) export ROS_OS_OVERRIDE="conda:osx"; export RMW_IMPLEMENTATION="rmw_cyclonedds_cpp";;
19+
linux*) export ROS_OS_OVERRIDE="conda:linux";;
20+
esac
21+
22+
export ROS_ETC_DIR=$CONDA_PREFIX/etc/ros
23+
export AMENT_PREFIX_PATH=$CONDA_PREFIX
24+
25+
# Looks unnecessary for UNIX
26+
# unset PYTHONHOME=

Diff for: bld_ament_cmake.bat

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
:: Generated by vinca http://github.com/RoboStack/vinca.
2+
:: DO NOT EDIT!
3+
setlocal EnableDelayedExpansion
4+
5+
set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"
6+
7+
:: MSVC is preferred.
8+
set CC=cl.exe
9+
set CXX=cl.exe
10+
11+
rd /s /q build
12+
mkdir build
13+
pushd build
14+
15+
:: set "CMAKE_GENERATOR=Ninja"
16+
:: We use the Visual Studio generator as a workaround for
17+
:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467
18+
:: Once those are solved, we can switch back to use Ninja
19+
set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"
20+
21+
:: PYTHON_INSTALL_DIR should be a relative path, see
22+
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
23+
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
24+
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
25+
:: python
26+
27+
:: This line is scary, but it basically assigns the output of the command inside (` and `)
28+
:: to the variable specified after DO SET
29+
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
30+
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i
31+
32+
cmake ^
33+
-G "%CMAKE_GENERATOR%" ^
34+
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
35+
-DCMAKE_BUILD_TYPE=Release ^
36+
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
37+
-DPYTHON_EXECUTABLE=%PYTHON% ^
38+
-DPython_EXECUTABLE=%PYTHON% ^
39+
-DPython3_EXECUTABLE=%PYTHON% ^
40+
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
41+
-DBUILD_SHARED_LIBS=ON ^
42+
-DBUILD_TESTING=OFF ^
43+
-DCMAKE_OBJECT_PATH_MAX=255 ^
44+
--compile-no-warning-as-error ^
45+
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
46+
%SRC_DIR%\%PKG_NAME%\src\work
47+
if errorlevel 1 exit 1
48+
49+
:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja,
50+
:: see the comment before setting the CMAKE_GENERATOR env variable
51+
cmake --build . --config Release --parallel %CPU_COUNT% --target install
52+
if errorlevel 1 exit 1

Diff for: bld_ament_python.bat

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
:: Generated by vinca http://github.com/RoboStack/vinca.
2+
:: DO NOT EDIT!
3+
setlocal
4+
5+
set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"
6+
7+
pushd %SRC_DIR%\%PKG_NAME%\src\work
8+
set "PKG_NAME_SHORT=%PKG_NAME:*ros-noetic-=%"
9+
set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%"
10+
11+
:: If there is a setup.cfg that contains install-scripts then use pip to install
12+
findstr install[-_]scripts setup.cfg
13+
if "%errorlevel%" == "0" (
14+
%PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^
15+
--prefix=%LIBRARY_PREFIX% ^
16+
--install-lib=%SP_DIR% ^
17+
--install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT%
18+
) else (
19+
%PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^
20+
--prefix=%LIBRARY_PREFIX% ^
21+
--install-lib=%SP_DIR% ^
22+
--install-scripts=%LIBRARY_PREFIX%\bin
23+
)
24+
25+
if errorlevel 1 exit 1

Diff for: bld_catkin.bat

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
:: Generated by vinca http://github.com/RoboStack/vinca.
2+
:: DO NOT EDIT!
3+
setlocal
4+
set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"
5+
6+
:: MSVC is preferred.
7+
set CC=cl.exe
8+
set CXX=cl.exe
9+
10+
:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin
11+
:: if ROS (1) is build as shared library . However, some packages are not
12+
:: passing compilation flags from CMake to other build systems (such as qmake),
13+
:: so we enable it explicitly via the CL environment variable, see
14+
:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170
15+
set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1
16+
17+
set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1"
18+
if "%PKG_NAME%" == "ros-noetic-catkin" (
19+
:: create catkin cookie to make it is a catkin workspace
20+
type NUL > %LIBRARY_PREFIX%\.catkin
21+
:: keep the workspace activation scripts (e.g., local_setup.bat)
22+
set CATKIN_BUILD_BINARY_PACKAGE_ARGS=
23+
)
24+
25+
rd /s /q build
26+
mkdir build
27+
pushd build
28+
29+
set SKIP_TESTING=ON
30+
31+
cmake ^
32+
-G "Ninja" ^
33+
--compile-no-warning-as-error ^
34+
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
35+
-DCMAKE_BUILD_TYPE=Release ^
36+
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^
37+
-DBUILD_SHARED_LIBS=ON ^
38+
-DPYTHON_EXECUTABLE=%PYTHON% ^
39+
-DPython_EXECUTABLE=%PYTHON% ^
40+
-DPython3_EXECUTABLE=%PYTHON% ^
41+
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
42+
-DBoost_USE_STATIC_LIBS=OFF ^
43+
%CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^
44+
-DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^
45+
%SRC_DIR%\%PKG_NAME%\src\work
46+
if errorlevel 1 exit 1
47+
48+
if "%PKG_NAME%" == "ros-noetic-eigenpy" (
49+
cmake --build . --config Release --target all --parallel 1
50+
if errorlevel 1 exit 1
51+
) else (
52+
cmake --build . --config Release --target all
53+
if errorlevel 1 exit 1
54+
)
55+
56+
if "%SKIP_TESTING%" == "OFF" (
57+
cmake --build . --config Release --target run_tests
58+
if errorlevel 1 exit 1
59+
)
60+
61+
cmake --build . --config Release --target install
62+
if errorlevel 1 exit 1
63+
64+
if "%PKG_NAME%" == "ros-noetic-catkin" (
65+
:: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d.
66+
:: This will allow them to be run on environment activation.
67+
for %%F in (activate deactivate) DO (
68+
if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d
69+
copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat
70+
)
71+
)
72+
73+
if "%PKG_NAME%" == "ros-noetic-ros-workspace" (
74+
:: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d.
75+
:: This will allow them to be run on environment activation.
76+
for %%F in (activate deactivate) DO (
77+
if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d
78+
copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat
79+
copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1
80+
)
81+
)

Diff for: bld_catkin_merge.bat

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
:: Generated by vinca http://github.com/RoboStack/vinca.
2+
:: DO NOT EDIT!
3+
setlocal
4+
5+
:: MSVC is preferred.
6+
set CC=cl.exe
7+
set CXX=cl.exe
8+
9+
:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin
10+
:: if ROS (1) is build as shared library . However, some packages are not
11+
:: passing compilation flags from CMake to other build systems (such as qmake),
12+
:: so we enable it explicitly via the CL environment variable, see
13+
:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170
14+
set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1
15+
16+
set CATKIN_MAKE_ISOLATED=src\ros-noetic-catkin\bin\catkin_make_isolated
17+
set CMAKE_PREFIX_PATH=%CMAKE_PREFIX_PATH:\=/%
18+
19+
%PYTHON% %CATKIN_MAKE_ISOLATED% ^
20+
--install-space %LIBRARY_PREFIX% ^
21+
--use-ninja ^
22+
--install ^
23+
-DCMAKE_BUILD_TYPE=Release ^
24+
-DBUILD_SHARED_LIBS=ON ^
25+
-DPYTHON_EXECUTABLE=%PYTHON% ^
26+
-DCATKIN_SKIP_TESTING=ON
27+
if errorlevel 1 exit 1
28+
29+
:: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d.
30+
:: This will allow them to be run on environment activation.
31+
for %%F in (activate deactivate) DO (
32+
if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d
33+
copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat
34+
)

Diff for: bld_colcon_merge.bat

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
:: Generated by vinca http://github.com/RoboStack/vinca.
2+
:: DO NOT EDIT!
3+
setlocal
4+
5+
:: MSVC is preferred.
6+
set CC=cl.exe
7+
set CXX=cl.exe
8+
9+
:: PYTHON_INSTALL_DIR should be a relative path, see
10+
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
11+
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
12+
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
13+
:: python
14+
15+
:: This line is scary, but it basically assigns the output of the command inside (` and `)
16+
:: to the variable specified after DO SET
17+
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
18+
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i
19+
20+
colcon build ^
21+
--event-handlers console_cohesion+ ^
22+
--merge-install ^
23+
--install-base %LIBRARY_PREFIX% ^
24+
--cmake-args ^
25+
--compile-no-warning-as-error ^
26+
-G Ninja ^
27+
-DCMAKE_BUILD_TYPE=Release ^
28+
-DBUILD_TESTING=OFF ^
29+
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
30+
-DPYTHON_EXECUTABLE=%PYTHON%
31+
if errorlevel 1 exit 1
32+
33+
:: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d.
34+
:: This will allow them to be run on environment activation.
35+
for %%F in (activate deactivate) DO (
36+
if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d
37+
copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat
38+
)

Diff for: build_ament_cmake.sh

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Generated by vinca http://github.com/RoboStack/vinca.
2+
# DO NOT EDIT!
3+
4+
set -eo pipefail
5+
6+
rm -rf build
7+
mkdir build
8+
cd build
9+
10+
# necessary for correctly linking SIP files (from python_qt_bindings)
11+
export LINK=$CXX
12+
13+
if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then
14+
PYTHON_EXECUTABLE=$PREFIX/bin/python
15+
PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config
16+
OSX_DEPLOYMENT_TARGET="10.15"
17+
else
18+
PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python
19+
PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config
20+
OSX_DEPLOYMENT_TARGET="11.0"
21+
fi
22+
23+
if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then
24+
export QT_HOST_PATH="$BUILD_PREFIX"
25+
else
26+
export QT_HOST_PATH="$PREFIX"
27+
fi
28+
29+
echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}"
30+
echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}"
31+
32+
export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"`
33+
echo "Using Python ${ROS_PYTHON_VERSION}"
34+
35+
# see https://github.com/conda-forge/cross-python-feedstock/issues/24
36+
if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then
37+
find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
38+
find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
39+
find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
40+
find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true
41+
fi
42+
43+
if [[ $target_platform =~ linux.* ]]; then
44+
export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1"
45+
export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1"
46+
fi;
47+
48+
# Needed for qt-gui-cpp ..
49+
if [[ $target_platform =~ linux.* ]]; then
50+
ln -s $GCC ${BUILD_PREFIX}/bin/gcc
51+
ln -s $GXX ${BUILD_PREFIX}/bin/g++
52+
fi;
53+
54+
# PYTHON_INSTALL_DIR should be a relative path, see
55+
# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
56+
# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX,
57+
# but it is not trivial to do this in bash scripting, so let's do it via python
58+
export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"`
59+
echo "Using site_packages: $PYTHON_INSTALL_DIR"
60+
61+
cmake \
62+
-G "Ninja" \
63+
-DCMAKE_INSTALL_PREFIX=$PREFIX \
64+
-DCMAKE_PREFIX_PATH=$PREFIX \
65+
-DAMENT_PREFIX_PATH=$PREFIX \
66+
-DCMAKE_INSTALL_LIBDIR=lib \
67+
-DCMAKE_BUILD_TYPE=Release \
68+
-DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \
69+
-DPython_EXECUTABLE=$PYTHON_EXECUTABLE \
70+
-DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \
71+
-DPython3_FIND_STRATEGY=LOCATION \
72+
-DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \
73+
-DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \
74+
-DSETUPTOOLS_DEB_LAYOUT=OFF \
75+
-DCATKIN_SKIP_TESTING=$SKIP_TESTING \
76+
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \
77+
-DBUILD_SHARED_LIBS=ON \
78+
-DBUILD_TESTING=OFF \
79+
-DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \
80+
-DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \
81+
--compile-no-warning-as-error \
82+
$SRC_DIR/$PKG_NAME/src/work
83+
84+
cmake --build . --config Release --target install

Diff for: build_ament_python.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Generated by vinca http://github.com/RoboStack/vinca.
2+
# DO NOT EDIT!
3+
4+
set -eo pipefail
5+
6+
pushd $SRC_DIR/$PKG_NAME/src/work
7+
8+
# If there is a setup.cfg that contains install-scripts then we should not set it here
9+
if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then
10+
# Remove e.g. ros-humble- from PKG_NAME
11+
PKG_NAME_SHORT=${PKG_NAME#*ros-noetic-}
12+
# Substitute "-" with "_"
13+
PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_}
14+
INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT"
15+
echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG"
16+
$PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt
17+
else
18+
$PYTHON -m pip install . --no-deps -vvv
19+
fi

0 commit comments

Comments
 (0)