From 81dabe3c5887b06db1926b6bccbe5ab9f9b96e93 Mon Sep 17 00:00:00 2001 From: liufang Date: Tue, 4 Jun 2024 07:08:34 +0000 Subject: [PATCH] feat: change to pylebai --- .github/workflows/windows_python_release.yml | 42 +++++++++----------- CMakeLists.txt | 2 +- Doxyfile | 2 +- cmake/python.cmake | 2 +- cmake/python2.cmake | 2 +- doc/python.md | 2 +- examples/example.py | 4 +- 7 files changed, 25 insertions(+), 31 deletions(-) diff --git a/.github/workflows/windows_python_release.yml b/.github/workflows/windows_python_release.yml index d02a3fb..e20f246 100644 --- a/.github/workflows/windows_python_release.yml +++ b/.github/workflows/windows_python_release.yml @@ -89,28 +89,22 @@ jobs: run: cmake --build build --config release - name: Upload Pypi run: twine upload --skip-existing -u __token__ -p ${{ secrets.PYLEBAI }} build/python/dist/*.whl - windows_cp312_release: - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: '3.12' - - name: Check cmake - run: cmake --version - - name: Install python-dev-tools - run: python.exe -m pip install python-dev-tools setuptools wheel twine markdown + # windows_cp312_release: + # runs-on: windows-latest + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # - uses: actions/setup-python@v4 + # with: + # python-version: '3.12' + # - name: Check cmake + # run: cmake --version + # - name: Install python-dev-tools + # run: python.exe -m pip install python-dev-tools setuptools wheel twine markdown - - name: CMake configure - run: cmake -S. -Bbuild -G "Visual Studio 17 2022" -DBUILD_PYTHON=ON -DBUILD_DOCUMENTATION=OFF - - name: CMake build - run: cmake --build build --config release - - name: Upload Pypi - run: twine upload --skip-existing -u __token__ -p ${{ secrets.PYLEBAI2024 }} build/python/dist/*.whl - - # pypy3.8 - # - name: Publish package - # uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + # - name: CMake configure + # run: cmake -S. -Bbuild -G "Visual Studio 17 2022" -DBUILD_PYTHON=ON -DBUILD_DOCUMENTATION=OFF + # - name: CMake build + # run: cmake --build build --config release + # - name: Upload Pypi + # run: twine upload --skip-existing -u __token__ -p ${{secrets.PYLEBAI2024}} build/python/dist/*.whl diff --git a/CMakeLists.txt b/CMakeLists.txt index fa3b5df..b1c3121 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ if (POLICY CMP0135) cmake_policy(SET CMP0135 NEW) endif() -project(lebai VERSION 1.1.19 LANGUAGES CXX) +project(lebai VERSION 1.1.20 LANGUAGES CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") diff --git a/Doxyfile b/Doxyfile index 637eef7..c3e73d5 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "lebai sdk" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.1.19 +PROJECT_NUMBER = 1.1.20 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/cmake/python.cmake b/cmake/python.cmake index 498d857..9b0616d 100755 --- a/cmake/python.cmake +++ b/cmake/python.cmake @@ -100,7 +100,7 @@ function(search_python_internal_module) endif() endfunction() -set(PYTHON_PROJECT lebai) +set(PYTHON_PROJECT pylebai) set(PYTHON_PROJECT_DIR ${PROJECT_BINARY_DIR}/python/${PYTHON_PROJECT}) message(STATUS "Python project build path: ${PYTHON_PROJECT_DIR}") diff --git a/cmake/python2.cmake b/cmake/python2.cmake index 741b7e6..32ef277 100644 --- a/cmake/python2.cmake +++ b/cmake/python2.cmake @@ -99,7 +99,7 @@ function(search_python_internal_module) endif() endfunction() -set(PYTHON_PROJECT lebai) +set(PYTHON_PROJECT pylebai) set(PYTHON_PROJECT_DIR ${PROJECT_BINARY_DIR}/python/${PYTHON_PROJECT}) message(STATUS "Python project build path: ${PYTHON_PROJECT_DIR}") diff --git a/doc/python.md b/doc/python.md index da5f04d..445e2e9 100755 --- a/doc/python.md +++ b/doc/python.md @@ -44,7 +44,7 @@ sudo pip3 uninstall pylebai 安装完成后可以直接使用lebai包。 ```python -from lebai import l_master +from pylebai import l_master robot = l_master.Robot("172.17.0.5",True) robot.movej({"j1": 1.0,"j2": -1.0471975511965976,"j3": 1.3962634015954636,"j4": -0.17453292519943295,"j5": -1.0471975511965976,"j6": 0.0},1.0,1.0,0.0,0.0) ``` diff --git a/examples/example.py b/examples/example.py index 92d791d..ff44ba6 100644 --- a/examples/example.py +++ b/examples/example.py @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -from lebai import zeroconf +from pylebai import zeroconf ## Try to find the l_master d = zeroconf.Discovery() controllers = d.resolve() ## Robot instance -from lebai import l_master +from pylebai import l_master import time robot = l_master.Robot(controllers[0].ip_address) time.sleep(2)