From b2f6c6dbff143d98cb50490850e280fce9435364 Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Thu, 1 Oct 2015 12:57:50 +0100 Subject: [setup.py] remove monkey-patch for distutils.msvc9compiler; try to import setuptools required by "Microsoft Visual C++ Compiler for Python 2.7" Cf. http://aka.ms/vcpython27 --- setup.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 02547ff..410808b 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,7 @@ +try: + import setuptools +except: + pass import distutils from distutils.core import setup, Extension from distutils.command.build_ext import build_ext @@ -9,19 +13,6 @@ import re CURR_DIR = os.path.abspath(os.path.dirname(os.path.realpath(__file__))) -# when compiling for Windows Python 2.7, force distutils to use Visual Studio -# 2010 instead of 2008, as the latter doesn't support c++0x -if platform.system() == 'Windows': - try: - import distutils.msvc9compiler - except distutils.errors.DistutilsPlatformError: - pass # importing msvc9compiler raises when running under MinGW - else: - orig_find_vcvarsall = distutils.msvc9compiler.find_vcvarsall - def patched_find_vcvarsall(version): - return orig_find_vcvarsall(version if version != 9.0 else 10.0) - distutils.msvc9compiler.find_vcvarsall = patched_find_vcvarsall - def get_version(): """ Return BROTLI_VERSION string as defined in 'tools/version.h' file. """ -- cgit v1.1