[pygobject: 19/23] pygobject_postinstall.py: remove shortcut creation



commit 63167574df53eb481cc11b6a097b2bfe7d5747f5
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date:   Wed Nov 3 09:34:38 2010 +0100

    pygobject_postinstall.py: remove shortcut creation
    
    Signed-off-by: Dieter Verfaillie <dieterv optionexplicit be>

 pygobject_postinstall.py |   35 +----------------------------------
 1 files changed, 1 insertions(+), 34 deletions(-)
---
diff --git a/pygobject_postinstall.py b/pygobject_postinstall.py
index 0b66773..c0b7d49 100644
--- a/pygobject_postinstall.py
+++ b/pygobject_postinstall.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 
 """pygobject is now installed on your machine.
 
@@ -20,43 +21,9 @@ def replace_prefix(s):
     
     return s
 
-def get_doc_url(pkgconfig_file, base_url):
-    try:
-        f = open(pkgconfig_file).read()
-        ver = version_pattern.search(f).groups()[0]
-        majv,minv,micv = ver.split('.')
-        doc_url = "%s/%s.%s/" % (base_url,majv,minv)
-    except:
-        doc_url = base_url + "/stable/"
-    return doc_url
-
-# TODO : Check that shortcuts are created system-wide when the user
-# has admin rights (hint: see pywin32 postinstall)
-def create_shortcuts():
-    progs_folder= get_special_folder_path("CSIDL_COMMON_PROGRAMS")
-    site_packages_dir = os.path.join(sys.prefix , 'lib','site-packages')
-   
-    pygtk_shortcuts = os.path.join(progs_folder, 'PyGTK')
-    if not os.path.isdir(pygtk_shortcuts):
-        os.mkdir(pygtk_shortcuts)
-
-    # link to specific documentation version by parsing the
-    # pkgconfig file
-    doc_url = get_doc_url(pkgconfig_file,
-                          "http://library.gnome.org/devel/pygobject";)
-    pygobject_doc_link=os.path.join(pygtk_shortcuts,
-                                    'PyGObject Documentation.lnk')
-    if os.path.isfile(pygobject_doc_link):   
-        os.remove(pygobject_doc_link)
-    create_shortcut(doc_url,'PyGObject Documentation',pygobject_doc_link)
-    file_created(pygobject_doc_link)
-
 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))
-        # TODO: Add an installer option for shortcut creation 
-        # create_shortcuts()
         print __doc__
-



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