[PYTHON] The one that just translated the Py2app option into Japanese

The option is that the build procedure can specify the effect to py2app in three ways:

On the command line

$ python setup.py py2app --argv-emulation

setup.py


setup(
  app=['MyApplication.py'],
  options-dict(py2app=dict(
    argv-emulation=1,
    )),
  )

setup.cfg


[py2app]
argv-emulation=1

Note that underscores (_) must be replaced with hyphens (-) when using conversion command line options in setup.py. You can use either hyphens or underscores in the setup.cfg file, You should always use hyphens in command line options.

Option reference

Use the following command to enumerate the supported py2app options.

$ python setup.up py2app --help

py2app command options

command Contents
--optimize (-O) Optimization level: -O1 for "python -O", -O2 for "python -OO",And-O0 is disabled.[Default value: -O0]"
--include (-i) Include a comma-separated list of modules.
--package (-p) Include a comma-separated list of packages.
--iconfile Use an icon file.
--excludes (-e) Exclude a comma-separated list of modules.
--dylib-excudes (-E) Exclude a comma-separated list of frameworks or dylib.
--datamodels Copy the xcdatamodel to the compiled resources.
--resources (-r) Include comma-separated lists and folders of added data files(Not a code!)
--frameworks (-f) Include a comma-separated list of added frameworks and dylib.
--plist (-P) Info.plist template file, dictionary or plistlib.Plist
--extension Bundle extension[Default value:For the application.app,For plugins.plugin]
--graph (-g) Output module dependency graph
--xref (-x) Output module cross-reference as HTML
--no-strip Do not remove local symbols from debug and output.
--no-chdir (-C) Do not change to the data directory.(Contents/Resources) [Force plugin]
--semi-standalone (-s) It depends on the existing Python installation module.
--alias (-A) Use the current source file as an alias.(Development only!)
--argv-emulation (-a) Use argv emulation.
--argv-inject Introduce some commands to argv.
--use-pythonpath Allows Python's PATH to affect the interpreter's environment.
--use-faulthandler Enable fault handler.(Python 3.3 or more)
--verbose-interpreter Start Python in verbose mode.
--bdist-base (-b) The base distribution of the build library puts the build to be finally distributed.(The default is dist)
--site-packages (-d) site.System and user site in path-Include packages.
--strip (-S) Strip debug and local symbols from output.(By default, on for compatibility)
--prefer-ppc Force application translates and runs on i386.(LSPrefersPPC=True)
--debug-modulegraph Drop it on the PDB console after the module discovery phase is complete.
--debug-skip-macholib Skip the macholib phase.(The application is not isolated!)
--emulate-shell-environment Emulate the shell environment in a terminal window.
--qt-plugins Use PyQt4 to include a comma-separated list of Qt plugins in your application.
--matplotlib-backends A comma-separated list of matplotlib backends should be included in your application using that library. By default, it includes all of matplotlib. "*If you use "", including all backends, "_”Only includes the backend that is explicitly imported.
--extra-script Make your application include a comma-separated list of added scripts.
--include-plugins Make your application include a comma-separated list of additional plugins.
--arch=ARCH Make sure the architecture is included.(Intel, Fat, Universal,note:ARCH needs to be a subset of the architecture supported by the Python interpreter.)

Recommended Posts

The one that just translated the Py2app option into Japanese
Google Tech Dev Guide Translated the explanation of the first issue into Japanese
One liner that lists the colors of matplotlib
Python code that removes contiguous spaces into one
The one that displays the progress bar in Python
[Python] A notebook that translates and downloads the ipynb file on GitHub into Japanese.