From 91f724c57ec6c1585ccbcbda5b31301b72559b58 Mon Sep 17 00:00:00 2001 From: Roumen Petrov Date: Sat, 9 Mar 2013 23:03:35 +0200 Subject: [PATCH 2/5] MINGW: generalization of posix installation in distutils --- Lib/distutils/command/install.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py index 456511c..cc6d78f 100644 --- a/Lib/distutils/command/install.py +++ b/Lib/distutils/command/install.py @@ -266,8 +266,12 @@ class install(Command): raise DistutilsOptionError("can't combine user with prefix, " "exec_prefix/home, or install_(plat)base") + build_plat = get_platform() + posix_build = build_plat.startswith('mingw') or \ + os.name == 'posix' + # Next, stuff that's wrong (or dubious) only on certain platforms. - if os.name != "posix": + if not posix_build: if self.exec_prefix: self.warn("exec-prefix option ignored on this platform") self.exec_prefix = None @@ -282,7 +286,7 @@ class install(Command): self.dump_dirs("pre-finalize_{unix,other}") - if os.name == 'posix': + if posix_build: self.finalize_unix() else: self.finalize_other() -- 1.7.12.1