summaryrefslogtreecommitdiffstats
path: root/openstack
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-07-13 15:13:44 +0000
committerGerrit Code Review <review@openstack.org>2012-07-13 15:13:44 +0000
commite2e8e4851d30572d301863a81a1c7b8411b19951 (patch)
tree7024c06c72ef587467f54cf7811fa39c490b43f8 /openstack
parent5a21c63033be67a1f46e788c43a36b9dfa0094f2 (diff)
parent1fc2abc1726e4e233b4ff5fb9dff415acd8b9a4b (diff)
downloadoslo-e2e8e4851d30572d301863a81a1c7b8411b19951.tar.gz
oslo-e2e8e4851d30572d301863a81a1c7b8411b19951.tar.xz
oslo-e2e8e4851d30572d301863a81a1c7b8411b19951.zip
Merge "Add SKIP_GENERATE_AUTHORS option to setup.py"
Diffstat (limited to 'openstack')
-rw-r--r--openstack/common/setup.py26
1 files changed, 15 insertions, 11 deletions
diff --git a/openstack/common/setup.py b/openstack/common/setup.py
index 48601ea..59f255d 100644
--- a/openstack/common/setup.py
+++ b/openstack/common/setup.py
@@ -195,17 +195,21 @@ def generate_authors():
jenkins_email = 'jenkins@review.openstack.org'
old_authors = 'AUTHORS.in'
new_authors = 'AUTHORS'
- if os.path.isdir('.git'):
- # don't include jenkins email address in AUTHORS file
- git_log_cmd = ("git log --format='%aN <%aE>' | sort -u | "
- "grep -v " + jenkins_email)
- changelog = _run_shell_command(git_log_cmd)
- mailmap = parse_mailmap()
- with open(new_authors, 'w') as new_authors_fh:
- new_authors_fh.write(canonicalize_emails(changelog, mailmap))
- if os.path.exists(old_authors):
- with open(old_authors, "r") as old_authors_fh:
- new_authors_fh.write('\n' + old_authors_fh.read())
+ if not os.getenv('SKIP_GENERATE_AUTHORS'):
+ if os.path.isdir('.git'):
+ # don't include jenkins email address in AUTHORS file
+ git_log_cmd = ("git log --format='%aN <%aE>' | sort -u | "
+ "grep -v " + jenkins_email)
+ changelog = _run_shell_command(git_log_cmd)
+ mailmap = parse_mailmap()
+ with open(new_authors, 'w') as new_authors_fh:
+ new_authors_fh.write(canonicalize_emails(changelog, mailmap))
+ if os.path.exists(old_authors):
+ with open(old_authors, "r") as old_authors_fh:
+ new_authors_fh.write('\n' + old_authors_fh.read())
+ else:
+ open(new_authors, 'w').close()
+
_rst_template = """%(heading)s
%(underline)s