forked from PJLab-ADG/OpenPCSeg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
32 lines (26 loc) · 892 Bytes
/
setup.py
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
import os
import subprocess
from setuptools import setup
def get_git_commit_number():
if not os.path.exists('.git'):
return '0000000'
cmd_out = subprocess.run(['git', 'rev-parse', 'HEAD'], stdout=subprocess.PIPE)
git_commit_number = cmd_out.stdout.decode('utf-8')[:7]
return git_commit_number
def write_version_to_file(version, target_file):
with open(target_file, 'w') as f:
print('__version__ = "%s"' % version, file=f)
if __name__ == '__main__':
version = '1.0.0+%s' % get_git_commit_number()
write_version_to_file(version, '__version__')
setup(
name='pcseg',
version=version,
description='PCSeg: Open Source Point Cloud Segmentation Toolbox and Benchmark',
install_requires=[
'tqdm',
],
author='PJLAB-ADG',
license='Apache License',
packages=['pcseg']
)