← Back to team overview

instant team mailing list archive

Re: Rewritten code

 

2008/9/2  <kent-and@xxxxxxxxx>:
>> 2008/9/2  <kent-and@xxxxxxxxx>:
>>>
>>>>
>>>> I'll fix the numarray/Numeric code although I
>>>> guess nobody uses it.
>>>>
>>>
>>> Both Numeric and numarray work on my machine, but the test examples used
>>> the
>>> same cache_dir and this caused trouble.
>>>
>>> Kent
>>
>> Then the bug is really in the cache mechanism: we must add more
>> stuff to the cache_md5sum. If cache_dir isn't provided manually,
>> the default instant cache dir should always work transparently.
>>
>> --
>> Martin
>>
>
> Agree.
> If no signature is provided then the md5 sum should probably computed from
> both the interface file, the possible additional code, and the setup.py
> file. This should
> be sufficient, right ?
>
> Kent

The problem is that the interface file depends on the module name, and
with cached modules the module name depends on the md5 sum. So I
computed a cache_md5sum without the interface file to construct the
module name and look in the cache. Then if the module wasn't cached, I
computed a new_md5sum including the interface file. This new_md5sum is
compared to the old_md5sum read from file if there is a md5sum file
found on disk, to see if recompilation is neccessary, and if so
setup.py is run and new_md5sum is written to file.

So we must add the input variables to the interface file to the
cache_md5sum. Probably also compiler flags.

-- 
Martin


References