diff options
author | Dieter Verfaillie <dieterv@optionexplicit.be> | 2010-11-03 09:05:59 +0100 |
---|---|---|
committer | Dieter Verfaillie <dieterv@optionexplicit.be> | 2010-11-03 10:15:07 +0100 |
commit | 286364ed39953e942e24d5911519bcac2f90975a (patch) | |
tree | 97ad8a54896099a2a511f3695711c70851652da3 /setup.py | |
parent | 3f70f92904c123e6cc40929c0affd3f75d061828 (diff) | |
download | pygobject-286364ed39953e942e24d5911519bcac2f90975a.tar.gz |
setup.py: simplify sys.platform != 'win32' detection and error reporting
Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 29 |
1 files changed, 9 insertions, 20 deletions
@@ -30,20 +30,13 @@ from dsextras import GLOBAL_MACROS, GLOBAL_INC, get_m4_define, getoutput, \ PkgConfigExtension, TemplateExtension, \ BuildExt, InstallLib, InstallData -if '--yes-i-know-its-not-supported' in sys.argv: - sys.argv.remove('--yes-i-know-its-not-supported') -else: - print '*'*70 - print 'Building PyGObject using distutils is NOT SUPPORTED.' - print "It's mainly included to be able to easily build win32 installers" - print "You may continue, but only if you agree to not ask any questions" - print "To build PyGObject in a supported way, read the INSTALL file" - print - print "Build fixes are of course welcome and should be filed in bugzilla" - print '*'*70 - input = raw_input('Not supported, ok [y/N]? ') - if not input.startswith('y'): - raise SystemExit("Aborted") + +if sys.platform != 'win32': + msg = '*' * 68 + '\n' + msg += '* Building PyGObject using distutils is only supported on windows. *\n' + msg += '* To build PyGObject in a supported way, read the INSTALL file. *\n' + msg += '*' * 68 + raise SystemExit(msg) MIN_PYTHON_VERSION = (2, 6, 0) @@ -61,12 +54,8 @@ PYGOBJECT_SUFFIX_LONG = 'gtk-' + PYGOBJECT_SUFFIX GLOBAL_INC += ['gobject'] GLOBAL_MACROS += [('PYGOBJECT_MAJOR_VERSION', MAJOR_VERSION), ('PYGOBJECT_MINOR_VERSION', MINOR_VERSION), - ('PYGOBJECT_MICRO_VERSION', MICRO_VERSION)] - -if sys.platform == 'win32': - GLOBAL_MACROS.append(('VERSION', '\\"%s\\"' % VERSION)) -else: - raise SystemExit("Error: distutils build only supported on windows") + ('PYGOBJECT_MICRO_VERSION', MICRO_VERSION), + ('VERSION', '\\"%s\\"' % VERSION)] if sys.version_info[:3] < MIN_PYTHON_VERSION: raise SystemExit("Python %s or higher is required, %s found" % ( |