Show More
@@ -370,6 +370,10 b' def record_commit_info(pkg_dir, build_cmd=build_py):' | |||||
370 | # We write the installation commit even if it's empty |
|
370 | # We write the installation commit even if it's empty | |
371 | cfg_parser = ConfigParser() |
|
371 | cfg_parser = ConfigParser() | |
372 | cfg_parser.read(pjoin(pkg_dir, '.git_commit_info.ini')) |
|
372 | cfg_parser.read(pjoin(pkg_dir, '.git_commit_info.ini')) | |
|
373 | if not cfg_parser.has_section('commit hash'): | |||
|
374 | # just in case the ini file is empty or doesn't exist, somehow | |||
|
375 | # we don't want the next line to raise | |||
|
376 | cfg_parser.add_section('commit hash') | |||
373 | cfg_parser.set('commit hash', 'install_hash', repo_commit.decode('ascii')) |
|
377 | cfg_parser.set('commit hash', 'install_hash', repo_commit.decode('ascii')) | |
374 | out_pth = pjoin(self.build_lib, pkg_dir, '.git_commit_info.ini') |
|
378 | out_pth = pjoin(self.build_lib, pkg_dir, '.git_commit_info.ini') | |
375 | out_file = open(out_pth, 'wt') |
|
379 | out_file = open(out_pth, 'wt') |
General Comments 0
You need to be logged in to leave comments.
Login now