[pygobject: 20/23] pygobject_postinstall.py: remove pygobject-2.0.pc treatment from postinstall as pkg-config on window



commit 8cb3f2e78161639c568110aad6a807dcf59f3ae8
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date:   Wed Nov 3 09:35:52 2010 +0100

    pygobject_postinstall.py: remove pygobject-2.0.pc treatment from postinstall as pkg-config on windows figures out the correct prefix at runtime
    
    Signed-off-by: Dieter Verfaillie <dieterv optionexplicit be>

 pygobject_postinstall.py |   26 +++-----------------------
 1 files changed, 3 insertions(+), 23 deletions(-)
---
diff --git a/pygobject_postinstall.py b/pygobject_postinstall.py
index c0b7d49..bd546bf 100644
--- a/pygobject_postinstall.py
+++ b/pygobject_postinstall.py
@@ -1,29 +1,9 @@
 # -*- coding: utf-8 -*-
 
-"""pygobject is now installed on your machine.
 
-Local configuration files were successfully updated."""
+import sys
 
-import os, re, sys
-
-pkgconfig_file = os.path.normpath(
-    os.path.join(sys.prefix,
-                 'lib/pkgconfig/pygobject-2.0.pc'))
-
-prefix_pattern=re.compile("^prefix=.*")
-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'
-    s=s.replace("@DATADIR@",
-                os.path.join(sys.prefix,'share').replace("\\","/"))
-    
-    return s
 
 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__
+    if sys.argv[1] == '-install':
+        print ('pygobject is now installed on your machine.\n')



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