Changeset 33


Ignore:
Timestamp:
Mar 1, 2010 8:21:07 PM (12 years ago)
Author:
toby
Message:

fix up package paths

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r32 r33  
    1717import pylab
    1818
    19 # determine a binary path pased on the host OS and the python version, path is relative to
    20 # location of this file
    21 if sys.platform == "win32":
    22     bindir = 'binwin%d.%d' % sys.version_info[0:2]
    23 elif sys.platform == "darwin":
    24     bindir = 'binmac%d.%d' % sys.version_info[0:2]
    25 else:
    26     bindir = 'bin'
    27 if ospath.exists(ospath.join(sys.path[0],bindir)): sys.path.insert(0,ospath.join(sys.path[0],bindir))
    2819# load the GSAS routines
    2920import GSASIIIO as G2IO
  • trunk/GSASIIIO.py

    r31 r33  
    88import cPickle
    99import GSASIIgrid as G2gd
     10# needed for MAR345
     11import os.path as ospath
     12# determine a binary path pased on the host OS and the python version, path is relative to
     13# location of this file
     14if sys.platform == "win32":
     15    bindir = 'binwin%d.%d' % sys.version_info[0:2]
     16elif sys.platform == "darwin":
     17    bindir = 'binmac%d.%d' % sys.version_info[0:2]
     18else:
     19    bindir = 'bin'
     20if ospath.exists(ospath.join(sys.path[0],bindir)) and ospath.join(sys.path[0],bindir) not in sys.path:
     21    sys.path.insert(0,ospath.join(sys.path[0],bindir))
    1022
    1123def sfloat(S):
  • trunk/GSASIIcomp.py

    r32 r33  
    66import numpy as np
    77import numpy.linalg as nl
     8import os.path as ospath
    89import GSASIIgrid as G2gd
     10# determine a binary path pased on the host OS and the python version, path is relative to
     11# location of this file
     12if sys.platform == "win32":
     13    bindir = 'binwin%d.%d' % sys.version_info[0:2]
     14elif sys.platform == "darwin":
     15    bindir = 'binmac%d.%d' % sys.version_info[0:2]
     16else:
     17    bindir = 'bin'
     18print len(sys.path)
     19print bindir
     20if ospath.exists(ospath.join(sys.path[0],bindir)) and ospath.join(sys.path[0],bindir) not in sys.path:
     21    sys.path.insert(0,ospath.join(sys.path[0],bindir))
     22print len(sys.path)
    923try:
    1024    import pypowder as pyp
  • trunk/GSASIIspc.py

    r30 r33  
    44import numpy as np
    55import sys
    6 import os.path
     6import os.path as ospath
    77# determine a binary path pased on the host OS and the python version, path is relative to
    88# location of this file
    99if sys.platform == "win32":
    10     bindir = '../binwin%d.%d' % sys.version_info[0:2]
     10    bindir = 'binwin%d.%d' % sys.version_info[0:2]
    1111elif sys.platform == "darwin":
    12     bindir = '../binmac%d.%d' % sys.version_info[0:2]
     12    bindir = 'binmac%d.%d' % sys.version_info[0:2]
    1313else:
    14     bindir = '../bin'
    15 if os.path.exists(os.path.join(sys.path[0],bindir)): sys.path.insert(0,os.path.join(sys.path[0],bindir))
     14    bindir = 'bin'
     15if ospath.exists(ospath.join(sys.path[0],bindir)) and ospath.join(sys.path[0],bindir) not in sys.path:
     16    sys.path.insert(0,ospath.join(sys.path[0],bindir))
    1617
    1718import pypowder as pyd
     
    1920def SpcGroup(SGSymbol):
    2021    '''
     22   Determines cell and symmetry information from a short H-M space group name
    2123   input: space group symbol (string) with spaces between axial fields
    2224   returns [SGError,SGData]
  • trunk/tests/testGSASIIspc.py

    r30 r33  
    33import os
    44sys.path.append('..')
     5import os.path as ospath
     6# determine a binary path pased on the host OS and the python version, path is relative to
     7# location of this file
     8if sys.platform == "win32":
     9    bindir = '../binwin%d.%d' % sys.version_info[0:2]
     10elif sys.platform == "darwin":
     11    bindir = '../binmac%d.%d' % sys.version_info[0:2]
     12else:
     13    bindir = '../bin'
     14if ospath.exists(ospath.join(sys.path[0],bindir)) and ospath.join(sys.path[0],bindir) not in sys.path:
     15    sys.path.insert(0,ospath.join(sys.path[0],bindir))
    516
    617import numpy as np
Note: See TracChangeset for help on using the changeset viewer.