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 @@ # 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