Skip to content

Commit 7d9fc60

Browse files
CPD
1 parent 84ee378 commit 7d9fc60

File tree

687 files changed

+80352
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

687 files changed

+80352
-0
lines changed

pcdet/__init__.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import subprocess
2+
from pathlib import Path
3+
4+
from .version import __version__
5+
6+
__all__ = [
7+
'__version__'
8+
]
9+
10+
11+
def get_git_commit_number():
12+
if not (Path(__file__).parent / '../.git').exists():
13+
return '0000000'
14+
15+
cmd_out = subprocess.run(['git', 'rev-parse', 'HEAD'], stdout=subprocess.PIPE)
16+
git_commit_number = cmd_out.stdout.decode('utf-8')[:7]
17+
return git_commit_number
18+
19+
20+
script_version = get_git_commit_number()
21+
22+
23+
if script_version not in __version__:
24+
__version__ = __version__ + '+py%s' % script_version
646 Bytes
Binary file not shown.
652 Bytes
Binary file not shown.
671 Bytes
Binary file not shown.
671 Bytes
Binary file not shown.
2.38 KB
Binary file not shown.
2.37 KB
Binary file not shown.
2.4 KB
Binary file not shown.
174 Bytes
Binary file not shown.
178 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)