1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| #!/usr/bin/python
# -*- coding: utf-8 -*-
# source d'inspiration: http://wiki.wxpython.org/cx_freeze
import sys, os
from cx_Freeze import setup, Executable
#############################################################################
# preparation des options
path = sys.path.append(os.path.join("..", "..", "Modules"))
includes = ["solveur_srectp", "solveur_srondp", "sensibilite_srectp", "sensibilite_srondp"]
excludes = []
packages = ["tkinter","numpy", "scipy.optimize","matplotlib-tk", "matplotlib"]
options = {"path": path,
"includes": includes,
"excludes": excludes,
"packages": packages
}
#############################################################################
# preparation des cibles
base = None
if sys.platform == "win32":
base = "Win32GUI"
cible_1 = Executable(
script = "C:\***\***_V3.py",
base = base,
compress = True,
icon = None,
)
#############################################################################
# creation du setup
setup(
name = "test_cx_freeze",
version = "0.1",
description = "simple test de cx_freeze avec tkinter",
author = "Tyrtamos",
options = {"build_exe": options},
executables = [cible_1] |
Partager