Why `setup.py install` does not update the script file? Why `setup.py install` does not update the script file? python-3.x python-3.x

Why `setup.py install` does not update the script file?


try to uninstall this package and then reinstall it.

pip can uninstall a package :

pip uninstall *packagename*


I found that the Chilin2.py in the package has an elder time stamp than that in system directory.

This is strange. Can you reproduce the bug with these steps:

  1. Create script.
  2. setup.py install (with an --install or --user option to avoid sudo)
  3. Edit script.
  4. setup.py install
  5. ?

If you did that (i.e. you edited the script after its first installation), I don’t understand how the latest script can have a modification time that is older than the installed script.

Is that the reason that setup.py install doesn't update?

Definitely: distutils compares file modification times to see if it needs to re-build (for scripts, the build phase consists of copying the files to a temp build dir and adjusting the shebangs).

Is there a way to solve this?

$ touch chilin2/ChiLin2.py