forked from nutonomy/nuscenes-devkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
60 lines (53 loc) · 2.11 KB
/
setup.py
File metadata and controls
60 lines (53 loc) · 2.11 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
import os
import setuptools
# Read the README file
with open('README.md', 'r') as fh:
long_description = fh.read()
# Read requirements from setup directory
requirements = []
req_files = [
'setup/requirements/requirements_base.txt',
'setup/requirements/requirements_nuimages.txt',
'setup/requirements/requirements_tracking.txt'
# 'setup/requirements/requirements_prediction.txt' # Uncomment if needed
]
for req_file in req_files:
if os.path.exists(req_file):
with open(req_file) as f:
requirements += [line.strip() for line in f.read().splitlines() if line.strip() and not line.startswith('#')]
def get_dirlist(_rootdir):
dirlist = []
with os.scandir(_rootdir) as rit:
for entry in rit:
if not entry.name.startswith('.') and entry.is_dir():
dirlist.append(entry.path)
dirlist += get_dirlist(entry.path)
return dirlist
# Get subfolders recursively
rootdir = 'python-sdk'
packages = [d.replace('/', '.').replace('{}.'.format(rootdir), '') for d in get_dirlist(rootdir)]
# Filter out Python cache folders and egg-info
packages = [p for p in packages if not p.endswith('__pycache__') and not p.endswith('.egg-info')]
setuptools.setup(
name='nuscenes-devkit',
version='1.1.11',
author='Holger Caesar, Oscar Beijbom, Qiang Xu, Varun Bankiti, Alex H. Lang, Sourabh Vora, Venice Erin Liong, '
'Sergi Widjaja, Kiwoo Shin, Caglayan Dicle, Freddy Boulton, Whye Kit Fong, Asha Asvathaman, Lubing Zhou '
'et al.',
author_email='nuscenes@motional.com',
description='The official devkit of the nuScenes dataset (www.nuscenes.org).',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/nutonomy/nuscenes-devkit',
python_requires='>=3.6',
install_requires=requirements,
packages=packages,
package_dir={'': 'python-sdk'},
package_data={'': ['*.json']},
include_package_data=True,
classifiers=[
'Programming Language :: Python :: 3.6',
'Operating System :: OS Independent',
],
license='apache-2.0'
)