On 14/09/2006 12:23 PM, Larry Bates wrote:
> John Machin wrote:
>> On 14/09/2006 8:55 AM, Larry Bates wrote:
>>> Alexander Belchenko wrote:
>>>> py2exe@... =D0=BF=D0=B8=D1=88=D0=B5=D1=82:
>>>>> When it's run the second time, there are no dist and build
>>>>> folders, so
>>>>>> the setup has to create everything afresh, yes/no? Maybe you
>>>>>> should *copy* the contents of the dist and build folders before
>>>>>> the second run, instead of renaming.
>>>>> John,
>>>>>
>>>>> Even if I don't rename or delete the build/ and dist/ folders,
>>>>> py2exe regenerates the bz2.py, unicodedata.py and zlib.py files
>>>>> (in build/), which updates their timestamps, which changes the
>>>>> compiled versions (*.pyc) included in library.zip. Same result:
>>>>> library.zip is different every time I run py2exe, even if the
>>>>> sources haven't changed.
>>>> I confirm this effect.
>>>> My system is Python 2.4.3 on Windows 2000; py2exe 0.6.5.
>>>>
>>>> I think there is something straightforward in py2exe build process: =
it
>>>> does not check that some files may exist and have the same content b=
ut
>>>> rebuild it every time from scratch. I think it's possible to fix thi=
s
>>>> behaviour but it's not trivial fix.
>>>>
>>>> I can propose you to check library.zip not at binary level as one fi=
le,
>>>> but checking content of each file inside zip. Per example by
>>>> calculating
>>>> md5 sum for all files inside zip. It's looks somewhat ugly, but it=
at
>>>> least simple solution that does not require to hack py2exe itself.
>>>>
>>>> --=20
>>>> Alexander
>>>>
>>> Whatever is going on is subtle....My unicodedata.pyd does not change.
>>> Hey wait, you said
>>>
>>> "...bz2.py, unicodedata.py and zlib.py files..."
>>>
>>> My Python 2.4 doesn't have a file named unicodedata.py, zlib.py, or
>>> bz2.py what's up with that? On my system these are all .pyd files an=
d
>>> they are not generated as they are binary extensions.
>>>
>>> -Larry
>> The library.zip includes (at the end) 3 files bz2.pyc etc. The dist
>> folder includes 3 files bz2.pyd etc. My guess is that py2exe
>> manufactures a "wrapper" foo.py on the fly for each foo.pyd.
>>
>> I guess the OP will just have to stop pressing the build button when
>> nothing has changed :-)
>>
>>
>>
>>
> I don't have any .pyc files in my library file. I do however use
> "bundle_files": 2 in my options in the
> setup.py file. This places the .pyd files inside the library file.=20
> Maybe that's the "secret".
>=20
Could well be; I was emulating the OP: bog-standard no-options hello.py=20
and setup.py as per the tutorial.
|