diff options
author | Eric Jones <eric@enthought.com> | 2003-03-07 15:11:46 +0000 |
---|---|---|
committer | Eric Jones <eric@enthought.com> | 2003-03-07 15:11:46 +0000 |
commit | e95e42e5e2e4027ed03a32ecb066521e5997f4ba (patch) | |
tree | bea2ef15101fddfff800a7072636c234fe907706 /weave/common_info.py | |
parent | c21bf7ecfd8fd90f09bc8ec9eee8cdbfd1960e43 (diff) | |
download | numpy-e95e42e5e2e4027ed03a32ecb066521e5997f4ba.tar.gz |
Moved code in swigptr.c into a python string, swigptr.swigptr_code. This makes it where the code doesn't have to be read out of a file in the directory path and makes it easier on py2exe like programs that bundle code into an exe file. [see bug 37]
I think weave will still not work in bundled applications because it referes to a lot of other external files in the scxx directory and blitz directories. Still, these are not read during import, so they at least don't cause the scipy import to fail.
We should look for a way to make weave work from py2exe binaries in the future.
Diffstat (limited to 'weave/common_info.py')
-rw-r--r-- | weave/common_info.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/weave/common_info.py b/weave/common_info.py index ce8ea9a13..fb4374914 100644 --- a/weave/common_info.py +++ b/weave/common_info.py @@ -118,15 +118,13 @@ class inline_info(base_info.base_info): # swig pointer support code # # The support code for swig is just slirped in from the swigptr.c file -# from the *old* swig distribution. New style swig pointers are not -# yet supported. +# from the *old* swig distribution. The code from swigptr.c is now a string +# in swigptr.py to ease the process of incorporating it into py2exe +# installations. New style swig pointers are not yet supported. #---------------------------------------------------------------------------- -import os, common_info -local_dir,junk = os.path.split(os.path.abspath(common_info.__file__)) -f = open(os.path.join(local_dir,'swig','swigptr.c')) -swig_support_code = f.read() -f.close() +import swigptr +swig_support_code = swigptr.swigptr_code class swig_info(base_info.base_info): _support_code = [swig_support_code] |