purge build folder from within install.py script
This commit is contained in:
@ -841,8 +841,7 @@ if(BUILD_SHARED_LIBS)
|
||||
set(LIBLAMMPS_SHARED_BINARY ${MY_BUILD_DIR}/liblammps${LAMMPS_MACHINE}${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
if(Python_EXECUTABLE)
|
||||
add_custom_target(
|
||||
install-python ${CMAKE_COMMAND} -E remove_directory build
|
||||
COMMAND ${Python_EXECUTABLE} ${LAMMPS_PYTHON_DIR}/install.py -p ${LAMMPS_PYTHON_DIR}/lammps
|
||||
install-python ${Python_EXECUTABLE} ${LAMMPS_PYTHON_DIR}/install.py -p ${LAMMPS_PYTHON_DIR}/lammps
|
||||
-l ${LIBLAMMPS_SHARED_BINARY} -w ${MY_BUILD_DIR}
|
||||
COMMENT "Installing LAMMPS Python module")
|
||||
else()
|
||||
|
||||
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user