日本工资明细转换工具
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

build.py 953B

1234567891011121314151617181920212223242526272829303132
  1. import os
  2. import subprocess
  3. import sys
  4. def build_executable():
  5. # Ensure we're in the project root directory
  6. os.chdir(os.path.dirname(os.path.abspath(__file__)))
  7. # Install required packages using uv
  8. print("Installing required packages...")
  9. subprocess.run(["uv", "pip", "install", "-r", "requirements.txt"], check=True)
  10. # Build the executable using PyInstaller
  11. print("Building executable...")
  12. subprocess.run([
  13. "pyinstaller",
  14. "--name=ExcelConverter",
  15. "--onefile",
  16. "--windowed",
  17. "--add-data=employee_info.json;.",
  18. "--add-data=company_options.json;.",
  19. "--add-data=bank_options.json;.",
  20. "--add-data=template.xlsx;.",
  21. "--add-data=config.py;.",
  22. "app.py"
  23. ], check=True)
  24. print("Build completed successfully!")
  25. print("The executable can be found in the 'dist' directory.")
  26. if __name__ == "__main__":
  27. build_executable()