Changeset 2337


Ignore:
Timestamp:
Jun 21, 2016 4:23:04 PM (7 years ago)
Author:
toby
Message:

add svn locations for constructor-anaconda install

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpath.py

    r2134 r2337  
    171171def whichsvn():
    172172    '''Returns a path to the subversion exe file, if any is found.
    173     Searches the current path as well as subdirectory "svn" and
    174     "svn/bin" in the location of the GSASII source files.
     173    Searches the current path after adding likely places where GSAS-II
     174    might install svn.
    175175
    176176    :returns: None if svn is not found or an absolute path to the subversion
     
    182182    if sys.platform == "win32": svnprog += '.exe'
    183183    pathlist = os.environ["PATH"].split(os.pathsep)
    184     pathlist.insert(0,os.path.join(os.path.split(__file__)[0],'svn'))
    185     pathlist.insert(1,os.path.join(os.path.split(__file__)[0],'svn','bin'))
     184    # add likely places to find subversion when installed with GSAS-II
     185    for rpt in ('..','bin'),('..','Library','bin'),('svn','bin'),('svn',):
     186        pt = os.path.normpath(os.path.join(os.path.split(__file__)[0],*rpt))
     187        if os.path.exists(pt):
     188            pathlist.insert(0,pt)
     189    # search path for svn or svn.exe
    186190    for path in pathlist:
    187191        exe_file = os.path.join(path, svnprog)
Note: See TracChangeset for help on using the changeset viewer.