[
  {
    "path": ".gitignore",
    "content": "\nvenv\n/.idea/\n"
  },
  {
    "path": ".vscode/settings.json",
    "content": "{\n    \"cSpell.words\": [\n        \"pyside\",\n        \"tkinter\",\n        \"zstandard\"\n    ]\n}"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2024 Jim Kring, Kay Hayen\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.rst",
    "content": "###############\n Nuitka-Action\n###############\n\nThis GitHub Action builds **Windows**, **macOS**, and **Linux** programs\nand extension modules from **Python** using the highly compatible\n`Nuitka <https://github.com/Nuitka/Nuitka>`_ Python compiler.\n\n**************\n Key Features\n**************\n\n-  **Standalone Executables**: Compile your **Python** code into\n   standalone executables (``*.exe`` or ``*.bin`` files, and ``.app``\n   bundles for Mac).\n\n-  **Binary Python Modules**: Create binary ``*.pyd`` modules that can\n   be imported by other **Python** scripts. This is useful for\n   distributing parts of your **Python** project as compiled libraries.\n\n-  **Cross-Platform Compatibility**: Build for Windows, macOS (including\n   ``.app`` bundles), and Linux from a single workflow.\n\n-  **GUI Framework Support**: Seamlessly compile applications using\n   popular GUI frameworks such as TkInter, `PySide6\n   <https://pypi.org/project/PySide6/>`_, and `PyQt6\n   <https://pypi.org/project/PyQt6/>`_.\n\n-  **Comprehensive Nuitka Features**: Leverage the full power of the\n   `Nuitka Python Compiler <https://nuitka.net>`_, including support for\n   `Nuitka Commercial Features\n   <https://nuitka.net/doc/commercial.html>`_ like obfuscation,\n   embedding data files, and more support for `Nuitka Commercial\n   Features <https://nuitka.net/doc/commercial.html>`_ like obfuscation,\n   embedding data files, and more (for those with a license).\n\n***************\n Simple to Use\n***************\n\nSee :ref:`Usage Details <usage-details>` below for more info.\n\n1) Create a **Python** script\n=============================\n\n.. code:: python\n\n   ## hello_world.py\n   print(\"hello world!\")\n\nRun it in python\n\n.. code:: console\n\n   C:\\> python hello_world.py\n   hello world!\n\n2) Build an executable\n======================\n\nUse this action as a step in one of your project's CI workflow jobs\n(:ref:`details below <usage-details>`):\n\n.. code:: yaml\n\n   # Build python script into a stand-alone exe\n   - uses: Nuitka/Nuitka-Action@main\n     with:\n       nuitka-version: main\n       script-name: hello_world.py\n\n3) Run the executable\n=====================\n\n.. code:: console\n\n   C:\\> hello_world.exe\n   hello world!\n\n*********************\n Current Limitations\n*********************\n\n-  There are not enough examples yet that demonstrate how to use this\n   action in practice. Please help proving them. But everything that's\n   possible with **Nuitka** should work just fine doing it in a workflow\n   with this Action.\n\n**************\n Common traps\n**************\n\n-  Uploading artifacts should make sure ``include-hidden-files`` is\n   present or else incomplete folders will be copied in case of\n   ``.libs`` folders.\n\n-  For ``mode`` the value ``app`` is the default and needs to be\n   switched. For packages you need to use ``module``.\n\n***********************\n Some Example Projects\n***********************\n\nWe need to add a repository demonstrating how to use the different modes\nand typical applications. Help is welcome.\n\n.. _usage-details:\n\n***************\n Usage Details\n***************\n\nSee action.yml for details on how this action works under the hood. It\nis actually extremely simple.\n\nBuild a python script into an exe\n=================================\n\n.. code:: yaml\n\n   jobs:\n\n     build:\n       runs-on: windows-latest\n\n       steps:\n\n         # Check-out repository\n         - uses: actions/checkout@v4\n\n         # Setup Python\n         - uses: actions/setup-python@v5\n           with:\n             python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax\n             architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified\n\n         # Build python script into a single execute or app folder (macOS)\n         - uses: Nuitka/Nuitka-Action@main\n           with:\n             nuitka-version: main\n             script-name: hello_world.py\n             mode: app\n\n         # Uploads artifact\n         - name: Upload Artifact\n           uses: actions/upload-artifact@v4\n           with:\n             name: exe\n             path: build/hello_world.exe\n             include-hidden-files: true\n\nGUI Builds\n==========\n\nSimilar to the others, but with ``enable-plugins: pyside6`` or\n``enable-plugins:tk-inter`` to ensure that those libraries are included\ncorrectly.\n\n.. code:: yaml\n\n   - name: Qt GUI with PySide6\n     uses: Nuitka/Nuitka-Action@main\n     with:\n       nuitka-version: main\n       script-name: my_qt_gui_app.py\n       mode: standalone\n       enable-plugins: pyside6\n\n.. code:: yaml\n\n   - name: Python GUI With TkInter\n     uses: Nuitka/Nuitka-Action@main\n     with:\n       nuitka-version: main\n       script-name: my_tkinter_gui_app.py\n       mode: standalone\n       enable-plugins: tk-inter\n\nMulti-Platform Builds\n=====================\n\nConfigure a runner of the appropriate operating system to build for a\ngiven platform. You can even do multiple platforms in a single workflow\nusing a matrix strategy, as shown below:\n\n.. code:: yaml\n\n   jobs:\n     build:\n       strategy:\n         matrix:\n           os: [macos-latest, ubuntu-latest, windows-latest]\n\n       runs-on: ${{ matrix.os }}\n\n       steps:\n         - name: Check-out repository\n           uses: actions/checkout@v4\n\n         - name: Setup Python\n           uses: actions/setup-python@v5\n           with:\n             python-version: '3.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax\n             architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified\n             cache: 'pip'\n             cache-dependency-path: |\n               **/requirements*.txt\n\n         - name: Install Dependencies\n           run: |\n             pip install -r requirements.txt -r requirements-dev.txt\n\n         - name: Build Executable\n           uses: Nuitka/Nuitka-Action@main\n           with:\n             nuitka-version: main\n             script-name: your_script.py\n             mode: app\n\n         - name: Upload Artifacts\n           uses: actions/upload-artifact@v4\n           with:\n             name: ${{ runner.os }} Build\n             path: |\n               build/*.exe\n               build/*.bin\n               build/*.app/**/*\n               build/*.dist/**/*\n             include-hidden-files: true\n\nYou will see that it creates executable binaries for Mac, Linux, and\nWindows.\n\nPython and Package Dependencies\n===============================\n\nThis action installs the following **Python** packages specified by the\nrequirements.txt of this action repo.\n\n.. code:: text\n\n   ordered-set==4.1.0\n       # via -r requirements.in\n   wheel==0.38.4\n       # via -r requirements.in\n   zstandard==0.20.0\n\nValue syntax\n============\n\nSince Action workflows accept no list values, for options that in\n**Nuitka** can be given multiple times, there is support for splitting\nthose arguments by newline, which allows you to specify multiple values\nlike this.\n\n.. code:: yaml\n\n   include-data-dir: |\n     source_path_dir1=dest_path_dir1\n     source_path_dir2=dest_path_dir2\n     source_path_dir3=dest_path_dir3\n\n**************************\n Additional Documentation\n**************************\n\nSee `Nuitka <https://github.com/Nuitka/Nuitka>`_ for full documentation\non Nuitka. It's a really fantastic tool!\n\n*********\n License\n*********\n\n**Nuitka Action** scripts and documentation in this project are under\nthe `MIT License <LICENSE>`_.\n\n**Nuitka** has the `Apache 2.0 License\n<https://github.com/Nuitka/Nuitka/blob/develop/LICENSE.txt>`_\n\n**Python** has the `Python Software Foundation (PSF) License\n<https://github.com/python/cpython/blob/main/LICENSE>`_.\n\nYou are Responsible for Complying with your Project's Dependencies' Licenses\n============================================================================\n\nThis tool compiles and copies your project's package dependencies (and\ntheir dependencies) into the output executable, which will be considered\na combined or derivative work of those packages.\n\n.. important::\n\n   You are responsible for compliance with the licenses of your\n   project's package dependencies. Please consult with an attorney about\n   your individual/project's compliance needs and strategy.\n\nHow to Comply With Dependency Package Licenses\n==============================================\n\nThere are some license checker tools that you might consider integrating\nwith your project. Generally speaking, they enable you to specify which\nlicenses (or types) are approved or disapproved and alert you whenever\nyour project has a package dependency that is not approved.\n\nHere is a list of license checker tools:\n\n-  `python-license-check\n   <https://github.com/dhatim/python-license-check>`_ - can be run as a\n   GitHub pre-commit hook.\n\n-  `dependencies-license-compliance-checker\n   <https://github.com/marketplace/actions/dependencies-license-compliance-checker>`_\n   - a github action that you can run before your executable build.\n"
  },
  {
    "path": "action.yml",
    "content": "# yamllint disable rule:line-length\n# yamllint disable rule:comments\n# too many spelling things, spell-checker: disable\n---\nname: Build executables or extension modules from Python projects\n\nbranding:\n  icon: \"package\"\n  color: \"blue\"\n\ndescription: \"Build a modules or standalone executable from python code using Nuitka on Mac/Linux/Windows. Very wide range of compatibility.\"\n\ninputs:\n  working-directory:\n    default: \".\"\n    description: \"Directory to run nuitka in if not top level\"\n\n  nuitka-version:\n    default: \"main\"\n    description: \"Version of nuitka to use, branches, tags work\"\n\n  ### Only Required Input ###\n  script-name:\n    required: true\n    description: \"Path to python script that is to be built.\"\n\n  # Enable Nuitka Commercial features of Nuitka using a PAT (personal access token)\n  access-token:\n    description: \"Github personal access token of an account authorized to access the Nuitka-commercial repo\"\n\n  ### Nuitka Modes ###\n  mode:\n    description: |\n      Mode in which to compile. \"accelerated\" runs in your Python\n      installation and depends on it. \"standalone\" creates a folder\n      with an executable contained to run it. \"onefile\" creates a\n      single self extracting executable to deploy. \"app\" is \"onefile\"\n      except on macOS where it creates an app bundle. \"app-dist\" is\n      \"standalone\" except on macOS where it creates an app bundle.\n      \"module\" makes an extension module from a single module and\n      \"package\" compiles a whole package into an extension module.\n      \"dll\" is currently under development and not for users yet.\n      Default is 'accelerated'.\n    default: app\n  python-flag:\n    description: |\n      Python flags to use. Default is what you are using to run Nuitka, this\n      enforces a specific mode. These are options that also exist to standard\n      Python executable. Currently supported: \"-S\" (alias \"no_site\"),\n      \"static_hashes\" (do not use hash randomization), \"no_warnings\" (do not\n      give Python run time warnings), \"-O\" (alias \"no_asserts\"), \"no_docstrings\"\n      (do not use doc strings), \"-u\" (alias \"unbuffered\"), \"isolated\" (do not\n      load outside code), \"-P\" (alias \"safe_path\", do not used current directory\n      in module search) and \"-m\" (package mode, compile as \"package.__main__\").\n      Default empty.\n  python-debug:\n    description: |\n      Use debug version or not. Default uses what you are using to run Nuitka, most\n      likely a non-debug version. Only for debugging and testing purposes.\n  project:\n    description: |\n      Compile the project in the current directory by extracting configuration\n      from it. Default is not to use it.\n\n  ### Nuitka Plugins to enable. ###\n  enable-plugins:\n    description: |\n      Enabled plugins. Must be plug-in names. Use '--plugin-list' to query the\n      full list and exit. Default empty.\n  disable-plugins:\n    description: |\n      Disabled plugins. Must be plug-in names. Use '--plugin-list' to query the\n      full list and exit. Most standard plugins are not a good idea to disable.\n      Default empty.\n  user-plugin:\n    description: |\n      The file name of user plugin. Can be given multiple times. Default empty.\n  plugin-no-detection:\n    description: |\n      Plugins can detect if they might be used, and the you can disable the warning\n      via \"--disable-plugin=plugin-that-warned\", or you can use this option to disable\n      the mechanism entirely, which also speeds up compilation slightly of course as\n      this detection code is run in vain once you are certain of which plugins to\n      use. Defaults to off.\n  module-parameter:\n    description: |\n      Provide a module parameter. You are asked by some packages\n      to provide extra decisions. Format is currently\n      --module-parameter=module.name-option-name=value\n      Default empty.\n\n  ### Nuitka Tracing/Reporting features\n  report:\n    description: |\n      Report module, data files, compilation, plugin, etc. details in an XML output file. This\n      is also super useful for issue reporting. These reports can e.g. be used to re-create\n      the environment easily using it with '--create-environment-from-report', but contain a\n      lot of information. Default is off.\n  report-diffable:\n    description: |\n      Report data in diffable form, i.e. no timing or memory usage values that vary from run\n      to run. Default is off.\n  report-user-provided:\n    description: |\n      Report data from you. This can be given multiple times and be\n      anything in 'key=value' form, where key should be an identifier, e.g. use\n      '--report-user-provided=pipenv-lock-hash=64a5e4' to track some input values.\n      Default is empty.\n  report-template:\n    description: |\n      Report via template. Provide template and output filename 'template.rst.j2:output.rst'. For\n      built-in templates, check the User Manual for what these are. Can be given multiple times.\n      Default is empty.\n  quiet:\n    description: |\n      Disable all information outputs, but show warnings.\n      Defaults to off.\n  show-scons:\n    description: |\n      Run the C building backend Scons with verbose information, showing the executed commands,\n      detected compilers. Defaults to off.\n  show-memory:\n    description: |\n      Provide memory information and statistics.\n      Defaults to off.\n\n  ### Control the inclusion of data files in result. ###\n  include-package-data:\n    description: |\n      Include data files for the given package name. DLLs and extension modules\n      are not data files and never included like this. Can use patterns the\n      filenames as indicated below. Data files of packages are not included\n      by default, but package configuration can do it.\n      This will only include non-DLL, non-extension modules, i.e. actual data\n      files. After a \":\" optionally a filename pattern can be given as\n      well, selecting only matching files. Examples:\n      \"--include-package-data=package_name\" (all files)\n      \"--include-package-data=package_name:*.txt\" (only certain type)\n      \"--include-package-data=package_name:some_filename.dat (concrete file)\n      Default empty.\n  include-data-files:\n    description: |\n      Include data files by filenames in the distribution. There are many\n      allowed forms. With '--include-data-files=/path/to/file/*.txt=folder_name/some.txt' it\n      will copy a single file and complain if it's multiple. With\n      '--include-data-files=/path/to/files/*.txt=folder_name/' it will put\n      all matching files into that folder. For recursive copy there is a\n      form with 3 values that '--include-data-files=/path/to/scan=folder_name/=**/*.txt'\n      that will preserve directory structure. Default empty.\n  include-data-dir:\n    description: |\n      Include data files from complete directory in the distribution. This is\n      recursive. Check '--include-data-files' with patterns if you want non-recursive\n      inclusion. An example would be '--include-data-dir=/path/some_dir=data/some_dir'\n      for plain copy, of the whole directory. All non-code files are copied, if you\n      want to use '--noinclude-data-files' option to remove them. Default empty.\n  noinclude-data-files:\n    description: |\n      Do not include data files matching the filename pattern given. This is against\n      the target filename, not source paths. So to ignore a file pattern from package\n      data for 'package_name' should be matched as 'package_name/*.txt'. Or for the\n      whole directory simply use 'package_name'. Default empty.\n  include-data-files-external:\n    description: |\n      Include the specified data file patterns outside of the onefile binary,\n      rather than on the inside. First files have to be specified as included\n      with other `--include-*data*` options, and then this refers to target\n      paths inside the distribution that are then put external to it.\n      Default empty.\n  include-raw-dir:\n    description: |\n      Include raw directories completely in the distribution. This is\n      recursive. Check '--include-data-dir' to use the sane option.\n      Default empty.\n\n  ### Control the inclusion of modules and packages in result. ###\n  include-package:\n    description: 'Include a whole package. Give as a Python namespace, e.g. \"some_package.sub_package\" and Nuitka will then find it and include it and all the modules found below that disk location in the binary or extension module it creates, and make it available for import by the code. To avoid unwanted sub packages, e.g. tests you can e.g. do this \"--nofollow-import-to=*.tests\". Default empty.'\n  include-module:\n    description: 'Include a single module. Give as a Python namespace, e.g. \"some_package.some_module\" and Nuitka will then find it and include it in the binary or extension module it creates, and make it available for import by the code. Default empty.'\n  include-plugin-directory:\n    description: \"Include the content of that directory, no matter if it is used by the given main program in a visible form. Overrides all other inclusion options. Can be given multiple times. Default empty.\"\n  include-plugin-files:\n    description: \"Include into files matching the PATTERN. Overrides all other follow options. Can be given multiple times. Default empty.\"\n  prefer-source-code:\n    description: \"For already compiled extension modules, where there is both a source file and an extension module, normally the extension module is used, but it should be better to compile the module from available source code for best performance. If not desired, there is --no- prefer-source-code to disable warnings about it. Default off.\"\n  nofollow-import-to:\n    description: \"Do not follow to that module name even if used, or if a package name, to the whole package in any case, overrides all other options. Can be given multiple times. Default empty.\"\n  user-package-configuration-file:\n    description: \"User provided YAML file with package configuration. You can include DLLs, remove bloat, add hidden dependencies. Check User Manual for a complete description of the format to use. Can be given multiple times. Defaults to empty.\"\n\n  ### Environment control ###\n  force-runtime-environment-variable:\n    description: |\n      Force an environment variables to a given value. Default empty.\n\n  ### Onefile behavior details ###\n  onefile-tempdir-spec:\n    description: \"Use this as a folder to unpack onefile. Defaults to '%TEMP%\\\\onefile_%PID%_%TIME%', but e.g. '%CACHE_DIR%/%COMPANY%/%PRODUCT%/%VERSION%' would be cached and good too.\"\n  onefile-child-grace-time:\n    description: \"When stopping the child, e.g. due to CTRL-C or shutdown, how much time to allow before killing it the hard way. Unit is ms. Default 5000.\"\n  onefile-no-compression:\n    description: \"When creating the onefile, disable compression of the payload. Default is false.\"\n\n  warn-implicit-exceptions:\n    description: |\n      Enable warnings for implicit exceptions detected at compile time.\n  warn-unusual-code:\n    description: |\n      Enable warnings for unusual code detected at compile time.\n  assume-yes-for-downloads:\n    description: |\n      Allow Nuitka to download external code if necessary, e.g. dependency\n      walker, ccache, and even gcc on Windows. To disable, redirect input\n      from nul device, e.g. \"</dev/null\" or \"<NUL:\". Default is to prompt.\n    default: true\n  nowarn-mnemonic:\n    description: |\n      Disable warning for a given mnemonic. These are given to make sure you are aware of\n      certain topics, and typically point to the Nuitka website. The mnemonic is the part\n      of the URL at the end, without the HTML suffix. Can be given multiple times and\n      accepts shell pattern. Default empty.\n\n  ### Deployment modes ###\n  deployment:\n    description: |\n      Disable code aimed at making finding compatibility issues easier. This\n      will e.g. prevent execution with \"-c\" argument, which is often used by\n      code that attempts run a module, and causes a program to start itself\n      over and over potentially. Disable once you deploy to end users, for\n      finding typical issues, this is very helpful during development. Default\n      off.\n  no-deployment-flag:\n    description: |\n      Keep deployment mode, but disable selectively parts of it. Errors from\n      deployment mode will output these identifiers. Default empty.\n\n  ### Output choices ##\n  output-dir:\n    description: \"Directory for output builds\"\n    default: build\n  output-file:\n    description: \"Specify how the executable should be named. For extension modules there is no choice, also not for standalone mode and using it will be an error. This may include path information that needs to exist though. Defaults to '<program_name>' on this platform. .exe)\"\n\n  ### Console handling ###\n  disable-console:\n    description: \"Obsolete as of Nuitka 2.3: When compiling for Windows or macOS, disable the console window and create a GUI application. Defaults to false.\"\n  enable-console:\n    description: \"Obsolete as of Nuitka 2.3: When compiling for Windows or macOS, enable the console window and create a GUI application. Defaults to false and tells Nuitka your choice is intentional.\"\n\n  ### Version information ###\n  company-name:\n    description: |\n      Name of the company to use in version information. Defaults to unused.\n  product-name:\n    description: |\n      Name of the product to use in version information. Defaults to base filename of the binary.\n  file-version:\n    description: |\n      File version to use in version information. Must be a sequence of up to 4\n      numbers, e.g. 1.0 or 1.0.0.0, no more digits are allowed, no strings are\n      allowed. Defaults to unused.\n  product-version:\n    description: |\n      Product version to use in version information. Same rules as for file version.\n      Defaults to unused.\n  file-description:\n    description: |\n      Description of the file used in version information. Windows only at this time. Defaults to binary filename.\n  copyright:\n    description: |\n      Copyright used in version information. Windows/macOS only at this time. Defaults to not present.\n  trademarks:\n    description: |\n      Trademark used in version information. Windows/macOS only at this time. Defaults to not present.\n\n  ### General OS controls ###\n  force-stdout-spec:\n    description: |\n      Force standard output of the program to go to this location. Useful for programs with\n      disabled console and programs using the Windows Services Plugin of Nuitka commercial.\n      Defaults to not active, use e.g. '{PROGRAM_BASE}.out.txt', i.e. file near your program,\n      check User Manual for full list of available values.\n  force-stderr-spec:\n    description: |\n      Force standard error of the program to go to this location. Useful for programs with\n      disabled console and programs using the Windows Services Plugin of Nuitka commercial.\n      Defaults to not active, use e.g. '{PROGRAM_BASE}.err.txt', i.e. file near your program,\n      check User Manual for full list of available values.\n\n  ### Windows specific controls ###\n  windows-console-mode:\n    description: |\n      Select console mode to use. Default mode is 'force' and creates a\n      console window unless the program was started from one. With 'disable'\n      it doesn't create or use a console at all. With 'attach' an existing\n      console will be used for outputs. With 'hide' a newly spawned console\n      will be hidden and an already existing console will behave like\n      'force'. Default is 'force'.\n  windows-icon-from-ico:\n    description: |\n      Add executable icon. Can be given multiple times for different resolutions\n      or files with multiple icons inside. In the later case, you may also suffix\n      with #<n> where n is an integer index starting from 1, specifying a specific\n      icon to be included, and all others to be ignored.\n  windows-icon-from-exe:\n    description: |\n      Copy executable icons from this existing executable (Windows only).\n  onefile-windows-splash-screen-image:\n    description: |\n      When compiling for Windows and onefile, show this while loading the application. Defaults to off.\n  windows-uac-admin:\n    description: |\n      Request Windows User Control, to grant admin rights on execution. (Windows only). Defaults to off.\n  windows-uac-uiaccess:\n    description: |\n      Request Windows User Control, to enforce running from a few folders only, remote\n      desktop access. (Windows only). Defaults to off.\n\n  ### macOS specific controls: ###\n  macos-app-console-mode:\n    description: |\n      Select console mode to use. Default mode is 'disable' and creates no\n      console window. With 'force' it will create a console window when\n      launched from Finder. Default is 'disable'.\n  macos-target-arch:\n    description: |\n      What architectures is this to supposed to run on. Default and limit\n      is what the running Python allows for. Default is \"native\" which is\n      the architecture the Python is run with.\n  macos-app-icon:\n    description: |\n      Add icon for the application bundle to use. Can be given only one time. Defaults to Python icon if available.\n  macos-app-create-dmg:\n    description: |\n      When compiling for macOS, create a DMG file for the application bundle.\n      Defaults to off.\n  macos-signed-app-name:\n    description: |\n      Name of the application to use for macOS signing. Follow \"com.YourCompany.AppName\"\n      naming results for best results, as these have to be globally unique, and will\n      potentially grant protected API accesses.\n  macos-app-name:\n    description: |\n      Name of the product to use in macOS bundle information. Defaults to base\n      filename of the binary.\n  macos-app-mode:\n    description: |\n      Mode of application for the application bundle. When launching a Window, and appearing\n      in the dock is desired, default value \"gui\" is a good fit. Without a Window ever, the\n      application is a \"background\" application. For UI elements that get to display later,\n      \"ui-element\" is in-between. The application will not appear in the dock, but get full\n      access to desktop when it does open a Window later.\n  macos-prohibit-multiple-instances:\n    description: |\n      For application bundles, set the flag \"LSMultipleInstancesProhibited\" to prevent\n      launching multiple instances of the application. Default is off.\n  macos-sign-identity:\n    description: |\n      When signing on macOS, by default an ad-hoc identify will be used, but with this\n      option your get to specify another identity to use. The signing of code is now\n      mandatory on macOS and cannot be disabled. Use \"auto\" to detect your only identity\n      installed. Default \"ad-hoc\" if not given.\n  macos-sign-notarization:\n    description: |\n      When signing for notarization, using a proper TeamID identity from Apple, use\n      the required runtime signing option, such that it can be accepted.\n  macos-app-version:\n    description: |\n      Product version to use in macOS bundle information. Defaults to \"1.0\" if\n      not given.\n  macos-app-protected-resource:\n    description: |\n      Request an entitlement for access to a macOS protected resources, e.g.\n      \"NSMicrophoneUsageDescription:Microphone access for recording audio.\"\n      requests access to the microphone and provides an informative text for\n      the user, why that is needed. Before the colon, is an OS identifier for\n      an access right, then the informative text. Legal values can be found on\n      https://developer.apple.com/documentation/bundleresources/information_property_list/protected_resources\n      and the option can be specified multiple times. Default empty.\n  macos-sign-keyring-filename:\n    description: |\n      Path to the certificate file to be used for macOS code signing.\n      This is used in conjunction with '--macos-sign-identity'. Default empty.\n  macos-sign-keyring-password:\n    description: |\n      Password for the certificate file provided via\n      '--macos-sign-keyring-filename'. Default empty.\n\n  ### Linux specific controls: ###\n  linux-icon:\n    description: |\n      Add executable icon for onefile binary to use. Can be given only one time. Defaults to Python icon if available.\n\n\n  ### Backend C compiler choices. ###\n  clang:\n    description: |\n      Enforce the use of clang. On Windows this requires a working Visual\n      Studio version to piggy back on. Defaults to off.\n  mingw64:\n    description: |\n      Enforce the use of MinGW64 on Windows. Defaults to off unless MSYS2 with MinGW Python is used.\n  zig:\n    description: |\n      Enforce usage of Zig on for C compilation. Defaults to off.\n  msvc:\n    description: |\n      Enforce the use of specific MSVC version on Windows. Allowed values\n      are e.g. \"14.3\" (MSVC 2022) and other MSVC version numbers, specify\n      \"list\" for a list of installed compilers, or use \"latest\".\n\n      Defaults to latest MSVC being used if installed, otherwise MinGW64\n      is used.\n  jobs:\n    description: |\n      Specify the allowed number of parallel C compiler jobs. Negative values\n      are system CPU minus the given value. Defaults to the full system CPU\n      count unless low memory mode is activated, then it defaults to 1.\n  reproducible:\n    description: |\n      Enable reproducible builds. Allowed values are \"yes\", \"no\", and \"auto\"\n      (where it's \"no\" on Windows and \"yes\" otherwise). Defaults to \"auto\".\n  lto:\n    description: |\n      Use link time optimizations (MSVC, gcc, clang). Allowed values are\n      \"yes\", \"no\", and \"auto\" (when it's known to work). Defaults to\n      \"auto\".\n  static-libpython:\n    description: |\n      Use static link library of Python. Allowed values are \"yes\", \"no\",\n      and \"auto\" (when it's known to work). Defaults to \"auto\".\n  cf-protection:\n    description: |\n      This option is gcc specific. For the gcc compiler, select the\n      \"cf-protection\" mode. Default \"auto\" is to use the gcc default\n      value, but you can override it, e.g. to disable it with \"none\"\n      value. Refer to gcc documentation for \"-fcf-protection\" for the\n      details.\n\n  ### Debug features. ###\n  debug:\n    description: |\n      Executing all self checks possible to find errors in Nuitka, do not use for\n      production. Defaults to off.\n  debug-self-forking:\n    description: |\n      For fork bombs, debug what Nuitka does when it encounters a relaunch of itself.\n      Defaults to off.\n  no-debug-immortal-assumptions:\n    description: |\n      Disable check normally done with \"--debug\". With Python3.12+ do not check known\n      immortal object assumptions. Some C libraries corrupt them. Defaults to check\n      being made if \"--debug\" is on.\n  no-debug-c-warnings:\n    description: |\n      Disable check normally done with \"--debug\". The C compilation may produce\n      warnings, which it often does for some packages without these being issues,\n      esp. for unused values.\n  unstripped:\n    description: |\n      Keep debug info in the resulting object file for better debugger interaction.\n      Defaults to off.\n  trace-execution:\n    description: |\n      Traced execution output, output the line of code before executing it.\n      Defaults to off.\n  xml:\n    description: |\n      Write the internal program structure, result of optimization in XML form to given filename.\n  experimental:\n    description: |\n      Use features declared as 'experimental'. May have no effect if no experimental\n      features are present in the code. Uses secret tags (check source) per\n      experimented feature.\n  low-memory:\n    description: |\n      Attempt to use less memory, by forking less C compilation jobs and using\n      options that use less memory. For use on embedded machines. Use this in\n      case of out of memory problems. Defaults to off.\n\n  ### Plugin options of 'automatic-updates' (categories: commercial, feature) ###\n  auto-update-url-spec:\n    description: |\n      URL to check for automatic updates. Default empty, i.e. not updates.\n  auto-update-debug:\n    description: |\n      Debug automatic updates at runtime printing messages. Default False.\n  auto-update-toml-file:\n    description: |\n      Path to generate a TOML update config for the compiled binary. Default empty, i.e. do not generate.\n\n  ### Plugin options of 'windows-service' (categories: commercial, feature) ###\n  windows-service-name:\n    description: |\n      The Windows service name.\n  windows-service-grace-time:\n    description: |\n      For shutdown, wait this extra time before killing. Unit is ms, and default is 2000,\n      i.e. it waits 2 seconds to allow cleanup. Increase if you need more time, decrease\n      if you want faster service shutdown.\n  windows-service-start-mode:\n    description: |\n      Pick the service start mode, value \"auto\" starts automatically at\n      reboot without login, \"demand\" (default) must be started manually,\n      and \"disabled\" cannot be started, requires further action to\n      change it.\n  windows-service-cli:\n    description: |\n      Should the program allow to be ran from the command line. By default\n      it does not and only outputs a message it is disallowed.\n\n  ### Plugin options of 'esigner' (categories: commercial, integration, signing) ###\n  esigner-sign-deep:\n    description: |\n      Also sign included DLLs (shared libraries) and extension modules in the distribution.\n      Use with care, as this may break some things.\n  esigner-disable-signing-cache:\n    description: |\n      Disable usage of the hashing based signing cache. This will make deep signing\n      much slower.\n  esigner-tool-path:\n    description: |\n      Path to the 'CodeSignTool' executable/batch file provided by SSL.com.\n  esigner-username:\n    description: |\n      SSL.com username.\n  esigner-password:\n    description: |\n      SSL.com password.\n  esigner-credential-id:\n    description: |\n      Credential ID for the signing certificate.\n  esigner-totp-secret:\n    description: |\n      TOTP secret for the signing account (static secret).\n\n  ### Plugin options of 'signtool' (categories: commercial, integration, signing) ###\n  windows-sign-deep:\n    description: |\n      Also sign included DLLs (shared libraries) and extension modules in the distribution.\n      Use with care, as this may break some things.\n  windows-disable-signing-cache:\n    description: |\n      Disable usage of the hashing based signing cache. This will make deep signing\n      much slower.\n  windows-signing-tool-path:\n    description: |\n      The 'signtool' executable. You may make this a wrapper script should you want very\n      specific options, by default `signtool` from PATH or used MSVC used is used.\n  windows-certificate-name:\n    description: |\n      Name of the certificate to use. This will be used to sign the binary.\n  windows-certificate-sha1:\n    description: |\n      Checksum of the certificate to use. This will be used to sign the binary.\n  windows-certificate-filename:\n    description: |\n      Filename of the certificate, typically a \".pfx\" file. This will be used to sign\n      the binary.\n  windows-certificate-password:\n    description: |\n      Password of the certificate filename used. Defaults to empty, must be\n      provided to successfully sign if certificate the file has one.\n  windows-signed-content-comment:\n    description: |\n      Comment to be used for the signed comments. Optional, defaults to not given.\n\n  ### Plugin options of 'anti-debugger' (categories: commercial, protection) ###\n  anti-debugger-debugging:\n    description: |\n      Enables debug outputs for the debugger plugin, so that it e.g. says\n      why it rejects something.\n\n  ### Plugin options of 'data-hiding' (categories: commercial, protection) ###\n  data-hiding-salt-value:\n    description: |\n      Salt value to make encryption result unique.\n\n  ### Plugin options of 'datafile-inclusion-ng' (categories: commercial, protection) ###\n  embed-data-files-compile-time-pattern:\n    description: |\n      Pattern of data files to embed for use during compile time. These should\n      match target filenames.\n  embed-data-files-run-time-pattern:\n    description: |\n      Pattern of data files to embed for use during run time. These should\n      match target filenames.\n  embed-data-files-qt-resource-pattern:\n    description: |\n      Pattern of data files to embed for use with Qt at run time. These should\n      match target filenames.\n  embed-debug-qt-resources:\n    description: |\n      For debugging purposes, print out information for Qt resources not found.\n\n  ### Plugin options of 'dll-embedding' (categories: commercial, protection) ###\n  embed-dll-pattern:\n    description: |\n      Pattern of DLLs to embed (glob style). Matches against the destination path\n      (e.g. package/ext.pyd or library.dll).\n\n  ### Plugin options of 'traceback-encryption' (categories: commercial, protection) ###\n  encryption-key:\n    description: |\n      The encryption key to use.\n  encrypt-stdout:\n    description: |\n      Apply encryption to standard output.\n  encrypt-stderr:\n    description: |\n      Apply encryption to standard error.\n  encrypt-debug-init:\n    description: |\n      In case the encryption fails to install, do not abort, but run normally and trace error unencrypted.\n  encrypt-crypto-package:\n    description: |\n      These are two very similar packages that can both do the encryption, and\n      to avoid duplication in case one of your packages requires the other,\n      you get to select which one to use by the plugin code. By default\n      \"pycryptodomex\" is used and only legacy code uses that. However it\n      will fallback to \"pycryptodome\" if that's the only one installed,\n      and you can enforce Nuitka choice if both are for some reason.\n\n  ### Plugin options of 'upx' (categories: integration) ###\n  upx-binary:\n    description: |\n      The UPX binary to use or the directory it lives in, by default `upx` from PATH is used.\n  upx-disable-cache:\n    description: |\n      Do not cache UPX compression result, by default DLLs are cached, exe files are not.\n\n  ### Plugin options of 'dill-compat' (categories: package-support) ###\n  include-pickle-support-module:\n    description: |\n      Include support for these modules to pickle nested compiled functions. You\n      can use \"all\" which is the default, but esp. in module mode, just might\n      want to limit yourself to not create unnecessary run-time usages. For\n      standalone mode, you can leave it at the default, at it will detect\n      the usage.\n\n  ### Plugin options of 'pmw-freezer' (categories: package-support) ###\n  include-pmw-blt:\n    description: |\n      Should 'Pmw.Blt' not be included, Default is to include it.\n  include-pmw-color:\n    description: |\n      Should 'Pmw.Color' not be included, Default is to include it.\n\n  ### Plugin options of 'tk-inter' (categories: package-support) ###\n  tk-library-dir:\n    description: |\n      The Tk library dir. Nuitka is supposed to automatically detect it, but you can\n      override it here. Default is automatic detection.\n  tcl-library-dir:\n    description: |\n      The Tcl library dir. See comments for Tk library dir.\n\n  ### Plugin options of 'pyside6' (same for 'pyside2', 'pyqt6', 'pyqt5' plugins) (categories: package-support, qt-binding) ###\n  include-qt-plugins:\n    description: |\n      Which Qt plugins to include. These can be big with dependencies, so\n      by default only the \"sensible\" ones are included, but you can also put\n      \"all\" or list them individually. If you specify something that does\n      not exist, a list of all available will be given.\n  noinclude-qt-plugins:\n    description: |\n      Which Qt plugins to not include. This removes things, so you can\n      ask to include \"all\" and selectively remove from there, or even\n      from the default sensible list.\n  noinclude-qt-translations:\n    description: |\n      Include Qt translations with QtWebEngine if used. These can be a lot\n      of files that you may not want to be included.\n  qt-debug-plugins:\n    description: |\n      Sets the \"QT_DEBUG_PLUGINS\" environment variable to \"1\" in the\n      created standalone, so you can debug what plugin loading issues\n      there might be.\n\n\n  ### Action controls ###\n  disable-cache:\n    description: \"Disables caching of compiled binaries. Defaults to false.\"\n\n  caching-key:\n    description: \"An optional string to make the Nuitka build cache key more specific. This can be used for manual cache invalidation or to segment caches based on custom criteria. This key itself is not passed to Nuitka.\"\n    required: false\n    default: \"caching\"\n\n\nruns:\n  using: \"composite\"\n  steps:\n    - name: Setup Environment Variables\n      if: ${{ !inputs.disable-cache }}\n      shell: bash\n      run: |\n        echo \"NUITKA_CACHE_DIR=${{ github.action_path }}/nuitka/cache\" >> $GITHUB_ENV\n        echo \"PYTHON_VERSION=$(python --version | awk '{print $2}' | cut -d '.' -f 1,2)\" >> $GITHUB_ENV\n    - name: Install Dependencies\n      shell: bash\n      run: |\n        pip install -r \"${{ github.action_path }}/requirements.txt\"\n\n        # With commercial access token, use that repository.\n        if [ \"${{ inputs.access-token }}\" != \"\" ]; then\n          repo_url=\"git+https://${{ inputs.access-token }}@github.com/Nuitka/Nuitka-commercial.git\"\n        else\n          repo_url=\"git+https://$@github.com/Nuitka/Nuitka.git\"\n        fi\n\n        pip install \"${repo_url}/@${{ inputs.nuitka-version }}#egg=nuitka\"\n    - name: Install ccache\n      # TODO: Proper \"in\" test could make sense here.\n      if: ${{ inputs.disable-cache != 'ccache' && runner.os == 'Linux' }}\n      shell: bash\n      run: |\n        sudo apt-get install -y ccache\n    - name: Cache Nuitka cache directory\n      if: ${{ !inputs.disable-cache }}\n      uses: actions/cache@v5\n      with:\n        path: ${{ env.NUITKA_CACHE_DIR }}\n        key: nuitka-${{ inputs.caching-key }}-${{ runner.os }}-${{ runner.arch }}-python-${{ env.PYTHON_VERSION }}-nuitka-${{ github.sha }}\n        restore-keys: |\n          nuitka-${{ inputs.caching-key }}-${{ runner.os }}-${{ runner.arch }}-python-${{ env.PYTHON_VERSION }}-\n          nuitka-${{ inputs.caching-key }}-${{ runner.os }}-${{ runner.arch }}-\n\n    - name: Build with Nuitka\n      shell: bash\n      env:\n        PYTHONUTF8: 1\n      run: |\n        set -e\n\n        # Prepare the JSON string for Nuitka, filtering out action-specific keys using Python\n        NUITKA_WORKFLOW_INPUTS=$(echo '${{ toJson(inputs) }}' | python -c \"import sys, json; data = json.load(sys.stdin); [data.pop(k, None) for k in ['nuitka-version', 'working-directory', 'access-token', 'disable-cache', 'caching-key']]; json.dump(data, sys.stdout, ensure_ascii=False)\")\n\n        # Pass the filtered JSON to Nuitka via an environment variable\n        export NUITKA_WORKFLOW_INPUTS\n        python -m nuitka --github-workflow-options\n      working-directory: ${{ inputs.working-directory }}\n"
  },
  {
    "path": "action.yml.j2",
    "content": "# yamllint disable rule:line-length\n# yamllint disable rule:comments\n# too many spelling things, spell-checker: disable\n---\nname: Build executables or extension modules from Python projects\n\nbranding:\n  icon: \"package\"\n  color: \"blue\"\n\ndescription: \"Build a modules or standalone executable from python code using Nuitka on Mac/Linux/Windows. Very wide range of compatibility.\"\n\ninputs:\n  working-directory:\n    default: \".\"\n    description: \"Directory to run nuitka in if not top level\"\n\n  nuitka-version:\n    default: \"main\"\n    description: \"Version of nuitka to use, branches, tags work\"\n\n  ### Only Required Input ###\n  script-name:\n    required: true\n    description: \"Path to python script that is to be built.\"\n\n  # Enable Nuitka Commercial features of Nuitka using a PAT (personal access token)\n  access-token:\n    description: \"Github personal access token of an account authorized to access the Nuitka-commercial repo\"\n\n  ### Nuitka Modes ###\n{{ get_top_options() }}\n\n  ### Nuitka Plugins to enable. ###\n{{ get_group_options(\"Plugin control\") }}\n\n  ### Nuitka Tracing/Reporting features\n{{ get_group_options(\"Tracing features\") }}\n\n  ### Control the inclusion of data files in result. ###\n{{ get_group_options(\"Data files\") }}\n\n  ### Control the inclusion of modules and packages in result. ###\n  include-package:\n    description: 'Include a whole package. Give as a Python namespace, e.g. \"some_package.sub_package\" and Nuitka will then find it and include it and all the modules found below that disk location in the binary or extension module it creates, and make it available for import by the code. To avoid unwanted sub packages, e.g. tests you can e.g. do this \"--nofollow-import-to=*.tests\". Default empty.'\n  include-module:\n    description: 'Include a single module. Give as a Python namespace, e.g. \"some_package.some_module\" and Nuitka will then find it and include it in the binary or extension module it creates, and make it available for import by the code. Default empty.'\n  include-plugin-directory:\n    description: \"Include the content of that directory, no matter if it is used by the given main program in a visible form. Overrides all other inclusion options. Can be given multiple times. Default empty.\"\n  include-plugin-files:\n    description: \"Include into files matching the PATTERN. Overrides all other follow options. Can be given multiple times. Default empty.\"\n  prefer-source-code:\n    description: \"For already compiled extension modules, where there is both a source file and an extension module, normally the extension module is used, but it should be better to compile the module from available source code for best performance. If not desired, there is --no- prefer-source-code to disable warnings about it. Default off.\"\n  nofollow-import-to:\n    description: \"Do not follow to that module name even if used, or if a package name, to the whole package in any case, overrides all other options. Can be given multiple times. Default empty.\"\n  user-package-configuration-file:\n    description: \"User provided YAML file with package configuration. You can include DLLs, remove bloat, add hidden dependencies. Check User Manual for a complete description of the format to use. Can be given multiple times. Defaults to empty.\"\n\n  ### Environment control ###\n{{ get_group_options(\"Environment control\") }}\n\n  ### Onefile behavior details ###\n  onefile-tempdir-spec:\n    description: \"Use this as a folder to unpack onefile. Defaults to '%TEMP%\\\\onefile_%PID%_%TIME%', but e.g. '%CACHE_DIR%/%COMPANY%/%PRODUCT%/%VERSION%' would be cached and good too.\"\n  onefile-child-grace-time:\n    description: \"When stopping the child, e.g. due to CTRL-C or shutdown, how much time to allow before killing it the hard way. Unit is ms. Default 5000.\"\n  onefile-no-compression:\n    description: \"When creating the onefile, disable compression of the payload. Default is false.\"\n\n{{ get_group_options(\"Control the warnings to be given by Nuitka\") }}\n\n  ### Deployment modes ###\n{{ get_group_options(\"Deployment control\") }}\n\n  ### Output choices ##\n  output-dir:\n    description: \"Directory for output builds\"\n    default: build\n  output-file:\n    description: \"Specify how the executable should be named. For extension modules there is no choice, also not for standalone mode and using it will be an error. This may include path information that needs to exist though. Defaults to '<program_name>' on this platform. .exe)\"\n\n  ### Console handling ###\n  disable-console:\n    description: \"Obsolete as of Nuitka 2.3: When compiling for Windows or macOS, disable the console window and create a GUI application. Defaults to false.\"\n  enable-console:\n    description: \"Obsolete as of Nuitka 2.3: When compiling for Windows or macOS, enable the console window and create a GUI application. Defaults to false and tells Nuitka your choice is intentional.\"\n\n  ### Version information ###\n{{ get_group_options(\"Binary Version Information\") }}\n\n  ### General OS controls ###\n{{ get_group_options(\"General OS controls\") }}\n\n  ### Windows specific controls ###\n{{ get_group_options(\"Windows specific controls\") }}\n\n  ### macOS specific controls: ###\n{{ get_group_options(\"macOS specific controls\") }}\n\n  ### Linux specific controls: ###\n{{ get_group_options(\"Linux specific controls\") }}\n\n\n  ### Backend C compiler choices. ###\n{{ get_group_options(\"Backend C compiler choice\") }}\n\n  ### Debug features. ###\n{{ get_group_options(\"Debug features\") }}\n\n{{ get_plugin_options() }}\n\n  ### Action controls ###\n  disable-cache:\n    description: \"Disables caching of compiled binaries. Defaults to false.\"\n\n  caching-key:\n    description: \"An optional string to make the Nuitka build cache key more specific. This can be used for manual cache invalidation or to segment caches based on custom criteria. This key itself is not passed to Nuitka.\"\n    required: false\n    default: \"caching\"\n\n{% raw %}\nruns:\n  using: \"composite\"\n  steps:\n    - name: Setup Environment Variables\n      if: ${{ !inputs.disable-cache }}\n      shell: bash\n      run: |\n        echo \"NUITKA_CACHE_DIR=${{ github.action_path }}/nuitka/cache\" >> $GITHUB_ENV\n        echo \"PYTHON_VERSION=$(python --version | awk '{print $2}' | cut -d '.' -f 1,2)\" >> $GITHUB_ENV\n    - name: Install Dependencies\n      shell: bash\n      run: |\n        pip install -r \"${{ github.action_path }}/requirements.txt\"\n\n        # With commercial access token, use that repository.\n        if [ \"${{ inputs.access-token }}\" != \"\" ]; then\n          repo_url=\"git+https://${{ inputs.access-token }}@github.com/Nuitka/Nuitka-commercial.git\"\n        else\n          repo_url=\"git+https://$@github.com/Nuitka/Nuitka.git\"\n        fi\n\n        pip install \"${repo_url}/@${{ inputs.nuitka-version }}#egg=nuitka\"\n    - name: Install ccache\n      # TODO: Proper \"in\" test could make sense here.\n      if: ${{ inputs.disable-cache != 'ccache' && runner.os == 'Linux' }}\n      shell: bash\n      run: |\n        sudo apt-get install -y ccache\n    - name: Cache Nuitka cache directory\n      if: ${{ !inputs.disable-cache }}\n      uses: actions/cache@v5\n      with:\n        path: ${{ env.NUITKA_CACHE_DIR }}\n        key: nuitka-${{ inputs.caching-key }}-${{ runner.os }}-${{ runner.arch }}-python-${{ env.PYTHON_VERSION }}-nuitka-${{ github.sha }}\n        restore-keys: |\n          nuitka-${{ inputs.caching-key }}-${{ runner.os }}-${{ runner.arch }}-python-${{ env.PYTHON_VERSION }}-\n          nuitka-${{ inputs.caching-key }}-${{ runner.os }}-${{ runner.arch }}-\n\n    - name: Build with Nuitka\n      shell: bash\n      env:\n        PYTHONUTF8: 1\n      run: |\n        set -e\n\n        # Prepare the JSON string for Nuitka, filtering out action-specific keys using Python\n        NUITKA_WORKFLOW_INPUTS=$(echo '${{ toJson(inputs) }}' | python -c \"import sys, json; data = json.load(sys.stdin); [data.pop(k, None) for k in ['nuitka-version', 'working-directory', 'access-token', 'disable-cache', 'caching-key']]; json.dump(data, sys.stdout, ensure_ascii=False)\")\n\n        # Pass the filtered JSON to Nuitka via an environment variable\n        export NUITKA_WORKFLOW_INPUTS\n        python -m nuitka --github-workflow-options\n      working-directory: ${{ inputs.working-directory }}\n{% endraw %}\n"
  },
  {
    "path": "requirements-dev.in",
    "content": "-c requirements.txt\npip-tools\n"
  },
  {
    "path": "requirements-dev.txt",
    "content": "#\n# This file is autogenerated by pip-compile with python 3.10\n# To update, run:\n#\n#    pip-compile requirements-dev.in\n#\nbuild==0.10.0\n    # via pip-tools\nclick==8.1.3\n    # via pip-tools\ncolorama==0.4.6\n    # via\n    #   build\n    #   click\npackaging==23.0\n    # via build\npep517==0.13.0\n    # via build\npip-tools==6.12.3\n    # via -r requirements-dev.in\npyparsing==3.0.9\n    # via packaging\ntomli==2.0.1\n    # via\n    #   build\n    #   pep517\nwheel==0.38.4\n    # via pip-tools\n\n# The following packages are considered to be unsafe in a requirements file:\n# pip\n# setuptools\n"
  },
  {
    "path": "requirements.in",
    "content": "ordered-set # nuitka compile performance helper\nzstandard # for nuitka's onefile compression\nwheel\n"
  },
  {
    "path": "requirements.txt",
    "content": "#\n# This file is autogenerated by pip-compile with python 3.10\n# To update, run:\n#\n#    pip-compile\n#\nordered-set==4.1.0\n    # via -r requirements.in\nwheel==0.38.4\n    # via -r requirements.in\nzstandard==0.20.0\n    # via -r requirements.in\n"
  },
  {
    "path": "update-from-nuitka-options.py",
    "content": "#!/usr/bin/env python3\n\nimport os\nimport sys\nimport textwrap\n\nfrom nuitka.containers.OrderedSets import OrderedSet\nfrom nuitka.options.CommandLineOptionsTools import OurOptionParser\nfrom nuitka.utils.FileOperations import changeTextFileContents\nfrom nuitka.utils.Jinja2 import getTemplate\n\ntemplate = getTemplate(\n    package_name=None,\n    template_subdir=os.path.dirname(__file__) or \".\",\n    template_name=\"action.yml.j2\",\n    extensions=(\"jinja2.ext.do\",),\n)\n\n\nparser = None\n\n\ndef _getParser():\n    global parser\n\n    if parser is None:\n        sys.argv.append(\"--help-all\")\n        from nuitka.options.OptionParsing import parser\n        from nuitka.plugins.Plugins import addStandardPluginCommandLineOptions\n\n        addStandardPluginCommandLineOptions(parser=parser, plugin_help_mode=True)\n        del sys.argv[-1]\n\n    return parser\n\n\ndef getOptions():\n    for option in _getParser().iterateOptions():\n        # Help option\n        if \"--help\" in option._long_opts:\n            continue\n\n        # Main option is currently not done like this\n        if \"--main\" in option._long_opts:\n            continue\n\n        if not hasattr(option, \"require_compiling\"):\n            continue\n\n        # Non-compiling options do not belong into Nuitka-Action\n        if not option.require_compiling or not option.github_action:\n            continue\n\n        from nuitka.options.OptionParsing import SUPPRESS_HELP\n\n        if option.help is SUPPRESS_HELP:\n            continue\n\n        yield option\n\n\ndef getTopOptions():\n    for option in getOptions():\n        container = getattr(option, \"container\", None)\n\n        if isinstance(container, OurOptionParser):\n            yield option\n\n\ndef getGroupOptions(group_name):\n    for option in getOptions():\n        container = getattr(option, \"container\", None)\n\n        if isinstance(container, OurOptionParser):\n            continue\n\n        if container.title == group_name:\n            yield option\n\n\ndef formatOption(option):\n    help_str = option.help\n    if help_str.startswith(\"[REQUIRED]\"):\n        help_str = help_str[11:]\n\n    assert not help_str[-1].isspace(), option\n\n    result = (\n        option._long_opts[0].lstrip(\"-\")\n        + \":\\n  description: |\\n\"\n        + textwrap.indent(help_str, prefix=\"    \")\n    )\n\n    if option.github_action_default is not None:\n        if type(option.github_action_default) is bool:\n            option.github_action_default = (\n                \"true\" if option.github_action_default else \"false\"\n            )\n\n        assert type(option.github_action_default) is str, option\n        result += \"\\n  default: \" + option.github_action_default\n\n    return result\n\n\ndef get_top_options():\n    result = []\n\n    for option in getTopOptions():\n        result.append(formatOption(option))\n\n    return textwrap.indent(\"\\n\".join(result), \"  \")\n\n\ndef get_group_options(group_caption):\n    result = []\n\n    for option in getGroupOptions(group_caption):\n        result.append(formatOption(option))\n\n    return textwrap.indent(\"\\n\".join(result), \"  \")\n\n\ndef get_plugin_options():\n    plugin_groups = OrderedSet()\n\n    for option in getOptions():\n        container = getattr(option, \"container\", None)\n        if isinstance(container, OurOptionParser):\n            continue\n\n        # TODO: No support for Nuitka VM yet.\n        if \"pelock\" in container.title or \"themida\" in container.title:\n            continue\n\n        if container.title.startswith(\"Plugin options of \"):\n            plugin_groups.add(container)\n\n    result = []\n\n    for option_group in plugin_groups:\n        result.append(\"### %s ###\" % option_group.title)\n\n        for option in option_group.option_list:\n            if not option.github_action:\n                continue\n\n            result.append(formatOption(option))\n\n        result.append(\"\")\n\n    return textwrap.indent(\"\\n\".join(result), \"  \")\n\n\naction_yaml = template.render(\n    get_top_options=get_top_options,\n    get_group_options=get_group_options,\n    get_plugin_options=get_plugin_options,\n)\n\nif changeTextFileContents(\"action.yml\", action_yaml):\n    print(\"Updated.\")\nelse:\n    print(\"Already up to date.\")\n"
  }
]