Changeset 6984:4abfcaea67b8 in orange


Ignore:
Timestamp:
09/22/10 14:51:07 (4 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
be01746fa7635b07155e509c750377b742abf01a
Message:
  • modified fink PyQt4 installation detection
  • changed the way HOME variable is retrieved (using os.path.expanduser)
  • changed 'Application data' directory to the return value of os.environAPPDATA? (This changes the bufferDir variable on Vista and Win 7 !!!)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/orngEnviron.py

    r6960 r6984  
    11# coding=utf-8 
    2 import os, sys, user 
     2import os, sys 
    33from zipfile import ZipFile 
    44import urllib 
     
    99    os.environ["PATH"] = ";".join(paths) 
    1010     
    11 if sys.platform == "darwin" and sys.prefix.startswith("/sw"): 
    12     sys.path.append(os.path.join(sys.prefix, "lib/qt4-mac/lib/python" + sys.version[:3] + "/site-packages"))  
     11if sys.platform == "darwin": 
     12    ## PyQt4 installed from fink is installed in %{FINK_ROOT}lib/qt4-mac/lib/python${PYVERSION}/site-packages" 
     13    posible_fink_pyqt4_path = os.path.join(sys.prefix, "lib/qt4-mac/lib/python" + sys.version[:3] + "/site-packages") 
     14    if os.path.exists(posible_fink_pyqt4_path): 
     15        sys.path.append(posible_fink_pyqt4_path)  
    1316 
    1417def __getDirectoryNames(): 
     
    3942        picsDir = "" 
    4043 
    41     home = user.home 
     44    home = os.path.expanduser("~") 
     45     
    4246    if home[-1] == ":": 
    4347        home += "\\" 
    4448    if os.name == "nt": 
    45         applicationDir = os.path.join(home, "Application Data") 
     49        applicationDir = os.environ["APPDATA"] #os.path.join(home, "Application Data") 
    4650        if not os.path.isdir(applicationDir): 
    4751            try: os.makedirs(applicationDir) 
     
    6468    orangeSettingsDir = outputDir 
    6569    if sys.platform == "darwin": 
    66         bufferDir = os.path.join(home, "Library") 
    67         bufferDir = os.path.join(bufferDir, "Caches") 
    68         bufferDir = os.path.join(bufferDir, orangeVer) 
     70        bufferDir = os.path.join(home, "Library", "Caches", orangeVer) 
    6971    else: 
    7072        bufferDir = os.path.join(outputDir, "buffer") 
Note: See TracChangeset for help on using the changeset viewer.