-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
42 lines (38 loc) · 1.53 KB
/
setup.py
File metadata and controls
42 lines (38 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import os
from setuptools import setup, find_packages
def find_data_files(package_dir, data_dirs):
data_files = []
for d in data_dirs:
# Walk through the data directory
for root, dirs, files in os.walk(os.path.join(package_dir, d)):
for f in files:
# Get the path relative to the package directory
data_files.append(os.path.join(root, f).replace(package_dir + os.sep, ''))
return data_files
package_name = 'openrd'
if not os.path.exists(package_name):
os.makedirs(package_name)
if not os.path.exists(os.path.join(package_name, '__init__.py')):
with open(os.path.join(package_name, '__init__.py'), 'w') as f:
f.write("# This file makes this a Python package.\n")
# Find all the data files
data_files = find_data_files(package_name, ['urdf', 'meshes', 'mjcf'])
setup(
name=package_name,
version="1.0.0",
author="Synria Robotics",
author_email="support@synriarobotics.ai",
description="URDF and MJCF robot description files for open source robot platforms.",
long_description=open('README.md').read(),
long_description_content_type="text/markdown",
url="https://github.com/Synria-Robotics/Open-robot-descriptions",
# Find the dummy package we created
packages=find_packages(),
# Tell setuptools to include the non-Python files
package_data={
package_name: ['urdf/**/*', 'meshes/**/*', 'mjcf/**/*']
},
include_package_data=True,
keywords="robotics, urdf, mjcf, robot-description",
python_requires=">=3.7",
)