diff --git a/.conda/recipe.yaml b/.conda/recipe.yaml index 9ebf263b..d7fa3f2d 100644 --- a/.conda/recipe.yaml +++ b/.conda/recipe.yaml @@ -1,12 +1,16 @@ package: name: unilabos - version: 0.10.2 + version: 0.10.3 source: path: ../unilabos target_directory: unilabos build: + python: + entry_points: + - unilab = unilabos.app.main:main + - unilab-register = unilabos.app.register:main script: - set PIP_NO_INDEX= - if: win @@ -14,13 +18,13 @@ build: - copy %RECIPE_DIR%\..\MANIFEST.in %SRC_DIR% - copy %RECIPE_DIR%\..\setup.cfg %SRC_DIR% - copy %RECIPE_DIR%\..\setup.py %SRC_DIR% - - python -m pip install %SRC_DIR% + - call %PYTHON% -m pip install %SRC_DIR% - if: unix then: - cp $RECIPE_DIR/../MANIFEST.in $SRC_DIR - cp $RECIPE_DIR/../setup.cfg $SRC_DIR - cp $RECIPE_DIR/../setup.py $SRC_DIR - - python -m pip install $SRC_DIR + - $PYTHON -m pip install $SRC_DIR requirements: diff --git a/recipes/msgs/bld_ament_cmake.bat b/recipes/msgs/bld_ament_cmake.bat index 10bdee94..fe66b97f 100644 --- a/recipes/msgs/bld_ament_cmake.bat +++ b/recipes/msgs/bld_ament_cmake.bat @@ -1,6 +1,7 @@ -::Generated by vinca http://github.com/RoboStack/vinca. +:: Generated by vinca http://github.com/RoboStack/vinca. :: DO NOT EDIT! -setlocal EnableDelayedExpansion +@echo off +setlocal enabledelayedexpansion set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" @@ -16,10 +17,11 @@ pushd build :: try to fix long paths issues by using default generator set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" -set "SP_DIR_FORWARDSLASHES=%SP_DIR:\=/%" set PYTHON="%PREFIX%\python.exe" -set PYTHON=%PYTHON:\=\\% +set PYTHON=%PYTHON:\=/% +set SP_DIR="..\Lib\site-packages" +set SP_DIR=%SP_DIR:\=/% cmake ^ -G "%CMAKE_GENERATOR%" ^ @@ -33,12 +35,10 @@ cmake ^ -DBUILD_SHARED_LIBS=ON ^ -DBUILD_TESTING=OFF ^ -DCMAKE_OBJECT_PATH_MAX=255 ^ - -DPYTHON_INSTALL_DIR=%SP_DIR_FORWARDSLASHES% ^ + -DPYTHON_INSTALL_DIR=%SP_DIR% ^ --compile-no-warning-as-error ^ %SRC_DIR%\src - if errorlevel 1 exit 1 -cmake --build . --config Release --target install - -if errorlevel 1 exit 1 +cmake --build . --config Release --target install -j8 +if errorlevel 1 exit 1 \ No newline at end of file diff --git a/recipes/msgs/build_ament_cmake.sh b/recipes/msgs/build_ament_cmake.sh index 91c9f0fe..d04696f9 100644 --- a/recipes/msgs/build_ament_cmake.sh +++ b/recipes/msgs/build_ament_cmake.sh @@ -56,7 +56,6 @@ cmake \ -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ - -DPython3_FIND_STRATEGY=LOCATION \ -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ -DSETUPTOOLS_DEB_LAYOUT=OFF \ @@ -68,4 +67,4 @@ cmake \ --compile-no-warning-as-error \ $SRC_DIR/src -cmake --build . --config Release --target install +cmake --build . --config Release --target install -j8 \ No newline at end of file diff --git a/recipes/msgs/recipe.yaml b/recipes/msgs/recipe.yaml index b3db365b..85f648cd 100644 --- a/recipes/msgs/recipe.yaml +++ b/recipes/msgs/recipe.yaml @@ -1,6 +1,6 @@ package: name: ros-humble-unilabos-msgs - version: 0.10.2 + version: 0.10.3 source: path: ../../unilabos_msgs target_directory: src @@ -23,14 +23,14 @@ about: requirements: build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - python ==3.11.11 + - numpy - if: build_platform != target_platform then: - pkg-config - - python ==3.11.11 - cross-python_${{ target_platform }} - - numpy - - ${{ compiler('cxx') }} - - ${{ compiler('c') }} - if: linux and x86_64 then: - sysroot_linux-64 ==2.17 diff --git a/recipes/unilabos/recipe.yaml b/recipes/unilabos/recipe.yaml index 0eb739b6..33448231 100644 --- a/recipes/unilabos/recipe.yaml +++ b/recipes/unilabos/recipe.yaml @@ -1,6 +1,6 @@ package: name: unilabos - version: "0.10.2" + version: "0.10.3" source: path: ../.. diff --git a/setup.py b/setup.py index 346907b2..d3282041 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ package_name = 'unilabos' setup( name=package_name, - version='0.10.2', + version='0.10.3', packages=find_packages(), include_package_data=True, install_requires=['setuptools'], diff --git a/unilabos/app/register.py b/unilabos/app/register.py index 2509e0e6..6fa570d2 100644 --- a/unilabos/app/register.py +++ b/unilabos/app/register.py @@ -18,6 +18,11 @@ def register_devices_and_resources(mqtt_client, lab_registry): mqtt_client.publish_registry(device_info["id"], device_info, False) logger.debug(f"[UniLab Register] 注册设备: {device_info['id']}") + # # 注册资源信息 + # for resource_info in lab_registry.obtain_registry_resource_info(): + # mqtt_client.publish_registry(resource_info["id"], resource_info, False) + # logger.debug(f"[UniLab Register] 注册资源: {resource_info['id']}") + # 注册资源信息 - 使用HTTP方式 from unilabos.app.web.client import http_client diff --git a/unilabos_msgs/package.xml b/unilabos_msgs/package.xml index c4ee99ca..4cea3066 100644 --- a/unilabos_msgs/package.xml +++ b/unilabos_msgs/package.xml @@ -2,7 +2,7 @@ unilabos_msgs - 0.10.2 + 0.10.3 ROS2 Messages package for unilabos devices Junhan Chang MIT