[pygtk] pygtk_postinstall.py: remove shortcut creation
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygtk] pygtk_postinstall.py: remove shortcut creation
- Date: Thu, 4 Nov 2010 22:47:26 +0000 (UTC)
commit 1b7915c3af591d2875d9865d87804fc8fe7d259d
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date: Wed Nov 3 11:24:32 2010 +0100
pygtk_postinstall.py: remove shortcut creation
pygtk_postinstall.py | 39 ---------------------------------------
1 files changed, 0 insertions(+), 39 deletions(-)
---
diff --git a/pygtk_postinstall.py b/pygtk_postinstall.py
index 471c4b2..f471ca0 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__
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]