Skip to content

Commit

Permalink
Merge pull request #74 from liufang-robot/master
Browse files Browse the repository at this point in the history
Change to pylebai
  • Loading branch information
liufang-robot authored Jun 4, 2024
2 parents 9710bd1 + 6a19ef1 commit 233331e
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 31 deletions.
42 changes: 18 additions & 24 deletions .github/workflows/windows_python_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
# - 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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmake/python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand Down
2 changes: 1 addition & 1 deletion cmake/python2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand Down
2 changes: 1 addition & 1 deletion doc/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```
Expand Down
4 changes: 2 additions & 2 deletions examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 233331e

Please sign in to comment.