Have pbr egg_info.writer check PBR is enabled

PBR is currently creating a pbr.json for any install originating from a
git tree as pbr_json is an entry point for egg_info.writers.  If pbr is
not set to True in setup() we now exit before doing any work.

Change-Id: Ia37e37c22c2396f6a10aa2075ea8c501e571fee3
Closes-Bug: 1483067
This commit is contained in:
Sachi King 2015-08-27 15:52:03 +10:00
parent 1e05037c2a
commit 8047f2feaf
1 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,8 @@ from pbr import git
def write_pbr_json(cmd, basename, filename):
if not cmd.distribution.pbr:
return
git_dir = git._run_git_functions()
if not git_dir:
return