[pygtk] pygtk_postinstall.py: remove pygtk-2.0.pc treatment from postinstall as pkg-config on windows figure



commit 4aad94e9d68375e62d385ffce1f062763710cf37
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date:   Wed Nov 3 11:26:03 2010 +0100

    pygtk_postinstall.py: remove pygtk-2.0.pc treatment from postinstall as pkg-config on windows figures out the correct prefix at runtime

 pygtk_postinstall.py |   36 +++---------------------------------
 1 files changed, 3 insertions(+), 33 deletions(-)
---
diff --git a/pygtk_postinstall.py b/pygtk_postinstall.py
index f471ca0..7651179 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')



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]