Skip to content

Commit 73b7a2b

Browse files
committed
Add build files 2024-06-23-1101
1 parent e8b9523 commit 73b7a2b

File tree

710 files changed

+48746
-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.

710 files changed

+48746
-0
lines changed

.github/workflows/osx.yml

+1,280
Large diffs are not rendered by default.

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"

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"

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=

bld_ament_cmake.bat

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
17+
:: try to fix long paths issues by using default generator
18+
set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"
19+
20+
:: PYTHON_INSTALL_DIR should be a relative path, see
21+
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
22+
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
23+
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
24+
:: python
25+
26+
:: This line is scary, but it basically assigns the output of the command inside (` and `)
27+
:: to the variable specified after DO SET
28+
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
29+
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']))"`) DO SET PYTHON_INSTALL_DIR=%%i
30+
31+
cmake ^
32+
-G "%CMAKE_GENERATOR%" ^
33+
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
34+
-DCMAKE_BUILD_TYPE=Release ^
35+
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
36+
-DPYTHON_EXECUTABLE=%PYTHON% ^
37+
-DPython_EXECUTABLE=%PYTHON% ^
38+
-DPython3_EXECUTABLE=%PYTHON% ^
39+
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
40+
-DBUILD_SHARED_LIBS=ON ^
41+
-DBUILD_TESTING=OFF ^
42+
-DCMAKE_OBJECT_PATH_MAX=255 ^
43+
--compile-no-warning-as-error ^
44+
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
45+
%SRC_DIR%\%PKG_NAME%\src\work
46+
if errorlevel 1 exit 1
47+
48+
cmake --build . --config Release --target install
49+
if errorlevel 1 exit 1

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-jazzy-=%"
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

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-jazzy-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-jazzy-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-jazzy-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-jazzy-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+
)

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-jazzy-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+
)

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']))"`) 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+
)

build_ament_cmake.sh

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

build_ament_python.sh

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

0 commit comments

Comments
 (0)