Changeset 2546


Ignore:
Timestamp:
Mar 15, 2006, 11:15:54 AM (19 years ago)
Author:
ole
Message:

Got Numpy to work on Linux

Location:
inundation-numpy-branch/utilities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inundation-numpy-branch/utilities/compile.py

    r2545 r2546  
    2828 
    2929  import os, string, sys, types
     30  from os import sep
    3031 
    3132  # Input check
     
    163164  # Check existence of Python.h
    164165  #
    165   headerfile = python_include + os.sep + 'Python.h'
     166  headerfile = python_include + sep + 'Python.h'
    166167  try:
    167168    open(headerfile, 'r')
     
    174175
    175176  # Add location of arrayobject.h
    176 
    177   arraypath = 'Lib' + os.sep + 'site-packages' + os.sep + 'numpy' + os.sep + 'core' + os.sep + 'include' + os.sep + 'numpy'
     177  arraypath = 'site-packages%snumpy%score%sinclude%snumpy' %((sep,)*4)
    178178  if sys.platform == 'win32':  #Windows
    179     array_include = os.path.join(sys.exec_prefix, arraypath)
     179    array_include = os.path.join(sys.exec_prefix, 'lib' + sep + arraypath)
    180180  else:
    181     #FIXME: Not done yet
    182     python_include = os.path.join(os.path.join(sys.exec_prefix, 'include'),
    183                                   'python' + version)
     181    array_include = os.path.join(sys.exec_prefix,
     182                                 'lib' + sep + 'python' + version +
     183                                 sep + arraypath)
     184   
    184185
    185186  # Check existence of arrayobject.h
    186   #
    187187  array_headerfile = array_include + os.sep + 'arrayobject.h'
    188188  try:
     
    372372              compile(filename)
    373373          except Exception, e:
    374               print 'Could not compile C extension %s' %filename
     374              print 'Could not compile C extension %s: %s' %(filename, e)
    375375          else:
    376376              print 'C extension %s OK' %filename
  • inundation-numpy-branch/utilities/test_numerical_tools.py

    r2545 r2546  
    208208
    209209        from numpy.random import uniform, seed
    210         #seed(17, 53)
    211         seed(17)
     210        seed((17,53))
    212211
    213212        x0, x1, x2, y0, y1, y2 = uniform(0.0,3.0,6)
Note: See TracChangeset for help on using the changeset viewer.