Rss_Auction/setup.py

77 lines
2.3 KiB
Python

import sys
# import os
from cx_Freeze import setup, Executable
# import shutil
# # 빌드 디렉토리 내에 `src/browsers` 폴더 복사 시 `user_data` 폴더 제외
# source_browsers_path = 'src/browsers'
# build_browsers_path = 'build/exe.win-amd64-3.11/src/browsers'
# if os.path.exists(build_browsers_path):
# shutil.rmtree(build_browsers_path) # 기존 폴더 제거
# os.makedirs(build_browsers_path, exist_ok=True)
# # 필요한 파일만 복사
# for item in os.listdir(source_browsers_path):
# s = os.path.join(source_browsers_path, item)
# d = os.path.join(build_browsers_path, item)
# if os.path.isdir(s) and item == 'user_data':
# continue # 'user_data' 폴더는 복사하지 않음
# elif os.path.isdir(s):
# shutil.copytree(s, d)
# else:
# shutil.copy2(s, d)
# 프로그램의 실행에 필요한 모듈을 명시적으로 포함해야 할 수 있음
build_options = {
'packages': ['asyncio', 'playwright', 'PySide6.QtWidgets', 'PySide6.QtCore'],
'excludes': [
'PySide6.QtCharts',
'PySide6.QtDataVisualization',
'PySide6.QtMultimedia',
'PySide6.QtMultimediaWidgets',
'PySide6.QtNetwork',
'PySide6.QtOpenGL',
'PySide6.QtPositioning',
'PySide6.QtQuick',
'PySide6.QtQuickControls2',
'PySide6.QtSensors',
'PySide6.QtSerialPort',
'PySide6.QtSql',
'PySide6.QtTest',
'PySide6.QtWebEngine',
'PySide6.QtWebEngineCore',
'PySide6.QtWebEngineWidgets',
'PySide6.QtWebSockets',
'PySide6.QtWebView',
'PySide6.Qt3DCore',
'PySide6.Qt3DExtras',
'PySide6.Qt3DInput',
'PySide6.Qt3DLogic',
'PySide6.Qt3DRender'
],
'zip_include_packages': ['PySide6'], # 압축 파일에 포함할 패키지
'zip_exclude_packages': [] # 압축 파일에서 제외할 패키지
}
# 기본 실행 파일 정의
base = 'Win32GUI' if sys.platform == 'win32' else None
executables = [
Executable(
script='main.py',
base=base,
target_name='rssAuction1.exe',
icon=None # 아이콘 파일이 있으면 경로를 지정
)
]
setup(
name='RssServiceApp',
version='1.0',
description='Rss Auction WEB',
options={'build_exe': build_options},
executables=executables
)