On Mar 12, 2009, at 16:32, Christian Heimes <li...@cheimes.de> wrote:

Andi Vajda wrote:
That's the problem. If I change my env or edit setup.py and config.py
exists already because I already did a build, it is not going to be
re-generated if I do 'python setup.py install' even though it should
since 'install' calls 'build' (and people expect it to) yet 'build'
doesn't appear in self.distutils.commands.

Oh heck, I totally forgot that use case. How about:

jcc/config.py is (re)created when:

* the file doesn't exist
* the modification time of setup.py is newer than the mtime
  of config.py

Simple enough.

* at least one environ variable starts with "JCC"
* at least one distutils command starts with "bdist" or "build"

Both scary.

It seems that the number of heuristics to introduce to fix this minor inconvenience is oversized.

How about we address this differently by emitting a warning when config.py is overwritten and 'install' is used (only) and it was generated from JCC_ env vars earlier ?

Andi..



Christian

Reply via email to