-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
61 lines (55 loc) · 2.12 KB
/
Copy pathsetup.py
File metadata and controls
61 lines (55 loc) · 2.12 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
from setuptools import find_packages, setup
import os
from glob import glob
package_name = 'vision3D'
# Function to collect all files recursively
def collect_files_recursively(directory):
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
filepath = os.path.join(path, filename)
paths.append(filepath)
return paths
# Collect all model files recursively
model_files = collect_files_recursively('vision3D/finetuned_model')
# Create data_files list
data_files = [
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
(os.path.join('share', package_name, 'launch'), glob('launch/*.launch.py')),
]
# Add all files from finetuned_model recursively, preserving directory structure
for filepath in model_files:
# Get the relative path to maintain directory structure in the share folder
relative_path = os.path.dirname(filepath.replace('vision3D/', ''))
target_path = os.path.join('share', package_name, relative_path)
data_files.append((target_path, [filepath]))
setup(
name=package_name,
version='0.0.0',
packages=find_packages(exclude=['test']),
package_data={
package_name: ['finetuned_model/*']
},
include_package_data=True,
data_files=data_files,
install_requires=['setuptools'],
zip_safe=True,
maintainer='fire',
maintainer_email='lord.daniel.w@gmail.com',
description='TODO: Package description',
license='TODO: License declaration',
tests_require=['pytest'],
entry_points={
'console_scripts': [
'img_pub = vision3D.img_pub:main',
'image_to_laser = vision3D.image_to_laser:main',
'obstacle_detection = vision3D.obstacle_detection:main',
'img_serve = vision3D.img_serve:main',
'intensity_filter = vision3D.intensity_filter:main',
'lane_segmentation_to_pointcloud = vision3D.lane_segmentation_to_pointcloud:main',
'test_img_pub = vision3D.test_img_pub:main',
],
},
)