Changeset 22

Show
Ignore:
Timestamp:
05/21/07 19:26:19 (2 years ago)
Author:
emuller
Message:

Oops, did the wrong thing adding setup.py

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/pygetsetcall/src/nrnpython/nrnpy_hoc.cpp

    r19 r22  
    401401        char* n = PyString_AsString(name); 
    402402//printf("hocobj_getattro %s\n", n); 
     403 
     404        # return None by default 
    403405        PyObject* result = 0; 
    404406 
     
    408410        if (self->type_ == 1 && !self->ho_) { 
    409411                Py_DECREF(name); 
    410                 return result
     412                return Py_BuildValue("")
    411413        } 
    412414        Symbol* sym = getsym(n, self->ho_); 
    413415        Py_DECREF(name); 
    414416        if (!sym) { 
    415                return result
     417          return Py_BuildValue("")
    416418        } 
    417419        if (self->ho_) { // use the component fork. 
  • branches/pygetsetcall/src/nrnpython/setup.py.in

    r17 r22  
    11#setup.py 
    22from distutils.core import setup, Extension 
     3 
     4 
     5defines = [] 
     6 
     7 
     8# check for numpy+version 
     9 
     10try: 
     11    import numpy 
     12except ImportError: 
     13    print "Fatal rror: numpy not installed or not in import path" 
     14 
     15else: 
     16 
     17    # what version? 
     18    version = numpy.__version__.split('.') 
     19    if version[0] < '1' or (len(version[1]) > 1 and version[1] < '0rc1'): 
     20        print "Warning: Old numpy found and not being used.  Please upgrade your version of numpy to > 1.0rc1" 
     21    else: 
     22    numpy_include_path = numpy.__path__[0]+'/core/include' 
     23    defines.append(('WITH_NUMPY',None)) 
     24 
     25 
    326 
    427libdirs = ["@NRN_LIBDIR@", 
     
    730epre='-Wl,-R' 
    831 
    9 setup(name="nrn", version="6.0", 
    10   ext_modules=[ 
    11     Extension( 
    12       "hoc", 
     32 
     33hoc_module = Extension( 
     34      "neuron.hoc", 
    1335      ["inithoc.cpp"], 
    1436      library_dirs=libdirs, 
     
    2345        "scopmath", "sparse13", "sundials", "IVhines", 
    2446        "readline" 
    25       ] 
     47      ], 
     48      include_dirs = numpy_include_path, 
     49      define_macros=defines 
    2650    ) 
    27   ] 
     51 
     52 
     53 
     54setup(name="neuron", version="6.0", 
     55      description = "NEURON bindings for python", 
     56      ext_modules=[hoc_module], 
    2857) 
    2958