Ovh instance management with PySide2
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

55 rindas
1.4 KiB

  1. # A simple setup script to create an executable using PySide2. This also
  2. # demonstrates how to use include_files, zip_include_packages and excludes
  3. # to get minimal package size
  4. #
  5. # PySide2app.py is a very simple type of PySide2 application
  6. #
  7. # Run the build process by running the command 'python setup.py build'
  8. #
  9. # If everything works well you should find a subdirectory in the build
  10. # subdirectory that contains the files needed to run the application
  11. import os
  12. import sys
  13. import PySide2
  14. from cx_Freeze import setup, Executable
  15. plugins_path = os.path.join(PySide2.__path__[0], "plugins")
  16. base = None
  17. if sys.platform == "win32":
  18. base = "Win32GUI"
  19. options = {
  20. "build_exe": {
  21. "include_files": [
  22. os.path.join(plugins_path, "platforms")
  23. ], # additional plugins needed by qt at runtime
  24. "zip_include_packages": [
  25. "PySide2",
  26. "shiboken2",
  27. "encodings",
  28. ], # reduce size of packages that are used
  29. "excludes": [
  30. "tkinter",
  31. "unittest",
  32. # "email",
  33. # "http",
  34. # "xml",
  35. "pydoc",
  36. "pdb",
  37. ], # exclude packages that are not really needed
  38. }
  39. }
  40. executables = [Executable("GuiManagement.py", base=base)]
  41. setup(
  42. name="simple_PySide2",
  43. version="0.1",
  44. description="Sample cx_Freeze PySide2 script",
  45. options=options,
  46. executables=executables,
  47. )