Fixed python compatibility. Added requirements.txt

This commit is contained in:
MikiTwenty 2024-05-24 14:47:09 +02:00
parent d58398819a
commit b997ee185f
4 changed files with 26 additions and 18 deletions

View File

@ -3,7 +3,7 @@ unitree_sdk2 python 接口
# 安装 # 安装
## 依赖 ## 依赖
- python>=3.8 - python>=3.8,<3.11
- cyclonedds==0.10.2 - cyclonedds==0.10.2
- numpy - numpy
- opencv-python - opencv-python

View File

@ -3,7 +3,7 @@ Python interface for unitree sdk2
# Installation # Installation
## Dependencies ## Dependencies
- Python >= 3.8 - Python >= 3.8, < 3.11
- cyclonedds == 0.10.2 - cyclonedds == 0.10.2
- numpy - numpy
- opencv-python - opencv-python

4
requirements.txt Normal file
View File

@ -0,0 +1,4 @@
numpy
typeguard
opencv-python
cyclonedds==0.10.2

View File

@ -1,16 +1,20 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
setup(name='unitree_sdk2py',
def load_requirements(filename:str='requirements.txt') -> None:
with open(filename, 'r') as file:
return [line.strip() for line in file if line and not line.startswith("#")]
requirements = load_requirements()
setup(
name='unitree_sdk2py',
version='1.0.0', version='1.0.0',
author='Unitree', author='Unitree',
author_email='unitree@unitree.com', author_email='unitree@unitree.com',
license="BSD-3-Clause", license="BSD-3-Clause",
packages=find_packages(), packages=find_packages(),
description='Unitree robot sdk version 2 for python', description='Unitree robot sdk version 2 for python',
python_requires='>=3.8', python_requires='>=3.8,<3.11',
install_requires=[ install_requires=requirements
"cyclonedds==0.10.2",
"numpy",
"opencv-python",
],
) )