문제

I am using distutil to install my python code using

python setup.py install

I run into problems when I want to install an older branch of my code over a new one: setup.py install won't overwrite older files. A work around is touching (touch <filename>) all files so they are forced to be newer than those installed, but this is pretty ugly.

What I am looking for is an option to force overwriting of all files, eg. something like

python setup.py --force install

Any Ideas?

도움이 되었습니까?

해결책

The Python developers had the same idea, they just put the option after the command:

python setup.py install --force

The distutils documentation doesn't mention the --force option specifically, but you can find it by using the --help option:

python setup.py --help install

다른 팁

Go to the setup.py directory and I simply use:

pip install .

It works for me.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top