Skip to content

Commit

Permalink
Fix breakage on Windows (#52)
Browse files Browse the repository at this point in the history
If you don't provide a %SYSTEMROOT% on Windows systems, you get an error
while initializing the random number generator.

Fixes #52.
  • Loading branch information
mgedmin committed Nov 2, 2015
1 parent 419e224 commit 90b8961
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Changelog
0.27 (unreleased)
-----------------

* Fix utter breakage on Windows, introduced in 0.26 (`issue #52
<https://github.com/mgedmin/check-manifest/issues/52>`__).


0.26 (2015-10-30)
Expand Down
7 changes: 5 additions & 2 deletions check_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,11 @@ def run(command, encoding=None, decode=True):
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)}
# setuptools (see https://github.com/mgedmin/check-manifest/issues/35).
# NB: you need to copy the parent os.environ, or at least %SYSTEMROOT%/
# %PATH% (see https://github.com/mgedmin/check-manifest/issues/52).
env = os.environ.copy()
env['PYTHONPATH'] = os.pathsep.join(sys.path)
else:
env = None
try:
Expand Down

0 comments on commit 90b8961

Please sign in to comment.