I have a simple python script that I need to create a kit for, and it has one config file. This is for Unix only, and very restricted use, so here's my relevant setup.py:
setup(....., scripts=['myscript.py'], data_files=[('/etc', ['myscript.cfg'])],...) My problem is that when I repeatedly run "python setup.py install", it will always overwrite the exising myscript.py, but if a /etc/myscript.cfg file exists, it will not overwrite it. I can use the --force option, or I can add force = 1 in [install_data] in the setup.cfg - but that does not seem to help me with the RPM packaging. I looked at the bdist_rpm create .spec file, and for install it says: python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES Two questions: 1) Is there a way to customize the %install line created by bdist_rpm option of the setup.py script? 2) Or, is there a way I can avoid using a setup.cfg, and put all that info in the setup.py script itself? I would like to add a --force option to the "data_files" line in the setup() call... -- http://mail.python.org/mailman/listinfo/python-list