diff options
author | Dieter Verfaillie <dieterv@optionexplicit.be> | 2010-11-03 11:24:32 +0100 |
---|---|---|
committer | Dieter Verfaillie <dieterv@optionexplicit.be> | 2010-11-03 11:24:32 +0100 |
commit | 1b7915c3af591d2875d9865d87804fc8fe7d259d (patch) | |
tree | 2697138c63a5cd75e4b43698ad253725d263476b /pygtk_postinstall.py | |
parent | 3f94211c9b43e30eaba67ce8f0cb9e42e07795fd (diff) | |
download | pygtk-1b7915c3af591d2875d9865d87804fc8fe7d259d.tar.gz |
pygtk_postinstall.py: remove shortcut creation
Diffstat (limited to 'pygtk_postinstall.py')
-rw-r--r-- | pygtk_postinstall.py | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/pygtk_postinstall.py b/pygtk_postinstall.py index 471c4b23..f471ca03 100644 --- a/pygtk_postinstall.py +++ b/pygtk_postinstall.py @@ -29,50 +29,11 @@ def replace_prefix(s): '/gtk-2.0/codegen' + '\n') 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/pygtk") - pygtk_doc_link=os.path.join(pygtk_shortcuts, - 'PyGTK Documentation.lnk') - if os.path.isfile(pygtk_doc_link): - os.remove(pygtk_doc_link) - create_shortcut(doc_url,'PyGTK Documentation',pygtk_doc_link) - file_created(pygtk_doc_link) - - homepage_link = os.path.join(pygtk_shortcuts, - "PyGTK Home.lnk") - if os.path.isfile(homepage_link): - os.remove(homepage_link) - create_shortcut("http://www.pygtk.org",'PyGTK Homepage',homepage_link) - file_created(homepage_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__ |