[pygobject: 12/23] setup.py: check python version and pkgconig availability before anything else
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject: 12/23] setup.py: check python version and pkgconig availability before anything else
- Date: Thu, 4 Nov 2010 22:43:35 +0000 (UTC)
commit 7d353d04892de67265bf693f591f37fd393de639
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date: Wed Nov 3 09:18:11 2010 +0100
setup.py: check python version and pkgconig availability before anything else
Signed-off-by: Dieter Verfaillie <dieterv optionexplicit be>
setup.py | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/setup.py b/setup.py
index cd27456..da881fb 100755
--- a/setup.py
+++ b/setup.py
@@ -40,6 +40,16 @@ if sys.platform != 'win32':
MIN_PYTHON_VERSION = (2, 6, 0)
+if sys.version_info[:3] < MIN_PYTHON_VERSION:
+ raise SystemExit('ERROR: Python %s or higher is required, %s found.' % (
+ '.'.join(map(str, MIN_PYTHON_VERSION)),
+ '.'.join(map(str, sys.version_info[:3]))))
+
+if not have_pkgconfig():
+ raise SystemExit('ERROR: Could not find pkg-config: '
+ 'Please check your PATH environment variable.')
+
+
MAJOR_VERSION = int(get_m4_define('pygobject_major_version'))
MINOR_VERSION = int(get_m4_define('pygobject_minor_version'))
MICRO_VERSION = int(get_m4_define('pygobject_micro_version'))
@@ -57,14 +67,6 @@ GLOBAL_MACROS += [('PYGOBJECT_MAJOR_VERSION', MAJOR_VERSION),
('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" % (
- ".".join(map(str,MIN_PYTHON_VERSION)),
- ".".join(map(str,sys.version_info[:3]))))
-
-if not have_pkgconfig():
- raise SystemExit("Error, could not find pkg-config")
-
DEFS_DIR = os.path.join('share', 'pygobject', PYGOBJECT_SUFFIX, 'defs')
INCLUDE_DIR = os.path.join('include', 'pygtk-%s' % PYGOBJECT_SUFFIX)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]