[pygobject] Fix build on windows
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Fix build on windows
- Date: Sat, 16 Oct 2010 05:30:57 +0000 (UTC)
commit 239ff961778e4e1587404d8a70dfbe8630ab0623
Author: John Stowers <john stowers gmail com>
Date: Sat Oct 16 17:34:50 2010 +1300
Fix build on windows
gi/pygi-foreign.c | 5 ++++-
gi/pygi.h | 5 ++++-
setup.py | 4 ++--
3 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/gi/pygi-foreign.c b/gi/pygi-foreign.c
index f80b43c..75d5bb9 100644
--- a/gi/pygi-foreign.c
+++ b/gi/pygi-foreign.c
@@ -22,10 +22,13 @@
* IN THE SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "pygi-foreign.h"
#include "pygi-foreign-gvariant.h"
-#include <config.h>
#include <girepository.h>
typedef struct {
diff --git a/gi/pygi.h b/gi/pygi.h
index 1d3d686..03f71a4 100644
--- a/gi/pygi.h
+++ b/gi/pygi.h
@@ -22,8 +22,11 @@
#ifndef __PYGI_H__
#define __PYGI_H__
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#define NO_IMPORT_PYGOBJECT
-#include <config.h>
#include <pygobject.h>
#if ENABLE_INTROSPECTION
diff --git a/setup.py b/setup.py
index 0999c00..2f5906d 100755
--- a/setup.py
+++ b/setup.py
@@ -51,7 +51,7 @@ GLOBAL_MACROS += [('PYGOBJECT_MAJOR_VERSION', MAJOR_VERSION),
('PYGOBJECT_MICRO_VERSION', MICRO_VERSION)]
if sys.platform == 'win32':
- GLOBAL_MACROS.append(('VERSION', '"""%s"""' % VERSION))
+ GLOBAL_MACROS.append(('VERSION', '\\"%s\\"' % VERSION))
else:
raise SystemExit("Error: distutils build only supported on windows")
@@ -139,7 +139,7 @@ gobject = PkgConfigExtension(name='gobject._gobject',
pkc_name='gobject-2.0',
pkc_version=GLIB_REQUIRED,
pygobject_pkc=None,
- include_dirs=['glib'],
+ include_dirs=['glib','gi'],
libraries=['pyglib'],
sources=['gobject/gobjectmodule.c',
'gobject/pygboxed.c',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]