[Distutils] [setuptools] When .py files are "data", strange things happen

Phillip J. Eby pje at telecommunity.com
Fri Jan 6 00:19:20 CET 2006

At 01:48 PM 1/5/2006 -0800, Ben Bangert wrote:
>On Jan 5, 2006, at 9:07 AM, Phillip J. Eby wrote:
>>If I understand your use case correctly, I don't see how that hurts
>It hurts a ton if you want to use Paster templates, because you'll
>have files ending in .py that aren't meant to be processed by paster,
>and _tmpl, all of which are inside non-package data directories, thus
>won't get included any other way.

You lost me.  How does having the .py included and compiled to .pyc hurt 
anything?  .pyc files include a date/time stamp of the .py they were built 
from, so if you accidentally copy them somewhere and change the 
corresponding .py file, the .pyc will be ignored and overwritten in the 
import case, and ignored altogether in an execfile or script-running case.

In no scenario that I understand, does the presence of a .pyc file hurt 
anything.  Could you please explain what problem you think it will cause?

More information about the Distutils-SIG mailing list