[pygobject] remove overridesdir from the .pc file and add it to the gi module
- From: John Palmieri <johnp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] remove overridesdir from the .pc file and add it to the gi module
- Date: Thu, 15 Sep 2011 19:54:57 +0000 (UTC)
commit 7e48fd6dfd86b7082c3fd35d25d9693c56c9665a
Author: John (J5) Palmieri <johnp redhat com>
Date: Thu Sep 15 15:52:18 2011 -0400
remove overridesdir from the .pc file and add it to the gi module
* having the variable in the .pc file caused issues parallel installing
for different versions of python
* putting it into the module allows us to give the correct directory
based on which version of python you run the script from
* access the var as such:
import gi
installdir = gi._overridesdir
gi/__init__.py | 2 ++
pygobject-3.0.pc.in | 10 +++++++++-
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/gi/__init__.py b/gi/__init__.py
index d4da310..e6bc06e 100644
--- a/gi/__init__.py
+++ b/gi/__init__.py
@@ -25,8 +25,10 @@ from ._gi import _API, Repository
# Force loading the GObject typelib so we have available the wrappers for
# base classes such as GInitiallyUnowned
import gi._gobject
+import os
_versions = {}
+_overridesdir = os.path.join(os.path.dirname(__file__), 'overrides')
def require_version(namespace, version):
repository = Repository.get_default()
diff --git a/pygobject-3.0.pc.in b/pygobject-3.0.pc.in
index 7b079e6..3c7af01 100644
--- a/pygobject-3.0.pc.in
+++ b/pygobject-3.0.pc.in
@@ -9,7 +9,6 @@ libdir= libdir@
# pkg-config to get this value. You might want to use this to
# install additional headers.
pygobjectincludedir=${includedir}/pygobject-3.0
-overridesdir= pyexecdir@/gi/overrides
Name: PyGObject
Description: Python bindings for GObject
@@ -17,3 +16,12 @@ Requires: gobject-2.0
Requires.private: @LIBFFI_PC@
Version: @VERSION@
Cflags: -I${pygobjectincludedir}
+
+# overridesdir has now moved to the gi module
+# third parties can access it in a python script:
+#
+# import gi
+# installdir = gi._overridesdir
+#
+# the version of python you run the script from
+# will determine the actual overrides path
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]