#160: Remove existing output directory when building
----------------------------------+-----------------------------------------
Reporter: florian.hoech@… | Owner: giovannibajo
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: PyInstaller | Version: PyInstaller 1.4
Severity: normal | Keywords:
----------------------------------+-----------------------------------------
This patch makes pyinstaller remove an existing output directory when
running Build.py. To do this in a safe way, it checks if the output
directory already exists, and if not empty, the user gets a warning that
it (and all its contents) will be removed, with the choice to continue or
abort (or if sys.stdout is not connected to a tty, it will error out). It
will also check if the output directory is the same as the directory
containing the specfile or build directory, or if the output directory is
contained within those directories, and error out in that case. Otherwise,
the output directory is removed using rmtree.
--
Ticket URL: <http://www.pyinstaller.org/ticket/160>
Pyinstaller <http://www.pyinstaller.org>
PyInstaller Project