python - How to pass commands to gcc through cx_Freeze -


how pass commands gcc through cx_freeze 'disutils.core.setup()' arguments?

specifically, want .exe file use relative paths in traceback messages, rather path build .exe file

here setup.py file:

setup( name="test", packages=['test'], package_data={'': ['*.py', '*.txt', '*.sample', '*.mo', 'readme.rst']}, options={"build_exe": {     "icon": r"test\resources\test.ico",     "compressed": true,     "create_shared_zip": true,     "copy_dependent_files": true,     "include_files": [         ('test/i18n/', 'i18n/'),         ('test/resources/', 'resources/'),         ('test/client.conf.sample', 'client.conf.sample'),     ],     "excludes": [         'urllib.sys',         'urllib._sre',         'urllib.array',         'urllib._locale',         'urllib.datetime',         'urllib._functools',         ]     } }, executables=executable(script=script),) 

you need add 1 additional option ones have:

replace_paths = [("*", "")] 

that replace paths relative paths. can more interesting things like:

replace_paths = [     ("/path/to/python/lib", "<python>"),     ("/path/to/my/script", "<script>") ] 

in essence, first element of tuple part of path replaced value in second element of tuple. value of * in search value results in paths being replaced replacement value.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -