From 90b89611cd1d28d15748825dac03f8871a6a4c57 Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Mon, 2 Nov 2015 10:18:09 +0200 Subject: [PATCH] Fix breakage on Windows (#52) If you don't provide a %SYSTEMROOT% on Windows systems, you get an error while initializing the random number generator. Fixes #52. --- CHANGES.rst | 2 ++ check_manifest.py | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 9984dc9..b879e60 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,8 @@ Changelog 0.27 (unreleased) ----------------- +* Fix utter breakage on Windows, introduced in 0.26 (`issue #52 + `__). 0.26 (2015-10-30) diff --git a/check_manifest.py b/check_manifest.py index c5f5a48..8b1d1d7 100755 --- a/check_manifest.py +++ b/check_manifest.py @@ -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: