[Scons-users] Issue with dill

Dirk Bächle tshortik at gmx.de
Thu Nov 24 14:51:14 EST 2016


Hi Albert,

On 24.11.2016 17:24, Albert Arquer wrote:
> Hello,
>
> I have been trying to do some tricky stuff with scons in order to be able to detect subtle changes that where not original picked up
> by scons. Long story short, I think I found a way with the dill package.
>
> I have installed dill and while I can import it into a normal python shell or include it in a normal python script, when I import it
> from my sconstruct I get:
>
> scons: Reading SConscript files ...
> AttributeError: 'builtin_function_or_method' object has no attribute 'dispatch':
>   File ".../SConstruct_new", line 2:
>     from GenericModule import *
>   File ".../GenericModule.py", line 20:
>     import dill
>   File ".../python/2.7.8/lib/python2.7/site-packages/dill-0.2.5-py2.7.egg/dill/__init__.py", line 26:
>     from .dill import dump, dumps, load, loads, dump_session, load_session, \
>   File ".../python/2.7.8/lib/python2.7/site-packages/dill-0.2.5-py2.7.egg/dill/dill.py", line 371:
>     class Pickler(StockPickler):
>   File ".../python/2.7.8/lib/python2.7/site-packages/dill-0.2.5-py2.7.egg/dill/dill.py", line 373:
>     dispatch = MetaCatchingDict(StockPickler.dispatch.copy())
>
>
> I have read somewhere about an environment variable called SCONS_HORRIBLE_REGRESSION_TEST_HACK, while I have no idea what that does,
> I have tried it and it still fails...
>
> I really need dill... what can I do?
>

for a start, you could show us the full (and verbatim) contents of your "SConstruct_new" and "GenericModule.py" files. It's 
important to see which other modules you try to import...SCons is doing some wrapping around cPickle where needed, and the exact 
order in which things are initialized will probably make a difference.

I guess you already found

   http://scons-users.scons.narkive.com/vqa4FUWi/scons-not-playing-well-with-scipy

while "searching the web"? Is that where you have the variable name SCONS_HORRIBLE_REGRESSION_TEST_HACK from?

Best regards,

Dirk



More information about the Scons-users mailing list