From 362d72225031c9364da5d3c945d79be08c39f765 Mon Sep 17 00:00:00 2001 From: Achraf KHAZRI Date: Sat, 14 Sep 2019 16:44:35 +0100 Subject: [PATCH] :tada: exec file initial commit --- gmg.py | 24 ++++++++++++++++++++++++ setup_linux.py | 35 +++++++++++++++++++++++++++++++++++ setup_win.py | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 gmg.py create mode 100644 setup_linux.py create mode 100644 setup_win.py diff --git a/gmg.py b/gmg.py new file mode 100644 index 0000000..5c8b7e9 --- /dev/null +++ b/gmg.py @@ -0,0 +1,24 @@ +""" Executable. + +Links: + +Author: Achraf KHAZRI +Project: GMG +""" + +import sys +import argparse +import os +import glob + +# Arguments +parser = argparse.ArgumentParser() +parser.add_argument('--mode', '-mode', help="Classifier mode : task or train", type= str) + + +# Get args +args = parser.parse_args() + +if args.mode == "task": + + print("Hello GMG !") \ No newline at end of file diff --git a/setup_linux.py b/setup_linux.py new file mode 100644 index 0000000..1bb320a --- /dev/null +++ b/setup_linux.py @@ -0,0 +1,35 @@ +from cx_Freeze import setup, Executable +import os + +# Extra files +include_files = [] + +# Including libs +includes = [] + +# Unnecessary libs +excludes = [] + +bin_includes = [] +# ,'idna.idnadata' +# Packages +packages = [] + +# Optimization level +optimize = 0 + +# If true, only errors and warning will be displayed when excuting cx_freeze +silent = True + + +target = Executable( + script = "gmg.py", + copyright= "Copyright © 2019 GMG", + ) + + +setup(name = "Guide_Me_Glasses", + version = "0.1" , + description = "" , + options = {'build_exe': {'includes':includes,'excludes':excludes,'bin_includes':bin_includes, 'packages':packages, 'include_files':include_files, 'optimize':1, 'silent':silent}}, + executables = [target]) \ No newline at end of file diff --git a/setup_win.py b/setup_win.py new file mode 100644 index 0000000..573415e --- /dev/null +++ b/setup_win.py @@ -0,0 +1,37 @@ +from cx_Freeze import setup, Executable +import os + +# Extra files +include_files = [] + +# Including libs +includes = [] + +# Unnecessary libs +excludes = [] +# Packages +packages = [] + +# Optimization level +optimize = 1 + +# If true, only errors and warning will be displayed when excuting cx_freez +silent = True + + +PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__)) +os.environ['TCL_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tcl8.6') +os.environ['TK_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tk8.6') + + +target = Executable( + script = "gmg.py", + copyright= "Copyright © 2019 gmg", + ) + + +setup(name = "Guide_Me_Glasses", + version = "0.1" , + description = "Smart glasses" , + options = {'build_exe': {'includes':includes,'excludes':excludes,'packages':packages,'include_files':include_files, 'optimize':1, 'silent':silent}}, + executables = [target]) \ No newline at end of file