DeliveryFeeCalc/build.py

21 lines
654 B
Python

import shutil
import os
from subprocess import call
# 삭제할 디렉토리 목록
folders_to_delete = ['build', 'dist']
# 현재 디렉토리 내의 폴더들을 순회하며 삭제
for folder in folders_to_delete:
if os.path.exists(folder):
shutil.rmtree(folder)
print(f"{folder} 폴더를 삭제했습니다.")
# PyInstaller 명령 실행
# 여기에서 'your_script.py'를 실제 빌드하고자 하는 스크립트의 이름으로 바꿔주세요.
# 추가 PyInstaller 옵션이 필요한 경우 이 부분에 추가합니다.
# 디버깅용 : main.spec
# 배포용 : AutoPercenty.spec
call(['pyinstaller', 'delv_py.spec'])