Skip to content

Commit

Permalink
Ugly hack for better zc.buildout support
Browse files Browse the repository at this point in the history
Fixes #35.
  • Loading branch information
mgedmin committed Oct 30, 2015
1 parent 1db0ea0 commit 00049a0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion check_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,15 @@ def run(command, encoding=None, decode=True):
"""
if not encoding:
encoding = locale.getpreferredencoding()
if command and command[0] == sys.executable:
# Workaround for zc.buildout, bootstrapped from a Python that lacks
# setuptools (see https://github.com/mgedmin/check-manifest/issues/35)
env = {'PYTHONPATH': os.pathsep.join(sys.path)}
else:
env = None
try:
pipe = subprocess.Popen(command, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
stderr=subprocess.STDOUT, env=env)
except OSError as e:
raise Failure("could not run %s: %s" % (command, e))
output = pipe.communicate()[0]
Expand Down

0 comments on commit 00049a0

Please sign in to comment.