summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2010-11-03 10:49:15 +0100
committerDieter Verfaillie <dieterv@optionexplicit.be>2010-11-03 10:49:15 +0100
commitad653fae4a03ecbffe24b33a6cabf11b3098888b (patch)
treec6ca05699543e40ad5eb52693b8518cd38f73d55 /setup.py
parent8bc2463cca8aea8cbd69895e37abb11cd616778b (diff)
downloadpygtk-ad653fae4a03ecbffe24b33a6cabf11b3098888b.tar.gz
setup.py: simplify sys.platform != 'win32' detection and error reporting
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py33
1 files changed, 11 insertions, 22 deletions
diff --git a/setup.py b/setup.py
index 64132120..0d62b006 100755
--- a/setup.py
+++ b/setup.py
@@ -26,20 +26,13 @@ from dsextras import get_m4_define, getoutput, have_pkgconfig, \
PkgConfigExtension, Template, TemplateExtension
-if '--yes-i-know-its-not-supported' in sys.argv:
- sys.argv.remove('--yes-i-know-its-not-supported')
-else:
- print '*'*70
- print 'Building PyGTK 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 PyGTK 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")
+# Check for windows platform
+if sys.platform != 'win32':
+ msg = '*' * 68 + '\n'
+ msg += '* Building PyGTK using distutils is only supported on windows. *\n'
+ msg += '* To build PyGTK in a supported way, read the INSTALL file. *\n'
+ msg += '*' * 68
+ raise SystemExit(msg)
MIN_PYTHON_VERSION = (2, 6, 0)
@@ -63,14 +56,10 @@ PYGTK_SUFFIX_LONG = 'gtk-' + PYGTK_SUFFIX
GLOBAL_INC += ['.', 'gtk']
GLOBAL_MACROS += [('PYGTK_MAJOR_VERSION', MAJOR_VERSION),
('PYGTK_MINOR_VERSION', MINOR_VERSION),
- ('PYGTK_MICRO_VERSION', MICRO_VERSION)]
-
-if sys.platform == 'win32':
- GLOBAL_MACROS.append(('VERSION', '\\"%s\\"' % VERSION))
- GLOBAL_MACROS.append(('PLATFORM_WIN32',1))
- GLOBAL_MACROS.append(('HAVE_BIND_TEXTDOMAIN_CODESET',1))
-else:
- raise SystemExit("Error: distutils build only supported on windows")
+ ('PYGTK_MICRO_VERSION', MICRO_VERSION),
+ ('VERSION', '\\"%s\\"' % VERSION),
+ ('PLATFORM_WIN32',1),
+ ('HAVE_BIND_TEXTDOMAIN_CODESET',1)]
if sys.version_info[:3] < MIN_PYTHON_VERSION:
raise SystemExit("Python %s or higher is required, %s found" % (