Changeset 22
- Timestamp:
- 05/21/07 19:26:19 (2 years ago)
- Files:
-
- branches/pygetsetcall/src/nrnpython/nrnpy_hoc.cpp (modified) (2 diffs)
- branches/pygetsetcall/src/nrnpython/setup.py (deleted)
- branches/pygetsetcall/src/nrnpython/setup.py.in (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/pygetsetcall/src/nrnpython/nrnpy_hoc.cpp
r19 r22 401 401 char* n = PyString_AsString(name); 402 402 //printf("hocobj_getattro %s\n", n); 403 404 # return None by default 403 405 PyObject* result = 0; 404 406 … … 408 410 if (self->type_ == 1 && !self->ho_) { 409 411 Py_DECREF(name); 410 return result;412 return Py_BuildValue(""); 411 413 } 412 414 Symbol* sym = getsym(n, self->ho_); 413 415 Py_DECREF(name); 414 416 if (!sym) { 415 return result;417 return Py_BuildValue(""); 416 418 } 417 419 if (self->ho_) { // use the component fork. branches/pygetsetcall/src/nrnpython/setup.py.in
r17 r22 1 1 #setup.py 2 2 from distutils.core import setup, Extension 3 4 5 defines = [] 6 7 8 # check for numpy+version 9 10 try: 11 import numpy 12 except ImportError: 13 print "Fatal rror: numpy not installed or not in import path" 14 15 else: 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 3 26 4 27 libdirs = ["@NRN_LIBDIR@", … … 7 30 epre='-Wl,-R' 8 31 9 setup(name="nrn", version="6.0", 10 ext_modules=[ 11 Extension( 12 "hoc", 32 33 hoc_module = Extension( 34 "neuron.hoc", 13 35 ["inithoc.cpp"], 14 36 library_dirs=libdirs, … … 23 45 "scopmath", "sparse13", "sundials", "IVhines", 24 46 "readline" 25 ] 47 ], 48 include_dirs = numpy_include_path, 49 define_macros=defines 26 50 ) 27 ] 51 52 53 54 setup(name="neuron", version="6.0", 55 description = "NEURON bindings for python", 56 ext_modules=[hoc_module], 28 57 ) 29 58

