[pypy-commit] pypy py3.5: make sure batfile is defined

mattip pypy.commits at gmail.com
Sun Mar 11 16:19:49 EDT 2018


Author: Matti Picus <matti.picus at gmail.com>
Branch: py3.5
Changeset: r93968:a445edc093be
Date: 2018-03-11 21:49 +0200
http://bitbucket.org/pypy/pypy/changeset/a445edc093be/

Log:	make sure batfile is defined

diff --git a/lib-python/3/distutils/msvc9compiler.py b/lib-python/3/distutils/msvc9compiler.py
--- a/lib-python/3/distutils/msvc9compiler.py
+++ b/lib-python/3/distutils/msvc9compiler.py
@@ -223,6 +223,7 @@
     that fails it falls back to the VS90COMNTOOLS env var.
     """
     vsbase = VS_BASE % version
+    batfile = 'vcvarsall.bat'
     try:
         productdir = Reg.get_value(r"%s\Setup\VC" % vsbase,
                                    "productdir")
@@ -233,7 +234,6 @@
     if not productdir or not os.path.isdir(productdir):
         toolskey = "VS%0.f0COMNTOOLS" % version
         toolsdir = os.environ.get(toolskey, None)
-        batfile = 'vcvarsall.bat'
 
         if toolsdir and os.path.isdir(toolsdir):
             if os.path.exists(os.path.join(toolsdir, 'VsDevCmd.bat')):


More information about the pypy-commit mailing list