[Scons-users] Issue with dill

Fred Wright fw at fwright.net
Fri Nov 25 02:26:59 EST 2016


On Fri, 25 Nov 2016, Albert Arquer wrote:

> I wrote to dill developers and they pointed out the fact that apparently
> scons renames the pickle module to cPickle, and apparently dill needs
> pickle to be named as-is (sounds reasonable to me).
>
> If you look in SCons.compat you can see how the module is renamed for some
> reason.
>
> I figured a way to get around it by adding "import dill" in the scons
> launcher script, since everything seems to work as soon as dill is imported
> before SCons itself.
> However I don't really like having to go around touching scons sources...
> and what if I want to source my sconstruct scripts from a normal python
> shell??
>
> Does anybody know why scons does this? is there any other "cleaner" way
> around this?

Aside from why SCons needs the nonstandard naming, can you work around it
with "import cPickle as pickle"?  Perhaps followed by a "del pickle" after
importing dill, in case SCons is allergic to the normal name?

Fred Wright


More information about the Scons-users mailing list