()
| 6 | |
| 7 | |
| 8 | def get_git_commit_number(): |
| 9 | if not os.path.exists('.git'): |
| 10 | return '0000000' |
| 11 | |
| 12 | cmd_out = subprocess.run(['git', 'rev-parse', 'HEAD'], stdout=subprocess.PIPE) |
| 13 | git_commit_number = cmd_out.stdout.decode('utf-8')[:7] |
| 14 | return git_commit_number |
| 15 | |
| 16 | |
| 17 | def make_cuda_ext(name, module, sources): |