Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
remove overridesdir from the .pc file and add it to the gi module
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
John (J5) Palmieri committed Sep 15, 2011
1 parent beea707 commit 7e48fd6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions gi/__init__.py
Expand Up @@ -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()
Expand Down
10 changes: 9 additions & 1 deletion pygobject-3.0.pc.in
Expand Up @@ -9,11 +9,19 @@ 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
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

0 comments on commit 7e48fd6

Please sign in to comment.