diff options
author | Cosimo Lupo <cosimo.lupo@daltonmaag.com> | 2015-10-01 12:57:50 +0100 |
---|---|---|
committer | Cosimo Lupo <cosimo.lupo@daltonmaag.com> | 2015-10-05 11:06:18 +0100 |
commit | b2f6c6dbff143d98cb50490850e280fce9435364 (patch) | |
tree | 22c2c51f9ab9fd83207e2c51aad8afbd784a1dc5 /setup.py | |
parent | ea71ae20a9059303d7f70df479a144bb9c3003e2 (diff) | |
download | brotli-b2f6c6dbff143d98cb50490850e280fce9435364.zip brotli-b2f6c6dbff143d98cb50490850e280fce9435364.tar.gz brotli-b2f6c6dbff143d98cb50490850e280fce9435364.tar.bz2 |
[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
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 17 |
1 files changed, 4 insertions, 13 deletions
@@ -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. """ |