purge build folder from within install.py script

This commit is contained in:
Axel Kohlmeyer
2023-03-16 16:29:42 -04:00
parent feb1b9e029
commit 4a66389bf1
2 changed files with 5 additions and 2 deletions

View File

@ -59,6 +59,10 @@ olddir = os.path.abspath('.')
os.chdir(os.path.dirname(args.package))
# remove any wheel files left over from previous calls
if os.path.isdir(os.path.join(olddir,"build")):
print("Cleaning old build directory")
shutil.rmtree(os.path.join(olddir,"build"))
print("Purging existing wheels...")
for wheel in glob.glob('lammps-*.whl'):
print("deleting " + wheel)