diff options
author | Dieter Verfaillie <dieterv@optionexplicit.be> | 2010-11-03 11:26:03 +0100 |
---|---|---|
committer | Dieter Verfaillie <dieterv@optionexplicit.be> | 2010-11-03 11:26:03 +0100 |
commit | 4aad94e9d68375e62d385ffce1f062763710cf37 (patch) | |
tree | e1fef34ad8cef95612cef3d558b534a8c915846e /pygtk_postinstall.py | |
parent | 1b7915c3af591d2875d9865d87804fc8fe7d259d (diff) | |
download | pygtk-4aad94e9d68375e62d385ffce1f062763710cf37.tar.gz |
pygtk_postinstall.py: remove pygtk-2.0.pc treatment from postinstall as pkg-config on windows figures out the correct prefix at runtime
Diffstat (limited to 'pygtk_postinstall.py')
-rw-r--r-- | pygtk_postinstall.py | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/pygtk_postinstall.py b/pygtk_postinstall.py index f471ca03..7651179b 100644 --- a/pygtk_postinstall.py +++ b/pygtk_postinstall.py @@ -1,39 +1,9 @@ +# -*- coding: utf-8 -*- -"""pygtk is now installed on your machine. -Local configuration files were successfully updated.""" - -import os, os.path, re, sys -import distutils.sysconfig -import distutils.file_util -import distutils.errors - -pkgconfig_file = os.path.normpath( - os.path.join(sys.prefix, - 'lib/pkgconfig/pygtk-2.0.pc')) - -prefix_pattern=re.compile("^prefix=.*") -exec_pattern=re.compile("^exec\s.*") -codegendir_pattern=re.compile("^codegendir=.*") -version_pattern=re.compile("Version: ([0-9]+\.[0-9]+\.[0-9]+)") - -def replace_prefix(s): - if prefix_pattern.match(s): - s='prefix='+sys.prefix.replace("\\","/")+'\n' - if exec_pattern.match(s): - s=('exec '+sys.prefix+'\\python.exe '+ - '$codegendir/codegen.py \"$@\"\n').replace("\\","/") - if codegendir_pattern.match(s): - s=('codegendir=' - +distutils.sysconfig.get_python_lib().replace("\\","/")+ - '/gtk-2.0/codegen' + '\n') - return s +import sys if len(sys.argv) == 2: if sys.argv[1] == "-install": - # fixup the pkgconfig file - lines=open(pkgconfig_file).readlines() - open(pkgconfig_file, 'w').writelines(map(replace_prefix,lines)) - print __doc__ - + print ('pygtk is now installed on your machine.\n') |