From 0332489792f0b686b1fa6fea05e28bbf4603789a Mon Sep 17 00:00:00 2001 From: MinRK Date: Wed, 22 Jun 2011 20:58:26 -0700 Subject: [PATCH] 'install' depends on setuptools on Windows --- setup.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index e10d9aafc..39a9733ff 100755 --- a/setup.py +++ b/setup.py @@ -198,10 +198,18 @@ data_files = find_data_files() # For some commands, use setuptools. Note that we do NOT list install here! # If you want a setuptools-enhanced install, just run 'setupegg.py install' -if len(set(('develop', 'sdist', 'release', 'bdist_egg', 'bdist_rpm', +needs_setuptools = set(('develop', 'sdist', 'release', 'bdist_egg', 'bdist_rpm', 'bdist', 'bdist_dumb', 'bdist_wininst', 'install_egg_info', 'build_sphinx', 'egg_info', 'easy_install', 'upload', - )).intersection(sys.argv)) > 0: + )) +if sys.platform == 'win32': + # Depend on setuptools for install on *Windows only* + # If we get script-installation working without setuptools, + # then we can back off, but until then use it. + # See Issue #369 on GitHub for more + needs_setuptools.add('install') + +if len(needs_setuptools.intersection(sys.argv)) > 0: import setuptools # This dict is used for passing extra arguments that are setuptools